@ruptjs/client 3.0.0 → 3.1.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.
package/index.d.ts CHANGED
@@ -92,6 +92,19 @@ export declare class Rupt {
92
92
  * which lets `collectAllSignals` fall back to creating a fresh context.
93
93
  */
94
94
  private consumeWarmContext;
95
+ /**
96
+ * Persist the challenge id embedded in a server-issued redirect URL
97
+ * (`.../?challenge=<id>`) so the next access can report it as last_challenge.
98
+ * No-op when there is no redirect or no challenge param.
99
+ */
100
+ private persistChallengeFromRedirect;
101
+ /**
102
+ * localStorage-first with a cookie fallback only when localStorage can't be
103
+ * written (private-mode quirks, disabled storage). The cookie path is a last
104
+ * resort because cookies ride along on every same-origin customer request.
105
+ */
106
+ private persistLastChallenge;
107
+ private readLastChallenge;
95
108
  /**
96
109
  * Resolve the browser's fingerprint — match against an existing record or
97
110
  * mint a new one. No policy, no risk classification, no statistics, no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruptjs/client",
3
- "version": "3.0.0",
3
+ "version": "3.1.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
@@ -1,4 +1,4 @@
1
- function k($,Q){return new Promise((Z)=>setTimeout(Z,$,Q))}function K$(){return k(0)}function b($){return parseInt($)}function X$($){return parseFloat($)}function V$($,Q){return typeof $==="number"&&isNaN($)?Q:$}function T($){return $.reduce((Q,Z)=>Q+(Z?1:0),0)}async function W$($,Q,Z=50){let J=document;while(!J.body)await k(Z);let X=J.createElement("iframe");try{await new Promise((q,z)=>{let K=!1,V=()=>{K=!0,q()},B=(j)=>{K=!0,z(j)};X.onload=V,X.onerror=B;let{style:G}=X;if(G.setProperty("display","block","important"),G.position="absolute",G.top="0",G.left="0",G.visibility="hidden",Q&&"srcdoc"in X)X.srcdoc=Q;else X.src="about:blank";J.body.appendChild(X);let H=()=>{if(K)return;if(X.contentWindow?.document?.readyState==="complete")V();else setTimeout(H,10)};H()});while(!X.contentWindow?.document?.body)await k(Z);return await $(X,X.contentWindow)}finally{X.parentNode?.removeChild(X)}}var SQ="mmMwWLliI0O&1",wQ="48px",M=["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 x(){return W$(async($,{document:Q})=>{let Z=Q.body;Z.style.fontSize=wQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(D)=>{let N=Q.createElement("span"),{style:R}=N;return R.position="absolute",R.top="0",R.left="0",R.fontFamily=D,N.textContent=SQ,J.appendChild(N),N},K=(D,N)=>{return z(`'${D}',${N}`)},V=()=>{return M.map(z)},B=()=>{let D={};for(let N of G$)D[N]=M.map((R)=>K(N,R));return D},G=(D)=>{return M.some((N,R)=>D[R].offsetWidth!==X[N]||D[R].offsetHeight!==q[N])},H=V(),j=B();Z.appendChild(J),await K$();for(let D=0;D<M.length;D++)X[M[D]]=H[D].offsetWidth,q[M[D]]=H[D].offsetHeight;return G$.filter((D)=>G(j[D]))})}async function g(){let $=navigator.userAgentData;if($)try{let{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:B,formFactor:G,wow64:H}=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:V,uaFullVersion:B,formFactor:G,wow64:H}}catch(Q){return{}}return{}}function B$($){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String($))}function H$(){let $=window,Q=navigator;return T(["webkitPersistentStorage"in Q,"webkitTemporaryStorage"in Q,Q.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in $,"BatteryManager"in $,"webkitMediaStream"in $,"webkitSpeechGrammar"in $])>=5}function v(){let $=window,Q=navigator;return T(["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 T(["safari"in $,!("ongestureend"in $),!("TouchEvent"in $),!("orientation"in $),Q&&!("autocapitalize"in Q.prototype),Z&&"pointerLockElement"in Z.prototype])>=4}function L$(){let $=window;if(!B$($.print))return!1;return T([String($.browser)==="[object WebPageNamespace]","MicrodataExtractor"in $])>=1}function C$(){let $=window;return T([!("MediaSettingsRange"in $),"RTCEncodedAudioFrame"in $,""+$.Intl==="[object Intl]",""+$.Reflect==="[object Reflect]"])>=3}function A$(){let $=window,Q=navigator,{CSS:Z,HTMLButtonElement:J}=$;return T([!("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 j$(){if(navigator.platform==="iPad")return!0;let $=screen,Q=$.width/$.height;return T(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,Q>0.65&&Q<1.53])>=2}function f(){let $=navigator,Q=[],Z=$.language||$.userLanguage||$.browserLanguage||$.systemLanguage;if(Z!==void 0)Q.push([Z]);if(Array.isArray($.languages)){if(!(H$()&&C$()))Q.push($.languages)}else if(typeof $.languages==="string"){let J=$.languages;if(J)Q.push(J.split(","))}return Q}function h($){try{if($)return window.localStorage.getItem($);return!!window.localStorage}catch(Q){return!0}}var L=Math,P=()=>0;function u(){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,V=L.cos||P,B=L.cosh||P,G=L.tan||P,H=L.tanh||P,j=L.exp||P,D=L.expm1||P,N=L.log1p||P,R=(A)=>L.pow(L.PI,A),s=(A)=>L.log(A+L.sqrt(A*A-1)),t=(A)=>L.log(A+L.sqrt(A*A+1)),a=(A)=>L.log((1+A)/(1-A))/2,e=(A)=>L.exp(A)-1/L.exp(A)/2,$$=(A)=>(L.exp(A)+1/L.exp(A))/2,Q$=(A)=>L.exp(A)-1,Z$=(A)=>(L.exp(2*A)-1)/(L.exp(2*A)+1),J$=(A)=>L.log(1+A);return{acos:$(0.12312423423423424),acosh:Q(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:s(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:Z(0.12312423423423424),asinh:J(1),asinhPf:t(1),atanh:X(0.5),atanhPf:a(0.5),atan:q(0.5),sin:z(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:K(1),sinhPf:e(1),cos:V(10.000000000123),cosh:B(1),coshPf:$$(1),tan:G(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:H(1),tanhPf:Z$(1),exp:j(1),expm1:D(1),expm1Pf:Q$(1),log1p:N(10),log1pPf:J$(10),powPI:R(-100)}}function p(){let{platform:$}=navigator;if($==="MacIntel"){if(v()&&!D$())return j$()?"iPad":"iPhone"}return $}function m(){if(v()&&A$()&&L$())return;return yQ()}function yQ(){let $=screen,Q=(J)=>V$(b(J),null),Z=[Q($.width),Q($.height)];return Z.sort().reverse(),Z}function d(){let $=window.Intl?.DateTimeFormat;if($){let Z=new $().resolvedOptions().timeZone;if(Z)return Z}let Q=-kQ();return`UTC${Q>=0?"+":""}${Math.abs(Q)}`}function kQ(){let $=new Date().getFullYear();return Math.max(X$(new Date($,0,1).getTimezoneOffset()),X$(new Date($,6,1).getTimezoneOffset()))}function c(){let $=navigator,Q=0,Z;if($.maxTouchPoints!==void 0)Q=b($.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 l(){return{fonts:{value:await x()},languages:{value:f()},screenResolution:{value:m()},timezone:{value:d()},platform:{value:p()},touchSupport:{value:c()},math:{value:u()},localStorage:{value:h()},highEntropyValues:{value:await g()}}}class Y${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"),J=Z.style;J.setProperty("display","block","important"),J.position="absolute",J.top="0",J.left="0",J.visibility="hidden",Z.src="about:blank",this.iframe=Z;let X=()=>{if(this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}let q=!1,z=()=>{if(q||this.destroyed)return;let{contentDocument:K,contentWindow:V}=Z;if(!K||!V||K.readyState!=="complete"||!K.body){this.readyTimer=setTimeout(z,10);return}if(q=!0,this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;K.body.offsetHeight,$({doc:K,win:V})};Z.onload=z,Z.onerror=()=>Q(Error("Measurement iframe failed to load")),document.body.appendChild(Z),z()};if(document.body)X();else{let q=()=>{document.removeEventListener("DOMContentLoaded",q),this.domReadyHandler=null,X()};this.domReadyHandler=q,document.addEventListener("DOMContentLoaded",q)}})}}function i(){return{iframe:new Y$}}var Y=($)=>({s:"ok",v:$}),U=($)=>({s:$,v:null});var bQ=["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(bQ.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 gQ=[{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 vQ($){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(gQ.map(async({key:J,id:X})=>[J,await vQ(X)])),Z=Object.fromEntries(Q);return Y(Z)}var hQ=["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(hQ);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 o=($)=>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=o(Z),q=o(J),z=o(Math.max(0,Q.width-J-Q.availWidth)),K=o(Math.max(0,Q.height-Z-Q.availHeight)),V=[X,z,K,q];if(V.every((G)=>G===0))return{s:"blocked",v:V};return Y(V)}async function E$($){if(typeof screen>"u")return U("unsupported");return Y([screen.width,screen.height])}async function F$($){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 cQ($){let Q=new TextEncoder().encode($);return await crypto.subtle.digest("SHA-256",Q)}function lQ($,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 _($){return lQ(await cQ($),16)}var iQ=1e4;function U$(){try{return window.speechSynthesis.getVoices()??[]}catch{return[]}}function oQ(){return new Promise(($)=>{let Q=window.speechSynthesis,Z=U$();if(Z.length>0)return $(Z);let J=!1,X=()=>{if(J)return;let q=U$();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),$(U$())},iQ)})}async function _$($){if(typeof window>"u"||!window.speechSynthesis)return U("unsupported");if(typeof window.speechSynthesis.getVoices!=="function")return U("missing");let Q=await oQ();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 _(Z);return Y({hash:J})}var S=["monospace","sans-serif","serif"],nQ="mmMwWLliI0O&1",sQ="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 T$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");Z.style.fontSize=sQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(H)=>{let j=Q.createElement("span"),{style:D}=j;return D.position="absolute",D.top="0",D.left="0",D.fontFamily=H,j.textContent=nQ,J.appendChild(j),j},K=(H,j)=>z(`'${H}',${j}`),V=S.map(z),B={};for(let H of I$)B[H]=S.map((j)=>K(H,j));Z.appendChild(J);for(let H=0;H<S.length;H++)X[S[H]]=V[H].offsetWidth,q[S[H]]=V[H].offsetHeight;let G=I$.filter((H)=>S.some((j,D)=>B[H][D].offsetWidth!==X[j]||B[H][D].offsetHeight!==q[j]));return Y(G)})}catch{return U("iframe_error")}}var aQ="mmMwWLliI0O&1",eQ="48px",$Z={default:"",apple:"-apple-system, BlinkMacSystemFont",serif:"serif",sans:"sans-serif",mono:"monospace",min:"",system:"system-ui"},QZ={min:"1px"};async function M$($){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=eQ;let X={};for(let[z,K]of Object.entries($Z)){let V=Q.createElement("span");if(V.style.position="absolute",V.style.top="0",V.style.left="0",V.style.whiteSpace="nowrap",K)V.style.fontFamily=K;let B=QZ[z];if(B)V.style.fontSize=B;V.textContent=aQ,J.appendChild(V),X[z]=V}Z.appendChild(J);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 S$($){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 XZ=44100,w$=5000,YZ=4500;async function y$(){let $=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!$)throw Error("no offline audio context");let Q=new $(1,w$,XZ),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=YZ;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 qZ($){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=qZ(Z),X=Q.createElement("canvas"),q=g$(X),z=Q.createElement("canvas"),K=x$(z);if(!q||!K)return U("blocked");let V=await _(q),B=await _(K),G=Q.createElement("canvas"),H=Q.createElement("canvas"),j=g$(G),D=x$(H);if(j&&D){let N=await _(j),R=await _(D);if(N!==V||R!==B)return{s:"unstable",v:{winding:J,geometry:V,text:B}}}return Y({winding:J,geometry:V,text:B})})}catch{return U("iframe_error")}}var I=4;function KZ($){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=KZ([...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 GZ($){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 V=$.getShaderPrecisionFormat(X,z);if(V)Q[`${q}.${K}`]=[V.rangeMin,V.rangeMax,V.precision]}return Q}var BZ=`
1
+ function k($,Q){return new Promise((Z)=>setTimeout(Z,$,Q))}function B$(){return k(0)}function b($){return parseInt($)}function U$($){return parseFloat($)}function G$($,Q){return typeof $==="number"&&isNaN($)?Q:$}function M($){return $.reduce((Q,Z)=>Q+(Z?1:0),0)}async function D$($,Q,Z=50){let J=document;while(!J.body)await k(Z);let X=J.createElement("iframe");try{await new Promise((q,z)=>{let K=!1,V=()=>{K=!0,q()},G=(O)=>{K=!0,z(O)};X.onload=V,X.onerror=G;let{style:B}=X;if(B.setProperty("display","block","important"),B.position="absolute",B.top="0",B.left="0",B.visibility="hidden",Q&&"srcdoc"in X)X.srcdoc=Q;else X.src="about:blank";J.body.appendChild(X);let D=()=>{if(K)return;if(X.contentWindow?.document?.readyState==="complete")V();else setTimeout(D,10)};D()});while(!X.contentWindow?.document?.body)await k(Z);return await $(X,X.contentWindow)}finally{X.parentNode?.removeChild(X)}}var xQ="mmMwWLliI0O&1",gQ="48px",T=["monospace","sans-serif","serif"],H$=["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 x(){return D$(async($,{document:Q})=>{let Z=Q.body;Z.style.fontSize=gQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(H)=>{let R=Q.createElement("span"),{style:N}=R;return N.position="absolute",N.top="0",N.left="0",N.fontFamily=H,R.textContent=xQ,J.appendChild(R),R},K=(H,R)=>{return z(`'${H}',${R}`)},V=()=>{return T.map(z)},G=()=>{let H={};for(let R of H$)H[R]=T.map((N)=>K(R,N));return H},B=(H)=>{return T.some((R,N)=>H[N].offsetWidth!==X[R]||H[N].offsetHeight!==q[R])},D=V(),O=G();Z.appendChild(J),await B$();for(let H=0;H<T.length;H++)X[T[H]]=D[H].offsetWidth,q[T[H]]=D[H].offsetHeight;return H$.filter((H)=>B(O[H]))})}async function g(){let $=navigator.userAgentData;if($)try{let{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:G,formFactor:B,wow64:D}=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:V,uaFullVersion:G,formFactor:B,wow64:D}}catch(Q){return{}}return{}}function C$($){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String($))}function L$(){let $=window,Q=navigator;return M(["webkitPersistentStorage"in Q,"webkitTemporaryStorage"in Q,Q.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in $,"BatteryManager"in $,"webkitMediaStream"in $,"webkitSpeechGrammar"in $])>=5}function v(){let $=window,Q=navigator;return M(["ApplePayError"in $,"CSSPrimitiveValue"in $,"Counter"in $,Q.vendor.indexOf("Apple")===0,"getStorageUpdates"in Q,"WebKitMediaKeys"in $])>=4}function j$(){let $=window,{HTMLElement:Q,Document:Z}=$;return M(["safari"in $,!("ongestureend"in $),!("TouchEvent"in $),!("orientation"in $),Q&&!("autocapitalize"in Q.prototype),Z&&"pointerLockElement"in Z.prototype])>=4}function O$(){let $=window;if(!C$($.print))return!1;return M([String($.browser)==="[object WebPageNamespace]","MicrodataExtractor"in $])>=1}function A$(){let $=window;return M([!("MediaSettingsRange"in $),"RTCEncodedAudioFrame"in $,""+$.Intl==="[object Intl]",""+$.Reflect==="[object Reflect]"])>=3}function R$(){let $=window,Q=navigator,{CSS:Z,HTMLButtonElement:J}=$;return M([!("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 N$(){if(navigator.platform==="iPad")return!0;let $=screen,Q=$.width/$.height;return M(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,Q>0.65&&Q<1.53])>=2}function f(){let $=navigator,Q=[],Z=$.language||$.userLanguage||$.browserLanguage||$.systemLanguage;if(Z!==void 0)Q.push([Z]);if(Array.isArray($.languages)){if(!(L$()&&A$()))Q.push($.languages)}else if(typeof $.languages==="string"){let J=$.languages;if(J)Q.push(J.split(","))}return Q}function h($){try{if($)return window.localStorage.getItem($);return!!window.localStorage}catch(Q){return!0}}function P$($){try{return window.localStorage.getItem($)}catch(Q){return null}}function F$($,Q){try{return window.localStorage.setItem($,Q),!0}catch(Z){return!1}}var C=Math,P=()=>0;function u(){let $=C.acos||P,Q=C.acosh||P,Z=C.asin||P,J=C.asinh||P,X=C.atanh||P,q=C.atan||P,z=C.sin||P,K=C.sinh||P,V=C.cos||P,G=C.cosh||P,B=C.tan||P,D=C.tanh||P,O=C.exp||P,H=C.expm1||P,R=C.log1p||P,N=(j)=>C.pow(C.PI,j),t=(j)=>C.log(j+C.sqrt(j*j-1)),a=(j)=>C.log(j+C.sqrt(j*j+1)),e=(j)=>C.log((1+j)/(1-j))/2,$$=(j)=>C.exp(j)-1/C.exp(j)/2,Q$=(j)=>(C.exp(j)+1/C.exp(j))/2,Z$=(j)=>C.exp(j)-1,J$=(j)=>(C.exp(2*j)-1)/(C.exp(2*j)+1),X$=(j)=>C.log(1+j);return{acos:$(0.12312423423423424),acosh:Q(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:t(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:Z(0.12312423423423424),asinh:J(1),asinhPf:a(1),atanh:X(0.5),atanhPf:e(0.5),atan:q(0.5),sin:z(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:K(1),sinhPf:$$(1),cos:V(10.000000000123),cosh:G(1),coshPf:Q$(1),tan:B(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:D(1),tanhPf:J$(1),exp:O(1),expm1:H(1),expm1Pf:Z$(1),log1p:R(10),log1pPf:X$(10),powPI:N(-100)}}function p(){let{platform:$}=navigator;if($==="MacIntel"){if(v()&&!j$())return N$()?"iPad":"iPhone"}return $}function m(){if(v()&&R$()&&O$())return;return vQ()}function vQ(){let $=screen,Q=(J)=>G$(b(J),null),Z=[Q($.width),Q($.height)];return Z.sort().reverse(),Z}function d(){let $=window.Intl?.DateTimeFormat;if($){let Z=new $().resolvedOptions().timeZone;if(Z)return Z}let Q=-fQ();return`UTC${Q>=0?"+":""}${Math.abs(Q)}`}function fQ(){let $=new Date().getFullYear();return Math.max(U$(new Date($,0,1).getTimezoneOffset()),U$(new Date($,6,1).getTimezoneOffset()))}function c(){let $=navigator,Q=0,Z;if($.maxTouchPoints!==void 0)Q=b($.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}}function Y$($){try{let Z=`; ${document.cookie}`.split(`; ${$}=`);if(Z.length===2)return Z.pop().split(";").shift()}catch(Q){return null}}function q$($,Q){try{document.cookie=`${$}=${Q}; path=/; max-age=31536000;`}catch(Z){}}async function l(){return{fonts:{value:await x()},languages:{value:f()},screenResolution:{value:m()},timezone:{value:d()},platform:{value:p()},touchSupport:{value:c()},math:{value:u()},localStorage:{value:h()},highEntropyValues:{value:await g()}}}class z${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"),J=Z.style;J.setProperty("display","block","important"),J.position="absolute",J.top="0",J.left="0",J.visibility="hidden",Z.src="about:blank",this.iframe=Z;let X=()=>{if(this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}let q=!1,z=()=>{if(q||this.destroyed)return;let{contentDocument:K,contentWindow:V}=Z;if(!K||!V||K.readyState!=="complete"||!K.body){this.readyTimer=setTimeout(z,10);return}if(q=!0,this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;K.body.offsetHeight,$({doc:K,win:V})};Z.onload=z,Z.onerror=()=>Q(Error("Measurement iframe failed to load")),document.body.appendChild(Z),z()};if(document.body)X();else{let q=()=>{document.removeEventListener("DOMContentLoaded",q),this.domReadyHandler=null,X()};this.domReadyHandler=q,document.addEventListener("DOMContentLoaded",q)}})}}function i(){return{iframe:new z$}}var U=($)=>({s:"ok",v:$}),Y=($)=>({s:$,v:null});var hQ=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];async function E$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return Y("unsupported");if(typeof window<"u"&&window.isSecureContext===!1)return Y("rejected");let Q=await Promise.all(hQ.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 Y("rejected");if(Q.some((X)=>!X.success&&X.errName==="NotAllowedError"))return Y("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 Y("unsupported");return U({supported:Z.length>0,robustness:Z,keySystem:J})}var pQ=[{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 mQ($){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 _$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return Y("unsupported");let Q=await Promise.all(pQ.map(async({key:J,id:X})=>[J,await mQ(X)])),Z=Object.fromEntries(Q);return U(Z)}var cQ=["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"];async function I$($){let Q=navigator?.userAgentData;if(!Q)return Y("unsupported");if(typeof Q.getHighEntropyValues!=="function")return Y("missing");try{let Z=await Q.getHighEntropyValues(cQ);return U({brands:Q.brands,mobile:Q.mobile,platform:Q.platform,...Z})}catch(Z){if(Z?.name==="NotAllowedError")return Y("denied");return Y("unexpected")}}var o=($)=>Math.round($/10)*10;async function M$($){if(typeof screen>"u")return Y("unsupported");let Q=screen;if(typeof Q.availWidth>"u"||typeof Q.availHeight>"u"||typeof Q.width>"u"||typeof Q.height>"u")return Y("missing");let Z=Q.availTop??0,J=Q.availLeft??0,X=o(Z),q=o(J),z=o(Math.max(0,Q.width-J-Q.availWidth)),K=o(Math.max(0,Q.height-Z-Q.availHeight)),V=[X,z,K,q];if(V.every((B)=>B===0))return{s:"blocked",v:V};return U(V)}async function T$($){if(typeof screen>"u")return Y("unsupported");return U([screen.width,screen.height])}async function S$($){if(typeof window>"u")return Y("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 Y("unexpected");return U(Q)}async function nQ($){let Q=new TextEncoder().encode($);return await crypto.subtle.digest("SHA-256",Q)}function sQ($,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 _($){return sQ(await nQ($),16)}var tQ=1e4;function K$(){try{return window.speechSynthesis.getVoices()??[]}catch{return[]}}function aQ(){return new Promise(($)=>{let Q=window.speechSynthesis,Z=K$();if(Z.length>0)return $(Z);let J=!1,X=()=>{if(J)return;let q=K$();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),$(K$())},tQ)})}async function w$($){if(typeof window>"u"||!window.speechSynthesis)return Y("unsupported");if(typeof window.speechSynthesis.getVoices!=="function")return Y("missing");let Q=await aQ();if(Q.length===0)return Y("unsupported");let Z=Q.map((X)=>`${X.voiceURI},${X.name},${X.lang},${X.localService?1:0},${X.default?1:0}`).sort().join("|"),J=await _(Z);return U({hash:J})}var S=["monospace","sans-serif","serif"],$Z="mmMwWLliI0O&1",QZ="48px",y$=["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 k$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return Y("iframe_error");Z.style.fontSize=QZ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(D)=>{let O=Q.createElement("span"),{style:H}=O;return H.position="absolute",H.top="0",H.left="0",H.fontFamily=D,O.textContent=$Z,J.appendChild(O),O},K=(D,O)=>z(`'${D}',${O}`),V=S.map(z),G={};for(let D of y$)G[D]=S.map((O)=>K(D,O));Z.appendChild(J);for(let D=0;D<S.length;D++)X[S[D]]=V[D].offsetWidth,q[S[D]]=V[D].offsetHeight;let B=y$.filter((D)=>S.some((O,H)=>G[D][H].offsetWidth!==X[O]||G[D][H].offsetHeight!==q[O]));return U(B)})}catch{return Y("iframe_error")}}var JZ="mmMwWLliI0O&1",XZ="48px",UZ={default:"",apple:"-apple-system, BlinkMacSystemFont",serif:"serif",sans:"sans-serif",mono:"monospace",min:"",system:"system-ui"},YZ={min:"1px"};async function b$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return Y("iframe_error");let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important"),J.style.fontSize=XZ;let X={};for(let[z,K]of Object.entries(UZ)){let V=Q.createElement("span");if(V.style.position="absolute",V.style.top="0",V.style.left="0",V.style.whiteSpace="nowrap",K)V.style.fontFamily=K;let G=YZ[z];if(G)V.style.fontSize=G;V.textContent=JZ,J.appendChild(V),X[z]=V}Z.appendChild(J);let q={};for(let z of Object.keys(X))q[z]=X[z].getBoundingClientRect().width;return U(q)})}catch{return Y("iframe_error")}}async function x$($){if(typeof FontFace>"u")return Y("unsupported");try{return await new FontFace("f","local('Arial')").load(),U({supported:!0})}catch{return U({supported:!1})}}var KZ=44100,g$=5000,VZ=4500;async function v$(){let $=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!$)throw Error("no offline audio context");let Q=new $(1,g$,KZ),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=VZ;K<g$;K++)z+=Math.abs(q[K]);return z}async function f$($){if(typeof window>"u")return Y("unsupported");if(!(window.OfflineAudioContext||window.webkitOfflineAudioContext))return Y("unsupported");try{let Z=await v$(),J;try{J=await v$()}catch{}if(J!==void 0&&Math.abs(Z-J)>0.001)return{s:"unstable",v:{sample:Z,sampleAlt:J}};return U({sample:Z,sampleAlt:J})}catch(Z){if(Z?.name==="NotSupportedError")return Y("unsupported");return Y("unexpected")}}var h$="Cwm fjordbank gly \uD83D\uDE03";function u$($){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(h$,2,15),Q.fillStyle="rgba(102, 204, 0, 0.2)",Q.font="18pt Arial",Q.fillText(h$,4,45),$.toDataURL()}function p$($){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 BZ($){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 m$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas"),J=BZ(Z),X=Q.createElement("canvas"),q=p$(X),z=Q.createElement("canvas"),K=u$(z);if(!q||!K)return Y("blocked");let V=await _(q),G=await _(K),B=Q.createElement("canvas"),D=Q.createElement("canvas"),O=p$(B),H=u$(D);if(O&&H){let R=await _(O),N=await _(H);if(R!==V||N!==G)return{s:"unstable",v:{winding:J,geometry:V,text:G}}}return U({winding:J,geometry:V,text:G})})}catch{return Y("iframe_error")}}var I=4;function DZ($){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 d$($){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 Y("unsupported");let X=[Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0],q=DZ([...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 U({seed:X,pixels:Array.from(K.data),dimension:I})}catch{return Y("unexpected")}})}catch{return Y("iframe_error")}}var CZ=["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 LZ($){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 V=$.getShaderPrecisionFormat(X,z);if(V)Q[`${q}.${K}`]=[V.rangeMin,V.rangeMax,V.precision]}return Q}var jZ=`
2
2
  attribute vec2 position;
3
3
  uniform float angle;
4
4
  varying vec2 v;
@@ -8,11 +8,11 @@ void main() {
8
8
  v = p;
9
9
  gl_Position = vec4(p, 0.0, 1.0);
10
10
  }
11
- `,HZ=`
11
+ `,OZ=`
12
12
  precision mediump float;
13
13
  varying vec2 v;
14
14
  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
- `;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="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};
17
+ `;function AZ($){try{let Q=$.createProgram(),Z=$.createShader($.VERTEX_SHADER),J=$.createShader($.FRAGMENT_SHADER);if(!Q||!Z||!J)return null;if($.shaderSource(Z,jZ),$.shaderSource(J,OZ),$.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 c$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(typeof Z.WebGLRenderingContext>"u")return Y("unsupported");let J=Q.createElement("canvas");J.width=64,J.height=64;let X=J.getContext("webgl")||J.getContext("experimental-webgl");if(!X)return Y("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 O of CZ){let H=X[O];if(typeof H==="number"){let R=X.getParameter(H);V[O]=R instanceof Float32Array||R instanceof Int32Array?Array.from(R):R}}let G=AZ(X),B=G?await _(Array.from(G).join(",")):null,D={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:LZ(X),parameters:V,shaderHash:B};return U(D)})}catch{return Y("iframe_error")}}var L=Math,F=()=>0;async function l$($){let Q=L.acos||F,Z=L.acosh||F,J=L.asin||F,X=L.asinh||F,q=L.atanh||F,z=L.atan||F,K=L.sin||F,V=L.sinh||F,G=L.cos||F,B=L.cosh||F,D=L.tan||F,O=L.tanh||F,H=L.exp||F,R=L.expm1||F,N=L.log1p||F,t=(A)=>L.pow(L.PI,A),a=(A)=>L.log(A+L.sqrt(A*A-1)),e=(A)=>L.log(A+L.sqrt(A*A+1)),$$=(A)=>L.log((1+A)/(1-A))/2,Q$=(A)=>(L.exp(A)-1/L.exp(A))/2,Z$=(A)=>(L.exp(A)+1/L.exp(A))/2,J$=(A)=>L.exp(A)-1,X$=(A)=>(L.exp(2*A)-1)/(L.exp(2*A)+1),j=(A)=>L.log(1+A);return U({acos:Q(0.12312423423423424),acosh:Z(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:a(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:J(0.12312423423423424),asinh:X(1),asinhPf:e(1),atanh:q(0.5),atanhPf:$$(0.5),atan:z(0.5),sin:K(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:V(1),sinhPf:Q$(1),cos:G(10.000000000123),cosh:B(1),coshPf:Z$(1),tan:D(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:O(1),tanhPf:X$(1),exp:H(1),expm1:R(1),expm1Pf:J$(1),log1p:N(10),log1pPf:j(10),powPI:t(-100)})}async function i$($){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 U({samples:[Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]]})}async function o$($){if(typeof navigator>"u"||!navigator.permissions)return Y("unsupported");if(typeof window<"u"&&window.location.protocol!=="https:")return Y("rejected");try{let Q=await navigator.permissions.query({name:"geolocation"});return U({state:Q.state})}catch{return Y("missing")}}var EZ=["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 r$($){if(typeof navigator>"u"||!navigator.permissions)return Y("unsupported");let Q={};return await Promise.all(EZ.map(async(Z)=>{try{let J=await navigator.permissions.query({name:Z});Q[Z]=J.state}catch{Q[Z]="unsupported"}})),U(Q)}async function n$($){if(typeof window>"u"||typeof window.Notification>"u"||typeof navigator>"u"||!navigator.permissions)return Y("unsupported");try{let Q=window.Notification.permission,J=(await navigator.permissions.query({name:"notifications"})).state;return U({notificationPermission:Q,queryState:J,mismatch:Q==="denied"&&J==="prompt"})}catch{return Y("unexpected")}}var MZ=["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 s$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return Y("iframe_error");let J=Q.createElement("div");Q.body.appendChild(J);try{let X={};for(let z of MZ)J.style.color=z,X[z]=Z.getComputedStyle(J).color;if(new Set(Object.values(X)).size<=1)return Y("unsupported");return U(X)}finally{J.remove?.()}})}catch{return Y("iframe_error")}}var SZ=(()=>{let $="";for(let Q=128512;Q<=128591;Q++)$+=String.fromCodePoint(Q);return $})();async function t$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return Y("iframe_error");let J=Q.createElement("span");J.textContent=SZ,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 U({width:X.width,height:X.height,font:q})}finally{J.remove?.()}})}catch{return Y("iframe_error")}}async function a$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return Y("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 Y("unsupported");let K=Z.getComputedStyle(X).fontFamily;return U({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 Y("iframe_error")}}async function e$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{if(!Q.body)return Y("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 U({width:X,present:q})}finally{Z.remove?.()}})}catch{return Y("iframe_error")}}async function $Q($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return Y("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 U({halfPixelBorder:q,halfPixelCalc:z})}finally{J.remove?.(),X.remove?.()}})}catch{return Y("iframe_error")}}async function QQ($){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?.(),U({fontFamily:X})})}catch{return Y("iframe_error")}}var gZ=50000,vZ=450;function fZ(){let $=1/0,Q=1/0,Z=performance.now();for(let J=0;J<gZ;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 hZ(){let $=performance.now(),Q=0;while(performance.now()-$<vZ)performance.now(),Q++;return Q}async function ZQ($){if(typeof performance>"u"||typeof performance.now!=="function")return Y("unsupported");let Q=fZ(),Z=hZ();return U({deltas:Q,iterationsIn450ms:Z})}var JQ=[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 XQ($){if(typeof WebAssembly>"u")return Y("unsupported");let Q=0,Z=!0;for(let J=0;J<JQ.length;J++)try{if(WebAssembly.validate(JQ[J]))Q|=1<<J,Z=!1;else Z=!1}catch{}if(Z)return Y("blocked");return U({bitmap:Q})}async function UQ($){if(typeof SharedArrayBuffer>"u")return Y("unsupported");return U({maxBytes:4294967296,crossOriginIsolated:typeof window<"u"&&window.crossOriginIsolated===!0})}async function YQ($){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 Y("unsupported");return U({iana:Q,offsetMinutes:J})}async function qQ($){if(typeof Intl>"u"||!Intl.DateTimeFormat)return Y("unsupported");try{let Q=new Intl.DateTimeFormat().resolvedOptions().locale;return U({locale:Q})}catch{return Y("unexpected")}}async function zQ($){if(typeof navigator>"u")return Y("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),U({language:Q,languages:Z})}function r($){try{return typeof window[$]<"u"&&window[$]!==null}catch(Q){return Q instanceof DOMException&&Q.name==="SecurityError"}}async function KQ($){if(typeof window>"u")return U({sessionStorage:!1,localStorage:!1,indexedDB:!1,openDatabase:!1});return U({sessionStorage:r("sessionStorage"),localStorage:r("localStorage"),indexedDB:r("indexedDB"),openDatabase:r("openDatabase")})}async function VQ($){if(typeof navigator<"u"&&navigator.storage?.estimate)try{let Q=await navigator.storage.estimate();if(typeof Q.quota==="number")return U({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 U({quota:Q,path:"webkitTemporaryStorage"})}catch{}return Y("unsupported")}var E=($)=>{if(typeof window>"u"||!window.matchMedia)return null;let Q=window.matchMedia($);return Q.media==="not all"?null:Q.matches};async function WQ($){if(typeof window>"u")return Y("unsupported");let Q=typeof screen<"u"&&screen.colorDepth?screen.colorDepth:null,Z=null;if(E("(color-gamut: rec2020)"))Z="rec2020";else if(E("(color-gamut: p3)"))Z="p3";else if(E("(color-gamut: srgb)"))Z="srgb";let J=null;if(E("(prefers-contrast: forced)"))J="forced";else if(E("(prefers-contrast: more)"))J="more";else if(E("(prefers-contrast: less)"))J="less";else if(E("(prefers-contrast: no-preference)"))J="no-preference";let X=null;if(E("(monochrome)")!==null){let q=0,z=100;while(q<=z){let K=q+z>>1;if(E(`(min-monochrome: ${K})`))q=K+1;else z=K-1}X=z}return U({colorDepth:Q,colorGamut:Z,hdr:E("(dynamic-range: high)"),contrast:J,invertedColors:E("(inverted-colors: inverted)"),reducedTransparency:E("(prefers-reduced-transparency: reduce)"),reducedMotion:E("(prefers-reduced-motion: reduce)"),monochrome:X,colorScheme:E("(prefers-color-scheme: dark)")===!0?"dark":E("(prefers-color-scheme: light)")===!0?"light":null})}async function BQ($){return U({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 sZ=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];function tZ(){if(typeof window>"u"||typeof navigator>"u")return!1;return/WebKit/i.test(navigator.userAgent??"")&&!/Chrome|Edg|OPR/i.test(navigator.userAgent??"")}async function GQ($){let Q=typeof navigator<"u"?navigator.platform||"":"";if(Q==="MacIntel"&&tZ()){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 sZ)if(typeof window[X]<"u")J.push(X)}return U({platform:Q,vendor:Z,vendorFlavors:J})}async function DQ($){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 U({maxTouchPoints:Q,touchEvent:Z,touchStart:J})}function w($){return $!==null&&(typeof $==="object"||typeof $==="function")}async function HQ($){if(typeof navigator>"u"||!navigator.plugins)return Y("unsupported");let Q=navigator.plugins,Z=[];for(let z=0;z<Q.length;z++){let K=Q[z],V=[];for(let G=0;G<K.length;G++){let B=K[G];V.push({type:B.type,suffixes:B.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 U({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 CQ(){return(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)).slice(0,16)}function QJ($,Q,Z){let J=`${Q}=${Z}`;for(let X of $.split(";"))if(X.trim()===J)return!0;return!1}async function LQ($){if(typeof document>"u")return U({enabled:!1});let Q=`rupt_probe_${CQ()}`,Z=CQ();try{document.cookie=`${Q}=${Z}; Path=/; SameSite=Strict`;let J=QJ(document.cookie,Q,Z);if(J)document.cookie=`${Q}=; Path=/; SameSite=Strict; Max-Age=0`;return U({enabled:J})}catch{return U({enabled:!1})}}async function jQ($){return U({userAgent:typeof navigator<"u"?navigator.userAgent||"":"",appVersion:typeof navigator<"u"?navigator.appVersion||"":""})}async function OQ($){let Q=typeof navigator<"u"?navigator.connection:void 0;if(!Q)return Y("unsupported");return U({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 AQ($){if(typeof Float32Array>"u"||typeof Uint8Array>"u")return Y("unsupported");let Q=new Float32Array(1);Q[0]=NaN;let Z=new Uint8Array(Q.buffer);return U({byte:Z[3]})}async function RQ($){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 U(Q)}async function NQ($){if(typeof window>"u")return U({present:!1});let Q=window.process;if(typeof Q>"u")return U({present:!1});try{return U({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 U({present:!0})}}async function PQ($){if(typeof Event>"u")return Y("unsupported");try{return U({isTrusted:new Event("x").isTrusted})}catch{return Y("unexpected")}}var KJ=["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__"],VJ=["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped","__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","$cdc_asdjflasutopfhvcZLmcf","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"],WJ=/^([a-z]){3}_.*_(Array|Promise|Symbol)$/;async function FQ($){let Q=[],Z=[],J=[];if(typeof window<"u"){for(let X of KJ)try{if(typeof window[X]<"u")Q.push(X)}catch{}try{for(let X of Object.getOwnPropertyNames(window))if(WJ.test(X))J.push(X)}catch{}}if(typeof document<"u")for(let X of VJ)try{if(typeof document[X]<"u")Z.push(X)}catch{}return U({windowHits:Q,documentHits:Z,headlessRegexMatches:J})}async function EQ($){if(typeof navigator>"u")return U({webdriver:"undefined"});let Q=navigator.webdriver;if(Q===null)return U({webdriver:"null"});if(typeof Q>"u")return U({webdriver:"undefined"});return U({webdriver:!!Q})}async function _Q($){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 U({stackGetter:Q,objectToInspect:Z})}var HJ=["onLine","webdriver","getGamepads"],CJ=[["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"]],LJ=["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 IQ($){let Q=[],Z=[],J={},X=[],q=[];try{if(typeof navigator<"u"){Q=Object.getOwnPropertyNames(Object.getPrototypeOf(navigator));for(let z of HJ){let K=Q.indexOf(z);if(K>=0)Z.push({name:z,index:K})}}}catch{}for(let[z,K,V]of CJ)try{let G=K();if(!G)continue;let B=Object.getOwnPropertyDescriptor(G,V);if(B?.get)J[z]=B.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(!LJ.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 U({navPrototypeNames:Q,navPrototypeFingerprint:{length:Q.length,positions:Z},getterSources:J,globalsPresent:{Function:typeof Function<"u",Object:typeof Object<"u"},suspiciousGlobals:X,documentElementAttributes:q})}function OJ($){if(!$)return"";try{return new URL($).origin}catch{return""}}async function MQ($){let Q=[],Z=!1,J=!1;if(typeof window>"u")return U({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:OJ(X.document.referrer)})}catch{Z=!0;break}if(X.parent===X){J=!0;break}X=X.parent,q++}return U({frames:Q,crossOriginBoundary:Z,topReached:J})}async function TQ($){if(typeof URL>"u")return Y("unsupported");try{return U({protocol:new URL("C:/").protocol})}catch{return Y("unexpected")}}async function SQ($){if(typeof window>"u")return Y("unsupported");try{if(typeof window.external>"u")return Y("unsupported");return U({value:String(window.external)})}catch{return Y("unexpected")}}async function wQ($){if(typeof globalThis.DeviceOrientationEvent>"u")return Y("unsupported");return U({hasPermissionAPI:typeof globalThis.DeviceOrientationEvent.requestPermission==="function"})}async function yQ($){let Q=typeof navigator<"u"?navigator.mediaDevices:void 0;return U({present:!!Q,getUserMediaPresent:typeof Q?.getUserMedia==="function",enumerateDevicesPresent:typeof Q?.enumerateDevices==="function"})}var EJ=/https?:\/\/([^\/\s)]+)/;async function kQ($){let Q;try{throw Error("probe")}catch(K){Q=typeof K?.stack==="string"?K.stack:void 0}if(!Q)return Y("unsupported");let Z=Q.split(`
18
+ `).filter((K)=>K.trim().length>0),J=null;for(let K of Z){let V=K.match(EJ);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 U({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 IJ($)}finally{$.iframe.destroy()}}async function IJ($){let Q=await Promise.all([W("widevine",E$($)),W("drm_full",_$($)),W("uach",I$($)),W("ua_string",jQ($)),W("platform_vendor",GQ($)),W("navigator_webdriver",EQ($)),W("screen_frame",M$($)),W("screen_resolution",T$($)),W("window_dimensions",S$($)),W("display_preferences",WQ($)),W("hardware",BQ($)),W("speech_voices",w$($)),W("fonts",k$($)),W("font_preferences",b$($)),W("fontface_load",x$($)),W("emoji",t$($)),W("mathml",a$($)),W("scrollbar",e$($)),W("half_pixel",$Q($)),W("radio_default_font",QQ($)),W("css_system_colors",s$($)),W("audio",f$($)),W("canvas",m$($)),W("seeded_canvas",d$($)),W("webgl",c$($)),W("math_ops",l$($)),W("math_random",i$($)),W("architecture_nan",AQ($)),W("engine_probes",RQ($)),W("timer_resolution",ZQ($)),W("wasm_simd",XQ($)),W("shared_array_buffer",UQ($)),W("url_parser",TQ($)),W("timezone",YQ($)),W("locale",qQ($)),W("languages",zQ($)),W("geolocation_permission",o$($)),W("permissions_map",r$($)),W("notifications_spoof",n$($)),W("storage_apis",KQ($)),W("storage_quota",VQ($)),W("cookie_enabled",LQ($)),W("touch",DQ($)),W("plugins",HQ($)),W("device_orientation_permission",wQ($)),W("media_devices",yQ($)),W("connection",OQ($)),W("bot_globals",FQ($)),W("event_istrusted",PQ($)),W("window_process",NQ($)),W("window_external",SQ($)),W("devtools_open",_Q($)),W("prototype_integrity",IQ($)),W("frame_ancestry",MQ($)),W("error_stack",kQ($))]);return Object.fromEntries(Q)}class V${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=(G)=>{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(G)},z=(G)=>{if(G.origin!==this.apiOrigin)return;if(G.source!==Z.contentWindow)return;let B=G.data;if(!B||typeof B!=="object")return;if(B.type==="ready"){X();return}if(B.type==="warm_done"||B.type==="rpc_done"){let D=this.pending.get(B.id);if(!D)return;if(this.pending.delete(B.id),B.error)D.reject(Error(B.error));else D.resolve(B);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 W${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 MJ="https://api.rupt.dev",y="3.1.0",TJ="driftwood.sandpiper",s="rpt_last_challenge",SJ=new Set(["access","login","signup","warm","fingerprint"]);function wJ($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class bQ{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:",TJ);if(!$?.clientId)throw Error("Rupt: `clientId` is required");if(this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?wJ($.domain):MJ,this.transport=new V$({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}persistChallengeFromRedirect($){if(!$)return;try{let Q=new URL($).searchParams.get("challenge");if(Q)this.persistLastChallenge(Q)}catch{}}persistLastChallenge($){if(F$(s,$))return;q$(s,$)}readLastChallenge(){return P$(s)||Y$(s)||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,last_challenge:this.readLastChallenge()},X=(await this.transport.post("/v3/evaluate/access",Z,{authorization:`Basic ${this.clientId}:`})).data;if(this.debug)console.log("[Rupt]","Successfully evaluated access.");if(this.persistChallengeFromRedirect(X?.redirect),$.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,last_challenge:this.readLastChallenge()},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(this.persistChallengeFromRedirect(K?.redirect),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(SJ.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,last_challenge:this.readLastChallenge()},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 W$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:y,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var X9=bQ;export{X9 as default,bQ as Rupt,MJ as BASE_URL};