@botfabrik/engine-webclient 4.99.12-alpha.1 → 4.100.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/embed/bundle.js +5 -5
- package/dist/index.js +11 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -389,7 +389,12 @@ Favicons können z.B. mittels https://realfavicongenerator.net/ generiert werden
|
|
|
389
389
|
--text-link-color-hover: var(--brand-primary-color);
|
|
390
390
|
|
|
391
391
|
/* chat window */
|
|
392
|
+
--window-top: auto;
|
|
393
|
+
--window-right: 1em;
|
|
394
|
+
--window-bottom: 1em;
|
|
395
|
+
--window-left: auto;
|
|
392
396
|
--window-height: 43em;
|
|
397
|
+
--window-max-height: calc(100vh - 2em);
|
|
393
398
|
--window-width: 25em;
|
|
394
399
|
--window-border-radius: 8px;
|
|
395
400
|
--header-height: 4em;
|
package/dist/embed/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";const ht=!1;var vt=Array.isArray,cn=Array.prototype.indexOf,dn=Array.from,Ue=Object.defineProperty,re=Object.getOwnPropertyDescriptor,hn=Object.getOwnPropertyDescriptors,vn=Object.prototype,_n=Array.prototype,_t=Object.getPrototypeOf,pt=Object.isExtensible;function pn(e){for(var t=0;t<e.length;t++)e[t]()}function gn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const O=2,qe=4,gt=8,ie=16,z=32,Z=64,ze=128,R=256,be=512,k=1024,P=2048,H=4096,Y=8192,J=16384,je=32768,ye=65536,mt=1<<17,wt=1<<18,se=1<<19,mn=1<<20,We=1<<21,Be=1<<22,Q=1<<23,Ee=Symbol("$state"),wn=Symbol("legacy props"),bn=Symbol(""),He=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function yn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function En(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Tn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function On(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Cn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function An(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function In(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Rn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Pn=1,Nn=4,Dn=8,Ln=16,Mn=1,Fn=2,w=Symbol(),Un="http://www.w3.org/1999/xhtml";function qn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function bt(e){return e===this.v}function zn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function jn(e){return!zn(e,this.v)}let Wn=!1,C=null;function oe(e){C=e}function ke(e,t=!1,n){C={p:C,c:null,e:null,s:e,x:null,l:null}}function xe(e){var t=C,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return C=t.p,{}}function yt(){return!0}let ae=[];function Bn(){var e=ae;ae=[],pn(e)}function Ye(e){if(ae.length===0){var t=ae;queueMicrotask(()=>{t===ae&&Bn()})}ae.push(e)}const Hn=new WeakMap;function Et(e){var t=g;if(t===null)return p.f|=Q,e;if((t.f&je)===0){if((t.f&ze)===0)throw!t.parent&&e instanceof Error&&kt(e),e;t.b.error(e)}else le(e,t)}function le(e,t){for(;t!==null;){if((t.f&ze)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&kt(e),e}function kt(e){const t=Hn.get(e);t&&(Ue(e,"message",{value:t.message}),Ue(e,"stack",{value:t.stack}))}const Ge=new Set;let E=null,Ve=new Set,_e=[],Ke=null,Ze=!1;class j{current=new Map;#s=new Map;#t=new Set;#d=0;#o=null;#u=!1;#i=[];#n=[];#e=[];#r=[];#a=[];#c=[];#f=[];skipped_effects=new Set;process(t){_e=[];for(const i of t)this.#h(i);if(this.#i.length===0&&this.#d===0){this.#v();var n=this.#e,r=this.#r;this.#e=[],this.#r=[],this.#a=[],E=null,xt(n),xt(r),E===null?E=this:Ge.delete(this),this.#o?.resolve()}else this.#l(this.#e),this.#l(this.#r),this.#l(this.#a);for(const i of this.#i)ce(i);for(const i of this.#n)ce(i);this.#i=[],this.#n=[]}#h(t){t.f^=k;for(var n=t.first;n!==null;){var r=n.f,i=(r&(z|Z))!==0,o=i&&(r&k)!==0,s=o||(r&Y)!==0||this.skipped_effects.has(n);if(!s&&n.fn!==null){if(i)n.f^=k;else if((r&qe)!==0)this.#r.push(n);else if((r&k)===0)if((r&Be)!==0){var l=n.b?.is_pending()?this.#n:this.#i;l.push(n)}else Re(n)&&((n.f&ie)!==0&&this.#a.push(n),ce(n));var a=n.first;if(a!==null){n=a;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)n=f.next,f=f.parent}}#l(t){for(const n of t)((n.f&P)!==0?this.#c:this.#f).push(n),I(n,k);t.length=0}capture(t,n){this.#s.has(t)||this.#s.set(t,n),this.current.set(t,t.v)}activate(){E=this}deactivate(){E=null;for(const t of Ve)if(Ve.delete(t),t(),E!==null)break}neuter(){this.#u=!0}flush(){_e.length>0?Yn():this.#v(),E===this&&(this.#d===0&&Ge.delete(this),this.deactivate())}#v(){if(!this.#u)for(const t of this.#t)t();this.#t.clear()}increment(){this.#d+=1}decrement(){if(this.#d-=1,this.#d===0){for(const t of this.#c)I(t,P),fe(t);for(const t of this.#f)I(t,H),fe(t);this.#e=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#t.add(t)}settled(){return(this.#o??=gn()).promise}static ensure(){if(E===null){const t=E=new j;Ge.add(E),j.enqueue(()=>{E===t&&t.flush()})}return E}static enqueue(t){Ye(t)}}function Yn(){var e=ue;Ze=!0;try{var t=0;for(zt(!0);_e.length>0;){var n=j.ensure();if(t++>1e3){var r,i;Gn()}n.process(_e),G.clear()}}finally{Ze=!1,zt(e),Ke=null}}function Gn(){try{Tn()}catch(e){le(e,Ke)}}let X=null;function xt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(J|Y))===0&&Re(r)&&(X=[],ce(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Ft(r):r.fn=null),X?.length>0)){G.clear();for(const i of X)ce(i);X=[]}}X=null}}function fe(e){for(var t=Ke=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===g&&(n&ie)!==0)return;if((n&(Z|z))!==0){if((n&k)===0)return;t.f^=k}}_e.push(t)}function Vn(e){let t=0,n=Se(0),r;return()=>{fr()&&(S(n),vr(()=>(t===0&&(r=et(()=>e(()=>pe(n)))),t+=1,()=>{Ye(()=>{t-=1,t===0&&(r?.(),r=void 0,pe(n))})})))}}var Kn=ye|se|ze;function Zn(e,t,n){new Jn(e,t,n)}class Jn{parent;#s=!1;#t;#d=null;#o;#u;#i;#n=null;#e=null;#r=null;#a=null;#c=0;#f=0;#h=!1;#l=null;#v=()=>{this.#l&&Te(this.#l,this.#c)};#m=Vn(()=>(this.#l=Se(this.#c),()=>{this.#l=null}));constructor(t,n,r){this.#t=t,this.#o=n,this.#u=r,this.parent=g.b,this.#s=!!this.#o.pending,this.#i=$e(()=>{g.b=this;{try{this.#n=W(()=>r(this.#t))}catch(i){this.error(i)}this.#f>0?this.#p():this.#s=!1}},Kn)}#w(){try{this.#n=W(()=>this.#u(this.#t))}catch(t){this.error(t)}this.#s=!1}#b(){const t=this.#o.pending;t&&(this.#e=W(()=>t(this.#t)),j.enqueue(()=>{this.#n=this.#_(()=>(j.ensure(),W(()=>this.#u(this.#t)))),this.#f>0?this.#p():(ge(this.#e,()=>{this.#e=null}),this.#s=!1)}))}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#o.pending}#_(t){var n=g,r=p,i=C;q(this.#i),T(this.#i),oe(this.#i.ctx);try{return t()}catch(o){return Et(o),null}finally{q(n),T(r),oe(i)}}#p(){const t=this.#o.pending;this.#n!==null&&(this.#a=document.createDocumentFragment(),Qn(this.#n,this.#a)),this.#e===null&&(this.#e=W(()=>t(this.#t)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#f+=t,this.#f===0&&(this.#s=!1,this.#e&&ge(this.#e,()=>{this.#e=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(t){this.#g(t),this.#c+=t,Ve.add(this.#v)}get_effect_pending(){return this.#m(),S(this.#l)}error(t){var n=this.#o.onerror;let r=this.#o.failed;if(this.#h||!n&&!r)throw t;this.#n&&(U(this.#n),this.#n=null),this.#e&&(U(this.#e),this.#e=null),this.#r&&(U(this.#r),this.#r=null);var i=!1,o=!1;const s=()=>{if(i){qn();return}i=!0,o&&Rn(),j.ensure(),this.#c=0,this.#r!==null&&ge(this.#r,()=>{this.#r=null}),this.#s=this.has_pending_snippet(),this.#n=this.#_(()=>(this.#h=!1,W(()=>this.#u(this.#t)))),this.#f>0?this.#p():this.#s=!1};var l=p;try{T(null),o=!0,n?.(t,s),o=!1}catch(a){le(a,this.#i&&this.#i.parent)}finally{T(l)}r&&Ye(()=>{this.#r=this.#_(()=>{this.#h=!0;try{return W(()=>{r(this.#t,()=>t,()=>s)})}catch(a){return le(a,this.#i.parent),null}finally{this.#h=!1}})})}}function Qn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:Ae(n);t.append(n),n=i}}function Xn(e,t,n){const r=Je;if(t.length===0){n(e.map(r));return}var i=E,o=g,s=$n();Promise.all(t.map(l=>er(l))).then(l=>{i?.activate(),s();try{n([...e.map(r),...l])}catch(a){(o.f&J)===0&&le(a,o)}i?.deactivate(),St()}).catch(l=>{le(l,o)})}function $n(){var e=g,t=p,n=C,r=E;return function(){q(e),T(t),oe(n),r?.activate()}}function St(){q(null),T(null),oe(null)}function Je(e){var t=O|P,n=p!==null&&(p.f&O)!==0?p:null;return g===null||n!==null&&(n.f&R)!==0?t|=R:g.f|=se,{ctx:C,deps:null,effects:null,equals:bt,f:t,fn:e,reactions:null,rv:0,v:w,wv:0,parent:n??g,ac:null}}function er(e,t){let n=g;n===null&&En();var r=n.b,i=void 0,o=Se(w),s=null,l=!p;return hr(()=>{try{var a=e();s&&Promise.resolve(a).catch(()=>{})}catch(c){a=Promise.reject(c)}var f=()=>a;i=s?.then(f,f)??Promise.resolve(a),s=i;var u=E,d=r.is_pending();l&&(r.update_pending_count(1),d||u.increment());const v=(c,h=void 0)=>{s=null,d||u.activate(),h?h!==He&&(o.f|=Q,Te(o,h)):((o.f&Q)!==0&&(o.f^=Q),Te(o,c)),l&&(r.update_pending_count(-1),d||u.decrement()),St()};if(i.then(v,c=>v(null,c||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(a=>{function f(u){function d(){u===i?a(o):f(i)}u.then(d,d)}f(i)})}function tr(e){const t=Je(e);return t.equals=jn,t}function Tt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)U(t[n])}}function nr(e){for(var t=e.parent;t!==null;){if((t.f&O)===0)return t;t=t.parent}return null}function Qe(e){var t,n=g;q(nr(e));try{Tt(e),t=Gt(e)}finally{q(n)}return t}function Ot(e){var t=Qe(e);if(e.equals(t)||(e.v=t,e.wv=Ht()),!ee){var n=(K||(e.f&R)!==0)&&e.deps!==null?H:k;I(e,n)}}const G=new Map;function Se(e,t){var n={f:0,v:e,reactions:null,equals:bt,rv:0,wv:0};return n}function L(e,t){const n=Se(e);return wr(n),n}function M(e,t,n=!1){p!==null&&(!F||(p.f&mt)!==0)&&yt()&&(p.f&(O|ie|Be|mt))!==0&&!B?.includes(e)&&In();let r=n?$(t):t;return Te(e,r)}function Te(e,t){if(!e.equals(t)){var n=e.v;ee?G.set(e,t):G.set(e,n),e.v=t;var r=j.ensure();r.capture(e,n),(e.f&O)!==0&&((e.f&P)!==0&&Qe(e),I(e,(e.f&R)===0?k:H)),e.wv=Ht(),Ct(e,P),g!==null&&(g.f&k)!==0&&(g.f&(z|Z))===0&&(N===null?br([e]):N.push(e))}return t}function pe(e){M(e,e.v+1)}function Ct(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i],s=o.f,l=(s&P)===0;l&&I(o,t),(s&O)!==0?Ct(o,H):l&&((s&ie)!==0&&X!==null&&X.push(o),fe(o))}}function $(e){if(typeof e!="object"||e===null||Ee in e)return e;const t=_t(e);if(t!==vn&&t!==_n)return e;var n=new Map,r=vt(e),i=L(0),o=te,s=l=>{if(te===o)return l();var a=p,f=te;T(null),Bt(o);var u=l();return T(a),Bt(f),u};return r&&n.set("length",L(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Cn();var u=n.get(a);return u===void 0?u=s(()=>{var d=L(f.value);return n.set(a,d),d}):M(u,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const u=s(()=>L(w));n.set(a,u),pe(i)}}else M(f,w),pe(i);return!0},get(l,a,f){if(a===Ee)return e;var u=n.get(a),d=a in l;if(u===void 0&&(!d||re(l,a)?.writable)&&(u=s(()=>{var c=$(d?l[a]:w),h=L(c);return h}),n.set(a,u)),u!==void 0){var v=S(u);return v===w?void 0:v}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var u=n.get(a);u&&(f.value=S(u))}else if(f===void 0){var d=n.get(a),v=d?.v;if(d!==void 0&&v!==w)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(l,a){if(a===Ee)return!0;var f=n.get(a),u=f!==void 0&&f.v!==w||Reflect.has(l,a);if(f!==void 0||g!==null&&(!u||re(l,a)?.writable)){f===void 0&&(f=s(()=>{var v=u?$(l[a]):w,c=L(v);return c}),n.set(a,f));var d=S(f);if(d===w)return!1}return u},set(l,a,f,u){var d=n.get(a),v=a in l;if(r&&a==="length")for(var c=f;c<d.v;c+=1){var h=n.get(c+"");h!==void 0?M(h,w):c in l&&(h=s(()=>L(w)),n.set(c+"",h))}if(d===void 0)(!v||re(l,a)?.writable)&&(d=s(()=>L(void 0)),M(d,$(f)),n.set(a,d));else{v=d.v!==w;var m=s(()=>$(f));M(d,m)}var b=Reflect.getOwnPropertyDescriptor(l,a);if(b?.set&&b.set.call(u,f),!v){if(r&&typeof a=="string"){var D=n.get("length"),_=Number(a);Number.isInteger(_)&&_>=D.v&&M(D,_+1)}pe(i)}return!0},ownKeys(l){S(i);var a=Reflect.ownKeys(l).filter(d=>{var v=n.get(d);return v===void 0||v.v!==w});for(var[f,u]of n)u.v!==w&&!(f in l)&&a.push(f);return a},setPrototypeOf(){An()}})}var At,It,Rt,Pt;function rr(){if(At===void 0){At=window,It=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=re(t,"firstChild").get,Pt=re(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function Ce(e){return Rt.call(e)}function Ae(e){return Pt.call(e)}function Xe(e,t){return Ce(e)}function ir(e,t=!1){{var n=Ce(e);return n instanceof Comment&&n.data===""?Ae(n):n}}function sr(e,t=1,n=!1){let r=e;for(;t--;)r=Ae(r);return r}function or(){return!1}function Nt(e){var t=p,n=g;T(null),q(null);try{return e()}finally{T(t),q(n)}}function ar(e){g===null&&p===null&&Sn(),p!==null&&(p.f&R)!==0&&g===null&&xn(),ee&&kn()}function lr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function V(e,t,n,r=!0){var i=g;i!==null&&(i.f&Y)!==0&&(e|=Y);var o={ctx:C,deps:null,nodes_start:null,nodes_end:null,f:e|P,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{ce(o),o.f|=je}catch(a){throw U(o),a}else t!==null&&fe(o);if(r){var s=o;if(n&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&se)===0&&(s=s.first),s!==null&&(s.parent=i,i!==null&&lr(s,i),p!==null&&(p.f&O)!==0&&(e&Z)===0)){var l=p;(l.effects??=[]).push(s)}}return o}function fr(){return p!==null&&!F}function ur(e){ar();var t=g.f,n=!p&&(t&z)!==0&&(t&je)===0;if(n){var r=C;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return V(qe|mn,e,!1)}function cr(e){j.ensure();const t=V(Z|se,e,!0);return(n={})=>new Promise(r=>{n.outro?ge(t,()=>{U(t),r(void 0)}):(U(t),r(void 0))})}function dr(e){return V(qe,e,!1)}function hr(e){return V(Be|se,e,!0)}function vr(e,t=0){return V(gt|t,e,!0)}function Ie(e,t=[],n=[]){Xn(t,n,r=>{V(gt,()=>e(...r.map(S)),!0)})}function $e(e,t=0){var n=V(ie|t,e,!0);return n}function W(e,t=!0){return V(z|se,e,!0,t)}function Lt(e){var t=e.teardown;if(t!==null){const n=ee,r=p;jt(!0),T(null);try{t.call(null)}finally{jt(n),T(r)}}}function Mt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Nt(()=>{i.abort(He)});var r=n.next;(n.f&Z)!==0?n.parent=null:U(n,t),n=r}}function _r(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&z)===0&&U(t),t=n}}function U(e,t=!0){var n=!1;(t||(e.f&wt)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(pr(e.nodes_start,e.nodes_end),n=!0),Mt(e,t&&!n),Pe(e,0),I(e,J);var r=e.transitions;if(r!==null)for(const o of r)o.stop();Lt(e);var i=e.parent;i!==null&&i.first!==null&&Ft(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function pr(e,t){for(;e!==null;){var n=e===t?null:Ae(e);e.remove(),e=n}}function Ft(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 ge(e,t){var n=[];Ut(e,n,!0),gr(n,()=>{U(e),t&&t()})}function gr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Ut(e,t,n){if((e.f&Y)===0){if(e.f^=Y,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var r=e.first;r!==null;){var i=r.next,o=(r.f&ye)!==0||(r.f&z)!==0;Ut(r,t,o?n:!1),r=i}}}function mr(e){qt(e,!0)}function qt(e,t){if((e.f&Y)!==0){e.f^=Y,(e.f&k)===0&&(I(e,P),fe(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ye)!==0||(n.f&z)!==0;qt(n,i?t:!1),n=r}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}let ue=!1;function zt(e){ue=e}let ee=!1;function jt(e){ee=e}let p=null,F=!1;function T(e){p=e}let g=null;function q(e){g=e}let B=null;function wr(e){p!==null&&(B===null?B=[e]:B.push(e))}let x=null,A=0,N=null;function br(e){N=e}let Wt=1,me=0,te=me;function Bt(e){te=e}let K=!1;function Ht(){return++Wt}function Re(e){var t=e.f;if((t&P)!==0)return!0;if((t&H)!==0){var n=e.deps,r=(t&R)!==0;if(n!==null){var i,o,s=(t&be)!==0,l=r&&g!==null&&!K,a=n.length;if((s||l)&&(g===null||(g.f&J)===0)){var f=e,u=f.parent;for(i=0;i<a;i++)o=n[i],(s||!o?.reactions?.includes(f))&&(o.reactions??=[]).push(f);s&&(f.f^=be),l&&u!==null&&(u.f&R)===0&&(f.f^=R)}for(i=0;i<a;i++)if(o=n[i],Re(o)&&Ot(o),o.wv>e.wv)return!0}(!r||g!==null&&!K)&&I(e,k)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!B?.includes(e))for(var i=0;i<r.length;i++){var o=r[i];(o.f&O)!==0?Yt(o,t,!1):t===o&&(n?I(o,P):(o.f&k)!==0&&I(o,H),fe(o))}}function Gt(e){var t=x,n=A,r=N,i=p,o=K,s=B,l=C,a=F,f=te,u=e.f;x=null,A=0,N=null,K=(u&R)!==0&&(F||!ue||p===null),p=(u&(z|Z))===0?e:null,B=null,oe(e.ctx),F=!1,te=++me,e.ac!==null&&(Nt(()=>{e.ac.abort(He)}),e.ac=null);try{e.f|=We;var d=e.fn,v=d(),c=e.deps;if(x!==null){var h;if(Pe(e,A),c!==null&&A>0)for(c.length=A+x.length,h=0;h<x.length;h++)c[A+h]=x[h];else e.deps=c=x;if(!K||(u&O)!==0&&e.reactions!==null)for(h=A;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&A<c.length&&(Pe(e,A),c.length=A);if(yt()&&N!==null&&!F&&c!==null&&(e.f&(O|H|P))===0)for(h=0;h<N.length;h++)Yt(N[h],e);return i!==null&&i!==e&&(me++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&Q)!==0&&(e.f^=Q),v}catch(m){return Et(m)}finally{e.f^=We,x=t,A=n,N=r,p=i,K=o,B=s,oe(l),F=a,te=f}}function yr(e,t){let n=t.reactions;if(n!==null){var r=cn.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&O)!==0&&(x===null||!x.includes(t))&&(I(t,H),(t.f&(R|be))===0&&(t.f^=be),Tt(t),Pe(t,0))}function Pe(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)yr(e,n[r])}function ce(e){var t=e.f;if((t&J)===0){I(e,k);var n=g,r=ue;g=e,ue=!0;try{(t&ie)!==0?_r(e):Mt(e),Lt(e);var i=Gt(e);e.teardown=typeof i=="function"?i:null,e.wv=Wt;var o;ht&&Wn&&(e.f&P)!==0&&e.deps}finally{ue=r,g=n}}}function S(e){var t=e.f,n=(t&O)!==0;if(p!==null&&!F){var r=g!==null&&(g.f&J)!==0;if(!r&&!B?.includes(e)){var i=p.deps;if((p.f&We)!==0)e.rv<me&&(e.rv=me,x===null&&i!==null&&i[A]===e?A++:x===null?x=[e]:(!K||!x.includes(e))&&x.push(e));else{(p.deps??=[]).push(e);var o=e.reactions;o===null?e.reactions=[p]:o.includes(p)||o.push(p)}}}else if(n&&e.deps===null&&e.effects===null){var s=e,l=s.parent;l!==null&&(l.f&R)===0&&(s.f^=R)}if(ee){if(G.has(e))return G.get(e);if(n){s=e;var a=s.v;return((s.f&k)===0&&s.reactions!==null||Vt(s))&&(a=Qe(s)),G.set(s,a),a}}else n&&(s=e,Re(s)&&Ot(s));if((e.f&Q)!==0)throw e.v;return e.v}function Vt(e){if(e.v===w)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(G.has(t)||(t.f&O)!==0&&Vt(t))return!0;return!1}function et(e){var t=F;try{return F=!0,e()}finally{F=t}}const Er=-7169;function I(e,t){e.f=e.f&Er|t}const kr=["touchstart","touchmove"];function xr(e){return kr.includes(e)}const Kt=new Set,tt=new Set;function Sr(e){for(var t=0;t<e.length;t++)Kt.add(e[t]);for(var n of tt)n(e)}let Zt=null;function Ne(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Zt=e;var s=0,l=Zt===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(s=a)}if(o=i[s]||e.target,o!==t){Ue(e,"currentTarget",{configurable:!0,get(){return o||n}});var u=p,d=g;T(null),q(null);try{for(var v,c=[];o!==null;){var h=o.assignedSlot||o.parentNode||o.host||null;try{var m=o["__"+r];if(m!=null&&(!o.disabled||e.target===o))if(vt(m)){var[b,...D]=m;b.apply(o,[e,...D])}else m.call(o,e)}catch(_){v?c.push(_):v=_}if(e.cancelBubble||h===t||h===null)break;o=h}if(v){for(let _ of c)queueMicrotask(()=>{throw _});throw v}}finally{e.__root=t,delete e.currentTarget,T(u),q(d)}}}function Tr(e){var t;t=document.head.appendChild(Oe());try{$e(()=>e(t),wt)}finally{}}function Or(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function nt(e,t){var n=g;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function we(e,t){var n=(t&Mn)!==0,r=(t&Fn)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Or(o?e:"<!>"+e),n||(i=Ce(i)));var s=r||It?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Ce(s),a=s.lastChild;nt(l,a)}else nt(s,s);return s}}function Cr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Oe();return e.append(t,n),nt(t,n),e}function de(e,t){e!==null&&e.before(t)}function Ar(e,t){return Ir(e,t)}const he=new Map;function Ir(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0}){rr();var l=new Set,a=d=>{for(var v=0;v<d.length;v++){var c=d[v];if(!l.has(c)){l.add(c);var h=xr(c);t.addEventListener(c,Ne,{passive:h});var m=he.get(c);m===void 0?(document.addEventListener(c,Ne,{passive:h}),he.set(c,1)):he.set(c,m+1)}}};a(dn(Kt)),tt.add(a);var f=void 0,u=cr(()=>{var d=n??t.appendChild(Oe());return Zn(d,{pending:()=>{}},v=>{if(o){ke({});var c=C;c.c=o}i&&(r.$$events=i),f=e(v,r)||{},o&&xe()}),()=>{for(var v of l){t.removeEventListener(v,Ne);var c=he.get(v);--c===0?(document.removeEventListener(v,Ne),he.delete(v)):he.set(v,c)}tt.delete(a),d!==n&&d.parentNode?.removeChild(d)}});return Rr.set(f,u),f}let Rr=new WeakMap;function Pr(e,t,n=!1){var r=e,i=null,o=null,s=w,l=n?ye:0,a=!1;const f=(c,h=!0)=>{a=!0,v(h,c)};var u=null;function d(){u!==null&&(u.lastChild.remove(),r.before(u),u=null);var c=s?i:o,h=s?o:i;c&&mr(c),h&&ge(h,()=>{s?o=null:i=null})}const v=(c,h)=>{if(s!==(s=c)){var m=or(),b=r;if(m&&(u=document.createDocumentFragment(),u.append(b=Oe())),s?i??=h&&W(()=>h(b)):o??=h&&W(()=>h(b)),m){var D=E,_=s?i:o,y=s?o:i;_&&D.skipped_effects.delete(_),y&&D.skipped_effects.add(y),D.add_callback(d)}else d()}};$e(()=>{a=!1,t(f),a||v(null,null)},l)}function rt(e,t){dr(()=>{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)}})}const Jt=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Nr(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;(s===0||Jt.includes(r[s-1]))&&(l===r.length||Jt.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function Qt(e,t,n,r,i,o){var s=e.__className;if(s!==n||s===void 0){var l=Nr(n,r,o);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(o&&i!==o)for(var a in o){var f=!!o[a];(i==null||f!==!!i[a])&&e.classList.toggle(a,f)}return o}const Dr=Symbol("is custom element"),Lr=Symbol("is html");function ve(e,t,n,r){var i=Mr(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[bn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Fr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Mr(e){return e.__attributes??={[Dr]:e.nodeName.includes("-"),[Lr]:e.namespaceURI===Un}}var Xt=new Map;function Fr(e){var t=e.getAttribute("is")||e.nodeName,n=Xt.get(t);if(n)return n;Xt.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=hn(i);for(var s in r)r[s].set&&n.push(s);i=_t(i)}return n}let De=!1;function Ur(e){var t=De;try{return De=!1,[e(),De]}finally{De=t}}function it(e,t,n,r){var i=(n&Dn)!==0,o=(n&Ln)!==0,s=r,l=!0,a=()=>(l&&(l=!1,s=o?et(r):r),s),f;if(i){var u=Ee in e||
|
|
1
|
+
(function(){"use strict";const ht=!1;var vt=Array.isArray,cn=Array.prototype.indexOf,dn=Array.from,Ue=Object.defineProperty,re=Object.getOwnPropertyDescriptor,hn=Object.getOwnPropertyDescriptors,vn=Object.prototype,_n=Array.prototype,_t=Object.getPrototypeOf,pt=Object.isExtensible;function pn(e){for(var t=0;t<e.length;t++)e[t]()}function gn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const O=2,qe=4,gt=8,ie=16,z=32,Z=64,ze=128,R=256,be=512,k=1024,P=2048,H=4096,Y=8192,J=16384,je=32768,ye=65536,wt=1<<17,mt=1<<18,se=1<<19,wn=1<<20,We=1<<21,Be=1<<22,Q=1<<23,Ee=Symbol("$state"),mn=Symbol("legacy props"),bn=Symbol(""),He=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function yn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function En(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Tn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function On(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Cn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function An(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function In(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Rn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Pn=1,Nn=4,Dn=8,Ln=16,Mn=1,Fn=2,m=Symbol(),Un="http://www.w3.org/1999/xhtml";function qn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function bt(e){return e===this.v}function zn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function jn(e){return!zn(e,this.v)}let Wn=!1,C=null;function oe(e){C=e}function ke(e,t=!1,n){C={p:C,c:null,e:null,s:e,x:null,l:null}}function xe(e){var t=C,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return C=t.p,{}}function yt(){return!0}let ae=[];function Bn(){var e=ae;ae=[],pn(e)}function Ye(e){if(ae.length===0){var t=ae;queueMicrotask(()=>{t===ae&&Bn()})}ae.push(e)}const Hn=new WeakMap;function Et(e){var t=g;if(t===null)return p.f|=Q,e;if((t.f&je)===0){if((t.f&ze)===0)throw!t.parent&&e instanceof Error&&kt(e),e;t.b.error(e)}else le(e,t)}function le(e,t){for(;t!==null;){if((t.f&ze)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&kt(e),e}function kt(e){const t=Hn.get(e);t&&(Ue(e,"message",{value:t.message}),Ue(e,"stack",{value:t.stack}))}const Ge=new Set;let E=null,Ve=new Set,_e=[],Ke=null,Ze=!1;class j{current=new Map;#s=new Map;#t=new Set;#d=0;#o=null;#u=!1;#i=[];#n=[];#e=[];#r=[];#a=[];#c=[];#f=[];skipped_effects=new Set;process(t){_e=[];for(const i of t)this.#h(i);if(this.#i.length===0&&this.#d===0){this.#v();var n=this.#e,r=this.#r;this.#e=[],this.#r=[],this.#a=[],E=null,xt(n),xt(r),E===null?E=this:Ge.delete(this),this.#o?.resolve()}else this.#l(this.#e),this.#l(this.#r),this.#l(this.#a);for(const i of this.#i)ce(i);for(const i of this.#n)ce(i);this.#i=[],this.#n=[]}#h(t){t.f^=k;for(var n=t.first;n!==null;){var r=n.f,i=(r&(z|Z))!==0,o=i&&(r&k)!==0,s=o||(r&Y)!==0||this.skipped_effects.has(n);if(!s&&n.fn!==null){if(i)n.f^=k;else if((r&qe)!==0)this.#r.push(n);else if((r&k)===0)if((r&Be)!==0){var l=n.b?.is_pending()?this.#n:this.#i;l.push(n)}else Re(n)&&((n.f&ie)!==0&&this.#a.push(n),ce(n));var a=n.first;if(a!==null){n=a;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)n=f.next,f=f.parent}}#l(t){for(const n of t)((n.f&P)!==0?this.#c:this.#f).push(n),I(n,k);t.length=0}capture(t,n){this.#s.has(t)||this.#s.set(t,n),this.current.set(t,t.v)}activate(){E=this}deactivate(){E=null;for(const t of Ve)if(Ve.delete(t),t(),E!==null)break}neuter(){this.#u=!0}flush(){_e.length>0?Yn():this.#v(),E===this&&(this.#d===0&&Ge.delete(this),this.deactivate())}#v(){if(!this.#u)for(const t of this.#t)t();this.#t.clear()}increment(){this.#d+=1}decrement(){if(this.#d-=1,this.#d===0){for(const t of this.#c)I(t,P),fe(t);for(const t of this.#f)I(t,H),fe(t);this.#e=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#t.add(t)}settled(){return(this.#o??=gn()).promise}static ensure(){if(E===null){const t=E=new j;Ge.add(E),j.enqueue(()=>{E===t&&t.flush()})}return E}static enqueue(t){Ye(t)}}function Yn(){var e=ue;Ze=!0;try{var t=0;for(zt(!0);_e.length>0;){var n=j.ensure();if(t++>1e3){var r,i;Gn()}n.process(_e),G.clear()}}finally{Ze=!1,zt(e),Ke=null}}function Gn(){try{Tn()}catch(e){le(e,Ke)}}let X=null;function xt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(J|Y))===0&&Re(r)&&(X=[],ce(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Ft(r):r.fn=null),X?.length>0)){G.clear();for(const i of X)ce(i);X=[]}}X=null}}function fe(e){for(var t=Ke=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===g&&(n&ie)!==0)return;if((n&(Z|z))!==0){if((n&k)===0)return;t.f^=k}}_e.push(t)}function Vn(e){let t=0,n=Se(0),r;return()=>{fr()&&(S(n),vr(()=>(t===0&&(r=et(()=>e(()=>pe(n)))),t+=1,()=>{Ye(()=>{t-=1,t===0&&(r?.(),r=void 0,pe(n))})})))}}var Kn=ye|se|ze;function Zn(e,t,n){new Jn(e,t,n)}class Jn{parent;#s=!1;#t;#d=null;#o;#u;#i;#n=null;#e=null;#r=null;#a=null;#c=0;#f=0;#h=!1;#l=null;#v=()=>{this.#l&&Te(this.#l,this.#c)};#w=Vn(()=>(this.#l=Se(this.#c),()=>{this.#l=null}));constructor(t,n,r){this.#t=t,this.#o=n,this.#u=r,this.parent=g.b,this.#s=!!this.#o.pending,this.#i=$e(()=>{g.b=this;{try{this.#n=W(()=>r(this.#t))}catch(i){this.error(i)}this.#f>0?this.#p():this.#s=!1}},Kn)}#m(){try{this.#n=W(()=>this.#u(this.#t))}catch(t){this.error(t)}this.#s=!1}#b(){const t=this.#o.pending;t&&(this.#e=W(()=>t(this.#t)),j.enqueue(()=>{this.#n=this.#_(()=>(j.ensure(),W(()=>this.#u(this.#t)))),this.#f>0?this.#p():(ge(this.#e,()=>{this.#e=null}),this.#s=!1)}))}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#o.pending}#_(t){var n=g,r=p,i=C;q(this.#i),T(this.#i),oe(this.#i.ctx);try{return t()}catch(o){return Et(o),null}finally{q(n),T(r),oe(i)}}#p(){const t=this.#o.pending;this.#n!==null&&(this.#a=document.createDocumentFragment(),Qn(this.#n,this.#a)),this.#e===null&&(this.#e=W(()=>t(this.#t)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#f+=t,this.#f===0&&(this.#s=!1,this.#e&&ge(this.#e,()=>{this.#e=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(t){this.#g(t),this.#c+=t,Ve.add(this.#v)}get_effect_pending(){return this.#w(),S(this.#l)}error(t){var n=this.#o.onerror;let r=this.#o.failed;if(this.#h||!n&&!r)throw t;this.#n&&(U(this.#n),this.#n=null),this.#e&&(U(this.#e),this.#e=null),this.#r&&(U(this.#r),this.#r=null);var i=!1,o=!1;const s=()=>{if(i){qn();return}i=!0,o&&Rn(),j.ensure(),this.#c=0,this.#r!==null&&ge(this.#r,()=>{this.#r=null}),this.#s=this.has_pending_snippet(),this.#n=this.#_(()=>(this.#h=!1,W(()=>this.#u(this.#t)))),this.#f>0?this.#p():this.#s=!1};var l=p;try{T(null),o=!0,n?.(t,s),o=!1}catch(a){le(a,this.#i&&this.#i.parent)}finally{T(l)}r&&Ye(()=>{this.#r=this.#_(()=>{this.#h=!0;try{return W(()=>{r(this.#t,()=>t,()=>s)})}catch(a){return le(a,this.#i.parent),null}finally{this.#h=!1}})})}}function Qn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:Ae(n);t.append(n),n=i}}function Xn(e,t,n){const r=Je;if(t.length===0){n(e.map(r));return}var i=E,o=g,s=$n();Promise.all(t.map(l=>er(l))).then(l=>{i?.activate(),s();try{n([...e.map(r),...l])}catch(a){(o.f&J)===0&&le(a,o)}i?.deactivate(),St()}).catch(l=>{le(l,o)})}function $n(){var e=g,t=p,n=C,r=E;return function(){q(e),T(t),oe(n),r?.activate()}}function St(){q(null),T(null),oe(null)}function Je(e){var t=O|P,n=p!==null&&(p.f&O)!==0?p:null;return g===null||n!==null&&(n.f&R)!==0?t|=R:g.f|=se,{ctx:C,deps:null,effects:null,equals:bt,f:t,fn:e,reactions:null,rv:0,v:m,wv:0,parent:n??g,ac:null}}function er(e,t){let n=g;n===null&&En();var r=n.b,i=void 0,o=Se(m),s=null,l=!p;return hr(()=>{try{var a=e();s&&Promise.resolve(a).catch(()=>{})}catch(c){a=Promise.reject(c)}var f=()=>a;i=s?.then(f,f)??Promise.resolve(a),s=i;var u=E,d=r.is_pending();l&&(r.update_pending_count(1),d||u.increment());const v=(c,h=void 0)=>{s=null,d||u.activate(),h?h!==He&&(o.f|=Q,Te(o,h)):((o.f&Q)!==0&&(o.f^=Q),Te(o,c)),l&&(r.update_pending_count(-1),d||u.decrement()),St()};if(i.then(v,c=>v(null,c||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(a=>{function f(u){function d(){u===i?a(o):f(i)}u.then(d,d)}f(i)})}function tr(e){const t=Je(e);return t.equals=jn,t}function Tt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)U(t[n])}}function nr(e){for(var t=e.parent;t!==null;){if((t.f&O)===0)return t;t=t.parent}return null}function Qe(e){var t,n=g;q(nr(e));try{Tt(e),t=Gt(e)}finally{q(n)}return t}function Ot(e){var t=Qe(e);if(e.equals(t)||(e.v=t,e.wv=Ht()),!ee){var n=(K||(e.f&R)!==0)&&e.deps!==null?H:k;I(e,n)}}const G=new Map;function Se(e,t){var n={f:0,v:e,reactions:null,equals:bt,rv:0,wv:0};return n}function L(e,t){const n=Se(e);return mr(n),n}function M(e,t,n=!1){p!==null&&(!F||(p.f&wt)!==0)&&yt()&&(p.f&(O|ie|Be|wt))!==0&&!B?.includes(e)&&In();let r=n?$(t):t;return Te(e,r)}function Te(e,t){if(!e.equals(t)){var n=e.v;ee?G.set(e,t):G.set(e,n),e.v=t;var r=j.ensure();r.capture(e,n),(e.f&O)!==0&&((e.f&P)!==0&&Qe(e),I(e,(e.f&R)===0?k:H)),e.wv=Ht(),Ct(e,P),g!==null&&(g.f&k)!==0&&(g.f&(z|Z))===0&&(N===null?br([e]):N.push(e))}return t}function pe(e){M(e,e.v+1)}function Ct(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i],s=o.f,l=(s&P)===0;l&&I(o,t),(s&O)!==0?Ct(o,H):l&&((s&ie)!==0&&X!==null&&X.push(o),fe(o))}}function $(e){if(typeof e!="object"||e===null||Ee in e)return e;const t=_t(e);if(t!==vn&&t!==_n)return e;var n=new Map,r=vt(e),i=L(0),o=te,s=l=>{if(te===o)return l();var a=p,f=te;T(null),Bt(o);var u=l();return T(a),Bt(f),u};return r&&n.set("length",L(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Cn();var u=n.get(a);return u===void 0?u=s(()=>{var d=L(f.value);return n.set(a,d),d}):M(u,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const u=s(()=>L(m));n.set(a,u),pe(i)}}else M(f,m),pe(i);return!0},get(l,a,f){if(a===Ee)return e;var u=n.get(a),d=a in l;if(u===void 0&&(!d||re(l,a)?.writable)&&(u=s(()=>{var c=$(d?l[a]:m),h=L(c);return h}),n.set(a,u)),u!==void 0){var v=S(u);return v===m?void 0:v}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var u=n.get(a);u&&(f.value=S(u))}else if(f===void 0){var d=n.get(a),v=d?.v;if(d!==void 0&&v!==m)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(l,a){if(a===Ee)return!0;var f=n.get(a),u=f!==void 0&&f.v!==m||Reflect.has(l,a);if(f!==void 0||g!==null&&(!u||re(l,a)?.writable)){f===void 0&&(f=s(()=>{var v=u?$(l[a]):m,c=L(v);return c}),n.set(a,f));var d=S(f);if(d===m)return!1}return u},set(l,a,f,u){var d=n.get(a),v=a in l;if(r&&a==="length")for(var c=f;c<d.v;c+=1){var h=n.get(c+"");h!==void 0?M(h,m):c in l&&(h=s(()=>L(m)),n.set(c+"",h))}if(d===void 0)(!v||re(l,a)?.writable)&&(d=s(()=>L(void 0)),M(d,$(f)),n.set(a,d));else{v=d.v!==m;var w=s(()=>$(f));M(d,w)}var b=Reflect.getOwnPropertyDescriptor(l,a);if(b?.set&&b.set.call(u,f),!v){if(r&&typeof a=="string"){var D=n.get("length"),_=Number(a);Number.isInteger(_)&&_>=D.v&&M(D,_+1)}pe(i)}return!0},ownKeys(l){S(i);var a=Reflect.ownKeys(l).filter(d=>{var v=n.get(d);return v===void 0||v.v!==m});for(var[f,u]of n)u.v!==m&&!(f in l)&&a.push(f);return a},setPrototypeOf(){An()}})}var At,It,Rt,Pt;function rr(){if(At===void 0){At=window,It=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=re(t,"firstChild").get,Pt=re(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function Ce(e){return Rt.call(e)}function Ae(e){return Pt.call(e)}function Xe(e,t){return Ce(e)}function ir(e,t=!1){{var n=Ce(e);return n instanceof Comment&&n.data===""?Ae(n):n}}function sr(e,t=1,n=!1){let r=e;for(;t--;)r=Ae(r);return r}function or(){return!1}function Nt(e){var t=p,n=g;T(null),q(null);try{return e()}finally{T(t),q(n)}}function ar(e){g===null&&p===null&&Sn(),p!==null&&(p.f&R)!==0&&g===null&&xn(),ee&&kn()}function lr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function V(e,t,n,r=!0){var i=g;i!==null&&(i.f&Y)!==0&&(e|=Y);var o={ctx:C,deps:null,nodes_start:null,nodes_end:null,f:e|P,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{ce(o),o.f|=je}catch(a){throw U(o),a}else t!==null&&fe(o);if(r){var s=o;if(n&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&se)===0&&(s=s.first),s!==null&&(s.parent=i,i!==null&&lr(s,i),p!==null&&(p.f&O)!==0&&(e&Z)===0)){var l=p;(l.effects??=[]).push(s)}}return o}function fr(){return p!==null&&!F}function ur(e){ar();var t=g.f,n=!p&&(t&z)!==0&&(t&je)===0;if(n){var r=C;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return V(qe|wn,e,!1)}function cr(e){j.ensure();const t=V(Z|se,e,!0);return(n={})=>new Promise(r=>{n.outro?ge(t,()=>{U(t),r(void 0)}):(U(t),r(void 0))})}function dr(e){return V(qe,e,!1)}function hr(e){return V(Be|se,e,!0)}function vr(e,t=0){return V(gt|t,e,!0)}function Ie(e,t=[],n=[]){Xn(t,n,r=>{V(gt,()=>e(...r.map(S)),!0)})}function $e(e,t=0){var n=V(ie|t,e,!0);return n}function W(e,t=!0){return V(z|se,e,!0,t)}function Lt(e){var t=e.teardown;if(t!==null){const n=ee,r=p;jt(!0),T(null);try{t.call(null)}finally{jt(n),T(r)}}}function Mt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Nt(()=>{i.abort(He)});var r=n.next;(n.f&Z)!==0?n.parent=null:U(n,t),n=r}}function _r(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&z)===0&&U(t),t=n}}function U(e,t=!0){var n=!1;(t||(e.f&mt)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(pr(e.nodes_start,e.nodes_end),n=!0),Mt(e,t&&!n),Pe(e,0),I(e,J);var r=e.transitions;if(r!==null)for(const o of r)o.stop();Lt(e);var i=e.parent;i!==null&&i.first!==null&&Ft(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function pr(e,t){for(;e!==null;){var n=e===t?null:Ae(e);e.remove(),e=n}}function Ft(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 ge(e,t){var n=[];Ut(e,n,!0),gr(n,()=>{U(e),t&&t()})}function gr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Ut(e,t,n){if((e.f&Y)===0){if(e.f^=Y,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var r=e.first;r!==null;){var i=r.next,o=(r.f&ye)!==0||(r.f&z)!==0;Ut(r,t,o?n:!1),r=i}}}function wr(e){qt(e,!0)}function qt(e,t){if((e.f&Y)!==0){e.f^=Y,(e.f&k)===0&&(I(e,P),fe(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ye)!==0||(n.f&z)!==0;qt(n,i?t:!1),n=r}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}let ue=!1;function zt(e){ue=e}let ee=!1;function jt(e){ee=e}let p=null,F=!1;function T(e){p=e}let g=null;function q(e){g=e}let B=null;function mr(e){p!==null&&(B===null?B=[e]:B.push(e))}let x=null,A=0,N=null;function br(e){N=e}let Wt=1,we=0,te=we;function Bt(e){te=e}let K=!1;function Ht(){return++Wt}function Re(e){var t=e.f;if((t&P)!==0)return!0;if((t&H)!==0){var n=e.deps,r=(t&R)!==0;if(n!==null){var i,o,s=(t&be)!==0,l=r&&g!==null&&!K,a=n.length;if((s||l)&&(g===null||(g.f&J)===0)){var f=e,u=f.parent;for(i=0;i<a;i++)o=n[i],(s||!o?.reactions?.includes(f))&&(o.reactions??=[]).push(f);s&&(f.f^=be),l&&u!==null&&(u.f&R)===0&&(f.f^=R)}for(i=0;i<a;i++)if(o=n[i],Re(o)&&Ot(o),o.wv>e.wv)return!0}(!r||g!==null&&!K)&&I(e,k)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!B?.includes(e))for(var i=0;i<r.length;i++){var o=r[i];(o.f&O)!==0?Yt(o,t,!1):t===o&&(n?I(o,P):(o.f&k)!==0&&I(o,H),fe(o))}}function Gt(e){var t=x,n=A,r=N,i=p,o=K,s=B,l=C,a=F,f=te,u=e.f;x=null,A=0,N=null,K=(u&R)!==0&&(F||!ue||p===null),p=(u&(z|Z))===0?e:null,B=null,oe(e.ctx),F=!1,te=++we,e.ac!==null&&(Nt(()=>{e.ac.abort(He)}),e.ac=null);try{e.f|=We;var d=e.fn,v=d(),c=e.deps;if(x!==null){var h;if(Pe(e,A),c!==null&&A>0)for(c.length=A+x.length,h=0;h<x.length;h++)c[A+h]=x[h];else e.deps=c=x;if(!K||(u&O)!==0&&e.reactions!==null)for(h=A;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&A<c.length&&(Pe(e,A),c.length=A);if(yt()&&N!==null&&!F&&c!==null&&(e.f&(O|H|P))===0)for(h=0;h<N.length;h++)Yt(N[h],e);return i!==null&&i!==e&&(we++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&Q)!==0&&(e.f^=Q),v}catch(w){return Et(w)}finally{e.f^=We,x=t,A=n,N=r,p=i,K=o,B=s,oe(l),F=a,te=f}}function yr(e,t){let n=t.reactions;if(n!==null){var r=cn.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&O)!==0&&(x===null||!x.includes(t))&&(I(t,H),(t.f&(R|be))===0&&(t.f^=be),Tt(t),Pe(t,0))}function Pe(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)yr(e,n[r])}function ce(e){var t=e.f;if((t&J)===0){I(e,k);var n=g,r=ue;g=e,ue=!0;try{(t&ie)!==0?_r(e):Mt(e),Lt(e);var i=Gt(e);e.teardown=typeof i=="function"?i:null,e.wv=Wt;var o;ht&&Wn&&(e.f&P)!==0&&e.deps}finally{ue=r,g=n}}}function S(e){var t=e.f,n=(t&O)!==0;if(p!==null&&!F){var r=g!==null&&(g.f&J)!==0;if(!r&&!B?.includes(e)){var i=p.deps;if((p.f&We)!==0)e.rv<we&&(e.rv=we,x===null&&i!==null&&i[A]===e?A++:x===null?x=[e]:(!K||!x.includes(e))&&x.push(e));else{(p.deps??=[]).push(e);var o=e.reactions;o===null?e.reactions=[p]:o.includes(p)||o.push(p)}}}else if(n&&e.deps===null&&e.effects===null){var s=e,l=s.parent;l!==null&&(l.f&R)===0&&(s.f^=R)}if(ee){if(G.has(e))return G.get(e);if(n){s=e;var a=s.v;return((s.f&k)===0&&s.reactions!==null||Vt(s))&&(a=Qe(s)),G.set(s,a),a}}else n&&(s=e,Re(s)&&Ot(s));if((e.f&Q)!==0)throw e.v;return e.v}function Vt(e){if(e.v===m)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(G.has(t)||(t.f&O)!==0&&Vt(t))return!0;return!1}function et(e){var t=F;try{return F=!0,e()}finally{F=t}}const Er=-7169;function I(e,t){e.f=e.f&Er|t}const kr=["touchstart","touchmove"];function xr(e){return kr.includes(e)}const Kt=new Set,tt=new Set;function Sr(e){for(var t=0;t<e.length;t++)Kt.add(e[t]);for(var n of tt)n(e)}let Zt=null;function Ne(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Zt=e;var s=0,l=Zt===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(s=a)}if(o=i[s]||e.target,o!==t){Ue(e,"currentTarget",{configurable:!0,get(){return o||n}});var u=p,d=g;T(null),q(null);try{for(var v,c=[];o!==null;){var h=o.assignedSlot||o.parentNode||o.host||null;try{var w=o["__"+r];if(w!=null&&(!o.disabled||e.target===o))if(vt(w)){var[b,...D]=w;b.apply(o,[e,...D])}else w.call(o,e)}catch(_){v?c.push(_):v=_}if(e.cancelBubble||h===t||h===null)break;o=h}if(v){for(let _ of c)queueMicrotask(()=>{throw _});throw v}}finally{e.__root=t,delete e.currentTarget,T(u),q(d)}}}function Tr(e){var t;t=document.head.appendChild(Oe());try{$e(()=>e(t),mt)}finally{}}function Or(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function nt(e,t){var n=g;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function me(e,t){var n=(t&Mn)!==0,r=(t&Fn)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Or(o?e:"<!>"+e),n||(i=Ce(i)));var s=r||It?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Ce(s),a=s.lastChild;nt(l,a)}else nt(s,s);return s}}function Cr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Oe();return e.append(t,n),nt(t,n),e}function de(e,t){e!==null&&e.before(t)}function Ar(e,t){return Ir(e,t)}const he=new Map;function Ir(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0}){rr();var l=new Set,a=d=>{for(var v=0;v<d.length;v++){var c=d[v];if(!l.has(c)){l.add(c);var h=xr(c);t.addEventListener(c,Ne,{passive:h});var w=he.get(c);w===void 0?(document.addEventListener(c,Ne,{passive:h}),he.set(c,1)):he.set(c,w+1)}}};a(dn(Kt)),tt.add(a);var f=void 0,u=cr(()=>{var d=n??t.appendChild(Oe());return Zn(d,{pending:()=>{}},v=>{if(o){ke({});var c=C;c.c=o}i&&(r.$$events=i),f=e(v,r)||{},o&&xe()}),()=>{for(var v of l){t.removeEventListener(v,Ne);var c=he.get(v);--c===0?(document.removeEventListener(v,Ne),he.delete(v)):he.set(v,c)}tt.delete(a),d!==n&&d.parentNode?.removeChild(d)}});return Rr.set(f,u),f}let Rr=new WeakMap;function Pr(e,t,n=!1){var r=e,i=null,o=null,s=m,l=n?ye:0,a=!1;const f=(c,h=!0)=>{a=!0,v(h,c)};var u=null;function d(){u!==null&&(u.lastChild.remove(),r.before(u),u=null);var c=s?i:o,h=s?o:i;c&&wr(c),h&&ge(h,()=>{s?o=null:i=null})}const v=(c,h)=>{if(s!==(s=c)){var w=or(),b=r;if(w&&(u=document.createDocumentFragment(),u.append(b=Oe())),s?i??=h&&W(()=>h(b)):o??=h&&W(()=>h(b)),w){var D=E,_=s?i:o,y=s?o:i;_&&D.skipped_effects.delete(_),y&&D.skipped_effects.add(y),D.add_callback(d)}else d()}};$e(()=>{a=!1,t(f),a||v(null,null)},l)}function rt(e,t){dr(()=>{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)}})}const Jt=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Nr(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;(s===0||Jt.includes(r[s-1]))&&(l===r.length||Jt.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function Qt(e,t,n,r,i,o){var s=e.__className;if(s!==n||s===void 0){var l=Nr(n,r,o);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(o&&i!==o)for(var a in o){var f=!!o[a];(i==null||f!==!!i[a])&&e.classList.toggle(a,f)}return o}const Dr=Symbol("is custom element"),Lr=Symbol("is html");function ve(e,t,n,r){var i=Mr(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[bn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Fr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Mr(e){return e.__attributes??={[Dr]:e.nodeName.includes("-"),[Lr]:e.namespaceURI===Un}}var Xt=new Map;function Fr(e){var t=e.getAttribute("is")||e.nodeName,n=Xt.get(t);if(n)return n;Xt.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=hn(i);for(var s in r)r[s].set&&n.push(s);i=_t(i)}return n}let De=!1;function Ur(e){var t=De;try{return De=!1,[e(),De]}finally{De=t}}function it(e,t,n,r){var i=(n&Dn)!==0,o=(n&Ln)!==0,s=r,l=!0,a=()=>(l&&(l=!1,s=o?et(r):r),s),f;if(i){var u=Ee in e||mn in e;f=re(e,t)?.set??(u&&t in e?_=>e[t]=_:void 0)}var d,v=!1;i?[d,v]=Ur(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=a(),f&&(On(),f(d)));var c;if(c=()=>{var _=e[t];return _===void 0?a():(l=!0,_)},(n&Nn)===0)return c;if(f){var h=e.$$legacy;return(function(_,y){return arguments.length>0?((!y||h||v)&&f(y?c():_),_):c()})}var w=!1,b=((n&Pn)!==0?Je:tr)(()=>(w=!1,c()));i&&S(b);var D=g;return(function(_,y){if(arguments.length>0){const ne=y?S(b):i?$(_):_;return M(b,ne),w=!0,s!==void 0&&(s=ne),_}return ee&&w||(D.f&J)!==0?b.v:S(b)})}function $t(e){C===null&&yn(),ur(()=>{const t=et(e);if(typeof t=="function")return t})}const qr="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(qr);var zr=me('<div><iframe id="chat-frame" title="Chat" class="bot svelte-yhk8rr" frameborder="0" allow="microphone; clipboard-write" allowfullscreen=""></iframe></div>'),jr=me(`<p class="svelte-yhk8rr">Please make sure that the script tag has 'id="chatbot"' and the attribute
|
|
3
3
|
'data-server' with the full qualified URL to the chatbot-server.</p> <pre class="svelte-yhk8rr">
|
|
4
4
|
<code class="svelte-yhk8rr">
|
|
5
5
|
<script
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
opacity 100ms 100ms,
|
|
19
19
|
all 150ms;z-index:2147483647;}.bot-border.closed.svelte-yhk8rr {transform:translateY(100vh);opacity:0;}.bot.svelte-yhk8rr {display:block;width:100%;flex:1 0 auto;margin:0;}#chat-frame.svelte-yhk8rr {background-color:var(--body-background-color, white);}
|
|
20
20
|
|
|
21
|
-
@media screen and (min-width: 768px) {#chat-frame.svelte-yhk8rr {border-radius:var(--window-border-radius, 8px);}.bot-border.svelte-yhk8rr {height:var(--window-height, 43em);max-height:calc(100vh - 2em);width:var(--window-width, 25em);top:auto;right:1em;bottom:1em;left:auto;border-radius:var(--window-border-radius, 8px);}.bot-border.closed.svelte-yhk8rr {transform:translateY(var(--window-height, 43em));opacity:0;}
|
|
21
|
+
@media screen and (min-width: 768px) {#chat-frame.svelte-yhk8rr {border-radius:var(--window-border-radius, 8px);}.bot-border.svelte-yhk8rr {height:var(--window-height, 43em);max-height:var(--window-max-height, calc(100vh - 2em));width:var(--window-width, 25em);top:var(--window-top, auto);right:var(--window-right, 1em);bottom:var(--window-bottom, 1em);left:var(--window-left, auto);border-radius:var(--window-border-radius, 8px);}.bot-border.closed.svelte-yhk8rr {transform:translateY(var(--window-height, 43em));opacity:0;}
|
|
22
22
|
}p.svelte-yhk8rr,
|
|
23
|
-
pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function Br(e,t){ke(t,!0),rt(e,Wr),$t(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Cr(),r=ir(n);{var i=s=>{var l=zr();let a;var f=Xe(l);Ie((u,d)=>{a=Qt(l,1,"bot-border svelte-yhk8rr",null,a,u),ve(l,"aria-hidden",t.open?"false":"true"),ve(f,"src",d)},[()=>({closed:!t.open}),()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),de(s,l)},o=s=>{var l=jr();de(s,l)};Pr(r,s=>{t.server?s(i):s(o,!1)})}de(e,n),xe()}function Hr(e,t){const n=e.key;(n==="ArrowDown"||n==="ArrowRight"||n==="Enter"||n===" "||n==="Space")&&(e.stopPropagation(),t.onToggle())}var Yr=
|
|
23
|
+
pre.svelte-yhk8rr {max-width:300px;}pre.svelte-yhk8rr {font-size:0.6em;line-height:0.5;}`};function Br(e,t){ke(t,!0),rt(e,Wr),$t(()=>{document.getElementById("chat-frame")?.addEventListener("load",t.onLoad)});var n=Cr(),r=ir(n);{var i=s=>{var l=zr();let a;var f=Xe(l);Ie((u,d)=>{a=Qt(l,1,"bot-border svelte-yhk8rr",null,a,u),ve(l,"aria-hidden",t.open?"false":"true"),ve(f,"src",d)},[()=>({closed:!t.open}),()=>`${t.server}${t.server.indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(t.referrer??"")}`]),de(s,l)},o=s=>{var l=jr();de(s,l)};Pr(r,s=>{t.server?s(i):s(o,!1)})}de(e,n),xe()}function Hr(e,t){const n=e.key;(n==="ArrowDown"||n==="ArrowRight"||n==="Enter"||n===" "||n==="Space")&&(e.stopPropagation(),t.onToggle())}var Yr=me('<div class="chat-button-wrapper svelte-1xi58vz" tabindex="0" role="button" aria-label="Open chat window"><img class="chat-button svelte-1xi58vz" alt="Open chat window"/></div>');const Gr={hash:"svelte-1xi58vz",code:`.svelte-1xi58vz,
|
|
24
24
|
.svelte-1xi58vz:before,
|
|
25
25
|
.svelte-1xi58vz:after {box-sizing:border-box;}.chat-button-wrapper.svelte-1xi58vz {position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999;}
|
|
26
26
|
|
|
27
27
|
@media screen and (min-width: 768px) {.chat-button-wrapper.svelte-1xi58vz {top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em);}
|
|
28
28
|
}.chat-button.svelte-1xi58vz {display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
|
|
29
|
-
box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function Vr(e,t){ke(t,!0),rt(e,Gr);var n=Yr();n.__click=function(...i){t.onToggle?.apply(this,i)},n.__keydown=[Hr,t];var r=Xe(n);Ie(()=>{ve(n,"aria-expanded",t.open?"true":"false"),ve(r,"src",`${t.assetsUrl}/fab.svg`)}),de(e,n),xe()}Sr(["click","keydown"]);let en=!1;function Kr(e){en=e}function Zr(){return en}/*! js-cookie v3.0.5 | MIT */function Le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Jr={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function st(e,t){function n(i,o,s){if(!(typeof document>"u")){s=Le({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var a in s)s[a]&&(l+="; "+a,s[a]!==!0&&(l+="="+s[a].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var a=o[l].split("="),f=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(s[u]=e.read(f,u),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Le({},o,{expires:-1}))},withAttributes:function(i){return st(this.converter,Le({},this.attributes,i))},withConverter:function(i){return st(Le({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var tn=st(Jr,{path:"/"});const nn="bubble-chat-window-state",rn=()=>{switch(tn.get(nn)){case"open":return!0;case"closed":return!1;default:return}},sn=e=>{const t=new Date(new Date().getTime()+288e5);tn.set(nn,e,{expires:t})},ot=[];let at=rn();function lt(){at=!0,sn("open"),ot.forEach(function(e){e.call(window,!0)})}function Me(){at=!1,sn("closed"),ot.forEach(function(e){e.call(window,!1)})}function on(){at?Me():lt()}function Qr(){ft({type:"RESTART_CHAT"})}function Xr(e){ft({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function $r(e){ft({type:"TRIGGER_STORY",story:e})}function ft(e){document.getElementById("chat-frame")?.contentWindow?.postMessage(e,"*")}function an(e,t){switch(e){case"ON_CHAT_WINDOW_STATE_CHANGE":ot.push(t);break;default:throw new Error("Unsupported event "+e)}}const ei=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:Me,enterGuestMessage:Xr,isChatbotLoaded:Zr,openChatWindow:lt,restartChat:Qr,subscribe:an,toggleChatWindow:on,triggerStory:$r},Symbol.toStringTag,{value:"Module"}));function ti(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}const ni=()=>{ti()&&document.querySelectorAll("html, body").forEach(e=>{e.classList.add("iOS-device")})},ri=e=>{"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},ii=(e,t,n,r,i)=>{window.addEventListener("message",o=>{const s=o.data;switch(s.type){case"webclient.chat.started":e();break;case"webclient.chat.ended":t();break;case"webclient.window.expand":n(s.devices,s.initial);break;case"webclient.window.close":r();break;case"webclient.change.url":i(s.url);break;case"google.tag.event":ri(s.payload);break}},!1)},si=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var oi=
|
|
29
|
+
box-shadow 100ms;}.chat-button.svelte-1xi58vz:hover {box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px);}`};function Vr(e,t){ke(t,!0),rt(e,Gr);var n=Yr();n.__click=function(...i){t.onToggle?.apply(this,i)},n.__keydown=[Hr,t];var r=Xe(n);Ie(()=>{ve(n,"aria-expanded",t.open?"true":"false"),ve(r,"src",`${t.assetsUrl}/fab.svg`)}),de(e,n),xe()}Sr(["click","keydown"]);let en=!1;function Kr(e){en=e}function Zr(){return en}/*! js-cookie v3.0.5 | MIT */function Le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Jr={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function st(e,t){function n(i,o,s){if(!(typeof document>"u")){s=Le({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var a in s)s[a]&&(l+="; "+a,s[a]!==!0&&(l+="="+s[a].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var a=o[l].split("="),f=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(s[u]=e.read(f,u),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Le({},o,{expires:-1}))},withAttributes:function(i){return st(this.converter,Le({},this.attributes,i))},withConverter:function(i){return st(Le({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var tn=st(Jr,{path:"/"});const nn="bubble-chat-window-state",rn=()=>{switch(tn.get(nn)){case"open":return!0;case"closed":return!1;default:return}},sn=e=>{const t=new Date(new Date().getTime()+288e5);tn.set(nn,e,{expires:t})},ot=[];let at=rn();function lt(){at=!0,sn("open"),ot.forEach(function(e){e.call(window,!0)})}function Me(){at=!1,sn("closed"),ot.forEach(function(e){e.call(window,!1)})}function on(){at?Me():lt()}function Qr(){ft({type:"RESTART_CHAT"})}function Xr(e){ft({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function $r(e){ft({type:"TRIGGER_STORY",story:e})}function ft(e){document.getElementById("chat-frame")?.contentWindow?.postMessage(e,"*")}function an(e,t){switch(e){case"ON_CHAT_WINDOW_STATE_CHANGE":ot.push(t);break;default:throw new Error("Unsupported event "+e)}}const ei=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:Me,enterGuestMessage:Xr,isChatbotLoaded:Zr,openChatWindow:lt,restartChat:Qr,subscribe:an,toggleChatWindow:on,triggerStory:$r},Symbol.toStringTag,{value:"Module"}));function ti(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}const ni=()=>{ti()&&document.querySelectorAll("html, body").forEach(e=>{e.classList.add("iOS-device")})},ri=e=>{"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},ii=(e,t,n,r,i)=>{window.addEventListener("message",o=>{const s=o.data;switch(s.type){case"webclient.chat.started":e();break;case"webclient.chat.ended":t();break;case"webclient.window.expand":n(s.devices,s.initial);break;case"webclient.window.close":r();break;case"webclient.change.url":i(s.url);break;case"google.tag.event":ri(s.payload);break}},!1)},si=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))});var oi=me('<link rel="stylesheet"/>'),ai=me("<div><!> <!></div>");const li={hash:"svelte-1n46o8q",code:".bubble-chat.svelte-1n46o8q {font-size:16px;visibility:hidden;opacity:0;}.bubble-chat.chatbot-ready.svelte-1n46o8q {visibility:visible;opacity:1;}"};function fi(e,t){ke(t,!0),rt(e,li);let n=it(t,"assetsUrl",19,()=>t.server?t.server.split("?")[0]:void 0),r=it(t,"linkHandling",3,"default"),i=it(t,"chatStarted",7,!1);const o="chatbot-style";let s=L(!1),l=L(!1);ni();let a=L($(rn()));an("ON_CHAT_WINDOW_STATE_CHANGE",function(y){M(a,y,!0)});function f(){i(!0)}function u(){i(!1)}function d(_,y){const ne=window.innerWidth,ct=_==null||_==="all",dt=_==="desktop"&&ne>=768,vi=_==="mobile"&&ne<768,_i=ct||dt||vi;(y?S(a)!==!1:!0)&&_i&<()}function v(){Me()}function c(_){const y=window.innerWidth,ne=window.location.hostname,ct=new URL(_).hostname,dt=ne===ct;y<768&&Me(),r()==="new-tab"?window.open(_,"_blank"):r()==="existing-tab"||dt?document.location.href=_:window.open(_,"_blank")}function h(){M(l,!0)}ii(f,u,d,v,c),$t(async()=>{M(s,await si(o),!0)});var w=ai();Tr(_=>{var y=oi();ve(y,"id",o),Ie(()=>ve(y,"href",`${n()}/custom.css`)),de(_,y)});var b=Xe(w);Vr(b,{get assetsUrl(){return n()},get open(){return S(a)},get onToggle(){return on}});var D=sr(b,2);Br(D,{get server(){return t.server},get referrer(){return t.referrer},get open(){return S(a)},onLoad:h}),Ie(()=>Qt(w,1,`bubble-chat ${S(s)&&S(l)?"chatbot-ready":""}`,"svelte-1n46o8q")),de(e,w),xe()}const ui=e=>e.replace(/\/embed\/bundle\.js/,""),ci=e=>e.dataset?.server,di=e=>{if(e&&"src"in e&&typeof e.src=="string")return ci(e)||ui(e.src)},ut=document.querySelector("script#chatbot"),ln=di(ut),hi=ut?.getAttribute("link-handling")?ut.getAttribute("link-handling"):"default";window.chatbot=ei;const fn=()=>{console.log("Chatbot is loading from",ln),Ar(fi,{target:document.body,props:{server:ln,referrer:window.location.href,linkHandling:hi}}),Kr(!0)},un=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(fn,500):setTimeout(()=>{un(e+1)},500)};un();const Fe=document.getElementById("chatbot");Fe&&"src"in Fe&&typeof Fe.src=="string"&&Fe.src.indexOf("caller=bookmarklet")>0&&setTimeout(fn,500)})();
|
package/dist/index.js
CHANGED
|
@@ -52,11 +52,19 @@ exports.default = (clientName, environment, props) => async (bot) => {
|
|
|
52
52
|
});
|
|
53
53
|
// serve embed resources
|
|
54
54
|
bot.webserver.express.get(`/${clientName}/embed`, (req, res) => {
|
|
55
|
-
const lang = req.query['lang'] || undefined;
|
|
56
55
|
const server = `${bot.webserver.baseUrl}/${clientName}`;
|
|
57
|
-
const
|
|
56
|
+
const serverUrl = new URL(server);
|
|
57
|
+
// Pass all query parameters to the chatbot URL
|
|
58
|
+
for (const [key, value] of Object.entries(req.query)) {
|
|
59
|
+
if (Array.isArray(value)) {
|
|
60
|
+
value.forEach((v) => serverUrl.searchParams.append(key, String(v)));
|
|
61
|
+
}
|
|
62
|
+
else if (value !== undefined) {
|
|
63
|
+
serverUrl.searchParams.append(key, String(value));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
58
66
|
res.set('Content-Type', 'text/html; charset=utf-8');
|
|
59
|
-
res.write((0, views_1.default)(
|
|
67
|
+
res.write((0, views_1.default)(serverUrl.toString(), `${server}/embed/bundle.js`));
|
|
60
68
|
res.end();
|
|
61
69
|
});
|
|
62
70
|
if (!isFabVisible(props)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.100.2",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@botfabrik/engine-domain": "^4.99.10",
|
|
24
|
-
"@botfabrik/engine-transcript-export": "^4.
|
|
24
|
+
"@botfabrik/engine-transcript-export": "^4.100.0",
|
|
25
25
|
"@botfabrik/engine-utils": "^4.99.10",
|
|
26
26
|
"@google-cloud/speech": "^7.2.0",
|
|
27
27
|
"@node-saml/passport-saml": "^5.1.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"tsx": "^4.20.5",
|
|
44
44
|
"typescript": "5.9.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a66453b23b29ddaa38cbedba6001233e60d824f9"
|
|
47
47
|
}
|