altcha 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- (function(k,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(k=typeof globalThis<"u"?globalThis:k||self,R(k.altcha={}))})(this,function(k){"use strict";var ea=Object.defineProperty;var Mn=k=>{throw TypeError(k)};var ta=(k,R,X)=>R in k?ea(k,R,{enumerable:!0,configurable:!0,writable:!0,value:X}):k[R]=X;var ce=(k,R,X)=>ta(k,typeof R!="symbol"?R+"":R,X),jn=(k,R,X)=>R.has(k)||Mn("Cannot "+X);var K=(k,R,X)=>(jn(k,R,"read from private field"),X?X.call(k):R.get(k)),ar=(k,R,X)=>R.has(k)?Mn("Cannot add the same private member more than once"):R instanceof WeakSet?R.add(k):R.set(k,X),or=(k,R,X,nt)=>(jn(k,R,"write to private field"),nt?nt.call(k,X):R.set(k,X),X);var ye,re;const R="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGQ9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIHAoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBiKGUsdCxyKXtpZih0eXBlb2YgY3J5cHRvPiJ1Inx8ISgic3VidGxlImluIGNyeXB0byl8fCEoImRpZ2VzdCJpbiBjcnlwdG8uc3VidGxlKSl0aHJvdyBuZXcgRXJyb3IoIldlYiBDcnlwdG8gaXMgbm90IGF2YWlsYWJsZS4gU2VjdXJlIGNvbnRleHQgaXMgcmVxdWlyZWQgKGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL1NlY3VyaXR5L1NlY3VyZV9Db250ZXh0cykuIik7cmV0dXJuIHAoYXdhaXQgY3J5cHRvLnN1YnRsZS5kaWdlc3Qoci50b1VwcGVyQ2FzZSgpLGQuZW5jb2RlKGUrdCkpKX1mdW5jdGlvbiB3KGUsdCxyPSJTSEEtMjU2IixuPTFlNixzPTApe2NvbnN0IG89bmV3IEFib3J0Q29udHJvbGxlcixhPURhdGUubm93KCk7cmV0dXJue3Byb21pc2U6KGFzeW5jKCk9Pntmb3IobGV0IGM9cztjPD1uO2MrPTEpe2lmKG8uc2lnbmFsLmFib3J0ZWQpcmV0dXJuIG51bGw7aWYoYXdhaXQgYih0LGMscik9PT1lKXJldHVybntudW1iZXI6Yyx0b29rOkRhdGUubm93KCktYX19cmV0dXJuIG51bGx9KSgpLGNvbnRyb2xsZXI6b319ZnVuY3Rpb24gaChlKXtjb25zdCB0PWF0b2IoZSkscj1uZXcgVWludDhBcnJheSh0Lmxlbmd0aCk7Zm9yKGxldCBuPTA7bjx0Lmxlbmd0aDtuKyspcltuXT10LmNoYXJDb2RlQXQobik7cmV0dXJuIHJ9ZnVuY3Rpb24gZyhlLHQ9MTIpe2NvbnN0IHI9bmV3IFVpbnQ4QXJyYXkodCk7Zm9yKGxldCBuPTA7bjx0O24rKylyW25dPWUlMjU2LGU9TWF0aC5mbG9vcihlLzI1Nik7cmV0dXJuIHJ9YXN5bmMgZnVuY3Rpb24gbShlLHQ9IiIscj0xZTYsbj0wKXtjb25zdCBzPSJBRVMtR0NNIixvPW5ldyBBYm9ydENvbnRyb2xsZXIsYT1EYXRlLm5vdygpLGw9YXN5bmMoKT0+e2ZvcihsZXQgdT1uO3U8PXI7dSs9MSl7aWYoby5zaWduYWwuYWJvcnRlZHx8IWN8fCF5KXJldHVybiBudWxsO3RyeXtjb25zdCBmPWF3YWl0IGNyeXB0by5zdWJ0bGUuZGVjcnlwdCh7bmFtZTpzLGl2OmcodSl9LGMseSk7aWYoZilyZXR1cm57Y2xlYXJUZXh0Om5ldyBUZXh0RGVjb2RlcigpLmRlY29kZShmKSx0b29rOkRhdGUubm93KCktYX19Y2F0Y2h7fX1yZXR1cm4gbnVsbH07bGV0IGM9bnVsbCx5PW51bGw7dHJ5e3k9aChlKTtjb25zdCB1PWF3YWl0IGNyeXB0by5zdWJ0bGUuZGlnZXN0KCJTSEEtMjU2IixkLmVuY29kZSh0KSk7Yz1hd2FpdCBjcnlwdG8uc3VidGxlLmltcG9ydEtleSgicmF3Iix1LHMsITEsWyJkZWNyeXB0Il0pfWNhdGNoe3JldHVybntwcm9taXNlOlByb21pc2UucmVqZWN0KCksY29udHJvbGxlcjpvfX1yZXR1cm57cHJvbWlzZTpsKCksY29udHJvbGxlcjpvfX1sZXQgaTtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOnIsc3RhcnQ6bixtYXg6c309ZS5kYXRhO2xldCBvPW51bGw7aWYodD09PSJhYm9ydCIpaT09bnVsbHx8aS5hYm9ydCgpLGk9dm9pZCAwO2Vsc2UgaWYodD09PSJ3b3JrIil7aWYoIm9iZnVzY2F0ZWQiaW4gcil7Y29uc3R7a2V5OmEsb2JmdXNjYXRlZDpsfT1yfHx7fTtvPWF3YWl0IG0obCxhLHMsbil9ZWxzZXtjb25zdHthbGdvcml0aG06YSxjaGFsbGVuZ2U6bCxzYWx0OmN9PXJ8fHt9O289dyhsLGMsYSxzLG4pfWk9by5jb250cm9sbGVyLG8ucHJvbWlzZS50aGVuKGE9PntzZWxmLnBvc3RNZXNzYWdlKGEmJnsuLi5hLHdvcmtlcjohMH0pfSl9fX0pKCk7Cg==",X=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),nt=typeof self<"u"&&self.Blob&&new Blob([X(R)],{type:"text/javascript;charset=utf-8"});function Bn(e){let t;try{if(t=nt&&(self.URL||self.webkitURL).createObjectURL(nt),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+R,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const Hn="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Hn);const Jn=1,Kn=4,qn=8,Qn=16,ei=1,ti=2,sr="[",ur="[!",fr="]",Ye={},H=Symbol(),cr=!1;var dr=Array.isArray,ri=Array.from,wt=Object.keys,Et=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,ni=Object.getOwnPropertyDescriptors,ii=Object.prototype,li=Array.prototype,Yt=Object.getPrototypeOf;function hr(e){for(var t=0;t<e.length;t++)e[t]()}const le=2,vr=4,it=8,Ft=16,ae=32,lt=64,Ot=128,Te=256,xt=512,J=1024,Ee=2048,at=4096,Fe=8192,Oe=16384,ai=32768,Xt=65536,oi=1<<19,gr=1<<20,ot=Symbol("$state"),_r=Symbol("legacy props"),si=Symbol("");function mr(e){return e===this.v}function ui(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function br(e){return!ui(e,this.v)}function fi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ci(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function di(e){throw new Error("https://svelte.dev/e/effect_orphan")}function hi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vi(){throw new Error("https://svelte.dev/e/hydration_failed")}function gi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function _i(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function mi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function yi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let yr=!1;function de(e){return{f:0,v:e,reactions:null,equals:mr,version:0}}function Xe(e){return pi(de(e))}function pr(e,t=!1){const r=de(e);return t||(r.equals=br),r}function pi(e){return I!==null&&I.f&le&&(ve===null?Pi([e]):ve.push(e)),e}function V(e,t){return I!==null&&zi()&&I.f&(le|Ft)&&(ve===null||!ve.includes(e))&&yi(),wi(e,t)}function wi(e,t){return e.equals(t)||(e.v=t,e.version=Ur(),wr(e,Ee),y!==null&&y.f&J&&!(y.f&ae)&&(Z!==null&&Z.includes(e)?(ge(y,Ee),Tt(y)):Re===null?Vi([e]):Re.push(e))),t}function wr(e,t){var r=e.reactions;if(r!==null)for(var l=r.length,i=0;i<l;i++){var a=r[i],o=a.f;o&Ee||(ge(a,t),o&(J|Te)&&(o&le?wr(a,at):Tt(a)))}}function kt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let D=!1;function Ze(e){D=e}let z;function xe(e){if(e===null)throw kt(),Ye;return z=e}function We(){return xe(ke(z))}function q(e){if(D){if(ke(z)!==null)throw kt(),Ye;z=e}}function Ei(){for(var e=0,t=z;;){if(t.nodeType===8){var r=t.data;if(r===fr){if(e===0)return t;e-=1}else(r===sr||r===ur)&&(e+=1)}var l=ke(t);t.remove(),t=l}}function oe(e,t=null,r){if(typeof e!="object"||e===null||ot in e)return e;const l=Yt(e);if(l!==ii&&l!==li)return e;var i=new Map,a=dr(e),o=de(0);a&&i.set("length",de(e.length));var d;return new Proxy(e,{defineProperty(u,f,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&_i();var v=i.get(f);return v===void 0?(v=de(c.value),i.set(f,v)):V(v,oe(c.value,d)),!0},deleteProperty(u,f){var c=i.get(f);if(c===void 0)f in u&&i.set(f,de(H));else{if(a&&typeof f=="string"){var v=i.get("length"),g=Number(f);Number.isInteger(g)&&g<v.v&&V(v,g)}V(c,H),Er(o)}return!0},get(u,f,c){var p;if(f===ot)return e;var v=i.get(f),g=f in u;if(v===void 0&&(!g||(p=Ae(u,f))!=null&&p.writable)&&(v=de(oe(g?u[f]:H,d)),i.set(f,v)),v!==void 0){var m=h(v);return m===H?void 0:m}return Reflect.get(u,f,c)},getOwnPropertyDescriptor(u,f){var c=Reflect.getOwnPropertyDescriptor(u,f);if(c&&"value"in c){var v=i.get(f);v&&(c.value=h(v))}else if(c===void 0){var g=i.get(f),m=g==null?void 0:g.v;if(g!==void 0&&m!==H)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return c},has(u,f){var m;if(f===ot)return!0;var c=i.get(f),v=c!==void 0&&c.v!==H||Reflect.has(u,f);if(c!==void 0||y!==null&&(!v||(m=Ae(u,f))!=null&&m.writable)){c===void 0&&(c=de(v?oe(u[f],d):H),i.set(f,c));var g=h(c);if(g===H)return!1}return v},set(u,f,c,v){var M;var g=i.get(f),m=f in u;if(a&&f==="length")for(var p=c;p<g.v;p+=1){var T=i.get(p+"");T!==void 0?V(T,H):p in u&&(T=de(H),i.set(p+"",T))}g===void 0?(!m||(M=Ae(u,f))!=null&&M.writable)&&(g=de(void 0),V(g,oe(c,d)),i.set(f,g)):(m=g.v!==H,V(g,oe(c,d)));var Y=Reflect.getOwnPropertyDescriptor(u,f);if(Y!=null&&Y.set&&Y.set.call(v,c),!m){if(a&&typeof f=="string"){var ne=i.get("length"),F=Number(f);Number.isInteger(F)&&F>=ne.v&&V(ne,F+1)}Er(o)}return!0},ownKeys(u){h(o);var f=Reflect.ownKeys(u).filter(g=>{var m=i.get(g);return m===void 0||m.v!==H});for(var[c,v]of i)v.v!==H&&!(c in u)&&f.push(c);return f},setPrototypeOf(){mi()}})}function Er(e,t=1){V(e,e.v+t)}var xr,kr,Cr;function Zt(){if(xr===void 0){xr=window;var e=Element.prototype,t=Node.prototype;kr=Ae(t,"firstChild").get,Cr=Ae(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Ct(e=""){return document.createTextNode(e)}function Pe(e){return kr.call(e)}function ke(e){return Cr.call(e)}function Q(e,t){if(!D)return Pe(e);var r=Pe(z);return r===null&&(r=z.appendChild(Ct())),xe(r),r}function Wt(e,t){if(!D){var r=Pe(e);return r instanceof Comment&&r.data===""?ke(r):r}return z}function be(e,t=1,r=!1){let l=D?z:e;for(var i;t--;)i=l,l=ke(l);if(!D)return l;var a=l==null?void 0:l.nodeType;if(r&&a!==3){var o=Ct();return l===null?i==null||i.after(o):l.before(o),xe(o),o}return xe(l),l}function xi(e){e.textContent=""}function st(e){var t=le|Ee;y===null?t|=Te:y.f|=gr;var r=I!==null&&I.f&le?I:null;const l={children:null,ctx:W,deps:null,equals:mr,f:t,fn:e,reactions:null,v:null,version:0,parent:r??y};return r!==null&&(r.children??(r.children=[])).push(l),l}function Rr(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r<t.length;r+=1){var l=t[r];l.f&le?Ut(l):Ve(l)}}}function ki(e){for(var t=e.parent;t!==null;){if(!(t.f&le))return t;t=t.parent}return null}function Ir(e){var t,r=y;he(ki(e));try{Rr(e),t=Mr(e)}finally{he(r)}return t}function $r(e){var t=Ir(e),r=(He||e.f&Te)&&e.deps!==null?at:J;ge(e,r),e.equals(t)||(e.v=t,e.version=Ur())}function Ut(e){Rr(e),dt(e,0),ge(e,Oe),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ci(e){y===null&&I===null&&di(),I!==null&&I.f&Te&&ci(),Qt&&fi()}function Ri(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ue(e,t,r,l=!0){var i=(e&lt)!==0,a=y,o={ctx:W,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Ee,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,version:0};if(r){var d=je;try{Xr(!0),At(o),o.f|=ai}catch(c){throw Ve(o),c}finally{Xr(d)}}else t!==null&&Tt(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&gr)===0;if(!u&&!i&&l&&(a!==null&&Ri(o,a),I!==null&&I.f&le)){var f=I;(f.children??(f.children=[])).push(o)}return o}function Ii(e){const t=Ue(it,null,!1);return ge(t,J),t.teardown=e,t}function Mt(e){Ci();var t=y!==null&&(y.f&ae)!==0&&W!==null&&!W.m;if(t){var r=W;(r.e??(r.e=[])).push({fn:e,effect:y,reaction:I})}else{var l=jt(e);return l}}function Sr(e){const t=Ue(lt,e,!0);return()=>{Ve(t)}}function jt(e){return Ue(vr,e,!1)}function Bt(e){return Ue(it,e,!0)}function Me(e){return Ht(e)}function Ht(e,t=0){return Ue(it|Ft|t,e,!0)}function Rt(e,t=!0){return Ue(it|ae,e,!0,t)}function Nr(e){var t=e.teardown;if(t!==null){const r=Qt,l=I;Zr(!0),Ce(null);try{t.call(null)}finally{Zr(r),Ce(l)}}}function Lr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r<t.length;r+=1)Ut(t[r])}}function Ar(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var l=r.next;Ve(r,t),r=l}}function $i(e){for(var t=e.first;t!==null;){var r=t.next;t.f&ae||Ve(t),t=r}}function Ve(e,t=!0){var r=!1;if((t||e.f&oi)&&e.nodes_start!==null){for(var l=e.nodes_start,i=e.nodes_end;l!==null;){var a=l===i?null:ke(l);l.remove(),l=a}r=!0}Ar(e,t&&!r),Lr(e),dt(e,0),ge(e,Oe);var o=e.transitions;if(o!==null)for(const u of o)u.stop();Nr(e);var d=e.parent;d!==null&&d.first!==null&&Tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Tr(e){var t=e.parent,r=e.prev,l=e.next;r!==null&&(r.next=l),l!==null&&(l.prev=r),t!==null&&(t.first===e&&(t.first=l),t.last===e&&(t.last=r))}function Pr(e,t){var r=[];Vr(e,r,!0),Si(r,()=>{Ve(e),t&&t()})}function Si(e,t){var r=e.length;if(r>0){var l=()=>--r||t();for(var i of e)i.out(l)}else t()}function Vr(e,t,r){if(!(e.f&Fe)){if(e.f^=Fe,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var l=e.first;l!==null;){var i=l.next,a=(l.f&Xt)!==0||(l.f&ae)!==0;Vr(l,t,a?r:!1),l=i}}}function zr(e){Gr(e,!0)}function Gr(e,t){if(e.f&Fe){ct(e)&&At(e),e.f^=Fe;for(var r=e.first;r!==null;){var l=r.next,i=(r.f&Xt)!==0||(r.f&ae)!==0;Gr(r,i?t:!1),r=l}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}const Ni=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let It=!1,$t=!1,Jt=[],Kt=[];function Dr(){It=!1;const e=Jt.slice();Jt=[],hr(e)}function Yr(){$t=!1;const e=Kt.slice();Kt=[],hr(e)}function qt(e){It||(It=!0,queueMicrotask(Dr)),Jt.push(e)}function Li(e){$t||($t=!0,Ni(Yr)),Kt.push(e)}function Ai(){It&&Dr(),$t&&Yr()}function Fr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Or=0,Ti=1;let St=!1,Nt=Or,ut=!1,ft=null,je=!1,Qt=!1;function Xr(e){je=e}function Zr(e){Qt=e}let ze=[],Be=0,ra=[],I=null;function Ce(e){I=e}let y=null;function he(e){y=e}let ve=null;function Pi(e){ve=e}let Z=null,ee=0,Re=null;function Vi(e){Re=e}let Wr=0,He=!1,W=null;function Ur(){return++Wr}function zi(){return!yr}function ct(e){var o,d;var t=e.f;if(t&Ee)return!0;if(t&at){var r=e.deps,l=(t&Te)!==0;if(r!==null){var i;if(t&xt){for(i=0;i<r.length;i++)((o=r[i]).reactions??(o.reactions=[])).push(e);e.f^=xt}for(i=0;i<r.length;i++){var a=r[i];if(ct(a)&&$r(a),l&&y!==null&&!He&&!((d=a==null?void 0:a.reactions)!=null&&d.includes(e))&&(a.reactions??(a.reactions=[])).push(e),a.version>e.version)return!0}}l||ge(e,J)}return!1}function Gi(e,t){for(var r=t;r!==null;){if(r.f&Ot)try{r.fn(e);return}catch{r.f^=Ot}r=r.parent}throw St=!1,e}function Di(e){return(e.f&Oe)===0&&(e.parent===null||(e.parent.f&Ot)===0)}function Lt(e,t,r,l){if(St){if(r===null&&(St=!1),Di(t))throw e;return}r!==null&&(St=!0);{Gi(e,t);return}}function Mr(e){var g;var t=Z,r=ee,l=Re,i=I,a=He,o=ve,d=W,u=e.f;Z=null,ee=0,Re=null,I=u&(ae|lt)?null:e,He=!je&&(u&Te)!==0,ve=null,W=e.ctx;try{var f=(0,e.fn)(),c=e.deps;if(Z!==null){var v;if(dt(e,ee),c!==null&&ee>0)for(c.length=ee+Z.length,v=0;v<Z.length;v++)c[ee+v]=Z[v];else e.deps=c=Z;if(!He)for(v=ee;v<c.length;v++)((g=c[v]).reactions??(g.reactions=[])).push(e)}else c!==null&&ee<c.length&&(dt(e,ee),c.length=ee);return f}finally{Z=t,ee=r,Re=l,I=i,He=a,ve=o,W=d}}function Yi(e,t){let r=t.reactions;if(r!==null){var l=r.indexOf(e);if(l!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[l]=r[i],r.pop())}}r===null&&t.f&le&&(Z===null||!Z.includes(t))&&(ge(t,at),t.f&(Te|xt)||(t.f^=xt),dt(t,0))}function dt(e,t){var r=e.deps;if(r!==null)for(var l=t;l<r.length;l++)Yi(e,r[l])}function At(e){var t=e.f;if(!(t&Oe)){ge(e,J);var r=y,l=W;y=e;try{t&Ft?$i(e):Ar(e),Lr(e),Nr(e);var i=Mr(e);e.teardown=typeof i=="function"?i:null,e.version=Wr}catch(a){Lt(a,e,r,l||e.ctx)}finally{y=r}}}function jr(){if(Be>1e3){Be=0;try{hi()}catch(e){if(ft!==null)Lt(e,ft,null);else throw e}}Be++}function Br(e){var t=e.length;if(t!==0){jr();var r=je;je=!0;try{for(var l=0;l<t;l++){var i=e[l];i.f&J||(i.f^=J);var a=[];Hr(i,a),Fi(a)}}finally{je=r}}}function Fi(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var l=e[r];if(!(l.f&(Oe|Fe)))try{ct(l)&&(At(l),l.deps===null&&l.first===null&&l.nodes_start===null&&(l.teardown===null?Tr(l):l.fn=null))}catch(i){Lt(i,l,null,l.ctx)}}}function Oi(){if(ut=!1,Be>1001)return;const e=ze;ze=[],Br(e),ut||(Be=0,ft=null)}function Tt(e){Nt===Or&&(ut||(ut=!0,queueMicrotask(Oi))),ft=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(lt|ae)){if(!(r&J))return;t.f^=J}}ze.push(t)}function Hr(e,t){var r=e.first,l=[];e:for(;r!==null;){var i=r.f,a=(i&ae)!==0,o=a&&(i&J)!==0,d=r.next;if(!o&&!(i&Fe))if(i&it){if(a)r.f^=J;else try{ct(r)&&At(r)}catch(v){Lt(v,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else i&vr&&l.push(r);if(d===null){let v=r.parent;for(;v!==null;){if(e===v)break e;var f=v.next;if(f!==null){r=f;continue e}v=v.parent}}r=d}for(var c=0;c<l.length;c++)u=l[c],t.push(u),Hr(u,t)}function C(e){var t=Nt,r=ze;try{jr();const i=[];Nt=Ti,ze=i,ut=!1,Br(r);var l=e==null?void 0:e();return Ai(),(ze.length>0||i.length>0)&&C(),Be=0,ft=null,l}finally{Nt=t,ze=r}}async function Xi(){await Promise.resolve(),C()}function h(e){var c;var t=e.f,r=(t&le)!==0;if(r&&t&Oe){var l=Ir(e);return Ut(e),l}if(I!==null){ve!==null&&ve.includes(e)&&bi();var i=I.deps;Z===null&&i!==null&&i[ee]===e?ee++:Z===null?Z=[e]:Z.push(e),Re!==null&&y!==null&&y.f&J&&!(y.f&ae)&&Re.includes(e)&&(ge(y,Ee),Tt(y))}else if(r&&e.deps===null)for(var a=e,o=a.parent,d=a;o!==null;)if(o.f&le){var u=o;d=u,o=u.parent}else{var f=o;(c=f.deriveds)!=null&&c.includes(d)||(f.deriveds??(f.deriveds=[])).push(d);break}return r&&(a=e,ct(a)&&$r(a)),e.v}function Je(e){const t=I;try{return I=null,e()}finally{I=t}}const Zi=~(Ee|at|J);function ge(e,t){e.f=e.f&Zi|t}function Jr(e,t=!1,r){W={p:W,c:null,e:null,m:!1,s:e,x:null,l:null}}function Kr(e){const t=W;if(t!==null){e!==void 0&&(t.x=e);const o=t.e;if(o!==null){var r=y,l=I;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];he(a.effect),Ce(a.reaction),jt(a.fn)}}finally{he(r),Ce(l)}}W=t.p,t.m=!0}return e||{}}let qr=!1;function Qr(){qr||(qr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function en(e){var t=I,r=y;Ce(null),he(null);try{return e()}finally{Ce(t),he(r)}}function Wi(e,t,r,l=r){e.addEventListener(t,()=>en(r));const i=e.__on_r;i?e.__on_r=()=>{i(),l(!0)}:e.__on_r=()=>l(!0),Qr()}const tn=new Set,er=new Set;function Ui(e,t,r,l){function i(a){if(l.capture||ht.call(t,a),!a.cancelBubble)return en(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?qt(()=>{t.addEventListener(e,i,l)}):t.addEventListener(e,i,l),i}function Mi(e,t,r,l,i){var a={capture:l,passive:i},o=Ui(e,t,r,a);(t===document.body||t===window||t===document)&&Ii(()=>{t.removeEventListener(e,o,a)})}function ji(e){for(var t=0;t<e.length;t++)tn.add(e[t]);for(var r of er)r(e)}function ht(e){var F;var t=this,r=t.ownerDocument,l=e.type,i=((F=e.composedPath)==null?void 0:F.call(e))||[],a=i[0]||e.target,o=0,d=e.__root;if(d){var u=i.indexOf(d);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;u<=f&&(o=u)}if(a=i[o]||e.target,a!==t){Et(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=I,v=y;Ce(null),he(null);try{for(var g,m=[];a!==null;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var T=a["__"+l];if(T!==void 0&&!a.disabled)if(dr(T)){var[Y,...ne]=T;Y.apply(a,[e,...ne])}else T.call(a,e)}catch(M){g?m.push(M):g=M}if(e.cancelBubble||p===t||p===null)break;a=p}if(g){for(let M of m)queueMicrotask(()=>{throw M});throw g}}finally{e.__root=t,delete e.currentTarget,Ce(c),he(v)}}}function rn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ie(e,t){var r=y;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&ei)!==0,l=(t&ti)!==0,i,a=!e.startsWith("<!>");return()=>{if(D)return Ie(z,null),z;i===void 0&&(i=rn(a?e:"<!>"+e),r||(i=Pe(i)));var o=l?document.importNode(i,!0):i.cloneNode(!0);if(r){var d=Pe(o),u=o.lastChild;Ie(d,u)}else Ie(o,o);return o}}function Bi(){if(D)return Ie(z,null),z;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ct();return e.append(t,r),Ie(t,r),e}function te(e,t){if(D){y.nodes_end=z,We();return}e!==null&&e.before(t)}const Hi=["touchstart","touchmove"];function Ji(e){return Hi.includes(e)}function nn(e,t){return ln(e,t)}function Ki(e,t){Zt(),t.intro=t.intro??!1;const r=t.target,l=D,i=z;try{for(var a=Pe(r);a&&(a.nodeType!==8||a.data!==sr);)a=ke(a);if(!a)throw Ye;Ze(!0),xe(a),We();const o=ln(e,{...t,anchor:a});if(z===null||z.nodeType!==8||z.data!==fr)throw kt(),Ye;return Ze(!1),o}catch(o){if(o===Ye)return t.recover===!1&&vi(),Zt(),xi(r),Ze(!1),nn(e,t);throw o}finally{Ze(l),xe(i)}}const Ke=new Map;function ln(e,{target:t,anchor:r,props:l={},events:i,context:a,intro:o=!0}){Zt();var d=new Set,u=v=>{for(var g=0;g<v.length;g++){var m=v[g];if(!d.has(m)){d.add(m);var p=Ji(m);t.addEventListener(m,ht,{passive:p});var T=Ke.get(m);T===void 0?(document.addEventListener(m,ht,{passive:p}),Ke.set(m,1)):Ke.set(m,T+1)}}};u(ri(tn)),er.add(u);var f=void 0,c=Sr(()=>{var v=r??t.appendChild(Ct());return Rt(()=>{if(a){Jr({});var g=W;g.c=a}i&&(l.$$events=i),D&&Ie(v,null),f=e(v,l)||{},D&&(y.nodes_end=z),a&&Kr()}),()=>{var p;for(var g of d){t.removeEventListener(g,ht);var m=Ke.get(g);--m===0?(document.removeEventListener(g,ht),Ke.delete(g)):Ke.set(g,m)}er.delete(u),tr.delete(f),v!==r&&((p=v.parentNode)==null||p.removeChild(v))}});return tr.set(f,c),f}let tr=new WeakMap;function qi(e){const t=tr.get(e);t&&t()}function $e(e,t,r=!1){D&&We();var l=e,i=null,a=null,o=H,d=r?Xt:0,u=!1;const f=(v,g=!0)=>{u=!0,c(g,v)},c=(v,g)=>{if(o===(o=v))return;let m=!1;if(D){const p=l.data===ur;!!o===p&&(l=Ei(),xe(l),Ze(!1),m=!0)}o?(i?zr(i):g&&(i=Rt(()=>g(l))),a&&Pr(a,()=>{a=null})):(a?zr(a):g&&(a=Rt(()=>g(l))),i&&Pr(i,()=>{i=null})),m&&Ze(!0)};Ht(()=>{u=!1,t(f),u||c(null,null)},d),D&&(l=z)}function qe(e,t,r,l,i){var a=e,o="",d;Ht(()=>{if(o===(o=t()??"")){D&&We();return}d!==void 0&&(Ve(d),d=void 0),o!==""&&(d=Rt(()=>{if(D){z.data;for(var u=We(),f=u;u!==null&&(u.nodeType!==8||u.data!=="");)f=u,u=ke(u);if(u===null)throw kt(),Ye;Ie(z,f),a=xe(u);return}var c=o+"",v=rn(c);Ie(Pe(v),v.lastChild),a.before(v)}))})}function Qi(e,t,r,l,i){var d;D&&We();var a=(d=t.$$slots)==null?void 0:d[r],o=!1;a===!0&&(a=t.children,o=!0),a===void 0||a(e,o?()=>l:l)}function el(e,t){qt(()=>{var r=e.getRootNode(),l=r.host?r:r.head??r.ownerDocument.head;if(!l.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,l.appendChild(i)}})}function an(e){if(D){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var l=e.value;ue(e,"value",null),e.value=l}if(e.hasAttribute("checked")){var i=e.checked;ue(e,"checked",null),e.checked=i}}};e.__on_r=r,Li(r),Qr()}}function tl(e,t){var r=e.__attributes??(e.__attributes={});r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t)}function ue(e,t,r,l){var i=e.__attributes??(e.__attributes={});D&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[si]=r),r==null?e.removeAttribute(t):typeof r!="string"&&rl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var on=new Map;function rl(e){var t=on.get(e.nodeName);if(t)return t;on.set(e.nodeName,t=[]);for(var r,l=Yt(e),i=Element.prototype;i!==l;){r=ni(l);for(var a in r)r[a].set&&t.push(a);l=Yt(l)}return t}function nl(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function il(e,t,r=t){Wi(e,"change",l=>{var i=l?e.defaultChecked:e.checked;r(i)}),(D&&e.defaultChecked!==e.checked||Je(t)==null)&&r(e.checked),Bt(()=>{var l=t();e.checked=!!l})}function sn(e,t){return e===t||(e==null?void 0:e[ot])===t}function un(e={},t,r,l){return jt(()=>{var i,a;return Bt(()=>{i=a,a=[],Je(()=>{e!==r(...a)&&(t(e,...a),i&&sn(r(...i),e)&&t(null,...i))})}),()=>{qt(()=>{a&&sn(r(...a),e)&&t(null,...a)})}}),e}function fn(e){W===null&&Fr(),Mt(()=>{const t=Je(e);if(typeof t=="function")return t})}function ll(e){W===null&&Fr(),fn(()=>()=>Je(e))}let Pt=!1;function al(e){var t=Pt;try{return Pt=!1,[e(),Pt]}finally{Pt=t}}function ol(e){for(var t=y,r=y;t!==null&&!(t.f&(ae|lt));)t=t.parent;try{return he(t),e()}finally{he(r)}}function N(e,t,r,l){var Se;var i=(r&Jn)!==0,a=!yr,o=(r&qn)!==0,d=(r&Qn)!==0,u=!1,f;o?[f,u]=al(()=>e[t]):f=e[t];var c=ot in e||_r in e,v=((Se=Ae(e,t))==null?void 0:Se.set)??(c&&o&&t in e?S=>e[t]=S:void 0),g=l,m=!0,p=!1,T=()=>(p=!0,m&&(m=!1,d?g=Je(l):g=l),g);f===void 0&&l!==void 0&&(v&&a&&gi(),f=T(),v&&v(f));var Y;if(Y=()=>{var S=e[t];return S===void 0?T():(m=!0,p=!1,S)},!(r&Kn))return Y;if(v){var ne=e.$$legacy;return function(S,j){return arguments.length>0?((!j||ne||u)&&v(j?Y():S),S):Y()}}var F=!1,M=!1,pe=pr(f),U=ol(()=>st(()=>{var S=Y(),j=h(pe);return F?(F=!1,M=!0,j):(M=!1,pe.v=S)}));return i||(U.equals=br),function(S,j){if(arguments.length>0){const _e=j?h(U):o?oe(S):S;return U.equals(_e)||(F=!0,V(pe,_e),p&&g!==void 0&&(g=_e),Je(()=>h(U))),S}return h(U)}}function sl(e){return new ul(e)}class ul{constructor(t){ar(this,ye);ar(this,re);var a;var r=new Map,l=(o,d)=>{var u=pr(d);return r.set(o,u),u};const i=new Proxy({...t.props||{},$$events:{}},{get(o,d){return h(r.get(d)??l(d,Reflect.get(o,d)))},has(o,d){return d===_r?!0:(h(r.get(d)??l(d,Reflect.get(o,d))),Reflect.has(o,d))},set(o,d,u){return V(r.get(d)??l(d,u),u),Reflect.set(o,d,u)}});or(this,re,(t.hydrate?Ki:nn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&C(),or(this,ye,i.$$events);for(const o of Object.keys(K(this,re)))o==="$set"||o==="$destroy"||o==="$on"||Et(this,o,{get(){return K(this,re)[o]},set(d){K(this,re)[o]=d},enumerable:!0});K(this,re).$set=o=>{Object.assign(i,o)},K(this,re).$destroy=()=>{qi(K(this,re))}}$set(t){K(this,re).$set(t)}$on(t,r){K(this,ye)[t]=K(this,ye)[t]||[];const l=(...i)=>r.call(this,...i);return K(this,ye)[t].push(l),()=>{K(this,ye)[t]=K(this,ye)[t].filter(i=>i!==l)}}$destroy(){K(this,re).$destroy()}}ye=new WeakMap,re=new WeakMap;let cn;typeof HTMLElement=="function"&&(cn=class extends HTMLElement{constructor(t,r,l){super();ce(this,"$$ctor");ce(this,"$$s");ce(this,"$$c");ce(this,"$$cn",!1);ce(this,"$$d",{});ce(this,"$$r",!1);ce(this,"$$p_d",{});ce(this,"$$l",{});ce(this,"$$l_u",new Map);ce(this,"$$me");this.$$ctor=t,this.$$s=r,l&&this.attachShadow({mode:"open"})}addEventListener(t,r,l){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,l)}removeEventListener(t,r,l){if(super.removeEventListener(t,r,l),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{const o=document.createElement("slot");i!=="default"&&(o.name=i),te(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},l=fl(this);for(const i of this.$$s)i in l&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Vt(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=sl({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Sr(()=>{Bt(()=>{var i;this.$$r=!0;for(const a of wt(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];const o=Vt(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}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(t,r,l){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Vt(t,l,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 wt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Vt(e,t,r,l){var a;const i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!l||!r[e])return t;if(l==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fl(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function cl(e,t,r,l,i,a){let o=class extends cn{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return wt(t).map(d=>(t[d].attribute||d).toLowerCase())}};return wt(t).forEach(d=>{Et(o.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(u){var v;u=Vt(d,u,t),this.$$d[d]=u;var f=this.$$c;if(f){var c=(v=Ae(f,d))==null?void 0:v.get;c?f[d]=u:f.$set({[d]:u})}}})}),l.forEach(d=>{Et(o.prototype,d,{get(){var u;return(u=this.$$c)==null?void 0:u[d]}})}),e.element=o,o}const dn=new TextEncoder;function dl(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function hl(e,t="SHA-256",r=1e5){const l=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const i=await hn(l,e,t);return{algorithm:t,challenge:i,salt:l,signature:""}}async function hn(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return dl(await crypto.subtle.digest(r.toUpperCase(),dn.encode(e+t)))}function vl(e,t,r="SHA-256",l=1e6,i=0){const a=new AbortController,o=Date.now();return{promise:(async()=>{for(let u=i;u<=l;u+=1){if(a.signal.aborted)return null;if(await hn(t,u,r)===e)return{number:u,took:Date.now()-o}}return null})(),controller:a}}function gl(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function _l(e){const t=atob(e),r=new Uint8Array(t.length);for(let l=0;l<t.length;l++)r[l]=t.charCodeAt(l);return r}function ml(e,t=12){const r=new Uint8Array(t);for(let l=0;l<t;l++)r[l]=e%256,e=Math.floor(e/256);return r}async function bl(e,t="",r=1e6,l=0){const i="AES-GCM",a=new AbortController,o=Date.now(),d=async()=>{for(let c=l;c<=r;c+=1){if(a.signal.aborted||!u||!f)return null;try{const v=await crypto.subtle.decrypt({name:i,iv:ml(c)},u,f);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-o}}catch{}}return null};let u=null,f=null;try{f=_l(e);const c=await crypto.subtle.digest("SHA-256",dn.encode(t));u=await crypto.subtle.importKey("raw",c,i,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:d(),controller:a}}var w=(e=>(e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),yl=se('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="altcha-spinner svelte-ddsc3z"></path></svg>'),pl=se('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span> <input type="hidden" class="svelte-ddsc3z">',1),wl=se('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span>'),El=se('<label class="svelte-ddsc3z"><!></label>'),xl=se('<div class="svelte-ddsc3z"><a target="_blank" class="altcha-logo svelte-ddsc3z"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></path></svg></a></div>'),kl=se('<div class="svelte-ddsc3z"><!></div>'),Cl=se('<div class="svelte-ddsc3z"><!></div>'),Rl=se('<div class="altcha-error svelte-ddsc3z"><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" class="svelte-ddsc3z"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" class="svelte-ddsc3z"></path></svg> <!></div>'),Il=se('<div class="altcha-footer svelte-ddsc3z"><div class="svelte-ddsc3z"><!></div></div>'),$l=se('<div class="altcha-anchor-arrow svelte-ddsc3z"></div>'),Sl=se('<!> <div class="altcha svelte-ddsc3z"><div class="altcha-main svelte-ddsc3z"><!> <div class="altcha-checkbox svelte-ddsc3z"><input type="checkbox" class="svelte-ddsc3z"></div> <div class="altcha-label svelte-ddsc3z"><!></div> <!></div> <!> <!> <!></div>',1);const Nl={hash:"svelte-ddsc3z",code:`.altcha.svelte-ddsc3z {background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left;}.altcha.svelte-ddsc3z:focus-within {border-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z {background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999;}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow:where(.svelte-ddsc3z) {border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto;}.altcha[data-floating=bottom].svelte-ddsc3z:focus-within::after {border-bottom-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating=top].svelte-ddsc3z:focus-within::after {border-top-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z:not([data-state=unverified]) {display:block;}.altcha-anchor-arrow.svelte-ddsc3z {border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0;}.altcha-main.svelte-ddsc3z {align-items:center;display:flex;gap:0.4rem;padding:0.7rem;}.altcha-label.svelte-ddsc3z {flex-grow:1;}.altcha-label.svelte-ddsc3z label:where(.svelte-ddsc3z) {cursor:pointer;}.altcha-logo.svelte-ddsc3z {color:currentColor;opacity:0.3;}.altcha-logo.svelte-ddsc3z:hover {opacity:1;}.altcha-error.svelte-ddsc3z {color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem;}.altcha-footer.svelte-ddsc3z {align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right;}.altcha-footer.svelte-ddsc3z:hover {opacity:1;}.altcha-footer.svelte-ddsc3z > :where(.svelte-ddsc3z):first-child {flex-grow:1;}.altcha-footer.svelte-ddsc3z a {color:currentColor;}.altcha-checkbox.svelte-ddsc3z {display:flex;align-items:center;height:24px;width:24px;}.altcha-checkbox.svelte-ddsc3z input:where(.svelte-ddsc3z) {width:18px;height:18px;margin:0;}.altcha-hidden.svelte-ddsc3z {display:none;}.altcha-spinner.svelte-ddsc3z {
1
+ (function(k,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(k=typeof globalThis<"u"?globalThis:k||self,R(k.altcha={}))})(this,function(k){"use strict";var ea=Object.defineProperty;var Mn=k=>{throw TypeError(k)};var ta=(k,R,X)=>R in k?ea(k,R,{enumerable:!0,configurable:!0,writable:!0,value:X}):k[R]=X;var fe=(k,R,X)=>ta(k,typeof R!="symbol"?R+"":R,X),jn=(k,R,X)=>R.has(k)||Mn("Cannot "+X);var K=(k,R,X)=>(jn(k,R,"read from private field"),X?X.call(k):R.get(k)),ar=(k,R,X)=>R.has(k)?Mn("Cannot add the same private member more than once"):R instanceof WeakSet?R.add(k):R.set(k,X),or=(k,R,X,rt)=>(jn(k,R,"write to private field"),rt?rt.call(k,X):R.set(k,X),X);var be,re;const R="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGQ9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIHAoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBiKGUsdCxyKXtpZih0eXBlb2YgY3J5cHRvPiJ1Inx8ISgic3VidGxlImluIGNyeXB0byl8fCEoImRpZ2VzdCJpbiBjcnlwdG8uc3VidGxlKSl0aHJvdyBuZXcgRXJyb3IoIldlYiBDcnlwdG8gaXMgbm90IGF2YWlsYWJsZS4gU2VjdXJlIGNvbnRleHQgaXMgcmVxdWlyZWQgKGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL1NlY3VyaXR5L1NlY3VyZV9Db250ZXh0cykuIik7cmV0dXJuIHAoYXdhaXQgY3J5cHRvLnN1YnRsZS5kaWdlc3Qoci50b1VwcGVyQ2FzZSgpLGQuZW5jb2RlKGUrdCkpKX1mdW5jdGlvbiB3KGUsdCxyPSJTSEEtMjU2IixuPTFlNixzPTApe2NvbnN0IG89bmV3IEFib3J0Q29udHJvbGxlcixhPURhdGUubm93KCk7cmV0dXJue3Byb21pc2U6KGFzeW5jKCk9Pntmb3IobGV0IGM9cztjPD1uO2MrPTEpe2lmKG8uc2lnbmFsLmFib3J0ZWQpcmV0dXJuIG51bGw7aWYoYXdhaXQgYih0LGMscik9PT1lKXJldHVybntudW1iZXI6Yyx0b29rOkRhdGUubm93KCktYX19cmV0dXJuIG51bGx9KSgpLGNvbnRyb2xsZXI6b319ZnVuY3Rpb24gaChlKXtjb25zdCB0PWF0b2IoZSkscj1uZXcgVWludDhBcnJheSh0Lmxlbmd0aCk7Zm9yKGxldCBuPTA7bjx0Lmxlbmd0aDtuKyspcltuXT10LmNoYXJDb2RlQXQobik7cmV0dXJuIHJ9ZnVuY3Rpb24gZyhlLHQ9MTIpe2NvbnN0IHI9bmV3IFVpbnQ4QXJyYXkodCk7Zm9yKGxldCBuPTA7bjx0O24rKylyW25dPWUlMjU2LGU9TWF0aC5mbG9vcihlLzI1Nik7cmV0dXJuIHJ9YXN5bmMgZnVuY3Rpb24gbShlLHQ9IiIscj0xZTYsbj0wKXtjb25zdCBzPSJBRVMtR0NNIixvPW5ldyBBYm9ydENvbnRyb2xsZXIsYT1EYXRlLm5vdygpLGw9YXN5bmMoKT0+e2ZvcihsZXQgdT1uO3U8PXI7dSs9MSl7aWYoby5zaWduYWwuYWJvcnRlZHx8IWN8fCF5KXJldHVybiBudWxsO3RyeXtjb25zdCBmPWF3YWl0IGNyeXB0by5zdWJ0bGUuZGVjcnlwdCh7bmFtZTpzLGl2OmcodSl9LGMseSk7aWYoZilyZXR1cm57Y2xlYXJUZXh0Om5ldyBUZXh0RGVjb2RlcigpLmRlY29kZShmKSx0b29rOkRhdGUubm93KCktYX19Y2F0Y2h7fX1yZXR1cm4gbnVsbH07bGV0IGM9bnVsbCx5PW51bGw7dHJ5e3k9aChlKTtjb25zdCB1PWF3YWl0IGNyeXB0by5zdWJ0bGUuZGlnZXN0KCJTSEEtMjU2IixkLmVuY29kZSh0KSk7Yz1hd2FpdCBjcnlwdG8uc3VidGxlLmltcG9ydEtleSgicmF3Iix1LHMsITEsWyJkZWNyeXB0Il0pfWNhdGNoe3JldHVybntwcm9taXNlOlByb21pc2UucmVqZWN0KCksY29udHJvbGxlcjpvfX1yZXR1cm57cHJvbWlzZTpsKCksY29udHJvbGxlcjpvfX1sZXQgaTtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOnIsc3RhcnQ6bixtYXg6c309ZS5kYXRhO2xldCBvPW51bGw7aWYodD09PSJhYm9ydCIpaT09bnVsbHx8aS5hYm9ydCgpLGk9dm9pZCAwO2Vsc2UgaWYodD09PSJ3b3JrIil7aWYoIm9iZnVzY2F0ZWQiaW4gcil7Y29uc3R7a2V5OmEsb2JmdXNjYXRlZDpsfT1yfHx7fTtvPWF3YWl0IG0obCxhLHMsbil9ZWxzZXtjb25zdHthbGdvcml0aG06YSxjaGFsbGVuZ2U6bCxzYWx0OmN9PXJ8fHt9O289dyhsLGMsYSxzLG4pfWk9by5jb250cm9sbGVyLG8ucHJvbWlzZS50aGVuKGE9PntzZWxmLnBvc3RNZXNzYWdlKGEmJnsuLi5hLHdvcmtlcjohMH0pfSl9fX0pKCk7Cg==",X=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),rt=typeof self<"u"&&self.Blob&&new Blob([X(R)],{type:"text/javascript;charset=utf-8"});function Bn(e){let t;try{if(t=rt&&(self.URL||self.webkitURL).createObjectURL(rt),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+R,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const Hn="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Hn);const Jn=1,Kn=4,qn=8,Qn=16,ei=1,ti=2,sr="[",ur="[!",fr="]",Ge={},H=Symbol(),cr=!1;var dr=Array.isArray,ri=Array.from,wt=Object.keys,Et=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,ni=Object.getOwnPropertyDescriptors,ii=Object.prototype,li=Array.prototype,Dt=Object.getPrototypeOf;function hr(e){for(var t=0;t<e.length;t++)e[t]()}const le=2,vr=4,nt=8,Yt=16,ae=32,it=64,Ft=128,Le=256,xt=512,J=1024,pe=2048,lt=4096,De=8192,Ye=16384,ai=32768,Ot=65536,oi=1<<19,gr=1<<20,at=Symbol("$state"),_r=Symbol("legacy props"),si=Symbol("");function mr(e){return e===this.v}function ui(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function br(e){return!ui(e,this.v)}function fi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ci(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function di(e){throw new Error("https://svelte.dev/e/effect_orphan")}function hi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vi(){throw new Error("https://svelte.dev/e/hydration_failed")}function gi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function _i(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function mi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function yi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let yr=!1;function ce(e){return{f:0,v:e,reactions:null,equals:mr,version:0}}function Fe(e){return pi(ce(e))}function pr(e,t=!1){const r=ce(e);return t||(r.equals=br),r}function pi(e){return I!==null&&I.f&le&&(he===null?Pi([e]):he.push(e)),e}function V(e,t){return I!==null&&zi()&&I.f&(le|Yt)&&(he===null||!he.includes(e))&&yi(),wi(e,t)}function wi(e,t){return e.equals(t)||(e.v=t,e.version=Ur(),wr(e,pe),y!==null&&y.f&J&&!(y.f&ae)&&(Z!==null&&Z.includes(e)?(ve(y,pe),Tt(y)):ke===null?Vi([e]):ke.push(e))),t}function wr(e,t){var r=e.reactions;if(r!==null)for(var l=r.length,i=0;i<l;i++){var a=r[i],o=a.f;o&pe||(ve(a,t),o&(J|Le)&&(o&le?wr(a,lt):Tt(a)))}}function kt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let G=!1;function Oe(e){G=e}let z;function we(e){if(e===null)throw kt(),Ge;return z=e}function Xe(){return we(Ee(z))}function q(e){if(G){if(Ee(z)!==null)throw kt(),Ge;z=e}}function Ei(){for(var e=0,t=z;;){if(t.nodeType===8){var r=t.data;if(r===fr){if(e===0)return t;e-=1}else(r===sr||r===ur)&&(e+=1)}var l=Ee(t);t.remove(),t=l}}function oe(e,t=null,r){if(typeof e!="object"||e===null||at in e)return e;const l=Dt(e);if(l!==ii&&l!==li)return e;var i=new Map,a=dr(e),o=ce(0);a&&i.set("length",ce(e.length));var d;return new Proxy(e,{defineProperty(u,c,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&_i();var v=i.get(c);return v===void 0?(v=ce(f.value),i.set(c,v)):V(v,oe(f.value,d)),!0},deleteProperty(u,c){var f=i.get(c);if(f===void 0)c in u&&i.set(c,ce(H));else{if(a&&typeof c=="string"){var v=i.get("length"),g=Number(c);Number.isInteger(g)&&g<v.v&&V(v,g)}V(f,H),Er(o)}return!0},get(u,c,f){var p;if(c===at)return e;var v=i.get(c),g=c in u;if(v===void 0&&(!g||(p=Ne(u,c))!=null&&p.writable)&&(v=ce(oe(g?u[c]:H,d)),i.set(c,v)),v!==void 0){var m=h(v);return m===H?void 0:m}return Reflect.get(u,c,f)},getOwnPropertyDescriptor(u,c){var f=Reflect.getOwnPropertyDescriptor(u,c);if(f&&"value"in f){var v=i.get(c);v&&(f.value=h(v))}else if(f===void 0){var g=i.get(c),m=g==null?void 0:g.v;if(g!==void 0&&m!==H)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return f},has(u,c){var m;if(c===at)return!0;var f=i.get(c),v=f!==void 0&&f.v!==H||Reflect.has(u,c);if(f!==void 0||y!==null&&(!v||(m=Ne(u,c))!=null&&m.writable)){f===void 0&&(f=ce(v?oe(u[c],d):H),i.set(c,f));var g=h(f);if(g===H)return!1}return v},set(u,c,f,v){var M;var g=i.get(c),m=c in u;if(a&&c==="length")for(var p=f;p<g.v;p+=1){var T=i.get(p+"");T!==void 0?V(T,H):p in u&&(T=ce(H),i.set(p+"",T))}g===void 0?(!m||(M=Ne(u,c))!=null&&M.writable)&&(g=ce(void 0),V(g,oe(f,d)),i.set(c,g)):(m=g.v!==H,V(g,oe(f,d)));var Y=Reflect.getOwnPropertyDescriptor(u,c);if(Y!=null&&Y.set&&Y.set.call(v,f),!m){if(a&&typeof c=="string"){var ne=i.get("length"),F=Number(c);Number.isInteger(F)&&F>=ne.v&&V(ne,F+1)}Er(o)}return!0},ownKeys(u){h(o);var c=Reflect.ownKeys(u).filter(g=>{var m=i.get(g);return m===void 0||m.v!==H});for(var[f,v]of i)v.v!==H&&!(f in u)&&c.push(f);return c},setPrototypeOf(){mi()}})}function Er(e,t=1){V(e,e.v+t)}var xr,kr,Cr;function Xt(){if(xr===void 0){xr=window;var e=Element.prototype,t=Node.prototype;kr=Ne(t,"firstChild").get,Cr=Ne(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Ct(e=""){return document.createTextNode(e)}function Ae(e){return kr.call(e)}function Ee(e){return Cr.call(e)}function Q(e,t){if(!G)return Ae(e);var r=Ae(z);return r===null&&(r=z.appendChild(Ct())),we(r),r}function Zt(e,t){if(!G){var r=Ae(e);return r instanceof Comment&&r.data===""?Ee(r):r}return z}function me(e,t=1,r=!1){let l=G?z:e;for(var i;t--;)i=l,l=Ee(l);if(!G)return l;var a=l==null?void 0:l.nodeType;if(r&&a!==3){var o=Ct();return l===null?i==null||i.after(o):l.before(o),we(o),o}return we(l),l}function xi(e){e.textContent=""}function ot(e){var t=le|pe;y===null?t|=Le:y.f|=gr;var r=I!==null&&I.f&le?I:null;const l={children:null,ctx:W,deps:null,equals:mr,f:t,fn:e,reactions:null,v:null,version:0,parent:r??y};return r!==null&&(r.children??(r.children=[])).push(l),l}function Rr(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r<t.length;r+=1){var l=t[r];l.f&le?Wt(l):Te(l)}}}function ki(e){for(var t=e.parent;t!==null;){if(!(t.f&le))return t;t=t.parent}return null}function Ir(e){var t,r=y;de(ki(e));try{Rr(e),t=Mr(e)}finally{de(r)}return t}function $r(e){var t=Ir(e),r=(je||e.f&Le)&&e.deps!==null?lt:J;ve(e,r),e.equals(t)||(e.v=t,e.version=Ur())}function Wt(e){Rr(e),ct(e,0),ve(e,Ye),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ci(e){y===null&&I===null&&di(),I!==null&&I.f&Le&&ci(),qt&&fi()}function Ri(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ze(e,t,r,l=!0){var i=(e&it)!==0,a=y,o={ctx:W,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|pe,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,version:0};if(r){var d=Ue;try{Xr(!0),At(o),o.f|=ai}catch(f){throw Te(o),f}finally{Xr(d)}}else t!==null&&Tt(o);var u=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&gr)===0;if(!u&&!i&&l&&(a!==null&&Ri(o,a),I!==null&&I.f&le)){var c=I;(c.children??(c.children=[])).push(o)}return o}function Ii(e){const t=Ze(nt,null,!1);return ve(t,J),t.teardown=e,t}function Ut(e){Ci();var t=y!==null&&(y.f&ae)!==0&&W!==null&&!W.m;if(t){var r=W;(r.e??(r.e=[])).push({fn:e,effect:y,reaction:I})}else{var l=Mt(e);return l}}function Sr(e){const t=Ze(it,e,!0);return()=>{Te(t)}}function Mt(e){return Ze(vr,e,!1)}function jt(e){return Ze(nt,e,!0)}function We(e){return Bt(e)}function Bt(e,t=0){return Ze(nt|Yt|t,e,!0)}function Rt(e,t=!0){return Ze(nt|ae,e,!0,t)}function Nr(e){var t=e.teardown;if(t!==null){const r=qt,l=I;Zr(!0),xe(null);try{t.call(null)}finally{Zr(r),xe(l)}}}function Lr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r<t.length;r+=1)Wt(t[r])}}function Ar(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var l=r.next;Te(r,t),r=l}}function $i(e){for(var t=e.first;t!==null;){var r=t.next;t.f&ae||Te(t),t=r}}function Te(e,t=!0){var r=!1;if((t||e.f&oi)&&e.nodes_start!==null){for(var l=e.nodes_start,i=e.nodes_end;l!==null;){var a=l===i?null:Ee(l);l.remove(),l=a}r=!0}Ar(e,t&&!r),Lr(e),ct(e,0),ve(e,Ye);var o=e.transitions;if(o!==null)for(const u of o)u.stop();Nr(e);var d=e.parent;d!==null&&d.first!==null&&Tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Tr(e){var t=e.parent,r=e.prev,l=e.next;r!==null&&(r.next=l),l!==null&&(l.prev=r),t!==null&&(t.first===e&&(t.first=l),t.last===e&&(t.last=r))}function Pr(e,t){var r=[];Vr(e,r,!0),Si(r,()=>{Te(e),t&&t()})}function Si(e,t){var r=e.length;if(r>0){var l=()=>--r||t();for(var i of e)i.out(l)}else t()}function Vr(e,t,r){if(!(e.f&De)){if(e.f^=De,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var l=e.first;l!==null;){var i=l.next,a=(l.f&Ot)!==0||(l.f&ae)!==0;Vr(l,t,a?r:!1),l=i}}}function zr(e){Gr(e,!0)}function Gr(e,t){if(e.f&De){ft(e)&&At(e),e.f^=De;for(var r=e.first;r!==null;){var l=r.next,i=(r.f&Ot)!==0||(r.f&ae)!==0;Gr(r,i?t:!1),r=l}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}const Ni=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let It=!1,$t=!1,Ht=[],Jt=[];function Dr(){It=!1;const e=Ht.slice();Ht=[],hr(e)}function Yr(){$t=!1;const e=Jt.slice();Jt=[],hr(e)}function Kt(e){It||(It=!0,queueMicrotask(Dr)),Ht.push(e)}function Li(e){$t||($t=!0,Ni(Yr)),Jt.push(e)}function Ai(){It&&Dr(),$t&&Yr()}function Fr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Or=0,Ti=1;let St=!1,Nt=Or,st=!1,ut=null,Ue=!1,qt=!1;function Xr(e){Ue=e}function Zr(e){qt=e}let Pe=[],Me=0,ra=[],I=null;function xe(e){I=e}let y=null;function de(e){y=e}let he=null;function Pi(e){he=e}let Z=null,ee=0,ke=null;function Vi(e){ke=e}let Wr=0,je=!1,W=null;function Ur(){return++Wr}function zi(){return!yr}function ft(e){var o,d;var t=e.f;if(t&pe)return!0;if(t&lt){var r=e.deps,l=(t&Le)!==0;if(r!==null){var i;if(t&xt){for(i=0;i<r.length;i++)((o=r[i]).reactions??(o.reactions=[])).push(e);e.f^=xt}for(i=0;i<r.length;i++){var a=r[i];if(ft(a)&&$r(a),l&&y!==null&&!je&&!((d=a==null?void 0:a.reactions)!=null&&d.includes(e))&&(a.reactions??(a.reactions=[])).push(e),a.version>e.version)return!0}}l||ve(e,J)}return!1}function Gi(e,t){for(var r=t;r!==null;){if(r.f&Ft)try{r.fn(e);return}catch{r.f^=Ft}r=r.parent}throw St=!1,e}function Di(e){return(e.f&Ye)===0&&(e.parent===null||(e.parent.f&Ft)===0)}function Lt(e,t,r,l){if(St){if(r===null&&(St=!1),Di(t))throw e;return}r!==null&&(St=!0);{Gi(e,t);return}}function Mr(e){var g;var t=Z,r=ee,l=ke,i=I,a=je,o=he,d=W,u=e.f;Z=null,ee=0,ke=null,I=u&(ae|it)?null:e,je=!Ue&&(u&Le)!==0,he=null,W=e.ctx;try{var c=(0,e.fn)(),f=e.deps;if(Z!==null){var v;if(ct(e,ee),f!==null&&ee>0)for(f.length=ee+Z.length,v=0;v<Z.length;v++)f[ee+v]=Z[v];else e.deps=f=Z;if(!je)for(v=ee;v<f.length;v++)((g=f[v]).reactions??(g.reactions=[])).push(e)}else f!==null&&ee<f.length&&(ct(e,ee),f.length=ee);return c}finally{Z=t,ee=r,ke=l,I=i,je=a,he=o,W=d}}function Yi(e,t){let r=t.reactions;if(r!==null){var l=r.indexOf(e);if(l!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[l]=r[i],r.pop())}}r===null&&t.f&le&&(Z===null||!Z.includes(t))&&(ve(t,lt),t.f&(Le|xt)||(t.f^=xt),ct(t,0))}function ct(e,t){var r=e.deps;if(r!==null)for(var l=t;l<r.length;l++)Yi(e,r[l])}function At(e){var t=e.f;if(!(t&Ye)){ve(e,J);var r=y,l=W;y=e;try{t&Yt?$i(e):Ar(e),Lr(e),Nr(e);var i=Mr(e);e.teardown=typeof i=="function"?i:null,e.version=Wr}catch(a){Lt(a,e,r,l||e.ctx)}finally{y=r}}}function jr(){if(Me>1e3){Me=0;try{hi()}catch(e){if(ut!==null)Lt(e,ut,null);else throw e}}Me++}function Br(e){var t=e.length;if(t!==0){jr();var r=Ue;Ue=!0;try{for(var l=0;l<t;l++){var i=e[l];i.f&J||(i.f^=J);var a=[];Hr(i,a),Fi(a)}}finally{Ue=r}}}function Fi(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var l=e[r];if(!(l.f&(Ye|De)))try{ft(l)&&(At(l),l.deps===null&&l.first===null&&l.nodes_start===null&&(l.teardown===null?Tr(l):l.fn=null))}catch(i){Lt(i,l,null,l.ctx)}}}function Oi(){if(st=!1,Me>1001)return;const e=Pe;Pe=[],Br(e),st||(Me=0,ut=null)}function Tt(e){Nt===Or&&(st||(st=!0,queueMicrotask(Oi))),ut=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(it|ae)){if(!(r&J))return;t.f^=J}}Pe.push(t)}function Hr(e,t){var r=e.first,l=[];e:for(;r!==null;){var i=r.f,a=(i&ae)!==0,o=a&&(i&J)!==0,d=r.next;if(!o&&!(i&De))if(i&nt){if(a)r.f^=J;else try{ft(r)&&At(r)}catch(v){Lt(v,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else i&vr&&l.push(r);if(d===null){let v=r.parent;for(;v!==null;){if(e===v)break e;var c=v.next;if(c!==null){r=c;continue e}v=v.parent}}r=d}for(var f=0;f<l.length;f++)u=l[f],t.push(u),Hr(u,t)}function C(e){var t=Nt,r=Pe;try{jr();const i=[];Nt=Ti,Pe=i,st=!1,Br(r);var l=e==null?void 0:e();return Ai(),(Pe.length>0||i.length>0)&&C(),Me=0,ut=null,l}finally{Nt=t,Pe=r}}async function Xi(){await Promise.resolve(),C()}function h(e){var f;var t=e.f,r=(t&le)!==0;if(r&&t&Ye){var l=Ir(e);return Wt(e),l}if(I!==null){he!==null&&he.includes(e)&&bi();var i=I.deps;Z===null&&i!==null&&i[ee]===e?ee++:Z===null?Z=[e]:Z.push(e),ke!==null&&y!==null&&y.f&J&&!(y.f&ae)&&ke.includes(e)&&(ve(y,pe),Tt(y))}else if(r&&e.deps===null)for(var a=e,o=a.parent,d=a;o!==null;)if(o.f&le){var u=o;d=u,o=u.parent}else{var c=o;(f=c.deriveds)!=null&&f.includes(d)||(c.deriveds??(c.deriveds=[])).push(d);break}return r&&(a=e,ft(a)&&$r(a)),e.v}function Be(e){const t=I;try{return I=null,e()}finally{I=t}}const Zi=~(pe|lt|J);function ve(e,t){e.f=e.f&Zi|t}function Jr(e,t=!1,r){W={p:W,c:null,e:null,m:!1,s:e,x:null,l:null}}function Kr(e){const t=W;if(t!==null){e!==void 0&&(t.x=e);const o=t.e;if(o!==null){var r=y,l=I;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];de(a.effect),xe(a.reaction),Mt(a.fn)}}finally{de(r),xe(l)}}W=t.p,t.m=!0}return e||{}}let qr=!1;function Qr(){qr||(qr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function en(e){var t=I,r=y;xe(null),de(null);try{return e()}finally{xe(t),de(r)}}function Wi(e,t,r,l=r){e.addEventListener(t,()=>en(r));const i=e.__on_r;i?e.__on_r=()=>{i(),l(!0)}:e.__on_r=()=>l(!0),Qr()}const tn=new Set,Qt=new Set;function Ui(e,t,r,l){function i(a){if(l.capture||dt.call(t,a),!a.cancelBubble)return en(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Kt(()=>{t.addEventListener(e,i,l)}):t.addEventListener(e,i,l),i}function Mi(e,t,r,l,i){var a={capture:l,passive:i},o=Ui(e,t,r,a);(t===document.body||t===window||t===document)&&Ii(()=>{t.removeEventListener(e,o,a)})}function ji(e){for(var t=0;t<e.length;t++)tn.add(e[t]);for(var r of Qt)r(e)}function dt(e){var F;var t=this,r=t.ownerDocument,l=e.type,i=((F=e.composedPath)==null?void 0:F.call(e))||[],a=i[0]||e.target,o=0,d=e.__root;if(d){var u=i.indexOf(d);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var c=i.indexOf(t);if(c===-1)return;u<=c&&(o=u)}if(a=i[o]||e.target,a!==t){Et(e,"currentTarget",{configurable:!0,get(){return a||r}});var f=I,v=y;xe(null),de(null);try{for(var g,m=[];a!==null;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var T=a["__"+l];if(T!==void 0&&!a.disabled)if(dr(T)){var[Y,...ne]=T;Y.apply(a,[e,...ne])}else T.call(a,e)}catch(M){g?m.push(M):g=M}if(e.cancelBubble||p===t||p===null)break;a=p}if(g){for(let M of m)queueMicrotask(()=>{throw M});throw g}}finally{e.__root=t,delete e.currentTarget,xe(f),de(v)}}}function rn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ce(e,t){var r=y;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&ei)!==0,l=(t&ti)!==0,i,a=!e.startsWith("<!>");return()=>{if(G)return Ce(z,null),z;i===void 0&&(i=rn(a?e:"<!>"+e),r||(i=Ae(i)));var o=l?document.importNode(i,!0):i.cloneNode(!0);if(r){var d=Ae(o),u=o.lastChild;Ce(d,u)}else Ce(o,o);return o}}function Bi(){if(G)return Ce(z,null),z;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ct();return e.append(t,r),Ce(t,r),e}function te(e,t){if(G){y.nodes_end=z,Xe();return}e!==null&&e.before(t)}const Hi=["touchstart","touchmove"];function Ji(e){return Hi.includes(e)}function nn(e,t){return ln(e,t)}function Ki(e,t){Xt(),t.intro=t.intro??!1;const r=t.target,l=G,i=z;try{for(var a=Ae(r);a&&(a.nodeType!==8||a.data!==sr);)a=Ee(a);if(!a)throw Ge;Oe(!0),we(a),Xe();const o=ln(e,{...t,anchor:a});if(z===null||z.nodeType!==8||z.data!==fr)throw kt(),Ge;return Oe(!1),o}catch(o){if(o===Ge)return t.recover===!1&&vi(),Xt(),xi(r),Oe(!1),nn(e,t);throw o}finally{Oe(l),we(i)}}const He=new Map;function ln(e,{target:t,anchor:r,props:l={},events:i,context:a,intro:o=!0}){Xt();var d=new Set,u=v=>{for(var g=0;g<v.length;g++){var m=v[g];if(!d.has(m)){d.add(m);var p=Ji(m);t.addEventListener(m,dt,{passive:p});var T=He.get(m);T===void 0?(document.addEventListener(m,dt,{passive:p}),He.set(m,1)):He.set(m,T+1)}}};u(ri(tn)),Qt.add(u);var c=void 0,f=Sr(()=>{var v=r??t.appendChild(Ct());return Rt(()=>{if(a){Jr({});var g=W;g.c=a}i&&(l.$$events=i),G&&Ce(v,null),c=e(v,l)||{},G&&(y.nodes_end=z),a&&Kr()}),()=>{var p;for(var g of d){t.removeEventListener(g,dt);var m=He.get(g);--m===0?(document.removeEventListener(g,dt),He.delete(g)):He.set(g,m)}Qt.delete(u),er.delete(c),v!==r&&((p=v.parentNode)==null||p.removeChild(v))}});return er.set(c,f),c}let er=new WeakMap;function qi(e){const t=er.get(e);t&&t()}function Re(e,t,r=!1){G&&Xe();var l=e,i=null,a=null,o=H,d=r?Ot:0,u=!1;const c=(v,g=!0)=>{u=!0,f(g,v)},f=(v,g)=>{if(o===(o=v))return;let m=!1;if(G){const p=l.data===ur;!!o===p&&(l=Ei(),we(l),Oe(!1),m=!0)}o?(i?zr(i):g&&(i=Rt(()=>g(l))),a&&Pr(a,()=>{a=null})):(a?zr(a):g&&(a=Rt(()=>g(l))),i&&Pr(i,()=>{i=null})),m&&Oe(!0)};Bt(()=>{u=!1,t(c),u||f(null,null)},d),G&&(l=z)}function Je(e,t,r,l,i){var a=e,o="",d;Bt(()=>{if(o===(o=t()??"")){G&&Xe();return}d!==void 0&&(Te(d),d=void 0),o!==""&&(d=Rt(()=>{if(G){z.data;for(var u=Xe(),c=u;u!==null&&(u.nodeType!==8||u.data!=="");)c=u,u=Ee(u);if(u===null)throw kt(),Ge;Ce(z,c),a=we(u);return}var f=o+"",v=rn(f);Ce(Ae(v),v.lastChild),a.before(v)}))})}function Qi(e,t,r,l,i){var d;G&&Xe();var a=(d=t.$$slots)==null?void 0:d[r],o=!1;a===!0&&(a=t.children,o=!0),a===void 0||a(e,o?()=>l:l)}function el(e,t){Kt(()=>{var r=e.getRootNode(),l=r.host?r:r.head??r.ownerDocument.head;if(!l.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,l.appendChild(i)}})}function an(e){if(G){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var l=e.value;ue(e,"value",null),e.value=l}if(e.hasAttribute("checked")){var i=e.checked;ue(e,"checked",null),e.checked=i}}};e.__on_r=r,Li(r),Qr()}}function tl(e,t){var r=e.__attributes??(e.__attributes={});r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t)}function ue(e,t,r,l){var i=e.__attributes??(e.__attributes={});G&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[si]=r),r==null?e.removeAttribute(t):typeof r!="string"&&rl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var on=new Map;function rl(e){var t=on.get(e.nodeName);if(t)return t;on.set(e.nodeName,t=[]);for(var r,l=Dt(e),i=Element.prototype;i!==l;){r=ni(l);for(var a in r)r[a].set&&t.push(a);l=Dt(l)}return t}function nl(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function il(e,t,r=t){Wi(e,"change",l=>{var i=l?e.defaultChecked:e.checked;r(i)}),(G&&e.defaultChecked!==e.checked||Be(t)==null)&&r(e.checked),jt(()=>{var l=t();e.checked=!!l})}function sn(e,t){return e===t||(e==null?void 0:e[at])===t}function un(e={},t,r,l){return Mt(()=>{var i,a;return jt(()=>{i=a,a=[],Be(()=>{e!==r(...a)&&(t(e,...a),i&&sn(r(...i),e)&&t(null,...i))})}),()=>{Kt(()=>{a&&sn(r(...a),e)&&t(null,...a)})}}),e}function fn(e){W===null&&Fr(),Ut(()=>{const t=Be(e);if(typeof t=="function")return t})}function ll(e){W===null&&Fr(),fn(()=>()=>Be(e))}let Pt=!1;function al(e){var t=Pt;try{return Pt=!1,[e(),Pt]}finally{Pt=t}}function ol(e){for(var t=y,r=y;t!==null&&!(t.f&(ae|it));)t=t.parent;try{return de(t),e()}finally{de(r)}}function N(e,t,r,l){var Ie;var i=(r&Jn)!==0,a=!yr,o=(r&qn)!==0,d=(r&Qn)!==0,u=!1,c;o?[c,u]=al(()=>e[t]):c=e[t];var f=at in e||_r in e,v=((Ie=Ne(e,t))==null?void 0:Ie.set)??(f&&o&&t in e?S=>e[t]=S:void 0),g=l,m=!0,p=!1,T=()=>(p=!0,m&&(m=!1,d?g=Be(l):g=l),g);c===void 0&&l!==void 0&&(v&&a&&gi(),c=T(),v&&v(c));var Y;if(Y=()=>{var S=e[t];return S===void 0?T():(m=!0,p=!1,S)},!(r&Kn))return Y;if(v){var ne=e.$$legacy;return function(S,j){return arguments.length>0?((!j||ne||u)&&v(j?Y():S),S):Y()}}var F=!1,M=!1,ye=pr(c),U=ol(()=>ot(()=>{var S=Y(),j=h(ye);return F?(F=!1,M=!0,j):(M=!1,ye.v=S)}));return i||(U.equals=br),function(S,j){if(arguments.length>0){const ge=j?h(U):o?oe(S):S;return U.equals(ge)||(F=!0,V(ye,ge),p&&g!==void 0&&(g=ge),Be(()=>h(U))),S}return h(U)}}function sl(e){return new ul(e)}class ul{constructor(t){ar(this,be);ar(this,re);var a;var r=new Map,l=(o,d)=>{var u=pr(d);return r.set(o,u),u};const i=new Proxy({...t.props||{},$$events:{}},{get(o,d){return h(r.get(d)??l(d,Reflect.get(o,d)))},has(o,d){return d===_r?!0:(h(r.get(d)??l(d,Reflect.get(o,d))),Reflect.has(o,d))},set(o,d,u){return V(r.get(d)??l(d,u),u),Reflect.set(o,d,u)}});or(this,re,(t.hydrate?Ki:nn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&C(),or(this,be,i.$$events);for(const o of Object.keys(K(this,re)))o==="$set"||o==="$destroy"||o==="$on"||Et(this,o,{get(){return K(this,re)[o]},set(d){K(this,re)[o]=d},enumerable:!0});K(this,re).$set=o=>{Object.assign(i,o)},K(this,re).$destroy=()=>{qi(K(this,re))}}$set(t){K(this,re).$set(t)}$on(t,r){K(this,be)[t]=K(this,be)[t]||[];const l=(...i)=>r.call(this,...i);return K(this,be)[t].push(l),()=>{K(this,be)[t]=K(this,be)[t].filter(i=>i!==l)}}$destroy(){K(this,re).$destroy()}}be=new WeakMap,re=new WeakMap;let cn;typeof HTMLElement=="function"&&(cn=class extends HTMLElement{constructor(t,r,l){super();fe(this,"$$ctor");fe(this,"$$s");fe(this,"$$c");fe(this,"$$cn",!1);fe(this,"$$d",{});fe(this,"$$r",!1);fe(this,"$$p_d",{});fe(this,"$$l",{});fe(this,"$$l_u",new Map);fe(this,"$$me");this.$$ctor=t,this.$$s=r,l&&this.attachShadow({mode:"open"})}addEventListener(t,r,l){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,l)}removeEventListener(t,r,l){if(super.removeEventListener(t,r,l),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{const o=document.createElement("slot");i!=="default"&&(o.name=i),te(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},l=fl(this);for(const i of this.$$s)i in l&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Vt(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=sl({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Sr(()=>{jt(()=>{var i;this.$$r=!0;for(const a of wt(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];const o=Vt(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}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(t,r,l){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Vt(t,l,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 wt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Vt(e,t,r,l){var a;const i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!l||!r[e])return t;if(l==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fl(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function cl(e,t,r,l,i,a){let o=class extends cn{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return wt(t).map(d=>(t[d].attribute||d).toLowerCase())}};return wt(t).forEach(d=>{Et(o.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(u){var v;u=Vt(d,u,t),this.$$d[d]=u;var c=this.$$c;if(c){var f=(v=Ne(c,d))==null?void 0:v.get;f?c[d]=u:c.$set({[d]:u})}}})}),l.forEach(d=>{Et(o.prototype,d,{get(){var u;return(u=this.$$c)==null?void 0:u[d]}})}),e.element=o,o}const dn=new TextEncoder;function dl(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function hl(e,t="SHA-256",r=1e5){const l=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const i=await hn(l,e,t);return{algorithm:t,challenge:i,salt:l,signature:""}}async function hn(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return dl(await crypto.subtle.digest(r.toUpperCase(),dn.encode(e+t)))}function vl(e,t,r="SHA-256",l=1e6,i=0){const a=new AbortController,o=Date.now();return{promise:(async()=>{for(let u=i;u<=l;u+=1){if(a.signal.aborted)return null;if(await hn(t,u,r)===e)return{number:u,took:Date.now()-o}}return null})(),controller:a}}function gl(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function _l(e){const t=atob(e),r=new Uint8Array(t.length);for(let l=0;l<t.length;l++)r[l]=t.charCodeAt(l);return r}function ml(e,t=12){const r=new Uint8Array(t);for(let l=0;l<t;l++)r[l]=e%256,e=Math.floor(e/256);return r}async function bl(e,t="",r=1e6,l=0){const i="AES-GCM",a=new AbortController,o=Date.now(),d=async()=>{for(let f=l;f<=r;f+=1){if(a.signal.aborted||!u||!c)return null;try{const v=await crypto.subtle.decrypt({name:i,iv:ml(f)},u,c);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-o}}catch{}}return null};let u=null,c=null;try{c=_l(e);const f=await crypto.subtle.digest("SHA-256",dn.encode(t));u=await crypto.subtle.importKey("raw",f,i,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:d(),controller:a}}var w=(e=>(e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),yl=se('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="altcha-spinner svelte-ddsc3z"></path></svg>'),pl=se('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span> <input type="hidden" class="svelte-ddsc3z">',1),wl=se('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span>'),El=se('<label class="svelte-ddsc3z"><!></label>'),xl=se('<div class="svelte-ddsc3z"><a target="_blank" class="altcha-logo svelte-ddsc3z"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></path></svg></a></div>'),kl=se('<div class="svelte-ddsc3z"><!></div>'),Cl=se('<div class="svelte-ddsc3z"><!></div>'),Rl=se('<div class="altcha-error svelte-ddsc3z"><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" class="svelte-ddsc3z"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" class="svelte-ddsc3z"></path></svg> <!></div>'),Il=se('<div class="altcha-footer svelte-ddsc3z"><div class="svelte-ddsc3z"><!></div></div>'),$l=se('<div class="altcha-anchor-arrow svelte-ddsc3z"></div>'),Sl=se('<!> <div class="altcha svelte-ddsc3z"><div class="altcha-main svelte-ddsc3z"><!> <div class="altcha-checkbox svelte-ddsc3z"><input type="checkbox" class="svelte-ddsc3z"></div> <div class="altcha-label svelte-ddsc3z"><!></div> <!></div> <!> <!> <!></div>',1);const Nl={hash:"svelte-ddsc3z",code:`.altcha.svelte-ddsc3z {background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left;}.altcha.svelte-ddsc3z:focus-within {border-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z {background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999;}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow:where(.svelte-ddsc3z) {border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto;}.altcha[data-floating=bottom].svelte-ddsc3z:focus-within::after {border-bottom-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating=top].svelte-ddsc3z:focus-within::after {border-top-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z:not([data-state=unverified]) {display:block;}.altcha-anchor-arrow.svelte-ddsc3z {border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0;}.altcha-main.svelte-ddsc3z {align-items:center;display:flex;gap:0.4rem;padding:0.7rem;}.altcha-label.svelte-ddsc3z {flex-grow:1;}.altcha-label.svelte-ddsc3z label:where(.svelte-ddsc3z) {cursor:pointer;}.altcha-logo.svelte-ddsc3z {color:currentColor;opacity:0.3;}.altcha-logo.svelte-ddsc3z:hover {opacity:1;}.altcha-error.svelte-ddsc3z {color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem;}.altcha-footer.svelte-ddsc3z {align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right;}.altcha-footer.svelte-ddsc3z:hover {opacity:1;}.altcha-footer.svelte-ddsc3z > :where(.svelte-ddsc3z):first-child {flex-grow:1;}.altcha-footer.svelte-ddsc3z a {color:currentColor;}.altcha-checkbox.svelte-ddsc3z {display:flex;align-items:center;height:24px;width:24px;}.altcha-checkbox.svelte-ddsc3z input:where(.svelte-ddsc3z) {width:18px;height:18px;margin:0;}.altcha-hidden.svelte-ddsc3z {display:none;}.altcha-spinner.svelte-ddsc3z {
2
2
  animation: svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center;}
3
3
 
4
4
  @keyframes svelte-ddsc3z-altcha-spinner {
5
5
  100% {
6
6
  transform: rotate(360deg);
7
7
  }
8
- }`};function vn(e,t){var Zn,Wn;Jr(t,!0),el(e,Nl);let r=N(t,"auto",7,void 0),l=N(t,"blockspam",7,void 0),i=N(t,"challengeurl",7,void 0),a=N(t,"challengejson",7,void 0),o=N(t,"customfetch",7,void 0),d=N(t,"debug",7,!1),u=N(t,"delay",7,0),f=N(t,"expire",7,void 0),c=N(t,"floating",7,void 0),v=N(t,"floatinganchor",7,void 0),g=N(t,"floatingoffset",7,void 0),m=N(t,"hidefooter",7,!1),p=N(t,"hidelogo",7,!1),T=N(t,"name",7,"altcha"),Y=N(t,"maxnumber",7,1e6),ne=N(t,"mockerror",7,!1),F=N(t,"obfuscated",7,void 0),M=N(t,"plugins",7,void 0),pe=N(t,"refetchonexpire",7,!0),U=N(t,"spamfilter",7,!1),Se=N(t,"strings",7,void 0),S=N(t,"test",7,!1),j=N(t,"verifyurl",7,void 0),_e=N(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),vt=N(t,"workerurl",7,void 0);const gn=["SHA-256","SHA-384","SHA-512"],_n="Visit Altcha.org",mn="https://altcha.org/",gt=(n,s)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:s}))},bn=(Wn=(Zn=document.documentElement.lang)==null?void 0:Zn.split("-"))==null?void 0:Wn[0],rr=st(()=>{var n;return i()&&new URL(i(),location.origin).host.endsWith(".altcha.org")&&!!((n=i())!=null&&n.includes("apiKey=ckey_"))}),nr=st(()=>a()?Sn(a()):void 0),yn=st(()=>Se()?Sn(Se()):{}),ie=st(()=>{var n;return{ariaLinkLabel:_n,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${mn}" target="_blank" aria-label="${((n=h(yn))==null?void 0:n.ariaLinkLabel)||_n}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...h(yn)}});let Qe=Xe(!1),L=Xe(oe(w.UNVERIFIED)),B=Xe(void 0),_t=Xe(null),et=null,E=null,tt=Xe(null),me=null,Ne=[],Ge=Xe(null);Mt(()=>{Dl(h(tt))}),Mt(()=>{Yl(h(L))}),ll(()=>{Ll(),E&&(E.removeEventListener("submit",Cn),E.removeEventListener("reset",Rn),E.removeEventListener("focusin",kn),E=null),me&&(clearTimeout(me),me=null),document.removeEventListener("click",En),document.removeEventListener("scroll",xn),window.removeEventListener("resize",$n)}),fn(()=>{var n;A("mounted","1.1.0"),A("workers",_e()),zl(),A("plugins",Ne.length?Ne.map(s=>s.constructor.pluginName).join(", "):"none"),S()&&A("using test mode"),f()&&Gt(f()),r()!==void 0&&A("auto",r()),c()!==void 0&&Nn(c()),E=(n=h(B))==null?void 0:n.closest("form"),E&&(E.addEventListener("submit",Cn,{capture:!0}),E.addEventListener("reset",Rn),r()==="onfocus"&&E.addEventListener("focusin",kn)),r()==="onload"&&(F()?mt():Le()),h(rr)&&(m()||p())&&A("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{gt("load")})});function pn(n,s){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:s.number,salt:n.salt,signature:n.signature,test:S()?!0:void 0,took:s.took}))}function Ll(){for(const n of Ne)n.destroy()}function wn(){i()&&pe()&&h(L)===w.VERIFIED?Le():bt(w.EXPIRED,h(ie).expired)}async function Al(){var n;if(ne())throw A("mocking error"),new Error("Mocked error.");if(h(nr))return A("using provided json data"),h(nr);if(S())return A("generating test challenge",{test:S()}),hl(typeof S()!="boolean"?+S():void 0);{if(!i()&&E){const P=E.getAttribute("action");P!=null&&P.includes("/form/")&&i(P+"/altcha")}if(!i())throw new Error("Attribute challengeurl not set.");A("fetching challenge from",i());let s=null,_=null;if(o())if(A("using customfetch"),typeof o()=="string"){if(s=globalThis[o()]||null,!s)throw new Error(`Custom fetch function not found: ${o()}`)}else s=o();const x={headers:U()!==!1?{"x-altcha-spam-filter":"1"}:{}};if(s){if(_=await s(i(),x),!_||!(_ instanceof Response))throw new Error("Custom fetch function did not return a response.")}else _=await fetch(i(),x);if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const G=_.headers.get("Expires"),$=_.headers.get("X-Altcha-Config"),b=await _.json(),O=new URLSearchParams((n=b.salt.split("?"))==null?void 0:n[1]),we=O.get("expires")||O.get("expire");if(we){const P=new Date(+we*1e3),fe=isNaN(P.getTime())?0:P.getTime()-Date.now();fe>0&&Gt(fe)}if($)try{const P=JSON.parse($);P&&typeof P=="object"&&(P.verifyurl&&(P.verifyurl=new URL(P.verifyurl,new URL(i())).toString()),Tn(P))}catch(P){A("unable to configure from X-Altcha-Config",P)}if(!f()&&(G!=null&&G.length)){const P=Date.parse(G);if(P){const fe=P-Date.now();fe>0&&Gt(fe)}}return b}}function Tl(n){var _;const s=E==null?void 0:E.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=s==null?void 0:s.value)==null?void 0:_.slice(s.value.indexOf("@")))||void 0}function Pl(){return U()==="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 U()=="object"?U():{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 Vl(n){return[...(E==null?void 0:E.querySelectorAll(n!=null&&n.length?n.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,x)=>{const G=x.name,$=x.value;return G&&$&&(_[G]=/\n/.test($)?$.replace(new RegExp("(?<!\\r)\\n","g"),`\r
9
- `):$),_},{})}function zl(){const n=M()!==void 0?M().split(","):void 0;for(const s of globalThis.altchaPlugins)(!n||n.includes(s.pluginName))&&Ne.push(new s({el:h(B),clarify:mt,dispatch:gt,getConfiguration:Pn,getFloatingAnchor:Vn,getState:zn,log:A,reset:bt,solve:An,setState:De,setFloatingAnchor:Gn,verify:Le}))}function A(...n){(d()||n.some(s=>s instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${T()}]`,...n)}function Gl(){[w.UNVERIFIED,w.ERROR,w.EXPIRED].includes(h(L))?U()!==!1&&(E==null?void 0:E.reportValidity())===!1?V(Qe,!1):F()?mt():Le():V(Qe,!0)}function En(n){const s=n.target;c()&&s&&!h(B).contains(s)&&(h(L)===w.VERIFIED||r()==="off"&&h(L)===w.UNVERIFIED)&&(h(B).style.display="none")}function xn(){c()&&h(L)!==w.UNVERIFIED&&zt()}function Dl(n){for(const s of Ne)typeof s.onErrorChange=="function"&&s.onErrorChange(h(tt))}function kn(n){h(L)===w.UNVERIFIED&&Le()}function Cn(n){E&&r()==="onsubmit"?h(L)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Le().then(()=>{E==null||E.requestSubmit()})):h(L)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),h(L)===w.VERIFYING&&In()):E&&c()&&r()==="off"&&h(L)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),h(B).style.display="block",zt())}function Rn(){bt()}function In(){h(L)===w.VERIFYING&&h(ie).waitAlert&&alert(h(ie).waitAlert)}function Yl(n){for(const s of Ne)typeof s.onStateChange=="function"&&s.onStateChange(h(L));c()&&h(L)!==w.UNVERIFIED&&requestAnimationFrame(()=>{zt()}),V(Qe,h(L)===w.VERIFIED)}function $n(){c()&&zt()}function Sn(n){return JSON.parse(n)}function zt(n=20){if(h(B))if(et||(et=(v()?document.querySelector(v()):E==null?void 0:E.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||E),et){const s=parseInt(g(),10)||12,_=et.getBoundingClientRect(),x=h(B).getBoundingClientRect(),G=document.documentElement.clientHeight,$=document.documentElement.clientWidth,b=c()==="auto"?_.bottom+x.height+s+n>G:c()==="top",O=Math.max(n,Math.min($-n-x.width,_.left+_.width/2-x.width/2));if(b?h(B).style.top=`${_.top-(x.height+s)}px`:h(B).style.top=`${_.bottom+s}px`,h(B).style.left=`${O}px`,h(B).setAttribute("data-floating",b?"top":"bottom"),h(_t)){const we=h(_t).getBoundingClientRect();h(_t).style.left=_.left-O+_.width/2-we.width/2+"px"}}else A("unable to find floating anchor element")}async function Fl(n){if(!j())throw new Error("Attribute verifyurl not set.");A("requesting server verification from",j());const s={payload:n};if(U()!==!1){const{blockedCountries:G,classifier:$,disableRules:b,email:O,expectedLanguages:we,expectedCountries:P,fields:fe,ipAddress:pt,text:Ql,timeZone:Un}=Pl();s.blockedCountries=G,s.classifier=$,s.disableRules=b,s.email=O===!1?void 0:Tl(O),s.expectedCountries=P,s.expectedLanguages=we||(bn?[bn]:void 0),s.fields=fe===!1?void 0:Vl(fe),s.ipAddress=pt===!1?void 0:pt||"auto",s.text=Ql,s.timeZone=Un===!1?void 0:Un||gl()}const _=await fetch(j(),{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const x=await _.json();if(x!=null&&x.payload&&V(Ge,oe(x.payload)),gt("serververification",x),l()&&x.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function Gt(n){A("expire",n),me&&(clearTimeout(me),me=null),n<1?wn():me=setTimeout(wn,n)}function Nn(n){A("floating",n),c()!==n&&(h(B).style.left="",h(B).style.top=""),c(n===!0||n===""?"auto":n===!1||n==="false"?void 0:c()),c()?(r()||r("onsubmit"),document.addEventListener("scroll",xn),document.addEventListener("click",En),window.addEventListener("resize",$n)):r()==="onsubmit"&&r(void 0)}function Ln(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!gn.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${gn.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function An(n){let s=null;if("Worker"in window){try{s=await Ol(n,n.maxnumber)}catch(_){A(_)}if((s==null?void 0:s.number)!==void 0||"obfuscated"in n)return{data:n,solution:s}}if("obfuscated"in n){const _=await bl(n.obfuscated,n.key,n.maxnumber);return{data:n,solution:await _.promise}}return{data:n,solution:await vl(n.challenge,n.salt,n.algorithm,n.maxnumber||Y()).promise}}async function Ol(n,s=typeof S()=="number"?S():Y(),_=Math.ceil(_e())){const x=[];_=Math.min(16,Math.max(1,_));for(let b=0;b<_;b++)x.push(altchaCreateWorker(vt()));const G=Math.ceil(s/_),$=await Promise.all(x.map((b,O)=>{const we=O*G;return new Promise(P=>{b.addEventListener("message",fe=>{if(fe.data)for(const pt of x)pt!==b&&pt.postMessage({type:"abort"});P(fe.data)}),b.postMessage({payload:n,max:we+G,start:we,type:"work"})})}));for(const b of x)b.terminate();return $.find(b=>!!b)||null}async function mt(){if(!F()){De(w.ERROR);return}const n=Ne.find(s=>s.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){De(w.ERROR),A("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Tn(n){n.obfuscated!==void 0&&F(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(F()?mt():Le())),n.blockspam!==void 0&&l(!!n.blockspam),n.customfetch!==void 0&&o(n.customfetch),n.floatinganchor!==void 0&&v(n.floatinganchor),n.delay!==void 0&&u(n.delay),n.floatingoffset!==void 0&&g(n.floatingoffset),n.floating!==void 0&&Nn(n.floating),n.expire!==void 0&&(Gt(n.expire),f(n.expire)),n.challenge&&(a(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Ln(h(nr))),n.challengeurl!==void 0&&i(n.challengeurl),n.debug!==void 0&&d(!!n.debug),n.hidefooter!==void 0&&m(!!n.hidefooter),n.hidelogo!==void 0&&p(!!n.hidelogo),n.maxnumber!==void 0&&Y(+n.maxnumber),n.mockerror!==void 0&&ne(!!n.mockerror),n.name!==void 0&&T(n.name),n.refetchonexpire!==void 0&&pe(!!n.refetchonexpire),n.spamfilter!==void 0&&U(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Se(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&S(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&j(n.verifyurl),n.workers!==void 0&&_e(+n.workers),n.workerurl!==void 0&&vt(n.workerurl)}function Pn(){return{auto:r(),blockspam:l(),challengeurl:i(),debug:d(),delay:u(),expire:f(),floating:c(),floatinganchor:v(),floatingoffset:g(),hidefooter:m(),hidelogo:p(),name:T(),maxnumber:Y(),mockerror:ne(),obfuscated:F(),refetchonexpire:pe(),spamfilter:U(),strings:h(ie),test:S(),verifyurl:j(),workers:_e(),workerurl:vt()}}function Vn(){return et}function Xl(n){return Ne.find(s=>s.constructor.pluginName===n)}function zn(){return h(L)}function bt(n=w.UNVERIFIED,s=null){me&&(clearTimeout(me),me=null),V(Qe,!1),V(Ge,null),De(n,s)}function Gn(n){et=n}function De(n,s=null){V(L,oe(n)),V(tt,oe(s)),gt("statechange",{payload:h(Ge),state:h(L)})}async function Le(){return bt(w.VERIFYING),await new Promise(n=>setTimeout(n,u()||0)),Al().then(n=>(Ln(n),A("challenge",n),An(n))).then(({data:n,solution:s})=>{if(A("solution",s),"challenge"in n&&s&&!("clearText"in s))if((s==null?void 0:s.number)!==void 0){if(j())return Fl(pn(n,s));V(Ge,oe(pn(n,s))),A("payload",h(Ge))}else throw A("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{De(w.VERIFIED),A("verified"),Xi().then(()=>{gt("verified",{payload:h(Ge)})})}).catch(n=>{A(n),De(w.ERROR,n.message)})}var Dn=Sl(),Yn=Wt(Dn);Qi(Yn,t,"default",{});var yt=be(Yn,2),ir=Q(yt),Fn=Q(ir);{var Zl=n=>{var s=yl();te(n,s)};$e(Fn,n=>{h(L)===w.VERIFYING&&n(Zl)})}var Dt=be(Fn,2),rt=Q(Dt);an(rt),rt.__change=Gl,q(Dt);var lr=be(Dt,2),Wl=Q(lr);{var Ul=n=>{var s=pl(),_=Wt(s),x=Q(_);qe(x,()=>h(ie).verified),q(_);var G=be(_,2);an(G),Me(()=>{ue(G,"name",T()),tl(G,h(Ge))}),te(n,s)},Ml=n=>{var s=Bi(),_=Wt(s);{var x=$=>{var b=wl(),O=Q(b);qe(O,()=>h(ie).verifying),q(b),te($,b)},G=$=>{var b=El(),O=Q(b);qe(O,()=>h(ie).label),q(b),Me(()=>ue(b,"for",`${T()??""}_checkbox`)),te($,b)};$e(_,$=>{h(L)===w.VERIFYING?$(x):$(G,!1)},!0)}te(n,s)};$e(Wl,n=>{h(L)===w.VERIFIED?n(Ul):n(Ml,!1)})}q(lr);var jl=be(lr,2);{var Bl=n=>{var s=xl(),_=Q(s);ue(_,"href",mn),q(s),Me(()=>ue(_,"aria-label",h(ie).ariaLinkLabel)),te(n,s)};$e(jl,n=>{(p()!==!0||h(rr))&&n(Bl)})}q(ir);var On=be(ir,2);{var Hl=n=>{var s=Rl(),_=be(Q(s),2);{var x=$=>{var b=kl(),O=Q(b);qe(O,()=>h(ie).expired),q(b),Me(()=>ue(b,"title",h(tt))),te($,b)},G=$=>{var b=Cl(),O=Q(b);qe(O,()=>h(ie).error),q(b),Me(()=>ue(b,"title",h(tt))),te($,b)};$e(_,$=>{h(L)===w.EXPIRED?$(x):$(G,!1)})}q(s),te(n,s)};$e(On,n=>{(h(tt)||h(L)===w.EXPIRED)&&n(Hl)})}var Xn=be(On,2);{var Jl=n=>{var s=Il(),_=Q(s),x=Q(_);qe(x,()=>h(ie).footer),q(_),q(s),te(n,s)};$e(Xn,n=>{h(ie).footer&&(m()!==!0||h(rr))&&n(Jl)})}var Kl=be(Xn,2);{var ql=n=>{var s=$l();un(s,_=>V(_t,_),()=>h(_t)),te(n,s)};$e(Kl,n=>{c()&&n(ql)})}return q(yt),un(yt,n=>V(B,n),()=>h(B)),Me(()=>{ue(yt,"data-state",h(L)),ue(yt,"data-floating",c()),nl(Dt,"altcha-hidden",h(L)===w.VERIFYING),ue(rt,"id",`${T()??""}_checkbox`),rt.required=r()!=="onsubmit"&&(!c()||r()!=="off")}),Mi("invalid",rt,In),il(rt,()=>h(Qe),n=>V(Qe,n)),te(e,Dn),Kr({clarify:mt,configure:Tn,getConfiguration:Pn,getFloatingAnchor:Vn,getPlugin:Xl,getState:zn,reset:bt,setFloatingAnchor:Gn,setState:De,verify:Le,get auto(){return r()},set auto(n=void 0){r(n),C()},get blockspam(){return l()},set blockspam(n=void 0){l(n),C()},get challengeurl(){return i()},set challengeurl(n=void 0){i(n),C()},get challengejson(){return a()},set challengejson(n=void 0){a(n),C()},get customfetch(){return o()},set customfetch(n=void 0){o(n),C()},get debug(){return d()},set debug(n=!1){d(n),C()},get delay(){return u()},set delay(n=0){u(n),C()},get expire(){return f()},set expire(n=void 0){f(n),C()},get floating(){return c()},set floating(n=void 0){c(n),C()},get floatinganchor(){return v()},set floatinganchor(n=void 0){v(n),C()},get floatingoffset(){return g()},set floatingoffset(n=void 0){g(n),C()},get hidefooter(){return m()},set hidefooter(n=!1){m(n),C()},get hidelogo(){return p()},set hidelogo(n=!1){p(n),C()},get name(){return T()},set name(n="altcha"){T(n),C()},get maxnumber(){return Y()},set maxnumber(n=1e6){Y(n),C()},get mockerror(){return ne()},set mockerror(n=!1){ne(n),C()},get obfuscated(){return F()},set obfuscated(n=void 0){F(n),C()},get plugins(){return M()},set plugins(n=void 0){M(n),C()},get refetchonexpire(){return pe()},set refetchonexpire(n=!0){pe(n),C()},get spamfilter(){return U()},set spamfilter(n=!1){U(n),C()},get strings(){return Se()},set strings(n=void 0){Se(n),C()},get test(){return S()},set test(n=!1){S(n),C()},get verifyurl(){return j()},set verifyurl(n=void 0){j(n),C()},get workers(){return _e()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){_e(n),C()},get workerurl(){return vt()},set workerurl(n=void 0){vt(n),C()}})}ji(["change"]),customElements.define("altcha-widget",cl(vn,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},customfetch:{},floating:{},floatinganchor:{},name:{},obfuscated:{},plugins:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","reset","setFloatingAnchor","setState","verify"],!1)),globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Bn,globalThis.altchaPlugins=globalThis.altchaPlugins||[],k.Altcha=vn,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
8
+ }`};function vn(e,t){var Zn,Wn;Jr(t,!0),el(e,Nl);let r=N(t,"auto",7,void 0),l=N(t,"blockspam",7,void 0),i=N(t,"challengeurl",7,void 0),a=N(t,"challengejson",7,void 0),o=N(t,"customfetch",7,void 0),d=N(t,"debug",7,!1),u=N(t,"delay",7,0),c=N(t,"expire",7,void 0),f=N(t,"floating",7,void 0),v=N(t,"floatinganchor",7,void 0),g=N(t,"floatingoffset",7,void 0),m=N(t,"hidefooter",7,!1),p=N(t,"hidelogo",7,!1),T=N(t,"name",7,"altcha"),Y=N(t,"maxnumber",7,1e6),ne=N(t,"mockerror",7,!1),F=N(t,"obfuscated",7,void 0),M=N(t,"plugins",7,void 0),ye=N(t,"refetchonexpire",7,!0),U=N(t,"spamfilter",7,!1),Ie=N(t,"strings",7,void 0),S=N(t,"test",7,!1),j=N(t,"verifyurl",7,void 0),ge=N(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),ht=N(t,"workerurl",7,void 0);const gn=["SHA-256","SHA-384","SHA-512"],_n="Visit Altcha.org",mn="https://altcha.org/",vt=(n,s)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:s}))},bn=(Wn=(Zn=document.documentElement.lang)==null?void 0:Zn.split("-"))==null?void 0:Wn[0],tr=ot(()=>{var n;return i()&&new URL(i(),location.origin).host.endsWith(".altcha.org")&&!!((n=i())!=null&&n.includes("apiKey=ckey_"))}),rr=ot(()=>a()?Sn(a()):void 0),yn=ot(()=>Ie()?Sn(Ie()):{}),ie=ot(()=>{var n;return{ariaLinkLabel:_n,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${mn}" target="_blank" aria-label="${((n=h(yn))==null?void 0:n.ariaLinkLabel)||_n}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...h(yn)}});let Ke=Fe(!1),L=Fe(oe(w.UNVERIFIED)),B=Fe(void 0),gt=Fe(null),qe=null,E=null,Qe=Fe(null),_e=null,$e=[],Ve=Fe(null);Ut(()=>{Dl(h(Qe))}),Ut(()=>{Yl(h(L))}),ll(()=>{Ll(),E&&(E.removeEventListener("submit",Cn),E.removeEventListener("reset",Rn),E.removeEventListener("focusin",kn),E=null),_e&&(clearTimeout(_e),_e=null),document.removeEventListener("click",En),document.removeEventListener("scroll",xn),window.removeEventListener("resize",$n)}),fn(()=>{var n;A("mounted","1.2.0"),A("workers",ge()),zl(),A("plugins",$e.length?$e.map(s=>s.constructor.pluginName).join(", "):"none"),S()&&A("using test mode"),c()&&nr(c()),r()!==void 0&&A("auto",r()),f()!==void 0&&Nn(f()),E=(n=h(B))==null?void 0:n.closest("form"),E&&(E.addEventListener("submit",Cn,{capture:!0}),E.addEventListener("reset",Rn),r()==="onfocus"&&E.addEventListener("focusin",kn)),r()==="onload"&&(F()?_t():Se()),h(tr)&&(m()||p())&&A("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{vt("load")})});function pn(n,s){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:s.number,salt:n.salt,signature:n.signature,test:S()?!0:void 0,took:s.took}))}function Ll(){for(const n of $e)n.destroy()}function wn(){i()&&ye()&&h(L)===w.VERIFIED?Se():mt(w.EXPIRED,h(ie).expired)}async function Al(){var n;if(ne())throw A("mocking error"),new Error("Mocked error.");if(h(rr))return A("using provided json data"),h(rr);if(S())return A("generating test challenge",{test:S()}),hl(typeof S()!="boolean"?+S():void 0);{if(!i()&&E){const P=E.getAttribute("action");P!=null&&P.includes("/form/")&&i(P+"/altcha")}if(!i())throw new Error("Attribute challengeurl not set.");A("fetching challenge from",i());let s=null,_=null;if(o())if(A("using customfetch"),typeof o()=="string"){if(s=globalThis[o()]||null,!s)throw new Error(`Custom fetch function not found: ${o()}`)}else s=o();const x={headers:U()!==!1?{"x-altcha-spam-filter":"1"}:{}};if(s){if(_=await s(i(),x),!_||!(_ instanceof Response))throw new Error("Custom fetch function did not return a response.")}else _=await fetch(i(),x);if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const D=_.headers.get("X-Altcha-Config"),$=await _.json(),b=new URLSearchParams((n=$.salt.split("?"))==null?void 0:n[1]),O=b.get("expires")||b.get("expire");if(O){const P=new Date(+O*1e3),tt=isNaN(P.getTime())?0:P.getTime()-Date.now();tt>0&&nr(tt)}if(D)try{const P=JSON.parse(D);P&&typeof P=="object"&&(P.verifyurl&&(P.verifyurl=new URL(P.verifyurl,new URL(i())).toString()),Tn(P))}catch(P){A("unable to configure from X-Altcha-Config",P)}return $}}function Tl(n){var _;const s=E==null?void 0:E.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=s==null?void 0:s.value)==null?void 0:_.slice(s.value.indexOf("@")))||void 0}function Pl(){return U()==="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 U()=="object"?U():{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 Vl(n){return[...(E==null?void 0:E.querySelectorAll(n!=null&&n.length?n.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,x)=>{const D=x.name,$=x.value;return D&&$&&(_[D]=/\n/.test($)?$.replace(new RegExp("(?<!\\r)\\n","g"),`\r
9
+ `):$),_},{})}function zl(){const n=M()!==void 0?M().split(","):void 0;for(const s of globalThis.altchaPlugins)(!n||n.includes(s.pluginName))&&$e.push(new s({el:h(B),clarify:_t,dispatch:vt,getConfiguration:Pn,getFloatingAnchor:Vn,getState:zn,log:A,reset:mt,solve:An,setState:ze,setFloatingAnchor:Gn,verify:Se}))}function A(...n){(d()||n.some(s=>s instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${T()}]`,...n)}function Gl(){[w.UNVERIFIED,w.ERROR,w.EXPIRED].includes(h(L))?U()!==!1&&(E==null?void 0:E.reportValidity())===!1?V(Ke,!1):F()?_t():Se():V(Ke,!0)}function En(n){const s=n.target;f()&&s&&!h(B).contains(s)&&(h(L)===w.VERIFIED||r()==="off"&&h(L)===w.UNVERIFIED)&&(h(B).style.display="none")}function xn(){f()&&h(L)!==w.UNVERIFIED&&zt()}function Dl(n){for(const s of $e)typeof s.onErrorChange=="function"&&s.onErrorChange(h(Qe))}function kn(n){h(L)===w.UNVERIFIED&&Se()}function Cn(n){E&&r()==="onsubmit"?h(L)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Se().then(()=>{E==null||E.requestSubmit()})):h(L)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),h(L)===w.VERIFYING&&In()):E&&f()&&r()==="off"&&h(L)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),h(B).style.display="block",zt())}function Rn(){mt()}function In(){h(L)===w.VERIFYING&&h(ie).waitAlert&&alert(h(ie).waitAlert)}function Yl(n){for(const s of $e)typeof s.onStateChange=="function"&&s.onStateChange(h(L));f()&&h(L)!==w.UNVERIFIED&&requestAnimationFrame(()=>{zt()}),V(Ke,h(L)===w.VERIFIED)}function $n(){f()&&zt()}function Sn(n){return JSON.parse(n)}function zt(n=20){if(h(B))if(qe||(qe=(v()?document.querySelector(v()):E==null?void 0:E.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||E),qe){const s=parseInt(g(),10)||12,_=qe.getBoundingClientRect(),x=h(B).getBoundingClientRect(),D=document.documentElement.clientHeight,$=document.documentElement.clientWidth,b=f()==="auto"?_.bottom+x.height+s+n>D:f()==="top",O=Math.max(n,Math.min($-n-x.width,_.left+_.width/2-x.width/2));if(b?h(B).style.top=`${_.top-(x.height+s)}px`:h(B).style.top=`${_.bottom+s}px`,h(B).style.left=`${O}px`,h(B).setAttribute("data-floating",b?"top":"bottom"),h(gt)){const P=h(gt).getBoundingClientRect();h(gt).style.left=_.left-O+_.width/2-P.width/2+"px"}}else A("unable to find floating anchor element")}async function Fl(n){if(!j())throw new Error("Attribute verifyurl not set.");A("requesting server verification from",j());const s={payload:n};if(U()!==!1){const{blockedCountries:D,classifier:$,disableRules:b,email:O,expectedLanguages:P,expectedCountries:tt,fields:yt,ipAddress:pt,text:Ql,timeZone:Un}=Pl();s.blockedCountries=D,s.classifier=$,s.disableRules=b,s.email=O===!1?void 0:Tl(O),s.expectedCountries=tt,s.expectedLanguages=P||(bn?[bn]:void 0),s.fields=yt===!1?void 0:Vl(yt),s.ipAddress=pt===!1?void 0:pt||"auto",s.text=Ql,s.timeZone=Un===!1?void 0:Un||gl()}const _=await fetch(j(),{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const x=await _.json();if(x!=null&&x.payload&&V(Ve,oe(x.payload)),vt("serververification",x),l()&&x.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function nr(n){A("expire",n),_e&&(clearTimeout(_e),_e=null),n<1?wn():_e=setTimeout(wn,n)}function Nn(n){A("floating",n),f()!==n&&(h(B).style.left="",h(B).style.top=""),f(n===!0||n===""?"auto":n===!1||n==="false"?void 0:f()),f()?(r()||r("onsubmit"),document.addEventListener("scroll",xn),document.addEventListener("click",En),window.addEventListener("resize",$n)):r()==="onsubmit"&&r(void 0)}function Ln(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!gn.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${gn.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function An(n){let s=null;if("Worker"in window){try{s=await Ol(n,n.maxnumber)}catch(_){A(_)}if((s==null?void 0:s.number)!==void 0||"obfuscated"in n)return{data:n,solution:s}}if("obfuscated"in n){const _=await bl(n.obfuscated,n.key,n.maxnumber);return{data:n,solution:await _.promise}}return{data:n,solution:await vl(n.challenge,n.salt,n.algorithm,n.maxnumber||Y()).promise}}async function Ol(n,s=typeof S()=="number"?S():Y(),_=Math.ceil(ge())){const x=[];_=Math.min(16,Math.max(1,_));for(let b=0;b<_;b++)x.push(altchaCreateWorker(ht()));const D=Math.ceil(s/_),$=await Promise.all(x.map((b,O)=>{const P=O*D;return new Promise(tt=>{b.addEventListener("message",yt=>{if(yt.data)for(const pt of x)pt!==b&&pt.postMessage({type:"abort"});tt(yt.data)}),b.postMessage({payload:n,max:P+D,start:P,type:"work"})})}));for(const b of x)b.terminate();return $.find(b=>!!b)||null}async function _t(){if(!F()){ze(w.ERROR);return}const n=$e.find(s=>s.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){ze(w.ERROR),A("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Tn(n){n.obfuscated!==void 0&&F(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(F()?_t():Se())),n.blockspam!==void 0&&l(!!n.blockspam),n.customfetch!==void 0&&o(n.customfetch),n.floatinganchor!==void 0&&v(n.floatinganchor),n.delay!==void 0&&u(n.delay),n.floatingoffset!==void 0&&g(n.floatingoffset),n.floating!==void 0&&Nn(n.floating),n.expire!==void 0&&(nr(n.expire),c(n.expire)),n.challenge&&(a(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Ln(h(rr))),n.challengeurl!==void 0&&i(n.challengeurl),n.debug!==void 0&&d(!!n.debug),n.hidefooter!==void 0&&m(!!n.hidefooter),n.hidelogo!==void 0&&p(!!n.hidelogo),n.maxnumber!==void 0&&Y(+n.maxnumber),n.mockerror!==void 0&&ne(!!n.mockerror),n.name!==void 0&&T(n.name),n.refetchonexpire!==void 0&&ye(!!n.refetchonexpire),n.spamfilter!==void 0&&U(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Ie(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&S(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&j(n.verifyurl),n.workers!==void 0&&ge(+n.workers),n.workerurl!==void 0&&ht(n.workerurl)}function Pn(){return{auto:r(),blockspam:l(),challengeurl:i(),debug:d(),delay:u(),expire:c(),floating:f(),floatinganchor:v(),floatingoffset:g(),hidefooter:m(),hidelogo:p(),name:T(),maxnumber:Y(),mockerror:ne(),obfuscated:F(),refetchonexpire:ye(),spamfilter:U(),strings:h(ie),test:S(),verifyurl:j(),workers:ge(),workerurl:ht()}}function Vn(){return qe}function Xl(n){return $e.find(s=>s.constructor.pluginName===n)}function zn(){return h(L)}function mt(n=w.UNVERIFIED,s=null){_e&&(clearTimeout(_e),_e=null),V(Ke,!1),V(Ve,null),ze(n,s)}function Gn(n){qe=n}function ze(n,s=null){V(L,oe(n)),V(Qe,oe(s)),vt("statechange",{payload:h(Ve),state:h(L)})}async function Se(){return mt(w.VERIFYING),await new Promise(n=>setTimeout(n,u()||0)),Al().then(n=>(Ln(n),A("challenge",n),An(n))).then(({data:n,solution:s})=>{if(A("solution",s),"challenge"in n&&s&&!("clearText"in s))if((s==null?void 0:s.number)!==void 0){if(j())return Fl(pn(n,s));V(Ve,oe(pn(n,s))),A("payload",h(Ve))}else throw A("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{ze(w.VERIFIED),A("verified"),Xi().then(()=>{vt("verified",{payload:h(Ve)})})}).catch(n=>{A(n),ze(w.ERROR,n.message)})}var Dn=Sl(),Yn=Zt(Dn);Qi(Yn,t,"default",{});var bt=me(Yn,2),ir=Q(bt),Fn=Q(ir);{var Zl=n=>{var s=yl();te(n,s)};Re(Fn,n=>{h(L)===w.VERIFYING&&n(Zl)})}var Gt=me(Fn,2),et=Q(Gt);an(et),et.__change=Gl,q(Gt);var lr=me(Gt,2),Wl=Q(lr);{var Ul=n=>{var s=pl(),_=Zt(s),x=Q(_);Je(x,()=>h(ie).verified),q(_);var D=me(_,2);an(D),We(()=>{ue(D,"name",T()),tl(D,h(Ve))}),te(n,s)},Ml=n=>{var s=Bi(),_=Zt(s);{var x=$=>{var b=wl(),O=Q(b);Je(O,()=>h(ie).verifying),q(b),te($,b)},D=$=>{var b=El(),O=Q(b);Je(O,()=>h(ie).label),q(b),We(()=>ue(b,"for",`${T()??""}_checkbox`)),te($,b)};Re(_,$=>{h(L)===w.VERIFYING?$(x):$(D,!1)},!0)}te(n,s)};Re(Wl,n=>{h(L)===w.VERIFIED?n(Ul):n(Ml,!1)})}q(lr);var jl=me(lr,2);{var Bl=n=>{var s=xl(),_=Q(s);ue(_,"href",mn),q(s),We(()=>ue(_,"aria-label",h(ie).ariaLinkLabel)),te(n,s)};Re(jl,n=>{(p()!==!0||h(tr))&&n(Bl)})}q(ir);var On=me(ir,2);{var Hl=n=>{var s=Rl(),_=me(Q(s),2);{var x=$=>{var b=kl(),O=Q(b);Je(O,()=>h(ie).expired),q(b),We(()=>ue(b,"title",h(Qe))),te($,b)},D=$=>{var b=Cl(),O=Q(b);Je(O,()=>h(ie).error),q(b),We(()=>ue(b,"title",h(Qe))),te($,b)};Re(_,$=>{h(L)===w.EXPIRED?$(x):$(D,!1)})}q(s),te(n,s)};Re(On,n=>{(h(Qe)||h(L)===w.EXPIRED)&&n(Hl)})}var Xn=me(On,2);{var Jl=n=>{var s=Il(),_=Q(s),x=Q(_);Je(x,()=>h(ie).footer),q(_),q(s),te(n,s)};Re(Xn,n=>{h(ie).footer&&(m()!==!0||h(tr))&&n(Jl)})}var Kl=me(Xn,2);{var ql=n=>{var s=$l();un(s,_=>V(gt,_),()=>h(gt)),te(n,s)};Re(Kl,n=>{f()&&n(ql)})}return q(bt),un(bt,n=>V(B,n),()=>h(B)),We(()=>{ue(bt,"data-state",h(L)),ue(bt,"data-floating",f()),nl(Gt,"altcha-hidden",h(L)===w.VERIFYING),ue(et,"id",`${T()??""}_checkbox`),et.required=r()!=="onsubmit"&&(!f()||r()!=="off")}),Mi("invalid",et,In),il(et,()=>h(Ke),n=>V(Ke,n)),te(e,Dn),Kr({clarify:_t,configure:Tn,getConfiguration:Pn,getFloatingAnchor:Vn,getPlugin:Xl,getState:zn,reset:mt,setFloatingAnchor:Gn,setState:ze,verify:Se,get auto(){return r()},set auto(n=void 0){r(n),C()},get blockspam(){return l()},set blockspam(n=void 0){l(n),C()},get challengeurl(){return i()},set challengeurl(n=void 0){i(n),C()},get challengejson(){return a()},set challengejson(n=void 0){a(n),C()},get customfetch(){return o()},set customfetch(n=void 0){o(n),C()},get debug(){return d()},set debug(n=!1){d(n),C()},get delay(){return u()},set delay(n=0){u(n),C()},get expire(){return c()},set expire(n=void 0){c(n),C()},get floating(){return f()},set floating(n=void 0){f(n),C()},get floatinganchor(){return v()},set floatinganchor(n=void 0){v(n),C()},get floatingoffset(){return g()},set floatingoffset(n=void 0){g(n),C()},get hidefooter(){return m()},set hidefooter(n=!1){m(n),C()},get hidelogo(){return p()},set hidelogo(n=!1){p(n),C()},get name(){return T()},set name(n="altcha"){T(n),C()},get maxnumber(){return Y()},set maxnumber(n=1e6){Y(n),C()},get mockerror(){return ne()},set mockerror(n=!1){ne(n),C()},get obfuscated(){return F()},set obfuscated(n=void 0){F(n),C()},get plugins(){return M()},set plugins(n=void 0){M(n),C()},get refetchonexpire(){return ye()},set refetchonexpire(n=!0){ye(n),C()},get spamfilter(){return U()},set spamfilter(n=!1){U(n),C()},get strings(){return Ie()},set strings(n=void 0){Ie(n),C()},get test(){return S()},set test(n=!1){S(n),C()},get verifyurl(){return j()},set verifyurl(n=void 0){j(n),C()},get workers(){return ge()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){ge(n),C()},get workerurl(){return ht()},set workerurl(n=void 0){ht(n),C()}})}ji(["change"]),customElements.define("altcha-widget",cl(vn,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},customfetch:{},floating:{},floatinganchor:{},name:{},obfuscated:{},plugins:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","reset","setFloatingAnchor","setState","verify"],!1)),globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Bn,globalThis.altchaPlugins=globalThis.altchaPlugins||[],k.Altcha=vn,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
@@ -106,4 +106,30 @@ declare global {
106
106
  style?: AltchaWidgetCSSProperties;
107
107
  }
108
108
  }
109
- }
109
+ }
110
+
111
+ declare module "react" {
112
+ namespace JSX {
113
+ interface IntrinsicElements {
114
+ 'altcha-widget': AltchaWidgetReact;
115
+ }
116
+
117
+ interface AltchaWidgetCSSProperties extends React.CSSProperties {
118
+ '--altcha-border-width'?: string;
119
+ '--altcha-border-radius'?: string;
120
+ '--altcha-color-base'?: string;
121
+ '--altcha-color-border'?: string;
122
+ '--altcha-color-text'?: string;
123
+ '--altcha-color-border-focus'?: string;
124
+ '--altcha-color-error-text'?: string;
125
+ '--altcha-color-footer-bg'?: string;
126
+ '--altcha-max-width'?: string;
127
+ }
128
+
129
+ interface AltchaWidgetReact extends AltchaWidget extends React.HTMLAttributes<HTMLElement> {
130
+ children?: React.ReactNode;
131
+ ref?: React.RefObject<HTMLElement | null>;
132
+ style?: AltchaWidgetCSSProperties;
133
+ }
134
+ }
135
+ }