@htmlbricks/hb-messages-send 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 +4 -4
- package/main.iife.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(_i){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const we=1,_e=2,ki=4,Gr=8,Ir=16,Hr=1,Fr=4,Ur=8,Yr=16,qr=2,$i="[",ke="[!",We="]",Vt={},D=Symbol(),Wr="http://www.w3.org/1999/xhtml",ji=!1;var Ei=Array.isArray,Vr=Array.prototype.indexOf,Ve=Array.from,$e=Object.keys,je=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,Kr=Object.getOwnPropertyDescriptors,Jr=Object.prototype,Xr=Array.prototype,Ai=Object.getPrototypeOf,Ri=Object.isExtensible;function Zr(t){for(var e=0;e<t.length;e++)t[e]()}function zi(){var t,e,i=new Promise((r,n)=>{t=r,e=n});return{promise:i,resolve:t,reject:e}}const G=2,Ee=4,Ke=8,ut=16,xt=32,Et=64,Ae=128,at=512,I=1024,V=2048,ht=4096,J=8192,At=16384,Je=32768,Kt=65536,Ti=1<<17,Xe=1<<18,Lt=1<<19,Qr=1<<20,se=32768,Ze=1<<21,Qe=1<<22,Rt=1<<23,pe=Symbol("$state"),Si=Symbol("legacy props"),tn=Symbol(""),Jt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ti=3,Pt=8;function en(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function rn(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function nn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function on(t){throw new Error("https://svelte.dev/e/effect_orphan")}function vn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function an(){throw new Error("https://svelte.dev/e/hydration_failed")}function ln(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function pn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function mn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Re(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function dn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let w=!1;function lt(t){w=t}let k;function H(t){if(t===null)throw Re(),Vt;return k=t}function ze(){return H(et(k))}function B(t){if(w){if(et(k)!==null)throw Re(),Vt;k=t}}function Ci(t=1){if(w){for(var e=t,i=k;e--;)i=et(i);k=i}}function Te(t=!0){for(var e=0,i=k;;){if(i.nodeType===Pt){var r=i.data;if(r===We){if(e===0)return i;e-=1}else(r===$i||r===ke)&&(e+=1)}var n=et(i);t&&i.remove(),i=n}}function Mi(t){if(!t||t.nodeType!==Pt)throw Re(),Vt;return t.data}function Bi(t){return t===this.v}function gn(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ni(t){return!gn(t,this.v)}let fn=!1,Q=null;function Xt(t){Q=t}function Oi(t,e=!1,i){Q={p:Q,i:!1,c:null,e:null,s:t,x:null,l:null}}function Li(t){var e=Q,i=e.e;if(i!==null){e.e=null;for(var r of i)nr(r)}return t!==void 0&&(e.x=t),e.i=!0,Q=e.p,t??{}}function Pi(){return!0}let Dt=[];function Di(){var t=Dt;Dt=[],Zr(t)}function Zt(t){if(Dt.length===0&&!be){var e=Dt;queueMicrotask(()=>{e===Dt&&Di()})}Dt.push(t)}function cn(){for(;Dt.length>0;)Di()}function Gi(t){var e=$;if(e===null)return _.f|=Rt,t;if((e.f&Je)===0){if((e.f&Ae)===0)throw t;e.b.error(t)}else Qt(t,e)}function Qt(t,e){for(;e!==null;){if((e.f&Ae)!==0)try{e.b.error(t);return}catch(i){t=i}e=e.parent}throw t}const Se=new Set;let T=null,Ce=null,X=null,pt=[],Me=null,ei=!1,be=!1;class st{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#i=0;#r=0;#l=null;#v=[];#a=[];skipped_effects=new Set;is_fork=!1;process(e){pt=[],Ce=null,this.apply();var i={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of e)this.#n(r,i);this.is_fork||this.#s(),this.#r>0||this.is_fork?(this.#o(i.effects),this.#o(i.render_effects),this.#o(i.block_effects)):(Ce=this,T=null,Hi(i.render_effects),Hi(i.effects),Ce=null,this.#l?.resolve()),X=null}#n(e,i){e.f^=I;for(var r=e.first;r!==null;){var n=r.f,o=(n&(xt|Et))!==0,v=o&&(n&I)!==0,a=v||(n&J)!==0||this.skipped_effects.has(r);if((r.f&Ae)!==0&&r.b?.is_pending()&&(i={parent:i,effect:r,effects:[],render_effects:[],block_effects:[]}),!a&&r.fn!==null){o?r.f^=I:(n&Ee)!==0?i.effects.push(r):fe(r)&&((r.f&ut)!==0&&i.block_effects.push(r),ce(r));var l=r.first;if(l!==null){r=l;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)s===i.effect&&(this.#o(i.effects),this.#o(i.render_effects),this.#o(i.block_effects),i=i.parent),r=s.next,s=s.parent}}#o(e){for(const i of e)((i.f&V)!==0?this.#v:this.#a).push(i),Y(i,I)}capture(e,i){this.previous.has(e)||this.previous.set(e,i),(e.f&Rt)===0&&(this.current.set(e,e.v),X?.set(e,e.v))}activate(){T=this,this.apply()}deactivate(){T=null,X=null}flush(){if(this.activate(),pt.length>0){if(Ii(),T!==null&&T!==this)return}else this.#i===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#s(){if(this.#r===0){for(const e of this.#e)e();this.#e.clear()}this.#i===0&&this.#p()}#p(){if(Se.size>1){this.previous.clear();var e=X,i=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of Se){if(n===this){i=!1;continue}const o=[];for(const[a,l]of this.current){if(n.current.has(a))if(i&&l!==n.current.get(a))n.current.set(a,l);else continue;o.push(a)}if(o.length===0)continue;const v=[...n.current.keys()].filter(a=>!this.current.has(a));if(v.length>0){const a=new Set,l=new Map;for(const s of o)Fi(s,v,a,l);if(pt.length>0){T=n,n.apply();for(const s of pt)n.#n(s,r);pt=[],n.deactivate()}}}T=null,X=e}this.committed=!0,Se.delete(this)}increment(e){this.#i+=1,e&&(this.#r+=1)}decrement(e){this.#i-=1,e&&(this.#r-=1),this.revive()}revive(){for(const e of this.#v)Y(e,V),It(e);for(const e of this.#a)Y(e,ht),It(e);this.#v=[],this.#a=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#l??=zi()).promise}static ensure(){if(T===null){const e=T=new st;Se.add(T),be||st.enqueue(()=>{T===e&&e.flush()})}return T}static enqueue(e){Zt(e)}apply(){}}function Gt(t){var e=be;be=!0;try{for(var i;;){if(cn(),pt.length===0&&(T?.flush(),pt.length===0))return Me=null,i;Ii()}}finally{be=e}}function Ii(){var t=Ft;ei=!0;try{var e=0;for(mr(!0);pt.length>0;){var i=st.ensure();if(e++>1e3){var r,n;un()}i.process(pt),zt.clear()}}finally{ei=!1,mr(t),Me=null}}function un(){try{vn()}catch(t){Qt(t,Me)}}let yt=null;function Hi(t){var e=t.length;if(e!==0){for(var i=0;i<e;){var r=t[i++];if((r.f&(At|J))===0&&fe(r)&&(yt=new Set,ce(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?lr(r):r.fn=null),yt?.size>0)){zt.clear();for(const n of yt){if((n.f&(At|J))!==0)continue;const o=[n];let v=n.parent;for(;v!==null;)yt.has(v)&&(yt.delete(v),o.push(v)),v=v.parent;for(let a=o.length-1;a>=0;a--){const l=o[a];(l.f&(At|J))===0&&ce(l)}}yt.clear()}}yt=null}}function Fi(t,e,i,r){if(!i.has(t)&&(i.add(t),t.reactions!==null))for(const n of t.reactions){const o=n.f;(o&G)!==0?Fi(n,e,i,r):(o&(Qe|ut))!==0&&(o&V)===0&&Ui(n,e,r)&&(Y(n,V),It(n))}}function Ui(t,e,i){const r=i.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const n of t.deps){if(e.includes(n))return!0;if((n.f&G)!==0&&Ui(n,e,i))return i.set(n,!0),!0}return i.set(t,!1),!1}function It(t){for(var e=Me=t;e.parent!==null;){e=e.parent;var i=e.f;if(ei&&e===$&&(i&ut)!==0&&(i&Xe)===0)return;if((i&(Et|xt))!==0){if((i&I)===0)return;e.f^=I}}pt.push(e)}function xn(t){let e=0,i=Ht(0),r;return()=>{Oe()&&(f(i),Le(()=>(e===0&&(r=Ge(()=>t(()=>me(i)))),e+=1,()=>{Zt(()=>{e-=1,e===0&&(r?.(),r=void 0,me(i))})})))}}var hn=Kt|Lt|Ae;function yn(t,e,i){new wn(t,e,i)}class wn{parent;#e=!1;#t;#i=w?k:null;#r;#l;#v;#a=null;#n=null;#o=null;#s=null;#p=null;#d=0;#b=0;#g=!1;#m=null;#h=xn(()=>(this.#m=Ht(this.#d),()=>{this.#m=null}));constructor(e,i,r){this.#t=e,this.#r=i,this.#l=r,this.parent=$.b,this.#e=!!this.#r.pending,this.#v=Pe(()=>{if($.b=this,w){const o=this.#i;ze(),o.nodeType===Pt&&o.data===ke?this.#w():this.#y()}else{var n=this.#u();try{this.#a=it(()=>r(n))}catch(o){this.error(o)}this.#b>0?this.#c():this.#e=!1}return()=>{this.#p?.remove()}},hn),w&&(this.#t=k)}#y(){try{this.#a=it(()=>this.#l(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#r.pending;e&&(this.#n=it(()=>e(this.#t)),st.enqueue(()=>{var i=this.#u();this.#a=this.#f(()=>(st.ensure(),it(()=>this.#l(i)))),this.#b>0?this.#c():(ee(this.#n,()=>{this.#n=null}),this.#e=!1)}))}#u(){var e=this.#t;return this.#e&&(this.#p=tt(),this.#t.before(this.#p),e=this.#p),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#f(e){var i=$,r=_,n=Q;gt(this.#v),K(this.#v),Xt(this.#v.ctx);try{return e()}catch(o){return Gi(o),null}finally{gt(i),K(r),Xt(n)}}#c(){const e=this.#r.pending;this.#a!==null&&(this.#s=document.createDocumentFragment(),this.#s.append(this.#p),br(this.#a,this.#s)),this.#n===null&&(this.#n=it(()=>e(this.#t)))}#x(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(e);return}this.#b+=e,this.#b===0&&(this.#e=!1,this.#n&&ee(this.#n,()=>{this.#n=null}),this.#s&&(this.#t.before(this.#s),this.#s=null))}update_pending_count(e){this.#x(e),this.#d+=e,this.#m&&te(this.#m,this.#d)}get_effect_pending(){return this.#h(),f(this.#m)}error(e){var i=this.#r.onerror;let r=this.#r.failed;if(this.#g||!i&&!r)throw e;this.#a&&(U(this.#a),this.#a=null),this.#n&&(U(this.#n),this.#n=null),this.#o&&(U(this.#o),this.#o=null),w&&(H(this.#i),Ci(),H(Te()));var n=!1,o=!1;const v=()=>{if(n){dn();return}n=!0,o&&mn(),st.ensure(),this.#d=0,this.#o!==null&&ee(this.#o,()=>{this.#o=null}),this.#e=this.has_pending_snippet(),this.#a=this.#f(()=>(this.#g=!1,it(()=>this.#l(this.#t)))),this.#b>0?this.#c():this.#e=!1};var a=_;try{K(null),o=!0,i?.(e,v),o=!1}catch(l){Qt(l,this.#v&&this.#v.parent)}finally{K(a)}r&&Zt(()=>{this.#o=this.#f(()=>{st.ensure(),this.#g=!0;try{return it(()=>{r(this.#t,()=>e,()=>v)})}catch(l){return Qt(l,this.#v.parent),null}finally{this.#g=!1}})})}}function _n(t,e,i,r){const n=ii;if(i.length===0&&t.length===0){r(e.map(n));return}var o=T,v=$,a=kn();function l(){Promise.all(i.map(s=>$n(s))).then(s=>{a();try{r([...e.map(n),...s])}catch(m){(v.f&At)===0&&Qt(m,v)}o?.deactivate(),Be()}).catch(s=>{Qt(s,v)})}t.length>0?Promise.all(t).then(()=>{a();try{return l()}finally{o?.deactivate(),Be()}}):l()}function kn(){var t=$,e=_,i=Q,r=T;return function(o=!0){gt(t),K(e),Xt(i),o&&r?.activate()}}function Be(){gt(null),K(null),Xt(null)}function ii(t){var e=G|V,i=_!==null&&(_.f&G)!==0?_:null;return $!==null&&($.f|=Lt),{ctx:Q,deps:null,effects:null,equals:Bi,f:e,fn:t,reactions:null,rv:0,v:D,wv:0,parent:i??$,ac:null}}function $n(t,e){let i=$;i===null&&en();var r=i.b,n=void 0,o=Ht(D),v=!_,a=new Map;return Nn(()=>{var l=zi();n=l.promise;try{Promise.resolve(t()).then(l.resolve,l.reject).then(()=>{s===T&&s.committed&&s.deactivate(),Be()})}catch(p){l.reject(p),Be()}var s=T;if(v){var m=!r.is_pending();r.update_pending_count(1),s.increment(m),a.get(s)?.reject(Jt),a.delete(s),a.set(s,l)}const c=(p,g=void 0)=>{if(s.activate(),g)g!==Jt&&(o.f|=Rt,te(o,g));else{(o.f&Rt)!==0&&(o.f^=Rt),te(o,p);for(const[d,y]of a){if(a.delete(d),d===s)break;y.reject(Jt)}}v&&(r.update_pending_count(-1),s.decrement(m))};l.promise.then(c,p=>c(null,p||"unknown"))}),rr(()=>{for(const l of a.values())l.reject(Jt)}),new Promise(l=>{function s(m){function c(){m===n?l(o):s(n)}m.then(c,c)}s(n)})}function Yi(t){const e=ii(t);return e.equals=Ni,e}function qi(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)U(e[i])}}function jn(t){for(var e=t.parent;e!==null;){if((e.f&G)===0)return e;e=e.parent}return null}function ri(t){var e,i=$;gt(jn(t));try{t.f&=~se,qi(t),e=xr(t)}finally{gt(i)}return e}function Wi(t){var e=ri(t);if(t.equals(e)||(t.v=e,t.wv=cr()),!Ut)if(X!==null)Oe()&&X.set(t,t.v);else{var i=(t.f&at)===0?ht:I;Y(t,i)}}let ni=new Set;const zt=new Map;let Vi=!1;function Ht(t,e){var i={f:0,v:t,reactions:null,equals:Bi,rv:0,wv:0};return i}function F(t,e){const i=Ht(t);return Pn(i),i}function Ki(t,e=!1,i=!0){const r=Ht(t);return e||(r.equals=Ni),r}function S(t,e,i=!1){_!==null&&(!dt||(_.f&Ti)!==0)&&Pi()&&(_.f&(G|ut|Qe|Ti))!==0&&!kt?.includes(t)&&bn();let r=i?wt(e):e;return te(t,r)}function te(t,e){if(!t.equals(e)){var i=t.v;Ut?zt.set(t,e):zt.set(t,i),t.v=e;var r=st.ensure();r.capture(t,i),(t.f&G)!==0&&((t.f&V)!==0&&ri(t),Y(t,(t.f&at)!==0?I:ht)),t.wv=cr(),Ji(t,V),$!==null&&($.f&I)!==0&&($.f&(xt|Et))===0&&(rt===null?Dn([t]):rt.push(t)),!r.is_fork&&ni.size>0&&!Vi&&En()}return e}function En(){Vi=!1;const t=Array.from(ni);for(const e of t)(e.f&I)!==0&&Y(e,ht),fe(e)&&ce(e);ni.clear()}function me(t){S(t,t.v+1)}function Ji(t,e){var i=t.reactions;if(i!==null)for(var r=i.length,n=0;n<r;n++){var o=i[n],v=o.f,a=(v&V)===0;if(a&&Y(o,e),(v&G)!==0){var l=o;X?.delete(l),(v&se)===0&&(v&at&&(o.f|=se),Ji(l,ht))}else a&&((v&ut)!==0&&yt!==null&&yt.add(o),It(o))}}function wt(t){if(typeof t!="object"||t===null||pe in t)return t;const e=Ai(t);if(e!==Jr&&e!==Xr)return t;var i=new Map,r=Ei(t),n=F(0),o=Yt,v=a=>{if(Yt===o)return a();var l=_,s=Yt;K(null),fr(o);var m=a();return K(l),fr(s),m};return r&&i.set("length",F(t.length)),new Proxy(t,{defineProperty(a,l,s){(!("value"in s)||s.configurable===!1||s.enumerable===!1||s.writable===!1)&&sn();var m=i.get(l);return m===void 0?m=v(()=>{var c=F(s.value);return i.set(l,c),c}):S(m,s.value,!0),!0},deleteProperty(a,l){var s=i.get(l);if(s===void 0){if(l in a){const m=v(()=>F(D));i.set(l,m),me(n)}}else S(s,D),me(n);return!0},get(a,l,s){if(l===pe)return t;var m=i.get(l),c=l in a;if(m===void 0&&(!c||Ot(a,l)?.writable)&&(m=v(()=>{var g=wt(c?a[l]:D),d=F(g);return d}),i.set(l,m)),m!==void 0){var p=f(m);return p===D?void 0:p}return Reflect.get(a,l,s)},getOwnPropertyDescriptor(a,l){var s=Reflect.getOwnPropertyDescriptor(a,l);if(s&&"value"in s){var m=i.get(l);m&&(s.value=f(m))}else if(s===void 0){var c=i.get(l),p=c?.v;if(c!==void 0&&p!==D)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return s},has(a,l){if(l===pe)return!0;var s=i.get(l),m=s!==void 0&&s.v!==D||Reflect.has(a,l);if(s!==void 0||$!==null&&(!m||Ot(a,l)?.writable)){s===void 0&&(s=v(()=>{var p=m?wt(a[l]):D,g=F(p);return g}),i.set(l,s));var c=f(s);if(c===D)return!1}return m},set(a,l,s,m){var c=i.get(l),p=l in a;if(r&&l==="length")for(var g=s;g<c.v;g+=1){var d=i.get(g+"");d!==void 0?S(d,D):g in a&&(d=v(()=>F(D)),i.set(g+"",d))}if(c===void 0)(!p||Ot(a,l)?.writable)&&(c=v(()=>F(void 0)),S(c,wt(s)),i.set(l,c));else{p=c.v!==D;var y=v(()=>wt(s));S(c,y)}var u=Reflect.getOwnPropertyDescriptor(a,l);if(u?.set&&u.set.call(m,s),!p){if(r&&typeof l=="string"){var C=i.get("length"),j=Number(l);Number.isInteger(j)&&j>=C.v&&S(C,j+1)}me(n)}return!0},ownKeys(a){f(n);var l=Reflect.ownKeys(a).filter(c=>{var p=i.get(c);return p===void 0||p.v!==D});for(var[s,m]of i)m.v!==D&&!(s in a)&&l.push(s);return l},setPrototypeOf(){pn()}})}var Xi,Zi,Qi,tr;function oi(){if(Xi===void 0){Xi=window,Zi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Qi=Ot(e,"firstChild").get,tr=Ot(e,"nextSibling").get,Ri(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ri(i)&&(i.__t=void 0)}}function tt(t=""){return document.createTextNode(t)}function Tt(t){return Qi.call(t)}function et(t){return tr.call(t)}function N(t,e){if(!w)return Tt(t);var i=Tt(k);if(i===null)i=k.appendChild(tt());else if(e&&i.nodeType!==ti){var r=tt();return i?.before(r),H(r),r}return H(i),i}function An(t,e=!1){if(!w){var i=Tt(t);return i instanceof Comment&&i.data===""?et(i):i}if(e&&k?.nodeType!==ti){var r=tt();return k?.before(r),H(r),r}return k}function bt(t,e=1,i=!1){let r=w?k:t;for(var n;e--;)n=r,r=et(r);if(!w)return r;if(i&&r?.nodeType!==ti){var o=tt();return r===null?n?.after(o):r.before(o),H(o),o}return H(r),r}function vi(t){t.textContent=""}function er(){return!1}function Rn(t){w&&Tt(t)!==null&&vi(t)}let ir=!1;function zn(){ir||(ir=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Ne(t){var e=_,i=$;K(null),gt(null);try{return t()}finally{K(e),gt(i)}}function Tn(t,e,i,r=i){t.addEventListener(e,()=>Ne(i));const n=t.__on_r;n?t.__on_r=()=>{n(),r(!0)}:t.__on_r=()=>r(!0),zn()}function Sn(t){$===null&&(_===null&&on(),nn()),Ut&&rn()}function Cn(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function mt(t,e,i,r=!0){var n=$;n!==null&&(n.f&J)!==0&&(t|=J);var o={ctx:Q,deps:null,nodes_start:null,nodes_end:null,f:t|V|at,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(i)try{ce(o),o.f|=Je}catch(l){throw U(o),l}else e!==null&&It(o);if(r){var v=o;if(i&&v.deps===null&&v.teardown===null&&v.nodes_start===null&&v.first===v.last&&(v.f&Lt)===0&&(v=v.first,(t&ut)!==0&&(t&Kt)!==0&&v!==null&&(v.f|=Kt)),v!==null&&(v.parent=n,n!==null&&Cn(v,n),_!==null&&(_.f&G)!==0&&(t&Et)===0)){var a=_;(a.effects??=[]).push(v)}}return o}function Oe(){return _!==null&&!dt}function rr(t){const e=mt(Ke,null,!1);return Y(e,I),e.teardown=t,e}function de(t){Sn();var e=$.f,i=!_&&(e&xt)!==0&&(e&Je)===0;if(i){var r=Q;(r.e??=[]).push(t)}else return nr(t)}function nr(t){return mt(Ee|Qr,t,!1)}function Mn(t){st.ensure();const e=mt(Et|Lt,t,!0);return()=>{U(e)}}function Bn(t){st.ensure();const e=mt(Et|Lt,t,!0);return(i={})=>new Promise(r=>{i.outro?ee(e,()=>{U(e),r(void 0)}):(U(e),r(void 0))})}function or(t){return mt(Ee,t,!1)}function Nn(t){return mt(Qe|Lt,t,!0)}function Le(t,e=0){return mt(Ke|e,t,!0)}function _t(t,e=[],i=[],r=[],n=!1){_n(r,e,i,o=>{mt(n?Ee:Ke,()=>t(...o.map(f)),!0)})}function Pe(t,e=0){var i=mt(ut|e,t,!0);return i}function it(t,e=!0){return mt(xt|Lt,t,!0,e)}function vr(t){var e=t.teardown;if(e!==null){const i=Ut,r=_;dr(!0),K(null);try{e.call(null)}finally{dr(i),K(r)}}}function ar(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){const n=i.ac;n!==null&&Ne(()=>{n.abort(Jt)});var r=i.next;(i.f&Et)!==0?i.parent=null:U(i,e),i=r}}function On(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&xt)===0&&U(e),e=i}}function U(t,e=!0){var i=!1;(e||(t.f&Xe)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Ln(t.nodes_start,t.nodes_end),i=!0),ar(t,e&&!i),De(t,0),Y(t,At);var r=t.transitions;if(r!==null)for(const o of r)o.stop();vr(t);var n=t.parent;n!==null&&n.first!==null&&lr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function Ln(t,e){for(;t!==null;){var i=t===e?null:et(t);t.remove(),t=i}}function lr(t){var e=t.parent,i=t.prev,r=t.next;i!==null&&(i.next=r),r!==null&&(r.prev=i),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=i))}function ee(t,e,i=!0){var r=[];ai(t,r,!0),sr(r,()=>{i&&U(t),e&&e()})}function sr(t,e){var i=t.length;if(i>0){var r=()=>--i||e();for(var n of t)n.out(r)}else e()}function ai(t,e,i){if((t.f&J)===0){if(t.f^=J,t.transitions!==null)for(const v of t.transitions)(v.is_global||i)&&e.push(v);for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Kt)!==0||(r.f&xt)!==0&&(t.f&ut)!==0;ai(r,e,o?i:!1),r=n}}}function li(t){pr(t,!0)}function pr(t,e){if((t.f&J)!==0){t.f^=J,(t.f&I)===0&&(Y(t,V),It(t));for(var i=t.first;i!==null;){var r=i.next,n=(i.f&Kt)!==0||(i.f&xt)!==0;pr(i,n?e:!1),i=r}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}function br(t,e){for(var i=t.nodes_start,r=t.nodes_end;i!==null;){var n=i===r?null:et(i);e.append(i),i=n}}let Ft=!1;function mr(t){Ft=t}let Ut=!1;function dr(t){Ut=t}let _=null,dt=!1;function K(t){_=t}let $=null;function gt(t){$=t}let kt=null;function Pn(t){_!==null&&(kt===null?kt=[t]:kt.push(t))}let q=null,Z=0,rt=null;function Dn(t){rt=t}let gr=1,ge=0,Yt=ge;function fr(t){Yt=t}function cr(){return++gr}function fe(t){var e=t.f;if((e&V)!==0)return!0;if(e&G&&(t.f&=~se),(e&ht)!==0){var i=t.deps;if(i!==null)for(var r=i.length,n=0;n<r;n++){var o=i[n];if(fe(o)&&Wi(o),o.wv>t.wv)return!0}(e&at)!==0&&X===null&&Y(t,I)}return!1}function ur(t,e,i=!0){var r=t.reactions;if(r!==null&&!kt?.includes(t))for(var n=0;n<r.length;n++){var o=r[n];(o.f&G)!==0?ur(o,e,!1):e===o&&(i?Y(o,V):(o.f&I)!==0&&Y(o,ht),It(o))}}function xr(t){var e=q,i=Z,r=rt,n=_,o=kt,v=Q,a=dt,l=Yt,s=t.f;q=null,Z=0,rt=null,_=(s&(xt|Et))===0?t:null,kt=null,Xt(t.ctx),dt=!1,Yt=++ge,t.ac!==null&&(Ne(()=>{t.ac.abort(Jt)}),t.ac=null);try{t.f|=Ze;var m=t.fn,c=m(),p=t.deps;if(q!==null){var g;if(De(t,Z),p!==null&&Z>0)for(p.length=Z+q.length,g=0;g<q.length;g++)p[Z+g]=q[g];else t.deps=p=q;if(Ft&&Oe()&&(t.f&at)!==0)for(g=Z;g<p.length;g++)(p[g].reactions??=[]).push(t)}else p!==null&&Z<p.length&&(De(t,Z),p.length=Z);if(Pi()&&rt!==null&&!dt&&p!==null&&(t.f&(G|ht|V))===0)for(g=0;g<rt.length;g++)ur(rt[g],t);return n!==null&&n!==t&&(ge++,rt!==null&&(r===null?r=rt:r.push(...rt))),(t.f&Rt)!==0&&(t.f^=Rt),c}catch(d){return Gi(d)}finally{t.f^=Ze,q=e,Z=i,rt=r,_=n,kt=o,Xt(v),dt=a,Yt=l}}function Gn(t,e){let i=e.reactions;if(i!==null){var r=Vr.call(i,t);if(r!==-1){var n=i.length-1;n===0?i=e.reactions=null:(i[r]=i[n],i.pop())}}i===null&&(e.f&G)!==0&&(q===null||!q.includes(e))&&(Y(e,ht),(e.f&at)!==0&&(e.f^=at,e.f&=~se),qi(e),De(e,0))}function De(t,e){var i=t.deps;if(i!==null)for(var r=e;r<i.length;r++)Gn(t,i[r])}function ce(t){var e=t.f;if((e&At)===0){Y(t,I);var i=$,r=Ft;$=t,Ft=!0;try{(e&ut)!==0?On(t):ar(t),vr(t);var n=xr(t);t.teardown=typeof n=="function"?n:null,t.wv=gr;var o;ji&&fn&&(t.f&V)!==0&&t.deps}finally{Ft=r,$=i}}}async function In(){await Promise.resolve(),Gt()}function f(t){var e=t.f,i=(e&G)!==0;if(_!==null&&!dt){var r=$!==null&&($.f&At)!==0;if(!r&&!kt?.includes(t)){var n=_.deps;if((_.f&Ze)!==0)t.rv<ge&&(t.rv=ge,q===null&&n!==null&&n[Z]===t?Z++:q===null?q=[t]:q.includes(t)||q.push(t));else{(_.deps??=[]).push(t);var o=t.reactions;o===null?t.reactions=[_]:o.includes(_)||o.push(_)}}}if(Ut){if(zt.has(t))return zt.get(t);if(i){var v=t,a=v.v;return((v.f&I)===0&&v.reactions!==null||yr(v))&&(a=ri(v)),zt.set(v,a),a}}else if(i){if(v=t,X?.has(v))return X.get(v);fe(v)&&Wi(v),Ft&&Oe()&&(v.f&at)===0&&hr(v)}else if(X?.has(t))return X.get(t);if((t.f&Rt)!==0)throw t.v;return t.v}function hr(t){if(t.deps!==null){t.f^=at;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&G)!==0&&(e.f&at)===0&&hr(e)}}function yr(t){if(t.v===D)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(zt.has(e)||(e.f&G)!==0&&yr(e))return!0;return!1}function Ge(t){var e=dt;try{return dt=!0,t()}finally{dt=e}}const Hn=-7169;function Y(t,e){t.f=t.f&Hn|e}const wr=new Set,si=new Set;function Fn(t,e,i,r={}){function n(o){if(r.capture||ue.call(e,o),!o.cancelBubble)return Ne(()=>i?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Zt(()=>{e.addEventListener(t,n,r)}):e.addEventListener(t,n,r),n}function Un(t,e,i,r,n){var o={capture:r,passive:n},v=Fn(t,e,i,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&rr(()=>{e.removeEventListener(t,v,o)})}function Yn(t){for(var e=0;e<t.length;e++)wr.add(t[e]);for(var i of si)i(t)}let _r=null;function ue(t){var e=this,i=e.ownerDocument,r=t.type,n=t.composedPath?.()||[],o=n[0]||t.target;_r=t;var v=0,a=_r===t&&t.__root;if(a){var l=n.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var s=n.indexOf(e);if(s===-1)return;l<=s&&(v=l)}if(o=n[v]||t.target,o!==e){je(t,"currentTarget",{configurable:!0,get(){return o||i}});var m=_,c=$;K(null),gt(null);try{for(var p,g=[];o!==null;){var d=o.assignedSlot||o.parentNode||o.host||null;try{var y=o["__"+r];y!=null&&(!o.disabled||t.target===o)&&y.call(o,t)}catch(u){p?g.push(u):p=u}if(t.cancelBubble||d===e||d===null)break;o=d}if(p){for(let u of g)queueMicrotask(()=>{throw u});throw p}}finally{t.__root=e,delete t.currentTarget,K(m),gt(c)}}}function qn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function xe(t,e){var i=$;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function ft(t,e){var i=(e&qr)!==0,r,n=!t.startsWith("<!>");return()=>{if(w)return xe(k,null),k;r===void 0&&(r=qn(n?t:"<!>"+t),r=Tt(r));var o=i||Zi?document.importNode(r,!0):r.cloneNode(!0);return xe(o,o),o}}function Wn(){if(w)return xe(k,null),k;var t=document.createDocumentFragment(),e=document.createComment(""),i=tt();return t.append(e,i),xe(e,i),t}function nt(t,e){if(w){$.nodes_end=k,ze();return}t!==null&&t.before(e)}const Vn=["touchstart","touchmove"];function Kn(t){return Vn.includes(t)}function Ie(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function kr(t,e){return $r(t,e)}function Jn(t,e){oi(),e.intro=e.intro??!1;const i=e.target,r=w,n=k;try{for(var o=Tt(i);o&&(o.nodeType!==Pt||o.data!==$i);)o=et(o);if(!o)throw Vt;lt(!0),H(o);const v=$r(t,{...e,anchor:o});return lt(!1),v}catch(v){if(v instanceof Error&&v.message.split(`
|
|
2
|
-
`).some(
|
|
3
|
-
\r\f \v\uFEFF`];function ro(t,e,i){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),i){for(var n in i)if(i[n])r=r?r+" "+n:n;else if(r.length)for(var o=n.length,v=0;(v=r.indexOf(n,v))>=0;){var a=v+o;(v===0||Ar.includes(r[v-1]))&&(a===r.length||Ar.includes(r[a]))?r=(v===0?"":r.substring(0,v))+r.substring(a+1):v=a}}return r===""?null:r}function no(t,e){return t==null?null:String(t)}function ne(t,e,i,r,n,o){var v=t.__className;if(w||v!==i||v===void 0){var a=ro(i,r,o);(!w||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):t.className=a),t.__className=i}else if(o&&n!==o)for(var l in o){var s=!!o[l];(n==null||s!==!!n[l])&&t.classList.toggle(l,s)}return o}function He(t,e,i,r){var n=t.__style;if(w||n!==e){var o=no(e);(!w||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}return r}const oo=Symbol("is custom element"),vo=Symbol("is html");function oe(t,e,i,r){var n=ao(t);w&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||n[e]!==(n[e]=i)&&(e==="loading"&&(t[tn]=i),i==null?t.removeAttribute(e):typeof i!="string"&&lo(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ao(t){return t.__attributes??={[oo]:t.nodeName.includes("-"),[vo]:t.namespaceURI===Wr}}var Rr=new Map;function lo(t){var e=t.getAttribute("is")||t.nodeName,i=Rr.get(e);if(i)return i;Rr.set(e,i=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=Kr(n);for(var v in r)r[v].set&&i.push(v);n=Ai(n)}return i}function so(t,e,i=e){var r=new WeakSet;Tn(t,"input",async n=>{var o=n?t.defaultValue:t.value;if(o=di(t)?gi(o):o,i(o),T!==null&&r.add(T),await In(),o!==(o=e())){var v=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=o??"",a!==null){var s=t.value.length;v===a&&a===l&&s>l?(t.selectionStart=s,t.selectionEnd=s):(t.selectionStart=v,t.selectionEnd=Math.min(a,s))}}}),(w&&t.defaultValue!==t.value||Ge(e)==null&&t.value)&&(i(di(t)?gi(t.value):t.value),T!==null&&r.add(T)),Le(()=>{var n=e();if(t===document.activeElement){var o=Ce??T;if(r.has(o))return}di(t)&&n===gi(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}function di(t){var e=t.type;return e==="number"||e==="range"}function gi(t){return t===""?null:+t}function zr(t,e){return t===e||t?.[pe]===e}function Tr(t={},e,i,r){return or(()=>{var n,o;return Le(()=>{n=o,o=[],Ge(()=>{t!==i(...o)&&(e(t,...o),n&&zr(i(...n),t)&&e(null,...n))})}),()=>{Zt(()=>{o&&zr(i(...o),t)&&e(null,...o)})}}),t}let Fe=!1;function po(t){var e=Fe;try{return Fe=!1,[t(),Fe]}finally{Fe=e}}function he(t,e,i,r){var n=(i&Ur)!==0,o=(i&Yr)!==0,v=r,a=!0,l=()=>(a&&(a=!1,v=o?Ge(r):r),v),s;if(n){var m=pe in t||Si in t;s=Ot(t,e)?.set??(m&&e in t?j=>t[e]=j:void 0)}var c,p=!1;n?[c,p]=po(()=>t[e]):c=t[e],c===void 0&&r!==void 0&&(c=l(),s&&(ln(),s(c)));var g;if(g=()=>{var j=t[e];return j===void 0?l():(a=!0,j)},(i&Fr)===0)return g;if(s){var d=t.$$legacy;return(function(j,L){return arguments.length>0?((!L||d||p)&&s(L?g():j),j):g()})}var y=!1,u=((i&Hr)!==0?ii:Yi)(()=>(y=!1,g()));n&&f(u);var C=$;return(function(j,L){if(arguments.length>0){const W=L?f(u):n?wt(j):j;return S(u,W),y=!0,v!==void 0&&(v=W),j}return Ut&&y||(C.f&At)!==0?u.v:f(u)})}function bo(t){return new mo(t)}class mo{#e;#t;constructor(e){var i=new Map,r=(o,v)=>{var a=Ki(v,!1,!1);return i.set(o,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(o,v){return f(i.get(v)??r(v,Reflect.get(o,v)))},has(o,v){return v===Si?!0:(f(i.get(v)??r(v,Reflect.get(o,v))),Reflect.has(o,v))},set(o,v,a){return S(i.get(v)??r(v,a),a),Reflect.set(o,v,a)}});this.#t=(e.hydrate?Jn:kr)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Gt(),this.#e=n.$$events;for(const o of Object.keys(this.#t))o==="$set"||o==="$destroy"||o==="$on"||je(this,o,{get(){return this.#t[o]},set(v){this.#t[o]=v},enumerable:!0});this.#t.$set=o=>{Object.assign(n,o)},this.#t.$destroy=()=>{Xn(this.#t)}}$set(e){this.#t.$set(e)}$on(e,i){this.#e[e]=this.#e[e]||[];const r=(...n)=>i.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}}let Sr;typeof HTMLElement=="function"&&(Sr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return n=>{const o=document.createElement("slot");r!=="default"&&(o.name=r),nt(n,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},i=go(this);for(const r of this.$$s)r in i&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const n=this.$$g_p(r.name);n in this.$$d||(this.$$d[n]=Ue(n,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=bo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Mn(()=>{Le(()=>{this.$$r=!0;for(const r of $e(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const n=Ue(r,this.$$d[r],this.$$p_d,"toAttribute");n==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,n)}this.$$r=!1})});for(const r in this.$$l)for(const n of this.$$l[r]){const o=this.$$c.$on(r,n);this.$$l_u.set(n,o)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ue(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return $e(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ue(t,e,i,r){const n=i[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!i[t])return e;if(r==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function go(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}function fo(t,e,i,r,n,o){let v=class extends Sr{constructor(){super(t,i,n),this.$$p_d=e}static get observedAttributes(){return $e(e).map(a=>(e[a].attribute||a).toLowerCase())}};return $e(e).forEach(a=>{je(v.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Ue(a,l,e),this.$$d[a]=l;var s=this.$$c;if(s){var m=Ot(s,a)?.get;m?s[a]=l:s.$set({[a]:l})}}})}),r.forEach(a=>{je(v.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=v,v}var qt={},Cr;function co(){if(Cr)return qt;Cr=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.LanguageTranslator=void 0,qt.getChildStyleToPass=t,qt.addComponent=e;function t(r,n){var o,v,a="";try{if(r&&n?.length&&(!((o=Object.keys(r))===null||o===void 0)&&o.length)&&(!((v=n?.filter(function(p){return Object.keys(r).includes(p.name)}))===null||v===void 0)&&v.length))for(var l=function(p){var g=n?.filter(function(d){return d.name===p&&d.defaultValue!==r[p]});g&&(a+="".concat(p,":").concat(r[p],";"))},s=0,m=Object.keys(r);s<m.length;s++){var c=m[s];l(c)}}catch(p){console.error("error getting child style to pass",p)}finally{return a}}function e(r){var n,o=((n=r?.repoName.split("/"))===null||n===void 0?void 0:n[1])||r?.repoName;if(!o)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var v=r?.iifePath||"main.iife.js";if(!document.getElementById(o+"-script"))try{var a=document.createElement("script");if(a.id=o+"-script",a.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(v),r?.local)a.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var l=o.split("-")[0];a.src="http://localhost:6006/webcomponents/".concat(o.replace(l+"-",""),"/").concat(v)}document.head.appendChild(a)}catch(s){console.warn(s)}}var i=(function(){function r(n){if(this.lang="",!n?.dictionary)throw new Error("no dictionary provided");this.dictionary=n.dictionary,this.setLang(n?.lang)}return r.prototype.setLang=function(n){n||(n=r.getDefaultLang()),this.lang=n},r.prototype.translateWord=function(n,o){return r.getDictionaryWord(n,this.dictionary,o||this.lang)},r.prototype.translateDate=function(n,o,v){return r.formatDate(n,o,v||this.lang)},r.getDefaultLang=function(){var n,o,v,a="en";return navigator?.languages&&(!((v=(o=(n=navigator.languages[0])===null||n===void 0?void 0:n.split("-")[0])===null||o===void 0?void 0:o.toLowerCase())===null||v===void 0)&&v.length)&&(a=navigator.languages[0].split("-")[0].toLowerCase()),a},r.getDictionaryWord=function(n,o,v){var a;if(!n)throw new Error("no wordKey provided");if(!o)throw new Error("no dictionary provided");if(v&&(!((a=o[v])===null||a===void 0)&&a[n]))return o[v][n];var l="",s=r.getDefaultLang();if(!v||s!==v){var m=o?.[s];m?.[n]&&(l=m[n])}return l},r.formatDate=function(n,o,v){if(!n)throw new Error("no date provided");if(typeof n.getMonth!="function")throw new Error("wrong date format");var a=new Intl.DateTimeFormat(v||r.getDefaultLang(),o);return a.format(n)},r})();return qt.LanguageTranslator=i,qt}co();var uo=ft('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1p3vbiv"/>'),xo=ft('<img class="file-image svelte-1p3vbiv"/>'),ho=ft("<i></i>"),yo=ft('<div class="col-6 col-md-4 col-lg-3 svelte-1p3vbiv"><div class="file-card svelte-1p3vbiv"><div class="file-preview svelte-1p3vbiv"><!></div> <div class="file-details svelte-1p3vbiv"><div class="file-name svelte-1p3vbiv"> </div> <div class="file-meta svelte-1p3vbiv"><span class="file-size svelte-1p3vbiv"> </span></div></div> <button type="button" class="btn btn-sm btn-outline-danger remove-file-btn svelte-1p3vbiv" aria-label="Remove file" title="Remove file"><i class="bi bi-x svelte-1p3vbiv"></i></button></div></div>'),wo=ft('<div id="files-display" class="svelte-1p3vbiv"><div class="row g-2 svelte-1p3vbiv"></div></div>'),_o=ft('<button id="maximize-button" type="button"><i></i></button>'),ko=ft('<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger svelte-1p3vbiv"> <span class="visually-hidden svelte-1p3vbiv">selected files</span></span>'),$o=ft('<label id="upload-file" class="btn file-button btn-sm position-relative svelte-1p3vbiv" style="--tag-color: var(--bs-primary, #007bff)"><input type="file" class="svelte-1p3vbiv"/> <i class="bi bi-paperclip svelte-1p3vbiv"></i> <!></label>'),jo=ft('<button type="button"><i></i> </button>'),Eo=ft('<div id="chat-container" class="svelte-1p3vbiv"><div id="chat-box" class="svelte-1p3vbiv"><!> <div id="textarea-container" class="svelte-1p3vbiv"><textarea id="send-message-text" placeholder="Type your message..."></textarea> <!></div> <div id="buttons-container" class="svelte-1p3vbiv"><div id="left-buttons" class="svelte-1p3vbiv"><!> <!></div> <div id="right-buttons" class="svelte-1p3vbiv"><button type="button" id="send-message-button" aria-label="Send message" class="svelte-1p3vbiv"><i class="bi bi-send-fill svelte-1p3vbiv"></i></button></div></div></div></div>');const Ao={hash:"svelte-1p3vbiv",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
|
1
|
+
(function(wi){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const _i=1,ki=2,$i=4,Pr=8,Dr=16,Gr=1,Ir=4,Hr=8,Fr=16,Ur=2,ji="[",he="[!",qe="]",Wt={},O=Symbol(),Yr="http://www.w3.org/1999/xhtml",We=!1;var Ei=Array.isArray,qr=Array.prototype.indexOf,Ve=Array.from,ye=Object.keys,we=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,Wr=Object.getOwnPropertyDescriptors,Vr=Object.prototype,Kr=Array.prototype,Ai=Object.getPrototypeOf,Ri=Object.isExtensible;function Jr(t){for(var e=0;e<t.length;e++)t[e]()}function zi(){var t,e,i=new Promise((r,o)=>{t=r,e=o});return{promise:i,resolve:t,reject:e}}const N=2,Ke=4,Je=8,ft=16,ct=32,Et=64,_e=128,nt=512,L=1024,U=2048,ut=4096,q=8192,xt=16384,ke=32768,Vt=65536,Ti=1<<17,Xe=1<<18,Nt=1<<19,Xr=1<<20,Ot=32768,Ze=1<<21,Qe=1<<22,At=1<<23,ae=Symbol("$state"),Si=Symbol("legacy props"),Zr=Symbol(""),Kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ti=3,Lt=8;function Qr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function tn(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function en(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function rn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function on(){throw new Error("https://svelte.dev/e/hydration_failed")}function vn(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function an(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ln(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function pn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function $e(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function bn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let h=!1;function ot(t){h=t}let _;function P(t){if(t===null)throw $e(),Wt;return _=t}function je(){return P(Q(_))}function M(t){if(h){if(Q(_)!==null)throw $e(),Wt;_=t}}function Ci(t=1){if(h){for(var e=t,i=_;e--;)i=Q(i);_=i}}function Ee(t=!0){for(var e=0,i=_;;){if(i.nodeType===Lt){var r=i.data;if(r===qe){if(e===0)return i;e-=1}else(r===ji||r===he)&&(e+=1)}var o=Q(i);t&&i.remove(),i=o}}function Mi(t){if(!t||t.nodeType!==Lt)throw $e(),Wt;return t.data}function Bi(t){return t===this.v}function mn(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ni(t){return!mn(t,this.v)}let dn=!1,J=null;function Jt(t){J=t}function Oi(t,e=!1,i){J={p:J,i:!1,c:null,e:null,s:t,x:null,l:null}}function Li(t){var e=J,i=e.e;if(i!==null){e.e=null;for(var r of i)or(r)}return t!==void 0&&(e.x=t),e.i=!0,J=e.p,t??{}}function Pi(){return!0}let Pt=[];function Di(){var t=Pt;Pt=[],Jr(t)}function Xt(t){if(Pt.length===0&&!le){var e=Pt;queueMicrotask(()=>{e===Pt&&Di()})}Pt.push(t)}function gn(){for(;Pt.length>0;)Di()}function Gi(t){var e=k;if(e===null)return y.f|=At,t;if((e.f&ke)===0){if((e.f&_e)===0)throw t;e.b.error(t)}else Zt(t,e)}function Zt(t,e){for(;e!==null;){if((e.f&_e)!==0)try{e.b.error(t);return}catch(i){t=i}e=e.parent}throw t}const Ae=new Set;let R=null,Re=null,X=null,Z=[],ze=null,ei=!1,le=!1;class vt{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#i=0;#r=0;#l=null;#o=[];#n=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(e){Z=[],Re=null,this.apply();var i={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of e)this.#v(r,i);this.is_fork||this.#p(),this.is_deferred()?(this.#a(i.effects),this.#a(i.render_effects),this.#a(i.block_effects)):(Re=this,R=null,Hi(i.render_effects),Hi(i.effects),Re=null,this.#l?.resolve()),X=null}#v(e,i){e.f^=L;for(var r=e.first;r!==null;){var o=r.f,n=(o&(ct|Et))!==0,v=n&&(o&L)!==0,l=v||(o&q)!==0||this.skipped_effects.has(r);if((r.f&_e)!==0&&r.b?.is_pending()&&(i={parent:i,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){n?r.f^=L:(o&Ke)!==0?i.effects.push(r):me(r)&&((r.f&ft)!==0&&i.block_effects.push(r),de(r));var a=r.first;if(a!==null){r=a;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)s===i.effect&&(this.#a(i.effects),this.#a(i.render_effects),this.#a(i.block_effects),i=i.parent),r=s.next,s=s.parent}}#a(e){for(const i of e)((i.f&U)!==0?this.#o:this.#n).push(i),this.#s(i.deps),G(i,L)}#s(e){if(e!==null)for(const i of e)(i.f&N)===0||(i.f&Ot)===0||(i.f^=Ot,this.#s(i.deps))}capture(e,i){this.previous.has(e)||this.previous.set(e,i),(e.f&At)===0&&(this.current.set(e,e.v),X?.set(e,e.v))}activate(){R=this,this.apply()}deactivate(){R===this&&(R=null,X=null)}flush(){if(this.activate(),Z.length>0){if(Ii(),R!==null&&R!==this)return}else this.#i===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#p(){if(this.#r===0){for(const e of this.#e)e();this.#e.clear()}this.#i===0&&this.#b()}#b(){if(Ae.size>1){this.previous.clear();var e=X,i=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of Ae){if(n===this){i=!1;continue}const v=[];for(const[a,s]of this.current){if(n.current.has(a))if(i&&s!==n.current.get(a))n.current.set(a,s);else continue;v.push(a)}if(v.length===0)continue;const l=[...n.current.keys()].filter(a=>!this.current.has(a));if(l.length>0){var o=Z;Z=[];const a=new Set,s=new Map;for(const m of v)Fi(m,l,a,s);if(Z.length>0){R=n,n.apply();for(const m of Z)n.#v(m,r);n.deactivate()}Z=o}}R=null,X=e}this.committed=!0,Ae.delete(this)}increment(e){this.#i+=1,e&&(this.#r+=1)}decrement(e){this.#i-=1,e&&(this.#r-=1),this.revive()}revive(){for(const e of this.#o)G(e,U),Gt(e);for(const e of this.#n)G(e,ut),Gt(e);this.#o=[],this.#n=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#l??=zi()).promise}static ensure(){if(R===null){const e=R=new vt;Ae.add(R),le||vt.enqueue(()=>{R===e&&e.flush()})}return R}static enqueue(e){Xt(e)}apply(){}}function Dt(t){var e=le;le=!0;try{for(var i;;){if(gn(),Z.length===0&&(R?.flush(),Z.length===0))return ze=null,i;Ii()}}finally{le=e}}function Ii(){var t=Tt;ei=!0;var e=null;try{var i=0;for(Ne(!0);Z.length>0;){var r=vt.ensure();if(i++>1e3){var o,n;fn()}r.process(Z),Rt.clear()}}finally{ei=!1,Ne(t),ze=null}}function fn(){try{nn()}catch(t){Zt(t,ze)}}let ht=null;function Hi(t){var e=t.length;if(e!==0){for(var i=0;i<e;){var r=t[i++];if((r.f&(xt|q))===0&&me(r)&&(ht=new Set,de(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?sr(r):r.fn=null),ht?.size>0)){Rt.clear();for(const o of ht){if((o.f&(xt|q))!==0)continue;const n=[o];let v=o.parent;for(;v!==null;)ht.has(v)&&(ht.delete(v),n.push(v)),v=v.parent;for(let l=n.length-1;l>=0;l--){const a=n[l];(a.f&(xt|q))===0&&de(a)}}ht.clear()}}ht=null}}function Fi(t,e,i,r){if(!i.has(t)&&(i.add(t),t.reactions!==null))for(const o of t.reactions){const n=o.f;(n&N)!==0?Fi(o,e,i,r):(n&(Qe|ft))!==0&&(n&U)===0&&Ui(o,e,r)&&(G(o,U),Gt(o))}}function Ui(t,e,i){const r=i.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const o of t.deps){if(e.includes(o))return!0;if((o.f&N)!==0&&Ui(o,e,i))return i.set(o,!0),!0}return i.set(t,!1),!1}function Gt(t){for(var e=ze=t;e.parent!==null;){e=e.parent;var i=e.f;if(ei&&e===k&&(i&ft)!==0&&(i&Xe)===0)return;if((i&(Et|ct))!==0){if((i&L)===0)return;e.f^=L}}Z.push(e)}function cn(t){let e=0,i=It(0),r;return()=>{Ce()&&(g(i),Me(()=>(e===0&&(r=Le(()=>t(()=>se(i)))),e+=1,()=>{Xt(()=>{e-=1,e===0&&(r?.(),r=void 0,se(i))})})))}}var un=Vt|Nt|_e;function xn(t,e,i){new hn(t,e,i)}class hn{parent;#e=!1;#t;#i=h?_:null;#r;#l;#o;#n=null;#v=null;#a=null;#s=null;#p=null;#b=0;#m=0;#g=!1;#d=null;#h=cn(()=>(this.#d=It(this.#b),()=>{this.#d=null}));constructor(e,i,r){this.#t=e,this.#r=i,this.#l=r,this.parent=k.b,this.#e=!!this.#r.pending,this.#o=Be(()=>{if(k.b=this,h){const n=this.#i;je(),n.nodeType===Lt&&n.data===he?this.#w():this.#y()}else{var o=this.#u();try{this.#n=tt(()=>r(o))}catch(n){this.error(n)}this.#m>0?this.#c():this.#e=!1}return()=>{this.#p?.remove()}},un),h&&(this.#t=_)}#y(){try{this.#n=tt(()=>this.#l(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#r.pending;e&&(this.#v=tt(()=>e(this.#t)),vt.enqueue(()=>{var i=this.#u();this.#n=this.#f(()=>(vt.ensure(),tt(()=>this.#l(i)))),this.#m>0?this.#c():(te(this.#v,()=>{this.#v=null}),this.#e=!1)}))}#u(){var e=this.#t;return this.#e&&(this.#p=W(),this.#t.before(this.#p),e=this.#p),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#f(e){var i=k,r=y,o=J;bt(this.#o),Y(this.#o),Jt(this.#o.ctx);try{return e()}catch(n){return Gi(n),null}finally{bt(i),Y(r),Jt(o)}}#c(){const e=this.#r.pending;this.#n!==null&&(this.#s=document.createDocumentFragment(),this.#s.append(this.#p),mr(this.#n,this.#s)),this.#v===null&&(this.#v=tt(()=>e(this.#t)))}#x(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(e);return}this.#m+=e,this.#m===0&&(this.#e=!1,this.#v&&te(this.#v,()=>{this.#v=null}),this.#s&&(this.#t.before(this.#s),this.#s=null))}update_pending_count(e){this.#x(e),this.#b+=e,this.#d&&Qt(this.#d,this.#b)}get_effect_pending(){return this.#h(),g(this.#d)}error(e){var i=this.#r.onerror;let r=this.#r.failed;if(this.#g||!i&&!r)throw e;this.#n&&(H(this.#n),this.#n=null),this.#v&&(H(this.#v),this.#v=null),this.#a&&(H(this.#a),this.#a=null),h&&(P(this.#i),Ci(),P(Ee()));var o=!1,n=!1;const v=()=>{if(o){bn();return}o=!0,n&&pn(),vt.ensure(),this.#b=0,this.#a!==null&&te(this.#a,()=>{this.#a=null}),this.#e=this.has_pending_snippet(),this.#n=this.#f(()=>(this.#g=!1,tt(()=>this.#l(this.#t)))),this.#m>0?this.#c():this.#e=!1};var l=y;try{Y(null),n=!0,i?.(e,v),n=!1}catch(a){Zt(a,this.#o&&this.#o.parent)}finally{Y(l)}r&&Xt(()=>{this.#a=this.#f(()=>{vt.ensure(),this.#g=!0;try{return tt(()=>{r(this.#t,()=>e,()=>v)})}catch(a){return Zt(a,this.#o.parent),null}finally{this.#g=!1}})})}}function yn(t,e,i){for(var r=[],o=e.length,n=0;n<o;n++)li(e[n].e,r,!0);pr(r,()=>{var v=r.length===0&&i!==null;if(v){var l=i,a=l.parentNode;ai(a),a.append(l),t.items.clear(),at(t,e[0].prev,e[o-1].next)}for(var s=0;s<o;s++){var m=e[s];v||(t.items.delete(m.k),at(t,m.prev,m.next)),H(m.e,!v)}t.first===e[0]&&(t.first=e[0].prev)})}function Yi(t,e,i,r,o,n=null){var v=t,l=new Map,a=null,s=(e&$i)!==0,m=(e&_i)!==0,f=(e&ki)!==0;if(s){var p=t;v=h?P(zt(p)):p.appendChild(W())}h&&je();var d=null,x=qi(()=>{var T=i();return Ei(T)?T:T==null?[]:Ve(T)}),E,c=!0;function A(){wn(K,E,v,e,r),d!==null&&(E.length===0?(d.fragment?(v.before(d.fragment),d.fragment=null):si(d.effect),S.first=d.effect):te(d.effect,()=>{d=null}))}var S=Be(()=>{E=g(x);var T=E.length;let St=!1;if(h){var Yt=Mi(v)===he;Yt!==(T===0)&&(v=Ee(),P(v),ot(!1),St=!0)}for(var dt=new Set,gt=R,kt=null,He=ir(),$t=0;$t<T;$t+=1){h&&_.nodeType===Lt&&_.data===qe&&(v=_,St=!0,ot(!1));var ue=E[$t],oe=r(ue,$t),I=c?null:l.get(oe);I?(m&&Qt(I.v,ue),f?Qt(I.i,$t):I.i=$t,He&>.skipped_effects.delete(I.e)):(I=_n(c?v:null,kt,ue,oe,$t,o,e,i),c&&(I.o=!0,kt===null?a=I:kt.next=I,kt=I),l.set(oe,I)),dt.add(oe)}if(T===0&&n&&!d)if(c)d={fragment:null,effect:tt(()=>n(v))};else{var Fe=document.createDocumentFragment(),qt=W();Fe.append(qt),d={fragment:Fe,effect:tt(()=>n(qt))}}if(h&&T>0&&P(Ee()),!c)if(He){for(const[xe,Ue]of l)dt.has(xe)||gt.skipped_effects.add(Ue.e);gt.oncommit(A),gt.ondiscard(()=>{})}else A();St&&ot(!0),g(x)}),K={effect:S,items:l,first:a};c=!1,h&&(v=_)}function wn(t,e,i,r,o){var n=(r&Pr)!==0,v=e.length,l=t.items,a=t.first,s,m=null,f,p=[],d=[],x,E,c,A;if(n)for(A=0;A<v;A+=1)x=e[A],E=o(x,A),c=l.get(E),c.a?.measure(),(f??=new Set).add(c);for(A=0;A<v;A+=1){if(x=e[A],E=o(x,A),c=l.get(E),t.first??=c,!c.o){c.o=!0;var S=m?m.next:a;at(t,m,c),at(t,c,S),ii(c,S,i),m=c,p=[],d=[],a=m.next;continue}if((c.e.f&q)!==0&&(si(c.e),n&&(c.a?.unfix(),(f??=new Set).delete(c))),c!==a){if(s!==void 0&&s.has(c)){if(p.length<d.length){var K=d[0],T;m=K.prev;var St=p[0],Yt=p[p.length-1];for(T=0;T<p.length;T+=1)ii(p[T],K,i);for(T=0;T<d.length;T+=1)s.delete(d[T]);at(t,St.prev,Yt.next),at(t,m,St),at(t,Yt,K),a=K,m=Yt,A-=1,p=[],d=[]}else s.delete(c),ii(c,a,i),at(t,c.prev,c.next),at(t,c,m===null?t.first:m.next),at(t,m,c),m=c;continue}for(p=[],d=[];a!==null&&a.k!==E;)(a.e.f&q)===0&&(s??=new Set).add(a),d.push(a),a=a.next;if(a===null)continue;c=a}p.push(c),m=c,a=c.next}if(a!==null||s!==void 0){for(var dt=s===void 0?[]:Ve(s);a!==null;)(a.e.f&q)===0&&dt.push(a),a=a.next;var gt=dt.length;if(gt>0){var kt=(r&$i)!==0&&v===0?i:null;if(n){for(A=0;A<gt;A+=1)dt[A].a?.measure();for(A=0;A<gt;A+=1)dt[A].a?.fix()}yn(t,dt,kt)}}n&&Xt(()=>{if(f!==void 0)for(c of f)c.a?.apply()})}function _n(t,e,i,r,o,n,v,l){var a=(v&_i)!==0,s=(v&Dr)===0,m=a?s?Ji(i,!1,!1):It(i):i,f=(v&ki)===0?o:It(o),p={i:f,v:m,k:r,a:null,e:null,o:!1,prev:e,next:null};try{if(t===null){var d=document.createDocumentFragment();d.append(t=W())}return p.e=tt(()=>n(t,m,f,l)),e!==null&&(e.next=p),p}finally{}}function ii(t,e,i){for(var r=t.next?t.next.e.nodes_start:i,o=e?e.e.nodes_start:i,n=t.e.nodes_start;n!==null&&n!==r;){var v=Q(n);o.before(n),n=v}}function at(t,e,i){e===null?(t.first=i,t.effect.first=i&&i.e):(e.e.next&&(e.e.next.prev=null),e.next=i,e.e.next=i&&i.e),i===null?t.effect.last=e&&e.e:(i.e.prev&&(i.e.prev.next=null),i.prev=e,i.e.prev=e&&e.e)}function kn(t,e,i,r){const o=ri;if(i.length===0&&t.length===0){r(e.map(o));return}var n=R,v=k,l=$n();function a(){Promise.all(i.map(s=>jn(s))).then(s=>{l();try{r([...e.map(o),...s])}catch(m){(v.f&xt)===0&&Zt(m,v)}n?.deactivate(),Te()}).catch(s=>{Zt(s,v)})}t.length>0?Promise.all(t).then(()=>{l();try{return a()}finally{n?.deactivate(),Te()}}):a()}function $n(){var t=k,e=y,i=J,r=R;return function(n=!0){bt(t),Y(e),Jt(i),n&&r?.activate()}}function Te(){bt(null),Y(null),Jt(null)}function ri(t){var e=N|U,i=y!==null&&(y.f&N)!==0?y:null;return k!==null&&(k.f|=Nt),{ctx:J,deps:null,effects:null,equals:Bi,f:e,fn:t,reactions:null,rv:0,v:O,wv:0,parent:i??k,ac:null}}function jn(t,e){let i=k;i===null&&Qr();var r=i.b,o=void 0,n=It(O),v=!y,l=new Map;return On(()=>{var a=zi();o=a.promise;try{Promise.resolve(t()).then(a.resolve,a.reject).then(()=>{s===R&&s.committed&&s.deactivate(),Te()})}catch(p){a.reject(p),Te()}var s=R;if(v){var m=!r.is_pending();r.update_pending_count(1),s.increment(m),l.get(s)?.reject(Kt),l.delete(s),l.set(s,a)}const f=(p,d=void 0)=>{if(s.activate(),d)d!==Kt&&(n.f|=At,Qt(n,d));else{(n.f&At)!==0&&(n.f^=At),Qt(n,p);for(const[x,E]of l){if(l.delete(x),x===s)break;E.reject(Kt)}}v&&(r.update_pending_count(-1),s.decrement(m))};a.promise.then(f,p=>f(null,p||"unknown"))}),nr(()=>{for(const a of l.values())a.reject(Kt)}),new Promise(a=>{function s(m){function f(){m===o?a(n):s(o)}m.then(f,f)}s(o)})}function qi(t){const e=ri(t);return e.equals=Ni,e}function Wi(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)H(e[i])}}function En(t){for(var e=t.parent;e!==null;){if((e.f&N)===0)return(e.f&xt)===0?e:null;e=e.parent}return null}function ni(t){var e,i=k;bt(En(t));try{t.f&=~Ot,Wi(t),e=xr(t)}finally{bt(i)}return e}function Vi(t){var e=ni(t);if(t.equals(e)||(R?.is_fork||(t.v=e),t.wv=cr()),!Ht)if(X!==null)Ce()&&X.set(t,e);else{var i=(t.f&nt)===0?ut:L;G(t,i)}}let oi=new Set;const Rt=new Map;let Ki=!1;function It(t,e){var i={f:0,v:t,reactions:null,equals:Bi,rv:0,wv:0};return i}function D(t,e){const i=It(t);return Dn(i),i}function Ji(t,e=!1,i=!0){const r=It(t);return e||(r.equals=Ni),r}function z(t,e,i=!1){y!==null&&(!pt||(y.f&Ti)!==0)&&Pi()&&(y.f&(N|ft|Qe|Ti))!==0&&!_t?.includes(t)&&sn();let r=i?yt(e):e;return Qt(t,r)}function Qt(t,e){if(!t.equals(e)){var i=t.v;Ht?Rt.set(t,e):Rt.set(t,i),t.v=e;var r=vt.ensure();r.capture(t,i),(t.f&N)!==0&&((t.f&U)!==0&&ni(t),G(t,(t.f&nt)!==0?L:ut)),t.wv=cr(),Xi(t,U),k!==null&&(k.f&L)!==0&&(k.f&(ct|Et))===0&&(et===null?Gn([t]):et.push(t)),!r.is_fork&&oi.size>0&&!Ki&&An()}return e}function An(){Ki=!1;var t=Tt;Ne(!0);const e=Array.from(oi);try{for(const i of e)(i.f&L)!==0&&G(i,ut),me(i)&&de(i)}finally{Ne(t)}oi.clear()}function se(t){z(t,t.v+1)}function Xi(t,e){var i=t.reactions;if(i!==null)for(var r=i.length,o=0;o<r;o++){var n=i[o],v=n.f,l=(v&U)===0;if(l&&G(n,e),(v&N)!==0){var a=n;X?.delete(a),(v&Ot)===0&&(v&nt&&(n.f|=Ot),Xi(a,ut))}else l&&((v&ft)!==0&&ht!==null&&ht.add(n),Gt(n))}}function yt(t){if(typeof t!="object"||t===null||ae in t)return t;const e=Ai(t);if(e!==Vr&&e!==Kr)return t;var i=new Map,r=Ei(t),o=D(0),n=Ft,v=l=>{if(Ft===n)return l();var a=y,s=Ft;Y(null),fr(n);var m=l();return Y(a),fr(s),m};return r&&i.set("length",D(t.length)),new Proxy(t,{defineProperty(l,a,s){(!("value"in s)||s.configurable===!1||s.enumerable===!1||s.writable===!1)&&an();var m=i.get(a);return m===void 0?m=v(()=>{var f=D(s.value);return i.set(a,f),f}):z(m,s.value,!0),!0},deleteProperty(l,a){var s=i.get(a);if(s===void 0){if(a in l){const m=v(()=>D(O));i.set(a,m),se(o)}}else z(s,O),se(o);return!0},get(l,a,s){if(a===ae)return t;var m=i.get(a),f=a in l;if(m===void 0&&(!f||Bt(l,a)?.writable)&&(m=v(()=>{var d=yt(f?l[a]:O),x=D(d);return x}),i.set(a,m)),m!==void 0){var p=g(m);return p===O?void 0:p}return Reflect.get(l,a,s)},getOwnPropertyDescriptor(l,a){var s=Reflect.getOwnPropertyDescriptor(l,a);if(s&&"value"in s){var m=i.get(a);m&&(s.value=g(m))}else if(s===void 0){var f=i.get(a),p=f?.v;if(f!==void 0&&p!==O)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return s},has(l,a){if(a===ae)return!0;var s=i.get(a),m=s!==void 0&&s.v!==O||Reflect.has(l,a);if(s!==void 0||k!==null&&(!m||Bt(l,a)?.writable)){s===void 0&&(s=v(()=>{var p=m?yt(l[a]):O,d=D(p);return d}),i.set(a,s));var f=g(s);if(f===O)return!1}return m},set(l,a,s,m){var f=i.get(a),p=a in l;if(r&&a==="length")for(var d=s;d<f.v;d+=1){var x=i.get(d+"");x!==void 0?z(x,O):d in l&&(x=v(()=>D(O)),i.set(d+"",x))}if(f===void 0)(!p||Bt(l,a)?.writable)&&(f=v(()=>D(void 0)),z(f,yt(s)),i.set(a,f));else{p=f.v!==O;var E=v(()=>yt(s));z(f,E)}var c=Reflect.getOwnPropertyDescriptor(l,a);if(c?.set&&c.set.call(m,s),!p){if(r&&typeof a=="string"){var A=i.get("length"),S=Number(a);Number.isInteger(S)&&S>=A.v&&z(A,S+1)}se(o)}return!0},ownKeys(l){g(o);var a=Reflect.ownKeys(l).filter(f=>{var p=i.get(f);return p===void 0||p.v!==O});for(var[s,m]of i)m.v!==O&&!(s in l)&&a.push(s);return a},setPrototypeOf(){ln()}})}var Zi,Qi,tr,er;function vi(){if(Zi===void 0){Zi=window,Qi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;tr=Bt(e,"firstChild").get,er=Bt(e,"nextSibling").get,Ri(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ri(i)&&(i.__t=void 0)}}function W(t=""){return document.createTextNode(t)}function zt(t){return tr.call(t)}function Q(t){return er.call(t)}function B(t,e){if(!h)return zt(t);var i=zt(_);if(i===null)i=_.appendChild(W());else if(e&&i.nodeType!==ti){var r=W();return i?.before(r),P(r),r}return P(i),i}function Rn(t,e=!1){if(!h){var i=zt(t);return i instanceof Comment&&i.data===""?Q(i):i}if(e&&_?.nodeType!==ti){var r=W();return _?.before(r),P(r),r}return _}function lt(t,e=1,i=!1){let r=h?_:t;for(var o;e--;)o=r,r=Q(r);if(!h)return r;if(i&&r?.nodeType!==ti){var n=W();return r===null?o?.after(n):r.before(n),P(n),n}return P(r),r}function ai(t){t.textContent=""}function ir(){return!1}function zn(t){h&&zt(t)!==null&&ai(t)}let rr=!1;function Tn(){rr||(rr=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Se(t){var e=y,i=k;Y(null),bt(null);try{return t()}finally{Y(e),bt(i)}}function Sn(t,e,i,r=i){t.addEventListener(e,()=>Se(i));const o=t.__on_r;o?t.__on_r=()=>{o(),r(!0)}:t.__on_r=()=>r(!0),Tn()}function Cn(t){k===null&&(y===null&&rn(),en()),Ht&&tn()}function Mn(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function st(t,e,i){var r=k;r!==null&&(r.f&q)!==0&&(t|=q);var o={ctx:J,deps:null,nodes_start:null,nodes_end:null,f:t|U|nt,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(i)try{de(o),o.f|=ke}catch(l){throw H(o),l}else e!==null&&Gt(o);var n=o;if(i&&n.deps===null&&n.teardown===null&&n.nodes_start===null&&n.first===n.last&&(n.f&Nt)===0&&(n=n.first,(t&ft)!==0&&(t&Vt)!==0&&n!==null&&(n.f|=Vt)),n!==null&&(n.parent=r,r!==null&&Mn(n,r),y!==null&&(y.f&N)!==0&&(t&Et)===0)){var v=y;(v.effects??=[]).push(n)}return o}function Ce(){return y!==null&&!pt}function nr(t){const e=st(Je,null,!1);return G(e,L),e.teardown=t,e}function pe(t){Cn();var e=k.f,i=!y&&(e&ct)!==0&&(e&ke)===0;if(i){var r=J;(r.e??=[]).push(t)}else return or(t)}function or(t){return st(Ke|Xr,t,!1)}function Bn(t){vt.ensure();const e=st(Et|Nt,t,!0);return()=>{H(e)}}function Nn(t){vt.ensure();const e=st(Et|Nt,t,!0);return(i={})=>new Promise(r=>{i.outro?te(e,()=>{H(e),r(void 0)}):(H(e),r(void 0))})}function vr(t){return st(Ke,t,!1)}function On(t){return st(Qe|Nt,t,!0)}function Me(t,e=0){return st(Je|e,t,!0)}function wt(t,e=[],i=[],r=[]){kn(r,e,i,o=>{st(Je,()=>t(...o.map(g)),!0)})}function Be(t,e=0){var i=st(ft|e,t,!0);return i}function tt(t){return st(ct|Nt,t,!0)}function ar(t){var e=t.teardown;if(e!==null){const i=Ht,r=y;dr(!0),Y(null);try{e.call(null)}finally{dr(i),Y(r)}}}function lr(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){const o=i.ac;o!==null&&Se(()=>{o.abort(Kt)});var r=i.next;(i.f&Et)!==0?i.parent=null:H(i,e),i=r}}function Ln(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&ct)===0&&H(e),e=i}}function H(t,e=!0){var i=!1;(e||(t.f&Xe)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Pn(t.nodes_start,t.nodes_end),i=!0),lr(t,e&&!i),Oe(t,0),G(t,xt);var r=t.transitions;if(r!==null)for(const n of r)n.stop();ar(t);var o=t.parent;o!==null&&o.first!==null&&sr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function Pn(t,e){for(;t!==null;){var i=t===e?null:Q(t);t.remove(),t=i}}function sr(t){var e=t.parent,i=t.prev,r=t.next;i!==null&&(i.next=r),r!==null&&(r.prev=i),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=i))}function te(t,e,i=!0){var r=[];li(t,r,!0),pr(r,()=>{i&&H(t),e&&e()})}function pr(t,e){var i=t.length;if(i>0){var r=()=>--i||e();for(var o of t)o.out(r)}else e()}function li(t,e,i){if((t.f&q)===0){if(t.f^=q,t.transitions!==null)for(const v of t.transitions)(v.is_global||i)&&e.push(v);for(var r=t.first;r!==null;){var o=r.next,n=(r.f&Vt)!==0||(r.f&ct)!==0&&(t.f&ft)!==0;li(r,e,n?i:!1),r=o}}}function si(t){br(t,!0)}function br(t,e){if((t.f&q)!==0){t.f^=q,(t.f&L)===0&&(G(t,U),Gt(t));for(var i=t.first;i!==null;){var r=i.next,o=(i.f&Vt)!==0||(i.f&ct)!==0;br(i,o?e:!1),i=r}if(t.transitions!==null)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function mr(t,e){for(var i=t.nodes_start,r=t.nodes_end;i!==null;){var o=i===r?null:Q(i);e.append(i),i=o}}let Tt=!1;function Ne(t){Tt=t}let Ht=!1;function dr(t){Ht=t}let y=null,pt=!1;function Y(t){y=t}let k=null;function bt(t){k=t}let _t=null;function Dn(t){y!==null&&(_t===null?_t=[t]:_t.push(t))}let F=null,V=0,et=null;function Gn(t){et=t}let gr=1,be=0,Ft=be;function fr(t){Ft=t}function cr(){return++gr}function me(t){var e=t.f;if((e&U)!==0)return!0;if(e&N&&(t.f&=~Ot),(e&ut)!==0){var i=t.deps;if(i!==null)for(var r=i.length,o=0;o<r;o++){var n=i[o];if(me(n)&&Vi(n),n.wv>t.wv)return!0}(e&nt)!==0&&X===null&&G(t,L)}return!1}function ur(t,e,i=!0){var r=t.reactions;if(r!==null&&!_t?.includes(t))for(var o=0;o<r.length;o++){var n=r[o];(n.f&N)!==0?ur(n,e,!1):e===n&&(i?G(n,U):(n.f&L)!==0&&G(n,ut),Gt(n))}}function xr(t){var e=F,i=V,r=et,o=y,n=_t,v=J,l=pt,a=Ft,s=t.f;F=null,V=0,et=null,y=(s&(ct|Et))===0?t:null,_t=null,Jt(t.ctx),pt=!1,Ft=++be,t.ac!==null&&(Se(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Ze;var m=t.fn,f=m(),p=t.deps;if(F!==null){var d;if(Oe(t,V),p!==null&&V>0)for(p.length=V+F.length,d=0;d<F.length;d++)p[V+d]=F[d];else t.deps=p=F;if(Tt&&Ce()&&(t.f&nt)!==0)for(d=V;d<p.length;d++)(p[d].reactions??=[]).push(t)}else p!==null&&V<p.length&&(Oe(t,V),p.length=V);if(Pi()&&et!==null&&!pt&&p!==null&&(t.f&(N|ut|U))===0)for(d=0;d<et.length;d++)ur(et[d],t);return o!==null&&o!==t&&(be++,et!==null&&(r===null?r=et:r.push(...et))),(t.f&At)!==0&&(t.f^=At),f}catch(x){return Gi(x)}finally{t.f^=Ze,F=e,V=i,et=r,y=o,_t=n,Jt(v),pt=l,Ft=a}}function In(t,e){let i=e.reactions;if(i!==null){var r=qr.call(i,t);if(r!==-1){var o=i.length-1;o===0?i=e.reactions=null:(i[r]=i[o],i.pop())}}i===null&&(e.f&N)!==0&&(F===null||!F.includes(e))&&(G(e,ut),(e.f&nt)!==0&&(e.f^=nt,e.f&=~Ot),Wi(e),Oe(e,0))}function Oe(t,e){var i=t.deps;if(i!==null)for(var r=e;r<i.length;r++)In(t,i[r])}function de(t){var e=t.f;if((e&xt)===0){G(t,L);var i=k,r=Tt;k=t,Tt=!0;try{(e&ft)!==0?Ln(t):lr(t),ar(t);var o=xr(t);t.teardown=typeof o=="function"?o:null,t.wv=gr;var n;We&&dn&&(t.f&U)!==0&&t.deps}finally{Tt=r,k=i}}}async function Hn(){await Promise.resolve(),Dt()}function g(t){var e=t.f,i=(e&N)!==0;if(y!==null&&!pt){var r=k!==null&&(k.f&xt)!==0;if(!r&&!_t?.includes(t)){var o=y.deps;if((y.f&Ze)!==0)t.rv<be&&(t.rv=be,F===null&&o!==null&&o[V]===t?V++:F===null?F=[t]:F.includes(t)||F.push(t));else{(y.deps??=[]).push(t);var n=t.reactions;n===null?t.reactions=[y]:n.includes(y)||n.push(y)}}}if(Ht){if(Rt.has(t))return Rt.get(t);if(i){var v=t,l=v.v;return((v.f&L)===0&&v.reactions!==null||yr(v))&&(l=ni(v)),Rt.set(v,l),l}}else i&&!X?.has(t)&&(v=t,me(v)&&Vi(v),Tt&&Ce()&&(v.f&nt)===0&&hr(v));if(X?.has(t))return X.get(t);if((t.f&At)!==0)throw t.v;return t.v}function hr(t){if(t.deps!==null){t.f^=nt;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&N)!==0&&(e.f&nt)===0&&hr(e)}}function yr(t){if(t.v===O)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Rt.has(e)||(e.f&N)!==0&&yr(e))return!0;return!1}function Le(t){var e=pt;try{return pt=!0,t()}finally{pt=e}}const Fn=-7169;function G(t,e){t.f=t.f&Fn|e}const wr=new Set,pi=new Set;function Un(t,e,i,r={}){function o(n){if(r.capture||ge.call(e,n),!n.cancelBubble)return Se(()=>i?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Xt(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Yn(t,e,i,r,o){var n={capture:r,passive:o},v=Un(t,e,i,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&nr(()=>{e.removeEventListener(t,v,n)})}function qn(t){for(var e=0;e<t.length;e++)wr.add(t[e]);for(var i of pi)i(t)}let _r=null;function ge(t){var e=this,i=e.ownerDocument,r=t.type,o=t.composedPath?.()||[],n=o[0]||t.target;_r=t;var v=0,l=_r===t&&t.__root;if(l){var a=o.indexOf(l);if(a!==-1&&(e===document||e===window)){t.__root=e;return}var s=o.indexOf(e);if(s===-1)return;a<=s&&(v=a)}if(n=o[v]||t.target,n!==e){we(t,"currentTarget",{configurable:!0,get(){return n||i}});var m=y,f=k;Y(null),bt(null);try{for(var p,d=[];n!==null;){var x=n.assignedSlot||n.parentNode||n.host||null;try{var E=n["__"+r];E!=null&&(!n.disabled||t.target===n)&&E.call(n,t)}catch(c){p?d.push(c):p=c}if(t.cancelBubble||x===e||x===null)break;n=x}if(p){for(let c of d)queueMicrotask(()=>{throw c});throw p}}finally{t.__root=e,delete t.currentTarget,Y(m),bt(f)}}}function Wn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fe(t,e){var i=k;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function mt(t,e){var i=(e&Ur)!==0,r,o=!t.startsWith("<!>");return()=>{if(h)return fe(_,null),_;r===void 0&&(r=Wn(o?t:"<!>"+t),r=zt(r));var n=i||Qi?document.importNode(r,!0):r.cloneNode(!0);return fe(n,n),n}}function Vn(){if(h)return fe(_,null),_;var t=document.createDocumentFragment(),e=document.createComment(""),i=W();return t.append(e,i),fe(e,i),t}function it(t,e){if(h){var i=k;((i.f&ke)===0||i.nodes_end===null)&&(i.nodes_end=_),je();return}t!==null&&t.before(e)}const Kn=["touchstart","touchmove"];function Jn(t){return Kn.includes(t)}function Pe(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function kr(t,e){return $r(t,e)}function Xn(t,e){vi(),e.intro=e.intro??!1;const i=e.target,r=h,o=_;try{for(var n=zt(i);n&&(n.nodeType!==Lt||n.data!==ji);)n=Q(n);if(!n)throw Wt;ot(!0),P(n);const v=$r(t,{...e,anchor:n});return ot(!1),v}catch(v){if(v instanceof Error&&v.message.split(`
|
|
2
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw v;return v!==Wt&&console.warn("Failed to hydrate: ",v),e.recover===!1&&on(),vi(),ai(i),ot(!1),kr(t,e)}finally{ot(r),P(o)}}const ee=new Map;function $r(t,{target:e,anchor:i,props:r={},events:o,context:n,intro:v=!0}){vi();var l=new Set,a=f=>{for(var p=0;p<f.length;p++){var d=f[p];if(!l.has(d)){l.add(d);var x=Jn(d);e.addEventListener(d,ge,{passive:x});var E=ee.get(d);E===void 0?(document.addEventListener(d,ge,{passive:x}),ee.set(d,1)):ee.set(d,E+1)}}};a(Ve(wr)),pi.add(a);var s=void 0,m=Nn(()=>{var f=i??e.appendChild(W());return xn(f,{pending:()=>{}},p=>{if(n){Oi({});var d=J;d.c=n}if(o&&(r.$$events=o),h&&fe(p,null),s=t(p,r)||{},h&&(k.nodes_end=_,_===null||_.nodeType!==Lt||_.data!==qe))throw $e(),Wt;n&&Li()}),()=>{for(var p of l){e.removeEventListener(p,ge);var d=ee.get(p);--d===0?(document.removeEventListener(p,ge),ee.delete(p)):ee.set(p,d)}pi.delete(a),f!==i&&f.parentNode?.removeChild(f)}});return bi.set(s,m),s}let bi=new WeakMap;function Zn(t,e){const i=bi.get(t);return i?(bi.delete(t),i(e)):Promise.resolve()}class Qn{anchor;#e=new Map;#t=new Map;#i=new Map;#r=new Set;#l=!0;constructor(e,i=!0){this.anchor=e,this.#l=i}#o=()=>{var e=R;if(this.#e.has(e)){var i=this.#e.get(e),r=this.#t.get(i);if(r)si(r),this.#r.delete(i);else{var o=this.#i.get(i);o&&(this.#t.set(i,o.effect),this.#i.delete(i),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),r=o.effect)}for(const[n,v]of this.#e){if(this.#e.delete(n),n===e)break;const l=this.#i.get(v);l&&(H(l.effect),this.#i.delete(v))}for(const[n,v]of this.#t){if(n===i||this.#r.has(n))continue;const l=()=>{if(Array.from(this.#e.values()).includes(n)){var s=document.createDocumentFragment();mr(v,s),s.append(W()),this.#i.set(n,{effect:v,fragment:s})}else H(v);this.#r.delete(n),this.#t.delete(n)};this.#l||!r?(this.#r.add(n),te(v,l,!1)):l()}}};#n=e=>{this.#e.delete(e);const i=Array.from(this.#e.values());for(const[r,o]of this.#i)i.includes(r)||(H(o.effect),this.#i.delete(r))};ensure(e,i){var r=R,o=ir();if(i&&!this.#t.has(e)&&!this.#i.has(e))if(o){var n=document.createDocumentFragment(),v=W();n.append(v),this.#i.set(e,{effect:tt(()=>i(v)),fragment:n})}else this.#t.set(e,tt(()=>i(this.anchor)));if(this.#e.set(r,e),o){for(const[l,a]of this.#t)l===e?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[l,a]of this.#i)l===e?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(this.#o),r.ondiscard(this.#n)}else h&&(this.anchor=_),this.#o()}}function ie(t,e,i=!1){h&&je();var r=new Qn(t),o=i?Vt:0;function n(v,l){if(h){const s=Mi(t)===he;if(v===s){var a=Ee();P(a),r.anchor=a,ot(!1),r.ensure(v,l),ot(!0);return}}r.ensure(v,l)}Be(()=>{var v=!1;e((l,a=!0)=>{v=!0,n(a,l)}),v||n(!1,null)},o)}function to(t,e){let i=null,r=h;var o;if(h){i=_;for(var n=zt(document.head);n!==null&&(n.nodeType!==Lt||n.data!==t);)n=Q(n);if(n===null)ot(!1);else{var v=Q(n);n.remove(),P(v)}}h||(o=document.head.appendChild(W()));try{Be(()=>e(o),Xe)}finally{r&&(ot(!0),P(i))}}function eo(t,e){vr(()=>{var i=t.getRootNode(),r=i.host?i:i.head??i.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,r.appendChild(o)}})}const jr=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function io(t,e,i){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),i){for(var o in i)if(i[o])r=r?r+" "+o:o;else if(r.length)for(var n=o.length,v=0;(v=r.indexOf(o,v))>=0;){var l=v+n;(v===0||jr.includes(r[v-1]))&&(l===r.length||jr.includes(r[l]))?r=(v===0?"":r.substring(0,v))+r.substring(l+1):v=l}}return r===""?null:r}function ro(t,e){return t==null?null:String(t)}function re(t,e,i,r,o,n){var v=t.__className;if(h||v!==i||v===void 0){var l=io(i,r,n);(!h||l!==t.getAttribute("class"))&&(l==null?t.removeAttribute("class"):t.className=l),t.__className=i}else if(n&&o!==n)for(var a in n){var s=!!n[a];(o==null||s!==!!o[a])&&t.classList.toggle(a,s)}return n}function De(t,e,i,r){var o=t.__style;if(h||o!==e){var n=ro(e);(!h||n!==t.getAttribute("style"))&&(n==null?t.removeAttribute("style"):t.style.cssText=n),t.__style=e}return r}const no=Symbol("is custom element"),oo=Symbol("is html");function ne(t,e,i,r){var o=vo(t);h&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=i)&&(e==="loading"&&(t[Zr]=i),i==null?t.removeAttribute(e):typeof i!="string"&&ao(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function vo(t){return t.__attributes??={[no]:t.nodeName.includes("-"),[oo]:t.namespaceURI===Yr}}var Er=new Map;function ao(t){var e=t.getAttribute("is")||t.nodeName,i=Er.get(e);if(i)return i;Er.set(e,i=[]);for(var r,o=t,n=Element.prototype;n!==o;){r=Wr(o);for(var v in r)r[v].set&&i.push(v);o=Ai(o)}return i}function lo(t,e,i=e){var r=new WeakSet;Sn(t,"input",async o=>{var n=o?t.defaultValue:t.value;if(n=mi(t)?di(n):n,i(n),R!==null&&r.add(R),await Hn(),n!==(n=e())){var v=t.selectionStart,l=t.selectionEnd,a=t.value.length;if(t.value=n??"",l!==null){var s=t.value.length;v===l&&l===a&&s>a?(t.selectionStart=s,t.selectionEnd=s):(t.selectionStart=v,t.selectionEnd=Math.min(l,s))}}}),(h&&t.defaultValue!==t.value||Le(e)==null&&t.value)&&(i(mi(t)?di(t.value):t.value),R!==null&&r.add(R)),Me(()=>{var o=e();if(t===document.activeElement){var n=Re??R;if(r.has(n))return}mi(t)&&o===di(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}function mi(t){var e=t.type;return e==="number"||e==="range"}function di(t){return t===""?null:+t}function Ar(t,e){return t===e||t?.[ae]===e}function Rr(t={},e,i,r){return vr(()=>{var o,n;return Me(()=>{o=n,n=[],Le(()=>{t!==i(...n)&&(e(t,...n),o&&Ar(i(...o),t)&&e(null,...o))})}),()=>{Xt(()=>{n&&Ar(i(...n),t)&&e(null,...n)})}}),t}let Ge=!1;function so(t){var e=Ge;try{return Ge=!1,[t(),Ge]}finally{Ge=e}}function ce(t,e,i,r){var o=(i&Hr)!==0,n=(i&Fr)!==0,v=r,l=!0,a=()=>(l&&(l=!1,v=n?Le(r):r),v),s;if(o){var m=ae in t||Si in t;s=Bt(t,e)?.set??(m&&e in t?S=>t[e]=S:void 0)}var f,p=!1;o?[f,p]=so(()=>t[e]):f=t[e],f===void 0&&r!==void 0&&(f=a(),s&&(vn(),s(f)));var d;if(d=()=>{var S=t[e];return S===void 0?a():(l=!0,S)},(i&Ir)===0)return d;if(s){var x=t.$$legacy;return(function(S,K){return arguments.length>0?((!K||x||p)&&s(K?d():S),S):d()})}var E=!1,c=((i&Gr)!==0?ri:qi)(()=>(E=!1,d()));o&&g(c);var A=k;return(function(S,K){if(arguments.length>0){const T=K?g(c):o?yt(S):S;return z(c,T),E=!0,v!==void 0&&(v=T),S}return Ht&&E||(A.f&xt)!==0?c.v:g(c)})}function po(t){return new bo(t)}class bo{#e;#t;constructor(e){var i=new Map,r=(n,v)=>{var l=Ji(v,!1,!1);return i.set(n,l),l};const o=new Proxy({...e.props||{},$$events:{}},{get(n,v){return g(i.get(v)??r(v,Reflect.get(n,v)))},has(n,v){return v===Si?!0:(g(i.get(v)??r(v,Reflect.get(n,v))),Reflect.has(n,v))},set(n,v,l){return z(i.get(v)??r(v,l),l),Reflect.set(n,v,l)}});this.#t=(e.hydrate?Xn:kr)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Dt(),this.#e=o.$$events;for(const n of Object.keys(this.#t))n==="$set"||n==="$destroy"||n==="$on"||we(this,n,{get(){return this.#t[n]},set(v){this.#t[n]=v},enumerable:!0});this.#t.$set=n=>{Object.assign(o,n)},this.#t.$destroy=()=>{Zn(this.#t)}}$set(e){this.#t.$set(e)}$on(e,i){this.#e[e]=this.#e[e]||[];const r=(...o)=>i.call(this,...o);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(o=>o!==r)}}$destroy(){this.#t.$destroy()}}let zr;typeof HTMLElement=="function"&&(zr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return o=>{const n=document.createElement("slot");r!=="default"&&(n.name=r),it(o,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},i=mo(this);for(const r of this.$$s)r in i&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const o=this.$$g_p(r.name);o in this.$$d||(this.$$d[o]=Ie(o,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=po({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Bn(()=>{Me(()=>{this.$$r=!0;for(const r of ye(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const o=Ie(r,this.$$d[r],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,o)}this.$$r=!1})});for(const r in this.$$l)for(const o of this.$$l[r]){const n=this.$$c.$on(r,o);this.$$l_u.set(o,n)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ie(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return ye(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ie(t,e,i,r){const o=i[t]?.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!i[t])return e;if(r==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mo(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}function go(t,e,i,r,o,n){let v=class extends zr{constructor(){super(t,i,o),this.$$p_d=e}static get observedAttributes(){return ye(e).map(l=>(e[l].attribute||l).toLowerCase())}};return ye(e).forEach(l=>{we(v.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(a){a=Ie(l,a,e),this.$$d[l]=a;var s=this.$$c;if(s){var m=Bt(s,l)?.get;m?s[l]=a:s.$set({[l]:a})}}})}),r.forEach(l=>{we(v.prototype,l,{get(){return this.$$c?.[l]}})}),t.element=v,v}var Ut={},Tr;function fo(){if(Tr)return Ut;Tr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.LanguageTranslator=void 0,Ut.getChildStyleToPass=t,Ut.addComponent=e;function t(r,o){var n,v,l="";try{if(r&&o?.length&&(!((n=Object.keys(r))===null||n===void 0)&&n.length)&&(!((v=o?.filter(function(p){return Object.keys(r).includes(p.name)}))===null||v===void 0)&&v.length))for(var a=function(p){var d=o?.filter(function(x){return x.name===p&&x.defaultValue!==r[p]});d&&(l+="".concat(p,":").concat(r[p],";"))},s=0,m=Object.keys(r);s<m.length;s++){var f=m[s];a(f)}}catch(p){console.error("error getting child style to pass",p)}finally{return l}}function e(r){var o,n=((o=r?.repoName.split("/"))===null||o===void 0?void 0:o[1])||r?.repoName;if(!n)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var v=r?.iifePath||"main.iife.js";if(!document.getElementById(n+"-script"))try{var l=document.createElement("script");if(l.id=n+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(v),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var a=n.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(n.replace(a+"-",""),"/").concat(v)}document.head.appendChild(l)}catch(s){console.warn(s)}}var i=(function(){function r(o){if(this.lang="",!o?.dictionary)throw new Error("no dictionary provided");this.dictionary=o.dictionary,this.setLang(o?.lang)}return r.prototype.setLang=function(o){o||(o=r.getDefaultLang()),this.lang=o},r.prototype.translateWord=function(o,n){return r.getDictionaryWord(o,this.dictionary,n||this.lang)},r.prototype.translateDate=function(o,n,v){return r.formatDate(o,n,v||this.lang)},r.getDefaultLang=function(){var o,n,v,l="en";return navigator?.languages&&(!((v=(n=(o=navigator.languages[0])===null||o===void 0?void 0:o.split("-")[0])===null||n===void 0?void 0:n.toLowerCase())===null||v===void 0)&&v.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(o,n,v){var l;if(!o)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(v&&(!((l=n[v])===null||l===void 0)&&l[o]))return n[v][o];var a="",s=r.getDefaultLang();if(!v||s!==v){var m=n?.[s];m?.[o]&&(a=m[o])}return a},r.formatDate=function(o,n,v){if(!o)throw new Error("no date provided");if(typeof o.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(v||r.getDefaultLang(),n);return l.format(o)},r})();return Ut.LanguageTranslator=i,Ut}fo();var co=mt('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1p3vbiv"/>'),uo=mt('<img class="file-image svelte-1p3vbiv"/>'),xo=mt("<i></i>"),ho=mt('<div class="col-6 col-md-4 col-lg-3 svelte-1p3vbiv"><div class="file-card svelte-1p3vbiv"><div class="file-preview svelte-1p3vbiv"><!></div> <div class="file-details svelte-1p3vbiv"><div class="file-name svelte-1p3vbiv"> </div> <div class="file-meta svelte-1p3vbiv"><span class="file-size svelte-1p3vbiv"> </span></div></div> <button type="button" class="btn btn-sm btn-outline-danger remove-file-btn svelte-1p3vbiv" aria-label="Remove file" title="Remove file"><i class="bi bi-x svelte-1p3vbiv"></i></button></div></div>'),yo=mt('<div id="files-display" class="svelte-1p3vbiv"><div class="row g-2 svelte-1p3vbiv"></div></div>'),wo=mt('<button id="maximize-button" type="button"><i></i></button>'),_o=mt('<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger svelte-1p3vbiv"> <span class="visually-hidden svelte-1p3vbiv">selected files</span></span>'),ko=mt('<label id="upload-file" class="btn file-button btn-sm position-relative svelte-1p3vbiv" style="--tag-color: var(--bs-primary, #007bff)"><input type="file" class="svelte-1p3vbiv"/> <i class="bi bi-paperclip svelte-1p3vbiv"></i> <!></label>'),$o=mt('<button type="button"><i></i> </button>'),jo=mt('<div id="chat-container" class="svelte-1p3vbiv"><div id="chat-box" class="svelte-1p3vbiv"><!> <div id="textarea-container" class="svelte-1p3vbiv"><textarea id="send-message-text" placeholder="Type your message..."></textarea> <!></div> <div id="buttons-container" class="svelte-1p3vbiv"><div id="left-buttons" class="svelte-1p3vbiv"><!> <!></div> <div id="right-buttons" class="svelte-1p3vbiv"><button type="button" id="send-message-button" aria-label="Send message" class="svelte-1p3vbiv"><i class="bi bi-send-fill svelte-1p3vbiv"></i></button></div></div></div></div>');const Eo={hash:"svelte-1p3vbiv",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");
|
|
4
4
|
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");
|
|
5
5
|
/*!
|
|
6
6
|
* Bootstrap v5.1.2 (https://getbootstrap.com/)
|
|
@@ -186,5 +186,5 @@ textarea.svelte-1p3vbiv {margin:0;font-family:inherit;font-size:inherit;line-hei
|
|
|
186
186
|
.file-button.tag-selected.svelte-1p3vbiv,
|
|
187
187
|
.file-button.file-selected.svelte-1p3vbiv {background-color:var(--tag-color);color:white;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);}.tag-button.tag-selected.svelte-1p3vbiv:hover, .tag-button.file-selected.svelte-1p3vbiv:hover,
|
|
188
188
|
.file-button.tag-selected.svelte-1p3vbiv:hover,
|
|
189
|
-
.file-button.file-selected.svelte-1p3vbiv:hover {background-color:var(--tag-color);opacity:0.9;}#send-message-button.svelte-1p3vbiv {display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:50%;background-color:var(--bs-primary, #007bff);color:white;cursor:pointer;transition:all 0.2s ease;font-size:14px;}#send-message-button.svelte-1p3vbiv:hover:not(:disabled) {background-color:var(--bs-primary, #0056b3);transform:scale(1.05);}#send-message-button.svelte-1p3vbiv:active:not(:disabled) {transform:scale(0.95);}#send-message-button.svelte-1p3vbiv:disabled {background-color:var(--bs-secondary, #6c757d);cursor:not-allowed;transform:none;}#send-message-button.svelte-1p3vbiv > i:where(.svelte-1p3vbiv) {margin:0;}#maximize-button.svelte-1p3vbiv {position:absolute;top:20px;right:20px;width:24px;height:24px;border:none;border-radius:4px;color:var(--bs-primary, #007bff);background-color:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;transition:all 0.2s ease;z-index:10;}#maximize-button.svelte-1p3vbiv:hover {color:var(--bs-primary, #007bff);transform:scale(1.1);box-shadow:0 2px 6px rgba(0, 0, 0, 0.15);}#maximize-button.svelte-1p3vbiv:active {transform:scale(0.95);}#maximize-button.maximized.svelte-1p3vbiv {color:var(--bs-primary, #007bff);}#maximize-button.maximized.svelte-1p3vbiv:hover {background-color:rgba(0, 123, 255, 0.2);}#maximize-button.svelte-1p3vbiv > i:where(.svelte-1p3vbiv) {margin:0;}`};function
|
|
189
|
+
.file-button.file-selected.svelte-1p3vbiv:hover {background-color:var(--tag-color);opacity:0.9;}#send-message-button.svelte-1p3vbiv {display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:50%;background-color:var(--bs-primary, #007bff);color:white;cursor:pointer;transition:all 0.2s ease;font-size:14px;}#send-message-button.svelte-1p3vbiv:hover:not(:disabled) {background-color:var(--bs-primary, #0056b3);transform:scale(1.05);}#send-message-button.svelte-1p3vbiv:active:not(:disabled) {transform:scale(0.95);}#send-message-button.svelte-1p3vbiv:disabled {background-color:var(--bs-secondary, #6c757d);cursor:not-allowed;transform:none;}#send-message-button.svelte-1p3vbiv > i:where(.svelte-1p3vbiv) {margin:0;}#maximize-button.svelte-1p3vbiv {position:absolute;top:20px;right:20px;width:24px;height:24px;border:none;border-radius:4px;color:var(--bs-primary, #007bff);background-color:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;transition:all 0.2s ease;z-index:10;}#maximize-button.svelte-1p3vbiv:hover {color:var(--bs-primary, #007bff);transform:scale(1.1);box-shadow:0 2px 6px rgba(0, 0, 0, 0.15);}#maximize-button.svelte-1p3vbiv:active {transform:scale(0.95);}#maximize-button.maximized.svelte-1p3vbiv {color:var(--bs-primary, #007bff);}#maximize-button.maximized.svelte-1p3vbiv:hover {background-color:rgba(0, 123, 255, 0.2);}#maximize-button.svelte-1p3vbiv > i:where(.svelte-1p3vbiv) {margin:0;}`};function Sr(t,e){Oi(e,!0),eo(t,Eo);function i(b,u){e.$$host.dispatchEvent(new CustomEvent(b,{detail:u}))}let r=ce(e,"id",7,""),o=ce(e,"text",7,""),n=ce(e,"expandable",7,!1),v=ce(e,"tags",23,()=>[]),l=ce(e,"files",7),a=D(yt([])),s=D(130),m=D(0),f=D(0),p,d,x=D(!1),E=D(!1);yt({});let c=D(yt([]));function A(){const b=["#e74c3c","#3498db","#2ecc71","#f39c12","#9b59b6","#1abc9c","#34495e","#e67e22","#95a5a6","#f1c40f","#e91e63","#00bcd4","#4caf50","#ff9800","#673ab7"];return b[Math.floor(Math.random()*b.length)]}function S(b){return b.color||A()}pe(()=>{if(typeof v()=="string")try{v(JSON.parse(v()))}catch(b){console.error("error parsing buttons",b)}if(typeof l()=="string")try{l(JSON.parse(l()))}catch(b){console.error("error parsing files",b)}typeof n()=="string"&&n(n()==="yes"||n()==="true")}),pe(()=>{p&&o()&&setTimeout(()=>{I()},0)}),pe(()=>{if(d){const b=new ResizeObserver(u=>{for(const $ of u)z(f,$.contentRect.width,!0)});return b.observe(d),z(f,d.offsetWidth,!0),()=>{b.disconnect()}}}),pe(()=>{if(g(a).length>0){const j=K(g(f)),w=Math.ceil(g(a).length/j),C=w>1?(w-1)*8:0,rt=w*108+C+16;z(m,Math.min(rt,250),!0)}else z(m,0);p&&I()}),pe(()=>{l()?.mode==="single"&&g(a).length>1&&z(a,[g(a)[0]],!0)});function K(b){return b>=992?4:b>=768?3:2}function T(){return Date.now().toString(36)+Math.random().toString(36).substr(2)}function St(b){const u=b.target,$=u.files;if($)if(l()?.mode==="single"){const j=$[0],w={id:T(),name:j.name,mimetype:j.type,fileSize:j.size,content:j,objectUrl:j.type.startsWith("image/")?URL.createObjectURL(j):void 0};z(a,[w],!0)}else for(let j=0;j<$.length;j++){const w=$[j],C={id:T(),name:w.name,mimetype:w.type,fileSize:w.size,content:w,objectUrl:w.type.startsWith("image/")?URL.createObjectURL(w):void 0};z(a,[...g(a),C],!0)}u.value=""}function Yt(b){const u=g(a).find($=>$.id===b);u&&u.objectUrl&&URL.revokeObjectURL(u.objectUrl),z(a,g(a).filter($=>$.id!==b),!0)}function dt(b){return b.startsWith("image/")?"bi-image":b.startsWith("video/")?"bi-play-circle":b.startsWith("audio/")?"bi-music-note":b.includes("pdf")?"bi-file-pdf":b.includes("word")||b.includes("document")?"bi-file-word":b.includes("excel")||b.includes("spreadsheet")?"bi-file-excel":b.includes("powerpoint")||b.includes("presentation")?"bi-file-ppt":b.includes("zip")||b.includes("rar")||b.includes("archive")?"bi-file-zip":"bi-file-earmark"}function gt(b){if(b===0)return"0 B";const u=1024,$=["B","KB","MB","GB","TB"],j=Math.floor(Math.log(b)/Math.log(u));return parseFloat((b/Math.pow(u,j)).toFixed(1))+" "+$[j]}function kt(){if(!o()?.length&&!g(a).length)return console.warn("no message to send");console.log("send message "+o()),i("sendMessage",{text:o(),id:r(),files:g(a),tags:g(c)||[]})}function He(b){z(c,g(c).includes(b)?g(c).filter(u=>u!==b):[...g(c),b],!0)}function $t(b){b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),kt())}function ue(){n()&&!g(x)&&I()}function oe(){if(z(x,!g(x)),g(x))p.style.height="400px",p.style.maxHeight="400px",p.style.minHeight="400px",p.style.overflowY="auto",z(s,484+g(m));else{p.style.maxHeight="",p.style.minHeight="";const b=140,u=32,$=52;p.style.height=b+"px",p.style.overflowY="auto",z(s,u+b+$+g(m)),z(E,!0)}}function I(){if(p&&!g(x)){p.style.height="auto";const b=p.scrollHeight,u=140;let $=40;n()&&($=Math.max(b,80));const j=Math.min(Math.max(b,$),u);p.style.height=j+"px",b>u?p.style.overflowY="auto":p.style.overflowY="hidden",z(s,Math.max(32+j+52+g(m),130),!0),z(E,j>=u)}}var Fe={get id(){return r()},set id(b=""){r(b),Dt()},get text(){return o()},set text(b=""){o(b),Dt()},get expandable(){return n()},set expandable(b=!1){n(b),Dt()},get tags(){return v()},set tags(b=[]){v(b),Dt()},get files(){return l()},set files(b){l(b),Dt()}},qt=jo();to("1p3vbiv",b=>{var u=co();it(b,u)});var xe=B(qt),Ue=B(xe);{var Ao=b=>{var u=yo(),$=B(u);Yi($,21,()=>g(a),j=>j.id,(j,w)=>{var C=ho(),rt=B(C),jt=B(rt),ui=B(jt);{var xi=Mt=>{var ve=uo();wt(()=>{ne(ve,"src",g(w).objectUrl),ne(ve,"alt",g(w).name)}),it(Mt,ve)},hi=Mt=>{var ve=xo();wt(Oo=>re(ve,1,`bi ${Oo??""} file-icon`,"svelte-1p3vbiv"),[()=>dt(g(w).mimetype)]),it(Mt,ve)};ie(ui,Mt=>{g(w).mimetype.startsWith("image/")&&g(w).objectUrl?Mt(xi):Mt(hi,!1)})}M(jt);var yi=lt(jt,2),Ye=B(yi),Mo=B(Ye,!0);M(Ye);var Or=lt(Ye,2),Lr=B(Or),Bo=B(Lr,!0);M(Lr),M(Or),M(yi);var No=lt(yi,2);No.__click=()=>Yt(g(w).id),M(rt),M(C),wt(Mt=>{ne(Ye,"title",g(w).name),Pe(Mo,g(w).name),Pe(Bo,Mt)},[()=>gt(g(w).fileSize)]),it(j,C)}),M($),M(u),wt(()=>De(u,`height: ${g(m)??""}px;`)),it(b,u)};ie(Ue,b=>{g(a).length>0&&b(Ao)})}var gi=lt(Ue,2),Ct=B(gi);zn(Ct),Ct.__keydown=$t,Ct.__input=I;let Cr;Rr(Ct,b=>p=b,()=>p);var Ro=lt(Ct,2);{var zo=b=>{var u=wo();u.__click=oe;let $;var j=B(u);M(u),wt(()=>{ne(u,"aria-label",g(x)?"Minimize textarea":"Maximize textarea"),ne(u,"title",g(x)?"Minimize textarea":"Maximize textarea"),$=re(u,1,"svelte-1p3vbiv",null,$,{maximized:g(x)}),re(j,1,`bi bi-${g(x)?"arrows-angle-contract":"arrows-angle-expand"}`,"svelte-1p3vbiv")}),it(b,u)};ie(Ro,b=>{g(E)&&b(zo)})}M(gi);var Mr=lt(gi,2),fi=B(Mr),Br=B(fi);{var To=b=>{var u=ko(),$=B(u);$.__change=St;var j=lt($,4);{var w=C=>{var rt=_o(),jt=B(rt);Ci(),M(rt),wt(()=>Pe(jt,`${g(a).length??""} `)),it(C,rt)};ie(j,C=>{g(a).length>0&&C(w)})}M(u),wt(()=>$.multiple=l()?.mode!=="single"),it(b,u)};ie(Br,b=>{typeof l()=="object"&&b(To)})}var So=lt(Br,2);{var Co=b=>{var u=Vn(),$=Rn(u);Yi($,17,v,j=>j.id,(j,w)=>{var C=$o();let rt;C.__click=()=>He(g(w).id);var jt=B(C),ui=lt(jt);M(C),wt((xi,hi)=>{rt=re(C,1,"btn tag-button btn-sm svelte-1p3vbiv",null,rt,xi),De(C,`--tag-color: ${hi??""}`),ne(C,"aria-label",`Use ${g(w).label}`),re(jt,1,`bi bi-${g(w).icon??""}`,"svelte-1p3vbiv"),Pe(ui,` ${g(w).label??""}`)},[()=>({"tag-selected":g(c).includes(g(w).id)}),()=>S(g(w))]),it(j,C)}),it(b,u)};ie(So,b=>{v()?.length&&typeof v()=="object"&&b(Co)})}M(fi);var Nr=lt(fi,2),ci=B(Nr);return ci.__click=()=>kt(),M(Nr),M(Mr),M(xe),M(qt),Rr(qt,b=>d=b,()=>d),wt(()=>{De(xe,`height: ${g(s)??""}px;`),Cr=re(Ct,1,"svelte-1p3vbiv",null,Cr,{expandable:n(),maximized:g(x)}),ci.disabled=!(o()?.length||g(a).length),De(ci,`opacity:${o()?.length||g(a).length?"1":"0.25"}`)}),Yn("focus",Ct,ue),lo(Ct,o),it(t,qt),Li(Fe)}qn(["click","keydown","input","change"]),customElements.define("hb-messages-send",go(Sr,{id:{},text:{},expandable:{},tags:{},files:{}},[],[],!0)),wi.Component=Sr,Object.defineProperty(wi,Symbol.toStringTag,{value:"Module"})})(this["messages-send"]=this["messages-send"]||{});
|
|
190
190
|
//# sourceMappingURL=main.iife.js.map
|