@ruptjs/client 0.0.2

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 ADDED
@@ -0,0 +1,89 @@
1
+ # Rupt JavaScript SDK
2
+
3
+ This Quick start guide will walk you through the steps to integrate Rupt into your app or website using JavaScript. By the end of this guide, you will have a fully working account-sharing detection mechanism integrated into your website.
4
+
5
+ - [Documentation](https://www.rupt.dev/docs/javascript/quick-start)
6
+
7
+ ### Installation
8
+
9
+ ```sh
10
+ yarn add rupt
11
+ ```
12
+
13
+ or if using npm
14
+
15
+ ```sh
16
+ npm install --save rupt
17
+ ```
18
+
19
+ ### Import
20
+
21
+ ```js
22
+ import Rupt from "rupt";
23
+ ```
24
+
25
+ _Note_ the common js version can be found in `rupt/common.cjs`
26
+
27
+ ### Usage
28
+
29
+ The two main things you need to do are:
30
+
31
+ 1. Attach devices to accounts. Ideally, you should do this on every page once.
32
+ 2. Detach devices from accounts. You should do this when the user logs out.
33
+
34
+ Doing these two things will allow Rupt to associate devices with accounts and detect behaviors that indicate account sharing. For more on this, see [How account sharing prevention works?](/docs/how-account-sharing-prevention-works)
35
+
36
+ ### Attach a device
37
+
38
+ First import the script (only if you installed using a package manager)
39
+
40
+ ```js
41
+ import Rupt from "rupt";
42
+ ```
43
+
44
+ Call the `attach` function to link the device to the account. You must pass the `client_id` and a `account`.
45
+
46
+ ```js
47
+ const { device_id } = await Rupt.attach({
48
+ client_id: `client_id`,
49
+ account: `account_id`,
50
+ redirect_urls: {
51
+ logout_url: "https://your-logout-url.com",
52
+ new_account_url: "https://your-create-new-account-url.com",
53
+ },
54
+ });
55
+ ```
56
+
57
+ Ideally, you should call the `attach` function on every page as soon as you have the account id available. For more on this refer to the advanced section: [When and where to call the attach function?](/docs/advanced/when-to-call-the-attach-function)
58
+
59
+ ### Get signals
60
+
61
+ When using the Rupt API, you need to pass signals to the API to identify the device. To get the signals, call the `getSignals` function like so:
62
+
63
+ ```js
64
+ await Rupt.getSignals();
65
+ ```
66
+
67
+ ### Fingerprint a device
68
+
69
+ To fingerprint a device, call the `fingerprint` function like so:
70
+
71
+ ```js
72
+ await Rupt.fingerprint({
73
+ client_id: `client_id`,
74
+ });
75
+ ```
76
+
77
+ This will return a fingerprint ID. For more on this, see <a href="https://rupt.dev/docs/api/devices/fingerprint-a-device" target="_blank">Fingerprint a device</a>.
78
+
79
+ ### Get fingerprint hash
80
+
81
+ To get the fingerprint hash, call the `getHash` function like so:
82
+
83
+ ```js
84
+ const [hash, last_hash] = await Rupt.getHash();
85
+ ```
86
+
87
+ This will return an array with the first element being the current fingerprint hash and the second element being the last fingerprint hash.
88
+
89
+ That's it. To learn more, visit the [documentation](https://www.rupt.dev/docs/javascript/quick-start)
package/index.d.ts ADDED
@@ -0,0 +1,101 @@
1
+ export interface LogoutEvent {
2
+ challenge?: string;
3
+ }
4
+ export type LogoutCallback = (event: LogoutEvent) => boolean | void | Promise<boolean | void>;
5
+ export declare const BASE_URL: string;
6
+ export declare const CHALLENGE_URL: string;
7
+ export interface Group {
8
+ id: string | number;
9
+ name?: string;
10
+ metadata?: {
11
+ [key: string]: string;
12
+ };
13
+ }
14
+ export interface RuptEvaluationResponse {
15
+ evaluation_id: string | null;
16
+ redirect?: string;
17
+ next_nonce: string;
18
+ expires_at: number;
19
+ }
20
+ export type AttachResponse = RuptEvaluationResponse;
21
+ export type EvaluationResponse = RuptEvaluationResponse;
22
+ export interface FingerprintResponse {
23
+ fingerprint_id: string;
24
+ confidence: number;
25
+ }
26
+ export interface RuptConfig {
27
+ /** API client ID. */
28
+ clientId: string;
29
+ /** Override the API host. Used by self-hosted deployments. */
30
+ domain?: string;
31
+ /** Verbose logging in the SDK. */
32
+ debug?: boolean;
33
+ /** Default callback fired when the server kicks the current session. */
34
+ on_logout?: LogoutCallback;
35
+ }
36
+ export interface AttachParams {
37
+ user: string | number;
38
+ email?: string;
39
+ phone?: string;
40
+ metadata?: object;
41
+ groups?: Group[] | Group;
42
+ devdata?: any;
43
+ /** Fired when the server kicks the current session. Falls back to the
44
+ * Rupt-instance default. */
45
+ on_logout?: LogoutCallback;
46
+ }
47
+ export interface EvaluateParams {
48
+ action: "signup" | "login";
49
+ user: string;
50
+ email?: string;
51
+ phone?: string;
52
+ metadata?: object;
53
+ }
54
+ export interface ChallengeParams {
55
+ challenge_id?: string;
56
+ channel?: "text" | "email";
57
+ domain?: string;
58
+ }
59
+ export interface DetachParams {
60
+ device: string;
61
+ user: string;
62
+ }
63
+ export interface GetAttachedDevicesParams {
64
+ user: string;
65
+ }
66
+ export declare class Rupt {
67
+ private readonly clientId;
68
+ private readonly debug;
69
+ private readonly onLogout?;
70
+ private readonly apiOrigin;
71
+ private readonly transport;
72
+ private readonly warmupPromise;
73
+ private listener;
74
+ constructor(config: RuptConfig);
75
+ attach(params: AttachParams): Promise<AttachResponse | null>;
76
+ evaluate(params: EvaluateParams): Promise<EvaluationResponse | null>;
77
+ challenge(params: ChallengeParams): Promise<void>;
78
+ detach(params: DetachParams): Promise<any>;
79
+ getAttachedDevices(params: GetAttachedDevicesParams): Promise<any>;
80
+ /**
81
+ * Resolve the browser's fingerprint — match against an existing record or
82
+ * mint a new one. No policy, no risk classification, no statistics, no
83
+ * device matching, no access record. Just `{ fingerprint_id, confidence }`.
84
+ *
85
+ * Use this for tests, debugging, and any integration that just needs a
86
+ * stable browser ID without going through the full evaluate flow.
87
+ */
88
+ fingerprint(): Promise<FingerprintResponse | null>;
89
+ /**
90
+ * Wait for the SDK warmup handshake to complete. Public methods await this
91
+ * automatically; expose it for callers who want to time the warmup explicitly.
92
+ */
93
+ ready(): Promise<void>;
94
+ private startListener;
95
+ }
96
+
97
+ export {
98
+ Rupt as default,
99
+ };
100
+
101
+ export {};
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@ruptjs/client",
3
+ "version": "0.0.2",
4
+ "description": "Framework agnostic device intelligence to prevent fraud and drive revenue growth",
5
+ "devDependencies": {
6
+ "@google-cloud/storage": "^7.19.0",
7
+ "@types/node": "^24.12.0",
8
+ "command-line-args": "^5.2.1",
9
+ "dts-bundle-generator": "^9.5.1",
10
+ "semver": "^7.7.4",
11
+ "typescript": "^5.9.3",
12
+ "watch": "^1.0.2"
13
+ },
14
+ "types": "index.d.ts",
15
+ "main": "release/index.js",
16
+ "files": [
17
+ "release/",
18
+ "index.d.ts"
19
+ ],
20
+ "scripts": {
21
+ "dev": "bun build ./src/index.ts --env-file=.env.development --env inline --outdir ./dist/dev --watch",
22
+ "build:types": "dts-bundle-generator -o dist/index.d.ts src/index.ts --no-banner",
23
+ "build:release": "bun build ./src/index.ts --env-file=.env.production --env inline --outdir ./dist/release --minify && dts-bundle-generator -o dist/index.d.ts src/index.ts --no-banner",
24
+ "release": "node release.js"
25
+ },
26
+ "keywords": [
27
+ "device intelligence",
28
+ "fraud prevention",
29
+ "revenue growth",
30
+ "account sharing prevention",
31
+ "multiple logins",
32
+ "account takeover protection",
33
+ "fake account detection",
34
+ "subscription fraud",
35
+ "revenue recovery",
36
+ "identity verification",
37
+ "behavioral analytics",
38
+ "rupt",
39
+ "ruptjs",
40
+ "rupt.js",
41
+ "rupt-js",
42
+ "account sharing",
43
+ "device fingerprinting",
44
+ "browser fingerprinting",
45
+ "device tracking",
46
+ "device identification",
47
+ "device authentication",
48
+ "device verification",
49
+ "device security",
50
+ "device protection",
51
+ "device monitoring",
52
+ "fingerprinting",
53
+ "fingerprint",
54
+ "fingerprintjs"
55
+ ],
56
+ "license": "MIT",
57
+ "dependencies": {
58
+ "@ruptjs/fingerprint": "^3.0.0"
59
+ }
60
+ }
@@ -0,0 +1,18 @@
1
+ function y($,Q){return new Promise((Z)=>setTimeout(Z,$,Q))}function z$(){return y(0)}function k($){return parseInt($)}function Q$($){return parseFloat($)}function K$($,Q){return typeof $==="number"&&isNaN($)?Q:$}function S($){return $.reduce((Q,Z)=>Q+(Z?1:0),0)}async function V$($,Q,Z=50){let J=document;while(!J.body)await y(Z);let X=J.createElement("iframe");try{await new Promise((q,z)=>{let K=!1,G=()=>{K=!0,q()},D=(j)=>{K=!0,z(j)};X.onload=G,X.onerror=D;let{style:W}=X;if(W.setProperty("display","block","important"),W.position="absolute",W.top="0",W.left="0",W.visibility="hidden",Q&&"srcdoc"in X)X.srcdoc=Q;else X.src="about:blank";J.body.appendChild(X);let B=()=>{if(K)return;if(X.contentWindow?.document?.readyState==="complete")G();else setTimeout(B,10)};B()});while(!X.contentWindow?.document?.body)await y(Z);return await $(X,X.contentWindow)}finally{X.parentNode?.removeChild(X)}}var wQ="mmMwWLliI0O&1",yQ="48px",T=["monospace","sans-serif","serif"],G$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function b(){return V$(async($,{document:Q})=>{let Z=Q.body;Z.style.fontSize=yQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(H)=>{let N=Q.createElement("span"),{style:R}=N;return R.position="absolute",R.top="0",R.left="0",R.fontFamily=H,N.textContent=wQ,J.appendChild(N),N},K=(H,N)=>{return z(`'${H}',${N}`)},G=()=>{return T.map(z)},D=()=>{let H={};for(let N of G$)H[N]=T.map((R)=>K(N,R));return H},W=(H)=>{return T.some((N,R)=>H[R].offsetWidth!==X[N]||H[R].offsetHeight!==q[N])},B=G(),j=D();Z.appendChild(J),await z$();for(let H=0;H<T.length;H++)X[T[H]]=B[H].offsetWidth,q[T[H]]=B[H].offsetHeight;return G$.filter((H)=>W(j[H]))})}async function x(){let $=navigator.userAgentData;if($)try{let{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:G,uaFullVersion:D,formFactor:W,wow64:B}=await $.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"]);return{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:G,uaFullVersion:D,formFactor:W,wow64:B}}catch(Q){return{}}return{}}function W$($){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String($))}function B$(){let $=window,Q=navigator;return S(["webkitPersistentStorage"in Q,"webkitTemporaryStorage"in Q,Q.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in $,"BatteryManager"in $,"webkitMediaStream"in $,"webkitSpeechGrammar"in $])>=5}function g(){let $=window,Q=navigator;return S(["ApplePayError"in $,"CSSPrimitiveValue"in $,"Counter"in $,Q.vendor.indexOf("Apple")===0,"getStorageUpdates"in Q,"WebKitMediaKeys"in $])>=4}function D$(){let $=window,{HTMLElement:Q,Document:Z}=$;return S(["safari"in $,!("ongestureend"in $),!("TouchEvent"in $),!("orientation"in $),Q&&!("autocapitalize"in Q.prototype),Z&&"pointerLockElement"in Z.prototype])>=4}function H$(){let $=window;if(!W$($.print))return!1;return S([String($.browser)==="[object WebPageNamespace]","MicrodataExtractor"in $])>=1}function L$(){let $=window;return S([!("MediaSettingsRange"in $),"RTCEncodedAudioFrame"in $,""+$.Intl==="[object Intl]",""+$.Reflect==="[object Reflect]"])>=3}function C$(){let $=window,Q=navigator,{CSS:Z,HTMLButtonElement:J}=$;return S([!("getStorageUpdates"in Q),J&&"popover"in J.prototype,"CSSCounterStyleRule"in $,Z.supports("font-size-adjust: ex-height 0.5"),Z.supports("text-transform: full-width")])>=4}function A$(){if(navigator.platform==="iPad")return!0;let $=screen,Q=$.width/$.height;return S(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,Q>0.65&&Q<1.53])>=2}function v(){let $=navigator,Q=[],Z=$.language||$.userLanguage||$.browserLanguage||$.systemLanguage;if(Z!==void 0)Q.push([Z]);if(Array.isArray($.languages)){if(!(B$()&&L$()))Q.push($.languages)}else if(typeof $.languages==="string"){let J=$.languages;if(J)Q.push(J.split(","))}return Q}function f($){try{if($)return window.localStorage.getItem($);return!!window.localStorage}catch(Q){return!0}}var L=Math,P=()=>0;function h(){let $=L.acos||P,Q=L.acosh||P,Z=L.asin||P,J=L.asinh||P,X=L.atanh||P,q=L.atan||P,z=L.sin||P,K=L.sinh||P,G=L.cos||P,D=L.cosh||P,W=L.tan||P,B=L.tanh||P,j=L.exp||P,H=L.expm1||P,N=L.log1p||P,R=(A)=>L.pow(L.PI,A),o=(A)=>L.log(A+L.sqrt(A*A-1)),n=(A)=>L.log(A+L.sqrt(A*A+1)),r=(A)=>L.log((1+A)/(1-A))/2,s=(A)=>L.exp(A)-1/L.exp(A)/2,t=(A)=>(L.exp(A)+1/L.exp(A))/2,a=(A)=>L.exp(A)-1,e=(A)=>(L.exp(2*A)-1)/(L.exp(2*A)+1),$$=(A)=>L.log(1+A);return{acos:$(0.12312423423423424),acosh:Q(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:o(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:Z(0.12312423423423424),asinh:J(1),asinhPf:n(1),atanh:X(0.5),atanhPf:r(0.5),atan:q(0.5),sin:z(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:K(1),sinhPf:s(1),cos:G(10.000000000123),cosh:D(1),coshPf:t(1),tan:W(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:B(1),tanhPf:e(1),exp:j(1),expm1:H(1),expm1Pf:a(1),log1p:N(10),log1pPf:$$(10),powPI:R(-100)}}function u(){let{platform:$}=navigator;if($==="MacIntel"){if(g()&&!D$())return A$()?"iPad":"iPhone"}return $}function p(){if(g()&&C$()&&H$())return;return kQ()}function kQ(){let $=screen,Q=(J)=>K$(k(J),null),Z=[Q($.width),Q($.height)];return Z.sort().reverse(),Z}function m(){let $=window.Intl?.DateTimeFormat;if($){let Z=new $().resolvedOptions().timeZone;if(Z)return Z}let Q=-bQ();return`UTC${Q>=0?"+":""}${Math.abs(Q)}`}function bQ(){let $=new Date().getFullYear();return Math.max(Q$(new Date($,0,1).getTimezoneOffset()),Q$(new Date($,6,1).getTimezoneOffset()))}function d(){let $=navigator,Q=0,Z;if($.maxTouchPoints!==void 0)Q=k($.maxTouchPoints);else if($.msMaxTouchPoints!==void 0)Q=$.msMaxTouchPoints;try{document.createEvent("TouchEvent"),Z=!0}catch{Z=!1}let J="ontouchstart"in window;return{maxTouchPoints:Q,touchEvent:Z,touchStart:J}}async function Z$(){return{fonts:{value:await b()},languages:{value:v()},screenResolution:{value:p()},timezone:{value:m()},platform:{value:u()},touchSupport:{value:d()},math:{value:h()},localStorage:{value:f()},highEntropyValues:{value:await x()}}}class J${iframe=null;ready;queue=Promise.resolve();destroyed=!1;domReadyHandler=null;readyTimer=null;constructor(){this.ready=this.create()}async runInFrame($){if(this.destroyed)throw Error("Measurement iframe has been destroyed");let Q=await this.ready,Z=this.queue.then(()=>$(Q));return this.queue=Z.then(()=>{return},()=>{return}),Z}destroy(){if(this.destroyed=!0,this.domReadyHandler)document.removeEventListener("DOMContentLoaded",this.domReadyHandler),this.domReadyHandler=null;if(this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;if(this.iframe?.parentNode)this.iframe.parentNode.removeChild(this.iframe);this.iframe=null}create(){return new Promise(($,Q)=>{if(typeof window>"u"||typeof document>"u")return Q(Error("Measurement iframe requires a DOM"));let Z=document.createElement("iframe");Z.setAttribute("aria-hidden","true"),Z.style.visibility="hidden",Z.style.position="absolute",Z.style.left="-9999px",Z.style.top="-9999px",Z.style.width="1px",Z.style.height="1px",Z.style.border="0",Z.style.pointerEvents="none",Z.setAttribute("srcdoc",""),this.iframe=Z;let J=()=>{if(this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}document.body.appendChild(Z);let{contentDocument:X,contentWindow:q}=Z;if(!X||!q){Q(Error("Measurement iframe contentWindow unavailable"));return}this.readyTimer=setTimeout(()=>{if(this.readyTimer=null,this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}if(!Z.contentDocument||!Z.contentWindow){Q(Error("Measurement iframe lost context"));return}$({doc:Z.contentDocument,win:Z.contentWindow})},0)};if(document.body)J();else{let X=()=>{document.removeEventListener("DOMContentLoaded",X),this.domReadyHandler=null,J()};this.domReadyHandler=X,document.addEventListener("DOMContentLoaded",X)}})}}function j$(){return{iframe:new J$}}var Y=($)=>({s:"ok",v:$}),U=($)=>({s:$,v:null});var xQ=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];async function O$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");if(typeof window<"u"&&window.isSecureContext===!1)return U("rejected");let Q=await Promise.all(xQ.map(async(X)=>{try{let q=await navigator.requestMediaKeySystemAccess("com.widevine.alpha",[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"',robustness:X}]}]);return{robustness:X,success:!0,keySystem:q.keySystem}}catch(q){return{robustness:X,success:!1,errName:q?.name??""}}}));if(Q.some((X)=>!X.success&&X.errName==="SecurityError"))return U("rejected");if(Q.some((X)=>!X.success&&X.errName==="NotAllowedError"))return U("denied");let Z=Q.filter((X)=>X.success).map((X)=>X.robustness),J=Q.find((X)=>X.success)?.keySystem??null;if(Z.length===0&&J===null)return U("unsupported");return Y({supported:Z.length>0,robustness:Z,keySystem:J})}var vQ=[{key:"widevine",id:"com.widevine.alpha"},{key:"playready",id:"com.microsoft.playready"},{key:"playready_recommendation",id:"com.microsoft.playready.recommendation"},{key:"fairplay",id:"com.apple.fps"},{key:"fairplay_1_0",id:"com.apple.fps.1_0"},{key:"clearkey",id:"org.w3.clearkey"}];async function fQ($){try{return{supported:!0,keySystem:(await navigator.requestMediaKeySystemAccess($,[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}])).keySystem}}catch{return{supported:!1,keySystem:null}}}async function N$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");let Q=await Promise.all(vQ.map(async({key:J,id:X})=>[J,await fQ(X)])),Z=Object.fromEntries(Q);return Y(Z)}var uQ=["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"];async function R$($){let Q=navigator?.userAgentData;if(!Q)return U("unsupported");if(typeof Q.getHighEntropyValues!=="function")return U("missing");try{let Z=await Q.getHighEntropyValues(uQ);return Y({brands:Q.brands,mobile:Q.mobile,platform:Q.platform,...Z})}catch(Z){if(Z?.name==="NotAllowedError")return U("denied");return U("unexpected")}}var c=($)=>Math.round($/10)*10;async function P$($){if(typeof screen>"u")return U("unsupported");let Q=screen;if(typeof Q.availWidth>"u"||typeof Q.availHeight>"u"||typeof Q.width>"u"||typeof Q.height>"u")return U("missing");let Z=Q.availTop??0,J=Q.availLeft??0,X=c(Z),q=c(J),z=c(Math.max(0,Q.width-J-Q.availWidth)),K=c(Math.max(0,Q.height-Z-Q.availHeight)),G=[X,z,K,q];if(G.every((W)=>W===0))return{s:"blocked",v:G};return Y(G)}async function E$($){if(typeof screen>"u")return U("unsupported");return Y([screen.width,screen.height])}async function _$($){if(typeof window>"u")return U("unexpected");let Q={outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight},Z=(J)=>typeof J==="number"&&Number.isFinite(J);if(!Z(Q.outerWidth)||!Z(Q.outerHeight)||!Z(Q.innerWidth)||!Z(Q.innerHeight))return U("unexpected");return Y(Q)}async function lQ($){let Q=new TextEncoder().encode($);return await crypto.subtle.digest("SHA-256",Q)}function iQ($,Q=32){let Z=new Uint8Array($),J=Math.min(Q,Z.length),X="";for(let q=0;q<J;q++)X+=Z[q].toString(16).padStart(2,"0");return X}async function F($){return iQ(await lQ($),16)}var oQ=1e4;function X$(){try{return window.speechSynthesis.getVoices()??[]}catch{return[]}}function nQ(){return new Promise(($)=>{let Q=window.speechSynthesis,Z=X$();if(Z.length>0)return $(Z);let J=!1,X=()=>{if(J)return;let q=X$();if(q.length>0)J=!0,Q.removeEventListener("voiceschanged",X),$(q)};Q.addEventListener("voiceschanged",X),setTimeout(()=>{if(J)return;J=!0,Q.removeEventListener("voiceschanged",X),$(X$())},oQ)})}async function F$($){if(typeof window>"u"||!window.speechSynthesis)return U("unsupported");if(typeof window.speechSynthesis.getVoices!=="function")return U("missing");let Q=await nQ();if(Q.length===0)return U("unsupported");let Z=Q.map((X)=>`${X.voiceURI},${X.name},${X.lang},${X.localService?1:0},${X.default?1:0}`).sort().join("|"),J=await F(Z);return Y({hash:J})}var M=["monospace","sans-serif","serif"],sQ="mmMwWLliI0O&1",tQ="48px",I$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];async function S$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");Z.style.fontSize=tQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(B)=>{let j=Q.createElement("span"),{style:H}=j;return H.position="absolute",H.top="0",H.left="0",H.fontFamily=B,j.textContent=sQ,J.appendChild(j),j},K=(B,j)=>z(`'${B}',${j}`),G=M.map(z),D={};for(let B of I$)D[B]=M.map((j)=>K(B,j));Z.appendChild(J),await new Promise((B)=>setTimeout(B,0));for(let B=0;B<M.length;B++)X[M[B]]=G[B].offsetWidth,q[M[B]]=G[B].offsetHeight;let W=I$.filter((B)=>M.some((j,H)=>D[B][H].offsetWidth!==X[j]||D[B][H].offsetHeight!==q[j]));return Y(W)})}catch{return U("iframe_error")}}var eQ="mmMwWLliI0O&1",$Z="48px",QZ={default:"",apple:"-apple-system, BlinkMacSystemFont",serif:"serif",sans:"sans-serif",mono:"monospace",min:"",system:"system-ui"},ZZ={min:"1px"};async function T$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important"),J.style.fontSize=$Z;let X={};for(let[z,K]of Object.entries(QZ)){let G=Q.createElement("span");if(G.style.position="absolute",G.style.top="0",G.style.left="0",G.style.whiteSpace="nowrap",K)G.style.fontFamily=K;let D=ZZ[z];if(D)G.style.fontSize=D;G.textContent=eQ,J.appendChild(G),X[z]=G}Z.appendChild(J),await new Promise((z)=>setTimeout(z,0));let q={};for(let z of Object.keys(X))q[z]=X[z].getBoundingClientRect().width;return Y(q)})}catch{return U("iframe_error")}}async function M$($){if(typeof FontFace>"u")return U("unsupported");try{return await new FontFace("f","local('Arial')").load(),Y({supported:!0})}catch{return Y({supported:!1})}}var YZ=44100,w$=5000,UZ=4500;async function y$(){let $=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!$)throw Error("no offline audio context");let Q=new $(1,w$,YZ),Z=Q.createOscillator();Z.type="triangle",Z.frequency.value=1e4;let J=Q.createDynamicsCompressor();J.threshold.value=-50,J.knee.value=40,J.ratio.value=12,J.attack.value=0,J.release.value=0.25,Z.connect(J),J.connect(Q.destination),Z.start(0);let q=(await Q.startRendering()).getChannelData(0),z=0;for(let K=UZ;K<w$;K++)z+=Math.abs(q[K]);return z}async function k$($){if(typeof window>"u")return U("unsupported");if(!(window.OfflineAudioContext||window.webkitOfflineAudioContext))return U("unsupported");try{let Z=await y$(),J;try{J=await y$()}catch{}if(J!==void 0&&Math.abs(Z-J)>0.001)return{s:"unstable",v:{sample:Z,sampleAlt:J}};return Y({sample:Z,sampleAlt:J})}catch(Z){if(Z?.name==="NotSupportedError")return U("unsupported");return U("unexpected")}}var b$="Cwm fjordbank gly \uD83D\uDE03";function x$($){let Q=$.getContext("2d");if(!Q)return null;return $.width=240,$.height=60,Q.textBaseline="alphabetic",Q.fillStyle="#f60",Q.fillRect(100,1,62,20),Q.fillStyle="#069",Q.font='11pt "no-real-font-123"',Q.fillText(b$,2,15),Q.fillStyle="rgba(102, 204, 0, 0.2)",Q.font="18pt Arial",Q.fillText(b$,4,45),$.toDataURL()}function g$($){let Q=$.getContext("2d");if(!Q)return null;$.width=122,$.height=110,Q.globalCompositeOperation="multiply";for(let[Z,J,X]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])Q.fillStyle=Z,Q.beginPath(),Q.arc(J,X,40,0,Math.PI*2,!0),Q.closePath(),Q.fill();return Q.fillStyle="#f9c",Q.beginPath(),Q.arc(60,60,60,0,Math.PI*2,!0),Q.arc(60,60,20,0,Math.PI*2,!0),Q.fill("evenodd"),$.toDataURL()}function zZ($){let Q=$.getContext("2d");if(!Q)return!1;return $.width=1,$.height=1,Q.rect(0,0,10,10),Q.rect(2,2,6,6),Q.isPointInPath(5,5,"evenodd")}async function v$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas"),J=zZ(Z),X=Q.createElement("canvas"),q=g$(X),z=Q.createElement("canvas"),K=x$(z);if(!q||!K)return U("blocked");let G=await F(q),D=await F(K),W=Q.createElement("canvas"),B=Q.createElement("canvas"),j=g$(W),H=x$(B);if(j&&H){let N=await F(j),R=await F(H);if(N!==G||R!==D)return{s:"unstable",v:{winding:J,geometry:G,text:D}}}return Y({winding:J,geometry:G,text:D})})}catch{return U("iframe_error")}}var I=4;function VZ($){let[Q,Z,J,X]=$;return()=>{let q=Q^Q<<11;return Q=Z,Z=J,J=X,X=X^X>>>19^(q^q>>>8)|0,(X>>>0)/4294967296}}async function f$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas");Z.width=I,Z.height=I;let J=Z.getContext("2d");if(!J)return U("unsupported");let X=[Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0],q=VZ([...X]),z=new Uint8ClampedArray(I*I*4);for(let K=0;K<z.length;K+=4)z[K]=Math.floor(q()*256),z[K+1]=Math.floor(q()*256),z[K+2]=Math.floor(q()*256),z[K+3]=Math.floor(q()*256);try{J.putImageData(new ImageData(z,I,I),0,0);let K=J.getImageData(0,0,I,I);return Y({seed:X,pixels:Array.from(K.data),dimension:I})}catch{return U("unexpected")}})}catch{return U("iframe_error")}}var WZ=["MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_IMAGE_UNITS","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_CUBE_MAP_TEXTURE_SIZE","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"];function BZ($){let Q={},Z=[[$.VERTEX_SHADER,"v"],[$.FRAGMENT_SHADER,"f"]],J=[[$.LOW_FLOAT,"lf"],[$.MEDIUM_FLOAT,"mf"],[$.HIGH_FLOAT,"hf"],[$.LOW_INT,"li"],[$.MEDIUM_INT,"mi"],[$.HIGH_INT,"hi"]];for(let[X,q]of Z)for(let[z,K]of J){let G=$.getShaderPrecisionFormat(X,z);if(G)Q[`${q}.${K}`]=[G.rangeMin,G.rangeMax,G.precision]}return Q}var DZ=`
2
+ attribute vec2 position;
3
+ uniform float angle;
4
+ varying vec2 v;
5
+ void main() {
6
+ float c = cos(angle), s = sin(angle);
7
+ vec2 p = vec2(position.x * c - position.y * s, position.x * s + position.y * c);
8
+ v = p;
9
+ gl_Position = vec4(p, 0.0, 1.0);
10
+ }
11
+ `,HZ=`
12
+ precision mediump float;
13
+ varying vec2 v;
14
+ void main() {
15
+ gl_FragColor = vec4((v.x + 1.0) * 0.5, (v.y + 1.0) * 0.5, 0.5, 1.0);
16
+ }
17
+ `;function LZ($){try{let Q=$.createProgram(),Z=$.createShader($.VERTEX_SHADER),J=$.createShader($.FRAGMENT_SHADER);if(!Q||!Z||!J)return null;if($.shaderSource(Z,DZ),$.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,G={};for(let j of WZ){let H=X[j];if(typeof H==="number"){let N=X.getParameter(H);G[j]=N instanceof Float32Array||N instanceof Int32Array?Array.from(N):N}}let D=LZ(X),W=D?await F(Array.from(D).join(",")):null,B={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:BZ(X),parameters:G,shaderHash:W};return Y(B)})}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,G=C.sinh||E,D=C.cos||E,W=C.cosh||E,B=C.tan||E,j=C.tanh||E,H=C.exp||E,N=C.expm1||E,R=C.log1p||E,o=(O)=>C.pow(C.PI,O),n=(O)=>C.log(O+C.sqrt(O*O-1)),r=(O)=>C.log(O+C.sqrt(O*O+1)),s=(O)=>C.log((1+O)/(1-O))/2,t=(O)=>(C.exp(O)-1/C.exp(O))/2,a=(O)=>(C.exp(O)+1/C.exp(O))/2,e=(O)=>C.exp(O)-1,$$=(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:n(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:J(0.12312423423423424),asinh:X(1),asinhPf:r(1),atanh:q(0.5),atanhPf:s(0.5),atan:z(0.5),sin:K(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:G(1),sinhPf:t(1),cos:D(10.000000000123),cosh:W(1),coshPf:a(1),tan:B(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:j(1),tanhPf:$$(1),exp:H(1),expm1:N(1),expm1Pf:e(1),log1p:R(10),log1pPf:A(10),powPI:o(-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 NZ=["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(NZ.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 EZ=["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 EZ)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 n$($){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 r$($){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 yZ=50000,kZ=450;function bZ(){let $=1/0,Q=1/0,Z=performance.now();for(let J=0;J<yZ;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 xZ(){let $=performance.now(),Q=0;while(performance.now()-$<kZ)performance.now(),Q++;return Q}async function t$($){if(typeof performance>"u"||typeof performance.now!=="function")return U("unsupported");let Q=bZ(),Z=xZ();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 l($){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:l("sessionStorage"),localStorage:l("localStorage"),indexedDB:l("indexedDB"),openDatabase:l("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 _=($)=>{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(_("(color-gamut: rec2020)"))Z="rec2020";else if(_("(color-gamut: p3)"))Z="p3";else if(_("(color-gamut: srgb)"))Z="srgb";let J=null;if(_("(prefers-contrast: forced)"))J="forced";else if(_("(prefers-contrast: more)"))J="more";else if(_("(prefers-contrast: less)"))J="less";else if(_("(prefers-contrast: no-preference)"))J="no-preference";let X=null;if(_("(monochrome)")!==null){let q=0,z=100;while(q<=z){let K=q+z>>1;if(_(`(min-monochrome: ${K})`))q=K+1;else z=K-1}X=z}return Y({colorDepth:Q,colorGamut:Z,hdr:_("(dynamic-range: high)"),contrast:J,invertedColors:_("(inverted-colors: inverted)"),reducedTransparency:_("(prefers-reduced-transparency: reduce)"),reducedMotion:_("(prefers-reduced-motion: reduce)"),monochrome:X,colorScheme:_("(prefers-color-scheme: dark)")===!0?"dark":_("(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 iZ=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];function oZ(){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"&&oZ()){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 iZ)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],G=[];for(let D=0;D<K.length;D++){let W=K[D];G.push({type:W.type,suffixes:W.suffixes})}Z.push({name:K.name,description:K.description,mimeTypes:G})}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 GQ(){return(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)).slice(0,16)}function tZ($,Q,Z){let J=`${Q}=${Z}`;for(let X of $.split(";"))if(X.trim()===J)return!0;return!1}async function WQ($){if(typeof document>"u")return Y({enabled:!1});let Q=`rupt_probe_${GQ()}`,Z=GQ();try{document.cookie=`${Q}=${Z}; Path=/; SameSite=Strict`;let J=tZ(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 DQ($){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 HQ($){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 YJ=["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__"],UJ=["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped","__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","$cdc_asdjflasutopfhvcZLmcf","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"],qJ=/^([a-z]){3}_.*_(Array|Promise|Symbol)$/;async function jQ($){let Q=[],Z=[],J=[];if(typeof window<"u"){for(let X of YJ)try{if(typeof window[X]<"u")Q.push(X)}catch{}try{for(let X of Object.getOwnPropertyNames(window))if(qJ.test(X))J.push(X)}catch{}}if(typeof document<"u")for(let X of UJ)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({indexeddb:Q,objectToInspect:Z})}var GJ=["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"]],BJ=["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 GJ){let K=Q.indexOf(z);if(K>=0)Z.push({name:z,index:K})}}}catch{}for(let[z,K,G]of WJ)try{let D=K();if(!D)continue;let W=Object.getOwnPropertyDescriptor(D,G);if(W?.get)J[z]=W.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(!BJ.some((G)=>K.startsWith(G))&&!/^(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 _Q($){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 FQ($){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 NJ=/https?:\/\/([^\/\s)]+)/;async function SQ($){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 G=K.match(NJ);if(G){J=G[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 V($,Q){return Q.then((Z)=>[$,Z],()=>[$,{s:"unexpected",v:null}])}async function Y$($=j$()){try{return await PJ($)}finally{$.iframe.destroy()}}async function PJ($){let Q=await Promise.all([V("widevine",O$($)),V("drm_full",N$($)),V("uach",R$($)),V("ua_string",BQ($)),V("platform_vendor",zQ($)),V("navigator_webdriver",OQ($)),V("screen_frame",P$($)),V("screen_resolution",E$($)),V("window_dimensions",_$($)),V("display_preferences",UQ($)),V("hardware",qQ($)),V("speech_voices",F$($)),V("fonts",S$($)),V("font_preferences",T$($)),V("fontface_load",M$($)),V("emoji",i$($)),V("mathml",o$($)),V("scrollbar",n$($)),V("half_pixel",r$($)),V("radio_default_font",s$($)),V("css_system_colors",l$($)),V("audio",k$($)),V("canvas",v$($)),V("seeded_canvas",f$($)),V("webgl",h$($)),V("math_ops",u$($)),V("math_random",p$($)),V("architecture_nan",HQ($)),V("engine_probes",LQ($)),V("timer_resolution",t$($)),V("wasm_simd",e$($)),V("shared_array_buffer",$Q($)),V("url_parser",EQ($)),V("timezone",QQ($)),V("locale",ZQ($)),V("languages",JQ($)),V("geolocation_permission",m$($)),V("permissions_map",d$($)),V("notifications_spoof",c$($)),V("storage_apis",XQ($)),V("storage_quota",YQ($)),V("cookie_enabled",WQ($)),V("touch",KQ($)),V("plugins",VQ($)),V("device_orientation_permission",FQ($)),V("media_devices",IQ($)),V("connection",DQ($)),V("bot_globals",jQ($)),V("event_istrusted",AQ($)),V("window_process",CQ($)),V("window_external",_Q($)),V("devtools_open",NQ($)),V("prototype_integrity",RQ($)),V("frame_ancestry",PQ($)),V("error_stack",SQ($))]);return Object.fromEntries(Q)}class U${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=(D)=>{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(D)},z=(D)=>{if(D.origin!==this.apiOrigin)return;if(D.source!==Z.contentWindow)return;let W=D.data;if(!W||typeof W!=="object")return;if(W.type==="ready"){X();return}if(W.type==="warm_done"||W.type==="rpc_done"){let B=this.pending.get(W.id);if(!B)return;if(this.pending.delete(W.id),W.error)B.reject(Error(W.error));else B.resolve(W);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 q${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 EJ="https://api.rupt.dev",_J="https://challenge.rupt.dev",i="0.0.2";function TQ($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class MQ{clientId;debug;onLogout;apiOrigin;transport;warmupPromise;listener=null;constructor($){if(!$?.clientId)throw Error("Rupt: `clientId` is required");this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?TQ($.domain):EJ,this.transport=new U$({apiOrigin:this.apiOrigin,debug:this.debug}),this.warmupPromise=this.transport.warmup()}async attach($){try{let Q=await Z$(),Z={user:$.user,device_signals:Q,fp_signals:void 0,metadata:$.metadata,origin_url:typeof window<"u"?window.location.href:void 0,client:"javascript",version:i,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 attached device to account.");if(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 evaluate($){try{let Q=$.action,[Z,J]=await Promise.all([Z$(),Y$()]),X={user:$.user,email:$.email,phone:$.phone,metadata:$.metadata,device_signals:Z,fp_signals:J,version:i,origin_url:typeof window<"u"?window.location.href:void 0},z=(await this.transport.post(`/v3/evaluate/${Q}`,X,{authorization:`Basic ${this.clientId}:`})).data;if(z?.redirect&&typeof window<"u")return window.location.href=z.redirect,null;return z}catch(Q){return console.error("[Rupt]",Q),null}}async challenge($){try{if(!$.challenge_id)return;let Q={challenge:$.challenge_id};if($.channel)Q.channel=$.channel;let Z=$.domain?TQ($.domain):_J;if(typeof window<"u")window.location.href=`${Z}${$.channel?"/challenge":""}?${new URLSearchParams(Q).toString()}`}catch(Q){if(this.debug)console.error("[Rupt]",Q)}}async detach($){try{return(await this.transport.post(`/v3/device/${$.device}/detach`,{user:$.user},{authorization:`Basic ${this.clientId}:`,attachNonce:!1})).data}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async getAttachedDevices($){try{return(await this.transport.post(`/v3/access/user/${$.user}/attached_devices`,{},{authorization:`Basic ${this.clientId}:`,attachNonce:!1})).data}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async fingerprint(){try{let $=await Y$();return(await this.transport.post("/v3/evaluate/fingerprint",{fp_signals:$,version:i},{authorization:`Basic ${this.clientId}:`})).data}catch($){if(this.debug)console.error("[Rupt]",$);return null}}ready(){return this.warmupPromise}startListener($){this.listener?.stop(),this.listener=new q$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:i,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var s8=MQ;export{s8 as default,MQ as Rupt,_J as CHALLENGE_URL,EJ as BASE_URL};