101elapsedMs: o,
claims: v
};
y(s);
let c = a ? void 0 : i(u ?? {}, f, p);
if (c && c !== r) {
T(c, !0);
return;
}
b = !0, C(), document.getElementById(_)?.remove(), g?.(s);
}, T = (e, n) => {
C(), x = performance.now();
let r = document.createElement("script");
r.id = _, r.src = e, r.type = "module", r.async = !0, r.onload = () => {
setTimeout(() => {
b || (customElements.get(t) ? (b = !0, C
LowAi Review Evidence
Rendering loads the widget script from configured Zerohash CDN URLs.
dist/index.jsView on unpkg · L101 249VITE_REDIRECT_HANDLER_URL: "http://localhost:4202/redirect-handler/index.html",
VITE_SCRAPER_EXTENSION_ID_CHROMIUM: "[redacted]",
VITE_TRADE_API_BASE_URL: "/trade",
VITE_UNLEASH_APIKEY: "zerohash-sdk:dev.[redacted]"
}.VITE_LOCAL_CDN_HOST || "http://localhost:5173",
dev: "https://sdk-cdn.dev.0hash.com",
cert: "https://sdk-cdn.cert.zerohash.com",
prod: "https://sdk-cdn.zerohash.com",
"eu-cert": "https://sdk-cdn.cert.zerohash.eu",
"eu-prod": "https
LowAi Review Evidence
Rendering loads the widget script from configured Zerohash CDN URLs.
dist/index.jsView on unpkg · L249 1var e = {
dev: "https://grafana-faro-collector.dev.0hash.com/collect",
cert: "https://grafana-faro-collector.cert.zerohash.com/collect",
prod: "https://grafana-faro-collector.zerohash.com/collect",
"eu-cert": "https://grafana-faro-collector.cert.zerohash.eu/collect",
"eu-prod": "https://grafana-faro-collector.zerohash.eu/collect",
sandbox: "https://grafana-faro-collector.cert.zerohash.com/collect",
production: "https://grafana-faro-collector.zerohash.com/collect"
}, t = (e) => {
if (!e || typeof e != "string") return null;
let t = e.split(".");
if (t.length < 2) r
LowAi Review Evidence
On script-load failure, the SDK sends diagnostics to Zerohash’s environment-specific collector; the report includes selected JWT claims and browser/page context.
dist/index.jsView on unpkg · L1 88t-${f}`;
if (customElements.get(t) || document.getElementById(_)) return o;
let v = r(p), y = e.report ?? ((e) => l(d && a(d, f, p), e, s)), b = !1, x = 0, S, C = () => {
S !== void 0 && clearTimeout(S);
}, w = (e, r, a) => {
if (b) return;
let o = Math.round(performance.now() - x), s = {
webComponentTag: t,
appName: n,
env: f,
scriptUrl: r,
reason: e,
triedFallback: a,
elapsedMs: o,
claims: v
};
y(s);
let c = a ? void 0 : i(u ?? {}, f, p);
if (c && c !==
LowAi Review Evidence
On script-load failure, the SDK sends diagnostics to Zerohash’s environment-specific collector; the report includes selected JWT claims and browser/page context.
dist/index.jsView on unpkg · L88 58m ${e.env} environment.`,
level: "error",
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
context: {
web_component: e.webComponentTag,
script_url: e.scriptUrl,
reason: e.reason,
tried_fallback: String(e.triedFallback),
elapsed_ms: String(e.elapsedMs)
}
}]
}
};
}, l = (e, t, n) => {
if (!e || typeof fetch > "u") return;
let { sessionId: r, payload: i } = c(t, n);
try {
fetch(e, {
method: "POST",
headers: {
"Content-Type": "appli
LowAi Review Evidence
On script-load failure, the SDK sends diagnostics to Zerohash’s environment-specific collector; the report includes selected JWT claims and browser/page context.
dist/index.jsView on unpkg · L58 36{
let e = /* @__PURE__ */ new Uint8Array(8);
return globalThis.crypto.getRandomValues(e), Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
}, c = (e, t) => {
let n = s(), r = globalThis.__ZH_WEB_SDK_VERSION__, i = {};
return e.claims.participantCode && (i.participant_code = e.claims.participantCode), e.claims.platformName && (i.platform_name = e.claims.platformName), e.claims.platformCode && (i.platform_code = e.claims.platformCode), e.claims.region && (i.region = e.claims.region), r && (i.zh_web_sdk_version = r), {
sessionId: n,
payload: {
meta: {
LowAi Review Evidence
On script-load failure, the SDK sends diagnostics to Zerohash’s environment-specific collector; the report includes selected JWT claims and browser/page context.
dist/index.jsView on unpkg · L36