altcha
Version:
Privacy-first CAPTCHA widget, compliant with global regulations (GDPR/HIPAA/CCPA/LGDP/DPDPA/PIPL) and WCAG accessible. No tracking, self-verifying.
3 lines • 60.1 kB
JavaScript
(function(ut,He){typeof exports=="object"&&typeof module<"u"?He(exports):typeof define=="function"&&define.amd?define(["exports"],He):(ut=typeof globalThis<"u"?globalThis:ut||self,He(ut.altcha={}))})(this,function(ut){"use strict";var He=typeof document<"u"?document.currentScript:null;const Bi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Bi);const Hi=1,Yi=4,Gi=8,Zi=16,Wi=1,Ji=2,En="[",zn="[!",Qn="]",ft={},ie=Symbol(),Ki="http://www.w3.org/1999/xhtml",er=!1;function tr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var nr=Array.isArray,Xi=Array.prototype.indexOf,zi=Array.from,Gt=Object.keys,It=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Qi=Object.getOwnPropertyDescriptors,el=Object.prototype,tl=Array.prototype,rr=Object.getPrototypeOf,ir=Object.isExtensible;const ct=()=>{};function lr(e){for(var t=0;t<e.length;t++)e[t]()}function nl(e,t,n=!1){return e===void 0?n?t():t:e}const ge=2,or=4,Zt=8,Cn=16,ke=32,Ge=64,Wt=128,se=256,Jt=512,le=1024,ye=2048,Ze=4096,dt=8192,Kt=16384,rl=32768,An=65536,il=1<<19,ar=1<<20,In=1<<21,xt=Symbol("$state"),sr=Symbol("legacy props"),ll=Symbol("");function ol(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function al(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function sl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ul(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fl(){throw new Error("https://svelte.dev/e/hydration_failed")}function cl(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function dl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function vl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function hl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Xt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let L=!1;function vt(e){L=e}let P;function De(e){if(e===null)throw Xt(),ft;return P=e}function ht(){return De(Pe(P))}function G(e){if(L){if(Pe(P)!==null)throw Xt(),ft;P=e}}function gl(){for(var e=0,t=P;;){if(t.nodeType===8){var n=t.data;if(n===Qn){if(e===0)return t;e-=1}else(n===En||n===zn)&&(e+=1)}var i=Pe(t);t.remove(),t=i}}let _l=!1;function Le(e){if(typeof e!="object"||e===null||xt in e)return e;const t=rr(e);if(t!==el&&t!==tl)return e;var n=new Map,i=nr(e),a=T(0),o=k,s=f=>{var c=k;Ce(o);var d=f();return Ce(c),d};return i&&n.set("length",T(e.length)),new Proxy(e,{defineProperty(f,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&dl();var m=n.get(c);return m===void 0?(m=s(()=>T(d.value)),n.set(c,m)):b(m,s(()=>Le(d.value))),!0},deleteProperty(f,c){var d=n.get(c);if(d===void 0)c in f&&(n.set(c,s(()=>T(ie))),xn(a));else{if(i&&typeof c=="string"){var m=n.get("length"),h=Number(c);Number.isInteger(h)&&h<m.v&&b(m,h)}b(d,ie),xn(a)}return!0},get(f,c,d){if(c===xt)return e;var m=n.get(c),h=c in f;if(m===void 0&&(!h||Ye(f,c)?.writable)&&(m=s(()=>T(Le(h?f[c]:ie))),n.set(c,m)),m!==void 0){var p=l(m);return p===ie?void 0:p}return Reflect.get(f,c,d)},getOwnPropertyDescriptor(f,c){var d=Reflect.getOwnPropertyDescriptor(f,c);if(d&&"value"in d){var m=n.get(c);m&&(d.value=l(m))}else if(d===void 0){var h=n.get(c),p=h?.v;if(h!==void 0&&p!==ie)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return d},has(f,c){if(c===xt)return!0;var d=n.get(c),m=d!==void 0&&d.v!==ie||Reflect.has(f,c);if(d!==void 0||S!==null&&(!m||Ye(f,c)?.writable)){d===void 0&&(d=s(()=>T(m?Le(f[c]):ie)),n.set(c,d));var h=l(d);if(h===ie)return!1}return m},set(f,c,d,m){var h=n.get(c),p=c in f;if(i&&c==="length")for(var w=d;w<h.v;w+=1){var F=n.get(w+"");F!==void 0?b(F,ie):w in f&&(F=s(()=>T(ie)),n.set(w+"",F))}h===void 0?(!p||Ye(f,c)?.writable)&&(h=s(()=>T(void 0)),b(h,s(()=>Le(d))),n.set(c,h)):(p=h.v!==ie,b(h,s(()=>Le(d))));var V=Reflect.getOwnPropertyDescriptor(f,c);if(V?.set&&V.set.call(m,d),!p){if(i&&typeof c=="string"){var U=n.get("length"),R=Number(c);Number.isInteger(R)&&R>=U.v&&b(U,R+1)}xn(a)}return!0},ownKeys(f){l(a);var c=Reflect.ownKeys(f).filter(h=>{var p=n.get(h);return p===void 0||p.v!==ie});for(var[d,m]of n)m.v!==ie&&!(d in f)&&c.push(d);return c},setPrototypeOf(){vl()}})}function xn(e,t=1){b(e,e.v+t)}var ur,fr,cr,dr;function Rn(){if(ur===void 0){ur=window,fr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;cr=Ye(t,"firstChild").get,dr=Ye(t,"nextSibling").get,ir(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ir(n)&&(n.__t=void 0)}}function zt(e=""){return document.createTextNode(e)}function de(e){return cr.call(e)}function Pe(e){return dr.call(e)}function Z(e,t){if(!L)return de(e);var n=de(P);return n===null&&(n=P.appendChild(zt())),De(n),n}function Rt(e,t){if(!L){var n=de(e);return n instanceof Comment&&n.data===""?Pe(n):n}return P}function W(e,t=1,n=!1){let i=L?P:e;for(var a;t--;)a=i,i=Pe(i);if(!L)return i;var o=i?.nodeType;if(n&&o!==3){var s=zt();return i===null?a?.after(s):i.before(s),De(s),s}return De(i),i}function ml(e){e.textContent=""}function vr(e){return e===this.v}function hr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function $n(e){return!hr(e,this.v)}function Qt(e){var t=ge|ye,n=k!==null&&(k.f&ge)!==0?k:null;return S===null||n!==null&&(n.f&se)!==0?t|=se:S.f|=ar,{ctx:te,deps:null,effects:null,equals:vr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??S}}function $t(e){const t=Qt(e);return kr(t),t}function pl(e){const t=Qt(e);return t.equals=$n,t}function gr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Oe(t[n])}}function bl(e){for(var t=e.parent;t!==null;){if((t.f&ge)===0)return t;t=t.parent}return null}function _r(e){var t,n=S;Fe(bl(e));try{gr(e),t=Lr(e)}finally{Fe(n)}return t}function mr(e){var t=_r(e),n=(Ve||(e.f&se)!==0)&&e.deps!==null?Ze:le;_e(e,n),e.equals(t)||(e.v=t,e.wv=Tr())}function yl(e){S===null&&k===null&&sl(),k!==null&&(k.f&se)!==0&&S===null&&al(),Tt&&ol()}function wl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function We(e,t,n,i=!0){var a=S,o={ctx:te,deps:null,nodes_start:null,nodes_end:null,f:e|ye,first:null,fn:t,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(n)try{On(o),o.f|=rl}catch(c){throw Oe(o),c}else t!==null&&an(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(ar|Wt))===0;if(!s&&i&&(a!==null&&wl(o,a),k!==null&&(k.f&ge)!==0)){var f=k;(f.effects??=[]).push(o)}return o}function kn(e){const t=We(Zt,null,!1);return _e(t,le),t.teardown=e,t}function Sn(e){yl();var t=S!==null&&(S.f&ke)!==0&&te!==null&&!te.m;if(t){var n=te;(n.e??=[]).push({fn:e,effect:S,reaction:k})}else{var i=Tn(e);return i}}function El(e){const t=We(Ge,e,!0);return()=>{Oe(t)}}function Cl(e){const t=We(Ge,e,!0);return(n={})=>new Promise(i=>{n.outro?Ln(t,()=>{Oe(t),i(void 0)}):(Oe(t),i(void 0))})}function Tn(e){return We(or,e,!1)}function Nn(e){return We(Zt,e,!0)}function we(e,t=[],n=Qt){const i=t.map(n);return pr(()=>e(...i.map(l)))}function pr(e,t=0){return We(Zt|Cn|t,e,!0)}function Dn(e,t=!0){return We(Zt|ke,e,!0,t)}function br(e){var t=e.teardown;if(t!==null){const n=Tt,i=k;$r(!0),Ce(null);try{t.call(null)}finally{$r(n),Ce(i)}}}function yr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;(n.f&Ge)!==0?n.parent=null:Oe(n,t),n=i}}function Al(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ke)===0&&Oe(t),t=n}}function Oe(e,t=!0){var n=!1;(t||(e.f&il)!==0)&&e.nodes_start!==null&&(wr(e.nodes_start,e.nodes_end),n=!0),yr(e,t&&!n),on(e,0),_e(e,Kt);var i=e.transitions;if(i!==null)for(const o of i)o.stop();br(e);var a=e.parent;a!==null&&a.first!==null&&Er(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function wr(e,t){for(;e!==null;){var n=e===t?null:Pe(e);e.remove(),e=n}}function Er(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function Ln(e,t){var n=[];Cr(e,n,!0),Il(n,()=>{Oe(e),t&&t()})}function Il(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var a of e)a.out(i)}else t()}function Cr(e,t,n){if((e.f&dt)===0){if(e.f^=dt,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&An)!==0||(i.f&ke)!==0;Cr(i,t,o?n:!1),i=a}}}function Ar(e){Ir(e,!0)}function Ir(e,t){if((e.f&dt)!==0){e.f^=dt,(e.f&le)===0&&(e.f^=le),Dt(e)&&(_e(e,ye),an(e));for(var n=e.first;n!==null;){var i=n.next,a=(n.f&An)!==0||(n.f&ke)!==0;Ir(n,a?t:!1),n=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const xl=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let kt=[],St=[];function xr(){var e=kt;kt=[],lr(e)}function Rr(){var e=St;St=[],lr(e)}function Pn(e){kt.length===0&&queueMicrotask(xr),kt.push(e)}function Rl(e){St.length===0&&xl(Rr),St.push(e)}function $l(){kt.length>0&&xr(),St.length>0&&Rr()}let en=!1,tn=!1,nn=null,Je=!1,Tt=!1;function $r(e){Tt=e}let Nt=[],Ca=[],k=null,Ee=!1;function Ce(e){k=e}let S=null;function Fe(e){S=e}let Se=null;function kr(e){k!==null&&k.f&In&&(Se===null?Se=[e]:Se.push(e))}let ee=null,ue=0,ve=null;function kl(e){ve=e}let Sr=1,rn=0,Ve=!1;function Tr(){return++Sr}function Dt(e){var t=e.f;if((t&ye)!==0)return!0;if((t&Ze)!==0){var n=e.deps,i=(t&se)!==0;if(n!==null){var a,o,s=(t&Jt)!==0,f=i&&S!==null&&!Ve,c=n.length;if(s||f){var d=e,m=d.parent;for(a=0;a<c;a++)o=n[a],(s||!o?.reactions?.includes(d))&&(o.reactions??=[]).push(d);s&&(d.f^=Jt),f&&m!==null&&(m.f&se)===0&&(d.f^=se)}for(a=0;a<c;a++)if(o=n[a],Dt(o)&&mr(o),o.wv>e.wv)return!0}(!i||S!==null&&!Ve)&&_e(e,le)}return!1}function Sl(e,t){for(var n=t;n!==null;){if((n.f&Wt)!==0)try{n.fn(e);return}catch{n.f^=Wt}n=n.parent}throw en=!1,e}function Nr(e){return(e.f&Kt)===0&&(e.parent===null||(e.parent.f&Wt)===0)}function ln(e,t,n,i){if(en){if(n===null&&(en=!1),Nr(t))throw e;return}if(n!==null&&(en=!0),Sl(e,t),Nr(t))throw e}function Dr(e,t,n=!0){var i=e.reactions;if(i!==null)for(var a=0;a<i.length;a++){var o=i[a];Se?.includes(e)||((o.f&ge)!==0?Dr(o,t,!1):t===o&&(n?_e(o,ye):(o.f&le)!==0&&_e(o,Ze),an(o)))}}function Lr(e){var t=ee,n=ue,i=ve,a=k,o=Ve,s=Se,f=te,c=Ee,d=e.f;ee=null,ue=0,ve=null,Ve=(d&se)!==0&&(Ee||!Je||k===null),k=(d&(ke|Ge))===0?e:null,Se=null,Vr(e.ctx),Ee=!1,rn++,e.f|=In;try{var m=(0,e.fn)(),h=e.deps;if(ee!==null){var p;if(on(e,ue),h!==null&&ue>0)for(h.length=ue+ee.length,p=0;p<ee.length;p++)h[ue+p]=ee[p];else e.deps=h=ee;if(!Ve)for(p=ue;p<h.length;p++)(h[p].reactions??=[]).push(e)}else h!==null&&ue<h.length&&(on(e,ue),h.length=ue);if(qr()&&ve!==null&&!Ee&&h!==null&&(e.f&(ge|Ze|ye))===0)for(p=0;p<ve.length;p++)Dr(ve[p],e);return a!==null&&a!==e&&(rn++,ve!==null&&(i===null?i=ve:i.push(...ve))),m}finally{ee=t,ue=n,ve=i,k=a,Ve=o,Se=s,Vr(f),Ee=c,e.f^=In}}function Tl(e,t){let n=t.reactions;if(n!==null){var i=Xi.call(n,e);if(i!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[i]=n[a],n.pop())}}n===null&&(t.f&ge)!==0&&(ee===null||!ee.includes(t))&&(_e(t,Ze),(t.f&(se|Jt))===0&&(t.f^=Jt),gr(t),on(t,0))}function on(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)Tl(e,n[i])}function On(e){var t=e.f;if((t&Kt)===0){_e(e,le);var n=S,i=te,a=Je;S=e,Je=!0;try{(t&Cn)!==0?Al(e):yr(e),br(e);var o=Lr(e);e.teardown=typeof o=="function"?o:null,e.wv=Sr;var s=e.deps,f;er&&_l&&e.f&ye}catch(c){ln(c,e,n,i||e.ctx)}finally{Je=a,S=n}}}function Nl(){try{ul()}catch(e){if(nn!==null)ln(e,nn,null);else throw e}}function Pr(){var e=Je;try{var t=0;for(Je=!0;Nt.length>0;){t++>1e3&&Nl();var n=Nt,i=n.length;Nt=[];for(var a=0;a<i;a++){var o=Ll(n[a]);Dl(o)}Lt.clear()}}finally{tn=!1,Je=e,nn=null}}function Dl(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if((i.f&(Kt|dt))===0)try{Dt(i)&&(On(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Er(i):i.fn=null))}catch(a){ln(a,i,null,i.ctx)}}}function an(e){tn||(tn=!0,queueMicrotask(Pr));for(var t=nn=e;t.parent!==null;){t=t.parent;var n=t.f;if((n&(Ge|ke))!==0){if((n&le)===0)return;t.f^=le}}Nt.push(t)}function Ll(e){for(var t=[],n=e;n!==null;){var i=n.f,a=(i&(ke|Ge))!==0,o=a&&(i&le)!==0;if(!o&&(i&dt)===0){if((i&or)!==0)t.push(n);else if(a)n.f^=le;else try{Dt(n)&&On(n)}catch(c){ln(c,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)n=f.next,f=f.parent}return t}function E(e){for(var t;;){if($l(),Nt.length===0)return t;tn=!0,Pr()}}async function Fn(){await Promise.resolve(),E()}function l(e){var t=e.f,n=(t&ge)!==0;if(k!==null&&!Ee){if(!Se?.includes(e)){var i=k.deps;e.rv<rn&&(e.rv=rn,ee===null&&i!==null&&i[ue]===e?ue++:ee===null?ee=[e]:(!Ve||!ee.includes(e))&&ee.push(e))}}else if(n&&e.deps===null&&e.effects===null){var a=e,o=a.parent;o!==null&&(o.f&se)===0&&(a.f^=se)}return n&&(a=e,Dt(a)&&mr(a)),Tt&&Lt.has(e)?Lt.get(e):e.v}function Ke(e){var t=Ee;try{return Ee=!0,e()}finally{Ee=t}}const Pl=-7169;function _e(e,t){e.f=e.f&Pl|t}const Lt=new Map;function Or(e,t){var n={f:0,v:e,reactions:null,equals:vr,rv:0,wv:0};return n}function T(e,t){const n=Or(e);return kr(n),n}function Vn(e,t=!1){const n=Or(e);return t||(n.equals=$n),n}function b(e,t,n=!1){k!==null&&!Ee&&qr()&&(k.f&(ge|Cn))!==0&&!Se?.includes(e)&&hl();let i=n?Le(t):t;return Ol(e,i)}function Ol(e,t){if(!e.equals(t)){var n=e.v;Tt?Lt.set(e,t):Lt.set(e,n),e.v=t,(e.f&ge)!==0&&((e.f&ye)!==0&&_r(e),_e(e,(e.f&se)===0?le:Ze)),e.wv=Tr(),Fr(e,ye),S!==null&&(S.f&le)!==0&&(S.f&(ke|Ge))===0&&(ve===null?kl([e]):ve.push(e))}return t}function Fr(e,t){var n=e.reactions;if(n!==null)for(var i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;(s&ye)===0&&(_e(o,t),(s&(le|se))!==0&&((s&ge)!==0?Fr(o,Ze):an(o)))}}let te=null;function Vr(e){te=e}function Mr(e,t=!1,n){var i=te={p:te,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};kn(()=>{i.d=!0})}function Ur(e){const t=te;if(t!==null){e!==void 0&&(t.x=e);const s=t.e;if(s!==null){var n=S,i=k;t.e=null;try{for(var a=0;a<s.length;a++){var o=s[a];Fe(o.effect),Ce(o.reaction),Tn(o.fn)}}finally{Fe(n),Ce(i)}}te=t.p,t.m=!0}return e||{}}function qr(){return!0}const Fl=["touchstart","touchmove"];function Vl(e){return Fl.includes(e)}function Ml(e,t){if(t){const n=document.body;e.autofocus=!0,Pn(()=>{document.activeElement===n&&e.focus()})}}let jr=!1;function Br(){jr||(jr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Hr(e){var t=k,n=S;Ce(null),Fe(null);try{return e()}finally{Ce(t),Fe(n)}}function Ul(e,t,n,i=n){e.addEventListener(t,()=>Hr(n));const a=e.__on_r;a?e.__on_r=()=>{a(),i(!0)}:e.__on_r=()=>i(!0),Br()}const Yr=new Set,Mn=new Set;function ql(e,t,n,i={}){function a(o){if(i.capture||Pt.call(t,o),!o.cancelBubble)return Hr(()=>n?.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Pn(()=>{t.addEventListener(e,a,i)}):t.addEventListener(e,a,i),a}function Me(e,t,n,i,a){var o={capture:i,passive:a},s=ql(e,t,n,o);(t===document.body||t===window||t===document)&&kn(()=>{t.removeEventListener(e,s,o)})}function jl(e){for(var t=0;t<e.length;t++)Yr.add(e[t]);for(var n of Mn)n(e)}function Pt(e){var t=this,n=t.ownerDocument,i=e.type,a=e.composedPath?.()||[],o=a[0]||e.target,s=0,f=e.__root;if(f){var c=a.indexOf(f);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=a.indexOf(t);if(d===-1)return;c<=d&&(s=c)}if(o=a[s]||e.target,o!==t){It(e,"currentTarget",{configurable:!0,get(){return o||n}});var m=k,h=S;Ce(null),Fe(null);try{for(var p,w=[];o!==null;){var F=o.assignedSlot||o.parentNode||o.host||null;try{var V=o["__"+i];if(V!=null&&(!o.disabled||e.target===o))if(nr(V)){var[U,...R]=V;U.apply(o,[e,...R])}else V.call(o,e)}catch(ne){p?w.push(ne):p=ne}if(e.cancelBubble||F===t||F===null)break;o=F}if(p){for(let ne of w)queueMicrotask(()=>{throw ne});throw p}}finally{e.__root=t,delete e.currentTarget,Ce(m),Fe(h)}}}function Un(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ae(e,t){var n=S;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function me(e,t){var n=(t&Wi)!==0,i=(t&Ji)!==0,a,o=!e.startsWith("<!>");return()=>{if(L)return Ae(P,null),P;a===void 0&&(a=Un(o?e:"<!>"+e),n||(a=de(a)));var s=i||fr?document.importNode(a,!0):a.cloneNode(!0);if(n){var f=de(s),c=s.lastChild;Ae(f,c)}else Ae(s,s);return s}}function sn(e,t,n="svg"){var i=!e.startsWith("<!>"),a=`<${n}>${i?e:"<!>"+e}</${n}>`,o;return()=>{if(L)return Ae(P,null),P;if(!o){var s=Un(a),f=de(s);o=de(f)}var c=o.cloneNode(!0);return Ae(c,c),c}}function un(){if(L)return Ae(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),n=zt();return e.append(t,n),Ae(t,n),e}function B(e,t){if(L){S.nodes_end=P,ht();return}e!==null&&e.before(t)}function Bl(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function Gr(e,t){return Zr(e,t)}function Hl(e,t){Rn(),t.intro=t.intro??!1;const n=t.target,i=L,a=P;try{for(var o=de(n);o&&(o.nodeType!==8||o.data!==En);)o=Pe(o);if(!o)throw ft;vt(!0),De(o),ht();const s=Zr(e,{...t,anchor:o});if(P===null||P.nodeType!==8||P.data!==Qn)throw Xt(),ft;return vt(!1),s}catch(s){if(s===ft)return t.recover===!1&&fl(),Rn(),ml(n),vt(!1),Gr(e,t);throw s}finally{vt(i),De(a)}}const gt=new Map;function Zr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0}){Rn();var f=new Set,c=h=>{for(var p=0;p<h.length;p++){var w=h[p];if(!f.has(w)){f.add(w);var F=Vl(w);t.addEventListener(w,Pt,{passive:F});var V=gt.get(w);V===void 0?(document.addEventListener(w,Pt,{passive:F}),gt.set(w,1)):gt.set(w,V+1)}}};c(zi(Yr)),Mn.add(c);var d=void 0,m=Cl(()=>{var h=n??t.appendChild(zt());return Dn(()=>{if(o){Mr({});var p=te;p.c=o}a&&(i.$$events=a),L&&Ae(h,null),d=e(h,i)||{},L&&(S.nodes_end=P),o&&Ur()}),()=>{for(var p of f){t.removeEventListener(p,Pt);var w=gt.get(p);--w===0?(document.removeEventListener(p,Pt),gt.delete(p)):gt.set(p,w)}Mn.delete(c),h!==n&&h.parentNode?.removeChild(h)}});return qn.set(d,m),d}let qn=new WeakMap;function Yl(e,t){const n=qn.get(e);return n?(qn.delete(e),n(t)):Promise.resolve()}function J(e,t,[n,i]=[0,0]){L&&n===0&&ht();var a=e,o=null,s=null,f=ie,c=n>0?An:0,d=!1;const m=(p,w=!0)=>{d=!0,h(w,p)},h=(p,w)=>{if(f===(f=p))return;let F=!1;if(L&&i!==-1){if(n===0){const U=a.data;U===En?i=0:U===zn?i=1/0:(i=parseInt(U.substring(1)),i!==i&&(i=f?1/0:-1))}const V=i>n;!!f===V&&(a=gl(),De(a),vt(!1),F=!0,i=-1)}f?(o?Ar(o):w&&(o=Dn(()=>w(a))),s&&Ln(s,()=>{s=null})):(s?Ar(s):w&&(s=Dn(()=>w(a,[n+1,i]))),o&&Ln(o,()=>{o=null})),F&&vt(!0)};pr(()=>{d=!1,t(m),d||h(null,null)},c),L&&(a=P)}function Xe(e,t,n=!1,i=!1,a=!1){var o=e,s="";we(()=>{var f=S;if(s===(s=t()??"")){L&&ht();return}if(f.nodes_start!==null&&(wr(f.nodes_start,f.nodes_end),f.nodes_start=f.nodes_end=null),s!==""){if(L){P.data;for(var c=ht(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Pe(c);if(c===null)throw Xt(),ft;Ae(P,d),o=De(c);return}var m=s+"";n?m=`<svg>${m}</svg>`:i&&(m=`<math>${m}</math>`);var h=Un(m);if((n||i)&&(h=de(h)),Ae(de(h),h.lastChild),n||i)for(;de(h);)o.before(de(h));else o.before(h)}})}function Gl(e,t,n,i,a){L&&ht();var o=t.$$slots?.[n],s=!1;o===!0&&(o=t.children,s=!0),o===void 0||o(e,s?()=>i:i)}const Wr=[...`
\r\f \v\uFEFF`];function Zl(e,t,n){var i=""+e;if(n){for(var a in n)if(n[a])i=i?i+" "+a:a;else if(i.length)for(var o=a.length,s=0;(s=i.indexOf(a,s))>=0;){var f=s+o;(s===0||Wr.includes(i[s-1]))&&(f===i.length||Wr.includes(i[f]))?i=(s===0?"":i.substring(0,s))+i.substring(f+1):s=f}}return i===""?null:i}function Wl(e,t,n,i,a,o){var s=e.__className;if(L||s!==n||s===void 0){var f=Zl(n,i,o);(!L||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=n}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 Jl=Symbol("is custom element"),Kl=Symbol("is html");function Jr(e){if(L){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;$(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var a=e.checked;$(e,"checked",null),e.checked=a}}};e.__on_r=n,Rl(n),Br()}}function Xl(e,t){var n=Kr(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function $(e,t,n,i){var a=Kr(e);L&&(a[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||a[t]!==(a[t]=n)&&(t==="loading"&&(e[ll]=n),n==null?e.removeAttribute(t):typeof n!="string"&&zl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Kr(e){return e.__attributes??={[Jl]:e.nodeName.includes("-"),[Kl]:e.namespaceURI===Ki}}var Xr=new Map;function zl(e){var t=Xr.get(e.nodeName);if(t)return t;Xr.set(e.nodeName,t=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=Qi(i);for(var o in n)n[o].set&&t.push(o);i=rr(i)}return t}function Ql(e,t,n=t){Ul(e,"change",i=>{var a=i?e.defaultChecked:e.checked;n(a)}),(L&&e.defaultChecked!==e.checked||Ke(t)==null)&&n(e.checked),Nn(()=>{var i=t();e.checked=!!i})}function zr(e,t){return e===t||e?.[xt]===t}function fn(e={},t,n,i){return Tn(()=>{var a,o;return Nn(()=>{a=o,o=[],Ke(()=>{e!==n(...o)&&(t(e,...o),a&&zr(n(...a),e)&&t(null,...a))})}),()=>{Pn(()=>{o&&zr(n(...o),e)&&t(null,...o)})}}),e}function Qr(e){te===null&&tr(),Sn(()=>{const t=Ke(e);if(typeof t=="function")return t})}function eo(e){te===null&&tr(),Qr(()=>()=>Ke(e))}function ei(e,t,n){if(e==null)return t(void 0),ct;const i=Ke(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}const _t=[];function to(e,t=ct){let n=null;const i=new Set;function a(f){if(hr(e,f)&&(e=f,n)){const c=!_t.length;for(const d of i)d[1](),_t.push(d,e);if(c){for(let d=0;d<_t.length;d+=2)_t[d][0](_t[d+1]);_t.length=0}}}function o(f){a(f(e))}function s(f,c=ct){const d=[f,c];return i.add(d),i.size===1&&(n=t(a,o)||ct),f(e),()=>{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:a,update:o,subscribe:s}}function cn(e){let t;return ei(e,n=>t=n)(),t}let dn=!1,jn=Symbol();function no(e,t,n){const i=n[t]??={store:null,source:Vn(void 0),unsubscribe:ct};if(i.store!==e&&!(jn in n))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=ct;else{var a=!0;i.unsubscribe=ei(e,o=>{a?i.source.v=o:b(i.source,o)}),a=!1}return e&&jn in n?cn(e):l(i.source)}function ro(){const e={};function t(){kn(()=>{for(var n in e)e[n].unsubscribe();It(e,jn,{enumerable:!1,value:!0})})}return[e,t]}function io(e){var t=dn;try{return dn=!1,[e(),dn]}finally{dn=t}}function ti(e){return e.ctx?.d??!1}function C(e,t,n,i){var a=(n&Hi)!==0,o=!0,s=(n&Gi)!==0,f=(n&Zi)!==0,c=!1,d;s?[d,c]=io(()=>e[t]):d=e[t];var m=xt in e||sr in e,h=s&&(Ye(e,t)?.set??(m&&t in e&&(q=>e[t]=q)))||void 0,p=i,w=!0,F=!1,V=()=>(F=!0,w&&(w=!1,f?p=Ke(i):p=i),p);d===void 0&&i!==void 0&&(h&&o&&cl(),d=V(),h&&h(d));var U;if(U=()=>{var q=e[t];return q===void 0?V():(w=!0,F=!1,q)},(n&Yi)===0)return U;if(h){var R=e.$$legacy;return function(q,fe){return arguments.length>0?((!fe||R||c)&&h(fe?U():q),q):U()}}var ne=!1,Te=Vn(d),Q=Qt(()=>{var q=U(),fe=l(Te);return ne?(ne=!1,fe):Te.v=q});return s&&l(Q),a||(Q.equals=$n),function(q,fe){if(arguments.length>0){const ze=fe?l(Q):s?Le(q):q;if(!Q.equals(ze)){if(ne=!0,b(Te,ze),F&&p!==void 0&&(p=ze),ti(Q))return q;Ke(()=>l(Q))}return q}return ti(Q)?Q.v:l(Q)}}function lo(e){return new oo(e)}class oo{#t;#e;constructor(t){var n=new Map,i=(o,s)=>{var f=Vn(s);return n.set(o,f),f};const a=new Proxy({...t.props||{},$$events:{}},{get(o,s){return l(n.get(s)??i(s,Reflect.get(o,s)))},has(o,s){return s===sr?!0:(l(n.get(s)??i(s,Reflect.get(o,s))),Reflect.has(o,s))},set(o,s,f){return b(n.get(s)??i(s,f),f),Reflect.set(o,s,f)}});this.#e=(t.hydrate?Hl:Gr)(t.component,{target:t.target,anchor:t.anchor,props:a,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&E(),this.#t=a.$$events;for(const o of Object.keys(this.#e))o==="$set"||o==="$destroy"||o==="$on"||It(this,o,{get(){return this.#e[o]},set(s){this.#e[o]=s},enumerable:!0});this.#e.$set=o=>{Object.assign(a,o)},this.#e.$destroy=()=>{Yl(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const i=(...a)=>n.call(this,...a);return this.#t[t].push(i),()=>{this.#t[t]=this.#t[t].filter(a=>a!==i)}}$destroy(){this.#e.$destroy()}}let ni;typeof HTMLElement=="function"&&(ni=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const i=this.$$c.$on(e,t);this.$$l_u.set(t,i)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const i=this.$$l_u.get(t);i&&(i(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return a=>{const o=document.createElement("slot");i!=="default"&&(o.name=i),B(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=ao(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),t.default=!0):t[i]=e(i));for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=vn(a,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=lo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=El(()=>{Nn(()=>{this.$$r=!0;for(const i of Gt(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const a=vn(i,this.$$d[i],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,a)}this.$$r=!1})});for(const i in this.$$l)for(const a of this.$$l[i]){const o=this.$$c.$on(i,a);this.$$l_u.set(a,o)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=vn(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Gt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function vn(e,t,n,i){const a=n[e]?.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[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 ao(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function so(e,t,n,i,a,o){let s=class extends ni{constructor(){super(e,n,a),this.$$p_d=t}static get observedAttributes(){return Gt(t).map(f=>(t[f].attribute||f).toLowerCase())}};return Gt(t).forEach(f=>{It(s.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(c){c=vn(f,c,t),this.$$d[f]=c;var d=this.$$c;if(d){var m=Ye(d,f)?.get;m?d[f]=c:d.$set({[f]:c})}}})}),i.forEach(f=>{It(s.prototype,f,{get(){return this.$$c?.[f]}})}),e.element=s,s}const ri=new TextEncoder;function uo(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function fo(e,t="SHA-256",n=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*n));const a=await ii(i,e,t);return{algorithm:t,challenge:a,salt:i,signature:""}}async function ii(e,t,n){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 uo(await crypto.subtle.digest(n.toUpperCase(),ri.encode(e+t)))}function co(e,t,n="SHA-256",i=1e6,a=0){const o=new AbortController,s=Date.now();return{promise:(async()=>{for(let c=a;c<=i;c+=1){if(o.signal.aborted)return null;if(await ii(t,c,n)===e)return{number:c,took:Date.now()-s}}return null})(),controller:o}}function li(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function vo(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function ho(e,t=12){const n=new Uint8Array(t);for(let i=0;i<t;i++)n[i]=e%256,e=Math.floor(e/256);return n}async function go(e,t="",n=1e6,i=0){const a="AES-GCM",o=new AbortController,s=Date.now(),f=async()=>{for(let m=i;m<=n;m+=1){if(o.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:a,iv:ho(m)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-s}}catch{}}return null};let c=null,d=null;try{d=vo(e);const m=await crypto.subtle.digest("SHA-256",ri.encode(t));c=await crypto.subtle.importKey("raw",m,a,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:f(),controller:o}}var y=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(y||{}),z=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(z||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>cn(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(cn(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(cn(globalThis.altchaI18n.store))},store:to({})};const _o={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",_o);const Bn=(e,t)=>{let n=pl(()=>nl(t?.(),24));var i=yo();we(()=>{$(i,"width",l(n)),$(i,"height",l(n))}),B(e,i)};function mo(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function po(e,t){e.preventDefault(),t()}function bo(e,t,n,i,a,o,s,f){[y.UNVERIFIED,y.ERROR,y.EXPIRED,y.CODE].includes(l(t))?n()!==!1&&l(i)?.reportValidity()===!1?b(a,!1):o()?s():f():b(a,!0)}var yo=sn('<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>'),wo=me('<input type="hidden">'),Eo=me('<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>'),Co=sn('<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>'),Ao=sn('<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>'),Io=sn('<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>'),xo=me('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Ro=me("<audio hidden autoplay><source></audio>"),$o=me('<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>'),ko=me("<div><!></div>"),So=me("<div><!></div>"),To=me('<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>'),No=me('<div class="altcha-footer"><div><!></div></div>'),Do=me('<div class="altcha-anchor-arrow"></div>'),Lo=me('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function oi(e,t){Mr(t,!0);const[n,i]=ro(),a=()=>no(Oo,"$altchaI18nStore",n);let o=C(t,"auto",7,void 0),s=C(t,"blockspam",7,void 0),f=C(t,"challengeurl",7,void 0),c=C(t,"challengejson",7,void 0),d=C(t,"credentials",7,void 0),m=C(t,"customfetch",7,void 0),h=C(t,"debug",7,!1),p=C(t,"delay",7,0),w=C(t,"disableautofocus",7,!1),F=C(t,"refetchonexpire",7,!0),V=C(t,"disablerefetchonexpire",23,()=>!F()),U=C(t,"expire",7,void 0),R=C(t,"floating",7,void 0),ne=C(t,"floatinganchor",7,void 0),Te=C(t,"floatingoffset",7,void 0),Q=C(t,"floatingpersist",7,!1),q=C(t,"hidefooter",7,!1),fe=C(t,"hidelogo",7,!1),ze=C(t,"id",7,void 0),hn=C(t,"language",7,void 0),Qe=C(t,"name",7,"altcha"),et=C(t,"maxnumber",7,1e6),Ot=C(t,"mockerror",7,!1),Ue=C(t,"obfuscated",7,void 0),pe=C(t,"overlay",7,void 0),Ft=C(t,"overlaycontent",7,void 0),gn=C(t,"plugins",7,void 0),tt=C(t,"sentinel",7,void 0),Ie=C(t,"spamfilter",7,!1),mt=C(t,"strings",7,void 0),he=C(t,"test",7,!1),re=C(t,"verifyurl",7,void 0),pt=C(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Vt=C(t,"workerurl",7,void 0);const{altchaI18n:Po}=globalThis,Oo=Po.store,ai=["SHA-256","SHA-384","SHA-512"],Fo="https://altcha.org/",qe=(r,u)=>{t.$$host.dispatchEvent(new CustomEvent(r,{detail:u}))},si=document.documentElement.lang?.split("-")?.[0],Hn=$t(()=>f()&&new URL(f(),location.origin).host.endsWith(".altcha.org")&&!!f()?.includes("apiKey=ckey_")),_n=$t(()=>c()?Ei(c()):void 0),Vo=$t(()=>mt()?Ei(mt()):{}),O=$t(()=>({...ci(a()),...l(Vo)})),ui=$t(()=>`${ze()||Qe()}_checkbox_${Math.round(Math.random()*1e8)}`);let nt=T(null),Mt=T(!1),Y=T(null),I=T(Le(y.UNVERIFIED)),M=T(void 0),Ut=T(null),je=T(null),ce=T(null),Yn=T(null),bt=T(null),N=T(null),qt=T(null),rt=T(null),xe=null,K=T(null),it=T(!1),Be=[],Gn=T(!1),Re=T(null);Sn(()=>{Xo(l(rt))}),Sn(()=>{zo(l(I))}),eo(()=>{Mo(),b(qt,null),l(N)&&(l(N).removeEventListener("submit",mi),l(N).removeEventListener("reset",pi),l(N).removeEventListener("focusin",_i),b(N,null)),xe&&(clearTimeout(xe),xe=null),document.removeEventListener("click",hi),document.removeEventListener("scroll",gi),window.removeEventListener("resize",wi)}),Qr(()=>{x("mounted","2.2.4"),x("workers",pt()),Bo(),x("plugins",Be.length?Be.map(r=>r.constructor.pluginName).join(", "):"none"),he()&&x("using test mode"),U()&&Wn(U()),o()!==void 0&&x("auto",o()),R()!==void 0&&xi(R()),b(N,l(M)?.closest("form"),!0),l(N)&&(l(N).addEventListener("submit",mi,{capture:!0}),l(N).addEventListener("reset",pi),(o()==="onfocus"||Q()==="focus")&&l(N).addEventListener("focusin",_i)),pe()&&Ri(!0),o()==="onload"&&(Ue()?jt():Ne()),l(Hn)&&(q()||fe())&&x("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{qe("load")})});function mn(r,u){return btoa(JSON.stringify({algorithm:r.algorithm,challenge:r.challenge,number:u.number,salt:r.salt,signature:r.signature,test:he()?!0:void 0,took:u.took}))}function Mo(){for(const r of Be)r.destroy()}function fi(){f()&&!V()&&l(I)===y.VERIFIED?Ne():lt(y.EXPIRED,l(O).expired)}async function Uo(){if(Ot())throw x("mocking error"),new Error("Mocked error.");if(l(_n))return x("using provided json data"),Ci(l(_n).salt),l(_n);if(he())return x("generating test challenge",{test:he()}),fo(typeof he()!="boolean"?+he():void 0);{if(!f()&&l(N)){const g=l(N).getAttribute("action");g?.includes("/form/")&&f(g+"/altcha")}if(!f())throw new Error("Attribute challengeurl not set.");x("fetching challenge from",f());const r={credentials:typeof d()=="boolean"?"include":d(),headers:Ie()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await Zn()(f(),r);if(!u||!(u instanceof Response))throw new Error("Custom fetch function did not return a response.");if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const v=u.headers.get("X-Altcha-Config"),_=await u.json();if(Ci(_.salt),v)try{const g=JSON.parse(v);g&&typeof g=="object"&&(g.verifyurl&&!g.verifyurl.startsWith("fn:")&&(g.verifyurl=vi(g.verifyurl)),Si(g))}catch(g){x("unable to configure from X-Altcha-Config",g)}return _}}function qo(r){const u=l(N)?.querySelector(typeof r=="string"?`input[name="${r}"]`:'input[type="email"]:not([data-no-spamfilter])');return u?.value?.slice(u.value.indexOf("@"))||void 0}function Zn(){let r=fetch;if(m())if(x("using customfetch"),typeof m()=="string"){if(r=globalThis[m()]||null,!r)throw new Error(`Custom fetch function not found: ${m()}`)}else r=m();return r}function ci(r,u=[hn()||"",document.documentElement.lang||"",...navigator.languages]){const v=Object.keys(r).map(g=>g.toLowerCase()),_=u.reduce((g,A)=>(A=A.toLowerCase(),g||(r[A]?A:null)||v.find(D=>A.split("-")[0]===D.split("-")[0])||null),null);return r[_||"en"]}function jo(){return Ie()==="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 Ie()=="object"?Ie():{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 di(r){return[...l(N)?.querySelectorAll(r?.length?r.map(v=>`input[name="${v}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((v,_)=>{const g=_.name,A=_.value;return g&&A&&(v[g]=/\n/.test(A)?A.replace(new RegExp("(?<!\\r)\\n","g"),`\r
`):A),v},{})}function vi(r,u){const v=new URL(f()||location.origin),_=new URL(r,v);if(_.search||(_.search=v.search),u)for(const g in u)u[g]!==void 0&&u[g]!==null&&_.searchParams.set(g,u[g]);return _.toString()}function Bo(){const r=gn()!==void 0?gn().split(","):void 0;for(const u of globalThis.altchaPlugins)(!r||r.includes(u.pluginName))&&Be.push(new u({el:l(M),clarify:jt,dispatch:qe,getConfiguration:Ti,getFloatingAnchor:Ni,getState:Di,log:x,reset:lt,solve:ki,setState:$e,setFloatingAnchor:Li,verify:Ne}))}function x(...r){(h()||r.some(u=>u instanceof Error))&&console[r[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${Qe()}]`,...r)}function Ho(){b(K,z.PAUSED,!0)}function Yo(r){b(K,z.ERROR,!0)}function Go(){b(K,z.READY,!0)}function Zo(){b(K,z.LOADING,!0)}function Wo(){b(K,z.PLAYING,!0)}function Jo(){b(K,z.PAUSED,!0)}function Ko(r){if(r.preventDefault(),r.stopPropagation(),l(Y)){const u=new FormData(r.target),v=String(u.get("code"));if(re()?.startsWith("fn:")){const _=re().replace(/^fn:/,"");if(x(`calling ${_} function instead of verifyurl`),!(_ in globalThis))throw new Error(`Global function "${_}" is undefined.`);return globalThis[_]({challenge:l(Y).challenge,code:v,solution:l(Y).solution})}b(it,!0),Ai(mn(l(Y).challenge,l(Y).solution),v).then(({reason:_,verified:g})=>{g?(b(Y,null),$e(y.VERIFIED),x("verified"),Fn().then(()=>{l(Yn)?.focus(),qe("verified",{payload:l(Re)}),o()==="onsubmit"?Ii(l(qt)):pe()&&Bt()})):(lt(),b(rt,_||"Verification failed",!0))}).catch(_=>{b(Y,null),$e(y.ERROR,_),x("sentinel verification failed:",_)}).finally(()=>{b(it,!1)})}}function hi(r){const u=r.target;R()&&u&&!l(M).contains(u)&&(l(I)===y.VERIFIED&&Q()===!1||l(I)===y.VERIFIED&&Q()==="focus"&&!l(N)?.matches(":focus-within")||o()==="off"&&l(I)===y.UNVERIFIED)&&Bt()}function gi(){R()&&l(I)!==y.UNVERIFIED&&Ht()}function Xo(r){for(const u of Be)typeof u.onErrorChange=="function"&&u.onErrorChange(l(rt))}function _i(r){l(I)===y.UNVERIFIED?Ne():R()&&Q()==="focus"&&l(I)===y.VERIFIED&&pn()}function mi(r){r.target?.hasAttribute("data-code-challenge-form")||(b(qt,r.submitter,!0),l(N)&&o()==="onsubmit"?(l(qt)?.blur(),l(I)===y.UNVERIFIED?(r.preventDefault(),r.stopPropagation(),Ne().then(()=>{Ii(l(qt))})):l(I)!==y.VERIFIED&&(r.preventDefault(),r.stopPropagation(),l(I)===y.VERIFYING&&bi())):l(N)&&R()&&o()==="off"&&l(I)===y.UNVERIFIED&&(r.preventDefault(),r.stopPropagation(),pn()))}function pi(){lt()}function bi(){l(I)===y.VERIFYING&&l(O).waitAlert&&alert(l(O).waitAlert)}function yi(){l(je)?l(je).paused?(l(je).currentTime=0,l(je).play()):l(je).pause():(b(Gn,!0),requestAnimationFrame(()=>{l(je)?.play()}))}function zo(r){for(const u of Be)typeof u.onStateChange=="function"&&u.onStateChange(l(I));R()&&l(I)!==y.UNVERIFIED&&requestAnimationFrame(()=>{Ht()}),b(Mt,l(I)===y.VERIFIED),pe()&&l(ce)&&(l(I)!==y.UNVERIFIED?pn():Bt())}function wi(){R()&&Ht()}function Ei(r){return JSON.parse(r)}function Ci(r){const u=new URLSearchParams(r.split("?")?.[1]),v=u.get("expires")||u.get("expire");if(v){const _=new Date(+v*1e3),g=isNaN(_.getTime())?0:_.getTime()-Date.now();g>0&&Wn(g)}else xe&&(clearTimeout(xe),xe=null)}async function Qo(r){if(!re())throw new Error("Attribute verifyurl not set.");x("requesting server verification from",re());const u={payload:r};if(Ie()!==!1){const{blockedCountries:g,classifier:A,disableRules:D,email:H,expectedLanguages:j,expectedCountries:oe,fields:ae,ipAddress:at,text:wt,timeZone:st}=jo();u.blockedCountries=g,u.classifier=A,u.disableRules=D,u.email=H===!1?void 0:qo(H),u.expectedCountries=oe,u.expectedLanguages=j||(si?[si]:void 0),u.fields=ae===!1?void 0:di(ae),u.ipAddress=at===!1?void 0:at||"auto",u.text=wt,u.timeZone=st===!1?void 0:st||li()}const v=await Zn()(re(),{body:JSON.stringify(u),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 _=await v.json();if(_?.payload&&b(Re,_.payload,!0),qe("serververification",_),s()&&_.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Ai(r,u){if(!re())throw new Error("Attribute verifyurl not set.");x("requesting sentinel verification from",re());const v={code:u,payload:r};tt()&&(v.fields=tt().fields?di():void 0,v.timeZone=tt().timeZone?li():void 0);const _=await Zn()(re(),{body:JSON.stringify(v),headers:{"content-type":"application/json"},method:"POST"});if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const g=await _.json();return g?.payload&&b(Re,g.payload,!0),qe("sentinelverification",g),g}function Ii(r){l(N)&&"requestSubmit"in l(N)?l(N).requestSubmit(r):l(N)?.reportValidity()&&(r?r.click():l(N).submit())}function Wn(r){x("expire",r),xe&&(clearTimeout(xe),xe=null),r<1?fi():xe=setTimeout(fi,r)}function xi(r){x("floating",r),R()!==r&&(l(M).style.left="",l(M).style.top=""),R(r===!0||r===""?"auto":r===!1||r==="false"?void 0:R()),R()?(o()||o("onsubmit"),document.addEventListener("scroll",gi),document.addEventListener("click",hi),window.addEventListener("resize",wi)):o()==="onsubmit"&&o(void 0)}function Ri(r){if(x("overlay",r),pe(r),r){if(o()||o("onsubmit"),l(ce)&&l(M).parentElement&&l(ce).replaceWith(l(M).parentElement),l(M)?.parentElement?.parentElement){b(ce,document.createElement("div"),!0),l(M).parentElement.parentElement.appendChild(l(ce));const u=document.createElement("div"),v=document.createElement("button");v.type="button",v.innerHTML="×",v.addEventListener("click",_=>{_.preventDefault(),lt()}),l(ce).classList.add("altcha-overlay-backdrop"),v.classList.add("altcha-overlay-close-button"),u.classList.add("altcha-overlay"),l(ce).append(u),u.append(v),Ft()&&u.append(...document.querySelectorAll(Ft())),u.append(l(M).parentElement)}}else l(ce)&&l(M).parentElement&&(l(ce).replaceWith(l(M).parentElement),l(M).style.display="block")}function $i(r){if(!r.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(r.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!ai.includes(r.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${ai.join(", ")}`);if(!r.challenge||r.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!r.salt||r.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function ki(r){let u=null,v=null;if("Worker"in window){try{u=ea(r,r.maxNumber||r.maxnumber||et()),b(nt,u.controller,!0),v=await u.promise}catch(_){x(_)}finally{b(nt,null)}if(v===null||v?.number!==void 0||"obfuscated"in r)return{data:r,solution:v}}if("obfuscated"in r){const _=await go(r.obfuscated,r.key,r.maxNumber||r.maxnumber);return{data:r,solution:await _.promise}}u=co(r.challenge,r.salt,r.algorithm,r.maxNumber||r.maxnumber||et()),b(nt,u.controller,!0);try{v=await u.promise}catch(_){x(_)}finally{b(nt,null)}return{data:r,solution:v}}function ea(r,u=typeof he()=="number"?he():r.maxNumber||r.maxnumber||et(),v=Math.ceil(pt())){const _=new AbortController,g=[];v=Math.min(16,u,Math.max(1,v));for(let H=0;H<v;H++)g.push(altchaCreateWorker(Vt()));const A=Math.ceil(u/v);return{promise:(async()=>{const H=await Promise.all(g.map((j,oe)=>{const ae=oe*A;return _.signal.addEventListener("abort",()=>{j.postMessage({type:"abort"})}),new Promise(at=>{j.addEventListener("message",wt=>{if(wt.data)for(const st of g)st!==j&&st.postMessage({type:"abort"});at(wt.data)}),j.postMessage({payload:r,max:ae+A,start:ae,type:"work"})})}));for(const j of g)j.terminate();return H.find(j=>!!j)||null})(),controller:_}}async function jt(){if(!Ue()){$e(y.ERROR);return}const r=Be.find(u=>u.constructor.pluginName==="obfuscation");if(!r||!("clarify"in r)){$e(y.ERROR),x("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in r&&typeof r.clarify=="function")return r.clarify()}function Si(r){r.obfuscated!==void 0&&Ue(r.obfuscated),r.auto!==void 0&&(o(r.auto),o()==="onload"&&(Ue()?jt():Ne())),r.blockspam!==void 0&&s(!!r.blockspam),r.customfetch!==void 0&&m(r.customfetch),r.floatinganchor!==void 0&&ne(r.floatinganchor),r.delay!==void 0&&p(r.delay),r.floatingoffset!==void 0&&Te(r.floatingoffset),r.floating!==void 0&&xi(r.floating),r.expire!==void 0&&(Wn(r.expire),U(r.expire)),r.challenge&&(c(typeof r.challenge=="string"?r.challenge:JSON.stringify(r.challenge)),$i(l(_n))),r.challengeurl!==void 0&&f(r.challengeurl),r.debug!==void 0&&h(!!r.debug),r.hidefooter!==void 0&&q(!!r.hidefooter),r.hidelogo!==void 0&&fe(!!r.hidelogo),r.language!==void 0&&mt(ci(a(),[r.language])),r.maxnumber!==void 0&&et(+r.maxnumber),r.mockerror!==void 0&&Ot(!!r.mockerror),r.name!==void 0&&Qe(r.name),r.overlaycontent!==void 0&&Ft(r.overlaycontent),r.overlay!==void 0&&Ri(r.overlay),r.refetchonexpire!==void 0&&V(!r.refetchonexpire),r.disablerefetchonexpire!==void 0&&V(!r.disablerefetchonexpire),r.sentinel!==void 0&&typeof r.sentinel=="object"&&tt(r.sentinel),r.spamfilter!==void 0&&Ie(typeof r.spamfilter=="object"?r.spamfilter:!!r.spamfilter),r.strings&&mt(typeof r.strings=="string"?r.strings:JSON.stringify(r.strings)),r.test!==void 0&&he(typeof r.test=="number"?r.test:!!r.test),r.verifyurl!==void 0&&re(r.verifyurl),r.workers!==void 0&&pt(+r.workers),r.workerurl!==void 0&&Vt(r.workerurl)}function Ti(){return{auto:o(),block