@jmp-technologies/analytics 0.1.38 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/ai-crawler-agents.json +63 -0
- package/dist/astro/client.cjs +257 -6
- package/dist/astro/client.cjs.map +1 -1
- package/dist/astro/client.d.cts +2 -2
- package/dist/astro/client.d.ts +2 -2
- package/dist/astro/client.js +1 -1
- package/dist/astro/content.cjs +264 -7
- package/dist/astro/content.cjs.map +1 -1
- package/dist/astro/content.d.cts +3 -3
- package/dist/astro/content.d.ts +3 -3
- package/dist/astro/content.js +2 -2
- package/dist/astro/integration.cjs +257 -6
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +2 -2
- package/dist/astro/middleware.d.cts +2 -2
- package/dist/astro/middleware.d.ts +2 -2
- package/dist/astro/register.cjs +257 -6
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +2 -2
- package/dist/{chunk-WHUHCTBQ.js → chunk-34LFIP3R.js} +2 -2
- package/dist/{chunk-NCF3J4HV.js → chunk-BRLCGVFJ.js} +2 -2
- package/dist/{chunk-PQOTEV6O.js → chunk-IY6Y636W.js} +2 -2
- package/dist/{chunk-EBU4DKHW.js → chunk-JC3G4XNR.js} +333 -8
- package/dist/chunk-JC3G4XNR.js.map +1 -0
- package/dist/{chunk-JVFN7MF2.js → chunk-VSZRQSUN.js} +2 -2
- package/dist/constants-DTZMYgi4.d.cts +12 -0
- package/dist/constants-DTZMYgi4.d.ts +12 -0
- package/dist/{create-jmp-analytics-DMSXmVIH.d.cts → create-jmp-analytics-B7VqQJca.d.cts} +1 -1
- package/dist/{create-jmp-analytics-JZ3pqNBQ.d.ts → create-jmp-analytics-BGt16QGY.d.ts} +1 -1
- package/dist/index.cjs +340 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -13
- package/dist/index.d.ts +31 -13
- package/dist/index.js +17 -1
- package/dist/next/content.cjs +268 -7
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.d.cts +3 -2
- package/dist/next/content.d.ts +3 -2
- package/dist/next/content.js +7 -2
- package/dist/next/content.js.map +1 -1
- package/dist/next/instrumentation.cjs +257 -6
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +1 -1
- package/dist/next/landing-pages.cjs +264 -7
- package/dist/next/landing-pages.cjs.map +1 -1
- package/dist/next/landing-pages.d.cts +2 -2
- package/dist/next/landing-pages.d.ts +2 -2
- package/dist/next/landing-pages.js +2 -2
- package/dist/next/locations.cjs +265 -8
- package/dist/next/locations.cjs.map +1 -1
- package/dist/next/locations.d.cts +3 -3
- package/dist/next/locations.d.ts +3 -3
- package/dist/next/locations.js +3 -3
- package/dist/next/locations.js.map +1 -1
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.cts +2 -2
- package/dist/next/middleware.d.ts +2 -2
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/site-root-server.cjs +264 -7
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.d.cts +1 -1
- package/dist/next/site-root-server.d.ts +1 -1
- package/dist/next/site-root-server.js +3 -3
- package/dist/next/site-root-server.js.map +1 -1
- package/dist/next.cjs +257 -6
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +3 -3
- package/dist/next.d.ts +3 -3
- package/dist/next.js +3 -3
- package/dist/react.cjs +257 -6
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/{site-config-BZJS8Hp_.d.cts → site-config-CZl4PIbg.d.cts} +1 -1
- package/dist/{site-config-BLnwuRC2.d.ts → site-config-Cq5K8hUp.d.ts} +1 -1
- package/dist/{track-page-view-DGKRUIxm.d.ts → track-page-view-BSlE0yI9.d.ts} +1 -1
- package/dist/{track-page-view-BJQqn2Bg.d.cts → track-page-view-M9y_5WqT.d.cts} +1 -1
- package/dist/{types-CYrgEwUF.d.ts → types-DH_8sBu9.d.cts} +35 -0
- package/dist/{types-CYrgEwUF.d.cts → types-DH_8sBu9.d.ts} +35 -0
- package/dist/{utils-B1Nt3sBU.d.ts → utils-C2JRomti.d.ts} +1 -1
- package/dist/{utils-U6TGMIAB.d.cts → utils-JfjoqC-z.d.cts} +1 -1
- package/package.json +2 -1
- package/dist/chunk-EBU4DKHW.js.map +0 -1
- /package/dist/{chunk-WHUHCTBQ.js.map → chunk-34LFIP3R.js.map} +0 -0
- /package/dist/{chunk-NCF3J4HV.js.map → chunk-BRLCGVFJ.js.map} +0 -0
- /package/dist/{chunk-PQOTEV6O.js.map → chunk-IY6Y636W.js.map} +0 -0
- /package/dist/{chunk-JVFN7MF2.js.map → chunk-VSZRQSUN.js.map} +0 -0
package/dist/next.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { q as JmpAnalyticsConfig } from './types-
|
|
3
|
+
import { q as JmpAnalyticsConfig } from './types-DH_8sBu9.cjs';
|
|
4
4
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.cjs';
|
|
5
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
6
|
-
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
5
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-B7VqQJca.cjs';
|
|
6
|
+
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-B7VqQJca.cjs';
|
|
7
7
|
export { r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.cjs';
|
|
8
8
|
export { JmpTrackedMailtoLink, JmpTrackedTelLink } from './react.cjs';
|
|
9
9
|
export { JmpGoogleTag } from './next/google-tag.cjs';
|
package/dist/next.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { q as JmpAnalyticsConfig } from './types-
|
|
3
|
+
import { q as JmpAnalyticsConfig } from './types-DH_8sBu9.js';
|
|
4
4
|
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.js';
|
|
5
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-
|
|
6
|
-
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-
|
|
5
|
+
import { J as JmpAnalytics } from './create-jmp-analytics-BGt16QGY.js';
|
|
6
|
+
export { i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-BGt16QGY.js';
|
|
7
7
|
export { r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.js';
|
|
8
8
|
export { JmpTrackedMailtoLink, JmpTrackedTelLink } from './react.js';
|
|
9
9
|
export { JmpGoogleTag } from './next/google-tag.js';
|
package/dist/next.js
CHANGED
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
JmpSiteRoot,
|
|
6
6
|
getOrCreateJmpAnalyticsForNextApp,
|
|
7
7
|
useJmpAnalytics
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BRLCGVFJ.js";
|
|
9
9
|
import {
|
|
10
10
|
JmpGoogleTag
|
|
11
11
|
} from "./chunk-2KAGOVRZ.js";
|
|
12
12
|
import {
|
|
13
13
|
JmpTrackedMailtoLink,
|
|
14
14
|
JmpTrackedTelLink
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VSZRQSUN.js";
|
|
16
16
|
import {
|
|
17
17
|
isJmpTrackingConsentGranted,
|
|
18
18
|
setJmpTrackingConsent,
|
|
19
19
|
subscribeJmpTrackingConsent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JC3G4XNR.js";
|
|
21
21
|
import {
|
|
22
22
|
buildLandingCaptureInlineScript
|
|
23
23
|
} from "./chunk-TCZ6TC2L.js";
|
package/dist/react.cjs
CHANGED
|
@@ -306,7 +306,7 @@ function getOrCreateSessionIdFromStorage() {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
// package.json
|
|
309
|
-
var version = "0.1.
|
|
309
|
+
var version = "0.1.40";
|
|
310
310
|
|
|
311
311
|
// src/constants.ts
|
|
312
312
|
var JMP_ANALYTICS_SDK_VERSION = version;
|
|
@@ -954,7 +954,8 @@ function normalizeJmpContentManifest(input) {
|
|
|
954
954
|
const externalSources = normalizeExternalSources(input.externalSources);
|
|
955
955
|
const trust = normalizeTrust(input.trust);
|
|
956
956
|
const contact = normalizeContact(input.contact);
|
|
957
|
-
|
|
957
|
+
const defaults = normalizeManifestDefaults(input.defaults);
|
|
958
|
+
if (routes.length === 0 && !externalSources && !trust && !contact && !defaults) {
|
|
958
959
|
return null;
|
|
959
960
|
}
|
|
960
961
|
return {
|
|
@@ -962,7 +963,8 @@ function normalizeJmpContentManifest(input) {
|
|
|
962
963
|
...routes.length > 0 ? { routes } : {},
|
|
963
964
|
...externalSources ? { externalSources } : {},
|
|
964
965
|
...trust ? { trust } : {},
|
|
965
|
-
...contact ? { contact } : {}
|
|
966
|
+
...contact ? { contact } : {},
|
|
967
|
+
...defaults ? { defaults } : {}
|
|
966
968
|
};
|
|
967
969
|
}
|
|
968
970
|
function normalizeRoutes(routes) {
|
|
@@ -1026,10 +1028,132 @@ function normalizeTrustLabels(labels) {
|
|
|
1026
1028
|
}
|
|
1027
1029
|
return Object.keys(out).length > 0 ? out : null;
|
|
1028
1030
|
}
|
|
1031
|
+
function readDefaultText(value, max = 500) {
|
|
1032
|
+
if (typeof value !== "string") return void 0;
|
|
1033
|
+
const trimmed = value.trim();
|
|
1034
|
+
if (!trimmed) return void 0;
|
|
1035
|
+
return trimmed.slice(0, max);
|
|
1036
|
+
}
|
|
1037
|
+
function normalizeManifestDefaults(defaults) {
|
|
1038
|
+
if (!defaults || typeof defaults !== "object") return null;
|
|
1039
|
+
const contactRaw = defaults.contact;
|
|
1040
|
+
const contact = {};
|
|
1041
|
+
if (contactRaw && typeof contactRaw === "object") {
|
|
1042
|
+
const displayName = readDefaultText(contactRaw.displayName, 120);
|
|
1043
|
+
const email = readDefaultText(contactRaw.email, 200);
|
|
1044
|
+
const phone = readDefaultText(contactRaw.phone, 40);
|
|
1045
|
+
const address = readDefaultText(contactRaw.address, 400);
|
|
1046
|
+
const hours = readDefaultText(contactRaw.hours, 400);
|
|
1047
|
+
const serviceArea = readDefaultText(contactRaw.serviceArea, 200);
|
|
1048
|
+
const googleMapsUrl = readDefaultText(contactRaw.googleMapsUrl, 2048);
|
|
1049
|
+
const linkedinUrl = readDefaultText(contactRaw.linkedinUrl, 2048);
|
|
1050
|
+
const instagramUrl = readDefaultText(contactRaw.instagramUrl, 2048);
|
|
1051
|
+
const facebookUrl = readDefaultText(contactRaw.facebookUrl, 2048);
|
|
1052
|
+
const xUrl = readDefaultText(contactRaw.xUrl, 2048);
|
|
1053
|
+
const youtubeUrl = readDefaultText(contactRaw.youtubeUrl, 2048);
|
|
1054
|
+
if (displayName) contact.displayName = displayName;
|
|
1055
|
+
if (email) contact.email = email;
|
|
1056
|
+
if (phone) contact.phone = phone;
|
|
1057
|
+
if (address) contact.address = address;
|
|
1058
|
+
if (hours) contact.hours = hours;
|
|
1059
|
+
if (serviceArea) contact.serviceArea = serviceArea;
|
|
1060
|
+
if (googleMapsUrl) contact.googleMapsUrl = googleMapsUrl;
|
|
1061
|
+
if (linkedinUrl) contact.linkedinUrl = linkedinUrl;
|
|
1062
|
+
if (instagramUrl) contact.instagramUrl = instagramUrl;
|
|
1063
|
+
if (facebookUrl) contact.facebookUrl = facebookUrl;
|
|
1064
|
+
if (xUrl) contact.xUrl = xUrl;
|
|
1065
|
+
if (youtubeUrl) contact.youtubeUrl = youtubeUrl;
|
|
1066
|
+
if (contactRaw.extras && typeof contactRaw.extras === "object") {
|
|
1067
|
+
const extras = {};
|
|
1068
|
+
for (const [rawKey, rawValue] of Object.entries(contactRaw.extras)) {
|
|
1069
|
+
if (Object.keys(extras).length >= 10) break;
|
|
1070
|
+
const key = normalizeKey(rawKey);
|
|
1071
|
+
const value = readDefaultText(rawValue, 200);
|
|
1072
|
+
if (key && isValidExtraKey(key) && value) extras[key] = value;
|
|
1073
|
+
}
|
|
1074
|
+
if (Object.keys(extras).length > 0) contact.extras = extras;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
const faq = [];
|
|
1078
|
+
if (Array.isArray(defaults.faq)) {
|
|
1079
|
+
for (const raw of defaults.faq) {
|
|
1080
|
+
if (!raw || typeof raw !== "object" || faq.length >= 40) continue;
|
|
1081
|
+
const question = readDefaultText(raw.question, 300);
|
|
1082
|
+
const answer = readDefaultText(raw.answer, 8e3);
|
|
1083
|
+
if (!question || !answer) continue;
|
|
1084
|
+
const category = readDefaultText(raw.category, 80);
|
|
1085
|
+
faq.push({ question, answer, ...category ? { category } : {} });
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
const trustRaw = defaults.trust;
|
|
1089
|
+
const trust = {};
|
|
1090
|
+
if (trustRaw && typeof trustRaw === "object") {
|
|
1091
|
+
const assign = (key, max) => {
|
|
1092
|
+
const value = readDefaultText(trustRaw[key], max);
|
|
1093
|
+
if (value) trust[key] = value;
|
|
1094
|
+
};
|
|
1095
|
+
assign("googleReviewsUrl", 2048);
|
|
1096
|
+
assign("googlePlaceId", 128);
|
|
1097
|
+
assign("yelpUrl", 2048);
|
|
1098
|
+
assign("trustpilotUrl", 2048);
|
|
1099
|
+
assign("disclaimer", 1e3);
|
|
1100
|
+
}
|
|
1101
|
+
const hasContact = Object.keys(contact).length > 0;
|
|
1102
|
+
const hasTrust = Object.keys(trust).length > 0;
|
|
1103
|
+
if (!hasContact && faq.length === 0 && !hasTrust) return null;
|
|
1104
|
+
return {
|
|
1105
|
+
...hasContact ? { contact } : {},
|
|
1106
|
+
...faq.length > 0 ? { faq } : {},
|
|
1107
|
+
...hasTrust ? { trust } : {}
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1029
1110
|
function normalizeContact(contact) {
|
|
1030
1111
|
if (!contact || typeof contact !== "object") return null;
|
|
1031
1112
|
const extras = normalizeContactExtras(contact.extras);
|
|
1032
|
-
|
|
1113
|
+
const leadInbox = normalizeLeadInbox(contact.leadInbox);
|
|
1114
|
+
if (extras.length === 0 && !leadInbox) return null;
|
|
1115
|
+
return {
|
|
1116
|
+
...extras.length > 0 ? { extras } : {},
|
|
1117
|
+
...leadInbox ? { leadInbox } : {}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
function normalizeLeadInbox(raw) {
|
|
1121
|
+
if (!raw || typeof raw !== "object") return null;
|
|
1122
|
+
const list = normalizeInboxKeyList(raw.list, 8);
|
|
1123
|
+
const detail = normalizeInboxKeyList(raw.detail, 24);
|
|
1124
|
+
const labels = normalizeInboxLabels(raw.labels);
|
|
1125
|
+
if (!list && !detail && !labels) return null;
|
|
1126
|
+
return {
|
|
1127
|
+
...list ? { list } : {},
|
|
1128
|
+
...detail ? { detail } : {},
|
|
1129
|
+
...labels ? { labels } : {}
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
function normalizeInboxKeyList(raw, max) {
|
|
1133
|
+
if (!Array.isArray(raw)) return void 0;
|
|
1134
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1135
|
+
const out = [];
|
|
1136
|
+
for (const item of raw) {
|
|
1137
|
+
if (typeof item !== "string" || out.length >= max) continue;
|
|
1138
|
+
const key = item.trim();
|
|
1139
|
+
const token = key.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase();
|
|
1140
|
+
if (!key || !token || seen.has(token)) continue;
|
|
1141
|
+
seen.add(token);
|
|
1142
|
+
out.push(key);
|
|
1143
|
+
}
|
|
1144
|
+
return out.length > 0 ? out : void 0;
|
|
1145
|
+
}
|
|
1146
|
+
function normalizeInboxLabels(raw) {
|
|
1147
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
1148
|
+
const out = {};
|
|
1149
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
1150
|
+
if (typeof value !== "string") continue;
|
|
1151
|
+
const label = value.trim().slice(0, 60);
|
|
1152
|
+
const token = key.trim();
|
|
1153
|
+
if (!token || !label) continue;
|
|
1154
|
+
out[token] = label;
|
|
1155
|
+
}
|
|
1156
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
1033
1157
|
}
|
|
1034
1158
|
function normalizeContactExtras(extras) {
|
|
1035
1159
|
if (!Array.isArray(extras)) return [];
|
|
@@ -1059,7 +1183,7 @@ function inferWrapperSlotsFromManifest(manifest) {
|
|
|
1059
1183
|
slots.add(`trust.${block.section}`);
|
|
1060
1184
|
slots.add("trust");
|
|
1061
1185
|
}
|
|
1062
|
-
if (manifest?.contact?.extras?.length) {
|
|
1186
|
+
if (manifest?.contact?.extras?.length || manifest?.contact?.leadInbox) {
|
|
1063
1187
|
slots.add("contact");
|
|
1064
1188
|
}
|
|
1065
1189
|
return [...slots];
|
|
@@ -1093,7 +1217,65 @@ function getDiscoveredContentWrappers() {
|
|
|
1093
1217
|
return sortWrapperSlots([...discovered]);
|
|
1094
1218
|
}
|
|
1095
1219
|
function resolveContentManifestForReport(config) {
|
|
1096
|
-
|
|
1220
|
+
const site = getJmpSiteDefinition();
|
|
1221
|
+
const fallback = site?.contactFallback;
|
|
1222
|
+
const existing = config.contentManifest;
|
|
1223
|
+
const fromFallback = fallbackToManifestDefaults(fallback);
|
|
1224
|
+
if (!existing && !fromFallback) {
|
|
1225
|
+
return null;
|
|
1226
|
+
}
|
|
1227
|
+
const merged = {
|
|
1228
|
+
...existing ?? {},
|
|
1229
|
+
defaults: {
|
|
1230
|
+
...fromFallback ?? {},
|
|
1231
|
+
...existing?.defaults ?? {},
|
|
1232
|
+
contact: {
|
|
1233
|
+
...fromFallback?.contact ?? {},
|
|
1234
|
+
...existing?.defaults?.contact ?? {},
|
|
1235
|
+
extras: {
|
|
1236
|
+
...fromFallback?.contact?.extras ?? {},
|
|
1237
|
+
...existing?.defaults?.contact?.extras ?? {}
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
trust: {
|
|
1241
|
+
...fromFallback?.trust ?? {},
|
|
1242
|
+
...existing?.defaults?.trust ?? {}
|
|
1243
|
+
},
|
|
1244
|
+
faq: existing?.defaults?.faq?.length ? existing.defaults.faq : fromFallback?.faq
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
return normalizeJmpContentManifest(merged);
|
|
1248
|
+
}
|
|
1249
|
+
function fallbackToManifestDefaults(fallback) {
|
|
1250
|
+
if (!fallback) return null;
|
|
1251
|
+
const contact = {};
|
|
1252
|
+
if (fallback.displayName?.trim()) contact.displayName = fallback.displayName.trim();
|
|
1253
|
+
if (fallback.email?.trim()) contact.email = fallback.email.trim();
|
|
1254
|
+
if (typeof fallback.phone === "string" && fallback.phone.trim()) {
|
|
1255
|
+
contact.phone = fallback.phone.trim();
|
|
1256
|
+
}
|
|
1257
|
+
if (fallback.address?.trim()) contact.address = fallback.address.trim();
|
|
1258
|
+
if (fallback.hours?.trim()) contact.hours = fallback.hours.trim();
|
|
1259
|
+
if (fallback.serviceArea?.trim()) contact.serviceArea = fallback.serviceArea.trim();
|
|
1260
|
+
if (fallback.googleMapsUrl?.trim()) {
|
|
1261
|
+
contact.googleMapsUrl = fallback.googleMapsUrl.trim();
|
|
1262
|
+
}
|
|
1263
|
+
if (fallback.linkedin?.trim()) contact.linkedinUrl = fallback.linkedin.trim();
|
|
1264
|
+
if (fallback.instagram?.trim()) contact.instagramUrl = fallback.instagram.trim();
|
|
1265
|
+
if (fallback.facebook?.trim()) contact.facebookUrl = fallback.facebook.trim();
|
|
1266
|
+
if (fallback.x?.trim()) contact.xUrl = fallback.x.trim();
|
|
1267
|
+
if (fallback.youtube?.trim()) contact.youtubeUrl = fallback.youtube.trim();
|
|
1268
|
+
const trust = {};
|
|
1269
|
+
if (fallback.googleMapsUrl?.trim()) {
|
|
1270
|
+
trust.googleReviewsUrl = fallback.googleMapsUrl.trim();
|
|
1271
|
+
}
|
|
1272
|
+
const hasContact = Object.keys(contact).length > 0;
|
|
1273
|
+
const hasTrust = Object.keys(trust).length > 0;
|
|
1274
|
+
if (!hasContact && !hasTrust) return null;
|
|
1275
|
+
return {
|
|
1276
|
+
...hasContact ? { contact } : {},
|
|
1277
|
+
...hasTrust ? { trust } : {}
|
|
1278
|
+
};
|
|
1097
1279
|
}
|
|
1098
1280
|
function resolveContentWrappersForReport(config) {
|
|
1099
1281
|
const explicit = config.contentWrappers ?? [];
|
|
@@ -1189,6 +1371,75 @@ async function registerJmpContentWrappers(config) {
|
|
|
1189
1371
|
}
|
|
1190
1372
|
setContentWrapperSyncHandler(registerJmpContentWrappers);
|
|
1191
1373
|
|
|
1374
|
+
// ai-crawler-agents.json
|
|
1375
|
+
var ai_crawler_agents_default = {
|
|
1376
|
+
robotsUserAgents: [
|
|
1377
|
+
"GPTBot",
|
|
1378
|
+
"ChatGPT-User",
|
|
1379
|
+
"OAI-SearchBot",
|
|
1380
|
+
"OAI-AdsBot",
|
|
1381
|
+
"ClaudeBot",
|
|
1382
|
+
"Claude-User",
|
|
1383
|
+
"Claude-SearchBot",
|
|
1384
|
+
"Claude-Web",
|
|
1385
|
+
"PerplexityBot",
|
|
1386
|
+
"Perplexity-User",
|
|
1387
|
+
"Google-Extended",
|
|
1388
|
+
"GoogleOther",
|
|
1389
|
+
"GoogleOther-Image",
|
|
1390
|
+
"GoogleOther-Video",
|
|
1391
|
+
"Google-CloudVertexBot",
|
|
1392
|
+
"Meta-ExternalAgent",
|
|
1393
|
+
"Meta-ExternalFetcher",
|
|
1394
|
+
"FacebookBot",
|
|
1395
|
+
"Applebot",
|
|
1396
|
+
"Applebot-Extended",
|
|
1397
|
+
"CCBot",
|
|
1398
|
+
"Bytespider",
|
|
1399
|
+
"cohere-ai",
|
|
1400
|
+
"cohere-training-data-crawler",
|
|
1401
|
+
"YouBot",
|
|
1402
|
+
"MistralAI-User",
|
|
1403
|
+
"GrokBot",
|
|
1404
|
+
"Grok-DeepSearch",
|
|
1405
|
+
"xAI-Grok",
|
|
1406
|
+
"xAI-Bot"
|
|
1407
|
+
],
|
|
1408
|
+
wafUserAgents: [
|
|
1409
|
+
"GPTBot",
|
|
1410
|
+
"ChatGPT-User",
|
|
1411
|
+
"OAI-SearchBot",
|
|
1412
|
+
"OAI-AdsBot",
|
|
1413
|
+
"ClaudeBot",
|
|
1414
|
+
"Claude-User",
|
|
1415
|
+
"Claude-SearchBot",
|
|
1416
|
+
"Claude-Web",
|
|
1417
|
+
"PerplexityBot",
|
|
1418
|
+
"Perplexity-User",
|
|
1419
|
+
"Google-Extended",
|
|
1420
|
+
"GoogleOther",
|
|
1421
|
+
"Google-CloudVertexBot",
|
|
1422
|
+
"Meta-ExternalAgent",
|
|
1423
|
+
"Meta-ExternalFetcher",
|
|
1424
|
+
"FacebookBot",
|
|
1425
|
+
"Applebot-Extended",
|
|
1426
|
+
"CCBot",
|
|
1427
|
+
"Bytespider",
|
|
1428
|
+
"cohere-ai",
|
|
1429
|
+
"cohere-training-data-crawler",
|
|
1430
|
+
"YouBot",
|
|
1431
|
+
"MistralAI-User",
|
|
1432
|
+
"GrokBot",
|
|
1433
|
+
"Grok-DeepSearch",
|
|
1434
|
+
"xAI-Grok",
|
|
1435
|
+
"xAI-Bot"
|
|
1436
|
+
]
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
// src/ai-crawlers.ts
|
|
1440
|
+
var AI_CRAWLER_ROBOTS_USER_AGENTS = ai_crawler_agents_default.robotsUserAgents;
|
|
1441
|
+
var JMP_AI_CRAWLER_WAF_USER_AGENTS = ai_crawler_agents_default.wafUserAgents;
|
|
1442
|
+
|
|
1192
1443
|
// src/env/browser.ts
|
|
1193
1444
|
function getJmpBrowserAnalyticsConfigFromEnv(overrides) {
|
|
1194
1445
|
const pub = readJmpPublicEnvFromProcess();
|