@ruptjs/client 0.1.3 → 3.0.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/release/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruptjs/client",
3
- "version": "0.1.3",
3
+ "version": "3.0.0",
4
4
  "description": "Framework agnostic device intelligence to prevent fraud and drive revenue growth",
5
5
  "devDependencies": {
6
6
  "@google-cloud/storage": "^7.19.0",
package/release/index.js CHANGED
@@ -15,4 +15,4 @@ void main() {
15
15
  gl_FragColor = vec4((v.x + 1.0) * 0.5, (v.y + 1.0) * 0.5, 0.5, 1.0);
16
16
  }
17
17
  `;function DZ($){try{let Q=$.createProgram(),Z=$.createShader($.VERTEX_SHADER),J=$.createShader($.FRAGMENT_SHADER);if(!Q||!Z||!J)return null;if($.shaderSource(Z,BZ),$.shaderSource(J,HZ),$.compileShader(Z),$.compileShader(J),$.attachShader(Q,Z),$.attachShader(Q,J),$.linkProgram(Q),!$.getProgramParameter(Q,$.LINK_STATUS))return null;$.useProgram(Q);let X=$.createBuffer();$.bindBuffer($.ARRAY_BUFFER,X),$.bufferData($.ARRAY_BUFFER,new Float32Array([-0.7,-0.7,0.7,-0.7,0,0.7]),$.STATIC_DRAW);let q=$.getAttribLocation(Q,"position");$.enableVertexAttribArray(q),$.vertexAttribPointer(q,2,$.FLOAT,!1,0,0);let z=$.getUniformLocation(Q,"angle");$.uniform1f(z,Math.PI/4),$.viewport(0,0,64,64),$.clearColor(0,0,0,1),$.clear($.COLOR_BUFFER_BIT),$.drawArrays($.TRIANGLES,0,3);let K=new Uint8Array(16384);return $.readPixels(0,0,64,64,$.RGBA,$.UNSIGNED_BYTE,K),K}catch{return null}}async function h$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(typeof Z.WebGLRenderingContext>"u")return U("unsupported");let J=Q.createElement("canvas");J.width=64,J.height=64;let X=J.getContext("webgl")||J.getContext("experimental-webgl");if(!X)return U("blocked");let q=X.getExtension("WEBGL_debug_renderer_info"),z=q?X.getParameter(q.UNMASKED_VENDOR_WEBGL):null,K=q?X.getParameter(q.UNMASKED_RENDERER_WEBGL):null,V={};for(let j of WZ){let D=X[j];if(typeof D==="number"){let N=X.getParameter(D);V[j]=N instanceof Float32Array||N instanceof Int32Array?Array.from(N):N}}let B=DZ(X),G=B?await _(Array.from(B).join(",")):null,H={version:X.getParameter(X.VERSION),shadingLanguageVersion:X.getParameter(X.SHADING_LANGUAGE_VERSION),vendor:X.getParameter(X.VENDOR),renderer:X.getParameter(X.RENDERER),unmaskedVendor:z,unmaskedRenderer:K,webgl2:typeof Z.WebGL2RenderingContext<"u",extensions:X.getSupportedExtensions()??[],shaderPrecisions:GZ(X),parameters:V,shaderHash:G};return Y(H)})}catch{return U("iframe_error")}}var C=Math,E=()=>0;async function u$($){let Q=C.acos||E,Z=C.acosh||E,J=C.asin||E,X=C.asinh||E,q=C.atanh||E,z=C.atan||E,K=C.sin||E,V=C.sinh||E,B=C.cos||E,G=C.cosh||E,H=C.tan||E,j=C.tanh||E,D=C.exp||E,N=C.expm1||E,R=C.log1p||E,s=(O)=>C.pow(C.PI,O),t=(O)=>C.log(O+C.sqrt(O*O-1)),a=(O)=>C.log(O+C.sqrt(O*O+1)),e=(O)=>C.log((1+O)/(1-O))/2,$$=(O)=>(C.exp(O)-1/C.exp(O))/2,Q$=(O)=>(C.exp(O)+1/C.exp(O))/2,Z$=(O)=>C.exp(O)-1,J$=(O)=>(C.exp(2*O)-1)/(C.exp(2*O)+1),A=(O)=>C.log(1+O);return Y({acos:Q(0.12312423423423424),acosh:Z(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:t(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:J(0.12312423423423424),asinh:X(1),asinhPf:a(1),atanh:q(0.5),atanhPf:e(0.5),atan:z(0.5),sin:K(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:V(1),sinhPf:$$(1),cos:B(10.000000000123),cosh:G(1),coshPf:Q$(1),tan:H(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:j(1),tanhPf:J$(1),exp:D(1),expm1:N(1),expm1Pf:Z$(1),log1p:R(10),log1pPf:A(10),powPI:s(-100)})}async function p$($){let Q=[],Z=Math.random();for(let J=1;J<=24576;J++){let X=Math.random();if(J%4096===0)Q.push((Z-X)*4294967295|0);Z=X}return Y({samples:[Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]]})}async function m$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");if(typeof window<"u"&&window.location.protocol!=="https:")return U("rejected");try{let Q=await navigator.permissions.query({name:"geolocation"});return Y({state:Q.state})}catch{return U("missing")}}var OZ=["clipboard-read","clipboard-write","notifications","push","camera","microphone","speaker-selection","device-info","background-sync","background-fetch","persistent-storage","midi","screen-wake-lock","nfc","accelerometer","gyroscope","magnetometer","payment-handler","window-management","storage-access","top-level-storage-access","local-fonts","captured-surface-control"];async function d$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");let Q={};return await Promise.all(OZ.map(async(Z)=>{try{let J=await navigator.permissions.query({name:Z});Q[Z]=J.state}catch{Q[Z]="unsupported"}})),Y(Q)}async function c$($){if(typeof window>"u"||typeof window.Notification>"u"||typeof navigator>"u"||!navigator.permissions)return U("unsupported");try{let Q=window.Notification.permission,J=(await navigator.permissions.query({name:"notifications"})).state;return Y({notificationPermission:Q,queryState:J,mismatch:Q==="denied"&&J==="prompt"})}catch{return U("unexpected")}}var PZ=["AccentColor","AccentColorText","ActiveText","ButtonFace","ButtonText","Canvas","CanvasText","Field","FieldText","GrayText","Highlight","HighlightText","LinkText","Mark","MarkText","SelectedItem","SelectedItemText","VisitedText","Scrollbar","Menu","MenuText","InfoBackground","InfoText","ActiveBorder","InactiveBorder","Window"];async function l$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");Q.body.appendChild(J);try{let X={};for(let z of PZ)J.style.color=z,X[z]=Z.getComputedStyle(J).color;if(new Set(Object.values(X)).size<=1)return U("unsupported");return Y(X)}finally{J.remove?.()}})}catch{return U("iframe_error")}}var FZ=(()=>{let $="";for(let Q=128512;Q<=128591;Q++)$+=String.fromCodePoint(Q);return $})();async function i$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("span");J.textContent=FZ,J.style.fontSize="32px",J.style.position="absolute",J.style.visibility="hidden",J.style.whiteSpace="nowrap",Q.body.appendChild(J);try{let X=J.getBoundingClientRect(),q=Z.getComputedStyle(J).fontFamily;return Y({width:X.width,height:X.height,font:q})}finally{J.remove?.()}})}catch{return U("iframe_error")}}async function o$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J="http://www.w3.org/1998/Math/MathML",X=Q.createElementNS(J,"math"),q=Q.createElementNS(J,"mi");q.textContent="x",X.appendChild(q),Q.body.appendChild(X);try{let z=X.getBoundingClientRect();if(z.width===0&&z.height===0)return U("unsupported");let K=Z.getComputedStyle(X).fontFamily;return Y({x:z.x,y:z.y,left:z.left,right:z.right,top:z.top,bottom:z.bottom,width:z.width,height:z.height,font:K})}finally{X.remove?.()}})}catch{return U("iframe_error")}}async function r$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{if(!Q.body)return U("iframe_error");let Z=Q.createElement("div");Z.style.overflow="scroll",Z.style.width="100px",Z.style.height="100px",Z.style.position="absolute",Z.style.visibility="hidden";let J=Q.createElement("div");J.style.height="200px",Z.appendChild(J),Q.body.appendChild(Z);try{let X=Z.offsetWidth-Z.clientWidth,q=Z.offsetWidth!==Z.clientWidth||X>0;return Y({width:X,present:q})}finally{Z.remove?.()}})}catch{return U("iframe_error")}}async function n$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");J.style.border="0.5px solid",J.style.height="0";let X=Q.createElement("div");X.style.width="calc(0.5px / 2)",Q.body.appendChild(J),Q.body.appendChild(X);try{let q=J.offsetHeight,z=Z.getComputedStyle(X).width;return Y({halfPixelBorder:q,halfPixelCalc:z})}finally{J.remove?.(),X.remove?.()}})}catch{return U("iframe_error")}}async function s$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{let J=Q.createElement("input");J.type="radio",Q.body?.appendChild(J);let X=Z.getComputedStyle(J).fontFamily;return J.remove?.(),Y({fontFamily:X})})}catch{return U("iframe_error")}}var wZ=50000,yZ=450;function kZ(){let $=1/0,Q=1/0,Z=performance.now();for(let J=0;J<wZ;J++){let X=performance.now(),q=X-Z;if(q>0){if(q<$)Q=$,$=q;else if(q<Q)Q=q}Z=X}return[Number.isFinite($)?$:0,Number.isFinite(Q)?Q:0]}function bZ(){let $=performance.now(),Q=0;while(performance.now()-$<yZ)performance.now(),Q++;return Q}async function t$($){if(typeof performance>"u"||typeof performance.now!=="function")return U("unsupported");let Q=kZ(),Z=bZ();return Y({deltas:Q,iterationsIn450ms:Z})}var a$=[new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,22,1,20,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,253,174,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,253,228,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,57,1,55,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,253,13,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,7,1,96,1,127,1,123,3,2,1,0,5,3,1,0,1,10,11,1,9,0,32,0,253,0,4,0,11])];async function e$($){if(typeof WebAssembly>"u")return U("unsupported");let Q=0,Z=!0;for(let J=0;J<a$.length;J++)try{if(WebAssembly.validate(a$[J]))Q|=1<<J,Z=!1;else Z=!1}catch{}if(Z)return U("blocked");return Y({bitmap:Q})}async function $Q($){if(typeof SharedArrayBuffer>"u")return U("unsupported");return Y({maxBytes:4294967296,crossOriginIsolated:typeof window<"u"&&window.crossOriginIsolated===!0})}async function QQ($){let Q=null;if(typeof Intl<"u"&&Intl.DateTimeFormat)try{Q=new Intl.DateTimeFormat().resolvedOptions().timeZone??null}catch{}let Z=new Date().getFullYear(),J=-Math.max(new Date(Z,0,1).getTimezoneOffset(),new Date(Z,6,1).getTimezoneOffset());if(Q===null&&J===0&&typeof Intl>"u")return U("unsupported");return Y({iana:Q,offsetMinutes:J})}async function ZQ($){if(typeof Intl>"u"||!Intl.DateTimeFormat)return U("unsupported");try{let Q=new Intl.DateTimeFormat().resolvedOptions().locale;return Y({locale:Q})}catch{return U("unexpected")}}async function JQ($){if(typeof navigator>"u")return U("unsupported");let Q=navigator.language??navigator.userLanguage??navigator.browserLanguage??null,Z=[];if(Array.isArray(navigator.languages))Z=[...navigator.languages];else if(typeof navigator.languages==="string")Z=navigator.languages.split(",");return Z=Z.map((J)=>typeof J==="string"?J.trim():"").filter((J)=>J.length>0),Y({language:Q,languages:Z})}function r($){try{return typeof window[$]<"u"&&window[$]!==null}catch(Q){return Q instanceof DOMException&&Q.name==="SecurityError"}}async function XQ($){if(typeof window>"u")return Y({sessionStorage:!1,localStorage:!1,indexedDB:!1,openDatabase:!1});return Y({sessionStorage:r("sessionStorage"),localStorage:r("localStorage"),indexedDB:r("indexedDB"),openDatabase:r("openDatabase")})}async function YQ($){if(typeof navigator<"u"&&navigator.storage?.estimate)try{let Q=await navigator.storage.estimate();if(typeof Q.quota==="number")return Y({quota:Q.quota,path:"storage"})}catch{}if(typeof navigator<"u"&&navigator.webkitTemporaryStorage?.queryUsageAndQuota)try{let Q=await new Promise((Z,J)=>{navigator.webkitTemporaryStorage.queryUsageAndQuota((X,q)=>Z(q),(X)=>J(X))});return Y({quota:Q,path:"webkitTemporaryStorage"})}catch{}return U("unsupported")}var F=($)=>{if(typeof window>"u"||!window.matchMedia)return null;let Q=window.matchMedia($);return Q.media==="not all"?null:Q.matches};async function UQ($){if(typeof window>"u")return U("unsupported");let Q=typeof screen<"u"&&screen.colorDepth?screen.colorDepth:null,Z=null;if(F("(color-gamut: rec2020)"))Z="rec2020";else if(F("(color-gamut: p3)"))Z="p3";else if(F("(color-gamut: srgb)"))Z="srgb";let J=null;if(F("(prefers-contrast: forced)"))J="forced";else if(F("(prefers-contrast: more)"))J="more";else if(F("(prefers-contrast: less)"))J="less";else if(F("(prefers-contrast: no-preference)"))J="no-preference";let X=null;if(F("(monochrome)")!==null){let q=0,z=100;while(q<=z){let K=q+z>>1;if(F(`(min-monochrome: ${K})`))q=K+1;else z=K-1}X=z}return Y({colorDepth:Q,colorGamut:Z,hdr:F("(dynamic-range: high)"),contrast:J,invertedColors:F("(inverted-colors: inverted)"),reducedTransparency:F("(prefers-reduced-transparency: reduce)"),reducedMotion:F("(prefers-reduced-motion: reduce)"),monochrome:X,colorScheme:F("(prefers-color-scheme: dark)")===!0?"dark":F("(prefers-color-scheme: light)")===!0?"light":null})}async function qQ($){return Y({deviceMemory:typeof navigator<"u"&&typeof navigator.deviceMemory==="number"?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<"u"&&typeof navigator.hardwareConcurrency==="number"?navigator.hardwareConcurrency:null,devicePixelRatio:typeof window<"u"&&typeof window.devicePixelRatio==="number"?window.devicePixelRatio:null})}var lZ=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];function iZ(){if(typeof window>"u"||typeof navigator>"u")return!1;return/WebKit/i.test(navigator.userAgent??"")&&!/Chrome|Edg|OPR/i.test(navigator.userAgent??"")}async function zQ($){let Q=typeof navigator<"u"?navigator.platform||"":"";if(Q==="MacIntel"&&iZ()){if((navigator.maxTouchPoints??0)>1)Q=typeof navigator.userAgent==="string"&&/iPad/i.test(navigator.userAgent)?"iPad":"iPhone"}let Z=typeof navigator<"u"?navigator.vendor??"":"",J=[];if(typeof window<"u"){for(let X of lZ)if(typeof window[X]<"u")J.push(X)}return Y({platform:Q,vendor:Z,vendorFlavors:J})}async function KQ($){let Q=0;if(typeof navigator<"u"){if(typeof navigator.maxTouchPoints==="number")Q=navigator.maxTouchPoints;else if(typeof navigator.msMaxTouchPoints==="number")Q=navigator.msMaxTouchPoints}let Z=!1;try{if(typeof document<"u")document.createEvent("TouchEvent"),Z=!0}catch{}let J=typeof window<"u"&&"ontouchstart"in window;return Y({maxTouchPoints:Q,touchEvent:Z,touchStart:J})}function w($){return $!==null&&(typeof $==="object"||typeof $==="function")}async function VQ($){if(typeof navigator>"u"||!navigator.plugins)return U("unsupported");let Q=navigator.plugins,Z=[];for(let z=0;z<Q.length;z++){let K=Q[z],V=[];for(let B=0;B<K.length;B++){let G=K[B];V.push({type:G.type,suffixes:G.suffixes})}Z.push({name:K.name,description:K.description,mimeTypes:V})}let J=!0;for(let z=0;z<Q.length;z++){let K=Q[z];if(!w(K)){J=!1;break}if(typeof Plugin<"u"&&Object.getPrototypeOf(K)!==Plugin.prototype){J=!1;break}}let X=navigator.mimeTypes,q=!0;if(w(X))for(let z=0;z<X.length;z++){let K=X[z];if(!w(K)){q=!1;break}if(typeof MimeType<"u"&&Object.getPrototypeOf(K)!==MimeType.prototype){q=!1;break}}return Y({plugins:Z,pluginsLength:Q.length,pdfViewerEnabled:typeof navigator.pdfViewerEnabled==="boolean"?navigator.pdfViewerEnabled:null,prototypesIntact:{pluginArray:w(Q)&&typeof PluginArray<"u"&&Object.getPrototypeOf(Q)===PluginArray.prototype,pluginItems:J,mimeArray:w(X)&&typeof MimeTypeArray<"u"&&Object.getPrototypeOf(X)===MimeTypeArray.prototype,mimeItems:q}})}function WQ(){return(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)).slice(0,16)}function sZ($,Q,Z){let J=`${Q}=${Z}`;for(let X of $.split(";"))if(X.trim()===J)return!0;return!1}async function GQ($){if(typeof document>"u")return Y({enabled:!1});let Q=`rupt_probe_${WQ()}`,Z=WQ();try{document.cookie=`${Q}=${Z}; Path=/; SameSite=Strict`;let J=sZ(document.cookie,Q,Z);if(J)document.cookie=`${Q}=; Path=/; SameSite=Strict; Max-Age=0`;return Y({enabled:J})}catch{return Y({enabled:!1})}}async function BQ($){return Y({userAgent:typeof navigator<"u"?navigator.userAgent||"":"",appVersion:typeof navigator<"u"?navigator.appVersion||"":""})}async function HQ($){let Q=typeof navigator<"u"?navigator.connection:void 0;if(!Q)return U("unsupported");return Y({rtt:typeof Q.rtt==="number"?Q.rtt:void 0,effectiveType:typeof Q.effectiveType==="string"?Q.effectiveType:void 0,downlink:typeof Q.downlink==="number"?Q.downlink:void 0,saveData:typeof Q.saveData==="boolean"?Q.saveData:void 0})}async function DQ($){if(typeof Float32Array>"u"||typeof Uint8Array>"u")return U("unsupported");let Q=new Float32Array(1);Q[0]=NaN;let Z=new Uint8Array(Q.buffer);return Y({byte:Z[3]})}async function LQ($){let Q={evalLength:null,serviceWorkerPrototype:null,isSecureContext:null,backdropFilter:null,sourceBufferTypes:null,productSub:null,windowCloseToString:null,bindToString:null,errorStack:null,onLine:null};try{let Z=globalThis.eval;if(typeof Z==="function")Q.evalLength=Z.toString().length}catch{}try{Q.serviceWorkerPrototype=typeof Navigator<"u"&&"serviceWorker"in Navigator.prototype}catch{}try{Q.isSecureContext=typeof window<"u"?window.isSecureContext:null}catch{}try{Q.backdropFilter=typeof CSS<"u"&&CSS.supports?CSS.supports("backdrop-filter","blur(2px)"):null}catch{}try{Q.sourceBufferTypes=[typeof window.SourceBuffer,typeof window.SourceBufferList]}catch{}try{Q.productSub=typeof navigator<"u"?navigator.productSub??null:null}catch{}try{Q.windowCloseToString=typeof window<"u"?window.close.toString():null}catch{}try{Q.bindToString=Function.prototype.bind.toString()}catch{}try{null[0]()}catch(Z){Q.errorStack=typeof Z?.stack==="string"?Z.stack:null}try{Q.onLine=typeof navigator<"u"?navigator.onLine:null}catch{}return Y(Q)}async function CQ($){if(typeof window>"u")return Y({present:!1});let Q=window.process;if(typeof Q>"u")return Y({present:!1});try{return Y({present:!0,type:typeof Q.type==="string"?Q.type:void 0,versions:Q.versions&&typeof Q.versions==="object"?{electron:Q.versions.electron,node:Q.versions.node,chrome:Q.versions.chrome}:void 0})}catch{return Y({present:!0})}}async function AQ($){if(typeof Event>"u")return U("unsupported");try{return Y({isTrusted:new Event("x").isTrusted})}catch{return U("unexpected")}}var XJ=["awesomium","RunPerfTest","CefSharp","emit","fmget_targets","geb","__nightmare","nightmare","__phantomas","callPhantom","_phantom","spawn","_Selenium_IDE_Recorder","_selenium","calledSelenium","wdioElectron","webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","domAutomation","domAutomationController","__playwright__","__puppeteer_evaluation_script__"],YJ=["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped","__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","$cdc_asdjflasutopfhvcZLmcf","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"],UJ=/^([a-z]){3}_.*_(Array|Promise|Symbol)$/;async function jQ($){let Q=[],Z=[],J=[];if(typeof window<"u"){for(let X of XJ)try{if(typeof window[X]<"u")Q.push(X)}catch{}try{for(let X of Object.getOwnPropertyNames(window))if(UJ.test(X))J.push(X)}catch{}}if(typeof document<"u")for(let X of YJ)try{if(typeof document[X]<"u")Z.push(X)}catch{}return Y({windowHits:Q,documentHits:Z,headlessRegexMatches:J})}async function OQ($){if(typeof navigator>"u")return Y({webdriver:"undefined"});let Q=navigator.webdriver;if(Q===null)return Y({webdriver:"null"});if(typeof Q>"u")return Y({webdriver:"undefined"});return Y({webdriver:!!Q})}async function NQ($){let Q=!1,Z=!1;try{let J=Error("rupt-probe");if(Object.defineProperty(J,"stack",{get(){return Q=!0,""}}),typeof console<"u"&&console.debug)console.debug(J)}catch{}try{Z=typeof globalThis.objectToInspect<"u"}catch{}return Y({stackGetter:Q,objectToInspect:Z})}var VJ=["onLine","webdriver","getGamepads"],WJ=[["HTMLElement.offsetWidth",()=>typeof HTMLElement<"u"?HTMLElement.prototype:null,"offsetWidth"],["Navigator.userAgent",()=>typeof Navigator<"u"?Navigator.prototype:null,"userAgent"],["Navigator.platform",()=>typeof Navigator<"u"?Navigator.prototype:null,"platform"],["Screen.width",()=>typeof Screen<"u"?Screen.prototype:null,"width"]],GJ=["window","document","location","navigator","screen","history","console","Function","Object","Array","Math","Date","JSON","Promise","Symbol","Map","Set","WeakMap","WeakSet","Proxy","Reflect","RegExp","String","Number","Boolean","Error"];async function RQ($){let Q=[],Z=[],J={},X=[],q=[];try{if(typeof navigator<"u"){Q=Object.getOwnPropertyNames(Object.getPrototypeOf(navigator));for(let z of VJ){let K=Q.indexOf(z);if(K>=0)Z.push({name:z,index:K})}}}catch{}for(let[z,K,V]of WJ)try{let B=K();if(!B)continue;let G=Object.getOwnPropertyDescriptor(B,V);if(G?.get)J[z]=G.get.toString()}catch{}try{if(typeof window<"u"){let z=Object.getOwnPropertyNames(window);for(let K of z){if(!/^[A-Z]/.test(K))continue;if(!GJ.some((V)=>K.startsWith(V))&&!/^(HTML|SVG|XML|CSS|Animation|Audio|Worker|Element|Event|File|Font|Form|Image|Intl|Path|Performance|Pointer|Range|Resource|Storage|Style|Touch|UI|URL|Video|Web|Window)/.test(K))X.push(K)}}}catch{}try{if(typeof document<"u"&&document.documentElement)q=document.documentElement.getAttributeNames()}catch{}return Y({navPrototypeNames:Q,navPrototypeFingerprint:{length:Q.length,positions:Z},getterSources:J,globalsPresent:{Function:typeof Function<"u",Object:typeof Object<"u"},suspiciousGlobals:X,documentElementAttributes:q})}function HJ($){if(!$)return"";try{return new URL($).origin}catch{return""}}async function PQ($){let Q=[],Z=!1,J=!1;if(typeof window>"u")return Y({frames:Q,crossOriginBoundary:Z,topReached:!0});let X=window,q=0;while(X&&q<20){try{Q.push({origin:X.location.origin,pathname:X.location.pathname,referrerOrigin:HJ(X.document.referrer)})}catch{Z=!0;break}if(X.parent===X){J=!0;break}X=X.parent,q++}return Y({frames:Q,crossOriginBoundary:Z,topReached:J})}async function EQ($){if(typeof URL>"u")return U("unsupported");try{return Y({protocol:new URL("C:/").protocol})}catch{return U("unexpected")}}async function FQ($){if(typeof window>"u")return U("unsupported");try{if(typeof window.external>"u")return U("unsupported");return Y({value:String(window.external)})}catch{return U("unexpected")}}async function _Q($){if(typeof globalThis.DeviceOrientationEvent>"u")return U("unsupported");return Y({hasPermissionAPI:typeof globalThis.DeviceOrientationEvent.requestPermission==="function"})}async function IQ($){let Q=typeof navigator<"u"?navigator.mediaDevices:void 0;return Y({present:!!Q,getUserMediaPresent:typeof Q?.getUserMedia==="function",enumerateDevicesPresent:typeof Q?.enumerateDevices==="function"})}var OJ=/https?:\/\/([^\/\s)]+)/;async function TQ($){let Q;try{throw Error("probe")}catch(K){Q=typeof K?.stack==="string"?K.stack:void 0}if(!Q)return U("unsupported");let Z=Q.split(`
18
- `).filter((K)=>K.trim().length>0),J=null;for(let K of Z){let V=K.match(OJ);if(V){J=V[1];break}}let X=!!Z[0]?.startsWith("Error"),q=X?"v8":Z[0]?.includes("@")?"spidermonkey":"unknown",z=X?Math.max(0,Z.length-1):Z.length;return Y({host:J,formatPattern:q,framesCount:z})}function W($,Q){return Q.then((Z)=>[$,Z],()=>[$,{s:"unexpected",v:null}])}async function n($=i()){try{return await RJ($)}finally{$.iframe.destroy()}}async function RJ($){let Q=await Promise.all([W("widevine",O$($)),W("drm_full",N$($)),W("uach",R$($)),W("ua_string",BQ($)),W("platform_vendor",zQ($)),W("navigator_webdriver",OQ($)),W("screen_frame",P$($)),W("screen_resolution",E$($)),W("window_dimensions",F$($)),W("display_preferences",UQ($)),W("hardware",qQ($)),W("speech_voices",_$($)),W("fonts",T$($)),W("font_preferences",M$($)),W("fontface_load",S$($)),W("emoji",i$($)),W("mathml",o$($)),W("scrollbar",r$($)),W("half_pixel",n$($)),W("radio_default_font",s$($)),W("css_system_colors",l$($)),W("audio",k$($)),W("canvas",v$($)),W("seeded_canvas",f$($)),W("webgl",h$($)),W("math_ops",u$($)),W("math_random",p$($)),W("architecture_nan",DQ($)),W("engine_probes",LQ($)),W("timer_resolution",t$($)),W("wasm_simd",e$($)),W("shared_array_buffer",$Q($)),W("url_parser",EQ($)),W("timezone",QQ($)),W("locale",ZQ($)),W("languages",JQ($)),W("geolocation_permission",m$($)),W("permissions_map",d$($)),W("notifications_spoof",c$($)),W("storage_apis",XQ($)),W("storage_quota",YQ($)),W("cookie_enabled",GQ($)),W("touch",KQ($)),W("plugins",VQ($)),W("device_orientation_permission",_Q($)),W("media_devices",IQ($)),W("connection",HQ($)),W("bot_globals",jQ($)),W("event_istrusted",AQ($)),W("window_process",CQ($)),W("window_external",FQ($)),W("devtools_open",NQ($)),W("prototype_integrity",RQ($)),W("frame_ancestry",PQ($)),W("error_stack",TQ($))]);return Object.fromEntries(Q)}class q${apiOrigin;debug;iframe=null;iframeReady;warmupPromise=null;pending=new Map;rpcCounter=0;constructor($){this.apiOrigin=$.apiOrigin.replace(/\/+$/,""),this.debug=$.debug??!1,this.iframeReady=this.installIframe()}warmup(){if(!this.warmupPromise)this.warmupPromise=(async()=>{try{await this.iframeReady;let $=await this.send({kind:"warm",payload:{type:"warm",id:this.nextId()}});if(!$.ok)throw Error(`warm handshake rejected (status ${$.status}${$.error?`: ${$.error}`:""})`)}catch($){if(this.debug)console.error("[Rupt] transport.warmup failed",$);this.warmupPromise=null}})();return this.warmupPromise}async post($,Q,Z={}){await this.warmup();let J=await this.send({kind:"rpc",payload:{type:"rpc",id:this.nextId(),path:$,body:Q,attachNonce:Z.attachNonce!==!1,authorization:Z.authorization}});return{ok:J.ok,status:J.status,data:J.data}}nextId(){return`r${++this.rpcCounter}-${Date.now().toString(36)}`}send($){return new Promise((Q,Z)=>{if(!this.iframe||!this.iframe.contentWindow)return Z(Error("Rupt transport iframe is not ready"));let J=$.payload.id,X=setTimeout(()=>{if(this.pending.delete(J))Z(Error("Rupt transport request timed out"))},30000);this.pending.set(J,{resolve:(q)=>{clearTimeout(X),Q(q)},reject:(q)=>{clearTimeout(X),Z(q)}});try{this.iframe.contentWindow.postMessage($.payload,this.apiOrigin)}catch(q){clearTimeout(X),this.pending.delete(J),Z(q)}})}installIframe(){if(typeof window>"u")return Promise.resolve();return new Promise(($,Q)=>{let Z=document.createElement("iframe");Z.setAttribute("aria-hidden","true"),Z.style.display="none",Z.style.width="0",Z.style.height="0",Z.style.border="0",Z.src=`${this.apiOrigin}/v3/transport/iframe.html`,this.iframe=Z;let J=!1,X=()=>{if(J)return;J=!0,clearTimeout(K),$()},q=(B)=>{if(J)return;if(J=!0,clearTimeout(K),window.removeEventListener("message",z),Z.parentNode)Z.parentNode.removeChild(Z);if(this.iframe===Z)this.iframe=null;Q(B)},z=(B)=>{if(B.origin!==this.apiOrigin)return;if(B.source!==Z.contentWindow)return;let G=B.data;if(!G||typeof G!=="object")return;if(G.type==="ready"){X();return}if(G.type==="warm_done"||G.type==="rpc_done"){let H=this.pending.get(G.id);if(!H)return;if(this.pending.delete(G.id),G.error)H.reject(Error(G.error));else H.resolve(G);return}},K=setTimeout(()=>q(Error("Rupt transport iframe never posted `ready` within timeout")),15000);Z.addEventListener("error",()=>q(Error("Rupt transport iframe failed to load"))),window.addEventListener("message",z),(()=>{if(document.body)document.body.appendChild(Z);else window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(Z)})})()})}}class z${config;eventSource=null;constructor($){this.config=$}start(){let{apiOrigin:$,clientId:Q,evaluationId:Z,version:J}=this.config,X=`${$}/v3/listen/evaluation/${Z}?version=${J}&auth=Basic ${Q}:`;this.eventSource=new EventSource(X),this.eventSource.onmessage=async(q)=>{let z;try{z=JSON.parse(q.data)}catch{return}if(z?.action==="logout"){try{if(await this.config.onLogout?.({challenge:z.challenge?._id})===!1)return}catch(K){if(this.config.debug)console.error("[Rupt] onLogout callback error",K)}if(z.url)window.location.href=z.url}}}stop(){if(this.eventSource)this.eventSource.close(),this.eventSource=null}}var PJ="https://api.rupt.dev",y="0.1.3",EJ="harbor.lantern",FJ=new Set(["access","login","signup","warm","fingerprint"]);function _J($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class MQ{clientId;debug;onLogout;apiOrigin;transport;warmupPromise;warmSignalContext=null;listener=null;evaluate;constructor($){if($.debug)console.log("[Rupt]","Debug mode enabled"),console.log("[Rupt]","Version ID:",EJ);if(!$?.clientId)throw Error("Rupt: `clientId` is required");if(this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?_J($.domain):PJ,this.transport=new q$({apiOrigin:this.apiOrigin,debug:this.debug}),this.warmupPromise=this.transport.warmup(),typeof document<"u")this.warmSignalContext=i();let Q=(Z,J)=>this._evaluateCustom(Z,J);Q.access=(Z)=>this._evaluateAccess(Z),Q.login=(Z)=>this._evaluateAuthEvent("login",Z),Q.signup=(Z)=>this._evaluateAuthEvent("signup",Z),this.evaluate=Q}consumeWarmContext(){let $=this.warmSignalContext;return this.warmSignalContext=null,$??void 0}async fingerprint(){try{let $=await n(this.consumeWarmContext());return(await this.transport.post("/v3/evaluate/fingerprint",{fp_signals:$,version:y},{authorization:`Basic ${this.clientId}:`})).data}catch($){if(this.debug)console.error("[Rupt]",$);return null}}ready(){return this.warmupPromise}async _evaluateAccess($){try{let Q=await l(),Z={user:$.user!==void 0?String($.user):void 0,device_signals:Q,fp_signals:void 0,metadata:$.metadata,origin_url:typeof window<"u"?window.location.href:void 0,client:"javascript",version:y,page:typeof window<"u"?window.location.href:void 0,email:$.email,phone:$.phone,groups:$.groups,devdata:$.devdata},X=(await this.transport.post("/v3/evaluate/access",Z,{authorization:`Basic ${this.clientId}:`})).data;if(this.debug)console.log("[Rupt]","Successfully evaluated access.");if($.auto_challenge!==!1&&X?.redirect&&typeof window<"u")return window.location.href=X.redirect,null;if(X?.evaluation_id)this.startListener({evaluationId:X.evaluation_id,onLogout:$.on_logout??this.onLogout});return X}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async _evaluateAuthEvent($,Q){try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}async _evaluateCustom($,Q){if(FJ.has($))throw Error(`Rupt: "${$}" is a reserved action. Use rupt.evaluate.access / .login / .signup or rupt.fingerprint() instead.`);try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}startListener($){this.listener?.stop(),this.listener=new z$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:y,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var e8=MQ;export{e8 as default,MQ as Rupt,PJ as BASE_URL};
18
+ `).filter((K)=>K.trim().length>0),J=null;for(let K of Z){let V=K.match(OJ);if(V){J=V[1];break}}let X=!!Z[0]?.startsWith("Error"),q=X?"v8":Z[0]?.includes("@")?"spidermonkey":"unknown",z=X?Math.max(0,Z.length-1):Z.length;return Y({host:J,formatPattern:q,framesCount:z})}function W($,Q){return Q.then((Z)=>[$,Z],()=>[$,{s:"unexpected",v:null}])}async function n($=i()){try{return await RJ($)}finally{$.iframe.destroy()}}async function RJ($){let Q=await Promise.all([W("widevine",O$($)),W("drm_full",N$($)),W("uach",R$($)),W("ua_string",BQ($)),W("platform_vendor",zQ($)),W("navigator_webdriver",OQ($)),W("screen_frame",P$($)),W("screen_resolution",E$($)),W("window_dimensions",F$($)),W("display_preferences",UQ($)),W("hardware",qQ($)),W("speech_voices",_$($)),W("fonts",T$($)),W("font_preferences",M$($)),W("fontface_load",S$($)),W("emoji",i$($)),W("mathml",o$($)),W("scrollbar",r$($)),W("half_pixel",n$($)),W("radio_default_font",s$($)),W("css_system_colors",l$($)),W("audio",k$($)),W("canvas",v$($)),W("seeded_canvas",f$($)),W("webgl",h$($)),W("math_ops",u$($)),W("math_random",p$($)),W("architecture_nan",DQ($)),W("engine_probes",LQ($)),W("timer_resolution",t$($)),W("wasm_simd",e$($)),W("shared_array_buffer",$Q($)),W("url_parser",EQ($)),W("timezone",QQ($)),W("locale",ZQ($)),W("languages",JQ($)),W("geolocation_permission",m$($)),W("permissions_map",d$($)),W("notifications_spoof",c$($)),W("storage_apis",XQ($)),W("storage_quota",YQ($)),W("cookie_enabled",GQ($)),W("touch",KQ($)),W("plugins",VQ($)),W("device_orientation_permission",_Q($)),W("media_devices",IQ($)),W("connection",HQ($)),W("bot_globals",jQ($)),W("event_istrusted",AQ($)),W("window_process",CQ($)),W("window_external",FQ($)),W("devtools_open",NQ($)),W("prototype_integrity",RQ($)),W("frame_ancestry",PQ($)),W("error_stack",TQ($))]);return Object.fromEntries(Q)}class q${apiOrigin;debug;iframe=null;iframeReady;warmupPromise=null;pending=new Map;rpcCounter=0;constructor($){this.apiOrigin=$.apiOrigin.replace(/\/+$/,""),this.debug=$.debug??!1,this.iframeReady=this.installIframe()}warmup(){if(!this.warmupPromise)this.warmupPromise=(async()=>{try{await this.iframeReady;let $=await this.send({kind:"warm",payload:{type:"warm",id:this.nextId()}});if(!$.ok)throw Error(`warm handshake rejected (status ${$.status}${$.error?`: ${$.error}`:""})`)}catch($){if(this.debug)console.error("[Rupt] transport.warmup failed",$);this.warmupPromise=null}})();return this.warmupPromise}async post($,Q,Z={}){await this.warmup();let J=await this.send({kind:"rpc",payload:{type:"rpc",id:this.nextId(),path:$,body:Q,attachNonce:Z.attachNonce!==!1,authorization:Z.authorization}});return{ok:J.ok,status:J.status,data:J.data}}nextId(){return`r${++this.rpcCounter}-${Date.now().toString(36)}`}send($){return new Promise((Q,Z)=>{if(!this.iframe||!this.iframe.contentWindow)return Z(Error("Rupt transport iframe is not ready"));let J=$.payload.id,X=setTimeout(()=>{if(this.pending.delete(J))Z(Error("Rupt transport request timed out"))},30000);this.pending.set(J,{resolve:(q)=>{clearTimeout(X),Q(q)},reject:(q)=>{clearTimeout(X),Z(q)}});try{this.iframe.contentWindow.postMessage($.payload,this.apiOrigin)}catch(q){clearTimeout(X),this.pending.delete(J),Z(q)}})}installIframe(){if(typeof window>"u")return Promise.resolve();return new Promise(($,Q)=>{let Z=document.createElement("iframe");Z.setAttribute("aria-hidden","true"),Z.style.display="none",Z.style.width="0",Z.style.height="0",Z.style.border="0",Z.src=`${this.apiOrigin}/v3/transport/iframe.html`,this.iframe=Z;let J=!1,X=()=>{if(J)return;J=!0,clearTimeout(K),$()},q=(B)=>{if(J)return;if(J=!0,clearTimeout(K),window.removeEventListener("message",z),Z.parentNode)Z.parentNode.removeChild(Z);if(this.iframe===Z)this.iframe=null;Q(B)},z=(B)=>{if(B.origin!==this.apiOrigin)return;if(B.source!==Z.contentWindow)return;let G=B.data;if(!G||typeof G!=="object")return;if(G.type==="ready"){X();return}if(G.type==="warm_done"||G.type==="rpc_done"){let H=this.pending.get(G.id);if(!H)return;if(this.pending.delete(G.id),G.error)H.reject(Error(G.error));else H.resolve(G);return}},K=setTimeout(()=>q(Error("Rupt transport iframe never posted `ready` within timeout")),15000);Z.addEventListener("error",()=>q(Error("Rupt transport iframe failed to load"))),window.addEventListener("message",z),(()=>{if(document.body)document.body.appendChild(Z);else window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(Z)})})()})}}class z${config;eventSource=null;constructor($){this.config=$}start(){let{apiOrigin:$,clientId:Q,evaluationId:Z,version:J}=this.config,X=`${$}/v3/listen/evaluation/${Z}?version=${J}&auth=Basic ${Q}:`;this.eventSource=new EventSource(X),this.eventSource.onmessage=async(q)=>{let z;try{z=JSON.parse(q.data)}catch{return}if(z?.action==="logout"){try{if(await this.config.onLogout?.({challenge:z.challenge?._id})===!1)return}catch(K){if(this.config.debug)console.error("[Rupt] onLogout callback error",K)}if(z.url)window.location.href=z.url}}}stop(){if(this.eventSource)this.eventSource.close(),this.eventSource=null}}var PJ="https://api.rupt.dev",y="3.0.0",EJ="harbor.lantern",FJ=new Set(["access","login","signup","warm","fingerprint"]);function _J($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class MQ{clientId;debug;onLogout;apiOrigin;transport;warmupPromise;warmSignalContext=null;listener=null;evaluate;constructor($){if($.debug)console.log("[Rupt]","Debug mode enabled"),console.log("[Rupt]","Version ID:",EJ);if(!$?.clientId)throw Error("Rupt: `clientId` is required");if(this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?_J($.domain):PJ,this.transport=new q$({apiOrigin:this.apiOrigin,debug:this.debug}),this.warmupPromise=this.transport.warmup(),typeof document<"u")this.warmSignalContext=i();let Q=(Z,J)=>this._evaluateCustom(Z,J);Q.access=(Z)=>this._evaluateAccess(Z),Q.login=(Z)=>this._evaluateAuthEvent("login",Z),Q.signup=(Z)=>this._evaluateAuthEvent("signup",Z),this.evaluate=Q}consumeWarmContext(){let $=this.warmSignalContext;return this.warmSignalContext=null,$??void 0}async fingerprint(){try{let $=await n(this.consumeWarmContext());return(await this.transport.post("/v3/evaluate/fingerprint",{fp_signals:$,version:y},{authorization:`Basic ${this.clientId}:`})).data}catch($){if(this.debug)console.error("[Rupt]",$);return null}}ready(){return this.warmupPromise}async _evaluateAccess($){try{let Q=await l(),Z={user:$.user!==void 0?String($.user):void 0,device_signals:Q,fp_signals:void 0,metadata:$.metadata,origin_url:typeof window<"u"?window.location.href:void 0,client:"javascript",version:y,page:typeof window<"u"?window.location.href:void 0,email:$.email,phone:$.phone,groups:$.groups,devdata:$.devdata},X=(await this.transport.post("/v3/evaluate/access",Z,{authorization:`Basic ${this.clientId}:`})).data;if(this.debug)console.log("[Rupt]","Successfully evaluated access.");if($.auto_challenge!==!1&&X?.redirect&&typeof window<"u")return window.location.href=X.redirect,null;if(X?.evaluation_id)this.startListener({evaluationId:X.evaluation_id,onLogout:$.on_logout??this.onLogout});return X}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async _evaluateAuthEvent($,Q){try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}async _evaluateCustom($,Q){if(FJ.has($))throw Error(`Rupt: "${$}" is a reserved action. Use rupt.evaluate.access / .login / .signup or rupt.fingerprint() instead.`);try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}startListener($){this.listener?.stop(),this.listener=new z$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:y,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var e8=MQ;export{e8 as default,MQ as Rupt,PJ as BASE_URL};