PageSourceSearch

https://triplebits.com/static/js/cap-widget.js

js triplebits.com collected 2026-10-01 16:22:53 UTC 31,848 bytes, 3 lines download raw bytes

1var ae=Object.create;var V=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var le=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var X=h=>{throw TypeError(h)};var de=(h,p,b)=>p in h?V(h,p,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[p]=b;var pe=(h,p)=>()=>(p||h((p={exports:{}}).exports,p),p.exports);var ue=(h,p,b,D)=>{if(p&&typeof p=="object"||typeof p=="function")for(let C of le(p))!he.call(h,C)&&C!==b&&V(h,C,{get:()=>p[C],enumerable:!(D=oe(p,C))||D.enumerable});return h};var ge=(h,p,b)=>(b=h!=null?ae(ce(h)):{},ue(p||!h||!h.__esModule?V(b,"default",{value:h,enumerable:!0}):b,h));var Z=(h,p,b)=>de(h,typeof p!="symbol"?p+"":p,b),J=(h,p,b)=>p.has(h)||X("Cannot "+b);var e=(h,p,b)=>(J(h,p,"read from private field"),b?b.call(h):p.get(h)),_=(h,p,b)=>p.has(h)?X("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(h):p.set(h,b),f=(h,p,b,D)=>(J(h,p,"write to private field"),D?D.call(h,b):p.set(h,b),b),x=(h,p,b)=>(J(h,p,"access private method"),b);var re=pe((q,Q)=>{(()=>{var v,L,S,d,W,M,I,i,P,y,F,m,Y,U,j,K,ee,te,G,se,ie;let h="vibrate"in navigator&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(typeof window=="undefined")return;let p=(T,l={})=>window!=null&&window.CAP_CUSTOM_FETCH?window.CAP_CUSTOM_FETCH(T,l):fetch(T,l);function b(T,l){let t=(function(n){let a=2166136261;for(let o=0;o<n.length;o++)a^=n.charCodeAt(o),a+=(a<<1)+(a<<4)+(a<<7)+(a<<8)+(a<<24);return a>>>0})(T),s="";function r(){return t^=t<<13,t^=t>>>17,t^=t<<5,t>>>0}for(;s.length<l;)s+=r().toString(16).padStart(8,"0");return s.substring(0,l)}async function D(T){var l=(s=>{let r=atob(s),n=new Uint8Array(r.length);for(let a=0;a<r.length;a++)n[a]=r.charCodeAt(a);return n})(T);let t=await new Promise((s,r)=>{try{var n=new DecompressionStream("deflate-raw"),a=n.writable.getWriter(),o=n.readable.getReader(),u=[];o.read().then(function c(w){if(w.done){for(var A=0,k=0,g=0;g<u.length;g++)A+=u[g].length;var E=new Uint8Array(A);for(g=0;g<u.length;g++)E.set(u[g],k),k+=u[g].length;s(new TextDecoder().decode(E))}else u.push(w.value),o.read().then(c).catch(r)}).catch(r),a.write(l).then(()=>{a.close()}).catch(r)}catch(c){r(c)}});return new Promise(s=>{var r=setTimeout(()=>{o(),s({__timeout:!0})},2e4),n=document.createElement("iframe");n.setAttribute("sandbox","allow-scripts"),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;width:1px;height:1px;top:-9999px;left:-9999px;border:none;opacity:0;pointer-events:none;";var a=!1;function o(){a||(a=!0,clearTimeout(r),window.removeEventListener("message",u),n.parentNode&&n.parentNode.removeChild(n))}function u(c){var w=c.data;
1w&&typeof w=="object"&&(w.type==="cap:instr"?(o(),w.blocked?s({__blocked:!0,blockReason:w.blockReason||"automated_browser"}):w.result?s(w.result):s({__timeout:!0})):w.type==="cap:error"&&(o(),s({__timeout:!0})))}window.addEventListener("message",u),n.srcdoc='<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><script>'+t+`
2<\/script></body></html>`,document.body.appendChild(n)})}let C=null,z=()=>{if(C)return C;let T=window.CAP_CUSTOM_WASM_URL||"https://cdn.jsdelivr.net/npm/@cap.js/[email protected]/browser/cap_wasm_bg.wasm";return C=fetch(T).then(l=>{if(!l.ok)throw new Error(`Failed to fetch wasm: ${l.status}`);return l.arrayBuffer()}).then(l=>WebAssembly.compile(l)).catch(l=>{throw C=null,l}),C};typeof WebAssembly=="object"&&typeof WebAssembly.compile=="function"&&z().catch(()=>{});let N=null;function O(){return N||(N=URL.createObjectURL(new Blob(['(()=>{const e=async({salt:e,target:t})=>{let n=0;const r=new TextEncoder,o=4*t.length,s=Math.floor(o/8),l=o%8,a=t.length%2==0?t:t+"0",c=a.length/2,i=new Uint8Array(c);for(let e=0;e<c;e++)i[e]=parseInt(a.substring(2*e,2*e+2),16);const f=l>0?255<<8-l&255:0;for(;;)try{for(let t=0;t<5e4;t++){const t=e+n,o=r.encode(t),a=await crypto.subtle.digest("SHA-256",o),c=new Uint8Array(a);let g=!0;for(let e=0;e<s;e++)if(c[e]!==i[e]){g=!1;break}if(g&&l>0&&(c[s]&f)!==(i[s]&f)&&(g=!1),g)return void self.postMessage({nonce:n,found:!0});n++}}catch(e){return console.error("[cap worker]",e),void self.postMessage({found:!1,error:e.message})}};if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly?.instantiate)return console.warn("[cap worker] wasm not supported, falling back to alternative solver. this will be significantly slower."),void(self.onmessage=async({data:{salt:t,target:n}})=>e({salt:t,target:n}));let t=null;self.onmessage=async({data:{salt:n,target:r,wasmModule:o}})=>{if(o instanceof WebAssembly.Module&&null===t){const s=(e=>{try{let n,r=0,o=null;const s=()=>(null!==o&&0!==o.byteLength||(o=new Uint8Array(n.memory.buffer)),o),l=new TextEncoder,a=(e,t,n)=>{if(void 0===n){const n=l.encode(e),o=t(n.length,1)>>>0;return s().subarray(o,o+n.length).set(n),r=n.length,o}let o=e.length,a=t(o,1)>>>0;const c=s();let i=0;for(;i<o;i++){const t=e.charCodeAt(i);if(t>127)break;c[a+i]=t}if(i!==o){0!==i&&(e=e.slice(i)),a=n(a,o,o=i+3*e.length,1)>>>0;const t=s().subarray(a+i,a+o),{written:r}=l.encodeInto(e,t);i+=r,a=n(a,o,i,1)>>>0}return r=i,a},c={wbg:{}};c.wbg.__wbindgen_init_externref_table=()=>{const e=n.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};const i=new WebAssembly.Instance(e,c);return n=i.exports,n.__wbindgen_start&&n.__wbindgen_start(),t=(e,t)=>{const o=a(e,n.__wbindgen_malloc,n.__wbindgen_realloc),s=r,l=a(t,n.__wbindgen_malloc,n.__wbindgen_realloc),c=r;return BigInt.asUintN(64,n.solve_pow(o,s,l,c))},!0}catch(e){return console.error("[cap worker] failed to init wasm from module:",e),!1}})(o);if(!s)return console.warn("[cap worker] wasm init failed, falling back to JS s
2olver."),e({salt:n,target:r})}if(null===t)return console.warn("[cap worker] no wasm module provided, falling back to JS solver."),e({salt:n,target:r});try{const e=performance.now(),o=t(n,r),s=performance.now();self.postMessage({nonce:Number(o),found:!0,durationMs:(s-e).toFixed(2)})}catch(e){console.error("[cap worker]",e),self.postMessage({found:!1,error:e.message||String(e)})}},self.onerror=e=>{self.postMessage({found:!1,error:e})}})();'],{type:"application/javascript"})),N)}class R{constructor(l){this._size=l,this._workers=[],this._idle=[],this._queue=[],this._wasmModule=null,this._spawnFailures=0}setWasm(l){this._wasmModule=l}_spawn(){let l=O(),t=new Worker(l);return t._busy=!1,this._workers.push(t),this._idle.push(t),t}_replaceWorker(l){let t=this._workers.indexOf(l);t!==-1&&this._workers.splice(t,1);let s=this._idle.indexOf(l);s!==-1&&this._idle.splice(s,1);try{l.terminate()}catch{}return this._spawnFailures++,this._spawnFailures>3?(console.error("[cap] worker spawn failed repeatedly, not retrying"),null):this._spawn()}_ensureSize(l){for(;this._workers.length<l;)this._spawn()}run(l,t){return new Promise((s,r)=>{this._queue.push({salt:l,target:t,resolve:s,reject:r}),this._dispatch()})}_dispatch(){for(;this._idle.length>0&&this._queue.length>0;){let l=this._idle.shift(),{salt:t,target:s,resolve:r,reject:n}=this._queue.shift(),a=!1,o=({data:c})=>{a||(a=!0,l.removeEventListener("message",o),l.removeEventListener("error",u),this._spawnFailures=0,this._idle.push(l),c.found?r(c.nonce):n(new Error(c.error||"worker failed")),this._dispatch())},u=c=>{if(a)return;a=!0,l.removeEventListener("message",o),l.removeEventListener("error",u);let w=this._replaceWorker(l);n(c),w&&this._dispatch()};l.addEventListener("message",o),l.addEventListener("error",u),this._wasmModule?l.postMessage({salt:t,target:s,wasmModule:this._wasmModule},[]):l.postMessage({salt:t,target:s})}}terminate(){for(let l of this._workers)try{l.terminate()}catch{}this._workers=[],this._idle=[],this._queue=[]}}class ne extends HTMLElement{constructor(){super();_(this,m);_(this,v,null);_(this,L,navigator.hardwareConcurrency||8);Z(this,"token",null);_(this,S);_(this,d);_(this,W);_(this,M,!1);_(this,I);_(this,i,null);_(this,P,null);_(this,y,null);_(this,F,null);e(this,I)&&e(this,I).forEach((t,s)=>{this.removeEventListener(s.slice(2),t)}),f(this,I,new Map),this.boundHandleProgress=this.handleProgress.bind(this),this.boundHandleSolve=this.handleSolve.bind(this),this.boundHandleError=this.handleError.bind(this),this.boundHandleReset=this.handleReset.bind(this)}getI18nText(t,s){return this.getAttribute(`data-cap-i18n-${t}`)||s}static get observedAttributes(){return["onsolve","onprogress","onreset","onerror","data-cap-worker-count","data-cap-i18n-initial-state"]}initialize(){O(),e(this,i)||f(this,i,x(this,m,Y).call(this)),e(this,y)||(f(this,y,new R(1)),e(this,y)._spawn())}attributeChangedCallback(t,s,r){var n;if(t.startsWith("on")){let a=t.slice(2),o=e(this,I).get(t);if(o&&this.removeEventListener(a,o),r){let u=c=>{let w=this.getAttribute(t);typeof window[w]=="function"&&window[w].call(this,c)};e(this,I).set(t,u),this.addEventListener(a,u)}}t==="data-cap-worker-count"&&this.setWorkersCount(parseInt(r,10)),t==="data-cap-i18n-initial-state"&&e(this,d)&&((n=e(this,d))!=null&&n.querySelector(".label.active"))&&this.animateLabel(this.getI18nText("initial-state","Verify you're human"))}async connectedCallback(){f(this,W,this),f(this,S,this.attachShadow({mode:"open"})),f(this,d,document.createElement("div")),this.createUI(),this.addEventListeners(),this.initialize(),e(this,d).removeAttribute("disabled");let t=this.getAttribute("data-cap-worker-count"),s=t?parseInt(t,10):null;this.setWorkersCount(s||navigator.hardwareConcurrency||8);let r=this.getAttribute("data-cap-hidden-field-name")||"cap-token";e(this,W).innerHTML=`<input type="hidden" name="${r}">`,x(this,m,K).call(this)}async solve(){if(!e(this,M))try{f(this,M,!0),this.updateUI("verifying",this.getI18nText("verifying-label","Verifying..."),!0),e(this,d).setAttribute("aria-label",this.getI18nText("verifying-aria-label","Verifying you're a human, please wait")),this.dispatchEvent("progress",{progress:0});
2try{let t,s,r=this.getAttribute("data-cap-api-endpoint");if(!r&&(window!=null&&window.CAP_CUSTOM_FETCH))r="/";else if(!r)throw new Error("Missing API endpoint. Either custom fetch or an API endpoint must be provided.");if(r.endsWith("/")||(r+="/"),e(this,i).state==="done"&&e(this,i).token&&e(this,i).tokenExpires&&Date.now()<e(this,i).tokenExpires){this.dispatchEvent("progress",{progress:100});let k=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${k}']`)&&(this.querySelector(`input[name='${k}']`).value=e(this,i).token),this.dispatchEvent("solve",{token:e(this,i).token}),this.token=e(this,i).token;let g=e(this,i).tokenExpires-Date.now();return e(this,v)&&clearTimeout(e(this,v)),f(this,v,setTimeout(()=>this.reset(),g)),e(this,d).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may now continue")),h&&navigator.vibrate([10,50,20,30,40]),x(this,m,U).call(this),f(this,M,!1),{success:!0,token:this.token}}if(e(this,i).state==="done")t=e(this,i).results,s=e(this,i).challengeResp,this.dispatchEvent("progress",{progress:100});else if(e(this,i).state==="solving"||e(this,i).state==="redeeming"||e(this,i).state==="fetching"||e(this,i).state==="waiting"){e(this,i).state==="waiting"&&(e(this,P)&&(clearTimeout(e(this,P)),f(this,P,null)),e(this,i).state="waiting",x(this,m,G).call(this)),e(this,i).pendingPromotion=e(this,L),e(this,i).promoteFn&&e(this,i).promoteFn(e(this,L));let k=setInterval(()=>{if(e(this,i).state!=="solving"&&e(this,i).state!=="redeeming")return void clearInterval(k);let g=e(this,i).challenges?e(this,i).challenges.length:1,E=e(this,i).completedCount,$=e(this,i).state==="redeeming"?99:Math.min(98,Math.round(E/g*100));this.dispatchEvent("progress",{progress:$})},150);if(await new Promise(g=>e(this,i).onSettled(g)),clearInterval(k),e(this,i).state!=="done")throw new Error("Speculative solve failed \u2013 please try again");if(e(this,i).token&&e(this,i).tokenExpires&&Date.now()<e(this,i).tokenExpires){this.dispatchEvent("progress",{progress:100});let g=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${g}']`)&&(this.querySelector(`input[name='${g}']`).value=e(this,i).token),this.dispatchEvent("solve",{token:e(this,i).token}),this.token=e(this,i).token;let E=e(this,i).tokenExpires-Date.now();return e(this,v)&&clearTimeout(e(this,v)),f(this,v,setTimeout(()=>this.reset(),E)),e(this,d).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may now continue")),h&&navigator.vibrate([10,50,20,30,40]),x(this,m,U).call(this),f(this,M,!1),{success:!0,token:this.token}}t=e(this,i).results,s=e(this,i).challengeResp,this.dispatchEvent("progress",{progress:100})}else{let k=await p(`${r}challenge`,{method:"POST"});try{s=await k.json()}catch{throw new Error("Failed to parse challenge response from server")}if(s.error)throw new Error(s.error);let{challenge:g,token:E}=s,$=g;if(!Array.isArray($)){let B=0;$=Array.from({length:g.c},()=>(B++,[b(`${E}${B}`,g.s),b(`${E}${B}d`,g.d)]))}t=await this.solveChallenges($)}let n=s.instrumentation?D(s.instrumentation):Promise.resolve(null),a=await n;if(a!=null&&a.__timeout||a!=null&&a.__blocked){this.updateUIBlocked(this.getI18nText("error-label","Error"),a==null?void 0:a.__blocked),e(this,d).setAttribute("aria-label",this.getI18nText("error-aria-label","An error occurred, please try again")),this.removeEventListener("error",this.boundHandleError);let k=new CustomEvent("error",{bubbles:!0,composed:!0,detail:{isCap:!0,message:"Instrumentation failed"}});return super.dispatchEvent(k),this.addEventListener("error",this.boundHandleError),this.executeAttributeCode("onerror",k),console.error("[cap]","Instrumentation failed"),void f(this,M,!1)}let{token:o}=s,u=await p(`${r}redeem`,{method:"POST",body:JSON.stringify({token:o,solutions:t,...a&&{instr:a}}),headers:{"Content-Type":"application/json"}}),c;try{c=await u.json()}catch{throw new Error("Failed to parse server response")}if(this.dispatchEvent("progress",{progress:100}),!c.success)throw new Error(c.error||"Invalid solution");let w=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${w}']`)&&(this.querySelector(`input[name='${w}']`).value=c.token),this.dispatchEvent("solve",{token:c.token}),this.token=c.token,x(this,m,U).call(this),e(this,v)&&clearTimeout(e(this,v));let A=new Date(c.expires).getTime()-Date.now();return A>0&&A<864e5?f(this,v,setTimeout(()=>this.reset(),A)):this.error("Invalid expiration time"),e(this,d).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may 
2now continue")),h&&navigator.vibrate([10,50,20,30,40]),{success:!0,token:this.token}}catch(t){throw e(this,d).setAttribute("aria-label",this.getI18nText("error-aria-label","An error occurred, please try again")),this.error(t.message),t}}finally{f(this,M,!1)}}async solveChallenges(t){let s=t.length,r=0,n=null,a=typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function";if(a)try{n=await z()}catch(c){console.warn("[cap] wasm unavailable, falling back to JS solver:",c)}if(!a&&!e(this,S).querySelector(".warning")){let c=document.createElement("div");c.className="warning",c.style.cssText="width:var(--cap-widget-width,230px);background:rgb(237,56,46);color:white;padding:4px 6px;padding-bottom:calc(var(--cap-border-radius,14px) + 5px);font-size:10px;box-sizing:border-box;font-family:system-ui;border-top-left-radius:8px;border-top-right-radius:8px;text-align:center;user-select:none;margin-bottom:-35.5px;opacity:0;transition:margin-bottom .3s,opacity .3s;",c.innerText=this.getI18nText("wasm-disabled","Enable WASM for significantly faster solving"),e(this,S).insertBefore(c,e(this,S).firstChild),setTimeout(()=>{c.style.marginBottom="calc(-1 * var(--cap-border-radius, 14px))",c.style.opacity=1},10)}let o=new R(e(this,L));o.setWasm(n),o._ensureSize(e(this,L));let u=[];try{for(let c=0;c<t.length;c+=e(this,L)){let w=t.slice(c,Math.min(c+e(this,L),t.length)),A=await Promise.all(w.map(([k,g])=>o.run(k,g).then(E=>{r++;let $=Math.min(99,Math.round((0+r)/s*100));return this.dispatchEvent("progress",{progress:$}),E})));u.push(...A)}}finally{o.terminate()}return u}setWorkersCount(t){let s=parseInt(t,10),r=Math.min(navigator.hardwareConcurrency||8,16);f(this,L,!Number.isNaN(s)&&s>0&&s<=r?s:navigator.hardwareConcurrency||8)}createUI(){e(this,d).classList.add("captcha"),e(this,d).setAttribute("role","button"),e(this,d).setAttribute("tabindex","0"),e(this,d).setAttribute("aria-label",this.getI18nText("verify-aria-label","Click to verify you're a human")),e(this,d).setAttribute("aria-live","polite"),e(this,d).setAttribute("disabled","true"),e(this,d).innerHTML=`<div class="checkbox" part="checkbox"><svg class="progress-ring" viewBox="0 0 32 32"><circle class="progress-ring-bg" cx="16" cy="16" r="14"></circle><circle class="progress-ring-circle" cx="16" cy="16" r="14"></circle></svg></div><p part="label" class="label-wrapper"><span class="label active">${this.getI18nText("initial-state","Verify you're human")}</span></p><a part="attribution" aria-label="Secured by Cap" href="https://capjs.js.org/" class="credits" target="_blank" rel="follow noopener" title="Secured by Cap: Self-hosted CAPTCHA for the modern web.">Cap</a>`,e(this,S).innerHTML=`<style${window.CAP_CSS_NONCE?` nonce=${window.CAP_CSS_NONCE}`:""}>@media (prefers-reduced-motion:reduce){.captcha,.captcha *{transition:none!important;animation:none!important}.label{filter:none!important;opacity:1!important;transition:none!important;transform:none!important}.label:not(.active),.label.exit{display:none!important}}.captcha,.captcha *{box-sizing:border-box}.captcha{background-color:var(--cap-background,#fdfdfd);border:1px solid var(--cap-border-color,#dddddd8f);border-radius:var(--cap-border-radius,14px);-webkit-user-select:none;user-select:none;height:var(--cap-widget-height,58px);width:var(--cap-widget-width,260px);padding:var(--cap-widget-padding,14px);align-items:center;gap:var(--cap-gap,15px);cursor:pointer;-webkit-tap-highlight-color:#fff0;color:var(--cap-color,#212121);transition:filter .2s,transform .2s;display:flex;position:relative;overflow:hidden}.captcha:not([data-state]):active{transform:scale(.97)}.captcha:hover{filter:brightness(98%)}.captcha *{font-family:var(--cap-font,system, -apple-system, "BlinkMacSystemFont", ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", "Ubuntu", "arial", sans-serif)}.checkbox{width:var(--cap-checkbox-size,25px);height:var(--cap-checkbox-size,25px);border:var(--cap-checkbox-border,1px solid #aaaaaad1);border-radius:var(--cap-checkbox-border-radius,6px);background-color:var(--cap-checkbox-background,#fafafa91);margin-top:var(--cap-checkbox-margin,2px);margin-bottom:var(--cap-checkbox-margin,2px);transition:opacity .2s}.captcha p{-webkit-user-select:none;user-select:none;margin:0;font-size:15px;font-weight:500}.label-wrapper{flex:1;align-items:center;min-width:0;height:2em;display:flex;position:relative;overflow:hidden}.label-wrapper:before,.label-wrapper:after{content:"";pointer-events:none;z-index:1;width:100%;height:.6em;position:absolute;
2left:0}.label-wrapper:before{background:linear-gradient(to bottom, var(--cap-background,#fdfdfd), transparent);top:0}.label-wrapper:after{background:linear-gradient(to top, var(--cap-background,#fdfdfd), transparent);bottom:0}.label{white-space:nowrap;opacity:0;filter:blur(2px);transition:transform .5s cubic-bezier(.25,1,.5,1),opacity .5s,filter .5s;position:absolute;transform:translateY(100%)}.label.active{opacity:1;filter:none;transform:translateY(0)}.label.exit{opacity:0;filter:blur(2px);transform:translateY(-100%)}.checkbox .progress-ring{width:100%;height:100%;display:none;transform:rotate(-90deg)}.checkbox .progress-ring-bg{fill:none;stroke:var(--cap-spinner-background-color,#eee);stroke-width:var(--cap-spinner-thickness,3)}.checkbox .progress-ring-circle{fill:none;stroke:var(--cap-spinner-color,#000);stroke-width:var(--cap-spinner-thickness,3);stroke-linecap:round;stroke-dasharray:87.96;stroke-dashoffset:87.96px;transition:stroke-dashoffset .3s}.captcha[data-state=verifying] .checkbox{background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;display:flex;transform:scale(1.1)}.captcha[data-state=verifying] .checkbox .progress-ring{display:block}.captcha[data-state=done] .checkbox{background-image:var(--cap-checkmark,url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cstyle%3E%40keyframes%20anim%7B0%25%7Bstroke-dashoffset%3A23.21320343017578px%7Dto%7Bstroke-dashoffset%3A0%7D%7D%3C%2Fstyle%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%2300a67d%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22m5%2012%205%205L20%207%22%20style%3D%22stroke-dashoffset%3A0%3Bstroke-dasharray%3A23.21320343017578px%3Banimation%3Aanim%20.5s%20ease%22%2F%3
2E%3C%2Fsvg%3E));background-size:cover;border:1px solid #0000}.captcha[data-state=done] .checkbox .progress-ring{display:none}.captcha[data-state=error] .checkbox{background-image:var(--cap-error-cross,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 24 24'%3E%3Cpath fill='%23f55b50' d='M11 15h2v2h-2zm0-8h2v6h-2zm1-5C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8'/%3E%3C%2Fsvg%3E"));background-size:cover;border:1px solid #0000}.captcha[data-state=error] .checkbox .progress-ring{display:none}.captcha[disabled]{cursor:not-allowed}.captcha[disabled][data-state=verifying]{cursor:progress}.captcha[disabled][data-state=done]{cursor:default}.captcha .credits{color:var(--cap-color,#212121);opacity:.8;text-underline-offset:.18em;z-index:6;font-size:12px;text-decoration-thickness:.08em;position:absolute;bottom:10px;right:10px}.cap-troubleshoot-link{color:#06c;text-underline-offset:.15em;cursor:pointer;font-weight:500;font-size:inherit;text-decoration:underline;text-decoration-thickness:.08em}.cap-troubleshoot-link:hover{opacity:.8}</style>`,e(this,S).appendChild(e(this,d))}addEventListeners(){e(this,d)&&(e(this,d).querySelector("a").addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),window.open("https://capjs.js.org","_blank")}),e(this,d).addEventListener("click",()=>{e(this,d).hasAttribute("disabled")||this.solve()}),e(this,d).addEventListener("mousedown",()=>{!e(this,d).hasAttribute("disabled")&&h&&navigator.vibrate(5)}),e(this,d).addEventListener("keydown",t=>{t.key!=="Enter"&&t.key!==" "||e(this,d).hasAttribute("disabled")||(t.preventDefault(),t.stopPropagation(),this.solve())}),this.addEventListener("progress",this.boundHandleProgress),this.addEventListener("solve",this.boundHandleSolve),this.addEventListener("error",this.boundHandleError),this.addEventListener("reset",this.boundHandleReset))}animateLabel(t){var a;if(!e(this,d))return;let s=e(this,d).querySelector(".label-wrapper");if(!s)return;if((a=window.matchMedia)!=null&&a.call(window,"(prefers-reduced-motion: reduce)").matches){let o=s.querySelector(".label.active");if(o)o.textContent=t;else{let u=document.createElement("span");u.className="label active",u.textContent=t,s.appendChild(u)}return}let r=s.querySelector(".label.active"),n=document.createElement("span");n.className="label",n.textContent=t,s.appendChild(n),n.offsetWidth,n.classList.add("active"),r&&(r.classList.remove("active"),r.classList.add("exit"),r.addEventListener("transitionend",()=>r.remove(),{once:!0}))}updateUI(t,s,r=!1){e(this,d)&&(e(this,d).setAttribute("data-state",t),this.animateLabel(s),r?e(this,d).setAttribute("disabled","true"):e(this,d).removeAttribute("disabled"))}updateUIBlocked(t,s=!1){if(!e(this,d))return;e(this,d).setAttribute("data-state","error"),e(this,d).removeAttribute("disabled");let r=e(this,d).querySelector(".label-wrapper");if(!r)return;let n=this.getAttribute("data-cap-troubleshooting-url")||"https://capjs.js.org/guide/troubleshooting/instrumentation.html",a=r.querySelector(".label.active"),o=document.createElement("span");o.className="label",o.innerHTML=s?`${t} \xB7 <a class="cap-troubleshoot-link" href="${n}" target="_blank" rel="noopener">${this.getI18nText("troubleshooting-label","Troubleshoot")}</a>`:t,r.appendChild(o),o.offsetWidth,o.classList.add("active"),a&&(a.classList.remove("active"),a.classList.add("exit"),a.addEventListener("transitionend",()=>a.remove(),{once:!0}));let u=o.querySelector(".cap-troubleshoot-link");u&&u.addEventListener("click",c=>{c.stopPropagation()})}handleProgress(t){if(!e(this,d))return;let s=e(this,d).querySelector(".progress-ring-circle");if(s){let n=2*Math.PI*14,a=n-t.detail.progress/100*n;s.style.strokeDashoffset=a}let r=e(this,d).querySelector(".label-wrapper");if(r){let n=r.querySelector(".label.active");n&&(n.textContent=`${this.getI18nText("verifying-label","Verifying...")}`)}this.executeAttributeCode("onprogress",t)}handleSolve(t){this.updateUI("done",this.getI18nText("solved-label","You're a human"),!0),this.executeAttributeCode("onsolve",t)}handleError(t){this.updateUI("error",this.getI18nText("error-label","Error. Try again.")),this.executeAttributeCode("onerror",t),h&&navigator.vibrate([10,40,10])}handleReset(t){this.updateUI("",this.getI18nText("initial-state","I'm a human")),this.executeAttributeCode("onreset",t)}executeAttributeCode(t,s){let r=this.getAttribute(t);r&&(console.error("[cap] using `onxxx='\u2026'` is strongly discouraged and will be deprecated soon. please use `addEventListener` callbacks instead."),new Function("event",r).call(this,s))}error(t="Unknown error"){console.error("[cap]",t),this.dispatchEvent("error",{isCap:!0,message:t})}dispatchEvent(t,s={}){let r=new CustomEvent(t,{bubbles:!0,composed:!0,detail:s});super.dispatchEvent(r)}reset(){e(this,v)&&(clearTimeout(e(this,v)),f(this,v,null)),this.dispatchEvent("reset"),this.token=null;let t=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${t}']`)&&(this.querySelector(`input[name='${t}']`).value="")}get tokenValue(){return this.token}disconnectedCallback(){this.removeEventListener("progress",this.boundHandleProgress),this.removeEventListener("solve",this.boundHandleSolve),this.removeEventListener("error",this.boundHandleError),this.removeEventListener("reset",this.boundHandleReset),e(this,I).forEac
2h((t,s)=>{this.removeEventListener(s.slice(2),t)}),e(this,I).clear(),e(this,S)&&(e(this,S).innerHTML=""),this.reset(),this.cleanup()}cleanup(){e(this,v)&&(clearTimeout(e(this,v)),f(this,v,null)),x(this,m,j).call(this),e(this,P)&&(clearTimeout(e(this,P)),f(this,P,null)),e(this,y)&&(e(this,y).terminate(),f(this,y,null)),e(this,i)&&(e(this,i).state="error",e(this,i).notify(),f(this,i,null))}}v=new WeakMap,L=new WeakMap,S=new WeakMap,d=new WeakMap,W=new WeakMap,M=new WeakMap,I=new WeakMap,i=new WeakMap,P=new WeakMap,y=new WeakMap,F=new WeakMap,m=new WeakSet,Y=function(){return{state:"idle",challengeResp:null,challenges:null,results:[],completedCount:0,solvePromise:null,promoteFn:null,_listeners:[],pendingPromotion:null,token:null,tokenExpires:null,notify(){for(let t of this._listeners)t();this._listeners=[]},onSettled(t){this.state==="done"||this.state==="error"?t():this._listeners.push(t)}}},U=function(){f(this,i,x(this,m,Y).call(this)),x(this,m,K).call(this)},j=function(){e(this,F)&&(window.removeEventListener("mousemove",e(this,F)),window.removeEventListener("touchstart",e(this,F)),window.removeEventListener("keydown",e(this,F)),f(this,F,null))},K=function(){x(this,m,j).call(this);let t=()=>{x(this,m,j).call(this),x(this,m,te).call(this)};f(this,F,t),window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchstart",t,{passive:!0}),window.addEventListener("keydown",t,{passive:!0})},ee=function(){return typeof this.checkVisibility=="function"?this.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!!(this.offsetParent||this.getClientRects().length>0)},te=function(){e(this,i).state==="idle"&&x(this,m,ee).call(this)&&(e(this,i).state="waiting",f(this,P,setTimeout(()=>{x(this,m,G).call(this)},2500)))},G=async function(){if(e(this,i).state!=="waiting")return;e(this,i).state="fetching";let t=this.getAttribute("data-cap-api-endpoint");if(!t&&(window!=null&&window.CAP_CUSTOM_FETCH)&&(t="/"),t){t.endsWith("/")||(t+="/");try{let s=await p(`${t}challenge`,{method:"POST"}),r;try{r=await s.json()}catch{throw new Error("Failed to parse speculative challenge response")}if(r.error)throw new Error(r.error);r._apiEndpoint=t,e(this,i).challengeResp=r;let{challenge:n,token:a}=r,o=n;if(!Array.isArray(o)){let u=0;o=Array.from({length:n.c},()=>(u++,[b(`${a}${u}`,n.s),b(`${a}${u}d`,n.d)]))}e(this,i).challenges=o,e(this,i).state="solving",e(this,i).solvePromise=x(this,m,se).call(this,o)}catch(s){console.warn("[cap] speculative challenge fetch failed:",s),e(this,i).state="error",e(this,i).notify()}}else e(this,i).state="idle"},se=async function(t){O();let s=null;try{s=await z()}catch{}e(this,y)||(f(this,y,new R(1)),e(this,y)._spawn()),e(this,y).setWasm(s);let r=t.length,n=new Array(r),a=1,o=!1;e(this,i).promoteFn=c=>{o||(o=!0,a=c,e(this,y)._size=c,e(this,y)._ensureSize(c))},e(this,i).pendingPromotion!==null&&(e(this,i).promoteFn(e(this,i).pendingPromotion),e(this,i).pendingPromotion=null);let u=0;for(;u<r;){let c=a,w=[],A=[];for(let g=0;g<c&&u<r;g++)A.push(u),w.push(t[u]),u++;e(this,y)._ensureSize(Math.max(a,c));let k=await Promise.all(w.map(g=>e(this,y).run(g[0],g[1]).then(E=>(e(this,i).completedCount++,E))));for(let g=0;g<A.length;g++)n[A[g]]=k[g];!o&&u<r&&await new Promise(g=>setTimeout(g,120))}return e(this,i).results=n,e(this,i).state="redeeming",x(this,m,ie).call(this,n),n},ie=async function(t){try{let s=e(this,i).challengeResp,r=s._apiEndpoint;if(!r)throw new Error("[cap] speculative redeem: missing apiEndpoint");let n=null;if(s.instrumentation&&(n=await D(s.instrumentation),(n==null?void 0:n.__timeout)||(n==null?void 0:n.__blocked)))return e(this,i).state="done",void e(this,i).notify();let a=await p(`${r}redeem`,{method:"POST",body:JSON.stringify({token:s.token,solutions:t,...n&&{instr:n}}),headers:{"Content-Type":"application/json"}}),o;try{o=await a.json()}catch{throw new Error("Failed to parse speculative redeem response")}if(!o.success)throw new Error(o.error||"Speculative redeem failed");e(this,i).token=o.token,e(this,i).tokenExpires=new Date(o.expires).getTime(),e(this,i).state="done",e(this,i).notify()}catch(s){console.warn("[cap] speculative redeem failed (will redo on click):",s),e(this,i).state="done",e(this,i).notify()}};class H{constructor(l={},t){let s=t||document.createElement("cap-widget");if(Object.entries(l).forEach(([r,n])=>{s.setAttribute(r,n)}),!l.apiEndpoint&&!(window!=null&&window.CAP_CUSTOM_FETCH))throw s.remove(),new Error("Missing API endpoint. Either custom fetch or an API endpoint must be provided.");l.apiEndpoint&&s.setAttribute("data-cap-api-endpoint",l.apiEndpoint),this.widget=s,this.solve=this.widget.solve.bind(this.widget),this.reset=this.widget.reset.bind(this.widget),this.addEventListener=this.widget.addEventListener.bind(this.widget),Object.defineProperty(this,"token",{get:()=>s.token,configurable:!0,enumerable:!0}),t||(s.style.display="none",document.documentElement.appendChild(s))}}window.Cap=H,customElements.get("cap-widget")||window!=null&&window.CAP_DONT_SKIP_REDEFINE?customElements.get("cap-widget")&&console.warn(`[cap] the cap-widget element has already been defined, skipping re-defining it.
3to prevent this, set window.CAP_DONT_SKIP_REDEFINE to true`):customElements.define("cap-widget",ne),typeof q=="object"&&typeof Q!="undefined"?Q.exports=H:typeof define=="function"&&define.amd&&define([],()=>H),typeof q!="undefined"&&(q.default=H)})()});var fe=ge(re(),1);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.