@htmlbricks/hb-form-composer 0.62.0 → 0.62.1

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(Xt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const fr=1,ur=2,cr=16,dr=1,hr=4,vr=8,_r=16,pr=1,br=2,Zt="[",nt="[!",Et="]",Me={},O=Symbol(),mr="http://www.w3.org/1999/xhtml",Qt=!1;var en=Array.isArray,gr=Array.prototype.indexOf,xt=Array.from,rt=Object.keys,it=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,wr=Object.prototype,$r=Array.prototype,tn=Object.getPrototypeOf,nn=Object.isExtensible;function Er(e){for(var t=0;t<e.length;t++)e[t]()}function rn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const R=2,st=4,Tt=8,fe=16,ue=32,pe=64,ot=128,Q=512,L=1024,j=2048,ce=4096,H=8192,be=16384,St=32768,De=65536,sn=1<<17,on=1<<18,Se=1<<19,xr=1<<20,Ye=32768,Ct=1<<21,kt=1<<22,me=1<<23,lt=Symbol("$state"),ln=Symbol("legacy props"),Tr=Symbol(""),Ie=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},At=3,Fe=8;function Sr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ar(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Or(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Lr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Pr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Mr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Dr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ir(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function at(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Fr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let w=!1;function ee(e){w=e}let $;function V(e){if(e===null)throw at(),Me;return $=e}function ft(){return V(ie($))}function an(e){if(w){if(ie($)!==null)throw at(),Me;$=e}}function qr(e=1){if(w){for(var t=e,n=$;t--;)n=ie(n);$=n}}function ut(e=!0){for(var t=0,n=$;;){if(n.nodeType===Fe){var r=n.data;if(r===Et){if(t===0)return n;t-=1}else(r===Zt||r===nt)&&(t+=1)}var i=ie(n);e&&n.remove(),n=i}}function fn(e){if(!e||e.nodeType!==Fe)throw at(),Me;return e.data}function un(e){return e===this.v}function jr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function cn(e){return!jr(e,this.v)}let Br=!1,U=null;function qe(e){U=e}function dn(e,t=!1,n){U={p:U,i:!1,c:null,e:null,s:e,x:null,l:null}}function hn(e){var t=U,n=t.e;if(n!==null){t.e=null;for(var r of n)Dn(r)}return e!==void 0&&(t.x=e),t.i=!0,U=t.p,e??{}}function vn(){return!0}let Ce=[];function _n(){var e=Ce;Ce=[],Er(e)}function ct(e){if(Ce.length===0&&!Je){var t=Ce;queueMicrotask(()=>{t===Ce&&_n()})}Ce.push(e)}function Hr(){for(;Ce.length>0;)_n()}function pn(e){var t=g;if(t===null)return m.f|=me,e;if((t.f&St)===0){if((t.f&ot)===0)throw e;t.b.error(e)}else je(e,t)}function je(e,t){for(;t!==null;){if((t.f&ot)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const dt=new Set;let C=null,Y=null,re=[],ht=null,Nt=!1,Je=!1;class te{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#o=[];#l=[];skipped_effects=new Set;is_fork=!1;process(t){re=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#i(r,n);this.is_fork||this.#f(),this.#r>0||this.is_fork?(this.#s(n.effects),this.#s(n.render_effects),this.#s(n.block_effects)):(C=null,mn(n.render_effects),mn(n.effects),this.#a?.resolve()),Y=null}#i(t,n){t.f^=L;for(var r=t.first;r!==null;){var i=r.f,s=(i&(ue|pe))!==0,o=s&&(i&L)!==0,l=o||(i&H)!==0||this.skipped_effects.has(r);if((r.f&ot)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){s?r.f^=L:(i&st)!==0?n.effects.push(r):Xe(r)&&((r.f&fe)!==0&&n.block_effects.push(r),Ze(r));var a=r.first;if(a!==null){r=a;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)f===n.effect&&(this.#s(n.effects),this.#s(n.render_effects),this.#s(n.block_effects),n=n.parent),r=f.next,f=f.parent}}#s(t){for(const n of t)((n.f&j)!==0?this.#o:this.#l).push(n),I(n,L)}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&me)===0&&(this.current.set(t,t.v),Y?.set(t,t.v))}activate(){C=this,this.apply()}deactivate(){C=null,Y=null}flush(){if(this.activate(),re.length>0){if(bn(),C!==null&&C!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#f(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#u()}#u(){if(dt.size>1){this.previous.clear();var t=Y,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of dt){if(i===this){n=!1;continue}const s=[];for(const[l,a]of this.current){if(i.current.has(l))if(n&&a!==i.current.get(l))i.current.set(l,a);else continue;s.push(l)}if(s.length===0)continue;const o=[...i.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){const l=new Set,a=new Map;for(const f of s)gn(f,o,l,a);if(re.length>0){C=i,i.apply();for(const f of re)i.#i(f,r);re=[],i.deactivate()}}}C=null,Y=t}this.committed=!0,dt.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#o)I(t,j),ke(t);for(const t of this.#l)I(t,ce),ke(t);this.#o=[],this.#l=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=rn()).promise}static ensure(){if(C===null){const t=C=new te;dt.add(C),Je||te.enqueue(()=>{C===t&&t.flush()})}return C}static enqueue(t){ct(t)}apply(){}}function vt(e){var t=Je;Je=!0;try{for(var n;;){if(Hr(),re.length===0&&(C?.flush(),re.length===0))return ht=null,n;bn()}}finally{Je=t}}function bn(){var e=Ne;Nt=!0;try{var t=0;for(Un(!0);re.length>0;){var n=te.ensure();if(t++>1e3){var r,i;Vr()}n.process(re),ge.clear()}}finally{Nt=!1,Un(e),ht=null}}function Vr(){try{Or()}catch(e){je(e,ht)}}let de=null;function mn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(be|H))===0&&Xe(r)&&(de=new Set,Ze(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?jn(r):r.fn=null),de?.size>0)){ge.clear();for(const i of de){if((i.f&(be|H))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)de.has(o)&&(de.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(be|H))===0&&Ze(a)}}de.clear()}}de=null}}function gn(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&R)!==0?gn(i,t,n,r):(s&(kt|fe))!==0&&(s&j)===0&&yn(i,t,r)&&(I(i,j),ke(i))}}function yn(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(t.includes(i))return!0;if((i.f&R)!==0&&yn(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function ke(e){for(var t=ht=e;t.parent!==null;){t=t.parent;var n=t.f;if(Nt&&t===g&&(n&fe)!==0&&(n&on)===0)return;if((n&(pe|ue))!==0){if((n&L)===0)return;t.f^=L}}re.push(t)}function Ur(e){let t=0,n=Ae(0),r;return()=>{bt()&&(y(n),In(()=>(t===0&&(r=jt(()=>e(()=>We(n)))),t+=1,()=>{ct(()=>{t-=1,t===0&&(r?.(),r=void 0,We(n))})})))}}var Yr=De|Se|ot;function Jr(e,t,n){new zr(e,t,n)}class zr{parent;#t=!1;#e;#n=w?$:null;#r;#a;#o;#l=null;#i=null;#s=null;#f=null;#u=null;#h=0;#c=0;#v=!1;#d=null;#g=Ur(()=>(this.#d=Ae(this.#h),()=>{this.#d=null}));constructor(t,n,r){this.#e=t,this.#r=n,this.#a=r,this.parent=g.b,this.#t=!!this.#r.pending,this.#o=It(()=>{if(g.b=this,w){const s=this.#n;ft(),s.nodeType===Fe&&s.data===nt?this.#w():this.#y()}else{var i=this.#b();try{this.#l=K(()=>r(i))}catch(s){this.error(s)}this.#c>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},Yr),w&&(this.#e=$)}#y(){try{this.#l=K(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#r.pending;t&&(this.#i=K(()=>t(this.#e)),te.enqueue(()=>{var n=this.#b();this.#l=this.#_(()=>(te.ensure(),K(()=>this.#a(n)))),this.#c>0?this.#p():(He(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=ne(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var n=g,r=m,i=U;X(this.#o),D(this.#o),qe(this.#o.ctx);try{return t()}catch(s){return pn(s),null}finally{X(n),D(r),qe(i)}}#p(){const t=this.#r.pending;this.#l!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Vn(this.#l,this.#f)),this.#i===null&&(this.#i=K(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#c+=t,this.#c===0&&(this.#t=!1,this.#i&&He(this.#i,()=>{this.#i=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#h+=t,this.#d&&ze(this.#d,this.#h)}get_effect_pending(){return this.#g(),y(this.#d)}error(t){var n=this.#r.onerror;let r=this.#r.failed;if(this.#v||!n&&!r)throw t;this.#l&&(M(this.#l),this.#l=null),this.#i&&(M(this.#i),this.#i=null),this.#s&&(M(this.#s),this.#s=null),w&&(V(this.#n),qr(),V(ut()));var i=!1,s=!1;const o=()=>{if(i){Fr();return}i=!0,s&&Ir(),te.ensure(),this.#h=0,this.#s!==null&&He(this.#s,()=>{this.#s=null}),this.#t=this.has_pending_snippet(),this.#l=this.#_(()=>(this.#v=!1,K(()=>this.#a(this.#e)))),this.#c>0?this.#p():this.#t=!1};var l=m;try{D(null),s=!0,n?.(t,o),s=!1}catch(a){je(a,this.#o&&this.#o.parent)}finally{D(l)}r&&ct(()=>{this.#s=this.#_(()=>{te.ensure(),this.#v=!0;try{return K(()=>{r(this.#e,()=>t,()=>o)})}catch(a){return je(a,this.#o.parent),null}finally{this.#v=!1}})})}}function Wr(e,t,n,r){const i=Ot;if(n.length===0&&e.length===0){r(t.map(i));return}var s=C,o=g,l=Gr();function a(){Promise.all(n.map(f=>Kr(f))).then(f=>{l();try{r([...t.map(i),...f])}catch(d){(o.f&be)===0&&je(d,o)}s?.deactivate(),_t()}).catch(f=>{je(f,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return a()}finally{s?.deactivate(),_t()}}):a()}function Gr(){var e=g,t=m,n=U,r=C;return function(s=!0){X(e),D(t),qe(n),s&&r?.activate()}}function _t(){X(null),D(null),qe(null)}function Ot(e){var t=R|j,n=m!==null&&(m.f&R)!==0?m:null;return g!==null&&(g.f|=Se),{ctx:U,deps:null,effects:null,equals:un,f:t,fn:e,reactions:null,rv:0,v:O,wv:0,parent:n??g,ac:null}}function Kr(e,t){let n=g;n===null&&Cr();var r=n.b,i=void 0,s=Ae(O),o=!m,l=new Map;return ii(()=>{var a=rn();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{f===C&&f.committed&&f.deactivate(),_t()})}catch(u){a.reject(u),_t()}var f=C;if(o){var d=!r.is_pending();r.update_pending_count(1),f.increment(d),l.get(f)?.reject(Ie),l.delete(f),l.set(f,a)}const v=(u,c=void 0)=>{if(f.activate(),c)c!==Ie&&(s.f|=me,ze(s,c));else{(s.f&me)!==0&&(s.f^=me),ze(s,u);for(const[_,p]of l){if(l.delete(_),_===f)break;p.reject(Ie)}}o&&(r.update_pending_count(-1),f.decrement(d))};a.promise.then(v,u=>v(null,u||"unknown"))}),Pn(()=>{for(const a of l.values())a.reject(Ie)}),new Promise(a=>{function f(d){function v(){d===i?a(s):f(i)}d.then(v,v)}f(i)})}function wn(e){const t=Ot(e);return t.equals=cn,t}function $n(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)M(t[n])}}function Xr(e){for(var t=e.parent;t!==null;){if((t.f&R)===0)return t;t=t.parent}return null}function Rt(e){var t,n=g;X(Xr(e));try{e.f&=~Ye,$n(e),t=Kn(e)}finally{X(n)}return t}function En(e){var t=Rt(e);if(e.equals(t)||(e.v=t,e.wv=Wn()),!Oe)if(Y!==null)bt()&&Y.set(e,e.v);else{var n=(e.f&Q)===0?ce:L;I(e,n)}}let Lt=new Set;const ge=new Map;let xn=!1;function Ae(e,t){var n={f:0,v:e,reactions:null,equals:un,rv:0,wv:0};return n}function P(e,t){const n=Ae(e);return li(n),n}function Tn(e,t=!1,n=!0){const r=Ae(e);return t||(r.equals=cn),r}function k(e,t,n=!1){m!==null&&(!oe||(m.f&sn)!==0)&&vn()&&(m.f&(R|fe|kt|sn))!==0&&!he?.includes(e)&&Dr();let r=n?ye(t):t;return ze(e,r)}function ze(e,t){if(!e.equals(t)){var n=e.v;Oe?ge.set(e,t):ge.set(e,n),e.v=t;var r=te.ensure();r.capture(e,n),(e.f&R)!==0&&((e.f&j)!==0&&Rt(e),I(e,(e.f&Q)!==0?L:ce)),e.wv=Wn(),Sn(e,j),g!==null&&(g.f&L)!==0&&(g.f&(ue|pe))===0&&(Z===null?ai([e]):Z.push(e)),!r.is_fork&&Lt.size>0&&!xn&&Zr()}return t}function Zr(){xn=!1;const e=Array.from(Lt);for(const t of e)(t.f&L)!==0&&I(t,ce),Xe(t)&&Ze(t);Lt.clear()}function We(e){k(e,e.v+1)}function Sn(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,l=(o&j)===0;if(l&&I(s,t),(o&R)!==0){var a=s;Y?.delete(a),(o&Ye)===0&&(o&Q&&(s.f|=Ye),Sn(a,ce))}else l&&((o&fe)!==0&&de!==null&&de.add(s),ke(s))}}function ye(e){if(typeof e!="object"||e===null||lt in e)return e;const t=tn(e);if(t!==wr&&t!==$r)return e;var n=new Map,r=en(e),i=P(0),s=Re,o=l=>{if(Re===s)return l();var a=m,f=Re;D(null),zn(s);var d=l();return D(a),zn(f),d};return r&&n.set("length",P(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Pr();var d=n.get(a);return d===void 0?d=o(()=>{var v=P(f.value);return n.set(a,v),v}):k(d,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const d=o(()=>P(O));n.set(a,d),We(i)}}else k(f,O),We(i);return!0},get(l,a,f){if(a===lt)return e;var d=n.get(a),v=a in l;if(d===void 0&&(!v||Te(l,a)?.writable)&&(d=o(()=>{var c=ye(v?l[a]:O),_=P(c);return _}),n.set(a,d)),d!==void 0){var u=y(d);return u===O?void 0:u}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var d=n.get(a);d&&(f.value=y(d))}else if(f===void 0){var v=n.get(a),u=v?.v;if(v!==void 0&&u!==O)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(l,a){if(a===lt)return!0;var f=n.get(a),d=f!==void 0&&f.v!==O||Reflect.has(l,a);if(f!==void 0||g!==null&&(!d||Te(l,a)?.writable)){f===void 0&&(f=o(()=>{var u=d?ye(l[a]):O,c=P(u);return c}),n.set(a,f));var v=y(f);if(v===O)return!1}return d},set(l,a,f,d){var v=n.get(a),u=a in l;if(r&&a==="length")for(var c=f;c<v.v;c+=1){var _=n.get(c+"");_!==void 0?k(_,O):c in l&&(_=o(()=>P(O)),n.set(c+"",_))}if(v===void 0)(!u||Te(l,a)?.writable)&&(v=o(()=>P(void 0)),k(v,ye(f)),n.set(a,v));else{u=v.v!==O;var p=o(()=>ye(f));k(v,p)}var T=Reflect.getOwnPropertyDescriptor(l,a);if(T?.set&&T.set.call(d,f),!u){if(r&&typeof a=="string"){var z=n.get("length"),S=Number(a);Number.isInteger(S)&&S>=z.v&&k(z,S+1)}We(i)}return!0},ownKeys(l){y(i);var a=Reflect.ownKeys(l).filter(v=>{var u=n.get(v);return u===void 0||u.v!==O});for(var[f,d]of n)d.v!==O&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Mr()}})}var Cn,kn,An,Nn;function Pt(){if(Cn===void 0){Cn=window,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;An=Te(t,"firstChild").get,Nn=Te(t,"nextSibling").get,nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),nn(n)&&(n.__t=void 0)}}function ne(e=""){return document.createTextNode(e)}function Be(e){return An.call(e)}function ie(e){return Nn.call(e)}function On(e,t){if(!w)return Be(e);var n=Be($);return n===null&&(n=$.appendChild(ne())),V(n),n}function pt(e,t=!1){if(!w){var n=Be(e);return n instanceof Comment&&n.data===""?ie(n):n}if(t&&$?.nodeType!==At){var r=ne();return $?.before(r),V(r),r}return $}function Mt(e,t=1,n=!1){let r=w?$:e;for(var i;t--;)i=r,r=ie(r);if(!w)return r;if(n&&r?.nodeType!==At){var s=ne();return r===null?i?.after(s):r.before(s),V(s),s}return V(r),r}function Rn(e){e.textContent=""}function Ln(){return!1}function Dt(e){var t=m,n=g;D(null),X(null);try{return e()}finally{D(t),X(n)}}function Qr(e){g===null&&(m===null&&Nr(),Ar()),Oe&&kr()}function ei(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,n,r=!0){var i=g;i!==null&&(i.f&H)!==0&&(e|=H);var s={ctx:U,deps:null,nodes_start:null,nodes_end:null,f:e|j|Q,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Ze(s),s.f|=St}catch(a){throw M(s),a}else t!==null&&ke(s);if(r){var o=s;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Se)===0&&(o=o.first,(e&fe)!==0&&(e&De)!==0&&o!==null&&(o.f|=De)),o!==null&&(o.parent=i,i!==null&&ei(o,i),m!==null&&(m.f&R)!==0&&(e&pe)===0)){var l=m;(l.effects??=[]).push(o)}}return s}function bt(){return m!==null&&!oe}function Pn(e){const t=se(Tt,null,!1);return I(t,L),t.teardown=e,t}function Mn(e){Qr();var t=g.f,n=!m&&(t&ue)!==0&&(t&St)===0;if(n){var r=U;(r.e??=[]).push(e)}else return Dn(e)}function Dn(e){return se(st|xr,e,!1)}function ti(e){te.ensure();const t=se(pe|Se,e,!0);return()=>{M(t)}}function ni(e){te.ensure();const t=se(pe|Se,e,!0);return(n={})=>new Promise(r=>{n.outro?He(t,()=>{M(t),r(void 0)}):(M(t),r(void 0))})}function ri(e){return se(st,e,!1)}function ii(e){return se(kt|Se,e,!0)}function In(e,t=0){return se(Tt|t,e,!0)}function Ge(e,t=[],n=[],r=[],i=!1){Wr(r,t,n,s=>{se(i?st:Tt,()=>e(...s.map(y)),!0)})}function It(e,t=0){var n=se(fe|t,e,!0);return n}function K(e,t=!0){return se(ue|Se,e,!0,t)}function Fn(e){var t=e.teardown;if(t!==null){const n=Oe,r=m;Yn(!0),D(null);try{t.call(null)}finally{Yn(n),D(r)}}}function qn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Dt(()=>{i.abort(Ie)});var r=n.next;(n.f&pe)!==0?n.parent=null:M(n,t),n=r}}function si(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&M(t),t=n}}function M(e,t=!0){var n=!1;(t||(e.f&on)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(oi(e.nodes_start,e.nodes_end),n=!0),qn(e,t&&!n),mt(e,0),I(e,be);var r=e.transitions;if(r!==null)for(const s of r)s.stop();Fn(e);var i=e.parent;i!==null&&i.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function oi(e,t){for(;e!==null;){var n=e===t?null:ie(e);e.remove(),e=n}}function jn(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 He(e,t,n=!0){var r=[];Ft(e,r,!0),Bn(r,()=>{n&&M(e),t&&t()})}function Bn(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Ft(e,t,n){if((e.f&H)===0){if(e.f^=H,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,s=(r.f&De)!==0||(r.f&ue)!==0&&(e.f&fe)!==0;Ft(r,t,s?n:!1),r=i}}}function qt(e){Hn(e,!0)}function Hn(e,t){if((e.f&H)!==0){e.f^=H,(e.f&L)===0&&(I(e,j),ke(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&De)!==0||(n.f&ue)!==0;Hn(n,i?t:!1),n=r}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}function Vn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:ie(n);t.append(n),n=i}}let Ne=!1;function Un(e){Ne=e}let Oe=!1;function Yn(e){Oe=e}let m=null,oe=!1;function D(e){m=e}let g=null;function X(e){g=e}let he=null;function li(e){m!==null&&(he===null?he=[e]:he.push(e))}let q=null,J=0,Z=null;function ai(e){Z=e}let Jn=1,Ke=0,Re=Ke;function zn(e){Re=e}function Wn(){return++Jn}function Xe(e){var t=e.f;if((t&j)!==0)return!0;if(t&R&&(e.f&=~Ye),(t&ce)!==0){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i];if(Xe(s)&&En(s),s.wv>e.wv)return!0}(t&Q)!==0&&Y===null&&I(e,L)}return!1}function Gn(e,t,n=!0){var r=e.reactions;if(r!==null&&!he?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&R)!==0?Gn(s,t,!1):t===s&&(n?I(s,j):(s.f&L)!==0&&I(s,ce),ke(s))}}function Kn(e){var t=q,n=J,r=Z,i=m,s=he,o=U,l=oe,a=Re,f=e.f;q=null,J=0,Z=null,m=(f&(ue|pe))===0?e:null,he=null,qe(e.ctx),oe=!1,Re=++Ke,e.ac!==null&&(Dt(()=>{e.ac.abort(Ie)}),e.ac=null);try{e.f|=Ct;var d=e.fn,v=d(),u=e.deps;if(q!==null){var c;if(mt(e,J),u!==null&&J>0)for(u.length=J+q.length,c=0;c<q.length;c++)u[J+c]=q[c];else e.deps=u=q;if(Ne&&bt()&&(e.f&Q)!==0)for(c=J;c<u.length;c++)(u[c].reactions??=[]).push(e)}else u!==null&&J<u.length&&(mt(e,J),u.length=J);if(vn()&&Z!==null&&!oe&&u!==null&&(e.f&(R|ce|j))===0)for(c=0;c<Z.length;c++)Gn(Z[c],e);return i!==null&&i!==e&&(Ke++,Z!==null&&(r===null?r=Z:r.push(...Z))),(e.f&me)!==0&&(e.f^=me),v}catch(_){return pn(_)}finally{e.f^=Ct,q=t,J=n,Z=r,m=i,he=s,qe(o),oe=l,Re=a}}function fi(e,t){let n=t.reactions;if(n!==null){var r=gr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&R)!==0&&(q===null||!q.includes(t))&&(I(t,ce),(t.f&Q)!==0&&(t.f^=Q,t.f&=~Ye),$n(t),mt(t,0))}function mt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)fi(e,n[r])}function Ze(e){var t=e.f;if((t&be)===0){I(e,L);var n=g,r=Ne;g=e,Ne=!0;try{(t&fe)!==0?si(e):qn(e),Fn(e);var i=Kn(e);e.teardown=typeof i=="function"?i:null,e.wv=Jn;var s;Qt&&Br&&(e.f&j)!==0&&e.deps}finally{Ne=r,g=n}}}function y(e){var t=e.f,n=(t&R)!==0;if(m!==null&&!oe){var r=g!==null&&(g.f&be)!==0;if(!r&&!he?.includes(e)){var i=m.deps;if((m.f&Ct)!==0)e.rv<Ke&&(e.rv=Ke,q===null&&i!==null&&i[J]===e?J++:q===null?q=[e]:q.includes(e)||q.push(e));else{(m.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[m]:s.includes(m)||s.push(m)}}}if(Oe){if(ge.has(e))return ge.get(e);if(n){var o=e,l=o.v;return((o.f&L)===0&&o.reactions!==null||Zn(o))&&(l=Rt(o)),ge.set(o,l),l}}else if(n){if(o=e,Y?.has(o))return Y.get(o);Xe(o)&&En(o),Ne&&bt()&&(o.f&Q)===0&&Xn(o)}else if(Y?.has(e))return Y.get(e);if((e.f&me)!==0)throw e.v;return e.v}function Xn(e){if(e.deps!==null){e.f^=Q;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&R)!==0&&(t.f&Q)===0&&Xn(t)}}function Zn(e){if(e.v===O)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ge.has(t)||(t.f&R)!==0&&Zn(t))return!0;return!1}function jt(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const ui=-7169;function I(e,t){e.f=e.f&ui|t}const Qn=new Set,Bt=new Set;function ci(e,t,n,r={}){function i(s){if(r.capture||et.call(t,s),!s.cancelBubble)return Dt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ct(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qe(e,t,n,r,i){var s={capture:r,passive:i},o=ci(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pn(()=>{t.removeEventListener(e,o,s)})}function di(e){for(var t=0;t<e.length;t++)Qn.add(e[t]);for(var n of Bt)n(e)}let er=null;function et(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;er=e;var o=0,l=er===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=i[o]||e.target,s!==t){it(e,"currentTarget",{configurable:!0,get(){return s||n}});var d=m,v=g;D(null),X(null);try{for(var u,c=[];s!==null;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var p=s["__"+r];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(T){u?c.push(T):u=T}if(e.cancelBubble||_===t||_===null)break;s=_}if(u){for(let T of c)queueMicrotask(()=>{throw T});throw u}}finally{e.__root=t,delete e.currentTarget,D(d),X(v)}}}function hi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function we(e,t){var n=g;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function gt(e,t){var n=(t&pr)!==0,r=(t&br)!==0,i,s=!e.startsWith("<!>");return()=>{if(w)return we($,null),$;i===void 0&&(i=hi(s?e:"<!>"+e),n||(i=Be(i)));var o=r||kn?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Be(o),a=o.lastChild;we(l,a)}else we(o,o);return o}}function vi(e=""){if(!w){var t=ne(e+"");return we(t,t),t}var n=$;return n.nodeType!==At&&(n.before(n=ne()),V(n)),we(n,n),n}function tr(){if(w)return we($,null),$;var e=document.createDocumentFragment(),t=document.createComment(""),n=ne();return e.append(t,n),we(t,n),e}function $e(e,t){if(w){g.nodes_end=$,ft();return}e!==null&&e.before(t)}const _i=["touchstart","touchmove"];function pi(e){return _i.includes(e)}function nr(e,t){return rr(e,t)}function bi(e,t){Pt(),t.intro=t.intro??!1;const n=t.target,r=w,i=$;try{for(var s=Be(n);s&&(s.nodeType!==Fe||s.data!==Zt);)s=ie(s);if(!s)throw Me;ee(!0),V(s);const o=rr(e,{...t,anchor:s});return ee(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Rr(),Pt(),Rn(n),ee(!1),nr(e,t)}finally{ee(r),V(i)}}const Ve=new Map;function rr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0}){Pt();var l=new Set,a=v=>{for(var u=0;u<v.length;u++){var c=v[u];if(!l.has(c)){l.add(c);var _=pi(c);t.addEventListener(c,et,{passive:_});var p=Ve.get(c);p===void 0?(document.addEventListener(c,et,{passive:_}),Ve.set(c,1)):Ve.set(c,p+1)}}};a(xt(Qn)),Bt.add(a);var f=void 0,d=ni(()=>{var v=n??t.appendChild(ne());return Jr(v,{pending:()=>{}},u=>{if(s){dn({});var c=U;c.c=s}if(i&&(r.$$events=i),w&&we(u,null),f=e(u,r)||{},w&&(g.nodes_end=$,$===null||$.nodeType!==Fe||$.data!==Et))throw at(),Me;s&&hn()}),()=>{for(var u of l){t.removeEventListener(u,et);var c=Ve.get(u);--c===0?(document.removeEventListener(u,et),Ve.delete(u)):Ve.set(u,c)}Bt.delete(a),v!==n&&v.parentNode?.removeChild(v)}});return Ht.set(f,d),f}let Ht=new WeakMap;function mi(e,t){const n=Ht.get(e);return n?(Ht.delete(e),n(t)):Promise.resolve()}class gi{anchor;#t=new Map;#e=new Map;#n=new Map;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#a=()=>{var t=C;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#e.get(n);if(r)qt(r);else{var i=this.#n.get(n);i&&(this.#e.set(n,i.effect),this.#n.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#t){if(this.#t.delete(s),s===t)break;const l=this.#n.get(o);l&&(M(l.effect),this.#n.delete(o))}for(const[s,o]of this.#e){if(s===n)continue;const l=()=>{if(Array.from(this.#t.values()).includes(s)){var f=document.createDocumentFragment();Vn(o,f),f.append(ne()),this.#n.set(s,{effect:o,fragment:f})}else M(o);this.#e.delete(s)};this.#r||!r?He(o,l,!1):l()}}};#o=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,i]of this.#n)n.includes(r)||(M(i.effect),this.#n.delete(r))};ensure(t,n){var r=C,i=Ln();if(n&&!this.#e.has(t)&&!this.#n.has(t))if(i){var s=document.createDocumentFragment(),o=ne();s.append(o),this.#n.set(t,{effect:K(()=>n(o)),fragment:s})}else this.#e.set(t,K(()=>n(this.anchor)));if(this.#t.set(r,t),i){for(const[l,a]of this.#e)l===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[l,a]of this.#n)l===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(this.#a),r.ondiscard(this.#o)}else w&&(this.anchor=$),this.#a()}}function yi(e){U===null&&Sr(),Mn(()=>{const t=jt(e);if(typeof t=="function")return t})}function yt(e,t,n=!1){w&&ft();var r=new gi(e),i=n?De:0;function s(o,l){if(w){const f=fn(e)===nt;if(o===f){var a=ut();V(a),r.anchor=a,ee(!1),r.ensure(o,l),ee(!0);return}}r.ensure(o,l)}It(()=>{var o=!1;t((l,a=!0)=>{o=!0,s(a,l)}),o||s(!1,null)},i)}function wi(e,t,n){for(var r=e.items,i=[],s=t.length,o=0;o<s;o++)Ft(t[o].e,i,!0);var l=s>0&&i.length===0&&n!==null;if(l){var a=n.parentNode;Rn(a),a.append(n),r.clear(),le(e,t[0].prev,t[s-1].next)}Bn(i,()=>{for(var f=0;f<s;f++){var d=t[f];l||(r.delete(d.k),le(e,d.prev,d.next)),M(d.e,!l)}})}function $i(e,t,n,r,i,s=null){var o=e,l={flags:t,items:new Map,first:null};w&&ft();var a=null,f=!1,d=new Map,v=wn(()=>{var p=n();return en(p)?p:p==null?[]:xt(p)}),u,c;function _(){Ei(c,u,l,d,o,i,t,r,n),s!==null&&(u.length===0?a?qt(a):a=K(()=>s(o)):a!==null&&He(a,()=>{a=null}))}It(()=>{c??=g,u=y(v);var p=u.length;if(f&&p===0)return;f=p===0;let T=!1;if(w){var z=fn(o)===nt;z!==(p===0)&&(o=ut(),V(o),ee(!1),T=!0)}if(w){for(var S=null,E,b=0;b<p;b++){if($.nodeType===Fe&&$.data===Et){o=$,T=!0,ee(!1);break}var F=u[b],W=r(F,b);E=Vt($,l,S,null,F,W,b,i,t,n),l.items.set(W,E),S=E}p>0&&V(ut())}if(w)p===0&&s&&(a=K(()=>s(o)));else if(Ln()){var Pe=new Set,ve=C;for(b=0;b<p;b+=1){F=u[b],W=r(F,b);var G=l.items.get(W)??d.get(W);G?ir(G,F,b):(E=Vt(null,l,null,null,F,W,b,i,t,n,!0),d.set(W,E)),Pe.add(W)}for(const[Ue,h]of l.items)Pe.has(Ue)||ve.skipped_effects.add(h.e);ve.oncommit(_)}else _();T&&ee(!0),y(v)}),w&&(o=$)}function Ei(e,t,n,r,i,s,o,l,a){var f=t.length,d=n.items,v=n.first,u=v,c,_=null,p=[],T=[],z,S,E,b;for(b=0;b<f;b+=1){if(z=t[b],S=l(z,b),E=d.get(S),E===void 0){var F=r.get(S);if(F!==void 0){r.delete(S),d.set(S,F);var W=_?_.next:u;le(n,_,F),le(n,F,W),Ut(F,W,i),_=F}else{var Pe=u?u.e.nodes_start:i;_=Vt(Pe,n,_,_===null?n.first:_.next,z,S,b,s,o,a)}d.set(S,_),p=[],T=[],u=_.next;continue}if(ir(E,z,b),(E.e.f&H)!==0&&qt(E.e),E!==u){if(c!==void 0&&c.has(E)){if(p.length<T.length){var ve=T[0],G;_=ve.prev;var Ue=p[0],h=p[p.length-1];for(G=0;G<p.length;G+=1)Ut(p[G],ve,i);for(G=0;G<T.length;G+=1)c.delete(T[G]);le(n,Ue.prev,h.next),le(n,_,Ue),le(n,h,ve),u=ve,_=h,b-=1,p=[],T=[]}else c.delete(E),Ut(E,u,i),le(n,E.prev,E.next),le(n,E,_===null?n.first:_.next),le(n,_,E),_=E;continue}for(p=[],T=[];u!==null&&u.k!==S;)(u.e.f&H)===0&&(c??=new Set).add(u),T.push(u),u=u.next;if(u===null)continue;E=u}p.push(E),_=E,u=E.next}if(u!==null||c!==void 0){for(var x=c===void 0?[]:xt(c);u!==null;)(u.e.f&H)===0&&x.push(u),u=u.next;var N=x.length;if(N>0){var B=null;wi(n,x,B)}}e.first=n.first&&n.first.e,e.last=_&&_.e;for(var A of r.values())M(A.e);r.clear()}function ir(e,t,n,r){ze(e.v,t),e.i=n}function Vt(e,t,n,r,i,s,o,l,a,f,d){var v=(a&fr)!==0,u=(a&cr)===0,c=v?u?Tn(i,!1,!1):Ae(i):i,_=(a&ur)===0?o:Ae(o),p={i:_,v:c,k:s,a:null,e:null,prev:n,next:r};try{if(e===null){var T=document.createDocumentFragment();T.append(e=ne())}return p.e=K(()=>l(e,c,_,f),w),p.e.prev=n&&n.e,p.e.next=r&&r.e,n===null?d||(t.first=p):(n.next=p,n.e.next=p.e),r!==null&&(r.prev=p,r.e.prev=p.e),p}finally{}}function Ut(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,s=e.e.nodes_start;s!==null&&s!==r;){var o=ie(s);i.before(s),s=o}}function le(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function xi(e,t){ri(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Ti(e,t){return e==null?null:String(e)}function Yt(e,t,n,r){var i=e.__style;if(w||i!==t){var s=Ti(t);(!w||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Si=Symbol("is custom element"),Ci=Symbol("is html");function ki(e,t,n,r){var i=Ai(e);w&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Tr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&sr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ae(e,t,n){var r=m,i=g;let s=w;w&&ee(!1),D(null),X(null);try{t!=="style"&&(Jt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?sr(e).includes(t):n&&typeof n=="object")?e[t]=n:ki(e,t,n==null?n:String(n))}finally{D(r),X(i),s&&ee(!0)}}function Ai(e){return e.__attributes??={[Si]:e.nodeName.includes("-"),[Ci]:e.namespaceURI===mr}}var Jt=new Map;function sr(e){var t=e.getAttribute("is")||e.nodeName,n=Jt.get(t);if(n)return n;Jt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=yr(i);for(var o in r)r[o].set&&n.push(o);i=tn(i)}return n}let wt=!1;function Ni(e){var t=wt;try{return wt=!1,[e(),wt]}finally{wt=t}}function zt(e,t,n,r){var i=(n&vr)!==0,s=(n&_r)!==0,o=r,l=!0,a=()=>(l&&(l=!1,o=s?jt(r):r),o),f;if(i){var d=lt in e||ln in e;f=Te(e,t)?.set??(d&&t in e?S=>e[t]=S:void 0)}var v,u=!1;i?[v,u]=Ni(()=>e[t]):v=e[t],v===void 0&&r!==void 0&&(v=a(),f&&(Lr(),f(v)));var c;if(c=()=>{var S=e[t];return S===void 0?a():(l=!0,S)},(n&hr)===0)return c;if(f){var _=e.$$legacy;return(function(S,E){return arguments.length>0?((!E||_||u)&&f(E?c():S),S):c()})}var p=!1,T=((n&dr)!==0?Ot:wn)(()=>(p=!1,c()));i&&y(T);var z=g;return(function(S,E){if(arguments.length>0){const b=E?y(T):i?ye(S):S;return k(T,b),p=!0,o!==void 0&&(o=b),S}return Oe&&p||(z.f&be)!==0?T.v:y(T)})}function Oi(e){return new Ri(e)}class Ri{#t;#e;constructor(t){var n=new Map,r=(s,o)=>{var l=Tn(o,!1,!1);return n.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return y(n.get(o)??r(o,Reflect.get(s,o)))},has(s,o){return o===ln?!0:(y(n.get(o)??r(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,l){return k(n.get(o)??r(o,l),l),Reflect.set(s,o,l)}});this.#e=(t.hydrate?bi:nr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&vt(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||it(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{mi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...i)=>n.call(this,...i);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(i=>i!==r)}}$destroy(){this.#e.$destroy()}}let or;typeof HTMLElement=="function"&&(or=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const 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=document.createElement("slot");r!=="default"&&(s.name=r),$e(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Li(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]=$t(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=Oi({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ti(()=>{In(()=>{this.$$r=!0;for(const r of rt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=$t(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]=$t(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 rt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function $t(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 Li(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Pi(e,t,n,r,i,s){let o=class extends or{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return rt(t).map(l=>(t[l].attribute||l).toLowerCase())}};return rt(t).forEach(l=>{it(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(a){a=$t(l,a,t),this.$$d[l]=a;var f=this.$$c;if(f){var d=Te(f,l)?.get;d?f[l]=a:f.$set({[l]:a})}}})}),r.forEach(l=>{it(o.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=o,o}const Wt={version:"0.62.0"};var Le={},lr;function Mi(){if(lr)return Le;lr=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.LanguageTranslator=void 0,Le.getChildStyleToPass=e,Le.addComponent=t;function e(r,i){var s,o,l="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((o=i?.filter(function(u){return Object.keys(r).includes(u.name)}))===null||o===void 0)&&o.length))for(var a=function(u){var c=i?.filter(function(_){return _.name===u&&_.defaultValue!==r[u]});c&&(l+="".concat(u,":").concat(r[u],";"))},f=0,d=Object.keys(r);f<d.length;f++){var v=d[f];a(v)}}catch(u){console.error("error getting child style to pass",u)}finally{return l}}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 o=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var l=document.createElement("script");if(l.id=s+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(o),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var a=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(a+"-",""),"/").concat(o)}document.head.appendChild(l)}catch(f){console.warn(f)}}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,o){return r.formatDate(i,s,o||this.lang)},r.getDefaultLang=function(){var i,s,o,l="en";return navigator?.languages&&(!((o=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||o===void 0)&&o.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(i,s,o){var l;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(o&&(!((l=s[o])===null||l===void 0)&&l[i]))return s[o][i];var a="",f=r.getDefaultLang();if(!o||f!==o){var d=s?.[f];d?.[i]&&(a=d[i])}return a},r.formatDate=function(i,s,o){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(o||r.getDefaultLang(),s);return l.format(i)},r})();return Le.LanguageTranslator=n,Le}var Gt=Mi(),Di=gt("<hb-dialogform></hb-dialogform>",2),Ii=gt("<hb-form></hb-form>",2),Fi=gt('<h2 style="margin:60px;text-align:center;color:blue">output</h2> <!>',1),qi=gt('<hb-table><span slot="buttons-container"><button class="btn btn-outline-primary btn-sm svelte-1f1dlex">done</button></span></hb-table> <!> <!>',3);const ji={hash:"svelte-1f1dlex",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");:host {font-family:"Roboto", sans-serif;}
1
+ (function(Zt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const or=1,ar=2,fr=16,ur=1,cr=4,dr=8,hr=16,vr=1,_r=2,Qt="[",nt="[!",xt="]",Pe={},N=Symbol(),pr="http://www.w3.org/1999/xhtml",Tt=!1;var en=Array.isArray,br=Array.prototype.indexOf,St=Array.from,rt=Object.keys,it=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,gr=Object.prototype,yr=Array.prototype,tn=Object.getPrototypeOf,nn=Object.isExtensible;function wr(e){for(var t=0;t<e.length;t++)e[t]()}function rn(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const C=2,kt=4,Ct=8,fe=16,ue=32,pe=64,st=128,Q=512,O=1024,q=2048,ce=4096,B=8192,de=16384,lt=32768,Me=65536,sn=1<<17,ln=1<<18,Se=1<<19,$r=1<<20,ke=32768,At=1<<21,Nt=1<<22,be=1<<23,ot=Symbol("$state"),on=Symbol("legacy props"),Er=Symbol(""),De=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ot=3,Ie=8;function xr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Tr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Sr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Cr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ar(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Lr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Pr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function at(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Dr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let g=!1;function ee(e){g=e}let y;function H(e){if(e===null)throw at(),Pe;return y=e}function ft(){return H(se(y))}function an(e){if(g){if(se(y)!==null)throw at(),Pe;y=e}}function Ir(e=1){if(g){for(var t=e,n=y;t--;)n=se(n);y=n}}function ut(e=!0){for(var t=0,n=y;;){if(n.nodeType===Ie){var r=n.data;if(r===xt){if(t===0)return n;t-=1}else(r===Qt||r===nt)&&(t+=1)}var s=se(n);e&&n.remove(),n=s}}function fn(e){if(!e||e.nodeType!==Ie)throw at(),Pe;return e.data}function un(e){return e===this.v}function Fr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function cn(e){return!Fr(e,this.v)}let qr=!1,V=null;function Fe(e){V=e}function dn(e,t=!1,n){V={p:V,i:!1,c:null,e:null,s:e,x:null,l:null}}function hn(e){var t=V,n=t.e;if(n!==null){t.e=null;for(var r of n)Dn(r)}return e!==void 0&&(t.x=e),t.i=!0,V=t.p,e??{}}function vn(){return!0}let Ce=[];function _n(){var e=Ce;Ce=[],wr(e)}function ct(e){if(Ce.length===0&&!Ye){var t=Ce;queueMicrotask(()=>{t===Ce&&_n()})}Ce.push(e)}function jr(){for(;Ce.length>0;)_n()}function pn(e){var t=m;if(t===null)return p.f|=be,e;if((t.f&lt)===0){if((t.f&st)===0)throw e;t.b.error(e)}else qe(e,t)}function qe(e,t){for(;t!==null;){if((t.f&st)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const dt=new Set;let S=null,J=null,z=[],ht=null,Rt=!1,Ye=!1;class te{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){z=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#l(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects)):(S=null,mn(n.render_effects),mn(n.effects),this.#a?.resolve()),J=null}#l(t,n){t.f^=O;for(var r=t.first;r!==null;){var s=r.f,i=(s&(ue|pe))!==0,o=i&&(s&O)!==0,l=o||(s&B)!==0||this.skipped_effects.has(r);if((r.f&st)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){i?r.f^=O:(s&kt)!==0?n.effects.push(r):Ke(r)&&((r.f&fe)!==0&&n.block_effects.push(r),Xe(r));var f=r.first;if(f!==null){r=f;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#o(t){for(const n of t)((n.f&q)!==0?this.#s:this.#i).push(n),this.#f(n.deps),P(n,O)}#f(t){if(t!==null)for(const n of t)(n.f&C)===0||(n.f&ke)===0||(n.f^=ke,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,t.v),J?.set(t,t.v))}activate(){S=this,this.apply()}deactivate(){S===this&&(S=null,J=null)}flush(){if(this.activate(),z.length>0){if(bn(),S!==null&&S!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#c()}#c(){if(dt.size>1){this.previous.clear();var t=J,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of dt){if(i===this){n=!1;continue}const o=[];for(const[f,a]of this.current){if(i.current.has(f))if(n&&a!==i.current.get(f))i.current.set(f,a);else continue;o.push(f)}if(o.length===0)continue;const l=[...i.current.keys()].filter(f=>!this.current.has(f));if(l.length>0){var s=z;z=[];const f=new Set,a=new Map;for(const u of o)gn(u,l,f,a);if(z.length>0){S=i,i.apply();for(const u of z)i.#l(u,r);i.deactivate()}z=s}}S=null,J=t}this.committed=!0,dt.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)P(t,q),Ae(t);for(const t of this.#i)P(t,ce),Ae(t);this.#s=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=rn()).promise}static ensure(){if(S===null){const t=S=new te;dt.add(S),Ye||te.enqueue(()=>{S===t&&t.flush()})}return S}static enqueue(t){ct(t)}apply(){}}function vt(e){var t=Ye;Ye=!0;try{for(var n;;){if(jr(),z.length===0&&(S?.flush(),z.length===0))return ht=null,n;bn()}}finally{Ye=t}}function bn(){var e=ye;Rt=!0;var t=null;try{var n=0;for(mt(!0);z.length>0;){var r=te.ensure();if(n++>1e3){var s,i;Br()}r.process(z),me.clear()}}finally{Rt=!1,mt(e),ht=null}}function Br(){try{Ar()}catch(e){qe(e,ht)}}let he=null;function mn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|B))===0&&Ke(r)&&(he=new Set,Xe(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?jn(r):r.fn=null),he?.size>0)){me.clear();for(const s of he){if((s.f&(de|B))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)he.has(o)&&(he.delete(o),i.push(o)),o=o.parent;for(let l=i.length-1;l>=0;l--){const f=i[l];(f.f&(de|B))===0&&Xe(f)}}he.clear()}}he=null}}function gn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&C)!==0?gn(s,t,n,r):(i&(Nt|fe))!==0&&(i&q)===0&&yn(s,t,r)&&(P(s,q),Ae(s))}}function yn(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&C)!==0&&yn(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Ae(e){for(var t=ht=e;t.parent!==null;){t=t.parent;var n=t.f;if(Rt&&t===m&&(n&fe)!==0&&(n&ln)===0)return;if((n&(pe|ue))!==0){if((n&O)===0)return;t.f^=O}}z.push(t)}function Hr(e){let t=0,n=Ne(0),r;return()=>{bt()&&(b(n),In(()=>(t===0&&(r=Vt(()=>e(()=>ze(n)))),t+=1,()=>{ct(()=>{t-=1,t===0&&(r?.(),r=void 0,ze(n))})})))}}var Vr=Me|Se|st;function Ur(e,t,n){new Yr(e,t,n)}class Yr{parent;#t=!1;#e;#n=g?y:null;#r;#a;#s;#i=null;#l=null;#o=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#g=Hr(()=>(this.#h=Ne(this.#c),()=>{this.#h=null}));constructor(t,n,r){this.#e=t,this.#r=n,this.#a=r,this.parent=m.b,this.#t=!!this.#r.pending,this.#s=jt(()=>{if(m.b=this,g){const i=this.#n;ft(),i.nodeType===Ie&&i.data===nt?this.#w():this.#y()}else{var s=this.#b();try{this.#i=G(()=>r(s))}catch(i){this.error(i)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},Vr),g&&(this.#e=y)}#y(){try{this.#i=G(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#r.pending;t&&(this.#l=G(()=>t(this.#e)),te.enqueue(()=>{var n=this.#b();this.#i=this.#_(()=>(te.ensure(),G(()=>this.#a(n)))),this.#d>0?this.#p():(Be(this.#l,()=>{this.#l=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=W(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var n=m,r=p,s=V;K(this.#s),L(this.#s),Fe(this.#s.ctx);try{return t()}catch(i){return pn(i),null}finally{K(n),L(r),Fe(s)}}#p(){const t=this.#r.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Vn(this.#i,this.#f)),this.#l===null&&(this.#l=G(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#l&&Be(this.#l,()=>{this.#l=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#h&&Je(this.#h,this.#c)}get_effect_pending(){return this.#g(),b(this.#h)}error(t){var n=this.#r.onerror;let r=this.#r.failed;if(this.#v||!n&&!r)throw t;this.#i&&(D(this.#i),this.#i=null),this.#l&&(D(this.#l),this.#l=null),this.#o&&(D(this.#o),this.#o=null),g&&(H(this.#n),Ir(),H(ut()));var s=!1,i=!1;const o=()=>{if(s){Dr();return}s=!0,i&&Mr(),te.ensure(),this.#c=0,this.#o!==null&&Be(this.#o,()=>{this.#o=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,G(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var l=p;try{L(null),i=!0,n?.(t,o),i=!1}catch(f){qe(f,this.#s&&this.#s.parent)}finally{L(l)}r&&ct(()=>{this.#o=this.#_(()=>{te.ensure(),this.#v=!0;try{return G(()=>{r(this.#e,()=>t,()=>o)})}catch(f){return qe(f,this.#s.parent),null}finally{this.#v=!1}})})}}function Jr(e,t,n){for(var r=[],s=t.length,i=0;i<s;i++)Bt(t[i].e,r,!0);Bn(r,()=>{var o=r.length===0&&n!==null;if(o){var l=n,f=l.parentNode;Rn(f),f.append(l),e.items.clear(),ie(e,t[0].prev,t[s-1].next)}for(var a=0;a<s;a++){var u=t[a];o||(e.items.delete(u.k),ie(e,u.prev,u.next)),D(u.e,!o)}e.first===t[0]&&(e.first=t[0].prev)})}function zr(e,t,n,r,s,i=null){var o=e,l=new Map,f=null;g&&ft();var a=null,u=wn(()=>{var $=n();return en($)?$:$==null?[]:St($)}),d,c=!0;function h(){Wr(x,d,o,t,r),a!==null&&(d.length===0?(a.fragment?(o.before(a.fragment),a.fragment=null):Ht(a.effect),v.first=a.effect):Be(a.effect,()=>{a=null}))}var v=jt(()=>{d=b(u);var $=d.length;let F=!1;if(g){var E=fn(o)===nt;E!==($===0)&&(o=ut(),H(o),ee(!1),F=!0)}for(var Y=new Set,T=S,ne=null,Ve=Ln(),re=0;re<$;re+=1){g&&y.nodeType===Ie&&y.data===xt&&(o=y,F=!0,ee(!1));var et=d[re],Ue=r(et,re),Z=c?null:l.get(Ue);Z?(Je(Z.v,et),Z.i=re,Ve&&T.skipped_effects.delete(Z.e)):(Z=Gr(c?o:null,ne,et,Ue,re,s,t,n),c&&(Z.o=!0,ne===null?f=Z:ne.next=Z,ne=Z),l.set(Ue,Z)),Y.add(Ue)}if($===0&&i&&!a)if(c)a={fragment:null,effect:G(()=>i(o))};else{var _=document.createDocumentFragment(),w=W();_.append(w),a={fragment:_,effect:G(()=>i(w))}}if(g&&$>0&&H(ut()),!c)if(Ve){for(const[A,j]of l)Y.has(A)||T.skipped_effects.add(j.e);T.oncommit(h),T.ondiscard(()=>{})}else h();F&&ee(!0),b(u)}),x={effect:v,items:l,first:f};c=!1,g&&(o=y)}function Wr(e,t,n,r,s){var i=t.length,o=e.items,l=e.first,f,a=null,u=[],d=[],c,h,v,x;for(x=0;x<i;x+=1){if(c=t[x],h=s(c,x),v=o.get(h),e.first??=v,!v.o){v.o=!0;var $=a?a.next:l;ie(e,a,v),ie(e,v,$),Lt(v,$,n),a=v,u=[],d=[],l=a.next;continue}if((v.e.f&B)!==0&&Ht(v.e),v!==l){if(f!==void 0&&f.has(v)){if(u.length<d.length){var F=d[0],E;a=F.prev;var Y=u[0],T=u[u.length-1];for(E=0;E<u.length;E+=1)Lt(u[E],F,n);for(E=0;E<d.length;E+=1)f.delete(d[E]);ie(e,Y.prev,T.next),ie(e,a,Y),ie(e,T,F),l=F,a=T,x-=1,u=[],d=[]}else f.delete(v),Lt(v,l,n),ie(e,v.prev,v.next),ie(e,v,a===null?e.first:a.next),ie(e,a,v),a=v;continue}for(u=[],d=[];l!==null&&l.k!==h;)(l.e.f&B)===0&&(f??=new Set).add(l),d.push(l),l=l.next;if(l===null)continue;v=l}u.push(v),a=v,l=v.next}if(l!==null||f!==void 0){for(var ne=f===void 0?[]:St(f);l!==null;)(l.e.f&B)===0&&ne.push(l),l=l.next;var Ve=ne.length;if(Ve>0){var re=null;Jr(e,ne,re)}}}function Gr(e,t,n,r,s,i,o,l){var f=(o&or)!==0,a=(o&fr)===0,u=f?a?Tn(n,!1,!1):Ne(n):n,d=(o&ar)===0?s:Ne(s),c={i:d,v:u,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var h=document.createDocumentFragment();h.append(e=W())}return c.e=G(()=>i(e,u,d,l)),t!==null&&(t.next=c),c}finally{}}function Lt(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,i=e.e.nodes_start;i!==null&&i!==r;){var o=se(i);s.before(i),i=o}}function ie(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Kr(e,t,n,r){const s=Pt;if(n.length===0&&e.length===0){r(t.map(s));return}var i=S,o=m,l=Xr();function f(){Promise.all(n.map(a=>Zr(a))).then(a=>{l();try{r([...t.map(s),...a])}catch(u){(o.f&de)===0&&qe(u,o)}i?.deactivate(),_t()}).catch(a=>{qe(a,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return f()}finally{i?.deactivate(),_t()}}):f()}function Xr(){var e=m,t=p,n=V,r=S;return function(i=!0){K(e),L(t),Fe(n),i&&r?.activate()}}function _t(){K(null),L(null),Fe(null)}function Pt(e){var t=C|q,n=p!==null&&(p.f&C)!==0?p:null;return m!==null&&(m.f|=Se),{ctx:V,deps:null,effects:null,equals:un,f:t,fn:e,reactions:null,rv:0,v:N,wv:0,parent:n??m,ac:null}}function Zr(e,t){let n=m;n===null&&Tr();var r=n.b,s=void 0,i=Ne(N),o=!p,l=new Map;return li(()=>{var f=rn();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).then(()=>{a===S&&a.committed&&a.deactivate(),_t()})}catch(c){f.reject(c),_t()}var a=S;if(o){var u=!r.is_pending();r.update_pending_count(1),a.increment(u),l.get(a)?.reject(De),l.delete(a),l.set(a,f)}const d=(c,h=void 0)=>{if(a.activate(),h)h!==De&&(i.f|=be,Je(i,h));else{(i.f&be)!==0&&(i.f^=be),Je(i,c);for(const[v,x]of l){if(l.delete(v),v===a)break;x.reject(De)}}o&&(r.update_pending_count(-1),a.decrement(u))};f.promise.then(d,c=>d(null,c||"unknown"))}),Pn(()=>{for(const f of l.values())f.reject(De)}),new Promise(f=>{function a(u){function d(){u===s?f(i):a(s)}u.then(d,d)}a(s)})}function wn(e){const t=Pt(e);return t.equals=cn,t}function $n(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)D(t[n])}}function Qr(e){for(var t=e.parent;t!==null;){if((t.f&C)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function Mt(e){var t,n=m;K(Qr(e));try{e.f&=~ke,$n(e),t=Gn(e)}finally{K(n)}return t}function En(e){var t=Mt(e);if(e.equals(t)||(S?.is_fork||(e.v=t),e.wv=zn()),!Oe)if(J!==null)bt()&&J.set(e,t);else{var n=(e.f&Q)===0?ce:O;P(e,n)}}let Dt=new Set;const me=new Map;let xn=!1;function Ne(e,t){var n={f:0,v:e,reactions:null,equals:un,rv:0,wv:0};return n}function R(e,t){const n=Ne(e);return fi(n),n}function Tn(e,t=!1,n=!0){const r=Ne(e);return t||(r.equals=cn),r}function k(e,t,n=!1){p!==null&&(!oe||(p.f&sn)!==0)&&vn()&&(p.f&(C|fe|Nt|sn))!==0&&!ve?.includes(e)&&Pr();let r=n?ge(t):t;return Je(e,r)}function Je(e,t){if(!e.equals(t)){var n=e.v;Oe?me.set(e,t):me.set(e,n),e.v=t;var r=te.ensure();r.capture(e,n),(e.f&C)!==0&&((e.f&q)!==0&&Mt(e),P(e,(e.f&Q)!==0?O:ce)),e.wv=zn(),Sn(e,q),m!==null&&(m.f&O)!==0&&(m.f&(ue|pe))===0&&(X===null?ui([e]):X.push(e)),!r.is_fork&&Dt.size>0&&!xn&&ei()}return t}function ei(){xn=!1;var e=ye;mt(!0);const t=Array.from(Dt);try{for(const n of t)(n.f&O)!==0&&P(n,ce),Ke(n)&&Xe(n)}finally{mt(e)}Dt.clear()}function ze(e){k(e,e.v+1)}function Sn(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s],o=i.f,l=(o&q)===0;if(l&&P(i,t),(o&C)!==0){var f=i;J?.delete(f),(o&ke)===0&&(o&Q&&(i.f|=ke),Sn(f,ce))}else l&&((o&fe)!==0&&he!==null&&he.add(i),Ae(i))}}function ge(e){if(typeof e!="object"||e===null||ot in e)return e;const t=tn(e);if(t!==gr&&t!==yr)return e;var n=new Map,r=en(e),s=R(0),i=Re,o=l=>{if(Re===i)return l();var f=p,a=Re;L(null),Jn(i);var u=l();return L(f),Jn(a),u};return r&&n.set("length",R(e.length)),new Proxy(e,{defineProperty(l,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Rr();var u=n.get(f);return u===void 0?u=o(()=>{var d=R(a.value);return n.set(f,d),d}):k(u,a.value,!0),!0},deleteProperty(l,f){var a=n.get(f);if(a===void 0){if(f in l){const u=o(()=>R(N));n.set(f,u),ze(s)}}else k(a,N),ze(s);return!0},get(l,f,a){if(f===ot)return e;var u=n.get(f),d=f in l;if(u===void 0&&(!d||Te(l,f)?.writable)&&(u=o(()=>{var h=ge(d?l[f]:N),v=R(h);return v}),n.set(f,u)),u!==void 0){var c=b(u);return c===N?void 0:c}return Reflect.get(l,f,a)},getOwnPropertyDescriptor(l,f){var a=Reflect.getOwnPropertyDescriptor(l,f);if(a&&"value"in a){var u=n.get(f);u&&(a.value=b(u))}else if(a===void 0){var d=n.get(f),c=d?.v;if(d!==void 0&&c!==N)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(l,f){if(f===ot)return!0;var a=n.get(f),u=a!==void 0&&a.v!==N||Reflect.has(l,f);if(a!==void 0||m!==null&&(!u||Te(l,f)?.writable)){a===void 0&&(a=o(()=>{var c=u?ge(l[f]):N,h=R(c);return h}),n.set(f,a));var d=b(a);if(d===N)return!1}return u},set(l,f,a,u){var d=n.get(f),c=f in l;if(r&&f==="length")for(var h=a;h<d.v;h+=1){var v=n.get(h+"");v!==void 0?k(v,N):h in l&&(v=o(()=>R(N)),n.set(h+"",v))}if(d===void 0)(!c||Te(l,f)?.writable)&&(d=o(()=>R(void 0)),k(d,ge(a)),n.set(f,d));else{c=d.v!==N;var x=o(()=>ge(a));k(d,x)}var $=Reflect.getOwnPropertyDescriptor(l,f);if($?.set&&$.set.call(u,a),!c){if(r&&typeof f=="string"){var F=n.get("length"),E=Number(f);Number.isInteger(E)&&E>=F.v&&k(F,E+1)}ze(s)}return!0},ownKeys(l){b(s);var f=Reflect.ownKeys(l).filter(d=>{var c=n.get(d);return c===void 0||c.v!==N});for(var[a,u]of n)u.v!==N&&!(a in l)&&f.push(a);return f},setPrototypeOf(){Lr()}})}var kn,Cn,An,Nn;function It(){if(kn===void 0){kn=window,Cn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;An=Te(t,"firstChild").get,Nn=Te(t,"nextSibling").get,nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),nn(n)&&(n.__t=void 0)}}function W(e=""){return document.createTextNode(e)}function je(e){return An.call(e)}function se(e){return Nn.call(e)}function On(e,t){if(!g)return je(e);var n=je(y);return n===null&&(n=y.appendChild(W())),H(n),n}function pt(e,t=!1){if(!g){var n=je(e);return n instanceof Comment&&n.data===""?se(n):n}if(t&&y?.nodeType!==Ot){var r=W();return y?.before(r),H(r),r}return y}function Ft(e,t=1,n=!1){let r=g?y:e;for(var s;t--;)s=r,r=se(r);if(!g)return r;if(n&&r?.nodeType!==Ot){var i=W();return r===null?s?.after(i):r.before(i),H(i),i}return H(r),r}function Rn(e){e.textContent=""}function Ln(){return!1}function qt(e){var t=p,n=m;L(null),K(null);try{return e()}finally{L(t),K(n)}}function ti(e){m===null&&(p===null&&Cr(),kr()),Oe&&Sr()}function ni(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function le(e,t,n){var r=m;r!==null&&(r.f&B)!==0&&(e|=B);var s={ctx:V,deps:null,nodes_start:null,nodes_end:null,f:e|q|Q,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Xe(s),s.f|=lt}catch(l){throw D(s),l}else t!==null&&Ae(s);var i=s;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&Se)===0&&(i=i.first,(e&fe)!==0&&(e&Me)!==0&&i!==null&&(i.f|=Me)),i!==null&&(i.parent=r,r!==null&&ni(i,r),p!==null&&(p.f&C)!==0&&(e&pe)===0)){var o=p;(o.effects??=[]).push(i)}return s}function bt(){return p!==null&&!oe}function Pn(e){const t=le(Ct,null,!1);return P(t,O),t.teardown=e,t}function Mn(e){ti();var t=m.f,n=!p&&(t&ue)!==0&&(t&lt)===0;if(n){var r=V;(r.e??=[]).push(e)}else return Dn(e)}function Dn(e){return le(kt|$r,e,!1)}function ri(e){te.ensure();const t=le(pe|Se,e,!0);return()=>{D(t)}}function ii(e){te.ensure();const t=le(pe|Se,e,!0);return(n={})=>new Promise(r=>{n.outro?Be(t,()=>{D(t),r(void 0)}):(D(t),r(void 0))})}function si(e){return le(kt,e,!1)}function li(e){return le(Nt|Se,e,!0)}function In(e,t=0){return le(Ct|t,e,!0)}function We(e,t=[],n=[],r=[]){Kr(r,t,n,s=>{le(Ct,()=>e(...s.map(b)),!0)})}function jt(e,t=0){var n=le(fe|t,e,!0);return n}function G(e){return le(ue|Se,e,!0)}function Fn(e){var t=e.teardown;if(t!==null){const n=Oe,r=p;Un(!0),L(null);try{t.call(null)}finally{Un(n),L(r)}}}function qn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&qt(()=>{s.abort(De)});var r=n.next;(n.f&pe)!==0?n.parent=null:D(n,t),n=r}}function oi(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&D(t),t=n}}function D(e,t=!0){var n=!1;(t||(e.f&ln)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ai(e.nodes_start,e.nodes_end),n=!0),qn(e,t&&!n),gt(e,0),P(e,de);var r=e.transitions;if(r!==null)for(const i of r)i.stop();Fn(e);var s=e.parent;s!==null&&s.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function ai(e,t){for(;e!==null;){var n=e===t?null:se(e);e.remove(),e=n}}function jn(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 Be(e,t,n=!0){var r=[];Bt(e,r,!0),Bn(r,()=>{n&&D(e),t&&t()})}function Bn(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function Bt(e,t,n){if((e.f&B)===0){if(e.f^=B,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&Me)!==0||(r.f&ue)!==0&&(e.f&fe)!==0;Bt(r,t,i?n:!1),r=s}}}function Ht(e){Hn(e,!0)}function Hn(e,t){if((e.f&B)!==0){e.f^=B,(e.f&O)===0&&(P(e,q),Ae(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Me)!==0||(n.f&ue)!==0;Hn(n,s?t:!1),n=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function Vn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:se(n);t.append(n),n=s}}let ye=!1;function mt(e){ye=e}let Oe=!1;function Un(e){Oe=e}let p=null,oe=!1;function L(e){p=e}let m=null;function K(e){m=e}let ve=null;function fi(e){p!==null&&(ve===null?ve=[e]:ve.push(e))}let I=null,U=0,X=null;function ui(e){X=e}let Yn=1,Ge=0,Re=Ge;function Jn(e){Re=e}function zn(){return++Yn}function Ke(e){var t=e.f;if((t&q)!==0)return!0;if(t&C&&(e.f&=~ke),(t&ce)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s];if(Ke(i)&&En(i),i.wv>e.wv)return!0}(t&Q)!==0&&J===null&&P(e,O)}return!1}function Wn(e,t,n=!0){var r=e.reactions;if(r!==null&&!ve?.includes(e))for(var s=0;s<r.length;s++){var i=r[s];(i.f&C)!==0?Wn(i,t,!1):t===i&&(n?P(i,q):(i.f&O)!==0&&P(i,ce),Ae(i))}}function Gn(e){var t=I,n=U,r=X,s=p,i=ve,o=V,l=oe,f=Re,a=e.f;I=null,U=0,X=null,p=(a&(ue|pe))===0?e:null,ve=null,Fe(e.ctx),oe=!1,Re=++Ge,e.ac!==null&&(qt(()=>{e.ac.abort(De)}),e.ac=null);try{e.f|=At;var u=e.fn,d=u(),c=e.deps;if(I!==null){var h;if(gt(e,U),c!==null&&U>0)for(c.length=U+I.length,h=0;h<I.length;h++)c[U+h]=I[h];else e.deps=c=I;if(ye&&bt()&&(e.f&Q)!==0)for(h=U;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&U<c.length&&(gt(e,U),c.length=U);if(vn()&&X!==null&&!oe&&c!==null&&(e.f&(C|ce|q))===0)for(h=0;h<X.length;h++)Wn(X[h],e);return s!==null&&s!==e&&(Ge++,X!==null&&(r===null?r=X:r.push(...X))),(e.f&be)!==0&&(e.f^=be),d}catch(v){return pn(v)}finally{e.f^=At,I=t,U=n,X=r,p=s,ve=i,Fe(o),oe=l,Re=f}}function ci(e,t){let n=t.reactions;if(n!==null){var r=br.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&C)!==0&&(I===null||!I.includes(t))&&(P(t,ce),(t.f&Q)!==0&&(t.f^=Q,t.f&=~ke),$n(t),gt(t,0))}function gt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ci(e,n[r])}function Xe(e){var t=e.f;if((t&de)===0){P(e,O);var n=m,r=ye;m=e,ye=!0;try{(t&fe)!==0?oi(e):qn(e),Fn(e);var s=Gn(e);e.teardown=typeof s=="function"?s:null,e.wv=Yn;var i;Tt&&qr&&(e.f&q)!==0&&e.deps}finally{ye=r,m=n}}}function b(e){var t=e.f,n=(t&C)!==0;if(p!==null&&!oe){var r=m!==null&&(m.f&de)!==0;if(!r&&!ve?.includes(e)){var s=p.deps;if((p.f&At)!==0)e.rv<Ge&&(e.rv=Ge,I===null&&s!==null&&s[U]===e?U++:I===null?I=[e]:I.includes(e)||I.push(e));else{(p.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[p]:i.includes(p)||i.push(p)}}}if(Oe){if(me.has(e))return me.get(e);if(n){var o=e,l=o.v;return((o.f&O)===0&&o.reactions!==null||Xn(o))&&(l=Mt(o)),me.set(o,l),l}}else n&&!J?.has(e)&&(o=e,Ke(o)&&En(o),ye&&bt()&&(o.f&Q)===0&&Kn(o));if(J?.has(e))return J.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Kn(e){if(e.deps!==null){e.f^=Q;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&C)!==0&&(t.f&Q)===0&&Kn(t)}}function Xn(e){if(e.v===N)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(me.has(t)||(t.f&C)!==0&&Xn(t))return!0;return!1}function Vt(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const di=-7169;function P(e,t){e.f=e.f&di|t}const Zn=new Set,Ut=new Set;function hi(e,t,n,r={}){function s(i){if(r.capture||Qe.call(t,i),!i.cancelBubble)return qt(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ct(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ze(e,t,n,r,s){var i={capture:r,passive:s},o=hi(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pn(()=>{t.removeEventListener(e,o,i)})}function vi(e){for(var t=0;t<e.length;t++)Zn.add(e[t]);for(var n of Ut)n(e)}let Qn=null;function Qe(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;Qn=e;var o=0,l=Qn===e&&e.__root;if(l){var f=s.indexOf(l);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var a=s.indexOf(t);if(a===-1)return;f<=a&&(o=f)}if(i=s[o]||e.target,i!==t){it(e,"currentTarget",{configurable:!0,get(){return i||n}});var u=p,d=m;L(null),K(null);try{for(var c,h=[];i!==null;){var v=i.assignedSlot||i.parentNode||i.host||null;try{var x=i["__"+r];x!=null&&(!i.disabled||e.target===i)&&x.call(i,e)}catch($){c?h.push($):c=$}if(e.cancelBubble||v===t||v===null)break;i=v}if(c){for(let $ of h)queueMicrotask(()=>{throw $});throw c}}finally{e.__root=t,delete e.currentTarget,L(u),K(d)}}}function _i(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function we(e,t){var n=m;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function yt(e,t){var n=(t&vr)!==0,r=(t&_r)!==0,s,i=!e.startsWith("<!>");return()=>{if(g)return we(y,null),y;s===void 0&&(s=_i(i?e:"<!>"+e),n||(s=je(s)));var o=r||Cn?document.importNode(s,!0):s.cloneNode(!0);if(n){var l=je(o),f=o.lastChild;we(l,f)}else we(o,o);return o}}function pi(e=""){if(!g){var t=W(e+"");return we(t,t),t}var n=y;return n.nodeType!==Ot&&(n.before(n=W()),H(n)),we(n,n),n}function er(){if(g)return we(y,null),y;var e=document.createDocumentFragment(),t=document.createComment(""),n=W();return e.append(t,n),we(t,n),e}function $e(e,t){if(g){var n=m;((n.f&lt)===0||n.nodes_end===null)&&(n.nodes_end=y),ft();return}e!==null&&e.before(t)}const bi=["touchstart","touchmove"];function mi(e){return bi.includes(e)}function tr(e,t){return nr(e,t)}function gi(e,t){It(),t.intro=t.intro??!1;const n=t.target,r=g,s=y;try{for(var i=je(n);i&&(i.nodeType!==Ie||i.data!==Qt);)i=se(i);if(!i)throw Pe;ee(!0),H(i);const o=nr(e,{...t,anchor:i});return ee(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==Pe&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Nr(),It(),Rn(n),ee(!1),tr(e,t)}finally{ee(r),H(s)}}const He=new Map;function nr(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:o=!0}){It();var l=new Set,f=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!l.has(h)){l.add(h);var v=mi(h);t.addEventListener(h,Qe,{passive:v});var x=He.get(h);x===void 0?(document.addEventListener(h,Qe,{passive:v}),He.set(h,1)):He.set(h,x+1)}}};f(St(Zn)),Ut.add(f);var a=void 0,u=ii(()=>{var d=n??t.appendChild(W());return Ur(d,{pending:()=>{}},c=>{if(i){dn({});var h=V;h.c=i}if(s&&(r.$$events=s),g&&we(c,null),a=e(c,r)||{},g&&(m.nodes_end=y,y===null||y.nodeType!==Ie||y.data!==xt))throw at(),Pe;i&&hn()}),()=>{for(var c of l){t.removeEventListener(c,Qe);var h=He.get(c);--h===0?(document.removeEventListener(c,Qe),He.delete(c)):He.set(c,h)}Ut.delete(f),d!==n&&d.parentNode?.removeChild(d)}});return Yt.set(a,u),a}let Yt=new WeakMap;function yi(e,t){const n=Yt.get(e);return n?(Yt.delete(e),n(t)):Promise.resolve()}class wi{anchor;#t=new Map;#e=new Map;#n=new Map;#r=new Set;#a=!0;constructor(t,n=!0){this.anchor=t,this.#a=n}#s=()=>{var t=S;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#e.get(n);if(r)Ht(r),this.#r.delete(n);else{var s=this.#n.get(n);s&&(this.#e.set(n,s.effect),this.#n.delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,o]of this.#t){if(this.#t.delete(i),i===t)break;const l=this.#n.get(o);l&&(D(l.effect),this.#n.delete(o))}for(const[i,o]of this.#e){if(i===n||this.#r.has(i))continue;const l=()=>{if(Array.from(this.#t.values()).includes(i)){var a=document.createDocumentFragment();Vn(o,a),a.append(W()),this.#n.set(i,{effect:o,fragment:a})}else D(o);this.#r.delete(i),this.#e.delete(i)};this.#a||!r?(this.#r.add(i),Be(o,l,!1)):l()}}};#i=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,s]of this.#n)n.includes(r)||(D(s.effect),this.#n.delete(r))};ensure(t,n){var r=S,s=Ln();if(n&&!this.#e.has(t)&&!this.#n.has(t))if(s){var i=document.createDocumentFragment(),o=W();i.append(o),this.#n.set(t,{effect:G(()=>n(o)),fragment:i})}else this.#e.set(t,G(()=>n(this.anchor)));if(this.#t.set(r,t),s){for(const[l,f]of this.#e)l===t?r.skipped_effects.delete(f):r.skipped_effects.add(f);for(const[l,f]of this.#n)l===t?r.skipped_effects.delete(f.effect):r.skipped_effects.add(f.effect);r.oncommit(this.#s),r.ondiscard(this.#i)}else g&&(this.anchor=y),this.#s()}}function $i(e){V===null&&xr(),Mn(()=>{const t=Vt(e);if(typeof t=="function")return t})}function wt(e,t,n=!1){g&&ft();var r=new wi(e),s=n?Me:0;function i(o,l){if(g){const a=fn(e)===nt;if(o===a){var f=ut();H(f),r.anchor=f,ee(!1),r.ensure(o,l),ee(!0);return}}r.ensure(o,l)}jt(()=>{var o=!1;t((l,f=!0)=>{o=!0,i(f,l)}),o||i(!1,null)},s)}function Ei(e,t){si(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,r.appendChild(s)}})}function xi(e,t){return e==null?null:String(e)}function Jt(e,t,n,r){var s=e.__style;if(g||s!==t){var i=xi(t);(!g||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e.__style=t}return r}const Ti=Symbol("is custom element"),Si=Symbol("is html");function ki(e,t,n,r){var s=Ci(e);g&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[Er]=n),n==null?e.removeAttribute(t):typeof n!="string"&&rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ae(e,t,n){var r=p,s=m;let i=g;g&&ee(!1),L(null),K(null);try{t!=="style"&&(zt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?rr(e).includes(t):n&&typeof n=="object")?e[t]=n:ki(e,t,n==null?n:String(n))}finally{L(r),K(s),i&&ee(!0)}}function Ci(e){return e.__attributes??={[Ti]:e.nodeName.includes("-"),[Si]:e.namespaceURI===pr}}var zt=new Map;function rr(e){var t=e.getAttribute("is")||e.nodeName,n=zt.get(t);if(n)return n;zt.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=mr(s);for(var o in r)r[o].set&&n.push(o);s=tn(s)}return n}let $t=!1;function Ai(e){var t=$t;try{return $t=!1,[e(),$t]}finally{$t=t}}function Wt(e,t,n,r){var s=(n&dr)!==0,i=(n&hr)!==0,o=r,l=!0,f=()=>(l&&(l=!1,o=i?Vt(r):r),o),a;if(s){var u=ot in e||on in e;a=Te(e,t)?.set??(u&&t in e?E=>e[t]=E:void 0)}var d,c=!1;s?[d,c]=Ai(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=f(),a&&(Or(),a(d)));var h;if(h=()=>{var E=e[t];return E===void 0?f():(l=!0,E)},(n&cr)===0)return h;if(a){var v=e.$$legacy;return(function(E,Y){return arguments.length>0?((!Y||v||c)&&a(Y?h():E),E):h()})}var x=!1,$=((n&ur)!==0?Pt:wn)(()=>(x=!1,h()));s&&b($);var F=m;return(function(E,Y){if(arguments.length>0){const T=Y?b($):s?ge(E):E;return k($,T),x=!0,o!==void 0&&(o=T),E}return Oe&&x||(F.f&de)!==0?$.v:b($)})}function Ni(e){return new Oi(e)}class Oi{#t;#e;constructor(t){var n=new Map,r=(i,o)=>{var l=Tn(o,!1,!1);return n.set(i,l),l};const s=new Proxy({...t.props||{},$$events:{}},{get(i,o){return b(n.get(o)??r(o,Reflect.get(i,o)))},has(i,o){return o===on?!0:(b(n.get(o)??r(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,l){return k(n.get(o)??r(o,l),l),Reflect.set(i,o,l)}});this.#e=(t.hydrate?gi:tr)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&vt(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||it(this,i,{get(){return this.#e[i]},set(o){this.#e[i]=o},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{yi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...s)=>n.call(this,...s);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(s=>s!==r)}}$destroy(){this.#e.$destroy()}}let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const 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 s=>{const i=document.createElement("slot");r!=="default"&&(i.name=r),$e(s,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Ri(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 s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=Et(s,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=Ni({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ri(()=>{In(()=>{this.$$r=!0;for(const r of rt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const s=Et(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1})});for(const r in this.$$l)for(const s of this.$$l[r]){const i=this.$$c.$on(r,s);this.$$l_u.set(s,i)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Et(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 rt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Et(e,t,n,r){const s=n[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){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(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ri(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Li(e,t,n,r,s,i){let o=class extends ir{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return rt(t).map(l=>(t[l].attribute||l).toLowerCase())}};return rt(t).forEach(l=>{it(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=Et(l,f,t),this.$$d[l]=f;var a=this.$$c;if(a){var u=Te(a,l)?.get;u?a[l]=f:a.$set({[l]:f})}}})}),r.forEach(l=>{it(o.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=o,o}const Gt={version:"0.62.1"};var Le={},sr;function Pi(){if(sr)return Le;sr=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.LanguageTranslator=void 0,Le.getChildStyleToPass=e,Le.addComponent=t;function e(r,s){var i,o,l="";try{if(r&&s?.length&&(!((i=Object.keys(r))===null||i===void 0)&&i.length)&&(!((o=s?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||o===void 0)&&o.length))for(var f=function(c){var h=s?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});h&&(l+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var d=u[a];f(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return l}}function t(r){var s,i=((s=r?.repoName.split("/"))===null||s===void 0?void 0:s[1])||r?.repoName;if(!i)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var o=r?.iifePath||"main.iife.js";if(!document.getElementById(i+"-script"))try{var l=document.createElement("script");if(l.id=i+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(o),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=i.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(i.replace(f+"-",""),"/").concat(o)}document.head.appendChild(l)}catch(a){console.warn(a)}}var n=(function(){function r(s){if(this.lang="",!s?.dictionary)throw new Error("no dictionary provided");this.dictionary=s.dictionary,this.setLang(s?.lang)}return r.prototype.setLang=function(s){s||(s=r.getDefaultLang()),this.lang=s},r.prototype.translateWord=function(s,i){return r.getDictionaryWord(s,this.dictionary,i||this.lang)},r.prototype.translateDate=function(s,i,o){return r.formatDate(s,i,o||this.lang)},r.getDefaultLang=function(){var s,i,o,l="en";return navigator?.languages&&(!((o=(i=(s=navigator.languages[0])===null||s===void 0?void 0:s.split("-")[0])===null||i===void 0?void 0:i.toLowerCase())===null||o===void 0)&&o.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(s,i,o){var l;if(!s)throw new Error("no wordKey provided");if(!i)throw new Error("no dictionary provided");if(o&&(!((l=i[o])===null||l===void 0)&&l[s]))return i[o][s];var f="",a=r.getDefaultLang();if(!o||a!==o){var u=i?.[a];u?.[s]&&(f=u[s])}return f},r.formatDate=function(s,i,o){if(!s)throw new Error("no date provided");if(typeof s.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(o||r.getDefaultLang(),i);return l.format(s)},r})();return Le.LanguageTranslator=n,Le}var Kt=Pi(),Mi=yt("<hb-dialogform></hb-dialogform>",2),Di=yt("<hb-form></hb-form>",2),Ii=yt('<h2 style="margin:60px;text-align:center;color:blue">output</h2> <!>',1),Fi=yt('<hb-table><span slot="buttons-container"><button class="btn btn-outline-primary btn-sm svelte-1f1dlex">done</button></span></hb-table> <!> <!>',3);const qi={hash:"svelte-1f1dlex",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");:host {font-family:"Roboto", sans-serif;}
3
3
  /*!
4
4
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
5
5
  * Copyright 2011-2021 The Bootstrap Authors
@@ -7,5 +7,5 @@
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  */.btn.svelte-1f1dlex {--bs-btn-padding-x: 0.75rem;--bs-btn-padding-y: 0.375rem;--bs-btn-font-family: ;--bs-btn-font-size: 1rem;--bs-btn-font-weight: 400;--bs-btn-line-height: 1.5;--bs-btn-color: var(--bs-body-color);--bs-btn-bg: transparent;--bs-btn-border-width: var(--bs-border-width);--bs-btn-border-color: transparent;--bs-btn-border-radius: var(--bs-border-radius);--bs-btn-hover-border-color: transparent;--bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity: 0.65;--bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;}
9
9
  @media (prefers-reduced-motion: reduce) {.btn.svelte-1f1dlex {transition:none;}
10
- }.btn.svelte-1f1dlex:hover {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);}.btn.svelte-1f1dlex:focus-visible {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow);} .btn.svelte-1f1dlex:first-child:active {color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);} .btn.svelte-1f1dlex:first-child:active:focus-visible {box-shadow:var(--bs-btn-focus-box-shadow);}.btn.svelte-1f1dlex:disabled {color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);}.btn-outline-primary.svelte-1f1dlex {--bs-btn-color: #0d6efd;--bs-btn-border-color: #0d6efd;--bs-btn-hover-color: #fff;--bs-btn-hover-bg: #0d6efd;--bs-btn-hover-border-color: #0d6efd;--bs-btn-focus-shadow-rgb: 13, 110, 253;--bs-btn-active-color: #fff;--bs-btn-active-bg: #0d6efd;--bs-btn-active-border-color: #0d6efd;--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color: #0d6efd;--bs-btn-disabled-bg: transparent;--bs-btn-disabled-border-color: #0d6efd;--bs-gradient: none;}.btn-sm.svelte-1f1dlex {--bs-btn-padding-y: 0.25rem;--bs-btn-padding-x: 0.5rem;--bs-btn-font-size: 0.875rem;--bs-btn-border-radius: var(--bs-border-radius-sm);}`};function ar(e,t){dn(t,!0),xi(e,ji);function n(h,x){t.$$host.dispatchEvent(new CustomEvent(h,{detail:x}))}let r=zt(t,"id",7,""),i=zt(t,"debug",7,!1),s=zt(t,"output_schema",23,()=>[]);const o=[{id:"first-row",type:"row",params:{columns:[{type:"text",placeholder:"Label...",id:"label",required:!0,label:"Property Label",validationTip:"This field cannot be empty."},{type:"select",placeholder:"Select something here...",id:"type",required:!0,label:"Type",validationTip:"This field cannot be empty.",params:{options:[{label:"",value:"",id:""},{label:"text",value:"text",id:"text"},{label:"textarea",value:"textarea",id:"textarea"},{label:"email",value:"email",id:"email"},{label:"number",value:"number",id:"number"},{label:"select",value:"select",id:"select"},{label:"radio",value:"radio",id:"radio"},{label:"checkbox",value:"checkbox",id:"checkbox"},{label:"file",value:"file",id:"file"},{label:"date",value:"date",id:"date"},{label:"datetime",value:"datetime",id:"datetime"},{label:"color",value:"color",id:"color"},{label:"range",value:"range",id:"range"}]}}]}},{id:"conditionals-row",type:"row",params:{columns:[{type:"checkbox",placeholder:"Conditional...",id:"conditional",label:"Is Conditional?"},{type:"checkbox",placeholder:"Required...",id:"required",label:"Is Required?"}]}},{id:"size-row",type:"row",params:{columns:[{type:"number",placeholder:"Min...",id:"min",label:"Min",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]},{type:"number",placeholder:"Max...",id:"max",label:"Max",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]}]}},{type:"arrayobjects",label:"conditions",id:"conditions",params:{addPropertyLabel:"add condition",schema:[{id:"conditions-row",type:"row",params:{columns:[{type:"text",placeholder:"Condition Property name...",id:"conditionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Condition values (separated by comma)...",id:"conditionvalue",label:"Values",validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"conditional"}]},{type:"arrayobjects",label:"options",placeholder:"Insert your last name here...",id:"options",validationTip:"This field cannot be empty.",params:{addPropertyLabel:"add option",schema:[{id:"options-row",type:"row",params:{columns:[{type:"text",placeholder:"Property name...",id:"optionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Value...",id:"optionvalue",label:"Value",required:!0,validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"type",values:["select","radio"]}]}];let l=P(void 0);ye({});let a=P(""),f=P(""),d=P(""),v=P(void 0);const u=[{label:"Label",key:"label"},{label:"type",key:"type"},{label:"params",key:"params",nosort:!0},{label:"dependencies",key:"dependencies"},{label:"required",key:"required"},{label:"value",key:"value"},{label:"modifiche",key:"mod",type:"actions",nosort:!0}];let c=P(ye([])),_=P(!1);yi(()=>{Gt.addComponent({repoName:"@htmlbricks/hb-form",version:Wt.version}),Gt.addComponent({repoName:"@htmlbricks/hb-table",version:Wt.version}),Gt.addComponent({repoName:"@htmlbricks/hb-dialogform",version:Wt.version}),k(v,t.$$host?.shadowRoot?.querySelector("#schema"),!0),console.log("formComponent",y(v))}),Mn(()=>{if(typeof s()=="string"&&s()!=="")try{console.log("parsing output_schema"),s(JSON.parse(s()))}catch(x){console.error("error parsing output_schema",x)}s()||s([]),typeof i()=="string"&&(i()==="true"||i()==="yes"||i()==="")?i(!0):i()!==!0&&i(!1),y(l)||k(l,[{counter:0,schema:JSON.stringify(o)}],!0);const h=[];for(const x of s()){let N,B;x.params&&(B=JSON.stringify(x.params)),x.dependencies&&(N=JSON.stringify(x.dependencies)),h.push({_id:x.label,label:x.label,type:x.type,params:B,required:x.required,dependencies:N,value:x.value,_actions:[{name:"delete",type:"icon",iconOrText:"x-octagon-fill",disabled:!!x.value}]})}k(c,h,!0)});function p(h){console.log("addSchema",h);let x={},N=[];if(h.conditions&&(N=h.conditions.map(A=>({id:A.conditionlabel,values:A.conditionvalue?A.conditionvalue.replace(", ",",").replace(" ,",",").split(","):void 0}))),(h.type==="text"||h.type==="textarea"||h.type==="number"||h.type==="datetime"||h.type==="date"||h.type==="range")&&(h.min&&(x.min=h.min),h.max&&(x.max=h.max)),h.type==="select"||h.type==="radio"&&h.options?.length){x.options=[];for(const A of h.options)x.options.push({label:A.optionlabel,value:A.optionvalue})}const B={id:h.label,type:h.type,label:h.label,required:h.required,placeholder:h.placeholder,dependencies:N};Object.keys(x).length&&(B.params=x),s().find(A=>A.label===h.label)?s(s().map(A=>A.label===h.label?B:A)):s([...s(),B]),y(l)?.length&&k(l,[...y(l),{counter:y(l).length,schema:JSON.stringify(o)}],!0),console.info("schema4selectorS",y(l))}function T(h){if(console.log(h,s()),s().find(N=>N.label===h)?.value)return console.warn("cannot remove default value");s(s().filter(N=>N.label!==h)),y(l)?.length&&k(l,y(l).filter(N=>N.counter!==y(l).length-1),!0)}function z(){const h={schema:s(),id:r()};n("done",h)}var S={get id(){return r()},set id(h=""){r(h),vt()},get debug(){return i()},set debug(h=!1){i(h),vt()},get output_schema(){return s()},set output_schema(h=[]){s(h),vt()}},E=qi(),b=pt(E);ae(b,"id","table_specs"),Yt(b,y(d)),ae(b,"disablepagination","yes"),Ge(()=>ae(b,"headers",JSON.stringify(u))),Ge(()=>ae(b,"rows",JSON.stringify(y(c)))),ae(b,"add_item","yes");var F=On(b),W=On(F);W.__click=z,an(F),an(b);var Pe=Mt(b,2);{var ve=h=>{var x=tr(),N=pt(x);$i(N,17,()=>y(l),B=>B.counter,(B,A)=>{var _e=tr(),Ee=pt(_e);{var Bi=Kt=>{var xe=Di();ae(xe,"title","Add property"),Ge(()=>ae(xe,"show",y(_)?"yes":"no")),Ge(()=>ae(xe,"schema",y(A).schema)),Yt(xe,y(f)),Qe("modalFormConfirm",xe,tt=>{console.log(tt.detail),p(tt.detail),k(_,!1)}),Qe("modalFormCancel",xe,tt=>{console.log("cancelform"),k(_,!1)}),Qe("modalShow",xe,tt=>{console.log("modalShow"),k(_,tt.detail.show,!0)}),$e(Kt,xe)};yt(Ee,Kt=>{y(A).counter===y(l).length-1&&Kt(Bi)})}$e(B,_e)}),$e(h,x)};yt(Pe,h=>{y(l)&&h(ve)})}var G=Mt(Pe,2);{var Ue=h=>{var x=Fi(),N=Mt(pt(x),2);{var B=_e=>{var Ee=Ii();ae(Ee,"hide_submit","yes"),Ge(()=>ae(Ee,"schema",JSON.stringify(s()))),Yt(Ee,y(a)),$e(_e,Ee)},A=_e=>{var Ee=vi("...no output");$e(_e,Ee)};yt(N,_e=>{s()?.length?_e(B):_e(A,!1)})}$e(h,x)};yt(G,h=>{i()&&h(Ue)})}return Qe("tableCustomActionClick",b,h=>{h.detail.action==="delete"&&T(h.detail.itemId)}),Qe("addItem",b,h=>{k(_,!0)}),$e(e,E),hn(S)}di(["click"]),customElements.define("hb-form-composer",Pi(ar,{id:{},debug:{},output_schema:{}},[],[],!0)),Xt.Component=ar,Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"})})(this["form-composer"]=this["form-composer"]||{});
10
+ }.btn.svelte-1f1dlex:hover {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);}.btn.svelte-1f1dlex:focus-visible {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow);} .btn.svelte-1f1dlex:first-child:active {color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);} .btn.svelte-1f1dlex:first-child:active:focus-visible {box-shadow:var(--bs-btn-focus-box-shadow);}.btn.svelte-1f1dlex:disabled {color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);}.btn-outline-primary.svelte-1f1dlex {--bs-btn-color: #0d6efd;--bs-btn-border-color: #0d6efd;--bs-btn-hover-color: #fff;--bs-btn-hover-bg: #0d6efd;--bs-btn-hover-border-color: #0d6efd;--bs-btn-focus-shadow-rgb: 13, 110, 253;--bs-btn-active-color: #fff;--bs-btn-active-bg: #0d6efd;--bs-btn-active-border-color: #0d6efd;--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color: #0d6efd;--bs-btn-disabled-bg: transparent;--bs-btn-disabled-border-color: #0d6efd;--bs-gradient: none;}.btn-sm.svelte-1f1dlex {--bs-btn-padding-y: 0.25rem;--bs-btn-padding-x: 0.5rem;--bs-btn-font-size: 0.875rem;--bs-btn-border-radius: var(--bs-border-radius-sm);}`};function lr(e,t){dn(t,!0),Ei(e,qi);function n(_,w){t.$$host.dispatchEvent(new CustomEvent(_,{detail:w}))}let r=Wt(t,"id",7,""),s=Wt(t,"debug",7,!1),i=Wt(t,"output_schema",23,()=>[]);const o=[{id:"first-row",type:"row",params:{columns:[{type:"text",placeholder:"Label...",id:"label",required:!0,label:"Property Label",validationTip:"This field cannot be empty."},{type:"select",placeholder:"Select something here...",id:"type",required:!0,label:"Type",validationTip:"This field cannot be empty.",params:{options:[{label:"",value:"",id:""},{label:"text",value:"text",id:"text"},{label:"textarea",value:"textarea",id:"textarea"},{label:"email",value:"email",id:"email"},{label:"number",value:"number",id:"number"},{label:"select",value:"select",id:"select"},{label:"radio",value:"radio",id:"radio"},{label:"checkbox",value:"checkbox",id:"checkbox"},{label:"file",value:"file",id:"file"},{label:"date",value:"date",id:"date"},{label:"datetime",value:"datetime",id:"datetime"},{label:"color",value:"color",id:"color"},{label:"range",value:"range",id:"range"}]}}]}},{id:"conditionals-row",type:"row",params:{columns:[{type:"checkbox",placeholder:"Conditional...",id:"conditional",label:"Is Conditional?"},{type:"checkbox",placeholder:"Required...",id:"required",label:"Is Required?"}]}},{id:"size-row",type:"row",params:{columns:[{type:"number",placeholder:"Min...",id:"min",label:"Min",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]},{type:"number",placeholder:"Max...",id:"max",label:"Max",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]}]}},{type:"arrayobjects",label:"conditions",id:"conditions",params:{addPropertyLabel:"add condition",schema:[{id:"conditions-row",type:"row",params:{columns:[{type:"text",placeholder:"Condition Property name...",id:"conditionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Condition values (separated by comma)...",id:"conditionvalue",label:"Values",validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"conditional"}]},{type:"arrayobjects",label:"options",placeholder:"Insert your last name here...",id:"options",validationTip:"This field cannot be empty.",params:{addPropertyLabel:"add option",schema:[{id:"options-row",type:"row",params:{columns:[{type:"text",placeholder:"Property name...",id:"optionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Value...",id:"optionvalue",label:"Value",required:!0,validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"type",values:["select","radio"]}]}];let l=R(void 0);ge({});let f=R(""),a=R(""),u=R(""),d=R(void 0);const c=[{label:"Label",key:"label"},{label:"type",key:"type"},{label:"params",key:"params",nosort:!0},{label:"dependencies",key:"dependencies"},{label:"required",key:"required"},{label:"value",key:"value"},{label:"modifiche",key:"mod",type:"actions",nosort:!0}];let h=R(ge([])),v=R(!1);$i(()=>{Kt.addComponent({repoName:"@htmlbricks/hb-form",version:Gt.version}),Kt.addComponent({repoName:"@htmlbricks/hb-table",version:Gt.version}),Kt.addComponent({repoName:"@htmlbricks/hb-dialogform",version:Gt.version}),k(d,t.$$host?.shadowRoot?.querySelector("#schema"),!0),console.log("formComponent",b(d))}),Mn(()=>{if(typeof i()=="string"&&i()!=="")try{console.log("parsing output_schema"),i(JSON.parse(i()))}catch(w){console.error("error parsing output_schema",w)}i()||i([]),typeof s()=="string"&&(s()==="true"||s()==="yes"||s()==="")?s(!0):s()!==!0&&s(!1),b(l)||k(l,[{counter:0,schema:JSON.stringify(o)}],!0);const _=[];for(const w of i()){let A,j;w.params&&(j=JSON.stringify(w.params)),w.dependencies&&(A=JSON.stringify(w.dependencies)),_.push({_id:w.label,label:w.label,type:w.type,params:j,required:w.required,dependencies:A,value:w.value,_actions:[{name:"delete",type:"icon",iconOrText:"x-octagon-fill",disabled:!!w.value}]})}k(h,_,!0)});function x(_){console.log("addSchema",_);let w={},A=[];if(_.conditions&&(A=_.conditions.map(M=>({id:M.conditionlabel,values:M.conditionvalue?M.conditionvalue.replace(", ",",").replace(" ,",",").split(","):void 0}))),(_.type==="text"||_.type==="textarea"||_.type==="number"||_.type==="datetime"||_.type==="date"||_.type==="range")&&(_.min&&(w.min=_.min),_.max&&(w.max=_.max)),_.type==="select"||_.type==="radio"&&_.options?.length){w.options=[];for(const M of _.options)w.options.push({label:M.optionlabel,value:M.optionvalue})}const j={id:_.label,type:_.type,label:_.label,required:_.required,placeholder:_.placeholder,dependencies:A};Object.keys(w).length&&(j.params=w),i().find(M=>M.label===_.label)?i(i().map(M=>M.label===_.label?j:M)):i([...i(),j]),b(l)?.length&&k(l,[...b(l),{counter:b(l).length,schema:JSON.stringify(o)}],!0),console.info("schema4selectorS",b(l))}function $(_){if(console.log(_,i()),i().find(A=>A.label===_)?.value)return console.warn("cannot remove default value");i(i().filter(A=>A.label!==_)),b(l)?.length&&k(l,b(l).filter(A=>A.counter!==b(l).length-1),!0)}function F(){const _={schema:i(),id:r()};n("done",_)}var E={get id(){return r()},set id(_=""){r(_),vt()},get debug(){return s()},set debug(_=!1){s(_),vt()},get output_schema(){return i()},set output_schema(_=[]){i(_),vt()}},Y=Fi(),T=pt(Y);ae(T,"id","table_specs"),Jt(T,b(u)),ae(T,"disablepagination","yes"),We(()=>ae(T,"headers",JSON.stringify(c))),We(()=>ae(T,"rows",JSON.stringify(b(h)))),ae(T,"add_item","yes");var ne=On(T),Ve=On(ne);Ve.__click=F,an(ne),an(T);var re=Ft(T,2);{var et=_=>{var w=er(),A=pt(w);zr(A,17,()=>b(l),j=>j.counter,(j,M)=>{var _e=er(),Ee=pt(_e);{var ji=Xt=>{var xe=Mi();ae(xe,"title","Add property"),We(()=>ae(xe,"show",b(v)?"yes":"no")),We(()=>ae(xe,"schema",b(M).schema)),Jt(xe,b(a)),Ze("modalFormConfirm",xe,tt=>{console.log(tt.detail),x(tt.detail),k(v,!1)}),Ze("modalFormCancel",xe,tt=>{console.log("cancelform"),k(v,!1)}),Ze("modalShow",xe,tt=>{console.log("modalShow"),k(v,tt.detail.show,!0)}),$e(Xt,xe)};wt(Ee,Xt=>{b(M).counter===b(l).length-1&&Xt(ji)})}$e(j,_e)}),$e(_,w)};wt(re,_=>{b(l)&&_(et)})}var Ue=Ft(re,2);{var Z=_=>{var w=Ii(),A=Ft(pt(w),2);{var j=_e=>{var Ee=Di();ae(Ee,"hide_submit","yes"),We(()=>ae(Ee,"schema",JSON.stringify(i()))),Jt(Ee,b(f)),$e(_e,Ee)},M=_e=>{var Ee=pi("...no output");$e(_e,Ee)};wt(A,_e=>{i()?.length?_e(j):_e(M,!1)})}$e(_,w)};wt(Ue,_=>{s()&&_(Z)})}return Ze("tableCustomActionClick",T,_=>{_.detail.action==="delete"&&$(_.detail.itemId)}),Ze("addItem",T,_=>{k(v,!0)}),$e(e,Y),hn(E)}vi(["click"]),customElements.define("hb-form-composer",Li(lr,{id:{},debug:{},output_schema:{}},[],[],!0)),Zt.Component=lr,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})})(this["form-composer"]=this["form-composer"]||{});
11
11
  //# sourceMappingURL=main.iife.js.map