UNPKG

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