altcha 2.1.0-beta.3 → 2.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.
@@ -1,4 +1,4 @@
1
- (function($,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):($=typeof globalThis<"u"?globalThis:$||self,N($.altcha={}))})(this,function($){"use strict";var Ol=Object.defineProperty;var Qi=$=>{throw TypeError($)};var Pl=($,N,Y)=>N in $?Ol($,N,{enumerable:!0,configurable:!0,writable:!0,value:Y}):$[N]=Y;var Ie=($,N,Y)=>Pl($,typeof N!="symbol"?N+"":N,Y),eo=($,N,Y)=>N.has($)||Qi("Cannot "+Y);var he=($,N,Y)=>(eo($,N,"read from private field"),Y?Y.call($):N.get($)),tn=($,N,Y)=>N.has($)?Qi("Cannot add the same private member more than once"):N instanceof WeakSet?N.add($):N.set($,Y),rn=($,N,Y,Wt)=>(eo($,N,"write to private field"),Wt?Wt.call($,Y):N.set($,Y),Y);var gi,Me,ye;const N=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2
- `,Y=typeof self<"u"&&self.Blob&&new Blob([N],{type:"text/javascript;charset=utf-8"});function Wt(e){let t;try{if(t=Y&&(self.URL||self.webkitURL).createObjectURL(Y),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(N),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const to="5";typeof window<"u"&&((gi=window.__svelte??(window.__svelte={})).v??(gi.v=new Set)).add(to);const ro=1,no=4,io=8,oo=16,ao=1,lo=2,Er="[",nn="[!",on="]",ct={},ue=Symbol(),so="http://www.w3.org/1999/xhtml",an=!1;function ln(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var sn=Array.isArray,uo=Array.prototype.indexOf,fo=Array.from,Zt=Object.keys,It=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,co=Object.getOwnPropertyDescriptors,ho=Object.prototype,vo=Array.prototype,un=Object.getPrototypeOf,fn=Object.isExtensible;const dt=()=>{};function cn(e){for(var t=0;t<e.length;t++)e[t]()}function go(e,t,r=!1){return e===void 0?r?t():t:e}const Ee=2,dn=4,zt=8,Cr=16,Fe=32,et=64,Jt=128,ve=256,Kt=512,fe=1024,Re=2048,tt=4096,ht=8192,Xt=16384,po=32768,xr=65536,mo=1<<19,hn=1<<20,kr=1<<21,Rt=Symbol("$state"),vn=Symbol("legacy props"),_o=Symbol("");function bo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function yo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Eo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Co(){throw new Error("https://svelte.dev/e/hydration_failed")}function xo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ko(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ao(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Io(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Qt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function vt(e){F=e}let M;function je(e){if(e===null)throw Qt(),ct;return M=e}function gt(){return je(Be(M))}function Z(e){if(F){if(Be(M)!==null)throw Qt(),ct;M=e}}function Ro(){for(var e=0,t=M;;){if(t.nodeType===8){var r=t.data;if(r===on){if(e===0)return t;e-=1}else(r===Er||r===nn)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let So=!1;function qe(e){if(typeof e!="object"||e===null||Rt in e)return e;const t=un(e);if(t!==ho&&t!==vo)return e;var r=new Map,i=sn(e),a=V(0),o=L,u=s=>{var c=L;Te(o);var d=s();return Te(c),d};return i&&r.set("length",V(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&ko();var _=r.get(c);return _===void 0?(_=u(()=>V(d.value)),r.set(c,_)):y(_,u(()=>qe(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,u(()=>V(ue))),Ar(a));else{if(i&&typeof c=="string"){var _=r.get("length"),h=Number(c);Number.isInteger(h)&&h<_.v&&y(_,h)}y(d,ue),Ar(a)}return!0},get(s,c,d){var w;if(c===Rt)return e;var _=r.get(c),h=c in s;if(_===void 0&&(!h||(w=Qe(s,c))!=null&&w.writable)&&(_=u(()=>V(qe(h?s[c]:ue))),r.set(c,_)),_!==void 0){var p=l(_);return p===ue?void 0:p}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var _=r.get(c);_&&(d.value=l(_))}else if(d===void 0){var h=r.get(c),p=h==null?void 0:h.v;if(h!==void 0&&p!==ue)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return d},has(s,c){var p;if(c===Rt)return!0;var d=r.get(c),_=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||O!==null&&(!_||(p=Qe(s,c))!=null&&p.writable)){d===void 0&&(d=u(()=>V(_?qe(s[c]):ue)),r.set(c,d));var h=l(d);if(h===ue)return!1}return _},set(s,c,d,_){var te;var h=r.get(c),p=c in s;if(i&&c==="length")for(var w=d;w<h.v;w+=1){var D=r.get(w+"");D!==void 0?y(D,ue):w in s&&(D=u(()=>V(ue)),r.set(w+"",D))}h===void 0?(!p||(te=Qe(s,c))!=null&&te.writable)&&(h=u(()=>V(void 0)),y(h,u(()=>qe(d))),r.set(c,h)):(p=h.v!==ue,y(h,u(()=>qe(d))));var x=Reflect.getOwnPropertyDescriptor(s,c);if(x!=null&&x.set&&x.set.call(_,d),!p){if(i&&typeof c=="string"){var j=r.get("length"),pe=Number(c);Number.isInteger(pe)&&pe>=j.v&&y(j,pe+1)}Ar(a)}return!0},ownKeys(s){l(a);var c=Reflect.ownKeys(s).filter(h=>{var p=r.get(h);return p===void 0||p.v!==ue});for(var[d,_]of r)_.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Ao()}})}function Ar(e,t=1){y(e,e.v+t)}var gn,pn,mn,_n;function Ir(){if(gn===void 0){gn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mn=Qe(t,"firstChild").get,_n=Qe(t,"nextSibling").get,fn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fn(r)&&(r.__t=void 0)}}function er(e=""){return document.createTextNode(e)}function _e(e){return mn.call(e)}function Be(e){return _n.call(e)}function z(e,t){if(!F)return _e(e);var r=_e(M);return r===null&&(r=M.appendChild(er())),je(r),r}function St(e,t){if(!F){var r=_e(e);return r instanceof Comment&&r.data===""?Be(r):r}return M}function J(e,t=1,r=!1){let i=F?M:e;for(var a;t--;)a=i,i=Be(i);if(!F)return i;var o=i==null?void 0:i.nodeType;if(r&&o!==3){var u=er();return i===null?a==null||a.after(u):i.before(u),je(u),u}return je(i),i}function $o(e){e.textContent=""}function bn(e){return e===this.v}function yn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Rr(e){return!yn(e,this.v)}function tr(e){var t=Ee|Re,r=L!==null&&(L.f&Ee)!==0?L:null;return O===null||r!==null&&(r.f&ve)!==0?t|=ve:O.f|=hn,{ctx:ae,deps:null,effects:null,equals:bn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??O}}function $t(e){const t=tr(e);return On(t),t}function To(e){const t=tr(e);return t.equals=Rr,t}function wn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Do(e){for(var t=e.parent;t!==null;){if((t.f&Ee)===0)return t;t=t.parent}return null}function En(e){var t,r=O;Ge(Do(e));try{wn(e),t=Un(e)}finally{Ge(r)}return t}function Cn(e){var t=En(e),r=(Ye||(e.f&ve)!==0)&&e.deps!==null?tt:fe;Ce(e,r),e.equals(t)||(e.v=t,e.wv=Fn())}function No(e){O===null&&L===null&&wo(),L!==null&&(L.f&ve)!==0&&O===null&&yo(),Nt&&bo()}function Lo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function rt(e,t,r,i=!0){var a=O,o={ctx:ae,deps:null,nodes_start:null,nodes_end:null,f:e|Re,first:null,fn:t,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Pr(o),o.f|=po}catch(c){throw He(o),c}else t!==null&&sr(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(hn|Jt))===0;if(!u&&i&&(a!==null&&Lo(o,a),L!==null&&(L.f&Ee)!==0)){var s=L;(s.effects??(s.effects=[])).push(o)}return o}function Sr(e){const t=rt(zt,null,!1);return Ce(t,fe),t.teardown=e,t}function $r(e){No();var t=O!==null&&(O.f&Fe)!==0&&ae!==null&&!ae.m;if(t){var r=ae;(r.e??(r.e=[])).push({fn:e,effect:O,reaction:L})}else{var i=Tr(e);return i}}function Oo(e){const t=rt(et,e,!0);return()=>{He(t)}}function Po(e){const t=rt(et,e,!0);return(r={})=>new Promise(i=>{r.outro?Lr(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Tr(e){return rt(dn,e,!1)}function Dr(e){return rt(zt,e,!0)}function Se(e,t=[],r=tr){const i=t.map(r);return xn(()=>e(...i.map(l)))}function xn(e,t=0){return rt(zt|Cr|t,e,!0)}function Nr(e,t=!0){return rt(zt|Fe,e,!0,t)}function kn(e){var t=e.teardown;if(t!==null){const r=Nt,i=L;Ln(!0),Te(null);try{t.call(null)}finally{Ln(r),Te(i)}}}function An(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&et)!==0?r.parent=null:He(r,t),r=i}}function Fo(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Fe)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&mo)!==0)&&e.nodes_start!==null&&(In(e.nodes_start,e.nodes_end),r=!0),An(e,t&&!r),lr(e,0),Ce(e,Xt);var i=e.transitions;if(i!==null)for(const o of i)o.stop();kn(e);var a=e.parent;a!==null&&a.first!==null&&Rn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function In(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function Rn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Lr(e,t){var r=[];Sn(e,r,!0),Mo(r,()=>{He(e),t&&t()})}function Mo(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var a of e)a.out(i)}else t()}function Sn(e,t,r){if((e.f&ht)===0){if(e.f^=ht,e.transitions!==null)for(const u of e.transitions)(u.is_global||r)&&t.push(u);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&xr)!==0||(i.f&Fe)!==0;Sn(i,t,o?r:!1),i=a}}}function $n(e){Tn(e,!0)}function Tn(e,t){if((e.f&ht)!==0){e.f^=ht,(e.f&fe)===0&&(e.f^=fe),Ot(e)&&(Ce(e,Re),sr(e));for(var r=e.first;r!==null;){var i=r.next,a=(r.f&xr)!==0||(r.f&Fe)!==0;Tn(r,a?t:!1),r=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const Vo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Tt=[],Dt=[];function Dn(){var e=Tt;Tt=[],cn(e)}function Nn(){var e=Dt;Dt=[],cn(e)}function Or(e){Tt.length===0&&queueMicrotask(Dn),Tt.push(e)}function Uo(e){Dt.length===0&&Vo(Nn),Dt.push(e)}function jo(){Tt.length>0&&Dn(),Dt.length>0&&Nn()}let rr=!1,nr=!1,ir=null,nt=!1,Nt=!1;function Ln(e){Nt=e}let Lt=[],Fl=[],L=null,$e=!1;function Te(e){L=e}let O=null;function Ge(e){O=e}let ie=null;function On(e){L!==null&&L.f&kr&&(ie===null?ie=[e]:ie.push(e))}let oe=null,ge=0,be=null;function qo(e){be=e}let Pn=1,or=0,Ye=!1;function Fn(){return++Pn}function Ot(e){var h;var t=e.f;if((t&Re)!==0)return!0;if((t&tt)!==0){var r=e.deps,i=(t&ve)!==0;if(r!==null){var a,o,u=(t&Kt)!==0,s=i&&O!==null&&!Ye,c=r.length;if(u||s){var d=e,_=d.parent;for(a=0;a<c;a++)o=r[a],(u||!((h=o==null?void 0:o.reactions)!=null&&h.includes(d)))&&(o.reactions??(o.reactions=[])).push(d);u&&(d.f^=Kt),s&&_!==null&&(_.f&ve)===0&&(d.f^=ve)}for(a=0;a<c;a++)if(o=r[a],Ot(o)&&Cn(o),o.wv>e.wv)return!0}(!i||O!==null&&!Ye)&&Ce(e,fe)}return!1}function Bo(e,t){for(var r=t;r!==null;){if((r.f&Jt)!==0)try{r.fn(e);return}catch{r.f^=Jt}r=r.parent}throw rr=!1,e}function Mn(e){return(e.f&Xt)===0&&(e.parent===null||(e.parent.f&Jt)===0)}function ar(e,t,r,i){if(rr){if(r===null&&(rr=!1),Mn(t))throw e;return}if(r!==null&&(rr=!0),Bo(e,t),Mn(t))throw e}function Vn(e,t,r=!0){var i=e.reactions;if(i!==null)for(var a=0;a<i.length;a++){var o=i[a];ie!=null&&ie.includes(e)||((o.f&Ee)!==0?Vn(o,t,!1):t===o&&(r?Ce(o,Re):(o.f&fe)!==0&&Ce(o,tt),sr(o)))}}function Un(e){var w;var t=oe,r=ge,i=be,a=L,o=Ye,u=ie,s=ae,c=$e,d=e.f;oe=null,ge=0,be=null,Ye=(d&ve)!==0&&($e||!nt||L===null),L=(d&(Fe|et))===0?e:null,ie=null,Hn(e.ctx),$e=!1,or++,e.f|=kr;try{var _=(0,e.fn)(),h=e.deps;if(oe!==null){var p;if(lr(e,ge),h!==null&&ge>0)for(h.length=ge+oe.length,p=0;p<oe.length;p++)h[ge+p]=oe[p];else e.deps=h=oe;if(!Ye)for(p=ge;p<h.length;p++)((w=h[p]).reactions??(w.reactions=[])).push(e)}else h!==null&&ge<h.length&&(lr(e,ge),h.length=ge);if(Wn()&&be!==null&&!$e&&h!==null&&(e.f&(Ee|tt|Re))===0)for(p=0;p<be.length;p++)Vn(be[p],e);return a!==null&&a!==e&&(or++,be!==null&&(i===null?i=be:i.push(...be))),_}finally{oe=t,ge=r,be=i,L=a,Ye=o,ie=u,Hn(s),$e=c,e.f^=kr}}function Ho(e,t){let r=t.reactions;if(r!==null){var i=uo.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[i]=r[a],r.pop())}}r===null&&(t.f&Ee)!==0&&(oe===null||!oe.includes(t))&&(Ce(t,tt),(t.f&(ve|Kt))===0&&(t.f^=Kt),wn(t),lr(t,0))}function lr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Ho(e,r[i])}function Pr(e){var t=e.f;if((t&Xt)===0){Ce(e,fe);var r=O,i=ae,a=nt;O=e,nt=!0;try{(t&Cr)!==0?Fo(e):An(e),kn(e);var o=Un(e);e.teardown=typeof o=="function"?o:null,e.wv=Pn;var u=e.deps,s;an&&So&&e.f&Re}catch(c){ar(c,e,r,i||e.ctx)}finally{nt=a,O=r}}}function Go(){try{Eo()}catch(e){if(ir!==null)ar(e,ir,null);else throw e}}function jn(){var e=nt;try{var t=0;for(nt=!0;Lt.length>0;){t++>1e3&&Go();var r=Lt,i=r.length;Lt=[];for(var a=0;a<i;a++){var o=Wo(r[a]);Yo(o)}Pt.clear()}}finally{nr=!1,nt=e,ir=null}}function Yo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(Xt|ht))===0)try{Ot(i)&&(Pr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Rn(i):i.fn=null))}catch(a){ar(a,i,null,i.ctx)}}}function sr(e){nr||(nr=!0,queueMicrotask(jn));for(var t=ir=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(et|Fe))!==0){if((r&fe)===0)return;t.f^=fe}}Lt.push(t)}function Wo(e){for(var t=[],r=e;r!==null;){var i=r.f,a=(i&(Fe|et))!==0,o=a&&(i&fe)!==0;if(!o&&(i&ht)===0){if((i&dn)!==0)t.push(r);else if(a)r.f^=fe;else try{Ot(r)&&Pr(r)}catch(c){ar(c,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function A(e){for(var t;;){if(jo(),Lt.length===0)return t;nr=!0,jn()}}async function Fr(){await Promise.resolve(),A()}function l(e){var t=e.f,r=(t&Ee)!==0;if(L!==null&&!$e){if(!(ie!=null&&ie.includes(e))){var i=L.deps;e.rv<or&&(e.rv=or,oe===null&&i!==null&&i[ge]===e?ge++:oe===null?oe=[e]:(!Ye||!oe.includes(e))&&oe.push(e))}}else if(r&&e.deps===null&&e.effects===null){var a=e,o=a.parent;o!==null&&(o.f&ve)===0&&(a.f^=ve)}return r&&(a=e,Ot(a)&&Cn(a)),Nt&&Pt.has(e)?Pt.get(e):e.v}function it(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}const Zo=-7169;function Ce(e,t){e.f=e.f&Zo|t}const Pt=new Map;function qn(e,t){var r={f:0,v:e,reactions:null,equals:bn,rv:0,wv:0};return r}function V(e,t){const r=qn(e);return On(r),r}function Mr(e,t=!1){const r=qn(e);return t||(r.equals=Rr),r}function y(e,t,r=!1){L!==null&&!$e&&Wn()&&(L.f&(Ee|Cr))!==0&&!(ie!=null&&ie.includes(e))&&Io();let i=r?qe(t):t;return zo(e,i)}function zo(e,t){if(!e.equals(t)){var r=e.v;Nt?Pt.set(e,t):Pt.set(e,r),e.v=t,(e.f&Ee)!==0&&((e.f&Re)!==0&&En(e),Ce(e,(e.f&ve)===0?fe:tt)),e.wv=Fn(),Bn(e,Re),O!==null&&(O.f&fe)!==0&&(O.f&(Fe|et))===0&&(be===null?qo([e]):be.push(e))}return t}function Bn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,a=0;a<i;a++){var o=r[a],u=o.f;(u&Re)===0&&(Ce(o,t),(u&(fe|ve))!==0&&((u&Ee)!==0?Bn(o,tt):sr(o)))}}let ae=null;function Hn(e){ae=e}function Gn(e,t=!1,r){var i=ae={p:ae,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Sr(()=>{i.d=!0})}function Yn(e){const t=ae;if(t!==null){e!==void 0&&(t.x=e);const u=t.e;if(u!==null){var r=O,i=L;t.e=null;try{for(var a=0;a<u.length;a++){var o=u[a];Ge(o.effect),Te(o.reaction),Tr(o.fn)}}finally{Ge(r),Te(i)}}ae=t.p,t.m=!0}return e||{}}function Wn(){return!0}const Jo=["touchstart","touchmove"];function Ko(e){return Jo.includes(e)}function Xo(e,t){if(t){const r=document.body;e.autofocus=!0,Or(()=>{document.activeElement===r&&e.focus()})}}let Zn=!1;function zn(){Zn||(Zn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Jn(e){var t=L,r=O;Te(null),Ge(null);try{return e()}finally{Te(t),Ge(r)}}function Qo(e,t,r,i=r){e.addEventListener(t,()=>Jn(r));const a=e.__on_r;a?e.__on_r=()=>{a(),i(!0)}:e.__on_r=()=>i(!0),zn()}const Kn=new Set,Vr=new Set;function ea(e,t,r,i={}){function a(o){if(i.capture||Ft.call(t,o),!o.cancelBubble)return Jn(()=>r==null?void 0:r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Or(()=>{t.addEventListener(e,a,i)}):t.addEventListener(e,a,i),a}function We(e,t,r,i,a){var o={capture:i,passive:a},u=ea(e,t,r,o);(t===document.body||t===window||t===document)&&Sr(()=>{t.removeEventListener(e,u,o)})}function ta(e){for(var t=0;t<e.length;t++)Kn.add(e[t]);for(var r of Vr)r(e)}function Ft(e){var te;var t=this,r=t.ownerDocument,i=e.type,a=((te=e.composedPath)==null?void 0:te.call(e))||[],o=a[0]||e.target,u=0,s=e.__root;if(s){var c=a.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=a.indexOf(t);if(d===-1)return;c<=d&&(u=c)}if(o=a[u]||e.target,o!==t){It(e,"currentTarget",{configurable:!0,get(){return o||r}});var _=L,h=O;Te(null),Ge(null);try{for(var p,w=[];o!==null;){var D=o.assignedSlot||o.parentNode||o.host||null;try{var x=o["__"+i];if(x!=null&&(!o.disabled||e.target===o))if(sn(x)){var[j,...pe]=x;j.apply(o,[e,...pe])}else x.call(o,e)}catch(le){p?w.push(le):p=le}if(e.cancelBubble||D===t||D===null)break;o=D}if(p){for(let le of w)queueMicrotask(()=>{throw le});throw p}}finally{e.__root=t,delete e.currentTarget,Te(_),Ge(h)}}}function Ur(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function De(e,t){var r=O;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function xe(e,t){var r=(t&ao)!==0,i=(t&lo)!==0,a,o=!e.startsWith("<!>");return()=>{if(F)return De(M,null),M;a===void 0&&(a=Ur(o?e:"<!>"+e),r||(a=_e(a)));var u=i||pn?document.importNode(a,!0):a.cloneNode(!0);if(r){var s=_e(u),c=u.lastChild;De(s,c)}else De(u,u);return u}}function ur(e,t,r="svg"){var i=!e.startsWith("<!>"),a=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(F)return De(M,null),M;if(!o){var u=Ur(a),s=_e(u);o=_e(s)}var c=o.cloneNode(!0);return De(c,c),c}}function fr(){if(F)return De(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=er();return e.append(t,r),De(t,r),e}function q(e,t){if(F){O.nodes_end=M,gt();return}e!==null&&e.before(t)}function ra(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Xn(e,t){return Qn(e,t)}function na(e,t){Ir(),t.intro=t.intro??!1;const r=t.target,i=F,a=M;try{for(var o=_e(r);o&&(o.nodeType!==8||o.data!==Er);)o=Be(o);if(!o)throw ct;vt(!0),je(o),gt();const u=Qn(e,{...t,anchor:o});if(M===null||M.nodeType!==8||M.data!==on)throw Qt(),ct;return vt(!1),u}catch(u){if(u===ct)return t.recover===!1&&Co(),Ir(),$o(r),vt(!1),Xn(e,t);throw u}finally{vt(i),je(a)}}const pt=new Map;function Qn(e,{target:t,anchor:r,props:i={},events:a,context:o,intro:u=!0}){Ir();var s=new Set,c=h=>{for(var p=0;p<h.length;p++){var w=h[p];if(!s.has(w)){s.add(w);var D=Ko(w);t.addEventListener(w,Ft,{passive:D});var x=pt.get(w);x===void 0?(document.addEventListener(w,Ft,{passive:D}),pt.set(w,1)):pt.set(w,x+1)}}};c(fo(Kn)),Vr.add(c);var d=void 0,_=Po(()=>{var h=r??t.appendChild(er());return Nr(()=>{if(o){Gn({});var p=ae;p.c=o}a&&(i.$$events=a),F&&De(h,null),d=e(h,i)||{},F&&(O.nodes_end=M),o&&Yn()}),()=>{var D;for(var p of s){t.removeEventListener(p,Ft);var w=pt.get(p);--w===0?(document.removeEventListener(p,Ft),pt.delete(p)):pt.set(p,w)}Vr.delete(c),h!==r&&((D=h.parentNode)==null||D.removeChild(h))}});return jr.set(d,_),d}let jr=new WeakMap;function ia(e,t){const r=jr.get(e);return r?(jr.delete(e),r(t)):Promise.resolve()}function K(e,t,[r,i]=[0,0]){F&&r===0&&gt();var a=e,o=null,u=null,s=ue,c=r>0?xr:0,d=!1;const _=(p,w=!0)=>{d=!0,h(w,p)},h=(p,w)=>{if(s===(s=p))return;let D=!1;if(F&&i!==-1){if(r===0){const j=a.data;j===Er?i=0:j===nn?i=1/0:(i=parseInt(j.substring(1)),i!==i&&(i=s?1/0:-1))}const x=i>r;!!s===x&&(a=Ro(),je(a),vt(!1),D=!0,i=-1)}s?(o?$n(o):w&&(o=Nr(()=>w(a))),u&&Lr(u,()=>{u=null})):(u?$n(u):w&&(u=Nr(()=>w(a,[r+1,i]))),o&&Lr(o,()=>{o=null})),D&&vt(!0)};xn(()=>{d=!1,t(_),d||h(null,null)},c),F&&(a=M)}function ot(e,t,r=!1,i=!1,a=!1){var o=e,u="";Se(()=>{var s=O;if(u===(u=t()??"")){F&&gt();return}if(s.nodes_start!==null&&(In(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),u!==""){if(F){M.data;for(var c=gt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw Qt(),ct;De(M,d),o=je(c);return}var _=u+"";r?_=`<svg>${_}</svg>`:i&&(_=`<math>${_}</math>`);var h=Ur(_);if((r||i)&&(h=_e(h)),De(_e(h),h.lastChild),r||i)for(;_e(h);)o.before(_e(h));else o.before(h)}})}function oa(e,t,r,i,a){var s;F&&gt();var o=(s=t.$$slots)==null?void 0:s[r],u=!1;o===!0&&(o=t.children,u=!0),o===void 0||o(e,u?()=>i:i)}const ei=[...`
3
- \r\f \v\uFEFF`];function aa(e,t,r){var i=""+e;if(r){for(var a in r)if(r[a])i=i?i+" "+a:a;else if(i.length)for(var o=a.length,u=0;(u=i.indexOf(a,u))>=0;){var s=u+o;(u===0||ei.includes(i[u-1]))&&(s===i.length||ei.includes(i[s]))?i=(u===0?"":i.substring(0,u))+i.substring(s+1):u=s}}return i===""?null:i}function la(e,t,r,i,a,o){var u=e.__className;if(F||u!==r||u===void 0){var s=aa(r,i,o);(!F||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(o&&a!==o)for(var c in o){var d=!!o[c];(a==null||d!==!!a[c])&&e.classList.toggle(c,d)}return o}const sa=Symbol("is custom element"),ua=Symbol("is html");function ti(e){if(F){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;T(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var a=e.checked;T(e,"checked",null),e.checked=a}}};e.__on_r=r,Uo(r),zn()}}function fa(e,t){var r=ri(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function T(e,t,r,i){var a=ri(e);F&&(a[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||a[t]!==(a[t]=r)&&(t==="loading"&&(e[_o]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ca(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ri(e){return e.__attributes??(e.__attributes={[sa]:e.nodeName.includes("-"),[ua]:e.namespaceURI===so})}var ni=new Map;function ca(e){var t=ni.get(e.nodeName);if(t)return t;ni.set(e.nodeName,t=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=co(i);for(var o in r)r[o].set&&t.push(o);i=un(i)}return t}function da(e,t,r=t){Qo(e,"change",i=>{var a=i?e.defaultChecked:e.checked;r(a)}),(F&&e.defaultChecked!==e.checked||it(t)==null)&&r(e.checked),Dr(()=>{var i=t();e.checked=!!i})}function ii(e,t){return e===t||(e==null?void 0:e[Rt])===t}function cr(e={},t,r,i){return Tr(()=>{var a,o;return Dr(()=>{a=o,o=[],it(()=>{e!==r(...o)&&(t(e,...o),a&&ii(r(...a),e)&&t(null,...a))})}),()=>{Or(()=>{o&&ii(r(...o),e)&&t(null,...o)})}}),e}function oi(e){ae===null&&ln(),$r(()=>{const t=it(e);if(typeof t=="function")return t})}function ha(e){ae===null&&ln(),oi(()=>()=>it(e))}function ai(e,t,r){if(e==null)return t(void 0),dt;const i=it(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const mt=[];function va(e,t=dt){let r=null;const i=new Set;function a(s){if(yn(e,s)&&(e=s,r)){const c=!mt.length;for(const d of i)d[1](),mt.push(d,e);if(c){for(let d=0;d<mt.length;d+=2)mt[d][0](mt[d+1]);mt.length=0}}}function o(s){a(s(e))}function u(s,c=dt){const d=[s,c];return i.add(d),i.size===1&&(r=t(a,o)||dt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:a,update:o,subscribe:u}}function dr(e){let t;return ai(e,r=>t=r)(),t}let hr=!1,qr=Symbol();function ga(e,t,r){const i=r[t]??(r[t]={store:null,source:Mr(void 0),unsubscribe:dt});if(i.store!==e&&!(qr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=dt;else{var a=!0;i.unsubscribe=ai(e,o=>{a?i.source.v=o:y(i.source,o)}),a=!1}return e&&qr in r?dr(e):l(i.source)}function pa(){const e={};function t(){Sr(()=>{for(var r in e)e[r].unsubscribe();It(e,qr,{enumerable:!1,value:!0})})}return[e,t]}function ma(e){var t=hr;try{return hr=!1,[e(),hr]}finally{hr=t}}function li(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function I(e,t,r,i){var _t;var a=(r&ro)!==0,o=!0,u=(r&io)!==0,s=(r&oo)!==0,c=!1,d;u?[d,c]=ma(()=>e[t]):d=e[t];var _=Rt in e||vn in e,h=u&&(((_t=Qe(e,t))==null?void 0:_t.set)??(_&&t in e&&(H=>e[t]=H)))||void 0,p=i,w=!0,D=!1,x=()=>(D=!0,w&&(w=!1,s?p=it(i):p=i),p);d===void 0&&i!==void 0&&(h&&o&&xo(),d=x(),h&&h(d));var j;if(j=()=>{var H=e[t];return H===void 0?x():(w=!0,D=!1,H)},(r&no)===0)return j;if(h){var pe=e.$$legacy;return function(H,ce){return arguments.length>0?((!ce||pe||c)&&h(ce?j():H),H):j()}}var te=!1,le=Mr(d),re=tr(()=>{var H=j(),ce=l(le);return te?(te=!1,ce):le.v=H});return u&&l(re),a||(re.equals=Rr),function(H,ce){if(arguments.length>0){const ke=ce?l(re):u?qe(H):H;if(!re.equals(ke)){if(te=!0,y(le,ke),D&&p!==void 0&&(p=ke),li(re))return H;it(()=>l(re))}return H}return li(re)?re.v:l(re)}}function _a(e){return new ba(e)}class ba{constructor(t){tn(this,Me);tn(this,ye);var o;var r=new Map,i=(u,s)=>{var c=Mr(s);return r.set(u,c),c};const a=new Proxy({...t.props||{},$$events:{}},{get(u,s){return l(r.get(s)??i(s,Reflect.get(u,s)))},has(u,s){return s===vn?!0:(l(r.get(s)??i(s,Reflect.get(u,s))),Reflect.has(u,s))},set(u,s,c){return y(r.get(s)??i(s,c),c),Reflect.set(u,s,c)}});rn(this,ye,(t.hydrate?na:Xn)(t.component,{target:t.target,anchor:t.anchor,props:a,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&A(),rn(this,Me,a.$$events);for(const u of Object.keys(he(this,ye)))u==="$set"||u==="$destroy"||u==="$on"||It(this,u,{get(){return he(this,ye)[u]},set(s){he(this,ye)[u]=s},enumerable:!0});he(this,ye).$set=u=>{Object.assign(a,u)},he(this,ye).$destroy=()=>{ia(he(this,ye))}}$set(t){he(this,ye).$set(t)}$on(t,r){he(this,Me)[t]=he(this,Me)[t]||[];const i=(...a)=>r.call(this,...a);return he(this,Me)[t].push(i),()=>{he(this,Me)[t]=he(this,Me)[t].filter(a=>a!==i)}}$destroy(){he(this,ye).$destroy()}}Me=new WeakMap,ye=new WeakMap;let si;typeof HTMLElement=="function"&&(si=class extends HTMLElement{constructor(t,r,i){super();Ie(this,"$$ctor");Ie(this,"$$s");Ie(this,"$$c");Ie(this,"$$cn",!1);Ie(this,"$$d",{});Ie(this,"$$r",!1);Ie(this,"$$p_d",{});Ie(this,"$$l",{});Ie(this,"$$l_u",new Map);Ie(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const a=this.$$c.$on(t,r);this.$$l_u.set(r,a)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const a=this.$$l_u.get(r);a&&(a(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return o=>{const u=document.createElement("slot");a!=="default"&&(u.name=a),q(o,u)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=ya(this);for(const a of this.$$s)a in i&&(a==="default"&&!this.$$d.children?(this.$$d.children=t(a),r.default=!0):r[a]=t(a));for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=vr(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=_a({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Oo(()=>{Dr(()=>{var a;this.$$r=!0;for(const o of Zt(this.$$c)){if(!((a=this.$$p_d[o])!=null&&a.reflect))continue;this.$$d[o]=this.$$c[o];const u=vr(o,this.$$d[o],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,u)}this.$$r=!1})});for(const a in this.$$l)for(const o of this.$$l[a]){const u=this.$$c.$on(a,o);this.$$l_u.set(o,u)}this.$$l={}}}attributeChangedCallback(t,r,i){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=vr(t,i,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Zt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function vr(e,t,r,i){var o;const a=(o=r[e])==null?void 0:o.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(a){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ya(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function wa(e,t,r,i,a,o){let u=class extends si{constructor(){super(e,r,a),this.$$p_d=t}static get observedAttributes(){return Zt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Zt(t).forEach(s=>{It(u.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=vr(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var _=(h=Qe(d,s))==null?void 0:h.get;_?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{It(u.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=u,u}const ui=new TextEncoder;function Ea(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Ca(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const a=await fi(i,e,t);return{algorithm:t,challenge:a,salt:i,signature:""}}async function fi(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return Ea(await crypto.subtle.digest(r.toUpperCase(),ui.encode(e+t)))}function xa(e,t,r="SHA-256",i=1e6,a=0){const o=new AbortController,u=Date.now();return{promise:(async()=>{for(let c=a;c<=i;c+=1){if(o.signal.aborted)return null;if(await fi(t,c,r)===e)return{number:c,took:Date.now()-u}}return null})(),controller:o}}function ci(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ka(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Aa(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function Ia(e,t="",r=1e6,i=0){const a="AES-GCM",o=new AbortController,u=Date.now(),s=async()=>{for(let _=i;_<=r;_+=1){if(o.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:a,iv:Aa(_)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-u}}catch{}}return null};let c=null,d=null;try{d=ka(e);const _=await crypto.subtle.digest("SHA-256",ui.encode(t));c=await crypto.subtle.importKey("raw",_,a,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}var C=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(C||{}),ee=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ee||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>dr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(dr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(dr(globalThis.altchaI18n.store))},store:va({})};const Ra={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.altchaI18n.set("en",Ra);const Br=(e,t)=>{let r=To(()=>go(t==null?void 0:t(),24));var i=Da();Se(()=>{T(i,"width",l(r)),T(i,"height",l(r))}),q(e,i)};function Sa(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function $a(e,t){e.preventDefault(),t()}function Ta(e,t,r,i,a,o,u,s){var c;[C.UNVERIFIED,C.ERROR,C.EXPIRED,C.CODE].includes(l(t))?r()!==!1&&((c=l(i))==null?void 0:c.reportValidity())===!1?y(a,!1):o()?u():s():y(a,!0)}var Da=ur('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),Na=xe('<input type="hidden">'),La=xe('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Oa=ur('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),Pa=ur('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),Fa=ur('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),Ma=xe('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Va=xe("<audio hidden autoplay><source></audio>"),Ua=xe('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),ja=xe("<div><!></div>"),qa=xe("<div><!></div>"),Ba=xe('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),Ha=xe('<div class="altcha-footer"><div><!></div></div>'),Ga=xe('<div class="altcha-anchor-arrow"></div>'),Ya=xe('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function di(e,t){var Ki,Xi;Gn(t,!0);const[r,i]=pa(),a=()=>ga(Za,"$altchaI18nStore",r);let o=I(t,"auto",7,void 0),u=I(t,"blockspam",7,void 0),s=I(t,"challengeurl",7,void 0),c=I(t,"challengejson",7,void 0),d=I(t,"credentials",7,void 0),_=I(t,"customfetch",7,void 0),h=I(t,"debug",7,!1),p=I(t,"delay",7,0),w=I(t,"disableautofocus",7,!1),D=I(t,"expire",7,void 0),x=I(t,"floating",7,void 0),j=I(t,"floatinganchor",7,void 0),pe=I(t,"floatingoffset",7,void 0),te=I(t,"floatingpersist",7,!1),le=I(t,"hidefooter",7,!1),re=I(t,"hidelogo",7,!1),_t=I(t,"id",7,void 0),H=I(t,"language",7,void 0),ce=I(t,"name",7,"altcha"),ke=I(t,"maxnumber",7,1e6),Mt=I(t,"mockerror",7,!1),Ze=I(t,"obfuscated",7,void 0),Ne=I(t,"overlay",7,void 0),Vt=I(t,"overlaycontent",7,void 0),gr=I(t,"plugins",7,void 0),Ut=I(t,"refetchonexpire",7,!0),at=I(t,"sentinel",7,void 0),Le=I(t,"spamfilter",7,!1),bt=I(t,"strings",7,void 0),we=I(t,"test",7,!1),se=I(t,"verifyurl",7,void 0),yt=I(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),jt=I(t,"workerurl",7,void 0);const{altchaI18n:Wa}=globalThis,Za=Wa.store,pi=["SHA-256","SHA-384","SHA-512"],za="https://altcha.org/",ze=(n,f)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:f}))},mi=(Xi=(Ki=document.documentElement.lang)==null?void 0:Ki.split("-"))==null?void 0:Xi[0],Hr=$t(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),Gr=$t(()=>c()?Di(c()):void 0),Ja=$t(()=>bt()?Di(bt()):{}),U=$t(()=>({...wi(a()),...l(Ja)})),_i=$t(()=>`${_t()||ce()}_checkbox_${Math.round(Math.random()*1e8)}`);let qt=V(!1),W=V(null),R=V(qe(C.UNVERIFIED)),B=V(void 0),Bt=V(null),Je=V(null),me=V(null),Yr=V(null),wt=V(null),P=V(null),Et=V(null),lt=V(null),Oe=null,X=V(null),st=V(!1),Ke=[],Wr=V(!1),Ve=V(null);$r(()=>{ul(l(lt))}),$r(()=>{fl(l(R))}),ha(()=>{Ka(),y(Et,null),l(P)&&(l(P).removeEventListener("submit",Ii),l(P).removeEventListener("reset",Ri),l(P).removeEventListener("focusin",Ai),y(P,null)),Oe&&(clearTimeout(Oe),Oe=null),document.removeEventListener("click",xi),document.removeEventListener("scroll",ki),window.removeEventListener("resize",Ti)}),oi(()=>{var n;S("mounted","2.1.0-beta.2"),S("workers",yt()),tl(),S("plugins",Ke.length?Ke.map(f=>f.constructor.pluginName).join(", "):"none"),we()&&S("using test mode"),D()&&zr(D()),o()!==void 0&&S("auto",o()),x()!==void 0&&Li(x()),y(P,(n=l(B))==null?void 0:n.closest("form"),!0),l(P)&&(l(P).addEventListener("submit",Ii,{capture:!0}),l(P).addEventListener("reset",Ri),(o()==="onfocus"||te()==="focus")&&l(P).addEventListener("focusin",Ai)),Ne()&&Oi(!0),o()==="onload"&&(Ze()?Ht():Ue()),l(Hr)&&(le()||re())&&S("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{ze("load")})});function pr(n,f){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:f.number,salt:n.salt,signature:n.signature,test:we()?!0:void 0,took:f.took}))}function Ka(){for(const n of Ke)n.destroy()}function bi(){s()&&Ut()&&l(R)===C.VERIFIED?Ue():ut(C.EXPIRED,l(U).expired)}async function Xa(){var n;if(Mt())throw S("mocking error"),new Error("Mocked error.");if(l(Gr))return S("using provided json data"),l(Gr);if(we())return S("generating test challenge",{test:we()}),Ca(typeof we()!="boolean"?+we():void 0);{if(!s()&&l(P)){const k=l(P).getAttribute("action");k!=null&&k.includes("/form/")&&s(k+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");S("fetching challenge from",s());const f={credentials:typeof d()=="boolean"?"include":d(),headers:Le()!==!1?{"x-altcha-spam-filter":"1"}:{}},v=await yi()(s(),f);if(!v||!(v instanceof Response))throw new Error("Custom fetch function did not return a response.");if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const m=v.headers.get("X-Altcha-Config"),g=await v.json(),E=new URLSearchParams((n=g.salt.split("?"))==null?void 0:n[1]),b=E.get("expires")||E.get("expire");if(b){const k=new Date(+b*1e3),G=isNaN(k.getTime())?0:k.getTime()-Date.now();G>0&&zr(G)}if(m)try{const k=JSON.parse(m);k&&typeof k=="object"&&(k.verifyurl&&!k.verifyurl.startsWith("fn:")&&(k.verifyurl=Ci(k.verifyurl)),Mi(k))}catch(k){S("unable to configure from X-Altcha-Config",k)}return g}}function Qa(n){var v,m;const f=(v=l(P))==null?void 0:v.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((m=f==null?void 0:f.value)==null?void 0:m.slice(f.value.indexOf("@")))||void 0}function yi(){let n=fetch;if(_())if(S("using customfetch"),typeof _()=="string"){if(n=globalThis[_()]||null,!n)throw new Error(`Custom fetch function not found: ${_()}`)}else n=_();return n}function wi(n,f=[H()||"",document.documentElement.lang||"",...navigator.languages]){const v=Object.keys(n).map(g=>g.toLowerCase()),m=f.reduce((g,E)=>(E=E.toLowerCase(),g||(n[E]?E:null)||v.find(b=>E.split("-")[0]===b.split("-")[0])||null),null);return n[m||"en"]}function el(){return Le()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof Le()=="object"?Le():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function Ei(n){var v;return[...((v=l(P))==null?void 0:v.querySelectorAll(n!=null&&n.length?n.map(m=>`input[name="${m}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((m,g)=>{const E=g.name,b=g.value;return E&&b&&(m[E]=/\n/.test(b)?b.replace(new RegExp("(?<!\\r)\\n","g"),`\r
4
- `):b),m},{})}function Ci(n,f){const v=new URL(s()||location.origin),m=new URL(n,v);if(m.search||(m.search=v.search),f)for(const g in f)f[g]!==void 0&&f[g]!==null&&m.searchParams.set(g,f[g]);return m.toString()}function tl(){const n=gr()!==void 0?gr().split(","):void 0;for(const f of globalThis.altchaPlugins)(!n||n.includes(f.pluginName))&&Ke.push(new f({el:l(B),clarify:Ht,dispatch:ze,getConfiguration:Vi,getFloatingAnchor:Ui,getState:ji,log:S,reset:ut,solve:Fi,setState:Pe,setFloatingAnchor:qi,verify:Ue}))}function S(...n){(h()||n.some(f=>f instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ce()}]`,...n)}function rl(){y(X,ee.PAUSED,!0)}function nl(n){y(X,ee.ERROR,!0)}function il(){y(X,ee.READY,!0)}function ol(){y(X,ee.LOADING,!0)}function al(){y(X,ee.PLAYING,!0)}function ll(){y(X,ee.PAUSED,!0)}function sl(n){var f;if(n.preventDefault(),n.stopPropagation(),l(W)){const v=new FormData(n.target),m=String(v.get("code"));if((f=se())!=null&&f.startsWith("fn:")){const g=se().replace(/^fn:/,"");if(S(`calling ${g} function instead of verifyurl`),!(g in globalThis))throw new Error(`Global function "${g}" is undefined.`);return globalThis[g]({challenge:l(W).challenge,code:m,solution:l(W).solution})}y(st,!0),Ni(pr(l(W).challenge,l(W).solution),m).then(({reason:g,verified:E})=>{E?(y(W,null),Pe(C.VERIFIED),S("verified"),Fr().then(()=>{var b;(b=l(Yr))==null||b.focus(),ze("verified",{payload:l(Ve)}),o()==="onsubmit"?Zr(l(Et)):Ne()&&mr()})):(ut(),y(lt,g||"Verification failed",!0))}).catch(g=>{y(W,null),Pe(C.ERROR,g),S("sentinel verification failed:",g)}).finally(()=>{y(st,!1)})}}function xi(n){var v;const f=n.target;x()&&f&&!l(B).contains(f)&&(l(R)===C.VERIFIED&&te()===!1||l(R)===C.VERIFIED&&te()==="focus"&&!((v=l(P))!=null&&v.matches(":focus-within"))||o()==="off"&&l(R)===C.UNVERIFIED)&&mr()}function ki(){x()&&l(R)!==C.UNVERIFIED&&Gt()}function ul(n){for(const f of Ke)typeof f.onErrorChange=="function"&&f.onErrorChange(l(lt))}function Ai(n){l(R)===C.UNVERIFIED?Ue():x()&&te()==="focus"&&l(R)===C.VERIFIED&&Jr()}function Ii(n){var m;const f=n.target;f!=null&&f.hasAttribute("data-code-challenge-form")||(y(Et,n.submitter,!0),l(P)&&o()==="onsubmit"?((m=l(Et))==null||m.blur(),l(R)===C.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{Zr(l(Et))})):l(R)!==C.VERIFIED&&(n.preventDefault(),n.stopPropagation(),l(R)===C.VERIFYING&&Si())):l(P)&&x()&&o()==="off"&&l(R)===C.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Jr()))}function Ri(){ut()}function Si(){l(R)===C.VERIFYING&&l(U).waitAlert&&alert(l(U).waitAlert)}function $i(){l(Je)?l(Je).paused?(l(Je).currentTime=0,l(Je).play()):l(Je).pause():(y(Wr,!0),requestAnimationFrame(()=>{var n;(n=l(Je))==null||n.play()}))}function fl(n){for(const f of Ke)typeof f.onStateChange=="function"&&f.onStateChange(l(R));x()&&l(R)!==C.UNVERIFIED&&requestAnimationFrame(()=>{Gt()}),y(qt,l(R)===C.VERIFIED),Ne()&&l(me)&&(l(R)!==C.UNVERIFIED?l(me).style.display="flex":l(me).style.display="none")}function Ti(){x()&&Gt()}function Di(n){return JSON.parse(n)}async function cl(n){if(!se())throw new Error("Attribute verifyurl not set.");S("requesting server verification from",se());const f={payload:n};if(Le()!==!1){const{blockedCountries:g,classifier:E,disableRules:b,email:k,expectedLanguages:G,expectedCountries:ne,fields:de,ipAddress:Xe,text:Xr,timeZone:yr}=el();f.blockedCountries=g,f.classifier=E,f.disableRules=b,f.email=k===!1?void 0:Qa(k),f.expectedCountries=ne,f.expectedLanguages=G||(mi?[mi]:void 0),f.fields=de===!1?void 0:Ei(de),f.ipAddress=Xe===!1?void 0:Xe||"auto",f.text=Xr,f.timeZone=yr===!1?void 0:yr||ci()}const v=await yi()(se(),{body:JSON.stringify(f),headers:{"content-type":"application/json"},method:"POST"});if(!v||!(v instanceof Response))throw new Error("Custom fetch function did not return a response.");if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const m=await v.json();if(m!=null&&m.payload&&y(Ve,m.payload,!0),ze("serververification",m),u()&&m.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Ni(n,f){if(!se())throw new Error("Attribute verifyurl not set.");S("requesting sentinel verification from",se());const v={code:f,payload:n};at()&&(v.fields=at().fields?Ei():void 0,v.timeZone=at().timeZone?ci():void 0);const m=await fetch(se(),{body:JSON.stringify(v),headers:{"content-type":"application/json"},method:"POST"});if(!m||!(m instanceof Response))throw new Error("Fetch function did not return a response.");if(m.status!==200)throw new Error(`Server responded with ${m.status}.`);const g=await m.json();return g!=null&&g.payload&&y(Ve,g.payload,!0),ze("sentinelverification",g),g}function Zr(n){var f;l(P)&&"requestSubmit"in l(P)?l(P).requestSubmit(n):(f=l(P))!=null&&f.reportValidity()&&(n?n.click():l(P).submit())}function zr(n){S("expire",n),Oe&&(clearTimeout(Oe),Oe=null),n<1?bi():Oe=setTimeout(bi,n)}function Li(n){S("floating",n),x()!==n&&(l(B).style.left="",l(B).style.top=""),x(n===!0||n===""?"auto":n===!1||n==="false"?void 0:x()),x()?(o()||o("onsubmit"),document.addEventListener("scroll",ki),document.addEventListener("click",xi),window.addEventListener("resize",Ti)):o()==="onsubmit"&&o(void 0)}function Oi(n){var f,v,m,g;if(l(me)&&((v=(f=l(B).parentElement)==null?void 0:f.parentElement)==null||v.append(l(B).parentElement),document.body.removeChild(l(me))),n&&(o()||o("onsubmit"),(g=(m=l(B))==null?void 0:m.parentElement)!=null&&g.parentElement)){y(me,document.createElement("div"),!0),l(B).parentElement.parentElement.appendChild(l(me));const E=document.createElement("div"),b=document.createElement("button");b.type="button",b.innerHTML="&times;",b.addEventListener("click",k=>{k.preventDefault(),ut()}),l(me).classList.add("altcha-overlay-backdrop"),b.classList.add("altcha-overlay-close-button"),E.classList.add("altcha-overlay"),l(me).append(E),E.append(b),Vt()&&E.append(...document.querySelectorAll(Vt())),E.append(l(B).parentElement)}}function Pi(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!pi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${pi.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Fi(n){let f=null;if("Worker"in window){try{f=await dl(n,n.maxNumber||n.maxnumber||ke())}catch(v){S(v)}if((f==null?void 0:f.number)!==void 0||"obfuscated"in n)return{data:n,solution:f}}if("obfuscated"in n){const v=await Ia(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await v.promise}}return{data:n,solution:await xa(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||ke()).promise}}async function dl(n,f=typeof we()=="number"?we():n.maxNumber||n.maxnumber||ke(),v=Math.ceil(yt())){const m=[];v=Math.min(16,f,Math.max(1,v));for(let b=0;b<v;b++)m.push(altchaCreateWorker(jt()));const g=Math.ceil(f/v),E=await Promise.all(m.map((b,k)=>{const G=k*g;return new Promise(ne=>{b.addEventListener("message",de=>{if(de.data)for(const Xe of m)Xe!==b&&Xe.postMessage({type:"abort"});ne(de.data)}),b.postMessage({payload:n,max:G+g,start:G,type:"work"})})}));for(const b of m)b.terminate();return E.find(b=>!!b)||null}async function Ht(){if(!Ze()){Pe(C.ERROR);return}const n=Ke.find(f=>f.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Pe(C.ERROR),S("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Mi(n){n.obfuscated!==void 0&&Ze(n.obfuscated),n.auto!==void 0&&(o(n.auto),o()==="onload"&&(Ze()?Ht():Ue())),n.blockspam!==void 0&&u(!!n.blockspam),n.customfetch!==void 0&&_(n.customfetch),n.floatinganchor!==void 0&&j(n.floatinganchor),n.delay!==void 0&&p(n.delay),n.floatingoffset!==void 0&&pe(n.floatingoffset),n.floating!==void 0&&Li(n.floating),n.expire!==void 0&&(zr(n.expire),D(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Pi(l(Gr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&h(!!n.debug),n.hidefooter!==void 0&&le(!!n.hidefooter),n.hidelogo!==void 0&&re(!!n.hidelogo),n.language!==void 0&&bt(wi(a(),[n.language])),n.maxnumber!==void 0&&ke(+n.maxnumber),n.mockerror!==void 0&&Mt(!!n.mockerror),n.name!==void 0&&ce(n.name),n.overlay!==void 0&&Oi(n.overlay),n.overlaycontent!==void 0&&Vt(n.overlaycontent),n.refetchonexpire!==void 0&&Ut(!!n.refetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&at(n.sentinel),n.spamfilter!==void 0&&Le(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&bt(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&we(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&yt(+n.workers),n.workerurl!==void 0&&jt(n.workerurl)}function Vi(){return{auto:o(),blockspam:u(),challengeurl:s(),debug:h(),delay:p(),expire:D(),floating:x(),floatinganchor:j(),floatingoffset:pe(),hidefooter:le(),hidelogo:re(),name:ce(),maxnumber:ke(),mockerror:Mt(),obfuscated:Ze(),overlay:Ne(),refetchonexpire:Ut(),spamfilter:Le(),strings:l(U),test:we(),verifyurl:se(),workers:yt(),workerurl:jt()}}function Ui(){return l(wt)}function hl(n){return Ke.find(f=>f.constructor.pluginName===n)}function ji(){return l(R)}function mr(){l(B).style.display="none",Ne()&&l(me)&&(l(me).style.display="none")}function Gt(n=20){var f;if(l(B))if(l(wt)||y(wt,(j()?document.querySelector(j()):(f=l(P))==null?void 0:f.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||l(P),!0),l(wt)){const v=parseInt(pe(),10)||12,m=l(wt).getBoundingClientRect(),g=l(B).getBoundingClientRect(),E=document.documentElement.clientHeight,b=document.documentElement.clientWidth,k=x()==="auto"?m.bottom+g.height+v+n>E:x()==="top",G=Math.max(n,Math.min(b-n-g.width,m.left+m.width/2-g.width/2));if(k?l(B).style.top=`${m.top-(g.height+v)}px`:l(B).style.top=`${m.bottom+v}px`,l(B).style.left=`${G}px`,l(B).setAttribute("data-floating",k?"top":"bottom"),l(Bt)){const ne=l(Bt).getBoundingClientRect();l(Bt).style.left=m.left-G+m.width/2-ne.width/2+"px"}}else S("unable to find floating anchor element")}function ut(n=C.UNVERIFIED,f=null){Oe&&(clearTimeout(Oe),Oe=null),y(qt,!1),y(Ve,null),y(W,null),y(Wr,!1),y(X,null),Pe(n,f)}function qi(n){y(wt,n,!0)}function Pe(n,f=null){y(R,n,!0),y(lt,f,!0),ze("statechange",{payload:l(Ve),state:l(R)})}function Jr(){l(B).style.display="block",x()&&Gt(),Ne()&&l(me)&&(l(me).style.display="flex")}async function Ue(){return ut(C.VERIFYING),await new Promise(n=>setTimeout(n,p()||0)),Xa().then(n=>(Pi(n),S("challenge",n),Fi(n))).then(({data:n,solution:f})=>{var v;if(S("solution",f),!f||n&&"challenge"in n&&!("clearText"in f))if((f==null?void 0:f.number)!==void 0&&"challenge"in n)if(se()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((v=document.activeElement)==null?void 0:v.tagName)||"")&&w()===!1&&document.activeElement.blur(),y(W,{challenge:n,solution:f},!0);else{if(se()&&at()!==void 0)return Ni(pr(n,f));if(se())return cl(pr(n,f));y(Ve,pr(n,f),!0),S("payload",l(Ve))}else throw S("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{l(W)?(Pe(C.CODE),Fr().then(()=>{ze("code",{codeChallenge:l(W)})})):(Pe(C.VERIFIED),S("verified"),Fr().then(()=>{ze("verified",{payload:l(Ve)}),o()==="onsubmit"?Zr(l(Et)):Ne()&&mr()}))}).catch(n=>{S(n),Pe(C.ERROR,n.message)})}var Bi=Ya(),Hi=St(Bi);oa(Hi,t,"default",{});var Ct=J(Hi,2),Kr=z(Ct),_r=z(Kr);let Gi;var Yi=z(_r);{var vl=n=>{Br(n)};K(Yi,n=>{l(R)===C.VERIFYING&&n(vl)})}var ft=J(Yi,2);ti(ft),ft.__change=[Ta,R,Le,P,qt,Ze,Ht,Ue],cr(ft,n=>y(Yr,n),()=>l(Yr)),Z(_r);var br=J(_r,2),gl=z(br);{var pl=n=>{var f=fr(),v=St(f);ot(v,()=>l(U).verified),q(n,f)},ml=(n,f)=>{{var v=g=>{var E=fr(),b=St(E);ot(b,()=>l(U).verifying),q(g,E)},m=(g,E)=>{{var b=G=>{var ne=fr(),de=St(ne);ot(de,()=>l(U).verificationRequired),q(G,ne)},k=G=>{var ne=fr(),de=St(ne);ot(de,()=>l(U).label),q(G,ne)};K(g,G=>{l(R)===C.CODE?G(b):G(k,!1)},E)}};K(n,g=>{l(R)===C.VERIFYING?g(v):g(m,!1)},f)}};K(gl,n=>{l(R)===C.VERIFIED?n(pl):n(ml,!1)})}Z(br);var Wi=J(br,2);{var _l=n=>{var f=Na();ti(f),Se(()=>{T(f,"name",ce()),fa(f,l(Ve))}),q(n,f)};K(Wi,n=>{l(R)===C.VERIFIED&&n(_l)})}var Zi=J(Wi,2);{var bl=n=>{var f=La(),v=z(f);T(v,"href",za),Z(f),Se(()=>T(v,"aria-label",l(U).ariaLinkLabel)),q(n,f)};K(Zi,n=>{(re()!==!0||l(Hr))&&n(bl)})}var yl=J(Zi,2);{var wl=n=>{var f=Ua(),v=J(z(f),2),m=z(v),g=J(m,2);Xo(g,!w()),g.__keydown=[Sa,$i];var E=J(g,2),b=z(E),k=z(b);{var G=Ae=>{var Q=Ma();Q.__click=$i;var wr=z(Q);{var Yt=xt=>{Br(xt,()=>20)},Sl=(xt,$l)=>{{var Tl=kt=>{var Qr=Oa();q(kt,Qr)},Dl=(kt,Qr)=>{{var Nl=At=>{var en=Pa();q(At,en)},Ll=At=>{var en=Fa();q(At,en)};K(kt,At=>{l(X)===ee.PLAYING?At(Nl):At(Ll,!1)},Qr)}};K(xt,kt=>{l(X)===ee.ERROR?kt(Tl):kt(Dl,!1)},$l)}};K(wr,xt=>{l(X)===ee.LOADING?xt(Yt):xt(Sl,!1)})}Z(Q),Se(()=>{T(Q,"title",l(U).getAudioChallenge),Q.disabled=l(X)===ee.LOADING||l(X)===ee.ERROR||l(st),T(Q,"aria-label",l(X)===ee.LOADING?l(U).loading:l(U).getAudioChallenge)}),q(Ae,Q)};K(k,Ae=>{l(W).challenge.codeChallenge.audio&&Ae(G)})}var ne=J(k,2);ne.__click=[$a,Ue],Z(b);var de=J(b,2),Xe=z(de);{var Xr=Ae=>{Br(Ae,()=>16)};K(Xe,Ae=>{l(st)&&Ae(Xr)})}var yr=J(Xe);Z(de),Z(E);var Il=J(E,2);{var Rl=Ae=>{var Q=Va(),wr=z(Q);Z(Q),cr(Q,Yt=>y(Je,Yt),()=>l(Je)),Se(Yt=>T(wr,"src",Yt),[()=>Ci(l(W).challenge.codeChallenge.audio,{language:H()})]),We("loadstart",Q,ol),We("canplay",Q,il),We("pause",Q,ll),We("playing",Q,al),We("ended",Q,rl),We("error",wr,nl),q(Ae,Q)};K(Il,Ae=>{l(W).challenge.codeChallenge.audio&&l(Wr)&&Ae(Rl)})}Z(v),Z(f),Se(()=>{T(f,"aria-label",l(U).verificationRequired),T(m,"src",l(W).challenge.codeChallenge.image),T(g,"minlength",l(W).challenge.codeChallenge.length||1),T(g,"maxlength",l(W).challenge.codeChallenge.length),T(g,"placeholder",l(U).enterCode),T(g,"aria-label",l(X)===ee.LOADING?l(U).loading:l(X)===ee.PLAYING?"":l(U).enterCodeAria),T(g,"aria-live",l(X)?"assertive":"polite"),T(g,"aria-busy",l(X)===ee.LOADING),g.disabled=l(st),T(ne,"aria-label",l(U).reload),T(ne,"title",l(U).reload),ne.disabled=l(st),de.disabled=l(st),T(de,"aria-label",l(U).verify),ra(yr,` ${l(U).verify??""}`)}),We("submit",v,sl,!0),q(n,f)};K(yl,n=>{var f;(f=l(W))!=null&&f.challenge.codeChallenge&&n(wl)})}Z(Kr);var zi=J(Kr,2);{var El=n=>{var f=Ba(),v=J(z(f),2);{var m=E=>{var b=ja(),k=z(b);ot(k,()=>l(U).expired),Z(b),Se(()=>T(b,"title",l(lt))),q(E,b)},g=E=>{var b=qa(),k=z(b);ot(k,()=>l(U).error),Z(b),Se(()=>T(b,"title",l(lt))),q(E,b)};K(v,E=>{l(R)===C.EXPIRED?E(m):E(g,!1)})}Z(f),q(n,f)};K(zi,n=>{(l(lt)||l(R)===C.EXPIRED)&&n(El)})}var Ji=J(zi,2);{var Cl=n=>{var f=Ha(),v=z(f),m=z(v);ot(m,()=>l(U).footer),Z(v),Z(f),q(n,f)};K(Ji,n=>{l(U).footer&&(le()!==!0||l(Hr))&&n(Cl)})}var xl=J(Ji,2);{var kl=n=>{var f=Ga();cr(f,v=>y(Bt,v),()=>l(Bt)),q(n,f)};K(xl,n=>{x()&&n(kl)})}Z(Ct),cr(Ct,n=>y(B,n),()=>l(B)),Se(n=>{T(Ct,"data-state",l(R)),T(Ct,"data-floating",x()),T(Ct,"data-overlay",Ne()),Gi=la(_r,1,"altcha-checkbox",null,Gi,n),T(ft,"id",l(_i)),ft.required=o()!=="onsubmit"&&(!x()||o()!=="off"),T(br,"for",l(_i))},[()=>({"altcha-checkbox-verifying":l(R)===C.VERIFYING})]),We("invalid",ft,Si),da(ft,()=>l(qt),n=>y(qt,n)),q(e,Bi);var Al=Yn({clarify:Ht,configure:Mi,getConfiguration:Vi,getFloatingAnchor:Ui,getPlugin:hl,getState:ji,hide:mr,repositionFloating:Gt,reset:ut,setFloatingAnchor:qi,setState:Pe,show:Jr,verify:Ue,get auto(){return o()},set auto(n=void 0){o(n),A()},get blockspam(){return u()},set blockspam(n=void 0){u(n),A()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),A()},get challengejson(){return c()},set challengejson(n=void 0){c(n),A()},get credentials(){return d()},set credentials(n=void 0){d(n),A()},get customfetch(){return _()},set customfetch(n=void 0){_(n),A()},get debug(){return h()},set debug(n=!1){h(n),A()},get delay(){return p()},set delay(n=0){p(n),A()},get disableautofocus(){return w()},set disableautofocus(n=!1){w(n),A()},get expire(){return D()},set expire(n=void 0){D(n),A()},get floating(){return x()},set floating(n=void 0){x(n),A()},get floatinganchor(){return j()},set floatinganchor(n=void 0){j(n),A()},get floatingoffset(){return pe()},set floatingoffset(n=void 0){pe(n),A()},get floatingpersist(){return te()},set floatingpersist(n=!1){te(n),A()},get hidefooter(){return le()},set hidefooter(n=!1){le(n),A()},get hidelogo(){return re()},set hidelogo(n=!1){re(n),A()},get id(){return _t()},set id(n=void 0){_t(n),A()},get language(){return H()},set language(n=void 0){H(n),A()},get name(){return ce()},set name(n="altcha"){ce(n),A()},get maxnumber(){return ke()},set maxnumber(n=1e6){ke(n),A()},get mockerror(){return Mt()},set mockerror(n=!1){Mt(n),A()},get obfuscated(){return Ze()},set obfuscated(n=void 0){Ze(n),A()},get overlay(){return Ne()},set overlay(n=void 0){Ne(n),A()},get overlaycontent(){return Vt()},set overlaycontent(n=void 0){Vt(n),A()},get plugins(){return gr()},set plugins(n=void 0){gr(n),A()},get refetchonexpire(){return Ut()},set refetchonexpire(n=!0){Ut(n),A()},get sentinel(){return at()},set sentinel(n=void 0){at(n),A()},get spamfilter(){return Le()},set spamfilter(n=!1){Le(n),A()},get strings(){return bt()},set strings(n=void 0){bt(n),A()},get test(){return we()},set test(n=!1){we(n),A()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),A()},get workers(){return yt()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){yt(n),A()},get workerurl(){return jt()},set workerurl(n=void 0){jt(n),A()}});return i(),Al}ta(["change","keydown","click"]),customElements.define("altcha-widget",wa(di,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1));const hi='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:999990}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function vi(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Wt,vi(hi),vi(hi),$.Altcha=di,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
1
+ (function($,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):($=typeof globalThis<"u"?globalThis:$||self,N($.altcha={}))})(this,function($){"use strict";var Ol=Object.defineProperty;var Qi=$=>{throw TypeError($)};var Pl=($,N,W)=>N in $?Ol($,N,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[N]=W;var Re=($,N,W)=>Pl($,typeof N!="symbol"?N+"":N,W),eo=($,N,W)=>N.has($)||Qi("Cannot "+W);var he=($,N,W)=>(eo($,N,"read from private field"),W?W.call($):N.get($)),tn=($,N,W)=>N.has($)?Qi("Cannot add the same private member more than once"):N instanceof WeakSet?N.add($):N.set($,W),rn=($,N,W,Zt)=>(eo($,N,"write to private field"),Zt?Zt.call($,W):N.set($,W),W);var gi,Me,ye;const N=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2
+ `,W=typeof self<"u"&&self.Blob&&new Blob([N],{type:"text/javascript;charset=utf-8"});function Zt(e){let t;try{if(t=W&&(self.URL||self.webkitURL).createObjectURL(W),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(N),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const to="5";typeof window<"u"&&((gi=window.__svelte??(window.__svelte={})).v??(gi.v=new Set)).add(to);const ro=1,no=4,io=8,oo=16,ao=1,lo=2,Cr="[",nn="[!",on="]",ct={},ue=Symbol(),so="http://www.w3.org/1999/xhtml",an=!1;function ln(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var sn=Array.isArray,uo=Array.prototype.indexOf,fo=Array.from,zt=Object.keys,It=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,co=Object.getOwnPropertyDescriptors,ho=Object.prototype,vo=Array.prototype,un=Object.getPrototypeOf,fn=Object.isExtensible;const dt=()=>{};function cn(e){for(var t=0;t<e.length;t++)e[t]()}function go(e,t,r=!1){return e===void 0?r?t():t:e}const Ee=2,dn=4,Jt=8,xr=16,Fe=32,et=64,Kt=128,ve=256,Xt=512,fe=1024,Se=2048,tt=4096,ht=8192,Qt=16384,po=32768,kr=65536,mo=1<<19,hn=1<<20,Ar=1<<21,Rt=Symbol("$state"),vn=Symbol("legacy props"),_o=Symbol("");function bo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function yo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Eo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Co(){throw new Error("https://svelte.dev/e/hydration_failed")}function xo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ko(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ao(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Io(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function er(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function vt(e){F=e}let M;function je(e){if(e===null)throw er(),ct;return M=e}function gt(){return je(Be(M))}function Z(e){if(F){if(Be(M)!==null)throw er(),ct;M=e}}function Ro(){for(var e=0,t=M;;){if(t.nodeType===8){var r=t.data;if(r===on){if(e===0)return t;e-=1}else(r===Cr||r===nn)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let So=!1;function qe(e){if(typeof e!="object"||e===null||Rt in e)return e;const t=un(e);if(t!==ho&&t!==vo)return e;var r=new Map,i=sn(e),a=V(0),o=L,u=s=>{var c=L;De(o);var d=s();return De(c),d};return i&&r.set("length",V(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&ko();var _=r.get(c);return _===void 0?(_=u(()=>V(d.value)),r.set(c,_)):b(_,u(()=>qe(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,u(()=>V(ue))),Ir(a));else{if(i&&typeof c=="string"){var _=r.get("length"),h=Number(c);Number.isInteger(h)&&h<_.v&&b(_,h)}b(d,ue),Ir(a)}return!0},get(s,c,d){var w;if(c===Rt)return e;var _=r.get(c),h=c in s;if(_===void 0&&(!h||(w=Qe(s,c))!=null&&w.writable)&&(_=u(()=>V(qe(h?s[c]:ue))),r.set(c,_)),_!==void 0){var m=l(_);return m===ue?void 0:m}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var _=r.get(c);_&&(d.value=l(_))}else if(d===void 0){var h=r.get(c),m=h==null?void 0:h.v;if(h!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===Rt)return!0;var d=r.get(c),_=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||O!==null&&(!_||(m=Qe(s,c))!=null&&m.writable)){d===void 0&&(d=u(()=>V(_?qe(s[c]):ue)),r.set(c,d));var h=l(d);if(h===ue)return!1}return _},set(s,c,d,_){var te;var h=r.get(c),m=c in s;if(i&&c==="length")for(var w=d;w<h.v;w+=1){var D=r.get(w+"");D!==void 0?b(D,ue):w in s&&(D=u(()=>V(ue)),r.set(w+"",D))}h===void 0?(!m||(te=Qe(s,c))!=null&&te.writable)&&(h=u(()=>V(void 0)),b(h,u(()=>qe(d))),r.set(c,h)):(m=h.v!==ue,b(h,u(()=>qe(d))));var C=Reflect.getOwnPropertyDescriptor(s,c);if(C!=null&&C.set&&C.set.call(_,d),!m){if(i&&typeof c=="string"){var q=r.get("length"),pe=Number(c);Number.isInteger(pe)&&pe>=q.v&&b(q,pe+1)}Ir(a)}return!0},ownKeys(s){l(a);var c=Reflect.ownKeys(s).filter(h=>{var m=r.get(h);return m===void 0||m.v!==ue});for(var[d,_]of r)_.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Ao()}})}function Ir(e,t=1){b(e,e.v+t)}var gn,pn,mn,_n;function Rr(){if(gn===void 0){gn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mn=Qe(t,"firstChild").get,_n=Qe(t,"nextSibling").get,fn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fn(r)&&(r.__t=void 0)}}function tr(e=""){return document.createTextNode(e)}function _e(e){return mn.call(e)}function Be(e){return _n.call(e)}function z(e,t){if(!F)return _e(e);var r=_e(M);return r===null&&(r=M.appendChild(tr())),je(r),r}function St(e,t){if(!F){var r=_e(e);return r instanceof Comment&&r.data===""?Be(r):r}return M}function J(e,t=1,r=!1){let i=F?M:e;for(var a;t--;)a=i,i=Be(i);if(!F)return i;var o=i==null?void 0:i.nodeType;if(r&&o!==3){var u=tr();return i===null?a==null||a.after(u):i.before(u),je(u),u}return je(i),i}function $o(e){e.textContent=""}function bn(e){return e===this.v}function yn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Sr(e){return!yn(e,this.v)}function rr(e){var t=Ee|Se,r=L!==null&&(L.f&Ee)!==0?L:null;return O===null||r!==null&&(r.f&ve)!==0?t|=ve:O.f|=hn,{ctx:ae,deps:null,effects:null,equals:bn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??O}}function $t(e){const t=rr(e);return On(t),t}function To(e){const t=rr(e);return t.equals=Sr,t}function wn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Do(e){for(var t=e.parent;t!==null;){if((t.f&Ee)===0)return t;t=t.parent}return null}function En(e){var t,r=O;Ge(Do(e));try{wn(e),t=Un(e)}finally{Ge(r)}return t}function Cn(e){var t=En(e),r=(We||(e.f&ve)!==0)&&e.deps!==null?tt:fe;Ce(e,r),e.equals(t)||(e.v=t,e.wv=Fn())}function No(e){O===null&&L===null&&wo(),L!==null&&(L.f&ve)!==0&&O===null&&yo(),Nt&&bo()}function Lo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function rt(e,t,r,i=!0){var a=O,o={ctx:ae,deps:null,nodes_start:null,nodes_end:null,f:e|Se,first:null,fn:t,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Fr(o),o.f|=po}catch(c){throw He(o),c}else t!==null&&ur(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(hn|Kt))===0;if(!u&&i&&(a!==null&&Lo(o,a),L!==null&&(L.f&Ee)!==0)){var s=L;(s.effects??(s.effects=[])).push(o)}return o}function $r(e){const t=rt(Jt,null,!1);return Ce(t,fe),t.teardown=e,t}function Tr(e){No();var t=O!==null&&(O.f&Fe)!==0&&ae!==null&&!ae.m;if(t){var r=ae;(r.e??(r.e=[])).push({fn:e,effect:O,reaction:L})}else{var i=Dr(e);return i}}function Oo(e){const t=rt(et,e,!0);return()=>{He(t)}}function Po(e){const t=rt(et,e,!0);return(r={})=>new Promise(i=>{r.outro?Or(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Dr(e){return rt(dn,e,!1)}function Nr(e){return rt(Jt,e,!0)}function $e(e,t=[],r=rr){const i=t.map(r);return xn(()=>e(...i.map(l)))}function xn(e,t=0){return rt(Jt|xr|t,e,!0)}function Lr(e,t=!0){return rt(Jt|Fe,e,!0,t)}function kn(e){var t=e.teardown;if(t!==null){const r=Nt,i=L;Ln(!0),De(null);try{t.call(null)}finally{Ln(r),De(i)}}}function An(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&et)!==0?r.parent=null:He(r,t),r=i}}function Fo(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Fe)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&mo)!==0)&&e.nodes_start!==null&&(In(e.nodes_start,e.nodes_end),r=!0),An(e,t&&!r),sr(e,0),Ce(e,Qt);var i=e.transitions;if(i!==null)for(const o of i)o.stop();kn(e);var a=e.parent;a!==null&&a.first!==null&&Rn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function In(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function Rn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Or(e,t){var r=[];Sn(e,r,!0),Mo(r,()=>{He(e),t&&t()})}function Mo(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var a of e)a.out(i)}else t()}function Sn(e,t,r){if((e.f&ht)===0){if(e.f^=ht,e.transitions!==null)for(const u of e.transitions)(u.is_global||r)&&t.push(u);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&kr)!==0||(i.f&Fe)!==0;Sn(i,t,o?r:!1),i=a}}}function $n(e){Tn(e,!0)}function Tn(e,t){if((e.f&ht)!==0){e.f^=ht,(e.f&fe)===0&&(e.f^=fe),Ot(e)&&(Ce(e,Se),ur(e));for(var r=e.first;r!==null;){var i=r.next,a=(r.f&kr)!==0||(r.f&Fe)!==0;Tn(r,a?t:!1),r=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const Vo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Tt=[],Dt=[];function Dn(){var e=Tt;Tt=[],cn(e)}function Nn(){var e=Dt;Dt=[],cn(e)}function Pr(e){Tt.length===0&&queueMicrotask(Dn),Tt.push(e)}function Uo(e){Dt.length===0&&Vo(Nn),Dt.push(e)}function jo(){Tt.length>0&&Dn(),Dt.length>0&&Nn()}let nr=!1,ir=!1,or=null,nt=!1,Nt=!1;function Ln(e){Nt=e}let Lt=[],Fl=[],L=null,Te=!1;function De(e){L=e}let O=null;function Ge(e){O=e}let ie=null;function On(e){L!==null&&L.f&Ar&&(ie===null?ie=[e]:ie.push(e))}let oe=null,ge=0,be=null;function qo(e){be=e}let Pn=1,ar=0,We=!1;function Fn(){return++Pn}function Ot(e){var h;var t=e.f;if((t&Se)!==0)return!0;if((t&tt)!==0){var r=e.deps,i=(t&ve)!==0;if(r!==null){var a,o,u=(t&Xt)!==0,s=i&&O!==null&&!We,c=r.length;if(u||s){var d=e,_=d.parent;for(a=0;a<c;a++)o=r[a],(u||!((h=o==null?void 0:o.reactions)!=null&&h.includes(d)))&&(o.reactions??(o.reactions=[])).push(d);u&&(d.f^=Xt),s&&_!==null&&(_.f&ve)===0&&(d.f^=ve)}for(a=0;a<c;a++)if(o=r[a],Ot(o)&&Cn(o),o.wv>e.wv)return!0}(!i||O!==null&&!We)&&Ce(e,fe)}return!1}function Bo(e,t){for(var r=t;r!==null;){if((r.f&Kt)!==0)try{r.fn(e);return}catch{r.f^=Kt}r=r.parent}throw nr=!1,e}function Mn(e){return(e.f&Qt)===0&&(e.parent===null||(e.parent.f&Kt)===0)}function lr(e,t,r,i){if(nr){if(r===null&&(nr=!1),Mn(t))throw e;return}if(r!==null&&(nr=!0),Bo(e,t),Mn(t))throw e}function Vn(e,t,r=!0){var i=e.reactions;if(i!==null)for(var a=0;a<i.length;a++){var o=i[a];ie!=null&&ie.includes(e)||((o.f&Ee)!==0?Vn(o,t,!1):t===o&&(r?Ce(o,Se):(o.f&fe)!==0&&Ce(o,tt),ur(o)))}}function Un(e){var w;var t=oe,r=ge,i=be,a=L,o=We,u=ie,s=ae,c=Te,d=e.f;oe=null,ge=0,be=null,We=(d&ve)!==0&&(Te||!nt||L===null),L=(d&(Fe|et))===0?e:null,ie=null,Hn(e.ctx),Te=!1,ar++,e.f|=Ar;try{var _=(0,e.fn)(),h=e.deps;if(oe!==null){var m;if(sr(e,ge),h!==null&&ge>0)for(h.length=ge+oe.length,m=0;m<oe.length;m++)h[ge+m]=oe[m];else e.deps=h=oe;if(!We)for(m=ge;m<h.length;m++)((w=h[m]).reactions??(w.reactions=[])).push(e)}else h!==null&&ge<h.length&&(sr(e,ge),h.length=ge);if(Yn()&&be!==null&&!Te&&h!==null&&(e.f&(Ee|tt|Se))===0)for(m=0;m<be.length;m++)Vn(be[m],e);return a!==null&&a!==e&&(ar++,be!==null&&(i===null?i=be:i.push(...be))),_}finally{oe=t,ge=r,be=i,L=a,We=o,ie=u,Hn(s),Te=c,e.f^=Ar}}function Ho(e,t){let r=t.reactions;if(r!==null){var i=uo.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[i]=r[a],r.pop())}}r===null&&(t.f&Ee)!==0&&(oe===null||!oe.includes(t))&&(Ce(t,tt),(t.f&(ve|Xt))===0&&(t.f^=Xt),wn(t),sr(t,0))}function sr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Ho(e,r[i])}function Fr(e){var t=e.f;if((t&Qt)===0){Ce(e,fe);var r=O,i=ae,a=nt;O=e,nt=!0;try{(t&xr)!==0?Fo(e):An(e),kn(e);var o=Un(e);e.teardown=typeof o=="function"?o:null,e.wv=Pn;var u=e.deps,s;an&&So&&e.f&Se}catch(c){lr(c,e,r,i||e.ctx)}finally{nt=a,O=r}}}function Go(){try{Eo()}catch(e){if(or!==null)lr(e,or,null);else throw e}}function jn(){var e=nt;try{var t=0;for(nt=!0;Lt.length>0;){t++>1e3&&Go();var r=Lt,i=r.length;Lt=[];for(var a=0;a<i;a++){var o=Yo(r[a]);Wo(o)}Pt.clear()}}finally{ir=!1,nt=e,or=null}}function Wo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(Qt|ht))===0)try{Ot(i)&&(Fr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Rn(i):i.fn=null))}catch(a){lr(a,i,null,i.ctx)}}}function ur(e){ir||(ir=!0,queueMicrotask(jn));for(var t=or=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(et|Fe))!==0){if((r&fe)===0)return;t.f^=fe}}Lt.push(t)}function Yo(e){for(var t=[],r=e;r!==null;){var i=r.f,a=(i&(Fe|et))!==0,o=a&&(i&fe)!==0;if(!o&&(i&ht)===0){if((i&dn)!==0)t.push(r);else if(a)r.f^=fe;else try{Ot(r)&&Fr(r)}catch(c){lr(c,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function k(e){for(var t;;){if(jo(),Lt.length===0)return t;ir=!0,jn()}}async function Mr(){await Promise.resolve(),k()}function l(e){var t=e.f,r=(t&Ee)!==0;if(L!==null&&!Te){if(!(ie!=null&&ie.includes(e))){var i=L.deps;e.rv<ar&&(e.rv=ar,oe===null&&i!==null&&i[ge]===e?ge++:oe===null?oe=[e]:(!We||!oe.includes(e))&&oe.push(e))}}else if(r&&e.deps===null&&e.effects===null){var a=e,o=a.parent;o!==null&&(o.f&ve)===0&&(a.f^=ve)}return r&&(a=e,Ot(a)&&Cn(a)),Nt&&Pt.has(e)?Pt.get(e):e.v}function it(e){var t=Te;try{return Te=!0,e()}finally{Te=t}}const Zo=-7169;function Ce(e,t){e.f=e.f&Zo|t}const Pt=new Map;function qn(e,t){var r={f:0,v:e,reactions:null,equals:bn,rv:0,wv:0};return r}function V(e,t){const r=qn(e);return On(r),r}function Vr(e,t=!1){const r=qn(e);return t||(r.equals=Sr),r}function b(e,t,r=!1){L!==null&&!Te&&Yn()&&(L.f&(Ee|xr))!==0&&!(ie!=null&&ie.includes(e))&&Io();let i=r?qe(t):t;return zo(e,i)}function zo(e,t){if(!e.equals(t)){var r=e.v;Nt?Pt.set(e,t):Pt.set(e,r),e.v=t,(e.f&Ee)!==0&&((e.f&Se)!==0&&En(e),Ce(e,(e.f&ve)===0?fe:tt)),e.wv=Fn(),Bn(e,Se),O!==null&&(O.f&fe)!==0&&(O.f&(Fe|et))===0&&(be===null?qo([e]):be.push(e))}return t}function Bn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,a=0;a<i;a++){var o=r[a],u=o.f;(u&Se)===0&&(Ce(o,t),(u&(fe|ve))!==0&&((u&Ee)!==0?Bn(o,tt):ur(o)))}}let ae=null;function Hn(e){ae=e}function Gn(e,t=!1,r){var i=ae={p:ae,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};$r(()=>{i.d=!0})}function Wn(e){const t=ae;if(t!==null){e!==void 0&&(t.x=e);const u=t.e;if(u!==null){var r=O,i=L;t.e=null;try{for(var a=0;a<u.length;a++){var o=u[a];Ge(o.effect),De(o.reaction),Dr(o.fn)}}finally{Ge(r),De(i)}}ae=t.p,t.m=!0}return e||{}}function Yn(){return!0}const Jo=["touchstart","touchmove"];function Ko(e){return Jo.includes(e)}function Xo(e,t){if(t){const r=document.body;e.autofocus=!0,Pr(()=>{document.activeElement===r&&e.focus()})}}let Zn=!1;function zn(){Zn||(Zn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Jn(e){var t=L,r=O;De(null),Ge(null);try{return e()}finally{De(t),Ge(r)}}function Qo(e,t,r,i=r){e.addEventListener(t,()=>Jn(r));const a=e.__on_r;a?e.__on_r=()=>{a(),i(!0)}:e.__on_r=()=>i(!0),zn()}const Kn=new Set,Ur=new Set;function ea(e,t,r,i={}){function a(o){if(i.capture||Ft.call(t,o),!o.cancelBubble)return Jn(()=>r==null?void 0:r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Pr(()=>{t.addEventListener(e,a,i)}):t.addEventListener(e,a,i),a}function Ye(e,t,r,i,a){var o={capture:i,passive:a},u=ea(e,t,r,o);(t===document.body||t===window||t===document)&&$r(()=>{t.removeEventListener(e,u,o)})}function ta(e){for(var t=0;t<e.length;t++)Kn.add(e[t]);for(var r of Ur)r(e)}function Ft(e){var te;var t=this,r=t.ownerDocument,i=e.type,a=((te=e.composedPath)==null?void 0:te.call(e))||[],o=a[0]||e.target,u=0,s=e.__root;if(s){var c=a.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=a.indexOf(t);if(d===-1)return;c<=d&&(u=c)}if(o=a[u]||e.target,o!==t){It(e,"currentTarget",{configurable:!0,get(){return o||r}});var _=L,h=O;De(null),Ge(null);try{for(var m,w=[];o!==null;){var D=o.assignedSlot||o.parentNode||o.host||null;try{var C=o["__"+i];if(C!=null&&(!o.disabled||e.target===o))if(sn(C)){var[q,...pe]=C;q.apply(o,[e,...pe])}else C.call(o,e)}catch(le){m?w.push(le):m=le}if(e.cancelBubble||D===t||D===null)break;o=D}if(m){for(let le of w)queueMicrotask(()=>{throw le});throw m}}finally{e.__root=t,delete e.currentTarget,De(_),Ge(h)}}}function jr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ne(e,t){var r=O;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function xe(e,t){var r=(t&ao)!==0,i=(t&lo)!==0,a,o=!e.startsWith("<!>");return()=>{if(F)return Ne(M,null),M;a===void 0&&(a=jr(o?e:"<!>"+e),r||(a=_e(a)));var u=i||pn?document.importNode(a,!0):a.cloneNode(!0);if(r){var s=_e(u),c=u.lastChild;Ne(s,c)}else Ne(u,u);return u}}function fr(e,t,r="svg"){var i=!e.startsWith("<!>"),a=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(F)return Ne(M,null),M;if(!o){var u=jr(a),s=_e(u);o=_e(s)}var c=o.cloneNode(!0);return Ne(c,c),c}}function cr(){if(F)return Ne(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=tr();return e.append(t,r),Ne(t,r),e}function B(e,t){if(F){O.nodes_end=M,gt();return}e!==null&&e.before(t)}function ra(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Xn(e,t){return Qn(e,t)}function na(e,t){Rr(),t.intro=t.intro??!1;const r=t.target,i=F,a=M;try{for(var o=_e(r);o&&(o.nodeType!==8||o.data!==Cr);)o=Be(o);if(!o)throw ct;vt(!0),je(o),gt();const u=Qn(e,{...t,anchor:o});if(M===null||M.nodeType!==8||M.data!==on)throw er(),ct;return vt(!1),u}catch(u){if(u===ct)return t.recover===!1&&Co(),Rr(),$o(r),vt(!1),Xn(e,t);throw u}finally{vt(i),je(a)}}const pt=new Map;function Qn(e,{target:t,anchor:r,props:i={},events:a,context:o,intro:u=!0}){Rr();var s=new Set,c=h=>{for(var m=0;m<h.length;m++){var w=h[m];if(!s.has(w)){s.add(w);var D=Ko(w);t.addEventListener(w,Ft,{passive:D});var C=pt.get(w);C===void 0?(document.addEventListener(w,Ft,{passive:D}),pt.set(w,1)):pt.set(w,C+1)}}};c(fo(Kn)),Ur.add(c);var d=void 0,_=Po(()=>{var h=r??t.appendChild(tr());return Lr(()=>{if(o){Gn({});var m=ae;m.c=o}a&&(i.$$events=a),F&&Ne(h,null),d=e(h,i)||{},F&&(O.nodes_end=M),o&&Wn()}),()=>{var D;for(var m of s){t.removeEventListener(m,Ft);var w=pt.get(m);--w===0?(document.removeEventListener(m,Ft),pt.delete(m)):pt.set(m,w)}Ur.delete(c),h!==r&&((D=h.parentNode)==null||D.removeChild(h))}});return qr.set(d,_),d}let qr=new WeakMap;function ia(e,t){const r=qr.get(e);return r?(qr.delete(e),r(t)):Promise.resolve()}function K(e,t,[r,i]=[0,0]){F&&r===0&&gt();var a=e,o=null,u=null,s=ue,c=r>0?kr:0,d=!1;const _=(m,w=!0)=>{d=!0,h(w,m)},h=(m,w)=>{if(s===(s=m))return;let D=!1;if(F&&i!==-1){if(r===0){const q=a.data;q===Cr?i=0:q===nn?i=1/0:(i=parseInt(q.substring(1)),i!==i&&(i=s?1/0:-1))}const C=i>r;!!s===C&&(a=Ro(),je(a),vt(!1),D=!0,i=-1)}s?(o?$n(o):w&&(o=Lr(()=>w(a))),u&&Or(u,()=>{u=null})):(u?$n(u):w&&(u=Lr(()=>w(a,[r+1,i]))),o&&Or(o,()=>{o=null})),D&&vt(!0)};xn(()=>{d=!1,t(_),d||h(null,null)},c),F&&(a=M)}function ot(e,t,r=!1,i=!1,a=!1){var o=e,u="";$e(()=>{var s=O;if(u===(u=t()??"")){F&&gt();return}if(s.nodes_start!==null&&(In(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),u!==""){if(F){M.data;for(var c=gt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw er(),ct;Ne(M,d),o=je(c);return}var _=u+"";r?_=`<svg>${_}</svg>`:i&&(_=`<math>${_}</math>`);var h=jr(_);if((r||i)&&(h=_e(h)),Ne(_e(h),h.lastChild),r||i)for(;_e(h);)o.before(_e(h));else o.before(h)}})}function oa(e,t,r,i,a){var s;F&&gt();var o=(s=t.$$slots)==null?void 0:s[r],u=!1;o===!0&&(o=t.children,u=!0),o===void 0||o(e,u?()=>i:i)}const ei=[...`
3
+ \r\f \v\uFEFF`];function aa(e,t,r){var i=""+e;if(r){for(var a in r)if(r[a])i=i?i+" "+a:a;else if(i.length)for(var o=a.length,u=0;(u=i.indexOf(a,u))>=0;){var s=u+o;(u===0||ei.includes(i[u-1]))&&(s===i.length||ei.includes(i[s]))?i=(u===0?"":i.substring(0,u))+i.substring(s+1):u=s}}return i===""?null:i}function la(e,t,r,i,a,o){var u=e.__className;if(F||u!==r||u===void 0){var s=aa(r,i,o);(!F||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(o&&a!==o)for(var c in o){var d=!!o[c];(a==null||d!==!!a[c])&&e.classList.toggle(c,d)}return o}const sa=Symbol("is custom element"),ua=Symbol("is html");function ti(e){if(F){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;T(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var a=e.checked;T(e,"checked",null),e.checked=a}}};e.__on_r=r,Uo(r),zn()}}function fa(e,t){var r=ri(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function T(e,t,r,i){var a=ri(e);F&&(a[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||a[t]!==(a[t]=r)&&(t==="loading"&&(e[_o]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ca(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ri(e){return e.__attributes??(e.__attributes={[sa]:e.nodeName.includes("-"),[ua]:e.namespaceURI===so})}var ni=new Map;function ca(e){var t=ni.get(e.nodeName);if(t)return t;ni.set(e.nodeName,t=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=co(i);for(var o in r)r[o].set&&t.push(o);i=un(i)}return t}function da(e,t,r=t){Qo(e,"change",i=>{var a=i?e.defaultChecked:e.checked;r(a)}),(F&&e.defaultChecked!==e.checked||it(t)==null)&&r(e.checked),Nr(()=>{var i=t();e.checked=!!i})}function ii(e,t){return e===t||(e==null?void 0:e[Rt])===t}function dr(e={},t,r,i){return Dr(()=>{var a,o;return Nr(()=>{a=o,o=[],it(()=>{e!==r(...o)&&(t(e,...o),a&&ii(r(...a),e)&&t(null,...a))})}),()=>{Pr(()=>{o&&ii(r(...o),e)&&t(null,...o)})}}),e}function oi(e){ae===null&&ln(),Tr(()=>{const t=it(e);if(typeof t=="function")return t})}function ha(e){ae===null&&ln(),oi(()=>()=>it(e))}function ai(e,t,r){if(e==null)return t(void 0),dt;const i=it(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const mt=[];function va(e,t=dt){let r=null;const i=new Set;function a(s){if(yn(e,s)&&(e=s,r)){const c=!mt.length;for(const d of i)d[1](),mt.push(d,e);if(c){for(let d=0;d<mt.length;d+=2)mt[d][0](mt[d+1]);mt.length=0}}}function o(s){a(s(e))}function u(s,c=dt){const d=[s,c];return i.add(d),i.size===1&&(r=t(a,o)||dt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:a,update:o,subscribe:u}}function hr(e){let t;return ai(e,r=>t=r)(),t}let vr=!1,Br=Symbol();function ga(e,t,r){const i=r[t]??(r[t]={store:null,source:Vr(void 0),unsubscribe:dt});if(i.store!==e&&!(Br in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=dt;else{var a=!0;i.unsubscribe=ai(e,o=>{a?i.source.v=o:b(i.source,o)}),a=!1}return e&&Br in r?hr(e):l(i.source)}function pa(){const e={};function t(){$r(()=>{for(var r in e)e[r].unsubscribe();It(e,Br,{enumerable:!1,value:!0})})}return[e,t]}function ma(e){var t=vr;try{return vr=!1,[e(),vr]}finally{vr=t}}function li(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function I(e,t,r,i){var _t;var a=(r&ro)!==0,o=!0,u=(r&io)!==0,s=(r&oo)!==0,c=!1,d;u?[d,c]=ma(()=>e[t]):d=e[t];var _=Rt in e||vn in e,h=u&&(((_t=Qe(e,t))==null?void 0:_t.set)??(_&&t in e&&(H=>e[t]=H)))||void 0,m=i,w=!0,D=!1,C=()=>(D=!0,w&&(w=!1,s?m=it(i):m=i),m);d===void 0&&i!==void 0&&(h&&o&&xo(),d=C(),h&&h(d));var q;if(q=()=>{var H=e[t];return H===void 0?C():(w=!0,D=!1,H)},(r&no)===0)return q;if(h){var pe=e.$$legacy;return function(H,ce){return arguments.length>0?((!ce||pe||c)&&h(ce?q():H),H):q()}}var te=!1,le=Vr(d),re=rr(()=>{var H=q(),ce=l(le);return te?(te=!1,ce):le.v=H});return u&&l(re),a||(re.equals=Sr),function(H,ce){if(arguments.length>0){const ke=ce?l(re):u?qe(H):H;if(!re.equals(ke)){if(te=!0,b(le,ke),D&&m!==void 0&&(m=ke),li(re))return H;it(()=>l(re))}return H}return li(re)?re.v:l(re)}}function _a(e){return new ba(e)}class ba{constructor(t){tn(this,Me);tn(this,ye);var o;var r=new Map,i=(u,s)=>{var c=Vr(s);return r.set(u,c),c};const a=new Proxy({...t.props||{},$$events:{}},{get(u,s){return l(r.get(s)??i(s,Reflect.get(u,s)))},has(u,s){return s===vn?!0:(l(r.get(s)??i(s,Reflect.get(u,s))),Reflect.has(u,s))},set(u,s,c){return b(r.get(s)??i(s,c),c),Reflect.set(u,s,c)}});rn(this,ye,(t.hydrate?na:Xn)(t.component,{target:t.target,anchor:t.anchor,props:a,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&k(),rn(this,Me,a.$$events);for(const u of Object.keys(he(this,ye)))u==="$set"||u==="$destroy"||u==="$on"||It(this,u,{get(){return he(this,ye)[u]},set(s){he(this,ye)[u]=s},enumerable:!0});he(this,ye).$set=u=>{Object.assign(a,u)},he(this,ye).$destroy=()=>{ia(he(this,ye))}}$set(t){he(this,ye).$set(t)}$on(t,r){he(this,Me)[t]=he(this,Me)[t]||[];const i=(...a)=>r.call(this,...a);return he(this,Me)[t].push(i),()=>{he(this,Me)[t]=he(this,Me)[t].filter(a=>a!==i)}}$destroy(){he(this,ye).$destroy()}}Me=new WeakMap,ye=new WeakMap;let si;typeof HTMLElement=="function"&&(si=class extends HTMLElement{constructor(t,r,i){super();Re(this,"$$ctor");Re(this,"$$s");Re(this,"$$c");Re(this,"$$cn",!1);Re(this,"$$d",{});Re(this,"$$r",!1);Re(this,"$$p_d",{});Re(this,"$$l",{});Re(this,"$$l_u",new Map);Re(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const a=this.$$c.$on(t,r);this.$$l_u.set(r,a)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const a=this.$$l_u.get(r);a&&(a(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return o=>{const u=document.createElement("slot");a!=="default"&&(u.name=a),B(o,u)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=ya(this);for(const a of this.$$s)a in i&&(a==="default"&&!this.$$d.children?(this.$$d.children=t(a),r.default=!0):r[a]=t(a));for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=gr(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=_a({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Oo(()=>{Nr(()=>{var a;this.$$r=!0;for(const o of zt(this.$$c)){if(!((a=this.$$p_d[o])!=null&&a.reflect))continue;this.$$d[o]=this.$$c[o];const u=gr(o,this.$$d[o],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,u)}this.$$r=!1})});for(const a in this.$$l)for(const o of this.$$l[a]){const u=this.$$c.$on(a,o);this.$$l_u.set(o,u)}this.$$l={}}}attributeChangedCallback(t,r,i){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=gr(t,i,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return zt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function gr(e,t,r,i){var o;const a=(o=r[e])==null?void 0:o.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(a){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ya(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function wa(e,t,r,i,a,o){let u=class extends si{constructor(){super(e,r,a),this.$$p_d=t}static get observedAttributes(){return zt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return zt(t).forEach(s=>{It(u.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=gr(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var _=(h=Qe(d,s))==null?void 0:h.get;_?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{It(u.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=u,u}const ui=new TextEncoder;function Ea(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Ca(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const a=await fi(i,e,t);return{algorithm:t,challenge:a,salt:i,signature:""}}async function fi(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return Ea(await crypto.subtle.digest(r.toUpperCase(),ui.encode(e+t)))}function xa(e,t,r="SHA-256",i=1e6,a=0){const o=new AbortController,u=Date.now();return{promise:(async()=>{for(let c=a;c<=i;c+=1){if(o.signal.aborted)return null;if(await fi(t,c,r)===e)return{number:c,took:Date.now()-u}}return null})(),controller:o}}function ci(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ka(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Aa(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function Ia(e,t="",r=1e6,i=0){const a="AES-GCM",o=new AbortController,u=Date.now(),s=async()=>{for(let _=i;_<=r;_+=1){if(o.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:a,iv:Aa(_)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-u}}catch{}}return null};let c=null,d=null;try{d=ka(e);const _=await crypto.subtle.digest("SHA-256",ui.encode(t));c=await crypto.subtle.importKey("raw",_,a,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}var E=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(E||{}),ee=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ee||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>hr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(hr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(hr(globalThis.altchaI18n.store))},store:va({})};const Ra={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.altchaI18n.set("en",Ra);const Hr=(e,t)=>{let r=To(()=>go(t==null?void 0:t(),24));var i=Da();$e(()=>{T(i,"width",l(r)),T(i,"height",l(r))}),B(e,i)};function Sa(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function $a(e,t){e.preventDefault(),t()}function Ta(e,t,r,i,a,o,u,s){var c;[E.UNVERIFIED,E.ERROR,E.EXPIRED,E.CODE].includes(l(t))?r()!==!1&&((c=l(i))==null?void 0:c.reportValidity())===!1?b(a,!1):o()?u():s():b(a,!0)}var Da=fr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),Na=xe('<input type="hidden">'),La=xe('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Oa=fr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),Pa=fr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),Fa=fr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),Ma=xe('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Va=xe("<audio hidden autoplay><source></audio>"),Ua=xe('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),ja=xe("<div><!></div>"),qa=xe("<div><!></div>"),Ba=xe('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),Ha=xe('<div class="altcha-footer"><div><!></div></div>'),Ga=xe('<div class="altcha-anchor-arrow"></div>'),Wa=xe('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function di(e,t){var Ki,Xi;Gn(t,!0);const[r,i]=pa(),a=()=>ga(Za,"$altchaI18nStore",r);let o=I(t,"auto",7,void 0),u=I(t,"blockspam",7,void 0),s=I(t,"challengeurl",7,void 0),c=I(t,"challengejson",7,void 0),d=I(t,"credentials",7,void 0),_=I(t,"customfetch",7,void 0),h=I(t,"debug",7,!1),m=I(t,"delay",7,0),w=I(t,"disableautofocus",7,!1),D=I(t,"expire",7,void 0),C=I(t,"floating",7,void 0),q=I(t,"floatinganchor",7,void 0),pe=I(t,"floatingoffset",7,void 0),te=I(t,"floatingpersist",7,!1),le=I(t,"hidefooter",7,!1),re=I(t,"hidelogo",7,!1),_t=I(t,"id",7,void 0),H=I(t,"language",7,void 0),ce=I(t,"name",7,"altcha"),ke=I(t,"maxnumber",7,1e6),Mt=I(t,"mockerror",7,!1),Ze=I(t,"obfuscated",7,void 0),Ae=I(t,"overlay",7,void 0),Vt=I(t,"overlaycontent",7,void 0),pr=I(t,"plugins",7,void 0),Ut=I(t,"refetchonexpire",7,!0),at=I(t,"sentinel",7,void 0),Le=I(t,"spamfilter",7,!1),bt=I(t,"strings",7,void 0),we=I(t,"test",7,!1),se=I(t,"verifyurl",7,void 0),yt=I(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),jt=I(t,"workerurl",7,void 0);const{altchaI18n:Ya}=globalThis,Za=Ya.store,pi=["SHA-256","SHA-384","SHA-512"],za="https://altcha.org/",ze=(n,f)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:f}))},mi=(Xi=(Ki=document.documentElement.lang)==null?void 0:Ki.split("-"))==null?void 0:Xi[0],Gr=$t(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),Wr=$t(()=>c()?Di(c()):void 0),Ja=$t(()=>bt()?Di(bt()):{}),U=$t(()=>({...wi(a()),...l(Ja)})),_i=$t(()=>`${_t()||ce()}_checkbox_${Math.round(Math.random()*1e8)}`);let qt=V(!1),Y=V(null),R=V(qe(E.UNVERIFIED)),j=V(void 0),Bt=V(null),Je=V(null),me=V(null),Yr=V(null),wt=V(null),P=V(null),Et=V(null),lt=V(null),Oe=null,X=V(null),st=V(!1),Ke=[],Zr=V(!1),Ve=V(null);Tr(()=>{ul(l(lt))}),Tr(()=>{fl(l(R))}),ha(()=>{Ka(),b(Et,null),l(P)&&(l(P).removeEventListener("submit",Ii),l(P).removeEventListener("reset",Ri),l(P).removeEventListener("focusin",Ai),b(P,null)),Oe&&(clearTimeout(Oe),Oe=null),document.removeEventListener("click",xi),document.removeEventListener("scroll",ki),window.removeEventListener("resize",Ti)}),oi(()=>{var n;S("mounted","2.1.0"),S("workers",yt()),tl(),S("plugins",Ke.length?Ke.map(f=>f.constructor.pluginName).join(", "):"none"),we()&&S("using test mode"),D()&&Jr(D()),o()!==void 0&&S("auto",o()),C()!==void 0&&Li(C()),b(P,(n=l(j))==null?void 0:n.closest("form"),!0),l(P)&&(l(P).addEventListener("submit",Ii,{capture:!0}),l(P).addEventListener("reset",Ri),(o()==="onfocus"||te()==="focus")&&l(P).addEventListener("focusin",Ai)),Ae()&&Oi(!0),o()==="onload"&&(Ze()?Ht():Ue()),l(Gr)&&(le()||re())&&S("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{ze("load")})});function mr(n,f){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:f.number,salt:n.salt,signature:n.signature,test:we()?!0:void 0,took:f.took}))}function Ka(){for(const n of Ke)n.destroy()}function bi(){s()&&Ut()&&l(R)===E.VERIFIED?Ue():ut(E.EXPIRED,l(U).expired)}async function Xa(){var n;if(Mt())throw S("mocking error"),new Error("Mocked error.");if(l(Wr))return S("using provided json data"),l(Wr);if(we())return S("generating test challenge",{test:we()}),Ca(typeof we()!="boolean"?+we():void 0);{if(!s()&&l(P)){const A=l(P).getAttribute("action");A!=null&&A.includes("/form/")&&s(A+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");S("fetching challenge from",s());const f={credentials:typeof d()=="boolean"?"include":d(),headers:Le()!==!1?{"x-altcha-spam-filter":"1"}:{}},v=await yi()(s(),f);if(!v||!(v instanceof Response))throw new Error("Custom fetch function did not return a response.");if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const p=v.headers.get("X-Altcha-Config"),g=await v.json(),x=new URLSearchParams((n=g.salt.split("?"))==null?void 0:n[1]),y=x.get("expires")||x.get("expire");if(y){const A=new Date(+y*1e3),G=isNaN(A.getTime())?0:A.getTime()-Date.now();G>0&&Jr(G)}if(p)try{const A=JSON.parse(p);A&&typeof A=="object"&&(A.verifyurl&&!A.verifyurl.startsWith("fn:")&&(A.verifyurl=Ci(A.verifyurl)),Mi(A))}catch(A){S("unable to configure from X-Altcha-Config",A)}return g}}function Qa(n){var v,p;const f=(v=l(P))==null?void 0:v.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((p=f==null?void 0:f.value)==null?void 0:p.slice(f.value.indexOf("@")))||void 0}function yi(){let n=fetch;if(_())if(S("using customfetch"),typeof _()=="string"){if(n=globalThis[_()]||null,!n)throw new Error(`Custom fetch function not found: ${_()}`)}else n=_();return n}function wi(n,f=[H()||"",document.documentElement.lang||"",...navigator.languages]){const v=Object.keys(n).map(g=>g.toLowerCase()),p=f.reduce((g,x)=>(x=x.toLowerCase(),g||(n[x]?x:null)||v.find(y=>x.split("-")[0]===y.split("-")[0])||null),null);return n[p||"en"]}function el(){return Le()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof Le()=="object"?Le():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function Ei(n){var v;return[...((v=l(P))==null?void 0:v.querySelectorAll(n!=null&&n.length?n.map(p=>`input[name="${p}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((p,g)=>{const x=g.name,y=g.value;return x&&y&&(p[x]=/\n/.test(y)?y.replace(new RegExp("(?<!\\r)\\n","g"),`\r
4
+ `):y),p},{})}function Ci(n,f){const v=new URL(s()||location.origin),p=new URL(n,v);if(p.search||(p.search=v.search),f)for(const g in f)f[g]!==void 0&&f[g]!==null&&p.searchParams.set(g,f[g]);return p.toString()}function tl(){const n=pr()!==void 0?pr().split(","):void 0;for(const f of globalThis.altchaPlugins)(!n||n.includes(f.pluginName))&&Ke.push(new f({el:l(j),clarify:Ht,dispatch:ze,getConfiguration:Vi,getFloatingAnchor:Ui,getState:ji,log:S,reset:ut,solve:Fi,setState:Pe,setFloatingAnchor:qi,verify:Ue}))}function S(...n){(h()||n.some(f=>f instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ce()}]`,...n)}function rl(){b(X,ee.PAUSED,!0)}function nl(n){b(X,ee.ERROR,!0)}function il(){b(X,ee.READY,!0)}function ol(){b(X,ee.LOADING,!0)}function al(){b(X,ee.PLAYING,!0)}function ll(){b(X,ee.PAUSED,!0)}function sl(n){var f;if(n.preventDefault(),n.stopPropagation(),l(Y)){const v=new FormData(n.target),p=String(v.get("code"));if((f=se())!=null&&f.startsWith("fn:")){const g=se().replace(/^fn:/,"");if(S(`calling ${g} function instead of verifyurl`),!(g in globalThis))throw new Error(`Global function "${g}" is undefined.`);return globalThis[g]({challenge:l(Y).challenge,code:p,solution:l(Y).solution})}b(st,!0),Ni(mr(l(Y).challenge,l(Y).solution),p).then(({reason:g,verified:x})=>{x?(b(Y,null),Pe(E.VERIFIED),S("verified"),Mr().then(()=>{var y;(y=l(Yr))==null||y.focus(),ze("verified",{payload:l(Ve)}),o()==="onsubmit"?zr(l(Et)):Ae()&&Gt()})):(ut(),b(lt,g||"Verification failed",!0))}).catch(g=>{b(Y,null),Pe(E.ERROR,g),S("sentinel verification failed:",g)}).finally(()=>{b(st,!1)})}}function xi(n){var v;const f=n.target;C()&&f&&!l(j).contains(f)&&(l(R)===E.VERIFIED&&te()===!1||l(R)===E.VERIFIED&&te()==="focus"&&!((v=l(P))!=null&&v.matches(":focus-within"))||o()==="off"&&l(R)===E.UNVERIFIED)&&Gt()}function ki(){C()&&l(R)!==E.UNVERIFIED&&Wt()}function ul(n){for(const f of Ke)typeof f.onErrorChange=="function"&&f.onErrorChange(l(lt))}function Ai(n){l(R)===E.UNVERIFIED?Ue():C()&&te()==="focus"&&l(R)===E.VERIFIED&&_r()}function Ii(n){var p;const f=n.target;f!=null&&f.hasAttribute("data-code-challenge-form")||(b(Et,n.submitter,!0),l(P)&&o()==="onsubmit"?((p=l(Et))==null||p.blur(),l(R)===E.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{zr(l(Et))})):l(R)!==E.VERIFIED&&(n.preventDefault(),n.stopPropagation(),l(R)===E.VERIFYING&&Si())):l(P)&&C()&&o()==="off"&&l(R)===E.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),_r()))}function Ri(){ut()}function Si(){l(R)===E.VERIFYING&&l(U).waitAlert&&alert(l(U).waitAlert)}function $i(){l(Je)?l(Je).paused?(l(Je).currentTime=0,l(Je).play()):l(Je).pause():(b(Zr,!0),requestAnimationFrame(()=>{var n;(n=l(Je))==null||n.play()}))}function fl(n){for(const f of Ke)typeof f.onStateChange=="function"&&f.onStateChange(l(R));C()&&l(R)!==E.UNVERIFIED&&requestAnimationFrame(()=>{Wt()}),b(qt,l(R)===E.VERIFIED),Ae()&&l(me)&&(l(R)!==E.UNVERIFIED?_r():Gt())}function Ti(){C()&&Wt()}function Di(n){return JSON.parse(n)}async function cl(n){if(!se())throw new Error("Attribute verifyurl not set.");S("requesting server verification from",se());const f={payload:n};if(Le()!==!1){const{blockedCountries:g,classifier:x,disableRules:y,email:A,expectedLanguages:G,expectedCountries:ne,fields:de,ipAddress:Xe,text:Xr,timeZone:wr}=el();f.blockedCountries=g,f.classifier=x,f.disableRules=y,f.email=A===!1?void 0:Qa(A),f.expectedCountries=ne,f.expectedLanguages=G||(mi?[mi]:void 0),f.fields=de===!1?void 0:Ei(de),f.ipAddress=Xe===!1?void 0:Xe||"auto",f.text=Xr,f.timeZone=wr===!1?void 0:wr||ci()}const v=await yi()(se(),{body:JSON.stringify(f),headers:{"content-type":"application/json"},method:"POST"});if(!v||!(v instanceof Response))throw new Error("Custom fetch function did not return a response.");if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const p=await v.json();if(p!=null&&p.payload&&b(Ve,p.payload,!0),ze("serververification",p),u()&&p.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Ni(n,f){if(!se())throw new Error("Attribute verifyurl not set.");S("requesting sentinel verification from",se());const v={code:f,payload:n};at()&&(v.fields=at().fields?Ei():void 0,v.timeZone=at().timeZone?ci():void 0);const p=await fetch(se(),{body:JSON.stringify(v),headers:{"content-type":"application/json"},method:"POST"});if(!p||!(p instanceof Response))throw new Error("Fetch function did not return a response.");if(p.status!==200)throw new Error(`Server responded with ${p.status}.`);const g=await p.json();return g!=null&&g.payload&&b(Ve,g.payload,!0),ze("sentinelverification",g),g}function zr(n){var f;l(P)&&"requestSubmit"in l(P)?l(P).requestSubmit(n):(f=l(P))!=null&&f.reportValidity()&&(n?n.click():l(P).submit())}function Jr(n){S("expire",n),Oe&&(clearTimeout(Oe),Oe=null),n<1?bi():Oe=setTimeout(bi,n)}function Li(n){S("floating",n),C()!==n&&(l(j).style.left="",l(j).style.top=""),C(n===!0||n===""?"auto":n===!1||n==="false"?void 0:C()),C()?(o()||o("onsubmit"),document.addEventListener("scroll",ki),document.addEventListener("click",xi),window.addEventListener("resize",Ti)):o()==="onsubmit"&&o(void 0)}function Oi(n){var f,v;if(S("overlay",n),Ae(n),n){if(o()||o("onsubmit"),l(me)&&l(j).parentElement&&l(me).replaceWith(l(j).parentElement),(v=(f=l(j))==null?void 0:f.parentElement)!=null&&v.parentElement){b(me,document.createElement("div"),!0),l(j).parentElement.parentElement.appendChild(l(me));const p=document.createElement("div"),g=document.createElement("button");g.type="button",g.innerHTML="&times;",g.addEventListener("click",x=>{x.preventDefault(),ut()}),l(me).classList.add("altcha-overlay-backdrop"),g.classList.add("altcha-overlay-close-button"),p.classList.add("altcha-overlay"),l(me).append(p),p.append(g),Vt()&&p.append(...document.querySelectorAll(Vt())),p.append(l(j).parentElement)}}else l(me)&&l(j).parentElement&&(l(me).replaceWith(l(j).parentElement),l(j).style.display="block")}function Pi(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!pi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${pi.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Fi(n){let f=null;if("Worker"in window){try{f=await dl(n,n.maxNumber||n.maxnumber||ke())}catch(v){S(v)}if((f==null?void 0:f.number)!==void 0||"obfuscated"in n)return{data:n,solution:f}}if("obfuscated"in n){const v=await Ia(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await v.promise}}return{data:n,solution:await xa(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||ke()).promise}}async function dl(n,f=typeof we()=="number"?we():n.maxNumber||n.maxnumber||ke(),v=Math.ceil(yt())){const p=[];v=Math.min(16,f,Math.max(1,v));for(let y=0;y<v;y++)p.push(altchaCreateWorker(jt()));const g=Math.ceil(f/v),x=await Promise.all(p.map((y,A)=>{const G=A*g;return new Promise(ne=>{y.addEventListener("message",de=>{if(de.data)for(const Xe of p)Xe!==y&&Xe.postMessage({type:"abort"});ne(de.data)}),y.postMessage({payload:n,max:G+g,start:G,type:"work"})})}));for(const y of p)y.terminate();return x.find(y=>!!y)||null}async function Ht(){if(!Ze()){Pe(E.ERROR);return}const n=Ke.find(f=>f.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Pe(E.ERROR),S("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Mi(n){n.obfuscated!==void 0&&Ze(n.obfuscated),n.auto!==void 0&&(o(n.auto),o()==="onload"&&(Ze()?Ht():Ue())),n.blockspam!==void 0&&u(!!n.blockspam),n.customfetch!==void 0&&_(n.customfetch),n.floatinganchor!==void 0&&q(n.floatinganchor),n.delay!==void 0&&m(n.delay),n.floatingoffset!==void 0&&pe(n.floatingoffset),n.floating!==void 0&&Li(n.floating),n.expire!==void 0&&(Jr(n.expire),D(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Pi(l(Wr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&h(!!n.debug),n.hidefooter!==void 0&&le(!!n.hidefooter),n.hidelogo!==void 0&&re(!!n.hidelogo),n.language!==void 0&&bt(wi(a(),[n.language])),n.maxnumber!==void 0&&ke(+n.maxnumber),n.mockerror!==void 0&&Mt(!!n.mockerror),n.name!==void 0&&ce(n.name),n.overlaycontent!==void 0&&Vt(n.overlaycontent),n.overlay!==void 0&&Oi(n.overlay),n.refetchonexpire!==void 0&&Ut(!!n.refetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&at(n.sentinel),n.spamfilter!==void 0&&Le(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&bt(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&we(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&yt(+n.workers),n.workerurl!==void 0&&jt(n.workerurl)}function Vi(){return{auto:o(),blockspam:u(),challengeurl:s(),debug:h(),delay:m(),expire:D(),floating:C(),floatinganchor:q(),floatingoffset:pe(),hidefooter:le(),hidelogo:re(),name:ce(),maxnumber:ke(),mockerror:Mt(),obfuscated:Ze(),overlay:Ae(),refetchonexpire:Ut(),spamfilter:Le(),strings:l(U),test:we(),verifyurl:se(),workers:yt(),workerurl:jt()}}function Ui(){return l(wt)}function hl(n){return Ke.find(f=>f.constructor.pluginName===n)}function ji(){return l(R)}function Gt(){l(j).style.display="none",Ae()&&l(me)&&(l(me).style.display="none")}function Wt(n=20){var f;if(l(j))if(l(wt)||b(wt,(q()?document.querySelector(q()):(f=l(P))==null?void 0:f.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||l(P),!0),l(wt)){const v=parseInt(pe(),10)||12,p=l(wt).getBoundingClientRect(),g=l(j).getBoundingClientRect(),x=document.documentElement.clientHeight,y=document.documentElement.clientWidth,A=C()==="auto"?p.bottom+g.height+v+n>x:C()==="top",G=Math.max(n,Math.min(y-n-g.width,p.left+p.width/2-g.width/2));if(A?l(j).style.top=`${p.top-(g.height+v)}px`:l(j).style.top=`${p.bottom+v}px`,l(j).style.left=`${G}px`,l(j).setAttribute("data-floating",A?"top":"bottom"),l(Bt)){const ne=l(Bt).getBoundingClientRect();l(Bt).style.left=p.left-G+p.width/2-ne.width/2+"px"}}else S("unable to find floating anchor element")}function ut(n=E.UNVERIFIED,f=null){Oe&&(clearTimeout(Oe),Oe=null),b(qt,!1),b(Ve,null),b(Y,null),b(Zr,!1),b(X,null),Pe(n,f)}function qi(n){b(wt,n,!0)}function Pe(n,f=null){b(R,n,!0),b(lt,f,!0),ze("statechange",{payload:l(Ve),state:l(R)})}function _r(){l(j).style.display="block",C()&&Wt(),Ae()&&l(me)&&(l(me).style.display="flex")}async function Ue(){return ut(E.VERIFYING),await new Promise(n=>setTimeout(n,m()||0)),Xa().then(n=>(Pi(n),S("challenge",n),Fi(n))).then(({data:n,solution:f})=>{var v;if(S("solution",f),!f||n&&"challenge"in n&&!("clearText"in f))if((f==null?void 0:f.number)!==void 0&&"challenge"in n)if(se()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((v=document.activeElement)==null?void 0:v.tagName)||"")&&w()===!1&&document.activeElement.blur(),b(Y,{challenge:n,solution:f},!0);else{if(se()&&at()!==void 0)return Ni(mr(n,f));if(se())return cl(mr(n,f));b(Ve,mr(n,f),!0),S("payload",l(Ve))}else throw S("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{l(Y)?(Pe(E.CODE),Mr().then(()=>{ze("code",{codeChallenge:l(Y)})})):(Pe(E.VERIFIED),S("verified"),Mr().then(()=>{ze("verified",{payload:l(Ve)}),o()==="onsubmit"?zr(l(Et)):Ae()&&Gt()}))}).catch(n=>{S(n),Pe(E.ERROR,n.message)})}var Bi=Wa(),Hi=St(Bi);oa(Hi,t,"default",{});var Ct=J(Hi,2),Kr=z(Ct),br=z(Kr);let Gi;var Wi=z(br);{var vl=n=>{Hr(n)};K(Wi,n=>{l(R)===E.VERIFYING&&n(vl)})}var ft=J(Wi,2);ti(ft),ft.__change=[Ta,R,Le,P,qt,Ze,Ht,Ue],dr(ft,n=>b(Yr,n),()=>l(Yr)),Z(br);var yr=J(br,2),gl=z(yr);{var pl=n=>{var f=cr(),v=St(f);ot(v,()=>l(U).verified),B(n,f)},ml=(n,f)=>{{var v=g=>{var x=cr(),y=St(x);ot(y,()=>l(U).verifying),B(g,x)},p=(g,x)=>{{var y=G=>{var ne=cr(),de=St(ne);ot(de,()=>l(U).verificationRequired),B(G,ne)},A=G=>{var ne=cr(),de=St(ne);ot(de,()=>l(U).label),B(G,ne)};K(g,G=>{l(R)===E.CODE?G(y):G(A,!1)},x)}};K(n,g=>{l(R)===E.VERIFYING?g(v):g(p,!1)},f)}};K(gl,n=>{l(R)===E.VERIFIED?n(pl):n(ml,!1)})}Z(yr);var Yi=J(yr,2);{var _l=n=>{var f=Na();ti(f),$e(()=>{T(f,"name",ce()),fa(f,l(Ve))}),B(n,f)};K(Yi,n=>{l(R)===E.VERIFIED&&n(_l)})}var Zi=J(Yi,2);{var bl=n=>{var f=La(),v=z(f);T(v,"href",za),Z(f),$e(()=>T(v,"aria-label",l(U).ariaLinkLabel)),B(n,f)};K(Zi,n=>{(re()!==!0||l(Gr))&&n(bl)})}var yl=J(Zi,2);{var wl=n=>{var f=Ua(),v=J(z(f),2),p=z(v),g=J(p,2);Xo(g,!w()),g.__keydown=[Sa,$i];var x=J(g,2),y=z(x),A=z(y);{var G=Ie=>{var Q=Ma();Q.__click=$i;var Er=z(Q);{var Yt=xt=>{Hr(xt,()=>20)},Sl=(xt,$l)=>{{var Tl=kt=>{var Qr=Oa();B(kt,Qr)},Dl=(kt,Qr)=>{{var Nl=At=>{var en=Pa();B(At,en)},Ll=At=>{var en=Fa();B(At,en)};K(kt,At=>{l(X)===ee.PLAYING?At(Nl):At(Ll,!1)},Qr)}};K(xt,kt=>{l(X)===ee.ERROR?kt(Tl):kt(Dl,!1)},$l)}};K(Er,xt=>{l(X)===ee.LOADING?xt(Yt):xt(Sl,!1)})}Z(Q),$e(()=>{T(Q,"title",l(U).getAudioChallenge),Q.disabled=l(X)===ee.LOADING||l(X)===ee.ERROR||l(st),T(Q,"aria-label",l(X)===ee.LOADING?l(U).loading:l(U).getAudioChallenge)}),B(Ie,Q)};K(A,Ie=>{l(Y).challenge.codeChallenge.audio&&Ie(G)})}var ne=J(A,2);ne.__click=[$a,Ue],Z(y);var de=J(y,2),Xe=z(de);{var Xr=Ie=>{Hr(Ie,()=>16)};K(Xe,Ie=>{l(st)&&Ie(Xr)})}var wr=J(Xe);Z(de),Z(x);var Il=J(x,2);{var Rl=Ie=>{var Q=Va(),Er=z(Q);Z(Q),dr(Q,Yt=>b(Je,Yt),()=>l(Je)),$e(Yt=>T(Er,"src",Yt),[()=>Ci(l(Y).challenge.codeChallenge.audio,{language:H()})]),Ye("loadstart",Q,ol),Ye("canplay",Q,il),Ye("pause",Q,ll),Ye("playing",Q,al),Ye("ended",Q,rl),Ye("error",Er,nl),B(Ie,Q)};K(Il,Ie=>{l(Y).challenge.codeChallenge.audio&&l(Zr)&&Ie(Rl)})}Z(v),Z(f),$e(()=>{T(f,"aria-label",l(U).verificationRequired),T(p,"src",l(Y).challenge.codeChallenge.image),T(g,"minlength",l(Y).challenge.codeChallenge.length||1),T(g,"maxlength",l(Y).challenge.codeChallenge.length),T(g,"placeholder",l(U).enterCode),T(g,"aria-label",l(X)===ee.LOADING?l(U).loading:l(X)===ee.PLAYING?"":l(U).enterCodeAria),T(g,"aria-live",l(X)?"assertive":"polite"),T(g,"aria-busy",l(X)===ee.LOADING),g.disabled=l(st),T(ne,"aria-label",l(U).reload),T(ne,"title",l(U).reload),ne.disabled=l(st),de.disabled=l(st),T(de,"aria-label",l(U).verify),ra(wr,` ${l(U).verify??""}`)}),Ye("submit",v,sl,!0),B(n,f)};K(yl,n=>{var f;(f=l(Y))!=null&&f.challenge.codeChallenge&&n(wl)})}Z(Kr);var zi=J(Kr,2);{var El=n=>{var f=Ba(),v=J(z(f),2);{var p=x=>{var y=ja(),A=z(y);ot(A,()=>l(U).expired),Z(y),$e(()=>T(y,"title",l(lt))),B(x,y)},g=x=>{var y=qa(),A=z(y);ot(A,()=>l(U).error),Z(y),$e(()=>T(y,"title",l(lt))),B(x,y)};K(v,x=>{l(R)===E.EXPIRED?x(p):x(g,!1)})}Z(f),B(n,f)};K(zi,n=>{(l(lt)||l(R)===E.EXPIRED)&&n(El)})}var Ji=J(zi,2);{var Cl=n=>{var f=Ha(),v=z(f),p=z(v);ot(p,()=>l(U).footer),Z(v),Z(f),B(n,f)};K(Ji,n=>{l(U).footer&&(le()!==!0||l(Gr))&&n(Cl)})}var xl=J(Ji,2);{var kl=n=>{var f=Ga();dr(f,v=>b(Bt,v),()=>l(Bt)),B(n,f)};K(xl,n=>{C()&&n(kl)})}Z(Ct),dr(Ct,n=>b(j,n),()=>l(j)),$e(n=>{T(Ct,"data-state",l(R)),T(Ct,"data-floating",C()),T(Ct,"data-overlay",Ae()),Gi=la(br,1,"altcha-checkbox",null,Gi,n),T(ft,"id",l(_i)),ft.required=o()!=="onsubmit"&&(!C()||o()!=="off"),T(yr,"for",l(_i))},[()=>({"altcha-checkbox-verifying":l(R)===E.VERIFYING})]),Ye("invalid",ft,Si),da(ft,()=>l(qt),n=>b(qt,n)),B(e,Bi);var Al=Wn({clarify:Ht,configure:Mi,getConfiguration:Vi,getFloatingAnchor:Ui,getPlugin:hl,getState:ji,hide:Gt,repositionFloating:Wt,reset:ut,setFloatingAnchor:qi,setState:Pe,show:_r,verify:Ue,get auto(){return o()},set auto(n=void 0){o(n),k()},get blockspam(){return u()},set blockspam(n=void 0){u(n),k()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),k()},get challengejson(){return c()},set challengejson(n=void 0){c(n),k()},get credentials(){return d()},set credentials(n=void 0){d(n),k()},get customfetch(){return _()},set customfetch(n=void 0){_(n),k()},get debug(){return h()},set debug(n=!1){h(n),k()},get delay(){return m()},set delay(n=0){m(n),k()},get disableautofocus(){return w()},set disableautofocus(n=!1){w(n),k()},get expire(){return D()},set expire(n=void 0){D(n),k()},get floating(){return C()},set floating(n=void 0){C(n),k()},get floatinganchor(){return q()},set floatinganchor(n=void 0){q(n),k()},get floatingoffset(){return pe()},set floatingoffset(n=void 0){pe(n),k()},get floatingpersist(){return te()},set floatingpersist(n=!1){te(n),k()},get hidefooter(){return le()},set hidefooter(n=!1){le(n),k()},get hidelogo(){return re()},set hidelogo(n=!1){re(n),k()},get id(){return _t()},set id(n=void 0){_t(n),k()},get language(){return H()},set language(n=void 0){H(n),k()},get name(){return ce()},set name(n="altcha"){ce(n),k()},get maxnumber(){return ke()},set maxnumber(n=1e6){ke(n),k()},get mockerror(){return Mt()},set mockerror(n=!1){Mt(n),k()},get obfuscated(){return Ze()},set obfuscated(n=void 0){Ze(n),k()},get overlay(){return Ae()},set overlay(n=void 0){Ae(n),k()},get overlaycontent(){return Vt()},set overlaycontent(n=void 0){Vt(n),k()},get plugins(){return pr()},set plugins(n=void 0){pr(n),k()},get refetchonexpire(){return Ut()},set refetchonexpire(n=!0){Ut(n),k()},get sentinel(){return at()},set sentinel(n=void 0){at(n),k()},get spamfilter(){return Le()},set spamfilter(n=!1){Le(n),k()},get strings(){return bt()},set strings(n=void 0){bt(n),k()},get test(){return we()},set test(n=!1){we(n),k()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),k()},get workers(){return yt()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){yt(n),k()},get workerurl(){return jt()},set workerurl(n=void 0){jt(n),k()}});return i(),Al}ta(["change","keydown","click"]),customElements.define("altcha-widget",wa(di,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1));const hi='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function vi(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Zt,vi(hi),vi(hi),$.Altcha=di,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- .altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within:after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within:after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:none;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer:hover{opacity:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base: #fff;--altcha-color-text: #000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:#00000080;bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:999990}.altcha-overlay-close-button{align-self:flex-end;background:none;border:none;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height: 450px){.altcha-overlay{top:10%!important;transform:translate(-50%)}}@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}
1
+ .altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within:after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within:after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:none;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer:hover{opacity:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base: #fff;--altcha-color-text: #000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:#00000080;bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:none;border:none;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height: 450px){.altcha-overlay{top:10%!important;transform:translate(-50%)}}@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}