@htmlbricks/hb-messages-box 0.66.0 → 0.66.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,4 +1,4 @@
1
- (function(_t){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const yn=1,$n=4,bn=8,En=16,xn=2,pt="[",gt="[!",mt="]",$e={},E=Symbol(),Tn="http://www.w3.org/1999/xhtml",Xe=!1;var Nn=Array.isArray,An=Array.prototype.indexOf,Sn=Array.from,Oe=Object.keys,Ce=Object.defineProperty,re=Object.getOwnPropertyDescriptor,Rn=Object.getOwnPropertyDescriptors,On=Object.prototype,Cn=Array.prototype,wt=Object.getPrototypeOf,yt=Object.isExtensible;function kn(e){for(var t=0;t<e.length;t++)e[t]()}function $t(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const $=2,Qe=4,et=8,U=16,J=32,K=64,ke=128,j=512,T=1024,R=2048,H=4096,Z=8192,V=16384,Pe=32768,Le=65536,bt=1<<17,Et=1<<18,ie=1<<19,Pn=1<<20,se=32768,tt=1<<21,nt=1<<22,X=1<<23,Me=Symbol("$state"),xt=Symbol("legacy props"),Ln=Symbol(""),he=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Mn=3,De=8;function Dn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function In(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function jn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function qn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Yn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Un(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Vn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function rt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function zn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let m=!1;function de(e){m=e}let w;function Q(e){if(e===null)throw rt(),$e;return w=e}function Tt(){return Q(te(w))}function it(e){if(m){if(te(w)!==null)throw rt(),$e;w=e}}function Gn(e=1){if(m){for(var t=e,n=w;t--;)n=te(n);w=n}}function Jn(e=!0){for(var t=0,n=w;;){if(n.nodeType===De){var r=n.data;if(r===mt){if(t===0)return n;t-=1}else(r===pt||r===gt)&&(t+=1)}var i=te(n);e&&n.remove(),n=i}}function Nt(e){return e===this.v}function Kn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function At(e){return!Kn(e,this.v)}let Zn=!1,k=null;function ve(e){k=e}function St(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,l:null}}function Rt(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)Wt(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function Ot(){return!0}let le=[];function Ct(){var e=le;le=[],kn(e)}function Ie(e){if(le.length===0&&!be){var t=le;queueMicrotask(()=>{t===le&&Ct()})}le.push(e)}function Xn(){for(;le.length>0;)Ct()}function kt(e){var t=p;if(t===null)return _.f|=X,e;if((t.f&Pe)===0){if((t.f&ke)===0)throw e;t.b.error(e)}else _e(e,t)}function _e(e,t){for(;t!==null;){if((t.f&ke)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const je=new Set;let y=null,P=null,L=[],Fe=null,st=!1,be=!1;class F{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#o=0;#s=0;#a=null;#l=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){L=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#n(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects)):(y=null,Lt(n.render_effects),Lt(n.effects),this.#a?.resolve()),P=null}#n(t,n){t.f^=T;for(var r=t.first;r!==null;){var i=r.f,s=(i&(J|K))!==0,l=s&&(i&T)!==0,f=l||(i&Z)!==0||this.skipped_effects.has(r);if((r.f&ke)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!f&&r.fn!==null){s?r.f^=T:(i&Qe)!==0?n.effects.push(r):Ne(r)&&((r.f&U)!==0&&n.block_effects.push(r),Ae(r));var o=r.first;if(o!==null){r=o;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#r(n.effects),this.#r(n.render_effects),this.#r(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#r(t){for(const n of t)((n.f&R)!==0?this.#l:this.#i).push(n),this.#f(n.deps),A(n,T)}#f(t){if(t!==null)for(const n of t)(n.f&$)===0||(n.f&se)===0||(n.f^=se,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&X)===0&&(this.current.set(t,t.v),P?.set(t,t.v))}activate(){y=this,this.apply()}deactivate(){y===this&&(y=null,P=null)}flush(){if(this.activate(),L.length>0){if(Pt(),y!==null&&y!==this)return}else this.#o===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#s===0){for(const t of this.#t)t();this.#t.clear()}this.#o===0&&this.#c()}#c(){if(je.size>1){this.previous.clear();var t=P,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of je){if(s===this){n=!1;continue}const l=[];for(const[o,a]of this.current){if(s.current.has(o))if(n&&a!==s.current.get(o))s.current.set(o,a);else continue;l.push(o)}if(l.length===0)continue;const f=[...s.current.keys()].filter(o=>!this.current.has(o));if(f.length>0){var i=L;L=[];const o=new Set,a=new Map;for(const h of l)Mt(h,f,o,a);if(L.length>0){y=s,s.apply();for(const h of L)s.#n(h,r);s.deactivate()}L=i}}y=null,P=t}this.committed=!0,je.delete(this)}increment(t){this.#o+=1,t&&(this.#s+=1)}decrement(t){this.#o-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#l)A(t,R),ge(t);for(const t of this.#i)A(t,H),ge(t);this.#l=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=$t()).promise}static ensure(){if(y===null){const t=y=new F;je.add(y),be||F.enqueue(()=>{y===t&&t.flush()})}return y}static enqueue(t){Ie(t)}apply(){}}function pe(e){var t=be;be=!0;try{for(var n;;){if(Xn(),L.length===0&&(y?.flush(),L.length===0))return Fe=null,n;Pt()}}finally{be=t}}function Pt(){var e=ne;st=!0;var t=null;try{var n=0;for(ze(!0);L.length>0;){var r=F.ensure();if(n++>1e3){var i,s;Qn()}r.process(L),ee.clear()}}finally{st=!1,ze(e),Fe=null}}function Qn(){try{qn()}catch(e){_e(e,Fe)}}let W=null;function Lt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|Z))===0&&Ne(r)&&(W=new Set,Ae(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Kt(r):r.fn=null),W?.size>0)){ee.clear();for(const i of W){if((i.f&(V|Z))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)W.has(l)&&(W.delete(l),s.push(l)),l=l.parent;for(let f=s.length-1;f>=0;f--){const o=s[f];(o.f&(V|Z))===0&&Ae(o)}}W.clear()}}W=null}}function Mt(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&$)!==0?Mt(i,t,n,r):(s&(nt|U))!==0&&(s&R)===0&&Dt(i,t,r)&&(A(i,R),ge(i))}}function Dt(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&$)!==0&&Dt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function ge(e){for(var t=Fe=e;t.parent!==null;){t=t.parent;var n=t.f;if(st&&t===p&&(n&U)!==0&&(n&Et)===0)return;if((n&(K|J))!==0){if((n&T)===0)return;t.f^=T}}L.push(t)}function er(e){let t=0,n=Ee(0),r;return()=>{He()&&(C(n),zt(()=>(t===0&&(r=fn(()=>e(()=>xe(n)))),t+=1,()=>{Ie(()=>{t-=1,t===0&&(r?.(),r=void 0,xe(n))})})))}}var tr=Le|ie|ke;function nr(e,t,n){new rr(e,t,n)}class rr{parent;#t=!1;#e;#o=m?w:null;#s;#a;#l;#i=null;#n=null;#r=null;#f=null;#u=null;#c=0;#h=0;#v=!1;#d=null;#w=er(()=>(this.#d=Ee(this.#c),()=>{this.#d=null}));constructor(t,n,r){this.#e=t,this.#s=n,this.#a=r,this.parent=p.b,this.#t=!!this.#s.pending,this.#l=yr(()=>{if(p.b=this,m){const s=this.#o;Tt(),s.nodeType===De&&s.data===gt?this.#$():this.#y()}else{var i=this.#g();try{this.#i=fe(()=>r(i))}catch(s){this.error(s)}this.#h>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},tr),m&&(this.#e=w)}#y(){try{this.#i=fe(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#$(){const t=this.#s.pending;t&&(this.#n=fe(()=>t(this.#e)),F.enqueue(()=>{var n=this.#g();this.#i=this.#_(()=>(F.ensure(),fe(()=>this.#a(n)))),this.#h>0?this.#p():(We(this.#n,()=>{this.#n=null}),this.#t=!1)}))}#g(){var t=this.#e;return this.#t&&(this.#u=Ye(),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.#s.pending}#_(t){var n=p,r=_,i=k;D(this.#l),x(this.#l),ve(this.#l.ctx);try{return t()}catch(s){return kt(s),null}finally{D(n),x(r),ve(i)}}#p(){const t=this.#s.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),xr(this.#i,this.#f)),this.#n===null&&(this.#n=fe(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#h+=t,this.#h===0&&(this.#t=!1,this.#n&&We(this.#n,()=>{this.#n=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#d&&Be(this.#d,this.#c)}get_effect_pending(){return this.#w(),C(this.#d)}error(t){var n=this.#s.onerror;let r=this.#s.failed;if(this.#v||!n&&!r)throw t;this.#i&&(q(this.#i),this.#i=null),this.#n&&(q(this.#n),this.#n=null),this.#r&&(q(this.#r),this.#r=null),m&&(Q(this.#o),Gn(),Q(Jn()));var i=!1,s=!1;const l=()=>{if(i){zn();return}i=!0,s&&Wn(),F.ensure(),this.#c=0,this.#r!==null&&We(this.#r,()=>{this.#r=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,fe(()=>this.#a(this.#e)))),this.#h>0?this.#p():this.#t=!1};var f=_;try{x(null),s=!0,n?.(t,l),s=!1}catch(o){_e(o,this.#l&&this.#l.parent)}finally{x(f)}r&&Ie(()=>{this.#r=this.#_(()=>{F.ensure(),this.#v=!0;try{return fe(()=>{r(this.#e,()=>t,()=>l)})}catch(o){return _e(o,this.#l.parent),null}finally{this.#v=!1}})})}}function ir(e,t,n,r){const i=lt;if(n.length===0&&e.length===0){r(t.map(i));return}var s=y,l=p,f=sr();function o(){Promise.all(n.map(a=>lr(a))).then(a=>{f();try{r([...t.map(i),...a])}catch(h){(l.f&V)===0&&_e(h,l)}s?.deactivate(),qe()}).catch(a=>{_e(a,l)})}e.length>0?Promise.all(e).then(()=>{f();try{return o()}finally{s?.deactivate(),qe()}}):o()}function sr(){var e=p,t=_,n=k,r=y;return function(s=!0){D(e),x(t),ve(n),s&&r?.activate()}}function qe(){D(null),x(null),ve(null)}function lt(e){var t=$|R,n=_!==null&&(_.f&$)!==0?_:null;return p!==null&&(p.f|=ie),{ctx:k,deps:null,effects:null,equals:Nt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??p,ac:null}}function lr(e,t){let n=p;n===null&&Dn();var r=n.b,i=void 0,s=Ee(E),l=!_,f=new Map;return wr(()=>{var o=$t();i=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{a===y&&a.committed&&a.deactivate(),qe()})}catch(u){o.reject(u),qe()}var a=y;if(l){var h=!r.is_pending();r.update_pending_count(1),a.increment(h),f.get(a)?.reject(he),f.delete(a),f.set(a,o)}const d=(u,c=void 0)=>{if(a.activate(),c)c!==he&&(s.f|=X,Be(s,c));else{(s.f&X)!==0&&(s.f^=X),Be(s,u);for(const[g,b]of f){if(f.delete(g),g===a)break;b.reject(he)}}l&&(r.update_pending_count(-1),a.decrement(h))};o.promise.then(d,u=>d(null,u||"unknown"))}),Vt(()=>{for(const o of f.values())o.reject(he)}),new Promise(o=>{function a(h){function d(){h===i?o(s):a(i)}h.then(d,d)}a(i)})}function fr(e){const t=lt(e);return t.equals=At,t}function It(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)q(t[n])}}function or(e){for(var t=e.parent;t!==null;){if((t.f&$)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ft(e){var t,n=p;D(or(e));try{e.f&=~se,It(e),t=rn(e)}finally{D(n)}return t}function jt(e){var t=ft(e);if(e.equals(t)||(y?.is_fork||(e.v=t),e.wv=tn()),!oe)if(P!==null)He()&&P.set(e,t);else{var n=(e.f&j)===0?H:T;A(e,n)}}let ot=new Set;const ee=new Map;let Ft=!1;function Ee(e,t){var n={f:0,v:e,reactions:null,equals:Nt,rv:0,wv:0};return n}function z(e,t){const n=Ee(e);return Tr(n),n}function ar(e,t=!1,n=!0){const r=Ee(e);return t||(r.equals=At),r}function M(e,t,n=!1){_!==null&&(!Y||(_.f&bt)!==0)&&Ot()&&(_.f&($|U|nt|bt))!==0&&!G?.includes(e)&&Vn();let r=n?me(t):t;return Be(e,r)}function Be(e,t){if(!e.equals(t)){var n=e.v;oe?ee.set(e,t):ee.set(e,n),e.v=t;var r=F.ensure();r.capture(e,n),(e.f&$)!==0&&((e.f&R)!==0&&ft(e),A(e,(e.f&j)!==0?T:H)),e.wv=tn(),qt(e,R),p!==null&&(p.f&T)!==0&&(p.f&(J|K))===0&&(I===null?Nr([e]):I.push(e)),!r.is_fork&&ot.size>0&&!Ft&&ur()}return t}function ur(){Ft=!1;var e=ne;ze(!0);const t=Array.from(ot);try{for(const n of t)(n.f&T)!==0&&A(n,H),Ne(n)&&Ae(n)}finally{ze(e)}ot.clear()}function xe(e){M(e,e.v+1)}function qt(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],l=s.f,f=(l&R)===0;if(f&&A(s,t),(l&$)!==0){var o=s;P?.delete(o),(l&se)===0&&(l&j&&(s.f|=se),qt(o,H))}else f&&((l&U)!==0&&W!==null&&W.add(s),ge(s))}}function me(e){if(typeof e!="object"||e===null||Me in e)return e;const t=wt(e);if(t!==On&&t!==Cn)return e;var n=new Map,r=Nn(e),i=z(0),s=ae,l=f=>{if(ae===s)return f();var o=_,a=ae;x(null),en(s);var h=f();return x(o),en(a),h};return r&&n.set("length",z(e.length)),new Proxy(e,{defineProperty(f,o,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Un();var h=n.get(o);return h===void 0?h=l(()=>{var d=z(a.value);return n.set(o,d),d}):M(h,a.value,!0),!0},deleteProperty(f,o){var a=n.get(o);if(a===void 0){if(o in f){const h=l(()=>z(E));n.set(o,h),xe(i)}}else M(a,E),xe(i);return!0},get(f,o,a){if(o===Me)return e;var h=n.get(o),d=o in f;if(h===void 0&&(!d||re(f,o)?.writable)&&(h=l(()=>{var c=me(d?f[o]:E),g=z(c);return g}),n.set(o,h)),h!==void 0){var u=C(h);return u===E?void 0:u}return Reflect.get(f,o,a)},getOwnPropertyDescriptor(f,o){var a=Reflect.getOwnPropertyDescriptor(f,o);if(a&&"value"in a){var h=n.get(o);h&&(a.value=C(h))}else if(a===void 0){var d=n.get(o),u=d?.v;if(d!==void 0&&u!==E)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return a},has(f,o){if(o===Me)return!0;var a=n.get(o),h=a!==void 0&&a.v!==E||Reflect.has(f,o);if(a!==void 0||p!==null&&(!h||re(f,o)?.writable)){a===void 0&&(a=l(()=>{var u=h?me(f[o]):E,c=z(u);return c}),n.set(o,a));var d=C(a);if(d===E)return!1}return h},set(f,o,a,h){var d=n.get(o),u=o in f;if(r&&o==="length")for(var c=a;c<d.v;c+=1){var g=n.get(c+"");g!==void 0?M(g,E):c in f&&(g=l(()=>z(E)),n.set(c+"",g))}if(d===void 0)(!u||re(f,o)?.writable)&&(d=l(()=>z(void 0)),M(d,me(a)),n.set(o,d));else{u=d.v!==E;var b=l(()=>me(a));M(d,b)}var v=Reflect.getOwnPropertyDescriptor(f,o);if(v?.set&&v.set.call(h,a),!u){if(r&&typeof o=="string"){var ye=n.get("length"),S=Number(o);Number.isInteger(S)&&S>=ye.v&&M(ye,S+1)}xe(i)}return!0},ownKeys(f){C(i);var o=Reflect.ownKeys(f).filter(d=>{var u=n.get(d);return u===void 0||u.v!==E});for(var[a,h]of n)h.v!==E&&!(a in f)&&o.push(a);return o},setPrototypeOf(){Hn()}})}var Bt,Yt,Ut,Ht;function at(){if(Bt===void 0){Bt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=re(t,"firstChild").get,Ht=re(t,"nextSibling").get,yt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),yt(n)&&(n.__t=void 0)}}function Ye(e=""){return document.createTextNode(e)}function Ue(e){return Ut.call(e)}function te(e){return Ht.call(e)}function ut(e,t){if(!m)return Ue(e);var n=Ue(w);return n===null&&(n=w.appendChild(Ye())),Q(n),n}function cr(e,t=1,n=!1){let r=m?w:e;for(var i;t--;)i=r,r=te(r);if(!m)return r;if(n&&r?.nodeType!==Mn){var s=Ye();return r===null?i?.after(s):r.before(s),Q(s),s}return Q(r),r}function hr(e){e.textContent=""}function ct(e){var t=_,n=p;x(null),D(null);try{return e()}finally{x(t),D(n)}}function dr(e){p===null&&(_===null&&Fn(),jn()),oe&&In()}function vr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function B(e,t,n){var r=p;r!==null&&(r.f&Z)!==0&&(e|=Z);var i={ctx:k,deps:null,nodes_start:null,nodes_end:null,f:e|R|j,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{Ae(i),i.f|=Pe}catch(f){throw q(i),f}else t!==null&&ge(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&ie)===0&&(s=s.first,(e&U)!==0&&(e&Le)!==0&&s!==null&&(s.f|=Le)),s!==null&&(s.parent=r,r!==null&&vr(s,r),_!==null&&(_.f&$)!==0&&(e&K)===0)){var l=_;(l.effects??=[]).push(s)}return i}function He(){return _!==null&&!Y}function Vt(e){const t=B(et,null,!1);return A(t,T),t.teardown=e,t}function _r(e){dr();var t=p.f,n=!_&&(t&J)!==0&&(t&Pe)===0;if(n){var r=k;(r.e??=[]).push(e)}else return Wt(e)}function Wt(e){return B(Qe|Pn,e,!1)}function pr(e){F.ensure();const t=B(K|ie,e,!0);return()=>{q(t)}}function gr(e){F.ensure();const t=B(K|ie,e,!0);return(n={})=>new Promise(r=>{n.outro?We(t,()=>{q(t),r(void 0)}):(q(t),r(void 0))})}function mr(e){return B(Qe,e,!1)}function wr(e){return B(nt|ie,e,!0)}function zt(e,t=0){return B(et|t,e,!0)}function Ve(e,t=[],n=[],r=[]){ir(r,t,n,i=>{B(et,()=>e(...i.map(C)),!0)})}function yr(e,t=0){var n=B(U|t,e,!0);return n}function fe(e){return B(J|ie,e,!0)}function Gt(e){var t=e.teardown;if(t!==null){const n=oe,r=_;Xt(!0),x(null);try{t.call(null)}finally{Xt(n),x(r)}}}function Jt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&ct(()=>{i.abort(he)});var r=n.next;(n.f&K)!==0?n.parent=null:q(n,t),n=r}}function $r(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&J)===0&&q(t),t=n}}function q(e,t=!0){var n=!1;(t||(e.f&Et)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(br(e.nodes_start,e.nodes_end),n=!0),Jt(e,t&&!n),Ge(e,0),A(e,V);var r=e.transitions;if(r!==null)for(const s of r)s.stop();Gt(e);var i=e.parent;i!==null&&i.first!==null&&Kt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function br(e,t){for(;e!==null;){var n=e===t?null:te(e);e.remove(),e=n}}function Kt(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 We(e,t,n=!0){var r=[];Zt(e,r,!0),Er(r,()=>{n&&q(e),t&&t()})}function Er(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Zt(e,t,n){if((e.f&Z)===0){if(e.f^=Z,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var i=r.next,s=(r.f&Le)!==0||(r.f&J)!==0&&(e.f&U)!==0;Zt(r,t,s?n:!1),r=i}}}function xr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:te(n);t.append(n),n=i}}let ne=!1;function ze(e){ne=e}let oe=!1;function Xt(e){oe=e}let _=null,Y=!1;function x(e){_=e}let p=null;function D(e){p=e}let G=null;function Tr(e){_!==null&&(G===null?G=[e]:G.push(e))}let N=null,O=0,I=null;function Nr(e){I=e}let Qt=1,Te=0,ae=Te;function en(e){ae=e}function tn(){return++Qt}function Ne(e){var t=e.f;if((t&R)!==0)return!0;if(t&$&&(e.f&=~se),(t&H)!==0){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i];if(Ne(s)&&jt(s),s.wv>e.wv)return!0}(t&j)!==0&&P===null&&A(e,T)}return!1}function nn(e,t,n=!0){var r=e.reactions;if(r!==null&&!G?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&$)!==0?nn(s,t,!1):t===s&&(n?A(s,R):(s.f&T)!==0&&A(s,H),ge(s))}}function rn(e){var t=N,n=O,r=I,i=_,s=G,l=k,f=Y,o=ae,a=e.f;N=null,O=0,I=null,_=(a&(J|K))===0?e:null,G=null,ve(e.ctx),Y=!1,ae=++Te,e.ac!==null&&(ct(()=>{e.ac.abort(he)}),e.ac=null);try{e.f|=tt;var h=e.fn,d=h(),u=e.deps;if(N!==null){var c;if(Ge(e,O),u!==null&&O>0)for(u.length=O+N.length,c=0;c<N.length;c++)u[O+c]=N[c];else e.deps=u=N;if(ne&&He()&&(e.f&j)!==0)for(c=O;c<u.length;c++)(u[c].reactions??=[]).push(e)}else u!==null&&O<u.length&&(Ge(e,O),u.length=O);if(Ot()&&I!==null&&!Y&&u!==null&&(e.f&($|H|R))===0)for(c=0;c<I.length;c++)nn(I[c],e);return i!==null&&i!==e&&(Te++,I!==null&&(r===null?r=I:r.push(...I))),(e.f&X)!==0&&(e.f^=X),d}catch(g){return kt(g)}finally{e.f^=tt,N=t,O=n,I=r,_=i,G=s,ve(l),Y=f,ae=o}}function Ar(e,t){let n=t.reactions;if(n!==null){var r=An.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&$)!==0&&(N===null||!N.includes(t))&&(A(t,H),(t.f&j)!==0&&(t.f^=j,t.f&=~se),It(t),Ge(t,0))}function Ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ar(e,n[r])}function Ae(e){var t=e.f;if((t&V)===0){A(e,T);var n=p,r=ne;p=e,ne=!0;try{(t&U)!==0?$r(e):Jt(e),Gt(e);var i=rn(e);e.teardown=typeof i=="function"?i:null,e.wv=Qt;var s;Xe&&Zn&&(e.f&R)!==0&&e.deps}finally{ne=r,p=n}}}function C(e){var t=e.f,n=(t&$)!==0;if(_!==null&&!Y){var r=p!==null&&(p.f&V)!==0;if(!r&&!G?.includes(e)){var i=_.deps;if((_.f&tt)!==0)e.rv<Te&&(e.rv=Te,N===null&&i!==null&&i[O]===e?O++:N===null?N=[e]:N.includes(e)||N.push(e));else{(_.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[_]:s.includes(_)||s.push(_)}}}if(oe){if(ee.has(e))return ee.get(e);if(n){var l=e,f=l.v;return((l.f&T)===0&&l.reactions!==null||ln(l))&&(f=ft(l)),ee.set(l,f),f}}else n&&!P?.has(e)&&(l=e,Ne(l)&&jt(l),ne&&He()&&(l.f&j)===0&&sn(l));if(P?.has(e))return P.get(e);if((e.f&X)!==0)throw e.v;return e.v}function sn(e){if(e.deps!==null){e.f^=j;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&$)!==0&&(t.f&j)===0&&sn(t)}}function ln(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ee.has(t)||(t.f&$)!==0&&ln(t))return!0;return!1}function fn(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}const Sr=-7169;function A(e,t){e.f=e.f&Sr|t}const Rr=new Set,on=new Set;function Or(e,t,n,r={}){function i(s){if(r.capture||Se.call(t,s),!s.cancelBubble)return ct(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ie(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Cr(e,t,n,r,i){var s={capture:r,passive:i},l=Or(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Vt(()=>{t.removeEventListener(e,l,s)})}let an=null;function Se(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;an=e;var l=0,f=an===e&&e.__root;if(f){var o=i.indexOf(f);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var a=i.indexOf(t);if(a===-1)return;o<=a&&(l=o)}if(s=i[l]||e.target,s!==t){Ce(e,"currentTarget",{configurable:!0,get(){return s||n}});var h=_,d=p;x(null),D(null);try{for(var u,c=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+r];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(v){u?c.push(v):u=v}if(e.cancelBubble||g===t||g===null)break;s=g}if(u){for(let v of c)queueMicrotask(()=>{throw v});throw u}}finally{e.__root=t,delete e.currentTarget,x(h),D(d)}}}function kr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ht(e,t){var n=p;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Pr(e,t){var n=(t&xn)!==0,r,i=!e.startsWith("<!>");return()=>{if(m)return ht(w,null),w;r===void 0&&(r=kr(i?e:"<!>"+e),r=Ue(r));var s=n||Yt?document.importNode(r,!0):r.cloneNode(!0);return ht(s,s),s}}function un(e,t){if(m){var n=p;((n.f&Pe)===0||n.nodes_end===null)&&(n.nodes_end=w),Tt();return}e!==null&&e.before(t)}const Lr=["touchstart","touchmove"];function Mr(e){return Lr.includes(e)}function cn(e,t){return hn(e,t)}function Dr(e,t){at(),t.intro=t.intro??!1;const n=t.target,r=m,i=w;try{for(var s=Ue(n);s&&(s.nodeType!==De||s.data!==pt);)s=te(s);if(!s)throw $e;de(!0),Q(s);const l=hn(e,{...t,anchor:s});return de(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
- `).some(f=>f.startsWith("https://svelte.dev/e/")))throw l;return l!==$e&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Bn(),at(),hr(n),de(!1),cn(e,t)}finally{de(r),Q(i)}}const we=new Map;function hn(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0}){at();var f=new Set,o=d=>{for(var u=0;u<d.length;u++){var c=d[u];if(!f.has(c)){f.add(c);var g=Mr(c);t.addEventListener(c,Se,{passive:g});var b=we.get(c);b===void 0?(document.addEventListener(c,Se,{passive:g}),we.set(c,1)):we.set(c,b+1)}}};o(Sn(Rr)),on.add(o);var a=void 0,h=gr(()=>{var d=n??t.appendChild(Ye());return nr(d,{pending:()=>{}},u=>{if(s){St({});var c=k;c.c=s}if(i&&(r.$$events=i),m&&ht(u,null),a=e(u,r)||{},m&&(p.nodes_end=w,w===null||w.nodeType!==De||w.data!==mt))throw rt(),$e;s&&Rt()}),()=>{for(var u of f){t.removeEventListener(u,Se);var c=we.get(u);--c===0?(document.removeEventListener(u,Se),we.delete(u)):we.set(u,c)}on.delete(o),d!==n&&d.parentNode?.removeChild(d)}});return dt.set(a,h),a}let dt=new WeakMap;function Ir(e,t){const n=dt.get(e);return n?(dt.delete(e),n(t)):Promise.resolve()}function jr(e,t){mr(()=>{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 Fr(e,t,n){var r=""+e;return r}function qr(e,t,n,r,i,s){var l=e.__className;if(m||l!==n||l===void 0){var f=Fr(n);(!m||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=n}return s}const Br=Symbol("is custom element"),Yr=Symbol("is html");function Ur(e,t,n,r){var i=Hr(e);m&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ln]=n),n==null?e.removeAttribute(t):typeof n!="string"&&dn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ue(e,t,n){var r=_,i=p;let s=m;m&&de(!1),x(null),D(null);try{t!=="style"&&(vt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?dn(e).includes(t):n&&typeof n=="object")?e[t]=n:Ur(e,t,n==null?n:String(n))}finally{x(r),D(i),s&&de(!0)}}function Hr(e){return e.__attributes??={[Br]:e.nodeName.includes("-"),[Yr]:e.namespaceURI===Tn}}var vt=new Map;function dn(e){var t=e.getAttribute("is")||e.nodeName,n=vt.get(t);if(n)return n;vt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Rn(i);for(var l in r)r[l].set&&n.push(l);i=wt(i)}return n}let Je=!1;function Vr(e){var t=Je;try{return Je=!1,[e(),Je]}finally{Je=t}}function Re(e,t,n,r){var i=(n&bn)!==0,s=(n&En)!==0,l=r,f=!0,o=()=>(f&&(f=!1,l=s?fn(r):r),l),a;if(i){var h=Me in e||xt in e;a=re(e,t)?.set??(h&&t in e?S=>e[t]=S:void 0)}var d,u=!1;i?[d,u]=Vr(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=o(),a&&(Yn(),a(d)));var c;if(c=()=>{var S=e[t];return S===void 0?o():(f=!0,S)},(n&$n)===0)return c;if(a){var g=e.$$legacy;return(function(S,Ze){return arguments.length>0?((!Ze||g||u)&&a(Ze?c():S),S):c()})}var b=!1,v=((n&yn)!==0?lt:fr)(()=>(b=!1,c()));i&&C(v);var ye=p;return(function(S,Ze){if(arguments.length>0){const wn=Ze?C(v):i?me(S):S;return M(v,wn),b=!0,l!==void 0&&(l=wn),S}return oe&&b||(ye.f&V)!==0?v.v:C(v)})}function Wr(e){return new zr(e)}class zr{#t;#e;constructor(t){var n=new Map,r=(s,l)=>{var f=ar(l,!1,!1);return n.set(s,f),f};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return C(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===xt?!0:(C(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,f){return M(n.get(l)??r(l,f),f),Reflect.set(s,l,f)}});this.#e=(t.hydrate?Dr:cn)(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)&&pe(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||Ce(this,s,{get(){return this.#e[s]},set(l){this.#e[s]=l},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Ir(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 vn;typeof HTMLElement=="function"&&(vn=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),un(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Gr(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]=Ke(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=Wr({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=pr(()=>{zt(()=>{this.$$r=!0;for(const r of Oe(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ke(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]=Ke(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 Oe(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ke(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 Gr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Jr(e,t,n,r,i,s){let l=class extends vn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Oe(t).map(f=>(t[f].attribute||f).toLowerCase())}};return Oe(t).forEach(f=>{Ce(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(o){o=Ke(f,o,t),this.$$d[f]=o;var a=this.$$c;if(a){var h=re(a,f)?.get;h?a[f]=o:a.$set({[f]:o})}}})}),r.forEach(f=>{Ce(l.prototype,f,{get(){return this.$$c?.[f]}})}),e.element=l,l}const _n={version:"0.66.0"};var ce={},pn;function Kr(){if(pn)return ce;pn=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.LanguageTranslator=void 0,ce.getChildStyleToPass=e,ce.addComponent=t;function e(r,i){var s,l,f="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(u){return Object.keys(r).includes(u.name)}))===null||l===void 0)&&l.length))for(var o=function(u){var c=i?.filter(function(g){return g.name===u&&g.defaultValue!==r[u]});c&&(f+="".concat(u,":").concat(r[u],";"))},a=0,h=Object.keys(r);a<h.length;a++){var d=h[a];o(d)}}catch(u){console.error("error getting child style to pass",u)}finally{return f}}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 l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var f=document.createElement("script");if(f.id=s+"-script",f.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)f.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var o=s.split("-")[0];f.src="http://localhost:6006/webcomponents/".concat(s.replace(o+"-",""),"/").concat(l)}document.head.appendChild(f)}catch(a){console.warn(a)}}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,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,f="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(f=navigator.languages[0].split("-")[0].toLowerCase()),f},r.getDictionaryWord=function(i,s,l){var f;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((f=s[l])===null||f===void 0)&&f[i]))return s[l][i];var o="",a=r.getDefaultLang();if(!l||a!==l){var h=s?.[a];h?.[i]&&(o=h[i])}return o},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var f=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return f.format(i)},r})();return ce.LanguageTranslator=n,ce}var gn=Kr(),Zr=Pr('<div id="compocontainer" class="svelte-11p6sry"><div id="list" class="svelte-11p6sry"><hb-messages-list></hb-messages-list></div> <div id="prompt" class="svelte-11p6sry"><hb-messages-send></hb-messages-send></div></div>',2);const Xr={hash:"svelte-11p6sry",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
- @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;display:block;overflow:hidden;height:fit-content;min-height:100px;}#compocontainer.svelte-11p6sry {display:grid;grid-template-areas:"messages" "prompt";overflow:hidden;grid-template-rows:1fr 180px;height:100%;min-height:200px;}#list.svelte-11p6sry {overflow-y:auto;grid-area:messages;min-height:0;height:100%;}#list.svelte-11p6sry hb-messages-list:where(.svelte-11p6sry) {height:100%;display:block;}#prompt.svelte-11p6sry {grid-area:prompt;width:90%;max-width:1600px;margin:0 auto;}.msglist.svelte-11p6sry {width:90%;max-width:1400px;margin:0 auto;}`};function mn(e,t){St(t,!0),jr(e,Xr);function n(v,ye){t.$$host.dispatchEvent(new CustomEvent(v,{detail:ye}))}let r=Re(t,"id",7,""),i=Re(t,"messages",7),s=Re(t,"authors",7),l=Re(t,"options",7),f=Re(t,"message",23,()=>({text:""})),o=z("");_r(()=>{if(typeof f()=="string")try{f(JSON.parse(f())),M(o,f()?.text?f().text:"",!0)}catch(v){console.error("error parsing message",v)}});function a(v){if(!v?.file&&!v?.text)return console.warn("no message to received",v);n("sendMessage",v),M(o,v.text,!0),M(o,"")}gn.addComponent({repoName:"@htmlbricks/hb-messages-list",version:_n.version}),gn.addComponent({repoName:"@htmlbricks/hb-messages-send",version:_n.version});var h={get id(){return r()},set id(v=""){r(v),pe()},get messages(){return i()},set messages(v){i(v),pe()},get authors(){return s()},set authors(v){s(v),pe()},get options(){return l()},set options(v){l(v),pe()},get message(){return f()},set message(v={text:""}){f(v),pe()}},d=Zr(),u=ut(d),c=ut(u);ue(c,"id","message-list"),Ve(()=>ue(c,"messages",i())),Ve(()=>ue(c,"authors",s())),Ve(()=>ue(c,"options",l())),qr(c,1,"msglist svelte-11p6sry"),ue(c,"part","msglist"),it(u);var g=cr(u,2),b=ut(g);return Ve(()=>ue(b,"text",C(o))),ue(b,"part","msgsend"),it(g),it(d),Cr("sendMessage",b,v=>a(v.detail)),un(e,d),Rt(h)}customElements.define("hb-messages-box",Jr(mn,{id:{},messages:{},authors:{},options:{},message:{}},[],[],!0)),_t.Component=mn,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})})(this["messages-box"]=this["messages-box"]||{});
1
+ (function(wt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const kn=1,Ln=4,Pn=8,Mn=16,Dn=2,yt="[",bt="[!",$t="[?",Et="]",Ne={},N=Symbol(),Tt="http://www.w3.org/1999/xhtml",In=!1;var jn=Array.isArray,Fn=Array.prototype.indexOf,me=Array.prototype.includes,qn=Array.from,Le=Object.keys,Pe=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,Bn=Object.getOwnPropertyDescriptors,Hn=Object.prototype,Yn=Array.prototype,xt=Object.getPrototypeOf,Nt=Object.isExtensible;const Un=()=>{};function Vn(e){for(var t=0;t<e.length;t++)e[t]()}function St(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const E=2,we=4,Me=8,At=1<<24,J=16,V=32,K=64,Ke=128,L=512,T=1024,S=2048,Y=4096,X=8192,F=16384,Z=32768,Rt=1<<25,De=65536,Ot=1<<17,zn=1<<18,fe=1<<19,Wn=1<<20,ue=65536,Xe=1<<21,Ze=1<<22,Q=1<<23,Ie=Symbol("$state"),Ct=Symbol("legacy props"),Gn=Symbol(""),z=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Jn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),kt=3,Qe=8;function Kn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Zn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Qn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function er(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tr(){throw new Error("https://svelte.dev/e/hydration_failed")}function nr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function rr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ir(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function et(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let y=!1;function ye(e){y=e}let b;function ee(e){if(e===null)throw et(),Ne;return b=e}function Lt(){return ee(se(b))}function tt(e){if(y){if(se(b)!==null)throw et(),Ne;b=e}}function ar(e=1){if(y){for(var t=e,n=b;t--;)n=se(n);b=n}}function fr(e=!0){for(var t=0,n=b;;){if(n.nodeType===Qe){var r=n.data;if(r===Et){if(t===0)return n;t-=1}else(r===yt||r===bt||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=se(n);e&&n.remove(),n=i}}function Pt(e){return e===this.v}function ur(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Mt(e){return!ur(e,this.v)}let cr=!1,P=null;function be(e){P=e}function Dt(e,t=!1,n){P={p:P,i:!1,c:null,e:null,s:e,x:null,r:g,l:null}}function It(e){var t=P,n=t.e;if(n!==null){t.e=null;for(var r of n)ln(r)}return e!==void 0&&(t.x=e),t.i=!0,P=t.p,e??{}}function jt(){return!0}let ce=[];function Ft(){var e=ce;ce=[],Vn(e)}function he(e){if(ce.length===0&&!Se){var t=ce;queueMicrotask(()=>{t===ce&&Ft()})}ce.push(e)}function hr(){for(;ce.length>0;)Ft()}function qt(e){var t=g;if(t===null)return p.f|=Q,e;if((t.f&Z)===0&&(t.f&we)===0)throw e;te(e,t)}function te(e,t){for(;t!==null;){if((t.f&Ke)!==0){if((t.f&Z)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const dr=-7169;function $(e,t){e.f=e.f&dr|t}function nt(e){(e.f&L)!==0||e.deps===null?$(e,T):$(e,Y)}function Bt(e){if(e!==null)for(const t of e)(t.f&E)===0||(t.f&ue)===0||(t.f^=ue,Bt(t.deps))}function Ht(e,t,n){(e.f&S)!==0?t.add(e):(e.f&Y)!==0&&n.add(e),Bt(e.deps),$(e,T)}let je=!1;function vr(e){var t=je;try{return je=!1,[e(),je]}finally{je=t}}const ne=new Set;let w=null,q=null,rt=null,Se=!1,it=!1,$e=null,Fe=null;var Yt=0;let _r=1;class re{id=_r++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#s=new Map;#a=new Map;#l=null;#t=[];#r=new Set;#i=new Set;#o=new Map;is_fork=!1;#c=!1;#f=new Set;#h(){return this.is_fork||this.#a.size>0}#v(){for(const r of this.#f)for(const i of r.#a.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#o.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#o.has(t)||this.#o.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#o.get(t);if(n){this.#o.delete(t);for(var r of n.d)$(r,S),this.schedule(r);for(r of n.m)$(r,Y),this.schedule(r)}}#d(){if(Yt++>1e3&&(ne.delete(this),pr()),!this.#h()){for(const l of this.#r)this.#i.delete(l),$(l,S),this.schedule(l);for(const l of this.#i)$(l,Y),this.schedule(l)}const t=this.#t;this.#t=[],this.apply();var n=$e=[],r=[],i=Fe=[];for(const l of t)try{this.#u(l,n,r)}catch(f){throw Gt(l),f}if(w=null,i.length>0){var s=re.ensure();for(const l of i)s.schedule(l)}if($e=null,Fe=null,this.#h()||this.#v()){this.#_(r),this.#_(n);for(const[l,f]of this.#o)Wt(l,f)}else{this.#s.size===0&&ne.delete(this),this.#r.clear(),this.#i.clear();for(const l of this.#e)l(this);this.#e.clear(),Ut(r),Ut(n),this.#l?.resolve()}var o=w;if(this.#t.length>0){const l=o??=this;l.#t.push(...this.#t.filter(f=>!l.#t.includes(f)))}o!==null&&(ne.add(o),o.#d()),ne.has(this)||this.#p()}#u(t,n,r){t.f^=T;for(var i=t.first;i!==null;){var s=i.f,o=(s&(V|K))!==0,l=o&&(s&T)!==0,f=l||(s&X)!==0||this.#o.has(i);if(!f&&i.fn!==null){o?i.f^=T:(s&we)!==0?n.push(i):Oe(i)&&((s&J)!==0&&this.#i.add(i),xe(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#_(t){for(var n=0;n<t.length;n+=1)Ht(t[n],this.#r,this.#i)}capture(t,n,r=!1){n!==N&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Q)===0&&(this.current.set(t,[t.v,r]),q?.set(t,t.v))}activate(){w=this}deactivate(){w=null,q=null}flush(){try{it=!0,w=this,this.#d()}finally{Yt=0,rt=null,$e=null,Fe=null,it=!1,w=null,q=null,ie.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),ne.delete(this)}#p(){for(const a of ne){var t=a.id<this.id,n=[];for(const[u,[h,c]]of this.current){if(a.current.has(u)){var r=a.current.get(u)[0];if(t&&h!==r)a.current.set(u,[h,c]);else continue}n.push(u)}var i=[...a.current.keys()].filter(u=>!this.current.has(u));if(i.length===0)t&&a.discard();else if(n.length>0){a.activate();var s=new Set,o=new Map;for(var l of n)Vt(l,i,s,o);if(a.#t.length>0){a.apply();for(var f of a.#t)a.#u(f,[],[]);a.#t=[]}a.deactivate()}}for(const a of ne)a.#f.has(this)&&(a.#f.delete(this),a.#f.size===0&&!a.#h()&&(a.activate(),a.#d()))}increment(t,n){let r=this.#s.get(n)??0;if(this.#s.set(n,r+1),t){let i=this.#a.get(n)??0;this.#a.set(n,i+1)}}decrement(t,n,r){let i=this.#s.get(n)??0;if(i===1?this.#s.delete(n):this.#s.set(n,i-1),t){let s=this.#a.get(n)??0;s===1?this.#a.delete(n):this.#a.set(n,s-1)}this.#c||r||(this.#c=!0,he(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#r.add(r);for(const r of n)this.#i.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#l??=St()).promise}static ensure(){if(w===null){const t=w=new re;it||(ne.add(w),Se||he(()=>{w===t&&t.flush()}))}return w}apply(){{q=null;return}}schedule(t){if(rt=t,t.b?.is_pending&&(t.f&(we|Me|At))!==0&&(t.f&Z)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if($e!==null&&n===g&&(p===null||(p.f&E)===0))return;if((r&(K|V))!==0){if((r&T)===0)return;n.f^=T}}this.#t.push(n)}}function Ee(e){var t=Se;Se=!0;try{for(var n;;){if(hr(),w===null)return n;w.flush()}}finally{Se=t}}function pr(){try{er()}catch(e){te(e,rt)}}let W=null;function Ut(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(F|X))===0&&Oe(r)&&(W=new Set,xe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&fn(r),W?.size>0)){ie.clear();for(const i of W){if((i.f&(F|X))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)W.has(o)&&(W.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const f=s[l];(f.f&(F|X))===0&&xe(f)}}W.clear()}}W=null}}function Vt(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&E)!==0?Vt(i,t,n,r):(s&(Ze|J))!==0&&(s&S)===0&&zt(i,t,r)&&($(i,S),st(i))}}function zt(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(me.call(t,i))return!0;if((i.f&E)!==0&&zt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function st(e){w.schedule(e)}function Wt(e,t){if(!((e.f&V)!==0&&(e.f&T)!==0)){(e.f&S)!==0?t.d.push(e):(e.f&Y)!==0&&t.m.push(e),$(e,T);for(var n=e.first;n!==null;)Wt(n,t),n=n.next}}function Gt(e){$(e,T);for(var t=e.first;t!==null;)Gt(t),t=t.next}function gr(e){let t=0,n=Ae(0),r;return()=>{dt()&&(k(n),on(()=>(t===0&&(r=wn(()=>e(()=>Re(n)))),t+=1,()=>{he(()=>{t-=1,t===0&&(r?.(),r=void 0,Re(n))})})))}}var mr=De|fe;function wr(e,t,n,r){new yr(e,t,n,r)}class yr{parent;is_pending=!1;transform_error;#e;#n=y?b:null;#s;#a;#l;#t=null;#r=null;#i=null;#o=null;#c=0;#f=0;#h=!1;#v=new Set;#d=new Set;#u=null;#_=gr(()=>(this.#u=Ae(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#s=n,this.#a=s=>{var o=g;o.b=this,o.f|=Ke,r(s)},this.parent=g.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#l=qr(()=>{if(y){const s=this.#n;Lt();const o=s.data===bt;if(s.data.startsWith($t)){const f=JSON.parse(s.data.slice($t.length));this.#b(f)}else o?this.#$():this.#p()}else this.#w()},mr),y&&(this.#e=b)}#p(){try{this.#t=de(()=>this.#a(this.#e))}catch(t){this.error(t)}}#b(t){const n=this.#s.failed;n&&(this.#i=de(()=>{n(this.#e,()=>t,()=>()=>{})}))}#$(){const t=this.#s.pending;t&&(this.is_pending=!0,this.#r=de(()=>t(this.#e)),he(()=>{var n=this.#o=document.createDocumentFragment(),r=He();n.append(r),this.#t=this.#m(()=>de(()=>this.#a(r))),this.#f===0&&(this.#e.before(n),this.#o=null,Ve(this.#r,()=>{this.#r=null}),this.#g(w))}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#t=de(()=>{this.#a(this.#e)}),this.#f>0){var t=this.#o=document.createDocumentFragment();Yr(this.#t,t);const n=this.#s.pending;this.#r=de(()=>n(this.#e))}else this.#g(w)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#d)}defer_effect(t){Ht(t,this.#v,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#s.pending}#m(t){var n=g,r=p,i=P;D(this.#l),R(this.#l),be(this.#l.ctx);try{return re.ensure(),t()}catch(s){return qt(s),null}finally{D(n),R(r),be(i)}}#y(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,n);return}this.#f+=t,this.#f===0&&(this.#g(n),this.#r&&Ve(this.#r,()=>{this.#r=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t,n){this.#y(t,n),this.#c+=t,!(!this.#u||this.#h)&&(this.#h=!0,he(()=>{this.#h=!1,this.#u&&Be(this.#u,this.#c)}))}get_effect_pending(){return this.#_(),k(this.#u)}error(t){var n=this.#s.onerror;let r=this.#s.failed;if(!n&&!r)throw t;this.#t&&(B(this.#t),this.#t=null),this.#r&&(B(this.#r),this.#r=null),this.#i&&(B(this.#i),this.#i=null),y&&(ee(this.#n),ar(),ee(fr()));var i=!1,s=!1;const o=()=>{if(i){or();return}i=!0,s&&lr(),this.#i!==null&&Ve(this.#i,()=>{this.#i=null}),this.#m(()=>{this.#w()})},l=f=>{try{s=!0,n?.(f,o),s=!1}catch(a){te(a,this.#l&&this.#l.parent)}r&&(this.#i=this.#m(()=>{try{return de(()=>{var a=g;a.b=this,a.f|=Ke,r(this.#e,()=>f,()=>o)})}catch(a){return te(a,this.#l.parent),null}}))};he(()=>{var f;try{f=this.transform_error(t)}catch(a){te(a,this.#l&&this.#l.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(l,a=>te(a,this.#l&&this.#l.parent)):l(f)})}}function br(e,t,n,r){const i=lt;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=g,l=$r(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(d){(o.f&F)===0&&te(d,o)}qe()}if(n.length===0){f.then(()=>a(t.map(i)));return}var u=Jt();function h(){Promise.all(n.map(c=>Er(c))).then(c=>a([...t.map(i),...c])).catch(c=>te(c,o)).finally(()=>u())}f?f.then(()=>{l(),h(),qe()}):h()}function $r(){var e=g,t=p,n=P,r=w;return function(s=!0){D(e),R(t),be(n),s&&(e.f&F)===0&&(r?.activate(),r?.apply())}}function qe(e=!0){D(null),R(null),be(null),e&&w?.deactivate()}function Jt(){var e=g,t=e.b,n=w,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function lt(e){var t=E|S,n=p!==null&&(p.f&E)!==0?p:null;return g!==null&&(g.f|=fe),{ctx:P,deps:null,effects:null,equals:Pt,f:t,fn:e,reactions:null,rv:0,v:N,wv:0,parent:n??g,ac:null}}function Er(e,t,n){let r=g;r===null&&Kn();var i=void 0,s=Ae(N),o=!p,l=new Map;return Fr(()=>{var f=g,a=St();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(qe)}catch(d){a.reject(d),qe()}var u=w;if(o){if((f.f&Z)!==0)var h=Jt();if(r.b.is_rendered())l.get(u)?.reject(z),l.delete(u);else{for(const d of l.values())d.reject(z);l.clear()}l.set(u,a)}const c=(d,v=void 0)=>{if(h){var m=v===z;h(m)}if(!(v===z||(f.f&F)!==0)){if(u.activate(),v)s.f|=Q,Be(s,v);else{(s.f&Q)!==0&&(s.f^=Q),Be(s,d);for(const[_,A]of l){if(l.delete(_),_===u)break;A.reject(z)}}u.deactivate()}};a.promise.then(c,d=>c(null,d||"unknown"))}),sn(()=>{for(const f of l.values())f.reject(z)}),new Promise(f=>{function a(u){function h(){u===i?f(s):a(i)}u.then(h,h)}a(i)})}function Tr(e){const t=lt(e);return t.equals=Mt,t}function xr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function Nr(e){for(var t=e.parent;t!==null;){if((t.f&E)===0)return(t.f&F)===0?t:null;t=t.parent}return null}function ot(e){var t,n=g;D(Nr(e));try{e.f&=~ue,xr(e),t=pn(e)}finally{D(n)}return t}function Kt(e){var t=e.v,n=ot(e);if(!e.equals(n)&&(e.wv=vn(),(!w?.is_fork||e.deps===null)&&(e.v=n,w?.capture(e,t,!0),e.deps===null))){$(e,T);return}le||(q!==null?(dt()||w?.is_fork)&&q.set(e,n):nt(e))}function Sr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(z),t.teardown=Un,t.ac=null,Ce(t,0),vt(t))}function Xt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&xe(t)}let at=new Set;const ie=new Map;let Zt=!1;function Ae(e,t){var n={f:0,v:e,reactions:null,equals:Pt,rv:0,wv:0};return n}function G(e,t){const n=Ae(e);return Ur(n),n}function Ar(e,t=!1,n=!0){const r=Ae(e);return t||(r.equals=Mt),r}function M(e,t,n=!1){p!==null&&(!H||(p.f&Ot)!==0)&&jt()&&(p.f&(E|J|Ze|Ot))!==0&&(I===null||!me.call(I,e))&&sr();let r=n?Te(t):t;return Be(e,r,Fe)}function Be(e,t,n=null){if(!e.equals(t)){var r=e.v;le?ie.set(e,t):ie.set(e,r),e.v=t;var i=re.ensure();if(i.capture(e,r),(e.f&E)!==0){const s=e;(e.f&S)!==0&&ot(s),q===null&&nt(s)}e.wv=vn(),Qt(e,S,n),g!==null&&(g.f&T)!==0&&(g.f&(V|K))===0&&(j===null?Vr([e]):j.push(e)),!i.is_fork&&at.size>0&&!Zt&&Rr()}return t}function Rr(){Zt=!1;for(const e of at)(e.f&T)!==0&&$(e,Y),Oe(e)&&xe(e);at.clear()}function Re(e){M(e,e.v+1)}function Qt(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],l=o.f,f=(l&S)===0;if(f&&$(o,t),(l&E)!==0){var a=o;q?.delete(a),(l&ue)===0&&(l&L&&(o.f|=ue),Qt(a,Y,n))}else if(f){var u=o;(l&J)!==0&&W!==null&&W.add(u),n!==null?n.push(u):st(u)}}}function Te(e){if(typeof e!="object"||e===null||Ie in e)return e;const t=xt(e);if(t!==Hn&&t!==Yn)return e;var n=new Map,r=jn(e),i=G(0),s=_e,o=l=>{if(_e===s)return l();var f=p,a=_e;R(null),dn(s);var u=l();return R(f),dn(a),u};return r&&n.set("length",G(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?o(()=>{var h=G(a.value);return n.set(f,h),h}):M(u,a.value,!0),!0},deleteProperty(l,f){var a=n.get(f);if(a===void 0){if(f in l){const u=o(()=>G(N));n.set(f,u),Re(i)}}else M(a,N),Re(i);return!0},get(l,f,a){if(f===Ie)return e;var u=n.get(f),h=f in l;if(u===void 0&&(!h||ae(l,f)?.writable)&&(u=o(()=>{var d=Te(h?l[f]:N),v=G(d);return v}),n.set(f,u)),u!==void 0){var c=k(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=k(u))}else if(a===void 0){var h=n.get(f),c=h?.v;if(h!==void 0&&c!==N)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(l,f){if(f===Ie)return!0;var a=n.get(f),u=a!==void 0&&a.v!==N||Reflect.has(l,f);if(a!==void 0||g!==null&&(!u||ae(l,f)?.writable)){a===void 0&&(a=o(()=>{var c=u?Te(l[f]):N,d=G(c);return d}),n.set(f,a));var h=k(a);if(h===N)return!1}return u},set(l,f,a,u){var h=n.get(f),c=f in l;if(r&&f==="length")for(var d=a;d<h.v;d+=1){var v=n.get(d+"");v!==void 0?M(v,N):d in l&&(v=o(()=>G(N)),n.set(d+"",v))}if(h===void 0)(!c||ae(l,f)?.writable)&&(h=o(()=>G(void 0)),M(h,Te(a)),n.set(f,h));else{c=h.v!==N;var m=o(()=>Te(a));M(h,m)}var _=Reflect.getOwnPropertyDescriptor(l,f);if(_?.set&&_.set.call(u,a),!c){if(r&&typeof f=="string"){var A=n.get("length"),x=Number(f);Number.isInteger(x)&&x>=A.v&&M(A,x+1)}Re(i)}return!0},ownKeys(l){k(i);var f=Reflect.ownKeys(l).filter(h=>{var c=n.get(h);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(){ir()}})}var en,tn,nn,rn;function ft(){if(en===void 0){en=window,tn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;nn=ae(t,"firstChild").get,rn=ae(t,"nextSibling").get,Nt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Nt(n)&&(n.__t=void 0)}}function He(e=""){return document.createTextNode(e)}function Ye(e){return nn.call(e)}function se(e){return rn.call(e)}function ut(e,t){if(!y)return Ye(e);var n=Ye(b);return n===null&&(n=b.appendChild(He())),ee(n),n}function Or(e,t=1,n=!1){let r=y?b:e;for(var i;t--;)i=r,r=se(r);if(!y)return r;if(n){if(r?.nodeType!==kt){var s=He();return r===null?i?.after(s):r.before(s),ee(s),s}kr(r)}return ee(r),r}function Cr(e){e.textContent=""}function ct(e,t,n){return document.createElementNS(Tt,e,void 0)}function kr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===kt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ht(e){var t=p,n=g;R(null),D(null);try{return e()}finally{R(t),D(n)}}function Lr(e){g===null&&(p===null&&Qn(),Zn()),le&&Xn()}function Pr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function U(e,t){var n=g;n!==null&&(n.f&X)!==0&&(e|=X);var r={ctx:P,deps:null,nodes:null,f:e|S|L,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&we)!==0)$e!==null?$e.push(r):re.ensure().schedule(r);else if(t!==null){try{xe(r)}catch(o){throw B(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&fe)===0&&(i=i.first,(e&J)!==0&&(e&De)!==0&&i!==null&&(i.f|=De))}if(i!==null&&(i.parent=n,n!==null&&Pr(i,n),p!==null&&(p.f&E)!==0&&(e&K)===0)){var s=p;(s.effects??=[]).push(i)}return r}function dt(){return p!==null&&!H}function sn(e){const t=U(Me,null);return $(t,T),t.teardown=e,t}function Mr(e){Lr();var t=g.f,n=!p&&(t&V)!==0&&(t&Z)===0;if(n){var r=P;(r.e??=[]).push(e)}else return ln(e)}function ln(e){return U(we|Wn,e)}function Dr(e){re.ensure();const t=U(K|fe,e);return()=>{B(t)}}function Ir(e){re.ensure();const t=U(K|fe,e);return(n={})=>new Promise(r=>{n.outro?Ve(t,()=>{B(t),r(void 0)}):(B(t),r(void 0))})}function jr(e){return U(we,e)}function Fr(e){return U(Ze|fe,e)}function on(e,t=0){return U(Me|t,e)}function Ue(e,t=[],n=[],r=[]){br(r,t,n,i=>{U(Me,()=>e(...i.map(k)))})}function qr(e,t=0){var n=U(J|t,e);return n}function de(e){return U(V|fe,e)}function an(e){var t=e.teardown;if(t!==null){const n=le,r=p;cn(!0),R(null);try{t.call(null)}finally{cn(n),R(r)}}}function vt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&ht(()=>{i.abort(z)});var r=n.next;(n.f&K)!==0?n.parent=null:B(n,t),n=r}}function Br(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&V)===0&&B(t),t=n}}function B(e,t=!0){var n=!1;(t||(e.f&zn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Hr(e.nodes.start,e.nodes.end),n=!0),$(e,Rt),vt(e,t&&!n),Ce(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();an(e),e.f^=Rt,e.f|=F;var i=e.parent;i!==null&&i.first!==null&&fn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Hr(e,t){for(;e!==null;){var n=e===t?null:se(e);e.remove(),e=n}}function fn(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 Ve(e,t,n=!0){var r=[];un(e,r,!0);var i=()=>{n&&B(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var l of r)l.out(o)}else i()}function un(e,t,n){if((e.f&X)===0){e.f^=X;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&De)!==0||(i.f&V)!==0&&(e.f&J)!==0;un(i,t,o?n:!1),i=s}}}function Yr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:se(n);t.append(n),n=i}}let ze=!1,le=!1;function cn(e){le=e}let p=null,H=!1;function R(e){p=e}let g=null;function D(e){g=e}let I=null;function Ur(e){p!==null&&(I===null?I=[e]:I.push(e))}let O=null,C=0,j=null;function Vr(e){j=e}let hn=1,ve=0,_e=ve;function dn(e){_e=e}function vn(){return++hn}function Oe(e){var t=e.f;if((t&S)!==0)return!0;if(t&E&&(e.f&=~ue),(t&Y)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Oe(s)&&Kt(s),s.wv>e.wv)return!0}(t&L)!==0&&q===null&&$(e,T)}return!1}function _n(e,t,n=!0){var r=e.reactions;if(r!==null&&!(I!==null&&me.call(I,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&E)!==0?_n(s,t,!1):t===s&&(n?$(s,S):(s.f&T)!==0&&$(s,Y),st(s))}}function pn(e){var t=O,n=C,r=j,i=p,s=I,o=P,l=H,f=_e,a=e.f;O=null,C=0,j=null,p=(a&(V|K))===0?e:null,I=null,be(e.ctx),H=!1,_e=++ve,e.ac!==null&&(ht(()=>{e.ac.abort(z)}),e.ac=null);try{e.f|=Xe;var u=e.fn,h=u();e.f|=Z;var c=e.deps,d=w?.is_fork;if(O!==null){var v;if(d||Ce(e,C),c!==null&&C>0)for(c.length=C+O.length,v=0;v<O.length;v++)c[C+v]=O[v];else e.deps=c=O;if(dt()&&(e.f&L)!==0)for(v=C;v<c.length;v++)(c[v].reactions??=[]).push(e)}else!d&&c!==null&&C<c.length&&(Ce(e,C),c.length=C);if(jt()&&j!==null&&!H&&c!==null&&(e.f&(E|Y|S))===0)for(v=0;v<j.length;v++)_n(j[v],e);if(i!==null&&i!==e){if(ve++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=ve;if(t!==null)for(const m of t)m.rv=ve;j!==null&&(r===null?r=j:r.push(...j))}return(e.f&Q)!==0&&(e.f^=Q),h}catch(m){return qt(m)}finally{e.f^=Xe,O=t,C=n,j=r,p=i,I=s,be(o),H=l,_e=f}}function zr(e,t){let n=t.reactions;if(n!==null){var r=Fn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&E)!==0&&(O===null||!me.call(O,t))){var s=t;(s.f&L)!==0&&(s.f^=L,s.f&=~ue),nt(s),Sr(s),Ce(s,0)}}function Ce(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)zr(e,n[r])}function xe(e){var t=e.f;if((t&F)===0){$(e,T);var n=g,r=ze;g=e,ze=!0;try{(t&(J|At))!==0?Br(e):vt(e),an(e);var i=pn(e);e.teardown=typeof i=="function"?i:null,e.wv=hn;var s;In&&cr&&(e.f&S)!==0&&e.deps}finally{ze=r,g=n}}}function k(e){var t=e.f,n=(t&E)!==0;if(p!==null&&!H){var r=g!==null&&(g.f&F)!==0;if(!r&&(I===null||!me.call(I,e))){var i=p.deps;if((p.f&Xe)!==0)e.rv<ve&&(e.rv=ve,O===null&&i!==null&&i[C]===e?C++:O===null?O=[e]:O.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:me.call(s,p)||s.push(p)}}}if(le&&ie.has(e))return ie.get(e);if(n){var o=e;if(le){var l=o.v;return((o.f&T)===0&&o.reactions!==null||mn(o))&&(l=ot(o)),ie.set(o,l),l}var f=(o.f&L)===0&&!H&&p!==null&&(ze||(p.f&L)!==0),a=(o.f&Z)===0;Oe(o)&&(f&&(o.f|=L),Kt(o)),f&&!a&&(Xt(o),gn(o))}if(q?.has(e))return q.get(e);if((e.f&Q)!==0)throw e.v;return e.v}function gn(e){if(e.f|=L,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&E)!==0&&(t.f&L)===0&&(Xt(t),gn(t))}function mn(e){if(e.v===N)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ie.has(t)||(t.f&E)!==0&&mn(t))return!0;return!1}function wn(e){var t=H;try{return H=!0,e()}finally{H=t}}const We=Symbol("events"),Wr=new Set,yn=new Set;function Gr(e,t,n,r={}){function i(s){if(r.capture||_t.call(t,s),!s.cancelBubble)return ht(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?he(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Jr(e,t,n,r,i){var s={capture:r,passive:i},o=Gr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&sn(()=>{t.removeEventListener(e,o,s)})}let bn=null;function _t(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;bn=e;var o=0,l=bn===e&&e[We];if(l){var f=i.indexOf(l);if(f!==-1&&(t===document||t===window)){e[We]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(o=f)}if(s=i[o]||e.target,s!==t){Pe(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=p,h=g;R(null),D(null);try{for(var c,d=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var m=s[We]?.[r];m!=null&&(!s.disabled||e.target===s)&&m.call(s,e)}catch(_){c?d.push(_):c=_}if(e.cancelBubble||v===t||v===null)break;s=v}if(c){for(let _ of d)queueMicrotask(()=>{throw _});throw c}}finally{e[We]=t,delete e.currentTarget,R(u),D(h)}}}const Kr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Xr(e){return Kr?.createHTML(e)??e}function Zr(e){var t=ct("template");return t.innerHTML=Xr(e.replaceAll("<!>","<!---->")),t.content}function pt(e,t){var n=g;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Qr(e,t){var n=(t&Dn)!==0,r,i=!e.startsWith("<!>");return()=>{if(y)return pt(b,null),b;r===void 0&&(r=Zr(i?e:"<!>"+e),r=Ye(r));var s=n||tn?document.importNode(r,!0):r.cloneNode(!0);return pt(s,s),s}}function $n(e,t){if(y){var n=g;((n.f&Z)===0||n.nodes.end===null)&&(n.nodes.end=b),Lt();return}e!==null&&e.before(t)}const ei=["touchstart","touchmove"];function ti(e){return ei.includes(e)}function En(e,t){return Tn(e,t)}function ni(e,t){ft(),t.intro=t.intro??!1;const n=t.target,r=y,i=b;try{for(var s=Ye(n);s&&(s.nodeType!==Qe||s.data!==yt);)s=se(s);if(!s)throw Ne;ye(!0),ee(s);const o=Tn(e,{...t,anchor:s});return ye(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==Ne&&console.warn("Failed to hydrate: ",o),t.recover===!1&&tr(),ft(),Cr(n),ye(!1),En(e,t)}finally{ye(r),ee(i)}}const Ge=new Map;function Tn(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:l}){ft();var f=void 0,a=Ir(()=>{var u=n??t.appendChild(He());wr(u,{pending:()=>{}},d=>{Dt({});var v=P;if(s&&(v.c=s),i&&(r.$$events=i),y&&pt(d,null),f=e(d,r)||{},y&&(g.nodes.end=b,b===null||b.nodeType!==Qe||b.data!==Et))throw et(),Ne;It()},l);var h=new Set,c=d=>{for(var v=0;v<d.length;v++){var m=d[v];if(!h.has(m)){h.add(m);var _=ti(m);for(const oe of[t,document]){var A=Ge.get(oe);A===void 0&&(A=new Map,Ge.set(oe,A));var x=A.get(m);x===void 0?(oe.addEventListener(m,_t,{passive:_}),A.set(m,1)):A.set(m,x+1)}}}};return c(qn(Wr)),yn.add(c),()=>{for(var d of h)for(const _ of[t,document]){var v=Ge.get(_),m=v.get(d);--m==0?(_.removeEventListener(d,_t),v.delete(d),v.size===0&&Ge.delete(_)):v.set(d,m)}yn.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return gt.set(f,a),f}let gt=new WeakMap;function ri(e,t){const n=gt.get(e);return n?(gt.delete(e),n(t)):Promise.resolve()}function ii(e,t){jr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=ct("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function si(e,t,n){var r=""+e;return r}function li(e,t,n,r,i,s){var o=e.__className;if(y||o!==n||o===void 0){var l=si(n);(!y||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):e.className=l),e.__className=n}return s}const oi=Symbol("is custom element"),ai=Symbol("is html"),fi=Jn?"link":"LINK";function ui(e,t,n,r){var i=ci(e);y&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===fi)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Gn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&xn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function pe(e,t,n){var r=p,i=g;let s=y;y&&ye(!1),R(null),D(null);try{t!=="style"&&(mt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?xn(e).includes(t):n&&typeof n=="object")?e[t]=n:ui(e,t,n==null?n:String(n))}finally{R(r),D(i),s&&ye(!0)}}function ci(e){return e.__attributes??={[oi]:e.nodeName.includes("-"),[ai]:e.namespaceURI===Tt}}var mt=new Map;function xn(e){var t=e.getAttribute("is")||e.nodeName,n=mt.get(t);if(n)return n;mt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Bn(i);for(var o in r)r[o].set&&n.push(o);i=xt(i)}return n}function ke(e,t,n,r){var i=(n&Pn)!==0,s=(n&Mn)!==0,o=r,l=!0,f=()=>(l&&(l=!1,o=s?wn(r):r),o);let a;if(i){var u=Ie in e||Ct in e;a=ae(e,t)?.set??(u&&t in e?x=>e[t]=x:void 0)}var h,c=!1;i?[h,c]=vr(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=f(),a&&(nr(),a(h)));var d;if(d=()=>{var x=e[t];return x===void 0?f():(l=!0,x)},(n&Ln)===0)return d;if(a){var v=e.$$legacy;return(function(x,oe){return arguments.length>0?((!oe||v||c)&&a(oe?d():x),x):d()})}var m=!1,_=((n&kn)!==0?lt:Tr)(()=>(m=!1,d()));i&&k(_);var A=g;return(function(x,oe){if(arguments.length>0){const Cn=oe?k(_):i?Te(x):x;return M(_,Cn),m=!0,o!==void 0&&(o=Cn),x}return le&&m||(A.f&F)!==0?_.v:k(_)})}function hi(e){return new di(e)}class di{#e;#n;constructor(t){var n=new Map,r=(s,o)=>{var l=Ar(o,!1,!1);return n.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return k(n.get(o)??r(o,Reflect.get(s,o)))},has(s,o){return o===Ct?!0:(k(n.get(o)??r(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,l){return M(n.get(o)??r(o,l),l),Reflect.set(s,o,l)}});this.#n=(t.hydrate?ni:En)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Ee(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Pe(this,s,{get(){return this.#n[s]},set(o){this.#n[s]=o},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ri(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Nn;typeof HTMLElement=="function"&&(Nn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=ct("slot");r!=="default"&&(s.name=r),$n(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=vi(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]=Je(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=hi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Dr(()=>{on(()=>{this.$$r=!0;for(const r of Le(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Je(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]=Je(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 Le(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Je(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 vi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function _i(e,t,n,r,i,s){let o=class extends Nn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Le(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Le(t).forEach(l=>{Pe(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=Je(l,f,t),this.$$d[l]=f;var a=this.$$c;if(a){var u=ae(a,l)?.get;u?a[l]=f:a.$set({[l]:f})}}})}),r.forEach(l=>{Pe(o.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=o,o}const Sn={version:"0.66.1"};var ge={},An;function pi(){if(An)return ge;An=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.LanguageTranslator=void 0,ge.getChildStyleToPass=e,ge.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(c){return Object.keys(r).includes(c.name)}))===null||o===void 0)&&o.length))for(var f=function(c){var d=i?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});d&&(l+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var h=u[a];f(h)}}catch(c){console.error("error getting child style to pass",c)}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 f=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(f+"-",""),"/").concat(o)}document.head.appendChild(l)}catch(a){console.warn(a)}}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 f="",a=r.getDefaultLang();if(!o||a!==o){var u=s?.[a];u?.[i]&&(f=u[i])}return f},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 ge.LanguageTranslator=n,ge}var Rn=pi(),gi=Qr('<div id="compocontainer" class="svelte-11p6sry"><div id="list" class="svelte-11p6sry"><hb-messages-list></hb-messages-list></div> <div id="prompt" class="svelte-11p6sry"><hb-messages-send></hb-messages-send></div></div>',2);const mi={hash:"svelte-11p6sry",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
+ @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;display:block;overflow:hidden;height:fit-content;min-height:100px;}#compocontainer.svelte-11p6sry {display:grid;grid-template-areas:"messages" "prompt";overflow:hidden;grid-template-rows:1fr 180px;height:100%;min-height:200px;}#list.svelte-11p6sry {overflow-y:auto;grid-area:messages;min-height:0;height:100%;}#list.svelte-11p6sry hb-messages-list:where(.svelte-11p6sry) {height:100%;display:block;}#prompt.svelte-11p6sry {grid-area:prompt;width:90%;max-width:1600px;margin:0 auto;}.msglist.svelte-11p6sry {width:90%;max-width:1400px;margin:0 auto;}`};function On(e,t){Dt(t,!0),ii(e,mi);function n(_,A){t.$$host.dispatchEvent(new CustomEvent(_,{detail:A}))}let r=ke(t,"id",7,""),i=ke(t,"messages",7),s=ke(t,"authors",7),o=ke(t,"options",7),l=ke(t,"message",23,()=>({text:""})),f=G("");Mr(()=>{if(typeof l()=="string")try{l(JSON.parse(l())),M(f,l()?.text?l().text:"",!0)}catch(_){console.error("error parsing message",_)}});function a(_){if(!_?.file&&!_?.text)return console.warn("no message to received",_);n("sendMessage",_),M(f,_.text,!0),M(f,"")}Rn.addComponent({repoName:"@htmlbricks/hb-messages-list",version:Sn.version}),Rn.addComponent({repoName:"@htmlbricks/hb-messages-send",version:Sn.version});var u={get id(){return r()},set id(_=""){r(_),Ee()},get messages(){return i()},set messages(_){i(_),Ee()},get authors(){return s()},set authors(_){s(_),Ee()},get options(){return o()},set options(_){o(_),Ee()},get message(){return l()},set message(_={text:""}){l(_),Ee()}},h=gi(),c=ut(h),d=ut(c);pe(d,"id","message-list"),Ue(()=>pe(d,"messages",i())),Ue(()=>pe(d,"authors",s())),Ue(()=>pe(d,"options",o())),li(d,1,"msglist svelte-11p6sry"),pe(d,"part","msglist"),tt(c);var v=Or(c,2),m=ut(v);return Ue(()=>pe(m,"text",k(f))),pe(m,"part","msgsend"),tt(v),tt(h),Jr("sendMessage",m,_=>a(_.detail)),$n(e,h),It(u)}customElements.define("hb-messages-box",_i(On,{id:{},messages:{},authors:{},options:{},message:{}},[],[],{mode:"open"})),wt.Component=On,Object.defineProperty(wt,Symbol.toStringTag,{value:"Module"})})(this["messages-box"]=this["messages-box"]||{});
4
4
  //# sourceMappingURL=main.iife.js.map