@canonry/canonry 7.71.0 → 7.72.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +1 -1
- package/assets/assets/{AgentSetupPage-DexQKsfX.js → AgentSetupPage-D39M9CRK.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-C0tKUYig.js → AuditHistoryPanel-BS-iFyHX.js} +1 -1
- package/assets/assets/{BacklinksPage-CXKsDXhy.js → BacklinksPage-BW2bEGF4.js} +1 -1
- package/assets/assets/{HistoryPage-D1UkPELF.js → HistoryPage-Dh6o2iVd.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-DL9cbtVz.js +4 -0
- package/assets/assets/{ProjectPage-DVQora-C.js → ProjectPage-DXh97uDN.js} +5 -5
- package/assets/assets/{RunsPage-CnPgX-bf.js → RunsPage-BM4ETLsm.js} +1 -1
- package/assets/assets/SettingsPage-DpJTB2-Q.js +1 -0
- package/assets/assets/SiteHealthSection-CmlMQ17V.js +2 -0
- package/assets/assets/{ToneBadge-aGjnkfBI.js → ToneBadge-CmvL5mFG.js} +1 -1
- package/assets/assets/{TrafficPage-DIa6lxo2.js → TrafficPage-ClH3Dxnm.js} +4 -4
- package/assets/assets/{TrafficSourceDetailPage-BTFJ4JkC.js → TrafficSourceDetailPage-DE-NyNGz.js} +1 -1
- package/assets/assets/{account-context-RobEwj-E.js → account-context-BwV6ox8O.js} +1 -1
- package/assets/assets/{card-BLjXAqaV.js → card-DhkoBNyY.js} +1 -1
- package/assets/assets/{extract-error-message-BnVETQ_r.js → extract-error-message-dNDtiSBo.js} +1 -1
- package/assets/assets/{format-helpers-2INiLwsz.js → format-helpers-Bt4tx-f3.js} +1 -1
- package/assets/assets/{index-zdoJudA4.js → index-MbApCekj.js} +16 -16
- package/assets/assets/{query-client-BMplcUQL.js → query-client-D-zMw63p.js} +1 -1
- package/assets/assets/{react-query-BYjj2p2M.js → react-query-EdiRRB2q.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-CerNhJzW.js → react-sigma_core.esm.min-Bidr1Gxk.js} +1 -1
- package/assets/assets/service-BUi8JgGI.js +1 -0
- package/assets/index.html +7 -7
- package/dist/{ads-P75E4E3Q.js → ads-FFUUMS4J.js} +3 -3
- package/dist/{agent-WKTCTJL7.js → agent-LCD2VG7C.js} +7 -7
- package/dist/{agent-ask-CI4I5UER.js → agent-ask-OBHTCYFR.js} +3 -3
- package/dist/{agent-conversations-2LXN6PC5.js → agent-conversations-VMZ4NFIX.js} +3 -3
- package/dist/{agent-memory-STJUYUEI.js → agent-memory-UPFJFNWC.js} +3 -3
- package/dist/{agent-providers-HRQCKR57.js → agent-providers-4GOWLBZK.js} +3 -3
- package/dist/{agent-transcript-SMNVT5UA.js → agent-transcript-RGXIVZUP.js} +3 -3
- package/dist/{analytics-GZRA5LS4.js → analytics-FBK4XV5P.js} +3 -3
- package/dist/{apply-QXMZGXAY.js → apply-Y2DVE3YB.js} +3 -3
- package/dist/{backfill-3VVYI6XX.js → backfill-7SGCPH6J.js} +9 -9
- package/dist/{backlinks-VUTZFYJY.js → backlinks-YWHFC7DZ.js} +3 -3
- package/dist/{bing-DKYPVXU4.js → bing-7BP3DWPK.js} +3 -3
- package/dist/{bootstrap-3CMHZS6G.js → bootstrap-Z7QSKVPL.js} +10 -10
- package/dist/{cdp-XP4RGCA6.js → cdp-OL6RENO3.js} +7 -7
- package/dist/{chunk-SNCRERSZ.js → chunk-3AG3LPZX.js} +1 -1
- package/dist/{chunk-JCECURGF.js → chunk-4LTL5RNY.js} +4 -4
- package/dist/{chunk-ALXQPMYR.js → chunk-6MYHGP46.js} +1 -1
- package/dist/{chunk-SZSJALQM.js → chunk-7KOAP47B.js} +21 -8
- package/dist/{chunk-T6IV35KG.js → chunk-ATT3ZCSS.js} +2 -2
- package/dist/{chunk-U6EUBP4B.js → chunk-BADJCT6U.js} +1 -1
- package/dist/{chunk-JB4NDUWJ.js → chunk-BZZDFIY2.js} +1 -1
- package/dist/{chunk-Z6BDB4KS.js → chunk-DFCKSJQI.js} +4 -4
- package/dist/{chunk-ETMB45WP.js → chunk-DRGCVTYH.js} +1 -1
- package/dist/{chunk-WE3SK5GQ.js → chunk-GA2EHZTI.js} +4 -4
- package/dist/{chunk-XSRKTGRG.js → chunk-GPTRCOKV.js} +38 -21
- package/dist/{chunk-VLFPI3T3.js → chunk-H4HNXCDF.js} +2 -2
- package/dist/{chunk-ILLWCY2P.js → chunk-IV6VZ63E.js} +3 -3
- package/dist/{chunk-FNVUPIMW.js → chunk-IZMT4WLZ.js} +2 -2
- package/dist/{chunk-WHH7HWN7.js → chunk-J523Y7X2.js} +1 -1
- package/dist/{chunk-3NOFNFGV.js → chunk-JE5QURTR.js} +1 -1
- package/dist/{chunk-WNBN4FYE.js → chunk-JEBY6MS6.js} +1 -1
- package/dist/{chunk-K4S2T6C5.js → chunk-JO73L677.js} +2 -2
- package/dist/{chunk-DEMNY4YE.js → chunk-MJYO6UK2.js} +2 -2
- package/dist/{chunk-IX7AKQBJ.js → chunk-NZZWJCKS.js} +3 -3
- package/dist/{chunk-EDQ4V4PJ.js → chunk-O7WOCTBD.js} +13 -1
- package/dist/{chunk-OOXR7SZ5.js → chunk-P3UGNR2Y.js} +4 -4
- package/dist/{chunk-NPHBHVAY.js → chunk-PPM6Z7CM.js} +1 -1
- package/dist/{chunk-AVNEHYTZ.js → chunk-Q25JQANW.js} +1 -1
- package/dist/{chunk-2G3J62KV.js → chunk-QDN3FL2A.js} +1 -1
- package/dist/{chunk-JEC5Z22M.js → chunk-QKMGGM4B.js} +5 -5
- package/dist/{chunk-JHCIMIB5.js → chunk-TEDY3MHN.js} +3 -3
- package/dist/{chunk-DP5V4C3I.js → chunk-TOX6HAQJ.js} +3 -3
- package/dist/{chunk-AAPMP2T3.js → chunk-TUVG7BIF.js} +8 -8
- package/dist/{chunk-ZCIC3DLS.js → chunk-UWBJWKDQ.js} +2 -2
- package/dist/{chunk-C3ZH2HLV.js → chunk-WJ2JU32O.js} +5 -5
- package/dist/{chunk-QREFWO3Q.js → chunk-XR6ZVMYK.js} +1 -1
- package/dist/{chunk-KRDMSGNZ.js → chunk-YFITKHCV.js} +334 -334
- package/dist/{chunk-A3NSYJJL.js → chunk-YXAKL5HM.js} +9 -1
- package/dist/{citations-X24SQ4ZU.js → citations-RVSC67GE.js} +3 -3
- package/dist/{cli-catalog-RYUJEUAY.js → cli-catalog-NEZE5QU5.js} +3 -3
- package/dist/{cli-commands-DFTOVHCU.js → cli-commands-HGCYU4MQ.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-4GIR3D4Q.js → competitor-BX3M3OYS.js} +3 -3
- package/dist/{content-FPMODFJ4.js → content-PKJMVMHJ.js} +3 -3
- package/dist/{dashboard-IJCLC5MW.js → dashboard-SVHZBVM6.js} +6 -6
- package/dist/{demo-52GRHFQH.js → demo-HYDPECCK.js} +1 -1
- package/dist/{demo-server-QZPEIXU2.js → demo-server-KEOO7WFO.js} +11 -11
- package/dist/{discover-Y7I3V75V.js → discover-JDP44ZHX.js} +3 -3
- package/dist/{discover-eval-TS67TA2C.js → discover-eval-6ORCVYYR.js} +3 -3
- package/dist/{doctor-E3OPJGNR.js → doctor-TVZRMBSS.js} +3 -3
- package/dist/{evidence-HBPR3QYE.js → evidence-FNIAFBBG.js} +3 -3
- package/dist/{export-cmd-AXSRXCD5.js → export-cmd-HQNF2SSD.js} +3 -3
- package/dist/{ga-JXHGIEMK.js → ga-PIO5OXMK.js} +3 -3
- package/dist/{gbp-4M54KRXG.js → gbp-3R5FME43.js} +3 -3
- package/dist/{google-TBZLFQTN.js → google-BYZREX2O.js} +4 -4
- package/dist/{google-marketing-EFUITED7.js → google-marketing-SPQ2GW6X.js} +1 -1
- package/dist/{health-cmd-5SCHBHXS.js → health-cmd-HH5RYMSV.js} +3 -3
- package/dist/{history-BLOGMFLZ.js → history-Q35NLLMJ.js} +3 -3
- package/dist/index.d.ts +84 -67
- package/dist/index.js +24 -24
- package/dist/{init-2WCCRDYU.js → init-TV4ZKAAW.js} +11 -11
- package/dist/{insights-AUTLWRQS.js → insights-SH73B4PD.js} +3 -3
- package/dist/intelligence-service-YNHDEY4M.js +15 -0
- package/dist/{journeys-7Y3HE5AX.js → journeys-SIV7HPW7.js} +3 -3
- package/dist/{keys-3T65JGMW.js → keys-O656YWSW.js} +3 -3
- package/dist/{keyword-2MQEXEYJ.js → keyword-FZ2N4EW7.js} +3 -3
- package/dist/{logs-4AWZCX2X.js → logs-2NPN7HBI.js} +3 -3
- package/dist/{mcp-RCMC554F.js → mcp-RHQY3DV6.js} +2 -2
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-HFPXGBVZ.js → measurement-plan-JQKVSJRL.js} +5 -5
- package/dist/{notify-GEUMV4QL.js → notify-VTAYBHC6.js} +3 -3
- package/dist/{organic-evidence-TAH2R2U4.js → organic-evidence-HPXXEPOW.js} +3 -3
- package/dist/{overview-WBZW5QMX.js → overview-FSBNDYZJ.js} +4 -4
- package/dist/{project-52XSBNDM.js → project-MAPPXURS.js} +3 -3
- package/dist/{query-7DHBS2QS.js → query-R6DLPIPJ.js} +3 -3
- package/dist/{research-VDLJDU72.js → research-FXKOEUQB.js} +3 -3
- package/dist/{results-export-4XMDISAJ.js → results-export-X2PUM63S.js} +3 -3
- package/dist/{run-NQ664S64.js → run-6ENTG4IO.js} +4 -4
- package/dist/{schedule-CFG2I3BJ.js → schedule-DMMVRT7P.js} +3 -3
- package/dist/{search-Q5HSLPLD.js → search-FHI6APT7.js} +3 -3
- package/dist/{serve-4X3LDV6K.js → serve-76BGQFPW.js} +25 -25
- package/dist/{session-3JP36MHE.js → session-JBTIV7SS.js} +12 -12
- package/dist/{settings-Y7RLRCLF.js → settings-FMB4QED4.js} +3 -3
- package/dist/{skills-ZVV7HCF5.js → skills-HBIMHSOI.js} +2 -2
- package/dist/{snapshot-UAWGXBKI.js → snapshot-RBA2EL7R.js} +3 -3
- package/dist/{src-6ZMVHPAY.js → src-BXXGJOQB.js} +2 -2
- package/dist/{status-A2FZZJ4M.js → status-ATFDFAVG.js} +4 -4
- package/dist/{technical-aeo-HXGF72PP.js → technical-aeo-JWQTGCTB.js} +6 -4
- package/dist/{telemetry-7SHJAUQD.js → telemetry-6QFGJL2I.js} +4 -4
- package/dist/{tools-3HY3R5J5.js → tools-4VRHKUBE.js} +11 -11
- package/dist/{traffic-6LPWSVRR.js → traffic-5R7M4CK5.js} +5 -5
- package/dist/{users-UHABRTME.js → users-24TIUYJY.js} +3 -3
- package/dist/{visibility-stats-Z5D6ITSA.js → visibility-stats-YLQPPBJJ.js} +3 -3
- package/dist/{wordpress-HEIQZGMP.js → wordpress-7VDPHMUZ.js} +3 -3
- package/package.json +2 -2
- package/assets/assets/MeasurementPropertyPage-CsSUHpB7.js +0 -4
- package/assets/assets/SettingsPage-DfiH_eyL.js +0 -1
- package/assets/assets/SiteHealthSection-BTfTcF_w.js +0 -2
- package/assets/assets/service-DM_6LxOl.js +0 -1
- package/dist/intelligence-service-XDGWLXW4.js +0 -15
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-ELCLGWUT.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
7
7
|
import {
|
|
8
8
|
getConfigPath,
|
|
9
9
|
loadConfig,
|
|
10
10
|
saveConfigPatch
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JE5QURTR.js";
|
|
12
12
|
import "./chunk-AOJU5LKX.js";
|
|
13
13
|
import {
|
|
14
14
|
isMachineFormat
|
|
15
15
|
} from "./chunk-HGMYEDAQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-YXAKL5HM.js";
|
|
17
17
|
import "./chunk-MLKGABMK.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/settings.ts
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
parseSkillsClient,
|
|
10
10
|
resolveBundledSkillsRoot,
|
|
11
11
|
shouldPrintServeSkillsNudge
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PPM6Z7CM.js";
|
|
13
13
|
import "./chunk-AOJU5LKX.js";
|
|
14
14
|
import "./chunk-HGMYEDAQ.js";
|
|
15
15
|
import {
|
|
16
16
|
CodingAgents,
|
|
17
17
|
SkillsClients
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YXAKL5HM.js";
|
|
19
19
|
import "./chunk-MLKGABMK.js";
|
|
20
20
|
export {
|
|
21
21
|
BUNDLED_SKILL_NAMES,
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-XEBKF4N5.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
7
|
+
import "./chunk-JE5QURTR.js";
|
|
8
8
|
import "./chunk-AOJU5LKX.js";
|
|
9
9
|
import {
|
|
10
10
|
isMachineFormat
|
|
11
11
|
} from "./chunk-HGMYEDAQ.js";
|
|
12
12
|
import {
|
|
13
13
|
factorStatusFromScore
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YXAKL5HM.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/snapshot.ts
|
|
@@ -166,10 +166,10 @@ import {
|
|
|
166
166
|
userSessions,
|
|
167
167
|
users,
|
|
168
168
|
writeNegativeReviewMaxStars
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-O7WOCTBD.js";
|
|
170
170
|
import {
|
|
171
171
|
emptySeoResults
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-YXAKL5HM.js";
|
|
173
173
|
import "./chunk-MLKGABMK.js";
|
|
174
174
|
export {
|
|
175
175
|
MIGRATION_VERSIONS,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAdmissionLines
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UWBJWKDQ.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
7
|
+
import "./chunk-JE5QURTR.js";
|
|
8
8
|
import {
|
|
9
9
|
emitJsonl
|
|
10
10
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
HostedMcpStatuses,
|
|
18
18
|
HostedMcpUnavailableReasons
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YXAKL5HM.js";
|
|
20
20
|
import "./chunk-MLKGABMK.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/status.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
4
|
+
import "./chunk-JE5QURTR.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-YXAKL5HM.js";
|
|
17
17
|
import "./chunk-MLKGABMK.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/technical-aeo.ts
|
|
@@ -330,10 +330,12 @@ function availableScanDateLines(dates) {
|
|
|
330
330
|
}
|
|
331
331
|
function inventorySummaryLines(summary) {
|
|
332
332
|
if (!summary) return [];
|
|
333
|
+
const notFetched = summary.urlVersionsNotFetched ?? 0;
|
|
334
|
+
const urlVersions = summary.urlVersions + notFetched;
|
|
333
335
|
return [
|
|
334
336
|
`Stored canonical pages: ${summary.total} total \xB7 ${summary.eligible} eligible \xB7 ${summary.excluded} excluded`,
|
|
335
337
|
...summary.excludedReasons.map((reason) => `Excluded \xB7 ${reason.healthReason}: ${reason.pages}`),
|
|
336
|
-
...
|
|
338
|
+
...urlVersions > 0 ? [`URL versions (copies of a page, not scored): ${urlVersions}${notFetched > 0 ? ` (${notFetched} not fetched)` : ""}`] : []
|
|
337
339
|
];
|
|
338
340
|
}
|
|
339
341
|
async function technicalAeoCrawlPages(project, opts) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTelemetryStatus,
|
|
3
3
|
setTelemetryPreference
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MJYO6UK2.js";
|
|
5
5
|
import {
|
|
6
6
|
createApiClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
8
8
|
import {
|
|
9
9
|
configExists,
|
|
10
10
|
getConfigPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JE5QURTR.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-YXAKL5HM.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-P3UGNR2Y.js";
|
|
15
|
+
import "./chunk-ATT3ZCSS.js";
|
|
16
|
+
import "./chunk-JE5QURTR.js";
|
|
17
|
+
import "./chunk-GA2EHZTI.js";
|
|
18
|
+
import "./chunk-J523Y7X2.js";
|
|
19
|
+
import "./chunk-3AG3LPZX.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-7KOAP47B.js";
|
|
23
|
+
import "./chunk-JEBY6MS6.js";
|
|
24
|
+
import "./chunk-BADJCT6U.js";
|
|
25
|
+
import "./chunk-O7WOCTBD.js";
|
|
26
|
+
import "./chunk-YXAKL5HM.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-BZZDFIY2.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfigRaw
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JE5QURTR.js";
|
|
10
10
|
import {
|
|
11
11
|
emitJsonl
|
|
12
12
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
DEFAULT_BOT_LIST,
|
|
24
24
|
generateWorkerScript,
|
|
25
25
|
generateWranglerToml
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JEBY6MS6.js";
|
|
27
27
|
import {
|
|
28
28
|
RunStatuses,
|
|
29
29
|
TrafficEventKinds,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
parseTrafficAnalyticsPeriod,
|
|
35
35
|
referralAssessmentQuerySchema,
|
|
36
36
|
trafficSamplesQuerySchema
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-YXAKL5HM.js";
|
|
38
38
|
import "./chunk-MLKGABMK.js";
|
|
39
39
|
|
|
40
40
|
// src/commands/traffic.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ATT3ZCSS.js";
|
|
4
|
+
import "./chunk-JE5QURTR.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-YXAKL5HM.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-ATT3ZCSS.js";
|
|
4
|
+
import "./chunk-JE5QURTR.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-YXAKL5HM.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-ATT3ZCSS.js";
|
|
4
|
+
import "./chunk-JE5QURTR.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-YXAKL5HM.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.72.1",
|
|
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": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@anthropic-ai/sdk": "^0.137.0",
|
|
60
|
-
"@canonry/aeo-audit": "7.
|
|
60
|
+
"@canonry/aeo-audit": "7.5.0",
|
|
61
61
|
"@fastify/rate-limit": "^11.2.1",
|
|
62
62
|
"@fastify/static": "^10.1.6",
|
|
63
63
|
"@google/genai": "^2.30.0",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{it as t,ot as n}from"./vendor-lucide-BILL9eZH.js";import{r}from"./vendor-markdown-DNTP_967.js";import{_ as i,b as a,d as o,f as s,g as c,p as l,u}from"./vendor-tanstack-BoP7BGaH.js";import{Br as d,Jr as f,Nr as p,Pr as m,St as h,at as ee,pt as g,r as _,t as v,yi as te}from"./ToneBadge-aGjnkfBI.js";import{_ as y,a as b,b as x}from"./format-helpers-2INiLwsz.js";import{r as ne}from"./account-context-RobEwj-E.js";import{$ as S,Q as C,Yt as re,Z as w,et as T,it as E,st as ie,tt as ae}from"./react-query-BYjj2p2M.js";import{f as D,h as O}from"./ChartPrimitives-CfjGDL5d.js";import{t as k}from"./InfoTooltip-CJ3IWqBk.js";import{G as A,H as j,J as oe,K as se,L as M,dn as ce,it as N,ln as le,ot as P,sn as ue,z as de}from"./index-zdoJudA4.js";import{c as F,d as fe,r as I,s as pe,t as L,u as R}from"./service-DM_6LxOl.js";var z=e(n(),1),B=r(),V={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 H(e){return[...new Set(e.split(`
|
|
2
|
-
`).map(e=>e.trim()).filter(Boolean))]}function U(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function W(e,t){return U(e.aliases,t.aliases)&&U(e.identityAliases??[],t.identityAliases??[])}function me(e,t,n){let{identityAliases:r,...i}=e;return n.length>0?{...i,aliases:t,identityAliases:n}:{...i,aliases:t}}function he({label:e,names:t}){return(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e}),(0,B.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>(0,B.jsx)(`li`,{className:`text-label-14 text-secondary`,children:e},e))})]})}function G({id:e,issues:t}){return t.length===0?null:(0,B.jsx)(`ul`,{id:e,className:`mt-2 space-y-1`,"aria-label":`Name warnings`,children:t.map(e=>(0,B.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=L}){let{canWrite:c}=ne(),l=(0,z.useId)(),f=a({...C({client:g,path:{name:e}}),enabled:c}),p=a({...ie({client:g,path:{name:e}}),enabled:c}),h=f.data?.draft?.authoring.targets.find(e=>e.stableKey===t),ee=n.identityAliases??[],v=h!==void 0&&f.data?.draft?.baseActiveRevision===r&&!W(h,n),te=!f.isFetching&&!p.isPending,y=p.data,b=(0,z.useMemo)(()=>y?d(y):o,[y,o]),[x,S]=(0,z.useState)(!1),[re,w]=(0,z.useState)(``),[T,E]=(0,z.useState)(``),[ae,D]=(0,z.useState)(n),[O,A]=(0,z.useState)(null),j=`${e}\u0000${t}`,[oe,se]=(0,z.useState)(j);oe!==j&&(se(j),S(!1),w(``),E(``),D(n),A(null));let ce=(0,z.useRef)(j);ce.current=j;let N=(0,z.useMemo)(()=>H(re),[re]),le=(0,z.useMemo)(()=>H(T),[T]),P=(0,z.useMemo)(()=>m({aliases:N,identityAliases:le,brandNames:b}),[N,le,b]),ue=P.filter(e=>e.field===`aliases`),de=P.filter(e=>e.field===`identityAliases`);function F(e){w(e.aliases.join(`
|
|
3
|
-
`)),E((e.identityAliases??[]).join(`
|
|
4
|
-
`)),D({aliases:[...e.aliases],identityAliases:[...e.identityAliases??[]]})}function fe(e){return e.draft?e.draft.authoring.targets.find(e=>e.stableKey===t)??null:n}function pe(){F(v?h:n),A(null),S(!0)}function R(e){e&&F(e),A({tone:`negative`,text:V.conflict,review:!1})}let U=i({mutationFn:async i=>{let a=await s.loadDraft(e);if(!a.draft){if(W(i.names,n))return{outcome:`unchanged`};if(!W(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(V.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`}:W(i.names,c)?{outcome:`unchanged`}:W(i.base,c)?(await s.upsertTarget(e,a.etag,me(c,i.names.aliases,i.names.identityAliases)),{outcome:`saved`}):{outcome:`conflict`,latest:c}},meta:{skipGlobalErrorToast:!0},onSuccess:(e,t)=>{if(t.openFor===ce.current)switch(e.outcome){case`saved`:S(!1),A({tone:`positive`,text:V.saved,review:!0});return;case`unchanged`:S(!1),A({tone:`positive`,text:V.noChanges,review:!1});return;case`stale`:A({tone:`negative`,text:V.staleDraft,review:!0});return;case`missing`:A({tone:`negative`,text:V.missingFromDraft,review:!0});return;case`conflict`:R(e.latest),f.refetch();return}},onError:(e,t)=>{t.openFor===ce.current&&(I(e)?(R(null),f.refetch().then(e=>{e.isSuccess&&R(fe(e.data))})):A({tone:`negative`,text:V.failed,review:!1}))}}),ge=(0,B.jsx)(u,{to:`/projects/$projectName/portfolio`,params:{projectName:e},className:`text-link underline-offset-2 hover:underline`,children:V.review}),K=n.aliases.length+ee.length;return(0,B.jsxs)(`section`,{"aria-labelledby":`property-names`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(`h2`,{id:`property-names`,className:`text-heading-16 text-heading`,children:V.heading}),(0,B.jsx)(k,{text:V.help})]}),(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsxs)(`p`,{className:`supporting-copy`,children:[K,` `,K===1?`name`:`names`]}),c&&!x?(0,B.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:!te,onClick:pe,children:V.edit}):null]})]}),O?(0,B.jsxs)(`p`,{role:O.tone===`negative`?`alert`:`status`,className:`mb-3 text-copy-14 ${O.tone===`negative`?`text-negative`:`text-positive`}`,children:[O.text,O.review?(0,B.jsxs)(B.Fragment,{children:[` `,ge]}):null]}):v&&!x?(0,B.jsxs)(`p`,{role:`status`,className:`mb-3 text-copy-14 text-caution`,children:[V.pending,` `,ge]}):null,x?(0,B.jsxs)(`form`,{className:`space-y-4`,"aria-label":`Edit names`,onSubmit:e=>{e.preventDefault(),!U.isPending&&U.mutate({names:{aliases:N,identityAliases:le},base:ae,openFor:j})},children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{htmlFor:`${l}-names`,className:`block text-label-14-strong text-heading`,children:V.names}),(0,B.jsx)(`p`,{id:`${l}-names-hint`,className:`text-copy-14 text-secondary`,children:V.namesHint}),(0,B.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${ue.length?` ${l}-names-issues`:``}`,value:re,onChange:e=>w(e.target.value)}),(0,B.jsx)(G,{id:`${l}-names-issues`,issues:ue}),N.length===0?(0,B.jsx)(`p`,{className:`mt-2 text-copy-14 text-caution`,children:V.noNames}):null]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{htmlFor:`${l}-qualified`,className:`block text-label-14-strong text-heading`,children:V.qualifiedNames}),(0,B.jsx)(`p`,{id:`${l}-qualified-hint`,className:`text-copy-14 text-secondary`,children:V.qualifiedHint}),(0,B.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${de.length?` ${l}-qualified-issues`:``}`,value:T,onChange:e=>E(e.target.value)}),(0,B.jsx)(G,{id:`${l}-qualified-issues`,issues:de}),(0,B.jsx)(`p`,{id:`${l}-qualified-note`,className:`mt-2 max-w-3xl text-copy-14 text-secondary`,children:V.qualifiedNote})]}),(0,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:V.draftOnly}),(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsx)(M,{type:`submit`,className:`h-11 px-4 text-label-14 md:h-11`,disabled:U.isPending,children:U.isPending?V.saving:V.save}),(0,B.jsx)(_,{type:`button`,variant:`ghost`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:U.isPending,onClick:()=>{S(!1),A(null)},children:V.cancel})]})]}):K===0?(0,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:V.noNames}):(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[n.aliases.length>0?(0,B.jsx)(he,{label:V.names,names:n.aliases}):null,ee.length>0?(0,B.jsx)(he,{label:V.qualifiedNames,names:ee}):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,B.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,B.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,B.jsx)(`span`,{className:`text-label-12 text-muted`,children:`No mention signal for this Property`})]}):!e.mentioned&&e.mentionIdentity===`wrong-subject`?(0,B.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,B.jsx)(v,{tone:`neutral`,children:`Not mentioned`}),(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-label-12 text-muted`,children:[P.label,(0,B.jsx)(k,{text:P.property})]})]}):(0,B.jsx)(v,{tone:e.mentioned?`positive`:`neutral`,children:e.mentioned?`Mentioned`:`Not mentioned`})}var xe=`—`;function Se({row:e}){return e.cited===null?(0,B.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,B.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,B.jsx)(`span`,{className:`text-label-12 text-muted`,children:`Sources were not fully captured`})]}):(0,B.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,B.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,B.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer returned no source URLs at all.`}):(0,B.jsxs)(`details`,{className:`mt-2`,"data-answer-sources":!0,children:[(0,B.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:[R,` (`,e.sources.length,`)`]}),(0,B.jsx)(`div`,{className:`overflow-x-auto`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,B.jsxs)(`caption`,{className:`sr-only`,children:[`Source URLs for `,e.queryText]}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Match`}),(0,B.jsx)(`th`,{children:`URL`})]})}),(0,B.jsx)(`tbody`,{children:Y(e.sources).map(e=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:(0,B.jsx)(v,{tone:J[e.classification].tone,children:J[e.classification].label})}),(0,B.jsx)(`td`,{children:(0,B.jsx)(N,{url:e.sourceUrl})})]},e.sourceUrl))})]})})]})}function we({project:e,targetKey:t,resultId:n}){let r=a({...E({client:g,path:{name:e},query:{targetKey:t,resultId:n}})});if(r.isPending)return(0,B.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,role:`status`,"aria-live":`polite`,children:`Loading the answer…`});if(r.isError)return(0,B.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,B.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer was measured, but its text was not stored.`}):(0,B.jsx)(`div`,{className:`py-2`,children:(0,B.jsx)(fe,{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,B.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5`,children:[(0,B.jsx)(`span`,{className:n?`text-label-18-strong text-secondary`:`text-label-14-strong text-secondary`,children:`Not measured`}),(0,B.jsx)(`span`,{className:`text-label-14 text-secondary`,children:Te(e)})]});let r=f(e.value),i=e.numerator===void 0||e.denominator===void 0?null:`${e.numerator} of ${e.denominator}`,a=b(e,t);return(0,B.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5 tabular-nums`,children:[(0,B.jsx)(`span`,{className:n?`text-label-18-strong text-heading`:`text-label-14-strong text-primary`,children:r}),i?(0,B.jsx)(`span`,{className:`text-label-12 text-muted`,children:i}):null,a?(0,B.jsx)(`span`,{className:`-ml-2 flex`,children:(0,B.jsx)(k,{tone:`caution`,placement:`bottom`,label:a.label,text:a.text})}):null]})}function Ee(e,t,n){return w({client:g,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 ${D(O(e))}`;return r===null&&t===void 0?null:(0,B.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,B.jsxs)(`section`,{"aria-labelledby":`property-market`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Competitive comparison`}),(0,B.jsxs)(`h2`,{id:`property-market`,className:`text-heading-16 text-heading`,children:[`Measured at the market level`,(0,B.jsx)(k,{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,B.jsx)(_,{asChild:!0,type:`button`,size:`sm`,variant:`outline`,children:(0,B.jsx)(u,{to:`/projects/$projectName`,params:{projectName:e},search:e=>se(j(e),{measurementScope:`project`}),children:`Open measurement overview`})})]}),(0,B.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:t.map(e=>(0,B.jsxs)(`li`,{className:`rounded-md border border-default px-3 py-1.5 text-label-14 text-strong`,children:[e.label,(0,B.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,B.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,B.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,B.jsx)(`p`,{className:`aeo-hero-row-value text-copy-16-strong text-secondary`,children:r?`Unavailable`:`…`}),r?(0,B.jsx)(`div`,{}):(0,B.jsx)(`div`,{className:`aeo-hero-row-bar`,"aria-hidden":`true`}),(0,B.jsx)(`p`,{className:`aeo-hero-row-detail`,children:r?`Could not be loaded`:`Loading`})]});if(t.state===`unavailable`){let n=Te(t);return(0,B.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,B.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,B.jsx)(`p`,{className:`aeo-hero-row-value text-copy-16-strong text-secondary`,children:`Not measured`}),(0,B.jsx)(`div`,{}),(0,B.jsx)(`p`,{className:`aeo-hero-row-detail`,children:n===`Not measured`?``:n})]})}let{figure:i,sign:a}=y(f(t.value)),o=t.numerator===void 0||t.denominator===void 0?null:`${t.numerator} of ${t.denominator}`,s=b(t,n);return(0,B.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,B.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,B.jsxs)(`p`,{className:`aeo-hero-row-value text-heading`,children:[i,a?(0,B.jsx)(`span`,{className:`text-faint`,children:a}):null]}),(0,B.jsx)(`div`,{className:`aeo-hero-row-bar`,"aria-hidden":`true`,children:(0,B.jsx)(`div`,{className:`metric-card-bar-fill progress-fill-neutral`,style:{width:`${t.value*100}%`}})}),(0,B.jsxs)(`p`,{className:`aeo-hero-row-detail tabular-nums`,children:[o??``,s?(0,B.jsx)(`span`,{className:`block`,children:(0,B.jsx)(k,{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,B.jsxs)(`section`,{"aria-labelledby":`property-coverage-hero`,children:[(0,B.jsx)(`h2`,{id:`property-coverage-hero`,className:`sr-only`,children:`Coverage for this Property`}),(0,B.jsxs)(`div`,{className:`space-y-5`,children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Non-brand · the demand to earn`}),(0,B.jsx)(Z,{label:`Mentioned`,metric:t?.mentionCoverage,signal:`mentioned`,failed:r}),(0,B.jsx)(Z,{label:`Cited`,metric:t?.citationCoverage,signal:`cited`,failed:r})]}),(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Branded · already named`}),(0,B.jsx)(Z,{label:`Mentioned`,metric:e?.mentionCoverage,signal:`mentioned`,failed:n}),(0,B.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,B.jsxs)(`section`,{"aria-labelledby":`property-brand-contrast`,children:[(0,B.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`The gap`}),(0,B.jsxs)(`h2`,{id:`property-brand-contrast`,className:`text-heading-16 text-heading`,children:[`Named versus not named`,(0,B.jsx)(k,{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,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[560px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Mention and citation coverage for this Property, split by query class`}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Query type`}),(0,B.jsx)(`th`,{children:`Mentioned in the answer`}),(0,B.jsx)(`th`,{children:`Cited as a source`})]})}),(0,B.jsx)(`tbody`,{children:[{queryClass:`branded`,row:e,isError:n},{queryClass:`non-brand`,row:t,isError:r}].map(({queryClass:e,row:t,isError:n})=>(0,B.jsxs)(`tr`,{children:[(0,B.jsxs)(`td`,{children:[(0,B.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:q[e].headline}),(0,B.jsx)(`span`,{className:`mt-0.5 block text-label-12 text-muted`,children:q[e].technical}),t&&n?(0,B.jsxs)(`span`,{className:`mt-2 flex flex-wrap items-center gap-2 text-label-14 text-caution`,children:[(0,B.jsx)(`span`,{role:`status`,children:`Refresh failed.`}),(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`td`,{children:(0,B.jsx)(X,{metric:t.mentionCoverage,signal:`mentioned`,emphasis:!0})}),(0,B.jsx)(`td`,{children:(0,B.jsx)(X,{metric:t.citationCoverage,signal:`cited`,emphasis:!0})})]}):n?(0,B.jsx)(`td`,{colSpan:2,children:(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,B.jsxs)(`span`,{role:`alert`,children:[`Could not load `,q[e].technical.toLocaleLowerCase(),`.`]}),(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`td`,{children:(0,B.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})}),(0,B.jsx)(`td`,{children:(0,B.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})})]})]},e))})]})})]})}function Me({row:e,queryClass:t,isError:n}){return(0,B.jsxs)(`section`,{"aria-labelledby":`property-providers`,className:`page-section-divider`,children:[(0,B.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,B.jsx)(`div`,{children:(0,B.jsxs)(`h2`,{id:`property-providers`,className:`text-heading-16 text-heading`,children:[`Which engines answer for this Property`,(0,B.jsx)(k,{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,B.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,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):e.providers.length===0?(0,B.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,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[520px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Per-engine mention and citation coverage`}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Engine`}),(0,B.jsx)(`th`,{children:`Mentioned`}),(0,B.jsx)(`th`,{children:`Cited`})]})}),(0,B.jsx)(`tbody`,{children:e.providers.map(e=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{className:`text-label-14-strong text-heading`,children:e.provider}),(0,B.jsx)(`td`,{children:(0,B.jsx)(X,{metric:e.mentionCoverage,signal:`mentioned`})}),(0,B.jsx)(`td`,{children:(0,B.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({...T({client:g,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,B.jsxs)(`section`,{"aria-labelledby":`property-named-instead`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsx)(`div`,{children:(0,B.jsxs)(`h2`,{id:`property-named-instead`,className:`text-heading-16 text-heading`,children:[`Named instead of this Property`,(0,B.jsx)(k,{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,B.jsxs)(`p`,{className:`supporting-copy`,children:[r.data?.total??i.length,` named`]}):null]}),i.length===0?(0,B.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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Names the engines gave instead of this Property`}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Named`}),(0,B.jsx)(`th`,{children:`Answers`}),(0,B.jsx)(`th`,{children:`Engines`}),(0,B.jsx)(`th`,{children:`Queries`})]})}),(0,B.jsx)(`tbody`,{children:i.map(e=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{className:`text-strong`,children:e.name}),(0,B.jsx)(`td`,{className:`tabular-nums text-secondary`,children:e.occurrences}),(0,B.jsxs)(`td`,{className:`text-secondary`,children:[e.providers.join(`, `),e.providersTruncated?` +${e.providerTotal-e.providers.length}`:``]}),(0,B.jsx)(`td`,{className:`text-right`,children:(0,B.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,B.jsx)(`span`,{className:`tabular-nums text-secondary`,children:e.questionTotal}),(0,B.jsx)(k,{text:Ne(e)})]})})]},e.name))})]})}),o?.state===`available`?(0,B.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,B.jsxs)(`section`,{"aria-labelledby":`property-questions`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsx)(`div`,{children:(0,B.jsxs)(`h2`,{id:`property-questions`,className:`text-heading-16 text-heading`,children:[q[t].technical,` assigned to this Property`]})}),(0,B.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` assigned`]})]}),e.length===0?(0,B.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,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Queries assigned to this Property`}),(0,B.jsx)(`thead`,{children:(0,B.jsx)(`tr`,{children:(0,B.jsx)(`th`,{children:`Query`})})}),(0,B.jsx)(`tbody`,{children:e.map(e=>(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{className:`text-secondary`,children:e})},e))})]})})]})}function Ie({urls:e}){return(0,B.jsxs)(`section`,{"aria-labelledby":`property-urls`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsx)(`div`,{children:(0,B.jsxs)(`h2`,{id:`property-urls`,className:`text-heading-16 text-heading`,children:[`URLs that count as this Property`,(0,B.jsx)(k,{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,B.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` configured`]})]}),e.length===0?(0,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No URLs are configured for this Property.`}):(0,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`URL matchers configured for this Property`}),(0,B.jsx)(`thead`,{children:(0,B.jsx)(`tr`,{children:(0,B.jsx)(`th`,{children:`URL`})})}),(0,B.jsx)(`tbody`,{children:e.map(e=>(0,B.jsx)(`tr`,{children:(0,B.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,z.useState)(new Set),s={client:g,path:{name:e},query:{targetKey:t,queryClass:n,shape:te[`other-queries`],limit:K,...r?{runId:r}:{}}},l=c({...ae(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}`,h=q[n].technical.toLocaleLowerCase();return(0,B.jsxs)(`section`,{"aria-labelledby":`property-other-queries`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(`h2`,{id:`property-other-queries`,className:`text-heading-16 text-heading`,children:Q.heading}),(0,B.jsx)(k,{text:Q.help})]}),l.data?(0,B.jsxs)(`p`,{className:`supporting-copy`,children:[p,` `,p===1?`answer`:`answers`,` · `,h,` · `,Q.notCounted]}):null]}),l.isPending?(0,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):l.isError&&f.length===0?(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,B.jsx)(`span`,{role:`alert`,children:Q.loadError}),(0,B.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,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:Q.empty}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table min-w-[640px]`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Answers to other properties’ queries that cited this Property’s pages`}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Query`}),(0,B.jsx)(`th`,{children:`Assigned to`}),(0,B.jsx)(`th`,{children:`Pages cited`}),(0,B.jsx)(`th`,{children:(0,B.jsx)(`span`,{className:`sr-only`,children:`Answer`})})]})}),(0,B.jsx)(`tbody`,{children:f.map(t=>{let n=m(t),r=a.has(n),s=`property-other-query-${encodeURIComponent(n)}`;return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsxs)(`tr`,{children:[(0,B.jsxs)(`td`,{className:`text-secondary`,children:[(0,B.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:t.queryText}),(0,B.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[t.provider,t.location].filter(Boolean).join(` · `)})]}),(0,B.jsx)(`td`,{children:(0,B.jsx)(`ul`,{className:`space-y-1`,children:t.assignedTargetKeys.map(t=>(0,B.jsx)(`li`,{children:(0,B.jsx)(u,{to:`/projects/$projectName/properties/$targetKey`,params:{projectName:e,targetKey:t},search:j,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,B.jsxs)(`td`,{children:[(0,B.jsx)(`ul`,{className:`space-y-1`,children:t.sources.map(e=>(0,B.jsx)(`li`,{className:`min-w-0`,children:(0,B.jsx)(N,{url:e.sourceUrl})},e.sourceUrl))}),t.sourcesTruncated?(0,B.jsxs)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[t.sourceCount,` pages in total`]}):null,t.evidenceComplete?null:(0,B.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:Q.partlySaved})]}),(0,B.jsx)(`td`,{className:`text-right`,children:(0,B.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,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{id:s,colSpan:4,className:`bg-surface-subtle px-4`,children:(0,B.jsx)(we,{project:e,targetKey:t.assignedTargetKeys[0],resultId:t.observationId})})}):null]},n)})})]})}),l.hasNextPage?(0,B.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,B.jsxs)(`span`,{children:[`Showing `,f.length,` of `,p]}),(0,B.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 ${F.allMarkets.toLocaleLowerCase()} and answer engines.`}function ze(){let{projectName:e,targetKey:n}=l({strict:!1}),r=o(),i=s({strict:!1}),d=(0,z.useMemo)(()=>A(i),[i]),[f,p]=(0,z.useState)(new Set),m=e??``,y=n??``,b=!!m&&!!y,x=(0,z.useMemo)(()=>le(`portfolio`,ue(ee())),[]),C=b&&x,{canWrite:w}=ne(),T=a({...S({client:g,path:{name:m}}),enabled:C}),E=T.data?.active?.plan,ie=E?.schemaVersion===2?E:null,D=d.queryClass===`branded`||d.queryClass===`non-brand`?d.queryClass:null,O=e=>ie?.assignments.some(t=>t.targetKey===y&&t.queryClass===e)??!1,M=D??(!O(`non-brand`)&&O(`branded`)?`branded`:`non-brand`);(0,z.useEffect)(()=>{ie&&!D&&r({to:`.`,replace:!0,search:e=>se(e,{queryClass:M})})},[ie,D,M,r]);let N=a({...Ee(m,y,`branded`),enabled:C}),P=a({...Ee(m,y,`non-brand`),enabled:C}),F=De(N.data),fe=De(P.data),I=M===`branded`?N.data:P.data,L=M===`branded`?F:fe,V=(M===`branded`?N.isError:P.isError)&&L===void 0,H=I?.measurement.displayedRunId;ce(m,{view:`property`,selection:{mode:`advanced`,scope:`property`,scopeKey:y,queryClass:M,limit:10,...H?{runId:H}:{}}});let U=L?.mentionCoverage.state===`unavailable`?Te(L.mentionCoverage):void 0,W=I===void 0?void 0:I.measurement.completedAt??null,me=I!==void 0&&(I.measurement.state===`not_measured`||I.nextAction.kind===`run_measurement`),he=e=>se(j(e),{measurementScope:`property`,measurementScopeKey:y,queryClass:M,measurementRunId:void 0,measurementRevision:void 0,measurementTo:void 0}),G=a({...re({client:g,path:{name:m},query:oe(A(he(i)))}),enabled:C&&me,retry:!1}).data,_e=G!==void 0&&G.selection.measurement.measuredRevision!==null&&(G.populations.find(e=>e.queryClass===M)?.summary.queryCount??0)>0,J={client:g,path:{name:m},query:{targetKey:y,queryClass:M,shape:te.answers,limit:K,...H?{runId:H}:{}}},Y=c({...ae(J),enabled:C&&I!==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,z.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===M).flatMap(t=>{let n=e.get(t.queryId);return n===void 0?[]:[n]}))].sort((e,t)=>e.localeCompare(t))},[Z,y,M]),Ve=(0,z.useMemo)(()=>Q?.urlMatchers.map(pe)??[],[Q]),He=(0,z.useMemo)(()=>new Map((Z?.targets??[]).map(e=>[e.stableKey,e.label])),[Z]),Ue=(0,z.useMemo)(()=>Z?.groups.filter(e=>e.targetKeys.includes(y))??[],[Z,y]),$=(0,z.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,B.jsxs)(u,{to:`/projects/$projectName`,params:{projectName:m},search:j,className:`inline-flex items-center gap-1 text-label-12 text-muted hover:text-strong`,children:[(0,B.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`}),`Back to AI Visibility`]});if(!b)return(0,B.jsx)(`div`,{className:`page-container`,children:(0,B.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Missing project name or Property key in URL.`})});if(!x)return(0,B.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,B.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`This view is not available here.`})]});if(T.isPending&&!T.isError)return(0,B.jsx)(`div`,{className:`page-container`,children:(0,B.jsxs)(`div`,{role:`status`,"aria-live":`polite`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:`Loading Property`}),(0,B.jsx)(`div`,{className:`h-32 animate-pulse rounded-md bg-surface-subtle`,"aria-hidden":`true`})]})});let Je=T.isError&&T.data===void 0,Ye=N.isError&&N.data===void 0,Xe=P.isError&&P.data===void 0;return Je||Ye&&Xe?(0,B.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,B.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Could not load this Property.`}),(0,B.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{T.refetch(),N.refetch(),P.refetch()},children:`Try again`})]}):!Z||!Q?(0,B.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,B.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,B.jsx)(_,{asChild:!0,type:`button`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,B.jsx)(u,{to:`/projects/$projectName/portfolio`,params:{projectName:m},children:w?Ne?`Republish setup`:`Open measurement setup`:`View measurement setup`})})]}):(0,B.jsxs)(`div`,{className:`page-container space-y-8`,children:[(0,B.jsxs)(`div`,{className:`page-header`,children:[(0,B.jsxs)(`div`,{className:`page-header-left`,children:[qe,(0,B.jsx)(`h1`,{className:`page-title mt-2`,children:Q.label}),(0,B.jsxs)(`p`,{className:`page-subtitle`,children:[`Property in `,m,ze?(0,B.jsxs)(B.Fragment,{children:[` · Filters not applied `,(0,B.jsx)(k,{text:ze})]}):null]})]}),(0,B.jsxs)(`div`,{className:`page-header-right`,children:[I?(0,B.jsx)(v,{tone:ve[I.measurement.state].tone,children:ve[I.measurement.state].label}):null,L&&L.flags>0?(0,B.jsxs)(v,{tone:`caution`,children:[L.flags,` flagged`]}):null]})]}),(0,B.jsx)(Ae,{branded:F,nonBrand:fe,brandedFailed:Ye,nonBrandFailed:Xe}),(0,B.jsx)(je,{branded:F,nonBrand:fe,brandedError:N.isError,nonBrandError:P.isError,onRetry:e=>{e===`branded`?N.refetch():P.refetch()}}),me?(0,B.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,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:h()?de:w?`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,B.jsx)(_,{asChild:!0,type:`button`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,B.jsx)(u,{to:`/projects/$projectName`,params:{projectName:m},search:_e?he:j,children:_e?`See the last results`:w?`Go to AI Visibility`:`View AI Visibility`})})]}):null,(0,B.jsxs)(`div`,{className:`flex flex-wrap items-end gap-4 border-y border-default py-4`,children:[(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`label`,{htmlFor:`property-query-class`,className:`block text-label-14-strong text-heading`,children:`Query type`}),(0,B.jsxs)(`select`,{id:`property-query-class`,value:M,onChange:e=>{let t=e.target.value===`branded`?`branded`:`non-brand`;r({to:`.`,search:e=>se(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,B.jsx)(`option`,{value:`non-brand`,children:q[`non-brand`].technical}),(0,B.jsx)(`option`,{value:`branded`,children:q.branded.technical})]})]}),(0,B.jsx)(Oe,{measuredAt:W,unmeasuredReason:U,queryClass:M})]}),(0,B.jsx)(Me,{row:L,queryClass:M,isError:V}),(0,B.jsx)(Pe,{project:m,targetKey:y,queryClass:M}),(0,B.jsx)(Fe,{questions:Be,queryClass:M}),(0,B.jsx)(ge,{projectName:m,targetKey:y,published:Q,activeRevision:X.revision,publishedBrandNames:Z.identities.projectBrand.names}),(0,B.jsx)(Ie,{urls:Ve}),(0,B.jsx)(ke,{project:m,groups:Ue}),(0,B.jsxs)(`section`,{"aria-labelledby":`property-evidence`,className:`page-section-divider`,children:[(0,B.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,B.jsx)(`div`,{children:(0,B.jsxs)(`h2`,{id:`property-evidence`,className:`text-heading-16 text-heading`,children:[`Answers the engines gave`,(0,B.jsx)(k,{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,B.jsxs)(`p`,{className:`supporting-copy`,children:[$.length,` of `,We]}):null]}),V?(0,B.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Evidence for `,q[M].technical.toLocaleLowerCase(),` is unavailable. Retry that query type above.`]}):Y.isPending&&$.length===0?(0,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading evidence…`}):Y.isError&&$.length===0?(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,B.jsx)(`span`,{role:`alert`,children:`Evidence could not be loaded.`}),(0,B.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,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:h()?de:`Not measured yet. Run a measurement to collect the answers for this Property.`}):Ge?(0,B.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,B.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No answers matched this Property in the displayed measurement.`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`property-answer-table-container overflow-x-auto rounded-md border border-default`,children:(0,B.jsxs)(`table`,{className:`evidence-table property-evidence-table`,children:[(0,B.jsx)(`caption`,{className:`sr-only`,children:`Answers measured for this Property`}),(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:`Query`}),(0,B.jsx)(`th`,{children:`Mentioned in the answer`}),(0,B.jsx)(`th`,{children:`Cited as a source`}),(0,B.jsx)(`th`,{children:`Sources`}),(0,B.jsx)(`th`,{children:(0,B.jsx)(`span`,{className:`sr-only`,children:`Sources detail`})})]})}),(0,B.jsx)(`tbody`,{children:$.map(e=>{let t=ye(e),n=f.has(t),r=`property-answer-${encodeURIComponent(t)}`;return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsxs)(`tr`,{className:`property-answer-summary`,children:[(0,B.jsxs)(`td`,{className:`text-secondary`,children:[(0,B.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e.queryText}),(0,B.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[e.provider,e.location].filter(Boolean).join(` · `)}),e.historical||e.bridged?(0,B.jsx)(`span`,{className:`mt-1 flex`,children:(0,B.jsx)(v,{tone:`caution`,children:`Historical`})}):null]}),(0,B.jsxs)(`td`,{children:[(0,B.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Mentioned`}),(0,B.jsx)(be,{row:e})]}),(0,B.jsxs)(`td`,{children:[(0,B.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Cited`}),(0,B.jsx)(Se,{row:e})]}),(0,B.jsxs)(`td`,{className:`tabular-nums text-secondary`,children:[(0,B.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:R}),e.cited===null?xe:e.sources.length]}),(0,B.jsx)(`td`,{className:`text-right`,children:(0,B.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:()=>p(e=>{let n=new Set(e);return n.delete(t)||n.add(t),n}),children:n?`Hide answer`:`Read answer`})})]}),n?(0,B.jsx)(`tr`,{className:`property-answer-detail`,children:(0,B.jsxs)(`td`,{id:r,colSpan:5,className:`bg-surface-subtle px-4`,children:[(0,B.jsx)(we,{project:m,targetKey:y,resultId:e.observationId}),(0,B.jsx)(Ce,{row:e})]})}):null]},t)})})]})}),Y.hasNextPage?(0,B.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,B.jsxs)(`span`,{children:[`Showing `,$.length,` of `,We]}),Y.isFetchNextPageError?(0,B.jsx)(`span`,{role:`alert`,children:`Could not load more evidence.`}):null,(0,B.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]})]}),I?(0,B.jsx)(Le,{project:m,targetKey:y,queryClass:M,runId:H,targetLabels:He}):null]})}export{J as EVIDENCE_LABELS,ze as MeasurementPropertyPage,Q as OTHER_QUERIES_COPY};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{ot as t}from"./vendor-lucide-BILL9eZH.js";import{r as n}from"./vendor-markdown-DNTP_967.js";import{u as r}from"./vendor-tanstack-BoP7BGaH.js";import{Ni as i,R as a,Rt as o,_ as s,g as c,hn as l,mn as u,r as d,t as f,y as p}from"./ToneBadge-aGjnkfBI.js";import{t as m}from"./async-handler-Bj3TnIRw.js";import{d as h}from"./query-client-BMplcUQL.js";import{t as g}from"./card-BLjXAqaV.js";import{$ as _,I as v,X as y,et as b,h as x,nn as S,on as C}from"./index-zdoJudA4.js";var w=e(t(),1),T=n();function E({onSaved:e}){let[t,n]=(0,w.useState)(``),[r,i]=(0,w.useState)(``),[a,u]=(0,w.useState)(!1),[f,p]=(0,w.useState)(null),[g,_]=(0,w.useState)(!1),v=t.trim().length>0&&r.trim().length>0,y=typeof window>`u`?void 0:o(window.location,window.__CANONRY_CONFIG__?.basePath),b=y?s(y):void 0,x=y?c(y):void 0;async function S(){if(v){u(!0),p(null),_(!1);try{await l({clientId:t.trim(),clientSecret:r.trim()}),n(``),i(``),_(!0),h({title:`Google OAuth app updated`,detail:`Dashboard Google credentials were saved.`,tone:`positive`,dedupeKey:`settings:google-oauth`,dedupeMode:`replace`}),e()}catch(e){p(e instanceof Error?e.message:`Failed to update Google OAuth credentials`)}finally{u(!1)}}}return(0,T.jsxs)(`div`,{className:`mt-3 material-base p-3 space-y-2`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`google-client-id`,children:`Client ID`}),(0,T.jsxs)(`a`,{href:`https://console.cloud.google.com/apis/credentials`,target:`_blank`,rel:`noopener noreferrer`,className:`text-label-14 text-secondary hover:text-neutral underline underline-offset-2`,children:[`Google Cloud `,`↗`]})]}),(0,T.jsx)(`input`,{id:`google-client-id`,type:`text`,className:`mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`Google OAuth client ID`,value:t,onChange:e=>n(e.target.value)})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`google-client-secret`,children:`Client secret`}),(0,T.jsx)(`input`,{id:`google-client-secret`,type:`password`,className:`mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`Google OAuth client secret`,value:r,onChange:e=>i(e.target.value)})]}),b&&x&&(0,T.jsxs)(`div`,{className:`material-base px-3 py-2`,children:[(0,T.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Authorized redirect URIs`}),(0,T.jsxs)(`dl`,{className:`mt-1 space-y-2 text-label-12`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{className:`text-muted`,children:`Search Console and Business Profile`}),(0,T.jsx)(`dd`,{children:(0,T.jsx)(`code`,{className:`block break-all text-strong`,children:b})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{className:`text-muted`,children:`Google Ads and Tag Manager`}),(0,T.jsx)(`dd`,{children:(0,T.jsx)(`code`,{className:`block break-all text-strong`,children:x})})]})]})]}),f&&(0,T.jsx)(`p`,{className:`text-copy-14 text-negative-400`,children:f}),g&&(0,T.jsx)(`p`,{className:`text-copy-14 text-positive-400`,children:`Google OAuth credentials updated.`}),(0,T.jsx)(d,{type:`button`,size:`sm`,disabled:!v||a,onClick:m(S),children:a?`Saving...`:`Save Google OAuth app`})]})}function D(e){let t=e.replace(/^Error:\s*/,``).replace(/\s+/g,` `).trim();return t?t.length>140?`${t.slice(0,137)}...`:t:`Unknown error`}function O(){let[e,t]=(0,w.useState)(null),[n,r]=(0,w.useState)(null),[o,s]=(0,w.useState)(!1),[c,l]=(0,w.useState)(`localhost`),[u,_]=(0,w.useState)(`9222`),[v,y]=(0,w.useState)(!1);return(0,w.useEffect)(()=>{a().then(e=>{t(e),r(null)}).catch(e=>{let t=i(e);t.includes(`501`)||r(t)})},[]),(0,T.jsxs)(g,{className:`surface-card`,children:[(0,T.jsxs)(`div`,{className:`section-head`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Browser provider`}),(0,T.jsx)(`h2`,{children:`ChatGPT (CDP)`})]}),(0,T.jsx)(f,{tone:e?.connected?`positive`:`caution`,children:e?.connected?`Connected`:`Not connected`})]}),(0,T.jsx)(`p`,{className:`mt-2 text-copy-14 ${n?`text-negative`:`text-secondary`}`,role:n?`alert`:void 0,children:n?(0,T.jsxs)(T.Fragment,{children:[`Could not check Chrome: `,D(n),`. Check that Chrome is running with remote debugging, then configure the endpoint.`]}):e?.connected?`Chrome is available for this provider.`:`Connect Chrome to enable this provider.`}),(0,T.jsxs)(`details`,{className:`mt-3`,children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`Advanced`}),(0,T.jsxs)(`dl`,{className:`definition-list mt-2`,children:[e?.endpoint&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Endpoint`}),(0,T.jsx)(`dd`,{className:`text-label-12-mono`,children:e.endpoint})]}),e?.browserVersion&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Browser`}),(0,T.jsx)(`dd`,{className:`text-label-12`,children:e.browserVersion})]}),e?.targets&&e.targets.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Tabs`}),(0,T.jsx)(`dd`,{children:e.targets.map(e=>(0,T.jsxs)(`span`,{className:`mr-2`,children:[e.name,`: `,e.alive?`● alive`:`○ idle`]},e.name))})]})]})]}),(0,T.jsx)(`div`,{className:`mt-2`,children:(0,T.jsx)(d,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>s(!o),children:o?`Cancel`:e?.connected?`Update endpoint`:`Configure`})}),o&&(0,T.jsxs)(`form`,{className:`mt-3 flex flex-col gap-2`,onSubmit:m(async e=>{e.preventDefault(),y(!0);try{await p(c,parseInt(u,10)||9222);let e=await a();t(e),r(null),s(!1),h({title:`CDP endpoint saved`,detail:`${c}:${parseInt(u,10)||9222} is now configured.`,tone:`positive`,dedupeKey:`settings:cdp`,dedupeMode:`replace`})}catch(e){r(i(e))}finally{y(!1)}}),children:[(0,T.jsxs)(`div`,{className:`flex gap-2`,children:[(0,T.jsx)(`input`,{className:`flex-1 rounded border border-strong bg-bg-elevated px-2 py-1 text-label-14 text-heading placeholder-mono-400 focus:outline-none focus:ring-1 focus:ring-mono-500`,placeholder:`localhost`,value:c,onChange:e=>l(e.target.value),"aria-label":`CDP host`}),(0,T.jsx)(`input`,{className:`w-24 rounded border border-strong bg-bg-elevated px-2 py-1 text-label-14 text-heading placeholder-mono-400 focus:outline-none focus:ring-1 focus:ring-mono-500`,placeholder:`9222`,value:u,onChange:e=>_(e.target.value),"aria-label":`CDP port`})]}),(0,T.jsx)(`div`,{children:(0,T.jsx)(d,{type:`submit`,size:`sm`,disabled:v,children:v?`Saving…`:`Save endpoint`})})]})]})}var k={apiStatus:{label:`API`,state:`checking`,detail:`Checking service health`},workerStatus:{label:`Worker`,state:`checking`,detail:`Checking service health`}};function A(e){return e.name===`openrouter`||e.kind===`model-gateway`||e.kind===`answer-service`}function j(e){let t=e.displayName??e.name;return e.kind===`answer-service`?{connected:`${t} connected. Projects use it only where you choose its profiles.`,choose:`Choose project profiles`}:{connected:`${t} connected. Choose the models for each project.`,choose:`Choose project models`}}function M(){return(0,T.jsx)(v,{title:`Settings`,children:(0,T.jsx)(N,{})})}function N(){let e=b(),{dashboard:t}=_(),n=t?.settings??e?.dashboard?.settings,i=y(!e,e?.health).data??e?.health??k,[a,o]=(0,w.useState)(null),[s,c]=(0,w.useState)(new Set),[l,p]=(0,w.useState)(``),[v,D]=(0,w.useState)(!1),[M,N]=(0,w.useState)(!1),[P,F]=(0,w.useState)(``),[I,L]=(0,w.useState)(!1),[R,z]=(0,w.useState)(null),[B,V]=(0,w.useState)(!1);if(!n)return null;let H=t?.projects??e?.dashboard?.projects??[],U=l||H[0]?.project.name;return(0,T.jsxs)(`div`,{className:`page-container`,children:[(0,T.jsx)(`div`,{className:`page-header`,children:(0,T.jsxs)(`div`,{className:`page-header-left`,children:[(0,T.jsx)(`h1`,{className:`page-title`,children:`Settings`}),(0,T.jsx)(`p`,{className:`page-subtitle`,children:`Connections and answer engines.`})]})}),(0,T.jsxs)(`section`,{className:`space-y-6`,children:[(0,T.jsxs)(`section`,{children:[(0,T.jsx)(`div`,{className:`section-head`,children:(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Answer engines`}),(0,T.jsx)(`h2`,{children:`Providers`})]})}),(0,T.jsx)(`div`,{className:`divide-y divide-default border-y border-default`,children:n.providerStatuses.map(e=>(0,T.jsxs)(`div`,{id:`provider-${e.name}`,className:`scroll-mt-24 py-4`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:e.displayName??e.name}),(0,T.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:e.detail})]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(f,{tone:e.state===`ready`?`positive`:`caution`,children:e.state===`ready`?`Ready`:`Not connected`}),(0,T.jsx)(d,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>o(a===e.name?null:e.name),children:a===e.name?`Cancel`:e.state===`ready`?`Update`:`Configure`})]})]}),(0,T.jsxs)(`details`,{className:`mt-3`,children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`Advanced`}),(0,T.jsxs)(`dl`,{className:`definition-list mt-2`,children:[!A(e)&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Model`}),(0,T.jsxs)(`dd`,{className:`text-label-12-mono`,children:[e.model??e.defaultModel??`unknown`,!e.model&&e.defaultModel&&(0,T.jsx)(`span`,{className:`ml-1 font-sans text-muted`,children:`(default)`})]})]}),e.quota&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Concurrency`}),(0,T.jsx)(`dd`,{children:e.quota.maxConcurrency})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Rate limit`}),(0,T.jsxs)(`dd`,{children:[e.quota.maxRequestsPerMinute,`/min · `,e.quota.maxRequestsPerDay,`/day`]})]})]})]})]}),a===e.name&&(0,T.jsx)(x,{providerName:e.name,keyUrl:e.keyUrl,modelHint:e.modelHint,...e.kind?{kind:e.kind}:{},onSaved:()=>{o(null),A(e)&&c(t=>new Set([...t,e.name]))}}),A(e)&&(e.state===`ready`||s.has(e.name))&&(0,T.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-end gap-3`,children:[(0,T.jsx)(`p`,{role:s.has(e.name)?`status`:void 0,className:`w-full text-copy-14 text-secondary`,children:j(e).connected}),H.length>1&&(0,T.jsxs)(`label`,{className:`text-label-14 text-secondary`,children:[`Project`,(0,T.jsx)(`select`,{className:`setup-input ml-2`,value:U,onChange:e=>p(e.target.value),children:H.map(e=>(0,T.jsx)(`option`,{value:e.project.name,children:e.project.displayName??e.project.name},e.project.name))})]}),(0,T.jsx)(d,{type:`button`,variant:`outline`,asChild:!0,children:U?(0,T.jsx)(r,{to:`/projects/$projectName/settings`,params:{projectName:U},hash:`answer-engines`,children:j(e).choose}):(0,T.jsx)(r,{to:`/setup`,children:`Create a project`})})]})]},e.name))})]}),(0,T.jsxs)(`section`,{children:[(0,T.jsx)(`div`,{className:`section-head`,children:(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Connections`}),(0,T.jsx)(`h2`,{children:`Search and browser`})]})}),(0,T.jsxs)(`div`,{className:`settings-grid`,children:[(0,T.jsxs)(g,{className:`surface-card`,children:[(0,T.jsxs)(`div`,{className:`section-head`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Google`}),(0,T.jsx)(`h2`,{children:`Google OAuth`})]}),(0,T.jsx)(f,{tone:n.google.state===`ready`?`positive`:`caution`,children:n.google.state===`ready`?`Ready`:`Not connected`})]}),(0,T.jsx)(`p`,{className:`mt-2 text-copy-14 text-secondary`,children:n.google.detail}),(0,T.jsxs)(`details`,{className:`mt-3`,children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`Advanced`}),(0,T.jsxs)(`dl`,{className:`definition-list mt-2`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Auth model`}),(0,T.jsx)(`dd`,{children:`One app credential set for Search Console, Business Profile, Google Ads, and Tag Manager`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Storage`}),(0,T.jsx)(`dd`,{className:`text-label-12-mono`,children:`~/.canonry/config.yaml`})]})]})]}),(0,T.jsx)(`div`,{className:`mt-2`,children:(0,T.jsx)(d,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>D(!v),children:v?`Cancel`:n.google.state===`ready`?`Update OAuth app`:`Configure Google OAuth`})}),v&&(0,T.jsx)(E,{onSaved:()=>{D(!1)}})]}),(0,T.jsxs)(g,{className:`surface-card`,children:[(0,T.jsxs)(`div`,{className:`section-head`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Bing`}),(0,T.jsx)(`h2`,{children:`Webmaster Tools`})]}),(0,T.jsx)(f,{tone:n.bing.state===`ready`?`positive`:`caution`,children:n.bing.state===`ready`?`Ready`:`Not connected`})]}),(0,T.jsx)(`p`,{className:`mt-2 text-copy-14 text-secondary`,children:n.bing.detail}),(0,T.jsxs)(`details`,{className:`mt-3`,children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`Advanced`}),(0,T.jsxs)(`dl`,{className:`definition-list mt-2`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Auth model`}),(0,T.jsx)(`dd`,{children:`API key authentication. OAuth is not required.`})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`dt`,{children:`Storage`}),(0,T.jsx)(`dd`,{className:`text-label-12-mono`,children:`~/.canonry/config.yaml`})]})]})]}),(0,T.jsx)(`div`,{className:`mt-2`,children:(0,T.jsx)(d,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>N(!M),children:M?`Cancel`:n.bing.state===`ready`?`Update API key`:`Configure Bing`})}),M&&(0,T.jsxs)(`div`,{className:`mt-3 material-base p-3 space-y-2`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`bing-api-key`,children:`API key`}),(0,T.jsx)(`a`,{href:`https://www.bing.com/webmasters/`,target:`_blank`,rel:`noopener noreferrer`,className:`text-label-14 text-secondary hover:text-neutral underline underline-offset-2`,children:`Bing Webmaster Tools`})]}),(0,T.jsx)(`input`,{id:`bing-api-key`,type:`password`,className:`mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`Bing Webmaster Tools API key`,value:P,onChange:e=>F(e.target.value)})]}),(0,T.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Used for project-level Bing connections.`}),R&&(0,T.jsx)(`p`,{className:`text-copy-14 text-negative-400`,children:R}),B&&(0,T.jsx)(`p`,{className:`text-copy-14 text-positive-400`,children:`Bing API key updated.`}),(0,T.jsx)(d,{type:`button`,size:`sm`,disabled:!P.trim()||I,onClick:m(async()=>{if(P.trim()){L(!0),z(null),V(!1);try{await u(P.trim()),F(``),V(!0),N(!1),h({title:`Bing API key updated`,detail:`Dashboard Bing credentials were saved.`,tone:`positive`,dedupeKey:`settings:bing`,dedupeMode:`replace`})}catch(e){z(e instanceof Error?e.message:`Failed to update Bing API key`)}finally{L(!1)}}}),children:I?`Saving...`:`Save Bing API key`})]})]}),(0,T.jsx)(O,{})]})]}),(0,T.jsxs)(g,{className:`surface-card`,children:[(0,T.jsx)(`div`,{className:`section-head`,children:(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Service health`}),(0,T.jsx)(`h2`,{children:`API and worker`})]})}),(0,T.jsxs)(`div`,{className:`compact-stack`,children:[(0,T.jsxs)(`div`,{className:`health-row`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`run-row-title`,children:`API`}),i.apiStatus.state!==`ok`&&(0,T.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:S(i.apiStatus)})]}),(0,T.jsx)(f,{tone:C(i.apiStatus),title:S(i.apiStatus),children:i.apiStatus.state===`ok`?`Healthy`:`Attention`})]}),(0,T.jsxs)(`div`,{className:`health-row`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`run-row-title`,children:`Worker`}),i.workerStatus.state!==`ok`&&(0,T.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:S(i.workerStatus)})]}),(0,T.jsx)(f,{tone:C(i.workerStatus),title:S(i.workerStatus),children:i.workerStatus.state===`ok`?`Healthy`:i.workerStatus.state===`disabled`?`Disabled`:`Attention`})]})]})]})]}),(0,T.jsxs)(`details`,{className:`page-section`,children:[(0,T.jsx)(`summary`,{className:`cursor-pointer text-label-14-strong text-secondary hover:text-strong`,children:`Self-hosting details`}),(0,T.jsxs)(g,{className:`surface-card mt-3`,children:[(0,T.jsx)(`ul`,{className:`detail-list`,children:n.selfHostNotes.map(e=>(0,T.jsx)(`li`,{children:e},e))}),(0,T.jsx)(`p`,{className:`supporting-copy`,children:n.bootstrapNote})]})]})]})}export{M as SettingsPage};
|