-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/bot-detection' into develop
- Loading branch information
Showing
6 changed files
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14 | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { load } from '@fingerprintjs/botd'; | ||
|
||
(async () => { | ||
const botDetection = await load({ monitoring: false }); | ||
const { bot: isBot } = await botDetection.detect(); | ||
|
||
if (!isBot) { | ||
await import('./Lux'); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { defineBuildConfig } from "unbuild"; | ||
|
||
export default defineBuildConfig({ | ||
entries: [ | ||
{ | ||
builder: "rollup", | ||
name: "index", | ||
input: "./JavaScript/Frontend/Modern", | ||
outDir: "../../Public/JavaScript/Lux/modern", | ||
}, | ||
], | ||
rollup: { | ||
esbuild: { | ||
minify: true, | ||
} | ||
}, | ||
outDir: "../../Public/JavaScript/Lux/modern", | ||
clean: true, | ||
failOnWarn: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
{ | ||
"name": "lux", | ||
"description": "Living User Experience - LUX - the marketing automation tool for TYPO3.", | ||
"author": "in2code", | ||
"private": true, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.0", | ||
"@babel/preset-env": "^7.16.4", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"gulp": "^4.0.2", | ||
"gulp-plumber": "^1.2.1", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-sass": "^5.0.0", | ||
"gulp-uglify": "^3.0.2", | ||
"rollup": "^2.61.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sass": "^1.54.3" | ||
}, | ||
"scripts": { | ||
"build": "./node_modules/gulp/bin/gulp.js build", | ||
"watch": "./node_modules/gulp/bin/gulp.js default" | ||
}, | ||
"dependencies": { | ||
"@fingerprintjs/fingerprintjs": "^2.1.0", | ||
"basiclightbox": "^5.0.0", | ||
"ua-parser-js": "^0.7.31" | ||
} | ||
"name": "lux", | ||
"description": "Living User Experience - LUX - the marketing automation tool for TYPO3.", | ||
"author": "in2code", | ||
"private": true, | ||
"scripts": { | ||
"build": "./node_modules/gulp/bin/gulp.js build && unbuild", | ||
"watch": "./node_modules/gulp/bin/gulp.js default" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.0", | ||
"@babel/preset-env": "^7.16.4", | ||
"@fingerprintjs/botd": "^1.9.1", | ||
"@fingerprintjs/fingerprintjs": "^2.1.0", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"basiclightbox": "^5.0.0", | ||
"gulp": "^4.0.2", | ||
"gulp-plumber": "^1.2.1", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-sass": "^5.0.0", | ||
"gulp-uglify": "^3.0.2", | ||
"rollup": "^2.61.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sass": "^1.54.3", | ||
"typescript": "^5.6.2", | ||
"ua-parser-js": "^0.7.31", | ||
"unbuild": "^2.0.0" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var extendStatics=function(e,n){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])},extendStatics(e,n)};function __extends(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");extendStatics(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}function __awaiter(e,n,t,r){function o(i){return i instanceof t?i:new t(function(u){u(i)})}return new(t||(t=Promise))(function(i,u){function s(c){try{a(r.next(c))}catch(f){u(f)}}function d(c){try{a(r.throw(c))}catch(f){u(f)}}function a(c){c.done?i(c.value):o(c.value).then(s,d)}a((r=r.apply(e,n||[])).next())})}function __generator(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(a){return function(c){return d([a,c])}}function d(a){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(t=0)),t;)try{if(r=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,o=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1],i=a;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(a);break}i[2]&&t.ops.pop(),t.trys.pop();continue}a=n.call(e,t)}catch(c){a=[6,c],o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function __spreadArray(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,i;r<o;r++)(i||!(r in n))&&(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var version="1.9.1",BotKind={Awesomium:"awesomium",Cef:"cef",CefSharp:"cefsharp",CoachJS:"coachjs",Electron:"electron",FMiner:"fminer",Geb:"geb",NightmareJS:"nightmarejs",Phantomas:"phantomas",PhantomJS:"phantomjs",Rhino:"rhino",Selenium:"selenium",Sequentum:"sequentum",SlimerJS:"slimerjs",WebDriverIO:"webdriverio",WebDriver:"webdriver",HeadlessChrome:"headless_chrome",Unknown:"unknown"},BotdError=function(e){__extends(n,e);function n(t,r){var o=e.call(this,r)||this;return o.state=t,o.name="BotdError",Object.setPrototypeOf(o,n.prototype),o}return n}(Error);function detect(e,n){var t={},r={bot:!1};for(var o in n){var i=n[o],u=i(e),s={bot:!1};typeof u=="string"?s={bot:!0,botKind:u}:u&&(s={bot:!0,botKind:BotKind.Unknown}),t[o]=s,s.bot&&(r=s)}return[t,r]}function collect(e){return __awaiter(this,void 0,void 0,function(){var n,t,r=this;return __generator(this,function(o){switch(o.label){case 0:return n={},t=Object.keys(e),[4,Promise.all(t.map(function(i){return __awaiter(r,void 0,void 0,function(){var u,s,d,a,c;return __generator(this,function(f){switch(f.label){case 0:u=e[i],f.label=1;case 1:return f.trys.push([1,3,,4]),s=n,d=i,c={},[4,u()];case 2:return s[d]=(c.value=f.sent(),c.state=0,c),[3,4];case 3:return a=f.sent(),a instanceof BotdError?n[i]={state:a.state,error:"".concat(a.name,": ").concat(a.message)}:n[i]={state:-3,error:a instanceof Error?"".concat(a.name,": ").concat(a.message):String(a)},[3,4];case 4:return[2]}})})}))];case 1:return o.sent(),[2,n]}})})}function detectAppVersion(e){var n=e.appVersion;if(n.state!==0)return!1;if(/headless/i.test(n.value))return BotKind.HeadlessChrome;if(/electron/i.test(n.value))return BotKind.Electron;if(/slimerjs/i.test(n.value))return BotKind.SlimerJS}function arrayIncludes(e,n){return e.indexOf(n)!==-1}function strIncludes(e,n){return e.indexOf(n)!==-1}function arrayFind(e,n){if("find"in e)return e.find(n);for(var t=0;t<e.length;t++)if(n(e[t],t,e))return e[t]}function getObjectProps(e){return Object.getOwnPropertyNames(e)}function includes(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];for(var r=function(d){if(typeof d=="string"){if(arrayIncludes(e,d))return{value:!0}}else{var a=arrayFind(e,function(c){return d.test(c)});if(a!=null)return{value:!0}}},o=0,i=n;o<i.length;o++){var u=i[o],s=r(u);if(typeof s=="object")return s.value}return!1}function countTruthy(e){return e.reduce(function(n,t){return n+(t?1:0)},0)}function detectDocumentAttributes(e){var n=e.documentElementKeys;if(n.state!==0)return!1;if(includes(n.value,"selenium","webdriver","driver"))return BotKind.Selenium}function detectErrorTrace(e){var n=e.errorTrace;if(n.state!==0)return!1;if(/PhantomJS/i.test(n.value))return BotKind.PhantomJS}function detectEvalLengthInconsistency(e){var n=e.evalLength,t=e.browserKind,r=e.browserEngineKind;if(!(n.state!==0||t.state!==0||r.state!==0)){var o=n.value;return r.value==="unknown"?!1:o===37&&!arrayIncludes(["webkit","gecko"],r.value)||o===39&&!arrayIncludes(["internet_explorer"],t.value)||o===33&&!arrayIncludes(["chromium"],r.value)}}function detectFunctionBind(e){var n=e.functionBind;if(n.state===-2)return BotKind.PhantomJS}function detectLanguagesLengthInconsistency(e){var n=e.languages;if(n.state===0&&n.value.length===0)return BotKind.HeadlessChrome}function detectMimeTypesConsistent(e){var n=e.mimeTypesConsistent;if(n.state===0&&!n.value)return BotKind.Unknown}function detectNotificationPermissions(e){var n=e.notificationPermissions,t=e.browserKind;if(t.state!==0||t.value!=="chrome")return!1;if(n.state===0&&n.value)return BotKind.HeadlessChrome}function detectPluginsArray(e){var n=e.pluginsArray;if(n.state===0&&!n.value)return BotKind.HeadlessChrome}function detectPluginsLengthInconsistency(e){var n=e.pluginsLength,t=e.android,r=e.browserKind,o=e.browserEngineKind;if(!(n.state!==0||t.state!==0||r.state!==0||o.state!==0)&&!(r.value!=="chrome"||t.value||o.value!=="chromium")&&n.value===0)return BotKind.HeadlessChrome}function detectProcess(e){var n,t=e.process;if(t.state!==0)return!1;if(t.value.type==="renderer"||((n=t.value.versions)===null||n===void 0?void 0:n.electron)!=null)return BotKind.Electron}function detectProductSub(e){var n=e.productSub,t=e.browserKind;if(n.state!==0||t.state!==0)return!1;if((t.value==="chrome"||t.value==="safari"||t.value==="opera"||t.value==="wechat")&&n.value!=="20030107")return BotKind.Unknown}function detectUserAgent(e){var n=e.userAgent;if(n.state!==0)return!1;if(/PhantomJS/i.test(n.value))return BotKind.PhantomJS;if(/Headless/i.test(n.value))return BotKind.HeadlessChrome;if(/Electron/i.test(n.value))return BotKind.Electron;if(/slimerjs/i.test(n.value))return BotKind.SlimerJS}function detectWebDriver(e){var n=e.webDriver;if(n.state===0&&n.value)return BotKind.HeadlessChrome}function detectWebGL(e){var n=e.webGL;if(n.state===0){var t=n.value,r=t.vendor,o=t.renderer;if(r=="Brian Paul"&&o=="Mesa OffScreen")return BotKind.HeadlessChrome}}function detectWindowExternal(e){var n=e.windowExternal;if(n.state!==0)return!1;if(/Sequentum/i.test(n.value))return BotKind.Sequentum}function detectWindowSize(e){var n=e.windowSize,t=e.documentFocus;if(n.state!==0||t.state!==0)return!1;var r=n.value,o=r.outerWidth,i=r.outerHeight;if(t.value&&o===0&&i===0)return BotKind.HeadlessChrome}function detectDistinctiveProperties(e){var n=e.distinctiveProps;if(n.state!==0)return!1;var t=n.value,r;for(r in t)if(t[r])return r}var detectors={detectAppVersion,detectDocumentAttributes,detectErrorTrace,detectEvalLengthInconsistency,detectFunctionBind,detectLanguagesLengthInconsistency,detectNotificationPermissions,detectPluginsArray,detectPluginsLengthInconsistency,detectProcess,detectUserAgent,detectWebDriver,detectWebGL,detectWindowExternal,detectWindowSize,detectMimeTypesConsistent,detectProductSub,detectDistinctiveProperties};function getAppVersion(){var e=navigator.appVersion;if(e==null)throw new BotdError(-1,"navigator.appVersion is undefined");return e}function getDocumentElementKeys(){if(document.documentElement===void 0)throw new BotdError(-1,"document.documentElement is undefined");var e=document.documentElement;if(typeof e.getAttributeNames!="function")throw new BotdError(-2,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()}function getErrorTrace(){try{null[0]()}catch(e){if(e instanceof Error&&e.stack!=null)return e.stack.toString()}throw new BotdError(-3,"errorTrace signal unexpected behaviour")}function getEvalLength(){return eval.toString().length}function getFunctionBind(){if(Function.prototype.bind===void 0)throw new BotdError(-2,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()}function getBrowserEngineKind(){var e,n,t=window,r=navigator;return countTruthy(["webkitPersistentStorage"in r,"webkitTemporaryStorage"in r,r.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in t,"BatteryManager"in t,"webkitMediaStream"in t,"webkitSpeechGrammar"in t])>=5?"chromium":countTruthy(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,r.vendor.indexOf("Apple")===0,"getStorageUpdates"in r,"WebKitMediaKeys"in t])>=4?"webkit":countTruthy(["buildID"in navigator,"MozAppearance"in((n=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&n!==void 0?n:{}),"onmozfullscreenchange"in t,"mozInnerScreenX"in t,"CSSMozDocumentRule"in t,"CanvasCaptureMediaStream"in t])>=4?"gecko":"unknown"}function getBrowserKind(){var e,n=(e=navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase();return strIncludes(n,"edg/")?"edge":strIncludes(n,"trident")||strIncludes(n,"msie")?"internet_explorer":strIncludes(n,"wechat")?"wechat":strIncludes(n,"firefox")?"firefox":strIncludes(n,"opera")||strIncludes(n,"opr")?"opera":strIncludes(n,"chrome")?"chrome":strIncludes(n,"safari")?"safari":"unknown"}function isAndroid(){var e=getBrowserEngineKind(),n=e==="chromium",t=e==="gecko";if(!n&&!t)return!1;var r=window;return countTruthy(["onorientationchange"in r,"orientation"in r,n&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}function getDocumentFocus(){return document.hasFocus===void 0?!1:document.hasFocus()}function isChromium86OrNewer(){var e=window;return countTruthy([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function getLanguages(){var e=navigator,n=[],t=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(t!==void 0&&n.push([t]),Array.isArray(e.languages)){var r=getBrowserEngineKind();r==="chromium"&&isChromium86OrNewer()||n.push(e.languages)}else if(typeof e.languages=="string"){var o=e.languages;o&&n.push(o.split(","))}return n}function areMimeTypesConsistent(){if(navigator.mimeTypes===void 0)throw new BotdError(-1,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,n=Object.getPrototypeOf(e)===MimeTypeArray.prototype,t=0;t<e.length;t++)n&&(n=Object.getPrototypeOf(e[t])===MimeType.prototype);return n}function getNotificationPermissions(){return __awaiter(this,void 0,void 0,function(){var e,n;return __generator(this,function(t){switch(t.label){case 0:if(window.Notification===void 0)throw new BotdError(-1,"window.Notification is undefined");if(navigator.permissions===void 0)throw new BotdError(-1,"navigator.permissions is undefined");if(e=navigator.permissions,typeof e.query!="function")throw new BotdError(-2,"navigator.permissions.query is not a function");t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e.query({name:"notifications"})];case 2:return n=t.sent(),[2,window.Notification.permission==="denied"&&n.state==="prompt"];case 3:throw t.sent(),new BotdError(-3,"notificationPermissions signal unexpected behaviour");case 4:return[2]}})})}function getPluginsArray(){if(navigator.plugins===void 0)throw new BotdError(-1,"navigator.plugins is undefined");if(window.PluginArray===void 0)throw new BotdError(-1,"window.PluginArray is undefined");return navigator.plugins instanceof PluginArray}function getPluginsLength(){if(navigator.plugins===void 0)throw new BotdError(-1,"navigator.plugins is undefined");if(navigator.plugins.length===void 0)throw new BotdError(-3,"navigator.plugins.length is undefined");return navigator.plugins.length}function getProcess(){var e=window.process,n="window.process is";if(e===void 0)throw new BotdError(-1,"".concat(n," undefined"));if(e&&typeof e!="object")throw new BotdError(-3,"".concat(n," not an object"));return e}function getProductSub(){var e=navigator.productSub;if(e===void 0)throw new BotdError(-1,"navigator.productSub is undefined");return e}function getRTT(){if(navigator.connection===void 0)throw new BotdError(-1,"navigator.connection is undefined");if(navigator.connection.rtt===void 0)throw new BotdError(-1,"navigator.connection.rtt is undefined");return navigator.connection.rtt}function getUserAgent(){return navigator.userAgent}function getWebDriver(){if(navigator.webdriver==null)throw new BotdError(-1,"navigator.webdriver is undefined");return navigator.webdriver}function getWebGL(){var e=document.createElement("canvas");if(typeof e.getContext!="function")throw new BotdError(-2,"HTMLCanvasElement.getContext is not a function");var n=e.getContext("webgl");if(n===null)throw new BotdError(-4,"WebGLRenderingContext is null");if(typeof n.getParameter!="function")throw new BotdError(-2,"WebGLRenderingContext.getParameter is not a function");var t=n.getParameter(n.VENDOR),r=n.getParameter(n.RENDERER);return{vendor:t,renderer:r}}function getWindowExternal(){if(window.external===void 0)throw new BotdError(-1,"window.external is undefined");var e=window.external;if(typeof e.toString!="function")throw new BotdError(-2,"window.external.toString is not a function");return e.toString()}function getWindowSize(){return{outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight}}function checkDistinctiveProperties(){var e,n=(e={},e[BotKind.Awesomium]={window:["awesomium"]},e[BotKind.Cef]={window:["RunPerfTest"]},e[BotKind.CefSharp]={window:["CefSharp"]},e[BotKind.CoachJS]={window:["emit"]},e[BotKind.FMiner]={window:["fmget_targets"]},e[BotKind.Geb]={window:["geb"]},e[BotKind.NightmareJS]={window:["__nightmare","nightmare"]},e[BotKind.Phantomas]={window:["__phantomas"]},e[BotKind.PhantomJS]={window:["callPhantom","_phantom"]},e[BotKind.Rhino]={window:["spawn"]},e[BotKind.Selenium]={window:["_Selenium_IDE_Recorder","_selenium","calledSelenium",/^([a-z]){3}_.*_(Array|Promise|Symbol)$/],document:["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped"]},e[BotKind.WebDriverIO]={window:["wdioElectron"]},e[BotKind.WebDriver]={window:["webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw"],document:["__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__fxdriver_unwrapped","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","$cdc_asdjflasutopfhvcZLmcf","$cdc_asdjflasutopfhvcZLmcfl_","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"]},e[BotKind.HeadlessChrome]={window:["domAutomation","domAutomationController"]},e),t,r={},o=getObjectProps(window),i=[];window.document!==void 0&&(i=getObjectProps(window.document));for(t in n){var u=n[t];if(u!==void 0){var s=u.window===void 0?!1:includes.apply(void 0,__spreadArray([o],u.window,!1)),d=u.document===void 0||!i.length?!1:includes.apply(void 0,__spreadArray([i],u.document,!1));r[t]=s||d}}return r}var sources={android:isAndroid,browserKind:getBrowserKind,browserEngineKind:getBrowserEngineKind,documentFocus:getDocumentFocus,userAgent:getUserAgent,appVersion:getAppVersion,rtt:getRTT,windowSize:getWindowSize,pluginsLength:getPluginsLength,pluginsArray:getPluginsArray,errorTrace:getErrorTrace,productSub:getProductSub,windowExternal:getWindowExternal,mimeTypesConsistent:areMimeTypesConsistent,evalLength:getEvalLength,webGL:getWebGL,webDriver:getWebDriver,languages:getLanguages,notificationPermissions:getNotificationPermissions,documentElementKeys:getDocumentElementKeys,functionBind:getFunctionBind,process:getProcess,distinctiveProps:checkDistinctiveProperties},BotDetector=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.detect=function(){if(this.components===void 0)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var n=detect(this.components,detectors),t=n[0],r=n[1];return this.detections=t,r},e.prototype.collect=function(){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(t){switch(t.label){case 0:return n=this,[4,collect(sources)];case 1:return n.components=t.sent(),[2,this.components]}})})},e}();function monitor(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(version,"/npm-monitoring"),!0),e.send()}catch(n){console.error(n)}}function load(e){var n=e===void 0?{}:e,t=n.monitoring,r=t===void 0?!0:t;return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){switch(i.label){case 0:return r&&monitor(),o=new BotDetector,[4,o.collect()];case 1:return i.sent(),[2,o]}})})}(async()=>{const e=await load({monitoring:!1}),{bot:n}=await e.detect();n||await import("./chunks/Lux.mjs")})(); |