UNPKG

@4884org/jumble

Version:

🛡️ Advanced bot detection & content protection component with 100ms optimized timing. Automatically detects bots and scrambles text content while obfuscating media to protect websites. Universal implementation works with React, Vue, Angular, Svelte.

50 lines (46 loc) 1.99 kB
import { B as BUILD, c as consoleDevInfo, H, w as win, N as NAMESPACE, p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-BV1CkqE_.js'; export { s as setNonce } from './index-BV1CkqE_.js'; /* Stencil Client Patch Browser v4.33.1 | MIT Licensed | https://stenciljs.com */ var patchBrowser = () => { if (BUILD.isDev && !BUILD.isTesting) { consoleDevInfo("Running in development mode."); } if (BUILD.cloneNodeFix) { patchCloneNodeFix(H.prototype); } const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find( (s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE ) : null; const importMeta = import.meta.url; const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {}; if (importMeta !== "") { opts.resourcesUrl = new URL(".", importMeta).href; } return promiseResolve(opts); }; var patchCloneNodeFix = (HTMLElementPrototype) => { const nativeCloneNodeFn = HTMLElementPrototype.cloneNode; HTMLElementPrototype.cloneNode = function(deep) { if (this.nodeName === "TEMPLATE") { return nativeCloneNodeFn.call(this, deep); } const clonedNode = nativeCloneNodeFn.call(this, false); const srcChildNodes = this.childNodes; if (deep) { for (let i = 0; i < srcChildNodes.length; i++) { if (srcChildNodes[i].nodeType !== 2) { clonedNode.appendChild(srcChildNodes[i].cloneNode(true)); } } } return clonedNode; }; }; patchBrowser().then(async (options) => { await globalScripts(); return bootstrapLazy([["jumble-head",[[0,"jumble-head",{"allowSEO":[1540,"allow-seo"],"customAllowlist":[1040,"custom-allowlist"],"customDenylist":[1040,"custom-denylist"],"toggleBotMode":[64],"setBotMode":[64],"getCurrentBotMode":[64]}]]]], options); }); //# sourceMappingURL=jumble.js.map //# sourceMappingURL=jumble.js.map