altcha 3.0.0-beta.4 → 3.0.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.
- package/README.md +13 -6
- package/dist/external/altcha.js +1 -1
- package/dist/external/altcha.min.js +1 -1
- package/dist/external/altcha.umd.cjs +1 -1
- package/dist/external/altcha.umd.min.cjs +1 -1
- package/dist/main/altcha.i18n.js +1 -1
- package/dist/main/altcha.i18n.min.js +1 -1
- package/dist/main/altcha.i18n.umd.cjs +1 -1
- package/dist/main/altcha.i18n.umd.min.cjs +1 -1
- package/dist/main/altcha.js +1 -1
- package/dist/main/altcha.min.js +1 -1
- package/dist/main/altcha.umd.cjs +1 -1
- package/dist/main/altcha.umd.min.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ Explore starter templates for popular frameworks:
|
|
|
56
56
|
- [Java](https://github.com/altcha-org/altcha-lib-java)
|
|
57
57
|
- [Ruby](https://github.com/altcha-org/altcha-lib-rb)
|
|
58
58
|
- [Elixir](https://github.com/altcha-org/altcha-lib-ex)
|
|
59
|
+
- [Rust](https://github.com/altcha-org/altcha-lib-rs)
|
|
59
60
|
|
|
60
61
|
## Plugins & CMS
|
|
61
62
|
|
|
@@ -120,7 +121,7 @@ ALTCHA is optimized for performance:
|
|
|
120
121
|
| Distribution | Size (GZIPped) |
|
|
121
122
|
| ---------------------------- | -------------- |
|
|
122
123
|
| ALTCHA | 34 kB |
|
|
123
|
-
| ALTCHA with all translations |
|
|
124
|
+
| ALTCHA with all translations | 52 kB |
|
|
124
125
|
| Cloudflare Turnstile | 85+ kB |
|
|
125
126
|
| hCaptcha | 250+ kB |
|
|
126
127
|
| reCAPTCHA | 300+ kB |
|
|
@@ -335,24 +336,30 @@ For additional verification, ALTCHA supports **image/audio code challenges** (e.
|
|
|
335
336
|
|
|
336
337
|
[Data obfuscation]() is supported via an official plugin, which must be imported alongside the widget. This is ideal for protecting sensitive information, such as email addresses, from scrapers until the challenge is solved.
|
|
337
338
|
|
|
339
|
+
To obfuscate data, run:
|
|
340
|
+
|
|
341
|
+
```sh
|
|
342
|
+
npx altcha-lib obfuscate [data]
|
|
343
|
+
```
|
|
344
|
+
|
|
338
345
|
### Programmatic Usage
|
|
339
346
|
|
|
340
|
-
The plugin exports `obfuscate` and `deobfuscate`
|
|
347
|
+
The plugin exports `ObfuscationPlugin` with static methods `obfuscate` and `deobfuscate` for manual data handling:
|
|
341
348
|
|
|
342
349
|
```ts
|
|
343
|
-
import {
|
|
350
|
+
import { ObfuscationPlugin } from 'altcha/plugins/obfuscation';
|
|
344
351
|
|
|
345
|
-
const obfuscatedData = await obfuscate('mailto:hello@example.com');
|
|
352
|
+
const obfuscatedData = await ObfuscationPlugin.obfuscate('mailto:hello@example.com');
|
|
346
353
|
```
|
|
347
354
|
|
|
348
355
|
### Widget Integration
|
|
349
356
|
|
|
350
|
-
To use the plugin with the widget, ensure `altcha/plugins/obfuscation` is imported
|
|
357
|
+
To use the plugin with the widget, ensure `altcha/plugins/obfuscation` is imported before the main library. Use the `data-obfuscated` attribute to provide the Base64-encoded payload:
|
|
351
358
|
|
|
352
359
|
```html
|
|
353
360
|
<script>
|
|
354
|
-
import 'altcha';
|
|
355
361
|
import 'altcha/plugins/obfuscation';
|
|
362
|
+
import 'altcha';
|
|
356
363
|
</script>
|
|
357
364
|
|
|
358
365
|
<altcha-widget data-obfuscated="${obfuscatedData}" display="floating"></altcha-widget>
|
package/dist/external/altcha.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.keys,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,l=Object.prototype,c=Array.prototype,u=Object.getPrototypeOf,f=Object.isExtensible;const d=()=>{};function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const v=1<<24,p=16,g=32,m=64,y=512,b=1024,w=2048,_=4096,$=8192,E=16384,C=32768,S=1<<25,k=65536,x=1<<17,O=1<<19,I=65536,T=1<<21,A=1<<23,R=Symbol("$state"),P=Symbol("legacy props"),L=Symbol(""),M=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},N=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function D(e){return e===this.v}function V(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function j(e){return!V(e,this.v)}const F={},U=Symbol(),q="http://www.w3.org/1999/xhtml";let H=null;function G(e){H=e}function Y(e,t=!1,n){H={p:H,i:!1,c:null,e:null,s:e,x:null,r:Qn,l:null}}function B(e){var t=H,n=t.e;if(null!==n)for(var r of(t.e=null,n))xr(r);return void 0!==e&&(t.x=e),t.i=!0,H=t.p,e??{}}let J=[];function Z(){var e=J;J=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}function W(e){if(0===J.length&&!En){var t=J;queueMicrotask(()=>{t===J&&Z()})}J.push(e)}function z(){for(;J.length>0;)Z()}function X(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let K,Q=!1;function ee(e){Q=e}function te(e){if(null===e)throw X(),F;return K=e}function ne(){return te(ye(K))}function re(e){if(Q){if(null!==ye(K))throw X(),F;K=e}}function ie(e=1){if(Q){for(var t=e,n=K;t--;)n=ye(n);K=n}}function oe(e=!0){for(var t=0,n=K;;){if(8===n.nodeType){var r=n.data;if("]"===r){if(0===t)return n;t-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ye(n);e&&n.remove(),n=i}}function ae(e){if(!e||8!==e.nodeType)throw X(),F;return e.data}function se(t){if("object"!=typeof t||null===t||R in t)return t;const n=u(t);if(n!==l&&n!==c)return t;var r=new Map,i=e(t),o=Un(0),s=lr,f=e=>{if(lr===s)return e();var t=zn,n=lr;Kn(null),cr(s);var r=e();return Kn(t),cr(n),r};return i&&r.set("length",Un(t.length)),new Proxy(t,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?f(()=>{var e=Un(n.value);return r.set(t,e),e}):Hn(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(void 0===n){if(t in e){const e=f(()=>Un(U));r.set(t,e),Yn(o)}}else Hn(n,U),Yn(o);return!0},get(e,n,i){if(n===R)return t;var o=r.get(n),s=n in e;if(void 0!==o||s&&!a(e,n)?.writable||(o=f(()=>Un(se(s?e[n]:U))),r.set(n,o)),void 0!==o){var l=yr(o);return l===U?void 0:l}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var i=r.get(t);i&&(n.value=yr(i))}else if(void 0===n){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==U)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===R)return!0;var n=r.get(t),i=void 0!==n&&n.v!==U||Reflect.has(e,t);if((void 0!==n||null!==Qn&&(!i||a(e,t)?.writable))&&(void 0===n&&(n=f(()=>Un(i?se(e[t]):U)),r.set(t,n)),yr(n)===U))return!1;return i},set(e,t,n,s){var l=r.get(t),c=t in e;if(i&&"length"===t)for(var u=n;u<l.v;u+=1){var d=r.get(u+"");void 0!==d?Hn(d,U):u in e&&(d=f(()=>Un(U)),r.set(u+"",d))}void 0===l?c&&!a(e,t)?.writable||(Hn(l=f(()=>Un(void 0)),se(n)),r.set(t,l)):(c=l.v!==U,Hn(l,f(()=>se(n))));var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!c){if(i&&"string"==typeof t){var v=r.get("length"),p=Number(t);Number.isInteger(p)&&p>=v.v&&Hn(v,p+1)}Yn(o)}return!0},ownKeys(e){yr(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==U});for(var[n,i]of r)i.v===U||n in e||t.push(n);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function le(e){try{if(null!==e&&"object"==typeof e&&R in e)return e[R]}catch{}return e}function ce(e,t){return Object.is(le(e),le(t))}var ue,fe,de,he,ve;function pe(){if(void 0===ue){ue=window,fe=document,de=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;he=a(t,"firstChild").get,ve=a(t,"nextSibling").get,f(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),f(n)&&(n.__t=void 0)}}function ge(e=""){return document.createTextNode(e)}function me(e){return he.call(e)}function ye(e){return ve.call(e)}function be(e,t){if(!Q)return me(e);var n=me(K);if(null===n)n=K.appendChild(ge());else if(t&&3!==n.nodeType){var r=ge();return n?.before(r),te(r),r}return t&&Ee(n),te(n),n}function we(e,t=!1){if(!Q){var n=me(e);return n instanceof Comment&&""===n.data?ye(n):n}if(t){if(3!==K?.nodeType){var r=ge();return K?.before(r),te(r),r}Ee(K)}return K}function _e(e,t=1,n=!1){let r=Q?K:e;for(var i;t--;)i=r,r=ye(r);if(!Q)return r;if(n){if(3!==r?.nodeType){var o=ge();return null===r?i?.after(o):r.before(o),te(o),o}Ee(r)}return te(r),r}function $e(e,t,n){let r;return document.createElementNS(t??q,e,r)}function Ee(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Ce(e){var t=Qn;if(null===t)return zn.f|=A,e;if(0===(t.f&C)&&!(4&t.f))throw e;Se(e,t)}function Se(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&C))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}const ke=-7169;function xe(e,t){e.f=e.f&ke|t}function Oe(e){0!==(e.f&y)||null===e.deps?xe(e,b):xe(e,_)}function Ie(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&I)&&(t.f^=I,Ie(t.deps))}function Te(e,t,n){0!==(e.f&w)?t.add(e):0!==(e.f&_)&&n.add(e),Ie(e.deps),xe(e,b)}function Ae(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const Re=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Pe(e){return Re.includes(e)}const Le={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Me(e){return e=e.toLowerCase(),Le[e]??e}const Ne=["touchstart","touchmove"];function De(e){return Ne.includes(e)}function Ve(e,t){if(t){const t=document.body;e.autofocus=!0,W(()=>{document.activeElement===t&&e.focus()})}}let je=!1;function Fe(){je||(je=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ue(e){var t=zn,n=Qn;Kn(null),er(null);try{return e()}finally{Kn(t),er(n)}}const qe=Symbol("events"),He=new Set,Ge=new Set;function Ye(e,t,n,r={}){function i(e){if(r.capture||ze.call(t,e),!e.cancelBubble)return Ue(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?W(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Be(e,t,n,r,i){var o={capture:r,passive:i},a=Ye(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sr(()=>{t.removeEventListener(e,a,o)})}function Je(e,t,n){(t[qe]??={})[e]=n}function Ze(e){for(var t=0;t<e.length;t++)He.add(e[t]);for(var n of Ge)n(e)}let We=null;function ze(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;We=e;var s=0,l=We===e&&e[qe];if(l){var c=i.indexOf(l);if(-1!==c&&(t===document||t===window))return void(e[qe]=t);var u=i.indexOf(t);if(-1===u)return;c<=u&&(s=c)}if((a=i[s]||e.target)!==t){o(e,"currentTarget",{configurable:!0,get:()=>a||n});var f=zn,d=Qn;Kn(null),er(null);try{for(var h,v=[];null!==a;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[qe]?.[r];null==g||a.disabled&&e.target!==a||g.call(a,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble||p===t||null===p)break;a=p}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e[qe]=t,delete e.currentTarget,Kn(f),er(d)}}}const Xe=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ke(e){var t=$e("template");return t.innerHTML=function(e){return Xe?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Qe(e,t){var n=Qn;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function et(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{if(Q)return Qe(K,null),K;void 0===n&&(n=Ke(o?e:"<!>"+e),r||(n=me(n)));var t=i||de?document.importNode(n,!0):n.cloneNode(!0);r?Qe(me(t),t.lastChild):Qe(t,t);return t}}function tt(e,t,n="svg"){var r,i=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(Q)return Qe(K,null),K;if(!r){var e=Ke(i);r=me(me(e))}var t=r.cloneNode(!0);return Qe(t,t),t}}function nt(e,t){return tt(e,0,"svg")}function rt(e=""){if(!Q){var t=ge(e+"");return Qe(t,t),t}var n=K;return 3!==n.nodeType?(n.before(n=ge()),te(n)):Ee(n),Qe(n,n),n}function it(){if(Q)return Qe(K,null),K;var e=document.createDocumentFragment(),t=document.createComment(""),n=ge();return e.append(t,n),Qe(t,n),e}function ot(e,t){if(Q){var n=Qn;return 0!==(n.f&C)&&null!==n.nodes.end||(n.nodes.end=K),void ne()}null!==e&&e.before(t)}class at{parent;is_pending=!1;transform_error;#e;#t=Q?K:null;#n;#r;#i;#o=null;#a=null;#s=null;#l=null;#c=0;#u=0;#f=!1;#d=new Set;#h=new Set;#v=null;#p=function(e){let t,n=0,r=Fn(0);return()=>{Cr()&&(yr(r),Ir(()=>(0===n&&(t=_r(()=>e(()=>Yn(r)))),n+=1,()=>{W(()=>{n-=1,0===n&&(t?.(),t=void 0,Yn(r))})})))}}(()=>(this.#v=Fn(this.#c),()=>{this.#v=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=Qn;t.b=this,t.f|=128,n(e)},this.parent=Qn.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Ar(()=>{if(Q){const e=this.#t;ne();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#g(t)}else t?this.#m():this.#y()}else this.#b()},589824),Q&&(this.#e=K)}#y(){try{this.#o=Pr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){const t=this.#n.failed;t&&(this.#s=Pr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#m(){const e=this.#n.pending;if(e){this.is_pending=!0,this.#a=Pr(()=>e(this.#e));var t=wn;W(()=>{var e=this.#l=document.createDocumentFragment(),n=ge();e.append(n),this.#o=this.#w(()=>Pr(()=>this.#r(n))),0===this.#u&&(this.#e.before(e),this.#l=null,jr(this.#a,()=>{this.#a=null}),this.#_(t))})}}#b(){var e=wn;try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#c=0,this.#o=Pr(()=>{this.#r(this.#e)}),this.#u>0){var t=this.#l=document.createDocumentFragment();qr(this.#o,t);const e=this.#n.pending;this.#a=Pr(()=>e(this.#e))}else this.#_(e)}catch(e){this.error(e)}}#_(e){this.is_pending=!1;for(const t of this.#d)xe(t,w),e.schedule(t);for(const t of this.#h)xe(t,_),e.schedule(t);this.#d.clear(),this.#h.clear()}defer_effect(e){Te(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#w(e){var t=Qn,n=zn,r=H;er(this.#i),Kn(this.#i),G(this.#i.ctx);try{return In.ensure(),e()}catch(e){return Ce(e),null}finally{er(t),Kn(n),G(r)}}#$(e,t){this.has_pending_snippet()?(this.#u+=e,0===this.#u&&(this.#_(t),this.#a&&jr(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))):this.parent&&this.parent.#$(e,t)}update_pending_count(e,t){this.#$(e,t),this.#c+=e,this.#v&&!this.#f&&(this.#f=!0,W(()=>{this.#f=!1,this.#v&&Gn(this.#v,this.#c)}))}get_effect_pending(){return this.#p(),yr(this.#v)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#o&&(Nr(this.#o),this.#o=null),this.#a&&(Nr(this.#a),this.#a=null),this.#s&&(Nr(this.#s),this.#s=null),Q&&(te(this.#t),ie(),te(oe()));var r=!1,i=!1;const o=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#s&&jr(this.#s,()=>{this.#s=null}),this.#w(()=>{this.#b()}))},a=e=>{try{i=!0,t?.(e,o),i=!1}catch(e){Se(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#w(()=>{try{return Pr(()=>{var t=Qn;t.b=this,t.f|=128,n(this.#e,()=>e,()=>o)})}catch(e){return Se(e,this.#i.parent),null}}))};W(()=>{var t;try{t=this.transform_error(e)}catch(e){return void Se(e,this.#i&&this.#i.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(a,e=>Se(e,this.#i&&this.#i.parent)):a(t)})}}function st(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function lt(e,t){return ft(e,t)}function ct(e,t){pe(),t.intro=t.intro??!1;const n=t.target,r=Q,i=K;try{for(var o=me(n);o&&(8!==o.nodeType||"["!==o.data);)o=ye(o);if(!o)throw F;ee(!0),te(o);const r=ft(e,{...t,anchor:o});return ee(!1),r}catch(r){if(r instanceof Error&&r.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw r;return r!==F&&console.warn("Failed to hydrate: ",r),!1===t.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),pe(),n.textContent="",ee(!1),lt(e,t)}finally{ee(r),te(i)}}const ut=new Map;function ft(e,{target:t,anchor:n,props:i={},events:o,context:a,intro:s=!0,transformError:l}){pe();var c=void 0,u=function(e){In.ensure();const t=Er(524352,e);return(e={})=>new Promise(n=>{e.outro?jr(t,()=>{Nr(t),n(void 0)}):(Nr(t),n(void 0))})}(()=>{var s=n??t.appendChild(ge());!function(e,t,n,r){new at(e,t,n,r)}(s,{pending:()=>{}},t=>{if(Y({}),a&&(H.c=a),o&&(i.$$events=o),Q&&Qe(t,null),c=e(t,i)||{},Q&&(Qn.nodes.end=K,null===K||8!==K.nodeType||"]"!==K.data))throw X(),F;B()},l);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=De(r);for(const e of[t,document]){var o=ut.get(e);void 0===o&&(o=new Map,ut.set(e,o));var a=o.get(r);void 0===a?(e.addEventListener(r,ze,{passive:i}),o.set(r,1)):o.set(r,a+1)}}}};return f(r(He)),Ge.add(f),()=>{for(var e of u)for(const n of[t,document]){var r=ut.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,ze),r.delete(e),0===r.size&&ut.delete(n)):r.set(e,i)}Ge.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return dt.set(c,u),c}let dt=new WeakMap;function ht(e){var t=null!==zn&&2&zn.f?zn:null;null!==Qn&&(Qn.f|=O);return{ctx:H,deps:null,effects:null,equals:D,f:2050,fn:e,reactions:null,rv:0,v:U,wv:0,parent:t??Qn,ac:null}}function vt(e,t,n){let r=Qn;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=Fn(U),a=!zn,s=new Map;return function(e){Er(4718592,e)}(()=>{var t=Qn,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(wt)}catch(e){n.reject(e),wt()}var l=wn;if(a){if(0!==(t.f&C))var c=_t();if(r.b.is_rendered())s.get(l)?.reject(M),s.delete(l);else{for(const e of s.values())e.reject(M);s.clear()}s.set(l,n)}const u=(e,n=void 0)=>{c&&c(n===M);if(n!==M&&0===(t.f&E)){if(l.activate(),n)o.f|=A,Gn(o,n);else{0!==(o.f&A)&&(o.f^=A),Gn(o,e);for(const[e,t]of s){if(s.delete(e),e===l)break;t.reject(M)}}l.deactivate()}};n.promise.then(u,e=>u(null,e||"unknown"))}),Sr(()=>{for(const e of s.values())e.reject(M)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function pt(e){const t=ht(e);return nr(t),t}function gt(e){var t,n=Qn;er(function(e){for(var t=e.parent;null!==t;){if(!(2&t.f))return 0===(t.f&E)?t:null;t=t.parent}return null}(e));try{e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)Nr(t[n])}}(e),t=hr(e)}finally{er(n)}return t}function mt(e){var t=gt(e);e.equals(t)||(e.wv=ur(),wn?.is_fork&&null!==e.deps||(e.v=t,null!==e.deps))?Zn||(null!==_n?(Cr()||wn?.is_fork)&&_n.set(e,t):Oe(e)):xe(e,b)}function yt(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&gr(t)}function bt(e,t,n,r){const i=ht;var o=e.filter(e=>!e.settled);if(0!==n.length||0!==o.length){var a,s,l,c,u=Qn,f=(a=Qn,s=zn,l=H,c=wn,function(e=!0){er(a),Kn(s),G(l),e&&0===(a.f&E)&&(c?.activate(),c?.apply())}),d=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null;if(0!==n.length){var h=_t();d?d.then(()=>{f(),p(),wt()}):p()}else d.then(()=>v(t.map(i)))}else r(t.map(i));function v(e){f();try{r(e)}catch(e){0===(u.f&E)&&Se(e,u)}wt()}function p(){Promise.all(n.map(e=>vt(e))).then(e=>v([...t.map(i),...e])).catch(e=>Se(e,u)).finally(()=>h())}}function wt(e=!0){er(null),Kn(null),G(null),e&&wn?.deactivate()}function _t(){var e=Qn.b,t=wn,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}class $t{anchor;#E=new Map;#C=new Map;#S=new Map;#k=new Set;#x=!0;constructor(e,t=!0){this.anchor=e,this.#x=t}#O=e=>{if(this.#E.has(e)){var t=this.#E.get(e),n=this.#C.get(t);if(n)Ur(n,!0),this.#k.delete(t);else{var r=this.#S.get(t);r&&(this.#C.set(t,r.effect),this.#S.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#E){if(this.#E.delete(t),t===e)break;const r=this.#S.get(n);r&&(Nr(r.effect),this.#S.delete(n))}for(const[e,r]of this.#C){if(e===t||this.#k.has(e))continue;const i=()=>{if(Array.from(this.#E.values()).includes(e)){var t=document.createDocumentFragment();qr(r,t),t.append(ge()),this.#S.set(e,{effect:r,fragment:t})}else Nr(r);this.#k.delete(e),this.#C.delete(e)};this.#x||!n?(this.#k.add(e),jr(r,i,!1)):i()}}};#I=e=>{this.#E.delete(e);const t=Array.from(this.#E.values());for(const[e,n]of this.#S)t.includes(e)||(Nr(n.effect),this.#S.delete(e))};ensure(e,t){var n=wn;!t||this.#C.has(e)||this.#S.has(e)||this.#C.set(e,Pr(()=>t(this.anchor)));this.#E.set(n,e),Q&&(this.anchor=K),this.#O(n)}}function Et(e,t,n=!1){var r;Q&&(r=K,ne());var i=new $t(e);function o(e,t){if(Q){var n=ae(r);if(e!==parseInt(n.substring(1))){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,t),void ee(!0)}}i.ensure(e,t)}Ar(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?k:0)}const Ct=Symbol("NaN");function St(e,t,n=!1,r=!1,i=!1,o=!1){var a=e,s="";if(n){var l=e;Q&&(a=te(me(l)))}Tr(()=>{var e=Qn;if(s!==(s=t()??"")){if(n&&!Q)return e.nodes=null,l.innerHTML=s,void(""!==s&&Qe(me(l),l.lastChild));if(null!==e.nodes&&(Dr(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){if(Q){K.data;for(var o=ne(),c=o;null!==o&&(8!==o.nodeType||""!==o.data);)c=o,o=ye(o);if(null===o)throw X(),F;return Qe(K,c),void(a=te(o))}var u=$e(r?"svg":i?"math":"template",r?"http://www.w3.org/2000/svg":i?"http://www.w3.org/1998/Math/MathML":void 0);u.innerHTML=s;var f=r||i?u:u.content;if(Qe(me(f),f.lastChild),r||i)for(;me(f);)a.before(me(f));else a.before(f)}}else Q&&ne()})}function kt(e,t){var n,r=void 0;Rr(()=>{r!==(r=t())&&(n&&(Nr(n),n=null),r&&(n=Pr(()=>{Or(()=>r(e))})))})}function xt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ot(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xt(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const It=[..." \t\n\r\f \v\ufeff"];function Tt(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];null!=o&&""!==o&&(r+=" "+i+": "+o+n)}return r}function At(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function Rt(e,t,n,r,i,o){var a=e.__className;if(Q||a!==n||void 0===a){var s=function(e,t,n){var r=null==e?"":""+e;if(n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,a=0;(a=r.indexOf(i,a))>=0;){var s=a+o;0!==a&&!It.includes(r[a-1])||s!==r.length&&!It.includes(r[s])?a=s:r=(0===a?"":r.substring(0,a))+r.substring(s+1)}return""===r?null:r}(n,0,o);Q&&s===e.getAttribute("class")||(null==s?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e.__className=n}else if(o&&i!==o)for(var l in o){var c=!!o[l];null!=i&&c===!!i[l]||e.classList.toggle(l,c)}return o}function Pt(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(null==n[i]?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Lt(e,t,n,r){var i=e.__style;if(Q||i!==t){var o=function(e,t){if(t){var n,r,i="";if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(At)),r&&l.push(...Object.keys(r).map(At));var c=0,u=-1;const t=e.length;for(var f=0;f<t;f++){var d=e[f];if(s?"/"===d&&"*"===e[f-1]&&(s=!1):o?o===d&&(o=!1):"/"===d&&"*"===e[f+1]?s=!0:'"'===d||"'"===d?o=d:"("===d?a++:")"===d&&a--,!s&&!1===o&&0===a)if(":"===d&&-1===u)u=f;else if(";"===d||f===t-1){if(-1!==u){var h=At(e.substring(c,u).trim());l.includes(h)||(";"!==d&&f++,i+=" "+e.substring(c,f).trim()+";")}c=f+1,u=-1}}}return n&&(i+=Tt(n)),r&&(i+=Tt(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);Q&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else r&&(Array.isArray(r)?(Pt(e,n?.[0],r[0]),Pt(e,n?.[1],r[1],"important")):Pt(e,n,r));return r}function Mt(t,n,r=!1){if(t.multiple){if(null==n)return;if(!e(n))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var i of t.options)i.selected=n.includes(Nt(i))}else{for(i of t.options){if(ce(Nt(i),n))return void(i.selected=!0)}r&&void 0===n||(t.selectedIndex=-1)}}function Nt(e){return"__value"in e?e.__value:e.value}const Dt=Symbol("class"),Vt=Symbol("style"),jt=Symbol("is custom element"),Ft=Symbol("is html"),Ut=N?"link":"LINK",qt=N?"input":"INPUT",Ht=N?"option":"OPTION",Gt=N?"select":"SELECT",Yt=N?"progress":"PROGRESS";function Bt(e){if(Q){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Zt(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var r=e.checked;Zt(e,"checked",null),e.checked=r}}};e.__on_r=n,W(n),Fe()}}function Jt(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Zt(e,t,n,r){var i=zt(e);Q&&(i[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===Ut)||i[t]!==(i[t]=n)&&("loading"===t&&(e[L]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Kt(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wt(e,t,n=[],r=[],i=[],o,a=!1,s=!1){bt(i,n,r,n=>{var r=void 0,i={},o=e.nodeName===Gt,l=!1;if(Rr(()=>{var c=t(...n.map(yr)),u=function(e,t,n,r,i=!1){if(Q&&i&&e.nodeName===qt){var o=e;("checkbox"===o.type?"defaultChecked":"defaultValue")in n||Bt(o)}var a=zt(e),s=a[jt],l=!a[Ft];let c=Q&&s;c&&ee(!1);var u=t||{},f=e.nodeName===Ht;for(var d in t)d in n||(n[d]=null);n.class?n.class=Ot(n.class):n[Dt]&&(n.class=null),n[Vt]&&(n.style??=null);var h=Kt(e);for(const r in n){let i=n[r];if(f&&"value"===r&&null==i)e.value=e.__value="",u[r]=i;else if("class"!==r)if("style"!==r){var v=u[r];if(i!==v||void 0===i&&e.hasAttribute(r)){u[r]=i;var p=r[0]+r[1];if("$$"!==p)if("on"===p){const t={},n="$$"+r;let o=r.slice(2);var g=Pe(o);if(Ae(o)&&(o=o.slice(0,-7),t.capture=!0),!g&&v){if(null!=i)continue;e.removeEventListener(o,u[n],t),u[n]=null}if(g)Je(o,e,i),Ze([o]);else if(null!=i){let i=function(e){u[r].call(this,e)};u[n]=Ye(o,e,i,t)}}else if("style"===r)Zt(e,r,i);else if("autofocus"===r)Ve(e,Boolean(i));else if(s||"__value"!==r&&("value"!==r||null==i))if("selected"===r&&f)Jt(e,i);else{var m=r;l||(m=Me(m));var y="defaultValue"===m||"defaultChecked"===m;if(null!=i||s||y)y||h.includes(m)&&(s||"string"!=typeof i)?(e[m]=i,m in a&&(a[m]=U)):"function"!=typeof i&&Zt(e,m,i);else if(a[r]=null,"value"===m||"checked"===m){let n=e;const r=void 0===t;if("value"===m){let e=n.defaultValue;n.removeAttribute(m),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(m),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(r)}else e.value=e.__value=i}}else Lt(e,i,t?.[Vt],n[Vt]),u[r]=i,u[Vt]=n[Vt];else Rt(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,i,0,t?.[Dt],n[Dt]),u[r]=i,u[Dt]=n[Dt]}return c&&ee(!0),u}(e,r,c,0,a,s);l&&o&&"value"in c&&Mt(e,c.value);for(let e of Object.getOwnPropertySymbols(i))c[e]||Nr(i[e]);for(let t of Object.getOwnPropertySymbols(c)){var f=c[t];"@attach"!==t.description||r&&f===r[t]||(i[t]&&Nr(i[t]),i[t]=Pr(()=>kt(e,()=>f))),u[t]=f}r=u}),o){var c=e;Or(()=>{Mt(c,r.value,!0),function(e){var t=new MutationObserver(()=>{Mt(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sr(()=>{t.disconnect()})}(c)})}l=!0})}function zt(e){return e.__attributes??={[jt]:e.nodeName.includes("-"),[Ft]:e.namespaceURI===q}}var Xt=new Map;function Kt(e){var t,n=e.getAttribute("is")||e.nodeName,r=Xt.get(n);if(r)return r;Xt.set(n,r=[]);for(var i=e,o=Element.prototype;o!==i;){for(var a in t=s(i))t[a].set&&r.push(a);i=u(i)}return r}function Qt(e,t,n=t){var r=new WeakSet;!function(e,t,n,r=n){e.addEventListener(t,()=>Ue(n));const i=e.__on_r;e.__on_r=i?()=>{i(),r(!0)}:()=>r(!0),Fe()}(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=en(e)?tn(o):o,n(o),null!==wn&&r.add(wn),await mr(),o!==(o=t())){var a=e.selectionStart,s=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==s){var c=e.value.length;a===s&&s===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(s,c))}}}),(Q&&e.defaultValue!==e.value||null==_r(t)&&e.value)&&(n(en(e)?tn(e.value):e.value),null!==wn&&r.add(wn)),Ir(()=>{var n=t();if(e===document.activeElement){var i=wn;if(r.has(i))return}en(e)&&n===tn(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function en(e){var t=e.type;return"number"===t||"range"===t}function tn(e){return""===e?null:+e}function nn(e,t){return e===t||e?.[R]===t}function rn(e={},t,n,r){var i=H.r,o=Qn;return Or(()=>{var r,a;return Ir(()=>{r=a,a=[],_r(()=>{e!==n(...a)&&(t(e,...a),r&&nn(n(...r),e)&&t(null,...r))})}),()=>{let r=o;for(;r!==i&&null!==r.parent&&r.parent.f&S;)r=r.parent;const s=r.teardown;r.teardown=()=>{a&&nn(n(...a),e)&&t(null,...a),s?.()}}}),e}const on={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function an(e,t,n){return new Proxy({props:e,exclude:t},on)}function sn(e,t,n,r){var i,o=r,a=!0,s=()=>(a&&(a=!1,o=r),o);void 0===e[t]&&void 0!==r&&s(),i=()=>{var n=e[t];return void 0===n?s():(a=!0,n)};var l=!1,c=ht(()=>(l=!1,i())),u=Qn;return function(e,t){if(arguments.length>0){const n=t?yr(c):e;return Hn(c,n),l=!0,void 0!==o&&(o=n),e}return Zn&&l||0!==(u.f&E)?c.v:yr(c)}}class ln{#T;#A;constructor(e){var t=new Map,n=(e,n)=>{var r=qn(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>yr(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===P||(yr(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(Hn(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#A=(e.hydrate?ct:lt)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),e?.props?.$$host&&!1!==e.sync||Tn(),this.#T=r.$$events;for(const e of Object.keys(this.#A))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&o(this,e,{get(){return this.#A[e]},set(t){this.#A[e]=t},enumerable:!0});this.#A.$set=e=>{Object.assign(r,e)},this.#A.$destroy=()=>{!function(e,t){const n=dt.get(e);n?(dt.delete(e),n(t)):Promise.resolve()}(this.#A)}}$set(e){this.#A.$set(e)}$on(e,t){this.#T[e]=this.#T[e]||[];const n=(...e)=>t.call(this,...e);return this.#T[e].push(n),()=>{this.#T[e]=this.#T[e].filter(e=>e!==n)}}$destroy(){this.#A.$destroy()}}let cn=class{};function un(e,t,n,r){const i=n[e]?.type;if(t="Boolean"===i&&"boolean"!=typeof t?null!=t:t,!r||!n[e])return t;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function fn(e,t,n,r,s,l){let c=class extends cn{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return i(t).map(e=>(t[e].attribute||e).toLowerCase())}};return i(t).forEach(e=>{o(c.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=un(e,n,t),this.$$d[e]=n;var r=this.$$c;if(r){var i=a(r,e)?.get;i?r[e]=n:r.$set({[e]:n})}}})}),r.forEach(e=>{o(c.prototype,e,{get(){return this.$$c?.[e]}})}),e.element=c,c}function dn(e){null===H&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),kr(()=>{const t=_r(e);if("function"==typeof t)return t})}function hn(e,t,n){if(null==e)return t(void 0),d;const r=_r(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}"function"==typeof HTMLElement&&(cn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(e){return t=>{const n=$e("slot");"default"!==e&&(n.name=e),ot(t,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=function(e){const t={};return e.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}(this);for(const e of this.$$s)e in r&&("default"!==e||this.$$d.children?n[e]=t(e):(this.$$d.children=t(e),n.default=!0));for(const e of this.attributes){const t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=un(t,e.value,this.$$p_d,"toProp"))}for(const e in this.$$p_d)e in this.$$d||void 0===this[e]||(this.$$d[e]=this[e],delete this[e]);this.$$c=(e={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new ln(e)),this.$$me=function(e){In.ensure();const t=Er(524352,e);return()=>{Nr(t)}}(()=>{Ir(()=>{this.$$r=!0;for(const e of i(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];const t=un(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(const e in this.$$l)for(const t of this.$$l[e]){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}var e}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=un(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return i(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});const vn=[];function pn(e,t=d){let n=null;const r=new Set;function i(t){if(V(e,t)&&(e=t,n)){const t=!vn.length;for(const t of r)t[1](),vn.push(t,e);if(t){for(let e=0;e<vn.length;e+=2)vn[e][0](vn[e+1]);vn.length=0}}}function o(t){i(t(e))}return{set:i,update:o,subscribe:function(a,s=d){const l=[a,s];return r.add(l),1===r.size&&(n=t(i,o)||d),a(e),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function gn(e){let t;return hn(e,e=>t=e)(),t}let mn=Symbol();function yn(e,t,n){const r=n[t]??={store:null,source:qn(void 0),unsubscribe:d};if(r.store!==e&&!(mn in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=d;else{var i=!0;r.unsubscribe=hn(e,e=>{i?r.source.v=e:Hn(r.source,e)}),i=!1}return e&&mn in n?gn(e):yr(r.source)}const bn=new Set;let wn=null,_n=null,$n=null,En=!1,Cn=!1,Sn=null,kn=null;var xn=0;let On=1;class In{id=On++;current=new Map;previous=new Map;#R=new Set;#P=new Set;#L=0;#M=0;#N=null;#D=[];#d=new Set;#h=new Set;#V=new Map;is_fork=!1;#j=!1;#F(){return this.is_fork||this.#M>0}skip_effect(e){this.#V.has(e)||this.#V.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#V.get(e);if(t){for(var n of(this.#V.delete(e),t.d))xe(n,w),this.schedule(n);for(n of t.m)xe(n,_),this.schedule(n)}}#U(){xn++>1e3&&function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Se(e,$n)}}();const e=this.#D;this.#D=[],this.apply();var t=Sn=[],n=[],r=kn=[];for(const r of e)this.#q(r,t,n);if(wn=null,r.length>0){var i=In.ensure();for(const e of r)i.schedule(e)}if(Sn=null,kn=null,this.#F()){this.#H(n),this.#H(t);for(const[e,t]of this.#V)Nn(e,t)}else{this.#d.clear(),this.#h.clear();for(const e of this.#R)e(this);this.#R.clear(),Rn(n),Rn(t),0===this.#L&&this.#O(),this.#N?.resolve()}var o=wn;if(this.#D.length>0){const e=o??=this;e.#D.push(...this.#D.filter(t=>!e.#D.includes(t)))}null!==o&&(bn.add(o),o.#U())}#q(e,t,n){e.f^=b;for(var r=e.first;null!==r;){var i=r.f,o=!!(96&i);if(!(o&&0!==(i&b)||0!==(i&$)||this.#V.has(r))&&null!==r.fn){o?r.f^=b:4&i?t.push(r):fr(r)&&(0!==(i&p)&&this.#h.add(r),gr(r));var a=r.first;if(null!==a){r=a;continue}}for(;null!==r;){var s=r.next;if(null!==s){r=s;break}r=r.parent}}}#H(e){for(var t=0;t<e.length;t+=1)Te(e[t],this.#d,this.#h)}capture(e,t){t===U||this.previous.has(e)||this.previous.set(e,t),0===(e.f&A)&&(this.current.set(e,e.v),_n?.set(e,e.v))}activate(){wn=this}deactivate(){wn=null,_n=null}flush(){try{if(Cn=!0,wn=this,!this.#F()){for(const e of this.#d)this.#h.delete(e),xe(e,w),this.schedule(e);for(const e of this.#h)xe(e,_),this.schedule(e)}this.#U()}finally{xn=0,$n=null,Sn=null,kn=null,Cn=!1,wn=null,_n=null,Vn.clear()}}discard(){for(const e of this.#P)e(this);this.#P.clear()}#O(){if(bn.size>1){this.previous.clear();var e=wn,t=_n,n=!0;for(const e of bn){if(e===this){n=!1;continue}const t=[];for(const[r,i]of this.current){if(e.current.has(r)){if(!n||i===e.current.get(r))continue;e.current.set(r,i)}t.push(r)}if(0===t.length)continue;const r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){e.activate();const n=new Set,i=new Map;for(const e of t)Pn(e,r,n,i);if(e.#D.length>0){e.apply();for(const t of e.#D)e.#q(t,[],[])}e.deactivate()}}wn=e,_n=t}this.#V.clear(),bn.delete(this)}increment(e){this.#L+=1,e&&(this.#M+=1)}decrement(e,t){this.#L-=1,e&&(this.#M-=1),this.#j||t||(this.#j=!0,W(()=>{this.#j=!1,this.flush()}))}oncommit(e){this.#R.add(e)}ondiscard(e){this.#P.add(e)}settled(){return(this.#N??=h()).promise}static ensure(){if(null===wn){const e=wn=new In;Cn||(bn.add(wn),En||W(()=>{wn===e&&e.flush()}))}return wn}apply(){}schedule(e){if($n=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&C))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===Sn||t!==Qn||null!==zn&&2&zn.f))return;if(96&n){if(0===(n&b))return;t.f^=b}}this.#D.push(t)}}}function Tn(e){var t=En;En=!0;try{for(;;){if(z(),null===wn)return;wn.flush()}}finally{En=t}}let An=null;function Rn(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&fr(r)&&(An=new Set,gr(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&Vr(r),An?.size>0)){Vn.clear();for(const e of An){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)An.has(n)&&(An.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||gr(n)}}An.clear()}}An=null}}function Pn(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const i of e.reactions){const e=i.f;2&e?Pn(i,t,n,r):4194320&e&&0===(e&w)&&Ln(i,t,r)&&(xe(i,w),Mn(i))}}function Ln(e,t,r){const i=r.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(n.call(t,i))return!0;if(2&i.f&&Ln(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Mn(e){wn.schedule(e)}function Nn(e,t){if(0===(e.f&g)||0===(e.f&b)){0!==(e.f&w)?t.d.push(e):0!==(e.f&_)&&t.m.push(e),xe(e,b);for(var n=e.first;null!==n;)Nn(n,t),n=n.next}}let Dn=new Set;const Vn=new Map;let jn=!1;function Fn(e,t){return{f:0,v:e,reactions:null,equals:D,rv:0,wv:0}}function Un(e,t){const n=Fn(e);return nr(n),n}function qn(e,t=!1,n=!0){const r=Fn(e);return t||(r.equals=j),r}function Hn(e,t,r=!1){return null===zn||Xn&&0===(zn.f&x)||!(4325394&zn.f)||null!==tr&&n.call(tr,e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Gn(e,r?se(t):t,kn)}function Gn(e,t,n=null){if(!e.equals(t)){var r=e.v;Zn?Vn.set(e,t):Vn.set(e,r),e.v=t;var i=In.ensure();if(i.capture(e,r),2&e.f){const t=e;0!==(e.f&w)&>(t),Oe(t)}e.wv=ur(),Bn(e,w,n),null===Qn||0===(Qn.f&b)||96&Qn.f||(null===or?function(e){or=e}([e]):or.push(e)),!i.is_fork&&Dn.size>0&&!jn&&function(){jn=!1;for(const e of Dn)0!==(e.f&b)&&xe(e,_),fr(e)&&gr(e);Dn.clear()}()}return t}function Yn(e){Hn(e,e.v+1)}function Bn(e,t,n){var r=e.reactions;if(null!==r)for(var i=r.length,o=0;o<i;o++){var a=r[o],s=a.f,l=0===(s&w);if(l&&xe(a,t),2&s){var c=a;_n?.delete(c),0===(s&I)&&(s&y&&(a.f|=I),Bn(c,_,n))}else if(l){var u=a;0!==(s&p)&&null!==An&&An.add(u),null!==n?n.push(u):Mn(u)}}}let Jn=!1,Zn=!1;function Wn(e){Zn=e}let zn=null,Xn=!1;function Kn(e){zn=e}let Qn=null;function er(e){Qn=e}let tr=null;function nr(e){null!==zn&&(null===tr?tr=[e]:tr.push(e))}let rr=null,ir=0,or=null;let ar=1,sr=0,lr=sr;function cr(e){lr=e}function ur(){return++ar}function fr(e){var t=e.f;if(0!==(t&w))return!0;if(2&t&&(e.f&=-65537),0!==(t&_)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(fr(o)&&mt(o),o.wv>e.wv)return!0}0!==(t&y)&&null===_n&&xe(e,b)}return!1}function dr(e,t,r=!0){var i=e.reactions;if(null!==i&&(null===tr||!n.call(tr,e)))for(var o=0;o<i.length;o++){var a=i[o];2&a.f?dr(a,t,!1):t===a&&(r?xe(a,w):0!==(a.f&b)&&xe(a,_),Mn(a))}}function hr(e){var t=rr,n=ir,r=or,i=zn,o=tr,a=H,s=Xn,l=lr,c=e.f;rr=null,ir=0,or=null,zn=96&c?null:e,tr=null,G(e.ctx),Xn=!1,lr=++sr,null!==e.ac&&(Ue(()=>{e.ac.abort(M)}),e.ac=null);try{e.f|=T;var u=(0,e.fn)();e.f|=C;var f=e.deps,d=wn?.is_fork;if(null!==rr){var h;if(d||pr(e,ir),null!==f&&ir>0)for(f.length=ir+rr.length,h=0;h<rr.length;h++)f[ir+h]=rr[h];else e.deps=f=rr;if(Cr()&&0!==(e.f&y))for(h=ir;h<f.length;h++)(f[h].reactions??=[]).push(e)}else!d&&null!==f&&ir<f.length&&(pr(e,ir),f.length=ir);if(!(null===or||Xn||null===f||6146&e.f))for(h=0;h<or.length;h++)dr(or[h],e);if(null!==i&&i!==e){if(sr++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=sr;if(null!==t)for(const e of t)e.rv=sr;null!==or&&(null===r?r=or:r.push(...or))}return 0!==(e.f&A)&&(e.f^=A),u}catch(e){return Ce(e)}finally{e.f^=T,rr=t,ir=n,or=r,zn=i,tr=o,G(a),Xn=s,lr=l}}function vr(e,r){let i=r.reactions;if(null!==i){var o=t.call(i,e);if(-1!==o){var a=i.length-1;0===a?i=r.reactions=null:(i[o]=i[a],i.pop())}}if(null===i&&2&r.f&&(null===rr||!n.call(rr,r))){var s=r;0!==(s.f&y)&&(s.f^=y,s.f&=-65537),Oe(s),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(M),t.teardown=d,t.ac=null,pr(t,0),Mr(t))}(s),pr(s,0)}}function pr(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)vr(e,n[r])}function gr(e){var t=e.f;if(0===(t&E)){xe(e,b);var n=Qn,r=Jn;Qn=e,Jn=!0;try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&g)&&Nr(t),t=n}}(e):Mr(e),Lr(e);var i=hr(e);e.teardown="function"==typeof i?i:null,e.wv=ar}finally{Jn=r,Qn=n}}}async function mr(){await Promise.resolve(),Tn()}function yr(e){var t=!!(2&e.f);if(null!==zn&&!Xn&&!(null!==Qn&&0!==(Qn.f&E)||null!==tr&&n.call(tr,e))){var r=zn.deps;if(0!==(zn.f&T))e.rv<sr&&(e.rv=sr,null===rr&&null!==r&&r[ir]===e?ir++:null===rr?rr=[e]:rr.push(e));else{(zn.deps??=[]).push(e);var i=e.reactions;null===i?e.reactions=[zn]:n.call(i,zn)||i.push(zn)}}if(Zn&&Vn.has(e))return Vn.get(e);if(t){var o=e;if(Zn){var a=o.v;return(0===(o.f&b)&&null!==o.reactions||wr(o))&&(a=gt(o)),Vn.set(o,a),a}var s=0===(o.f&y)&&!Xn&&null!==zn&&(Jn||0!==(zn.f&y)),l=0===(o.f&C);fr(o)&&(s&&(o.f|=y),mt(o)),s&&!l&&(yt(o),br(o))}if(_n?.has(e))return _n.get(e);if(0!==(e.f&A))throw e.v;return e.v}function br(e){if(e.f|=y,null!==e.deps)for(const t of e.deps)(t.reactions??=[]).push(e),2&t.f&&0===(t.f&y)&&(yt(t),br(t))}function wr(e){if(e.v===U)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(Vn.has(t))return!0;if(2&t.f&&wr(t))return!0}return!1}function _r(e){var t=Xn;try{return Xn=!0,e()}finally{Xn=t}}function $r(e){null===Qn&&(null===zn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),Zn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Er(e,t){var n=Qn;null!==n&&0!==(n.f&$)&&(e|=$);var r={ctx:H,deps:null,nodes:null,f:e|w|y,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(4&e)null!==Sn?Sn.push(r):In.ensure().schedule(r);else if(null!==t){try{gr(r)}catch(e){throw Nr(r),e}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&O)&&(i=i.first,0!==(e&p)&&0!==(e&k)&&null!==i&&(i.f|=k))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==zn&&2&zn.f&&0===(e&m))){var o=zn;(o.effects??=[]).push(i)}return r}function Cr(){return null!==zn&&!Xn}function Sr(e){const t=Er(8,null);return xe(t,b),t.teardown=e,t}function kr(e){$r();var t=Qn.f;if(!(!zn&&0!==(t&g)&&0===(t&C)))return xr(e);var n=H;(n.e??=[]).push(e)}function xr(e){return Er(1048580,e)}function Or(e){return Er(4,e)}function Ir(e,t=0){return Er(8|t,e)}function Tr(e,t=[],n=[],r=[]){bt(r,t,n,t=>{Er(8,()=>e(...t.map(yr)))})}function Ar(e,t=0){return Er(p|t,e)}function Rr(e,t=0){return Er(v|t,e)}function Pr(e){return Er(524320,e)}function Lr(e){var t=e.teardown;if(null!==t){const e=Zn,n=zn;Wn(!0),Kn(null);try{t.call(null)}finally{Wn(e),Kn(n)}}}function Mr(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Ue(()=>{e.abort(M)});var r=n.next;0!==(n.f&m)?n.parent=null:Nr(n,t),n=r}}function Nr(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(Dr(e.nodes.start,e.nodes.end),n=!0),xe(e,S),Mr(e,t&&!n),pr(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();Lr(e),e.f^=S,e.f|=E;var i=e.parent;null!==i&&null!==i.first&&Vr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Dr(e,t){for(;null!==e;){var n=e===t?null:ye(e);e.remove(),e=n}}function Vr(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function jr(e,t,n=!0){var r=[];Fr(e,r,!0);var i=()=>{n&&Nr(e),t&&t()},o=r.length;if(o>0){var a=()=>--o||i();for(var s of r)s.out(a)}else i()}function Fr(e,t,n){if(0===(e.f&$)){e.f^=$;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var o=i.next;Fr(i,t,!!(0!==(i.f&k)||0!==(i.f&g)&&0!==(e.f&p))&&n),i=o}}}function Ur(e,t){if(0!==(e.f&$)){e.f^=$,0===(e.f&b)&&(xe(e,w),In.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;Ur(n,!!(0!==(n.f&k)||0!==(n.f&g))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function qr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:ye(n);t.append(n),n=i}}function Hr(e){const t={get:e=>gn(t.store)[e],set:(e,n)=>{"string"==typeof e?Object.assign(gn(t.store),{[e]:n}):Object.assign(gn(t.store),e),t.store.set(gn(t.store))},store:pn(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:Hr({}),i18n:Hr({}),instances:new Set,plugins:new Set};const Gr={ariaLinkLabel:"Visit Altcha.org",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};"$altcha"in globalThis&&globalThis.$altcha.i18n.set("en",Gr);"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");var Yr=et('<label class="altcha-checkbox"><input/> <svg width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></label>');function Br(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Yr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(4),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(Br,{loading:{}},[],[],{mode:"open"});var Jr=et('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function Zr(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Jr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(2),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(Zr,{loading:{}},[],[],{mode:"open"});var Wr=et('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>');function zr(e,t){Y(t,!0);let n=sn(t,"strings");var r={get strings(){return n()},set strings(e){n(e),Tn()}},i=Wr(),o=be(i);return Zt(o,"href","https://altcha.org"),re(i),Tr(()=>Zt(o,"aria-label",n().ariaLinkLabel)),ot(e,i),B(r)}fn(zr,{strings:{}},[],[],{mode:"open"});var Xr=et('<div class="altcha-footer"><div></div> <!></div>');function Kr(e,t){Y(t,!0);let n=sn(t,"logo"),r=sn(t,"strings");var i={get logo(){return n()},set logo(e){n(e),Tn()},get strings(){return r()},set strings(e){r(e),Tn()}},o=Xr(),a=be(o);St(a,()=>r().footer,!0),re(a);var s=_e(a,2),l=e=>{zr(e,{get strings(){return r()}})};return Et(s,e=>{n()&&e(l)}),re(o),ot(e,o),B(i)}fn(Kr,{logo:{},strings:{}},[],[],{mode:"open"});var Qr=et('<label class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></label>');function ei(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Qr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(2),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(ei,{loading:{}},[],[],{mode:"open"});var ti=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ti||{}),ni=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(ni||{}),ri=et('<div class="altcha-code-challenge-title"> </div>'),ii=et('<div class="altcha-spinner"></div>'),oi=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),ai=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),si=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),li=et('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),ci=et('<audio hidden="" autoplay=""></audio>'),ui=et('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function fi(e,t){Y(t,!0);let n=sn(t,"audioUrl"),r=sn(t,"codeChallenge"),i=sn(t,"config"),o=sn(t,"imageUrl"),a=sn(t,"onCancel"),s=sn(t,"onReload"),l=sn(t,"onSubmit"),c=sn(t,"strings"),u=Un(void 0),f=Un(void 0),d=Un(void 0),h=Un(!1),v=Un(""),p=Un(!1);function g(){Hn(u,ti.PAUSED,!0)}function m(e){Hn(u,ti.ERROR,!0)}function y(){Hn(u,ti.READY,!0)}function b(){Hn(u,ti.LOADING,!0)}function w(){Hn(u,ti.PLAYING,!0)}function _(){Hn(u,ti.PAUSED,!0)}function $(){yr(f)?yr(u)===ti.LOADING||(yr(f).paused?(n()&&yr(f).src!==n()&&(yr(f).src=n()),yr(f).currentTime=0,yr(f).play()):yr(f).pause()):(Hn(p,!0),requestAnimationFrame(()=>{yr(f)&&n()&&(yr(f).src=n(),yr(f).play())}))}dn(()=>(i().disableAutoFocus||mr().then(()=>{yr(d)?.focus()}),()=>{yr(f)&&(yr(f).pause(),Hn(f,void 0))}));var E={get audioUrl(){return n()},set audioUrl(e){n(e),Tn()},get codeChallenge(){return r()},set codeChallenge(e){r(e),Tn()},get config(){return i()},set config(e){i(e),Tn()},get imageUrl(){return o()},set imageUrl(e){o(e),Tn()},get onCancel(){return a()},set onCancel(e){a(e),Tn()},get onReload(){return s()},set onReload(e){s(e),Tn()},get onSubmit(){return l()},set onSubmit(e){l(e),Tn()},get strings(){return c()},set strings(e){c(e),Tn()}},C=ui(),S=be(C),k=be(S),x=e=>{var t=ri(),n=be(t,!0);re(t),Tr(()=>st(n,c().verificationRequired)),ot(e,t)};Et(k,e=>{"standard"!==i().codeChallengeDisplay&&e(x)});var O=_e(k,2),I=be(O,!0);re(O);var T=_e(O,2),A=_e(T,2),R=be(A);Bt(R),R.disabled=yr(h),rn(R,e=>Hn(d,e),()=>yr(d));var P=_e(R,2),L=e=>{var t=li(),n=be(t),r=e=>{ot(e,ii())},i=e=>{ot(e,oi())},o=e=>{ot(e,ai())},a=e=>{ot(e,si())};Et(n,e=>{yr(u)===ti.LOADING?e(r):yr(u)===ti.ERROR?e(i,1):yr(u)===ti.PLAYING?e(o,2):e(a,-1)}),re(t),Tr(()=>{Zt(t,"title",c().getAudioChallenge),t.disabled=yr(u)===ti.LOADING||yr(u)===ti.ERROR,Zt(t,"aria-label",yr(u)===ti.LOADING?c().loading:c().getAudioChallenge)}),Je("click",t,()=>$()),ot(e,t)};Et(P,e=>{r().audio&&e(L)});var M=_e(P,2);re(A);var N=_e(A,2),D=be(N),V=be(D,!0);re(D);var j=_e(D,2),F=be(j,!0);re(j),re(N),re(S);var U=_e(S,2),q=e=>{var t=ci();rn(t,e=>Hn(f,e),()=>yr(f)),Be("error",t,m),Be("loadstart",t,b),Be("canplay",t,y),Be("pause",t,_),Be("playing",t,w),Be("ended",t,g),ot(e,t)};return Et(U,e=>{yr(p)&&e(q)}),re(C),Tr(()=>{st(I,c().enterCodeFromImage),Zt(T,"src",o()),Zt(R,"minlength",r().length||1),Zt(R,"maxlength",r().length),Zt(R,"placeholder",c().enterCode),Zt(R,"aria-label",yr(u)===ti.LOADING?c().loading:yr(u)===ti.PLAYING?"":c().enterCodeAria),Zt(R,"aria-live",yr(u)?"assertive":"polite"),Zt(R,"aria-busy",yr(u)===ti.LOADING),Zt(M,"title",c().reload),Zt(M,"aria-label",c().reload),Zt(D,"aria-label",c().verify),st(V,c().verify),Zt(j,"aria-label",c().cancel),st(F,c().cancel)}),Be("submit",S,function(e){e.preventDefault(),e.stopPropagation(),l()?.(yr(v))},!0),Je("keydown",R,function(e){"Space"===e.code?(e.preventDefault(),e.stopPropagation(),$()):"Escape"===e.code&&(e.preventDefault(),e.stopPropagation(),a()?.())}),Qt(R,()=>yr(v),e=>Hn(v,e)),Je("click",M,()=>s()?.()),Je("click",j,()=>a()?.()),ot(e,C),B(E)}Ze(["keydown","click"]),fn(fi,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var di=et('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),hi=et('<div class="altcha-popover-arrow"></div>'),vi=et('<div role="button" class="altcha-popover-close">×</div>'),pi=et('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function gi(e,t){Y(t,!0);let n=sn(t,"anchor"),r=sn(t,"children"),i=sn(t,"display",0,"standard"),o=sn(t,"backdrop",0,!1),a=sn(t,"onClickOutside"),s=sn(t,"onClickOutsideDelay",0,600),l=sn(t,"onClose"),c=sn(t,"placement",0,"auto"),u=sn(t,"variant",0,"neutral"),f=an(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","variant"]),h=Un(void 0),v=Un(void 0),p=Un(!1),g=Un(0);function m(){l()?.()}function y(){if(n()&&"auto"===c()&&yr(h)){const e=n().getBoundingClientRect(),t=document.documentElement.clientHeight-(e.top+e.height)<yr(h).clientHeight;yr(p)!==t&&Hn(p,t)}}kr(()=>{"auto"!==c()&&Hn(p,"top"===c())}),dn(()=>{const e="bottomsheet"===i()||"overlay"===i();return e&&(yr(v)&&document.body.append(yr(v)),yr(h)&&document.body.append(yr(h))),y(),mr().then(()=>{Hn(g,Date.now(),!0)}),()=>{e&&(yr(v)&&document.body.removeChild(yr(v)),yr(h)&&document.body.removeChild(yr(h)))}});var b={get anchor(){return n()},set anchor(e){n(e),Tn()},get children(){return r()},set children(e){r(e),Tn()},get display(){return i()},set display(e="standard"){i(e),Tn()},get backdrop(){return o()},set backdrop(e=!1){o(e),Tn()},get onClickOutside(){return a()},set onClickOutside(e){a(e),Tn()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay(e=600){s(e),Tn()},get onClose(){return l()},set onClose(e){l(e),Tn()},get placement(){return c()},set placement(e="auto"){c(e),Tn()},get variant(){return u()},set variant(e="neutral"){u(e),Tn()}},w=pi();Be("click",ue,function(e){const t=e.target;!yr(h)?.contains(t)&&yr(g)&&yr(g)+s()<Date.now()&&a()?.()}),Be("resize",ue,function(){y()}),Be("scroll",ue,function(){y()});var _=we(w),$=e=>{var t=di();rn(t,e=>Hn(v,e),()=>yr(v)),ot(e,t)};Et(_,e=>{o()&&e($)});var E=_e(_,2);Wt(E,()=>({...f,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":u(),"data-top":yr(p),"data-display":i()}));var C=be(E),S=e=>{ot(e,hi())};Et(C,e=>{"standard"===i()&&e(S)});var x=_e(C,2),O=e=>{var t=vi();Je("click",t,m),ot(e,t)};Et(x,e=>{"standard"!==i()&&e(O)});var I=_e(x,2);return function(e,t,...n){var r=new $t(e);Ar(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},k)}(be(I),()=>r()??d),re(I),re(E),rn(E,e=>Hn(h,e),()=>yr(h)),ot(e,w),B(b)}async function mi(e){const{challenge:t,concurrency:n=navigator.hardwareConcurrency,controller:r=new AbortController,createWorker:i,onOutOfMemory:o=e=>e>1?Math.floor(e/2):0,counterMode:a,timeout:s=9e4}=e,l=Math.min(16,Math.max(1,n)),c=[],u=()=>{for(const e of c)e.terminate()};for(let e=0;e<l;e++)c.push(await i(t.parameters.algorithm));let f=null;try{f=await Promise.race(c.map((e,n)=>(r.signal.addEventListener("abort",()=>{e.postMessage({type:"abort"})}),new Promise((r,i)=>{e.addEventListener("error",e=>{i(e)}),e.addEventListener("message",t=>{if(t.data){for(const t of c)t!==e&&t.postMessage({type:"abort"});if(t.data.error)return i(new Error(t.data.error))}r(t.data)}),e.postMessage({challenge:t,counterMode:a,counterStart:n,counterStep:l,timeout:s,type:"work"})}))))}catch(n){if(n instanceof Error&&!!n?.message?.includes("Out of memory")&&o){u();const n=o(l);if(n)return mi({...e,challenge:t,controller:r,concurrency:n,createWorker:i})}throw n}finally{u()}return r.signal.aborted?null:f||null}Ze(["click"]),fn(gi,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},variant:{}},[],[],{mode:"open"});class yi{TAG_CODES={INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10};maxSamples;sampleInterval;target;focusStartTime=0;focusInteraction=0;focusInteractionTimer=null;lastPointerSample=0;lastTouchSample=0;lastScrollSample=0;pendingPointer=null;pendingTouch=null;focus=[];pointer=[];scroll=[];touch=[];constructor(e={}){const{maxSamples:t=60,sampleInterval:n=50,target:r=window}=e;this.maxSamples=t,this.sampleInterval=n,this.target=r,this.attach()}destroy(){const e={capture:!0};this.target.removeEventListener("focusin",this.onFocus,e),this.target.removeEventListener("keydown",this.onInteraction,e),this.target.removeEventListener("pointerdown",this.onInteraction,e),this.target.removeEventListener("pointermove",this.onPointer,e),this.target.removeEventListener("scroll",this.onScroll,e),this.target.removeEventListener("touchmove",this.onTouchMove,e)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,time:Date.now(),touch:this.touch}}attach(){const e={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,e),this.target.addEventListener("keydown",this.onInteraction,e),this.target.addEventListener("pointerdown",this.onInteraction,e),this.target.addEventListener("pointermove",this.onPointer,e),this.target.addEventListener("scroll",this.onScroll,e),this.target.addEventListener("touchmove",this.onTouchMove,e)}evict(e){e.length>this.maxSamples&&e.splice(0,e.length-this.maxSamples)}onFocus=e=>{if(2===this.focusInteraction)return;const t=e.target;if(!(t instanceof Element))return;const n=performance.now();0===this.focusStartTime&&(this.focusStartTime=n),this.focus.push([Math.round(n-this.focusStartTime),t.tabIndex,this.TAG_CODES[t.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)};onInteraction=e=>{this.focusInteraction="keyCode"in e?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)};onPointer=e=>{if("touch"===e.pointerType)return;const t=e.timeStamp||performance.now();this.pendingPointer=[Math.round(e.clientX),Math.round(e.clientY),Math.round(t)],t-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=t,this.pendingPointer=null,this.evict(this.pointer))};onScroll=()=>{const e=performance.now();e-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(e)]),this.lastScrollSample=e,this.evict(this.scroll))};onTouchMove=e=>{const t=e.timeStamp||performance.now(),n=e.touches[0];n&&(this.pendingTouch=[Math.round(n.clientX),Math.round(n.clientY),Math.round(t),Math.round(1e3*n.force)/1e3,Math.round(n.radiusX||0),Math.round(n.radiusY||0)],t-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=t,this.pendingTouch=null,this.evict(this.touch)))}}var bi=et('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),wi=et('<div class="altcha-overlay-content"></div>'),_i=et('<div role="button" class="altcha-overlay-close">×</div> <!>',1),$i=et('<div class="altcha-floating-arrow"></div>'),Ei=et('<input type="hidden"/>'),Ci=et('<div class="altcha-error">Secure context (HTTPS) required.</div>'),Si=et('<div class="altcha-error"> </div>'),ki=et('<div class="altcha-error"> </div>'),xi=et("<!> <!>",1),Oi=et('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);Ze(["click"]),"undefined"!=typeof window&&window.customElements&&customElements.define("altcha-widget",fn(function(e,t){Y(t,!0);const[n,r]=function(){const e={};return[e,function(){Sr(()=>{for(var t in e)e[t].unsubscribe();o(e,mn,{enumerable:!1,value:!0})})}]}(),i=["ar","fa","he","ur"],{isSecureContext:a}=globalThis,{store:s}=globalThis.$altcha.defaults,l=navigator.hardwareConcurrency||2,c=navigator.deviceMemory||0,u=c&&c<=4?Math.min(4,l):l,f=globalThis.$altcha.i18n.store,d=t.$$host,h=(e,t)=>{mr().then(()=>{d?.dispatchEvent(new CustomEvent(e,{detail:t}))})};let v=null,p=Un(se(new URL(location.origin))),g=Un(!1),m=Un(null),y=Un(null),b=Un(se(ni.UNVERIFIED)),w=Un(void 0),_=Un(void 0),$=Un(null),E=Un(void 0),C=Un(null),S=Un(null),x=Un(null),O=Un(null),I=Un(se([])),T=Un(se({})),A=Un(!0);const R=pt(()=>({fetch:(e,t)=>fetch(e,t),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:u,...yn(s,"$altchaDefaults",n),...yr(T)})),P=pt(()=>`altcha-checkbox-${t.id||Math.floor(1e12*Math.random()).toString(16)}`),L=pt(()=>function(e){switch(e){case"checkbox":return Br;case"switch":return ei;default:return Zr}}(yr(R).type)),M=pt(()=>yr(R).auto),N=pt(()=>yr(b)===ni.VERIFYING),D=pt(()=>!yr(R).hideFooter),V=pt(()=>!yr(R).hideLogo&&"bar"!==yr(R).display),j=pt(()=>function(e,t){const n=Object.keys(e).map(e=>e.toLowerCase());let r=t.reduce((t,r)=>(r=r.toLowerCase(),t||(e[r]?r:null)||n.find(e=>r.split("-")[0]===e.split("-")[0])||null),null);e[r||""]||(r="en");return{language:r,strings:e[r]}}(yn(f,"$altchaI18nStore",n),[yr(R).language,document.documentElement.lang,...navigator.languages])),F=pt(()=>i.includes(yr(j).language)?"rtl":void 0),U=pt(()=>({...yr(j).strings})),q=pt(()=>yr(m)?.audio?.match(/^(https?:)?\//)?X(yr(m).audio,yr(p),{language:yr(R).audioChallengeLanguage||yr(j).language}).toString():yr(m)?.audio),H=pt(()=>yr(m)?.image?.match(/^(https?:)?\//)?X(yr(m).image,yr(p)):yr(m)?.image);async function G(e,...t){let n;for(const r of yr(I))n=await r[e].call(r,...t);return n}async function J(e){await new Promise(t=>setTimeout(t,e))}async function Z(e=yr(R).challenge,t){const n=await G("onFetchChallenge",e);let r=null;if(void 0!==n)return n;if("string"==typeof e)if(e.match(/^(https?:)?\//)){Ce("fetching challenge from",t?.method||"GET",e),Hn(p,new URL(e,location.origin),!0);const n=await yr(R).fetch(e,{credentials:yr(R).credentials||void 0,...t});await me(n);const i=n.headers.get("x-altcha-config");i&&function(e){try{const t=JSON.parse(e);t&&"object"==typeof t&&$e({serverVerificationFields:t?.sentinel?.fields,serverVerificationTimeZone:t?.sentinel?.timeZone,verifyUrl:t.verifyurl,...t})}catch(e){Ce("unable to configure from x-altcha-config header",e)}}(i);const o=await n.json();if(o&&"his"in o&&o.his){if(Ce("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return Z(X(o.his.url,yr(p)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}o&&"hisResult"in o&&o.hisResult&&Ce("HIS result",o.hisResult),r=o}else{Ce("parsing JSON challenge");try{r=JSON.parse(e)}catch{throw new Error("Unable to parse JSON challenge.")}}else if(e&&"object"==typeof e)try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("Unable to parse JSON challenge.")}if(function(e){return"object"==typeof e&&"challenge"in e}(r)&&(r=function(e){const[t,n]=e.salt.split("?"),r={};if(n)try{Object.assign(r,Object.fromEntries(new URLSearchParams(n).entries()))}catch{}const i={codeChallenge:e.codeChallenge,parameters:{algorithm:e.algorithm,cost:1,data:r,expiresAt:r?.expires?parseInt(r.expires,10):void 0,keyLength:"SHA-512"===e.algorithm?64:"SHA-384"===e.algorithm?48:32,nonce:(o=(new TextEncoder).encode(e.salt),Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")),keyPrefix:e.challenge,salt:""},signature:e.signature};var o;return Object.defineProperties(i,{_originalSalt:{enumerable:!1,value:e.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),i}(r)),!function(e){return!!e&&"object"==typeof e&&"parameters"in e&&!!e.parameters&&"object"==typeof e.parameters&&"algorithm"in e.parameters&&"nonce"in e.parameters&&"salt"in e.parameters&&"keyPrefix"in e.parameters}(r))throw new Error("Challenge validation failed.");return r}function W(){return document.getElementById(yr(P))}function z(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function X(e,t,n){const r=new URL(e,t);if(r.search||(r.search=t.search),n)for(const e in n)void 0!==n[e]&&null!==n[e]&&r.searchParams.set(e,n[e]);return r.toString()}function ie(e){!yr(g)&&e.currentTarget.checked?(e.preventDefault(),e.currentTarget.checked=!1,yr(b)!==ni.VERIFYING&&Ie()):e.currentTarget.checked||(e.preventDefault(),Se())}function le(e){yr(b)===ni.VERIFYING?e.currentTarget.setCustomValidity(yr(U).waitAlert):yr(R).validationMessage&&e.currentTarget.setCustomValidity(yr(R).validationMessage)}function ce(){yr(y)&&yr(y).abort(),ge(yr(R).display),Se()}function de(e){"onfocus"===yr(M)&&yr(b)===ni.UNVERIFIED&&Ie()}function he(){yr(y)&&yr(y).abort(),ge(yr(R).display),Se()}function ve(e){Hn(C,e.submitter,!0),"onsubmit"===yr(M)&&yr(b)===ni.UNVERIFIED&&(e.preventDefault(),e.stopPropagation(),xe(),Ie().then(e=>{e&&!yr(m)&&mr().then(()=>{pe(yr(C))})}))}function pe(e){yr($)&&"requestSubmit"in yr($)?yr($).requestSubmit(e):yr($)?.reportValidity()&&(e?e.click():yr($).submit())}function ge(e){switch(e){case"bar":case"floating":case"overlay":Ee(),yr(M)&&"off"!==yr(M)||(yr(T).auto="onsubmit");break;case"standard":xe()}}async function me(e){if(e.status>=400){if(e.headers.get("content-type")?.includes("/json")){let t;try{t=await e.json()}catch{}if(t&&"error"in t)throw new Error(`Server responded with ${e.status} - ${t.error}`)}throw new Error(`Server responded with ${e.status}.`)}const t=e.headers.get("content-type");if(!t||!t.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${t}.`)}async function ye(e){if(!yr(O))return void ke(ni.ERROR,"Cannot verify code challenge without PoW payload.");ke(ni.VERIFYING);let t=null;if(yr(R).verifyUrl)t=await async function(e,t){const n=await G("onRequestServerVerification",e,t);if(void 0!==n)return n;if(Ce("requesting server verification from",yr(R).verifyUrl),!yr(R).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const r=await yr(R).fetch(X(yr(R).verifyUrl,yr(p)),{body:JSON.stringify({code:t,fields:yr(R).serverVerificationFields?[...yr($)?.querySelectorAll('input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((e,t)=>{const n=t.name,r=t.value;return n&&r&&(e[n]=/\n/.test(r)?r.replace(new RegExp("(?<!\\r)\\n","g"),"\r\n"):r),e},{}):void 0,payload:e,timeZone:yr(R).serverVerificationTimeZone?z():void 0}),credentials:yr(R).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await me(r);const i=await r.json();return i&&"object"==typeof i&&"payload"in i&&i.payload&&h("serververification",i),i}(yr(O),e);else{if(!yr(R).verifyFunction)return void ke(ni.ERROR,"Parameter verifyUrl is required for code challenge verification.");t=await yr(R).verifyFunction(yr(O),e)}t?.payload&&(Hn(O,t.payload,!0),Ce("server payload",yr(O))),!0===t?.verified?(Ce("verified"),ke(ni.VERIFIED),h("verified",{payload:yr(O)}),"onsubmit"===yr(M)&&mr().then(()=>{pe(yr(C))})):ke(ni.ERROR,t?.reason||"Verification failed."),yr(R).disableAutoFocus||W()?.focus()}function $e(e){Object.assign(yr(T),{...Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t))})}function Ee(){Hn(A,!1)}function Ce(...e){(yr(R).debug||e.some(e=>e instanceof Error))&&console[e[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${yr(R).name}]`,...e)}function Se(e=ni.UNVERIFIED,t=null){Hn(g,!1),Hn(S,t,!0),Hn(O,null),yr(x)&&(clearTimeout(yr(x)),Hn(x,null)),ke(e)}function ke(e,t=null){Hn(b,e,!0),Hn(S,t,!0),h("statechange",{payload:yr(O),state:yr(b)})}function xe(){Hn(A,!0),mr().then(()=>{Oe()})}function Oe(){if("floating"===yr(R).display)return function(e=20){if(!yr(E))return;const t=yr(R).floatingPlacement;if(!yr(_)&&(Hn(_,(yr(R).floatingAnchor instanceof HTMLElement?yr(R).floatingAnchor:yr(R).floatingAnchor?document.querySelector(yr(R).floatingAnchor):yr($)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||yr($),!0),!yr(_)))return void Ce("unable to find floating anchor element");const n=parseInt(yr(R).floatingOffset,10)||12,r=yr(_).getBoundingClientRect(),i=yr(E).getBoundingClientRect(),o=document.documentElement.clientHeight,a=document.documentElement.clientWidth,s=t&&"auto"!==t?"top"===t:r.bottom+i.height+n+e>o,l=Math.max(e,Math.min(a-e-i.width,r.left+r.width/2-i.width/2));if(yr(E).style.setProperty("--altcha-floating-left",`${l}px`),yr(E).style.setProperty("--altcha-floating-top",s?r.top-(i.height+n)+"px":`${r.bottom+n}px`),yr(E).setAttribute("data-floating-position",s?"top":"bottom"),yr(w)){const e=yr(w).getBoundingClientRect();yr(w).style.left=r.left-l+r.width/2-e.width/2+"px"}}()}async function Ie(e={}){const{concurrency:t=Math.max(1,yr(R).workers),controller:n=new AbortController,minDuration:r=yr(R).minDuration}=e,i=performance.now();let o=null,s=null,l=!1;const c=await G("onVerify",e);if(void 0!==c)return c;Hn(y,n,!0),Se(ni.VERIFYING);try{if(!a)throw new Error("Secure context (HTTPS) required.");if(yr(R).mockError)throw new Error("Mock error.");if(yr(R).test)return Ce("running test mode with null challenge"),await J(Math.max(0,r-(performance.now()-i))),Hn(O,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),Ce("verified"),ke(ni.VERIFIED),h("vefified",{payload:yr(O)}),{payload:yr(O)};if(o=await Z(),!o)throw new Error("Failed to fetch challenge.");Ce("challenge",o),"configuration"in o&&(Ce("re-configuring from challenge",o.configuration),$e(o.configuration)),o.parameters.expiresAt&&function(e){yr(x)&&clearTimeout(yr(x));const t=()=>{yr(b)!==ni.UNVERIFIED?(Hn(g,!1),ke(ni.EXPIRED)):Se(),h("expired")},n=1e3*e-Date.now();n>=1?Hn(x,setTimeout(t,n),!0):t()}(o.parameters.expiresAt),l="_version"in o&&1===o._version;const e=globalThis.$altcha.algorithms.get(o.parameters.algorithm);if(!e)throw new Error(`Unsupported algorithm ${o.parameters.algorithm}.`);if(s=await mi({challenge:o,concurrency:t,controller:n,createWorker:e,counterMode:l?"string":"uint32",onOutOfMemory:e=>{if(Ce("out of memory error received"),h("outofmemory"),yr(R).retryOnOutOfMemoryError&&e>1){const t=Math.floor(e/2);return Ce(`retrying with ${t} workers...`),t}},timeout:yr(R).timeout}),yr(y)?.signal.aborted)return Se(),null;if(!s)throw new Error("Failed to find solution.");Ce("solution",s),await J(Math.max(0,r-(performance.now()-i))),Hn(m,o.codeChallenge||yr(R).codeChallenge||null,!0),Hn(O,l?btoa(JSON.stringify(function(e,t){return{algorithm:e.parameters.algorithm,challenge:e.parameters.keyPrefix,number:t.counter,salt:"_originalSalt"in e?e._originalSalt:e.parameters.nonce,signature:e.signature,took:t.time||0}}(o,s))):btoa(JSON.stringify({challenge:{parameters:o.parameters,signature:o.signature},solution:s})),!0),yr(m)?(Ce("requesting code verification"),ke(ni.CODE),h("codechallenge",{codeChallenge:yr(m)})):yr(R).verifyUrl?await ye():(Ce("verified"),ke(ni.VERIFIED),h("vefified",{payload:yr(O)}))}catch(e){return Ce("verification failed",e),ke(ni.ERROR,String(e)),null}finally{Hn(y,null)}return{challenge:o,payload:yr(O),solution:s}}kr(()=>{$e({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),kr(()=>{if(t.configuration)try{$e(JSON.parse(t.configuration))}catch{Ce("unable to parse the `configuration` attribute (JSON expected)")}}),kr(()=>{ge(yr(R).display)}),kr(()=>{yr(g)&&yr(b)===ni.VERIFYING&&Hn(g,!1)}),kr(()=>{yr(g)||yr(b)!==ni.VERIFIED||Hn(g,!0)}),kr(()=>{if(!yr(g)){const e=W();e&&e.checked&&(e.checked=!1)}}),kr(()=>{yr(b)===ni.VERIFIED&&W()?.setCustomValidity("")}),kr(()=>{if("onload"===yr(M)){const e=setTimeout(()=>{Ie()},1);return()=>{e&&clearTimeout(e)}}}),kr(()=>{yr(S)&&Ce("error:",yr(S))}),kr(()=>{yr(O)&&yr(R).setCookie&&function(e,t={}){const{domain:n,name:r=yr(R).name,maxAge:i,path:o,sameSite:a,secure:s}=t;let l=`${encodeURIComponent(r)}=${encodeURIComponent(e)}`;n&&(l+=`; Domain=${n}`);null!=i&&(l+=`; Max-Age=${i}`);o&&(l+=`; Path=${o}`);a&&(l+=`; SameSite=${a}`);s&&(l+="; Secure");document.cookie=l}(yr(O),yr(R).setCookie)}),dn(()=>(Ce("mounted","3.0.0-beta.4"),d&&globalThis.$altcha.instances.add(d),Hn($,yr(E)?.closest("form"),!0),yr($)?.addEventListener("reset",he),yr($)?.addEventListener("submit",ve,{capture:!0}),yr($)?.addEventListener("focusin",de),function(){Hn(I,[...globalThis.$altcha.plugins].map(e=>new e(d)),!0),Ce("activating plugins",yr(I).map(e=>e.constructor.name));for(const e of yr(I))e.activate()}(),yr(R).humanInteractionSignature&&(Ce("human interaction signature enabled"),v=new yi),h("load"),a||Ce("secure context (HTTPS) required"),()=>{!function(){for(const e of yr(I))e.destroy()}(),d&&globalThis.$altcha.instances.delete(d),yr(x)&&clearTimeout(yr(x)),yr($)?.removeEventListener("reset",he),yr($)?.removeEventListener("submit",ve,{capture:!0}),yr($)?.removeEventListener("focusin",de),v?.destroy()}));var Te={configure:$e,getConfiguration:function(){return{...yr(R)}},getState:function(){return yr(b)},hide:Ee,log:Ce,reset:Se,setState:ke,show:xe,updateUI:Oe,verify:Ie},Ae=Oi();Be("scroll",fe,function(){Oe()}),Be("click",fe,function(e){const t=e.target;"floating"!==yr(R).display||!t||d?.contains(t)||t.hasAttribute("data-backdrop")||t.closest("[data-popover]")||yr(b)===ni.VERIFIED||yr(R).floatingPersist||Ee()}),Be("pageshow",ue,function(){Se()}),Be("resize",ue,function(){Oe()});var Re=we(Ae),Pe=e=>{ot(e,bi())};Et(Re,e=>{"overlay"===yr(R).display&&yr(A)&&e(Pe)});var Le=_e(Re,2),Me=be(Le),Ne=e=>{var t=_i(),n=we(t),r=_e(n,2),i=e=>{var t=wi();St(t,()=>document.querySelector(yr(R).overlayContent)?.innerHTML,!0),re(t),ot(e,t)};Et(r,e=>{yr(R).overlayContent&&e(i)}),Je("click",n,ce),ot(e,t)};Et(Me,e=>{"overlay"===yr(R).display&&yr(A)&&e(Ne)});var De=_e(Me,2),Ve=be(De),je=be(Ve),Fe=be(je);{let e=pt(()=>"standard"===yr(R).display&&"onsubmit"!==yr(M)||yr(b)===ni.VERIFYING);!function(e,t,n){var r;Q&&(r=K,ne());var i=new $t(e);Ar(()=>{var e=t()??null;if(Q&&"["===ae(r)!=(null!==e)){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,e&&(t=>n(t,e))),void ee(!0)}i.ensure(e,e&&(t=>n(t,e)))},k)}(Fe,()=>yr(L),(t,n)=>{n(t,{get id(){return yr(P)},name:"",get required(){return yr(e)},get loading(){return yr(N)},get checked(){return yr(g)},onchange:ie,oninvalid:le})})}var Ue=_e(Fe,2),qe=be(Ue),He=e=>{var t=rt();Tr(()=>st(t,yr(U).verificationRequired)),ot(e,t)},Ge=e=>{var t=rt();Tr(()=>st(t,yr(U).verifying)),ot(e,t)},Ye=e=>{var t=rt();Tr(()=>st(t,yr(U).verified)),ot(e,t)},Ze=e=>{var t=rt();Tr(()=>st(t,yr(U).label)),ot(e,t)};Et(qe,e=>{yr(b)===ni.CODE&&yr(m)?e(He):yr(b)===ni.VERIFYING?e(Ge,1):yr(b)===ni.VERIFIED?e(Ye,2):e(Ze,-1)}),re(Ue),re(je);var We=_e(je,2),ze=e=>{zr(e,{get strings(){return yr(U)}})};Et(We,e=>{yr(V)&&e(ze)}),re(Ve);var Xe=_e(Ve,2),Ke=e=>{{let t=pt(()=>"bar"===yr(R).display&&yr(V));Kr(e,{get logo(){return yr(t)},get strings(){return yr(U)}})}};Et(Xe,e=>{yr(D)&&e(Ke)});var Qe=_e(Xe,2),et=e=>{var t=$i();rn(t,e=>Hn(w,e),()=>yr(w)),ot(e,t)};Et(Qe,e=>{"floating"===yr(R).display&&e(et)});var tt=_e(Qe,2),nt=e=>{var t=Ei();Bt(t),Tr(()=>{var e,n,r;Zt(t,"name",yr(R).name),e=t,n=yr(O),(r=zt(e)).value!==(r.value=n??void 0)&&(e.value!==n||0===n&&e.nodeName===Yt)&&(e.value=n??"")}),ot(e,t)};Et(tt,e=>{yr(R).setCookie||e(nt)}),re(De);var at=_e(De,2),lt=e=>{gi(e,{get anchor(){return yr(E)},onClickOutside:()=>{a&&Se()},get placement(){return yr(R).popoverPlacement},role:"alert",variant:"error",get dir(){return yr(F)},children:(e,t)=>{var n=it(),r=we(n),i=e=>{ot(e,Ci())},o=e=>{var t=Si(),n=be(t,!0);re(t),Tr(()=>st(n,yr(U).expired)),ot(e,t)},s=e=>{var t=ki(),n=be(t,!0);re(t),Tr(()=>{Zt(t,"title",yr(S)),st(n,yr(U).error)}),ot(e,t)};Et(r,e=>{yr(S)||a?yr(S)||yr(b)!==ni.EXPIRED?e(s,-1):e(o,1):e(i)}),ot(e,n)},$$slots:{default:!0}})},ct=e=>{var t=it();!function(e,t,n){Q&&ne();var r=new $t(e);Ar(()=>{var e=t();e!=e&&(e=Ct),r.ensure(e,n)})}(we(t),()=>yr(m),e=>{{let t=pt(()=>"standard"!==yr(R).codeChallengeDisplay);gi(e,{get anchor(){return yr(E)},get backdrop(){return yr(t)},get display(){return yr(R).codeChallengeDisplay},onClose:()=>{Se()},get placement(){return yr(R).popoverPlacement},role:"dialog",get"aria-label"(){return yr(U).verificationRequired},get dir(){return yr(F)},children:(e,t)=>{var n=xi(),r=we(n);fi(r,{get audioUrl(){return yr(q)},get imageUrl(){return yr(H)},onCancel:()=>Se(),onReload:()=>Ie(),onSubmit:e=>ye(e),get codeChallenge(){return yr(m)},get config(){return yr(R)},get strings(){return yr(U)}});var i=_e(r,2),o=e=>{Kr(e,{get logo(){return yr(V)},get strings(){return yr(U)}})};Et(i,e=>{yr(D)&&"standard"!==yr(R).codeChallengeDisplay&&e(o)}),ot(e,n)},$$slots:{default:!0}})}}),ot(e,t)};Et(at,e=>{yr(S)||yr(b)===ni.EXPIRED||!a?e(lt):yr(m)&&yr(b)===ni.CODE&&e(ct,1)}),re(Le),rn(Le,e=>Hn(E,e),()=>yr(E)),Tr(e=>{Zt(Le,"data-state",yr(b)),Zt(Le,"data-display",yr(R).display||void 0),Zt(Le,"data-placement",e),Zt(Le,"data-visible",yr(A)||void 0),Zt(Le,"dir",yr(F)),Zt(Ue,"for",yr(P)),Le.dir=Le.dir},[()=>function(e){switch(e){case"bar":return yr(R).barPlacement||"bottom";case"floating":return yr(R).floatingPlacement||"auto";default:return}}(yr(R).display)]),ot(e,Ae);var ut=B(Te);return r(),ut},{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"]));
|
|
1
|
+
var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.keys,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,l=Object.prototype,c=Array.prototype,u=Object.getPrototypeOf,f=Object.isExtensible;const d=()=>{};function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const v=1<<24,p=16,g=32,m=64,y=512,b=1024,w=2048,_=4096,$=8192,E=16384,C=32768,S=1<<25,k=65536,x=1<<17,O=1<<19,I=65536,T=1<<21,A=1<<23,R=Symbol("$state"),P=Symbol("legacy props"),L=Symbol(""),M=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},N=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function D(e){return e===this.v}function V(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function j(e){return!V(e,this.v)}const F={},U=Symbol(),q="http://www.w3.org/1999/xhtml";let H=null;function G(e){H=e}function Y(e,t=!1,n){H={p:H,i:!1,c:null,e:null,s:e,x:null,r:Qn,l:null}}function B(e){var t=H,n=t.e;if(null!==n)for(var r of(t.e=null,n))xr(r);return void 0!==e&&(t.x=e),t.i=!0,H=t.p,e??{}}let J=[];function Z(){var e=J;J=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}function W(e){if(0===J.length&&!En){var t=J;queueMicrotask(()=>{t===J&&Z()})}J.push(e)}function z(){for(;J.length>0;)Z()}function X(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let K,Q=!1;function ee(e){Q=e}function te(e){if(null===e)throw X(),F;return K=e}function ne(){return te(ye(K))}function re(e){if(Q){if(null!==ye(K))throw X(),F;K=e}}function ie(e=1){if(Q){for(var t=e,n=K;t--;)n=ye(n);K=n}}function oe(e=!0){for(var t=0,n=K;;){if(8===n.nodeType){var r=n.data;if("]"===r){if(0===t)return n;t-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ye(n);e&&n.remove(),n=i}}function ae(e){if(!e||8!==e.nodeType)throw X(),F;return e.data}function se(t){if("object"!=typeof t||null===t||R in t)return t;const n=u(t);if(n!==l&&n!==c)return t;var r=new Map,i=e(t),o=Un(0),s=lr,f=e=>{if(lr===s)return e();var t=zn,n=lr;Kn(null),cr(s);var r=e();return Kn(t),cr(n),r};return i&&r.set("length",Un(t.length)),new Proxy(t,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?f(()=>{var e=Un(n.value);return r.set(t,e),e}):Hn(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(void 0===n){if(t in e){const e=f(()=>Un(U));r.set(t,e),Yn(o)}}else Hn(n,U),Yn(o);return!0},get(e,n,i){if(n===R)return t;var o=r.get(n),s=n in e;if(void 0!==o||s&&!a(e,n)?.writable||(o=f(()=>Un(se(s?e[n]:U))),r.set(n,o)),void 0!==o){var l=yr(o);return l===U?void 0:l}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var i=r.get(t);i&&(n.value=yr(i))}else if(void 0===n){var o=r.get(t),a=o?.v;if(void 0!==o&&a!==U)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===R)return!0;var n=r.get(t),i=void 0!==n&&n.v!==U||Reflect.has(e,t);if((void 0!==n||null!==Qn&&(!i||a(e,t)?.writable))&&(void 0===n&&(n=f(()=>Un(i?se(e[t]):U)),r.set(t,n)),yr(n)===U))return!1;return i},set(e,t,n,s){var l=r.get(t),c=t in e;if(i&&"length"===t)for(var u=n;u<l.v;u+=1){var d=r.get(u+"");void 0!==d?Hn(d,U):u in e&&(d=f(()=>Un(U)),r.set(u+"",d))}void 0===l?c&&!a(e,t)?.writable||(Hn(l=f(()=>Un(void 0)),se(n)),r.set(t,l)):(c=l.v!==U,Hn(l,f(()=>se(n))));var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!c){if(i&&"string"==typeof t){var v=r.get("length"),p=Number(t);Number.isInteger(p)&&p>=v.v&&Hn(v,p+1)}Yn(o)}return!0},ownKeys(e){yr(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return void 0===t||t.v!==U});for(var[n,i]of r)i.v===U||n in e||t.push(n);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function le(e){try{if(null!==e&&"object"==typeof e&&R in e)return e[R]}catch{}return e}function ce(e,t){return Object.is(le(e),le(t))}var ue,fe,de,he,ve;function pe(){if(void 0===ue){ue=window,fe=document,de=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;he=a(t,"firstChild").get,ve=a(t,"nextSibling").get,f(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),f(n)&&(n.__t=void 0)}}function ge(e=""){return document.createTextNode(e)}function me(e){return he.call(e)}function ye(e){return ve.call(e)}function be(e,t){if(!Q)return me(e);var n=me(K);if(null===n)n=K.appendChild(ge());else if(t&&3!==n.nodeType){var r=ge();return n?.before(r),te(r),r}return t&&Ee(n),te(n),n}function we(e,t=!1){if(!Q){var n=me(e);return n instanceof Comment&&""===n.data?ye(n):n}if(t){if(3!==K?.nodeType){var r=ge();return K?.before(r),te(r),r}Ee(K)}return K}function _e(e,t=1,n=!1){let r=Q?K:e;for(var i;t--;)i=r,r=ye(r);if(!Q)return r;if(n){if(3!==r?.nodeType){var o=ge();return null===r?i?.after(o):r.before(o),te(o),o}Ee(r)}return te(r),r}function $e(e,t,n){let r;return document.createElementNS(t??q,e,r)}function Ee(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Ce(e){var t=Qn;if(null===t)return zn.f|=A,e;if(0===(t.f&C)&&!(4&t.f))throw e;Se(e,t)}function Se(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&C))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}const ke=-7169;function xe(e,t){e.f=e.f&ke|t}function Oe(e){0!==(e.f&y)||null===e.deps?xe(e,b):xe(e,_)}function Ie(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&I)&&(t.f^=I,Ie(t.deps))}function Te(e,t,n){0!==(e.f&w)?t.add(e):0!==(e.f&_)&&n.add(e),Ie(e.deps),xe(e,b)}function Ae(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const Re=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Pe(e){return Re.includes(e)}const Le={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Me(e){return e=e.toLowerCase(),Le[e]??e}const Ne=["touchstart","touchmove"];function De(e){return Ne.includes(e)}function Ve(e,t){if(t){const t=document.body;e.autofocus=!0,W(()=>{document.activeElement===t&&e.focus()})}}let je=!1;function Fe(){je||(je=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ue(e){var t=zn,n=Qn;Kn(null),er(null);try{return e()}finally{Kn(t),er(n)}}const qe=Symbol("events"),He=new Set,Ge=new Set;function Ye(e,t,n,r={}){function i(e){if(r.capture||ze.call(t,e),!e.cancelBubble)return Ue(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?W(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Be(e,t,n,r,i){var o={capture:r,passive:i},a=Ye(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sr(()=>{t.removeEventListener(e,a,o)})}function Je(e,t,n){(t[qe]??={})[e]=n}function Ze(e){for(var t=0;t<e.length;t++)He.add(e[t]);for(var n of Ge)n(e)}let We=null;function ze(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;We=e;var s=0,l=We===e&&e[qe];if(l){var c=i.indexOf(l);if(-1!==c&&(t===document||t===window))return void(e[qe]=t);var u=i.indexOf(t);if(-1===u)return;c<=u&&(s=c)}if((a=i[s]||e.target)!==t){o(e,"currentTarget",{configurable:!0,get:()=>a||n});var f=zn,d=Qn;Kn(null),er(null);try{for(var h,v=[];null!==a;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[qe]?.[r];null==g||a.disabled&&e.target!==a||g.call(a,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble||p===t||null===p)break;a=p}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e[qe]=t,delete e.currentTarget,Kn(f),er(d)}}}const Xe=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ke(e){var t=$e("template");return t.innerHTML=function(e){return Xe?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Qe(e,t){var n=Qn;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function et(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{if(Q)return Qe(K,null),K;void 0===n&&(n=Ke(o?e:"<!>"+e),r||(n=me(n)));var t=i||de?document.importNode(n,!0):n.cloneNode(!0);r?Qe(me(t),t.lastChild):Qe(t,t);return t}}function tt(e,t,n="svg"){var r,i=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(Q)return Qe(K,null),K;if(!r){var e=Ke(i);r=me(me(e))}var t=r.cloneNode(!0);return Qe(t,t),t}}function nt(e,t){return tt(e,0,"svg")}function rt(e=""){if(!Q){var t=ge(e+"");return Qe(t,t),t}var n=K;return 3!==n.nodeType?(n.before(n=ge()),te(n)):Ee(n),Qe(n,n),n}function it(){if(Q)return Qe(K,null),K;var e=document.createDocumentFragment(),t=document.createComment(""),n=ge();return e.append(t,n),Qe(t,n),e}function ot(e,t){if(Q){var n=Qn;return 0!==(n.f&C)&&null!==n.nodes.end||(n.nodes.end=K),void ne()}null!==e&&e.before(t)}class at{parent;is_pending=!1;transform_error;#e;#t=Q?K:null;#n;#r;#i;#o=null;#a=null;#s=null;#l=null;#c=0;#u=0;#f=!1;#d=new Set;#h=new Set;#v=null;#p=function(e){let t,n=0,r=Fn(0);return()=>{Cr()&&(yr(r),Ir(()=>(0===n&&(t=_r(()=>e(()=>Yn(r)))),n+=1,()=>{W(()=>{n-=1,0===n&&(t?.(),t=void 0,Yn(r))})})))}}(()=>(this.#v=Fn(this.#c),()=>{this.#v=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=Qn;t.b=this,t.f|=128,n(e)},this.parent=Qn.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Ar(()=>{if(Q){const e=this.#t;ne();const t="[!"===e.data;if(e.data.startsWith("[?")){const t=JSON.parse(e.data.slice(2));this.#g(t)}else t?this.#m():this.#y()}else this.#b()},589824),Q&&(this.#e=K)}#y(){try{this.#o=Pr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){const t=this.#n.failed;t&&(this.#s=Pr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#m(){const e=this.#n.pending;if(e){this.is_pending=!0,this.#a=Pr(()=>e(this.#e));var t=wn;W(()=>{var e=this.#l=document.createDocumentFragment(),n=ge();e.append(n),this.#o=this.#w(()=>Pr(()=>this.#r(n))),0===this.#u&&(this.#e.before(e),this.#l=null,jr(this.#a,()=>{this.#a=null}),this.#_(t))})}}#b(){var e=wn;try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#c=0,this.#o=Pr(()=>{this.#r(this.#e)}),this.#u>0){var t=this.#l=document.createDocumentFragment();qr(this.#o,t);const e=this.#n.pending;this.#a=Pr(()=>e(this.#e))}else this.#_(e)}catch(e){this.error(e)}}#_(e){this.is_pending=!1;for(const t of this.#d)xe(t,w),e.schedule(t);for(const t of this.#h)xe(t,_),e.schedule(t);this.#d.clear(),this.#h.clear()}defer_effect(e){Te(e,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#w(e){var t=Qn,n=zn,r=H;er(this.#i),Kn(this.#i),G(this.#i.ctx);try{return In.ensure(),e()}catch(e){return Ce(e),null}finally{er(t),Kn(n),G(r)}}#$(e,t){this.has_pending_snippet()?(this.#u+=e,0===this.#u&&(this.#_(t),this.#a&&jr(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))):this.parent&&this.parent.#$(e,t)}update_pending_count(e,t){this.#$(e,t),this.#c+=e,this.#v&&!this.#f&&(this.#f=!0,W(()=>{this.#f=!1,this.#v&&Gn(this.#v,this.#c)}))}get_effect_pending(){return this.#p(),yr(this.#v)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#o&&(Nr(this.#o),this.#o=null),this.#a&&(Nr(this.#a),this.#a=null),this.#s&&(Nr(this.#s),this.#s=null),Q&&(te(this.#t),ie(),te(oe()));var r=!1,i=!1;const o=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#s&&jr(this.#s,()=>{this.#s=null}),this.#w(()=>{this.#b()}))},a=e=>{try{i=!0,t?.(e,o),i=!1}catch(e){Se(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#w(()=>{try{return Pr(()=>{var t=Qn;t.b=this,t.f|=128,n(this.#e,()=>e,()=>o)})}catch(e){return Se(e,this.#i.parent),null}}))};W(()=>{var t;try{t=this.transform_error(e)}catch(e){return void Se(e,this.#i&&this.#i.parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(a,e=>Se(e,this.#i&&this.#i.parent)):a(t)})}}function st(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function lt(e,t){return ft(e,t)}function ct(e,t){pe(),t.intro=t.intro??!1;const n=t.target,r=Q,i=K;try{for(var o=me(n);o&&(8!==o.nodeType||"["!==o.data);)o=ye(o);if(!o)throw F;ee(!0),te(o);const r=ft(e,{...t,anchor:o});return ee(!1),r}catch(r){if(r instanceof Error&&r.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw r;return r!==F&&console.warn("Failed to hydrate: ",r),!1===t.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),pe(),n.textContent="",ee(!1),lt(e,t)}finally{ee(r),te(i)}}const ut=new Map;function ft(e,{target:t,anchor:n,props:i={},events:o,context:a,intro:s=!0,transformError:l}){pe();var c=void 0,u=function(e){In.ensure();const t=Er(524352,e);return(e={})=>new Promise(n=>{e.outro?jr(t,()=>{Nr(t),n(void 0)}):(Nr(t),n(void 0))})}(()=>{var s=n??t.appendChild(ge());!function(e,t,n,r){new at(e,t,n,r)}(s,{pending:()=>{}},t=>{if(Y({}),a&&(H.c=a),o&&(i.$$events=o),Q&&Qe(t,null),c=e(t,i)||{},Q&&(Qn.nodes.end=K,null===K||8!==K.nodeType||"]"!==K.data))throw X(),F;B()},l);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=De(r);for(const e of[t,document]){var o=ut.get(e);void 0===o&&(o=new Map,ut.set(e,o));var a=o.get(r);void 0===a?(e.addEventListener(r,ze,{passive:i}),o.set(r,1)):o.set(r,a+1)}}}};return f(r(He)),Ge.add(f),()=>{for(var e of u)for(const n of[t,document]){var r=ut.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,ze),r.delete(e),0===r.size&&ut.delete(n)):r.set(e,i)}Ge.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return dt.set(c,u),c}let dt=new WeakMap;function ht(e){var t=null!==zn&&2&zn.f?zn:null;null!==Qn&&(Qn.f|=O);return{ctx:H,deps:null,effects:null,equals:D,f:2050,fn:e,reactions:null,rv:0,v:U,wv:0,parent:t??Qn,ac:null}}function vt(e,t,n){let r=Qn;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=Fn(U),a=!zn,s=new Map;return function(e){Er(4718592,e)}(()=>{var t=Qn,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(wt)}catch(e){n.reject(e),wt()}var l=wn;if(a){if(0!==(t.f&C))var c=_t();if(r.b.is_rendered())s.get(l)?.reject(M),s.delete(l);else{for(const e of s.values())e.reject(M);s.clear()}s.set(l,n)}const u=(e,n=void 0)=>{c&&c(n===M);if(n!==M&&0===(t.f&E)){if(l.activate(),n)o.f|=A,Gn(o,n);else{0!==(o.f&A)&&(o.f^=A),Gn(o,e);for(const[e,t]of s){if(s.delete(e),e===l)break;t.reject(M)}}l.deactivate()}};n.promise.then(u,e=>u(null,e||"unknown"))}),Sr(()=>{for(const e of s.values())e.reject(M)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function pt(e){const t=ht(e);return nr(t),t}function gt(e){var t,n=Qn;er(function(e){for(var t=e.parent;null!==t;){if(!(2&t.f))return 0===(t.f&E)?t:null;t=t.parent}return null}(e));try{e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)Nr(t[n])}}(e),t=hr(e)}finally{er(n)}return t}function mt(e){var t=gt(e);e.equals(t)||(e.wv=ur(),wn?.is_fork&&null!==e.deps||(e.v=t,null!==e.deps))?Zn||(null!==_n?(Cr()||wn?.is_fork)&&_n.set(e,t):Oe(e)):xe(e,b)}function yt(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&gr(t)}function bt(e,t,n,r){const i=ht;var o=e.filter(e=>!e.settled);if(0!==n.length||0!==o.length){var a,s,l,c,u=Qn,f=(a=Qn,s=zn,l=H,c=wn,function(e=!0){er(a),Kn(s),G(l),e&&0===(a.f&E)&&(c?.activate(),c?.apply())}),d=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null;if(0!==n.length){var h=_t();d?d.then(()=>{f(),p(),wt()}):p()}else d.then(()=>v(t.map(i)))}else r(t.map(i));function v(e){f();try{r(e)}catch(e){0===(u.f&E)&&Se(e,u)}wt()}function p(){Promise.all(n.map(e=>vt(e))).then(e=>v([...t.map(i),...e])).catch(e=>Se(e,u)).finally(()=>h())}}function wt(e=!0){er(null),Kn(null),G(null),e&&wn?.deactivate()}function _t(){var e=Qn.b,t=wn,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}class $t{anchor;#E=new Map;#C=new Map;#S=new Map;#k=new Set;#x=!0;constructor(e,t=!0){this.anchor=e,this.#x=t}#O=e=>{if(this.#E.has(e)){var t=this.#E.get(e),n=this.#C.get(t);if(n)Ur(n,!0),this.#k.delete(t);else{var r=this.#S.get(t);r&&(this.#C.set(t,r.effect),this.#S.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of this.#E){if(this.#E.delete(t),t===e)break;const r=this.#S.get(n);r&&(Nr(r.effect),this.#S.delete(n))}for(const[e,r]of this.#C){if(e===t||this.#k.has(e))continue;const i=()=>{if(Array.from(this.#E.values()).includes(e)){var t=document.createDocumentFragment();qr(r,t),t.append(ge()),this.#S.set(e,{effect:r,fragment:t})}else Nr(r);this.#k.delete(e),this.#C.delete(e)};this.#x||!n?(this.#k.add(e),jr(r,i,!1)):i()}}};#I=e=>{this.#E.delete(e);const t=Array.from(this.#E.values());for(const[e,n]of this.#S)t.includes(e)||(Nr(n.effect),this.#S.delete(e))};ensure(e,t){var n=wn;!t||this.#C.has(e)||this.#S.has(e)||this.#C.set(e,Pr(()=>t(this.anchor)));this.#E.set(n,e),Q&&(this.anchor=K),this.#O(n)}}function Et(e,t,n=!1){var r;Q&&(r=K,ne());var i=new $t(e);function o(e,t){if(Q){var n=ae(r);if(e!==parseInt(n.substring(1))){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,t),void ee(!0)}}i.ensure(e,t)}Ar(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?k:0)}const Ct=Symbol("NaN");function St(e,t,n=!1,r=!1,i=!1,o=!1){var a=e,s="";if(n){var l=e;Q&&(a=te(me(l)))}Tr(()=>{var e=Qn;if(s!==(s=t()??"")){if(n&&!Q)return e.nodes=null,l.innerHTML=s,void(""!==s&&Qe(me(l),l.lastChild));if(null!==e.nodes&&(Dr(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){if(Q){K.data;for(var o=ne(),c=o;null!==o&&(8!==o.nodeType||""!==o.data);)c=o,o=ye(o);if(null===o)throw X(),F;return Qe(K,c),void(a=te(o))}var u=$e(r?"svg":i?"math":"template",r?"http://www.w3.org/2000/svg":i?"http://www.w3.org/1998/Math/MathML":void 0);u.innerHTML=s;var f=r||i?u:u.content;if(Qe(me(f),f.lastChild),r||i)for(;me(f);)a.before(me(f));else a.before(f)}}else Q&&ne()})}function kt(e,t){var n,r=void 0;Rr(()=>{r!==(r=t())&&(n&&(Nr(n),n=null),r&&(n=Pr(()=>{Or(()=>r(e))})))})}function xt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ot(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xt(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}const It=[..." \t\n\r\f \v\ufeff"];function Tt(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];null!=o&&""!==o&&(r+=" "+i+": "+o+n)}return r}function At(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function Rt(e,t,n,r,i,o){var a=e.__className;if(Q||a!==n||void 0===a){var s=function(e,t,n){var r=null==e?"":""+e;if(n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,a=0;(a=r.indexOf(i,a))>=0;){var s=a+o;0!==a&&!It.includes(r[a-1])||s!==r.length&&!It.includes(r[s])?a=s:r=(0===a?"":r.substring(0,a))+r.substring(s+1)}return""===r?null:r}(n,0,o);Q&&s===e.getAttribute("class")||(null==s?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e.__className=n}else if(o&&i!==o)for(var l in o){var c=!!o[l];null!=i&&c===!!i[l]||e.classList.toggle(l,c)}return o}function Pt(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(null==n[i]?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Lt(e,t,n,r){var i=e.__style;if(Q||i!==t){var o=function(e,t){if(t){var n,r,i="";if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,l=[];n&&l.push(...Object.keys(n).map(At)),r&&l.push(...Object.keys(r).map(At));var c=0,u=-1;const t=e.length;for(var f=0;f<t;f++){var d=e[f];if(s?"/"===d&&"*"===e[f-1]&&(s=!1):o?o===d&&(o=!1):"/"===d&&"*"===e[f+1]?s=!0:'"'===d||"'"===d?o=d:"("===d?a++:")"===d&&a--,!s&&!1===o&&0===a)if(":"===d&&-1===u)u=f;else if(";"===d||f===t-1){if(-1!==u){var h=At(e.substring(c,u).trim());l.includes(h)||(";"!==d&&f++,i+=" "+e.substring(c,f).trim()+";")}c=f+1,u=-1}}}return n&&(i+=Tt(n)),r&&(i+=Tt(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);Q&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else r&&(Array.isArray(r)?(Pt(e,n?.[0],r[0]),Pt(e,n?.[1],r[1],"important")):Pt(e,n,r));return r}function Mt(t,n,r=!1){if(t.multiple){if(null==n)return;if(!e(n))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var i of t.options)i.selected=n.includes(Nt(i))}else{for(i of t.options){if(ce(Nt(i),n))return void(i.selected=!0)}r&&void 0===n||(t.selectedIndex=-1)}}function Nt(e){return"__value"in e?e.__value:e.value}const Dt=Symbol("class"),Vt=Symbol("style"),jt=Symbol("is custom element"),Ft=Symbol("is html"),Ut=N?"link":"LINK",qt=N?"input":"INPUT",Ht=N?"option":"OPTION",Gt=N?"select":"SELECT",Yt=N?"progress":"PROGRESS";function Bt(e){if(Q){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Zt(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var r=e.checked;Zt(e,"checked",null),e.checked=r}}};e.__on_r=n,W(n),Fe()}}function Jt(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Zt(e,t,n,r){var i=zt(e);Q&&(i[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===Ut)||i[t]!==(i[t]=n)&&("loading"===t&&(e[L]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Kt(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wt(e,t,n=[],r=[],i=[],o,a=!1,s=!1){bt(i,n,r,n=>{var r=void 0,i={},o=e.nodeName===Gt,l=!1;if(Rr(()=>{var c=t(...n.map(yr)),u=function(e,t,n,r,i=!1){if(Q&&i&&e.nodeName===qt){var o=e;("checkbox"===o.type?"defaultChecked":"defaultValue")in n||Bt(o)}var a=zt(e),s=a[jt],l=!a[Ft];let c=Q&&s;c&&ee(!1);var u=t||{},f=e.nodeName===Ht;for(var d in t)d in n||(n[d]=null);n.class?n.class=Ot(n.class):n[Dt]&&(n.class=null),n[Vt]&&(n.style??=null);var h=Kt(e);for(const r in n){let i=n[r];if(f&&"value"===r&&null==i)e.value=e.__value="",u[r]=i;else if("class"!==r)if("style"!==r){var v=u[r];if(i!==v||void 0===i&&e.hasAttribute(r)){u[r]=i;var p=r[0]+r[1];if("$$"!==p)if("on"===p){const t={},n="$$"+r;let o=r.slice(2);var g=Pe(o);if(Ae(o)&&(o=o.slice(0,-7),t.capture=!0),!g&&v){if(null!=i)continue;e.removeEventListener(o,u[n],t),u[n]=null}if(g)Je(o,e,i),Ze([o]);else if(null!=i){let i=function(e){u[r].call(this,e)};u[n]=Ye(o,e,i,t)}}else if("style"===r)Zt(e,r,i);else if("autofocus"===r)Ve(e,Boolean(i));else if(s||"__value"!==r&&("value"!==r||null==i))if("selected"===r&&f)Jt(e,i);else{var m=r;l||(m=Me(m));var y="defaultValue"===m||"defaultChecked"===m;if(null!=i||s||y)y||h.includes(m)&&(s||"string"!=typeof i)?(e[m]=i,m in a&&(a[m]=U)):"function"!=typeof i&&Zt(e,m,i);else if(a[r]=null,"value"===m||"checked"===m){let n=e;const r=void 0===t;if("value"===m){let e=n.defaultValue;n.removeAttribute(m),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(m),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(r)}else e.value=e.__value=i}}else Lt(e,i,t?.[Vt],n[Vt]),u[r]=i,u[Vt]=n[Vt];else Rt(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,i,0,t?.[Dt],n[Dt]),u[r]=i,u[Dt]=n[Dt]}return c&&ee(!0),u}(e,r,c,0,a,s);l&&o&&"value"in c&&Mt(e,c.value);for(let e of Object.getOwnPropertySymbols(i))c[e]||Nr(i[e]);for(let t of Object.getOwnPropertySymbols(c)){var f=c[t];"@attach"!==t.description||r&&f===r[t]||(i[t]&&Nr(i[t]),i[t]=Pr(()=>kt(e,()=>f))),u[t]=f}r=u}),o){var c=e;Or(()=>{Mt(c,r.value,!0),function(e){var t=new MutationObserver(()=>{Mt(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sr(()=>{t.disconnect()})}(c)})}l=!0})}function zt(e){return e.__attributes??={[jt]:e.nodeName.includes("-"),[Ft]:e.namespaceURI===q}}var Xt=new Map;function Kt(e){var t,n=e.getAttribute("is")||e.nodeName,r=Xt.get(n);if(r)return r;Xt.set(n,r=[]);for(var i=e,o=Element.prototype;o!==i;){for(var a in t=s(i))t[a].set&&r.push(a);i=u(i)}return r}function Qt(e,t,n=t){var r=new WeakSet;!function(e,t,n,r=n){e.addEventListener(t,()=>Ue(n));const i=e.__on_r;e.__on_r=i?()=>{i(),r(!0)}:()=>r(!0),Fe()}(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=en(e)?tn(o):o,n(o),null!==wn&&r.add(wn),await mr(),o!==(o=t())){var a=e.selectionStart,s=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==s){var c=e.value.length;a===s&&s===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(s,c))}}}),(Q&&e.defaultValue!==e.value||null==_r(t)&&e.value)&&(n(en(e)?tn(e.value):e.value),null!==wn&&r.add(wn)),Ir(()=>{var n=t();if(e===document.activeElement){var i=wn;if(r.has(i))return}en(e)&&n===tn(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function en(e){var t=e.type;return"number"===t||"range"===t}function tn(e){return""===e?null:+e}function nn(e,t){return e===t||e?.[R]===t}function rn(e={},t,n,r){var i=H.r,o=Qn;return Or(()=>{var r,a;return Ir(()=>{r=a,a=[],_r(()=>{e!==n(...a)&&(t(e,...a),r&&nn(n(...r),e)&&t(null,...r))})}),()=>{let r=o;for(;r!==i&&null!==r.parent&&r.parent.f&S;)r=r.parent;const s=r.teardown;r.teardown=()=>{a&&nn(n(...a),e)&&t(null,...a),s?.()}}}),e}const on={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function an(e,t,n){return new Proxy({props:e,exclude:t},on)}function sn(e,t,n,r){var i,o=r,a=!0,s=()=>(a&&(a=!1,o=r),o);void 0===e[t]&&void 0!==r&&s(),i=()=>{var n=e[t];return void 0===n?s():(a=!0,n)};var l=!1,c=ht(()=>(l=!1,i())),u=Qn;return function(e,t){if(arguments.length>0){const n=t?yr(c):e;return Hn(c,n),l=!0,void 0!==o&&(o=n),e}return Zn&&l||0!==(u.f&E)?c.v:yr(c)}}class ln{#T;#A;constructor(e){var t=new Map,n=(e,n)=>{var r=qn(n,!1,!1);return t.set(e,r),r};const r=new Proxy({...e.props||{},$$events:{}},{get:(e,r)=>yr(t.get(r)??n(r,Reflect.get(e,r))),has:(e,r)=>r===P||(yr(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r)),set:(e,r,i)=>(Hn(t.get(r)??n(r,i),i),Reflect.set(e,r,i))});this.#A=(e.hydrate?ct:lt)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),e?.props?.$$host&&!1!==e.sync||Tn(),this.#T=r.$$events;for(const e of Object.keys(this.#A))"$set"!==e&&"$destroy"!==e&&"$on"!==e&&o(this,e,{get(){return this.#A[e]},set(t){this.#A[e]=t},enumerable:!0});this.#A.$set=e=>{Object.assign(r,e)},this.#A.$destroy=()=>{!function(e,t){const n=dt.get(e);n?(dt.delete(e),n(t)):Promise.resolve()}(this.#A)}}$set(e){this.#A.$set(e)}$on(e,t){this.#T[e]=this.#T[e]||[];const n=(...e)=>t.call(this,...e);return this.#T[e].push(n),()=>{this.#T[e]=this.#T[e].filter(e=>e!==n)}}$destroy(){this.#A.$destroy()}}let cn=class{};function un(e,t,n,r){const i=n[e]?.type;if(t="Boolean"===i&&"boolean"!=typeof t?null!=t:t,!r||!n[e])return t;if("toAttribute"===r)switch(i){case"Object":case"Array":return null==t?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return null==t?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return null!=t?+t:t}}function fn(e,t,n,r,s,l){let c=class extends cn{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return i(t).map(e=>(t[e].attribute||e).toLowerCase())}};return i(t).forEach(e=>{o(c.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=un(e,n,t),this.$$d[e]=n;var r=this.$$c;if(r){var i=a(r,e)?.get;i?r[e]=n:r.$set({[e]:n})}}})}),r.forEach(e=>{o(c.prototype,e,{get(){return this.$$c?.[e]}})}),e.element=c,c}function dn(e){null===H&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),kr(()=>{const t=_r(e);if("function"==typeof t)return t})}function hn(e,t,n){if(null==e)return t(void 0),d;const r=_r(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}"function"==typeof HTMLElement&&(cn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(e){return t=>{const n=$e("slot");"default"!==e&&(n.name=e),ot(t,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=function(e){const t={};return e.childNodes.forEach(e=>{t[e.slot||"default"]=!0}),t}(this);for(const e of this.$$s)e in r&&("default"!==e||this.$$d.children?n[e]=t(e):(this.$$d.children=t(e),n.default=!0));for(const e of this.attributes){const t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=un(t,e.value,this.$$p_d,"toProp"))}for(const e in this.$$p_d)e in this.$$d||void 0===this[e]||(this.$$d[e]=this[e],delete this[e]);this.$$c=(e={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new ln(e)),this.$$me=function(e){In.ensure();const t=Er(524352,e);return()=>{Nr(t)}}(()=>{Ir(()=>{this.$$r=!0;for(const e of i(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];const t=un(e,this.$$d[e],this.$$p_d,"toAttribute");null==t?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(const e in this.$$l)for(const t of this.$$l[e]){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}var e}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=un(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return i(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});const vn=[];function pn(e,t=d){let n=null;const r=new Set;function i(t){if(V(e,t)&&(e=t,n)){const t=!vn.length;for(const t of r)t[1](),vn.push(t,e);if(t){for(let e=0;e<vn.length;e+=2)vn[e][0](vn[e+1]);vn.length=0}}}function o(t){i(t(e))}return{set:i,update:o,subscribe:function(a,s=d){const l=[a,s];return r.add(l),1===r.size&&(n=t(i,o)||d),a(e),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function gn(e){let t;return hn(e,e=>t=e)(),t}let mn=Symbol();function yn(e,t,n){const r=n[t]??={store:null,source:qn(void 0),unsubscribe:d};if(r.store!==e&&!(mn in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=d;else{var i=!0;r.unsubscribe=hn(e,e=>{i?r.source.v=e:Hn(r.source,e)}),i=!1}return e&&mn in n?gn(e):yr(r.source)}const bn=new Set;let wn=null,_n=null,$n=null,En=!1,Cn=!1,Sn=null,kn=null;var xn=0;let On=1;class In{id=On++;current=new Map;previous=new Map;#R=new Set;#P=new Set;#L=0;#M=0;#N=null;#D=[];#d=new Set;#h=new Set;#V=new Map;is_fork=!1;#j=!1;#F(){return this.is_fork||this.#M>0}skip_effect(e){this.#V.has(e)||this.#V.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#V.get(e);if(t){for(var n of(this.#V.delete(e),t.d))xe(n,w),this.schedule(n);for(n of t.m)xe(n,_),this.schedule(n)}}#U(){xn++>1e3&&function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Se(e,$n)}}();const e=this.#D;this.#D=[],this.apply();var t=Sn=[],n=[],r=kn=[];for(const r of e)this.#q(r,t,n);if(wn=null,r.length>0){var i=In.ensure();for(const e of r)i.schedule(e)}if(Sn=null,kn=null,this.#F()){this.#H(n),this.#H(t);for(const[e,t]of this.#V)Nn(e,t)}else{this.#d.clear(),this.#h.clear();for(const e of this.#R)e(this);this.#R.clear(),Rn(n),Rn(t),0===this.#L&&this.#O(),this.#N?.resolve()}var o=wn;if(this.#D.length>0){const e=o??=this;e.#D.push(...this.#D.filter(t=>!e.#D.includes(t)))}null!==o&&(bn.add(o),o.#U())}#q(e,t,n){e.f^=b;for(var r=e.first;null!==r;){var i=r.f,o=!!(96&i);if(!(o&&0!==(i&b)||0!==(i&$)||this.#V.has(r))&&null!==r.fn){o?r.f^=b:4&i?t.push(r):fr(r)&&(0!==(i&p)&&this.#h.add(r),gr(r));var a=r.first;if(null!==a){r=a;continue}}for(;null!==r;){var s=r.next;if(null!==s){r=s;break}r=r.parent}}}#H(e){for(var t=0;t<e.length;t+=1)Te(e[t],this.#d,this.#h)}capture(e,t){t===U||this.previous.has(e)||this.previous.set(e,t),0===(e.f&A)&&(this.current.set(e,e.v),_n?.set(e,e.v))}activate(){wn=this}deactivate(){wn=null,_n=null}flush(){try{if(Cn=!0,wn=this,!this.#F()){for(const e of this.#d)this.#h.delete(e),xe(e,w),this.schedule(e);for(const e of this.#h)xe(e,_),this.schedule(e)}this.#U()}finally{xn=0,$n=null,Sn=null,kn=null,Cn=!1,wn=null,_n=null,Vn.clear()}}discard(){for(const e of this.#P)e(this);this.#P.clear()}#O(){if(bn.size>1){this.previous.clear();var e=wn,t=_n,n=!0;for(const e of bn){if(e===this){n=!1;continue}const t=[];for(const[r,i]of this.current){if(e.current.has(r)){if(!n||i===e.current.get(r))continue;e.current.set(r,i)}t.push(r)}if(0===t.length)continue;const r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){e.activate();const n=new Set,i=new Map;for(const e of t)Pn(e,r,n,i);if(e.#D.length>0){e.apply();for(const t of e.#D)e.#q(t,[],[])}e.deactivate()}}wn=e,_n=t}this.#V.clear(),bn.delete(this)}increment(e){this.#L+=1,e&&(this.#M+=1)}decrement(e,t){this.#L-=1,e&&(this.#M-=1),this.#j||t||(this.#j=!0,W(()=>{this.#j=!1,this.flush()}))}oncommit(e){this.#R.add(e)}ondiscard(e){this.#P.add(e)}settled(){return(this.#N??=h()).promise}static ensure(){if(null===wn){const e=wn=new In;Cn||(bn.add(wn),En||W(()=>{wn===e&&e.flush()}))}return wn}apply(){}schedule(e){if($n=e,e.b?.is_pending&&16777228&e.f&&0===(e.f&C))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===Sn||t!==Qn||null!==zn&&2&zn.f))return;if(96&n){if(0===(n&b))return;t.f^=b}}this.#D.push(t)}}}function Tn(e){var t=En;En=!0;try{for(;;){if(z(),null===wn)return;wn.flush()}}finally{En=t}}let An=null;function Rn(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&fr(r)&&(An=new Set,gr(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&Vr(r),An?.size>0)){Vn.clear();for(const e of An){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)An.has(n)&&(An.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||gr(n)}}An.clear()}}An=null}}function Pn(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const i of e.reactions){const e=i.f;2&e?Pn(i,t,n,r):4194320&e&&0===(e&w)&&Ln(i,t,r)&&(xe(i,w),Mn(i))}}function Ln(e,t,r){const i=r.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(n.call(t,i))return!0;if(2&i.f&&Ln(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Mn(e){wn.schedule(e)}function Nn(e,t){if(0===(e.f&g)||0===(e.f&b)){0!==(e.f&w)?t.d.push(e):0!==(e.f&_)&&t.m.push(e),xe(e,b);for(var n=e.first;null!==n;)Nn(n,t),n=n.next}}let Dn=new Set;const Vn=new Map;let jn=!1;function Fn(e,t){return{f:0,v:e,reactions:null,equals:D,rv:0,wv:0}}function Un(e,t){const n=Fn(e);return nr(n),n}function qn(e,t=!1,n=!0){const r=Fn(e);return t||(r.equals=j),r}function Hn(e,t,r=!1){return null===zn||Xn&&0===(zn.f&x)||!(4325394&zn.f)||null!==tr&&n.call(tr,e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Gn(e,r?se(t):t,kn)}function Gn(e,t,n=null){if(!e.equals(t)){var r=e.v;Zn?Vn.set(e,t):Vn.set(e,r),e.v=t;var i=In.ensure();if(i.capture(e,r),2&e.f){const t=e;0!==(e.f&w)&>(t),Oe(t)}e.wv=ur(),Bn(e,w,n),null===Qn||0===(Qn.f&b)||96&Qn.f||(null===or?function(e){or=e}([e]):or.push(e)),!i.is_fork&&Dn.size>0&&!jn&&function(){jn=!1;for(const e of Dn)0!==(e.f&b)&&xe(e,_),fr(e)&&gr(e);Dn.clear()}()}return t}function Yn(e){Hn(e,e.v+1)}function Bn(e,t,n){var r=e.reactions;if(null!==r)for(var i=r.length,o=0;o<i;o++){var a=r[o],s=a.f,l=0===(s&w);if(l&&xe(a,t),2&s){var c=a;_n?.delete(c),0===(s&I)&&(s&y&&(a.f|=I),Bn(c,_,n))}else if(l){var u=a;0!==(s&p)&&null!==An&&An.add(u),null!==n?n.push(u):Mn(u)}}}let Jn=!1,Zn=!1;function Wn(e){Zn=e}let zn=null,Xn=!1;function Kn(e){zn=e}let Qn=null;function er(e){Qn=e}let tr=null;function nr(e){null!==zn&&(null===tr?tr=[e]:tr.push(e))}let rr=null,ir=0,or=null;let ar=1,sr=0,lr=sr;function cr(e){lr=e}function ur(){return++ar}function fr(e){var t=e.f;if(0!==(t&w))return!0;if(2&t&&(e.f&=-65537),0!==(t&_)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(fr(o)&&mt(o),o.wv>e.wv)return!0}0!==(t&y)&&null===_n&&xe(e,b)}return!1}function dr(e,t,r=!0){var i=e.reactions;if(null!==i&&(null===tr||!n.call(tr,e)))for(var o=0;o<i.length;o++){var a=i[o];2&a.f?dr(a,t,!1):t===a&&(r?xe(a,w):0!==(a.f&b)&&xe(a,_),Mn(a))}}function hr(e){var t=rr,n=ir,r=or,i=zn,o=tr,a=H,s=Xn,l=lr,c=e.f;rr=null,ir=0,or=null,zn=96&c?null:e,tr=null,G(e.ctx),Xn=!1,lr=++sr,null!==e.ac&&(Ue(()=>{e.ac.abort(M)}),e.ac=null);try{e.f|=T;var u=(0,e.fn)();e.f|=C;var f=e.deps,d=wn?.is_fork;if(null!==rr){var h;if(d||pr(e,ir),null!==f&&ir>0)for(f.length=ir+rr.length,h=0;h<rr.length;h++)f[ir+h]=rr[h];else e.deps=f=rr;if(Cr()&&0!==(e.f&y))for(h=ir;h<f.length;h++)(f[h].reactions??=[]).push(e)}else!d&&null!==f&&ir<f.length&&(pr(e,ir),f.length=ir);if(!(null===or||Xn||null===f||6146&e.f))for(h=0;h<or.length;h++)dr(or[h],e);if(null!==i&&i!==e){if(sr++,null!==i.deps)for(let e=0;e<n;e+=1)i.deps[e].rv=sr;if(null!==t)for(const e of t)e.rv=sr;null!==or&&(null===r?r=or:r.push(...or))}return 0!==(e.f&A)&&(e.f^=A),u}catch(e){return Ce(e)}finally{e.f^=T,rr=t,ir=n,or=r,zn=i,tr=o,G(a),Xn=s,lr=l}}function vr(e,r){let i=r.reactions;if(null!==i){var o=t.call(i,e);if(-1!==o){var a=i.length-1;0===a?i=r.reactions=null:(i[o]=i[a],i.pop())}}if(null===i&&2&r.f&&(null===rr||!n.call(rr,r))){var s=r;0!==(s.f&y)&&(s.f^=y,s.f&=-65537),Oe(s),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(M),t.teardown=d,t.ac=null,pr(t,0),Mr(t))}(s),pr(s,0)}}function pr(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)vr(e,n[r])}function gr(e){var t=e.f;if(0===(t&E)){xe(e,b);var n=Qn,r=Jn;Qn=e,Jn=!0;try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&g)&&Nr(t),t=n}}(e):Mr(e),Lr(e);var i=hr(e);e.teardown="function"==typeof i?i:null,e.wv=ar}finally{Jn=r,Qn=n}}}async function mr(){await Promise.resolve(),Tn()}function yr(e){var t=!!(2&e.f);if(null!==zn&&!Xn&&!(null!==Qn&&0!==(Qn.f&E)||null!==tr&&n.call(tr,e))){var r=zn.deps;if(0!==(zn.f&T))e.rv<sr&&(e.rv=sr,null===rr&&null!==r&&r[ir]===e?ir++:null===rr?rr=[e]:rr.push(e));else{(zn.deps??=[]).push(e);var i=e.reactions;null===i?e.reactions=[zn]:n.call(i,zn)||i.push(zn)}}if(Zn&&Vn.has(e))return Vn.get(e);if(t){var o=e;if(Zn){var a=o.v;return(0===(o.f&b)&&null!==o.reactions||wr(o))&&(a=gt(o)),Vn.set(o,a),a}var s=0===(o.f&y)&&!Xn&&null!==zn&&(Jn||0!==(zn.f&y)),l=0===(o.f&C);fr(o)&&(s&&(o.f|=y),mt(o)),s&&!l&&(yt(o),br(o))}if(_n?.has(e))return _n.get(e);if(0!==(e.f&A))throw e.v;return e.v}function br(e){if(e.f|=y,null!==e.deps)for(const t of e.deps)(t.reactions??=[]).push(e),2&t.f&&0===(t.f&y)&&(yt(t),br(t))}function wr(e){if(e.v===U)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(Vn.has(t))return!0;if(2&t.f&&wr(t))return!0}return!1}function _r(e){var t=Xn;try{return Xn=!0,e()}finally{Xn=t}}function $r(e){null===Qn&&(null===zn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),Zn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Er(e,t){var n=Qn;null!==n&&0!==(n.f&$)&&(e|=$);var r={ctx:H,deps:null,nodes:null,f:e|w|y,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(4&e)null!==Sn?Sn.push(r):In.ensure().schedule(r);else if(null!==t){try{gr(r)}catch(e){throw Nr(r),e}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&O)&&(i=i.first,0!==(e&p)&&0!==(e&k)&&null!==i&&(i.f|=k))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==zn&&2&zn.f&&0===(e&m))){var o=zn;(o.effects??=[]).push(i)}return r}function Cr(){return null!==zn&&!Xn}function Sr(e){const t=Er(8,null);return xe(t,b),t.teardown=e,t}function kr(e){$r();var t=Qn.f;if(!(!zn&&0!==(t&g)&&0===(t&C)))return xr(e);var n=H;(n.e??=[]).push(e)}function xr(e){return Er(1048580,e)}function Or(e){return Er(4,e)}function Ir(e,t=0){return Er(8|t,e)}function Tr(e,t=[],n=[],r=[]){bt(r,t,n,t=>{Er(8,()=>e(...t.map(yr)))})}function Ar(e,t=0){return Er(p|t,e)}function Rr(e,t=0){return Er(v|t,e)}function Pr(e){return Er(524320,e)}function Lr(e){var t=e.teardown;if(null!==t){const e=Zn,n=zn;Wn(!0),Kn(null);try{t.call(null)}finally{Wn(e),Kn(n)}}}function Mr(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Ue(()=>{e.abort(M)});var r=n.next;0!==(n.f&m)?n.parent=null:Nr(n,t),n=r}}function Nr(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(Dr(e.nodes.start,e.nodes.end),n=!0),xe(e,S),Mr(e,t&&!n),pr(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();Lr(e),e.f^=S,e.f|=E;var i=e.parent;null!==i&&null!==i.first&&Vr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Dr(e,t){for(;null!==e;){var n=e===t?null:ye(e);e.remove(),e=n}}function Vr(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function jr(e,t,n=!0){var r=[];Fr(e,r,!0);var i=()=>{n&&Nr(e),t&&t()},o=r.length;if(o>0){var a=()=>--o||i();for(var s of r)s.out(a)}else i()}function Fr(e,t,n){if(0===(e.f&$)){e.f^=$;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var o=i.next;Fr(i,t,!!(0!==(i.f&k)||0!==(i.f&g)&&0!==(e.f&p))&&n),i=o}}}function Ur(e,t){if(0!==(e.f&$)){e.f^=$,0===(e.f&b)&&(xe(e,w),In.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;Ur(n,!!(0!==(n.f&k)||0!==(n.f&g))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function qr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:ye(n);t.append(n),n=i}}function Hr(e){const t={get:e=>gn(t.store)[e],set:(e,n)=>{"string"==typeof e?Object.assign(gn(t.store),{[e]:n}):Object.assign(gn(t.store),e),t.store.set(gn(t.store))},store:pn(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:Hr({}),i18n:Hr({}),instances:new Set,plugins:new Set};const Gr={ariaLinkLabel:"Visit Altcha.org",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};"$altcha"in globalThis&&globalThis.$altcha.i18n.set("en",Gr);"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");var Yr=et('<label class="altcha-checkbox"><input/> <svg width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></label>');function Br(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Yr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(4),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(Br,{loading:{}},[],[],{mode:"open"});var Jr=et('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function Zr(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Jr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(2),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(Zr,{loading:{}},[],[],{mode:"open"});var Wr=et('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>');function zr(e,t){Y(t,!0);let n=sn(t,"strings");var r={get strings(){return n()},set strings(e){n(e),Tn()}},i=Wr(),o=be(i);return Zt(o,"href","https://altcha.org"),re(i),Tr(()=>Zt(o,"aria-label",n().ariaLinkLabel)),ot(e,i),B(r)}fn(zr,{strings:{}},[],[],{mode:"open"});var Xr=et('<div class="altcha-footer"><div></div> <!></div>');function Kr(e,t){Y(t,!0);let n=sn(t,"logo"),r=sn(t,"strings");var i={get logo(){return n()},set logo(e){n(e),Tn()},get strings(){return r()},set strings(e){r(e),Tn()}},o=Xr(),a=be(o);St(a,()=>r().footer,!0),re(a);var s=_e(a,2),l=e=>{zr(e,{get strings(){return r()}})};return Et(s,e=>{n()&&e(l)}),re(o),ot(e,o),B(i)}fn(Kr,{logo:{},strings:{}},[],[],{mode:"open"});var Qr=et('<label class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></label>');function ei(e,t){Y(t,!0);let n=sn(t,"loading"),r=an(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return n()},set loading(e){n(e),Tn()}},o=Qr();return Wt(be(o),()=>({type:"checkbox",...r}),void 0,void 0,void 0,0,!0),ie(2),re(o),Tr(()=>Zt(o,"data-loading",n())),ot(e,o),B(i)}fn(ei,{loading:{}},[],[],{mode:"open"});var ti=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ti||{}),ni=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(ni||{}),ri=et('<div class="altcha-code-challenge-title"> </div>'),ii=et('<div class="altcha-spinner"></div>'),oi=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),ai=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),si=nt('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),li=et('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),ci=et('<audio hidden="" autoplay=""></audio>'),ui=et('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function fi(e,t){Y(t,!0);let n=sn(t,"audioUrl"),r=sn(t,"codeChallenge"),i=sn(t,"config"),o=sn(t,"imageUrl"),a=sn(t,"onCancel"),s=sn(t,"onReload"),l=sn(t,"onSubmit"),c=sn(t,"strings"),u=Un(void 0),f=Un(void 0),d=Un(void 0),h=Un(!1),v=Un(""),p=Un(!1);function g(){Hn(u,ti.PAUSED,!0)}function m(e){Hn(u,ti.ERROR,!0)}function y(){Hn(u,ti.READY,!0)}function b(){Hn(u,ti.LOADING,!0)}function w(){Hn(u,ti.PLAYING,!0)}function _(){Hn(u,ti.PAUSED,!0)}function $(){yr(f)?yr(u)===ti.LOADING||(yr(f).paused?(n()&&yr(f).src!==n()&&(yr(f).src=n()),yr(f).currentTime=0,yr(f).play()):yr(f).pause()):(Hn(p,!0),requestAnimationFrame(()=>{yr(f)&&n()&&(yr(f).src=n(),yr(f).play())}))}dn(()=>(i().disableAutoFocus||mr().then(()=>{yr(d)?.focus()}),()=>{yr(f)&&(yr(f).pause(),Hn(f,void 0))}));var E={get audioUrl(){return n()},set audioUrl(e){n(e),Tn()},get codeChallenge(){return r()},set codeChallenge(e){r(e),Tn()},get config(){return i()},set config(e){i(e),Tn()},get imageUrl(){return o()},set imageUrl(e){o(e),Tn()},get onCancel(){return a()},set onCancel(e){a(e),Tn()},get onReload(){return s()},set onReload(e){s(e),Tn()},get onSubmit(){return l()},set onSubmit(e){l(e),Tn()},get strings(){return c()},set strings(e){c(e),Tn()}},C=ui(),S=be(C),k=be(S),x=e=>{var t=ri(),n=be(t,!0);re(t),Tr(()=>st(n,c().verificationRequired)),ot(e,t)};Et(k,e=>{"standard"!==i().codeChallengeDisplay&&e(x)});var O=_e(k,2),I=be(O,!0);re(O);var T=_e(O,2),A=_e(T,2),R=be(A);Bt(R),R.disabled=yr(h),rn(R,e=>Hn(d,e),()=>yr(d));var P=_e(R,2),L=e=>{var t=li(),n=be(t),r=e=>{ot(e,ii())},i=e=>{ot(e,oi())},o=e=>{ot(e,ai())},a=e=>{ot(e,si())};Et(n,e=>{yr(u)===ti.LOADING?e(r):yr(u)===ti.ERROR?e(i,1):yr(u)===ti.PLAYING?e(o,2):e(a,-1)}),re(t),Tr(()=>{Zt(t,"title",c().getAudioChallenge),t.disabled=yr(u)===ti.LOADING||yr(u)===ti.ERROR,Zt(t,"aria-label",yr(u)===ti.LOADING?c().loading:c().getAudioChallenge)}),Je("click",t,()=>$()),ot(e,t)};Et(P,e=>{r().audio&&e(L)});var M=_e(P,2);re(A);var N=_e(A,2),D=be(N),V=be(D,!0);re(D);var j=_e(D,2),F=be(j,!0);re(j),re(N),re(S);var U=_e(S,2),q=e=>{var t=ci();rn(t,e=>Hn(f,e),()=>yr(f)),Be("error",t,m),Be("loadstart",t,b),Be("canplay",t,y),Be("pause",t,_),Be("playing",t,w),Be("ended",t,g),ot(e,t)};return Et(U,e=>{yr(p)&&e(q)}),re(C),Tr(()=>{st(I,c().enterCodeFromImage),Zt(T,"src",o()),Zt(R,"minlength",r().length||1),Zt(R,"maxlength",r().length),Zt(R,"placeholder",c().enterCode),Zt(R,"aria-label",yr(u)===ti.LOADING?c().loading:yr(u)===ti.PLAYING?"":c().enterCodeAria),Zt(R,"aria-live",yr(u)?"assertive":"polite"),Zt(R,"aria-busy",yr(u)===ti.LOADING),Zt(M,"title",c().reload),Zt(M,"aria-label",c().reload),Zt(D,"aria-label",c().verify),st(V,c().verify),Zt(j,"aria-label",c().cancel),st(F,c().cancel)}),Be("submit",S,function(e){e.preventDefault(),e.stopPropagation(),l()?.(yr(v))},!0),Je("keydown",R,function(e){"Space"===e.code?(e.preventDefault(),e.stopPropagation(),$()):"Escape"===e.code&&(e.preventDefault(),e.stopPropagation(),a()?.())}),Qt(R,()=>yr(v),e=>Hn(v,e)),Je("click",M,()=>s()?.()),Je("click",j,()=>a()?.()),ot(e,C),B(E)}Ze(["keydown","click"]),fn(fi,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var di=et('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),hi=et('<div class="altcha-popover-arrow"></div>'),vi=et('<div role="button" class="altcha-popover-close">×</div>'),pi=et('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function gi(e,t){Y(t,!0);let n=sn(t,"anchor"),r=sn(t,"children"),i=sn(t,"display",0,"standard"),o=sn(t,"backdrop",0,!1),a=sn(t,"onClickOutside"),s=sn(t,"onClickOutsideDelay",0,600),l=sn(t,"onClose"),c=sn(t,"placement",0,"auto"),u=sn(t,"variant",0,"neutral"),f=an(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","variant"]),h=Un(void 0),v=Un(void 0),p=Un(!1),g=Un(0);function m(){l()?.()}function y(){if(n()&&"auto"===c()&&yr(h)){const e=n().getBoundingClientRect(),t=document.documentElement.clientHeight-(e.top+e.height)<yr(h).clientHeight;yr(p)!==t&&Hn(p,t)}}kr(()=>{"auto"!==c()&&Hn(p,"top"===c())}),dn(()=>{const e="bottomsheet"===i()||"overlay"===i();return e&&(yr(v)&&document.body.append(yr(v)),yr(h)&&document.body.append(yr(h))),y(),mr().then(()=>{Hn(g,Date.now(),!0)}),()=>{e&&(yr(v)&&document.body.removeChild(yr(v)),yr(h)&&document.body.removeChild(yr(h)))}});var b={get anchor(){return n()},set anchor(e){n(e),Tn()},get children(){return r()},set children(e){r(e),Tn()},get display(){return i()},set display(e="standard"){i(e),Tn()},get backdrop(){return o()},set backdrop(e=!1){o(e),Tn()},get onClickOutside(){return a()},set onClickOutside(e){a(e),Tn()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay(e=600){s(e),Tn()},get onClose(){return l()},set onClose(e){l(e),Tn()},get placement(){return c()},set placement(e="auto"){c(e),Tn()},get variant(){return u()},set variant(e="neutral"){u(e),Tn()}},w=pi();Be("click",ue,function(e){const t=e.target;!yr(h)?.contains(t)&&yr(g)&&yr(g)+s()<Date.now()&&a()?.()}),Be("resize",ue,function(){y()}),Be("scroll",ue,function(){y()});var _=we(w),$=e=>{var t=di();rn(t,e=>Hn(v,e),()=>yr(v)),ot(e,t)};Et(_,e=>{o()&&e($)});var E=_e(_,2);Wt(E,()=>({...f,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":u(),"data-top":yr(p),"data-display":i()}));var C=be(E),S=e=>{ot(e,hi())};Et(C,e=>{"standard"===i()&&e(S)});var x=_e(C,2),O=e=>{var t=vi();Je("click",t,m),ot(e,t)};Et(x,e=>{"standard"!==i()&&e(O)});var I=_e(x,2);return function(e,t,...n){var r=new $t(e);Ar(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},k)}(be(I),()=>r()??d),re(I),re(E),rn(E,e=>Hn(h,e),()=>yr(h)),ot(e,w),B(b)}async function mi(e){const{challenge:t,concurrency:n=navigator.hardwareConcurrency,controller:r=new AbortController,createWorker:i,onOutOfMemory:o=e=>e>1?Math.floor(e/2):0,counterMode:a,timeout:s=9e4}=e,l=Math.min(16,Math.max(1,n)),c=[],u=()=>{for(const e of c)e.terminate()};for(let e=0;e<l;e++)c.push(await i(t.parameters.algorithm));let f=null;try{f=await Promise.race(c.map((e,n)=>(r.signal.addEventListener("abort",()=>{e.postMessage({type:"abort"})}),new Promise((r,i)=>{e.addEventListener("error",e=>{i(e)}),e.addEventListener("message",t=>{if(t.data){for(const t of c)t!==e&&t.postMessage({type:"abort"});if(t.data.error)return i(new Error(t.data.error))}r(t.data)}),e.postMessage({challenge:t,counterMode:a,counterStart:n,counterStep:l,timeout:s,type:"work"})}))))}catch(n){if(n instanceof Error&&!!n?.message?.includes("Out of memory")&&o){u();const n=o(l);if(n)return mi({...e,challenge:t,controller:r,concurrency:n,createWorker:i})}throw n}finally{u()}return r.signal.aborted?null:f||null}Ze(["click"]),fn(gi,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},variant:{}},[],[],{mode:"open"});class yi{TAG_CODES={INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10};maxSamples;sampleInterval;target;focusStartTime=0;focusInteraction=0;focusInteractionTimer=null;lastPointerSample=0;lastTouchSample=0;lastScrollSample=0;pendingPointer=null;pendingTouch=null;focus=[];pointer=[];scroll=[];touch=[];constructor(e={}){const{maxSamples:t=60,sampleInterval:n=50,target:r=window}=e;this.maxSamples=t,this.sampleInterval=n,this.target=r,this.attach()}destroy(){const e={capture:!0};this.target.removeEventListener("focusin",this.onFocus,e),this.target.removeEventListener("keydown",this.onInteraction,e),this.target.removeEventListener("pointerdown",this.onInteraction,e),this.target.removeEventListener("pointermove",this.onPointer,e),this.target.removeEventListener("scroll",this.onScroll,e),this.target.removeEventListener("touchmove",this.onTouchMove,e)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,time:Date.now(),touch:this.touch}}attach(){const e={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,e),this.target.addEventListener("keydown",this.onInteraction,e),this.target.addEventListener("pointerdown",this.onInteraction,e),this.target.addEventListener("pointermove",this.onPointer,e),this.target.addEventListener("scroll",this.onScroll,e),this.target.addEventListener("touchmove",this.onTouchMove,e)}evict(e){e.length>this.maxSamples&&e.splice(0,e.length-this.maxSamples)}onFocus=e=>{if(2===this.focusInteraction)return;const t=e.target;if(!(t instanceof Element))return;const n=performance.now();0===this.focusStartTime&&(this.focusStartTime=n),this.focus.push([Math.round(n-this.focusStartTime),t.tabIndex,this.TAG_CODES[t.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)};onInteraction=e=>{this.focusInteraction="keyCode"in e?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)};onPointer=e=>{if("touch"===e.pointerType)return;const t=e.timeStamp||performance.now();this.pendingPointer=[Math.round(e.clientX),Math.round(e.clientY),Math.round(t)],t-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=t,this.pendingPointer=null,this.evict(this.pointer))};onScroll=()=>{const e=performance.now();e-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(e)]),this.lastScrollSample=e,this.evict(this.scroll))};onTouchMove=e=>{const t=e.timeStamp||performance.now(),n=e.touches[0];n&&(this.pendingTouch=[Math.round(n.clientX),Math.round(n.clientY),Math.round(t),Math.round(1e3*n.force)/1e3,Math.round(n.radiusX||0),Math.round(n.radiusY||0)],t-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=t,this.pendingTouch=null,this.evict(this.touch)))}}var bi=et('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),wi=et('<div class="altcha-overlay-content"></div>'),_i=et('<div role="button" class="altcha-overlay-close">×</div> <!>',1),$i=et('<div class="altcha-floating-arrow"></div>'),Ei=et('<input type="hidden"/>'),Ci=et('<div class="altcha-error">Secure context (HTTPS) required.</div>'),Si=et('<div class="altcha-error"> </div>'),ki=et('<div class="altcha-error"> </div>'),xi=et("<!> <!>",1),Oi=et('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);Ze(["click"]),"undefined"!=typeof window&&window.customElements&&customElements.define("altcha-widget",fn(function(e,t){Y(t,!0);const[n,r]=function(){const e={};return[e,function(){Sr(()=>{for(var t in e)e[t].unsubscribe();o(e,mn,{enumerable:!1,value:!0})})}]}(),i=["ar","fa","he","ur"],{isSecureContext:a}=globalThis,{store:s}=globalThis.$altcha.defaults,l=navigator.hardwareConcurrency||2,c=navigator.deviceMemory||0,u=c&&c<=4?Math.min(4,l):l,f=globalThis.$altcha.i18n.store,d=t.$$host,h=(e,t)=>{mr().then(()=>{d?.dispatchEvent(new CustomEvent(e,{detail:t}))})};let v=null,p=Un(se(new URL(location.origin))),g=Un(!1),m=Un(null),y=Un(null),b=Un(se(ni.UNVERIFIED)),w=Un(void 0),_=Un(void 0),$=Un(null),E=Un(void 0),C=Un(null),S=Un(null),x=Un(null),O=Un(null),I=Un(se([])),T=Un(se({})),A=Un(!0);const R=pt(()=>({fetch:(e,t)=>fetch(e,t),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:u,...yn(s,"$altchaDefaults",n),...yr(T)})),P=pt(()=>`altcha-checkbox-${t.id||Math.floor(1e12*Math.random()).toString(16)}`),L=pt(()=>function(e){switch(e){case"checkbox":return Br;case"switch":return ei;default:return Zr}}(yr(R).type)),M=pt(()=>yr(R).auto),N=pt(()=>yr(b)===ni.VERIFYING),D=pt(()=>!yr(R).hideFooter),V=pt(()=>!yr(R).hideLogo&&"bar"!==yr(R).display),j=pt(()=>function(e,t){const n=Object.keys(e).map(e=>e.toLowerCase());let r=t.reduce((t,r)=>(r=r.toLowerCase(),t||(e[r]?r:null)||n.find(e=>r.split("-")[0]===e.split("-")[0])||null),null);e[r||""]||(r="en");return{language:r,strings:e[r]}}(yn(f,"$altchaI18nStore",n),[yr(R).language,document.documentElement.lang,...navigator.languages])),F=pt(()=>i.includes(yr(j).language)?"rtl":void 0),U=pt(()=>({...yr(j).strings})),q=pt(()=>yr(m)?.audio?.match(/^(https?:)?\//)?X(yr(m).audio,yr(p),{language:yr(R).audioChallengeLanguage||yr(j).language}).toString():yr(m)?.audio),H=pt(()=>yr(m)?.image?.match(/^(https?:)?\//)?X(yr(m).image,yr(p)):yr(m)?.image);async function G(e,...t){let n;for(const r of yr(I))n=await r[e].call(r,...t);return n}async function J(e){await new Promise(t=>setTimeout(t,e))}async function Z(e=yr(R).challenge,t){const n=await G("onFetchChallenge",e);let r=null;if(void 0!==n)return n;if("string"==typeof e)if(e.match(/^(https?:)?\//)){Ce("fetching challenge from",t?.method||"GET",e),Hn(p,new URL(e,location.origin),!0);const n=await yr(R).fetch(e,{credentials:yr(R).credentials||void 0,...t});await me(n);const i=n.headers.get("x-altcha-config");i&&function(e){try{const t=JSON.parse(e);t&&"object"==typeof t&&$e({serverVerificationFields:t?.sentinel?.fields,serverVerificationTimeZone:t?.sentinel?.timeZone,verifyUrl:t.verifyurl,...t})}catch(e){Ce("unable to configure from x-altcha-config header",e)}}(i);const o=await n.json();if(o&&"his"in o&&o.his){if(Ce("requested HIS"),!v)throw new Error("Server requested HIS data but collector is disabled.");return Z(X(o.his.url,yr(p)),{body:JSON.stringify({his:v.export()}),headers:{"content-type":"application/json"},method:"POST"})}o&&"hisResult"in o&&o.hisResult&&Ce("HIS result",o.hisResult),r=o}else{Ce("parsing JSON challenge");try{r=JSON.parse(e)}catch{throw new Error("Unable to parse JSON challenge.")}}else if(e&&"object"==typeof e)try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("Unable to parse JSON challenge.")}if(function(e){return"object"==typeof e&&"challenge"in e}(r)&&(r=function(e){const[t,n]=e.salt.split("?"),r={};if(n)try{Object.assign(r,Object.fromEntries(new URLSearchParams(n).entries()))}catch{}const i={codeChallenge:e.codeChallenge,parameters:{algorithm:e.algorithm,cost:1,data:r,expiresAt:r?.expires?parseInt(r.expires,10):void 0,keyLength:"SHA-512"===e.algorithm?64:"SHA-384"===e.algorithm?48:32,nonce:(o=(new TextEncoder).encode(e.salt),Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")),keyPrefix:e.challenge,salt:""},signature:e.signature};var o;return Object.defineProperties(i,{_originalSalt:{enumerable:!1,value:e.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),i}(r)),!function(e){return!!e&&"object"==typeof e&&"parameters"in e&&!!e.parameters&&"object"==typeof e.parameters&&"algorithm"in e.parameters&&"nonce"in e.parameters&&"salt"in e.parameters&&"keyPrefix"in e.parameters}(r))throw new Error("Challenge validation failed.");return r}function W(){return document.getElementById(yr(P))}function z(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function X(e,t,n){const r=new URL(e,t);if(r.search||(r.search=t.search),n)for(const e in n)void 0!==n[e]&&null!==n[e]&&r.searchParams.set(e,n[e]);return r.toString()}function ie(e){!yr(g)&&e.currentTarget.checked?(e.preventDefault(),e.currentTarget.checked=!1,yr(b)!==ni.VERIFYING&&Ie()):e.currentTarget.checked||(e.preventDefault(),Se())}function le(e){yr(b)===ni.VERIFYING?e.currentTarget.setCustomValidity(yr(U).waitAlert):yr(R).validationMessage&&e.currentTarget.setCustomValidity(yr(R).validationMessage)}function ce(){yr(y)&&yr(y).abort(),ge(yr(R).display),Se()}function de(e){"onfocus"===yr(M)&&yr(b)===ni.UNVERIFIED&&Ie()}function he(){yr(y)&&yr(y).abort(),ge(yr(R).display),Se()}function ve(e){Hn(C,e.submitter,!0),"onsubmit"===yr(M)&&yr(b)===ni.UNVERIFIED&&(e.preventDefault(),e.stopPropagation(),xe(),Ie().then(e=>{e&&!yr(m)&&mr().then(()=>{pe(yr(C))})}))}function pe(e){yr($)&&"requestSubmit"in yr($)?yr($).requestSubmit(e):yr($)?.reportValidity()&&(e?e.click():yr($).submit())}function ge(e){switch(e){case"bar":case"floating":case"overlay":Ee(),yr(M)&&"off"!==yr(M)||(yr(T).auto="onsubmit");break;case"standard":xe()}}async function me(e){if(e.status>=400){if(e.headers.get("content-type")?.includes("/json")){let t;try{t=await e.json()}catch{}if(t&&"error"in t)throw new Error(`Server responded with ${e.status} - ${t.error}`)}throw new Error(`Server responded with ${e.status}.`)}const t=e.headers.get("content-type");if(!t||!t.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${t}.`)}async function ye(e){if(!yr(O))return void ke(ni.ERROR,"Cannot verify code challenge without PoW payload.");ke(ni.VERIFYING);let t=null;if(yr(R).verifyUrl)t=await async function(e,t){const n=await G("onRequestServerVerification",e,t);if(void 0!==n)return n;if(Ce("requesting server verification from",yr(R).verifyUrl),!yr(R).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const r=await yr(R).fetch(X(yr(R).verifyUrl,yr(p)),{body:JSON.stringify({code:t,fields:yr(R).serverVerificationFields?[...yr($)?.querySelectorAll('input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((e,t)=>{const n=t.name,r=t.value;return n&&r&&(e[n]=/\n/.test(r)?r.replace(new RegExp("(?<!\\r)\\n","g"),"\r\n"):r),e},{}):void 0,payload:e,timeZone:yr(R).serverVerificationTimeZone?z():void 0}),credentials:yr(R).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await me(r);const i=await r.json();return i&&"object"==typeof i&&"payload"in i&&i.payload&&h("serververification",i),i}(yr(O),e);else{if(!yr(R).verifyFunction)return void ke(ni.ERROR,"Parameter verifyUrl is required for code challenge verification.");t=await yr(R).verifyFunction(yr(O),e)}t?.payload&&(Hn(O,t.payload,!0),Ce("server payload",yr(O))),!0===t?.verified?(Ce("verified"),ke(ni.VERIFIED),h("verified",{payload:yr(O)}),"onsubmit"===yr(M)&&mr().then(()=>{pe(yr(C))})):ke(ni.ERROR,t?.reason||"Verification failed."),yr(R).disableAutoFocus||W()?.focus()}function $e(e){Object.assign(yr(T),{...Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t))})}function Ee(){Hn(A,!1)}function Ce(...e){(yr(R).debug||e.some(e=>e instanceof Error))&&console[e[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${yr(R).name}]`,...e)}function Se(e=ni.UNVERIFIED,t=null){Hn(g,!1),Hn(S,t,!0),Hn(O,null),yr(x)&&(clearTimeout(yr(x)),Hn(x,null)),ke(e)}function ke(e,t=null){Hn(b,e,!0),Hn(S,t,!0),h("statechange",{payload:yr(O),state:yr(b)})}function xe(){Hn(A,!0),mr().then(()=>{Oe()})}function Oe(){if("floating"===yr(R).display)return function(e=20){if(!yr(E))return;const t=yr(R).floatingPlacement;if(!yr(_)&&(Hn(_,(yr(R).floatingAnchor instanceof HTMLElement?yr(R).floatingAnchor:yr(R).floatingAnchor?document.querySelector(yr(R).floatingAnchor):yr($)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||yr($),!0),!yr(_)))return void Ce("unable to find floating anchor element");const n=parseInt(yr(R).floatingOffset,10)||12,r=yr(_).getBoundingClientRect(),i=yr(E).getBoundingClientRect(),o=document.documentElement.clientHeight,a=document.documentElement.clientWidth,s=t&&"auto"!==t?"top"===t:r.bottom+i.height+n+e>o,l=Math.max(e,Math.min(a-e-i.width,r.left+r.width/2-i.width/2));if(yr(E).style.setProperty("--altcha-floating-left",`${l}px`),yr(E).style.setProperty("--altcha-floating-top",s?r.top-(i.height+n)+"px":`${r.bottom+n}px`),yr(E).setAttribute("data-floating-position",s?"top":"bottom"),yr(w)){const e=yr(w).getBoundingClientRect();yr(w).style.left=r.left-l+r.width/2-e.width/2+"px"}}()}async function Ie(e={}){const{concurrency:t=Math.max(1,yr(R).workers),controller:n=new AbortController,minDuration:r=yr(R).minDuration}=e,i=performance.now();let o=null,s=null,l=!1;const c=await G("onVerify",e);if(void 0!==c)return c;Hn(y,n,!0),Se(ni.VERIFYING);try{if(!a)throw new Error("Secure context (HTTPS) required.");if(yr(R).mockError)throw new Error("Mock error.");if(yr(R).test)return Ce("running test mode with null challenge"),await J(Math.max(0,r-(performance.now()-i))),Hn(O,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),Ce("verified"),ke(ni.VERIFIED),h("vefified",{payload:yr(O)}),{payload:yr(O)};if(o=await Z(),!o)throw new Error("Failed to fetch challenge.");Ce("challenge",o),"configuration"in o&&(Ce("re-configuring from challenge",o.configuration),$e(o.configuration)),o.parameters.expiresAt&&function(e){yr(x)&&clearTimeout(yr(x));const t=()=>{yr(b)!==ni.UNVERIFIED?(Hn(g,!1),ke(ni.EXPIRED)):Se(),h("expired")},n=1e3*e-Date.now();n>=1?Hn(x,setTimeout(t,n),!0):t()}(o.parameters.expiresAt),l="_version"in o&&1===o._version;const e=globalThis.$altcha.algorithms.get(o.parameters.algorithm);if(!e)throw new Error(`Unsupported algorithm ${o.parameters.algorithm}.`);if(s=await mi({challenge:o,concurrency:t,controller:n,createWorker:e,counterMode:l?"string":"uint32",onOutOfMemory:e=>{if(Ce("out of memory error received"),h("outofmemory"),yr(R).retryOnOutOfMemoryError&&e>1){const t=Math.floor(e/2);return Ce(`retrying with ${t} workers...`),t}},timeout:yr(R).timeout}),yr(y)?.signal.aborted)return Se(),null;if(!s)throw new Error("Failed to find solution.");Ce("solution",s),await J(Math.max(0,r-(performance.now()-i))),Hn(m,o.codeChallenge||yr(R).codeChallenge||null,!0),Hn(O,l?btoa(JSON.stringify(function(e,t){return{algorithm:e.parameters.algorithm,challenge:e.parameters.keyPrefix,number:t.counter,salt:"_originalSalt"in e?e._originalSalt:e.parameters.nonce,signature:e.signature,took:t.time||0}}(o,s))):btoa(JSON.stringify({challenge:{parameters:o.parameters,signature:o.signature},solution:s})),!0),yr(m)?(Ce("requesting code verification"),ke(ni.CODE),h("codechallenge",{codeChallenge:yr(m)})):yr(R).verifyUrl?await ye():(Ce("verified"),ke(ni.VERIFIED),h("vefified",{payload:yr(O)}))}catch(e){return Ce("verification failed",e),ke(ni.ERROR,String(e)),null}finally{Hn(y,null)}return{challenge:o,payload:yr(O),solution:s}}kr(()=>{$e({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),kr(()=>{if(t.configuration)try{$e(JSON.parse(t.configuration))}catch{Ce("unable to parse the `configuration` attribute (JSON expected)")}}),kr(()=>{ge(yr(R).display)}),kr(()=>{yr(g)&&yr(b)===ni.VERIFYING&&Hn(g,!1)}),kr(()=>{yr(g)||yr(b)!==ni.VERIFIED||Hn(g,!0)}),kr(()=>{if(!yr(g)){const e=W();e&&e.checked&&(e.checked=!1)}}),kr(()=>{yr(b)===ni.VERIFIED&&W()?.setCustomValidity("")}),kr(()=>{if("onload"===yr(M)){const e=setTimeout(()=>{Ie()},1);return()=>{e&&clearTimeout(e)}}}),kr(()=>{yr(S)&&Ce("error:",yr(S))}),kr(()=>{yr(O)&&yr(R).setCookie&&function(e,t={}){const{domain:n,name:r=yr(R).name,maxAge:i,path:o,sameSite:a,secure:s}=t;let l=`${encodeURIComponent(r)}=${encodeURIComponent(e)}`;n&&(l+=`; Domain=${n}`);null!=i&&(l+=`; Max-Age=${i}`);o&&(l+=`; Path=${o}`);a&&(l+=`; SameSite=${a}`);s&&(l+="; Secure");document.cookie=l}(yr(O),yr(R).setCookie)}),dn(()=>(Ce("mounted","3.0.0"),d&&globalThis.$altcha.instances.add(d),Hn($,yr(E)?.closest("form"),!0),yr($)?.addEventListener("reset",he),yr($)?.addEventListener("submit",ve,{capture:!0}),yr($)?.addEventListener("focusin",de),function(){Hn(I,[...globalThis.$altcha.plugins].map(e=>new e(d)),!0),Ce("activating plugins",yr(I).map(e=>e.constructor.name));for(const e of yr(I))e.activate()}(),yr(R).humanInteractionSignature&&(Ce("human interaction signature enabled"),v=new yi),h("load"),a||Ce("secure context (HTTPS) required"),()=>{!function(){for(const e of yr(I))e.destroy()}(),d&&globalThis.$altcha.instances.delete(d),yr(x)&&clearTimeout(yr(x)),yr($)?.removeEventListener("reset",he),yr($)?.removeEventListener("submit",ve,{capture:!0}),yr($)?.removeEventListener("focusin",de),v?.destroy()}));var Te={configure:$e,getConfiguration:function(){return{...yr(R)}},getState:function(){return yr(b)},hide:Ee,log:Ce,reset:Se,setState:ke,show:xe,updateUI:Oe,verify:Ie},Ae=Oi();Be("scroll",fe,function(){Oe()}),Be("click",fe,function(e){const t=e.target;"floating"!==yr(R).display||!t||d?.contains(t)||t.hasAttribute("data-backdrop")||t.closest("[data-popover]")||yr(b)===ni.VERIFIED||yr(R).floatingPersist||Ee()}),Be("pageshow",ue,function(){Se()}),Be("resize",ue,function(){Oe()});var Re=we(Ae),Pe=e=>{ot(e,bi())};Et(Re,e=>{"overlay"===yr(R).display&&yr(A)&&e(Pe)});var Le=_e(Re,2),Me=be(Le),Ne=e=>{var t=_i(),n=we(t),r=_e(n,2),i=e=>{var t=wi();St(t,()=>document.querySelector(yr(R).overlayContent)?.innerHTML,!0),re(t),ot(e,t)};Et(r,e=>{yr(R).overlayContent&&e(i)}),Je("click",n,ce),ot(e,t)};Et(Me,e=>{"overlay"===yr(R).display&&yr(A)&&e(Ne)});var De=_e(Me,2),Ve=be(De),je=be(Ve),Fe=be(je);{let e=pt(()=>"standard"===yr(R).display&&"onsubmit"!==yr(M)||yr(b)===ni.VERIFYING);!function(e,t,n){var r;Q&&(r=K,ne());var i=new $t(e);Ar(()=>{var e=t()??null;if(Q&&"["===ae(r)!=(null!==e)){var o=oe();return te(o),i.anchor=o,ee(!1),i.ensure(e,e&&(t=>n(t,e))),void ee(!0)}i.ensure(e,e&&(t=>n(t,e)))},k)}(Fe,()=>yr(L),(t,n)=>{n(t,{get id(){return yr(P)},name:"",get required(){return yr(e)},get loading(){return yr(N)},get checked(){return yr(g)},onchange:ie,oninvalid:le})})}var Ue=_e(Fe,2),qe=be(Ue),He=e=>{var t=rt();Tr(()=>st(t,yr(U).verificationRequired)),ot(e,t)},Ge=e=>{var t=rt();Tr(()=>st(t,yr(U).verifying)),ot(e,t)},Ye=e=>{var t=rt();Tr(()=>st(t,yr(U).verified)),ot(e,t)},Ze=e=>{var t=rt();Tr(()=>st(t,yr(U).label)),ot(e,t)};Et(qe,e=>{yr(b)===ni.CODE&&yr(m)?e(He):yr(b)===ni.VERIFYING?e(Ge,1):yr(b)===ni.VERIFIED?e(Ye,2):e(Ze,-1)}),re(Ue),re(je);var We=_e(je,2),ze=e=>{zr(e,{get strings(){return yr(U)}})};Et(We,e=>{yr(V)&&e(ze)}),re(Ve);var Xe=_e(Ve,2),Ke=e=>{{let t=pt(()=>"bar"===yr(R).display&&yr(V));Kr(e,{get logo(){return yr(t)},get strings(){return yr(U)}})}};Et(Xe,e=>{yr(D)&&e(Ke)});var Qe=_e(Xe,2),et=e=>{var t=$i();rn(t,e=>Hn(w,e),()=>yr(w)),ot(e,t)};Et(Qe,e=>{"floating"===yr(R).display&&e(et)});var tt=_e(Qe,2),nt=e=>{var t=Ei();Bt(t),Tr(()=>{var e,n,r;Zt(t,"name",yr(R).name),e=t,n=yr(O),(r=zt(e)).value!==(r.value=n??void 0)&&(e.value!==n||0===n&&e.nodeName===Yt)&&(e.value=n??"")}),ot(e,t)};Et(tt,e=>{yr(R).setCookie||e(nt)}),re(De);var at=_e(De,2),lt=e=>{gi(e,{get anchor(){return yr(E)},onClickOutside:()=>{a&&Se()},get placement(){return yr(R).popoverPlacement},role:"alert",variant:"error",get dir(){return yr(F)},children:(e,t)=>{var n=it(),r=we(n),i=e=>{ot(e,Ci())},o=e=>{var t=Si(),n=be(t,!0);re(t),Tr(()=>st(n,yr(U).expired)),ot(e,t)},s=e=>{var t=ki(),n=be(t,!0);re(t),Tr(()=>{Zt(t,"title",yr(S)),st(n,yr(U).error)}),ot(e,t)};Et(r,e=>{yr(S)||a?yr(S)||yr(b)!==ni.EXPIRED?e(s,-1):e(o,1):e(i)}),ot(e,n)},$$slots:{default:!0}})},ct=e=>{var t=it();!function(e,t,n){Q&&ne();var r=new $t(e);Ar(()=>{var e=t();e!=e&&(e=Ct),r.ensure(e,n)})}(we(t),()=>yr(m),e=>{{let t=pt(()=>"standard"!==yr(R).codeChallengeDisplay);gi(e,{get anchor(){return yr(E)},get backdrop(){return yr(t)},get display(){return yr(R).codeChallengeDisplay},onClose:()=>{Se()},get placement(){return yr(R).popoverPlacement},role:"dialog",get"aria-label"(){return yr(U).verificationRequired},get dir(){return yr(F)},children:(e,t)=>{var n=xi(),r=we(n);fi(r,{get audioUrl(){return yr(q)},get imageUrl(){return yr(H)},onCancel:()=>Se(),onReload:()=>Ie(),onSubmit:e=>ye(e),get codeChallenge(){return yr(m)},get config(){return yr(R)},get strings(){return yr(U)}});var i=_e(r,2),o=e=>{Kr(e,{get logo(){return yr(V)},get strings(){return yr(U)}})};Et(i,e=>{yr(D)&&"standard"!==yr(R).codeChallengeDisplay&&e(o)}),ot(e,n)},$$slots:{default:!0}})}}),ot(e,t)};Et(at,e=>{yr(S)||yr(b)===ni.EXPIRED||!a?e(lt):yr(m)&&yr(b)===ni.CODE&&e(ct,1)}),re(Le),rn(Le,e=>Hn(E,e),()=>yr(E)),Tr(e=>{Zt(Le,"data-state",yr(b)),Zt(Le,"data-display",yr(R).display||void 0),Zt(Le,"data-placement",e),Zt(Le,"data-visible",yr(A)||void 0),Zt(Le,"dir",yr(F)),Zt(Ue,"for",yr(P)),Le.dir=Le.dir},[()=>function(e){switch(e){case"bar":return yr(R).barPlacement||"bottom";case"floating":return yr(R).floatingPlacement||"auto";default:return}}(yr(R).display)]),ot(e,Ae);var ut=B(Te);return r(),ut},{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"]));
|