@htmlbricks/hb-form 0.66.3 → 0.66.4

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/main.iife.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(Jn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const ri=1,ii=2,Bn=4,si=8,oi=16,ai=1,li=2,Hn="[",Zt="[!",zn="[?",Qt="]",lt={},K=Symbol(),Yn="http://www.w3.org/1999/xhtml",ui=!1;var Un=Array.isArray,fi=Array.prototype.indexOf,ut=Array.prototype.includes,Mt=Array.from,Dt=Object.keys,Lt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,ci=Object.getOwnPropertyDescriptors,di=Object.prototype,hi=Array.prototype,Wn=Object.getPrototypeOf,Gn=Object.isExtensible;const vi=()=>{};function pi(e){for(var t=0;t<e.length;t++)e[t]()}function Kn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const U=2,ct=4,Vt=8,Xn=1<<24,Re=16,ge=32,Me=64,en=128,ce=512,Y=1024,Z=2048,xe=4096,oe=8192,de=16384,De=32768,Zn=1<<25,dt=65536,Qn=1<<17,_i=1<<18,Ke=1<<19,bi=1<<20,ke=1<<25,Xe=65536,tn=1<<21,nn=1<<22,Le=1<<23,rn=Symbol("$state"),mi=Symbol("legacy props"),gi=Symbol(""),Se=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},wi=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),It=3,Et=8;function yi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ji(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ei(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ni(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function $i(){throw new Error("https://svelte.dev/e/hydration_failed")}function Si(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ti(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function qi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Oi(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Pt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Ci(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let R=!1;function we(e){R=e}let D;function re(e){if(e===null)throw Pt(),lt;return D=e}function xt(){return re(Ne(D))}function Te(e){if(R){if(Ne(D)!==null)throw Pt(),lt;D=e}}function Ai(e=1){if(R){for(var t=e,n=D;t--;)n=Ne(n);D=n}}function Ft(e=!0){for(var t=0,n=D;;){if(n.nodeType===Et){var r=n.data;if(r===Qt){if(t===0)return n;t-=1}else(r===Hn||r===Zt||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Ne(n);e&&n.remove(),n=i}}function er(e){if(!e||e.nodeType!==Et)throw Pt(),lt;return e.data}function tr(e){return e===this.v}function Ri(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function nr(e){return!Ri(e,this.v)}let Mi=!1,he=null;function ht(e){he=e}function rr(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:C,l:null}}function ir(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)Tr(r)}return e!==void 0&&(t.x=e),t.i=!0,he=t.p,e??{}}function sr(){return!0}let Ze=[];function or(){var e=Ze;Ze=[],pi(e)}function Ve(e){if(Ze.length===0&&!kt){var t=Ze;queueMicrotask(()=>{t===Ze&&or()})}Ze.push(e)}function Di(){for(;Ze.length>0;)or()}function ar(e){var t=C;if(t===null)return O.f|=Le,e;if((t.f&De)===0&&(t.f&ct)===0)throw e;Ie(e,t)}function Ie(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&De)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Li=-7169;function H(e,t){e.f=e.f&Li|t}function sn(e){(e.f&ce)!==0||e.deps===null?H(e,Y):H(e,xe)}function lr(e){if(e!==null)for(const t of e)(t.f&U)===0||(t.f&Xe)===0||(t.f^=Xe,lr(t.deps))}function ur(e,t,n){(e.f&Z)!==0?t.add(e):(e.f&xe)!==0&&n.add(e),lr(e.deps),H(e,Y)}const Pe=new Set;let P=null,ye=null,on=null,kt=!1,an=!1,vt=null,Jt=null;var fr=0;let Vi=1;class qe{id=Vi++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#o=new Set;#a=new Set;#l=new Map;is_fork=!1;#c=!1;#u=new Set;#d(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#u)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#l.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#l.has(t)||this.#l.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#l.get(t);if(n){this.#l.delete(t);for(var r of n.d)H(r,Z),this.schedule(r);for(r of n.m)H(r,xe),this.schedule(r)}}#h(){if(fr++>1e3&&(Pe.delete(this),Ii()),!this.#d()){for(const o of this.#o)this.#a.delete(o),H(o,Z),this.schedule(o);for(const o of this.#a)H(o,xe),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=vt=[],r=[],i=Jt=[];for(const o of t)try{this.#f(o,n,r)}catch(l){throw pr(o),l}if(P=null,i.length>0){var s=qe.ensure();for(const o of i)s.schedule(o)}if(vt=null,Jt=null,this.#d()||this.#v()){this.#p(r),this.#p(n);for(const[o,l]of this.#l)vr(o,l)}else{this.#t.size===0&&Pe.delete(this),this.#o.clear(),this.#a.clear();for(const o of this.#e)o(this);this.#e.clear(),cr(r),cr(n),this.#s?.resolve()}var a=P;if(this.#r.length>0){const o=a??=this;o.#r.push(...this.#r.filter(l=>!o.#r.includes(l)))}a!==null&&(Pe.add(a),a.#h()),Pe.has(this)||this.#_()}#f(t,n,r){t.f^=Y;for(var i=t.first;i!==null;){var s=i.f,a=(s&(ge|Me))!==0,o=a&&(s&Y)!==0,l=o||(s&oe)!==0||this.#l.has(i);if(!l&&i.fn!==null){a?i.f^=Y:(s&ct)!==0?n.push(i):St(i)&&((s&Re)!==0&&this.#a.add(i),_t(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}}#p(t){for(var n=0;n<t.length;n+=1)ur(t[n],this.#o,this.#a)}capture(t,n,r=!1){n!==K&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Le)===0&&(this.current.set(t,[t.v,r]),ye?.set(t,t.v))}activate(){P=this}deactivate(){P=null,ye=null}flush(){try{an=!0,P=this,this.#h()}finally{fr=0,on=null,vt=null,Jt=null,an=!1,P=null,ye=null,Je.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Pe.delete(this)}#_(){for(const u of Pe){var t=u.id<this.id,n=[];for(const[f,[_,v]]of this.current){if(u.current.has(f)){var r=u.current.get(f)[0];if(t&&_!==r)u.current.set(f,[_,v]);else continue}n.push(f)}var i=[...u.current.keys()].filter(f=>!this.current.has(f));if(i.length===0)t&&u.discard();else if(n.length>0){u.activate();var s=new Set,a=new Map;for(var o of n)dr(o,i,s,a);if(u.#r.length>0){u.apply();for(var l of u.#r)u.#f(l,[],[]);u.#r=[]}u.deactivate()}}for(const u of Pe)u.#u.has(this)&&(u.#u.delete(this),u.#u.size===0&&!u.#d()&&(u.activate(),u.#h()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,Ve(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#o.add(r);for(const r of n)this.#a.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=Kn()).promise}static ensure(){if(P===null){const t=P=new qe;an||(Pe.add(P),kt||Ve(()=>{P===t&&t.flush()}))}return P}apply(){{ye=null;return}}schedule(t){if(on=t,t.b?.is_pending&&(t.f&(ct|Vt|Xn))!==0&&(t.f&De)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(vt!==null&&n===C&&(O===null||(O.f&U)===0))return;if((r&(Me|ge))!==0){if((r&Y)===0)return;n.f^=Y}}this.#r.push(n)}}function Fe(e){var t=kt;kt=!0;try{for(var n;;){if(Di(),P===null)return n;P.flush()}}finally{kt=t}}function Ii(){try{Ni()}catch(e){Ie(e,on)}}let Oe=null;function cr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|oe))===0&&St(r)&&(Oe=new Set,_t(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Cr(r),Oe?.size>0)){Je.clear();for(const i of Oe){if((i.f&(de|oe))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Oe.has(a)&&(Oe.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(de|oe))===0&&_t(l)}}Oe.clear()}}Oe=null}}function dr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&U)!==0?dr(i,t,n,r):(s&(nn|Re))!==0&&(s&Z)===0&&hr(i,t,r)&&(H(i,Z),ln(i))}}function hr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(ut.call(t,i))return!0;if((i.f&U)!==0&&hr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function ln(e){P.schedule(e)}function vr(e,t){if(!((e.f&ge)!==0&&(e.f&Y)!==0)){(e.f&Z)!==0?t.d.push(e):(e.f&xe)!==0&&t.m.push(e),H(e,Y);for(var n=e.first;n!==null;)vr(n,t),n=n.next}}function pr(e){H(e,Y);for(var t=e.first;t!==null;)pr(t),t=t.next}function Pi(e){let t=0,n=Qe(0),r;return()=>{_n()&&(h(n),qr(()=>(t===0&&(r=us(()=>e(()=>$t(n)))),t+=1,()=>{Ve(()=>{t-=1,t===0&&(r?.(),r=void 0,$t(n))})})))}}var Fi=dt|Ke;function Ji(e,t,n,r){new Bi(e,t,n,r)}class Bi{parent;is_pending=!1;transform_error;#e;#n=R?D:null;#t;#i;#s;#r=null;#o=null;#a=null;#l=null;#c=0;#u=0;#d=!1;#v=new Set;#h=new Set;#f=null;#p=Pi(()=>(this.#f=Qe(this.#c),()=>{this.#f=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var a=C;a.b=this,a.f|=en,r(s)},this.parent=C.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=bn(()=>{if(R){const s=this.#n;xt();const a=s.data===Zt;if(s.data.startsWith(zn)){const l=JSON.parse(s.data.slice(zn.length));this.#y(l)}else a?this.#j():this.#_()}else this.#g()},Fi),R&&(this.#e=D)}#_(){try{this.#r=pe(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#a=pe(()=>{n(this.#e,()=>t,()=>()=>{})}))}#j(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#o=pe(()=>t(this.#e)),Ve(()=>{var n=this.#l=document.createDocumentFragment(),r=le();n.append(r),this.#r=this.#m(()=>pe(()=>this.#i(r))),this.#u===0&&(this.#e.before(n),this.#l=null,tt(this.#o,()=>{this.#o=null}),this.#b(P))}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#c=0,this.#r=pe(()=>{this.#i(this.#e)}),this.#u>0){var t=this.#l=document.createDocumentFragment();wn(this.#r,t);const n=this.#t.pending;this.#o=pe(()=>n(this.#e))}else this.#b(P)}catch(n){this.error(n)}}#b(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){ur(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=C,r=O,i=he;_e(this.#s),ie(this.#s),ht(this.#s.ctx);try{return qe.ensure(),t()}catch(s){return ar(s),null}finally{_e(n),ie(r),ht(i)}}#w(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t,n);return}this.#u+=t,this.#u===0&&(this.#b(n),this.#o&&tt(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(t,n){this.#w(t,n),this.#c+=t,!(!this.#f||this.#d)&&(this.#d=!0,Ve(()=>{this.#d=!1,this.#f&&pt(this.#f,this.#c)}))}get_effect_pending(){return this.#p(),h(this.#f)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(Q(this.#r),this.#r=null),this.#o&&(Q(this.#o),this.#o=null),this.#a&&(Q(this.#a),this.#a=null),R&&(re(this.#n),Ai(),re(Ft()));var i=!1,s=!1;const a=()=>{if(i){Ci();return}i=!0,s&&Oi(),this.#a!==null&&tt(this.#a,()=>{this.#a=null}),this.#m(()=>{this.#g()})},o=l=>{try{s=!0,n?.(l,a),s=!1}catch(u){Ie(u,this.#s&&this.#s.parent)}r&&(this.#a=this.#m(()=>{try{return pe(()=>{var u=C;u.b=this,u.f|=en,r(this.#e,()=>l,()=>a)})}catch(u){return Ie(u,this.#s.parent),null}}))};Ve(()=>{var l;try{l=this.transform_error(t)}catch(u){Ie(u,this.#s&&this.#s.parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(o,u=>Ie(u,this.#s&&this.#s.parent)):o(l)})}}function Hi(e,t,n,r){const i=Ht;var s=e.filter(v=>!v.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var a=C,o=zi(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(v=>v.promise)):null;function u(v){o();try{r(v)}catch(p){(a.f&de)===0&&Ie(p,a)}Bt()}if(n.length===0){l.then(()=>u(t.map(i)));return}var f=_r();function _(){Promise.all(n.map(v=>Yi(v))).then(v=>u([...t.map(i),...v])).catch(v=>Ie(v,a)).finally(()=>f())}l?l.then(()=>{o(),_(),Bt()}):_()}function zi(){var e=C,t=O,n=he,r=P;return function(s=!0){_e(e),ie(t),ht(n),s&&(e.f&de)===0&&(r?.activate(),r?.apply())}}function Bt(e=!0){_e(null),ie(null),ht(null),e&&P?.deactivate()}function _r(){var e=C,t=e.b,n=P,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Ht(e){var t=U|Z,n=O!==null&&(O.f&U)!==0?O:null;return C!==null&&(C.f|=Ke),{ctx:he,deps:null,effects:null,equals:tr,f:t,fn:e,reactions:null,rv:0,v:K,wv:0,parent:n??C,ac:null}}function Yi(e,t,n){let r=C;r===null&&yi();var i=void 0,s=Qe(K),a=!O,o=new Map;return is(()=>{var l=C,u=Kn();i=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).finally(Bt)}catch(p){u.reject(p),Bt()}var f=P;if(a){if((l.f&De)!==0)var _=_r();if(r.b.is_rendered())o.get(f)?.reject(Se),o.delete(f);else{for(const p of o.values())p.reject(Se);o.clear()}o.set(f,u)}const v=(p,w=void 0)=>{if(_){var A=w===Se;_(A)}if(!(w===Se||(l.f&de)!==0)){if(f.activate(),w)s.f|=Le,pt(s,w);else{(s.f&Le)!==0&&(s.f^=Le),pt(s,p);for(const[m,M]of o){if(o.delete(m),m===f)break;M.reject(Se)}}f.deactivate()}};u.promise.then(v,p=>v(null,p||"unknown"))}),Sr(()=>{for(const l of o.values())l.reject(Se)}),new Promise(l=>{function u(f){function _(){f===i?l(s):u(i)}f.then(_,_)}u(i)})}function Nt(e){const t=Ht(e);return Dr(t),t}function Ui(e){const t=Ht(e);return t.equals=nr,t}function Wi(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Q(t[n])}}function Gi(e){for(var t=e.parent;t!==null;){if((t.f&U)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function un(e){var t,n=C;_e(Gi(e));try{e.f&=~Xe,Wi(e),t=Fr(e)}finally{_e(n)}return t}function br(e){var t=e.v,n=un(e);if(!e.equals(n)&&(e.wv=Ir(),(!P?.is_fork||e.deps===null)&&(e.v=n,P?.capture(e,t,!0),e.deps===null))){H(e,Y);return}ze||(ye!==null?(_n()||P?.is_fork)&&ye.set(e,n):sn(e))}function Ki(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Se),t.teardown=vi,t.ac=null,Tt(t,0),mn(t))}function mr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&_t(t)}let fn=new Set;const Je=new Map;let gr=!1;function Qe(e,t){var n={f:0,v:e,reactions:null,equals:tr,rv:0,wv:0};return n}function ve(e,t){const n=Qe(e);return Dr(n),n}function wr(e,t=!1,n=!0){const r=Qe(e);return t||(r.equals=nr),r}function ae(e,t,n=!1){O!==null&&(!je||(O.f&Qn)!==0)&&sr()&&(O.f&(U|Re|nn|Qn))!==0&&(be===null||!ut.call(be,e))&&qi();let r=n?Be(t):t;return pt(e,r,Jt)}function pt(e,t,n=null){if(!e.equals(t)){var r=e.v;ze?Je.set(e,t):Je.set(e,r),e.v=t;var i=qe.ensure();if(i.capture(e,r),(e.f&U)!==0){const s=e;(e.f&Z)!==0&&un(s),ye===null&&sn(s)}e.wv=Ir(),yr(e,Z,n),C!==null&&(C.f&Y)!==0&&(C.f&(ge|Me))===0&&(me===null?as([e]):me.push(e)),!i.is_fork&&fn.size>0&&!gr&&Xi()}return t}function Xi(){gr=!1;for(const e of fn)(e.f&Y)!==0&&H(e,xe),St(e)&&_t(e);fn.clear()}function $t(e){ae(e,e.v+1)}function yr(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],o=a.f,l=(o&Z)===0;if(l&&H(a,t),(o&U)!==0){var u=a;ye?.delete(u),(o&Xe)===0&&(o&ce&&(a.f|=Xe),yr(u,xe,n))}else if(l){var f=a;(o&Re)!==0&&Oe!==null&&Oe.add(f),n!==null?n.push(f):ln(f)}}}function Be(e){if(typeof e!="object"||e===null||rn in e)return e;const t=Wn(e);if(t!==di&&t!==hi)return e;var n=new Map,r=Un(e),i=ve(0),s=rt,a=o=>{if(rt===s)return o();var l=O,u=rt;ie(null),Vr(s);var f=o();return ie(l),Vr(u),f};return r&&n.set("length",ve(e.length)),new Proxy(e,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Si();var f=n.get(l);return f===void 0?a(()=>{var _=ve(u.value);return n.set(l,_),_}):ae(f,u.value,!0),!0},deleteProperty(o,l){var u=n.get(l);if(u===void 0){if(l in o){const f=a(()=>ve(K));n.set(l,f),$t(i)}}else ae(u,K),$t(i);return!0},get(o,l,u){if(l===rn)return e;var f=n.get(l),_=l in o;if(f===void 0&&(!_||ft(o,l)?.writable)&&(f=a(()=>{var p=Be(_?o[l]:K),w=ve(p);return w}),n.set(l,f)),f!==void 0){var v=h(f);return v===K?void 0:v}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var f=n.get(l);f&&(u.value=h(f))}else if(u===void 0){var _=n.get(l),v=_?.v;if(_!==void 0&&v!==K)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return u},has(o,l){if(l===rn)return!0;var u=n.get(l),f=u!==void 0&&u.v!==K||Reflect.has(o,l);if(u!==void 0||C!==null&&(!f||ft(o,l)?.writable)){u===void 0&&(u=a(()=>{var v=f?Be(o[l]):K,p=ve(v);return p}),n.set(l,u));var _=h(u);if(_===K)return!1}return f},set(o,l,u,f){var _=n.get(l),v=l in o;if(r&&l==="length")for(var p=u;p<_.v;p+=1){var w=n.get(p+"");w!==void 0?ae(w,K):p in o&&(w=a(()=>ve(K)),n.set(p+"",w))}if(_===void 0)(!v||ft(o,l)?.writable)&&(_=a(()=>ve(void 0)),ae(_,Be(u)),n.set(l,_));else{v=_.v!==K;var A=a(()=>Be(u));ae(_,A)}var m=Reflect.getOwnPropertyDescriptor(o,l);if(m?.set&&m.set.call(f,u),!v){if(r&&typeof l=="string"){var M=n.get("length"),B=Number(l);Number.isInteger(B)&&B>=M.v&&ae(M,B+1)}$t(i)}return!0},ownKeys(o){h(i);var l=Reflect.ownKeys(o).filter(_=>{var v=n.get(_);return v===void 0||v.v!==K});for(var[u,f]of n)f.v!==K&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Ti()}})}var jr,Er,xr,kr;function cn(){if(jr===void 0){jr=window,Er=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xr=ft(t,"firstChild").get,kr=ft(t,"nextSibling").get,Gn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Gn(n)&&(n.__t=void 0)}}function le(e=""){return document.createTextNode(e)}function et(e){return xr.call(e)}function Ne(e){return kr.call(e)}function He(e,t){if(!R)return et(e);var n=et(D);return n===null&&(n=D.appendChild(le())),re(n),n}function dn(e,t=!1){if(!R){var n=et(e);return n instanceof Comment&&n.data===""?Ne(n):n}if(t){if(D?.nodeType!==It){var r=le();return D?.before(r),re(r),r}vn(D)}return D}function zt(e,t=1,n=!1){let r=R?D:e;for(var i;t--;)i=r,r=Ne(r);if(!R)return r;if(n){if(r?.nodeType!==It){var s=le();return r===null?i?.after(s):r.before(s),re(s),s}vn(r)}return re(r),r}function Nr(e){e.textContent=""}function $r(){return!1}function hn(e,t,n){return document.createElementNS(Yn,e,void 0)}function vn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===It;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function pn(e){var t=O,n=C;ie(null),_e(null);try{return e()}finally{ie(t),_e(n)}}function Zi(e){C===null&&(O===null&&ki(),xi()),ze&&Ei()}function Qi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function $e(e,t){var n=C;n!==null&&(n.f&oe)!==0&&(e|=oe);var r={ctx:he,deps:null,nodes:null,f:e|Z|ce,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((e&ct)!==0)vt!==null?vt.push(r):qe.ensure().schedule(r);else if(t!==null){try{_t(r)}catch(a){throw Q(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ke)===0&&(i=i.first,(e&Re)!==0&&(e&dt)!==0&&i!==null&&(i.f|=dt))}if(i!==null&&(i.parent=n,n!==null&&Qi(i,n),O!==null&&(O.f&U)!==0&&(e&Me)===0)){var s=O;(s.effects??=[]).push(i)}return r}function _n(){return O!==null&&!je}function Sr(e){const t=$e(Vt,null);return H(t,Y),t.teardown=e,t}function es(e){Zi();var t=C.f,n=!O&&(t&ge)!==0&&(t&De)===0;if(n){var r=he;(r.e??=[]).push(e)}else return Tr(e)}function Tr(e){return $e(ct|bi,e)}function ts(e){qe.ensure();const t=$e(Me|Ke,e);return()=>{Q(t)}}function ns(e){qe.ensure();const t=$e(Me|Ke,e);return(n={})=>new Promise(r=>{n.outro?tt(t,()=>{Q(t),r(void 0)}):(Q(t),r(void 0))})}function rs(e){return $e(ct,e)}function is(e){return $e(nn|Ke,e)}function qr(e,t=0){return $e(Vt|t,e)}function g(e,t=[],n=[],r=[]){Hi(r,t,n,i=>{$e(Vt,()=>e(...i.map(h)))})}function bn(e,t=0){var n=$e(Re|t,e);return n}function pe(e){return $e(ge|Ke,e)}function Or(e){var t=e.teardown;if(t!==null){const n=ze,r=O;Mr(!0),ie(null);try{t.call(null)}finally{Mr(n),ie(r)}}}function mn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&pn(()=>{i.abort(Se)});var r=n.next;(n.f&Me)!==0?n.parent=null:Q(n,t),n=r}}function ss(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ge)===0&&Q(t),t=n}}function Q(e,t=!0){var n=!1;(t||(e.f&_i)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(os(e.nodes.start,e.nodes.end),n=!0),H(e,Zn),mn(e,t&&!n),Tt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Or(e),e.f^=Zn,e.f|=de;var i=e.parent;i!==null&&i.first!==null&&Cr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function os(e,t){for(;e!==null;){var n=e===t?null:Ne(e);e.remove(),e=n}}function Cr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function tt(e,t,n=!0){var r=[];Ar(e,r,!0);var i=()=>{n&&Q(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function Ar(e,t,n){if((e.f&oe)===0){e.f^=oe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&dt)!==0||(i.f&ge)!==0&&(e.f&Re)!==0;Ar(i,t,a?n:!1),i=s}}}function gn(e){Rr(e,!0)}function Rr(e,t){if((e.f&oe)!==0){e.f^=oe,(e.f&Y)===0&&(H(e,Z),qe.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&dt)!==0||(n.f&ge)!==0;Rr(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function wn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Ne(n);t.append(n),n=i}}let Yt=!1,ze=!1;function Mr(e){ze=e}let O=null,je=!1;function ie(e){O=e}let C=null;function _e(e){C=e}let be=null;function Dr(e){O!==null&&(be===null?be=[e]:be.push(e))}let se=null,ue=0,me=null;function as(e){me=e}let Lr=1,nt=0,rt=nt;function Vr(e){rt=e}function Ir(){return++Lr}function St(e){var t=e.f;if((t&Z)!==0)return!0;if(t&U&&(e.f&=~Xe),(t&xe)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(St(s)&&br(s),s.wv>e.wv)return!0}(t&ce)!==0&&ye===null&&H(e,Y)}return!1}function Pr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(be!==null&&ut.call(be,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&U)!==0?Pr(s,t,!1):t===s&&(n?H(s,Z):(s.f&Y)!==0&&H(s,xe),ln(s))}}function Fr(e){var t=se,n=ue,r=me,i=O,s=be,a=he,o=je,l=rt,u=e.f;se=null,ue=0,me=null,O=(u&(ge|Me))===0?e:null,be=null,ht(e.ctx),je=!1,rt=++nt,e.ac!==null&&(pn(()=>{e.ac.abort(Se)}),e.ac=null);try{e.f|=tn;var f=e.fn,_=f();e.f|=De;var v=e.deps,p=P?.is_fork;if(se!==null){var w;if(p||Tt(e,ue),v!==null&&ue>0)for(v.length=ue+se.length,w=0;w<se.length;w++)v[ue+w]=se[w];else e.deps=v=se;if(_n()&&(e.f&ce)!==0)for(w=ue;w<v.length;w++)(v[w].reactions??=[]).push(e)}else!p&&v!==null&&ue<v.length&&(Tt(e,ue),v.length=ue);if(sr()&&me!==null&&!je&&v!==null&&(e.f&(U|xe|Z))===0)for(w=0;w<me.length;w++)Pr(me[w],e);if(i!==null&&i!==e){if(nt++,i.deps!==null)for(let A=0;A<n;A+=1)i.deps[A].rv=nt;if(t!==null)for(const A of t)A.rv=nt;me!==null&&(r===null?r=me:r.push(...me))}return(e.f&Le)!==0&&(e.f^=Le),_}catch(A){return ar(A)}finally{e.f^=tn,se=t,ue=n,me=r,O=i,be=s,ht(a),je=o,rt=l}}function ls(e,t){let n=t.reactions;if(n!==null){var r=fi.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&U)!==0&&(se===null||!ut.call(se,t))){var s=t;(s.f&ce)!==0&&(s.f^=ce,s.f&=~Xe),sn(s),Ki(s),Tt(s,0)}}function Tt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ls(e,n[r])}function _t(e){var t=e.f;if((t&de)===0){H(e,Y);var n=C,r=Yt;C=e,Yt=!0;try{(t&(Re|Xn))!==0?ss(e):mn(e),Or(e);var i=Fr(e);e.teardown=typeof i=="function"?i:null,e.wv=Lr;var s;ui&&Mi&&(e.f&Z)!==0&&e.deps}finally{Yt=r,C=n}}}function h(e){var t=e.f,n=(t&U)!==0;if(O!==null&&!je){var r=C!==null&&(C.f&de)!==0;if(!r&&(be===null||!ut.call(be,e))){var i=O.deps;if((O.f&tn)!==0)e.rv<nt&&(e.rv=nt,se===null&&i!==null&&i[ue]===e?ue++:se===null?se=[e]:se.push(e));else{(O.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[O]:ut.call(s,O)||s.push(O)}}}if(ze&&Je.has(e))return Je.get(e);if(n){var a=e;if(ze){var o=a.v;return((a.f&Y)===0&&a.reactions!==null||Br(a))&&(o=un(a)),Je.set(a,o),o}var l=(a.f&ce)===0&&!je&&O!==null&&(Yt||(O.f&ce)!==0),u=(a.f&De)===0;St(a)&&(l&&(a.f|=ce),br(a)),l&&!u&&(mr(a),Jr(a))}if(ye?.has(e))return ye.get(e);if((e.f&Le)!==0)throw e.v;return e.v}function Jr(e){if(e.f|=ce,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&U)!==0&&(t.f&ce)===0&&(mr(t),Jr(t))}function Br(e){if(e.v===K)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Je.has(t)||(t.f&U)!==0&&Br(t))return!0;return!1}function us(e){var t=je;try{return je=!0,e()}finally{je=t}}const qt=Symbol("events"),Hr=new Set,yn=new Set;function fs(e,t,n,r={}){function i(s){if(r.capture||jn.call(t,s),!s.cancelBubble)return pn(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ve(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function S(e,t,n,r,i){var s={capture:r,passive:i},a=fs(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sr(()=>{t.removeEventListener(e,a,s)})}function cs(e,t,n){(t[qt]??={})[e]=n}function ds(e){for(var t=0;t<e.length;t++)Hr.add(e[t]);for(var n of yn)n(e)}let zr=null;function jn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;zr=e;var a=0,o=zr===e&&e[qt];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[qt]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||e.target,s!==t){Lt(e,"currentTarget",{configurable:!0,get(){return s||n}});var f=O,_=C;ie(null),_e(null);try{for(var v,p=[];s!==null;){var w=s.assignedSlot||s.parentNode||s.host||null;try{var A=s[qt]?.[r];A!=null&&(!s.disabled||e.target===s)&&A.call(s,e)}catch(m){v?p.push(m):v=m}if(e.cancelBubble||w===t||w===null)break;s=w}if(v){for(let m of p)queueMicrotask(()=>{throw m});throw v}}finally{e[qt]=t,delete e.currentTarget,ie(f),_e(_)}}}const hs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function vs(e){return hs?.createHTML(e)??e}function ps(e){var t=hn("template");return t.innerHTML=vs(e.replaceAll("<!>","<!---->")),t.content}function Ye(e,t){var n=C;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&ai)!==0,r=(t&li)!==0,i,s=!e.startsWith("<!>");return()=>{if(R)return Ye(D,null),D;i===void 0&&(i=ps(s?e:"<!>"+e),n||(i=et(i)));var a=r||Er?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=et(a),l=a.lastChild;Ye(o,l)}else Ye(a,a);return a}}function _s(e=""){if(!R){var t=le(e+"");return Ye(t,t),t}var n=D;return n.nodeType!==It?(n.before(n=le()),re(n)):vn(n),Ye(n,n),n}function Yr(){if(R)return Ye(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(""),n=le();return e.append(t,n),Ye(t,n),e}function $(e,t){if(R){var n=C;((n.f&De)===0||n.nodes.end===null)&&(n.nodes.end=D),xt();return}e!==null&&e.before(t)}const bs=["touchstart","touchmove"];function ms(e){return bs.includes(e)}function Ur(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Wr(e,t){return Gr(e,t)}function gs(e,t){cn(),t.intro=t.intro??!1;const n=t.target,r=R,i=D;try{for(var s=et(n);s&&(s.nodeType!==Et||s.data!==Hn);)s=Ne(s);if(!s)throw lt;we(!0),re(s);const a=Gr(e,{...t,anchor:s});return we(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==lt&&console.warn("Failed to hydrate: ",a),t.recover===!1&&$i(),cn(),Nr(n),we(!1),Wr(e,t)}finally{we(r),re(i)}}const Ut=new Map;function Gr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:o}){cn();var l=void 0,u=ns(()=>{var f=n??t.appendChild(le());Ji(f,{pending:()=>{}},p=>{rr({});var w=he;if(s&&(w.c=s),i&&(r.$$events=i),R&&Ye(p,null),l=e(p,r)||{},R&&(C.nodes.end=D,D===null||D.nodeType!==Et||D.data!==Qt))throw Pt(),lt;ir()},o);var _=new Set,v=p=>{for(var w=0;w<p.length;w++){var A=p[w];if(!_.has(A)){_.add(A);var m=ms(A);for(const F of[t,document]){var M=Ut.get(F);M===void 0&&(M=new Map,Ut.set(F,M));var B=M.get(A);B===void 0?(F.addEventListener(A,jn,{passive:m}),M.set(A,1)):M.set(A,B+1)}}}};return v(Mt(Hr)),yn.add(v),()=>{for(var p of _)for(const m of[t,document]){var w=Ut.get(m),A=w.get(p);--A==0?(m.removeEventListener(p,jn),w.delete(p),w.size===0&&Ut.delete(m)):w.set(p,A)}yn.delete(v),f!==n&&f.parentNode?.removeChild(f)}});return En.set(l,u),l}let En=new WeakMap;function ws(e,t){const n=En.get(e);return n?(En.delete(e),n(t)):Promise.resolve()}class ys{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)gn(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(a);o&&(Q(o.effect),this.#t.delete(a))}for(const[s,a]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();wn(a,u),u.append(le()),this.#t.set(s,{effect:a,fragment:u})}else Q(a);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),tt(a,o,!1)):o()}}};#o=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(Q(i.effect),this.#t.delete(r))};ensure(t,n){var r=P,i=$r();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),a=le();s.append(a),this.#t.set(t,{effect:pe(()=>n(a)),fragment:s})}else this.#n.set(t,pe(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,l]of this.#n)o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of this.#t)o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#r),r.ondiscard(this.#o)}else R&&(this.anchor=D),this.#r(r)}}function Ue(e,t,n=!1){var r;R&&(r=D,xt());var i=new ys(e),s=n?dt:0;function a(o,l){if(R){var u=er(r);if(o!==parseInt(u.substring(1))){var f=Ft();re(f),i.anchor=f,we(!1),i.ensure(o,l),we(!0);return}}i.ensure(o,l)}bn(()=>{var o=!1;t((l,u=0)=>{o=!0,a(u,l)}),o||a(-1,null)},s)}function js(e,t,n){for(var r=[],i=t.length,s,a=t.length,o=0;o<i;o++){let _=t[o];tt(_,()=>{if(s){if(s.pending.delete(_),s.done.add(_),s.pending.size===0){var v=e.outrogroups;xn(e,Mt(s.done)),v.delete(s),v.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null;if(l){var u=n,f=u.parentNode;Nr(f),f.append(u),e.items.clear()}xn(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function xn(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=ke;const a=document.createDocumentFragment();wn(s,a)}else Q(t[i],n)}}var Kr;function Xr(e,t,n,r,i,s=null){var a=e,o=new Map,l=(t&Bn)!==0;if(l){var u=e;a=R?re(et(u)):u.appendChild(le())}R&&xt();var f=null,_=Ui(()=>{var F=n();return Un(F)?F:F==null?[]:Mt(F)}),v,p=new Map,w=!0;function A(F){(B.effect.f&de)===0&&(B.pending.delete(F),B.fallback=f,Es(B,v,a,t,r),f!==null&&(v.length===0?(f.f&ke)===0?gn(f):(f.f^=ke,Ct(f,null,a)):tt(f,()=>{f=null})))}function m(F){B.pending.delete(F)}var M=bn(()=>{v=h(_);var F=v.length;let ne=!1;if(R){var bt=er(a)===Zt;bt!==(F===0)&&(a=Ft(),re(a),we(!1),ne=!0)}for(var Ee=new Set,X=P,Ce=$r(),J=0;J<F;J+=1){R&&D.nodeType===Et&&D.data===Qt&&(a=D,ne=!0,we(!1));var T=v[J],mt=r(T,J),fe=w?null:o.get(mt);fe?(fe.v&&pt(fe.v,T),fe.i&&pt(fe.i,J),Ce&&X.unskip_effect(fe.e)):(fe=xs(o,w?a:Kr??=le(),T,mt,J,i,t,n),w||(fe.e.f|=ke),o.set(mt,fe)),Ee.add(mt)}if(F===0&&s&&!f&&(w?f=pe(()=>s(a)):(f=pe(()=>s(Kr??=le())),f.f|=ke)),F>Ee.size&&ji(),R&&F>0&&re(Ft()),!w)if(p.set(X,Ee),Ce){for(const[Sn,Tn]of o)Ee.has(Sn)||X.skip_effect(Tn.e);X.oncommit(A),X.ondiscard(m)}else A(X);ne&&we(!0),h(_)}),B={effect:M,items:o,pending:p,outrogroups:null,fallback:f};w=!1,R&&(a=D)}function Ot(e){for(;e!==null&&(e.f&ge)===0;)e=e.next;return e}function Es(e,t,n,r,i){var s=(r&si)!==0,a=t.length,o=e.items,l=Ot(e.effect.first),u,f=null,_,v=[],p=[],w,A,m,M;if(s)for(M=0;M<a;M+=1)w=t[M],A=i(w,M),m=o.get(A).e,(m.f&ke)===0&&(m.nodes?.a?.measure(),(_??=new Set).add(m));for(M=0;M<a;M+=1){if(w=t[M],A=i(w,M),m=o.get(A).e,e.outrogroups!==null)for(const T of e.outrogroups)T.pending.delete(m),T.done.delete(m);if((m.f&oe)!==0&&(gn(m),s&&(m.nodes?.a?.unfix(),(_??=new Set).delete(m))),(m.f&ke)!==0)if(m.f^=ke,m===l)Ct(m,null,n);else{var B=f?f.next:l;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),We(e,f,m),We(e,m,B),Ct(m,B,n),f=m,v=[],p=[],l=Ot(f.next);continue}if(m!==l){if(u!==void 0&&u.has(m)){if(v.length<p.length){var F=p[0],ne;f=F.prev;var bt=v[0],Ee=v[v.length-1];for(ne=0;ne<v.length;ne+=1)Ct(v[ne],F,n);for(ne=0;ne<p.length;ne+=1)u.delete(p[ne]);We(e,bt.prev,Ee.next),We(e,f,bt),We(e,Ee,F),l=F,f=Ee,M-=1,v=[],p=[]}else u.delete(m),Ct(m,l,n),We(e,m.prev,m.next),We(e,m,f===null?e.effect.first:f.next),We(e,f,m),f=m;continue}for(v=[],p=[];l!==null&&l!==m;)(u??=new Set).add(l),p.push(l),l=Ot(l.next);if(l===null)continue}(m.f&ke)===0&&v.push(m),f=m,l=Ot(m.next)}if(e.outrogroups!==null){for(const T of e.outrogroups)T.pending.size===0&&(xn(e,Mt(T.done)),e.outrogroups?.delete(T));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var X=[];if(u!==void 0)for(m of u)(m.f&oe)===0&&X.push(m);for(;l!==null;)(l.f&oe)===0&&l!==e.fallback&&X.push(l),l=Ot(l.next);var Ce=X.length;if(Ce>0){var J=(r&Bn)!==0&&a===0?n:null;if(s){for(M=0;M<Ce;M+=1)X[M].nodes?.a?.measure();for(M=0;M<Ce;M+=1)X[M].nodes?.a?.fix()}js(e,X,J)}}s&&Ve(()=>{if(_!==void 0)for(m of _)m.nodes?.a?.apply()})}function xs(e,t,n,r,i,s,a,o){var l=(a&ri)!==0?(a&oi)===0?wr(n,!1,!1):Qe(n):null,u=(a&ii)!==0?Qe(i):null;return{v:l,i:u,e:pe(()=>(s(t,l??n,u??i,o),()=>{e.delete(r)}))}}function Ct(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&ke)===0?t.nodes.start:n;r!==null;){var a=Ne(r);if(s.before(r),r===i)return;r=a}}function We(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function kn(e,t,n,r,i){R&&xt();var s=t.$$slots?.[n],a=!1;s===!0&&(s=t[n==="default"?"children":n],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>r:r)}function ks(e,t){rs(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=hn("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Ns(e,t,n){var r=e==null?"":""+e;return r===""?null:r}function $s(e,t){return e==null?null:String(e)}function I(e,t,n,r,i,s){var a=e.__className;if(R||a!==n||a===void 0){var o=Ns(n);(!R||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return s}function Ss(e,t,n,r){var i=e.__style;if(R||i!==t){var s=$s(t);(!R||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Ts=Symbol("is custom element"),qs=Symbol("is html"),Os=wi?"link":"LINK";function Nn(e,t,n,r){var i=Cs(e);R&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Os)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[gi]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Zr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function y(e,t,n){var r=O,i=C;let s=R;R&&we(!1),ie(null),_e(null);try{t!=="style"&&($n.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Zr(e).includes(t):n&&typeof n=="object")?e[t]=n:Nn(e,t,n==null?n:String(n))}finally{ie(r),_e(i),s&&we(!0)}}function Cs(e){return e.__attributes??={[Ts]:e.nodeName.includes("-"),[qs]:e.namespaceURI===Yn}}var $n=new Map;function Zr(e){var t=e.getAttribute("is")||e.nodeName,n=$n.get(t);if(n)return n;$n.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=ci(i);for(var a in r)r[a].set&&n.push(a);i=Wn(i)}return n}function it(e,t,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=a());var l;l=()=>{var v=e[t];return v===void 0?a():(s=!0,v)};var u=!1,f=Ht(()=>(u=!1,l())),_=C;return(function(v,p){if(arguments.length>0){const w=p?h(f):v;return ae(f,w),u=!0,i!==void 0&&(i=w),v}return ze&&u||(_.f&de)!==0?f.v:h(f)})}function As(e){return new Rs(e)}class Rs{#e;#n;constructor(t){var n=new Map,r=(s,a)=>{var o=wr(a,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return h(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===mi?!0:(h(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return ae(n.get(a)??r(a,o),o),Reflect.set(s,a,o)}});this.#n=(t.hydrate?gs:Wr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Fe(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Lt(this,s,{get(){return this.#n[s]},set(a){this.#n[s]=a},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ws(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Qr;typeof HTMLElement=="function"&&(Qr=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 r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=hn("slot");r!=="default"&&(s.name=r),$(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Ms(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Wt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=As({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ts(()=>{qr(()=>{this.$$r=!0;for(const r of Dt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Wt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Wt(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 Dt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Wt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ms(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Ds(e,t,n,r,i,s){let a=class extends Qr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Dt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Dt(t).forEach(o=>{Lt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Wt(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var f=ft(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),r.forEach(o=>{Lt(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const ee={version:"0.66.3"},Ls=(e,t)=>e.reduce((n,r)=>{for(const i of t(r))(n[i]=n[i]||[]).push(r);return n},{});var st={},ei;function Vs(){if(ei)return st;ei=1,Object.defineProperty(st,"__esModule",{value:!0}),st.LanguageTranslator=void 0,st.getChildStyleToPass=e,st.addComponent=t;function e(r,i){var s,a,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(v){return Object.keys(r).includes(v.name)}))===null||a===void 0)&&a.length))for(var l=function(v){var p=i?.filter(function(w){return w.name===v&&w.defaultValue!==r[v]});p&&(o+="".concat(v,":").concat(r[v],";"))},u=0,f=Object.keys(r);u<f.length;u++){var _=f[u];l(_)}}catch(v){console.error("error getting child style to pass",v)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var l=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(l+"-",""),"/").concat(a)}document.head.appendChild(o)}catch(u){console.warn(u)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,o="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(i,s,a){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((o=s[a])===null||o===void 0)&&o[i]))return s[a][i];var l="",u=r.getDefaultLang();if(!a||u!==a){var f=s?.[u];f?.[i]&&(l=f[i])}return l},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return o.format(i)},r})();return st.LanguageTranslator=n,st}var te=Vs(),Is=q('<label class="svelte-yjqjiw"> </label>'),Ps=q("<hb-input-array-objects></hb-input-array-objects>",2),Fs=q("<hb-input-array-tags></hb-input-array-tags>",2),Js=q("<hb-input-text></hb-input-text>",2),Bs=q("<hb-input-color></hb-input-color>",2),Hs=q("<hb-input-range></hb-input-range>",2),zs=q("<hb-input-file></hb-input-file>",2),Ys=q("<hb-input-email></hb-input-email>",2),Us=q("<hb-input-date></hb-input-date>",2),Ws=q("<hb-input-datetime></hb-input-datetime>",2),Gs=q("<hb-input-checkbox></hb-input-checkbox>",2),Ks=q("<hb-input-number></hb-input-number>",2),Xs=q("<hb-input-area></hb-input-area>",2),Zs=q("<hb-input-radio></hb-input-radio>",2),Qs=q("<hb-input-select></hb-input-select>",2),eo=q("<hb-input-coords></hb-input-coords>",2),to=q('<div class="col mb-3 svelte-yjqjiw"><!> <!></div>'),no=q('<div class="row svelte-yjqjiw"></div>'),ro=q('<label class="svelte-yjqjiw"> </label>'),io=q("<hb-input-text></hb-input-text>",2),so=q("<hb-input-array-objects></hb-input-array-objects>",2),oo=q("<hb-input-array-tags></hb-input-array-tags>",2),ao=q("<hb-input-color></hb-input-color>",2),lo=q("<hb-input-range></hb-input-range>",2),uo=q("<hb-input-file></hb-input-file>",2),fo=q("<hb-input-email></hb-input-email>",2),co=q("<hb-input-date></hb-input-date>",2),ho=q("<hb-input-datetime></hb-input-datetime>",2),vo=q("<hb-input-checkbox></hb-input-checkbox>",2),po=q("<hb-input-number></hb-input-number>",2),_o=q("<hb-input-area></hb-input-area>",2),bo=q("<hb-input-radio></hb-input-radio>",2),mo=q("<hb-input-select></hb-input-select>",2),go=q("<hb-input-coords></hb-input-coords>",2),wo=q('<div class="col mb-3 svelte-yjqjiw"><!> <!></div>'),yo=q('<button part="main_button" type="button" class="btn btn-primary svelte-yjqjiw"><!></button>'),jo=q('<div id="button_container" part="button_container" class="svelte-yjqjiw"><span class="svelte-yjqjiw"><!></span> <!></div>'),Eo=q("<!> <!>",1),xo=q('<div class="container-fluid svelte-yjqjiw"><!></div>');const ko={hash:"svelte-yjqjiw",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
1
+ (function(Pn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const ti=1,ni=2,Jn=4,ri=8,ii=16,si=1,oi=2,Bn="[",Xt="[!",Hn="[?",Zt="]",at={},W=Symbol(),zn="http://www.w3.org/1999/xhtml",ai=!1;var Yn=Array.isArray,li=Array.prototype.indexOf,lt=Array.prototype.includes,Rt=Array.from,Mt=Object.keys,It=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ui=Object.getOwnPropertyDescriptors,fi=Object.prototype,ci=Array.prototype,Un=Object.getPrototypeOf,Gn=Object.isExtensible;const di=()=>{};function hi(e){for(var t=0;t<e.length;t++)e[t]()}function Kn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const U=2,ft=4,Vt=8,Wn=1<<24,Re=16,ge=32,Me=64,Qt=128,ce=512,Y=1024,Z=2048,xe=4096,oe=8192,de=16384,Ie=32768,Xn=1<<25,ct=65536,Zn=1<<17,vi=1<<18,We=1<<19,pi=1<<20,ke=1<<25,Xe=65536,en=1<<21,tn=1<<22,Ve=1<<23,nn=Symbol("$state"),_i=Symbol("legacy props"),bi=Symbol(""),$e=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},mi=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Dt=3,jt=8;function gi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function wi(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function yi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ji(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ei(e){throw new Error("https://svelte.dev/e/effect_orphan")}function xi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ki(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ni(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $i(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ti(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Lt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function qi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let R=!1;function we(e){R=e}let I;function re(e){if(e===null)throw Lt(),at;return I=e}function Et(){return re(Ne(I))}function Te(e){if(R){if(Ne(I)!==null)throw Lt(),at;I=e}}function Oi(e=1){if(R){for(var t=e,n=I;t--;)n=Ne(n);I=n}}function Ft(e=!0){for(var t=0,n=I;;){if(n.nodeType===jt){var r=n.data;if(r===Zt){if(t===0)return n;t-=1}else(r===Bn||r===Xt||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Ne(n);e&&n.remove(),n=i}}function Qn(e){if(!e||e.nodeType!==jt)throw Lt(),at;return e.data}function er(e){return e===this.v}function Ai(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function tr(e){return!Ai(e,this.v)}let Ci=!1,he=null;function dt(e){he=e}function nr(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:A,l:null}}function rr(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)$r(r)}return e!==void 0&&(t.x=e),t.i=!0,he=t.p,e??{}}function ir(){return!0}let Ze=[];function sr(){var e=Ze;Ze=[],hi(e)}function De(e){if(Ze.length===0&&!xt){var t=Ze;queueMicrotask(()=>{t===Ze&&sr()})}Ze.push(e)}function Ri(){for(;Ze.length>0;)sr()}function or(e){var t=A;if(t===null)return O.f|=Ve,e;if((t.f&Ie)===0&&(t.f&ft)===0)throw e;Le(e,t)}function Le(e,t){for(;t!==null;){if((t.f&Qt)!==0){if((t.f&Ie)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Mi=-7169;function H(e,t){e.f=e.f&Mi|t}function rn(e){(e.f&ce)!==0||e.deps===null?H(e,Y):H(e,xe)}function ar(e){if(e!==null)for(const t of e)(t.f&U)===0||(t.f&Xe)===0||(t.f^=Xe,ar(t.deps))}function lr(e,t,n){(e.f&Z)!==0?t.add(e):(e.f&xe)!==0&&n.add(e),ar(e.deps),H(e,Y)}const Fe=new Set;let F=null,ye=null,sn=null,xt=!1,on=!1,ht=null,Pt=null;var ur=0;let Ii=1;class qe{id=Ii++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#o=new Set;#a=new Set;#l=new Map;is_fork=!1;#c=!1;#u=new Set;#d(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#u)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#l.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#l.has(t)||this.#l.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#l.get(t);if(n){this.#l.delete(t);for(var r of n.d)H(r,Z),this.schedule(r);for(r of n.m)H(r,xe),this.schedule(r)}}#h(){if(ur++>1e3&&(Fe.delete(this),Vi()),!this.#d()){for(const o of this.#o)this.#a.delete(o),H(o,Z),this.schedule(o);for(const o of this.#a)H(o,xe),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=ht=[],r=[],i=Pt=[];for(const o of t)try{this.#f(o,n,r)}catch(l){throw vr(o),l}if(F=null,i.length>0){var s=qe.ensure();for(const o of i)s.schedule(o)}if(ht=null,Pt=null,this.#d()||this.#v()){this.#p(r),this.#p(n);for(const[o,l]of this.#l)hr(o,l)}else{this.#t.size===0&&Fe.delete(this),this.#o.clear(),this.#a.clear();for(const o of this.#e)o(this);this.#e.clear(),fr(r),fr(n),this.#s?.resolve()}var a=F;if(this.#r.length>0){const o=a??=this;o.#r.push(...this.#r.filter(l=>!o.#r.includes(l)))}a!==null&&(Fe.add(a),a.#h()),Fe.has(this)||this.#_()}#f(t,n,r){t.f^=Y;for(var i=t.first;i!==null;){var s=i.f,a=(s&(ge|Me))!==0,o=a&&(s&Y)!==0,l=o||(s&oe)!==0||this.#l.has(i);if(!l&&i.fn!==null){a?i.f^=Y:(s&ft)!==0?n.push(i):St(i)&&((s&Re)!==0&&this.#a.add(i),pt(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}#p(t){for(var n=0;n<t.length;n+=1)lr(t[n],this.#o,this.#a)}capture(t,n,r=!1){n!==W&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Ve)===0&&(this.current.set(t,[t.v,r]),ye?.set(t,t.v))}activate(){F=this}deactivate(){F=null,ye=null}flush(){try{on=!0,F=this,this.#h()}finally{ur=0,sn=null,ht=null,Pt=null,on=!1,F=null,ye=null,Je.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Fe.delete(this)}#_(){for(const u of Fe){var t=u.id<this.id,n=[];for(const[c,[_,v]]of this.current){if(u.current.has(c)){var r=u.current.get(c)[0];if(t&&_!==r)u.current.set(c,[_,v]);else continue}n.push(c)}var i=[...u.current.keys()].filter(c=>!this.current.has(c));if(i.length===0)t&&u.discard();else if(n.length>0){u.activate();var s=new Set,a=new Map;for(var o of n)cr(o,i,s,a);if(u.#r.length>0){u.apply();for(var l of u.#r)u.#f(l,[],[]);u.#r=[]}u.deactivate()}}for(const u of Fe)u.#u.has(this)&&(u.#u.delete(this),u.#u.size===0&&!u.#d()&&(u.activate(),u.#h()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,De(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#o.add(r);for(const r of n)this.#a.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=Kn()).promise}static ensure(){if(F===null){const t=F=new qe;on||(Fe.add(F),xt||De(()=>{F===t&&t.flush()}))}return F}apply(){{ye=null;return}}schedule(t){if(sn=t,t.b?.is_pending&&(t.f&(ft|Vt|Wn))!==0&&(t.f&Ie)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ht!==null&&n===A&&(O===null||(O.f&U)===0))return;if((r&(Me|ge))!==0){if((r&Y)===0)return;n.f^=Y}}this.#r.push(n)}}function Pe(e){var t=xt;xt=!0;try{for(var n;;){if(Ri(),F===null)return n;F.flush()}}finally{xt=t}}function Vi(){try{xi()}catch(e){Le(e,sn)}}let Oe=null;function fr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|oe))===0&&St(r)&&(Oe=new Set,pt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Or(r),Oe?.size>0)){Je.clear();for(const i of Oe){if((i.f&(de|oe))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Oe.has(a)&&(Oe.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(de|oe))===0&&pt(l)}}Oe.clear()}}Oe=null}}function cr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&U)!==0?cr(i,t,n,r):(s&(tn|Re))!==0&&(s&Z)===0&&dr(i,t,r)&&(H(i,Z),an(i))}}function dr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(lt.call(t,i))return!0;if((i.f&U)!==0&&dr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function an(e){F.schedule(e)}function hr(e,t){if(!((e.f&ge)!==0&&(e.f&Y)!==0)){(e.f&Z)!==0?t.d.push(e):(e.f&xe)!==0&&t.m.push(e),H(e,Y);for(var n=e.first;n!==null;)hr(n,t),n=n.next}}function vr(e){H(e,Y);for(var t=e.first;t!==null;)vr(t),t=t.next}function Di(e){let t=0,n=Qe(0),r;return()=>{pn()&&(h(n),Tr(()=>(t===0&&(r=as(()=>e(()=>Nt(n)))),t+=1,()=>{De(()=>{t-=1,t===0&&(r?.(),r=void 0,Nt(n))})})))}}var Li=ct|We;function Fi(e,t,n,r){new Pi(e,t,n,r)}class Pi{parent;is_pending=!1;transform_error;#e;#n=R?I:null;#t;#i;#s;#r=null;#o=null;#a=null;#l=null;#c=0;#u=0;#d=!1;#v=new Set;#h=new Set;#f=null;#p=Di(()=>(this.#f=Qe(this.#c),()=>{this.#f=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var a=A;a.b=this,a.f|=Qt,r(s)},this.parent=A.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=_n(()=>{if(R){const s=this.#n;Et();const a=s.data===Xt;if(s.data.startsWith(Hn)){const l=JSON.parse(s.data.slice(Hn.length));this.#y(l)}else a?this.#j():this.#_()}else this.#g()},Li),R&&(this.#e=I)}#_(){try{this.#r=pe(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#a=pe(()=>{n(this.#e,()=>t,()=>()=>{})}))}#j(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#o=pe(()=>t(this.#e)),De(()=>{var n=this.#l=document.createDocumentFragment(),r=le();n.append(r),this.#r=this.#m(()=>pe(()=>this.#i(r))),this.#u===0&&(this.#e.before(n),this.#l=null,tt(this.#o,()=>{this.#o=null}),this.#b(F))}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#c=0,this.#r=pe(()=>{this.#i(this.#e)}),this.#u>0){var t=this.#l=document.createDocumentFragment();gn(this.#r,t);const n=this.#t.pending;this.#o=pe(()=>n(this.#e))}else this.#b(F)}catch(n){this.error(n)}}#b(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){lr(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=A,r=O,i=he;_e(this.#s),ie(this.#s),dt(this.#s.ctx);try{return qe.ensure(),t()}catch(s){return or(s),null}finally{_e(n),ie(r),dt(i)}}#w(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t,n);return}this.#u+=t,this.#u===0&&(this.#b(n),this.#o&&tt(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(t,n){this.#w(t,n),this.#c+=t,!(!this.#f||this.#d)&&(this.#d=!0,De(()=>{this.#d=!1,this.#f&&vt(this.#f,this.#c)}))}get_effect_pending(){return this.#p(),h(this.#f)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(Q(this.#r),this.#r=null),this.#o&&(Q(this.#o),this.#o=null),this.#a&&(Q(this.#a),this.#a=null),R&&(re(this.#n),Oi(),re(Ft()));var i=!1,s=!1;const a=()=>{if(i){qi();return}i=!0,s&&Ti(),this.#a!==null&&tt(this.#a,()=>{this.#a=null}),this.#m(()=>{this.#g()})},o=l=>{try{s=!0,n?.(l,a),s=!1}catch(u){Le(u,this.#s&&this.#s.parent)}r&&(this.#a=this.#m(()=>{try{return pe(()=>{var u=A;u.b=this,u.f|=Qt,r(this.#e,()=>l,()=>a)})}catch(u){return Le(u,this.#s.parent),null}}))};De(()=>{var l;try{l=this.transform_error(t)}catch(u){Le(u,this.#s&&this.#s.parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(o,u=>Le(u,this.#s&&this.#s.parent)):o(l)})}}function Ji(e,t,n,r){const i=Bt;var s=e.filter(v=>!v.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var a=A,o=Bi(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(v=>v.promise)):null;function u(v){o();try{r(v)}catch(p){(a.f&de)===0&&Le(p,a)}Jt()}if(n.length===0){l.then(()=>u(t.map(i)));return}var c=pr();function _(){Promise.all(n.map(v=>Hi(v))).then(v=>u([...t.map(i),...v])).catch(v=>Le(v,a)).finally(()=>c())}l?l.then(()=>{o(),_(),Jt()}):_()}function Bi(){var e=A,t=O,n=he,r=F;return function(s=!0){_e(e),ie(t),dt(n),s&&(e.f&de)===0&&(r?.activate(),r?.apply())}}function Jt(e=!0){_e(null),ie(null),dt(null),e&&F?.deactivate()}function pr(){var e=A,t=e.b,n=F,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Bt(e){var t=U|Z,n=O!==null&&(O.f&U)!==0?O:null;return A!==null&&(A.f|=We),{ctx:he,deps:null,effects:null,equals:er,f:t,fn:e,reactions:null,rv:0,v:W,wv:0,parent:n??A,ac:null}}function Hi(e,t,n){let r=A;r===null&&gi();var i=void 0,s=Qe(W),a=!O,o=new Map;return ns(()=>{var l=A,u=Kn();i=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).finally(Jt)}catch(p){u.reject(p),Jt()}var c=F;if(a){if((l.f&Ie)!==0)var _=pr();if(r.b.is_rendered())o.get(c)?.reject($e),o.delete(c);else{for(const p of o.values())p.reject($e);o.clear()}o.set(c,u)}const v=(p,y=void 0)=>{if(_){var C=y===$e;_(C)}if(!(y===$e||(l.f&de)!==0)){if(c.activate(),y)s.f|=Ve,vt(s,y);else{(s.f&Ve)!==0&&(s.f^=Ve),vt(s,p);for(const[m,M]of o){if(o.delete(m),m===c)break;M.reject($e)}}c.deactivate()}};u.promise.then(v,p=>v(null,p||"unknown"))}),Sr(()=>{for(const l of o.values())l.reject($e)}),new Promise(l=>{function u(c){function _(){c===i?l(s):u(i)}c.then(_,_)}u(i)})}function kt(e){const t=Bt(e);return Mr(t),t}function zi(e){const t=Bt(e);return t.equals=tr,t}function Yi(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Q(t[n])}}function Ui(e){for(var t=e.parent;t!==null;){if((t.f&U)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function ln(e){var t,n=A;_e(Ui(e));try{e.f&=~Xe,Yi(e),t=Fr(e)}finally{_e(n)}return t}function _r(e){var t=e.v,n=ln(e);if(!e.equals(n)&&(e.wv=Dr(),(!F?.is_fork||e.deps===null)&&(e.v=n,F?.capture(e,t,!0),e.deps===null))){H(e,Y);return}ze||(ye!==null?(pn()||F?.is_fork)&&ye.set(e,n):rn(e))}function Gi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort($e),t.teardown=di,t.ac=null,$t(t,0),bn(t))}function br(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&pt(t)}let un=new Set;const Je=new Map;let mr=!1;function Qe(e,t){var n={f:0,v:e,reactions:null,equals:er,rv:0,wv:0};return n}function ve(e,t){const n=Qe(e);return Mr(n),n}function gr(e,t=!1,n=!0){const r=Qe(e);return t||(r.equals=tr),r}function ae(e,t,n=!1){O!==null&&(!je||(O.f&Zn)!==0)&&ir()&&(O.f&(U|Re|tn|Zn))!==0&&(be===null||!lt.call(be,e))&&$i();let r=n?Be(t):t;return vt(e,r,Pt)}function vt(e,t,n=null){if(!e.equals(t)){var r=e.v;ze?Je.set(e,t):Je.set(e,r),e.v=t;var i=qe.ensure();if(i.capture(e,r),(e.f&U)!==0){const s=e;(e.f&Z)!==0&&ln(s),ye===null&&rn(s)}e.wv=Dr(),wr(e,Z,n),A!==null&&(A.f&Y)!==0&&(A.f&(ge|Me))===0&&(me===null?ss([e]):me.push(e)),!i.is_fork&&un.size>0&&!mr&&Ki()}return t}function Ki(){mr=!1;for(const e of un)(e.f&Y)!==0&&H(e,xe),St(e)&&pt(e);un.clear()}function Nt(e){ae(e,e.v+1)}function wr(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],o=a.f,l=(o&Z)===0;if(l&&H(a,t),(o&U)!==0){var u=a;ye?.delete(u),(o&Xe)===0&&(o&ce&&(a.f|=Xe),wr(u,xe,n))}else if(l){var c=a;(o&Re)!==0&&Oe!==null&&Oe.add(c),n!==null?n.push(c):an(c)}}}function Be(e){if(typeof e!="object"||e===null||nn in e)return e;const t=Un(e);if(t!==fi&&t!==ci)return e;var n=new Map,r=Yn(e),i=ve(0),s=rt,a=o=>{if(rt===s)return o();var l=O,u=rt;ie(null),Vr(s);var c=o();return ie(l),Vr(u),c};return r&&n.set("length",ve(e.length)),new Proxy(e,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ni();var c=n.get(l);return c===void 0?a(()=>{var _=ve(u.value);return n.set(l,_),_}):ae(c,u.value,!0),!0},deleteProperty(o,l){var u=n.get(l);if(u===void 0){if(l in o){const c=a(()=>ve(W));n.set(l,c),Nt(i)}}else ae(u,W),Nt(i);return!0},get(o,l,u){if(l===nn)return e;var c=n.get(l),_=l in o;if(c===void 0&&(!_||ut(o,l)?.writable)&&(c=a(()=>{var p=Be(_?o[l]:W),y=ve(p);return y}),n.set(l,c)),c!==void 0){var v=h(c);return v===W?void 0:v}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var c=n.get(l);c&&(u.value=h(c))}else if(u===void 0){var _=n.get(l),v=_?.v;if(_!==void 0&&v!==W)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return u},has(o,l){if(l===nn)return!0;var u=n.get(l),c=u!==void 0&&u.v!==W||Reflect.has(o,l);if(u!==void 0||A!==null&&(!c||ut(o,l)?.writable)){u===void 0&&(u=a(()=>{var v=c?Be(o[l]):W,p=ve(v);return p}),n.set(l,u));var _=h(u);if(_===W)return!1}return c},set(o,l,u,c){var _=n.get(l),v=l in o;if(r&&l==="length")for(var p=u;p<_.v;p+=1){var y=n.get(p+"");y!==void 0?ae(y,W):p in o&&(y=a(()=>ve(W)),n.set(p+"",y))}if(_===void 0)(!v||ut(o,l)?.writable)&&(_=a(()=>ve(void 0)),ae(_,Be(u)),n.set(l,_));else{v=_.v!==W;var C=a(()=>Be(u));ae(_,C)}var m=Reflect.getOwnPropertyDescriptor(o,l);if(m?.set&&m.set.call(c,u),!v){if(r&&typeof l=="string"){var M=n.get("length"),B=Number(l);Number.isInteger(B)&&B>=M.v&&ae(M,B+1)}Nt(i)}return!0},ownKeys(o){h(i);var l=Reflect.ownKeys(o).filter(_=>{var v=n.get(_);return v===void 0||v.v!==W});for(var[u,c]of n)c.v!==W&&!(u in o)&&l.push(u);return l},setPrototypeOf(){Si()}})}var yr,jr,Er,xr;function fn(){if(yr===void 0){yr=window,jr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Er=ut(t,"firstChild").get,xr=ut(t,"nextSibling").get,Gn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Gn(n)&&(n.__t=void 0)}}function le(e=""){return document.createTextNode(e)}function et(e){return Er.call(e)}function Ne(e){return xr.call(e)}function He(e,t){if(!R)return et(e);var n=et(I);return n===null&&(n=I.appendChild(le())),re(n),n}function cn(e,t=!1){if(!R){var n=et(e);return n instanceof Comment&&n.data===""?Ne(n):n}if(t){if(I?.nodeType!==Dt){var r=le();return I?.before(r),re(r),r}hn(I)}return I}function Ht(e,t=1,n=!1){let r=R?I:e;for(var i;t--;)i=r,r=Ne(r);if(!R)return r;if(n){if(r?.nodeType!==Dt){var s=le();return r===null?i?.after(s):r.before(s),re(s),s}hn(r)}return re(r),r}function kr(e){e.textContent=""}function Nr(){return!1}function dn(e,t,n){return document.createElementNS(zn,e,void 0)}function hn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Dt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function vn(e){var t=O,n=A;ie(null),_e(null);try{return e()}finally{ie(t),_e(n)}}function Wi(e){A===null&&(O===null&&Ei(),ji()),ze&&yi()}function Xi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Se(e,t){var n=A;n!==null&&(n.f&oe)!==0&&(e|=oe);var r={ctx:he,deps:null,nodes:null,f:e|Z|ce,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((e&ft)!==0)ht!==null?ht.push(r):qe.ensure().schedule(r);else if(t!==null){try{pt(r)}catch(a){throw Q(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&We)===0&&(i=i.first,(e&Re)!==0&&(e&ct)!==0&&i!==null&&(i.f|=ct))}if(i!==null&&(i.parent=n,n!==null&&Xi(i,n),O!==null&&(O.f&U)!==0&&(e&Me)===0)){var s=O;(s.effects??=[]).push(i)}return r}function pn(){return O!==null&&!je}function Sr(e){const t=Se(Vt,null);return H(t,Y),t.teardown=e,t}function Zi(e){Wi();var t=A.f,n=!O&&(t&ge)!==0&&(t&Ie)===0;if(n){var r=he;(r.e??=[]).push(e)}else return $r(e)}function $r(e){return Se(ft|pi,e)}function Qi(e){qe.ensure();const t=Se(Me|We,e);return()=>{Q(t)}}function es(e){qe.ensure();const t=Se(Me|We,e);return(n={})=>new Promise(r=>{n.outro?tt(t,()=>{Q(t),r(void 0)}):(Q(t),r(void 0))})}function ts(e){return Se(ft,e)}function ns(e){return Se(tn|We,e)}function Tr(e,t=0){return Se(Vt|t,e)}function g(e,t=[],n=[],r=[]){Ji(r,t,n,i=>{Se(Vt,()=>e(...i.map(h)))})}function _n(e,t=0){var n=Se(Re|t,e);return n}function pe(e){return Se(ge|We,e)}function qr(e){var t=e.teardown;if(t!==null){const n=ze,r=O;Rr(!0),ie(null);try{t.call(null)}finally{Rr(n),ie(r)}}}function bn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&vn(()=>{i.abort($e)});var r=n.next;(n.f&Me)!==0?n.parent=null:Q(n,t),n=r}}function rs(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ge)===0&&Q(t),t=n}}function Q(e,t=!0){var n=!1;(t||(e.f&vi)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(is(e.nodes.start,e.nodes.end),n=!0),H(e,Xn),bn(e,t&&!n),$t(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();qr(e),e.f^=Xn,e.f|=de;var i=e.parent;i!==null&&i.first!==null&&Or(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function is(e,t){for(;e!==null;){var n=e===t?null:Ne(e);e.remove(),e=n}}function Or(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function tt(e,t,n=!0){var r=[];Ar(e,r,!0);var i=()=>{n&&Q(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function Ar(e,t,n){if((e.f&oe)===0){e.f^=oe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&ct)!==0||(i.f&ge)!==0&&(e.f&Re)!==0;Ar(i,t,a?n:!1),i=s}}}function mn(e){Cr(e,!0)}function Cr(e,t){if((e.f&oe)!==0){e.f^=oe,(e.f&Y)===0&&(H(e,Z),qe.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ct)!==0||(n.f&ge)!==0;Cr(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function gn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Ne(n);t.append(n),n=i}}let zt=!1,ze=!1;function Rr(e){ze=e}let O=null,je=!1;function ie(e){O=e}let A=null;function _e(e){A=e}let be=null;function Mr(e){O!==null&&(be===null?be=[e]:be.push(e))}let se=null,ue=0,me=null;function ss(e){me=e}let Ir=1,nt=0,rt=nt;function Vr(e){rt=e}function Dr(){return++Ir}function St(e){var t=e.f;if((t&Z)!==0)return!0;if(t&U&&(e.f&=~Xe),(t&xe)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(St(s)&&_r(s),s.wv>e.wv)return!0}(t&ce)!==0&&ye===null&&H(e,Y)}return!1}function Lr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(be!==null&&lt.call(be,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&U)!==0?Lr(s,t,!1):t===s&&(n?H(s,Z):(s.f&Y)!==0&&H(s,xe),an(s))}}function Fr(e){var t=se,n=ue,r=me,i=O,s=be,a=he,o=je,l=rt,u=e.f;se=null,ue=0,me=null,O=(u&(ge|Me))===0?e:null,be=null,dt(e.ctx),je=!1,rt=++nt,e.ac!==null&&(vn(()=>{e.ac.abort($e)}),e.ac=null);try{e.f|=en;var c=e.fn,_=c();e.f|=Ie;var v=e.deps,p=F?.is_fork;if(se!==null){var y;if(p||$t(e,ue),v!==null&&ue>0)for(v.length=ue+se.length,y=0;y<se.length;y++)v[ue+y]=se[y];else e.deps=v=se;if(pn()&&(e.f&ce)!==0)for(y=ue;y<v.length;y++)(v[y].reactions??=[]).push(e)}else!p&&v!==null&&ue<v.length&&($t(e,ue),v.length=ue);if(ir()&&me!==null&&!je&&v!==null&&(e.f&(U|xe|Z))===0)for(y=0;y<me.length;y++)Lr(me[y],e);if(i!==null&&i!==e){if(nt++,i.deps!==null)for(let C=0;C<n;C+=1)i.deps[C].rv=nt;if(t!==null)for(const C of t)C.rv=nt;me!==null&&(r===null?r=me:r.push(...me))}return(e.f&Ve)!==0&&(e.f^=Ve),_}catch(C){return or(C)}finally{e.f^=en,se=t,ue=n,me=r,O=i,be=s,dt(a),je=o,rt=l}}function os(e,t){let n=t.reactions;if(n!==null){var r=li.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&U)!==0&&(se===null||!lt.call(se,t))){var s=t;(s.f&ce)!==0&&(s.f^=ce,s.f&=~Xe),rn(s),Gi(s),$t(s,0)}}function $t(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)os(e,n[r])}function pt(e){var t=e.f;if((t&de)===0){H(e,Y);var n=A,r=zt;A=e,zt=!0;try{(t&(Re|Wn))!==0?rs(e):bn(e),qr(e);var i=Fr(e);e.teardown=typeof i=="function"?i:null,e.wv=Ir;var s;ai&&Ci&&(e.f&Z)!==0&&e.deps}finally{zt=r,A=n}}}function h(e){var t=e.f,n=(t&U)!==0;if(O!==null&&!je){var r=A!==null&&(A.f&de)!==0;if(!r&&(be===null||!lt.call(be,e))){var i=O.deps;if((O.f&en)!==0)e.rv<nt&&(e.rv=nt,se===null&&i!==null&&i[ue]===e?ue++:se===null?se=[e]:se.push(e));else{(O.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[O]:lt.call(s,O)||s.push(O)}}}if(ze&&Je.has(e))return Je.get(e);if(n){var a=e;if(ze){var o=a.v;return((a.f&Y)===0&&a.reactions!==null||Jr(a))&&(o=ln(a)),Je.set(a,o),o}var l=(a.f&ce)===0&&!je&&O!==null&&(zt||(O.f&ce)!==0),u=(a.f&Ie)===0;St(a)&&(l&&(a.f|=ce),_r(a)),l&&!u&&(br(a),Pr(a))}if(ye?.has(e))return ye.get(e);if((e.f&Ve)!==0)throw e.v;return e.v}function Pr(e){if(e.f|=ce,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&U)!==0&&(t.f&ce)===0&&(br(t),Pr(t))}function Jr(e){if(e.v===W)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Je.has(t)||(t.f&U)!==0&&Jr(t))return!0;return!1}function as(e){var t=je;try{return je=!0,e()}finally{je=t}}const Tt=Symbol("events"),Br=new Set,wn=new Set;function ls(e,t,n,r={}){function i(s){if(r.capture||yn.call(t,s),!s.cancelBubble)return vn(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?De(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function $(e,t,n,r,i){var s={capture:r,passive:i},a=ls(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Sr(()=>{t.removeEventListener(e,a,s)})}function us(e,t,n){(t[Tt]??={})[e]=n}function fs(e){for(var t=0;t<e.length;t++)Br.add(e[t]);for(var n of wn)n(e)}let Hr=null;function yn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Hr=e;var a=0,o=Hr===e&&e[Tt];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[Tt]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||e.target,s!==t){It(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=O,_=A;ie(null),_e(null);try{for(var v,p=[];s!==null;){var y=s.assignedSlot||s.parentNode||s.host||null;try{var C=s[Tt]?.[r];C!=null&&(!s.disabled||e.target===s)&&C.call(s,e)}catch(m){v?p.push(m):v=m}if(e.cancelBubble||y===t||y===null)break;s=y}if(v){for(let m of p)queueMicrotask(()=>{throw m});throw v}}finally{e[Tt]=t,delete e.currentTarget,ie(c),_e(_)}}}const cs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ds(e){return cs?.createHTML(e)??e}function hs(e){var t=dn("template");return t.innerHTML=ds(e.replaceAll("<!>","<!---->")),t.content}function Ye(e,t){var n=A;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&si)!==0,r=(t&oi)!==0,i,s=!e.startsWith("<!>");return()=>{if(R)return Ye(I,null),I;i===void 0&&(i=hs(s?e:"<!>"+e),n||(i=et(i)));var a=r||jr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=et(a),l=a.lastChild;Ye(o,l)}else Ye(a,a);return a}}function vs(e=""){if(!R){var t=le(e+"");return Ye(t,t),t}var n=I;return n.nodeType!==Dt?(n.before(n=le()),re(n)):hn(n),Ye(n,n),n}function zr(){if(R)return Ye(I,null),I;var e=document.createDocumentFragment(),t=document.createComment(""),n=le();return e.append(t,n),Ye(t,n),e}function S(e,t){if(R){var n=A;((n.f&Ie)===0||n.nodes.end===null)&&(n.nodes.end=I),Et();return}e!==null&&e.before(t)}const ps=["touchstart","touchmove"];function _s(e){return ps.includes(e)}function Yr(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Ur(e,t){return Gr(e,t)}function bs(e,t){fn(),t.intro=t.intro??!1;const n=t.target,r=R,i=I;try{for(var s=et(n);s&&(s.nodeType!==jt||s.data!==Bn);)s=Ne(s);if(!s)throw at;we(!0),re(s);const a=Gr(e,{...t,anchor:s});return we(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==at&&console.warn("Failed to hydrate: ",a),t.recover===!1&&ki(),fn(),kr(n),we(!1),Ur(e,t)}finally{we(r),re(i)}}const Yt=new Map;function Gr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:o}){fn();var l=void 0,u=es(()=>{var c=n??t.appendChild(le());Fi(c,{pending:()=>{}},p=>{nr({});var y=he;if(s&&(y.c=s),i&&(r.$$events=i),R&&Ye(p,null),l=e(p,r)||{},R&&(A.nodes.end=I,I===null||I.nodeType!==jt||I.data!==Zt))throw Lt(),at;rr()},o);var _=new Set,v=p=>{for(var y=0;y<p.length;y++){var C=p[y];if(!_.has(C)){_.add(C);var m=_s(C);for(const P of[t,document]){var M=Yt.get(P);M===void 0&&(M=new Map,Yt.set(P,M));var B=M.get(C);B===void 0?(P.addEventListener(C,yn,{passive:m}),M.set(C,1)):M.set(C,B+1)}}}};return v(Rt(Br)),wn.add(v),()=>{for(var p of _)for(const m of[t,document]){var y=Yt.get(m),C=y.get(p);--C==0?(m.removeEventListener(p,yn),y.delete(p),y.size===0&&Yt.delete(m)):y.set(p,C)}wn.delete(v),c!==n&&c.parentNode?.removeChild(c)}});return jn.set(l,u),l}let jn=new WeakMap;function ms(e,t){const n=jn.get(e);return n?(jn.delete(e),n(t)):Promise.resolve()}class gs{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)mn(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(a);o&&(Q(o.effect),this.#t.delete(a))}for(const[s,a]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();gn(a,u),u.append(le()),this.#t.set(s,{effect:a,fragment:u})}else Q(a);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),tt(a,o,!1)):o()}}};#o=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(Q(i.effect),this.#t.delete(r))};ensure(t,n){var r=F,i=Nr();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),a=le();s.append(a),this.#t.set(t,{effect:pe(()=>n(a)),fragment:s})}else this.#n.set(t,pe(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,l]of this.#n)o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of this.#t)o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#r),r.ondiscard(this.#o)}else R&&(this.anchor=I),this.#r(r)}}function Ue(e,t,n=!1){var r;R&&(r=I,Et());var i=new gs(e),s=n?ct:0;function a(o,l){if(R){var u=Qn(r);if(o!==parseInt(u.substring(1))){var c=Ft();re(c),i.anchor=c,we(!1),i.ensure(o,l),we(!0);return}}i.ensure(o,l)}_n(()=>{var o=!1;t((l,u=0)=>{o=!0,a(u,l)}),o||a(-1,null)},s)}function ws(e,t,n){for(var r=[],i=t.length,s,a=t.length,o=0;o<i;o++){let _=t[o];tt(_,()=>{if(s){if(s.pending.delete(_),s.done.add(_),s.pending.size===0){var v=e.outrogroups;En(e,Rt(s.done)),v.delete(s),v.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null;if(l){var u=n,c=u.parentNode;kr(c),c.append(u),e.items.clear()}En(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function En(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=ke;const a=document.createDocumentFragment();gn(s,a)}else Q(t[i],n)}}var Kr;function Wr(e,t,n,r,i,s=null){var a=e,o=new Map,l=(t&Jn)!==0;if(l){var u=e;a=R?re(et(u)):u.appendChild(le())}R&&Et();var c=null,_=zi(()=>{var P=n();return Yn(P)?P:P==null?[]:Rt(P)}),v,p=new Map,y=!0;function C(P){(B.effect.f&de)===0&&(B.pending.delete(P),B.fallback=c,ys(B,v,a,t,r),c!==null&&(v.length===0?(c.f&ke)===0?mn(c):(c.f^=ke,Ot(c,null,a)):tt(c,()=>{c=null})))}function m(P){B.pending.delete(P)}var M=_n(()=>{v=h(_);var P=v.length;let ne=!1;if(R){var _t=Qn(a)===Xt;_t!==(P===0)&&(a=Ft(),re(a),we(!1),ne=!0)}for(var Ee=new Set,X=F,Ae=Nr(),J=0;J<P;J+=1){R&&I.nodeType===jt&&I.data===Zt&&(a=I,ne=!0,we(!1));var T=v[J],bt=r(T,J),fe=y?null:o.get(bt);fe?(fe.v&&vt(fe.v,T),fe.i&&vt(fe.i,J),Ae&&X.unskip_effect(fe.e)):(fe=js(o,y?a:Kr??=le(),T,bt,J,i,t,n),y||(fe.e.f|=ke),o.set(bt,fe)),Ee.add(bt)}if(P===0&&s&&!c&&(y?c=pe(()=>s(a)):(c=pe(()=>s(Kr??=le())),c.f|=ke)),P>Ee.size&&wi(),R&&P>0&&re(Ft()),!y)if(p.set(X,Ee),Ae){for(const[Sn,$n]of o)Ee.has(Sn)||X.skip_effect($n.e);X.oncommit(C),X.ondiscard(m)}else C(X);ne&&we(!0),h(_)}),B={effect:M,items:o,pending:p,outrogroups:null,fallback:c};y=!1,R&&(a=I)}function qt(e){for(;e!==null&&(e.f&ge)===0;)e=e.next;return e}function ys(e,t,n,r,i){var s=(r&ri)!==0,a=t.length,o=e.items,l=qt(e.effect.first),u,c=null,_,v=[],p=[],y,C,m,M;if(s)for(M=0;M<a;M+=1)y=t[M],C=i(y,M),m=o.get(C).e,(m.f&ke)===0&&(m.nodes?.a?.measure(),(_??=new Set).add(m));for(M=0;M<a;M+=1){if(y=t[M],C=i(y,M),m=o.get(C).e,e.outrogroups!==null)for(const T of e.outrogroups)T.pending.delete(m),T.done.delete(m);if((m.f&oe)!==0&&(mn(m),s&&(m.nodes?.a?.unfix(),(_??=new Set).delete(m))),(m.f&ke)!==0)if(m.f^=ke,m===l)Ot(m,null,n);else{var B=c?c.next:l;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Ge(e,c,m),Ge(e,m,B),Ot(m,B,n),c=m,v=[],p=[],l=qt(c.next);continue}if(m!==l){if(u!==void 0&&u.has(m)){if(v.length<p.length){var P=p[0],ne;c=P.prev;var _t=v[0],Ee=v[v.length-1];for(ne=0;ne<v.length;ne+=1)Ot(v[ne],P,n);for(ne=0;ne<p.length;ne+=1)u.delete(p[ne]);Ge(e,_t.prev,Ee.next),Ge(e,c,_t),Ge(e,Ee,P),l=P,c=Ee,M-=1,v=[],p=[]}else u.delete(m),Ot(m,l,n),Ge(e,m.prev,m.next),Ge(e,m,c===null?e.effect.first:c.next),Ge(e,c,m),c=m;continue}for(v=[],p=[];l!==null&&l!==m;)(u??=new Set).add(l),p.push(l),l=qt(l.next);if(l===null)continue}(m.f&ke)===0&&v.push(m),c=m,l=qt(m.next)}if(e.outrogroups!==null){for(const T of e.outrogroups)T.pending.size===0&&(En(e,Rt(T.done)),e.outrogroups?.delete(T));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var X=[];if(u!==void 0)for(m of u)(m.f&oe)===0&&X.push(m);for(;l!==null;)(l.f&oe)===0&&l!==e.fallback&&X.push(l),l=qt(l.next);var Ae=X.length;if(Ae>0){var J=(r&Jn)!==0&&a===0?n:null;if(s){for(M=0;M<Ae;M+=1)X[M].nodes?.a?.measure();for(M=0;M<Ae;M+=1)X[M].nodes?.a?.fix()}ws(e,X,J)}}s&&De(()=>{if(_!==void 0)for(m of _)m.nodes?.a?.apply()})}function js(e,t,n,r,i,s,a,o){var l=(a&ti)!==0?(a&ii)===0?gr(n,!1,!1):Qe(n):null,u=(a&ni)!==0?Qe(i):null;return{v:l,i:u,e:pe(()=>(s(t,l??n,u??i,o),()=>{e.delete(r)}))}}function Ot(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&ke)===0?t.nodes.start:n;r!==null;){var a=Ne(r);if(s.before(r),r===i)return;r=a}}function Ge(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function xn(e,t,n,r,i){R&&Et();var s=t.$$slots?.[n],a=!1;s===!0&&(s=t[n==="default"?"children":n],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>r:r)}function Es(e,t){ts(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=dn("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function xs(e,t,n){var r=e==null?"":""+e;return r===""?null:r}function ks(e,t){return e==null?null:String(e)}function L(e,t,n,r,i,s){var a=e.__className;if(R||a!==n||a===void 0){var o=xs(n);(!R||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return s}function Ns(e,t,n,r){var i=e.__style;if(R||i!==t){var s=ks(t);(!R||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Ss=Symbol("is custom element"),$s=Symbol("is html"),Ts=mi?"link":"LINK";function kn(e,t,n,r){var i=qs(e);R&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Ts)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[bi]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Xr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function w(e,t,n){var r=O,i=A;let s=R;R&&we(!1),ie(null),_e(null);try{t!=="style"&&(Nn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Xr(e).includes(t):n&&typeof n=="object")?e[t]=n:kn(e,t,n==null?n:String(n))}finally{ie(r),_e(i),s&&we(!0)}}function qs(e){return e.__attributes??={[Ss]:e.nodeName.includes("-"),[$s]:e.namespaceURI===zn}}var Nn=new Map;function Xr(e){var t=e.getAttribute("is")||e.nodeName,n=Nn.get(t);if(n)return n;Nn.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=ui(i);for(var a in r)r[a].set&&n.push(a);i=Un(i)}return n}function it(e,t,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=a());var l;l=()=>{var v=e[t];return v===void 0?a():(s=!0,v)};var u=!1,c=Bt(()=>(u=!1,l())),_=A;return(function(v,p){if(arguments.length>0){const y=p?h(c):v;return ae(c,y),u=!0,i!==void 0&&(i=y),v}return ze&&u||(_.f&de)!==0?c.v:h(c)})}function Os(e){return new As(e)}class As{#e;#n;constructor(t){var n=new Map,r=(s,a)=>{var o=gr(a,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return h(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===_i?!0:(h(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return ae(n.get(a)??r(a,o),o),Reflect.set(s,a,o)}});this.#n=(t.hydrate?bs:Ur)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Pe(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||It(this,s,{get(){return this.#n[s]},set(a){this.#n[s]=a},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ms(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Zr;typeof HTMLElement=="function"&&(Zr=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 r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=dn("slot");r!=="default"&&(s.name=r),S(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Cs(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Ut(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Os({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Qi(()=>{Tr(()=>{this.$$r=!0;for(const r of Mt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ut(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ut(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 Mt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ut(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Cs(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Rs(e,t,n,r,i,s){let a=class extends Zr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Mt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Mt(t).forEach(o=>{It(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ut(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var c=ut(u,o)?.get;c?u[o]=l:u.$set({[o]:l})}}})}),r.forEach(o=>{It(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const ee={version:"0.66.4"},Ms=(e,t)=>e.reduce((n,r)=>{for(const i of t(r))(n[i]=n[i]||[]).push(r);return n},{});function te(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var Is=q('<label class="svelte-yjqjiw"> </label>'),Vs=q("<hb-input-array-objects></hb-input-array-objects>",2),Ds=q("<hb-input-array-tags></hb-input-array-tags>",2),Ls=q("<hb-input-text></hb-input-text>",2),Fs=q("<hb-input-color></hb-input-color>",2),Ps=q("<hb-input-range></hb-input-range>",2),Js=q("<hb-input-file></hb-input-file>",2),Bs=q("<hb-input-email></hb-input-email>",2),Hs=q("<hb-input-date></hb-input-date>",2),zs=q("<hb-input-datetime></hb-input-datetime>",2),Ys=q("<hb-input-checkbox></hb-input-checkbox>",2),Us=q("<hb-input-number></hb-input-number>",2),Gs=q("<hb-input-area></hb-input-area>",2),Ks=q("<hb-input-radio></hb-input-radio>",2),Ws=q("<hb-input-select></hb-input-select>",2),Xs=q("<hb-input-coords></hb-input-coords>",2),Zs=q('<div class="col mb-3 svelte-yjqjiw"><!> <!></div>'),Qs=q('<div class="row svelte-yjqjiw"></div>'),eo=q('<label class="svelte-yjqjiw"> </label>'),to=q("<hb-input-text></hb-input-text>",2),no=q("<hb-input-array-objects></hb-input-array-objects>",2),ro=q("<hb-input-array-tags></hb-input-array-tags>",2),io=q("<hb-input-color></hb-input-color>",2),so=q("<hb-input-range></hb-input-range>",2),oo=q("<hb-input-file></hb-input-file>",2),ao=q("<hb-input-email></hb-input-email>",2),lo=q("<hb-input-date></hb-input-date>",2),uo=q("<hb-input-datetime></hb-input-datetime>",2),fo=q("<hb-input-checkbox></hb-input-checkbox>",2),co=q("<hb-input-number></hb-input-number>",2),ho=q("<hb-input-area></hb-input-area>",2),vo=q("<hb-input-radio></hb-input-radio>",2),po=q("<hb-input-select></hb-input-select>",2),_o=q("<hb-input-coords></hb-input-coords>",2),bo=q('<div class="col mb-3 svelte-yjqjiw"><!> <!></div>'),mo=q('<button part="main_button" type="button" class="btn btn-primary svelte-yjqjiw"><!></button>'),go=q('<div id="button_container" part="button_container" class="svelte-yjqjiw"><span class="svelte-yjqjiw"><!></span> <!></div>'),wo=q("<!> <!>",1),yo=q('<div class="container-fluid svelte-yjqjiw"><!></div>');const jo={hash:"svelte-yjqjiw",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
3
  /*!
4
4
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
5
5
  * Copyright 2011-2021 The Bootstrap Authors
@@ -95,5 +95,5 @@ button.svelte-yjqjiw {margin:0;font-family:inherit;font-size:inherit;line-height
95
95
  @media (min-width: 1200px) {
96
96
  }
97
97
  @media (min-width: 1400px) {
98
- }:host {font-family:"Roboto", sans-serif;}`};function ti(e,t){rr(t,!0),ks(e,ko);const n={row:{component:void 0,options:{row:!0}},select:{component:"hb-input-select"},arrayobjects:{component:"hb-input-array-objects"},arraytags:{component:"hb-input-array-tags"},date:{component:"hb-input-date"},datetime:{component:"hb-input-datetime"},text:{component:"hb-input-text"},number:{component:"hb-input-number"},email:{component:"hb-input-email"},color:{component:"hb-input-color"},file:{component:"hb-input-file"},textarea:{component:"hb-input-area"},range:{component:"hb-input-range"},checkbox:{component:"hb-input-checkbox",options:{labelIsHandledByComponent:!0}},radio:{component:"hb-input-radio"},coords:{component:"hb-input-coords"}};let r=Nt(()=>{const b={};for(const E of s())if(E.type!=="row")b[E.id]=E.value;else if(E.type==="row"&&E.params?.columns?.length)for(const z of E.params.columns)b[z.id]=z.value;return b}),i=it(t,"id",7,""),s=it(t,"schema"),a=it(t,"i18nlang"),o=it(t,"show_validation",7,"no"),l=it(t,"hide_submit",7,!1),u=it(t,"submitted",7,"no"),f=it(t,"getvals",7,"no"),_=ve(Be({})),v=ve(Be({})),p=ve(Be({})),w=Nt(()=>{const b=[];for(const E of s())E.type==="row"&&E.params?.columns?.length?b.push(...E.params.columns):b.push(E);return Ls(b.filter(E=>E.dependencies?.length),E=>E.dependencies.map(z=>z.id))});function A(b){b?.forEach?.(E=>{const z=n[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);z.options?.row&&A(E.params?.columns??[]),h(_)[E.id]=h(_)[E.id]||!E.dependencies?.length})}function m(b){return b?.map?.(E=>{const z=n[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);return z.options?.row?{entry:E,columns:m(E.params?.columns??[]),options:z.options}:{entry:E,component:z.component,options:z.options||{}}})||[]}let M=Nt(()=>m(s()));l()===!0||l()==="yes"||l()==="true"?l(!0):l(!1),s()||console.warn("no schema provided"),es(()=>{if(typeof s()=="string")try{s(JSON.parse(s())),ae(v,{},!0),ae(p,{},!0),ae(_,{},!0),u()&&u()==="yes"&&s()&&typeof s()!="string"?J():u()==="yes"&&u("no"),console.log("effectform"),A(s())}catch(b){console.error("error with schema",s(),b)}});let B=Nt(()=>!h(v)||!Object.entries(h(v))?.length?!0:!!Object.entries(h(v)).find(([b,E])=>!E&&h(_)&&h(_)[b]));const F=b=>{console.log("canShow",b);for(const E of b.dependencies||[])if(h(_)&&!h(_)[E.id]||h(r)&&!h(r)[E.id]||h(r)&&E?.values&&!E?.values?.includes(h(r)[E.id]))return!1;return!0},ne=b=>{F(b)?bt(b,b.value):Ee(b)},bt=(b,E)=>{h(_)[b.id]=!0,b.type!=="row"&&(h(r)[b.id]=h(p)[b.id]??E);for(const z of h(w)[b.id]||[])ne(z)},Ee=b=>{h(_)[b.id]=!1,delete h(r)[b.id];for(const E of h(w)[b.id]||[])Ee(E)};te.addComponent({repoName:"@htmlbricks/hb-input-text",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-date",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-email",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-checkbox",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-number",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-area",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-radio",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-select",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-file",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-color",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-range",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-datetime",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-array-objects",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-array-tags",version:ee.version}),te.addComponent({repoName:"@htmlbricks/hb-input-coords",version:ee.version});let X=ve(void 0);function Ce(b,E){b==="update"?(console.log("update",E),h(X)&&clearTimeout(h(X)),ae(X,setTimeout(()=>{t.$$host.dispatchEvent(new CustomEvent(b,{detail:E}))},300),!0)):t.$$host.dispatchEvent(new CustomEvent(b,{detail:E}))}const J=()=>{if(console.log("submitting form"),o("yes"),u("no"),console.log(h(B),JSON.stringify(h(v)),h(_),h(r)),h(B))return console.warn("Form is invalid");const b=Object.assign({_valid:!h(B)},h(r));Ce("submit",b)};function T(b){console.info("setValByMessage",b);let E;if(h(p)[b.id]!==b.value){if(h(p)[b.id]=b.value,h(_)[b.id]&&(h(r)[b.id]=b.value),h(w)[b.id])for(const z of h(w)[b.id])ne(z);E=Object.assign({_valid:!h(B),_id:i()},h(r))}h(v)[b.id]!==b.valid&&(h(v)[b.id]=b.valid,E=Object.assign({_valid:!h(B),_id:i()},h(r))),E&&Ce("update",E)}var mt={get id(){return i()},set id(b=""){i(b),Fe()},get schema(){return s()},set schema(b){s(b),Fe()},get i18nlang(){return a()},set i18nlang(b){a(b),Fe()},get show_validation(){return o()},set show_validation(b="no"){o(b),Fe()},get hide_submit(){return l()},set hide_submit(b=!1){l(b),Fe()},get submitted(){return u()},set submitted(b="no"){u(b),Fe()},get getvals(){return f()},set getvals(b="no"){f(b),Fe()}},fe=xo(),Sn=He(fe);{var Tn=b=>{var E=Eo(),z=dn(E);Xr(z,17,()=>h(M),({entry:ot,component:Ae,options:j,columns:W})=>ot.id,(ot,Ae)=>{let j=()=>h(Ae).entry,W=()=>h(Ae).component,Gt=()=>h(Ae).options,At=()=>h(Ae).columns;var gt=Yr(),qn=dn(gt);{var On=Ge=>{var at=no();Xr(at,21,At,({entry:wt,component:yt,options:An})=>wt.id,(wt,yt,An,ni)=>{let x=()=>h(yt).entry,G=()=>h(yt).component,Rn=()=>h(yt).options;var Kt=Yr(),Mn=dn(Kt);{var Dn=Rt=>{var jt=to(),Xt=He(jt);{var Ln=N=>{var d=Is(),V=He(d);Te(d),g(()=>{Nn(d,"for",x().id),Ur(V,`${x().label??""}${x().required?"*":""}`)}),$(N,d)};Ue(Xt,N=>{Rn().labelIsHandledByComponent||N(Ln)})}var Vn=zt(Xt,2);{var In=N=>{var d=Ps();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},Pn=N=>{var d=Fs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},Fn=N=>{var d=Js();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},k=N=>{var d=Bs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},c=N=>{var d=Hs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},L=N=>{var d=zs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},To=N=>{var d=Ys();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},qo=N=>{var d=Us();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},Oo=N=>{var d=Ws();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},Co=N=>{var d=Gs();I(d,1,"checkbox-inline svelte-yjqjiw"),g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),S("setVal",d,V=>T(V.detail)),$(N,d)},Ao=N=>{var d=Ks();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},Ro=N=>{var d=Xs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),S("clickEnter",d,()=>J()),$(N,d)},Mo=N=>{var d=Zs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},Do=N=>{var d=Qs();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)},Lo=N=>{var d=eo();g(()=>y(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>y(d,"i18nlang",a())),g(()=>y(d,"show_validation",o())),I(d,1,"svelte-yjqjiw"),S("setVal",d,V=>T(V.detail)),$(N,d)};Ue(Vn,N=>{G()==="hb-array-objects"?N(In):G()==="hb-input-array-tags"?N(Pn,1):G()==="hb-input-text"?N(Fn,2):G()==="hb-input-color"?N(k,3):G()==="hb-input-range"?N(c,4):G()==="hb-input-file"?N(L,5):G()==="hb-input-email"?N(To,6):G()==="hb-input-date"?N(qo,7):G()==="hb-input-datetime"?N(Oo,8):G()==="hb-input-checkbox"?N(Co,9):G()==="hb-input-number"?N(Ao,10):G()==="hb-input-area"?N(Ro,11):G()==="hb-input-radio"?N(Mo,12):G()==="hb-input-select"?N(Do,13):G()==="hb-input-coords"&&N(Lo,14)})}Te(jt),g(()=>Ss(jt,G()==="hb-input-checkbox"?"line-height:52px;":"")),$(Rt,jt)};Ue(Mn,Rt=>{h(_)[x().id]&&Rt(Dn)})}$(wt,Kt)}),Te(at),$(Ge,at)},Cn=Nt(()=>Gt()?.row&&(h(_)[j().id]||h(_)[j().id]!==!1)&&At()?.length?At().some(Ge=>h(_)[Ge.entry.id]):!1),So=Ge=>{var at=wo(),wt=He(at);{var yt=k=>{var c=ro(),L=He(c);Te(c),g(()=>{Nn(c,"for",j().id),Ur(L,`${j().label??""}${j().required?"*":""}`)}),$(k,c)};Ue(wt,k=>{Gt()?.labelIsHandledByComponent||k(yt)})}var An=zt(wt,2);{var ni=k=>{var c=io();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},x=k=>{var c=so();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},G=k=>{var c=oo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Rn=k=>{var c=ao();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Kt=k=>{var c=lo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Mn=k=>{var c=uo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Dn=k=>{var c=fo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},Rt=k=>{var c=co();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},jt=k=>{var c=ho();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},Xt=k=>{var c=vo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Ln=k=>{var c=po();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},Vn=k=>{var c=_o();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),S("clickEnter",c,()=>J()),$(k,c)},In=k=>{var c=bo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Pn=k=>{var c=mo();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)},Fn=k=>{var c=go();g(()=>y(c,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>y(c,"i18nlang",a())),g(()=>y(c,"show_validation",o())),I(c,1,"svelte-yjqjiw"),S("setVal",c,L=>T(L.detail)),$(k,c)};Ue(An,k=>{W()==="hb-input-text"?k(ni):W()==="hb-input-array-objects"?k(x,1):W()==="hb-input-array-tags"?k(G,2):W()==="hb-input-color"?k(Rn,3):W()==="hb-input-range"?k(Kt,4):W()==="hb-input-file"?k(Mn,5):W()==="hb-input-email"?k(Dn,6):W()==="hb-input-date"?k(Rt,7):W()==="hb-input-datetime"?k(jt,8):W()==="hb-input-checkbox"?k(Xt,9):W()==="hb-input-number"?k(Ln,10):W()==="hb-input-area"?k(Vn,11):W()==="hb-input-radio"?k(In,12):W()==="hb-input-select"?k(Pn,13):W()==="hb-input-coords"&&k(Fn,14)})}Te(at),$(Ge,at)};Ue(qn,Ge=>{h(Cn)?Ge(On):h(_)&&h(_)[j().id]&&Ge(So,1)})}$(ot,gt)});var No=zt(z,2);{var $o=ot=>{var Ae=jo(),j=He(Ae),W=He(j);kn(W,t,"submit_button",{},At=>{var gt=yo(),qn=He(gt);kn(qn,t,"submit_label",{},On=>{var Cn=_s("Submit");$(On,Cn)}),Te(gt),$(At,gt)}),Te(j);var Gt=zt(j,2);kn(Gt,t,"other_buttons",{},null),Te(Ae),cs("click",j,()=>J()),$(ot,Ae)};Ue(No,ot=>{l()||ot($o)})}$(b,E)};Ue(Sn,b=>{s()&&typeof s()=="object"&&s()?.length&&b(Tn)})}return Te(fe),$(e,fe),ir(mt)}ds(["click"]),customElements.define("hb-form",Ds(ti,{id:{},schema:{},i18nlang:{},show_validation:{},hide_submit:{},submitted:{},getvals:{}},["submit_button","submit_label","other_buttons"],[],{mode:"open"})),Jn.Component=ti,Object.defineProperty(Jn,Symbol.toStringTag,{value:"Module"})})(this.form=this.form||{});
98
+ }:host {font-family:"Roboto", sans-serif;}`};function Qr(e,t){nr(t,!0),Es(e,jo);const n={row:{component:void 0,options:{row:!0}},select:{component:"hb-input-select"},arrayobjects:{component:"hb-input-array-objects"},arraytags:{component:"hb-input-array-tags"},date:{component:"hb-input-date"},datetime:{component:"hb-input-datetime"},text:{component:"hb-input-text"},number:{component:"hb-input-number"},email:{component:"hb-input-email"},color:{component:"hb-input-color"},file:{component:"hb-input-file"},textarea:{component:"hb-input-area"},range:{component:"hb-input-range"},checkbox:{component:"hb-input-checkbox",options:{labelIsHandledByComponent:!0}},radio:{component:"hb-input-radio"},coords:{component:"hb-input-coords"}};let r=kt(()=>{const b={};for(const E of s())if(E.type!=="row")b[E.id]=E.value;else if(E.type==="row"&&E.params?.columns?.length)for(const z of E.params.columns)b[z.id]=z.value;return b}),i=it(t,"id",7,""),s=it(t,"schema"),a=it(t,"i18nlang"),o=it(t,"show_validation",7,"no"),l=it(t,"hide_submit",7,!1),u=it(t,"submitted",7,"no"),c=it(t,"getvals",7,"no"),_=ve(Be({})),v=ve(Be({})),p=ve(Be({})),y=kt(()=>{const b=[];for(const E of s())E.type==="row"&&E.params?.columns?.length?b.push(...E.params.columns):b.push(E);return Ms(b.filter(E=>E.dependencies?.length),E=>E.dependencies.map(z=>z.id))});function C(b){b?.forEach?.(E=>{const z=n[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);z.options?.row&&C(E.params?.columns??[]),h(_)[E.id]=h(_)[E.id]||!E.dependencies?.length})}function m(b){return b?.map?.(E=>{const z=n[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);return z.options?.row?{entry:E,columns:m(E.params?.columns??[]),options:z.options}:{entry:E,component:z.component,options:z.options||{}}})||[]}let M=kt(()=>m(s()));l()===!0||l()==="yes"||l()==="true"?l(!0):l(!1),s()||console.warn("no schema provided"),Zi(()=>{if(typeof s()=="string")try{s(JSON.parse(s())),ae(v,{},!0),ae(p,{},!0),ae(_,{},!0),u()&&u()==="yes"&&s()&&typeof s()!="string"?J():u()==="yes"&&u("no"),console.log("effectform"),C(s())}catch(b){console.error("error with schema",s(),b)}});let B=kt(()=>!h(v)||!Object.entries(h(v))?.length?!0:!!Object.entries(h(v)).find(([b,E])=>!E&&h(_)&&h(_)[b]));const P=b=>{console.log("canShow",b);for(const E of b.dependencies||[])if(h(_)&&!h(_)[E.id]||h(r)&&!h(r)[E.id]||h(r)&&E?.values&&!E?.values?.includes(h(r)[E.id]))return!1;return!0},ne=b=>{P(b)?_t(b,b.value):Ee(b)},_t=(b,E)=>{h(_)[b.id]=!0,b.type!=="row"&&(h(r)[b.id]=h(p)[b.id]??E);for(const z of h(y)[b.id]||[])ne(z)},Ee=b=>{h(_)[b.id]=!1,delete h(r)[b.id];for(const E of h(y)[b.id]||[])Ee(E)};te({repoName:"@htmlbricks/hb-input-text",version:ee.version}),te({repoName:"@htmlbricks/hb-input-date",version:ee.version}),te({repoName:"@htmlbricks/hb-input-email",version:ee.version}),te({repoName:"@htmlbricks/hb-input-checkbox",version:ee.version}),te({repoName:"@htmlbricks/hb-input-number",version:ee.version}),te({repoName:"@htmlbricks/hb-input-area",version:ee.version}),te({repoName:"@htmlbricks/hb-input-radio",version:ee.version}),te({repoName:"@htmlbricks/hb-input-select",version:ee.version}),te({repoName:"@htmlbricks/hb-input-file",version:ee.version}),te({repoName:"@htmlbricks/hb-input-color",version:ee.version}),te({repoName:"@htmlbricks/hb-input-range",version:ee.version}),te({repoName:"@htmlbricks/hb-input-datetime",version:ee.version}),te({repoName:"@htmlbricks/hb-input-array-objects",version:ee.version}),te({repoName:"@htmlbricks/hb-input-array-tags",version:ee.version}),te({repoName:"@htmlbricks/hb-input-coords",version:ee.version});let X=ve(void 0);function Ae(b,E){b==="update"?(console.log("update",E),h(X)&&clearTimeout(h(X)),ae(X,setTimeout(()=>{t.$$host.dispatchEvent(new CustomEvent(b,{detail:E}))},300),!0)):t.$$host.dispatchEvent(new CustomEvent(b,{detail:E}))}const J=()=>{if(console.log("submitting form"),o("yes"),u("no"),console.log(h(B),JSON.stringify(h(v)),h(_),h(r)),h(B))return console.warn("Form is invalid");const b=Object.assign({_valid:!h(B)},h(r));Ae("submit",b)};function T(b){console.info("setValByMessage",b);let E;if(h(p)[b.id]!==b.value){if(h(p)[b.id]=b.value,h(_)[b.id]&&(h(r)[b.id]=b.value),h(y)[b.id])for(const z of h(y)[b.id])ne(z);E=Object.assign({_valid:!h(B),_id:i()},h(r))}h(v)[b.id]!==b.valid&&(h(v)[b.id]=b.valid,E=Object.assign({_valid:!h(B),_id:i()},h(r))),E&&Ae("update",E)}var bt={get id(){return i()},set id(b=""){i(b),Pe()},get schema(){return s()},set schema(b){s(b),Pe()},get i18nlang(){return a()},set i18nlang(b){a(b),Pe()},get show_validation(){return o()},set show_validation(b="no"){o(b),Pe()},get hide_submit(){return l()},set hide_submit(b=!1){l(b),Pe()},get submitted(){return u()},set submitted(b="no"){u(b),Pe()},get getvals(){return c()},set getvals(b="no"){c(b),Pe()}},fe=yo(),Sn=He(fe);{var $n=b=>{var E=wo(),z=cn(E);Wr(z,17,()=>h(M),({entry:st,component:Ce,options:j,columns:G})=>st.id,(st,Ce)=>{let j=()=>h(Ce).entry,G=()=>h(Ce).component,Gt=()=>h(Ce).options,At=()=>h(Ce).columns;var mt=zr(),Tn=cn(mt);{var qn=Ke=>{var ot=Qs();Wr(ot,21,At,({entry:gt,component:wt,options:An})=>gt.id,(gt,wt,An,ei)=>{let x=()=>h(wt).entry,K=()=>h(wt).component,Cn=()=>h(wt).options;var Kt=zr(),Rn=cn(Kt);{var Mn=Ct=>{var yt=Zs(),Wt=He(yt);{var In=N=>{var d=Is(),D=He(d);Te(d),g(()=>{kn(d,"for",x().id),Yr(D,`${x().label??""}${x().required?"*":""}`)}),S(N,d)};Ue(Wt,N=>{Cn().labelIsHandledByComponent||N(In)})}var Vn=Ht(Wt,2);{var Dn=N=>{var d=Vs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},Ln=N=>{var d=Ds();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},Fn=N=>{var d=Ls();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},k=N=>{var d=Fs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},f=N=>{var d=Ps();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},V=N=>{var d=Js();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},No=N=>{var d=Bs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},So=N=>{var d=Hs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},$o=N=>{var d=zs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},To=N=>{var d=Ys();L(d,1,"checkbox-inline svelte-yjqjiw"),g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),$("setVal",d,D=>T(D.detail)),S(N,d)},qo=N=>{var d=Us();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},Oo=N=>{var d=Gs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),$("clickEnter",d,()=>J()),S(N,d)},Ao=N=>{var d=Ks();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},Co=N=>{var d=Ws();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)},Ro=N=>{var d=Xs();g(()=>w(d,"schemaentry",JSON.stringify({...x(),value:h(p)[x().id]??x().value}))),g(()=>w(d,"i18nlang",a())),g(()=>w(d,"show_validation",o())),L(d,1,"svelte-yjqjiw"),$("setVal",d,D=>T(D.detail)),S(N,d)};Ue(Vn,N=>{K()==="hb-array-objects"?N(Dn):K()==="hb-input-array-tags"?N(Ln,1):K()==="hb-input-text"?N(Fn,2):K()==="hb-input-color"?N(k,3):K()==="hb-input-range"?N(f,4):K()==="hb-input-file"?N(V,5):K()==="hb-input-email"?N(No,6):K()==="hb-input-date"?N(So,7):K()==="hb-input-datetime"?N($o,8):K()==="hb-input-checkbox"?N(To,9):K()==="hb-input-number"?N(qo,10):K()==="hb-input-area"?N(Oo,11):K()==="hb-input-radio"?N(Ao,12):K()==="hb-input-select"?N(Co,13):K()==="hb-input-coords"&&N(Ro,14)})}Te(yt),g(()=>Ns(yt,K()==="hb-input-checkbox"?"line-height:52px;":"")),S(Ct,yt)};Ue(Rn,Ct=>{h(_)[x().id]&&Ct(Mn)})}S(gt,Kt)}),Te(ot),S(Ke,ot)},On=kt(()=>Gt()?.row&&(h(_)[j().id]||h(_)[j().id]!==!1)&&At()?.length?At().some(Ke=>h(_)[Ke.entry.id]):!1),ko=Ke=>{var ot=bo(),gt=He(ot);{var wt=k=>{var f=eo(),V=He(f);Te(f),g(()=>{kn(f,"for",j().id),Yr(V,`${j().label??""}${j().required?"*":""}`)}),S(k,f)};Ue(gt,k=>{Gt()?.labelIsHandledByComponent||k(wt)})}var An=Ht(gt,2);{var ei=k=>{var f=to();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},x=k=>{var f=no();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},K=k=>{var f=ro();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Cn=k=>{var f=io();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Kt=k=>{var f=so();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Rn=k=>{var f=oo();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Mn=k=>{var f=ao();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},Ct=k=>{var f=lo();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},yt=k=>{var f=uo();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},Wt=k=>{var f=fo();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},In=k=>{var f=co();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},Vn=k=>{var f=ho();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),$("clickEnter",f,()=>J()),S(k,f)},Dn=k=>{var f=vo();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Ln=k=>{var f=po();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)},Fn=k=>{var f=_o();g(()=>w(f,"schemaentry",JSON.stringify({...j(),value:h(p)[j().id]??j().value},null,0))),g(()=>w(f,"i18nlang",a())),g(()=>w(f,"show_validation",o())),L(f,1,"svelte-yjqjiw"),$("setVal",f,V=>T(V.detail)),S(k,f)};Ue(An,k=>{G()==="hb-input-text"?k(ei):G()==="hb-input-array-objects"?k(x,1):G()==="hb-input-array-tags"?k(K,2):G()==="hb-input-color"?k(Cn,3):G()==="hb-input-range"?k(Kt,4):G()==="hb-input-file"?k(Rn,5):G()==="hb-input-email"?k(Mn,6):G()==="hb-input-date"?k(Ct,7):G()==="hb-input-datetime"?k(yt,8):G()==="hb-input-checkbox"?k(Wt,9):G()==="hb-input-number"?k(In,10):G()==="hb-input-area"?k(Vn,11):G()==="hb-input-radio"?k(Dn,12):G()==="hb-input-select"?k(Ln,13):G()==="hb-input-coords"&&k(Fn,14)})}Te(ot),S(Ke,ot)};Ue(Tn,Ke=>{h(On)?Ke(qn):h(_)&&h(_)[j().id]&&Ke(ko,1)})}S(st,mt)});var Eo=Ht(z,2);{var xo=st=>{var Ce=go(),j=He(Ce),G=He(j);xn(G,t,"submit_button",{},At=>{var mt=mo(),Tn=He(mt);xn(Tn,t,"submit_label",{},qn=>{var On=vs("Submit");S(qn,On)}),Te(mt),S(At,mt)}),Te(j);var Gt=Ht(j,2);xn(Gt,t,"other_buttons",{},null),Te(Ce),us("click",j,()=>J()),S(st,Ce)};Ue(Eo,st=>{l()||st(xo)})}S(b,E)};Ue(Sn,b=>{s()&&typeof s()=="object"&&s()?.length&&b($n)})}return Te(fe),S(e,fe),rr(bt)}fs(["click"]),customElements.define("hb-form",Rs(Qr,{id:{},schema:{},i18nlang:{},show_validation:{},hide_submit:{},submitted:{},getvals:{}},["submit_button","submit_label","other_buttons"],[],{mode:"open"})),Pn.Component=Qr,Object.defineProperty(Pn,Symbol.toStringTag,{value:"Module"})})(this.form=this.form||{});
99
99
  //# sourceMappingURL=main.iife.js.map