@liip/liipgpt 0.0.22 → 0.0.23

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.
@@ -1,21 +1,9 @@
1
- var LiipGPTChat=function(Xe){"use strict";var Aw=Object.defineProperty;var Rw=Object.getPrototypeOf;var Iw=Reflect.get;var mh=Xe=>{throw TypeError(Xe)};var Ow=(Xe,at,pt)=>at in Xe?Aw(Xe,at,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Xe[at]=pt;var q=(Xe,at,pt)=>Ow(Xe,typeof at!="symbol"?at+"":at,pt),Ec=(Xe,at,pt)=>at.has(Xe)||mh("Cannot "+pt);var S=(Xe,at,pt)=>(Ec(Xe,at,"read from private field"),pt?pt.call(Xe):at.get(Xe)),W=(Xe,at,pt)=>at.has(Xe)?mh("Cannot add the same private member more than once"):at instanceof WeakSet?at.add(Xe):at.set(Xe,pt),Ct=(Xe,at,pt,Kn)=>(Ec(Xe,at,"write to private field"),Kn?Kn.call(Xe,pt):at.set(Xe,pt),pt),Wn=(Xe,at,pt)=>(Ec(Xe,at,"access private method"),pt);var vh=(Xe,at,pt)=>Iw(Rw(Xe),pt,at);var ln,hr,Ma,Da,Vr,Gr,cn,No,Ls,Po,Fa,za,Ba,qa,un,ja,$a,Za,Ua,Ha,Va,Ga,Wa,Ka,ss,ls,cs,us,ds,fs,hs,ps,gs,ms,Lo,Un,En,Mo,Do,Cn,Ya,Qa,dn,vs,Fo,bh,bs,zo,ys,ws,_s,ks,Ja,yh,xs,Ss,Ts,Es,Bo,Xa,Cs,wh,As,ei,ti,Rs,qo,jo,$o,Zo,Is,Os,Ns,Hn,Ps;const at="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(at);const pt=1,Kn=2,Cc=4,_h=8,kh=16,xh=1,Sh=2,Ac=4,Th=8,Eh=16,Ch=1,Ah=2,Rh=4,Ih=1,Oh=2,Ms="[",Ds="[!",Fs="]",Yn={},Ot=Symbol();function Nh(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Ph=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Lh(t){return Ph.includes(t)}const Mh={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Dh(t){return t=t.toLowerCase(),Mh[t]??t}const Fh=["touchstart","touchmove"];function zh(t){return Fh.includes(t)}const Rc=!1;var zs=Array.isArray,Bs=Array.from,ii=Object.keys,si=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,Ic=Object.getOwnPropertyDescriptors,Bh=Object.prototype,qh=Array.prototype,qs=Object.getPrototypeOf;function Qn(t){return typeof t=="function"}const Ge=()=>{};function jh(t){return typeof(t==null?void 0:t.then)=="function"}function $h(t){return t()}function Wo(t){for(var e=0;e<t.length;e++)t[e]()}const pr=2,Oc=4,Ko=8,li=16,gr=32,Jn=64,js=128,In=256,ci=512,Ft=1024,hn=2048,Xn=4096,Or=8192,eo=16384,Nc=32768,to=65536,Zh=1<<17,Pc=1<<19,Lc=1<<20,Nr=Symbol("$state"),$s=Symbol("legacy props"),Uh=Symbol("");function Mc(t){return t===this.v}function ui(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Hh(t,e){return t!==e}function Zs(t){return!ui(t,this.v)}function Vh(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Gh(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Wh(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Kh(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Yh(){throw new Error("https://svelte.dev/e/hydration_failed")}function Qh(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Jh(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xh(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ep(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function tp(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ro=!1;function rp(){ro=!0}function gt(t,e){var r={f:0,v:t,reactions:null,equals:Mc,version:0};return r}function Ie(t){return Dc(gt(t))}function On(t,e=!1){var n;const r=gt(t);return e||(r.equals=Zs),ro&&ze!==null&&ze.l!==null&&((n=ze.l).s??(n.s=[])).push(r),r}function We(t,e=!1){return Dc(On(t,e))}function Dc(t){return Ke!==null&&Ke.f&pr&&(Lr===null?hp([t]):Lr.push(t)),t}function A(t,e){return Ke!==null&&io()&&Ke.f&(pr|li)&&(Lr===null||!Lr.includes(t))&&tp(),no(t,e)}function no(t,e){return t.equals(e)||(t.v=e,t.version=iu(),Fc(t,hn),io()&&Pe!==null&&Pe.f&Ft&&!(Pe.f&gr)&&(Pt!==null&&Pt.includes(t)?(yr(Pe,hn),vi(Pe)):pn===null?pp([t]):pn.push(t))),e}function Fc(t,e){var r=t.reactions;if(r!==null)for(var n=io(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;s&hn||!n&&i===Pe||(yr(i,e),s&(Ft|In)&&(s&pr?Fc(i,Xn):vi(i)))}}function di(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let ve=!1;function mr(t){ve=t}let De;function zt(t){if(t===null)throw di(),Yn;return De=t}function Pr(){return zt(vr(De))}function O(t){if(ve){if(vr(De)!==null)throw di(),Yn;De=t}}function Us(){for(var t=0,e=De;;){if(e.nodeType===8){var r=e.data;if(r===Fs){if(t===0)return e;t-=1}else(r===Ms||r===Ds)&&(t+=1)}var n=vr(e);e.remove(),e=n}}function Se(t,e=null,r){if(typeof t!="object"||t===null||Nr in t)return t;const n=qs(t);if(n!==Bh&&n!==qh)return t;var o=new Map,a=zs(t),i=gt(0);a&&o.set("length",gt(t.length));var s;return new Proxy(t,{defineProperty(l,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Jh();var d=o.get(c);return d===void 0?(d=gt(u.value),o.set(c,d)):A(d,Se(u.value,s)),!0},deleteProperty(l,c){var u=o.get(c);if(u===void 0)c in l&&o.set(c,gt(Ot));else{if(a&&typeof c=="string"){var d=o.get("length"),f=Number(c);Number.isInteger(f)&&f<d.v&&A(d,f)}A(u,Ot),zc(i)}return!0},get(l,c,u){var h;if(c===Nr)return t;var d=o.get(c),f=c in l;if(d===void 0&&(!f||(h=Wr(l,c))!=null&&h.writable)&&(d=gt(Se(f?l[c]:Ot,s)),o.set(c,d)),d!==void 0){var v=p(d);return v===Ot?void 0:v}return Reflect.get(l,c,u)},getOwnPropertyDescriptor(l,c){var u=Reflect.getOwnPropertyDescriptor(l,c);if(u&&"value"in u){var d=o.get(c);d&&(u.value=p(d))}else if(u===void 0){var f=o.get(c),v=f==null?void 0:f.v;if(f!==void 0&&v!==Ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return u},has(l,c){var v;if(c===Nr)return!0;var u=o.get(c),d=u!==void 0&&u.v!==Ot||Reflect.has(l,c);if(u!==void 0||Pe!==null&&(!d||(v=Wr(l,c))!=null&&v.writable)){u===void 0&&(u=gt(d?Se(l[c],s):Ot),o.set(c,u));var f=p(u);if(f===Ot)return!1}return d},set(l,c,u,d){var w;var f=o.get(c),v=c in l;if(a&&c==="length")for(var h=u;h<f.v;h+=1){var m=o.get(h+"");m!==void 0?A(m,Ot):h in l&&(m=gt(Ot),o.set(h+"",m))}f===void 0?(!v||(w=Wr(l,c))!=null&&w.writable)&&(f=gt(void 0),A(f,Se(u,s)),o.set(c,f)):(v=f.v!==Ot,A(f,Se(u,s)));var y=Reflect.getOwnPropertyDescriptor(l,c);if(y!=null&&y.set&&y.set.call(d,u),!v){if(a&&typeof c=="string"){var g=o.get("length"),b=Number(c);Number.isInteger(b)&&b>=g.v&&A(g,b+1)}zc(i)}return!0},ownKeys(l){p(i);var c=Reflect.ownKeys(l).filter(f=>{var v=o.get(f);return v===void 0||v.v!==Ot});for(var[u,d]of o)d.v!==Ot&&!(u in l)&&c.push(u);return c},setPrototypeOf(){Xh()}})}function zc(t,e=1){A(t,t.v+e)}function Bc(t){return t!==null&&typeof t=="object"&&Nr in t?t[Nr]:t}function np(t,e){return Object.is(Bc(t),Bc(e))}var Yo,qc,jc;function Hs(){if(Yo===void 0){Yo=window;var t=Element.prototype,e=Node.prototype;qc=Wr(e,"firstChild").get,jc=Wr(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Kr(t=""){return document.createTextNode(t)}function ar(t){return qc.call(t)}function vr(t){return jc.call(t)}function P(t,e){if(!ve)return ar(t);var r=ar(De);if(r===null)r=De.appendChild(Kr());else if(e&&r.nodeType!==3){var n=Kr();return r==null||r.before(n),zt(n),n}return zt(r),r}function V(t,e){if(!ve){var r=ar(t);return r instanceof Comment&&r.data===""?vr(r):r}return De}function ie(t,e=1,r=!1){let n=ve?De:t;for(var o;e--;)o=n,n=vr(n);if(!ve)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var i=Kr();return n===null?o==null||o.after(i):n.before(i),zt(i),i}return zt(n),n}function Vs(t){t.textContent=""}function Te(t){var e=pr|hn;Pe===null?e|=In:Pe.f|=Lc;var r=Ke!==null&&Ke.f&pr?Ke:null;const n={children:null,ctx:ze,deps:null,equals:Mc,f:e,fn:t,reactions:null,v:null,version:0,parent:r??Pe};return r!==null&&(r.children??(r.children=[])).push(n),n}function Nt(t){const e=Te(t);return e.equals=Zs,e}function $c(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&pr?Gs(n):br(n)}}}function op(t){for(var e=t.parent;e!==null;){if(!(e.f&pr))return e;e=e.parent}return null}function Zc(t){var e,r=Pe;Vt(op(t));try{$c(t),e=su(t)}finally{Vt(r)}return e}function Uc(t){var e=Zc(t),r=(gn||t.f&In)&&t.deps!==null?Xn:Ft;yr(t,r),t.equals(e)||(t.v=e,t.version=iu())}function Gs(t){$c(t),ea(t,0),yr(t,eo),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Hc(t){Pe===null&&Ke===null&&Wh(),Ke!==null&&Ke.f&In&&Gh(),tl&&Vh()}function ap(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Nn(t,e,r,n=!0){var o=(t&Jn)!==0,a=Pe,i={ctx:ze,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|hn,first:null,fn:e,last:null,next:null,parent:o?null:a,prev:null,teardown:null,transitions:null,version:0};if(r){var s=oo;try{ru(!0),ta(i),i.f|=Nc}catch(u){throw br(i),u}finally{ru(s)}}else e!==null&&vi(i);var l=r&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&Lc)===0;if(!l&&!o&&n&&(a!==null&&ap(i,a),Ke!==null&&Ke.f&pr)){var c=Ke;(c.children??(c.children=[])).push(i)}return i}function ip(){return Ke===null?!1:!gn}function Ws(t){const e=Nn(Ko,null,!1);return yr(e,Ft),e.teardown=t,e}function wt(t){Hc();var e=Pe!==null&&(Pe.f&gr)!==0&&ze!==null&&!ze.m;if(e){var r=ze;(r.e??(r.e=[])).push({fn:t,effect:Pe,reaction:Ke})}else{var n=Qo(t);return n}}function Ks(t){return Hc(),Yr(t)}function Vc(t){const e=Nn(Jn,t,!0);return()=>{br(e)}}function sp(t){const e=Nn(Jn,t,!0);return(r={})=>new Promise(n=>{r.outro?Jr(e,()=>{br(e),n(void 0)}):(br(e),n(void 0))})}function Qo(t){return Nn(Oc,t,!1)}function $e(t,e){var r=ze,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=Yr(()=>{t(),!n.ran&&(n.ran=!0,A(r.l.r2,!0),Gt(e))})}function Ys(){var t=ze;Yr(()=>{if(p(t.l.r2)){for(var e of t.l.r1){var r=e.effect;r.f&Ft&&yr(r,Xn),so(r)&&ta(r),e.ran=!1}t.l.r2.v=!1}})}function Yr(t){return Nn(Ko,t,!0)}function se(t){return Qr(t)}function Qr(t,e=0){return Nn(Ko|li|e,t,!0)}function Jt(t,e=!0){return Nn(Ko|gr,t,!0,e)}function Gc(t){var e=t.teardown;if(e!==null){const r=tl,n=Ke;nu(!0),ir(null);try{e.call(null)}finally{nu(r),ir(n)}}}function Wc(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)Gs(e[r])}}function Kc(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;br(r,e),r=n}}function lp(t){for(var e=t.first;e!==null;){var r=e.next;e.f&gr||br(e),e=r}}function br(t,e=!0){var r=!1;if((e||t.f&Pc)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var a=n===o?null:vr(n);n.remove(),n=a}r=!0}Kc(t,e&&!r),Wc(t),ea(t,0),yr(t,eo);var i=t.transitions;if(i!==null)for(const l of i)l.stop();Gc(t);var s=t.parent;s!==null&&s.first!==null&&Yc(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Yc(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Jr(t,e){var r=[];Qs(t,r,!0),Qc(r,()=>{br(t),e&&e()})}function Qc(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function Qs(t,e,r){if(!(t.f&Or)){if(t.f^=Or,t.transitions!==null)for(const i of t.transitions)(i.is_global||r)&&e.push(i);for(var n=t.first;n!==null;){var o=n.next,a=(n.f&to)!==0||(n.f&gr)!==0;Qs(n,e,a?r:!1),n=o}}}function Pn(t){Jc(t,!0)}function Jc(t,e){if(t.f&Or){so(t)&&ta(t),t.f^=Or;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&to)!==0||(r.f&gr)!==0;Jc(r,o?e:!1),r=n}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||e)&&a.in()}}const cp=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let fi=!1,hi=!1,Js=[],Xs=[];function Xc(){fi=!1;const t=Js.slice();Js=[],Wo(t)}function eu(){hi=!1;const t=Xs.slice();Xs=[],Wo(t)}function Xr(t){fi||(fi=!0,queueMicrotask(Xc)),Js.push(t)}function up(t){hi||(hi=!0,cp(eu)),Xs.push(t)}function dp(){fi&&Xc(),hi&&eu()}function el(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const tu=0,fp=1;let pi=!1,gi=tu,Jo=!1,Xo=null,oo=!1,tl=!1;function ru(t){oo=t}function nu(t){tl=t}let Ln=[],ao=0,Nw=[],Ke=null;function ir(t){Ke=t}let Pe=null;function Vt(t){Pe=t}let Lr=null;function hp(t){Lr=t}let Pt=null,Xt=0,pn=null;function pp(t){pn=t}let ou=1,gn=!1,ze=null;function au(t){ze=t}function iu(){return++ou}function io(){return!ro||ze!==null&&ze.l===null}function so(t){var i,s;var e=t.f;if(e&hn)return!0;if(e&Xn){var r=t.deps,n=(e&In)!==0;if(r!==null){var o;if(e&ci){for(o=0;o<r.length;o++)((i=r[o]).reactions??(i.reactions=[])).push(t);t.f^=ci}for(o=0;o<r.length;o++){var a=r[o];if(so(a)&&Uc(a),n&&Pe!==null&&!gn&&!((s=a==null?void 0:a.reactions)!=null&&s.includes(t))&&(a.reactions??(a.reactions=[])).push(t),a.version>t.version)return!0}}(!n||Pe!==null&&!gn)&&yr(t,Ft)}return!1}function gp(t,e){for(var r=e;r!==null;){if(r.f&js)try{r.fn(t);return}catch{r.f^=js}r=r.parent}throw pi=!1,t}function mp(t){return(t.f&eo)===0&&(t.parent===null||(t.parent.f&js)===0)}function mi(t,e,r,n){if(pi){if(r===null&&(pi=!1),mp(e))throw t;return}r!==null&&(pi=!0);{gp(t,e);return}}function su(t){var f;var e=Pt,r=Xt,n=pn,o=Ke,a=gn,i=Lr,s=ze,l=t.f;Pt=null,Xt=0,pn=null,Ke=l&(gr|Jn)?null:t,gn=!oo&&(l&In)!==0,Lr=null,ze=t.ctx;try{var c=(0,t.fn)(),u=t.deps;if(Pt!==null){var d;if(ea(t,Xt),u!==null&&Xt>0)for(u.length=Xt+Pt.length,d=0;d<Pt.length;d++)u[Xt+d]=Pt[d];else t.deps=u=Pt;if(!gn)for(d=Xt;d<u.length;d++)((f=u[d]).reactions??(f.reactions=[])).push(t)}else u!==null&&Xt<u.length&&(ea(t,Xt),u.length=Xt);return c}finally{Pt=e,Xt=r,pn=n,Ke=o,gn=a,Lr=i,ze=s}}function vp(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&pr&&(Pt===null||!Pt.includes(e))&&(yr(e,Xn),e.f&(In|ci)||(e.f^=ci),ea(e,0))}function ea(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)vp(t,r[n])}function ta(t){var e=t.f;if(!(e&eo)){yr(t,Ft);var r=Pe,n=ze;Pe=t;try{e&li?lp(t):Kc(t),Wc(t),Gc(t);var o=su(t);t.teardown=typeof o=="function"?o:null,t.version=ou}catch(a){mi(a,t,r,n||t.ctx)}finally{Pe=r}}}function lu(){if(ao>1e3){ao=0;try{Kh()}catch(t){if(Xo!==null)mi(t,Xo,null);else throw t}}ao++}function cu(t){var e=t.length;if(e!==0){lu();var r=oo;oo=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&Ft||(o.f^=Ft);var a=[];uu(o,a),bp(a)}}finally{oo=r}}}function bp(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(eo|Or)))try{so(n)&&(ta(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Yc(n):n.fn=null))}catch(o){mi(o,n,null,n.ctx)}}}function yp(){if(Jo=!1,ao>1001)return;const t=Ln;Ln=[],cu(t),Jo||(ao=0,Xo=null)}function vi(t){gi===tu&&(Jo||(Jo=!0,queueMicrotask(yp))),Xo=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(Jn|gr)){if(!(r&Ft))return;e.f^=Ft}}Ln.push(e)}function uu(t,e){var r=t.first,n=[];e:for(;r!==null;){var o=r.f,a=(o&gr)!==0,i=a&&(o&Ft)!==0,s=r.next;if(!i&&!(o&Or))if(o&Ko){if(a)r.f^=Ft;else try{so(r)&&ta(r)}catch(d){mi(d,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}else o&Oc&&n.push(r);if(s===null){let d=r.parent;for(;d!==null;){if(t===d)break e;var c=d.next;if(c!==null){r=c;continue e}d=d.parent}}r=s}for(var u=0;u<n.length;u++)l=n[u],e.push(l),uu(l,e)}function _(t){var e=gi,r=Ln;try{lu();const o=[];gi=fp,Ln=o,Jo=!1,cu(r);var n=t==null?void 0:t();return dp(),(Ln.length>0||o.length>0)&&_(),ao=0,Xo=null,n}finally{gi=e,Ln=r}}async function rl(){await Promise.resolve(),_()}function p(t){var u;var e=t.f,r=(e&pr)!==0;if(r&&e&eo){var n=Zc(t);return Gs(t),n}if(Ke!==null){Lr!==null&&Lr.includes(t)&&ep();var o=Ke.deps;Pt===null&&o!==null&&o[Xt]===t?Xt++:Pt===null?Pt=[t]:Pt.push(t),pn!==null&&Pe!==null&&Pe.f&Ft&&!(Pe.f&gr)&&pn.includes(t)&&(yr(Pe,hn),vi(Pe))}else if(r&&t.deps===null)for(var a=t,i=a.parent,s=a;i!==null;)if(i.f&pr){var l=i;s=l,i=l.parent}else{var c=i;(u=c.deriveds)!=null&&u.includes(s)||(c.deriveds??(c.deriveds=[])).push(s);break}return r&&(a=t,so(a)&&Uc(a)),t.v}function Gt(t){const e=Ke;try{return Ke=null,t()}finally{Ke=e}}const wp=~(hn|Xn|Ft);function yr(t,e){t.f=t.f&wp|e}function du(t){return nl().get(t)}function _p(t,e){return nl().set(t,e),e}function kp(t){return nl().has(t)}function nl(t){return ze===null&&el(),ze.c??(ze.c=new Map(xp(ze)||void 0))}function xp(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}function fu(t,e=1){var r=p(t),n=e===1?r++:r--;return A(t,r),n}function Ae(t,e=!1,r){ze={p:ze,c:null,e:null,m:!1,s:t,x:null,l:null},ro&&!e&&(ze.l={s:null,u:null,r1:[],r2:gt(!1)})}function Re(t){const e=ze;if(e!==null){t!==void 0&&(e.x=t);const i=e.e;if(i!==null){var r=Pe,n=Ke;e.e=null;try{for(var o=0;o<i.length;o++){var a=i[o];Vt(a.effect),ir(a.reaction),Qo(a.fn)}}finally{Vt(r),ir(n)}}ze=e.p,e.m=!0}return t||{}}function Ue(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Nr in t)ol(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Nr in r&&ol(r)}}}function ol(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{ol(t[n],e)}catch{}const r=qs(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Ic(r);for(let o in n){const a=n[o].get;if(a)try{a.call(t)}catch{}}}}}function Sp(t,e){if(e){const r=document.body;t.autofocus=!0,Xr(()=>{document.activeElement===r&&t.focus()})}}function hu(t){ve&&ar(t)!==null&&Vs(t)}let pu=!1;function gu(){pu||(pu=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const r of t.target.elements)(e=r.__on_r)==null||e.call(r)})},{capture:!0}))}function mu(t){var e=Ke,r=Pe;ir(null),Vt(null);try{return t()}finally{ir(e),Vt(r)}}function vu(t,e,r,n=r){t.addEventListener(e,()=>mu(r));const o=t.__on_r;o?t.__on_r=()=>{o(),n(!0)}:t.__on_r=()=>n(!0),gu()}const bu=new Set,al=new Set;function il(t,e,r,n){function o(a){if(n.capture||ra.call(e,a),!a.cancelBubble)return mu(()=>r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Xr(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function Lt(t,e,r,n={}){var o=il(e,t,r,n);return()=>{t.removeEventListener(e,o,n)}}function st(t,e,r,n,o){var a={capture:n,passive:o},i=il(t,e,r,a);(e===document.body||e===window||e===document)&&Ws(()=>{e.removeEventListener(t,i,a)})}function lo(t){for(var e=0;e<t.length;e++)bu.add(t[e]);for(var r of al)r(t)}function ra(t){var b;var e=this,r=e.ownerDocument,n=t.type,o=((b=t.composedPath)==null?void 0:b.call(t))||[],a=o[0]||t.target,i=0,s=t.__root;if(s){var l=o.indexOf(s);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=o.indexOf(e);if(c===-1)return;l<=c&&(i=l)}if(a=o[i]||t.target,a!==e){si(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=Ke,d=Pe;ir(null),Vt(null);try{for(var f,v=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var m=a["__"+n];if(m!==void 0&&!a.disabled)if(zs(m)){var[y,...g]=m;y.apply(a,[t,...g])}else m.call(a,t)}catch(w){f?v.push(w):f=w}if(t.cancelBubble||h===e||h===null)break;a=h}if(f){for(let w of v)queueMicrotask(()=>{throw w});throw f}}finally{t.__root=e,delete t.currentTarget,ir(u),Vt(d)}}}let sr;function Tp(){sr=void 0}function yu(t){let e=null,r=ve;var n;if(ve){for(e=De,sr===void 0&&(sr=ar(document.head));sr!==null&&(sr.nodeType!==8||sr.data!==Ms);)sr=vr(sr);sr===null?mr(!1):sr=zt(vr(sr))}ve||(n=document.head.appendChild(Kr()));try{Qr(()=>t(n),Pc)}finally{r&&(mr(!0),sr=De,zt(e))}}function sl(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function lr(t,e){var r=Pe;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Y(t,e){var r=(e&Ih)!==0,n=(e&Oh)!==0,o,a=!t.startsWith("<!>");return()=>{if(ve)return lr(De,null),De;o===void 0&&(o=sl(a?t:"<!>"+t),r||(o=ar(o)));var i=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=ar(i),l=i.lastChild;lr(s,l)}else lr(i,i);return i}}function bi(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,a;return()=>{if(ve)return lr(De,null),De;if(!a){var i=sl(o),s=ar(i);a=ar(s)}var l=a.cloneNode(!0);return lr(l,l),l}}function co(t=""){if(!ve){var e=Kr(t+"");return lr(e,e),e}var r=De;return r.nodeType!==3&&(r.before(r=Kr()),zt(r)),lr(r,r),r}function ne(){if(ve)return lr(De,null),De;var t=document.createDocumentFragment(),e=document.createComment(""),r=Kr();return t.append(e,r),lr(e,r),t}function T(t,e){if(ve){Pe.nodes_end=De,Pr();return}t!==null&&t.before(e)}let ll=!0;function He(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function wu(t,e){return _u(t,e)}function Ep(t,e){Hs(),e.intro=e.intro??!1;const r=e.target,n=ve,o=De;try{for(var a=ar(r);a&&(a.nodeType!==8||a.data!==Ms);)a=vr(a);if(!a)throw Yn;mr(!0),zt(a),Pr();const i=_u(t,{...e,anchor:a});if(De===null||De.nodeType!==8||De.data!==Fs)throw di(),Yn;return mr(!1),i}catch(i){if(i===Yn)return e.recover===!1&&Yh(),Hs(),Vs(r),mr(!1),wu(t,e);throw i}finally{mr(n),zt(o),Tp()}}const uo=new Map;function _u(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){Hs();var s=new Set,l=d=>{for(var f=0;f<d.length;f++){var v=d[f];if(!s.has(v)){s.add(v);var h=zh(v);e.addEventListener(v,ra,{passive:h});var m=uo.get(v);m===void 0?(document.addEventListener(v,ra,{passive:h}),uo.set(v,1)):uo.set(v,m+1)}}};l(Bs(bu)),al.add(l);var c=void 0,u=sp(()=>{var d=r??e.appendChild(Kr());return Jt(()=>{if(a){Ae({});var f=ze;f.c=a}o&&(n.$$events=o),ve&&lr(d,null),ll=i,c=t(d,n)||{},ll=!0,ve&&(Pe.nodes_end=De),a&&Re()}),()=>{var h;for(var f of s){e.removeEventListener(f,ra);var v=uo.get(f);--v===0?(document.removeEventListener(f,ra),uo.delete(f)):uo.set(f,v)}al.delete(l),d!==r&&((h=d.parentNode)==null||h.removeChild(d))}});return cl.set(c,u),c}let cl=new WeakMap;function Cp(t,e){const r=cl.get(t);return r?(cl.delete(t),r(e)):Promise.resolve()}const ul=0,yi=1,dl=2;function Ap(t,e,r,n,o){ve&&Pr();var a=t,i=io(),s=ze,l=Ot,c,u,d,f=(i?gt:On)(void 0),v=(i?gt:On)(void 0),h=!1;function m(g,b){h=!0,b&&(Vt(y),ir(y),au(s));try{g===ul&&r&&(c?Pn(c):c=Jt(()=>r(a))),g===yi&&n&&(u?Pn(u):u=Jt(()=>n(a,f))),g===dl&&o&&(d?Pn(d):d=Jt(()=>o(a,v))),g!==ul&&c&&Jr(c,()=>c=null),g!==yi&&u&&Jr(u,()=>u=null),g!==dl&&d&&Jr(d,()=>d=null)}finally{b&&(au(null),ir(null),Vt(null),_())}}var y=Qr(()=>{if(l!==(l=e())){if(jh(l)){var g=l;h=!1,g.then(b=>{g===l&&(no(f,b),m(yi,!0))},b=>{if(g===l)throw no(v,b),m(dl,!0),v.v}),ve?r&&(c=Jt(()=>r(a))):Xr(()=>{h||m(ul,!0)})}else no(f,l),m(yi,!1);return()=>l=Ot}});ve&&(a=De)}function ce(t,e,r=!1){ve&&Pr();var n=t,o=null,a=null,i=Ot,s=r?to:0,l=!1;const c=(d,f=!0)=>{l=!0,u(f,d)},u=(d,f)=>{if(i===(i=d))return;let v=!1;if(ve){const h=n.data===Ds;!!i===h&&(n=Us(),zt(n),mr(!1),v=!0)}i?(o?Pn(o):f&&(o=Jt(()=>f(n))),a&&Jr(a,()=>{a=null})):(a?Pn(a):f&&(a=Jt(()=>f(n))),o&&Jr(o,()=>{o=null})),v&&mr(!0)};Qr(()=>{l=!1,e(c),l||u(null,null)},s),ve&&(n=De)}function Rp(t,e,r){ve&&Pr();var n=t,o=Ot,a,i=io()?Hh:ui;Qr(()=>{i(o,o=e())&&(a&&Jr(a),a=Jt(()=>r(n)))}),ve&&(n=De)}function Mr(t,e){return e}function Ip(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)Qs(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var l=r.parentNode;Vs(l),l.append(r),n.clear(),mn(t,e[0].prev,e[a-1].next)}Qc(o,()=>{for(var c=0;c<a;c++){var u=e[c];s||(n.delete(u.k),mn(t,u.prev,u.next)),br(u.e,!s)}})}function wr(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null},l=(e&Cc)!==0;if(l){var c=t;i=ve?zt(ar(c)):c.appendChild(Kr())}ve&&Pr();var u=null,d=!1;Qr(()=>{var f=r(),v=zs(f)?f:f==null?[]:Bs(f),h=v.length;if(d&&h===0)return;d=h===0;let m=!1;if(ve){var y=i.data===Ds;y!==(h===0)&&(i=Us(),zt(i),mr(!1),m=!0)}if(ve){for(var g=null,b,w=0;w<h;w++){if(De.nodeType===8&&De.data===Fs){i=De,m=!0,mr(!1);break}var R=v[w],E=n(R,w);b=ku(De,s,g,null,R,E,w,o,e),s.items.set(E,b),g=b}h>0&&zt(Us())}if(!ve){var x=Ke;Op(v,s,i,o,e,(x.f&Or)!==0,n)}a!==null&&(h===0?u?Pn(u):u=Jt(()=>a(i)):u!==null&&Jr(u,()=>{u=null})),m&&mr(!0),r()}),ve&&(i=De)}function Op(t,e,r,n,o,a,i,s){var Le,re,X,$;var l=(o&_h)!==0,c=(o&(pt|Kn))!==0,u=t.length,d=e.items,f=e.first,v=f,h,m=null,y,g=[],b=[],w,R,E,x;if(l)for(x=0;x<u;x+=1)w=t[x],R=i(w,x),E=d.get(R),E!==void 0&&((Le=E.a)==null||Le.measure(),(y??(y=new Set)).add(E));for(x=0;x<u;x+=1){if(w=t[x],R=i(w,x),E=d.get(R),E===void 0){var J=v?v.e.nodes_start:r;m=ku(J,e,m,m===null?e.first:m.next,w,R,x,n,o),d.set(R,m),g=[],b=[],v=m.next;continue}if(c&&Np(E,w,x,o),E.e.f&Or&&(Pn(E.e),l&&((re=E.a)==null||re.unfix(),(y??(y=new Set)).delete(E))),E!==v){if(h!==void 0&&h.has(E)){if(g.length<b.length){var M=b[0],H;m=M.prev;var z=g[0],F=g[g.length-1];for(H=0;H<g.length;H+=1)xu(g[H],M,r);for(H=0;H<b.length;H+=1)h.delete(b[H]);mn(e,z.prev,F.next),mn(e,m,z),mn(e,F,M),v=M,m=F,x-=1,g=[],b=[]}else h.delete(E),xu(E,v,r),mn(e,E.prev,E.next),mn(e,E,m===null?e.first:m.next),mn(e,m,E),m=E;continue}for(g=[],b=[];v!==null&&v.k!==R;)(a||!(v.e.f&Or))&&(h??(h=new Set)).add(v),b.push(v),v=v.next;if(v===null)continue;E=v}g.push(E),m=E,v=E.next}if(v!==null||h!==void 0){for(var oe=h===void 0?[]:Bs(h);v!==null;)(a||!(v.e.f&Or))&&oe.push(v),v=v.next;var xe=oe.length;if(xe>0){var I=o&Cc&&u===0?r:null;if(l){for(x=0;x<xe;x+=1)(X=oe[x].a)==null||X.measure();for(x=0;x<xe;x+=1)($=oe[x].a)==null||$.fix()}Ip(e,oe,I,d)}}l&&Xr(()=>{var G;if(y!==void 0)for(E of y)(G=E.a)==null||G.apply()}),Pe.first=e.first&&e.first.e,Pe.last=m&&m.e}function Np(t,e,r,n){n&pt&&no(t.v,e),n&Kn?no(t.i,r):t.i=r}function ku(t,e,r,n,o,a,i,s,l,c){var u=(l&pt)!==0,d=(l&kh)===0,f=u?d?On(o):gt(o):o,v=l&Kn?gt(i):i,h={i:v,v:f,k:a,a:null,e:null,prev:r,next:n};try{return h.e=Jt(()=>s(t,f,v),ve),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function xu(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,a=t.e.nodes_start;a!==n;){var i=vr(a);o.before(a),a=i}}function mn(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function fo(t,e,r,n,o){var a=t,i="",s;Qr(()=>{if(i===(i=e()??"")){ve&&Pr();return}s!==void 0&&(br(s),s=void 0),i!==""&&(s=Jt(()=>{if(ve){De.data;for(var l=Pr(),c=l;l!==null&&(l.nodeType!==8||l.data!=="");)c=l,l=vr(l);if(l===null)throw di(),Yn;lr(De,c),a=zt(l);return}var u=i+"",d=sl(u);lr(ar(d),d.lastChild),a.before(d)}))})}function _r(t,e,r,n,o){var s;ve&&Pr();var a=(s=e.$$slots)==null?void 0:s[r],i=!1;a===!0&&(a=e[r==="default"?"children":r],i=!0),a===void 0?o!==null&&o(t):a(t,i?()=>n:n)}function ut(t,e,...r){var n=t,o=Ge,a;Qr(()=>{o!==(o=e())&&(a&&(br(a),a=null),a=Jt(()=>o(n,...r)))},to),ve&&(n=De)}function Wt(t,e,r){ve&&Pr();var n=t,o,a;Qr(()=>{o!==(o=e())&&(a&&(Jr(a),a=null),o&&(a=Jt(()=>r(n,o))))},to),ve&&(n=De)}function na(t,e){Xr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function fl(t,e,r){Qo(()=>{var n=Gt(()=>e(t,r==null?void 0:r())||{});if(r&&(n!=null&&n.update)){var o=!1,a={};Yr(()=>{var i=r();Ue(i),o&&ui(a,i)&&(a=i,n.update(i))}),o=!0}if(n!=null&&n.destroy)return()=>n.destroy()})}function hl(t){if(ve){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;ke(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var o=t.checked;ke(t,"checked",null),t.checked=o}}};t.__on_r=r,up(r),gu()}}function Pp(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function ke(t,e,r,n){var o=t.__attributes??(t.__attributes={});ve&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[Uh]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Tu(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Kt(t,e,r,n,o=!1,a=!1,i=!1){var s=e||{},l=t.tagName==="OPTION";for(var c in e)c in r||(r[c]=null);n!==void 0&&(r.class=r.class?r.class+" "+n:n);var u=Tu(t),d=t.__attributes??(t.__attributes={});for(const g in r){let b=r[g];if(l&&g==="value"&&b==null){t.value=t.__value="",s[g]=b;continue}var f=s[g];if(b!==f){s[g]=b;var v=g[0]+g[1];if(v!=="$$"){if(v==="on"){const w={},R="$$"+g;let E=g.slice(2);var h=Lh(E);if(Nh(E)&&(E=E.slice(0,-7),w.capture=!0),!h&&f){if(b!=null)continue;t.removeEventListener(E,s[R],w),s[R]=null}if(b!=null)if(h)t[`__${E}`]=b,lo([E]);else{let x=function(J){s[g].call(this,J)};s[R]=il(E,t,x,w)}else h&&(t[`__${E}`]=void 0)}else if(g==="style"&&b!=null)t.style.cssText=b+"";else if(g==="autofocus")Sp(t,!!b);else if(g==="__value"||g==="value"&&b!=null)t.value=t[g]=t.__value=b;else if(g==="selected"&&l)Pp(t,b);else{var m=g;o||(m=Dh(m));var y=m==="defaultValue"||m==="defaultChecked";if(b==null&&!a&&!y)if(d[g]=null,m==="value"||m==="checked"){let w=t;if(m==="value"){let R=w.defaultValue;w.removeAttribute(m),w.defaultValue=R}else{let R=w.defaultChecked;w.removeAttribute(m),w.defaultChecked=R}}else t.removeAttribute(g);else y||u.includes(m)&&(a||typeof b!="string")?t[m]=b:typeof b!="function"&&(ve&&(m==="src"||m==="href"||m==="srcset")||ke(t,m,b))}g==="style"&&"__styles"in t&&(t.__styles={})}}}return s}var Su=new Map;function Tu(t){var e=Su.get(t.nodeName);if(e)return e;Su.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=Ic(n);for(var a in r)r[a].set&&e.push(a);n=qs(n)}return e}function en(t,e){var r=t.__className,n=Lp(e);ve&&t.className===n?t.__className=n:(r!==n||ve&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function Lp(t){return t??""}function Dr(t,e,r){if(r){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Fr(t,e,r,n){var o=t.__styles??(t.__styles={});o[e]!==r&&(o[e]=r,r==null?t.style.removeProperty(e):t.style.setProperty(e,r,""))}const Mp=()=>performance.now(),tn={tick:t=>requestAnimationFrame(t),now:()=>Mp(),tasks:new Set};function Eu(){const t=tn.now();tn.tasks.forEach(e=>{e.c(t)||(tn.tasks.delete(e),e.f())}),tn.tasks.size!==0&&tn.tick(Eu)}function Dp(t){let e;return tn.tasks.size===0&&tn.tick(Eu),{promise:new Promise(r=>{tn.tasks.add(e={c:t,f:r})}),abort(){tn.tasks.delete(e)}}}function wi(t,e){t.dispatchEvent(new CustomEvent(e))}function Fp(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function Cu(t){const e={},r=t.split(";");for(const n of r){const[o,a]=n.split(":");if(!o||a===void 0)break;const i=Fp(o.trim());e[i]=a.trim()}return e}const zp=t=>t;function zr(t,e,r,n){var o=(t&Ch)!==0,a=(t&Ah)!==0,i=o&&a,s=(t&Rh)!==0,l=i?"both":o?"in":"out",c,u=e.inert,d,f;function v(){var b=Ke,w=Pe;ir(null),Vt(null);try{return c??(c=r()(e,(n==null?void 0:n())??{},{direction:l}))}finally{ir(b),Vt(w)}}var h={is_global:s,in(){var b;if(e.inert=u,!o){f==null||f.abort(),(b=f==null?void 0:f.reset)==null||b.call(f);return}a||d==null||d.abort(),wi(e,"introstart"),d=pl(e,v(),f,1,()=>{wi(e,"introend"),d==null||d.abort(),d=c=void 0})},out(b){if(!a){b==null||b(),c=void 0;return}e.inert=!0,wi(e,"outrostart"),f=pl(e,v(),d,0,()=>{wi(e,"outroend"),b==null||b()})},stop:()=>{d==null||d.abort(),f==null||f.abort()}},m=Pe;if((m.transitions??(m.transitions=[])).push(h),o&&ll){var y=s;if(!y){for(var g=m.parent;g&&g.f&to;)for(;(g=g.parent)&&!(g.f&li););y=!g||(g.f&Nc)!==0}y&&Qo(()=>{Gt(()=>h.in())})}}function pl(t,e,r,n,o){var a=n===1;if(Qn(e)){var i,s=!1;return Xr(()=>{if(!s){var y=e({direction:a?"in":"out"});i=pl(t,y,r,n,o)}}),{abort:()=>{s=!0,i==null||i.abort()},deactivate:()=>i.deactivate(),reset:()=>i.reset(),t:()=>i.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return o(),{abort:Ge,deactivate:Ge,reset:Ge,t:()=>n};const{delay:l=0,css:c,tick:u,easing:d=zp}=e;var f=[];if(a&&r===void 0&&(u&&u(0,1),c)){var v=Cu(c(0,1));f.push(v,v)}var h=()=>1-n,m=t.animate(f,{duration:l});return m.onfinish=()=>{var y=(r==null?void 0:r.t())??1-n;r==null||r.abort();var g=n-y,b=e.duration*Math.abs(g),w=[];if(b>0){if(c)for(var R=Math.ceil(b/16.666666666666668),E=0;E<=R;E+=1){var x=y+g*d(E/R),J=c(x,1-x);w.push(Cu(J))}h=()=>{var M=m.currentTime;return y+g*d(M/b)},u&&Dp(()=>{if(m.playState!=="running")return!1;var M=h();return u(M,1-M),!0})}m=t.animate(w,{duration:b,fill:"forwards"}),m.onfinish=()=>{h=()=>n,u==null||u(n,1-n),o()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=Ge)},deactivate:()=>{o=Ge},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function gl(t,e,r=e){var n=io();vu(t,"input",o=>{var a=o?t.defaultValue:t.value;if(a=vl(t)?bl(a):a,r(a),n&&a!==(a=e())){var i=t.selectionStart,s=t.selectionEnd;t.value=a??"",s!==null&&(t.selectionStart=i,t.selectionEnd=Math.min(s,t.value.length))}}),(ve&&t.defaultValue!==t.value||Gt(e)==null&&t.value)&&r(vl(t)?bl(t.value):t.value),Yr(()=>{var o=e();vl(t)&&o===bl(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}const ml=new Set;function Au(t,e,r,n,o=n){var a=r.getAttribute("type")==="checkbox",i=t;let s=!1;if(e!==null)for(var l of e)i=i[l]??(i[l]=[]);i.push(r),vu(r,"change",()=>{var c=r.__value;a&&(c=Ru(i,c,r.checked)),o(c)},()=>o(a?[]:null)),Yr(()=>{var c=n();if(ve&&r.defaultChecked!==r.checked){s=!0;return}a?(c=c||[],r.checked=c.includes(r.__value)):r.checked=np(r.__value,c)}),Ws(()=>{var c=i.indexOf(r);c!==-1&&i.splice(c,1)}),ml.has(i)||(ml.add(i),Xr(()=>{i.sort((c,u)=>c.compareDocumentPosition(u)===4?-1:1),ml.delete(i)})),Xr(()=>{if(s){var c;if(a)c=Ru(i,c,r.checked);else{var u=i.find(d=>d.checked);c=u==null?void 0:u.__value}o(c)}})}function Ru(t,e,r){for(var n=new Set,o=0;o<t.length;o+=1)t[o].checked&&n.add(t[o].__value);return r||n.delete(e),Array.from(n)}function vl(t){var e=t.type;return e==="number"||e==="range"}function bl(t){return t===""?null:+t}function Iu(t,e){return t===e||(t==null?void 0:t[Nr])===e}function Br(t={},e,r,n){return Qo(()=>{var o,a;return Yr(()=>{o=a,a=[],Gt(()=>{t!==r(...a)&&(e(t,...a),o&&Iu(r(...o),t)&&e(null,...o))})}),()=>{Xr(()=>{a&&Iu(r(...a),t)&&e(null,...a)})}}),t}function ho(t=!1){const e=ze,r=e.l.u;if(!r)return;let n=()=>Ue(e.s);if(t){let o=0,a={};const i=Te(()=>{let s=!1;const l=e.s;for(const c in l)l[c]!==a[c]&&(a[c]=l[c],s=!0);return s&&o++,o});n=()=>p(i)}r.b.length&&Ks(()=>{Ou(e,n),Wo(r.b)}),wt(()=>{const o=Gt(()=>r.m.map($h));return()=>{for(const a of o)typeof a=="function"&&a()}}),r.a.length&&wt(()=>{Ou(e,n),Wo(r.a)})}function Ou(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}function _i(t){ze===null&&el(),ro&&ze.l!==null?qp(ze).m.push(t):wt(()=>{const e=Gt(t);if(typeof e=="function")return e})}function Bp(t){ze===null&&el(),_i(()=>()=>Gt(t))}function qp(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}function yl(t,e,r){if(t==null)return e(void 0),r&&r(void 0),Ge;const n=Gt(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}let ki=!1;function mt(t,e,r){const n=r[e]??(r[e]={store:null,source:On(void 0),unsubscribe:Ge});if(n.store!==t)if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=Ge;else{var o=!0;n.unsubscribe=yl(t,a=>{o?n.source.v=a:A(n.source,a)}),o=!1}return p(n.source)}function jp(t,e,r){let n=r[e];return n&&n.store!==t&&(n.unsubscribe(),n.unsubscribe=Ge),t}function Yt(){const t={};return Ws(()=>{for(var e in t)t[e].unsubscribe()}),t}function $p(t){var e=ki;try{return ki=!1,[t(),ki]}finally{ki=e}}const Zp={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function kr(t,e,r){return new Proxy({props:t,exclude:e},Zp)}const Up={get(t,e){if(!t.exclude.includes(e))return p(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,r){return e in t.special||(t.special[e]=k({get[e](){return t.props[e]}},e,Ac)),t.special[e](r),fu(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),fu(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function wl(t,e){return new Proxy({props:t,exclude:e,special:{},version:gt(0)},Up)}const Hp={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Qn(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let o=t.props[n];Qn(o)&&(o=o());const a=Wr(o,e);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Qn(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=Wr(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Nr||e===$s)return!1;for(let r of t.props)if(Qn(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props){Qn(r)&&(r=r());for(const n in r)e.includes(n)||e.push(n)}return e}};function vn(...t){return new Proxy({props:t},Hp)}function Nu(t){for(var e=Pe,r=Pe;e!==null&&!(e.f&(gr|Jn));)e=e.parent;try{return Vt(e),t()}finally{Vt(r)}}function k(t,e,r,n){var J;var o=(r&xh)!==0,a=!ro||(r&Sh)!==0,i=(r&Th)!==0,s=(r&Eh)!==0,l=!1,c;i?[c,l]=$p(()=>t[e]):c=t[e];var u=Nr in t||$s in t,d=((J=Wr(t,e))==null?void 0:J.set)??(u&&i&&e in t?M=>t[e]=M:void 0),f=n,v=!0,h=!1,m=()=>(h=!0,v&&(v=!1,s?f=Gt(n):f=n),f);c===void 0&&n!==void 0&&(d&&a&&Qh(),c=m(),d&&d(c));var y;if(a)y=()=>{var M=t[e];return M===void 0?m():(v=!0,h=!1,M)};else{var g=Nu(()=>(o?Te:Nt)(()=>t[e]));g.f|=Zh,y=()=>{var M=p(g);return M!==void 0&&(f=void 0),M===void 0?f:M}}if(!(r&Ac))return y;if(d){var b=t.$$legacy;return function(M,H){return arguments.length>0?((!a||!H||b||l)&&d(H?y():M),M):y()}}var w=!1,R=!1,E=On(c),x=Nu(()=>Te(()=>{var M=y(),H=p(E);return w?(w=!1,R=!0,H):(R=!1,E.v=M)}));return o||(x.equals=Zs),function(M,H){if(arguments.length>0){const z=H?p(x):a&&i?Se(M):M;return x.equals(z)||(w=!0,A(E,z),h&&f!==void 0&&(f=z),Gt(()=>p(x))),M}return p(x)}}function Vp(t){return new Gp(t)}class Gp{constructor(e){W(this,ln);W(this,hr);var a;var r=new Map,n=(i,s)=>{var l=On(s);return r.set(i,l),l};const o=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(r.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===$s?!0:(p(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,l){return A(r.get(s)??n(s,l),l),Reflect.set(i,s,l)}});Ct(this,hr,(e.hydrate?Ep:wu)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((a=e==null?void 0:e.props)!=null&&a.$$host)||e.sync===!1)&&_(),Ct(this,ln,o.$$events);for(const i of Object.keys(S(this,hr)))i==="$set"||i==="$destroy"||i==="$on"||si(this,i,{get(){return S(this,hr)[i]},set(s){S(this,hr)[i]=s},enumerable:!0});S(this,hr).$set=i=>{Object.assign(o,i)},S(this,hr).$destroy=()=>{Cp(S(this,hr))}}$set(e){S(this,hr).$set(e)}$on(e,r){S(this,ln)[e]=S(this,ln)[e]||[];const n=(...o)=>r.call(this,...o);return S(this,ln)[e].push(n),()=>{S(this,ln)[e]=S(this,ln)[e].filter(o=>o!==n)}}$destroy(){S(this,hr).$destroy()}}ln=new WeakMap,hr=new WeakMap;let Pu;typeof HTMLElement=="function"&&(Pu=class extends HTMLElement{constructor(e,r,n){super();q(this,"$$ctor");q(this,"$$s");q(this,"$$c");q(this,"$$cn",!1);q(this,"$$d",{});q(this,"$$r",!1);q(this,"$$p_d",{});q(this,"$$l",{});q(this,"$$l_u",new Map);q(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return a=>{const i=document.createElement("slot");o!=="default"&&(i.name=o),T(a,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=Wp(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=xi(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Vp({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Vc(()=>{Yr(()=>{var o;this.$$r=!0;for(const a of ii(this.$$c)){if(!((o=this.$$p_d[a])!=null&&o.reflect))continue;this.$$d[a]=this.$$c[a];const i=xi(a,this.$$d[a],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,i)}this.$$r=!1})});for(const o in this.$$l)for(const a of this.$$l[o]){const i=this.$$c.$on(o,a);this.$$l_u.set(a,i)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=xi(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return ii(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function xi(t,e,r,n){var a;const o=(a=r[t])==null?void 0:a.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="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 Wp(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Oe(t,e,r,n,o,a){let i=class extends Pu{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return ii(e).map(s=>(e[s].attribute||s).toLowerCase())}};return ii(e).forEach(s=>{si(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){var d;l=xi(s,l,e),this.$$d[s]=l;var c=this.$$c;if(c){var u=(d=Wr(c,s))==null?void 0:d.get;u?c[s]=l:c.$set({[s]:l})}}})}),n.forEach(s=>{si(i.prototype,s,{get(){var l;return(l=this.$$c)==null?void 0:l[s]}})}),t.element=i,i}const _l=t=>{window.history.pushState({},"",t),window.dispatchEvent(new Event("popstate"))},Kp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`@import '../utils/media.css';
2
-
3
- /* CSS properties have to be outside the container class for the animation to work */
4
- @property --gradient-color-start {
5
- syntax: '<color>';
6
- initial-value: transparent;
7
- inherits: false;
8
- }
9
-
10
- @property --gradient-color-end {
11
- syntax: '<color>';
12
- initial-value: transparent;
13
- inherits: false;
14
- }
1
+ var LiipGPTChat=function(tt){"use strict";var J1=Object.defineProperty;var X1=Object.getPrototypeOf;var e_=Reflect.get;var Oh=tt=>{throw TypeError(tt)};var t_=(tt,lt,pt)=>lt in tt?J1(tt,lt,{enumerable:!0,configurable:!0,writable:!0,value:pt}):tt[lt]=pt;var z=(tt,lt,pt)=>t_(tt,typeof lt!="symbol"?lt+"":lt,pt),Pc=(tt,lt,pt)=>lt.has(tt)||Oh("Cannot "+pt);var x=(tt,lt,pt)=>(Pc(tt,lt,"read from private field"),pt?pt.call(tt):lt.get(tt)),G=(tt,lt,pt)=>lt.has(tt)?Oh("Cannot add the same private member more than once"):lt instanceof WeakSet?lt.add(tt):lt.set(tt,pt),xt=(tt,lt,pt,Xn)=>(Pc(tt,lt,"write to private field"),Xn?Xn.call(tt,pt):lt.set(tt,pt),pt),Jn=(tt,lt,pt)=>(Pc(tt,lt,"access private method"),pt);var Nh=(tt,lt,pt)=>e_(X1(tt),pt,lt);var Rh,pn,br,Ba,za,Wr,Kr,gn,Fo,Hs,Lo,$a,qa,ja,Za,mn,Ua,Ha,Ga,Va,Wa,Ka,Ya,Qa,Ja,gs,ms,vs,bs,ys,ws,_s,ks,xs,Ss,Do,Yn,On,Mo,Bo,Nn,Xa,ei,vn,Ts,zo,Ph,Cs,$o,Es,As,Rs,Is,ti,Fh,Os,Ns,Ps,Fs,qo,ri,Ls,Lh,Ds,ni,oi,Ms,jo,Zo,Uo,Ho,Bs,zs,$s,Qn,qs;const lt="5";typeof window<"u"&&((Rh=window.__svelte??(window.__svelte={})).v??(Rh.v=new Set)).add(lt);const pt=1,Xn=2,Fc=4,Dh=8,Mh=16,Bh=1,zh=2,Lc=4,$h=8,qh=16,jh=1,Zh=2,Uh=4,Hh=1,Gh=2,ai="[",Gs="[!",Vs="]",eo={},Et=Symbol(),Vh="http://www.w3.org/1999/xhtml",Dc=!1,Lr=2,Mc=4,ii=8,si=16,Jr=32,Ln=64,li=128,sr=256,ci=512,Vt=1024,Xr=2048,Dn=4096,en=8192,ui=16384,Bc=32768,to=65536,Wh=1<<17,zc=1<<19,$c=1<<20,Ws=1<<21,Dr=Symbol("$state"),Ks=Symbol("legacy props"),Kh=Symbol("");var Ys=Array.isArray,Yh=Array.prototype.indexOf,Qs=Array.from,di=Object.keys,Yo=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,qc=Object.getOwnPropertyDescriptors,Qh=Object.prototype,Jh=Array.prototype,Js=Object.getPrototypeOf,jc=Object.isExtensible;function ro(t){return typeof t=="function"}const Qe=()=>{};function Xh(t){return typeof(t==null?void 0:t.then)=="function"}function ep(t){return t()}function Qo(t){for(var e=0;e<t.length;e++)t[e]()}const tp=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Jo=[],Xo=[];function Zc(){var t=Jo;Jo=[],Qo(t)}function Uc(){var t=Xo;Xo=[],Qo(t)}function rn(t){Jo.length===0&&queueMicrotask(Zc),Jo.push(t)}function rp(t){Xo.length===0&&tp(Uc),Xo.push(t)}function Hc(){Jo.length>0&&Zc(),Xo.length>0&&Uc()}function Gc(t){return t===this.v}function fi(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function np(t,e){return t!==e}function Xs(t){return!fi(t,this.v)}function op(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ap(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ip(t){throw new Error("https://svelte.dev/e/effect_orphan")}function sp(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function lp(){throw new Error("https://svelte.dev/e/hydration_failed")}function cp(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function up(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function dp(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fp(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let no=!1,hp=!1;function pp(){no=!0}function Mr(t,e){if(typeof t!="object"||t===null||Dr in t)return t;const r=Js(t);if(r!==Qh&&r!==Jh)return t;var n=new Map,o=Ys(t),a=me(0),i=je,s=c=>{var l=je;Wt(i);var u;return u=c(),Wt(l),u};return o&&n.set("length",me(t.length)),new Proxy(t,{defineProperty(c,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&up();var f=n.get(l);return f===void 0?(f=s(()=>me(u.value)),n.set(l,f)):A(f,s(()=>Mr(u.value))),!0},deleteProperty(c,l){var u=n.get(l);if(u===void 0)l in c&&n.set(l,s(()=>me(Et)));else{if(o&&typeof l=="string"){var f=n.get("length"),d=Number(l);Number.isInteger(d)&&d<f.v&&A(f,d)}A(u,Et),Vc(a)}return!0},get(c,l,u){var h;if(l===Dr)return t;var f=n.get(l),d=l in c;if(f===void 0&&(!d||(h=tn(c,l))!=null&&h.writable)&&(f=s(()=>me(Mr(d?c[l]:Et))),n.set(l,f)),f!==void 0){var m=p(f);return m===Et?void 0:m}return Reflect.get(c,l,u)},getOwnPropertyDescriptor(c,l){var u=Reflect.getOwnPropertyDescriptor(c,l);if(u&&"value"in u){var f=n.get(l);f&&(u.value=p(f))}else if(u===void 0){var d=n.get(l),m=d==null?void 0:d.v;if(d!==void 0&&m!==Et)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return u},has(c,l){var m;if(l===Dr)return!0;var u=n.get(l),f=u!==void 0&&u.v!==Et||Reflect.has(c,l);if(u!==void 0||He!==null&&(!f||(m=tn(c,l))!=null&&m.writable)){u===void 0&&(u=s(()=>me(f?Mr(c[l]):Et)),n.set(l,u));var d=p(u);if(d===Et)return!1}return f},set(c,l,u,f){var b;var d=n.get(l),m=l in c;if(o&&l==="length")for(var h=u;h<d.v;h+=1){var v=n.get(h+"");v!==void 0?A(v,Et):h in c&&(v=s(()=>me(Et)),n.set(h+"",v))}d===void 0?(!m||(b=tn(c,l))!=null&&b.writable)&&(d=s(()=>me(void 0)),A(d,s(()=>Mr(u))),n.set(l,d)):(m=d.v!==Et,A(d,s(()=>Mr(u))));var y=Reflect.getOwnPropertyDescriptor(c,l);if(y!=null&&y.set&&y.set.call(f,u),!m){if(o&&typeof l=="string"){var g=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=g.v&&A(g,w+1)}Vc(a)}return!0},ownKeys(c){p(a);var l=Reflect.ownKeys(c).filter(d=>{var m=n.get(d);return m===void 0||m.v!==Et});for(var[u,f]of n)f.v!==Et&&!(u in c)&&l.push(u);return l},setPrototypeOf(){dp()}})}function Vc(t,e=1){A(t,t.v+e)}function Wc(t){try{if(t!==null&&typeof t=="object"&&Dr in t)return t[Dr]}catch{}return t}function gp(t,e){return Object.is(Wc(t),Wc(e))}const ea=new Map;function Bt(t,e){var r={f:0,v:t,reactions:null,equals:Gc,rv:0,wv:0};return r}function me(t,e){const r=Bt(t);return nu(r),r}function Le(t,e=!1){var n;const r=Bt(t);return e||(r.equals=Xs),no&&Ue!==null&&Ue.l!==null&&((n=Ue.l).s??(n.s=[])).push(r),r}function A(t,e,r=!1){je!==null&&!_r&&zn()&&je.f&(Lr|si)&&!($t!=null&&$t.includes(t))&&fp();let n=r?Mr(e):e;return oo(t,n)}function oo(t,e){if(!t.equals(e)){var r=t.v;ra?ea.set(t,e):ea.set(t,r),t.v=e,t.wv=au(),Yc(t,Xr),zn()&&He!==null&&He.f&Vt&&!(He.f&(Jr|Ln))&&(ur===null?yp([t]):ur.push(t))}return e}function Kc(t,e=1){var r=p(t),n=e===1?r++:r--;return A(t,r),n}function Yc(t,e){var r=t.reactions;if(r!==null)for(var n=zn(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;s&Xr||!n&&i===He||(kr(i,e),s&(Vt|sr)&&(s&Lr?Yc(i,Dn):_i(i)))}}function ao(t){var e=Lr|Xr,r=je!==null&&je.f&Lr?je:null;return He===null||r!==null&&r.f&sr?e|=sr:He.f|=$c,{ctx:Ue,deps:null,effects:null,equals:Gc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:r??He}}function De(t){const e=ao(t);return nu(e),e}function _t(t){const e=ao(t);return e.equals=Xs,e}function Qc(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)xr(e[r])}}function mp(t){for(var e=t.parent;e!==null;){if(!(e.f&Lr))return e;e=e.parent}return null}function vp(t){var e,r=He;cr(mp(t));try{Qc(t),e=su(t)}finally{cr(r)}return e}function Jc(t){var e=vp(t),r=(yn||t.f&sr)&&t.deps!==null?Dn:Vt;kr(t,r),t.equals(e)||(t.v=e,t.wv=au())}function hi(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let ve=!1;function er(t){ve=t}let Me;function zt(t){if(t===null)throw hi(),eo;return Me=t}function Br(){return zt(wr(Me))}function N(t){if(ve){if(wr(Me)!==null)throw hi(),eo;Me=t}}function el(){for(var t=0,e=Me;;){if(e.nodeType===8){var r=e.data;if(r===Vs){if(t===0)return e;t-=1}else(r===ai||r===Gs)&&(t+=1)}var n=wr(e);e.remove(),e=n}}var ta,Xc,eu,tu;function tl(){if(ta===void 0){ta=window,Xc=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;eu=tn(e,"firstChild").get,tu=tn(e,"nextSibling").get,jc(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),jc(r)&&(r.__t=void 0)}}function nn(t=""){return document.createTextNode(t)}function lr(t){return eu.call(t)}function wr(t){return tu.call(t)}function D(t,e){if(!ve)return lr(t);var r=lr(Me);if(r===null)r=Me.appendChild(nn());else if(e&&r.nodeType!==3){var n=nn();return r==null||r.before(n),zt(n),n}return zt(r),r}function te(t,e){if(!ve){var r=lr(t);return r instanceof Comment&&r.data===""?wr(r):r}return Me}function ne(t,e=1,r=!1){let n=ve?Me:t;for(var o;e--;)o=n,n=wr(n);if(!ve)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var i=nn();return n===null?o==null||o.after(i):n.before(i),zt(i),i}return zt(n),n}function rl(t){t.textContent=""}let pi=!1,gi=!1,mi=null,Mn=!1,ra=!1;function ru(t){ra=t}let na=[],r_=[],je=null,_r=!1;function Wt(t){je=t}let He=null;function cr(t){He=t}let $t=null;function bp(t){$t=t}function nu(t){je!==null&&je.f&Ws&&($t===null?bp([t]):$t.push(t))}let qt=null,tr=0,ur=null;function yp(t){ur=t}let ou=1,vi=0,yn=!1;function au(){return++ou}function io(t){var f;var e=t.f;if(e&Xr)return!0;if(e&Dn){var r=t.deps,n=(e&sr)!==0;if(r!==null){var o,a,i=(e&ci)!==0,s=n&&He!==null&&!yn,c=r.length;if(i||s){var l=t,u=l.parent;for(o=0;o<c;o++)a=r[o],(i||!((f=a==null?void 0:a.reactions)!=null&&f.includes(l)))&&(a.reactions??(a.reactions=[])).push(l);i&&(l.f^=ci),s&&u!==null&&!(u.f&sr)&&(l.f^=sr)}for(o=0;o<c;o++)if(a=r[o],io(a)&&Jc(a),a.wv>t.wv)return!0}(!n||He!==null&&!yn)&&kr(t,Vt)}return!1}function wp(t,e){for(var r=e;r!==null;){if(r.f&li)try{r.fn(t);return}catch{r.f^=li}r=r.parent}throw pi=!1,t}function _p(t){return(t.f&ui)===0&&(t.parent===null||(t.parent.f&li)===0)}function bi(t,e,r,n){if(pi){if(r===null&&(pi=!1),_p(e))throw t;return}r!==null&&(pi=!0);{wp(t,e);return}}function iu(t,e,r=!0){var n=t.reactions;if(n!==null)for(var o=0;o<n.length;o++){var a=n[o];$t!=null&&$t.includes(t)||(a.f&Lr?iu(a,e,!1):e===a&&(r?kr(a,Xr):a.f&Vt&&kr(a,Dn),_i(a)))}}function su(t){var m;var e=qt,r=tr,n=ur,o=je,a=yn,i=$t,s=Ue,c=_r,l=t.f;qt=null,tr=0,ur=null,yn=(l&sr)!==0&&(_r||!Mn||je===null),je=l&(Jr|Ln)?null:t,$t=null,xi(t.ctx),_r=!1,vi++,t.f|=Ws;try{var u=(0,t.fn)(),f=t.deps;if(qt!==null){var d;if(yi(t,tr),f!==null&&tr>0)for(f.length=tr+qt.length,d=0;d<qt.length;d++)f[tr+d]=qt[d];else t.deps=f=qt;if(!yn)for(d=tr;d<f.length;d++)((m=f[d]).reactions??(m.reactions=[])).push(t)}else f!==null&&tr<f.length&&(yi(t,tr),f.length=tr);if(zn()&&ur!==null&&!_r&&f!==null&&!(t.f&(Lr|Dn|Xr)))for(d=0;d<ur.length;d++)iu(ur[d],t);return o!==null&&(vi++,ur!==null&&(n===null?n=ur:n.push(...ur))),u}finally{qt=e,tr=r,ur=n,je=o,yn=a,$t=i,xi(s),_r=c,t.f^=Ws}}function kp(t,e){let r=e.reactions;if(r!==null){var n=Yh.call(r,t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&Lr&&(qt===null||!qt.includes(e))&&(kr(e,Dn),e.f&(sr|ci)||(e.f^=ci),Qc(e),yi(e,0))}function yi(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)kp(t,r[n])}function wi(t){var e=t.f;if(!(e&ui)){kr(t,Vt);var r=He,n=Ue,o=Mn;He=t,Mn=!0;try{e&si?Ip(t):fu(t),du(t);var a=su(t);t.teardown=typeof a=="function"?a:null,t.wv=ou;var i=t.deps,s;Dc&&hp&&t.f&Xr}catch(c){bi(c,t,r,n||t.ctx)}finally{Mn=o,He=r}}}function xp(){try{sp()}catch(t){if(mi!==null)bi(t,mi,null);else throw t}}function lu(){var t=Mn;try{var e=0;for(Mn=!0;na.length>0;){e++>1e3&&xp();var r=na,n=r.length;na=[];for(var o=0;o<n;o++){var a=Tp(r[o]);Sp(a)}}}finally{gi=!1,Mn=t,mi=null,ea.clear()}}function Sp(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(ui|en)))try{io(n)&&(wi(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?hu(n):n.fn=null))}catch(o){bi(o,n,null,n.ctx)}}}function _i(t){gi||(gi=!0,queueMicrotask(lu));for(var e=mi=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(Ln|Jr)){if(!(r&Vt))return;e.f^=Vt}}na.push(e)}function Tp(t){for(var e=[],r=t;r!==null;){var n=r.f,o=(n&(Jr|Ln))!==0,a=o&&(n&Vt)!==0;if(!a&&!(n&en)){if(n&Mc)e.push(r);else if(o)r.f^=Vt;else{var i=je;try{je=r,io(r)&&wi(r)}catch(l){bi(l,r,null,r.ctx)}finally{je=i}}var s=r.first;if(s!==null){r=s;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}return e}function _(t){var e;for(Hc();na.length>0;)gi=!0,lu(),Hc();return e}async function nl(){await Promise.resolve(),_()}function p(t){var e=t.f,r=(e&Lr)!==0;if(je!==null&&!_r){if(!($t!=null&&$t.includes(t))){var n=je.deps;t.rv<vi&&(t.rv=vi,qt===null&&n!==null&&n[tr]===t?tr++:qt===null?qt=[t]:(!yn||!qt.includes(t))&&qt.push(t))}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&!(a.f&sr)&&(o.f^=sr)}return r&&(o=t,io(o)&&Jc(o)),ra&&ea.has(t)?ea.get(t):t.v}function Kt(t){var e=_r;try{return _r=!0,t()}finally{_r=e}}const Cp=-7169;function kr(t,e){t.f=t.f&Cp|e}function Ge(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Dr in t)ol(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Dr in r&&ol(r)}}}function ol(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{ol(t[n],e)}catch{}const r=Js(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=qc(r);for(let o in n){const a=n[o].get;if(a)try{a.call(t)}catch{}}}}}function cu(t){He===null&&je===null&&ip(),je!==null&&je.f&sr&&He===null&&ap(),ra&&op()}function Ep(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Bn(t,e,r,n=!0){var o=He,a={ctx:Ue,deps:null,nodes_start:null,nodes_end:null,f:t|Xr,first:null,fn:e,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(r)try{wi(a),a.f|=Bc}catch(c){throw xr(a),c}else e!==null&&_i(a);var i=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&($c|li))===0;if(!i&&n&&(o!==null&&Ep(a,o),je!==null&&je.f&Lr)){var s=je;(s.effects??(s.effects=[])).push(a)}return a}function Ap(){return je!==null&&!_r}function ki(t){const e=Bn(ii,null,!1);return kr(e,Vt),e.teardown=t,e}function vt(t){cu();var e=He!==null&&(He.f&Jr)!==0&&Ue!==null&&!Ue.m;if(e){var r=Ue;(r.e??(r.e=[])).push({fn:t,effect:He,reaction:je})}else{var n=oa(t);return n}}function al(t){return cu(),on(t)}function uu(t){const e=Bn(Ln,t,!0);return()=>{xr(e)}}function Rp(t){const e=Bn(Ln,t,!0);return(r={})=>new Promise(n=>{r.outro?sn(e,()=>{xr(e),n(void 0)}):(xr(e),n(void 0))})}function oa(t){return Bn(Mc,t,!1)}function Ze(t,e){var r=Ue,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=on(()=>{t(),!n.ran&&(n.ran=!0,A(r.l.r2,!0),Kt(e))})}function il(){var t=Ue;on(()=>{if(p(t.l.r2)){for(var e of t.l.r1){var r=e.effect;r.f&Vt&&kr(r,Dn),io(r)&&wi(r),e.ran=!1}t.l.r2.v=!1}})}function on(t){return Bn(ii,t,!0)}function le(t,e=[],r=ao){const n=e.map(r);return an(()=>t(...n.map(p)))}function an(t,e=0){return Bn(ii|si|e,t,!0)}function dr(t,e=!0){return Bn(ii|Jr,t,!0,e)}function du(t){var e=t.teardown;if(e!==null){const r=ra,n=je;ru(!0),Wt(null);try{e.call(null)}finally{ru(r),Wt(n)}}}function fu(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;r.f&Ln?r.parent=null:xr(r,e),r=n}}function Ip(t){for(var e=t.first;e!==null;){var r=e.next;e.f&Jr||xr(e),e=r}}function xr(t,e=!0){var r=!1;if((e||t.f&zc)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var a=n===o?null:wr(n);n.remove(),n=a}r=!0}fu(t,e&&!r),yi(t,0),kr(t,ui);var i=t.transitions;if(i!==null)for(const c of i)c.stop();du(t);var s=t.parent;s!==null&&s.first!==null&&hu(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function hu(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function sn(t,e){var r=[];sl(t,r,!0),pu(r,()=>{xr(t),e&&e()})}function pu(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function sl(t,e,r){if(!(t.f&en)){if(t.f^=en,t.transitions!==null)for(const i of t.transitions)(i.is_global||r)&&e.push(i);for(var n=t.first;n!==null;){var o=n.next,a=(n.f&to)!==0||(n.f&Jr)!==0;sl(n,e,a?r:!1),n=o}}}function so(t){gu(t,!0)}function gu(t,e){if(t.f&en){t.f^=en,t.f&Vt||(t.f^=Vt),io(t)&&(kr(t,Xr),_i(t));for(var r=t.first;r!==null;){var n=r.next,o=(r.f&to)!==0||(r.f&Jr)!==0;gu(r,o?e:!1),r=n}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||e)&&a.in()}}function ll(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Ue=null;function xi(t){Ue=t}function mu(t){return cl().get(t)}function Op(t,e){return cl().set(t,e),e}function Np(t){return cl().has(t)}function Ee(t,e=!1,r){var n=Ue={p:Ue,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};no&&!e&&(Ue.l={s:null,u:null,r1:[],r2:Bt(!1)}),ki(()=>{n.d=!0})}function Ae(t){const e=Ue;if(e!==null){t!==void 0&&(e.x=t);const i=e.e;if(i!==null){var r=He,n=je;e.e=null;try{for(var o=0;o<i.length;o++){var a=i[o];cr(a.effect),Wt(a.reaction),oa(a.fn)}}finally{cr(r),Wt(n)}}Ue=e.p,e.m=!0}return t||{}}function zn(){return!no||Ue!==null&&Ue.l===null}function cl(t){return Ue===null&&ll(),Ue.c??(Ue.c=new Map(Pp(Ue)||void 0))}function Pp(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}function Fp(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Lp=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Dp(t){return Lp.includes(t)}const Mp={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Bp(t){return t=t.toLowerCase(),Mp[t]??t}const zp=["touchstart","touchmove"];function $p(t){return zp.includes(t)}function qp(t,e){if(e){const r=document.body;t.autofocus=!0,rn(()=>{document.activeElement===r&&t.focus()})}}function vu(t){ve&&lr(t)!==null&&rl(t)}let bu=!1;function yu(){bu||(bu=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const r of t.target.elements)(e=r.__on_r)==null||e.call(r)})},{capture:!0}))}function ul(t){var e=je,r=He;Wt(null),cr(null);try{return t()}finally{Wt(e),cr(r)}}function wu(t,e,r,n=r){t.addEventListener(e,()=>ul(r));const o=t.__on_r;o?t.__on_r=()=>{o(),n(!0)}:t.__on_r=()=>n(!0),yu()}const _u=new Set,dl=new Set;function fl(t,e,r,n={}){function o(a){if(n.capture||aa.call(e,a),!a.cancelBubble)return ul(()=>r==null?void 0:r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?rn(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function Ft(t,e,r,n={}){var o=fl(e,t,r,n);return()=>{t.removeEventListener(e,o,n)}}function ct(t,e,r,n,o){var a={capture:n,passive:o},i=fl(t,e,r,a);(e===document.body||e===window||e===document)&&ki(()=>{e.removeEventListener(t,i,a)})}function lo(t){for(var e=0;e<t.length;e++)_u.add(t[e]);for(var r of dl)r(t)}function aa(t){var w;var e=this,r=e.ownerDocument,n=t.type,o=((w=t.composedPath)==null?void 0:w.call(t))||[],a=o[0]||t.target,i=0,s=t.__root;if(s){var c=o.indexOf(s);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=o.indexOf(e);if(l===-1)return;c<=l&&(i=c)}if(a=o[i]||t.target,a!==e){Yo(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=je,f=He;Wt(null),cr(null);try{for(var d,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+n];if(v!=null&&(!a.disabled||t.target===a))if(Ys(v)){var[y,...g]=v;y.apply(a,[t,...g])}else v.call(a,t)}catch(b){d?m.push(b):d=b}if(t.cancelBubble||h===e||h===null)break;a=h}if(d){for(let b of m)queueMicrotask(()=>{throw b});throw d}}finally{t.__root=e,delete t.currentTarget,Wt(u),cr(f)}}}let fr;function jp(){fr=void 0}function ku(t){let e=null,r=ve;var n;if(ve){for(e=Me,fr===void 0&&(fr=lr(document.head));fr!==null&&(fr.nodeType!==8||fr.data!==ai);)fr=wr(fr);fr===null?er(!1):fr=zt(wr(fr))}ve||(n=document.head.appendChild(nn()));try{an(()=>t(n),zc)}finally{r&&(er(!0),fr=Me,zt(e))}}function hl(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function hr(t,e){var r=He;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function W(t,e){var r=(e&Hh)!==0,n=(e&Gh)!==0,o,a=!t.startsWith("<!>");return()=>{if(ve)return hr(Me,null),Me;o===void 0&&(o=hl(a?t:"<!>"+t),r||(o=lr(o)));var i=n||Xc?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=lr(i),c=i.lastChild;hr(s,c)}else hr(i,i);return i}}function Si(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,a;return()=>{if(ve)return hr(Me,null),Me;if(!a){var i=hl(o),s=lr(i);a=lr(s)}var c=a.cloneNode(!0);return hr(c,c),c}}function co(t=""){if(!ve){var e=nn(t+"");return hr(e,e),e}var r=Me;return r.nodeType!==3&&(r.before(r=nn()),zt(r)),hr(r,r),r}function he(){if(ve)return hr(Me,null),Me;var t=document.createDocumentFragment(),e=document.createComment(""),r=nn();return t.append(e,r),hr(e,r),t}function C(t,e){if(ve){He.nodes_end=Me,Br();return}t!==null&&t.before(e)}let pl=!0;function Ve(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function xu(t,e){return Su(t,e)}function Zp(t,e){tl(),e.intro=e.intro??!1;const r=e.target,n=ve,o=Me;try{for(var a=lr(r);a&&(a.nodeType!==8||a.data!==ai);)a=wr(a);if(!a)throw eo;er(!0),zt(a),Br();const i=Su(t,{...e,anchor:a});if(Me===null||Me.nodeType!==8||Me.data!==Vs)throw hi(),eo;return er(!1),i}catch(i){if(i===eo)return e.recover===!1&&lp(),tl(),rl(r),er(!1),xu(t,e);throw i}finally{er(n),zt(o),jp()}}const uo=new Map;function Su(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){tl();var s=new Set,c=f=>{for(var d=0;d<f.length;d++){var m=f[d];if(!s.has(m)){s.add(m);var h=$p(m);e.addEventListener(m,aa,{passive:h});var v=uo.get(m);v===void 0?(document.addEventListener(m,aa,{passive:h}),uo.set(m,1)):uo.set(m,v+1)}}};c(Qs(_u)),dl.add(c);var l=void 0,u=Rp(()=>{var f=r??e.appendChild(nn());return dr(()=>{if(a){Ee({});var d=Ue;d.c=a}o&&(n.$$events=o),ve&&hr(f,null),pl=i,l=t(f,n)||{},pl=!0,ve&&(He.nodes_end=Me),a&&Ae()}),()=>{var h;for(var d of s){e.removeEventListener(d,aa);var m=uo.get(d);--m===0?(document.removeEventListener(d,aa),uo.delete(d)):uo.set(d,m)}dl.delete(c),f!==r&&((h=f.parentNode)==null||h.removeChild(f))}});return gl.set(l,u),l}let gl=new WeakMap;function Up(t,e){const r=gl.get(t);return r?(gl.delete(t),r(e)):Promise.resolve()}const ml=0,Ti=1,vl=2;function Hp(t,e,r,n,o){ve&&Br();var a=t,i=zn(),s=Ue,c=Et,l,u,f,d=(i?Bt:Le)(void 0),m=(i?Bt:Le)(void 0),h=!1;function v(g,w){h=!0,w&&(cr(y),Wt(y),xi(s));try{g===ml&&r&&(l?so(l):l=dr(()=>r(a))),g===Ti&&n&&(u?so(u):u=dr(()=>n(a,d))),g!==ml&&l&&sn(l,()=>l=null),g!==Ti&&u&&sn(u,()=>u=null),g!==vl&&f&&sn(f,()=>f=null)}finally{w&&(xi(null),Wt(null),cr(null),_())}}var y=an(()=>{if(c!==(c=e())){if(Xh(c)){var g=c;h=!1,g.then(w=>{g===c&&(oo(d,w),v(Ti,!0))},w=>{if(g===c)throw oo(m,w),v(vl,!0),m.v}),ve?r&&(l=dr(()=>r(a))):rn(()=>{h||v(ml,!0)})}else oo(d,c),v(Ti,!1);return()=>c=Et}});ve&&(a=Me)}function ce(t,e,[r,n]=[0,0]){ve&&r===0&&Br();var o=t,a=null,i=null,s=Et,c=r>0?to:0,l=!1;const u=(d,m=!0)=>{l=!0,f(m,d)},f=(d,m)=>{if(s===(s=d))return;let h=!1;if(ve&&n!==-1){if(r===0){const y=o.data;y===ai?n=0:y===Gs?n=1/0:(n=parseInt(y.substring(1)),n!==n&&(n=s?1/0:-1))}const v=n>r;!!s===v&&(o=el(),zt(o),er(!1),h=!0,n=-1)}s?(a?so(a):m&&(a=dr(()=>m(o))),i&&sn(i,()=>{i=null})):(i?so(i):m&&(i=dr(()=>m(o,[r+1,n]))),a&&sn(a,()=>{a=null})),h&&er(!0)};an(()=>{l=!1,e(u),l||f(null,null)},c),ve&&(o=Me)}function Gp(t,e,r){ve&&Br();var n=t,o=Et,a,i=zn()?np:fi;an(()=>{i(o,o=e())&&(a&&sn(a),a=dr(()=>r(n)))}),ve&&(n=Me)}function zr(t,e){return e}function Vp(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)sl(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var c=r.parentNode;rl(c),c.append(r),n.clear(),wn(t,e[0].prev,e[a-1].next)}pu(o,()=>{for(var l=0;l<a;l++){var u=e[l];s||(n.delete(u.k),wn(t,u.prev,u.next)),xr(u.e,!s)}})}function Sr(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null},c=(e&Fc)!==0;if(c){var l=t;i=ve?zt(lr(l)):l.appendChild(nn())}ve&&Br();var u=null,f=!1,d=_t(()=>{var m=r();return Ys(m)?m:m==null?[]:Qs(m)});an(()=>{var m=p(d),h=m.length;if(f&&h===0)return;f=h===0;let v=!1;if(ve){var y=i.data===Gs;y!==(h===0)&&(i=el(),zt(i),er(!1),v=!0)}if(ve){for(var g=null,w,b=0;b<h;b++){if(Me.nodeType===8&&Me.data===Vs){i=Me,v=!0,er(!1);break}var S=m[b],E=n(S,b);w=Tu(Me,s,g,null,S,E,b,o,e,r),s.items.set(E,w),g=w}h>0&&zt(el())}ve||Wp(m,s,i,o,e,n,r),a!==null&&(h===0?u?so(u):u=dr(()=>a(i)):u!==null&&sn(u,()=>{u=null})),v&&er(!0),p(d)}),ve&&(i=Me)}function Wp(t,e,r,n,o,a,i){var ie,I,pe,xe;var s=(o&Dh)!==0,c=(o&(pt|Xn))!==0,l=t.length,u=e.items,f=e.first,d=f,m,h=null,v,y=[],g=[],w,b,S,E;if(s)for(E=0;E<l;E+=1)w=t[E],b=a(w,E),S=u.get(b),S!==void 0&&((ie=S.a)==null||ie.measure(),(v??(v=new Set)).add(S));for(E=0;E<l;E+=1){if(w=t[E],b=a(w,E),S=u.get(b),S===void 0){var P=d?d.e.nodes_start:r;h=Tu(P,e,h,h===null?e.first:h.next,w,b,E,n,o,i),u.set(b,h),y=[],g=[],d=h.next;continue}if(c&&Kp(S,w,E,o),S.e.f&en&&(so(S.e),s&&((I=S.a)==null||I.unfix(),(v??(v=new Set)).delete(S))),S!==d){if(m!==void 0&&m.has(S)){if(y.length<g.length){var F=g[0],O;h=F.prev;var $=y[0],J=y[y.length-1];for(O=0;O<y.length;O+=1)Cu(y[O],F,r);for(O=0;O<g.length;O+=1)m.delete(g[O]);wn(e,$.prev,J.next),wn(e,h,$),wn(e,J,F),d=F,h=J,E-=1,y=[],g=[]}else m.delete(S),Cu(S,d,r),wn(e,S.prev,S.next),wn(e,S,h===null?e.first:h.next),wn(e,h,S),h=S;continue}for(y=[],g=[];d!==null&&d.k!==b;)d.e.f&en||(m??(m=new Set)).add(d),g.push(d),d=d.next;if(d===null)continue;S=d}y.push(S),h=S,d=S.next}if(d!==null||m!==void 0){for(var ae=m===void 0?[]:Qs(m);d!==null;)d.e.f&en||ae.push(d),d=d.next;var B=ae.length;if(B>0){var X=o&Fc&&l===0?r:null;if(s){for(E=0;E<B;E+=1)(pe=ae[E].a)==null||pe.measure();for(E=0;E<B;E+=1)(xe=ae[E].a)==null||xe.fix()}Vp(e,ae,X,u)}}s&&rn(()=>{var Y;if(v!==void 0)for(S of v)(Y=S.a)==null||Y.apply()}),He.first=e.first&&e.first.e,He.last=h&&h.e}function Kp(t,e,r,n){n&pt&&oo(t.v,e),n&Xn?oo(t.i,r):t.i=r}function Tu(t,e,r,n,o,a,i,s,c,l){var u=(c&pt)!==0,f=(c&Mh)===0,d=u?f?Le(o):Bt(o):o,m=c&Xn?Bt(i):i,h={i:m,v:d,k:a,a:null,e:null,prev:r,next:n};try{return h.e=dr(()=>s(t,d,m,l),ve),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function Cu(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,a=t.e.nodes_start;a!==n;){var i=wr(a);o.before(a),a=i}}function wn(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function fo(t,e,r,n,o){var a=t,i="",s;an(()=>{if(i===(i=e()??"")){ve&&Br();return}s!==void 0&&(xr(s),s=void 0),i!==""&&(s=dr(()=>{if(ve){Me.data;for(var c=Br(),l=c;c!==null&&(c.nodeType!==8||c.data!=="");)l=c,c=wr(c);if(c===null)throw hi(),eo;hr(Me,l),a=zt(c);return}var u=i+"",f=hl(u);hr(lr(f),f.lastChild),a.before(f)}))})}function Tr(t,e,r,n,o){var s;ve&&Br();var a=(s=e.$$slots)==null?void 0:s[r],i=!1;a===!0&&(a=e[r==="default"?"children":r],i=!0),a===void 0?o!==null&&o(t):a(t,i?()=>n:n)}function ut(t,e,...r){var n=t,o=Qe,a;an(()=>{o!==(o=e())&&(a&&(xr(a),a=null),a=dr(()=>o(n,...r)))},to),ve&&(n=Me)}function Yt(t,e,r){ve&&Br();var n=t,o,a;an(()=>{o!==(o=e())&&(a&&(sn(a),a=null),o&&(a=dr(()=>r(n,o))))},to),ve&&(n=Me)}function ia(t,e){rn(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function bl(t,e,r){oa(()=>{var n=Kt(()=>e(t,r==null?void 0:r())||{});if(r&&(n!=null&&n.update)){var o=!1,a={};on(()=>{var i=r();Ge(i),o&&fi(a,i)&&(a=i,n.update(i))}),o=!0}if(n!=null&&n.destroy)return()=>n.destroy()})}function Eu(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Eu(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ci(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Eu(t))&&(n&&(n+=" "),n+=e);return n}function _n(t){return typeof t=="object"?Ci(t):t??""}const Au=[...`
2
+ \r\f \v\uFEFF`];function Yp(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var o in r)if(r[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,i=0;(i=n.indexOf(o,i))>=0;){var s=i+a;(i===0||Au.includes(n[i-1]))&&(s===n.length||Au.includes(n[s]))?n=(i===0?"":n.substring(0,i))+n.substring(s+1):i=s}}return n===""?null:n}function Ru(t,e=!1){var r=e?" !important;":";",n="";for(var o in t){var a=t[o];a!=null&&a!==""&&(n+=" "+o+": "+a+r)}return n}function yl(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Qp(t,e){if(e){var r="",n,o;if(Array.isArray(e)?(n=e[0],o=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,s=!1,c=[];n&&c.push(...Object.keys(n).map(yl)),o&&c.push(...Object.keys(o).map(yl));var l=0,u=-1;const v=t.length;for(var f=0;f<v;f++){var d=t[f];if(s?d==="/"&&t[f-1]==="*"&&(s=!1):a?a===d&&(a=!1):d==="/"&&t[f+1]==="*"?s=!0:d==='"'||d==="'"?a=d:d==="("?i++:d===")"&&i--,!s&&a===!1&&i===0){if(d===":"&&u===-1)u=f;else if(d===";"||f===v-1){if(u!==-1){var m=yl(t.substring(l,u).trim());if(!c.includes(m)){d!==";"&&f++;var h=t.substring(l,f).trim();r+=" "+h+";"}}l=f+1,u=-1}}}}return n&&(r+=Ru(n)),o&&(r+=Ru(o,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function At(t,e,r,n,o,a){var i=t.__className;if(ve||i!==r){var s=Yp(r,n,a);(!ve||s!==t.getAttribute("class"))&&(s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s)),t.__className=r}else if(a&&o!==a)for(var c in a){var l=!!a[c];(o==null||l!==!!o[c])&&t.classList.toggle(c,l)}return a}function wl(t,e={},r,n){for(var o in r){var a=r[o];e[o]!==a&&(r[o]==null?t.style.removeProperty(o):t.style.setProperty(o,a,n))}}function $n(t,e,r,n){var o=t.__style;if(ve||o!==e){var a=Qp(e,n);(!ve||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(wl(t,r==null?void 0:r[0],n[0]),wl(t,r==null?void 0:r[1],n[1],"important")):wl(t,r,n));return n}const sa=Symbol("class"),ho=Symbol("style"),Iu=Symbol("is custom element"),Ou=Symbol("is html");function _l(t){if(ve){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Pe(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var o=t.checked;Pe(t,"checked",null),t.checked=o}}};t.__on_r=r,rp(r),yu()}}function Jp(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Pe(t,e,r,n){var o=Nu(t);ve&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="loading"&&(t[Kh]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Fu(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Qt(t,e,r,n,o=!1){var a=Nu(t),i=a[Iu],s=!a[Ou];let c=ve&&i;c&&er(!1);var l=e||{},u=t.tagName==="OPTION";for(var f in e)f in r||(r[f]=null);r.class?r.class=_n(r.class):(n||r[sa])&&(r.class=null),r[ho]&&(r.style??(r.style=null));var d=Fu(t);for(const b in r){let S=r[b];if(u&&b==="value"&&S==null){t.value=t.__value="",l[b]=S;continue}if(b==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";At(t,m,S,n,e==null?void 0:e[sa],r[sa]),l[b]=S,l[sa]=r[sa];continue}if(b==="style"){$n(t,S,e==null?void 0:e[ho],r[ho]),l[b]=S,l[ho]=r[ho];continue}var h=l[b];if(S!==h){l[b]=S;var v=b[0]+b[1];if(v!=="$$")if(v==="on"){const E={},P="$$"+b;let F=b.slice(2);var y=Dp(F);if(Fp(F)&&(F=F.slice(0,-7),E.capture=!0),!y&&h){if(S!=null)continue;t.removeEventListener(F,l[P],E),l[P]=null}if(S!=null)if(y)t[`__${F}`]=S,lo([F]);else{let O=function($){l[b].call(this,$)};l[P]=fl(F,t,O,E)}else y&&(t[`__${F}`]=void 0)}else if(b==="style")Pe(t,b,S);else if(b==="autofocus")qp(t,!!S);else if(!i&&(b==="__value"||b==="value"&&S!=null))t.value=t.__value=S;else if(b==="selected"&&u)Jp(t,S);else{var g=b;s||(g=Bp(g));var w=g==="defaultValue"||g==="defaultChecked";if(S==null&&!i&&!w)if(a[b]=null,g==="value"||g==="checked"){let E=t;const P=e===void 0;if(g==="value"){let F=E.defaultValue;E.removeAttribute(g),E.defaultValue=F,E.value=E.__value=P?F:null}else{let F=E.defaultChecked;E.removeAttribute(g),E.defaultChecked=F,E.checked=P?F:!1}}else t.removeAttribute(b);else w||d.includes(g)&&(i||typeof S!="string")?t[g]=S:typeof S!="function"&&Pe(t,g,S)}}}return c&&er(!0),l}function Nu(t){return t.__attributes??(t.__attributes={[Iu]:t.nodeName.includes("-"),[Ou]:t.namespaceURI===Vh})}var Pu=new Map;function Fu(t){var e=Pu.get(t.nodeName);if(e)return e;Pu.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=qc(n);for(var a in r)r[a].set&&e.push(a);n=Js(n)}return e}const Xp=()=>performance.now(),ln={tick:t=>requestAnimationFrame(t),now:()=>Xp(),tasks:new Set};function Lu(){const t=ln.now();ln.tasks.forEach(e=>{e.c(t)||(ln.tasks.delete(e),e.f())}),ln.tasks.size!==0&&ln.tick(Lu)}function eg(t){let e;return ln.tasks.size===0&&ln.tick(Lu),{promise:new Promise(r=>{ln.tasks.add(e={c:t,f:r})}),abort(){ln.tasks.delete(e)}}}function Ei(t,e){ul(()=>{t.dispatchEvent(new CustomEvent(e))})}function tg(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function Du(t){const e={},r=t.split(";");for(const n of r){const[o,a]=n.split(":");if(!o||a===void 0)break;const i=tg(o.trim());e[i]=a.trim()}return e}const rg=t=>t;function $r(t,e,r,n){var o=(t&jh)!==0,a=(t&Zh)!==0,i=o&&a,s=(t&Uh)!==0,c=i?"both":o?"in":"out",l,u=e.inert,f=e.style.overflow,d,m;function h(){var b=je,S=He;Wt(null),cr(null);try{return l??(l=r()(e,(n==null?void 0:n())??{},{direction:c}))}finally{Wt(b),cr(S)}}var v={is_global:s,in(){var b;if(e.inert=u,!o){m==null||m.abort(),(b=m==null?void 0:m.reset)==null||b.call(m);return}a||d==null||d.abort(),Ei(e,"introstart"),d=kl(e,h(),m,1,()=>{Ei(e,"introend"),d==null||d.abort(),d=l=void 0,e.style.overflow=f})},out(b){if(!a){b==null||b(),l=void 0;return}e.inert=!0,Ei(e,"outrostart"),m=kl(e,h(),d,0,()=>{Ei(e,"outroend"),b==null||b()})},stop:()=>{d==null||d.abort(),m==null||m.abort()}},y=He;if((y.transitions??(y.transitions=[])).push(v),o&&pl){var g=s;if(!g){for(var w=y.parent;w&&w.f&to;)for(;(w=w.parent)&&!(w.f&si););g=!w||(w.f&Bc)!==0}g&&oa(()=>{Kt(()=>v.in())})}}function kl(t,e,r,n,o){var a=n===1;if(ro(e)){var i,s=!1;return rn(()=>{if(!s){var y=e({direction:a?"in":"out"});i=kl(t,y,r,n,o)}}),{abort:()=>{s=!0,i==null||i.abort()},deactivate:()=>i.deactivate(),reset:()=>i.reset(),t:()=>i.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return o(),{abort:Qe,deactivate:Qe,reset:Qe,t:()=>n};const{delay:c=0,css:l,tick:u,easing:f=rg}=e;var d=[];if(a&&r===void 0&&(u&&u(0,1),l)){var m=Du(l(0,1));d.push(m,m)}var h=()=>1-n,v=t.animate(d,{duration:c});return v.onfinish=()=>{var y=(r==null?void 0:r.t())??1-n;r==null||r.abort();var g=n-y,w=e.duration*Math.abs(g),b=[];if(w>0){var S=!1;if(l)for(var E=Math.ceil(w/16.666666666666668),P=0;P<=E;P+=1){var F=y+g*f(P/E),O=Du(l(F,1-F));b.push(O),S||(S=O.overflow==="hidden")}S&&(t.style.overflow="hidden"),h=()=>{var $=v.currentTime;return y+g*f($/w)},u&&eg(()=>{if(v.playState!=="running")return!1;var $=h();return u($,1-$),!0})}v=t.animate(b,{duration:w,fill:"forwards"}),v.onfinish=()=>{h=()=>n,u==null||u(n,1-n),o()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=Qe)},deactivate:()=>{o=Qe},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function xl(t,e,r=e){var n=zn();wu(t,"input",o=>{var a=o?t.defaultValue:t.value;if(a=Tl(t)?Cl(a):a,r(a),n&&a!==(a=e())){var i=t.selectionStart,s=t.selectionEnd;t.value=a??"",s!==null&&(t.selectionStart=i,t.selectionEnd=Math.min(s,t.value.length))}}),(ve&&t.defaultValue!==t.value||Kt(e)==null&&t.value)&&r(Tl(t)?Cl(t.value):t.value),on(()=>{var o=e();Tl(t)&&o===Cl(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}const Sl=new Set;function Mu(t,e,r,n,o=n){var a=r.getAttribute("type")==="checkbox",i=t;let s=!1;if(e!==null)for(var c of e)i=i[c]??(i[c]=[]);i.push(r),wu(r,"change",()=>{var l=r.__value;a&&(l=Bu(i,l,r.checked)),o(l)},()=>o(a?[]:null)),on(()=>{var l=n();if(ve&&r.defaultChecked!==r.checked){s=!0;return}a?(l=l||[],r.checked=l.includes(r.__value)):r.checked=gp(r.__value,l)}),ki(()=>{var l=i.indexOf(r);l!==-1&&i.splice(l,1)}),Sl.has(i)||(Sl.add(i),rn(()=>{i.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),Sl.delete(i)})),rn(()=>{if(s){var l;if(a)l=Bu(i,l,r.checked);else{var u=i.find(f=>f.checked);l=u==null?void 0:u.__value}o(l)}})}function Bu(t,e,r){for(var n=new Set,o=0;o<t.length;o+=1)t[o].checked&&n.add(t[o].__value);return r||n.delete(e),Array.from(n)}function Tl(t){var e=t.type;return e==="number"||e==="range"}function Cl(t){return t===""?null:+t}function zu(t,e){return t===e||(t==null?void 0:t[Dr])===e}function qr(t={},e,r,n){return oa(()=>{var o,a;return on(()=>{o=a,a=[],Kt(()=>{t!==r(...a)&&(e(t,...a),o&&zu(r(...o),t)&&e(null,...o))})}),()=>{rn(()=>{a&&zu(r(...a),t)&&e(null,...a)})}}),t}function po(t=!1){const e=Ue,r=e.l.u;if(!r)return;let n=()=>Ge(e.s);if(t){let o=0,a={};const i=ao(()=>{let s=!1;const c=e.s;for(const l in c)c[l]!==a[l]&&(a[l]=c[l],s=!0);return s&&o++,o});n=()=>p(i)}r.b.length&&al(()=>{$u(e,n),Qo(r.b)}),vt(()=>{const o=Kt(()=>r.m.map(ep));return()=>{for(const a of o)typeof a=="function"&&a()}}),r.a.length&&vt(()=>{$u(e,n),Qo(r.a)})}function $u(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}function Ai(t){Ue===null&&ll(),no&&Ue.l!==null?og(Ue).m.push(t):vt(()=>{const e=Kt(t);if(typeof e=="function")return e})}function ng(t){Ue===null&&ll(),Ai(()=>()=>Kt(t))}function og(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}function El(t,e,r){if(t==null)return e(void 0),r&&r(void 0),Qe;const n=Kt(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const go=[];function ag(t,e){return{subscribe:jt(t,e).subscribe}}function jt(t,e=Qe){let r=null;const n=new Set;function o(s){if(fi(t,s)&&(t=s,r)){const c=!go.length;for(const l of n)l[1](),go.push(l,t);if(c){for(let l=0;l<go.length;l+=2)go[l][0](go[l+1]);go.length=0}}}function a(s){o(s(t))}function i(s,c=Qe){const l=[s,c];return n.add(l),n.size===1&&(r=e(o,a)||Qe),s(t),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:o,update:a,subscribe:i}}function qu(t,e,r){const n=!Array.isArray(t),o=n?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return ag(r,(i,s)=>{let c=!1;const l=[];let u=0,f=Qe;const d=()=>{if(u)return;f();const h=e(n?l[0]:l,i,s);a?i(h):f=typeof h=="function"?h:Qe},m=o.map((h,v)=>El(h,y=>{l[v]=y,u&=~(1<<v),c&&d()},()=>{u|=1<<v}));return c=!0,d(),function(){Qo(m),f(),c=!1}})}function mo(t){let e;return El(t,r=>e=r)(),e}let Ri=!1,Al=Symbol();function gt(t,e,r){const n=r[e]??(r[e]={store:null,source:Le(void 0),unsubscribe:Qe});if(n.store!==t&&!(Al in r))if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=Qe;else{var o=!0;n.unsubscribe=El(t,a=>{o?n.source.v=a:A(n.source,a)}),o=!1}return t&&Al in r?mo(t):p(n.source)}function ig(t,e,r){let n=r[e];return n&&n.store!==t&&(n.unsubscribe(),n.unsubscribe=Qe),t}function Jt(){const t={};function e(){ki(()=>{for(var r in t)t[r].unsubscribe();Yo(t,Al,{enumerable:!1,value:!0})})}return[t,e]}function sg(t){var e=Ri;try{return Ri=!1,[t(),Ri]}finally{Ri=e}}const lg={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Cr(t,e,r){return new Proxy({props:t,exclude:e},lg)}const cg={get(t,e){if(!t.exclude.includes(e))return p(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,r){return e in t.special||(t.special[e]=k({get[e](){return t.props[e]}},e,Lc)),t.special[e](r),Kc(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),Kc(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Rl(t,e){return new Proxy({props:t,exclude:e,special:{},version:Bt(0)},cg)}const ug={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(ro(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let o=t.props[n];ro(o)&&(o=o());const a=tn(o,e);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(ro(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=tn(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Dr||e===Ks)return!1;for(let r of t.props)if(ro(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props){ro(r)&&(r=r());for(const n in r)e.includes(n)||e.push(n)}return e}};function kn(...t){return new Proxy({props:t},ug)}function ju(t){var e;return((e=t.ctx)==null?void 0:e.d)??!1}function k(t,e,r,n){var P;var o=(r&Bh)!==0,a=!no||(r&zh)!==0,i=(r&$h)!==0,s=(r&qh)!==0,c=!1,l;i?[l,c]=sg(()=>t[e]):l=t[e];var u=Dr in t||Ks in t,f=i&&(((P=tn(t,e))==null?void 0:P.set)??(u&&e in t&&(F=>t[e]=F)))||void 0,d=n,m=!0,h=!1,v=()=>(h=!0,m&&(m=!1,s?d=Kt(n):d=n),d);l===void 0&&n!==void 0&&(f&&a&&cp(),l=v(),f&&f(l));var y;if(a)y=()=>{var F=t[e];return F===void 0?v():(m=!0,h=!1,F)};else{var g=(o?ao:_t)(()=>t[e]);g.f|=Wh,y=()=>{var F=p(g);return F!==void 0&&(d=void 0),F===void 0?d:F}}if(!(r&Lc))return y;if(f){var w=t.$$legacy;return function(F,O){return arguments.length>0?((!a||!O||w||c)&&f(O?y():F),F):y()}}var b=!1,S=Le(l),E=ao(()=>{var F=y(),O=p(S);return b?(b=!1,O):S.v=F});return i&&p(E),o||(E.equals=Xs),function(F,O){if(arguments.length>0){const $=O?p(E):a&&i?Mr(F):F;if(!E.equals($)){if(b=!0,A(S,$),h&&d!==void 0&&(d=$),ju(E))return F;Kt(()=>p(E))}return F}return ju(E)?E.v:p(E)}}function dg(t){return new fg(t)}class fg{constructor(e){G(this,pn);G(this,br);var a;var r=new Map,n=(i,s)=>{var c=Le(s);return r.set(i,c),c};const o=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(r.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===Ks?!0:(p(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,c){return A(r.get(s)??n(s,c),c),Reflect.set(i,s,c)}});xt(this,br,(e.hydrate?Zp:xu)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((a=e==null?void 0:e.props)!=null&&a.$$host)||e.sync===!1)&&_(),xt(this,pn,o.$$events);for(const i of Object.keys(x(this,br)))i==="$set"||i==="$destroy"||i==="$on"||Yo(this,i,{get(){return x(this,br)[i]},set(s){x(this,br)[i]=s},enumerable:!0});x(this,br).$set=i=>{Object.assign(o,i)},x(this,br).$destroy=()=>{Up(x(this,br))}}$set(e){x(this,br).$set(e)}$on(e,r){x(this,pn)[e]=x(this,pn)[e]||[];const n=(...o)=>r.call(this,...o);return x(this,pn)[e].push(n),()=>{x(this,pn)[e]=x(this,pn)[e].filter(o=>o!==n)}}$destroy(){x(this,br).$destroy()}}pn=new WeakMap,br=new WeakMap;let Zu;typeof HTMLElement=="function"&&(Zu=class extends HTMLElement{constructor(e,r,n){super();z(this,"$$ctor");z(this,"$$s");z(this,"$$c");z(this,"$$cn",!1);z(this,"$$d",{});z(this,"$$r",!1);z(this,"$$p_d",{});z(this,"$$l",{});z(this,"$$l_u",new Map);z(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return a=>{const i=document.createElement("slot");o!=="default"&&(i.name=o),C(a,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=hg(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ii(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=dg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=uu(()=>{on(()=>{var o;this.$$r=!0;for(const a of di(this.$$c)){if(!((o=this.$$p_d[a])!=null&&o.reflect))continue;this.$$d[a]=this.$$c[a];const i=Ii(a,this.$$d[a],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,i)}this.$$r=!1})});for(const o in this.$$l)for(const a of this.$$l[o]){const i=this.$$c.$on(o,a);this.$$l_u.set(a,i)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ii(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return di(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Ii(t,e,r,n){var a;const o=(a=r[t])==null?void 0:a.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="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 hg(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Ie(t,e,r,n,o,a){let i=class extends Zu{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return di(e).map(s=>(e[s].attribute||s).toLowerCase())}};return di(e).forEach(s=>{Yo(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var f;c=Ii(s,c,e),this.$$d[s]=c;var l=this.$$c;if(l){var u=(f=tn(l,s))==null?void 0:f.get;u?l[s]=c:l.$set({[s]:c})}}})}),n.forEach(s=>{Yo(i.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),t.element=i,i}const Il=t=>{window.history.pushState({},"",t),window.dispatchEvent(new Event("popstate"))},pg=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`@import '../utils/media.css';
15
3
 
16
4
  .chat-app {
17
5
  .alva-gradient-text {
18
- background: linear-gradient(to bottom, var(--color-brand-500), var(--color-brand-700));
6
+ background: linear-gradient(to bottom, var(--color-brand-600), var(--color-brand-500));
19
7
  -webkit-background-clip: text;
20
8
  -webkit-text-fill-color: transparent;
21
9
  background-clip: text;
@@ -30,121 +18,74 @@ var LiipGPTChat=function(Xe){"use strict";var Aw=Object.defineProperty;var Rw=Ob
30
18
  }
31
19
 
32
20
  .chat-input__textarea {
33
- --gradient-color-start: var(--color-brand-200);
34
- --gradient-color-end: var(--color-brand-100);
35
- --chat-input-border-radius: 1.25rem; /* has to be in px for safari for gradient border effect */
36
- --chat-input-focus-box-shadow: 0 var(--spacer-4) var(--spacer-8) 0 var(--color-highlight-200),
21
+ --chat-input-focus-box-shadow:
22
+ 0 0 0 4px var(--color-highlight-200), 0 var(--spacer-4) var(--spacer-8) 0 var(--color-highlight-200),
37
23
  0 var(--spacer-12) var(--spacer-40) 0 var(--color-highlight-100);
24
+ transition-duration: 0.2s;
25
+ transition-property: box-shadow, border-radius, border-width;
26
+ transition-timing-function: ease;
27
+ }
38
28
 
39
- --chat-input-background: radial-gradient(white, white) padding-box,
40
- linear-gradient(90deg, var(--gradient-color-start), var(--gradient-color-end)) border-box;
29
+ .chat-page__footer-content {
30
+ margin-right: calc(var(--spacer-16) * -1);
31
+ margin-left: calc(var(--spacer-16) * -1);
32
+ padding: var(--spacer-16);
41
33
 
42
- --chat-input-focus-background: var(--chat-input-background);
43
- transition-duration: 0.2s;
34
+ border-top-right-radius: 1.5rem;
35
+ border-top-left-radius: 1.5rem;
36
+ background-color: var(--color-grey-0);
44
37
 
45
- transition-property: --gradient-color-start, --gradient-color-end, box-shadow, border-radius, border-width;
46
- transition-timing-function: ease;
38
+ box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.15);
47
39
 
48
- &:focus-visible {
49
- --gradient-color-start: var(--color-highlight-600);
50
- --gradient-color-end: var(--color-highlight-300);
40
+ /* based on --screen-sm */
41
+ @media (min-width: 640px) {
42
+ margin: 0;
43
+ padding-top: 0;
44
+ padding-right: 0;
45
+ padding-left: 0;
46
+
47
+ box-shadow: 0 -8px 22px 10px rgba(255, 255, 255, 0.75);
51
48
  }
52
49
  }
53
- }
54
50
 
55
- .chat-page__footer-content {
56
- margin-right: calc(var(--spacer-16) * -1);
57
- margin-left: calc(var(--spacer-16) * -1);
58
- padding: var(--spacer-16);
59
-
60
- border-top-right-radius: 1.5rem;
61
- border-top-left-radius: 1.5rem;
62
- background-color: var(--color-grey-0);
63
-
64
- box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.15);
51
+ .dialog-header {
52
+ padding: var(--spacer-r-28);
53
+ }
65
54
 
66
- /* based on --screen-sm */
67
- @media (min-width: 640px) {
68
- margin: 0;
69
- padding-top: 0;
70
- padding-right: 0;
71
- padding-left: 0;
55
+ .dialog-title,
56
+ .dialog-title * {
57
+ font-weight: var(--font-weight-regular);
58
+ font-size: var(--font-h3);
59
+ }
72
60
 
73
- box-shadow: 0 -8px 22px 10px rgba(255, 255, 255, 0.75);
61
+ .dialog-description {
62
+ padding: var(--spacer-r-28);
74
63
  }
75
- }
76
64
 
77
- .dialog-header {
78
- padding: var(--spacer-r-28);
79
- }
65
+ .predefined-question {
66
+ display: block;
67
+ font-style: italic;
80
68
 
81
- .dialog-title,
82
- .dialog-title * {
83
- font-weight: var(--font-weight-regular);
84
- font-size: var(--font-h3);
85
- }
69
+ & .svg {
70
+ display: none;
71
+ }
86
72
 
87
- .dialog-description {
88
- padding: var(--spacer-r-28);
73
+ &::before {
74
+ margin-right: 0.1rem;
75
+ content: '«';
76
+ color: var(--color-accent-600);
77
+ }
78
+
79
+ &::after {
80
+ margin-left: 0.1rem;
81
+ content: '»';
82
+ color: var(--color-accent-600);
83
+ }
84
+ }
89
85
  }
90
- `,showOverallFeedbackButton:!0,fontURLs:["https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"],theme:{font:{family:"Inter, sans-serif"},colors:{brand:{50:"#f1fafd",100:"#d4eff7",200:"#a4e2f6",300:"#72d5f6",400:"#3ec4f0",500:"#12b6ec",600:"#0f93bf",700:"#0d81a7",800:"#084e65",900:"#042c39"},highlight:{50:"#f6f1f9",100:"#e2d3ec",200:"#cfb6de",300:"#bc98d1",400:"#a97ac4",500:"#9156b4",600:"#8047a1",700:"#683a83",800:"#512d66",900:"#392048"}},components:{card:{color:"var(--color-brand-900)",background:"var(--color-brand-50)",borderColor:"var(--color-brand-100)",borderWidth:"1px",hover:{background:"var(--color-brand-100)",borderColor:"var(--color-brand-200)"},custom:{iconColor:"var(--color-brand-500)",iconHoverColor:"var(--color-brand-700)"}},chatFooter:{color:"var(--color-grey-500)",background:"var(--color-grey-0)",borderRadius:{minRem:2.5,maxRem:3},boxShadow:"0px -10px 20px 5px rgba(255, 255, 255, 0.9)"},btnPrimary:{borderRadius:{minRem:50,maxRem:50}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderWidth:"1px",boxShadow:"0",borderRadius:{minRem:50,maxRem:50},hover:{color:"var(--color-brand-900)",background:"var(--color-brand-200)",boxShadow:"0"}},btnTertiary:{color:"var(--color-brand-600)",background:"var(--color-brand-50)",borderColor:"var(--color-brand-100)",borderWidth:"1px",borderRadius:{minRem:50,maxRem:50},hover:{background:"var(--color-brand-100)",borderColor:"var(--color-brand-200)"}},label:{color:"var(--color-grey-600)",custom:{fontWeight:"bold"}},chatInput:{borderWidth:"3px"},chatInputSubmit:{borderRadius:{minRem:.75,maxRem:.75}},dialog:{background:"var(--color-grey-0)",boxShadow:"0 12px 32px -5px rgba(167, 211, 230, 0.8)",custom:{backgroundOverlay:"rgba(167, 211, 230, 0.5)",headerFontSize:"1.5rem",headerFontWeight:"regular",headerBorderBottomColor:"var(--color-grey-200)"}},toast:{background:"var(--color-brand-50)"},tooltip:{background:"var(--color-brand-200)"}},svgs:{predefinedQuestion:`
91
- <svg viewBox="0 0 20 19" xmlns="http://www.w3.org/2000/svg">
92
- <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
93
- <path d="m19 3.5c-2.2 0-4.3.9-5.8 2.4s-2.4 3.6-2.4 5.8v1.2"/>
94
- <circle fill="currentColor" cx="14.7" cy="12.9" r="3.9"/>
95
- <path d="m9.2 3.5c-2.2 0-4.3.9-5.8 2.4s-2.4 3.6-2.4 5.8v1.2"/>
96
- <circle fill="currentColor" cx="4.9" cy="12.9" r="3.9"/>
97
- </g>
98
- </svg>
99
- `,avatar:`
100
- <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
101
- <style>
102
- /* Medium shadow for the white ellipse */
103
- .shadow {
104
- filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.07)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.03));
105
- }
106
-
107
- /* Animation for rotating the path */
108
- @keyframes rotate {
109
- 0% {
110
- transform: rotate(0deg);
111
- }
112
- 100% {
113
- transform: rotate(360deg);
114
- }
115
- }
116
-
117
- .rotating {
118
- animation: rotate 10s linear infinite;
119
- transform-origin: 50% 50%;
120
- }
121
-
122
- .alva-avatar {
123
- transform: scale(0.95);
124
- transform-origin: 50% 50%;
125
- }
126
- </style>
127
- <defs>
128
- <linearGradient id="linear-gradient" x1="49.677" y1="13.981" x2="50.388" y2="65.639" gradientUnits="userSpaceOnUse">
129
- <stop offset="0" stop-color="#51b9da"/>
130
- <stop offset="1" stop-color="#0e81a7"/>
131
- </linearGradient>
132
- </defs>
133
-
134
- <!-- White ellipse with shadow -->
135
- <ellipse class="shadow" cx="50.2" cy="50" fill="#fff" rx="48.8" ry="48.9" stroke="#d5d9dd" />
136
-
137
- <g class="alva-avatar">
138
- <!-- Gradient-filled inner ellipse -->
139
- <ellipse cx="50.2" cy="50" fill="url(#linear-gradient)" rx="38.7" ry="39.7" />
140
-
141
- <!-- Rotating path -->
142
- <g class="rotating">
143
- <path d="M61.113,16.841c-22.331-4.468-33,13.492-33.444,14.261-1.17,2.021-2.087,4.175-2.734,6.394-.628,2.161-.991,4.385-1.09,6.603-.092,2.161.074,4.315.493,6.406.406,2.034,1.053,3.998,1.915,5.834.837,1.786,1.884,3.457,3.103,4.957,1.188,1.462,2.537,2.758,4.014,3.858,1.434,1.068,2.986,1.951,4.611,2.612,1.582.648,3.22,1.087,4.882,1.316.856.114,1.718.172,2.574.172.757,0,1.514-.045,2.266-.133,1.552-.191,3.066-.572,4.507-1.138,1.404-.553,2.727-1.277,3.934-2.148,1.176-.852,2.241-1.849,3.165-2.955.899-1.08,1.662-2.263,2.272-3.515.591-1.22,1.034-2.504,1.318-3.82.271-1.277.394-2.58.351-3.87-.037-1.258-.222-2.498-.554-3.686-.32-1.163-.776-2.269-1.354-3.298-.56-1.004-1.238-1.926-2.007-2.739-.751-.794-1.588-1.487-2.493-2.059-.88-.559-1.822-.998-2.789-1.316-.948-.305-1.921-.489-2.894-.547-.948-.057-1.896.013-2.82.197-.899.178-1.767.47-2.58.864-.794.381-1.533.864-2.204,1.43-.653.553-1.231,1.182-1.724,1.868-.48.674-.88,1.398-1.182,2.161-.295.744-.499,1.513-.609,2.294-.105.763-.123,1.532-.043,2.288.074.737.234,1.455.48,2.142.234.667.554,1.296.936,1.875.376.566.813,1.074,1.299,1.519.474.432.997.807,1.558,1.1.542.292,1.114.508,1.699.648.573.14,1.158.203,1.736.191.566-.013,1.127-.095,1.662-.242.523-.146,1.028-.362,1.49-.629.456-.267.874-.585,1.25-.953.363-.356.683-.756.948-1.188.259-.426.468-.877.609-1.341.142-.458.234-.928.265-1.398.031-.496.006-.96-.074-1.386-.48-2.434-2.555-2.892-3.583-2.796-.012,0-.025.006-.037.013-.111.013-.228.025-.332.051-.222.051-.431.121-.628.222-.191.095-.369.222-.536.362-.16.14-.302.299-.419.47-.117.172-.215.356-.283.547-.123.324.031.693.351.82s.671-.032.8-.362c.037-.095.086-.184.142-.267.062-.089.135-.172.215-.242.086-.076.179-.14.283-.191.105-.051.222-.095.339-.121.123-.025.252-.038.382-.032.135,0,.271.025.4.07.135.038.271.102.394.178.129.076.252.178.363.286.111.114.215.248.296.388.086.153.16.311.209.483.049.178.08.362.092.547.012.191,0,.394-.043.585-.037.203-.105.4-.191.591-.092.197-.203.381-.345.553-.142.178-.308.337-.493.477-.191.14-.394.261-.616.35-.228.095-.474.159-.72.197-.259.038-.523.038-.782.013-.271-.032-.542-.102-.8-.203-.271-.102-.53-.242-.77-.42-.246-.178-.48-.388-.677-.629-.209-.248-.388-.521-.536-.82-.154-.305-.265-.636-.339-.979-.08-.356-.111-.718-.105-1.087.012-.381.068-.763.166-1.138.105-.388.259-.763.449-1.112.203-.362.449-.705.739-1.017.295-.318.634-.597,1.004-.833.382-.242.794-.439,1.231-.585.449-.146.917-.235,1.398-.267.493-.032.991,0,1.484.095.511.102,1.01.267,1.49.496.493.235.96.534,1.385.896.443.369.844.801,1.188,1.277.357.489.659,1.036.893,1.614.24.591.412,1.227.505,1.875.099.667.111,1.354.049,2.04-.068.705-.222,1.405-.462,2.078-.246.699-.573,1.366-.985,1.989-.419.642-.924,1.233-1.496,1.76-.585.54-1.244,1.011-1.952,1.392-.727.394-1.515.699-2.327.896-.837.21-1.705.305-2.586.292-.905-.013-1.81-.14-2.697-.388-.911-.248-1.804-.623-2.641-1.106-.862-.496-1.675-1.106-2.407-1.818-.751-.731-1.422-1.57-1.989-2.485-.585-.941-1.053-1.964-1.404-3.044-.357-1.112-.585-2.275-.665-3.457-.086-1.22-.025-2.46.179-3.686.215-1.258.585-2.504,1.096-3.692.529-1.22,1.213-2.383,2.032-3.451.837-1.099,1.822-2.097,2.912-2.962,1.127-.89,2.364-1.646,3.688-2.231,1.361-.61,2.808-1.042,4.291-1.29,1.533-.254,3.103-.318,4.673-.172,1.613.146,3.226.502,4.778,1.061,1.601.572,3.14,1.36,4.581,2.339,1.484,1.004,2.851,2.212,4.063,3.578,1.25,1.411,2.34,2.993,3.232,4.703.917,1.76,1.632,3.648,2.112,5.618.493,2.027.745,4.131.745,6.254,0,2.18-.271,4.379-.794,6.533-.542,2.212-1.361,4.372-2.426,6.413-1.096,2.097-2.463,4.067-4.051,5.853-1.632,1.837-3.497,3.47-5.553,4.862-2.112,1.43-4.408,2.593-6.834,3.464-2.493.89-5.11,1.468-7.782,1.703-2.746.242-5.541.133-8.305-.33-2.844-.477-5.646-1.328-8.33-2.529-2.758-1.233-5.387-2.835-7.813-4.76-8.73-6.959-13.434-18.602-12.27-30.379.037-.35-.209-.661-.548-.699-.339-.025-.64.216-.677.566-1.201,12.215,3.682,24.29,12.745,31.516,2.506,1.989,5.221,3.642,8.078,4.919,2.777,1.239,5.683,2.123,8.626,2.618,1.878.318,3.768.47,5.646.47.991,0,1.976-.045,2.961-.133,2.771-.248,5.492-.845,8.078-1.767,2.518-.902,4.913-2.116,7.105-3.603,2.136-1.449,4.082-3.152,5.787-5.065,1.656-1.862,3.078-3.921,4.224-6.114,1.114-2.135,1.97-4.392,2.537-6.705.554-2.256.831-4.557.831-6.845,0-2.231-.265-4.436-.782-6.565-.505-2.072-1.256-4.061-2.223-5.911-.942-1.805-2.087-3.47-3.411-4.957-1.287-1.449-2.728-2.72-4.297-3.781-1.527-1.036-3.158-1.868-4.858-2.479-1.65-.591-3.362-.972-5.079-1.125-1.669-.153-3.343-.089-4.975.184-1.588.267-3.128.731-4.587,1.379-1.416.629-2.746,1.436-3.953,2.39-1.176.934-2.229,2.002-3.128,3.184-.88,1.15-1.613,2.402-2.186,3.718-.554,1.284-.954,2.625-1.188,3.991-.228,1.328-.289,2.676-.197,3.998.092,1.29.339,2.555.727,3.769.382,1.176.899,2.301,1.533,3.33.622,1.004,1.354,1.919,2.186,2.726.807.782,1.699,1.455,2.654,2.002.93.534,1.915.947,2.924,1.22.985.273,1.995.413,2.998.426.973.013,1.952-.095,2.888-.331.917-.229,1.792-.566,2.61-1.011.8-.432,1.539-.96,2.204-1.57.646-.597,1.219-1.271,1.693-1.996.468-.712.843-1.474,1.12-2.269.271-.775.45-1.576.53-2.39.074-.788.055-1.576-.055-2.351-.111-.75-.308-1.487-.585-2.173-.271-.674-.622-1.309-1.04-1.881-.406-.559-.88-1.068-1.398-1.506-.511-.426-1.065-.782-1.644-1.061-.573-.273-1.17-.47-1.773-.585-.591-.114-1.194-.153-1.792-.114-.579.038-1.151.146-1.693.324-.53.178-1.04.419-1.502.718-.456.292-.874.642-1.238,1.036-.357.381-.665.807-.924,1.265-.246.445-.437.915-.566,1.405-.129.477-.197.96-.209,1.449-.012.477.031.947.135,1.405.098.445.246.877.443,1.277.191.394.431.756.708,1.08.271.318.573.604.905.839.326.235.671.419,1.04.559.357.14.726.229,1.096.273.363.038.726.038,1.09-.013.351-.051.69-.14,1.01-.28.252-.108.493-.242.714-.394-.16.216-.326.426-.523.617-.302.292-.634.553-1.004.763-.376.216-.782.394-1.213.508-.437.121-.893.191-1.361.197-.48.006-.96-.044-1.434-.159-.486-.114-.96-.299-1.416-.54-.468-.248-.905-.559-1.305-.928-.413-.375-.782-.807-1.096-1.284-.326-.496-.591-1.03-.794-1.595-.209-.585-.345-1.201-.413-1.83-.068-.648-.055-1.316.037-1.97.092-.68.271-1.347.53-1.996.265-.661.609-1.296,1.034-1.887.431-.604.942-1.157,1.515-1.64.591-.502,1.244-.928,1.945-1.265.72-.35,1.496-.61,2.29-.769.819-.165,1.669-.222,2.518-.172.874.051,1.749.216,2.598.489.874.28,1.718.68,2.512,1.182.813.515,1.576,1.144,2.253,1.862.702.744,1.318,1.582,1.829,2.491.523.934.942,1.951,1.238,3.006.302,1.087.474,2.224.505,3.375.037,1.182-.074,2.383-.326,3.559-.259,1.214-.665,2.396-1.213,3.527-.56,1.163-1.268,2.256-2.106,3.254-.856,1.03-1.847,1.951-2.943,2.746-1.12.813-2.358,1.487-3.663,2.002-1.342.528-2.758.89-4.211,1.061-1.49.178-3.017.172-4.531-.032-1.558-.21-3.103-.629-4.587-1.233-1.527-.623-2.992-1.455-4.347-2.466-1.391-1.036-2.672-2.263-3.793-3.642-1.158-1.424-2.143-3-2.943-4.697-.819-1.741-1.428-3.603-1.816-5.536-.4-1.983-.554-4.029-.468-6.088.092-2.116.437-4.233,1.034-6.298.616-2.123,1.496-4.176,2.611-6.108.425-.737,10.663-17.954,32.151-13.664,23.722,4.741,28.918,26.165,28.918,34.02,0,.35.277.636.616.636s.616-.286.616-.636c0-8.148-5.375-30.36-29.916-35.266l-.012.006Z" fill="#fff"/>
144
- </g>
145
- </g>
146
- </svg>
147
- `}}}},Symbol.toStringTag,{value:"Module"})),Si={showPredefinedQuestions:!0,showOverallFeedbackButton:!1,theme:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f2f2f2",100:"#e6e6e6",200:"#cccccc",300:"#b3b3b3",400:"#999999",500:"#808080",600:"#666666",700:"#4d4d4d",800:"#333333",900:"#1a1a1a",950:"#0d0d0d"},highlight:{50:"#f2f7fc",100:"#e6f0fa",200:"#cce1f5",300:"#b3d1ef",400:"#80b3e6",500:"#4d94dd",600:"#1a75d2",700:"#1459a6",800:"#0d3d7a",900:"#06224d",950:"#031326"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-600)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},anchor:{color:"var(--color-brand-800)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"white",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-brand-950)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-grey-800)",background:"var(--color-grey-200)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},chatMenu:{background:"var(--color-brand-50)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"0 15px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-500)",separatorColor:"var(--color-brand-200)"}},chatMenuItem:{background:"transparent",color:"var(--color-grey-800)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--color-brand-900)",background:"var(--color-brand-100)"},custom:{activeColor:"var(--color-brand-900)",activeBackground:"var(--color-brand-100)"}},card:{color:"inherit",background:"var(--color-grey-50)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-grey-800)",background:"var(--color-grey-100)"},custom:{iconColor:"var(--color-brand-400)",iconHoverColor:"var(--color-brand-600)"}},chatFooter:{color:"var(--color-grey-500)",background:"var(--color-grey-0)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px rgba(255, 255, 255, 0.9)"},chatInput:{color:"var(--color-grey-700)",background:"var(--color-brand-50)",borderRadius:{minRem:.75,maxRem:1},focus:{color:"var(--color-grey-900)",background:"var(--color-brand-100)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedOpacity:"0.3",deactivatedScale:"0.8"}},dialog:{background:"var(--color-grey-50)",color:"var(--body-color)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--color-grey-200)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{background:"var(--color-brand-50)",borderRadius:{minRem:.5,maxRem:.75}},pillDefault:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--color-grey-0)",color:"var(--body-color)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0 15px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',edit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16.7 3.1 4.2 4.2-13.1 13.1-4.2-4.2z"/><path d="m3.6 16.1-2.1 6.4 6.4-2.1s-4.2-4.2-4.2-4.2z"/><path d="m20.9 7.3-4.2-4.2.7-.7c1.2-1.2 3.1-1.1 4.2 0 1.1 1.2 1.1 3 0 4.2z"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',thread:'<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',submit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>',expand:'<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',help:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="m9.75 15.63v-.33c0-1.13.11-2.03.3-2.7.2-.67.49-1.21.87-1.62s.84-.79 1.38-1.12c.4-.26.76-.52 1.08-.8s.57-.58.76-.92.28-.72.28-1.14c0-.44-.11-.83-.32-1.17-.21-.33-.5-.59-.86-.77s-.75-.27-1.19-.27-.82.09-1.2.28c-.38.18-.68.45-.92.81-.24.35-.37.8-.39 1.32h-3.96c.03-1.29.34-2.35.93-3.19s1.37-1.47 2.34-1.88c.97-.42 2.04-.63 3.22-.63 1.29 0 2.43.21 3.42.64.99.42 1.77 1.03 2.33 1.83s.85 1.76.85 2.89c0 .75-.13 1.42-.38 2.01-.25.58-.59 1.1-1.04 1.55-.45.44-.97.85-1.58 1.21-.51.3-.93.62-1.26.95-.32.33-.57.71-.73 1.14s-.24.96-.24 1.59v.33h-3.68zm1.92 6.18c-.65 0-1.2-.23-1.66-.68-.45-.68-1-.67-1.64 0-.63.22-1.17.67-1.62.46-.45 1.01-.68 1.66-.68s1.16.23 1.62.68c.47.45.7.99.71 1.62 0 .43-.12.81-.34 1.17-.21.35-.5.63-.85.84s-.73.31-1.15.31z"/></svg>',attach:'<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',record:'<svg viewBox="0 0 24 24"><path d="m12 18.5 0 5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M12 0.5a4 4 0 0 0 -4 4v7a4 4 0 0 0 8 0v-7a4 4 0 0 0 -4 -4Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M19 8.5v3a7 7 0 0 1 -14 0v-3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',reward:'<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',share:'<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>',audio:'<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',copy:'<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>',dismiss:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>',menu:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>',externalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>',internalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>',chevronDown:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="m12 13.171 4.95-4.95 1.414 1.415L12 16 5.636 9.636 7.05 8.222l4.95 4.95Z"/></svg>',liip:'<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>',avatar:`
86
+ `,showOverallFeedbackButton:!0,fontURLs:["https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"],theme:{font:{family:"Inter, sans-serif"},colors:{brand:{50:"#F2FDFF",100:"#DBF9FF",200:"#B6EDFA",300:"#85D4EE",400:"#51b9da",500:"#079BCA",600:"#0E81A7",700:"#146C8B",800:"#1B5268",900:"#1E4557"},accent:{50:"#F2F7F3",100:"#DDECDE",200:"#B8D6BE",300:"#7BB589",400:"#469A5D",500:"#2A9749",600:"#32834A",700:"#2A713F",800:"#245333",900:"#1F402A"},highlight:{50:"#F9F6FD",100:"#F4EDFA",200:"#E8DAF4",300:"#D7BDEA",400:"#C196DC",500:"#A56CC9",600:"#9156B4",700:"#723D8E",800:"#5F3375",900:"#512E61"},grey:{0:"#ffffff",50:"#F2F2F2",100:"#EBEBEB",200:"#E3E3E3",300:"#BABABA",400:"#A5A5A5",500:"#949494",600:"#777777",700:"#535353",800:"#403F3F",900:"#333333",1e3:"#000000"}},components:{body:{custom:{fontSize:"clamp(1rem, 0.875rem + 0.625cqi, 1.125rem)"}},chatMenu:{background:"var(--color-accent-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-700)",separatorColor:"var(--color-accent-200)"}},chatMenuItem:{background:"transparent",color:"var(--color-grey-800)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--color-brand-900)",background:"var(--color-accent-100)"},custom:{activeColor:"var(--color-brand-900)",activeBackground:"var(--color-accent-100)"}},card:{color:"var(--color-brand-900)",background:"var(--color-accent-50)",borderColor:"var(--color-accent-600)",borderWidth:"1px",hover:{background:"var(--color-accent-50)",borderColor:"var(--color-highlight-600)",boxShadow:"0px 12px 32px -10px rgba(232, 218, 244, 0.5)"},custom:{iconColor:"var(--color-accent-600)",iconHoverColor:"var(--color-accent-600)"}},chatFooter:{color:"var(--color-grey-500)",background:"var(--color-grey-0)",borderRadius:{minRem:2.5,maxRem:3},boxShadow:"0px -10px 20px 5px rgba(255, 255, 255, 0.9)"},btnPrimary:{borderRadius:{minRem:50,maxRem:50}},btnSecondary:{color:"var(--color-brand-900)",background:"var(--color-grey-0)",borderColor:"var(--color-brand-900)",borderWidth:"1px",boxShadow:"0",borderRadius:{minRem:50,maxRem:50},hover:{color:"var(--color-brand-900)",background:"var(--color-accent-50)",boxShadow:"0"}},btnTertiary:{color:"var(--color-brand-900)",background:"var(--color-accent-50)",borderColor:"var(--color-accent-700)",borderWidth:"1px",borderRadius:{minRem:50,maxRem:50},hover:{background:"var(--color-accent-100)",borderColor:"var(--color-accent-800)"}},label:{color:"var(--color-grey-600)",custom:{fontWeight:"bold"}},chatInput:{background:"var(--color-brand-0)",borderColor:"var(--color-brand-900)",borderWidth:"1px",borderRadius:{minRem:1,maxRem:2.25},focus:{background:"var(--color-brand-0)",borderColor:"var(--color-highlight-600)"}},chatInputSubmit:{background:"var(--color-brand-800)",borderColor:"var(--color-brand-700)",borderWidth:"1px",borderRadius:{minRem:2,maxRem:2},custom:{deactivatedScale:"0.95"}},dialog:{background:"var(--color-grey-0)",boxShadow:"0 12px 32px -5px rgba(42, 113, 63, 0.2)",custom:{backgroundOverlay:"rgba(42, 113, 63, 0.1)",headerFontSize:"1.5rem",headerFontWeight:"regular",headerBorderBottomColor:"var(--color-grey-200)"}},messageUser:{background:"var(--color-accent-50)",borderRadius:{minRem:.5,maxRem:.75}},pillDefault:{color:"var(--color-grey-0)",background:"var(--color-brand-900)",borderRadius:{minRem:.2,maxRem:.25},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},referencesTrigger:{color:"var(--color-grey-900)",background:"var(--color-grey-100)",borderColor:"var(--color-grey-400)",borderWidth:"1px",borderRadius:{minRem:.2,maxRem:.25},hover:{background:"var(--color-grey-200)",borderColor:"var(--color-highlight-600)",boxShadow:"0 4px 4px 0 rgba(0, 0, 0, 0.1)"},custom:{padding:"var(--spacer-3) var(--spacer-8) var(--spacer-3) var(--spacer-12)"}},reference:{color:"var(--brand-color-900)",background:"var(--color-grey-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px",borderRadius:{minRem:.2,maxRem:.25},hover:{color:"var(--brand-color-900)",background:"var(--color-grey-50)",borderColor:"var(--color-highlight-600)",boxShadow:"0px 12px 32px -10px rgba(232, 218, 244, 0.5)"}},referenceNumeral:{color:"var(--color-brand-900)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.2,maxRem:.25},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--color-brand-900)",background:"var(--color-grey-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px",borderRadius:{minRem:.2,maxRem:.25},hover:{color:"var(--color-brand-900)",background:"var(--color-grey-100)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--color-grey-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-brand-900)",background:"var(--color-grey-100)",borderColor:"var(--color-highlight-600)"},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--color-accent-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px"},tooltip:{background:"var(--color-brand-900)",color:"var(--color-grey-0)"}},svgs:{avatar:`
87
+ <svg fill="none" height="75" viewBox="0 0 75 75" width="75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><filter id="a" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="106" width="106" x="-15.5" y="-13.5"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="2"/><feGaussianBlur stdDeviation="7.75"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.94902 0 0 0 0 0.992157 0 0 0 0 1 0 0 0 1 0"/><feBlend in2="BackgroundImageFix" mode="normal" result="effect1_dropShadow_2572_44823"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_2572_44823" mode="normal" result="shape"/></filter><filter id="b" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="27.9038" width="33.5056" x="20.6693" y="34.1558"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="-2" dy="8"/><feGaussianBlur stdDeviation="6.3"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix type="matrix" values="0 0 0 0 0.756863 0 0 0 0 0.588235 0 0 0 0 0.862745 0 0 0 0.74 0"/><feBlend in2="shape" mode="normal" result="effect1_innerShadow_2572_44823"/></filter><filter id="c" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="14.001" width="19.8318" x="28.0566" y="25.5059"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-2"/><feGaussianBlur stdDeviation="1.5"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix type="matrix" values="0 0 0 0 0.482353 0 0 0 0 0.709804 0 0 0 0 0.537255 0 0 0 1 0"/><feBlend in2="shape" mode="normal" result="effect1_innerShadow_2572_44823"/></filter><filter id="d" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="41.9692" width="37.016" x="25.8535" y="23.2988"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="1"/><feGaussianBlur stdDeviation="3"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix type="matrix" values="0 0 0 0 0.721569 0 0 0 0 0.839216 0 0 0 0 0.745098 0 0 0 1 0"/><feBlend in2="shape" mode="normal" result="effect1_innerShadow_2572_44823"/></filter><filter id="e" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="37.7661" width="38.3581" x="8.01545" y="10.7153"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="-6" dy="-3"/><feGaussianBlur stdDeviation="2.85"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix type="matrix" values="0 0 0 0 0.317647 0 0 0 0 0.72549 0 0 0 0 0.854902 0 0 0 1 0"/><feBlend in2="shape" mode="normal" result="effect1_innerShadow_2572_44823"/></filter><filter id="f" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="80" width="78" x="-3" y="-5"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="-3" dy="-5"/><feGaussianBlur stdDeviation="6.35"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix type="matrix" values="0 0 0 0 0.121569 0 0 0 0 0.25098 0 0 0 0 0.164706 0 0 0 0.31 0"/><feBlend in2="shape" mode="normal" result="effect1_innerShadow_2572_44823"/></filter><filter id="g" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="58.2643" width="58.0993" x="-6.24456" y="-4.10771"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2572_44823" stdDeviation="4.35"/></filter><radialGradient id="h" cx="0" cy="0" gradientTransform="matrix(.4999885 26.49998365 -103.89250968 1.96019216 37.5 37.5)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".000928914" stop-color="#ddecde"/><stop offset=".99" stop-color="#f2f7f3"/></radialGradient><radialGradient id="i" cx="0" cy="0" gradientTransform="matrix(0 37.5 -37.5 0 37.5 37.5)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".475" stop-color="#ddecde"/><stop offset=".91" stop-color="#cddace"/><stop offset="1" stop-color="#ddecde"/></radialGradient><radialGradient id="j" cx="0" cy="0" gradientTransform="matrix(-3.76625393 20.88594195 -27.55950762 -4.96966353 40.7257 39.3435)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".14298" stop-color="#0e81a7"/><stop offset=".597825" stop-color="#146c8b"/><stop offset="1" stop-color="#166a8c"/></radialGradient><radialGradient id="k" cx="0" cy="0" gradientTransform="matrix(3.42393584 -13.0109219 17.23916447 4.53663418 38.0203 38.5003)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".00899963" stop-color="#7bb589"/><stop offset=".634" stop-color="#2a713f"/><stop offset=".999" stop-color="#469a5d"/></radialGradient><radialGradient id="l" cx="0" cy="0" gradientTransform="matrix(17.46201607 20.2011257 -28.55530516 24.68343621 41.9856 41.0213)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".00899963" stop-color="#ddecde"/><stop offset=".594" stop-color="#2a9749"/><stop offset="1" stop-color="#96daa3"/></radialGradient><radialGradient id="m" cx="0" cy="0" gradientTransform="matrix(-14.72281437 -18.14681334 20.98655072 -17.02674099 32.3641 34.4184)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".14298" stop-color="#85d4ee"/><stop offset=".704" stop-color="#0e81a7"/><stop offset="1" stop-color="#1590b9"/></radialGradient><clipPath id="n"><path d="m0 0h75v75h-75z"/></clipPath><g clip-path="url(#n)"><path d="m0 0h75v75h-75z" fill="#fff"/><g filter="url(#a)"><circle cx="37.5" cy="37.5" fill="url(#h)" r="37.5"/><circle cx="37.5" cy="37.5" r="37" stroke="url(#i)"/></g><g filter="url(#b)" opacity=".8"><path d="m54.028 40.1001c-.978 8.6315-8.7679 14.8359-17.3994 13.8579s-14.8358-8.768-13.8578-17.3994c.978-8.6315 11.0608 8.691 19.6923 9.669 8.6314.978 12.5429-14.7589 11.5649-6.1275z" fill="url(#j)"/></g><g filter="url(#c)" opacity=".8"><path d="m28.085 36.8949c.2871-5.4647 4.9498-9.6621 10.4145-9.375 5.4647.287 9.6621 4.9497 9.375 10.4144-.287 5.4648-7.2854-5.0448-12.7501-5.3318-5.4647-.2871-7.3264 9.7571-7.0394 4.2924z" fill="url(#k)"/></g><g filter="url(#d)" opacity=".8"><path d="m54.3191 25.1678c9.5583 7.3139 11.3777 20.9914 4.0638 30.5497-7.3138 9.5582-20.9914 11.3776-30.5496 4.0638-9.5583-7.3139 18.2095-6.9473 25.5234-16.5056 7.3138-9.5582-8.5958-25.4217.9624-18.1079z" fill="url(#l)"/></g><g filter="url(#e)" opacity=".8"><path d="m20.2093 46.7184c-7.8476-6.793-8.7025-18.6616-1.9094-26.5092s18.6617-8.7024 26.5093-1.9094c7.8475 6.7931-16.0366 5.0334-22.8296 12.881-6.7931 7.8475 6.0772 22.3307-1.7703 15.5376z" fill="url(#m)"/></g><g filter="url(#f)"><circle cx="37.5" cy="37.5" fill="#fff" fill-opacity=".02" r="37.5"/></g><g filter="url(#g)"><path d="m37.46 13.1572c-15.6151 6.3986-17.6531 6.3986-21.7445 9.7285-14.931513 12.1529-6.92972 31.481-11.83181 17.9566-4.90208-13.5244 3.22073-28.8728 18.14281-34.28143 14.9221-5.40869 29.4833 1.5038 15.4335 6.59633z" fill="#fff"/></g></g></svg>
88
+ `}}}},Symbol.toStringTag,{value:"Module"})),Oi={showPredefinedQuestions:!0,showOverallFeedbackButton:!1,theme:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f2f2f2",100:"#e6e6e6",200:"#cccccc",300:"#b3b3b3",400:"#999999",500:"#808080",600:"#666666",700:"#4d4d4d",800:"#333333",900:"#1a1a1a",950:"#0d0d0d"},highlight:{50:"#f2f7fc",100:"#e6f0fa",200:"#cce1f5",300:"#b3d1ef",400:"#80b3e6",500:"#4d94dd",600:"#1a75d2",700:"#1459a6",800:"#0d3d7a",900:"#06224d",950:"#031326"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-600)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},anchor:{color:"var(--color-brand-800)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"white",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-brand-950)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-grey-800)",background:"var(--color-grey-200)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},chatMenu:{background:"var(--color-brand-50)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"0 15px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-500)",separatorColor:"var(--color-brand-200)"}},chatMenuItem:{background:"transparent",color:"var(--color-grey-800)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--color-brand-900)",background:"var(--color-brand-100)"},custom:{activeColor:"var(--color-brand-900)",activeBackground:"var(--color-brand-100)"}},card:{color:"inherit",background:"var(--color-grey-50)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--color-grey-800)",background:"var(--color-grey-100)"},custom:{iconColor:"var(--color-brand-400)",iconHoverColor:"var(--color-brand-600)"}},chatFooter:{color:"var(--color-grey-500)",background:"var(--color-grey-0)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px rgba(255, 255, 255, 0.9)"},chatInput:{color:"var(--color-grey-700)",background:"var(--color-brand-50)",borderRadius:{minRem:.75,maxRem:1},focus:{color:"var(--color-grey-900)",background:"var(--color-brand-100)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedOpacity:"0.3",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{background:"var(--color-grey-50)",color:"var(--body-color)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--color-grey-200)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{background:"var(--color-brand-50)",borderRadius:{minRem:.5,maxRem:.75}},pillDefault:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referenceNumeral:{color:"var(--color-grey-900)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:.75,maxRem:1},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--color-grey-0)",color:"var(--body-color)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0 15px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',edit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m16.7 3.1 4.2 4.2-13.1 13.1-4.2-4.2z"/><path d="m3.6 16.1-2.1 6.4 6.4-2.1s-4.2-4.2-4.2-4.2z"/><path d="m20.9 7.3-4.2-4.2.7-.7c1.2-1.2 3.1-1.1 4.2 0 1.1 1.2 1.1 3 0 4.2z"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',thread:'<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',submit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>',expand:'<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',help:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="m9.75 15.63v-.33c0-1.13.11-2.03.3-2.7.2-.67.49-1.21.87-1.62s.84-.79 1.38-1.12c.4-.26.76-.52 1.08-.8s.57-.58.76-.92.28-.72.28-1.14c0-.44-.11-.83-.32-1.17-.21-.33-.5-.59-.86-.77s-.75-.27-1.19-.27-.82.09-1.2.28c-.38.18-.68.45-.92.81-.24.35-.37.8-.39 1.32h-3.96c.03-1.29.34-2.35.93-3.19s1.37-1.47 2.34-1.88c.97-.42 2.04-.63 3.22-.63 1.29 0 2.43.21 3.42.64.99.42 1.77 1.03 2.33 1.83s.85 1.76.85 2.89c0 .75-.13 1.42-.38 2.01-.25.58-.59 1.1-1.04 1.55-.45.44-.97.85-1.58 1.21-.51.3-.93.62-1.26.95-.32.33-.57.71-.73 1.14s-.24.96-.24 1.59v.33h-3.68zm1.92 6.18c-.65 0-1.2-.23-1.66-.68-.45-.68-1-.67-1.64 0-.63.22-1.17.67-1.62.46-.45 1.01-.68 1.66-.68s1.16.23 1.62.68c.47.45.7.99.71 1.62 0 .43-.12.81-.34 1.17-.21.35-.5.63-.85.84s-.73.31-1.15.31z"/></svg>',attach:'<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',record:'<svg viewBox="0 0 24 24"><path d="m12 18.5 0 5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M12 0.5a4 4 0 0 0 -4 4v7a4 4 0 0 0 8 0v-7a4 4 0 0 0 -4 -4Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M19 8.5v3a7 7 0 0 1 -14 0v-3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',reward:'<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',share:'<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>',audio:'<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',copy:'<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>',dismiss:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>',menu:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>',externalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>',internalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>',chevronDown:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="m12 13.171 4.95-4.95 1.414 1.415L12 16 5.636 9.636 7.05 8.222l4.95 4.95Z"/></svg>',liip:'<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>',avatar:`
148
89
  <svg viewBox="0 0 24 24">
149
90
  <circle cx="12" cy="12" r="11" fill="var(--color-grey-100)"/>
150
91
  <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
@@ -153,7 +94,33 @@ var LiipGPTChat=function(Xe){"use strict";var Aw=Object.defineProperty;var Rw=Ob
153
94
  <path d="m18.2 16.1c-1.3.4-1.7.9-2 2.1-.3-1.2-.7-1.6-2-2.1 1.3-.4 1.7-.9 2-2.1.3 1.2.7 1.6 2 2.1z" vector-effect="non-scaling-stroke" />
154
95
  </g>
155
96
  </svg>
156
- `}}},Yp=Object.freeze(Object.defineProperty({__proto__:null,config:Si},Symbol.toStringTag,{value:"Module"})),Lu={...Si,theme:{...Si.theme,colors:{brand:{50:"#0d0d0d",100:"#1a1a1a",200:"#333333",300:"#4d4d4d",400:"#666666",500:"#808080",600:"#999999",700:"#b3b3b3",800:"#cccccc",900:"#e6e6e6",950:"#f2f2f2"},highlight:{50:"#031326",100:"#06224d",200:"#0d3d7a",300:"#1459a6",400:"#1a75d2",500:"#4d94dd",600:"#80b3e6",700:"#b3d1ef",800:"#cce1f5",900:"#e6f0fa",950:"#f2f7fc"},grey:{0:"#000000",50:"#171923",100:"#1a202c",200:"#2d3748",300:"#374151",400:"#4b5563",500:"#6b7280",600:"#9ca3af",700:"#d1d5db",800:"#e5e7eb",900:"#f3f4f6",950:"#f9fafb",1e3:"#ffffff"}}}},Qp=Object.freeze(Object.defineProperty({__proto__:null,config:Lu},Symbol.toStringTag,{value:"Module"})),Jp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`/* Custom styles for LiipGPT */
97
+ `}}},gg=Object.freeze(Object.defineProperty({__proto__:null,config:Oi},Symbol.toStringTag,{value:"Module"})),mg=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`@import '../utils/media.css';
98
+
99
+ .chat-app {
100
+ .predefined-question {
101
+ display: block;
102
+ font-style: italic;
103
+
104
+ & .svg {
105
+ display: none;
106
+ }
107
+
108
+ &::before {
109
+ margin-right: 0.1rem;
110
+ content: '«';
111
+ color: var(--color-brand-600);
112
+ }
113
+
114
+ &::after {
115
+ margin-left: 0.1rem;
116
+ content: '»';
117
+ color: var(--color-brand-600);
118
+ }
119
+ }
120
+ }
121
+ `,showOverallFeedbackButton:!1,fontURLs:["https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"],theme:{font:{family:"Inter, sans-serif"},colors:{brand:{50:"#F2F8FD",100:"#E0F2FE",200:"#BAE3FA",300:"#7CC9F7",400:"#38ADE9",500:"#0090D4",600:"#0070c0",700:"#005A9E",800:"#004677",900:"#003356"},highlight:{50:"#F9F6FD",100:"#F4EDFA",200:"#E8DAF4",300:"#D7BDEA",400:"#C196DC",500:"#A56CC9",600:"#9156B4",700:"#723D8E",800:"#5F3375",900:"#512E61"},grey:{0:"#ffffff",50:"#F2F2F2",100:"#EBEBEB",200:"#E3E3E3",300:"#BABABA",400:"#A5A5A5",500:"#949494",600:"#777777",700:"#535353",800:"#403F3F",900:"#333333",1e3:"#000000"}},components:{body:{custom:{fontSize:"clamp(1rem, 0.875rem + 0.625cqi, 1.125rem)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-800)"},chatMenu:{background:"var(--color-grey-50)",borderRadius:{minRem:0,maxRem:0},custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-600)",separatorColor:"var(--color-grey-200)"}},chatMenuItem:{background:"transparent",color:"var(--color-grey-800)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-600)"},custom:{activeColor:"var(--color-grey-0)",activeBackground:"var(--color-brand-600)"}},card:{color:"var(--color-brand-600)",background:"var(--color-brand-50)",borderRadius:{minRem:0,maxRem:0},hover:{background:"var(--color-brand-100)",color:"var(--color-brand-700)",borderColor:"var(--color-highlight-600)",boxShadow:"0px 12px 32px -10px rgba(232, 218, 244, 0.5)"},custom:{iconColor:"var(--color-brand-600)",iconHoverColor:"var(--color-brand-600)"}},chatFooter:{color:"var(--color-grey-500)",background:"var(--color-grey-0)",borderRadius:{minRem:2.5,maxRem:3},boxShadow:"0px -10px 20px 5px rgba(255, 255, 255, 0.9)"},btnPrimary:{background:"var(--color-brand-600)",color:"var(--color-grey-0)",borderWidth:"1px",borderColor:"var(--color-brand-600)",borderRadius:{minRem:0,maxRem:0},hover:{background:"var(--color-grey-0)",borderColor:"var(--color-brand-600)",color:"var(--color-brand-600)"}},btnSecondary:{color:"var(--color-brand-600)",background:"var(--color-grey-100)",borderColor:"var(--color-grey-100)",borderWidth:"1px",boxShadow:"0",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-600)",borderColor:"var(--color-brand-600)",boxShadow:"0"}},btnTertiary:{color:"var(--color-brand-600)",background:"var(--color-grey-0)",borderColor:"var(--color-brand-700)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},hover:{background:"var(--color-brand-600)",borderColor:"var(--color-brand-600)",color:"var(--color-grey-0)"}},chatInput:{background:"var(--color-brand-0)",borderColor:"var(--color-brand-600)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},focus:{background:"var(--color-brand-0)",borderColor:"var(--color-brand-600)",boxShadow:"0 0 0 4px var(--color-brand-200), 0 var(--spacer-4) var(--spacer-8) 0 var(--color-highlight-200), 0 var(--spacer-12) var(--spacer-40) 0 var(--color-brand-100)"}},chatInputSubmit:{background:"var(--color-brand-600)",borderColor:"var(--color-brand-600)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},custom:{deactivatedScale:"0.95"}},dialog:{background:"var(--color-grey-0)",borderRadius:{minRem:0,maxRem:0},custom:{headerFontSize:"1.125rem",headerFontWeight:"regular",headerBorderBottomColor:"var(--color-grey-200)"}},messageUser:{background:"var(--color-brand-50)",borderRadius:{minRem:0,maxRem:0}},pillDefault:{color:"var(--color-grey-0)",background:"var(--color-brand-600)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},referencesTrigger:{color:"var(--color-brand-600)",background:"var(--color-grey-100)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-600)"},custom:{padding:"var(--spacer-4) var(--spacer-8) var(--spacer-4) var(--spacer-12)"}},reference:{color:"var(--brand-color-900)",background:"var(--color-grey-50)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--brand-color-900)",background:"var(--color-grey-100)",borderColor:"var(--color-grey-100)"}},referenceNumeral:{color:"var(--color-brand-600)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},referenceNumberTrigger:{color:"var(--color-brand-600)",background:"var(--color-grey-0)",borderColor:"var(--color-brand-600)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-0)",background:"var(--color-brand-600)"}},referenceNumberContent:{color:"var(--color-grey-900)",background:"var(--color-grey-50)",borderColor:"var(--color-grey-50)",borderWidth:"1px",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--color-grey-900)",background:"var(--color-grey-100)",borderColor:"var(--color-grey-100)"},boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",borderRadius:{minRem:0,maxRem:0},hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--color-brand-50)",borderColor:"var(--color-grey-400)",borderWidth:"1px"},tooltip:{background:"var(--color-brand-600)",color:"var(--color-grey-0)",borderRadius:{minRem:0,maxRem:0}}},svgs:{avatar:`
122
+ <svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><radialGradient id="a" cx="-937.509" cy="540.739" gradientTransform="matrix(-9.50192354 -31.03289342 -31.03767433 9.5033874 7907.034 -34192.824)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".375" stop-color="#119eff"/><stop offset="1" stop-color="#0971b8"/></radialGradient><path d="m44.967 0h-45v35.946h28.321v9.054l11.273-9.054h5.406z" fill="url(#a)"/><path d="m23.215 27.229c-2.663 0-5.235-.782-7.433-2.262l-1.151-.774 1.552-2.306 1.15.774c1.739 1.171 3.789 1.794 5.886 1.79 2.111 0 4.135-.616 5.878-1.786l1.154-.774 1.548 2.306-1.155.774c-2.195 1.474-4.781 2.259-7.425 2.254zm-11.208-12.708v-.024c.002-1.407 1.142-2.546 2.549-2.547 1.406.002 2.545 1.141 2.547 2.547v.024h2.382v-.024c-.003-2.721-2.209-4.927-4.93-4.929-2.721.003-4.926 2.209-4.928 4.93v.023zm15.613 0v-.024c.002-1.406 1.142-2.546 2.548-2.547 1.406.001 2.546 1.141 2.548 2.547v.024h2.381v-.024c-.003-2.721-2.208-4.926-4.929-4.929-2.721.003-4.927 2.209-4.929 4.93v.023z" fill="#fff"/></svg>
123
+ `}}}},Symbol.toStringTag,{value:"Module"})),Uu={...Oi,theme:{...Oi.theme,colors:{brand:{50:"#0d0d0d",100:"#1a1a1a",200:"#333333",300:"#4d4d4d",400:"#666666",500:"#808080",600:"#999999",700:"#b3b3b3",800:"#cccccc",900:"#e6e6e6",950:"#f2f2f2"},highlight:{50:"#031326",100:"#06224d",200:"#0d3d7a",300:"#1459a6",400:"#1a75d2",500:"#4d94dd",600:"#80b3e6",700:"#b3d1ef",800:"#cce1f5",900:"#e6f0fa",950:"#f2f7fc"},grey:{0:"#000000",50:"#171923",100:"#1a202c",200:"#2d3748",300:"#374151",400:"#4b5563",500:"#6b7280",600:"#9ca3af",700:"#d1d5db",800:"#e5e7eb",900:"#f3f4f6",950:"#f9fafb",1e3:"#ffffff"}}}},vg=Object.freeze(Object.defineProperty({__proto__:null,config:Uu},Symbol.toStringTag,{value:"Module"})),bg=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`/* Custom styles for LiipGPT */
157
124
 
158
125
  .chat-app {
159
126
  .liipgpt-gradient-text {
@@ -196,7 +163,7 @@ var LiipGPTChat=function(Xe){"use strict";var Aw=Object.defineProperty;var Rw=Ob
196
163
  oklch(0.7 0.15 250) 60%,
197
164
  oklch(0.7 0.3 280) 100%
198
165
  )
199
- `}},body:{color:"var(--color-brand-950)",background:"linear-gradient(0deg, var(--color-brand-50) 0%, var(--color-brand-100) 90%)"},btnPrimary:{color:"var(--color-brand-950)",background:"var(--color-highlight-600)",hover:{background:"var(--color-brand-600)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-200)"},btnTertiary:{color:"var(--color-brand-900)",background:"var(--color-brand-100)",borderColor:"var(--color-brand-300)",borderWidth:"1px",hover:{background:"var(--color-brand-200)"}},chatMenu:{background:"var(--color-brand-200)",custom:{titleColor:"var(--color-brand-800)",separatorColor:"var(--color-brand-400)"}},chatMenuItem:{hover:{background:"var(--color-brand-300)"}},card:{borderWidth:"1px",borderColor:"var(--color-brand-300)",hover:{borderColor:"var(--color-brand-500)"},custom:{iconColor:"var(--color-highlight-400)",iconHoverColor:"var(--color-highlight-300)"}},chatFooter:{color:"var(--color-grey-600)",background:"var(--color-brand-50)",borderRadius:{minRem:.75,maxRem:1.5},boxShadow:"0px -10px 20px 5px rgba(24, 21, 25, 0.4)"},chatInput:{color:"var(--color-grey-700)",borderColor:"var(--color-brand-300)",borderWidth:"1px",focus:{borderColor:"var(--color-highlight-500)"}},chatInputSubmit:{background:"var(--liip-gradient)",custom:{deactivatedBackground:"inherit",deactivatedOpacity:"0.2"}},messageUser:{background:"var(--color-brand-50)",borderColor:"var(--color-brand-300)",borderWidth:"1px"},referenceNumberTrigger:{color:"var(--color-brand-800)",background:"var(--color-brand-200)",hover:{color:"var(--color-brand-900)",background:"var(--color-brand-300)"}},tooltip:{background:"var(--color-grey-0)"}},svgs:{avatar:`
166
+ `}},body:{color:"var(--color-brand-950)",background:"linear-gradient(0deg, var(--color-brand-50) 0%, var(--color-brand-100) 90%)"},btnPrimary:{color:"var(--color-brand-950)",background:"var(--color-highlight-600)",hover:{background:"var(--color-brand-600)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-200)"},btnTertiary:{color:"var(--color-brand-900)",background:"var(--color-brand-100)",borderColor:"var(--color-brand-300)",borderWidth:"1px",hover:{background:"var(--color-brand-200)"}},chatMenu:{background:"var(--color-brand-200)",custom:{titleColor:"var(--color-brand-800)",separatorColor:"var(--color-brand-400)"}},chatMenuItem:{hover:{background:"var(--color-brand-300)"}},card:{borderWidth:"1px",borderColor:"var(--color-brand-300)",hover:{borderColor:"var(--color-brand-500)"},custom:{iconColor:"var(--color-highlight-400)",iconHoverColor:"var(--color-highlight-300)"}},chatFooter:{color:"var(--color-grey-600)",background:"var(--color-brand-50)",borderRadius:{minRem:.75,maxRem:1.5},boxShadow:"0px -10px 20px 5px rgba(24, 21, 25, 0.4)"},chatInput:{color:"var(--color-grey-700)",borderColor:"var(--color-brand-300)",borderWidth:"1px",focus:{borderColor:"var(--color-highlight-500)"}},chatInputSubmit:{background:"var(--liip-gradient)",custom:{deactivatedBackground:"inherit",deactivatedOpacity:"0.2"}},messageUser:{background:"var(--color-brand-50)",borderColor:"var(--color-brand-300)",borderWidth:"1px"},referenceNumeral:{color:"var(--color-brand-800)"},referenceNumberTrigger:{color:"var(--color-brand-800)",background:"var(--color-brand-200)",hover:{color:"var(--color-brand-900)",background:"var(--color-brand-300)"}},tooltip:{background:"var(--color-grey-0)"}},svgs:{avatar:`
200
167
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
201
168
  <style>
202
169
  .svg--avatar {
@@ -355,7 +322,7 @@ var LiipGPTChat=function(Xe){"use strict";var Aw=Object.defineProperty;var Rw=Ob
355
322
  <!-- Grain -->
356
323
  <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
357
324
  </svg>
358
- `}}}},Symbol.toStringTag,{value:"Module"}));var Be;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{const a={};for(const i of o)a[i]=i;return a},t.getValidEnumValues=o=>{const a=t.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),i={};for(const s of a)i[s]=o[s];return t.objectValues(i)},t.objectValues=o=>t.objectKeys(o).map(function(a){return o[a]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const a=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&a.push(i);return a},t.find=(o,a)=>{for(const i of o)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,a=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(Be||(Be={}));var kl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(kl||(kl={}));const Q=Be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rn=t=>{switch(typeof t){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(t)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(t)?Q.array:t===null?Q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Q.promise:typeof Map<"u"&&t instanceof Map?Q.map:typeof Set<"u"&&t instanceof Set?Q.set:typeof Date<"u"&&t instanceof Date?Q.date:Q.object;default:return Q.unknown}},N=Be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Xp=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class er extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},o=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let s=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(i))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),n}static assert(e){if(!(e instanceof er))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}er.create=t=>new er(t);const po=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===Q.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Be.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${Be.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Be.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${Be.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Be.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,Be.assertNever(t)}return{message:r}};let Mu=po;function eg(t){Mu=t}function Ti(){return Mu}const Ei=t=>{const{data:e,path:r,errorMaps:n,issueData:o}=t,a=[...r,...o.path||[]],i={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let s="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)s=c(i,{data:e,defaultError:s}).message;return{...o,path:a,message:s}},tg=[];function U(t,e){const r=Ti(),n=Ei({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===po?void 0:po].filter(o=>!!o)});t.common.issues.push(n)}class Mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const o of r){if(o.status==="aborted")return ge;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const o of r){const a=await o.key,i=await o.value;n.push({key:a,value:i})}return Mt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const o of r){const{key:a,value:i}=o;if(a.status==="aborted"||i.status==="aborted")return ge;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const ge=Object.freeze({status:"aborted"}),go=t=>({status:"dirty",value:t}),Bt=t=>({status:"valid",value:t}),xl=t=>t.status==="aborted",Sl=t=>t.status==="dirty",Mn=t=>t.status==="valid",oa=t=>typeof Promise<"u"&&t instanceof Promise;function Ci(t,e,r,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Du(t,e,r,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var le;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var aa,ia;class qr{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Fu=(t,e)=>{if(Mn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new er(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(i,s)=>{var l,c;const{message:u}=t;return i.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Ne{get description(){return this._def.description}_getType(e){return rn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:rn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Mt,ctx:{common:e.parent.common,data:e.data,parsedType:rn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(oa(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)},a=this._parseSync({data:e,path:o.path,parent:o});return Fu(o,a)}"~validate"(e){var r,n;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:o});return Mn(a)?{value:a.value}:{issues:o.common.issues}}catch(a){!((n=(r=a==null?void 0:a.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:o}).then(a=>Mn(a)?{value:a.value}:{issues:o.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(oa(o)?o:Promise.resolve(o));return Fu(n,a)}refine(e,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,a)=>{const i=e(o),s=()=>a.addIssue({code:N.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Tr({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return $r.create(this,this._def)}nullable(){return _n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sr.create(this)}promise(){return yo.create(this,this._def)}or(e){return ua.create([this,e],this._def)}and(e){return da.create(this,e,this._def)}transform(e){return new Tr({...Ce(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new ma({...Ce(this._def),innerType:this,defaultValue:r,typeName:pe.ZodDefault})}brand(){return new Cl({typeName:pe.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new va({...Ce(this._def),innerType:this,catchValue:r,typeName:pe.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ba.create(this,e)}readonly(){return ya.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const rg=/^c[^\s-]{8,}$/i,ng=/^[0-9a-z]+$/,og=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ag=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ig=/^[a-z0-9_-]{21}$/i,sg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,lg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,cg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ug="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Tl;const dg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,hg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,pg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mg=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",vg=new RegExp(`^${zu}$`);function Bu(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function bg(t){return new RegExp(`^${Bu(t)}$`)}function qu(t){let e=`${zu}T${Bu(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function yg(t,e){return!!((e==="v4"||!e)&&dg.test(t)||(e==="v6"||!e)&&hg.test(t))}function wg(t,e){if(!sg.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||!o.typ||!o.alg||e&&o.alg!==e)}catch{return!1}}function _g(t,e){return!!((e==="v4"||!e)&&fg.test(t)||(e==="v6"||!e)&&pg.test(t))}class xr extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Q.string){const a=this._getOrReturnCtx(e);return U(a,{code:N.invalid_type,expected:Q.string,received:a.parsedType}),ge}const n=new Mt;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:N.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:N.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,s=e.data.length<a.value;(i||s)&&(o=this._getOrReturnCtx(e,o),i?U(o,{code:N.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&U(o,{code:N.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")cg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"email",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Tl||(Tl=new RegExp(ug,"u")),Tl.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"emoji",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")ag.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"uuid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")ig.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"nanoid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")rg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cuid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")ng.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cuid2",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")og.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"ulid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),U(o,{validation:"url",code:N.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"regex",code:N.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?qu(a).test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?vg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?bg(a).test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:N.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?lg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"duration",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?yg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"ip",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?wg(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"jwt",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?_g(e.data,a.version)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cidr",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?gg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"base64",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?mg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"base64url",code:N.invalid_string,message:a.message}),n.dirty()):Be.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:N.invalid_string,...le.errToObj(n)})}_addCheck(e){return new xr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...le.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...le.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...le.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...le.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...le.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...le.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...le.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...le.errToObj(r)})}nonempty(e){return this.min(1,le.errToObj(e))}trim(){return new xr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}xr.create=t=>{var e;return new xr({checks:[],typeName:pe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function kg(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,a=parseInt(t.toFixed(o).replace(".","")),i=parseInt(e.toFixed(o).replace(".",""));return a%i/Math.pow(10,o)}class bn extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Q.number){const a=this._getOrReturnCtx(e);return U(a,{code:N.invalid_type,expected:Q.number,received:a.parsedType}),ge}let n;const o=new Mt;for(const a of this._def.checks)a.kind==="int"?Be.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?kg(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_finite,message:a.message}),o.dirty()):Be.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,le.toString(r))}gt(e,r){return this.setLimit("min",e,!1,le.toString(r))}lte(e,r){return this.setLimit("max",e,!0,le.toString(r))}lt(e,r){return this.setLimit("max",e,!1,le.toString(r))}setLimit(e,r,n,o){return new bn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:le.toString(o)}]})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Be.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}bn.create=t=>new bn({checks:[],typeName:pe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class yn extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Q.bigint)return this._getInvalidInput(e);let n;const o=new Mt;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):Be.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:Q.bigint,received:r.parsedType}),ge}gte(e,r){return this.setLimit("min",e,!0,le.toString(r))}gt(e,r){return this.setLimit("min",e,!1,le.toString(r))}lte(e,r){return this.setLimit("max",e,!0,le.toString(r))}lt(e,r){return this.setLimit("max",e,!1,le.toString(r))}setLimit(e,r,n,o){return new yn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:le.toString(o)}]})}_addCheck(e){return new yn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}yn.create=t=>{var e;return new yn({checks:[],typeName:pe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class sa extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Q.boolean){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.boolean,received:n.parsedType}),ge}return Bt(e.data)}}sa.create=t=>new sa({typeName:pe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class Dn extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Q.date){const a=this._getOrReturnCtx(e);return U(a,{code:N.invalid_type,expected:Q.date,received:a.parsedType}),ge}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return U(a,{code:N.invalid_date}),ge}const n=new Mt;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:N.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:N.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Be.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Dn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Dn.create=t=>new Dn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:pe.ZodDate,...Ce(t)});class Ai extends Ne{_parse(e){if(this._getType(e)!==Q.symbol){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.symbol,received:n.parsedType}),ge}return Bt(e.data)}}Ai.create=t=>new Ai({typeName:pe.ZodSymbol,...Ce(t)});class la extends Ne{_parse(e){if(this._getType(e)!==Q.undefined){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.undefined,received:n.parsedType}),ge}return Bt(e.data)}}la.create=t=>new la({typeName:pe.ZodUndefined,...Ce(t)});class ca extends Ne{_parse(e){if(this._getType(e)!==Q.null){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.null,received:n.parsedType}),ge}return Bt(e.data)}}ca.create=t=>new ca({typeName:pe.ZodNull,...Ce(t)});class mo extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return Bt(e.data)}}mo.create=t=>new mo({typeName:pe.ZodAny,...Ce(t)});class Fn extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Bt(e.data)}}Fn.create=t=>new Fn({typeName:pe.ZodUnknown,...Ce(t)});class nn extends Ne{_parse(e){const r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:Q.never,received:r.parsedType}),ge}}nn.create=t=>new nn({typeName:pe.ZodNever,...Ce(t)});class Ri extends Ne{_parse(e){if(this._getType(e)!==Q.undefined){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.void,received:n.parsedType}),ge}return Bt(e.data)}}Ri.create=t=>new Ri({typeName:pe.ZodVoid,...Ce(t)});class Sr extends Ne{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Q.array)return U(r,{code:N.invalid_type,expected:Q.array,received:r.parsedType}),ge;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(i||s)&&(U(r,{code:i?N.too_big:N.too_small,minimum:s?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(U(r,{code:N.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(U(r,{code:N.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,s)=>o.type._parseAsync(new qr(r,i,r.path,s)))).then(i=>Mt.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new qr(r,i,r.path,s)));return Mt.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Sr({...this._def,minLength:{value:e,message:le.toString(r)}})}max(e,r){return new Sr({...this._def,maxLength:{value:e,message:le.toString(r)}})}length(e,r){return new Sr({...this._def,exactLength:{value:e,message:le.toString(r)}})}nonempty(e){return this.min(1,e)}}Sr.create=(t,e)=>new Sr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ce(e)});function vo(t){if(t instanceof vt){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=$r.create(vo(n))}return new vt({...t._def,shape:()=>e})}else return t instanceof Sr?new Sr({...t._def,type:vo(t.element)}):t instanceof $r?$r.create(vo(t.unwrap())):t instanceof _n?_n.create(vo(t.unwrap())):t instanceof jr?jr.create(t.items.map(e=>vo(e))):t}class vt extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Be.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==Q.object){const c=this._getOrReturnCtx(e);return U(c,{code:N.invalid_type,expected:Q.object,received:c.parsedType}),ge}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof nn&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||s.push(c);const l=[];for(const c of i){const u=a[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new qr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof nn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(U(o,{code:N.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new qr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Mt.mergeObjectSync(n,c)):Mt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,a,i,s;const l=(i=(a=(o=this._def).errorMap)===null||a===void 0?void 0:a.call(o,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=le.errToObj(e).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:pe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){const r={};return Be.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new vt({...this._def,shape:()=>r})}omit(e){const r={};return Be.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new vt({...this._def,shape:()=>r})}deepPartial(){return vo(this)}partial(e){const r={};return Be.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}),new vt({...this._def,shape:()=>r})}required(e){const r={};return Be.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof $r;)a=a._def.innerType;r[n]=a}}),new vt({...this._def,shape:()=>r})}keyof(){return ju(Be.objectKeys(this.shape))}}vt.create=(t,e)=>new vt({shape:()=>t,unknownKeys:"strip",catchall:nn.create(),typeName:pe.ZodObject,...Ce(e)}),vt.strictCreate=(t,e)=>new vt({shape:()=>t,unknownKeys:"strict",catchall:nn.create(),typeName:pe.ZodObject,...Ce(e)}),vt.lazycreate=(t,e)=>new vt({shape:t,unknownKeys:"strip",catchall:nn.create(),typeName:pe.ZodObject,...Ce(e)});class ua extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function o(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new er(s.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:i}),ge}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let a;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(l=>new er(l));return U(r,{code:N.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}}ua.create=(t,e)=>new ua({options:t,typeName:pe.ZodUnion,...Ce(e)});const on=t=>t instanceof ha?on(t.schema):t instanceof Tr?on(t.innerType()):t instanceof pa?[t.value]:t instanceof wn?t.options:t instanceof ga?Be.objectValues(t.enum):t instanceof ma?on(t._def.innerType):t instanceof la?[void 0]:t instanceof ca?[null]:t instanceof $r?[void 0,...on(t.unwrap())]:t instanceof _n?[null,...on(t.unwrap())]:t instanceof Cl||t instanceof ya?on(t.unwrap()):t instanceof va?on(t._def.innerType):[];class Ii extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Q.object)return U(r,{code:N.invalid_type,expected:Q.object,received:r.parsedType}),ge;const n=this.discriminator,o=r.data[n],a=this.optionsMap.get(o);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const o=new Map;for(const a of r){const i=on(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of i){if(o.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);o.set(s,a)}}return new Ii({typeName:pe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...Ce(n)})}}function El(t,e){const r=rn(t),n=rn(e);if(t===e)return{valid:!0,data:t};if(r===Q.object&&n===Q.object){const o=Be.objectKeys(e),a=Be.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const l=El(t[s],e[s]);if(!l.valid)return{valid:!1};i[s]=l.data}return{valid:!0,data:i}}else if(r===Q.array&&n===Q.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let a=0;a<t.length;a++){const i=t[a],s=e[a],l=El(i,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return r===Q.date&&n===Q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class da extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(a,i)=>{if(xl(a)||xl(i))return ge;const s=El(a.value,i.value);return s.valid?((Sl(a)||Sl(i))&&r.dirty(),{status:r.value,value:s.data}):(U(n,{code:N.invalid_intersection_types}),ge)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>o(a,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}da.create=(t,e,r)=>new da({left:t,right:e,typeName:pe.ZodIntersection,...Ce(r)});class jr extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Q.array)return U(n,{code:N.invalid_type,expected:Q.array,received:n.parsedType}),ge;if(n.data.length<this._def.items.length)return U(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new qr(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>Mt.mergeArray(r,i)):Mt.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new jr({...this._def,rest:e})}}jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jr({items:t,typeName:pe.ZodTuple,rest:null,...Ce(e)})};class fa extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Q.object)return U(n,{code:N.invalid_type,expected:Q.object,received:n.parsedType}),ge;const o=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)o.push({key:a._parse(new qr(n,s,n.path,s)),value:i._parse(new qr(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Mt.mergeObjectAsync(r,o):Mt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ne?new fa({keyType:e,valueType:r,typeName:pe.ZodRecord,...Ce(n)}):new fa({keyType:xr.create(),valueType:e,typeName:pe.ZodRecord,...Ce(r)})}}class Oi extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Q.map)return U(n,{code:N.invalid_type,expected:Q.map,received:n.parsedType}),ge;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,l],c)=>({key:o._parse(new qr(n,s,n.path,[c,"key"])),value:a._parse(new qr(n,l,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ge;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ge;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}}}}Oi.create=(t,e,r)=>new Oi({valueType:e,keyType:t,typeName:pe.ZodMap,...Ce(r)});class zn extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Q.set)return U(n,{code:N.invalid_type,expected:Q.set,received:n.parsedType}),ge;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(U(n,{code:N.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(U(n,{code:N.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const a=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ge;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const s=[...n.data.values()].map((l,c)=>a._parse(new qr(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>i(l)):i(s)}min(e,r){return new zn({...this._def,minSize:{value:e,message:le.toString(r)}})}max(e,r){return new zn({...this._def,maxSize:{value:e,message:le.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}zn.create=(t,e)=>new zn({valueType:t,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ce(e)});class bo extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Q.function)return U(r,{code:N.invalid_type,expected:Q.function,received:r.parsedType}),ge;function n(s,l){return Ei({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ti(),po].filter(c=>!!c),issueData:{code:N.invalid_arguments,argumentsError:l}})}function o(s,l){return Ei({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ti(),po].filter(c=>!!c),issueData:{code:N.invalid_return_type,returnTypeError:l}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof yo){const s=this;return Bt(async function(...l){const c=new er([]),u=await s._def.args.parseAsync(l,a).catch(v=>{throw c.addIssue(n(l,v)),c}),d=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(v=>{throw c.addIssue(o(d,v)),c})})}else{const s=this;return Bt(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new er([n(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new er([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new bo({...this._def,args:jr.create(e).rest(Fn.create())})}returns(e){return new bo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new bo({args:e||jr.create([]).rest(Fn.create()),returns:r||Fn.create(),typeName:pe.ZodFunction,...Ce(n)})}}class ha extends Ne{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ha.create=(t,e)=>new ha({getter:t,typeName:pe.ZodLazy,...Ce(e)});class pa extends Ne{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:e.data}}get value(){return this._def.value}}pa.create=(t,e)=>new pa({value:t,typeName:pe.ZodLiteral,...Ce(e)});function ju(t,e){return new wn({values:t,typeName:pe.ZodEnum,...Ce(e)})}class wn extends Ne{constructor(){super(...arguments),aa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:Be.joinValues(n),received:r.parsedType,code:N.invalid_type}),ge}if(Ci(this,aa)||Du(this,aa,new Set(this._def.values)),!Ci(this,aa).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:N.invalid_enum_value,options:n}),ge}return Bt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return wn.create(e,{...this._def,...r})}exclude(e,r=this._def){return wn.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}aa=new WeakMap,wn.create=ju;class ga extends Ne{constructor(){super(...arguments),ia.set(this,void 0)}_parse(e){const r=Be.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Q.string&&n.parsedType!==Q.number){const o=Be.objectValues(r);return U(n,{expected:Be.joinValues(o),received:n.parsedType,code:N.invalid_type}),ge}if(Ci(this,ia)||Du(this,ia,new Set(Be.getValidEnumValues(this._def.values))),!Ci(this,ia).has(e.data)){const o=Be.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:o}),ge}return Bt(e.data)}get enum(){return this._def.values}}ia=new WeakMap,ga.create=(t,e)=>new ga({values:t,typeName:pe.ZodNativeEnum,...Ce(e)});class yo extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Q.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:Q.promise,received:r.parsedType}),ge;const n=r.parsedType===Q.promise?r.data:Promise.resolve(r.data);return Bt(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}yo.create=(t,e)=>new yo({type:t,typeName:pe.ZodPromise,...Ce(e)});class Tr extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,a={addIssue:i=>{U(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){const i=o.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async s=>{if(r.value==="aborted")return ge;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?ge:l.status==="dirty"||r.value==="dirty"?go(l.value):l});{if(r.value==="aborted")return ge;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?ge:s.status==="dirty"||r.value==="dirty"?go(s.value):s}}if(o.type==="refinement"){const i=s=>{const l=o.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ge:(s.status==="dirty"&&r.dirty(),i(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?ge:(s.status==="dirty"&&r.dirty(),i(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Mn(i))return i;const s=o.transform(i.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Mn(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):i);Be.assertNever(o)}}Tr.create=(t,e,r)=>new Tr({schema:t,typeName:pe.ZodEffects,effect:e,...Ce(r)}),Tr.createWithPreprocess=(t,e,r)=>new Tr({schema:e,effect:{type:"preprocess",transform:t},typeName:pe.ZodEffects,...Ce(r)});class $r extends Ne{_parse(e){return this._getType(e)===Q.undefined?Bt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$r.create=(t,e)=>new $r({innerType:t,typeName:pe.ZodOptional,...Ce(e)});class _n extends Ne{_parse(e){return this._getType(e)===Q.null?Bt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:pe.ZodNullable,...Ce(e)});class ma extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===Q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ma.create=(t,e)=>new ma({innerType:t,typeName:pe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class va extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return oa(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}va.create=(t,e)=>new va({innerType:t,typeName:pe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class Ni extends Ne{_parse(e){if(this._getType(e)!==Q.nan){const n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:Q.nan,received:n.parsedType}),ge}return{status:"valid",value:e.data}}}Ni.create=t=>new Ni({typeName:pe.ZodNaN,...Ce(t)});const xg=Symbol("zod_brand");class Cl extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class ba extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ge:a.status==="dirty"?(r.dirty(),go(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ge:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new ba({in:e,out:r,typeName:pe.ZodPipeline})}}class ya extends Ne{_parse(e){const r=this._def.innerType._parse(e),n=o=>(Mn(o)&&(o.value=Object.freeze(o.value)),o);return oa(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}ya.create=(t,e)=>new ya({innerType:t,typeName:pe.ZodReadonly,...Ce(e)});function $u(t,e={},r){return t?mo.create().superRefine((n,o)=>{var a,i;if(!t(n)){const s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(i=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,c=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...c,fatal:l})}}):mo.create()}const Sg={object:vt.lazycreate};var pe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Tg=(t,e={message:`Input not instance of ${t.name}`})=>$u(r=>r instanceof t,e),Zu=xr.create,Uu=bn.create,Eg=Ni.create,Cg=yn.create,Hu=sa.create,Ag=Dn.create,Rg=Ai.create,Ig=la.create,Og=ca.create,Ng=mo.create,Pg=Fn.create,Lg=nn.create,Mg=Ri.create,Dg=Sr.create,Fg=vt.create,zg=vt.strictCreate,Bg=ua.create,qg=Ii.create,jg=da.create,$g=jr.create,Zg=fa.create,Ug=Oi.create,Hg=zn.create,Vg=bo.create,Gg=ha.create,Wg=pa.create,Kg=wn.create,Yg=ga.create,Qg=yo.create,Vu=Tr.create,Jg=$r.create,Xg=_n.create,em=Tr.createWithPreprocess,tm=ba.create;var D=Object.freeze({__proto__:null,defaultErrorMap:po,setErrorMap:eg,getErrorMap:Ti,makeIssue:Ei,EMPTY_PATH:tg,addIssueToContext:U,ParseStatus:Mt,INVALID:ge,DIRTY:go,OK:Bt,isAborted:xl,isDirty:Sl,isValid:Mn,isAsync:oa,get util(){return Be},get objectUtil(){return kl},ZodParsedType:Q,getParsedType:rn,ZodType:Ne,datetimeRegex:qu,ZodString:xr,ZodNumber:bn,ZodBigInt:yn,ZodBoolean:sa,ZodDate:Dn,ZodSymbol:Ai,ZodUndefined:la,ZodNull:ca,ZodAny:mo,ZodUnknown:Fn,ZodNever:nn,ZodVoid:Ri,ZodArray:Sr,ZodObject:vt,ZodUnion:ua,ZodDiscriminatedUnion:Ii,ZodIntersection:da,ZodTuple:jr,ZodRecord:fa,ZodMap:Oi,ZodSet:zn,ZodFunction:bo,ZodLazy:ha,ZodLiteral:pa,ZodEnum:wn,ZodNativeEnum:ga,ZodPromise:yo,ZodEffects:Tr,ZodTransformer:Tr,ZodOptional:$r,ZodNullable:_n,ZodDefault:ma,ZodCatch:va,ZodNaN:Ni,BRAND:xg,ZodBranded:Cl,ZodPipeline:ba,ZodReadonly:ya,custom:$u,Schema:Ne,ZodSchema:Ne,late:Sg,get ZodFirstPartyTypeKind(){return pe},coerce:{string:t=>xr.create({...t,coerce:!0}),number:t=>bn.create({...t,coerce:!0}),boolean:t=>sa.create({...t,coerce:!0}),bigint:t=>yn.create({...t,coerce:!0}),date:t=>Dn.create({...t,coerce:!0})},any:Ng,array:Dg,bigint:Cg,boolean:Hu,date:Ag,discriminatedUnion:qg,effect:Vu,enum:Kg,function:Vg,instanceof:Tg,intersection:jg,lazy:Gg,literal:Wg,map:Ug,nan:Eg,nativeEnum:Yg,never:Lg,null:Og,nullable:Xg,number:Uu,object:Fg,oboolean:()=>Hu().optional(),onumber:()=>Uu().optional(),optional:Jg,ostring:()=>Zu().optional(),pipeline:tm,preprocess:em,promise:Qg,record:Zg,set:Hg,strictObject:zg,string:Zu,symbol:Rg,transformer:Vu,tuple:$g,undefined:Ig,union:Bg,unknown:Pg,void:Mg,NEVER:ge,ZodIssueCode:N,quotelessJson:Xp,ZodError:er});const rm=D.object({minRem:D.number(),maxRem:D.number()}),Al=D.object({0:D.string().optional(),50:D.string(),100:D.string(),200:D.string(),300:D.string(),400:D.string(),500:D.string(),600:D.string(),700:D.string(),800:D.string(),900:D.string(),950:D.string(),1e3:D.string().optional()}),Rl=D.object({color:D.string().optional(),background:D.string().optional(),borderWidth:D.string().optional(),borderColor:D.string().optional(),boxShadow:D.string().optional()}),nm=D.object({borderRadius:rm.optional(),custom:D.record(D.string(),D.union([D.string(),D.number()])).optional(),hover:Rl.optional(),focus:Rl.optional()}).and(Rl),om=D.object({family:D.string()}),am=D.object({font:om,colors:D.object({brand:Al,highlight:Al,grey:Al}),components:D.record(D.string(),nm),svgs:D.record(D.enum(["predefinedQuestion","edit","voteUp","voteDown","retry","message","thread","submit","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","chevronDown","internalLink","externalLink","liip","avatar"]),D.string())}),im=D.object({label:D.string(),icon:D.string(),url:D.string(),target:D.enum(["_blank","_self"]).optional()}),sm=D.object({showPredefinedQuestions:D.boolean(),showOverallFeedbackButton:D.boolean(),customCSS:D.string().optional(),fontURLs:D.string().array().optional(),theme:am,menu:D.record(D.string(),D.array(im)).optional()}),lm=640,cm=1024;let Pi=null;const um=()=>{if(Pi)return Pi;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Pi=Number(getComputedStyle(t).fontSize.slice(0,-2)),Pi},dm=(t,e)=>{const r=um(),n=lm/r,o=cm/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},fm=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),hm=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),pm=new RegExp("(\\d)(\\p{Ll})","gu"),gm=new RegExp("(\\p{L})(\\d)","gu"),mm=/[^\p{L}\d]+/giu,Li="$1\0$2",vm="";function bm(t,e){let r=t.trim();r=r.replace(fm,Li).replace(hm,Li),e!=null&&e.separateNumbers&&(r=r.replace(pm,Li).replace(gm,Li)),r=r.replace(mm,"\0");let n=0,o=r.length;for(;r.charAt(n)==="\0";)n++;if(n===o)return[];for(;r.charAt(o-1)==="\0";)o--;return r.slice(n,o).split(/\0/g)}function ym(t,e){return km(t,e==null?void 0:e.prefixCharacters)+bm(t,e).map(_m(e==null?void 0:e.locale)).join((e==null?void 0:e.delimiter)??" ")}function wm(t,e){return ym(t,{delimiter:"-",...e})}function _m(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function km(t,e=vm){let r="";for(let n=0;n<t.length;n++){const o=t.charAt(n);if(e.includes(o))r+=o;else break}return r}const Mi=wm,xm=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:dm(t.minRem,t.maxRem):"",Il=(t,e,r,n=!1)=>{let o="";return r.forEach(a=>{let i=e[a];n&&!i&&a==="borderWidth"&&(i="0px"),n&&!i&&a==="borderColor"&&(i="transparent"),i&&(o+=`--${Mi(t)}-${Mi(a)}:${xm(i)}; `)}),o},Sm=(t,e)=>{let r="";return r+=Il(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Il(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Il(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=Object.entries(e.custom).map(([n,o])=>`--${t}-${Mi(n)}:${o}`).join("; ")+"; "),r},Tm=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Em=t=>`--font-family: ${t.family};`,Cm=t=>{const e=Em(t.font),r=Object.entries(t.colors).map(([o,a])=>Tm(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>Sm(Mi(o),a)).join("");return[e,r,n].join(" ")},Ol=t=>t.replace("./","").split("/")[0],Gu="q";var wa=(t=>(t.Start="start",t.Chat="chat",t))(wa||{});function Wu(t,{delay:e=0,duration:r=500,resetTop:n=!0}){const o=+getComputedStyle(t).opacity;return t.style.position="absolute",n&&(t.style.top="0px"),{delay:e,duration:r,css:a=>`opacity: ${a*o};`}}var Nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Am(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rm=function(e){return Im(e)&&!Om(e)};function Im(t){return!!t&&typeof t=="object"}function Om(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Lm(t)}var Nm=typeof Symbol=="function"&&Symbol.for,Pm=Nm?Symbol.for("react.element"):60103;function Lm(t){return t.$$typeof===Pm}function Mm(t){return Array.isArray(t)?[]:{}}function _a(t,e){return e.clone!==!1&&e.isMergeableObject(t)?wo(Mm(t),t,e):t}function Dm(t,e,r){return t.concat(e).map(function(n){return _a(n,r)})}function Fm(t,e){if(!e.customMerge)return wo;var r=e.customMerge(t);return typeof r=="function"?r:wo}function zm(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Ku(t){return Object.keys(t).concat(zm(t))}function Yu(t,e){try{return e in t}catch{return!1}}function Bm(t,e){return Yu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function qm(t,e,r){var n={};return r.isMergeableObject(t)&&Ku(t).forEach(function(o){n[o]=_a(t[o],r)}),Ku(e).forEach(function(o){Bm(t,o)||(Yu(t,o)&&r.isMergeableObject(e[o])?n[o]=Fm(o,r)(t[o],e[o],r):n[o]=_a(e[o],r))}),n}function wo(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Dm,r.isMergeableObject=r.isMergeableObject||Rm,r.cloneUnlessOtherwiseSpecified=_a;var n=Array.isArray(e),o=Array.isArray(t),a=n===o;return a?n?r.arrayMerge(t,e,r):qm(t,e,r):_a(e,r)}wo.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return wo(n,o,r)},{})};var jm=wo,$m=jm;const Pl=Am($m),_o=[];function Zm(t,e){return{subscribe:qt(t,e).subscribe}}function qt(t,e=Ge){let r=null;const n=new Set;function o(s){if(ui(t,s)&&(t=s,r)){const l=!_o.length;for(const c of n)c[1](),_o.push(c,t);if(l){for(let c=0;c<_o.length;c+=2)_o[c][0](_o[c+1]);_o.length=0}}}function a(s){o(s(t))}function i(s,l=Ge){const c=[s,l];return n.add(c),n.size===1&&(r=e(o,a)||Ge),s(t),()=>{n.delete(c),n.size===0&&r&&(r(),r=null)}}return{set:o,update:a,subscribe:i}}function Qu(t,e,r){const n=!Array.isArray(t),o=n?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return Zm(r,(i,s)=>{let l=!1;const c=[];let u=0,d=Ge;const f=()=>{if(u)return;d();const h=e(n?c[0]:c,i,s);a?i(h):d=typeof h=="function"?h:Ge},v=o.map((h,m)=>yl(h,y=>{c[m]=y,u&=~(1<<m),l&&f()},()=>{u|=1<<m}));return l=!0,f(),function(){Wo(v),d(),l=!1}})}function ka(t){let e;return yl(t,r=>e=r)(),e}function ko(t){A(t,t.v+1)}function Um(t){let e=0,r=gt(0),n;return()=>{ip()&&(p(r),Yr(()=>(e===0&&(n=Gt(()=>t(()=>ko(r)))),e+=1,()=>{rl().then(()=>{e-=1,e===0&&(n==null||n(),n=void 0)})})))}}const Hm=(()=>{const t=Object.assign({"./alva/alva-light-config.ts":Kp,"./default/default-light-config.ts":Yp}),e=Object.assign({"./default/default-dark-config.ts":Qp,"./liipgpt/liipgpt-dark-config.ts":Jp}),r=[],n=new Map,o=new Map;return Object.entries(t).forEach(([a,{config:i}])=>{const s=Ol(a);r.push(s),n.set(s,Pl(Si,i))}),Object.entries(e).forEach(([a,{config:i}])=>{const s=Ol(a);r.push(s),o.set(s,Pl(Lu,i))}),Object.fromEntries(r.map(a=>{const i=n.get(a)??o.get(a),s=o.get(a)??n.get(a);return[a,{light:i,dark:s}]}))})(),Ju=qt(void 0),Xu=(t,e)=>{const r=Hm[t][e];if(!r)throw new Error(`Config for ${t} not found`);const n=sm.safeParse(r);return n.error&&console.warn("Incomplete config",n.error),Ju.set(r),{config:r,themeString:Cm(r.theme)}},xo=Ju,Vm=(t,e)=>{if(globalThis.document){const r=document.createElement("style");r.innerHTML=t||"",e.appendChild(r)}},Gm=[{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Hey, why this message?"},{type:"bot",time:"2025-01-22T08:03:11.044Z",partial:!1,message:{html:"<p>This is a demo history, only for dev purpose. To disable it, set the PUBLIC_DEMO_CHAT_HISTORY environment variable to false.</p>"}},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion Ok, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion Ok, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussion "},{type:"bot",time:"2025-02-05T12:50:55.420Z",partial:!1,message:{markdown:`The sources you mentioned come from various articles on the Liip website. They include:
325
+ `}}}},Symbol.toStringTag,{value:"Module"}));var ze;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{const a={};for(const i of o)a[i]=i;return a},t.getValidEnumValues=o=>{const a=t.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),i={};for(const s of a)i[s]=o[s];return t.objectValues(i)},t.objectValues=o=>t.objectKeys(o).map(function(a){return o[a]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const a=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&a.push(i);return a},t.find=(o,a)=>{for(const i of o)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,a=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(ze||(ze={}));var Ol;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ol||(Ol={}));const K=ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cn=t=>{switch(typeof t){case"undefined":return K.undefined;case"string":return K.string;case"number":return isNaN(t)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(t)?K.array:t===null?K.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?K.promise:typeof Map<"u"&&t instanceof Map?K.map:typeof Set<"u"&&t instanceof Set?K.set:typeof Date<"u"&&t instanceof Date?K.date:K.object;default:return K.unknown}},L=ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yg=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class rr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},o=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let s=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),n}static assert(e){if(!(e instanceof rr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}rr.create=t=>new rr(t);const vo=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===K.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ze.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${ze.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ze.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${ze.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ze.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case L.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,ze.assertNever(t)}return{message:r}};let Hu=vo;function wg(t){Hu=t}function Ni(){return Hu}const Pi=t=>{const{data:e,path:r,errorMaps:n,issueData:o}=t,a=[...r,...o.path||[]],i={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let s="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)s=l(i,{data:e,defaultError:s}).message;return{...o,path:a,message:s}},_g=[];function U(t,e){const r=Ni(),n=Pi({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===vo?void 0:vo].filter(o=>!!o)});t.common.issues.push(n)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const o of r){if(o.status==="aborted")return be;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const o of r){const a=await o.key,i=await o.value;n.push({key:a,value:i})}return Lt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const o of r){const{key:a,value:i}=o;if(a.status==="aborted"||i.status==="aborted")return be;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const be=Object.freeze({status:"aborted"}),bo=t=>({status:"dirty",value:t}),Zt=t=>({status:"valid",value:t}),Nl=t=>t.status==="aborted",Pl=t=>t.status==="dirty",qn=t=>t.status==="valid",la=t=>typeof Promise<"u"&&t instanceof Promise;function Fi(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Gu(t,e,r,n,o){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(oe||(oe={}));var ca,ua;class jr{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Vu=(t,e)=>{if(qn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new rr(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(i,s)=>{var c,l;const{message:u}=t;return i.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}},description:o}}class Oe{get description(){return this._def.description}_getType(e){return cn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(la(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cn(e)},a=this._parseSync({data:e,path:o.path,parent:o});return Vu(o,a)}"~validate"(e){var r,n;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cn(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:o});return qn(a)?{value:a.value}:{issues:o.common.issues}}catch(a){!((n=(r=a==null?void 0:a.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:o}).then(a=>qn(a)?{value:a.value}:{issues:o.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cn(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(la(o)?o:Promise.resolve(o));return Vu(n,a)}refine(e,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,a)=>{const i=e(o),s=()=>a.addIssue({code:L.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Rr({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ur.create(this,this._def)}nullable(){return Cn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ar.create(this)}promise(){return ko.create(this,this._def)}or(e){return pa.create([this,e],this._def)}and(e){return ga.create(this,e,this._def)}transform(e){return new Rr({...Ce(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new wa({...Ce(this._def),innerType:this,defaultValue:r,typeName:ge.ZodDefault})}brand(){return new Dl({typeName:ge.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new _a({...Ce(this._def),innerType:this,catchValue:r,typeName:ge.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ka.create(this,e)}readonly(){return xa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kg=/^c[^\s-]{8,}$/i,xg=/^[0-9a-z]+$/,Sg=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Tg=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Cg=/^[a-z0-9_-]{21}$/i,Eg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ag=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ig="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fl;const Og=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ng=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Pg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Fg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Dg=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Mg=new RegExp(`^${Wu}$`);function Ku(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Bg(t){return new RegExp(`^${Ku(t)}$`)}function Yu(t){let e=`${Wu}T${Ku(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function zg(t,e){return!!((e==="v4"||!e)&&Og.test(t)||(e==="v6"||!e)&&Pg.test(t))}function $g(t,e){if(!Eg.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||!o.typ||!o.alg||e&&o.alg!==e)}catch{return!1}}function qg(t,e){return!!((e==="v4"||!e)&&Ng.test(t)||(e==="v6"||!e)&&Fg.test(t))}class Er extends Oe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){const a=this._getOrReturnCtx(e);return U(a,{code:L.invalid_type,expected:K.string,received:a.parsedType}),be}const n=new Lt;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:L.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:L.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,s=e.data.length<a.value;(i||s)&&(o=this._getOrReturnCtx(e,o),i?U(o,{code:L.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&U(o,{code:L.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Rg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"email",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Fl||(Fl=new RegExp(Ig,"u")),Fl.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"emoji",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Tg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"uuid",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Cg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"nanoid",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")kg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cuid",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")xg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cuid2",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Sg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"ulid",code:L.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),U(o,{validation:"url",code:L.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"regex",code:L.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Yu(a).test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Mg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Bg(a).test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{code:L.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Ag.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"duration",code:L.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?zg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"ip",code:L.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?$g(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"jwt",code:L.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?qg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"cidr",code:L.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Lg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"base64",code:L.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Dg.test(e.data)||(o=this._getOrReturnCtx(e,o),U(o,{validation:"base64url",code:L.invalid_string,message:a.message}),n.dirty()):ze.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:L.invalid_string,...oe.errToObj(n)})}_addCheck(e){return new Er({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...oe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...oe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...oe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...oe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...oe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...oe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...oe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...oe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...oe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...oe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...oe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...oe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...oe.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...oe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...oe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...oe.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...oe.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...oe.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...oe.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...oe.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...oe.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...oe.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...oe.errToObj(r)})}nonempty(e){return this.min(1,oe.errToObj(e))}trim(){return new Er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Er({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Er.create=t=>{var e;return new Er({checks:[],typeName:ge.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function jg(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,a=parseInt(t.toFixed(o).replace(".","")),i=parseInt(e.toFixed(o).replace(".",""));return a%i/Math.pow(10,o)}class xn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){const a=this._getOrReturnCtx(e);return U(a,{code:L.invalid_type,expected:K.number,received:a.parsedType}),be}let n;const o=new Lt;for(const a of this._def.checks)a.kind==="int"?ze.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:L.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?jg(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:L.not_finite,message:a.message}),o.dirty()):ze.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,oe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,oe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,oe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,oe.toString(r))}setLimit(e,r,n,o){return new xn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:oe.toString(o)}]})}_addCheck(e){return new xn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:oe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:oe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:oe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:oe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:oe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:oe.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:oe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:oe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:oe.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ze.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}xn.create=t=>new xn({checks:[],typeName:ge.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class Sn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let n;const o=new Lt;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):ze.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return U(r,{code:L.invalid_type,expected:K.bigint,received:r.parsedType}),be}gte(e,r){return this.setLimit("min",e,!0,oe.toString(r))}gt(e,r){return this.setLimit("min",e,!1,oe.toString(r))}lte(e,r){return this.setLimit("max",e,!0,oe.toString(r))}lt(e,r){return this.setLimit("max",e,!1,oe.toString(r))}setLimit(e,r,n,o){return new Sn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:oe.toString(o)}]})}_addCheck(e){return new Sn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:oe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:oe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:oe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:oe.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:oe.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Sn.create=t=>{var e;return new Sn({checks:[],typeName:ge.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class da extends Oe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.boolean,received:n.parsedType}),be}return Zt(e.data)}}da.create=t=>new da({typeName:ge.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class jn extends Oe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){const a=this._getOrReturnCtx(e);return U(a,{code:L.invalid_type,expected:K.date,received:a.parsedType}),be}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return U(a,{code:L.invalid_date}),be}const n=new Lt;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:L.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),U(o,{code:L.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):ze.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new jn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:oe.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:oe.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}jn.create=t=>new jn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ge.ZodDate,...Ce(t)});class Li extends Oe{_parse(e){if(this._getType(e)!==K.symbol){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.symbol,received:n.parsedType}),be}return Zt(e.data)}}Li.create=t=>new Li({typeName:ge.ZodSymbol,...Ce(t)});class fa extends Oe{_parse(e){if(this._getType(e)!==K.undefined){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.undefined,received:n.parsedType}),be}return Zt(e.data)}}fa.create=t=>new fa({typeName:ge.ZodUndefined,...Ce(t)});class ha extends Oe{_parse(e){if(this._getType(e)!==K.null){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.null,received:n.parsedType}),be}return Zt(e.data)}}ha.create=t=>new ha({typeName:ge.ZodNull,...Ce(t)});class yo extends Oe{constructor(){super(...arguments),this._any=!0}_parse(e){return Zt(e.data)}}yo.create=t=>new yo({typeName:ge.ZodAny,...Ce(t)});class Zn extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Zt(e.data)}}Zn.create=t=>new Zn({typeName:ge.ZodUnknown,...Ce(t)});class un extends Oe{_parse(e){const r=this._getOrReturnCtx(e);return U(r,{code:L.invalid_type,expected:K.never,received:r.parsedType}),be}}un.create=t=>new un({typeName:ge.ZodNever,...Ce(t)});class Di extends Oe{_parse(e){if(this._getType(e)!==K.undefined){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.void,received:n.parsedType}),be}return Zt(e.data)}}Di.create=t=>new Di({typeName:ge.ZodVoid,...Ce(t)});class Ar extends Oe{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==K.array)return U(r,{code:L.invalid_type,expected:K.array,received:r.parsedType}),be;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(i||s)&&(U(r,{code:i?L.too_big:L.too_small,minimum:s?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(U(r,{code:L.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(U(r,{code:L.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,s)=>o.type._parseAsync(new jr(r,i,r.path,s)))).then(i=>Lt.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new jr(r,i,r.path,s)));return Lt.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Ar({...this._def,minLength:{value:e,message:oe.toString(r)}})}max(e,r){return new Ar({...this._def,maxLength:{value:e,message:oe.toString(r)}})}length(e,r){return new Ar({...this._def,exactLength:{value:e,message:oe.toString(r)}})}nonempty(e){return this.min(1,e)}}Ar.create=(t,e)=>new Ar({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...Ce(e)});function wo(t){if(t instanceof mt){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ur.create(wo(n))}return new mt({...t._def,shape:()=>e})}else return t instanceof Ar?new Ar({...t._def,type:wo(t.element)}):t instanceof Ur?Ur.create(wo(t.unwrap())):t instanceof Cn?Cn.create(wo(t.unwrap())):t instanceof Zr?Zr.create(t.items.map(e=>wo(e))):t}class mt extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=ze.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==K.object){const l=this._getOrReturnCtx(e);return U(l,{code:L.invalid_type,expected:K.object,received:l.parsedType}),be}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof un&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const u=a[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new jr(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof un){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(U(o,{code:L.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new jr(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key,d=await u.value;l.push({key:f,value:d,alwaysSet:u.alwaysSet})}return l}).then(l=>Lt.mergeObjectSync(n,l)):Lt.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return oe.errToObj,new mt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,a,i,s;const c=(i=(a=(o=this._def).errorMap)===null||a===void 0?void 0:a.call(o,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=oe.errToObj(e).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new mt({...this._def,unknownKeys:"strip"})}passthrough(){return new mt({...this._def,unknownKeys:"passthrough"})}extend(e){return new mt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new mt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ge.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new mt({...this._def,catchall:e})}pick(e){const r={};return ze.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new mt({...this._def,shape:()=>r})}omit(e){const r={};return ze.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new mt({...this._def,shape:()=>r})}deepPartial(){return wo(this)}partial(e){const r={};return ze.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}),new mt({...this._def,shape:()=>r})}required(e){const r={};return ze.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ur;)a=a._def.innerType;r[n]=a}}),new mt({...this._def,shape:()=>r})}keyof(){return Qu(ze.objectKeys(this.shape))}}mt.create=(t,e)=>new mt({shape:()=>t,unknownKeys:"strip",catchall:un.create(),typeName:ge.ZodObject,...Ce(e)}),mt.strictCreate=(t,e)=>new mt({shape:()=>t,unknownKeys:"strict",catchall:un.create(),typeName:ge.ZodObject,...Ce(e)}),mt.lazycreate=(t,e)=>new mt({shape:t,unknownKeys:"strip",catchall:un.create(),typeName:ge.ZodObject,...Ce(e)});class pa extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function o(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new rr(s.ctx.common.issues));return U(r,{code:L.invalid_union,unionErrors:i}),be}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let a;const i=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(c=>new rr(c));return U(r,{code:L.invalid_union,unionErrors:s}),be}}get options(){return this._def.options}}pa.create=(t,e)=>new pa({options:t,typeName:ge.ZodUnion,...Ce(e)});const dn=t=>t instanceof va?dn(t.schema):t instanceof Rr?dn(t.innerType()):t instanceof ba?[t.value]:t instanceof Tn?t.options:t instanceof ya?ze.objectValues(t.enum):t instanceof wa?dn(t._def.innerType):t instanceof fa?[void 0]:t instanceof ha?[null]:t instanceof Ur?[void 0,...dn(t.unwrap())]:t instanceof Cn?[null,...dn(t.unwrap())]:t instanceof Dl||t instanceof xa?dn(t.unwrap()):t instanceof _a?dn(t._def.innerType):[];class Mi extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.object)return U(r,{code:L.invalid_type,expected:K.object,received:r.parsedType}),be;const n=this.discriminator,o=r.data[n],a=this.optionsMap.get(o);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const o=new Map;for(const a of r){const i=dn(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of i){if(o.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);o.set(s,a)}}return new Mi({typeName:ge.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...Ce(n)})}}function Ll(t,e){const r=cn(t),n=cn(e);if(t===e)return{valid:!0,data:t};if(r===K.object&&n===K.object){const o=ze.objectKeys(e),a=ze.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const c=Ll(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(r===K.array&&n===K.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let a=0;a<t.length;a++){const i=t[a],s=e[a],c=Ll(i,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===K.date&&n===K.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ga extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(a,i)=>{if(Nl(a)||Nl(i))return be;const s=Ll(a.value,i.value);return s.valid?((Pl(a)||Pl(i))&&r.dirty(),{status:r.value,value:s.data}):(U(n,{code:L.invalid_intersection_types}),be)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>o(a,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ga.create=(t,e,r)=>new ga({left:t,right:e,typeName:ge.ZodIntersection,...Ce(r)});class Zr extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.array)return U(n,{code:L.invalid_type,expected:K.array,received:n.parsedType}),be;if(n.data.length<this._def.items.length)return U(n,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new jr(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>Lt.mergeArray(r,i)):Lt.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new Zr({...this._def,rest:e})}}Zr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zr({items:t,typeName:ge.ZodTuple,rest:null,...Ce(e)})};class ma extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return U(n,{code:L.invalid_type,expected:K.object,received:n.parsedType}),be;const o=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)o.push({key:a._parse(new jr(n,s,n.path,s)),value:i._parse(new jr(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Lt.mergeObjectAsync(r,o):Lt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Oe?new ma({keyType:e,valueType:r,typeName:ge.ZodRecord,...Ce(n)}):new ma({keyType:Er.create(),valueType:e,typeName:ge.ZodRecord,...Ce(r)})}}class Bi extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.map)return U(n,{code:L.invalid_type,expected:K.map,received:n.parsedType}),be;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new jr(n,s,n.path,[l,"key"])),value:a._parse(new jr(n,c,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return be;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of i){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return be;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Bi.create=(t,e,r)=>new Bi({valueType:e,keyType:t,typeName:ge.ZodMap,...Ce(r)});class Un extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.set)return U(n,{code:L.invalid_type,expected:K.set,received:n.parsedType}),be;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(U(n,{code:L.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(U(n,{code:L.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const a=this._def.valueType;function i(c){const l=new Set;for(const u of c){if(u.status==="aborted")return be;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((c,l)=>a._parse(new jr(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,r){return new Un({...this._def,minSize:{value:e,message:oe.toString(r)}})}max(e,r){return new Un({...this._def,maxSize:{value:e,message:oe.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Un.create=(t,e)=>new Un({valueType:t,minSize:null,maxSize:null,typeName:ge.ZodSet,...Ce(e)});class _o extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.function)return U(r,{code:L.invalid_type,expected:K.function,received:r.parsedType}),be;function n(s,c){return Pi({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ni(),vo].filter(l=>!!l),issueData:{code:L.invalid_arguments,argumentsError:c}})}function o(s,c){return Pi({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ni(),vo].filter(l=>!!l),issueData:{code:L.invalid_return_type,returnTypeError:c}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ko){const s=this;return Zt(async function(...c){const l=new rr([]),u=await s._def.args.parseAsync(c,a).catch(m=>{throw l.addIssue(n(c,m)),l}),f=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(m=>{throw l.addIssue(o(f,m)),l})})}else{const s=this;return Zt(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new rr([n(c,l.error)]);const u=Reflect.apply(i,this,l.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new rr([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new _o({...this._def,args:Zr.create(e).rest(Zn.create())})}returns(e){return new _o({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new _o({args:e||Zr.create([]).rest(Zn.create()),returns:r||Zn.create(),typeName:ge.ZodFunction,...Ce(n)})}}class va extends Oe{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}va.create=(t,e)=>new va({getter:t,typeName:ge.ZodLazy,...Ce(e)});class ba extends Oe{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}ba.create=(t,e)=>new ba({value:t,typeName:ge.ZodLiteral,...Ce(e)});function Qu(t,e){return new Tn({values:t,typeName:ge.ZodEnum,...Ce(e)})}class Tn extends Oe{constructor(){super(...arguments),ca.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:ze.joinValues(n),received:r.parsedType,code:L.invalid_type}),be}if(Fi(this,ca)||Gu(this,ca,new Set(this._def.values)),!Fi(this,ca).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:L.invalid_enum_value,options:n}),be}return Zt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Tn.create(e,{...this._def,...r})}exclude(e,r=this._def){return Tn.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}ca=new WeakMap,Tn.create=Qu;class ya extends Oe{constructor(){super(...arguments),ua.set(this,void 0)}_parse(e){const r=ze.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.string&&n.parsedType!==K.number){const o=ze.objectValues(r);return U(n,{expected:ze.joinValues(o),received:n.parsedType,code:L.invalid_type}),be}if(Fi(this,ua)||Gu(this,ua,new Set(ze.getValidEnumValues(this._def.values))),!Fi(this,ua).has(e.data)){const o=ze.objectValues(r);return U(n,{received:n.data,code:L.invalid_enum_value,options:o}),be}return Zt(e.data)}get enum(){return this._def.values}}ua=new WeakMap,ya.create=(t,e)=>new ya({values:t,typeName:ge.ZodNativeEnum,...Ce(e)});class ko extends Oe{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.promise&&r.common.async===!1)return U(r,{code:L.invalid_type,expected:K.promise,received:r.parsedType}),be;const n=r.parsedType===K.promise?r.data:Promise.resolve(r.data);return Zt(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ko.create=(t,e)=>new ko({type:t,typeName:ge.ZodPromise,...Ce(e)});class Rr extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,a={addIssue:i=>{U(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){const i=o.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async s=>{if(r.value==="aborted")return be;const c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?be:c.status==="dirty"||r.value==="dirty"?bo(c.value):c});{if(r.value==="aborted")return be;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?be:s.status==="dirty"||r.value==="dirty"?bo(s.value):s}}if(o.type==="refinement"){const i=s=>{const c=o.refinement(s,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?be:(s.status==="dirty"&&r.dirty(),i(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?be:(s.status==="dirty"&&r.dirty(),i(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!qn(i))return i;const s=o.transform(i.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>qn(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):i);ze.assertNever(o)}}Rr.create=(t,e,r)=>new Rr({schema:t,typeName:ge.ZodEffects,effect:e,...Ce(r)}),Rr.createWithPreprocess=(t,e,r)=>new Rr({schema:e,effect:{type:"preprocess",transform:t},typeName:ge.ZodEffects,...Ce(r)});class Ur extends Oe{_parse(e){return this._getType(e)===K.undefined?Zt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ur.create=(t,e)=>new Ur({innerType:t,typeName:ge.ZodOptional,...Ce(e)});class Cn extends Oe{_parse(e){return this._getType(e)===K.null?Zt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Cn.create=(t,e)=>new Cn({innerType:t,typeName:ge.ZodNullable,...Ce(e)});class wa extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===K.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}wa.create=(t,e)=>new wa({innerType:t,typeName:ge.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class _a extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return la(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new rr(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}_a.create=(t,e)=>new _a({innerType:t,typeName:ge.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class zi extends Oe{_parse(e){if(this._getType(e)!==K.nan){const n=this._getOrReturnCtx(e);return U(n,{code:L.invalid_type,expected:K.nan,received:n.parsedType}),be}return{status:"valid",value:e.data}}}zi.create=t=>new zi({typeName:ge.ZodNaN,...Ce(t)});const Zg=Symbol("zod_brand");class Dl extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class ka extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?be:a.status==="dirty"?(r.dirty(),bo(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?be:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new ka({in:e,out:r,typeName:ge.ZodPipeline})}}class xa extends Oe{_parse(e){const r=this._def.innerType._parse(e),n=o=>(qn(o)&&(o.value=Object.freeze(o.value)),o);return la(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}xa.create=(t,e)=>new xa({innerType:t,typeName:ge.ZodReadonly,...Ce(e)});function Ju(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Xu(t,e={},r){return t?yo.create().superRefine((n,o)=>{var a,i;const s=t(n);if(s instanceof Promise)return s.then(c=>{var l,u;if(!c){const f=Ju(e,n),d=(u=(l=f.fatal)!==null&&l!==void 0?l:r)!==null&&u!==void 0?u:!0;o.addIssue({code:"custom",...f,fatal:d})}});if(!s){const c=Ju(e,n),l=(i=(a=c.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0;o.addIssue({code:"custom",...c,fatal:l})}}):yo.create()}const Ug={object:mt.lazycreate};var ge;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ge||(ge={}));const Hg=(t,e={message:`Input not instance of ${t.name}`})=>Xu(r=>r instanceof t,e),ed=Er.create,td=xn.create,Gg=zi.create,Vg=Sn.create,rd=da.create,Wg=jn.create,Kg=Li.create,Yg=fa.create,Qg=ha.create,Jg=yo.create,Xg=Zn.create,em=un.create,tm=Di.create,rm=Ar.create,nm=mt.create,om=mt.strictCreate,am=pa.create,im=Mi.create,sm=ga.create,lm=Zr.create,cm=ma.create,um=Bi.create,dm=Un.create,fm=_o.create,hm=va.create,pm=ba.create,gm=Tn.create,mm=ya.create,vm=ko.create,nd=Rr.create,bm=Ur.create,ym=Cn.create,wm=Rr.createWithPreprocess,_m=ka.create;var R=Object.freeze({__proto__:null,defaultErrorMap:vo,setErrorMap:wg,getErrorMap:Ni,makeIssue:Pi,EMPTY_PATH:_g,addIssueToContext:U,ParseStatus:Lt,INVALID:be,DIRTY:bo,OK:Zt,isAborted:Nl,isDirty:Pl,isValid:qn,isAsync:la,get util(){return ze},get objectUtil(){return Ol},ZodParsedType:K,getParsedType:cn,ZodType:Oe,datetimeRegex:Yu,ZodString:Er,ZodNumber:xn,ZodBigInt:Sn,ZodBoolean:da,ZodDate:jn,ZodSymbol:Li,ZodUndefined:fa,ZodNull:ha,ZodAny:yo,ZodUnknown:Zn,ZodNever:un,ZodVoid:Di,ZodArray:Ar,ZodObject:mt,ZodUnion:pa,ZodDiscriminatedUnion:Mi,ZodIntersection:ga,ZodTuple:Zr,ZodRecord:ma,ZodMap:Bi,ZodSet:Un,ZodFunction:_o,ZodLazy:va,ZodLiteral:ba,ZodEnum:Tn,ZodNativeEnum:ya,ZodPromise:ko,ZodEffects:Rr,ZodTransformer:Rr,ZodOptional:Ur,ZodNullable:Cn,ZodDefault:wa,ZodCatch:_a,ZodNaN:zi,BRAND:Zg,ZodBranded:Dl,ZodPipeline:ka,ZodReadonly:xa,custom:Xu,Schema:Oe,ZodSchema:Oe,late:Ug,get ZodFirstPartyTypeKind(){return ge},coerce:{string:t=>Er.create({...t,coerce:!0}),number:t=>xn.create({...t,coerce:!0}),boolean:t=>da.create({...t,coerce:!0}),bigint:t=>Sn.create({...t,coerce:!0}),date:t=>jn.create({...t,coerce:!0})},any:Jg,array:rm,bigint:Vg,boolean:rd,date:Wg,discriminatedUnion:im,effect:nd,enum:gm,function:fm,instanceof:Hg,intersection:sm,lazy:hm,literal:pm,map:um,nan:Gg,nativeEnum:mm,never:em,null:Qg,nullable:ym,number:td,object:nm,oboolean:()=>rd().optional(),onumber:()=>td().optional(),optional:bm,ostring:()=>ed().optional(),pipeline:_m,preprocess:wm,promise:vm,record:cm,set:dm,strictObject:om,string:ed,symbol:Kg,transformer:nd,tuple:lm,undefined:Yg,union:am,unknown:Xg,void:tm,NEVER:be,ZodIssueCode:L,quotelessJson:yg,ZodError:rr});const km=R.object({minRem:R.number(),maxRem:R.number()}),$i=R.object({0:R.string().optional(),50:R.string(),100:R.string(),200:R.string(),300:R.string(),400:R.string(),500:R.string(),600:R.string(),700:R.string(),800:R.string(),900:R.string(),950:R.string().optional(),1e3:R.string().optional()}),Ml=R.object({color:R.string().optional(),background:R.string().optional(),borderWidth:R.string().optional(),borderColor:R.string().optional(),boxShadow:R.string().optional()}),xm=R.object({borderRadius:km.optional(),custom:R.record(R.string(),R.union([R.string(),R.number()])).optional(),hover:Ml.optional(),focus:Ml.optional()}).and(Ml),Sm=R.object({family:R.string()}),Tm=R.object({font:Sm,colors:R.object({brand:$i,accent:$i.optional(),highlight:$i,grey:$i}),components:R.record(R.string(),xm),svgs:R.record(R.enum(["predefinedQuestion","edit","voteUp","voteDown","retry","message","thread","submit","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","chevronDown","internalLink","externalLink","liip","avatar"]),R.string())}),Cm=R.object({label:R.string(),icon:R.string(),url:R.string(),target:R.enum(["_blank","_self"]).optional()}),Em=R.object({showPredefinedQuestions:R.boolean(),showOverallFeedbackButton:R.boolean(),customCSS:R.string().optional(),fontURLs:R.string().array().optional(),theme:Tm,menu:R.record(R.string(),R.array(Cm)).optional()}),Am=640,Rm=1024;let qi=null;const Im=()=>{if(qi)return qi;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return qi=Number(getComputedStyle(t).fontSize.slice(0,-2)),qi},Om=(t,e)=>{const r=Im(),n=Am/r,o=Rm/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},Nm=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Pm=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Fm=new RegExp("(\\d)(\\p{Ll})","gu"),Lm=new RegExp("(\\p{L})(\\d)","gu"),Dm=/[^\p{L}\d]+/giu,ji="$1\0$2",Mm="";function Bm(t,e){let r=t.trim();r=r.replace(Nm,ji).replace(Pm,ji),e!=null&&e.separateNumbers&&(r=r.replace(Fm,ji).replace(Lm,ji)),r=r.replace(Dm,"\0");let n=0,o=r.length;for(;r.charAt(n)==="\0";)n++;if(n===o)return[];for(;r.charAt(o-1)==="\0";)o--;return r.slice(n,o).split(/\0/g)}function zm(t,e){return jm(t,e==null?void 0:e.prefixCharacters)+Bm(t,e).map(qm(e==null?void 0:e.locale)).join((e==null?void 0:e.delimiter)??" ")}function $m(t,e){return zm(t,{delimiter:"-",...e})}function qm(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function jm(t,e=Mm){let r="";for(let n=0;n<t.length;n++){const o=t.charAt(n);if(e.includes(o))r+=o;else break}return r}const Zi=$m,Zm=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:Om(t.minRem,t.maxRem):"",Bl=(t,e,r,n=!1)=>{let o="";return r.forEach(a=>{let i=e[a];n&&!i&&a==="borderWidth"&&(i="0px"),n&&!i&&a==="borderColor"&&(i="transparent"),i&&(o+=`--${Zi(t)}-${Zi(a)}:${Zm(i)}; `)}),o},Um=(t,e)=>{let r="";return r+=Bl(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Bl(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Bl(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=Object.entries(e.custom).map(([n,o])=>`--${t}-${Zi(n)}:${o}`).join("; ")+"; "),r},Hm=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Gm=t=>`--font-family: ${t.family};`,Vm=t=>{const e=Gm(t.font),r=Object.entries(t.colors).map(([o,a])=>Hm(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>Um(Zi(o),a)).join("");return[e,r,n].join(" ")},zl=t=>t.replace("./","").split("/")[0],od="q";var Sa=(t=>(t.Start="start",t.Chat="chat",t))(Sa||{});function ad(t,{delay:e=0,duration:r=500,resetTop:n=!0}){const o=+getComputedStyle(t).opacity;return t.style.position="absolute",n&&(t.style.top="0px"),{delay:e,duration:r,css:a=>`opacity: ${a*o};`}}var $l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Km=function(e){return Ym(e)&&!Qm(e)};function Ym(t){return!!t&&typeof t=="object"}function Qm(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||ev(t)}var Jm=typeof Symbol=="function"&&Symbol.for,Xm=Jm?Symbol.for("react.element"):60103;function ev(t){return t.$$typeof===Xm}function tv(t){return Array.isArray(t)?[]:{}}function Ta(t,e){return e.clone!==!1&&e.isMergeableObject(t)?xo(tv(t),t,e):t}function rv(t,e,r){return t.concat(e).map(function(n){return Ta(n,r)})}function nv(t,e){if(!e.customMerge)return xo;var r=e.customMerge(t);return typeof r=="function"?r:xo}function ov(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function id(t){return Object.keys(t).concat(ov(t))}function sd(t,e){try{return e in t}catch{return!1}}function av(t,e){return sd(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function iv(t,e,r){var n={};return r.isMergeableObject(t)&&id(t).forEach(function(o){n[o]=Ta(t[o],r)}),id(e).forEach(function(o){av(t,o)||(sd(t,o)&&r.isMergeableObject(e[o])?n[o]=nv(o,r)(t[o],e[o],r):n[o]=Ta(e[o],r))}),n}function xo(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||rv,r.isMergeableObject=r.isMergeableObject||Km,r.cloneUnlessOtherwiseSpecified=Ta;var n=Array.isArray(e),o=Array.isArray(t),a=n===o;return a?n?r.arrayMerge(t,e,r):iv(t,e,r):Ta(e,r)}xo.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return xo(n,o,r)},{})};var sv=xo,lv=sv;const ql=Wm(lv);function So(t){A(t,t.v+1)}function cv(t){let e=0,r=Bt(0),n;return()=>{Ap()&&(p(r),on(()=>(e===0&&(n=Kt(()=>t(()=>So(r)))),e+=1,()=>{nl().then(()=>{e-=1,e===0&&(n==null||n(),n=void 0)})})))}}const uv=(()=>{const t=Object.assign({"./alva/alva-light-config.ts":pg,"./default/default-light-config.ts":gg,"./luzern/luzern-light-config.ts":mg}),e=Object.assign({"./default/default-dark-config.ts":vg,"./liipgpt/liipgpt-dark-config.ts":bg}),r=[],n=new Map,o=new Map;return Object.entries(t).forEach(([a,{config:i}])=>{const s=zl(a);r.push(s),n.set(s,ql(Oi,i))}),Object.entries(e).forEach(([a,{config:i}])=>{const s=zl(a);r.push(s),o.set(s,ql(Uu,i))}),Object.fromEntries(r.map(a=>{const i=n.get(a)??o.get(a),s=o.get(a)??n.get(a);return[a,{light:i,dark:s}]}))})(),ld=jt(void 0),cd=(t,e)=>{const r=uv[t][e];if(!r)throw new Error(`Config for ${t} not found`);const n=Em.safeParse(r);return n.error&&console.warn("Incomplete config",n.error),ld.set(r),{config:r,themeString:Vm(r.theme)}},To=ld,dv=(t,e)=>{if(globalThis.document){const r=document.createElement("style");r.innerHTML=t||"",e.appendChild(r)}},fv=[{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Hey, why this message?"},{type:"bot",time:"2025-01-22T08:03:11.044Z",partial:!1,message:{html:"<p>This is a demo history, only for dev purpose. To disable it, set the PUBLIC_DEMO_CHAT_HISTORY environment variable to false.</p>"}},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion Ok, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussion "},{type:"user",time:"2025-01-22T08:03:11.044Z",message:"Ok, got it, let's inspect this dummy discussion Ok, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussionOk, got it, let's inspect this dummy discussion "},{type:"bot",time:"2025-02-05T12:50:55.420Z",partial:!1,message:{markdown:`The sources you mentioned come from various articles on the Liip website. They include:
359
326
 
360
327
  - A report on projects that received recognition, highlighting customer satisfaction and product feedback[^1].
361
328
  - A blog post discussing the data-centric landscape and various data processing solutions[^2].
@@ -858,51 +825,51 @@ Unseren ökologischen Beitrag leisten wir wie immer mit intensiver und fast auss
858
825
 
859
826
  Do you have a question, a comment, or just feeling inspired? Mention us or share this article on Mastodon, Twitter or LinkedIn.
860
827
 
861
- Subscribe to blog updates using the RSS Feed.`},usedNumber:6}]}}],Wm=Object.freeze(Object.defineProperty({__proto__:null,translations:{de:{chatInputPlaceholder:"Fragen Sie mich etwas über Basel-Stadt.",introductionTitle:'Ich bin <span class="alva-gradient-text">Alva</span>. Ich beantworte Ihre Fragen zur Verwaltung des Kantons Basel-Stadt.',chatFooterText:"Alle Angaben ohne Gewähr. Bitte überprüfen Sie die Informationen auf der offiziellen Webseite des Kantons Basel-Stadt.",feedbackFormTitle:'Feedback geben, um <span class="alva-gradient-text">Alva</span> zu verbessern'},en:{chatInputPlaceholder:"Ask me something about Basel-City.",introductionTitle:'I am <span class="alva-gradient-text">Alva</span>. I answer your questions about the administration of the Canton of Basel-City.',chatFooterText:"All information without guarantee. Please verify the information on the official website of the Canton of Basel-City.",feedbackFormTitle:'Give feedback to improve <span class="alva-gradient-text">Alva</span>'},it:{chatInputPlaceholder:"Chiedimi qualcosa su Basilea-Città.",introductionTitle:'Sono <span class="alva-gradient-text">Alva</span>. Rispondo alle tue domande sulla gestione del Canton di Basilea-Città.',chatFooterText:"Tutte le informazioni sono senza garanzia. Si prega di verificare le informazioni sul sito web ufficiale del Cantone di Basilea-Città.",feedbackFormTitle:'Dai feedback per migliorare <span class="alva-gradient-text">Alva</span>'},fr:{chatInputPlaceholder:"Posez-moi une question sur Bâle-Ville.",introductionTitle:"Je suis <span class='alva-gradient-text'>Alva</span>. Je réponds à vos questions sur l'administration du Canton de Bâle-Ville.",chatFooterText:"Toutes les informations sont sans garantie. Veuillez vérifier les informations sur le site officiel du Canton de Bâle-Ville.",feedbackFormTitle:'Donnez un feedback pour améliorer <span class="alva-gradient-text">Alva</span>'}}},Symbol.toStringTag,{value:"Module"})),Ll={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputSubmit:"Aufforderung senden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',referenceLink:"Link zur Referenz",newChat:"Neuer Chat",messageBotLoading:"Lass mich nachdenken...",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceTitle:"Referenzen anzeigen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",send:"Abschicken",thankYouForFeedback:"Danke für Dein Feedback!",giveFeedback:"Feedback geben",sendFeedback:"Feedback senden",feedbackFailed:"Feedback senden fehlgeschlagen",feedbackFormTitle:"<h4>Feedback geben, um unseren Chatbot zu verbessern</h4>",feedbackFormMessage:"Ihre Nachricht",feedbackFormMessagePlaceholder:"Schreiben Sie hier Ihre Nachricht...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Ihre E-Mail eingeben...",classificationSubmit:"Abschicken",classificationThankYou:"Danke für Dein Feedback!",classificationTitle:"Bitte bewerten Sie den Einfluss und die Qualität der Nachricht oben",selectLanguage:"Sprache auswählen",languageNames:{de:"Deutsch",en:"Englisch",fr:"Französisch",it:"Italienisch"}},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputSubmit:"Send prompt",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',referenceLink:"Link to reference",newChat:"New discussion",messageBotLoading:"Let me think...",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceTitle:"Show references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",send:"Send",thankYouForFeedback:"Thank you for your feedback!",giveFeedback:"Give feedback",sendFeedback:"Send feedback",feedbackFailed:"Feedback send failed",feedbackFormTitle:"<h4>Give feedback to improve our Chatbot</h4>",feedbackFormMessage:"Your message",feedbackFormMessagePlaceholder:"Write your message here...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Enter your E-Mail",classificationSubmit:"Submit",classificationThankYou:"Thank you for your feedback!",classificationTitle:"Please rate the impact and quality of the message above",selectLanguage:"Select language",languageNames:{de:"German",en:"English",fr:"French",it:"Italian"}},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputSubmit:"Invia richiesta",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',referenceLink:"Link alla referenza",newChat:"Nuova discussione",messageBotLoading:"Fammi pensare...",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceTitle:"Mostra riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",send:"Invia",thankYouForFeedback:"Grazie per il tuo feedback!",giveFeedback:"Invia feedback",sendFeedback:"Invia feedback",feedbackFailed:"Invia feedback fallito",feedbackFormTitle:"<h4>Invia feedback per migliorare il nostro Chatbot</h4>",feedbackFormMessage:"Il tuo messaggio",feedbackFormMessagePlaceholder:"Scrivi qui il tuo messaggio...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Inserisci il tuo E-Mail",classificationSubmit:"Invia",classificationThankYou:"Grazie per il tuo feedback!",classificationTitle:"Per favore valuta l'impatto e la qualità del messaggio sopra",selectLanguage:"Selezionare la lingua",languageNames:{de:"Tedesco",en:"Inglese",fr:"Francese",it:"Italiano"}},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputSubmit:"Envoyer la demande",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",referenceLink:"Lien vers la référence",newChat:"Nouvelle discussion",messageBotLoading:"Laissez-moi réfléchir...",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceTitle:"Afficher les références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",send:"Envoyer",thankYouForFeedback:"Merci pour votre feedback!",giveFeedback:"Donner un feedback",sendFeedback:"Envoyer un feedback",feedbackFailed:"Envoyer un feedback échoué",feedbackFormTitle:"<h4>Donnez un feedback pour améliorer notre Chatbot</h4>",feedbackFormMessage:"Votre message",feedbackFormMessagePlaceholder:"Écrivez votre message ici...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Entrez votre E-Mail",classificationSubmit:"Envoyer",classificationThankYou:"Merci pour votre feedback!",classificationTitle:"Veuillez évaluer l'impact et la qualité du message ci-dessus",selectLanguage:"Choisir la langue",languageNames:{de:"Allemand",en:"Anglais",fr:"Français",it:"Italien"}}},Km=Object.freeze(Object.defineProperty({__proto__:null,translations:Ll},Symbol.toStringTag,{value:"Module"})),Ym=Object.freeze(Object.defineProperty({__proto__:null,translations:{de:{chatInputPlaceholder:"Fragen Sie mich etwas über Liip",chatFooterText:'Entwickelt von <a href="https://liip.ch/de">Liip</ch>'},en:{chatInputPlaceholder:"Ask me something about Liip",chatFooterText:'Developed by <a href="https://liip.ch/en">Liip</ch>'},it:{chatInputPlaceholder:"Chiedimi qualcosa su Liip",chatFooterText:'Sviluppato da <a href="https://liip.ch">Liip</ch>'},fr:{chatInputPlaceholder:"Posez-moi une question sur Liip",chatFooterText:'Developpé par <a href="https://liip.ch/fr">Liip</ch>'}}},Symbol.toStringTag,{value:"Module"})),Qm=D.object({predefinedQuestions:D.string(),introductionTitle:D.string(),referenceTitle:D.string(),chatInputPlaceholder:D.string(),chatInputSubmit:D.string(),referenceLink:D.string(),newChat:D.string(),messageBotLoading:D.string(),messageBotError:D.string(),messageBotDefaultError:D.string(),chatFooterText:D.string().optional(),scrollToBottom:D.string(),openMenu:D.string(),closeMenu:D.string(),send:D.string(),thankYouForFeedback:D.string(),giveFeedback:D.string(),sendFeedback:D.string(),feedbackFailed:D.string(),feedbackFormTitle:D.string(),feedbackFormMessage:D.string(),feedbackFormMessagePlaceholder:D.string(),feedbackFormEmail:D.string(),feedbackFormEmailPlaceholder:D.string(),answerGood:D.string(),answerBad:D.string(),classificationSubmit:D.string(),classificationThankYou:D.string(),classificationTitle:D.string(),selectLanguage:D.string(),languageNames:D.record(D.string(),D.string())}),Jm=(()=>{const e=Object.entries(Object.assign({"./alva/alva-translations.ts":Wm,"./default/default-translations.ts":Km,"./liipgpt/liipgpt-translations.ts":Ym})).map(([r,{translations:n}])=>[Ol(r),Pl(Ll,n)]);return Object.fromEntries(e)})(),ed=t=>new Proxy(t,{get(e,r){return typeof r=="string"&&e[r]===void 0?r.toUpperCase():e[r]}}),td=qt(ed({})),Xm=["en","de","fr","it"],Ml="en",Di=t=>Xm.includes(t),xa=qt(""),rd=t=>{const e=ka(xa);if(e&&Di(e))return e;if(t&&Di(t))return t;const r=navigator.language.split("-")[0];return r&&Di(r)?r:Ml},ev=async(t,e)=>{if(!e)throw new Error("org is required");const r=Di(t)?t:rd(t),n=Jm[e];let o=n[r];o||(console.warn(`Translation not found for ${r}, switching to ${Ml}`),o=n[Ml]);const a=Qm.safeParse(o);a.error&&console.error("Translation is invalid",a.error);const i=ed(o);return td.set(i),i},tv=t=>{xa.set(t)},an=td,So=new Map;class rv{get length(){return So.size}clear(){So.clear()}getItem(e){return So.get(e)||null}key(e){return Array.from(So.keys())[e]||null}removeItem(e){So.delete(e)}setItem(e,r){So.set(e,String(r))}}const nd=globalThis.localStorage??new rv;function Dl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bn=Dl();function od(t){Bn=t}const Sa={exec:()=>null};function et(t,e=""){let r=typeof t=="string"?t:t.source;const n={replace:(o,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(jt.caret,"$1"),r=r.replace(o,i),n},getRegex:()=>new RegExp(r,e)};return n}const jt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},nv=/^(?:[ \t]*(?:\n|$))+/,ov=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,av=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ta=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,iv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ad=/(?:[*+-]|\d{1,9}[.)])/,id=et(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Fl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sv=/^[^\n]+/,zl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lv=et(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cv=et(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ad).getRegex(),Fi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Bl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,uv=et("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Bl).replace("tag",Fi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sd=et(Fl).replace("hr",Ta).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fi).getRegex(),ql={blockquote:et(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sd).getRegex(),code:ov,def:lv,fences:av,heading:iv,hr:Ta,html:uv,lheading:id,list:cv,newline:nv,paragraph:sd,table:Sa,text:sv},ld=et("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ta).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fi).getRegex(),dv={...ql,table:ld,paragraph:et(Fl).replace("hr",Ta).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ld).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fi).getRegex()},fv={...ql,html:et(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Bl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Sa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:et(Fl).replace("hr",Ta).replace("heading",` *#{1,6} *[^
862
- ]`).replace("lheading",id).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cd=/^( {2,}|\\)\n(?!\s*$)/,gv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,zi=/[\p{P}\p{S}]/u,jl=/[\s\p{P}\p{S}]/u,ud=/[^\s\p{P}\p{S}]/u,mv=et(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,jl).getRegex(),vv=/(?!~)[\p{P}\p{S}]/u,bv=/(?!~)[\s\p{P}\p{S}]/u,yv=/(?:[^\s\p{P}\p{S}]|~)/u,wv=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,_v=et(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,zi).getRegex(),dd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",kv=et(dd,"gu").replace(/notPunctSpace/g,ud).replace(/punctSpace/g,jl).replace(/punct/g,zi).getRegex(),xv=et(dd,"gu").replace(/notPunctSpace/g,yv).replace(/punctSpace/g,bv).replace(/punct/g,vv).getRegex(),Sv=et("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ud).replace(/punctSpace/g,jl).replace(/punct/g,zi).getRegex(),Tv=et(/\\(punct)/,"gu").replace(/punct/g,zi).getRegex(),Ev=et(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cv=et(Bl).replace("(?:-->|$)","-->").getRegex(),Av=et("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rv=et(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Bi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fd=et(/^!?\[(label)\]\[(ref)\]/).replace("label",Bi).replace("ref",zl).getRegex(),hd=et(/^!?\[(ref)\](?:\[\])?/).replace("ref",zl).getRegex(),Iv=et("reflink|nolink(?!\\()","g").replace("reflink",fd).replace("nolink",hd).getRegex(),$l={_backpedal:Sa,anyPunctuation:Tv,autolink:Ev,blockSkip:wv,br:cd,code:pv,del:Sa,emStrongLDelim:_v,emStrongRDelimAst:kv,emStrongRDelimUnd:Sv,escape:hv,link:Rv,nolink:hd,punctuation:mv,reflink:fd,reflinkSearch:Iv,tag:Av,text:gv,url:Sa},Ov={...$l,link:et(/^!?\[(label)\]\((.*?)\)/).replace("label",Bi).getRegex(),reflink:et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bi).getRegex()},Zl={...$l,emStrongRDelimAst:xv,url:et(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nv={...Zl,br:et(cd).replace("{2,}","*").getRegex(),text:et(Zl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qi={normal:ql,gfm:dv,pedantic:fv},Ea={normal:$l,gfm:Zl,breaks:Nv,pedantic:Ov},Pv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pd=t=>Pv[t];function Zr(t,e){if(e){if(jt.escapeTest.test(t))return t.replace(jt.escapeReplace,pd)}else if(jt.escapeTestNoEncode.test(t))return t.replace(jt.escapeReplaceNoEncode,pd);return t}function gd(t){try{t=encodeURI(t).replace(jt.percentDecode,"%")}catch{return null}return t}function md(t,e){var a;const r=t.replace(jt.findPipe,(i,s,l)=>{let c=!1,u=s;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(jt.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(jt.slashPipe,"|");return n}function Ca(t,e,r){const n=t.length;if(n===0)return"";let o=0;for(;o<n&&(t.charAt(n-o-1)===e&&!r);)o++;return t.slice(0,n-o)}function Lv(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function vd(t,e,r,n,o){const a=e.href,i=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;const l={type:"link",raw:r,href:a,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}return{type:"image",raw:r,href:a,title:i,text:s}}function Mv(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const o=n[1];return e.split(`
828
+ Subscribe to blog updates using the RSS Feed.`},usedNumber:6}]}}],hv=Object.freeze(Object.defineProperty({__proto__:null,translations:{de:{chatInputPlaceholder:"Fragen Sie mich etwas über Basel-Stadt.",introductionTitle:'Ich bin <span class="alva-gradient-text">Alva</span>. Ich beantworte Ihre Fragen zur Verwaltung des Kantons Basel-Stadt.',chatFooterText:'Alle Angaben ohne Gewähr. Bitte überprüfen Sie die Informationen auf <a href="https://bs.ch">bs.ch</a>.',feedbackFormTitle:'Feedback geben, um <span class="alva-gradient-text">Alva</span> zu verbessern'},en:{chatInputPlaceholder:"Ask me something about Basel-City.",introductionTitle:'I am <span class="alva-gradient-text">Alva</span>. I answer your questions about the administration of the Canton of Basel-City.',chatFooterText:'All information without guarantee. Please verify the information on <a href="https://bs.ch/en">bs.ch</a>.',feedbackFormTitle:'Give feedback to improve <span class="alva-gradient-text">Alva</span>'},it:{chatInputPlaceholder:"Chiedimi qualcosa su Basilea-Città.",introductionTitle:'Sono <span class="alva-gradient-text">Alva</span>. Rispondo alle tue domande sulla gestione del Canton di Basilea-Città.',chatFooterText:'Tutte le informazioni sono senza garanzia. Si prega di verificare le informazioni sul <a href="https://bs.ch/it">bs.ch</a>.',feedbackFormTitle:'Dai feedback per migliorare <span class="alva-gradient-text">Alva</span>'},fr:{chatInputPlaceholder:"Posez-moi une question sur Bâle-Ville.",introductionTitle:"Je suis <span class='alva-gradient-text'>Alva</span>. Je réponds à vos questions sur l'administration du Canton de Bâle-Ville.",chatFooterText:'Toutes les informations sont sans garantie. Veuillez vérifier les informations sur <a href="https://bs.ch/fr">bs.ch</a>.',feedbackFormTitle:'Donnez un feedback pour améliorer <span class="alva-gradient-text">Alva</span>'}}},Symbol.toStringTag,{value:"Module"})),jl={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputSubmit:"Aufforderung senden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',referenceLink:"Link zur Referenz",newChat:"Neuer Chat",maintenanceModeError:"Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",messageBotLoading:"Lass mich nachdenken...",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceTitle:"Referenzen anzeigen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",send:"Abschicken",thankYouForFeedback:"Danke für Dein Feedback!",giveFeedback:"Feedback geben",sendFeedback:"Feedback senden",feedbackFailed:"Feedback senden fehlgeschlagen",feedbackFormTitle:"<h4>Feedback geben, um unseren Chatbot zu verbessern</h4>",feedbackFormMessage:"Ihre Nachricht",feedbackFormMessagePlaceholder:"Schreiben Sie hier Ihre Nachricht...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Ihre E-Mail eingeben...",classificationSubmit:"Abschicken",classificationThankYou:"Danke für Dein Feedback!",classificationTitle:"Bitte bewerten Sie den Einfluss und die Qualität der Nachricht oben",selectLanguage:"Sprache auswählen",languageNames:{de:"Deutsch",en:"Englisch",fr:"Französisch",it:"Italienisch"}},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputSubmit:"Send prompt",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',referenceLink:"Link to reference",newChat:"New discussion",maintenanceModeError:"The chat is currently not available. Please try again later.",messageBotLoading:"Let me think...",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceTitle:"Show references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",send:"Send",thankYouForFeedback:"Thank you for your feedback!",giveFeedback:"Give feedback",sendFeedback:"Send feedback",feedbackFailed:"Feedback send failed",feedbackFormTitle:"<h4>Give feedback to improve our Chatbot</h4>",feedbackFormMessage:"Your message",feedbackFormMessagePlaceholder:"Write your message here...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Enter your E-Mail",classificationSubmit:"Submit",classificationThankYou:"Thank you for your feedback!",classificationTitle:"Please rate the impact and quality of the message above",selectLanguage:"Select language",languageNames:{de:"German",en:"English",fr:"French",it:"Italian"}},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputSubmit:"Invia richiesta",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',referenceLink:"Link alla referenza",newChat:"Nuova discussione",maintenanceModeError:"Il chat è attualmente non disponibile. Per favore riprova più tardi.",messageBotLoading:"Fammi pensare...",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceTitle:"Mostra riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",send:"Invia",thankYouForFeedback:"Grazie per il tuo feedback!",giveFeedback:"Invia feedback",sendFeedback:"Invia feedback",feedbackFailed:"Invia feedback fallito",feedbackFormTitle:"<h4>Invia feedback per migliorare il nostro Chatbot</h4>",feedbackFormMessage:"Il tuo messaggio",feedbackFormMessagePlaceholder:"Scrivi qui il tuo messaggio...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Inserisci il tuo E-Mail",classificationSubmit:"Invia",classificationThankYou:"Grazie per il tuo feedback!",classificationTitle:"Per favore valuta l'impatto e la qualità del messaggio sopra",selectLanguage:"Selezionare la lingua",languageNames:{de:"Tedesco",en:"Inglese",fr:"Francese",it:"Italiano"}},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputSubmit:"Envoyer la demande",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",referenceLink:"Lien vers la référence",newChat:"Nouvelle discussion",maintenanceModeError:"Le chat est actuellement indisponible. Veuillez réessayer plus tard.",messageBotLoading:"Laissez-moi réfléchir...",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceTitle:"Afficher les références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",send:"Envoyer",thankYouForFeedback:"Merci pour votre feedback!",giveFeedback:"Donner un feedback",sendFeedback:"Envoyer un feedback",feedbackFailed:"Envoyer un feedback échoué",feedbackFormTitle:"<h4>Donnez un feedback pour améliorer notre Chatbot</h4>",feedbackFormMessage:"Votre message",feedbackFormMessagePlaceholder:"Écrivez votre message ici...",feedbackFormEmail:"E-Mail",feedbackFormEmailPlaceholder:"Entrez votre E-Mail",classificationSubmit:"Envoyer",classificationThankYou:"Merci pour votre feedback!",classificationTitle:"Veuillez évaluer l'impact et la qualité du message ci-dessus",selectLanguage:"Choisir la langue",languageNames:{de:"Allemand",en:"Anglais",fr:"Français",it:"Italien"}}},pv=Object.freeze(Object.defineProperty({__proto__:null,translations:jl},Symbol.toStringTag,{value:"Module"})),gv=Object.freeze(Object.defineProperty({__proto__:null,translations:{de:{chatInputPlaceholder:"Fragen Sie mich etwas über Liip",chatFooterText:'Entwickelt von <a href="https://liip.ch/de">Liip</ch>'},en:{chatInputPlaceholder:"Ask me something about Liip",chatFooterText:'Developed by <a href="https://liip.ch/en">Liip</ch>'},it:{chatInputPlaceholder:"Chiedimi qualcosa su Liip",chatFooterText:'Sviluppato da <a href="https://liip.ch">Liip</ch>'},fr:{chatInputPlaceholder:"Posez-moi une question sur Liip",chatFooterText:'Developpé par <a href="https://liip.ch/fr">Liip</ch>'}}},Symbol.toStringTag,{value:"Module"})),mv=Object.freeze(Object.defineProperty({__proto__:null,translations:{de:{chatInputPlaceholder:"Bitte Frage as Satz formulieren...",introductionTitle:"Grüezi!<br>Ich gebe Auskunft zu den Inhalten auf stadtluzern.ch",chatFooterText:'Alle Angaben ohne Gewähr. Bitte überprüfen Sie die Informationen auf <a href="https://stadtluzern.ch">stadtluzern.ch</a>.'},en:{chatInputPlaceholder:"Please formulate your question...",introductionTitle:"Hello!<br>I provide information about the content of stadtluzern.ch",chatFooterText:'All information without guarantee. Please verify the information on <a href="https://stadtluzern.ch/en">stadtluzern.ch</a>.'},it:{chatInputPlaceholder:"Formulare la tua domanda...",introductionTitle:"Buongiorno!<br>Dò informazioni sui contenuti di stadtluzern.ch",chatFooterText:'Tutte le informazioni sono senza garanzia. Si prega di verificare le informazioni sul <a href="https://stadtluzern.ch/it">stadtluzern.ch</a>.'},fr:{chatInputPlaceholder:"Formulez votre question...",introductionTitle:"Bonjour!<br>Je donne des informations sur le contenu de stadtluzern.ch",chatFooterText:'Toutes les informations sont sans garantie. Veuillez vérifier les informations sur <a href="https://stadtluzern.ch/fr">stadtluzern.ch</a>.'}}},Symbol.toStringTag,{value:"Module"})),vv=R.object({predefinedQuestions:R.string(),introductionTitle:R.string(),referenceTitle:R.string(),chatInputPlaceholder:R.string(),chatInputSubmit:R.string(),referenceLink:R.string(),newChat:R.string(),maintenanceModeError:R.string(),messageBotLoading:R.string(),messageBotError:R.string(),messageBotDefaultError:R.string(),chatFooterText:R.string().optional(),scrollToBottom:R.string(),openMenu:R.string(),closeMenu:R.string(),send:R.string(),thankYouForFeedback:R.string(),giveFeedback:R.string(),sendFeedback:R.string(),feedbackFailed:R.string(),feedbackFormTitle:R.string(),feedbackFormMessage:R.string(),feedbackFormMessagePlaceholder:R.string(),feedbackFormEmail:R.string(),feedbackFormEmailPlaceholder:R.string(),answerGood:R.string(),answerBad:R.string(),classificationSubmit:R.string(),classificationThankYou:R.string(),classificationTitle:R.string(),selectLanguage:R.string(),languageNames:R.record(R.string(),R.string())}),bv=(()=>{const e=Object.entries(Object.assign({"./alva/alva-translations.ts":hv,"./default/default-translations.ts":pv,"./liipgpt/liipgpt-translations.ts":gv,"./luzern/luzern-translations.ts":mv})).map(([r,{translations:n}])=>[zl(r),ql(jl,n)]);return Object.fromEntries(e)})(),ud=t=>new Proxy(t,{get(e,r){return typeof r=="string"&&e[r]===void 0?r.toUpperCase():e[r]}}),dd=jt(ud({})),yv=["en","de","fr","it"],Zl="en",Ui=t=>yv.includes(t),Ca=jt(""),fd=t=>{const e=mo(Ca);if(e&&Ui(e))return e;if(t&&Ui(t))return t;const r=navigator.language.split("-")[0];return r&&Ui(r)?r:Zl},wv=async(t,e)=>{if(!e)throw new Error("org is required");const r=Ui(t)?t:fd(t),n=bv[e];let o=n[r];o||(console.warn(`Translation not found for ${r}, switching to ${Zl}`),o=n[Zl]);const a=vv.safeParse(o);a.error&&console.error("Translation is invalid",a.error);const i=ud(o);return dd.set(i),i},_v=t=>{Ca.set(t)},fn=dd,Co=new Map;class kv{get length(){return Co.size}clear(){Co.clear()}getItem(e){return Co.get(e)||null}key(e){return Array.from(Co.keys())[e]||null}removeItem(e){Co.delete(e)}setItem(e,r){Co.set(e,String(r))}}const hd=globalThis.localStorage??new kv;function Ul(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Hn=Ul();function pd(t){Hn=t}const Ea={exec:()=>null};function Je(t,e=""){let r=typeof t=="string"?t:t.source;const n={replace:(o,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(Ut.caret,"$1"),r=r.replace(o,i),n},getRegex:()=>new RegExp(r,e)};return n}const Ut={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},xv=/^(?:[ \t]*(?:\n|$))+/,Sv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Tv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Aa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hl=/(?:[*+-]|\d{1,9}[.)])/,gd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,md=Je(gd).replace(/bull/g,Hl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ev=Je(gd).replace(/bull/g,Hl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Gl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Av=/^[^\n]+/,Vl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Rv=Je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Iv=Je(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hl).getRegex(),Hi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ov=Je("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Wl).replace("tag",Hi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vd=Je(Gl).replace("hr",Aa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex(),Kl={blockquote:Je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vd).getRegex(),code:Sv,def:Rv,fences:Tv,heading:Cv,hr:Aa,html:Ov,lheading:md,list:Iv,newline:xv,paragraph:vd,table:Ea,text:Av},bd=Je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Aa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex(),Nv={...Kl,lheading:Ev,table:bd,paragraph:Je(Gl).replace("hr",Aa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex()},Pv={...Kl,html:Je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ea,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Je(Gl).replace("hr",Aa).replace("heading",` *#{1,6} *[^
829
+ ]`).replace("lheading",md).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Fv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yd=/^( {2,}|\\)\n(?!\s*$)/,Dv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gi=/[\p{P}\p{S}]/u,Yl=/[\s\p{P}\p{S}]/u,wd=/[^\s\p{P}\p{S}]/u,Mv=Je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Yl).getRegex(),_d=/(?!~)[\p{P}\p{S}]/u,Bv=/(?!~)[\s\p{P}\p{S}]/u,zv=/(?:[^\s\p{P}\p{S}]|~)/u,$v=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,kd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qv=Je(kd,"u").replace(/punct/g,Gi).getRegex(),jv=Je(kd,"u").replace(/punct/g,_d).getRegex(),xd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zv=Je(xd,"gu").replace(/notPunctSpace/g,wd).replace(/punctSpace/g,Yl).replace(/punct/g,Gi).getRegex(),Uv=Je(xd,"gu").replace(/notPunctSpace/g,zv).replace(/punctSpace/g,Bv).replace(/punct/g,_d).getRegex(),Hv=Je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wd).replace(/punctSpace/g,Yl).replace(/punct/g,Gi).getRegex(),Gv=Je(/\\(punct)/,"gu").replace(/punct/g,Gi).getRegex(),Vv=Je(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Wv=Je(Wl).replace("(?:-->|$)","-->").getRegex(),Kv=Je("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Wv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yv=Je(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Vi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Sd=Je(/^!?\[(label)\]\[(ref)\]/).replace("label",Vi).replace("ref",Vl).getRegex(),Td=Je(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vl).getRegex(),Qv=Je("reflink|nolink(?!\\()","g").replace("reflink",Sd).replace("nolink",Td).getRegex(),Ql={_backpedal:Ea,anyPunctuation:Gv,autolink:Vv,blockSkip:$v,br:yd,code:Lv,del:Ea,emStrongLDelim:qv,emStrongRDelimAst:Zv,emStrongRDelimUnd:Hv,escape:Fv,link:Yv,nolink:Td,punctuation:Mv,reflink:Sd,reflinkSearch:Qv,tag:Kv,text:Dv,url:Ea},Jv={...Ql,link:Je(/^!?\[(label)\]\((.*?)\)/).replace("label",Vi).getRegex(),reflink:Je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Vi).getRegex()},Jl={...Ql,emStrongRDelimAst:Uv,emStrongLDelim:jv,url:Je(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Xv={...Jl,br:Je(yd).replace("{2,}","*").getRegex(),text:Je(Jl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Wi={normal:Kl,gfm:Nv,pedantic:Pv},Ra={normal:Ql,gfm:Jl,breaks:Xv,pedantic:Jv},e0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cd=t=>e0[t];function Hr(t,e){if(e){if(Ut.escapeTest.test(t))return t.replace(Ut.escapeReplace,Cd)}else if(Ut.escapeTestNoEncode.test(t))return t.replace(Ut.escapeReplaceNoEncode,Cd);return t}function Ed(t){try{t=encodeURI(t).replace(Ut.percentDecode,"%")}catch{return null}return t}function Ad(t,e){var a;const r=t.replace(Ut.findPipe,(i,s,c)=>{let l=!1,u=s;for(;--u>=0&&c[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Ut.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(Ut.slashPipe,"|");return n}function Ia(t,e,r){const n=t.length;if(n===0)return"";let o=0;for(;o<n&&t.charAt(n-o-1)===e;)o++;return t.slice(0,n-o)}function t0(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function Rd(t,e,r,n,o){const a=e.href,i=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;const c={type:"link",raw:r,href:a,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,c}return{type:"image",raw:r,href:a,title:i,text:s}}function r0(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const o=n[1];return e.split(`
863
830
  `).map(a=>{const i=a.match(r.other.beginningSpace);if(i===null)return a;const[s]=i;return s.length>=o.length?a.slice(o.length):a}).join(`
864
- `)}class ji{constructor(e){q(this,"options");q(this,"rules");q(this,"lexer");this.options=e||Bn}space(e){const r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){const r=this.rules.block.code.exec(e);if(r){const n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ca(n,`
865
- `)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],o=Mv(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(e){const r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){const o=Ca(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Ca(r[0],`
866
- `)}}blockquote(e){const r=this.rules.block.blockquote.exec(e);if(r){let n=Ca(r[0],`
831
+ `)}class Ki{constructor(e){z(this,"options");z(this,"rules");z(this,"lexer");this.options=e||Hn}space(e){const r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){const r=this.rules.block.code.exec(e);if(r){const n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ia(n,`
832
+ `)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],o=r0(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(e){const r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){const o=Ia(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Ia(r[0],`
833
+ `)}}blockquote(e){const r=this.rules.block.blockquote.exec(e);if(r){let n=Ia(r[0],`
867
834
  `).split(`
868
- `),o="",a="";const i=[];for(;n.length>0;){let s=!1;const l=[];let c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),s=!0;else if(!s)l.push(n[c]);else break;n=n.slice(c);const u=l.join(`
869
- `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
835
+ `),o="",a="";const i=[];for(;n.length>0;){let s=!1;const c=[];let l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))c.push(n[l]),s=!0;else if(!s)c.push(n[l]);else break;n=n.slice(l);const u=c.join(`
836
+ `),f=u.replace(this.rules.other.blockquoteSetextReplace,`
870
837
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
871
838
  ${u}`:u,a=a?`${a}
872
- ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,n.length===0)break;const v=i.at(-1);if((v==null?void 0:v.type)==="code")break;if((v==null?void 0:v.type)==="blockquote"){const h=v,m=h.raw+`
839
+ ${f}`:f;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,i,!0),this.lexer.state.top=d,n.length===0)break;const m=i.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){const h=m,v=h.raw+`
873
840
  `+n.join(`
874
- `),y=this.blockquote(m);i[i.length-1]=y,o=o.substring(0,o.length-h.raw.length)+y.raw,a=a.substring(0,a.length-h.text.length)+y.text;break}else if((v==null?void 0:v.type)==="list"){const h=v,m=h.raw+`
841
+ `),y=this.blockquote(v);i[i.length-1]=y,o=o.substring(0,o.length-h.raw.length)+y.raw,a=a.substring(0,a.length-h.text.length)+y.text;break}else if((m==null?void 0:m.type)==="list"){const h=m,v=h.raw+`
875
842
  `+n.join(`
876
- `),y=this.list(m);i[i.length-1]=y,o=o.substring(0,o.length-v.raw.length)+y.raw,a=a.substring(0,a.length-h.raw.length)+y.raw,n=m.substring(i.at(-1).raw.length).split(`
877
- `);continue}}return{type:"blockquote",raw:o,tokens:i,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim();const o=n.length>1,a={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let c=!1,u="",d="";if(!(r=i.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let f=r[2].split(`
878
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),v=e.split(`
879
- `,1)[0],h=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):h?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),h&&this.rules.other.blankLine.test(v)&&(u+=v+`
880
- `,e=e.substring(v.length+1),c=!0),!c){const b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),R=this.rules.other.fencesBeginRegex(m),E=this.rules.other.headingBeginRegex(m),x=this.rules.other.htmlBeginRegex(m);for(;e;){const J=e.split(`
881
- `,1)[0];let M;if(v=J,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),M=v):M=v.replace(this.rules.other.tabCharGlobal," "),R.test(v)||E.test(v)||x.test(v)||b.test(v)||w.test(v))break;if(M.search(this.rules.other.nonSpaceChar)>=m||!v.trim())d+=`
882
- `+M.slice(m);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(f)||E.test(f)||w.test(f))break;d+=`
883
- `+v}!h&&!v.trim()&&(h=!0),u+=J+`
884
- `,e=e.substring(J.length+1),f=M.slice(m)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let y=null,g;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(g=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!y,checked:g,loose:!1,text:d,tokens:[]}),a.raw+=u}const l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){const u=a.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=d}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(e){const r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){const r=this.rules.block.def.exec(e);if(r){const n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:a}}}table(e){var s;const r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;const n=md(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
885
- `):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const l of o)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(const l of a)i.rows.push(md(l,i.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[u]})));return i}}lheading(e){const r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){const r=this.rules.block.paragraph.exec(e);if(r){const n=r[1].charAt(r[1].length-1)===`
886
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){const r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){const r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){const r=this.rules.inline.link.exec(e);if(r){const n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const i=Ca(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=Lv(r[2],"()");if(i>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+i;r[2]=r[2].substring(0,i),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let o=r[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],a=i[3])}else a=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),vd(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[o.toLowerCase()];if(!a){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return vd(n,a,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...o[0]].length-1;let s,l,c=i,u=0;const d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+i);(o=d.exec(r))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(l=[...s].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=[...o[0]][0].length,v=e.slice(0,i+o.index+f+l);if(Math.min(i,l)%2){const m=v.slice(1,-1);return{type:"em",raw:v,text:m,tokens:this.lexer.inlineTokens(m)}}const h=v.slice(2,-2);return{type:"strong",raw:v,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){const r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){const r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){const r=this.rules.inline.autolink.exec(e);if(r){let n,o;return r[2]==="@"?(n=r[1],o="mailto:"+n):(n=r[1],o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let o,a;if(r[2]==="@")o=r[0],a="mailto:"+o;else{let i;do i=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(i!==r[0]);o=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:o,href:a,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){const r=this.rules.inline.text.exec(e);if(r){const n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}}class cr{constructor(e){q(this,"tokens");q(this,"options");q(this,"state");q(this,"tokenizer");q(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Bn,this.options.tokenizer=this.options.tokenizer||new ji,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:jt,block:qi.normal,inline:Ea.normal};this.options.pedantic?(r.block=qi.pedantic,r.inline=Ea.pedantic):this.options.gfm&&(r.block=qi.gfm,this.options.breaks?r.inline=Ea.breaks:r.inline=Ea.gfm),this.tokenizer.rules=r}static get rules(){return{block:qi,inline:Ea}}static lex(e,r){return new cr(r).lex(e)}static lexInline(e,r){return new cr(r).inlineTokens(e)}lex(e){e=e.replace(jt.carriageReturn,`
887
- `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var o,a,i;for(this.options.pedantic&&(e=e.replace(jt.tabCharGlobal," ").replace(jt.spaceLine,""));e;){let s;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(c=>(s=c.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const c=r.at(-1);s.raw.length===1&&c!==void 0?c.raw+=`
888
- `:r.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
889
- `+s.raw,c.text+=`
890
- `+s.text,this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
891
- `+s.raw,c.text+=`
892
- `+s.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),r.push(s);continue}let l=e;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0;const u=e.slice(1);let d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){const c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
893
- `+s.raw,c.text+=`
894
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s),n=l.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
895
- `+s.raw,c.text+=`
896
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var s,l,c;let n=e,o=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a=!1,i="";for(;e;){a||(i=""),a=!1;let u;if((l=(s=this.options.extensions)==null?void 0:s.inline)!=null&&l.some(f=>(u=f.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(e,n,i)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),r.push(u);continue}let d=e;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0;const v=e.slice(1);let h;this.options.extensions.startInline.forEach(m=>{h=m.call({lexer:this},v),typeof h=="number"&&h>=0&&(f=Math.min(f,h))}),f<1/0&&f>=0&&(d=e.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),a=!0;const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}}class $i{constructor(e){q(this,"options");q(this,"parser");this.options=e||Bn}space(e){return""}code({text:e,lang:r,escaped:n}){var i;const o=(i=(r||"").match(jt.notSpaceStart))==null?void 0:i[0],a=e.replace(jt.endingNewline,"")+`
897
- `;return o?'<pre><code class="language-'+Zr(o)+'">'+(n?a:Zr(a,!0))+`</code></pre>
898
- `:"<pre><code>"+(n?a:Zr(a,!0))+`</code></pre>
843
+ `),y=this.list(v);i[i.length-1]=y,o=o.substring(0,o.length-m.raw.length)+y.raw,a=a.substring(0,a.length-h.raw.length)+y.raw,n=v.substring(i.at(-1).raw.length).split(`
844
+ `);continue}}return{type:"blockquote",raw:o,tokens:i,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim();const o=n.length>1,a={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let l=!1,u="",f="";if(!(r=i.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let d=r[2].split(`
845
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),m=e.split(`
846
+ `,1)[0],h=!d.trim(),v=0;if(this.options.pedantic?(v=2,f=d.trimStart()):h?v=r[1].length+1:(v=r[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,f=d.slice(v),v+=r[1].length),h&&this.rules.other.blankLine.test(m)&&(u+=m+`
847
+ `,e=e.substring(m.length+1),l=!0),!l){const w=this.rules.other.nextBulletRegex(v),b=this.rules.other.hrRegex(v),S=this.rules.other.fencesBeginRegex(v),E=this.rules.other.headingBeginRegex(v),P=this.rules.other.htmlBeginRegex(v);for(;e;){const F=e.split(`
848
+ `,1)[0];let O;if(m=F,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),O=m):O=m.replace(this.rules.other.tabCharGlobal," "),S.test(m)||E.test(m)||P.test(m)||w.test(m)||b.test(m))break;if(O.search(this.rules.other.nonSpaceChar)>=v||!m.trim())f+=`
849
+ `+O.slice(v);else{if(h||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(d)||E.test(d)||b.test(d))break;f+=`
850
+ `+m}!h&&!m.trim()&&(h=!0),u+=F+`
851
+ `,e=e.substring(F.length+1),d=O.slice(v)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let y=null,g;this.options.gfm&&(y=this.rules.other.listIsTask.exec(f),y&&(g=y[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!y,checked:g,loose:!1,text:f,tokens:[]}),a.raw+=u}const c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l=0;l<a.items.length;l++)if(this.lexer.state.top=!1,a.items[l].tokens=this.lexer.blockTokens(a.items[l].text,[]),!a.loose){const u=a.items[l].tokens.filter(d=>d.type==="space"),f=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=f}if(a.loose)for(let l=0;l<a.items.length;l++)a.items[l].loose=!0;return a}}html(e){const r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){const r=this.rules.block.def.exec(e);if(r){const n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:a}}}table(e){var s;const r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;const n=Ad(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
852
+ `):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const c of o)this.rules.other.tableAlignRight.test(c)?i.align.push("right"):this.rules.other.tableAlignCenter.test(c)?i.align.push("center"):this.rules.other.tableAlignLeft.test(c)?i.align.push("left"):i.align.push(null);for(let c=0;c<n.length;c++)i.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:i.align[c]});for(const c of a)i.rows.push(Ad(c,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(e){const r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){const r=this.rules.block.paragraph.exec(e);if(r){const n=r[1].charAt(r[1].length-1)===`
853
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){const r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){const r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){const r=this.rules.inline.link.exec(e);if(r){const n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const i=Ia(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=t0(r[2],"()");if(i>-1){const c=(r[0].indexOf("!")===0?5:4)+r[1].length+i;r[2]=r[2].substring(0,i),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let o=r[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],a=i[3])}else a=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),Rd(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[o.toLowerCase()];if(!a){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Rd(n,a,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...o[0]].length-1;let s,c,l=i,u=0;const f=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,r=r.slice(-1*e.length+i);(o=f.exec(r))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){l+=c;continue}else if((o[5]||o[6])&&i%3&&!((i+c)%3)){u+=c;continue}if(l-=c,l>0)continue;c=Math.min(c,c+l+u);const d=[...o[0]][0].length,m=e.slice(0,i+o.index+d+c);if(Math.min(i,c)%2){const v=m.slice(1,-1);return{type:"em",raw:m,text:v,tokens:this.lexer.inlineTokens(v)}}const h=m.slice(2,-2);return{type:"strong",raw:m,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){const r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){const r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){const r=this.rules.inline.autolink.exec(e);if(r){let n,o;return r[2]==="@"?(n=r[1],o="mailto:"+n):(n=r[1],o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let o,a;if(r[2]==="@")o=r[0],a="mailto:"+o;else{let i;do i=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(i!==r[0]);o=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:o,href:a,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){const r=this.rules.inline.text.exec(e);if(r){const n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}}class pr{constructor(e){z(this,"tokens");z(this,"options");z(this,"state");z(this,"tokenizer");z(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Hn,this.options.tokenizer=this.options.tokenizer||new Ki,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Ut,block:Wi.normal,inline:Ra.normal};this.options.pedantic?(r.block=Wi.pedantic,r.inline=Ra.pedantic):this.options.gfm&&(r.block=Wi.gfm,this.options.breaks?r.inline=Ra.breaks:r.inline=Ra.gfm),this.tokenizer.rules=r}static get rules(){return{block:Wi,inline:Ra}}static lex(e,r){return new pr(r).lex(e)}static lexInline(e,r){return new pr(r).inlineTokens(e)}lex(e){e=e.replace(Ut.carriageReturn,`
854
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var o,a,i;for(this.options.pedantic&&(e=e.replace(Ut.tabCharGlobal," ").replace(Ut.spaceLine,""));e;){let s;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(l=>(s=l.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const l=r.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
855
+ `:r.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
856
+ `+s.raw,l.text+=`
857
+ `+s.text,this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
858
+ `+s.raw,l.text+=`
859
+ `+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),r.push(s);continue}let c=e;if((i=this.options.extensions)!=null&&i.startBlock){let l=1/0;const u=e.slice(1);let f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(c=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){const l=r.at(-1);n&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=`
860
+ `+s.raw,l.text+=`
861
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s),n=c.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=`
862
+ `+s.raw,l.text+=`
863
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var s,c,l;let n=e,o=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a=!1,i="";for(;e;){a||(i=""),a=!1;let u;if((c=(s=this.options.extensions)==null?void 0:s.inline)!=null&&c.some(d=>(u=d.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const d=r.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(e,n,i)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),r.push(u);continue}let f=e;if((l=this.options.extensions)!=null&&l.startInline){let d=1/0;const m=e.slice(1);let h;this.options.extensions.startInline.forEach(v=>{h=v.call({lexer:this},m),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(f=e.substring(0,d+1))}if(u=this.tokenizer.inlineText(f)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),a=!0;const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):r.push(u);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}}class Yi{constructor(e){z(this,"options");z(this,"parser");this.options=e||Hn}space(e){return""}code({text:e,lang:r,escaped:n}){var i;const o=(i=(r||"").match(Ut.notSpaceStart))==null?void 0:i[0],a=e.replace(Ut.endingNewline,"")+`
864
+ `;return o?'<pre><code class="language-'+Hr(o)+'">'+(n?a:Hr(a,!0))+`</code></pre>
865
+ `:"<pre><code>"+(n?a:Hr(a,!0))+`</code></pre>
899
866
  `}blockquote({tokens:e}){return`<blockquote>
900
867
  ${this.parser.parse(e)}</blockquote>
901
868
  `}html({text:e}){return e}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
902
869
  `}hr(e){return`<hr>
903
- `}list(e){const r=e.ordered,n=e.start;let o="";for(let s=0;s<e.items.length;s++){const l=e.items[s];o+=this.listitem(l)}const a=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+a+i+`>
870
+ `}list(e){const r=e.ordered,n=e.start;let o="";for(let s=0;s<e.items.length;s++){const c=e.items[s];o+=this.listitem(c)}const a=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+a+i+`>
904
871
  `+o+"</"+a+`>
905
- `}listitem(e){var n;let r="";if(e.task){const o=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=o+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=o+" "+Zr(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):r+=o+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
872
+ `}listitem(e){var n;let r="";if(e.task){const o=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=o+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=o+" "+Hr(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):r+=o+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
906
873
  `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
907
874
  `}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let o="";for(let a=0;a<e.rows.length;a++){const i=e.rows[a];n="";for(let s=0;s<i.length;s++)n+=this.tablecell(i[s]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
908
875
  <thead>
@@ -911,21 +878,23 @@ ${this.parser.parse(e)}</blockquote>
911
878
  `}tablerow({text:e}){return`<tr>
912
879
  ${e}</tr>
913
880
  `}tablecell(e){const r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
914
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Zr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){const o=this.parser.parseInline(n),a=gd(e);if(a===null)return o;e=a;let i='<a href="'+e+'"';return r&&(i+=' title="'+Zr(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n}){const o=gd(e);if(o===null)return Zr(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Zr(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Zr(e.text)}}class Ul{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ur{constructor(e){q(this,"options");q(this,"renderer");q(this,"textRenderer");this.options=e||Bn,this.options.renderer=this.options.renderer||new $i,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ul}static parse(e,r){return new ur(r).parse(e)}static parseInline(e,r){return new ur(r).parseInline(e)}parse(e,r=!0){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const c=s,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){n+=u||"";continue}}const l=s;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;i+1<e.length&&e[i+1].type==="text";)c=e[++i],u+=`
915
- `+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=c||"";continue}}const l=s;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}}class Aa{constructor(e){q(this,"options");q(this,"block");this.options=e||Bn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?cr.lex:cr.lexInline}provideParser(){return this.block?ur.parse:ur.parseInline}}q(Aa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class bd{constructor(...e){q(this,"defaults",Dl());q(this,"options",this.setOptions);q(this,"parse",this.parseMarkdown(!0));q(this,"parseInline",this.parseMarkdown(!1));q(this,"Parser",ur);q(this,"Renderer",$i);q(this,"TextRenderer",Ul);q(this,"Lexer",cr);q(this,"Tokenizer",ji);q(this,"Hooks",Aa);this.use(...e)}walkTokens(e,r){var o,a;let n=[];for(const i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":{const s=i;for(const l of s.header)n=n.concat(this.walkTokens(l.tokens,r));for(const l of s.rows)for(const c of l)n=n.concat(this.walkTokens(c.tokens,r));break}case"list":{const s=i;n=n.concat(this.walkTokens(s.items,r));break}default:{const s=i;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{const c=s[l].flat(1/0);n=n.concat(this.walkTokens(c,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...e){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=r.renderers[a.name];i?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=r[a.level];i?i.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),o.extensions=r),n.renderer){const a=this.defaults.renderer||new $i(this.defaults);for(const i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const s=i,l=n.renderer[s],c=a[s];a[s]=(...u)=>{let d=l.apply(a,u);return d===!1&&(d=c.apply(a,u)),d||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new ji(this.defaults);for(const i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const s=i,l=n.tokenizer[s],c=a[s];a[s]=(...u)=>{let d=l.apply(a,u);return d===!1&&(d=c.apply(a,u)),d}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Aa;for(const i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const s=i,l=n.hooks[s],c=a[s];Aa.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(l.call(a,u)).then(f=>c.call(a,f));const d=l.call(a,u);return c.call(a,d)}:a[s]=(...u)=>{let d=l.apply(a,u);return d===!1&&(d=c.apply(a,u)),d}}o.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(s){let l=[];return l.push(i.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return cr.lex(e,r??this.defaults)}parser(e,r){return ur.parse(e,r??this.defaults)}parseMarkdown(e){return(n,o)=>{const a={...o},i={...this.defaults,...a},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const l=i.hooks?i.hooks.provideLexer():e?cr.lex:cr.lexInline,c=i.hooks?i.hooks.provideParser():e?ur.parse:ur.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(s);try{i.hooks&&(n=i.hooks.preprocess(n));let u=l(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return s(u)}}}onError(e,r){return n=>{if(n.message+=`
916
- Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Zr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const qn=new bd;function tt(t,e){return qn.parse(t,e)}tt.options=tt.setOptions=function(t){return qn.setOptions(t),tt.defaults=qn.defaults,od(tt.defaults),tt},tt.getDefaults=Dl,tt.defaults=Bn,tt.use=function(...t){return qn.use(...t),tt.defaults=qn.defaults,od(tt.defaults),tt},tt.walkTokens=function(t,e){return qn.walkTokens(t,e)},tt.parseInline=qn.parseInline,tt.Parser=ur,tt.parser=ur.parse,tt.Renderer=$i,tt.TextRenderer=Ul,tt.Lexer=cr,tt.lexer=cr.lex,tt.Tokenizer=ji,tt.Hooks=Aa,tt.parse=tt,tt.options,tt.setOptions,tt.use,tt.walkTokens,tt.parseInline,ur.parse,cr.lex;const Dv=t=>({extensions:[{name:"footnote",level:"inline",start(e){var r;return(r=e.match(/\[\^(\d+)\]/))==null?void 0:r.index},tokenizer(e){const n=/^\[\^(\d+)\]/.exec(e);if(n){const[o,a]=n;return{type:"footnote",raw:o,refNumber:a}}},renderer(e){if(e.type==="footnote"){const r=parseInt(e.refNumber),n=t.sources.all.find(a=>a.referenceNumber==r);n||console.error("Could not find ref with number",r);let o;return n!=null&&n.usedNumber?o=n.usedNumber:(o=t.sources.used.push(n),n.usedNumber=o),` <liipgpt-reference-number data-ref-number="${e.refNumber}" data-used-number="${o}" data-source="${JSON.stringify(n).replace(/"/g,"&quot;")}"></liipgpt-reference-number>`}}}]}),Fv={hr(){return""}},yd=(t,e)=>new bd().use(Dv(e)).use({renderer:Fv}).parse(t);var Hl={exports:{}};/** @license
881
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Hr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){const o=this.parser.parseInline(n),a=Ed(e);if(a===null)return o;e=a;let i='<a href="'+e+'"';return r&&(i+=' title="'+Hr(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n}){const o=Ed(e);if(o===null)return Hr(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Hr(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Hr(e.text)}}class Xl{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class gr{constructor(e){z(this,"options");z(this,"renderer");z(this,"textRenderer");this.options=e||Hn,this.options.renderer=this.options.renderer||new Yi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xl}static parse(e,r){return new gr(r).parse(e)}static parseInline(e,r){return new gr(r).parseInline(e)}parse(e,r=!0){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const l=s,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=u||"";continue}}const c=s;switch(c.type){case"space":{n+=this.renderer.space(c);continue}case"hr":{n+=this.renderer.hr(c);continue}case"heading":{n+=this.renderer.heading(c);continue}case"code":{n+=this.renderer.code(c);continue}case"table":{n+=this.renderer.table(c);continue}case"blockquote":{n+=this.renderer.blockquote(c);continue}case"list":{n+=this.renderer.list(c);continue}case"html":{n+=this.renderer.html(c);continue}case"paragraph":{n+=this.renderer.paragraph(c);continue}case"text":{let l=c,u=this.renderer.text(l);for(;i+1<e.length&&e[i+1].type==="text";)l=e[++i],u+=`
882
+ `+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,r=this.renderer){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}const c=s;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}}class Oa{constructor(e){z(this,"options");z(this,"block");this.options=e||Hn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?pr.lex:pr.lexInline}provideParser(){return this.block?gr.parse:gr.parseInline}}z(Oa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Id{constructor(...e){z(this,"defaults",Ul());z(this,"options",this.setOptions);z(this,"parse",this.parseMarkdown(!0));z(this,"parseInline",this.parseMarkdown(!1));z(this,"Parser",gr);z(this,"Renderer",Yi);z(this,"TextRenderer",Xl);z(this,"Lexer",pr);z(this,"Tokenizer",Ki);z(this,"Hooks",Oa);this.use(...e)}walkTokens(e,r){var o,a;let n=[];for(const i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":{const s=i;for(const c of s.header)n=n.concat(this.walkTokens(c.tokens,r));for(const c of s.rows)for(const l of c)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{const s=i;n=n.concat(this.walkTokens(s.items,r));break}default:{const s=i;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{const l=s[c].flat(1/0);n=n.concat(this.walkTokens(l,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...e){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=r.renderers[a.name];i?r.renderers[a.name]=function(...s){let c=a.renderer.apply(this,s);return c===!1&&(c=i.apply(this,s)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=r[a.level];i?i.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),o.extensions=r),n.renderer){const a=this.defaults.renderer||new Yi(this.defaults);for(const i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const s=i,c=n.renderer[s],l=a[s];a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new Ki(this.defaults);for(const i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const s=i,c=n.tokenizer[s],l=a[s];a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Oa;for(const i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const s=i,c=n.hooks[s],l=a[s];Oa.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(c.call(a,u)).then(d=>l.call(a,d));const f=c.call(a,u);return l.call(a,f)}:a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f}}o.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(s){let c=[];return c.push(i.call(this,s)),a&&(c=c.concat(a.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return pr.lex(e,r??this.defaults)}parser(e,r){return gr.parse(e,r??this.defaults)}parseMarkdown(e){return(n,o)=>{const a={...o},i={...this.defaults,...a},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const c=i.hooks?i.hooks.provideLexer():e?pr.lex:pr.lexInline,l=i.hooks?i.hooks.provideParser():e?gr.parse:gr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(s);try{i.hooks&&(n=i.hooks.preprocess(n));let u=c(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let f=l(u,i);return i.hooks&&(f=i.hooks.postprocess(f)),f}catch(u){return s(u)}}}onError(e,r){return n=>{if(n.message+=`
883
+ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Hr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const Gn=new Id;function ot(t,e){return Gn.parse(t,e)}ot.options=ot.setOptions=function(t){return Gn.setOptions(t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.getDefaults=Ul,ot.defaults=Hn,ot.use=function(...t){return Gn.use(...t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.walkTokens=function(t,e){return Gn.walkTokens(t,e)},ot.parseInline=Gn.parseInline,ot.Parser=gr,ot.parser=gr.parse,ot.Renderer=Yi,ot.TextRenderer=Xl,ot.Lexer=pr,ot.lexer=pr.lex,ot.Tokenizer=Ki,ot.Hooks=Oa,ot.parse=ot,ot.options,ot.setOptions,ot.use,ot.walkTokens,ot.parseInline,gr.parse,pr.lex;const n0=t=>({extensions:[{name:"footnote",level:"inline",start(e){var r;return(r=e.match(/\[\^(\d+)\]/))==null?void 0:r.index},tokenizer(e){const n=/^\[\^(\d+)\]/.exec(e);if(n){const[o,a]=n;return{type:"footnote",raw:o,refNumber:a}}},renderer(e){if(e.type==="footnote"){const r=parseInt(e.refNumber),n=t.sources.all.find(a=>a.referenceNumber==r);n||console.error("Could not find ref with number",r);let o;return n!=null&&n.usedNumber?o=n.usedNumber:(o=t.sources.used.push(n),n.usedNumber=o),` <liipgpt-reference-number data-ref-number="${e.refNumber}" data-used-number="${o}" data-source="${JSON.stringify(n).replace(/"/g,"&quot;")}"></liipgpt-reference-number>`}}}]}),o0={hr(){return""}},Od=(t,e)=>new Id().use(n0(e)).use({renderer:o0}).parse(t),Nd=R.object({label:R.string(),options:R.array(R.object({label:R.string(),value:R.number()}))}),Pd=R.object({enabled:R.boolean(),impact:Nd,quality:Nd}),a0=R.object({classification:Pd.optional()}),i0=R.object({label:R.string(),icon:R.string(),url:R.string(),target:R.string()}),s0=R.object({menu:R.record(R.array(i0)).optional(),supportedLanguages:R.array(R.enum(["en","de","fr","it"])).optional(),classification:Pd.optional()}),l0=R.object({label:R.string().nullable(),question:R.string()}),c0=R.object({predefinedQuestions:R.array(l0)}),u0=R.union([R.object({maintenance:R.literal(!0)}),R.object({id:R.string(),cID:R.string()})]);var ec={exports:{}};/** @license
917
884
  * eventsource.js
918
885
  * Available under MIT License (MIT)
919
886
  * https://github.com/Yaffle/EventSource/
920
- */(function(t,e){(function(r){var n=r.setTimeout,o=r.clearTimeout,a=r.XMLHttpRequest,i=r.XDomainRequest,s=r.ActiveXObject,l=r.EventSource,c=r.document,u=r.Promise,d=r.fetch,f=r.Response,v=r.TextDecoder,h=r.TextEncoder,m=r.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(C){c.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(C){function L(){}return L.prototype=C,new L}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=d;d=function(C,L){var te=L.signal;return y(C,{headers:L.headers,credentials:L.credentials,cache:L.cache}).then(function(B){var me=B.body.getReader();return te._reader=me,te._aborted&&te._reader.cancel(),{status:B.status,statusText:B.statusText,headers:B.headers,body:{getReader:function(){return me}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function g(){this.bitsNeeded=0,this.codePoint=0}g.prototype.decode=function(C){function L(qe,Ve,K){if(K===1)return qe>=128>>Ve&&qe<<Ve<=2047;if(K===2)return qe>=2048>>Ve&&qe<<Ve<=55295||qe>=57344>>Ve&&qe<<Ve<=65535;if(K===3)return qe>=65536>>Ve&&qe<<Ve<=1114111;throw new Error}function te(qe,Ve){if(qe===6)return Ve>>6>15?3:Ve>31?2:1;if(qe===12)return Ve>15?3:2;if(qe===18)return 3;throw new Error}for(var B=65533,me="",ae=this.bitsNeeded,we=this.codePoint,Qe=0;Qe<C.length;Qe+=1){var Me=C[Qe];ae!==0&&(Me<128||Me>191||!L(we<<6|Me&63,ae-6,te(ae,we)))&&(ae=0,we=B,me+=String.fromCharCode(we)),ae===0?(Me>=0&&Me<=127?(ae=0,we=Me):Me>=192&&Me<=223?(ae=6,we=Me&31):Me>=224&&Me<=239?(ae=12,we=Me&15):Me>=240&&Me<=247?(ae=18,we=Me&7):(ae=0,we=B),ae!==0&&!L(we,ae,te(ae,we))&&(ae=0,we=B)):(ae-=6,we=we<<6|Me&63),ae===0&&(we<=65535?me+=String.fromCharCode(we):(me+=String.fromCharCode(55296+(we-65535-1>>10)),me+=String.fromCharCode(56320+(we-65535-1&1023))))}return this.bitsNeeded=ae,this.codePoint=we,me};var b=function(){try{return new v().decode(new h().encode("test"),{stream:!0})==="test"}catch(C){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+C)}return!1};(v==null||h==null||!b())&&(v=g);var w=function(){};function R(C){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=C,this._sendTimeout=0,this._abort=w}R.prototype.open=function(C,L){this._abort(!0);var te=this,B=this._xhr,me=1,ae=0;this._abort=function(K){te._sendTimeout!==0&&(o(te._sendTimeout),te._sendTimeout=0),(me===1||me===2||me===3)&&(me=4,B.onload=w,B.onerror=w,B.onabort=w,B.onprogress=w,B.onreadystatechange=w,B.abort(),ae!==0&&(o(ae),ae=0),K||(te.readyState=4,te.onabort(null),te.onreadystatechange())),me=0};var we=function(){if(me===1){var K=0,Je="",it=void 0;if("contentType"in B)K=200,Je="OK",it=B.contentType;else try{K=B.status,Je=B.statusText,it=B.getResponseHeader("Content-Type")}catch{K=0,Je="",it=void 0}K!==0&&(me=2,te.readyState=2,te.status=K,te.statusText=Je,te._contentType=it,te.onreadystatechange())}},Qe=function(){if(we(),me===2||me===3){me=3;var K="";try{K=B.responseText}catch{}te.readyState=3,te.responseText=K,te.onprogress()}},Me=function(K,Je){if((Je==null||Je.preventDefault==null)&&(Je={preventDefault:w}),Qe(),me===1||me===2||me===3){if(me=4,ae!==0&&(o(ae),ae=0),te.readyState=4,K==="load")te.onload(Je);else if(K==="error")te.onerror(Je);else if(K==="abort")te.onabort(Je);else throw new TypeError;te.onreadystatechange()}},qe=function(K){B!=null&&(B.readyState===4?(!("onload"in B)||!("onerror"in B)||!("onabort"in B))&&Me(B.responseText===""?"error":"load",K):B.readyState===3?"onprogress"in B||Qe():B.readyState===2&&we())},Ve=function(){ae=n(function(){Ve()},500),B.readyState===3&&Qe()};"onload"in B&&(B.onload=function(K){Me("load",K)}),"onerror"in B&&(B.onerror=function(K){Me("error",K)}),"onabort"in B&&(B.onabort=function(K){Me("abort",K)}),"onprogress"in B&&(B.onprogress=Qe),"onreadystatechange"in B&&(B.onreadystatechange=function(K){qe(K)}),("contentType"in B||!("ontimeout"in a.prototype))&&(L+=(L.indexOf("?")===-1?"?":"&")+"padding=true"),B.open(C,L,!0),"readyState"in B&&(ae=n(function(){Ve()},0))},R.prototype.abort=function(){this._abort(!1)},R.prototype.getResponseHeader=function(C){return this._contentType},R.prototype.setRequestHeader=function(C,L){var te=this._xhr;"setRequestHeader"in te&&te.setRequestHeader(C,L)},R.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},R.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var C=this;C._sendTimeout=n(function(){C._sendTimeout=0,C.send()},4);return}var L=this._xhr;"withCredentials"in L&&(L.withCredentials=this.withCredentials);try{L.send(void 0)}catch(te){throw te}};function E(C){return C.replace(/[A-Z]/g,function(L){return String.fromCharCode(L.charCodeAt(0)+32)})}function x(C){for(var L=Object.create(null),te=C.split(`\r
921
- `),B=0;B<te.length;B+=1){var me=te[B],ae=me.split(": "),we=ae.shift(),Qe=ae.join(": ");L[E(we)]=Qe}this._map=L}x.prototype.get=function(C){return this._map[E(C)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function J(){}J.prototype.open=function(C,L,te,B,me,ae,we){C.open("GET",me);var Qe=0;C.onprogress=function(){var qe=C.responseText,Ve=qe.slice(Qe);Qe+=Ve.length,te(Ve)},C.onerror=function(qe){qe.preventDefault(),B(new Error("NetworkError"))},C.onload=function(){B(null)},C.onabort=function(){B(null)},C.onreadystatechange=function(){if(C.readyState===a.HEADERS_RECEIVED){var qe=C.status,Ve=C.statusText,K=C.getResponseHeader("Content-Type"),Je=C.getAllResponseHeaders();L(qe,Ve,K,new x(Je))}},C.withCredentials=ae;for(var Me in we)Object.prototype.hasOwnProperty.call(we,Me)&&C.setRequestHeader(Me,we[Me]);return C.send(),C};function M(C){this._headers=C}M.prototype.get=function(C){return this._headers.get(C)};function H(){}H.prototype.open=function(C,L,te,B,me,ae,we){var Qe=null,Me=new m,qe=Me.signal,Ve=new v;return d(me,{headers:we,credentials:ae?"include":"same-origin",signal:qe,cache:"no-store"}).then(function(K){return Qe=K.body.getReader(),L(K.status,K.statusText,K.headers.get("Content-Type"),new M(K.headers)),new u(function(Je,it){var be=function(){Qe.read().then(function(lt){if(lt.done)Je(void 0);else{var Tt=Ve.decode(lt.value,{stream:!0});te(Tt),be()}}).catch(function(lt){it(lt)})};be()})}).catch(function(K){if(K.name!=="AbortError")return K}).then(function(K){B(K)}),{abort:function(){Qe!=null&&Qe.cancel(),Me.abort()}}};function z(){this._listeners=Object.create(null)}function F(C){n(function(){throw C},0)}z.prototype.dispatchEvent=function(C){C.target=this;var L=this._listeners[C.type];if(L!=null)for(var te=L.length,B=0;B<te;B+=1){var me=L[B];try{typeof me.handleEvent=="function"?me.handleEvent(C):me.call(this,C)}catch(ae){F(ae)}}},z.prototype.addEventListener=function(C,L){C=String(C);var te=this._listeners,B=te[C];B==null&&(B=[],te[C]=B);for(var me=!1,ae=0;ae<B.length;ae+=1)B[ae]===L&&(me=!0);me||B.push(L)},z.prototype.removeEventListener=function(C,L){C=String(C);var te=this._listeners,B=te[C];if(B!=null){for(var me=[],ae=0;ae<B.length;ae+=1)B[ae]!==L&&me.push(B[ae]);me.length===0?delete te[C]:te[C]=me}};function oe(C){this.type=C,this.target=void 0}function xe(C,L){oe.call(this,C),this.data=L.data,this.lastEventId=L.lastEventId}xe.prototype=Object.create(oe.prototype);function I(C,L){oe.call(this,C),this.status=L.status,this.statusText=L.statusText,this.headers=L.headers}I.prototype=Object.create(oe.prototype);function Le(C,L){oe.call(this,C),this.error=L.error}Le.prototype=Object.create(oe.prototype);var re=-1,X=0,$=1,G=2,de=-1,ue=0,fe=1,je=2,Ze=3,dt=/^text\/event\-stream(;.*)?$/i,he=1e3,Ee=18e6,Z=function(C,L){var te=C==null?L:parseInt(C,10);return te!==te&&(te=L),rt(te)},rt=function(C){return Math.min(Math.max(C,he),Ee)},_t=function(C,L,te){try{typeof L=="function"&&L.call(C,te)}catch(B){F(B)}};function kt(C,L){z.call(this),L=L||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ft(this,C,L)}function $t(){return a!=null&&"withCredentials"in a.prototype||i==null?new a:new i}var Rr=d!=null&&f!=null&&"body"in f.prototype;function ft(C,L,te){L=String(L);var B=!!te.withCredentials,me=te.lastEventIdQueryParameterName||"lastEventId",ae=rt(1e3),we=Z(te.heartbeatTimeout,45e3),Qe="",Me=ae,qe=!1,Ve=0,K=te.headers||{},Je=te.Transport,it=Rr&&Je==null?void 0:new R(Je!=null?new Je:$t()),be=Je!=null&&typeof Je!="string"?new Je:it==null?new H:new J,lt=void 0,Tt=0,or=re,An="",Uo="",Ir="",j="",ye=ue,yt=0,bt=0,ct=function(xt,St,Zt,Ut){if(or===X)if(xt===200&&Zt!=null&&dt.test(Zt)){or=$,qe=Date.now(),Me=ae,C.readyState=$;var Fe=new I("open",{status:xt,statusText:St,headers:Ut});C.dispatchEvent(Fe),_t(C,C.onopen,Fe)}else{var _e="";xt!==200?(St&&(St=St.replace(/\s+/g," ")),_e="EventSource's response has a status "+xt+" "+St+" that is not 200. Aborting the connection."):_e="EventSource's response has a Content-Type specifying an unsupported type: "+(Zt==null?"-":Zt.replace(/\s+/g," "))+". Aborting the connection.",ri();var Fe=new I("error",{status:xt,statusText:St,headers:Ut});C.dispatchEvent(Fe),_t(C,C.onerror,Fe),console.error(_e)}},At=function(xt){if(or===$){for(var St=-1,Zt=0;Zt<xt.length;Zt+=1){var Ut=xt.charCodeAt(Zt);(Ut===10||Ut===13)&&(St=Zt)}var Fe=(St!==-1?j:"")+xt.slice(0,St+1);j=(St===-1?j:"")+xt.slice(St+1),xt!==""&&(qe=Date.now(),Ve+=xt.length);for(var _e=0;_e<Fe.length;_e+=1){var Ut=Fe.charCodeAt(_e);if(ye===de&&Ut===10)ye=ue;else if(ye===de&&(ye=ue),Ut===13||Ut===10){if(ye!==ue){ye===fe&&(bt=_e+1);var Et=Fe.slice(yt,bt-1),Rt=Fe.slice(bt+(bt<_e&&Fe.charCodeAt(bt)===32?1:0),_e);Et==="data"?(An+=`
922
- `,An+=Rt):Et==="id"?Uo=Rt:Et==="event"?Ir=Rt:Et==="retry"?(ae=Z(Rt,ae),Me=ae):Et==="heartbeatTimeout"&&(we=Z(Rt,we),Tt!==0&&(o(Tt),Tt=n(function(){Vn()},we)))}if(ye===ue){if(An!==""){Qe=Uo,Ir===""&&(Ir="message");var ht=new xe(Ir,{data:An.slice(1),lastEventId:Uo});if(C.dispatchEvent(ht),Ir==="open"?_t(C,C.onopen,ht):Ir==="message"?_t(C,C.onmessage,ht):Ir==="error"&&_t(C,C.onerror,ht),or===G)return}An="",Ir=""}ye=Ut===13?de:ue}else ye===ue&&(yt=_e,ye=fe),ye===fe?Ut===58&&(bt=_e+1,ye=je):ye===je&&(ye=Ze)}}},Rn=function(xt){if(or===$||or===X){or=re,Tt!==0&&(o(Tt),Tt=0),Tt=n(function(){Vn()},Me),Me=rt(Math.min(ae*16,Me*2)),C.readyState=X;var St=new Le("error",{error:xt});C.dispatchEvent(St),_t(C,C.onerror,St),xt!=null&&console.error(xt)}},ri=function(){or=G,lt!=null&&(lt.abort(),lt=void 0),Tt!==0&&(o(Tt),Tt=0),C.readyState=G},Vn=function(){if(Tt=0,or!==re){if(!qe&&lt!=null)Rn(new Error("No activity within "+we+" milliseconds. "+(or===X?"No response received.":Ve+" chars received.")+" Reconnecting.")),lt!=null&&(lt.abort(),lt=void 0);else{var xt=Math.max((qe||Date.now())+we-Date.now(),1);qe=!1,Tt=n(function(){Vn()},xt)}return}qe=!1,Ve=0,Tt=n(function(){Vn()},we),or=X,An="",Ir="",Uo=Qe,j="",yt=0,bt=0,ye=ue;var St=L;if(L.slice(0,5)!=="data:"&&L.slice(0,5)!=="blob:"&&Qe!==""){var Zt=L.indexOf("?");St=Zt===-1?L:L.slice(0,Zt+1)+L.slice(Zt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rt,ht){return ht===me?"":Rt}),St+=(L.indexOf("?")===-1?"?":"&")+me+"="+encodeURIComponent(Qe)}var Ut=C.withCredentials,Fe={};Fe.Accept="text/event-stream";var _e=C.headers;if(_e!=null)for(var Et in _e)Object.prototype.hasOwnProperty.call(_e,Et)&&(Fe[Et]=_e[Et]);try{lt=be.open(it,ct,At,Rn,St,Ut,Fe)}catch(Rt){throw ri(),Rt}};C.url=L,C.readyState=X,C.withCredentials=B,C.headers=K,C._close=ri,Vn()}kt.prototype=Object.create(z.prototype),kt.prototype.CONNECTING=X,kt.prototype.OPEN=$,kt.prototype.CLOSED=G,kt.prototype.close=function(){this._close()},kt.CONNECTING=X,kt.OPEN=$,kt.CLOSED=G,kt.prototype.withCredentials=void 0;var Dt=l;a!=null&&(l==null||!("withCredentials"in l.prototype))&&(Dt=kt),function(C){{var L=C(e);L!==void 0&&(t.exports=L)}}(function(C){C.EventSourcePolyfill=kt,C.NativeEventSource=l,C.EventSource=Dt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Nl:globalThis)})(Hl,Hl.exports);var wd=Hl.exports;const _d=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!=null)),zv=t=>{try{return new URL(t).hostname}catch{return t}},Bv=t=>{let e=[],r=t.usedLinks.title??"";return r.includes(">")&&(e=r.split(">").map(n=>n.trim()),r=e.pop()??""),{url:t.usedLinks.url,title:t.usedLinks.title,referenceNumber:t.usedLinks.number,domainName:zv(t.usedLinks.url),breadcrumb:e,generated:{summary:t.usedLinks.description??t.usedLinks.summary??""}}},kd=(t,e)=>{const r=t.all.length,n=Bv(e);return n.referenceNumber=r+1,t.all.push(n),t},qv=wd.NativeEventSource||wd.EventSourcePolyfill;let xd;class jv{constructor({apiUrl:e,apiKey:r="X9hL4Gp5W2D7eRtF"}){q(this,"apiUrl");q(this,"apiKey");q(this,"lastRequestId");q(this,"idToQuestionsMap",new Map);q(this,"metadata");this.apiUrl=e,this.apiKey=r,this.metadata=this.getUserData(),xd=this}async getUserData(){var e;try{const r=nd.getItem("uID"),n=await this.fetchData("/log",{},{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({referrer:((e=globalThis==null?void 0:globalThis.document)==null?void 0:e.referrer)||null,uID:r})});if("maintenance"in n&&n.maintenance)return{mode:"maintenance"};if(!("id"in n))throw new Error("Invalid response format: missing user id");return nd.setItem("uID",n.id),{mode:"ready",userId:n.id,conversationId:n.cID}}catch(r){throw r instanceof Response?new Error(`Failed to initialize client: ${r.status} - ${await r.text()}`):new Error(`Failed to initialize client: ${r instanceof Error?r.message:"Unknown error"}`)}}static getInstance(){return xd}async postData(e,r,n){const o=await fetch(`${this.apiUrl}${e}`,{method:"POST",headers:{"Content-Type":"application/json","api-key":this.apiKey},body:JSON.stringify(r)});if(!o.ok){const a=await o.text();throw new Error(`${n}: ${o.status} - ${a}`)}return o}async fetchData(e,r={},n={}){const o=await fetch(`${this.apiUrl}${e}?${new URLSearchParams(_d(r)).toString()}`,{...n,headers:{...(n==null?void 0:n.headers)||{},"api-key":this.apiKey}});if(!o.ok){const a=await o.text();throw new Error(`API request failed: ${o.status} - ${a}`)}return o.json()}async fetchSSE(e,r={}){return new qv(`${this.apiUrl}${e}?${new URLSearchParams({..._d(r),key:this.apiKey}).toString()}`)}async quickFeedback(e){const r=e.messageId??this.lastRequestId,n={...e,rID:r,query:this.idToQuestionsMap.get(r)};return this.postData("/quickfeedback",n,"Got an error when trying to post quick feedback")}async feedback(e){try{const r=await this.metadata;if(r.mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const n=e.messageId??this.lastRequestId,o={body:e.body,email:e.email,rID:n,uID:r.userId,query:this.idToQuestionsMap.get(n)};return this.postData("/feedback",o,"Got an error when trying to post feedback")}catch(r){throw r instanceof Response?new Error(`Feedback submission failed: ${r.status} - ${await r.text()}`):new Error(`Feedback submission failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async getClassification(e={}){return(await this.fetchData("/chatconfig",e)).classification}async classification({impact:e,quality:r,messageId:n}){return this.postData("/classification",{impact:e,quality:r,rID:n??this.lastRequestId},"Got an error when trying to post feedback classification")}async getPredefinedQuestions(e){return(await this.fetchData("/topics/questions",e)).predefinedQuestions}async getChatConfig(){return this.fetchData("/chatconfig",{})}async getMenu(e){try{return(await this.getChatConfig()).menu[e.language]??[]}catch(r){throw new Error(`Failed to load menu: ${r instanceof Error?r.message:"Unknown error"}`)}}async getUsedLanguages(){try{const e=await this.getChatConfig();return Object.keys(e.menu)}catch(e){throw new Error(`Failed to load languages: ${e instanceof Error?e.message:"Unknown error"}`)}}async chatInternal(e,r={}){const n=await this.metadata;let o="";if(r.modes&&(o=`mode:${r.modes.join(",")} `),n.mode==="maintenance")throw new Error("Can not chat in maintenance mode");return this.fetchSSE("/assistant/sse",{query:o+e,uID:n.userId,cID:n.conversationId,lang:r.lang,model:r.model,chat:"true"})}chat(e,r={}){const n=qt({state:"loading"});let o=!0,a=!1;const i=new Date().toISOString();return this.chatInternal(e,r).then(s=>{let l;s.onmessage=c=>{const u=JSON.parse(c.data);"id"in u&&(this.lastRequestId=u.id,l=u.id,this.idToQuestionsMap.set(u.id,e)),"response"in u?u.response==="__CLR__"?o=!1:(u.response==="__THIS_IS_THE_ANSWER_END__"||u.response==="__THIS_IS_THE_END__")&&!a?(a=!0,n.update(d=>d.state!=="streaming"?(console.warn(`State transition: ${d.state} => done.`,"There is probably an issue with the message"),{payload:{id:l,type:"bot",time:new Date().toISOString(),sources:{all:[],used:[]},partial:!1,message:{markdown:"",html:""}},state:"done"}):{payload:{...d.payload,partial:!1},state:"done"})):o===!1&&a===!1&&n.update(d=>{if(d.state==="streaming"){const f=d.payload.message.markdown+u.response;return{state:"streaming",payload:{...d.payload,partial:!0,id:l,message:{markdown:f,html:yd(f,d.payload)}}}}if(d.state==="loading"){const f=u.response;return{state:"streaming",payload:{type:"bot",id:l,time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:f,html:yd(f,{type:"bot",id:l,time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:"",html:""}})}}}}else throw console.error("Invalid message state",d),new Error("Invalid message state")}):"usedLinks"in u&&n.update(d=>{var f;if(d.state==="loading")return{state:"streaming",payload:{type:"bot",id:l,time:i,partial:!0,message:{markdown:"",html:""},sources:kd({all:[],used:[]},u)}};if(d.state==="streaming")return{state:"streaming",payload:{...d.payload,id:l,partial:!0,sources:kd((f=d.payload)==null?void 0:f.sources,u)}};throw console.error("Invalid source state",d),new Error("Invalid source state")})},s.onerror=()=>{s.close(),n.set({state:"error",errorMessage:"EventSource error"})}}).catch(s=>{console.error(s),n.set({state:"error",errorMessage:s.message})}),n}search(e,r={}){return this.metadata=this.getUserData(),this.chat(`prompt:SEARCH ${e}`,r)}transformURL(e){if(e.startsWith("file://")){const r=e.replace("file://",`${this.apiUrl}/files/`),n=new URL(r);return n.searchParams.append("key",this.apiKey),n.toString()}return e}}let Sd,Td;function Ed(t){if(typeof document>"u")return;clearTimeout(Sd),clearTimeout(Td);const e=document.createElement("style"),r=document.createTextNode(`* {
887
+ */(function(t,e){(function(r){var n=r.setTimeout,o=r.clearTimeout,a=r.XMLHttpRequest,i=r.XDomainRequest,s=r.ActiveXObject,c=r.EventSource,l=r.document,u=r.Promise,f=r.fetch,d=r.Response,m=r.TextDecoder,h=r.TextEncoder,v=r.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(T){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(T){function j(){}return j.prototype=T,new j}),Date.now||(Date.now=function(){return new Date().getTime()}),v==null){var y=f;f=function(T,j){var H=j.signal;return y(T,{headers:j.headers,credentials:j.credentials,cache:j.cache}).then(function(q){var de=q.body.getReader();return H._reader=de,H._aborted&&H._reader.cancel(),{status:q.status,statusText:q.statusText,headers:q.headers,body:{getReader:function(){return de}}}})},v=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function g(){this.bitsNeeded=0,this.codePoint=0}g.prototype.decode=function(T){function j(qe,Ke,we){if(we===1)return qe>=128>>Ke&&qe<<Ke<=2047;if(we===2)return qe>=2048>>Ke&&qe<<Ke<=55295||qe>=57344>>Ke&&qe<<Ke<=65535;if(we===3)return qe>=65536>>Ke&&qe<<Ke<=1114111;throw new Error}function H(qe,Ke){if(qe===6)return Ke>>6>15?3:Ke>31?2:1;if(qe===12)return Ke>15?3:2;if(qe===18)return 3;throw new Error}for(var q=65533,de="",ue=this.bitsNeeded,ke=this.codePoint,We=0;We<T.length;We+=1){var Re=T[We];ue!==0&&(Re<128||Re>191||!j(ke<<6|Re&63,ue-6,H(ue,ke)))&&(ue=0,ke=q,de+=String.fromCharCode(ke)),ue===0?(Re>=0&&Re<=127?(ue=0,ke=Re):Re>=192&&Re<=223?(ue=6,ke=Re&31):Re>=224&&Re<=239?(ue=12,ke=Re&15):Re>=240&&Re<=247?(ue=18,ke=Re&7):(ue=0,ke=q),ue!==0&&!j(ke,ue,H(ue,ke))&&(ue=0,ke=q)):(ue-=6,ke=ke<<6|Re&63),ue===0&&(ke<=65535?de+=String.fromCharCode(ke):(de+=String.fromCharCode(55296+(ke-65535-1>>10)),de+=String.fromCharCode(56320+(ke-65535-1&1023))))}return this.bitsNeeded=ue,this.codePoint=ke,de};var w=function(){try{return new m().decode(new h().encode("test"),{stream:!0})==="test"}catch(T){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+T)}return!1};(m==null||h==null||!w())&&(m=g);var b=function(){};function S(T){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=T,this._sendTimeout=0,this._abort=b}S.prototype.open=function(T,j){this._abort(!0);var H=this,q=this._xhr,de=1,ue=0;this._abort=function(we){H._sendTimeout!==0&&(o(H._sendTimeout),H._sendTimeout=0),(de===1||de===2||de===3)&&(de=4,q.onload=b,q.onerror=b,q.onabort=b,q.onprogress=b,q.onreadystatechange=b,q.abort(),ue!==0&&(o(ue),ue=0),we||(H.readyState=4,H.onabort(null),H.onreadystatechange())),de=0};var ke=function(){if(de===1){var we=0,it="",Be=void 0;if("contentType"in q)we=200,it="OK",Be=q.contentType;else try{we=q.status,it=q.statusText,Be=q.getResponseHeader("Content-Type")}catch{we=0,it="",Be=void 0}we!==0&&(de=2,H.readyState=2,H.status=we,H.statusText=it,H._contentType=Be,H.onreadystatechange())}},We=function(){if(ke(),de===2||de===3){de=3;var we="";try{we=q.responseText}catch{}H.readyState=3,H.responseText=we,H.onprogress()}},Re=function(we,it){if((it==null||it.preventDefault==null)&&(it={preventDefault:b}),We(),de===1||de===2||de===3){if(de=4,ue!==0&&(o(ue),ue=0),H.readyState=4,we==="load")H.onload(it);else if(we==="error")H.onerror(it);else if(we==="abort")H.onabort(it);else throw new TypeError;H.onreadystatechange()}},qe=function(we){q!=null&&(q.readyState===4?(!("onload"in q)||!("onerror"in q)||!("onabort"in q))&&Re(q.responseText===""?"error":"load",we):q.readyState===3?"onprogress"in q||We():q.readyState===2&&ke())},Ke=function(){ue=n(function(){Ke()},500),q.readyState===3&&We()};"onload"in q&&(q.onload=function(we){Re("load",we)}),"onerror"in q&&(q.onerror=function(we){Re("error",we)}),"onabort"in q&&(q.onabort=function(we){Re("abort",we)}),"onprogress"in q&&(q.onprogress=We),"onreadystatechange"in q&&(q.onreadystatechange=function(we){qe(we)}),("contentType"in q||!("ontimeout"in a.prototype))&&(j+=(j.indexOf("?")===-1?"?":"&")+"padding=true"),q.open(T,j,!0),"readyState"in q&&(ue=n(function(){Ke()},0))},S.prototype.abort=function(){this._abort(!1)},S.prototype.getResponseHeader=function(T){return this._contentType},S.prototype.setRequestHeader=function(T,j){var H=this._xhr;"setRequestHeader"in H&&H.setRequestHeader(T,j)},S.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},S.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var T=this;T._sendTimeout=n(function(){T._sendTimeout=0,T.send()},4);return}var j=this._xhr;"withCredentials"in j&&(j.withCredentials=this.withCredentials);try{j.send(void 0)}catch(H){throw H}};function E(T){return T.replace(/[A-Z]/g,function(j){return String.fromCharCode(j.charCodeAt(0)+32)})}function P(T){for(var j=Object.create(null),H=T.split(`\r
888
+ `),q=0;q<H.length;q+=1){var de=H[q],ue=de.split(": "),ke=ue.shift(),We=ue.join(": ");j[E(ke)]=We}this._map=j}P.prototype.get=function(T){return this._map[E(T)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function F(){}F.prototype.open=function(T,j,H,q,de,ue,ke){T.open("GET",de);var We=0;T.onprogress=function(){var qe=T.responseText,Ke=qe.slice(We);We+=Ke.length,H(Ke)},T.onerror=function(qe){qe.preventDefault(),q(new Error("NetworkError"))},T.onload=function(){q(null)},T.onabort=function(){q(null)},T.onreadystatechange=function(){if(T.readyState===a.HEADERS_RECEIVED){var qe=T.status,Ke=T.statusText,we=T.getResponseHeader("Content-Type"),it=T.getAllResponseHeaders();j(qe,Ke,we,new P(it))}},T.withCredentials=ue;for(var Re in ke)Object.prototype.hasOwnProperty.call(ke,Re)&&T.setRequestHeader(Re,ke[Re]);return T.send(),T};function O(T){this._headers=T}O.prototype.get=function(T){return this._headers.get(T)};function $(){}$.prototype.open=function(T,j,H,q,de,ue,ke){var We=null,Re=new v,qe=Re.signal,Ke=new m;return f(de,{headers:ke,credentials:ue?"include":"same-origin",signal:qe,cache:"no-store"}).then(function(we){return We=we.body.getReader(),j(we.status,we.statusText,we.headers.get("Content-Type"),new O(we.headers)),new u(function(it,Be){var yr=function(){We.read().then(function(fe){if(fe.done)it(void 0);else{var at=Ke.decode(fe.value,{stream:!0});H(at),yr()}}).catch(function(fe){Be(fe)})};yr()})}).catch(function(we){if(we.name!=="AbortError")return we}).then(function(we){q(we)}),{abort:function(){We!=null&&We.cancel(),Re.abort()}}};function J(){this._listeners=Object.create(null)}function ae(T){n(function(){throw T},0)}J.prototype.dispatchEvent=function(T){T.target=this;var j=this._listeners[T.type];if(j!=null)for(var H=j.length,q=0;q<H;q+=1){var de=j[q];try{typeof de.handleEvent=="function"?de.handleEvent(T):de.call(this,T)}catch(ue){ae(ue)}}},J.prototype.addEventListener=function(T,j){T=String(T);var H=this._listeners,q=H[T];q==null&&(q=[],H[T]=q);for(var de=!1,ue=0;ue<q.length;ue+=1)q[ue]===j&&(de=!0);de||q.push(j)},J.prototype.removeEventListener=function(T,j){T=String(T);var H=this._listeners,q=H[T];if(q!=null){for(var de=[],ue=0;ue<q.length;ue+=1)q[ue]!==j&&de.push(q[ue]);de.length===0?delete H[T]:H[T]=de}};function B(T){this.type=T,this.target=void 0}function X(T,j){B.call(this,T),this.data=j.data,this.lastEventId=j.lastEventId}X.prototype=Object.create(B.prototype);function ie(T,j){B.call(this,T),this.status=j.status,this.statusText=j.statusText,this.headers=j.headers}ie.prototype=Object.create(B.prototype);function I(T,j){B.call(this,T),this.error=j.error}I.prototype=Object.create(B.prototype);var pe=-1,xe=0,Y=1,V=2,re=-1,ee=0,ye=1,Se=2,_e=3,$e=/^text\/event\-stream(;.*)?$/i,et=1e3,bt=18e6,rt=function(T,j){var H=T==null?j:parseInt(T,10);return H!==H&&(H=j),se(H)},se=function(T){return Math.min(Math.max(T,et),bt)},M=function(T,j,H){try{typeof j=="function"&&j.call(T,H)}catch(q){ae(q)}};function Te(T,j){J.call(this),j=j||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ir(this,T,j)}function Dt(){return a!=null&&"withCredentials"in a.prototype||i==null?new a:new i}var Rt=f!=null&&d!=null&&"body"in d.prototype;function ir(T,j,H){j=String(j);var q=!!H.withCredentials,de=H.lastEventIdQueryParameterName||"lastEventId",ue=se(1e3),ke=rt(H.heartbeatTimeout,45e3),We="",Re=ue,qe=!1,Ke=0,we=H.headers||{},it=H.Transport,Be=Rt&&it==null?void 0:new S(it!=null?new it:Dt()),yr=it!=null&&typeof it!="string"?new it:Be==null?new $:new F,fe=void 0,at=0,dt=pe,Qr="",Go="",Pr="",Vo="",It=ee,Z=0,Ne=0,st=function(kt,yt,Mt,Gt){if(dt===xe)if(kt===200&&Mt!=null&&$e.test(Mt)){dt=Y,qe=Date.now(),Re=ue,T.readyState=Y;var Ot=new ie("open",{status:kt,statusText:yt,headers:Gt});T.dispatchEvent(Ot),M(T,T.onopen,Ot)}else{var St="";kt!==200?(yt&&(yt=yt.replace(/\s+/g," ")),St="EventSource's response has a status "+kt+" "+yt+" that is not 200. Aborting the connection."):St="EventSource's response has a Content-Type specifying an unsupported type: "+(Mt==null?"-":Mt.replace(/\s+/g," "))+". Aborting the connection.",Ht();var Ot=new ie("error",{status:kt,statusText:yt,headers:Gt});T.dispatchEvent(Ot),M(T,T.onerror,Ot),console.error(St)}},ft=function(kt){if(dt===Y){for(var yt=-1,Mt=0;Mt<kt.length;Mt+=1){var Gt=kt.charCodeAt(Mt);(Gt===10||Gt===13)&&(yt=Mt)}var Ot=(yt!==-1?Vo:"")+kt.slice(0,yt+1);Vo=(yt===-1?Vo:"")+kt.slice(yt+1),kt!==""&&(qe=Date.now(),Ke+=kt.length);for(var St=0;St<Ot.length;St+=1){var Gt=Ot.charCodeAt(St);if(It===re&&Gt===10)It=ee;else if(It===re&&(It=ee),Gt===13||Gt===10){if(It!==ee){It===ye&&(Ne=St+1);var nt=Ot.slice(Z,Ne-1),Fe=Ot.slice(Ne+(Ne<St&&Ot.charCodeAt(Ne)===32?1:0),St);nt==="data"?(Qr+=`
889
+ `,Qr+=Fe):nt==="id"?Go=Fe:nt==="event"?Pr=Fe:nt==="retry"?(ue=rt(Fe,ue),Re=ue):nt==="heartbeatTimeout"&&(ke=rt(Fe,ke),at!==0&&(o(at),at=n(function(){Pn()},ke)))}if(It===ee){if(Qr!==""){We=Go,Pr===""&&(Pr="message");var Nt=new X(Pr,{data:Qr.slice(1),lastEventId:Go});if(T.dispatchEvent(Nt),Pr==="open"?M(T,T.onopen,Nt):Pr==="message"?M(T,T.onmessage,Nt):Pr==="error"&&M(T,T.onerror,Nt),dt===V)return}Qr="",Pr=""}It=Gt===13?re:ee}else It===ee&&(Z=St,It=ye),It===ye?Gt===58&&(Ne=St+1,It=Se):It===Se&&(It=_e)}}},ht=function(kt){if(dt===Y||dt===xe){dt=pe,at!==0&&(o(at),at=0),at=n(function(){Pn()},Re),Re=se(Math.min(ue*16,Re*2)),T.readyState=xe;var yt=new I("error",{error:kt});T.dispatchEvent(yt),M(T,T.onerror,yt),kt!=null&&console.error(kt)}},Ht=function(){dt=V,fe!=null&&(fe.abort(),fe=void 0),at!==0&&(o(at),at=0),T.readyState=V},Pn=function(){if(at=0,dt!==pe){if(!qe&&fe!=null)ht(new Error("No activity within "+ke+" milliseconds. "+(dt===xe?"No response received.":Ke+" chars received.")+" Reconnecting.")),fe!=null&&(fe.abort(),fe=void 0);else{var kt=Math.max((qe||Date.now())+ke-Date.now(),1);qe=!1,at=n(function(){Pn()},kt)}return}qe=!1,Ke=0,at=n(function(){Pn()},ke),dt=xe,Qr="",Pr="",Go=We,Vo="",Z=0,Ne=0,It=ee;var yt=j;if(j.slice(0,5)!=="data:"&&j.slice(0,5)!=="blob:"&&We!==""){var Mt=j.indexOf("?");yt=Mt===-1?j:j.slice(0,Mt+1)+j.slice(Mt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Fe,Nt){return Nt===de?"":Fe}),yt+=(j.indexOf("?")===-1?"?":"&")+de+"="+encodeURIComponent(We)}var Gt=T.withCredentials,Ot={};Ot.Accept="text/event-stream";var St=T.headers;if(St!=null)for(var nt in St)Object.prototype.hasOwnProperty.call(St,nt)&&(Ot[nt]=St[nt]);try{fe=yr.open(Be,st,ft,ht,yt,Gt,Ot)}catch(Fe){throw Ht(),Fe}};T.url=j,T.readyState=xe,T.withCredentials=q,T.headers=we,T._close=Ht,Pn()}Te.prototype=Object.create(J.prototype),Te.prototype.CONNECTING=xe,Te.prototype.OPEN=Y,Te.prototype.CLOSED=V,Te.prototype.close=function(){this._close()},Te.CONNECTING=xe,Te.OPEN=Y,Te.CLOSED=V,Te.prototype.withCredentials=void 0;var Yr=c;a!=null&&(c==null||!("withCredentials"in c.prototype))&&(Yr=Te),function(T){{var j=T(e);j!==void 0&&(t.exports=j)}}(function(T){T.EventSourcePolyfill=Te,T.NativeEventSource=c,T.EventSource=Yr})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:$l:globalThis)})(ec,ec.exports);var Fd=ec.exports;const Ld=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!=null)),d0=t=>{try{return new URL(t).hostname}catch{return t}},f0=t=>{let e=[],r=t.usedLinks.title??"";return r.includes(">")&&(e=r.split(">").map(n=>n.trim()),r=e.pop()??""),{url:t.usedLinks.url,title:t.usedLinks.title,referenceNumber:t.usedLinks.number,domainName:d0(t.usedLinks.url),breadcrumb:e,generated:{summary:t.usedLinks.description??t.usedLinks.summary??""}}},Dd=(t,e)=>{const r=t.all.length,n=f0(e);return n.referenceNumber=r+1,t.all.push(n),t},h0=Fd.NativeEventSource||Fd.EventSourcePolyfill;let Md;class p0{constructor({apiUrl:e,apiKey:r="X9hL4Gp5W2D7eRtF",strict:n}){z(this,"apiUrl");z(this,"apiKey");z(this,"strict");z(this,"lastRequestId");z(this,"idToQuestionsMap",new Map);z(this,"metadata");this.apiUrl=e,this.apiKey=r,this.strict=n??!1,this.metadata=this.getUserData(),Md=this}async getUserData(){var e;try{const r=hd.getItem("uID"),n=await this.fetchData("/log",u0,{},{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({referrer:((e=globalThis==null?void 0:globalThis.document)==null?void 0:e.referrer)||null,uID:r})});if("maintenance"in n&&n.maintenance)return{mode:"maintenance"};if(!("id"in n))throw new Error("Invalid response format: missing user id");return hd.setItem("uID",n.id),{mode:"ready",userId:n.id,conversationId:n.cID}}catch(r){throw r instanceof Response?new Error(`Failed to initialize client: ${r.status} - ${await r.text()}`):new Error(`Failed to initialize client: ${r instanceof Error?r.message:"Unknown error"}`)}}static getInstance(){return Md}async postData(e,r,n){const o=await fetch(`${this.apiUrl}${e}`,{method:"POST",headers:{"Content-Type":"application/json","api-key":this.apiKey},body:JSON.stringify(r)});if(!o.ok){const a=await o.text();throw new Error(`${n}: ${o.status} - ${a}`)}return o}async fetchData(e,r,n={},o={}){const a=`${this.apiUrl}${e}?${new URLSearchParams(Ld(n)).toString()}`,i={...o,headers:{...(o==null?void 0:o.headers)||{},"api-key":this.apiKey}},s=await fetch(a,i);if(!s.ok){const d=await s.text();throw new Error(`API request failed: ${s.status} - ${d}`)}const c=await s.json(),{success:l,data:u,error:f}=r.safeParse(c);if(this.strict){if(!l)throw console.error(`Server response has wrong type:
890
+ `,{error:f,url:a,opts:i,data:c}),new Error(`Server response has wrong type: ${f.message}`);return u}else return l||console.warn(`Server response has wrong type:
891
+ `,{error:f,url:a,opts:i,data:c}),c}async fetchSSE(e,r={}){return new h0(`${this.apiUrl}${e}?${new URLSearchParams({...Ld(r),key:this.apiKey}).toString()}`)}async quickFeedback(e){const r=e.messageId??this.lastRequestId,n={...e,rID:r,query:this.idToQuestionsMap.get(r)};return this.postData("/quickfeedback",n,"Got an error when trying to post quick feedback")}async feedback(e){try{const r=await this.metadata;if(r.mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const n=e.messageId??this.lastRequestId,o={body:e.body,email:e.email,rID:n,uID:r.userId,query:this.idToQuestionsMap.get(n)};return this.postData("/feedback",o,"Got an error when trying to post feedback")}catch(r){throw r instanceof Response?new Error(`Feedback submission failed: ${r.status} - ${await r.text()}`):new Error(`Feedback submission failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async getClassification(e={}){return(await this.fetchData("/chatconfig",a0,e)).classification}async classification({impact:e,quality:r,messageId:n}){return this.postData("/classification",{impact:e,quality:r,rID:n??this.lastRequestId},"Got an error when trying to post feedback classification")}async getPredefinedQuestions(e){return(await this.fetchData("/topics/questions",c0,e)).predefinedQuestions}async getChatConfig(){return this.fetchData("/chatconfig",s0)}async getMenu(e){var r;try{return((r=(await this.getChatConfig()).menu)==null?void 0:r[e.language])??[]}catch(n){throw new Error(`Failed to load menu: ${n instanceof Error?n.message:"Unknown error"}`)}}async getUsedLanguages(){try{const e=await this.getChatConfig();return Object.keys(e.menu??{})}catch(e){throw new Error(`Failed to load languages: ${e instanceof Error?e.message:"Unknown error"}`)}}async chatInternal(e,r={}){const n=await this.metadata;let o="";if(r.modes&&(o=`mode:${r.modes.join(",")} `),n.mode==="maintenance")throw new Error("Can not chat in maintenance mode");return this.fetchSSE("/assistant/sse",{query:o+e,uID:n.userId,cID:n.conversationId,lang:r.lang,model:r.model,chat:"true"})}chat(e,r={}){const n=jt({state:"loading"});let o=!0,a=!1;const i=new Date().toISOString();return this.chatInternal(e,r).then(s=>{let c;s.onmessage=l=>{const u=JSON.parse(l.data);"id"in u&&(this.lastRequestId=u.id,c=u.id,this.idToQuestionsMap.set(u.id,e)),"response"in u?u.response==="__CLR__"?o=!1:(u.response==="__THIS_IS_THE_ANSWER_END__"||u.response==="__THIS_IS_THE_END__")&&!a?(a=!0,n.update(f=>f.state!=="streaming"?(console.warn(`State transition: ${f.state} => done.`,"There is probably an issue with the message"),{payload:{id:c,type:"bot",time:new Date().toISOString(),sources:{all:[],used:[]},partial:!1,message:{markdown:"",html:""}},state:"done"}):{payload:{...f.payload,partial:!1},state:"done"})):o===!1&&a===!1&&n.update(f=>{if(f.state==="streaming"){const d=f.payload.message.markdown+u.response;return{state:"streaming",payload:{...f.payload,partial:!0,id:c,message:{markdown:d,html:Od(d,f.payload)}}}}if(f.state==="loading"){const d=u.response;return{state:"streaming",payload:{type:"bot",id:c,time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:d,html:Od(d,{sources:{all:[],used:[]}})}}}}else throw console.error("Invalid message state",f),new Error("Invalid message state")}):"usedLinks"in u&&n.update(f=>{var d;if(f.state==="loading")return{state:"streaming",payload:{type:"bot",id:c,time:i,partial:!0,message:{markdown:"",html:""},sources:Dd({all:[],used:[]},u)}};if(f.state==="streaming")return{state:"streaming",payload:{...f.payload,id:c,partial:!0,sources:Dd((d=f.payload)==null?void 0:d.sources,u)}};throw console.error("Invalid source state",f),new Error("Invalid source state")})},s.onerror=()=>{s.close(),n.set({state:"error",errorMessage:"EventSource error"})}}).catch(s=>{console.error(s),n.set({state:"error",errorMessage:s.message})}),n}search(e,r={}){return this.metadata=this.getUserData(),this.chat(`prompt:SEARCH ${e}`,r)}transformURL(e){if(e.startsWith("file://")){const r=e.replace("file://",`${this.apiUrl}/files/`),n=new URL(r);return n.searchParams.append("key",this.apiKey),n.toString()}return e}}let Bd,zd;function $d(t){if(typeof document>"u")return;clearTimeout(Bd),clearTimeout(zd);const e=document.createElement("style"),r=document.createTextNode(`* {
923
892
  -webkit-transition: none !important;
924
893
  -moz-transition: none !important;
925
894
  -o-transition: none !important;
926
895
  -ms-transition: none !important;
927
896
  transition: none !important;
928
- }`);e.appendChild(r);const n=()=>document.head.appendChild(e),o=()=>document.head.removeChild(e);if(typeof window.getComputedStyle<"u"){n(),t(),window.getComputedStyle(e).opacity,o();return}if(typeof window.requestAnimationFrame<"u"){n(),t(),window.requestAnimationFrame(o);return}n(),Sd=window.setTimeout(()=>{t(),Td=window.setTimeout(o,120)},120)}function Cd(t){return t.filter(e=>e.length>0)}const Ad={getItem:t=>null,setItem:(t,e)=>{}},kn=typeof document<"u",$v=["dark","light","system"],Vl=qt("mode-watcher-mode"),Gl=qt("mode-watcher-theme"),Rd=Uv(),Wl=Vv(),Id=qt(void 0),Od=Hv(),Kl=qt(!0),Nd=qt([]),Pd=qt([]),Ld=Gv(),Zv=Wv();function Uv(){const t="system",e=kn?localStorage:Ad,r=e.getItem(o());let n=Yl(r)?r:t;function o(){return ka(Vl)}const{subscribe:a,set:i}=qt(n,()=>{if(!kn)return;const l=c=>{if(c.key!==o())return;const u=c.newValue;Yl(u)?i(n=u):i(n=t)};return addEventListener("storage",l),()=>removeEventListener("storage",l)});function s(l){i(n=l),e.setItem(o(),n)}return{subscribe:a,set:s}}function Hv(){const t=kn?localStorage:Ad,e=t.getItem(n());let r=e??"";function n(){return ka(Gl)}const{subscribe:o,set:a}=qt(r,()=>{if(!kn)return;const s=l=>{if(l.key!==n())return;const c=l.newValue;a(c===null?r="":r=c)};return addEventListener("storage",s),()=>removeEventListener("storage",s)});function i(s){a(r=s),t.setItem(n(),r)}return{subscribe:o,set:i}}function Vv(){let e=!0;const{subscribe:r,set:n}=qt(void 0,()=>{if(!kn)return;const i=l=>{e&&n(l.matches?"light":"dark")},s=window.matchMedia("(prefers-color-scheme: light)");return s.addEventListener("change",i),()=>s.removeEventListener("change",i)});function o(){if(!kn)return;const i=window.matchMedia("(prefers-color-scheme: light)");n(i.matches?"light":"dark")}function a(i){e=i}return{subscribe:r,query:o,tracking:a}}function Gv(){const{subscribe:t}=Qu([Rd,Wl,Id,Kl,Nd,Pd],([e,r,n,o,a,i])=>{if(!kn)return;const s=e==="system"?r:e,l=Cd(a),c=Cd(i);function u(){const d=document.documentElement,f=document.querySelector('meta[name="theme-color"]');s==="light"?(l.length&&d.classList.remove(...l),c.length&&d.classList.add(...c),d.style.colorScheme="light",f&&n&&f.setAttribute("content",n.light)):(c.length&&d.classList.remove(...c),l.length&&d.classList.add(...l),d.style.colorScheme="dark",f&&n&&f.setAttribute("content",n.dark))}return o?Ed(u):u(),s});return{subscribe:t}}function Wv(){const{subscribe:t}=Qu([Od,Kl],([e,r])=>{if(!kn)return;function n(){document.documentElement.setAttribute("data-theme",e)}return r?Ed(n):n(),e});return{subscribe:t}}function Yl(t){return typeof t!="string"?!1:$v.includes(t)}function Kv(t){Rd.set(t)}function Yv(t){Od.set(t)}function Gw(t){return t}function Qv({defaultMode:t="system",themeColors:e,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:o="",modeStorageKey:a="mode-watcher-mode",themeStorageKey:i="mode-watcher-theme"}){const s=document.documentElement,l=localStorage.getItem(a)||t,c=localStorage.getItem(i)||o,u=l==="light"||l==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(u?(r.length&&s.classList.remove(...r),n.length&&s.classList.add(...n)):(n.length&&s.classList.remove(...n),r.length&&s.classList.add(...r)),s.style.colorScheme=u?"light":"dark",e){const d=document.querySelector('meta[name="theme-color"]');d&&d.setAttribute("content",l==="light"?e.light:e.dark)}c&&(s.setAttribute("data-theme",c),localStorage.setItem(i,c)),localStorage.setItem(a,l)}rp();var Jv=Y('<meta name="theme-color">');function Md(t,e){Ae(e,!1);let r=k(e,"themeColors",28,()=>{});ho();var n=ne(),o=V(n);{var a=i=>{var s=Jv();se(()=>ke(s,"content",r().dark)),T(i,s)};ce(o,i=>{r()&&i(a)})}return T(t,n),Re({get themeColors(){return r()},set themeColors(i){r(i),_()}})}Oe(Md,{themeColors:{}},[],[],!0);var Xv=Y('<meta name="theme-color">'),eb=Y("<!> <!>",1);function Dd(t,e){Ae(e,!1);let r=k(e,"trueNonce",12,""),n=k(e,"initConfig",12),o=k(e,"themeColors",28,()=>{});return ho(),yu(a=>{var i=eb(),s=V(i);{var l=u=>{var d=Xv();se(()=>ke(d,"content",o().dark)),T(u,d)};ce(s,u=>{o()&&u(l)})}var c=ie(s,2);fo(c,()=>`<script${r()?` nonce=${r()}`:""}>(`+Qv.toString()+")("+JSON.stringify(n())+");<\/script>",!1,!1),T(a,i)}),Re({get trueNonce(){return r()},set trueNonce(a){r(a),_()},get initConfig(){return n()},set initConfig(a){n(a),_()},get themeColors(){return o()},set themeColors(a){o(a),_()}})}Oe(Dd,{trueNonce:{},initConfig:{},themeColors:{}},[],[],!0);function tb(t,e){Ae(e,!1);const r=Yt(),n=()=>mt(Vl,"$modeStorageKeyStore",r),o=()=>mt(Gl,"$themeStorageKeyStore",r),a=We();let i=k(e,"track",12,!0),s=k(e,"defaultMode",12,"system"),l=k(e,"themeColors",28,()=>{}),c=k(e,"disableTransitions",12,!0),u=k(e,"darkClassNames",28,()=>["dark"]),d=k(e,"lightClassNames",28,()=>[]),f=k(e,"defaultTheme",12,""),v=k(e,"nonce",12,""),h=k(e,"themeStorageKey",12,"mode-watcher-theme"),m=k(e,"modeStorageKey",12,"mode-watcher-mode"),y=k(e,"disableHeadScriptInjection",12,!1);_i(()=>{const x=Ld.subscribe(()=>{}),J=Zv.subscribe(()=>{});Wl.tracking(i()),Wl.query();const M=localStorage.getItem(n());Kv(Yl(M)?M:s());const H=localStorage.getItem(o());return Yv(H||f()),()=>{x(),J()}});const g={defaultMode:s(),themeColors:l(),darkClassNames:u(),lightClassNames:d(),defaultTheme:f(),modeStorageKey:m(),themeStorageKey:h()};$e(()=>Ue(c()),()=>{Kl.set(c())}),$e(()=>Ue(l()),()=>{Id.set(l())}),$e(()=>Ue(u()),()=>{Nd.set(u())}),$e(()=>Ue(d()),()=>{Pd.set(d())}),$e(()=>Ue(m()),()=>{Vl.set(m())}),$e(()=>Ue(h()),()=>{Gl.set(h())}),$e(()=>Ue(v()),()=>{A(a,typeof window>"u"?v():"")}),Ys(),ho();var b=ne(),w=V(b);{var R=x=>{Md(x,{get themeColors(){return l()}})},E=x=>{Dd(x,{get trueNonce(){return p(a)},initConfig:g,get themeColors(){return l()}})};ce(w,x=>{y()?x(R):x(E,!1)})}return T(t,b),Re({get track(){return i()},set track(x){i(x),_()},get defaultMode(){return s()},set defaultMode(x){s(x),_()},get themeColors(){return l()},set themeColors(x){l(x),_()},get disableTransitions(){return c()},set disableTransitions(x){c(x),_()},get darkClassNames(){return u()},set darkClassNames(x){u(x),_()},get lightClassNames(){return d()},set lightClassNames(x){d(x),_()},get defaultTheme(){return f()},set defaultTheme(x){f(x),_()},get nonce(){return v()},set nonce(x){v(x),_()},get themeStorageKey(){return h()},set themeStorageKey(x){h(x),_()},get modeStorageKey(){return m()},set modeStorageKey(x){m(x),_()},get disableHeadScriptInjection(){return y()},set disableHeadScriptInjection(x){y(x),_()}})}Oe(tb,{track:{},defaultMode:{},themeColors:{},disableTransitions:{},darkClassNames:{},lightClassNames:{},defaultTheme:{},nonce:{},themeStorageKey:{},modeStorageKey:{},disableHeadScriptInjection:{}},[],[],!0);var rb=bi('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),nb=bi('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),ob=bi('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),ab=bi('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function Ra(t,e){Ae(e,!1);let r=k(e,"type",12,"success");var n=ne(),o=V(n);{var a=s=>{var l=rb();T(s,l)},i=s=>{var l=ne(),c=V(l);{var u=f=>{var v=nb();T(f,v)},d=f=>{var v=ne(),h=V(v);{var m=g=>{var b=ob();T(g,b)},y=g=>{var b=ne(),w=V(b);{var R=x=>{var J=ab();T(x,J)},E=x=>{};ce(w,x=>{r()==="warning"?x(R):x(E,!1)},!0)}T(g,b)};ce(h,g=>{r()==="info"?g(m):g(y,!1)},!0)}T(f,v)};ce(c,f=>{r()==="error"?f(u):f(d,!1)},!0)}T(s,l)};ce(o,s=>{r()==="success"?s(a):s(i,!1)})}return T(t,n),Re({get type(){return r()},set type(s){r(s),_()}})}Oe(Ra,{type:{}},[],[],!0);var ib=Y('<div class="sonner-loading-bar"></div>'),sb=Y('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Fd(t,e){Ae(e,!1);let r=k(e,"visible",12);const n=Array(12).fill(0);ho();var o=sb(),a=P(o);return wr(a,5,()=>n,Mr,(i,s)=>{var l=ib();T(i,l)}),O(a),O(o),se(()=>ke(o,"data-visible",r())),T(t,o),Re({get visible(){return r()},set visible(i){r(i),_()}})}Oe(Fd,{visible:{}},[],[],!0);function To(...t){return t.filter(Boolean).join(" ")}const zd=typeof document<"u";function Bd(t){const e=qt(t);function r(o){zd&&e.set(o)}function n(o){zd&&e.update(o)}return{subscribe:e.subscribe,set:r,update:n}}let qd=0;function lb(){const t=Bd([]),e=Bd([]);function r(g){t.update(b=>[g,...b])}function n(g){var H;const{message:b,...w}=g,R=typeof(g==null?void 0:g.id)=="number"||g.id&&((H=g.id)==null?void 0:H.length)>0?g.id:qd++,E=g.dismissable===void 0?!0:g.dismissable,x=g.type===void 0?"default":g.type;return ka(t).find(z=>z.id===R)?t.update(z=>z.map(F=>F.id===R?{...F,...g,id:R,title:b,dismissable:E,type:x,updated:!0}:{...F,updated:!1})):r({...w,id:R,title:b,dismissable:E,type:x}),R}function o(g){if(g===void 0){t.update(b=>b.map(w=>({...w,dismiss:!0})));return}return t.update(b=>b.map(w=>w.id===g?{...w,dismiss:!0}:w)),g}function a(g){if(g===void 0){t.set([]);return}return t.update(b=>b.filter(w=>w.id!==g)),g}function i(g,b){return n({...b,type:"default",message:g})}function s(g,b){return n({...b,type:"error",message:g})}function l(g,b){return n({...b,type:"success",message:g})}function c(g,b){return n({...b,type:"info",message:g})}function u(g,b){return n({...b,type:"warning",message:g})}function d(g,b){return n({...b,type:"loading",message:g})}function f(g,b){if(!b)return;let w;b.loading!==void 0&&(w=n({...b,promise:g,type:"loading",message:b.loading}));const R=g instanceof Promise?g:g();let E=w!==void 0;return R.then(x=>{if(x&&typeof x.ok=="boolean"&&!x.ok){E=!1;const J=typeof b.error=="function"?b.error(`HTTP error! status: ${x.status}`):b.error;n({id:w,type:"error",message:J})}else if(b.success!==void 0){E=!1;const J=typeof b.success=="function"?b.success(x):b.success;n({id:w,type:"success",message:J})}}).catch(x=>{if(b.error!==void 0){E=!1;const J=typeof b.error=="function"?b.error(x):b.error;n({id:w,type:"error",message:J})}}).finally(()=>{var x;E&&(o(w),w=void 0),(x=b.finally)==null||x.call(b)}),w}function v(g,b){const w=(b==null?void 0:b.id)||qd++;return n({component:g,id:w,...b}),w}function h(g){e.update(b=>b.filter(w=>w.toastId!==g))}function m(g){if(ka(e).find(w=>w.toastId===g.toastId)===void 0){e.update(w=>[g,...w]);return}e.update(w=>w.map(R=>R.toastId===g.toastId?g:R))}function y(){t.set([]),e.set([])}return{create:n,addToast:r,dismiss:o,remove:a,message:i,error:s,success:l,info:c,warning:u,loading:d,promise:f,custom:v,removeHeight:h,setHeight:m,reset:y,toasts:t,heights:e}}const dr=lb();function cb(t,e){return dr.create({message:t,...e})}const Zi=Object.assign(cb,{success:dr.success,info:dr.info,warning:dr.warning,error:dr.error,custom:dr.custom,message:dr.message,promise:dr.promise,dismiss:dr.dismiss,loading:dr.loading}),ub=t=>({subscribe:t});var db=Y('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'),fb=Y('<div data-icon=""><!> <!></div>'),hb=Y('<div data-title=""><!></div>'),pb=Y('<div data-description=""><!></div>'),gb=Y('<button data-button="" data-cancel=""> </button>'),mb=Y('<button data-button=""> </button>'),vb=Y('<!> <div data-content=""><!> <!></div> <!> <!>',1),bb=Y('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function jd(t,e){const r=wl(e,["children","$$slots","$$events","$$legacy","$$host"]);Ae(e,!1);const n=Yt(),o=()=>mt(z,"$heights",n),a=()=>mt(p(Ve),"$effect",n),i=()=>mt(H,"$toasts",n),s=We(void 0,!0),l=We(void 0,!0),c=We(void 0,!0),u=We(void 0,!0),d=We(void 0,!0),f=We(void 0,!0),v=We(void 0,!0),h=We(void 0,!0),m=We(void 0,!0),y=We(void 0,!0),g=We(void 0,!0),b=We(void 0,!0),w=4e3,R=14,E=20,x=200,J=.05,M={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:H,heights:z,removeHeight:F,setHeight:oe,remove:xe}=dr;let I=k(e,"toast",13),Le=k(e,"index",13),re=k(e,"expanded",13),X=k(e,"invert",13),$=k(e,"position",13),G=k(e,"visibleToasts",13),de=k(e,"expandByDefault",13),ue=k(e,"closeButton",13),fe=k(e,"interacting",13),je=k(e,"cancelButtonStyle",13,""),Ze=k(e,"actionButtonStyle",13,""),dt=k(e,"duration",13,4e3),he=k(e,"descriptionClass",13,""),Ee=k(e,"classes",29,()=>({})),Z=k(e,"unstyled",13,!1),rt=We(!1,!0),_t=We(!1,!0),kt=We(!1,!0),$t=We(!1,!0),Rr=We(0,!0),ft=We(0,!0),Dt=We(void 0,!0),C=We(0,!0),L=0,te=0,B=null;async function me(){if(!p(rt))return;await rl();let j;re()||de()?j=1:j=1-Le()*J,p(Dt).style.setProperty("height","auto");const ye=p(Dt).offsetHeight,yt=p(Dt).getBoundingClientRect().height,bt=Math.round((yt/j+Number.EPSILON)*100)/100;p(Dt).style.removeProperty("height");let ct;Math.abs(bt-ye)<1?ct=bt:ct=ye,A(ft,ct),oe({toastId:I().id,height:ct})}function ae(){A(_t,!0),A(Rr,p(C)),F(I().id),setTimeout(()=>{xe(I().id)},x)}let we=We(void 0,!0),Qe=We(I().duration||dt()||w,!0);function Me(){if(te<L){const j=new Date().getTime()-L;A(Qe,p(Qe)-j)}te=new Date().getTime()}function qe(){L=new Date().getTime(),A(we,setTimeout(()=>{var j,ye;(ye=(j=I()).onAutoClose)==null||ye.call(j,I()),ae()},p(Qe)))}let Ve=We(void 0,!0);_i(()=>{A(rt,!0);const j=p(Dt).getBoundingClientRect().height;return A(ft,j),oe({toastId:I().id,height:j}),()=>F(I().id)});function K(j){if(p(g))return;A(Rr,p(C));const ye=j.target;ye.setPointerCapture(j.pointerId),ye.tagName!=="BUTTON"&&(A(kt,!0),B={x:j.clientX,y:j.clientY})}function Je(){var ye,yt,bt;if(p($t))return;B=null;const j=Number(((ye=p(Dt))==null?void 0:ye.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(j)>=E){A(Rr,p(C)),(bt=(yt=I()).onDismiss)==null||bt.call(yt,I()),ae(),A($t,!0);return}p(Dt).style.setProperty("--swipe-amount","0px"),A(kt,!1)}function it(j){if(!B)return;const ye=j.clientY-B.y,yt=j.clientX-B.x,ct=(p(m)[0]==="top"?Math.min:Math.max)(0,ye),At=j.pointerType==="touch"?10:2;Math.abs(ct)>At?p(Dt).style.setProperty("--swipe-amount",`${ye}px`):Math.abs(yt)>At&&(B=null)}$e(()=>Ue(Ee()),()=>{Ee({...M,...Ee()})}),$e(()=>Ue(Le()),()=>{A(s,Le()===0)}),$e(()=>(Ue(Le()),Ue(G())),()=>{A(l,Le()+1<=G())}),$e(()=>Ue(I()),()=>{A(c,I().title)}),$e(()=>Ue(I()),()=>{A(u,I().description)}),$e(()=>Ue(I()),()=>{A(d,I().type)}),$e(()=>Ue(I()),()=>{A(f,I().class||"")}),$e(()=>Ue(I()),()=>{A(v,I().descriptionClass||"")}),$e(()=>(o(),Ue(I())),()=>{A(h,o().findIndex(j=>j.toastId===I().id)||0)}),$e(()=>Ue($()),()=>{A(m,$().split("-"))}),$e(()=>(o(),p(h)),()=>{A(y,o().reduce((j,ye,yt)=>yt>=p(h)?j:j+ye.height,0))}),$e(()=>(Ue(X()),Ue(I())),()=>{X(I().invert||X())}),$e(()=>p(d),()=>{A(g,p(d)==="loading")}),$e(()=>(p(h),p(y)),()=>{A(C,Math.round(p(h)*R+p(y)))}),$e(()=>(p(c),p(u)),()=>{p(c),p(u),me()}),$e(()=>(Ue(I()),p(we),Ue(dt())),()=>{I().updated&&(clearTimeout(p(we)),A(Qe,I().duration||dt()||w),qe())}),$e(()=>(Ue(I()),p(d)),()=>{A(b,I().promise&&p(d)==="loading"||I().duration===Number.POSITIVE_INFINITY)}),$e(()=>(p(b),Ue(re()),Ue(fe()),p(we)),()=>{jp(A(Ve,ub(()=>(p(b)||(re()||fe()?Me():qe()),()=>clearTimeout(p(we))))),"$effect",n)}),$e(()=>a(),()=>{a()}),$e(()=>Ue(I()),()=>{I().delete&&ae()}),Ys(),ho(!0);var be=bb();ke(be,"tabindex",0);const lt=Nt(()=>{var j,ye,yt,bt,ct,At;return To(r.class,p(f),(j=Ee())==null?void 0:j.toast,(yt=(ye=I())==null?void 0:ye.classes)==null?void 0:yt.toast,(bt=Ee())==null?void 0:bt[p(d)],(At=(ct=I())==null?void 0:ct.classes)==null?void 0:At[p(d)])});se(()=>ke(be,"data-promise",!!I().promise)),se(()=>ke(be,"data-expanded",!!(re()||de()&&p(rt))));var Tt=P(be);{var or=j=>{var ye=db(),yt=Te(()=>p(g)?void 0:()=>{var ct,At;ae(),(At=(ct=I()).onDismiss)==null||At.call(ct,I())});const bt=Nt(()=>{var ct,At,Rn;return To((ct=Ee())==null?void 0:ct.closeButton,(Rn=(At=I())==null?void 0:At.classes)==null?void 0:Rn.closeButton)});se(()=>{ke(ye,"data-disabled",p(g)),en(ye,p(bt))}),st("click",ye,function(...ct){var At;(At=p(yt))==null||At.apply(this,ct)}),T(j,ye)};ce(Tt,j=>{ue()&&!I().component&&j(or)})}var An=ie(Tt,2);{var Uo=j=>{var ye=ne(),yt=V(ye);Wt(yt,()=>I().component,(bt,ct)=>{ct(bt,vn(()=>I().componentProps,{$$events:{closeToast:ae}}))}),T(j,ye)},Ir=j=>{var ye=vb(),yt=V(ye);{var bt=Fe=>{var _e=fb(),Et=P(_e);{var Rt=nt=>{var Ht=ne(),fn=V(Ht);_r(fn,e,"loading-icon",{},null),T(nt,Ht)};ce(Et,nt=>{(I().promise||p(d)==="loading")&&!I().icon&&nt(Rt)})}var ht=ie(Et,2);{var Qt=nt=>{var Ht=ne(),fn=V(Ht);Wt(fn,()=>I().icon,(Gn,_c)=>{_c(Gn,{})}),T(nt,Ht)},ot=nt=>{var Ht=ne(),fn=V(Ht);{var Gn=Ho=>{var ni=ne(),kc=V(ni);_r(kc,e,"success-icon",{},null),T(Ho,ni)},_c=Ho=>{var ni=ne(),kc=V(ni);{var kw=Vo=>{var oi=ne(),xc=V(oi);_r(xc,e,"error-icon",{},null),T(Vo,oi)},xw=Vo=>{var oi=ne(),xc=V(oi);{var Sw=Go=>{var ai=ne(),Sc=V(ai);_r(Sc,e,"warning-icon",{},null),T(Go,ai)},Tw=Go=>{var ai=ne(),Sc=V(ai);{var Ew=Tc=>{var gh=ne(),Cw=V(gh);_r(Cw,e,"info-icon",{},null),T(Tc,gh)};ce(Sc,Tc=>{p(d)==="info"&&Tc(Ew)},!0)}T(Go,ai)};ce(xc,Go=>{p(d)==="warning"?Go(Sw):Go(Tw,!1)},!0)}T(Vo,oi)};ce(kc,Vo=>{p(d)==="error"?Vo(kw):Vo(xw,!1)},!0)}T(Ho,ni)};ce(fn,Ho=>{p(d)==="success"?Ho(Gn):Ho(_c,!1)},!0)}T(nt,Ht)};ce(ht,nt=>{I().icon?nt(Qt):nt(ot,!1)})}O(_e),T(Fe,_e)};ce(yt,Fe=>{(p(d)!=="default"||I().icon||I().promise)&&Fe(bt)})}var ct=ie(yt,2),At=P(ct);{var Rn=Fe=>{var _e=hb();const Et=Nt(()=>{var ot,nt,Ht;return To((ot=Ee())==null?void 0:ot.title,(Ht=(nt=I())==null?void 0:nt.classes)==null?void 0:Ht.title)});var Rt=P(_e);{var ht=ot=>{var nt=ne(),Ht=V(nt);Wt(Ht,()=>I().title,(fn,Gn)=>{Gn(fn,vn(()=>I().componentProps))}),T(ot,nt)},Qt=ot=>{var nt=co();se(()=>He(nt,I().title)),T(ot,nt)};ce(Rt,ot=>{typeof I().title!="string"?ot(ht):ot(Qt,!1)})}O(_e),se(()=>en(_e,p(Et))),T(Fe,_e)};ce(At,Fe=>{I().title&&Fe(Rn)})}var ri=ie(At,2);{var Vn=Fe=>{var _e=pb();const Et=Nt(()=>{var ot,nt;return To(he(),p(v),(ot=Ee())==null?void 0:ot.description,(nt=I().classes)==null?void 0:nt.description)});var Rt=P(_e);{var ht=ot=>{var nt=ne(),Ht=V(nt);Wt(Ht,()=>I().description,(fn,Gn)=>{Gn(fn,vn(()=>I().componentProps))}),T(ot,nt)},Qt=ot=>{var nt=co();se(()=>He(nt,I().description)),T(ot,nt)};ce(Rt,ot=>{typeof I().description!="string"?ot(ht):ot(Qt,!1)})}O(_e),se(()=>en(_e,p(Et))),T(Fe,_e)};ce(ri,Fe=>{I().description&&Fe(Vn)})}O(ct);var xt=ie(ct,2);{var St=Fe=>{var _e=gb();const Et=Nt(()=>{var ht,Qt,ot;return To((ht=Ee())==null?void 0:ht.cancelButton,(ot=(Qt=I())==null?void 0:Qt.classes)==null?void 0:ot.cancelButton)});var Rt=P(_e,!0);O(_e),se(()=>{ke(_e,"style",je()),en(_e,p(Et)),He(Rt,I().cancel.label)}),st("click",_e,()=>{var ht;ae(),(ht=I().cancel)!=null&&ht.onClick&&I().cancel.onClick()}),T(Fe,_e)};ce(xt,Fe=>{I().cancel&&Fe(St)})}var Zt=ie(xt,2);{var Ut=Fe=>{var _e=mb();const Et=Nt(()=>{var ht,Qt,ot;return To((ht=Ee())==null?void 0:ht.actionButton,(ot=(Qt=I())==null?void 0:Qt.classes)==null?void 0:ot.actionButton)});var Rt=P(_e,!0);O(_e),se(()=>{ke(_e,"style",Ze()),en(_e,p(Et)),He(Rt,I().action.label)}),st("click",_e,ht=>{var Qt;(Qt=I().action)==null||Qt.onClick(ht),!ht.defaultPrevented&&ae()}),T(Fe,_e)};ce(Zt,Fe=>{I().action&&Fe(Ut)})}T(j,ye)};ce(An,j=>{I().component?j(Uo):j(Ir,!1)})}return O(be),Br(be,j=>A(Dt,j),()=>p(Dt)),se(()=>{var j;ke(be,"aria-live",I().important?"assertive":"polite"),en(be,p(lt)),ke(be,"data-styled",!(I().component||(j=I())!=null&&j.unstyled||Z())),ke(be,"data-mounted",p(rt)),ke(be,"data-removed",p(_t)),ke(be,"data-visible",p(l)),ke(be,"data-y-position",p(m)[0]),ke(be,"data-x-position",p(m)[1]),ke(be,"data-index",Le()),ke(be,"data-front",p(s)),ke(be,"data-swiping",p(kt)),ke(be,"data-type",p(d)),ke(be,"data-invert",X()),ke(be,"data-swipe-out",p($t)),ke(be,"style",`${r.style} ${I().style}`),Fr(be,"--index",Le()),Fr(be,"--toasts-before",Le()),Fr(be,"--z-index",i().length-Le()),Fr(be,"--offset",`${p(_t)?p(Rr):p(C)}px`),Fr(be,"--initial-height",`${p(ft)}px`)}),st("pointerdown",be,K),st("pointerup",be,Je),st("pointermove",be,it),T(t,be),Re({get toast(){return I()},set toast(j){I(j),_()},get index(){return Le()},set index(j){Le(j),_()},get expanded(){return re()},set expanded(j){re(j),_()},get invert(){return X()},set invert(j){X(j),_()},get position(){return $()},set position(j){$(j),_()},get visibleToasts(){return G()},set visibleToasts(j){G(j),_()},get expandByDefault(){return de()},set expandByDefault(j){de(j),_()},get closeButton(){return ue()},set closeButton(j){ue(j),_()},get interacting(){return fe()},set interacting(j){fe(j),_()},get cancelButtonStyle(){return je()},set cancelButtonStyle(j){je(j),_()},get actionButtonStyle(){return Ze()},set actionButtonStyle(j){Ze(j),_()},get duration(){return dt()},set duration(j){dt(j),_()},get descriptionClass(){return he()},set descriptionClass(j){he(j),_()},get classes(){return Ee()},set classes(j){Ee(j),_()},get unstyled(){return Z()},set unstyled(j){Z(j),_()}})}Oe(jd,{toast:{},index:{},expanded:{},invert:{},position:{},visibleToasts:{},expandByDefault:{},closeButton:{},interacting:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},descriptionClass:{},classes:{},unstyled:{}},["loading-icon","success-icon","error-icon","warning-icon","info-icon"],[],!0);var yb=Y("<ol></ol>"),wb=Y('<section class="svelte-1fo5d1m"></section>');const _b={hash:"svelte-1fo5d1m",code:`:where(html[dir='ltr']),
897
+ }`);e.appendChild(r);const n=()=>document.head.appendChild(e),o=()=>document.head.removeChild(e);if(typeof window.getComputedStyle<"u"){n(),t(),window.getComputedStyle(e).opacity,o();return}if(typeof window.requestAnimationFrame<"u"){n(),t(),window.requestAnimationFrame(o);return}n(),Bd=window.setTimeout(()=>{t(),zd=window.setTimeout(o,120)},120)}function qd(t){return t.filter(e=>e.length>0)}const jd={getItem:t=>null,setItem:(t,e)=>{}},En=typeof document<"u",g0=["dark","light","system"],tc=jt("mode-watcher-mode"),rc=jt("mode-watcher-theme"),Zd=v0(),nc=y0(),Ud=jt(void 0),Hd=b0(),oc=jt(!0),Gd=jt([]),Vd=jt([]),Wd=w0(),m0=_0();function v0(){const t="system",e=En?localStorage:jd,r=e.getItem(o());let n=ac(r)?r:t;function o(){return mo(tc)}const{subscribe:a,set:i}=jt(n,()=>{if(!En)return;const c=l=>{if(l.key!==o())return;const u=l.newValue;ac(u)?i(n=u):i(n=t)};return addEventListener("storage",c),()=>removeEventListener("storage",c)});function s(c){i(n=c),e.setItem(o(),n)}return{subscribe:a,set:s}}function b0(){const t=En?localStorage:jd,e=t.getItem(n());let r=e??"";function n(){return mo(rc)}const{subscribe:o,set:a}=jt(r,()=>{if(!En)return;const s=c=>{if(c.key!==n())return;const l=c.newValue;a(l===null?r="":r=l)};return addEventListener("storage",s),()=>removeEventListener("storage",s)});function i(s){a(r=s),t.setItem(n(),r)}return{subscribe:o,set:i}}function y0(){let e=!0;const{subscribe:r,set:n}=jt(void 0,()=>{if(!En)return;const i=c=>{e&&n(c.matches?"light":"dark")},s=window.matchMedia("(prefers-color-scheme: light)");return s.addEventListener("change",i),()=>s.removeEventListener("change",i)});function o(){if(!En)return;const i=window.matchMedia("(prefers-color-scheme: light)");n(i.matches?"light":"dark")}function a(i){e=i}return{subscribe:r,query:o,tracking:a}}function w0(){const{subscribe:t}=qu([Zd,nc,Ud,oc,Gd,Vd],([e,r,n,o,a,i])=>{if(!En)return;const s=e==="system"?r:e,c=qd(a),l=qd(i);function u(){const f=document.documentElement,d=document.querySelector('meta[name="theme-color"]');s==="light"?(c.length&&f.classList.remove(...c),l.length&&f.classList.add(...l),f.style.colorScheme="light",d&&n&&d.setAttribute("content",n.light)):(l.length&&f.classList.remove(...l),c.length&&f.classList.add(...c),f.style.colorScheme="dark",d&&n&&d.setAttribute("content",n.dark))}return o?$d(u):u(),s});return{subscribe:t}}function _0(){const{subscribe:t}=qu([Hd,oc],([e,r])=>{if(!En)return;function n(){document.documentElement.setAttribute("data-theme",e)}return r?$d(n):n(),e});return{subscribe:t}}function ac(t){return typeof t!="string"?!1:g0.includes(t)}function k0(t){Zd.set(t)}function x0(t){Hd.set(t)}function w_(t){return t}function S0({defaultMode:t="system",themeColors:e,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:o="",modeStorageKey:a="mode-watcher-mode",themeStorageKey:i="mode-watcher-theme"}){const s=document.documentElement,c=localStorage.getItem(a)||t,l=localStorage.getItem(i)||o,u=c==="light"||c==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(u?(r.length&&s.classList.remove(...r),n.length&&s.classList.add(...n)):(n.length&&s.classList.remove(...n),r.length&&s.classList.add(...r)),s.style.colorScheme=u?"light":"dark",e){const f=document.querySelector('meta[name="theme-color"]');f&&f.setAttribute("content",c==="light"?e.light:e.dark)}l&&(s.setAttribute("data-theme",l),localStorage.setItem(i,l)),localStorage.setItem(a,c)}pp();var T0=W('<meta name="theme-color">');function Kd(t,e){Ee(e,!1);let r=k(e,"themeColors",28,()=>{});po();var n=he(),o=te(n);{var a=i=>{var s=T0();le(()=>Pe(s,"content",r().dark)),C(i,s)};ce(o,i=>{r()&&i(a)})}return C(t,n),Ae({get themeColors(){return r()},set themeColors(i){r(i),_()}})}Ie(Kd,{themeColors:{}},[],[],!0);var C0=W('<meta name="theme-color">'),E0=W("<!> <!>",1);function Yd(t,e){Ee(e,!1);let r=k(e,"trueNonce",12,""),n=k(e,"initConfig",12),o=k(e,"themeColors",28,()=>{});return po(),ku(a=>{var i=E0(),s=te(i);{var c=u=>{var f=C0();le(()=>Pe(f,"content",o().dark)),C(u,f)};ce(s,u=>{o()&&u(c)})}var l=ne(s,2);fo(l,()=>`<script${r()?` nonce=${r()}`:""}>(`+S0.toString()+")("+JSON.stringify(n())+");<\/script>"),C(a,i)}),Ae({get trueNonce(){return r()},set trueNonce(a){r(a),_()},get initConfig(){return n()},set initConfig(a){n(a),_()},get themeColors(){return o()},set themeColors(a){o(a),_()}})}Ie(Yd,{trueNonce:{},initConfig:{},themeColors:{}},[],[],!0);function A0(t,e){Ee(e,!1);const[r,n]=Jt(),o=()=>gt(tc,"$modeStorageKeyStore",r),a=()=>gt(rc,"$themeStorageKeyStore",r),i=Le();let s=k(e,"track",12,!0),c=k(e,"defaultMode",12,"system"),l=k(e,"themeColors",28,()=>{}),u=k(e,"disableTransitions",12,!0),f=k(e,"darkClassNames",28,()=>["dark"]),d=k(e,"lightClassNames",28,()=>[]),m=k(e,"defaultTheme",12,""),h=k(e,"nonce",12,""),v=k(e,"themeStorageKey",12,"mode-watcher-theme"),y=k(e,"modeStorageKey",12,"mode-watcher-mode"),g=k(e,"disableHeadScriptInjection",12,!1);Ai(()=>{const O=Wd.subscribe(()=>{}),$=m0.subscribe(()=>{});nc.tracking(s()),nc.query();const J=localStorage.getItem(o());k0(ac(J)?J:c());const ae=localStorage.getItem(a());return x0(ae||m()),()=>{O(),$()}});const w={defaultMode:c(),themeColors:l(),darkClassNames:f(),lightClassNames:d(),defaultTheme:m(),modeStorageKey:y(),themeStorageKey:v()};Ze(()=>Ge(u()),()=>{oc.set(u())}),Ze(()=>Ge(l()),()=>{Ud.set(l())}),Ze(()=>Ge(f()),()=>{Gd.set(f())}),Ze(()=>Ge(d()),()=>{Vd.set(d())}),Ze(()=>Ge(y()),()=>{tc.set(y())}),Ze(()=>Ge(v()),()=>{rc.set(v())}),Ze(()=>Ge(h()),()=>{A(i,typeof window>"u"?h():"")}),il(),po();var b=he(),S=te(b);{var E=O=>{Kd(O,{get themeColors(){return l()}})},P=O=>{Yd(O,{get trueNonce(){return p(i)},initConfig:w,get themeColors(){return l()}})};ce(S,O=>{g()?O(E):O(P,!1)})}C(t,b);var F=Ae({get track(){return s()},set track(O){s(O),_()},get defaultMode(){return c()},set defaultMode(O){c(O),_()},get themeColors(){return l()},set themeColors(O){l(O),_()},get disableTransitions(){return u()},set disableTransitions(O){u(O),_()},get darkClassNames(){return f()},set darkClassNames(O){f(O),_()},get lightClassNames(){return d()},set lightClassNames(O){d(O),_()},get defaultTheme(){return m()},set defaultTheme(O){m(O),_()},get nonce(){return h()},set nonce(O){h(O),_()},get themeStorageKey(){return v()},set themeStorageKey(O){v(O),_()},get modeStorageKey(){return y()},set modeStorageKey(O){y(O),_()},get disableHeadScriptInjection(){return g()},set disableHeadScriptInjection(O){g(O),_()}});return n(),F}Ie(A0,{track:{},defaultMode:{},themeColors:{},disableTransitions:{},darkClassNames:{},lightClassNames:{},defaultTheme:{},nonce:{},themeStorageKey:{},modeStorageKey:{},disableHeadScriptInjection:{}},[],[],!0);var R0=Si('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),I0=Si('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),O0=Si('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),N0=Si('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function Na(t,e){Ee(e,!1);let r=k(e,"type",12,"success");var n=he(),o=te(n);{var a=s=>{var c=R0();C(s,c)},i=(s,c)=>{{var l=f=>{var d=I0();C(f,d)},u=(f,d)=>{{var m=v=>{var y=O0();C(v,y)},h=(v,y)=>{{var g=b=>{var S=N0();C(b,S)},w=b=>{};ce(v,b=>{r()==="warning"?b(g):b(w,!1)},y)}};ce(f,v=>{r()==="info"?v(m):v(h,!1)},d)}};ce(s,f=>{r()==="error"?f(l):f(u,!1)},c)}};ce(o,s=>{r()==="success"?s(a):s(i,!1)})}return C(t,n),Ae({get type(){return r()},set type(s){r(s),_()}})}Ie(Na,{type:{}},[],[],!0);var P0=W('<div class="sonner-loading-bar"></div>'),F0=W('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Qd(t,e){Ee(e,!1);let r=k(e,"visible",12);const n=Array(12).fill(0);po();var o=F0(),a=D(o);return Sr(a,5,()=>n,zr,(i,s)=>{var c=P0();C(i,c)}),N(a),N(o),le(()=>Pe(o,"data-visible",r())),C(t,o),Ae({get visible(){return r()},set visible(i){r(i),_()}})}Ie(Qd,{visible:{}},[],[],!0);function Eo(...t){return t.filter(Boolean).join(" ")}const Jd=typeof document<"u";function Xd(t){const e=jt(t);function r(o){Jd&&e.set(o)}function n(o){Jd&&e.update(o)}return{subscribe:e.subscribe,set:r,update:n}}let ef=0;function L0(){const t=Xd([]),e=Xd([]);function r(g){t.update(w=>[g,...w])}function n(g){var $;const{message:w,...b}=g,S=typeof(g==null?void 0:g.id)=="number"||g.id&&(($=g.id)==null?void 0:$.length)>0?g.id:ef++,E=g.dismissable===void 0?!0:g.dismissable,P=g.type===void 0?"default":g.type;return mo(t).find(J=>J.id===S)?t.update(J=>J.map(ae=>ae.id===S?{...ae,...g,id:S,title:w,dismissable:E,type:P,updated:!0}:{...ae,updated:!1})):r({...b,id:S,title:w,dismissable:E,type:P}),S}function o(g){if(g===void 0){t.update(w=>w.map(b=>({...b,dismiss:!0})));return}return t.update(w=>w.map(b=>b.id===g?{...b,dismiss:!0}:b)),g}function a(g){if(g===void 0){t.set([]);return}return t.update(w=>w.filter(b=>b.id!==g)),g}function i(g,w){return n({...w,type:"default",message:g})}function s(g,w){return n({...w,type:"error",message:g})}function c(g,w){return n({...w,type:"success",message:g})}function l(g,w){return n({...w,type:"info",message:g})}function u(g,w){return n({...w,type:"warning",message:g})}function f(g,w){return n({...w,type:"loading",message:g})}function d(g,w){if(!w)return;let b;w.loading!==void 0&&(b=n({...w,promise:g,type:"loading",message:w.loading}));const S=g instanceof Promise?g:g();let E=b!==void 0;return S.then(P=>{if(P&&typeof P.ok=="boolean"&&!P.ok){E=!1;const F=typeof w.error=="function"?w.error(`HTTP error! status: ${P.status}`):w.error;n({id:b,type:"error",message:F})}else if(w.success!==void 0){E=!1;const F=typeof w.success=="function"?w.success(P):w.success;n({id:b,type:"success",message:F})}}).catch(P=>{if(w.error!==void 0){E=!1;const F=typeof w.error=="function"?w.error(P):w.error;n({id:b,type:"error",message:F})}}).finally(()=>{var P;E&&(o(b),b=void 0),(P=w.finally)==null||P.call(w)}),b}function m(g,w){const b=(w==null?void 0:w.id)||ef++;return n({component:g,id:b,...w}),b}function h(g){e.update(w=>w.filter(b=>b.toastId!==g))}function v(g){if(mo(e).find(b=>b.toastId===g.toastId)===void 0){e.update(b=>[g,...b]);return}e.update(b=>b.map(S=>S.toastId===g.toastId?g:S))}function y(){t.set([]),e.set([])}return{create:n,addToast:r,dismiss:o,remove:a,message:i,error:s,success:c,info:l,warning:u,loading:f,promise:d,custom:m,removeHeight:h,setHeight:v,reset:y,toasts:t,heights:e}}const mr=L0();function D0(t,e){return mr.create({message:t,...e})}const Qi=Object.assign(D0,{success:mr.success,info:mr.info,warning:mr.warning,error:mr.error,custom:mr.custom,message:mr.message,promise:mr.promise,dismiss:mr.dismiss,loading:mr.loading}),M0=t=>({subscribe:t});var B0=W('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'),z0=W('<div data-icon=""><!> <!></div>'),$0=W('<div data-title=""><!></div>'),q0=W('<div data-description=""><!></div>'),j0=W('<button data-button="" data-cancel=""> </button>'),Z0=W('<button data-button=""> </button>'),U0=W('<!> <div data-content=""><!> <!></div> <!> <!>',1),H0=W('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function tf(t,e){const r=Rl(e,["children","$$slots","$$events","$$legacy","$$host"]);Ee(e,!1);const[n,o]=Jt(),a=()=>gt(ae,"$heights",n),i=()=>gt(p(we),"$effect",n),s=()=>gt(J,"$toasts",n),c=Le(void 0,!0),l=Le(void 0,!0),u=Le(void 0,!0),f=Le(void 0,!0),d=Le(void 0,!0),m=Le(void 0,!0),h=Le(void 0,!0),v=Le(void 0,!0),y=Le(void 0,!0),g=Le(void 0,!0),w=Le(void 0,!0),b=Le(void 0,!0),S=4e3,E=14,P=20,F=200,O=.05,$={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:J,heights:ae,removeHeight:B,setHeight:X,remove:ie}=mr;let I=k(e,"toast",13),pe=k(e,"index",13),xe=k(e,"expanded",13),Y=k(e,"invert",13),V=k(e,"position",13),re=k(e,"visibleToasts",13),ee=k(e,"expandByDefault",13),ye=k(e,"closeButton",13),Se=k(e,"interacting",13),_e=k(e,"cancelButtonStyle",13,""),$e=k(e,"actionButtonStyle",13,""),et=k(e,"duration",13,4e3),bt=k(e,"descriptionClass",13,""),rt=k(e,"classes",29,()=>({})),se=k(e,"unstyled",13,!1),M=Le(!1,!0),Te=Le(!1,!0),Dt=Le(!1,!0),Rt=Le(!1,!0),ir=Le(0,!0),Yr=Le(0,!0),T=Le(void 0,!0),j=Le(0,!0),H=0,q=0,de=null;async function ue(){if(!p(M))return;await nl();let Z;xe()||ee()?Z=1:Z=1-pe()*O,p(T).style.setProperty("height","auto");const Ne=p(T).offsetHeight,st=p(T).getBoundingClientRect().height,ft=Math.round((st/Z+Number.EPSILON)*100)/100;p(T).style.removeProperty("height");let ht;Math.abs(ft-Ne)<1?ht=ft:ht=Ne,A(Yr,ht),X({toastId:I().id,height:ht})}function ke(){A(Te,!0),A(ir,p(j)),B(I().id),setTimeout(()=>{ie(I().id)},F)}let We=Le(void 0,!0),Re=Le(I().duration||et()||S,!0);function qe(){if(q<H){const Z=new Date().getTime()-H;A(Re,p(Re)-Z)}q=new Date().getTime()}function Ke(){H=new Date().getTime(),A(We,setTimeout(()=>{var Z,Ne;(Ne=(Z=I()).onAutoClose)==null||Ne.call(Z,I()),ke()},p(Re)))}let we=Le(void 0,!0);Ai(()=>{A(M,!0);const Z=p(T).getBoundingClientRect().height;return A(Yr,Z),X({toastId:I().id,height:Z}),()=>B(I().id)});function it(Z){if(p(w))return;A(ir,p(j));const Ne=Z.target;Ne.setPointerCapture(Z.pointerId),Ne.tagName!=="BUTTON"&&(A(Dt,!0),de={x:Z.clientX,y:Z.clientY})}function Be(){var Ne,st,ft;if(p(Rt))return;de=null;const Z=Number(((Ne=p(T))==null?void 0:Ne.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(Z)>=P){A(ir,p(j)),(ft=(st=I()).onDismiss)==null||ft.call(st,I()),ke(),A(Rt,!0);return}p(T).style.setProperty("--swipe-amount","0px"),A(Dt,!1)}function yr(Z){if(!de)return;const Ne=Z.clientY-de.y,st=Z.clientX-de.x,ht=(p(y)[0]==="top"?Math.min:Math.max)(0,Ne),Ht=Z.pointerType==="touch"?10:2;Math.abs(ht)>Ht?p(T).style.setProperty("--swipe-amount",`${Ne}px`):Math.abs(st)>Ht&&(de=null)}Ze(()=>Ge(rt()),()=>{rt({...$,...rt()})}),Ze(()=>Ge(pe()),()=>{A(c,pe()===0)}),Ze(()=>(Ge(pe()),Ge(re())),()=>{A(l,pe()+1<=re())}),Ze(()=>Ge(I()),()=>{A(u,I().title)}),Ze(()=>Ge(I()),()=>{A(f,I().description)}),Ze(()=>Ge(I()),()=>{A(d,I().type)}),Ze(()=>Ge(I()),()=>{A(m,I().class||"")}),Ze(()=>Ge(I()),()=>{A(h,I().descriptionClass||"")}),Ze(()=>(a(),Ge(I())),()=>{A(v,a().findIndex(Z=>Z.toastId===I().id)||0)}),Ze(()=>Ge(V()),()=>{A(y,V().split("-"))}),Ze(()=>(a(),p(v)),()=>{A(g,a().reduce((Z,Ne,st)=>st>=p(v)?Z:Z+Ne.height,0))}),Ze(()=>(Ge(Y()),Ge(I())),()=>{Y(I().invert||Y())}),Ze(()=>p(d),()=>{A(w,p(d)==="loading")}),Ze(()=>(p(v),p(g)),()=>{A(j,Math.round(p(v)*E+p(g)))}),Ze(()=>(p(u),p(f)),()=>{p(u),p(f),ue()}),Ze(()=>(Ge(I()),p(We),Ge(et())),()=>{I().updated&&(clearTimeout(p(We)),A(Re,I().duration||et()||S),Ke())}),Ze(()=>(Ge(I()),p(d)),()=>{A(b,I().promise&&p(d)==="loading"||I().duration===Number.POSITIVE_INFINITY)}),Ze(()=>(p(b),Ge(xe()),Ge(Se()),p(We)),()=>{ig(A(we,M0(()=>(p(b)||(xe()||Se()?qe():Ke()),()=>clearTimeout(p(We))))),"$effect",n)}),Ze(()=>i(),()=>{i()}),Ze(()=>Ge(I()),()=>{I().delete&&ke()}),il(),po(!0);var fe=H0();Pe(fe,"tabindex",0);let at;var dt=D(fe);{var Qr=Z=>{var Ne=B0();le(st=>{Pe(Ne,"data-disabled",p(w)),At(Ne,1,st)},[()=>{var st,ft,ht;return _n(Eo((st=rt())==null?void 0:st.closeButton,(ht=(ft=I())==null?void 0:ft.classes)==null?void 0:ht.closeButton))}],_t),ct("click",Ne,function(...st){var ft;(ft=p(w)?void 0:()=>{var ht,Ht;ke(),(Ht=(ht=I()).onDismiss)==null||Ht.call(ht,I())})==null||ft.apply(this,st)}),C(Z,Ne)};ce(dt,Z=>{ye()&&!I().component&&Z(Qr)})}var Go=ne(dt,2);{var Pr=Z=>{var Ne=he(),st=te(Ne);Yt(st,()=>I().component,(ft,ht)=>{ht(ft,kn(()=>I().componentProps,{$$events:{closeToast:ke}}))}),C(Z,Ne)},Vo=Z=>{var Ne=U0(),st=te(Ne);{var ft=nt=>{var Fe=z0(),Nt=D(Fe);{var wt=Pt=>{var Fr=he(),bn=te(Fr);Tr(bn,e,"loading-icon",{},null),C(Pt,Fr)};ce(Nt,Pt=>{(I().promise||p(d)==="loading")&&!I().icon&&Pt(wt)})}var Xt=ne(Nt,2);{var Ye=Pt=>{var Fr=he(),bn=te(Fr);Yt(bn,()=>I().icon,(Ac,Fn)=>{Fn(Ac,{})}),C(Pt,Fr)},Tt=(Pt,Fr)=>{{var bn=Fn=>{var js=he(),Rc=te(js);Tr(Rc,e,"success-icon",{},null),C(Fn,js)},Ac=(Fn,js)=>{{var Rc=Wo=>{var Zs=he(),Ic=te(Zs);Tr(Ic,e,"error-icon",{},null),C(Wo,Zs)},K1=(Wo,Zs)=>{{var Ic=Ko=>{var Us=he(),Oc=te(Us);Tr(Oc,e,"warning-icon",{},null),C(Ko,Us)},Y1=(Ko,Us)=>{{var Oc=Nc=>{var Ih=he(),Q1=te(Ih);Tr(Q1,e,"info-icon",{},null),C(Nc,Ih)};ce(Ko,Nc=>{p(d)==="info"&&Nc(Oc)},Us)}};ce(Wo,Ko=>{p(d)==="warning"?Ko(Ic):Ko(Y1,!1)},Zs)}};ce(Fn,Wo=>{p(d)==="error"?Wo(Rc):Wo(K1,!1)},js)}};ce(Pt,Fn=>{p(d)==="success"?Fn(bn):Fn(Ac,!1)},Fr)}};ce(Xt,Pt=>{I().icon?Pt(Ye):Pt(Tt,!1)})}N(Fe),C(nt,Fe)};ce(st,nt=>{(p(d)!=="default"||I().icon||I().promise)&&nt(ft)})}var ht=ne(st,2),Ht=D(ht);{var Pn=nt=>{var Fe=$0(),Nt=D(Fe);{var wt=Ye=>{var Tt=he(),Pt=te(Tt);Yt(Pt,()=>I().title,(Fr,bn)=>{bn(Fr,kn(()=>I().componentProps))}),C(Ye,Tt)},Xt=Ye=>{var Tt=co();le(()=>Ve(Tt,I().title)),C(Ye,Tt)};ce(Nt,Ye=>{typeof I().title!="string"?Ye(wt):Ye(Xt,!1)})}N(Fe),le(Ye=>At(Fe,1,Ye),[()=>{var Ye,Tt,Pt;return _n(Eo((Ye=rt())==null?void 0:Ye.title,(Pt=(Tt=I())==null?void 0:Tt.classes)==null?void 0:Pt.title))}],_t),C(nt,Fe)};ce(Ht,nt=>{I().title&&nt(Pn)})}var kt=ne(Ht,2);{var yt=nt=>{var Fe=q0(),Nt=D(Fe);{var wt=Ye=>{var Tt=he(),Pt=te(Tt);Yt(Pt,()=>I().description,(Fr,bn)=>{bn(Fr,kn(()=>I().componentProps))}),C(Ye,Tt)},Xt=Ye=>{var Tt=co();le(()=>Ve(Tt,I().description)),C(Ye,Tt)};ce(Nt,Ye=>{typeof I().description!="string"?Ye(wt):Ye(Xt,!1)})}N(Fe),le(Ye=>At(Fe,1,Ye),[()=>{var Ye,Tt;return _n(Eo(bt(),p(h),(Ye=rt())==null?void 0:Ye.description,(Tt=I().classes)==null?void 0:Tt.description))}],_t),C(nt,Fe)};ce(kt,nt=>{I().description&&nt(yt)})}N(ht);var Mt=ne(ht,2);{var Gt=nt=>{var Fe=j0(),Nt=D(Fe,!0);N(Fe),le(wt=>{$n(Fe,_e()),At(Fe,1,wt),Ve(Nt,I().cancel.label)},[()=>{var wt,Xt,Ye;return _n(Eo((wt=rt())==null?void 0:wt.cancelButton,(Ye=(Xt=I())==null?void 0:Xt.classes)==null?void 0:Ye.cancelButton))}],_t),ct("click",Fe,()=>{var wt;ke(),(wt=I().cancel)!=null&&wt.onClick&&I().cancel.onClick()}),C(nt,Fe)};ce(Mt,nt=>{I().cancel&&nt(Gt)})}var Ot=ne(Mt,2);{var St=nt=>{var Fe=Z0(),Nt=D(Fe,!0);N(Fe),le(wt=>{$n(Fe,$e()),At(Fe,1,wt),Ve(Nt,I().action.label)},[()=>{var wt,Xt,Ye;return _n(Eo((wt=rt())==null?void 0:wt.actionButton,(Ye=(Xt=I())==null?void 0:Xt.classes)==null?void 0:Ye.actionButton))}],_t),ct("click",Fe,wt=>{var Xt;(Xt=I().action)==null||Xt.onClick(wt),!wt.defaultPrevented&&ke()}),C(nt,Fe)};ce(Ot,nt=>{I().action&&nt(St)})}C(Z,Ne)};ce(Go,Z=>{I().component?Z(Pr):Z(Vo,!1)})}N(fe),qr(fe,Z=>A(T,Z),()=>p(T)),le((Z,Ne,st)=>{var ft;Pe(fe,"aria-live",I().important?"assertive":"polite"),At(fe,1,Z),Pe(fe,"data-styled",!(I().component||(ft=I())!=null&&ft.unstyled||se())),Pe(fe,"data-mounted",p(M)),Pe(fe,"data-promise",Ne),Pe(fe,"data-removed",p(Te)),Pe(fe,"data-visible",p(l)),Pe(fe,"data-y-position",p(y)[0]),Pe(fe,"data-x-position",p(y)[1]),Pe(fe,"data-index",pe()),Pe(fe,"data-front",p(c)),Pe(fe,"data-swiping",p(Dt)),Pe(fe,"data-type",p(d)),Pe(fe,"data-invert",Y()),Pe(fe,"data-swipe-out",p(Rt)),Pe(fe,"data-expanded",st),at=$n(fe,`${r.style} ${I().style}`,at,{"--index":pe(),"--toasts-before":pe(),"--z-index":s().length-pe(),"--offset":`${p(Te)?p(ir):p(j)}px`,"--initial-height":`${p(Yr)}px`})},[()=>{var Z,Ne,st,ft,ht,Ht;return _n(Eo(r.class,p(m),(Z=rt())==null?void 0:Z.toast,(st=(Ne=I())==null?void 0:Ne.classes)==null?void 0:st.toast,(ft=rt())==null?void 0:ft[p(d)],(Ht=(ht=I())==null?void 0:ht.classes)==null?void 0:Ht[p(d)]))},()=>!!I().promise,()=>!!(xe()||ee()&&p(M))],_t),ct("pointerdown",fe,it),ct("pointerup",fe,Be),ct("pointermove",fe,yr),C(t,fe);var It=Ae({get toast(){return I()},set toast(Z){I(Z),_()},get index(){return pe()},set index(Z){pe(Z),_()},get expanded(){return xe()},set expanded(Z){xe(Z),_()},get invert(){return Y()},set invert(Z){Y(Z),_()},get position(){return V()},set position(Z){V(Z),_()},get visibleToasts(){return re()},set visibleToasts(Z){re(Z),_()},get expandByDefault(){return ee()},set expandByDefault(Z){ee(Z),_()},get closeButton(){return ye()},set closeButton(Z){ye(Z),_()},get interacting(){return Se()},set interacting(Z){Se(Z),_()},get cancelButtonStyle(){return _e()},set cancelButtonStyle(Z){_e(Z),_()},get actionButtonStyle(){return $e()},set actionButtonStyle(Z){$e(Z),_()},get duration(){return et()},set duration(Z){et(Z),_()},get descriptionClass(){return bt()},set descriptionClass(Z){bt(Z),_()},get classes(){return rt()},set classes(Z){rt(Z),_()},get unstyled(){return se()},set unstyled(Z){se(Z),_()}});return o(),It}Ie(tf,{toast:{},index:{},expanded:{},invert:{},position:{},visibleToasts:{},expandByDefault:{},closeButton:{},interacting:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},descriptionClass:{},classes:{},unstyled:{}},["loading-icon","success-icon","error-icon","warning-icon","info-icon"],[],!0);var G0=W("<ol></ol>"),V0=W('<section class="svelte-1fo5d1m"></section>');const W0={hash:"svelte-1fo5d1m",code:`:where(html[dir='ltr']),
929
898
  :where([data-sonner-toaster][dir='ltr']) {--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%);}:where(html[dir='rtl']),
930
899
  :where([data-sonner-toaster][dir='rtl']) {--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%);}:where([data-sonner-toaster]) {position:fixed;width:var(--width);font-family:ui-sans-serif,
931
900
  system-ui,
@@ -1057,15 +1026,15 @@ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An err
1057
1026
  .sonner-loading-bar {transition:none !important;
1058
1027
  animation: none !important;}
1059
1028
  }.sonner-loader {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);transform-origin:center;transition:opacity 200ms,
1060
- transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function $d(t,e){const r=wl(e,["children","$$slots","$$events","$$legacy","$$host"]),n=wl(r,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);Ae(e,!1),na(t,_b);const o=Yt(),a=()=>mt(I,"$toasts",o),i=()=>mt(Le,"$heights",o),s=We(),l=We(),c=3,u="32px",d=356,f=14,v="dark",h="light";function m(Z){return Z!=="system"?Z:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v:h}function y(){if(typeof window>"u"||typeof document>"u")return"ltr";const Z=document.documentElement.getAttribute("dir");return Z==="auto"||!Z?window.getComputedStyle(document.documentElement).direction:Z}let g=k(e,"invert",12,!1),b=k(e,"theme",12,"light"),w=k(e,"position",12,"bottom-right"),R=k(e,"hotkey",28,()=>["altKey","KeyT"]),E=k(e,"containerAriaLabel",12,"Notifications"),x=k(e,"richColors",12,!1),J=k(e,"expand",12,!1),M=k(e,"duration",12,4e3),H=k(e,"visibleToasts",12,c),z=k(e,"closeButton",12,!1),F=k(e,"toastOptions",28,()=>({})),oe=k(e,"offset",12,null),xe=k(e,"dir",28,y);const{toasts:I,heights:Le,reset:re}=dr;let X=We(!1),$=We(!1),G=We(m(b())),de=We(),ue=null,fe=!1;Bp(()=>{p(de)&&ue&&(ue.focus({preventScroll:!0}),ue=null,fe=!1)}),_i(()=>{re();const Z=rt=>{var kt,$t;R().every(Rr=>rt[Rr]||rt.code===Rr)&&(A(X,!0),(kt=p(de))==null||kt.focus()),rt.code==="Escape"&&(document.activeElement===p(de)||($t=p(de))!=null&&$t.contains(document.activeElement))&&A(X,!1)};return document.addEventListener("keydown",Z),()=>{document.removeEventListener("keydown",Z)}});function je(Z){fe&&!Z.currentTarget.contains(Z.relatedTarget)&&(fe=!1,ue&&(ue.focus({preventScroll:!0}),ue=null))}function Ze(Z){fe||(fe=!0,ue=Z.relatedTarget)}$e(()=>(Ue(w()),a()),()=>{A(s,Array.from(new Set([w(),...a().filter(Z=>Z.position).map(Z=>Z.position)].filter(Boolean))))}),$e(()=>Ue(R()),()=>{A(l,R().join("+").replace(/Key/g,"").replace(/Digit/g,""))}),$e(()=>a(),()=>{a().length<=1&&A(X,!1)}),$e(()=>a(),()=>{const Z=a().filter(rt=>rt.dismiss&&!rt.delete);if(Z.length>0){const rt=a().map(_t=>Z.find($t=>$t.id===_t.id)?{..._t,delete:!0}:_t);I.set(rt)}}),$e(()=>Ue(b()),()=>{if(b()!=="system"&&A(G,b()),typeof window<"u"){b()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A(G,v):A(G,h));const Z=window.matchMedia("(prefers-color-scheme: dark)"),rt=({matches:_t})=>{A(G,_t?v:h)};"addEventListener"in Z?Z.addEventListener("change",rt):Z.addListener(rt)}}),Ys(),ho();var dt=ne(),he=V(dt);{var Ee=Z=>{var rt=wb();ke(rt,"tabindex",-1),wr(rt,5,()=>p(s),Mr,(kt,$t,Rr)=>{var ft=yb();let Dt;wr(ft,7,()=>a().filter(L=>!L.position&&Rr===0||L.position===p($t)),L=>L.id,(L,te,B)=>{var me=Nt(()=>{var K;return((K=F())==null?void 0:K.actionButtonStyle)||""}),ae=Nt(()=>{var K;return((K=F())==null?void 0:K.cancelButtonStyle)||""}),we=Nt(()=>{var K;return((K=F())==null?void 0:K.class)||""}),Qe=Nt(()=>{var K;return((K=F())==null?void 0:K.descriptionClass)||""}),Me=Nt(()=>F().classes||{}),qe=Nt(()=>{var K;return((K=F())==null?void 0:K.duration)??M()}),Ve=Nt(()=>F().unstyled||!1);jd(L,{get index(){return p(B)},get toast(){return p(te)},get invert(){return g()},get visibleToasts(){return H()},get closeButton(){return z()},get interacting(){return p($)},get position(){return p($t)},get expandByDefault(){return J()},get expanded(){return p(X)},get actionButtonStyle(){return p(me)},get cancelButtonStyle(){return p(ae)},get class(){return p(we)},get descriptionClass(){return p(Qe)},get classes(){return p(Me)},get duration(){return p(qe)},get unstyled(){return p(Ve)},$$slots:{"loading-icon":(K,Je)=>{var it=ne(),be=V(it);_r(be,e,"loading-icon",{},lt=>{var Tt=Nt(()=>p(te).type==="loading");Fd(lt,{get visible(){return p(Tt)}})}),T(K,it)},"success-icon":(K,Je)=>{var it=ne(),be=V(it);_r(be,e,"success-icon",{},lt=>{Ra(lt,{type:"success"})}),T(K,it)},"error-icon":(K,Je)=>{var it=ne(),be=V(it);_r(be,e,"error-icon",{},lt=>{Ra(lt,{type:"error"})}),T(K,it)},"warning-icon":(K,Je)=>{var it=ne(),be=V(it);_r(be,e,"warning-icon",{},lt=>{Ra(lt,{type:"warning"})}),T(K,it)},"info-icon":(K,Je)=>{var it=ne(),be=V(it);_r(be,e,"info-icon",{},lt=>{Ra(lt,{type:"info"})}),T(K,it)}}})}),O(ft),Br(ft,L=>A(de,L),()=>p(de)),se(()=>{var L;Dt=Kt(ft,Dt,{tabIndex:-1,class:r.class,"data-sonner-toaster":!0,"data-theme":p(G),"data-rich-colors":x(),dir:xe()==="auto"?y():xe(),"data-y-position":p($t).split("-")[0],"data-x-position":p($t).split("-")[1],style:r.style,...n},"svelte-1fo5d1m"),Fr(ft,"--front-toast-height",`${(L=i()[0])==null?void 0:L.height}px`),Fr(ft,"--offset",typeof oe()=="number"?`${oe()}px`:oe()||u),Fr(ft,"--width",`${d}px`),Fr(ft,"--gap",`${f}px`),ft.dir=ft.dir}),st("blur",ft,je),st("focus",ft,Ze),st("mouseenter",ft,()=>A(X,!0)),st("mousemove",ft,()=>A(X,!0)),st("mouseleave",ft,()=>{p($)||A(X,!1)}),st("pointerdown",ft,()=>A($,!0)),st("pointerup",ft,()=>A($,!1)),T(kt,ft)}),O(rt),se(()=>ke(rt,"aria-label",`${E()} ${p(l)}`)),T(Z,rt)};ce(he,Z=>{a().length>0&&Z(Ee)})}return T(t,dt),Re({get invert(){return g()},set invert(Z){g(Z),_()},get theme(){return b()},set theme(Z){b(Z),_()},get position(){return w()},set position(Z){w(Z),_()},get hotkey(){return R()},set hotkey(Z){R(Z),_()},get containerAriaLabel(){return E()},set containerAriaLabel(Z){E(Z),_()},get richColors(){return x()},set richColors(Z){x(Z),_()},get expand(){return J()},set expand(Z){J(Z),_()},get duration(){return M()},set duration(Z){M(Z),_()},get visibleToasts(){return H()},set visibleToasts(Z){H(Z),_()},get closeButton(){return z()},set closeButton(Z){z(Z),_()},get toastOptions(){return F()},set toastOptions(Z){F(Z),_()},get offset(){return oe()},set offset(Z){oe(Z),_()},get dir(){return xe()},set dir(Z){xe(Z),_()}})}Oe($d,{invert:{},theme:{},position:{},hotkey:{},containerAriaLabel:{},richColors:{},expand:{},duration:{},visibleToasts:{},closeButton:{},toastOptions:{},offset:{},dir:{}},["loading-icon","success-icon","error-icon","warning-icon","info-icon"],[],!0);const kb='@layer base{*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;font-family:theme("fontFamily.sans",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-variation-settings:theme("fontFamily.sans[1].fontVariationSettings",normal);font-feature-settings:theme("fontFamily.sans[1].fontFeatureSettings",normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;border-top-width:1px;color:inherit}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-weight:inherit;font-size:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-size:1em;font-family:theme("fontFamily.mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-variation-settings:theme("fontFamily.mono[1].fontVariationSettings",normal);font-feature-settings:theme("fontFamily.mono[1].fontFeatureSettings",normal)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;border-collapse:collapse;text-indent:0}button,input,optgroup,select,textarea{margin:0;padding:0;color:inherit;font-weight:inherit;font-size:100%;line-height:inherit;font-family:inherit;font-variation-settings:inherit;font-feature-settings:inherit;letter-spacing:inherit}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-image:none;background-color:transparent}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:theme("colors.gray.400",#9ca3af);opacity:1}input::placeholder,textarea::placeholder{color:theme("colors.gray.400",#9ca3af);opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}}.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-80: 5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--font-xs: .75em;--font-body: 1rem;--font-h3: clamp(1.125rem, .9545rem + .8523cqw, 1.5rem);--font-h2: clamp(1.25rem, .7955rem + 2.2727cqw, 2.25rem);--font-h1: clamp(1.5rem, .8182rem + 3.4091cqw, 3rem);--font-weight-normal: 400;--font-weight-bold: 700;--line-height-default: 1.5;--line-height-tight: 1.25;--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--ease-out-quart: cubic-bezier(.165, .84, .44, 1)}@layer base{.chat-app{container-name:chat-app;container-type:inline-size;height:100%;transform:scale(1);background:var(--body-background);color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--font-body);line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}.chat-app :where(b,strong){font-weight:var(--font-weight-bold)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.mounted :is(.chat-app :where(.fly-in)){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}}@layer components{.chat-app :where(.container){width:100%;max-width:1024px;margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-app (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-app (min-width: 768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(.text-container)>:where(h1){font-size:var(--font-h1)}.chat-app :where(.text-container)>:where(h2){font-size:var(--font-h2)}.chat-app :where(.text-container)>:where(h3){font-size:var(--font-h3)}.chat-app :where(.text-container)>:where(h4,h5,h6){font-size:var(--font-body)}.chat-app :where(.text-container)>:where(p,ul,ol,img){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)){color:var(--anchor-color);text-decoration:underline;text-underline-offset:.15em;transition-duration:var(--default-transition-duration);transition-property:color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)):hover{color:var(--anchor-hover-color);text-decoration:none}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.btn{display:block;padding:var(--spacer-r-8) var(--spacer-r-20);border-style:solid;font-size:var(--font-sm);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function)}.btn:disabled{cursor:not-allowed;opacity:.5}.btn--primary{border-width:var(--btn-primary-border-width);border-radius:var(--btn-primary-border-radius);border-color:var(--btn-primary-border-color);background:var(--btn-primary-background);box-shadow:var(--btn-primary-box-shadow);color:var(--btn-primary-color)}.btn--primary:hover{border-width:var(--btn-primary-hover-border-width, var(--btn-primary-border-width));border-radius:var(--btn-primary-hover-border-radius, var(--btn-primary-border-radius));border-color:var(--btn-primary-hover-border-color, var(--btn-primary-border-color));background:var(--btn-primary-hover-background, var(--btn-primary-background));box-shadow:var(--btn-primary-hover-box-shadow, var(--btn-primary-box-shadow));color:var(--btn-primary-hover-color, var(--btn-primary-color))}.btn--secondary{border-width:var(--btn-secondary-border-width);border-radius:var(--btn-secondary-border-radius);border-color:var(--btn-secondary-border-color);background:var(--btn-secondary-background);box-shadow:var(--btn-secondary-box-shadow);color:var(--btn-secondary-color)}.btn--secondary:hover{border-width:var(--btn-secondary-hover-border-width, var(--btn-secondary-border-width));border-radius:var(--btn-secondary-hover-border-radius, var(--btn-secondary-border-radius));border-color:var(--btn-secondary-hover-border-color, var(--btn-secondary-border-color));background:var(--btn-secondary-hover-background, var(--btn-secondary-background));box-shadow:var(--btn-secondary-hover-box-shadow, var(--btn-secondary-box-shadow));color:var(--btn-secondary-hover-color, var(--btn-secondary-color))}.btn--tertiary{border-width:var(--btn-tertiary-border-width);border-radius:var(--btn-tertiary-border-radius);border-color:var(--btn-tertiary-border-color);background:var(--btn-tertiary-background);box-shadow:var(--btn-tertiary-box-shadow);color:var(--btn-tertiary-color)}.btn--tertiary:hover{border-width:var(--btn-tertiary-hover-border-width, var(--btn-tertiary-border-width));border-radius:var(--btn-tertiary-hover-border-radius, var(--btn-tertiary-border-radius));border-color:var(--btn-tertiary-hover-border-color, var(--btn-tertiary-border-color));background:var(--btn-tertiary-hover-background, var(--btn-tertiary-background));box-shadow:var(--btn-tertiary-hover-box-shadow, var(--btn-tertiary-box-shadow));color:var(--btn-tertiary-hover-color, var(--btn-tertiary-color))}}@layer components{.form{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacer-r-20)}.form__item{display:flex;flex-direction:column;width:100%;gap:var(--spacer-5)}.form__label{color:var(--label-color, inherit);font-weight:var(--label-font-weight, inherit)}}@layer components{.chat-input{position:relative}.chat-input__textarea{box-sizing:border-box;display:block;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em 1.2em;border-width:var(--chat-input-border-width);border-style:solid;border-radius:var(--chat-input-border-radius);border-color:var(--chat-input-border-color);background:var(--chat-input-background);box-shadow:var(--chat-input-box-shadow);color:var(--chat-input-color);resize:none}.chat-input__textarea:focus-visible{border-width:var(--chat-input-focus-border-width, var(--chat-input-border-width));border-radius:var(--chat-input-focus-border-radius, var(--chat-input-border-radius));border-color:var(--chat-input-focus-border-color, var(--chat-input-border-color));outline-color:transparent;background:var(--chat-input-focus-background, var(--chat-input-background));box-shadow:var(--chat-input-focus-box-shadow, var(--chat-input-box-shadow));color:var(--chat-input-focus-color, var(--chat-input-focus-color))}@container chat-app (min-width: 640px){.chat-input__textarea{padding:1.25em var(--spacer-80) 1.25em 1.75em}}.chat-input__submit-button{--margin: var(--spacer-8);display:flex;position:absolute;right:calc(var(--margin) + var(--chat-input-border-width, 0px));bottom:calc(var(--margin) + var(--chat-input-border-width, 0px));align-items:center;justify-content:center;width:var(--spacer-40);height:var(--spacer-40);border-width:var(--chat-input-submit-border-width, 0px);border-radius:var(--chat-input-submit-border-radius);border-color:var(--chat-input-submit-border-color);background:var(--chat-input-submit-background);box-shadow:var(--chat-input-submit-box-shadow);color:var(--chat-input-submit-color);font-size:0;cursor:pointer;transition-duration:.2s,.2s,.35s;transition-property:opacity,background-color,transform;transition-timing-function:ease}.chat-input__submit-button:hover{border-width:var(--chat-input-submit-hover-border-width, var(--chat-input-submit-border-width));border-radius:var(--chat-input-submit-hover-border-radius, var(--chat-input-submit-border-radius));border-color:var(--chat-input-submit-hover-border-color, var(--chat-input-submit-border-color));background:var(--chat-input-submit-hover-background, var(--chat-input-submit-background));box-shadow:var(--chat-input-submit-hover-box-shadow, var(--chat-input-submit-box-shadow));color:var(--chat-input-submit-hover-color, var(--chat-input-submit-color))}@container chat-app (min-width: 640px){.chat-input__submit-button{--margin: var(--spacer-12)}}.chat-input__submit-button--deactivated{transform:scale(var(--chat-input-submit-deactivated-scale, .8));background:var(--chat-input-submit-deactivated-background, var(--chat-input-submit-background));cursor:default;opacity:var(--chat-input-submit-deactivated-opacity, .5);pointer-events:none}.chat-input__submit-icon{width:var(--spacer-20);height:var(--spacer-20)}}@layer components{.chat-menu{position:fixed;top:var(--spacer-16);right:var(--spacer-16)}@media (--screen-sm){.chat-menu{top:var(--spacer-12);right:var(--spacer-12)}}.chat-menu__trigger{padding:var(--spacer-4)}.chat-menu__trigger:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.chat-menu__content{z-index:100;position:absolute;width:95vw;max-width:300px;padding:var(--spacer-r-12);border-width:var(--chat-menu-border-width);border-style:solid;border-radius:var(--chat-menu-border-radius);border-color:var(--chat-menu-border-color);background:var(--chat-menu-background);box-shadow:var(--chat-menu-box-shadow)}.chat-menu__list{display:flex;flex-direction:column;gap:1px}.chat-menu__item{display:flex;align-items:center;width:100%;padding:var(--spacer-4);gap:var(--spacer-4);border-radius:var(--chat-menu-item-border-radius);background:var(--chat-menu-item-background);color:var(--chat-menu-item-color)}.chat-menu__item:hover{background:var(--chat-menu-item-hover-background);color:var(--chat-menu-item-hover-color)}.chat-menu__item.active{background:var(--chat-menu-item-active-background);color:var(--chat-menu-item-active-color)}.chat-menu__item-icon{width:1em;height:1em;color:currentColor}.chat-menu__title{margin-bottom:var(--spacer-8);color:var(--chat-menu-title-color);font-size:var(--font-small)}.chat-menu__separator{margin:var(--spacer-r-12) 0;border-top:1px solid var(--chat-menu-separator-color)}.chat-menu__language-translation{opacity:.5}}@layer components{.chat-page{position:relative;height:100%;overflow:hidden}.chat-page__body{height:100%;padding-top:var(--spacer-48);overflow-y:auto;scrollbar-gutter:stable}.chat-page__messages{display:flex;flex-direction:column;min-height:100%;gap:var(--spacer-r-40)}.chat-page__footer{position:fixed;right:0;bottom:0;left:0}.chat-page__footer-content{display:flex;flex-direction:column;padding-bottom:var(--spacer-r-8);gap:var(--spacer-r-8);border-width:var(--chat-footer-border-width);border-style:solid;border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);border-color:var(--chat-footer-border-color);background:var(--chat-footer-background);box-shadow:var(--chat-footer-box-shadow);color:var(--chat-footer-color)}.chat-page__footer-text{font-size:var(--font-xs);text-align:center;text-wrap:balance}.chat-page__footer-text :where(a){text-decoration:underline;text-underline-offset:.15em}.chat-page__buttons{display:flex;flex-direction:row;align-self:center;margin-top:auto;margin-bottom:calc(var(--chat-footer-height) + var(--spacer-r-40));gap:var(--spacer-12)}.chat-page__scroll-to-bottom{position:absolute;top:0;left:50%;padding:var(--spacer-4);transform:translate(-50%,-150%);opacity:1}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0}}@layer components{.dialog-overlay{z-index:50;position:fixed;top:0;right:0;bottom:0;left:0;background:var(--dialog-background-overlay)}.dialog-content{z-index:51;position:fixed;top:50%;left:50%;width:calc(100% - var(--spacer-32));max-width:600px;transform:translate(-50%,-50%);border-width:var(--dialog-border-width);border-radius:var(--dialog-border-radius);border-color:var(--dialog-border-color);background:var(--dialog-background);box-shadow:var(--dialog-box-shadow, none)}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color, var(--dialog-border-color));font-weight:var(--dialog-header-font-weight, inherit);font-size:var(--dialog-header-font-size, inherit)}.dialog-title{padding:0}.dialog-close{justify-self:flex-end;margin-left:auto}.dialog-description{max-height:90cqh;padding:var(--spacer-r-24);overflow-y:auto}}@layer components{.introduction{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--spacer-r-16)}.introduction__avatar{width:var(--spacer-r-80);height:var(--spacer-r-80)}.introduction__title{font-size:var(--font-h3);text-align:center;text-wrap:balance}}@layer components{.message{display:flex}.message--bot{justify-content:flex-start;width:100%}.message--bot :where(.message__content){width:100%}.message--user{justify-content:flex-end}.message--user :where(.message__content){padding:var(--spacer-8) var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color)}.message--bot-error{color:var(--message-error-color)}}.message__bot-layout{display:flex;width:100%;gap:var(--spacer-r-16)}.message__bot-avatar{position:sticky;top:var(--spacer-r-16);flex-shrink:0;width:var(--spacer-24);height:var(--spacer-24);margin-top:calc(var(--spacer-1) * -1);margin-bottom:var(--spacer-20)}@container chat-app (min-width: 640px){.message__bot-avatar{width:var(--spacer-32);height:var(--spacer-32);margin-top:calc(var(--spacer-5) * -1);margin-bottom:var(--spacer-16)}}.message__content,.message__bot-body,.message__bot-options{min-width:0}.message__bot-body{width:100%}.message__bot-options{margin-top:var(--spacer-24);padding-top:var(--spacer-12);border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color)}@container chat-app (min-width: 640px){.message__bot-options{position:relative;min-height:var(--spacer-64);margin-top:var(--spacer-32);padding-top:0}}@container chat-app (min-width: 640px){.message__bot-references{padding-top:var(--spacer-12)}}.message__bot-actions{display:flex;position:relative;margin-left:calc(var(--spacer-12) * -1)}@container chat-app (min-width: 640px){.message__bot-actions{position:absolute;top:var(--spacer-20);right:0;gap:var(--spacer-8)}}.message__bot-action{display:flex;align-items:center;justify-content:center;width:var(--spacer-40);height:var(--spacer-40);color:var(--anchor-color)}.message__bot-action:hover{color:var(--anchor-hover-color, var(--anchor-color))}@layer components{.predefined-question{display:flex;flex-direction:column;padding:var(--spacer-r-16);gap:var(--spacer-r-12);border-width:var(--card-border-width);border-radius:var(--card-border-radius);border-color:var(--card-border-color);background:var(--card-background);box-shadow:var(--card-box-shadow, none);color:var(--card-color);text-align:left;cursor:pointer}.predefined-question:hover{border-width:var(--card-hover-border-width, var(--card-border-width));border-radius:var(--card-hover-border-radius, var(--card-border-radius));border-color:var(--card-hover-border-color, var(--card-border-color));background:var(--card-hover-background, var(--card-background));box-shadow:var(--card-hover-box-shadow, var(--card-box-shadow), none);color:var(--card-hover-color, var(--card-color))}.predefined-question:hover :where(.predefined-question__icon){color:var(--card-icon-hover-color)}.predefined-question__icon{color:var(--card-icon-color)}}@layer components{.predefined-questions{display:grid;width:100%;gap:var(--spacer-r-12)}@container chat-app (min-width: 640px){.predefined-questions{grid-template-columns:repeat(3,1fr)}}}@layer components{.reference-number{display:inline-block;position:relative}.reference-number__trigger{box-sizing:border-box;display:inline-block;position:relative;top:-1px;min-width:1.5em;height:1.5em;margin:0 .1em;padding:1px .4em 0;border-width:var(--reference-number-trigger-border-width);border-radius:var(--reference-number-trigger-border-radius);border-color:var(--reference-number-trigger-border-color);background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);color:var(--reference-number-trigger-color);font-weight:var(--font-weight-bold);font-size:var(--font-xs);text-align:center;text-decoration:none;cursor:pointer}.reference-number__trigger:hover{background:var(--reference-number-trigger-hover-background);color:var(--reference-number-trigger-hover-color)}.reference-number__trigger:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.reference-number__content-wrapper{z-index:102;position:absolute;width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width)}.reference-number__content{display:block;padding:var(--spacer-r-20);border-width:var(--reference-number-content-border-width);border-style:solid;border-radius:var(--reference-number-content-border-radius);border-color:var(--reference-number-content-border-color);background:var(--reference-number-content-background);box-shadow:var(--reference-number-content-box-shadow)}.reference-number__content:hover{border-width:var(--reference-number-content-hover-border-width, var(--reference-number-content-border-width));border-radius:var(--reference-number-content-hover-border-radius, var(--reference-number-content-border-radius));border-color:var(--reference-number-content-hover-border-color, var(--reference-number-content-border-color));background:var(--reference-number-content-hover-background, var(--reference-number-content-background));color:var(--reference-number-content-hover-color, var(--reference-number-content-color));cursor:pointer}.reference-number__content:hover :where(.reference-number__domain){background:var(--reference-number-domain-hover-background, var(--reference-number-domain-background));color:var(--reference-number-domain-hover-color, var(--reference-number-domain-color))}.reference-number__content:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference-number__content:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.reference-number__domain{display:inline-flex;max-width:100%;margin-top:var(--spacer-8);padding:var(--spacer-2) var(--spacer-10);border-width:var(--reference-number-domain-border-width);border-radius:var(--reference-number-domain-border-radius);border-color:var(--reference-number-domain-border-color);background:var(--reference-number-domain-background);box-shadow:var(--reference-number-domain-box-shadow);color:var(--reference-number-domain-color);font-weight:700;font-size:var(--font-xs)}@media (--screen-lg){.reference-number__domain{max-width:50%}}}@layer components{.reference{display:flex;padding:var(--spacer-12) var(--spacer-12) var(--spacer-16) var(--spacer-16);gap:var(--spacer-12);border-width:var(--reference-border-width);border-radius:var(--reference-border-radius);border-color:var(--reference-border-color);background:var(--reference-background);box-shadow:var(--reference-box-shadow);color:var(--reference-color);cursor:pointer}@container chat-app (min-width: 1024px){.reference{align-items:center;padding:var(--spacer-16) var(--spacer-16) var(--spacer-16) var(--spacer-20)}}.reference:hover{border-width:var(--reference-hover-border-width, var(--reference-border-width));border-radius:var(--reference-hover-border-radius, var(--reference-border-radius));border-color:var(--reference-hover-border-color, var(--reference-border-color));background:var(--reference-hover-background, var(--reference-background));box-shadow:var(--reference-hover-box-shadow, var(--reference-box-shadow), none);color:var(--reference-hover-color, var(--reference-color))}.reference:hover :where(.reference__number){color:var(--reference-number-trigger-hover-color)}.reference:hover :where(.reference__domain){border-width:var(--reference-domain-hover-border-width, var(--reference-domain-border-width));border-radius:var(--reference-domain-hover-border-radius, var(--reference-domain-border-radius));border-color:var(--reference-domain-hover-border-color, var(--reference-domain-border-color));background:var(--reference-domain-hover-background, var(--reference-domain-background));box-shadow:var(--reference-domain-hover-box-shadow, var(--reference-domain-box-shadow));color:var(--reference-domain-hover-color, var(--reference-domain-color))}.reference:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference__number{display:block;min-width:.9em;color:var(--reference-number-trigger-color);font-weight:700}.reference__body,.reference__domain{min-width:0}.reference__body{display:flex;flex-grow:1;flex-direction:column;align-items:flex-start;gap:var(--spacer-10)}@container chat-app (min-width: 1024px){.reference__body{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--spacer-20)}}@container chat-app (min-width: 1024px){.reference__title{-webkit-line-clamp:1}}.reference__domain{display:inline-flex;max-width:100%;padding:var(--spacer-2) var(--spacer-10);border-width:var(--reference-domain-border-width);border-radius:var(--reference-domain-border-radius);border-color:var(--reference-domain-border-color);background:var(--reference-domain-background);box-shadow:var(--reference-domain-box-shadow);color:var(--reference-domain-color);font-weight:700;font-size:var(--font-xs)}@container chat-app (min-width: 1024px){.reference__domain{max-width:50%}}.reference__icon{position:relative;flex-shrink:0;align-self:flex-end;margin-bottom:var(--spacer-2);color:var(--anchor-color)}@container chat-app (min-width: 1024px){.reference__icon{margin-top:0}}}@layer components{.references__trigger{display:flex;align-items:center;gap:var(--spacer-4);background-color:transparent;color:var(--anchor-color);cursor:pointer}.references__trigger:hover{color:var(--anchor-hover-color, var(--anchor-color))}.references__trigger[data-state=open] :where(.references__trigger-icon){transform:rotate(180deg)}.references__trigger-title{margin:var(--spacer-8) auto}@container chat-app (min-width: 640px){.references__trigger-title{margin:var(--spacer-16) auto}}.references__trigger-icon{transition:transform .2s}.references__container{display:flex;flex-direction:column;padding-top:var(--spacer-8);gap:var(--spacer-8)}.references__container :where(.fly-in){--fly-in-delay: .1s}.references__container :where(.fly-in):last-of-type{padding-bottom:var(--spacer-8)}@container chat-app (min-width: 640px){.references__container{padding-top:var(--spacer-12)}}}@layer components{.start-page{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-top:var(--spacer-r-20);padding-bottom:var(--spacer-r-20)}.start-page__introduction{margin-bottom:var(--spacer-r-48)}.start-page__chat-input{width:100%;margin-bottom:var(--spacer-r-32)}}@layer base{.toast{display:flex;align-items:center;width:100%;padding:var(--spacer-r-16);gap:var(--spacer-8);border-width:var(--toast-border-width, 1px);border-radius:var(--toast-border-radius);border-color:var(--toast-border-color, transparent);background:var(--toast-background);box-shadow:var(--toast-box-shadow);color:var(--toast-color)}.toast[data-type=success] svg{color:var(--toast-icon-success-color)}.toast[data-type=error] svg{color:var(--toast-icon-error-color)}.toast[data-type=warning] svg{color:var(--toast-icon-warning-color)}.toast[data-type=info] svg{color:var(--toast-icon-info-color)}}@layer components{.tooltip-container{display:inline-block;position:relative}.tooltip{z-index:10;position:absolute;padding:var(--spacer-3) var(--spacer-8);transform:translateY(0);border-radius:var(--tooltip-border-radius);background:var(--tooltip-background);color:var(--tooltip-color);font-size:var(--font-xs);white-space:nowrap;opacity:1;transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1)}.tooltip:after{position:absolute;border-width:5px;border-style:solid;content:""}.tooltip-top:after{bottom:-10px;left:50%;transform:translate(-50%);border-color:var(--tooltip-background) transparent transparent transparent}.tooltip-bottom:after{top:-10px;left:50%;transform:translate(-50%);border-color:transparent transparent var(--tooltip-background) transparent}.tooltip-left:after{top:50%;right:-10px;transform:translateY(-50%);border-color:transparent var(--tooltip-background) transparent transparent}.tooltip-right:after{top:50%;left:-10px;transform:translateY(-50%);border-color:transparent transparent transparent var(--tooltip-background)}.tooltip-hidden{transform:translateY(1rem);opacity:0;pointer-events:none}}@layer base,utilities,components;';class xb{constructor(e){W(this,Ma,Ie(void 0));W(this,Da,Ie(Se(wa.Start)));q(this,"client");q(this,"translation");q(this,"onModeChange",(e="light")=>{const{config:r,themeString:n}=Xu(this.props.org,e);this.chatState.config=r,this.chatState.themeString=n,this.chatState.mode=e});q(this,"loadInitialState",async e=>{try{const r=await this.client.getUsedLanguages(),n=rd(this.props.lang);this.translation=await ev(n,e);const o=await this.client.getPredefinedQuestions({url:window.location.href.replace(window.location.origin,""),language:n}),a=await this.client.getMenu({url:window.location.href.replace(window.location.origin,""),language:n}),i=await this.client.getClassification({url:window.location.href.replace(window.location.origin,"")}),s=await this.client.metadata,l="light",{config:c,themeString:u}=Xu(e,l);this.chatState={usedLanguages:r,language:n,predefinedQuestions:o,menu:a,config:c,themeString:u,isInMaintenance:s.mode==="maintenance",history:this.props.devChatHistory?Gm:[],mode:l,classification:i,feedbackOpenedId:void 0},Ld.subscribe(this.onModeChange.bind(this))}catch(r){Zi.error(r instanceof Error?r.message:"Failed to load the chatbot. Please reload the page.",{duration:1e4,unstyled:!0,classes:{toast:"toast"}})}});q(this,"onSubmit",e=>{const r=this.chatState.history.push({type:"user",time:new Date().toISOString(),message:e}),n={modes:this.props.modes?this.props.modes.trim().split(","):["formatting"]};this.client.chat(e,n).subscribe(o=>{"error"in o&&Zi.error(`Failed to chat: ${o.error}`,{duration:1e4,unstyled:!0,classes:{toast:"toast"}}),o.state==="streaming"||o.state==="done"?this.chatState.history[r]=o.payload:o.state==="loading"&&(this.chatState.history[r]={type:"bot-loading",time:new Date().toISOString()})})});q(this,"onStartConversation",e=>{const r=new URLSearchParams(window.location.search);r.set(Gu,encodeURIComponent(e)),_l(`?${r.toString()}`)});q(this,"onStartNewConversation",()=>{_l("?")});q(this,"showSuccessToast",e=>{Zi.success(this.translation[e],{unstyled:!0,duration:3e3,classes:{toast:"toast"}})});q(this,"showErrorToast",e=>{Zi.error(this.translation[e],{unstyled:!0,duration:3e3,classes:{toast:"toast"}})});q(this,"submitFeedback",async({email:e,body:r,classification:n})=>{const o=this.chatState.feedbackOpenedId;try{n&&await this.client.classification({...n,messageId:o}),r&&await this.client.feedback({messageId:o,email:e,body:r}),this.showSuccessToast("thankYouForFeedback"),this.closeFeedback()}catch(a){console.error("Feedback failed:",a),this.showErrorToast("feedbackFailed")}});q(this,"openLatestFeedback",()=>{this.chatState.feedbackOpenedId=this.client.lastRequestId});q(this,"openFeedback",e=>{this.chatState.feedbackOpenedId=e});q(this,"closeFeedback",()=>{this.chatState.feedbackOpenedId=void 0});q(this,"giveQuickFeedback",e=>{try{this.client.quickFeedback(e)}catch(r){console.error("Quick feedback failed:",r),this.showErrorToast("feedbackFailed")}this.showSuccessToast("thankYouForFeedback")});q(this,"onNavigate",()=>{const r=new URLSearchParams(window.location.search).get(Gu);r?(this.pageState=wa.Chat,this.chatState&&!this.props.devChatHistory&&(this.chatState.history=[],requestAnimationFrame(()=>{this.onSubmit(decodeURIComponent(r))}))):this.pageState=wa.Start});q(this,"onStyleInit",e=>{Vm(`${kb}
1061
-
1062
- ${this.chatState.config.customCSS??""}`,e)});q(this,"onLanguageChange",e=>{tv(e),this.loadInitialState(this.props.org),_l("?")});this.props=e,this.client=new jv({apiUrl:e.apiUrl,apiKey:e.apiKey})}get chatState(){return p(S(this,Ma))}set chatState(e){A(S(this,Ma),Se(e))}get pageState(){return p(S(this,Da))}set pageState(e){A(S(this,Da),Se(e))}}Ma=new WeakMap,Da=new WeakMap;var Sb=Y('<div aria-hidden="true"><!></div>');function tr(t,e){Ae(e,!0);const r=Yt(),n=()=>mt(xo,"$config",r);let o=k(e,"name",7),a=k(e,"class",7);var i=Sb(),s=P(i);return fo(s,()=>n().theme.svgs[o()]),O(i),se(()=>en(i,`svg svg--${o()??""} ${a()??""}`)),T(t,i),Re({get name(){return o()},set name(l){o(l),_()},get class(){return a()},set class(l){a(l),_()}})}Oe(tr,{name:{},class:{}},[],[],!0);const Ql=Math.min,Eo=Math.max,Ui=Math.round,Ur=t=>({x:t,y:t}),Tb={left:"right",right:"left",bottom:"top",top:"bottom"},Eb={start:"end",end:"start"};function Zd(t,e,r){return Eo(t,Ql(e,r))}function Hi(t,e){return typeof t=="function"?t(e):t}function jn(t){return t.split("-")[0]}function Vi(t){return t.split("-")[1]}function Ud(t){return t==="x"?"y":"x"}function Hd(t){return t==="y"?"height":"width"}function Co(t){return["top","bottom"].includes(jn(t))?"y":"x"}function Vd(t){return Ud(Co(t))}function Cb(t,e,r){r===void 0&&(r=!1);const n=Vi(t),o=Vd(t),a=Hd(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Gi(i)),[i,Gi(i)]}function Ab(t){const e=Gi(t);return[Jl(t),e,Jl(e)]}function Jl(t){return t.replace(/start|end/g,e=>Eb[e])}function Rb(t,e,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?a:i;default:return[]}}function Ib(t,e,r,n){const o=Vi(t);let a=Rb(jn(t),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),e&&(a=a.concat(a.map(Jl)))),a}function Gi(t){return t.replace(/left|right|bottom|top/g,e=>Tb[e])}function Ob(t){return{top:0,right:0,bottom:0,left:0,...t}}function Nb(t){return typeof t!="number"?Ob(t):{top:t,right:t,bottom:t,left:t}}function Wi(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function Gd(t,e,r){let{reference:n,floating:o}=t;const a=Co(e),i=Vd(e),s=Hd(i),l=jn(e),c=a==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let v;switch(l){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:d};break;case"left":v={x:n.x-o.width,y:d};break;default:v={x:n.x,y:n.y}}switch(Vi(e)){case"start":v[i]-=f*(r&&c?-1:1);break;case"end":v[i]+=f*(r&&c?-1:1);break}return v}const Pb=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:d}=Gd(c,n,l),f=n,v={},h=0;for(let m=0;m<s.length;m++){const{name:y,fn:g}=s[m],{x:b,y:w,data:R,reset:E}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:t,floating:e}});u=b??u,d=w??d,v={...v,[y]:{...v[y],...R}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:u,y:d}=Gd(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:v}};async function Wd(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:v=0}=Hi(e,t),h=Nb(v),y=s[f?d==="floating"?"reference":"floating":d],g=Wi(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),R=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Wi(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(g.top-E.top+h.top)/R.y,bottom:(E.bottom-g.bottom+h.bottom)/R.y,left:(g.left-E.left+h.left)/R.x,right:(E.right-g.right+h.right)/R.x}}const Lb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=Hi(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=jn(o),b=Co(s),w=jn(s)===s,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(w||!m?[Gi(s)]:Ab(s)),x=h!=="none";!f&&x&&E.push(...Ib(s,m,h,R));const J=[s,...E],M=await Wd(e,y),H=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&H.push(M[g]),d){const I=Cb(o,i,R);H.push(M[I[0]],M[I[1]])}if(z=[...z,{placement:o,overflows:H}],!H.every(I=>I<=0)){var F,oe;const I=(((F=a.flip)==null?void 0:F.index)||0)+1,Le=J[I];if(Le)return{data:{index:I,overflows:z},reset:{placement:Le}};let re=(oe=z.filter(X=>X.overflows[0]<=0).sort((X,$)=>X.overflows[1]-$.overflows[1])[0])==null?void 0:oe.placement;if(!re)switch(v){case"bestFit":{var xe;const X=(xe=z.filter($=>{if(x){const G=Co($.placement);return G===b||G==="y"}return!0}).map($=>[$.placement,$.overflows.filter(G=>G>0).reduce((G,de)=>G+de,0)]).sort(($,G)=>$[1]-G[1])[0])==null?void 0:xe[0];X&&(re=X);break}case"initialPlacement":re=s;break}if(o!==re)return{reset:{placement:re}}}return{}}}};async function Mb(t,e){const{placement:r,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=jn(r),s=Vi(r),l=Co(r)==="y",c=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,d=Hi(e,t);let{mainAxis:f,crossAxis:v,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(v=s==="end"?h*-1:h),l?{x:v*u,y:f*c}:{x:f*c,y:v*u}}const Db=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=e,l=await Mb(e,t);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Fb=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:y=>{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=Hi(t,e),c={x:r,y:n},u=await Wd(e,l),d=Co(jn(o)),f=Ud(d);let v=c[f],h=c[d];if(a){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],w=v-u[g];v=Zd(b,v,w)}if(i){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",b=h+u[y],w=h-u[g];h=Zd(b,h,w)}const m=s.fn({...e,[f]:v,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:a,[d]:i}}}}}};function Ki(){return typeof window<"u"}function Ao(t){return Kd(t)?(t.nodeName||"").toLowerCase():"#document"}function rr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function sn(t){var e;return(e=(Kd(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kd(t){return Ki()?t instanceof Node||t instanceof rr(t).Node:!1}function Er(t){return Ki()?t instanceof Element||t instanceof rr(t).Element:!1}function Hr(t){return Ki()?t instanceof HTMLElement||t instanceof rr(t).HTMLElement:!1}function Yd(t){return!Ki()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof rr(t).ShadowRoot}function Ia(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Cr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function zb(t){return["table","td","th"].includes(Ao(t))}function Yi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Xl(t){const e=ec(),r=Er(t)?Cr(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Bb(t){let e=xn(t);for(;Hr(e)&&!Ro(e);){if(Xl(e))return e;if(Yi(e))return null;e=xn(e)}return null}function ec(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ro(t){return["html","body","#document"].includes(Ao(t))}function Cr(t){return rr(t).getComputedStyle(t)}function Qi(t){return Er(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xn(t){if(Ao(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yd(t)&&t.host||sn(t);return Yd(e)?e.host:e}function Qd(t){const e=xn(t);return Ro(e)?t.ownerDocument?t.ownerDocument.body:t.body:Hr(e)&&Ia(e)?e:Qd(e)}function tc(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=Qd(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=rr(o);if(a){const s=rc(i);return e.concat(i,i.visualViewport||[],Ia(o)?o:[],s&&r?tc(s):[])}return e.concat(o,tc(o,[],r))}function rc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Jd(t){const e=Cr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=Hr(t),a=o?t.offsetWidth:r,i=o?t.offsetHeight:n,s=Ui(r)!==a||Ui(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function Xd(t){return Er(t)?t:t.contextElement}function Io(t){const e=Xd(t);if(!Hr(e))return Ur(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:a}=Jd(e);let i=(a?Ui(r.width):r.width)/n,s=(a?Ui(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const qb=Ur(0);function ef(t){const e=rr(t);return!ec()||!e.visualViewport?qb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function jb(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==rr(t)?!1:e}function Oa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),a=Xd(t);let i=Ur(1);e&&(n?Er(n)&&(i=Io(n)):i=Io(t));const s=jb(a,r,n)?ef(a):Ur(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const f=rr(a),v=n&&Er(n)?rr(n):n;let h=f,m=rc(h);for(;m&&n&&v!==h;){const y=Io(m),g=m.getBoundingClientRect(),b=Cr(m),w=g.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,R=g.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=w,c+=R,h=rr(m),m=rc(h)}}return Wi({width:u,height:d,x:l,y:c})}function nc(t,e){const r=Qi(t).scrollLeft;return e?e.left+r:Oa(sn(t)).left+r}function tf(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:nc(t,n)),a=n.top+e.scrollTop;return{x:o,y:a}}function $b(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=sn(n),s=e?Yi(e.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=Ur(1);const u=Ur(0),d=Hr(n);if((d||!d&&!a)&&((Ao(n)!=="body"||Ia(i))&&(l=Qi(n)),Hr(n))){const v=Oa(n);c=Io(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const f=i&&!d&&!a?tf(i,l,!0):Ur(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Zb(t){return Array.from(t.getClientRects())}function Ub(t){const e=sn(t),r=Qi(t),n=t.ownerDocument.body,o=Eo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Eo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+nc(t);const s=-r.scrollTop;return Cr(n).direction==="rtl"&&(i+=Eo(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Hb(t,e){const r=rr(t),n=sn(t),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const c=ec();(!c||c&&e==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Vb(t,e){const r=Oa(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,a=Hr(t)?Io(t):Ur(1),i=t.clientWidth*a.x,s=t.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function rf(t,e,r){let n;if(e==="viewport")n=Hb(t,r);else if(e==="document")n=Ub(sn(t));else if(Er(e))n=Vb(e,r);else{const o=ef(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Wi(n)}function nf(t,e){const r=xn(t);return r===e||!Er(r)||Ro(r)?!1:Cr(r).position==="fixed"||nf(r,e)}function Gb(t,e){const r=e.get(t);if(r)return r;let n=tc(t,[],!1).filter(s=>Er(s)&&Ao(s)!=="body"),o=null;const a=Cr(t).position==="fixed";let i=a?xn(t):t;for(;Er(i)&&!Ro(i);){const s=Cr(i),l=Xl(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ia(i)&&!l&&nf(t,i))?n=n.filter(u=>u!==i):o=s,i=xn(i)}return e.set(t,n),n}function Wb(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const i=[...r==="clippingAncestors"?Yi(e)?[]:Gb(e,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{const d=rf(e,u,o);return c.top=Eo(d.top,c.top),c.right=Ql(d.right,c.right),c.bottom=Ql(d.bottom,c.bottom),c.left=Eo(d.left,c.left),c},rf(e,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Kb(t){const{width:e,height:r}=Jd(t);return{width:e,height:r}}function Yb(t,e,r){const n=Hr(e),o=sn(e),a=r==="fixed",i=Oa(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const l=Ur(0);if(n||!n&&!a)if((Ao(e)!=="body"||Ia(o))&&(s=Qi(e)),n){const f=Oa(e,!0,a,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=nc(o));const c=o&&!n&&!a?tf(o,s):Ur(0),u=i.left+s.scrollLeft-l.x-c.x,d=i.top+s.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function oc(t){return Cr(t).position==="static"}function of(t,e){if(!Hr(t)||Cr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return sn(t)===r&&(r=r.ownerDocument.body),r}function af(t,e){const r=rr(t);if(Yi(t))return r;if(!Hr(t)){let o=xn(t);for(;o&&!Ro(o);){if(Er(o)&&!oc(o))return o;o=xn(o)}return r}let n=of(t,e);for(;n&&zb(n)&&oc(n);)n=of(n,e);return n&&Ro(n)&&oc(n)&&!Xl(n)?r:n||Bb(t)||r}const Qb=async function(t){const e=this.getOffsetParent||af,r=this.getDimensions,n=await r(t.floating);return{reference:Yb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Jb(t){return Cr(t).direction==="rtl"}const Xb={convertOffsetParentRelativeRectToViewportRelativeRect:$b,getDocumentElement:sn,getClippingRect:Wb,getOffsetParent:af,getElementRects:Qb,getClientRects:Zb,getDimensions:Kb,getScale:Io,isElement:Er,isRTL:Jb},sf=Db,lf=Fb,e0=Lb,cf=(t,e,r)=>{const n=new Map,o={platform:Xb,...r},a={...o.platform,_c:n};return Pb(t,e,{...o,platform:a})};function ac(t,e={enabled:!0}){let{enabled:r,eventType:n,nodeForEvent:o,options:a}=uf(e);function i(l){l.target&&t&&!t.contains(l.target)&&!l.defaultPrevented&&t.dispatchEvent(new CustomEvent("clickoutside",{detail:l}))}let s;return e.enabled!==!1&&(s=Lt(o,n,i,a)),{update(l){s==null||s(),{enabled:r,eventType:n,nodeForEvent:o,options:a}=uf(l),r&&(s=Lt(o,n,i,a))},destroy(){s==null||s()}}}function uf(t={}){var e;return{enabled:t.enabled??!0,nodeForEvent:((e=t.limit)==null?void 0:e.parent)??document,eventType:t.event??"click",options:typeof t.options=="boolean"?{capture:t.options}:t.options}}const t0=t=>t;function df(t){const e=t-1;return e*e*e+1}function ff(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function hf(t,{delay:e=0,duration:r=400,easing:n=t0}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:a=>`opacity: ${a*o}`}}function Na(t,{delay:e=0,duration:r=400,easing:n=df,x:o=0,y:a=0,opacity:i=0}={}){const s=getComputedStyle(t),l=+s.opacity,c=s.transform==="none"?"":s.transform,u=l*(1-i),[d,f]=ff(o),[v,h]=ff(a);return{delay:e,duration:r,easing:n,css:(m,y)=>`
1063
- transform: ${c} translate(${(1-m)*d}${f}, ${(1-m)*v}${h});
1064
- opacity: ${l-u*y}`}}function r0(t,{delay:e=0,duration:r=400,easing:n=df,axis:o="y"}={}){const a=getComputedStyle(t),i=+a.opacity,s=o==="y"?"height":"width",l=parseFloat(a[s]),c=o==="y"?["top","bottom"]:["left","right"],u=c.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),d=parseFloat(a[`padding${u[0]}`]),f=parseFloat(a[`padding${u[1]}`]),v=parseFloat(a[`margin${u[0]}`]),h=parseFloat(a[`margin${u[1]}`]),m=parseFloat(a[`border${u[0]}Width`]),y=parseFloat(a[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*i};${s}: ${g*l}px;padding-${c[0]}: ${g*d}px;padding-${c[1]}: ${g*f}px;margin-${c[0]}: ${g*v}px;margin-${c[1]}: ${g*h}px;border-${c[0]}-width: ${g*m}px;border-${c[1]}-width: ${g*y}px;`}}var n0=(t,e)=>(t.stopPropagation(),A(e,!p(e))),o0=Y('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),a0=(t,e,r)=>e(p(r)),i0=Y('<li><button class="chat-menu__item transition-colors"><!> <span> </span></button></li>'),s0=Y('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),l0=Y('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),c0=Y('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function pf(t,e){var M,H,z;Ae(e,!0);const r=Yt(),n=()=>mt(xo,"$config",r),o=()=>mt(an,"$t",r),a=()=>mt(xa,"$selectedLanguageStore",r);let i=k(e,"menu",7),s=k(e,"usedLanguages",7),l=k(e,"currentLanguage",7),c=k(e,"onLanguageChange",7),u=Ie(!1),d,f=Ie(void 0);const v={duration:Number((M=n().theme.components.referenceNumberContent.custom)==null?void 0:M.transitionDuration)||200,delay:Number((H=n().theme.components.referenceNumberContent.custom)==null?void 0:H.transitionDelay)||0,y:Number((z=n().theme.components.referenceNumberContent.custom)==null?void 0:z.transitionY)||10},h=async()=>{if(!d||!p(f))return;const{x:F,y:oe}=await cf(d,p(f),{placement:"bottom",middleware:[sf(8),lf({padding:8})]});Object.assign(p(f).style,{left:`${F}px`,top:`${oe}px`})};wt(()=>{p(u)&&h()}),wt(()=>{xa.set(l())});const m=F=>{c()&&(c()(F),xa.set(F),A(u,!1))};var y=c0(),g=P(y);g.__click=[n0,u];var b=P(g),w=P(b,!0);O(b);var R=ie(b,2),E=Te(()=>p(u)?"dismiss":"menu");tr(R,{get name(){return p(E)}}),O(g),Br(g,F=>d=F,()=>d),fl(g,F=>ac==null?void 0:ac(F));var x=ie(g,2);{var J=F=>{var oe=l0(),xe=P(oe);wr(xe,21,()=>i()??[],Mr,(re,X)=>{var $=o0(),G=P($),de=P(G);tr(de,{get name(){return p(X).icon},class:"chat-menu__item-icon"});var ue=ie(de,2),fe=P(ue,!0);O(ue),O(G),O($),se(()=>{ke(G,"href",p(X).url),ke(G,"target",p(X).target),He(fe,p(X).label)}),T(re,$)}),O(xe);var I=ie(xe,2);{var Le=re=>{var X=s0(),$=ie(V(X),2),G=P($,!0);O($);var de=ie($,2);wr(de,21,s,Mr,(ue,fe)=>{var je=i0(),Ze=P(je);Ze.__click=[a0,m,fe];var dt=P(Ze);tr(dt,{name:"internalLink",class:"chat-menu__item-icon"});var he=ie(dt,2),Ee=P(he,!0);O(he),O(Ze),O(je),se(()=>{Dr(Ze,"active",a()===p(fe)),He(Ee,Ll[p(fe)].languageNames[p(fe)])}),T(ue,je)}),O(de),se(()=>He(G,o().selectLanguage)),T(re,X)};ce(I,re=>{s().length>0&&re(Le)})}O(oe),Br(oe,re=>A(f,re),()=>p(f)),zr(3,oe,()=>Na,()=>v),T(F,oe)};ce(x,F=>{p(u)&&F(J)})}return O(y),se(()=>He(w,p(u)?o().closeMenu:o().openMenu)),st("clickoutside",g,()=>A(u,!1)),T(t,y),Re({get menu(){return i()},set menu(F){i(F),_()},get usedLanguages(){return s()},set usedLanguages(F){s(F),_()},get currentLanguage(){return l()},set currentLanguage(F){l(F),_()},get onLanguageChange(){return c()},set onLanguageChange(F){c(F),_()}})}lo(["click"]),Oe(pf,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const u0=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var d0=Y('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit" class="chat-input__submit-button transition-colors"><!></button></form>');function ic(t,e){Ae(e,!0);const r=Yt(),n=()=>mt(an,"$t",r);let o=k(e,"class",7),a=k(e,"onSubmit",7),i=kr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),s=Ie(""),l=Te(()=>p(s)!==""),c,u;const d=w=>{w.preventDefault(),p(s)&&(a()(p(s)),A(s,""),f())},f=()=>{c.style.height="auto"},v=()=>{f();const w=parseInt(getComputedStyle(c).borderWidth)*2;c.style.height=`${c.scrollHeight+w}px`};wt(()=>{if(c)return u=new ResizeObserver(()=>{v()}),u.observe(c),()=>{u.disconnect()}});var h=d0();st("resize",Yo,v);let m;var y=P(h);hu(y),y.__input=v,y.__change=v,y.__keydown=[u0,d],ke(y,"rows",1),Br(y,w=>c=w,()=>c);var g=ie(y,2),b=P(g);return tr(b,{name:"submit",class:"chat-input__submit-icon"}),O(g),O(h),se(()=>{m=Kt(h,m,{name:"chat-input",onsubmit:d,class:`chat-input ${o()??""}`,...i}),ke(y,"placeholder",n().chatInputPlaceholder),ke(g,"aria-label",n().chatInputSubmit),g.disabled=!p(l),Dr(g,"chat-input__submit-button--deactivated",!p(l))}),gl(y,()=>p(s),w=>A(s,w)),T(t,h),Re({get class(){return o()},set class(w){o(w),_()},get onSubmit(){return a()},set onSubmit(w){a(w),_()}})}lo(["input","change","keydown"]),Oe(ic,{class:{},onSubmit:{}},[],[],!0);var f0=Y('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="quality" class="svelte-vqj1lp"> </label>'),h0=Y('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),p0=Y('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="impact" class="svelte-vqj1lp"> </label>'),g0=Y('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),m0=Y('<div class="classification-feedback svelte-vqj1lp"><div class="classification-feedback__title svelte-vqj1lp"> </div> <!> <!></div>');const v0={hash:"svelte-vqj1lp",code:".classification-feedback.svelte-vqj1lp {display:flex;flex-direction:column;padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);gap:var(--spacer-32);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color);}.classification-feedback__item.svelte-vqj1lp {display:flex;flex-direction:column;margin:0;padding:0;gap:var(--spacer-4);border:none;}.classification-feedback__title.svelte-vqj1lp {margin-bottom:-1rem;font-weight:bold;}.classification-feedback__label.svelte-vqj1lp {margin-bottom:var(--spacer-8);font-weight:bold;}.classification-feedback__option.svelte-vqj1lp {display:flex;align-items:center;padding-left:var(--spacer-16);gap:var(--spacer-12);&:has(input:where(.svelte-vqj1lp):checked) {background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color);}&:has(input:where(.svelte-vqj1lp):focus-visible) {border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);}&:has(input:where(.svelte-vqj1lp):focus-visible) input:where(.svelte-vqj1lp) {outline:none;}}"};function gf(t,e){Ae(e,!0),na(t,v0);const r=Yt(),n=()=>mt(an,"$t",r),o=[],a=[];let i=k(e,"impact",15),s=k(e,"quality",15),l=k(e,"classificationConfig",7);var c=ne(),u=V(c);{var d=f=>{var v=m0(),h=P(v),m=P(h,!0);O(h);var y=ie(h,2);{var g=R=>{var E=h0(),x=P(E),J=P(x,!0);O(x);var M=ie(x,2);wr(M,17,()=>l().quality.options,Mr,(H,z)=>{var F=f0(),oe=P(F);hl(oe);var xe,I=ie(oe);O(F),se(()=>{xe!==(xe=p(z).value)&&(oe.value=(oe.__value=p(z).value)==null?"":p(z).value),He(I,` ${p(z).label??""}`)}),Au(o,[],oe,()=>(p(z).value,s()),s),T(H,F)}),O(E),se(()=>He(J,l().quality.label)),T(R,E)};ce(y,R=>{l().quality.options.length!==0&&R(g)})}var b=ie(y,2);{var w=R=>{var E=g0(),x=P(E),J=P(x,!0);O(x);var M=ie(x,2);wr(M,17,()=>l().impact.options,Mr,(H,z)=>{var F=p0(),oe=P(F);hl(oe);var xe,I=ie(oe);O(F),se(()=>{xe!==(xe=p(z).value)&&(oe.value=(oe.__value=p(z).value)==null?"":p(z).value),He(I,` ${p(z).label??""}`)}),Au(a,[],oe,()=>(p(z).value,i()),i),T(H,F)}),O(E),se(()=>He(J,l().impact.label)),T(R,E)};ce(b,R=>{l().impact.options.length!==0&&R(w)})}O(v),se(()=>He(m,n().classificationTitle)),T(f,v)};ce(u,f=>{l()&&l().enabled&&f(d)})}return T(t,c),Re({get impact(){return i()},set impact(f){i(f),_()},get quality(){return s()},set quality(f){s(f),_()},get classificationConfig(){return l()},set classificationConfig(f){l(f),_()}})}Oe(gf,{impact:{},quality:{},classificationConfig:{}},[],[],!0);function b0(t){return typeof t=="function"}function y0(t){return t!==null&&typeof t=="object"}const w0=["string","number","bigint","boolean"];function sc(t){return t==null||w0.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>sc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const Pa=Symbol("box"),lc=Symbol("is-writable");function _0(t){return y0(t)&&Pa in t}function k0(t){return ee.isBox(t)&&lc in t}function ee(t){let e=Ie(Se(t));return{[Pa]:!0,[lc]:!0,get current(){return p(e)},set current(r){A(e,Se(r))}}}function x0(t,e){const r=Te(t);return e?{[Pa]:!0,[lc]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Pa]:!0,get current(){return t()}}}function S0(t){return ee.isBox(t)?t:b0(t)?ee.with(t):ee(t)}function T0(t){return Object.entries(t).reduce((e,[r,n])=>ee.isBox(n)?(ee.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(o){n.current=o}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function E0(t){return ee.isWritableBox(t)?{[Pa]:!0,get current(){return t.current}}:t}ee.from=S0,ee.with=x0,ee.flatten=T0,ee.readonly=E0,ee.isBox=_0,ee.isWritableBox=k0;function mf(...t){return function(e){var r;for(const n of t)if(n){if(e.defaultPrevented)return;typeof n=="function"?n.call(this,e):(r=n.current)==null||r.call(this,e)}}}var vf={},bf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,C0=/\n/g,A0=/^\s*/,R0=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,I0=/^:\s*/,O0=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,N0=/^[;\s]*/,P0=/^\s+|\s+$/g,L0=`
1065
- `,yf="/",wf="*",$n="",M0="comment",D0="declaration",F0=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function o(h){var m=h.match(C0);m&&(r+=m.length);var y=h.lastIndexOf(L0);n=~y?h.length-y:n+h.length}function a(){var h={line:r,column:n};return function(m){return m.position=new i(h),c(),m}}function i(h){this.start=h,this.end={line:r,column:n},this.source=e.source}i.prototype.content=t;function s(h){var m=new Error(e.source+":"+r+":"+n+": "+h);if(m.reason=h,m.filename=e.source,m.line=r,m.column=n,m.source=t,!e.silent)throw m}function l(h){var m=h.exec(t);if(m){var y=m[0];return o(y),t=t.slice(y.length),m}}function c(){l(A0)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=a();if(!(yf!=t.charAt(0)||wf!=t.charAt(1))){for(var m=2;$n!=t.charAt(m)&&(wf!=t.charAt(m)||yf!=t.charAt(m+1));)++m;if(m+=2,$n===t.charAt(m-1))return s("End of comment missing");var y=t.slice(2,m-2);return n+=2,o(y),t=t.slice(m),n+=2,h({type:M0,comment:y})}}function f(){var h=a(),m=l(R0);if(m){if(d(),!l(I0))return s("property missing ':'");var y=l(O0),g=h({type:D0,property:_f(m[0].replace(bf,$n)),value:y?_f(y[0].replace(bf,$n)):$n});return l(N0),g}}function v(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return c(),v()};function _f(t){return t?t.replace(P0,$n):$n}var z0=Nl&&Nl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vf,"__esModule",{value:!0});var kf=vf.default=q0,B0=z0(F0);function q0(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,B0.default)(t),o=typeof e=="function";return n.forEach(function(a){if(a.type==="declaration"){var i=a.property,s=a.value;o?e(i,s,a):s&&(r=r||{},r[i]=s)}}),r}const j0=kf.default||kf,$0=/\d/,Z0=["-","_","/","."];function U0(t=""){if(!$0.test(t))return t!==t.toLowerCase()}function H0(t){const e=[];let r="",n,o;for(const a of t){const i=Z0.includes(a);if(i===!0){e.push(r),r="",n=void 0;continue}const s=U0(a);if(o===!1){if(n===!1&&s===!0){e.push(r),r=a,n=s;continue}if(n===!0&&s===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+a,n=s;continue}}r+=a,n=s,o=i}return e.push(r),e}function xf(t){return t?H0(t).map(e=>G0(e)).join(""):""}function V0(t){return W0(xf(t||""))}function G0(t){return t?t[0].toUpperCase()+t.slice(1):""}function W0(t){return t?t[0].toLowerCase()+t.slice(1):""}function Ji(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[xf(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[V0(n)]=o}return j0(t,r),e}function Zn(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function Sf(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Sf(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function cc(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Sf(t))&&(n&&(n+=" "),n+=e);return n}function K0(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const Y0=K0(/[A-Z]/,t=>`-${t.toLowerCase()}`);function Q0(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${Y0(e)}: ${t[e]};`).join(`
1066
- `)}function Tf(t={}){return Q0(t).replace(`
1067
- `," ")}Tf({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"});function J0(t){var e;return t.length>2&&t.startsWith("on")&&t[2]===((e=t[2])==null?void 0:e.toLowerCase())}function fr(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];for(const o in n){const a=e[o],i=n[o],s=typeof a=="function",l=typeof i=="function";if(s&&J0(o)){const c=a,u=i;e[o]=mf(c,u)}else if(s&&l)e[o]=Zn(a,i);else if(o==="class"){const c=sc(a),u=sc(i);c&&u?e[o]=cc(a,i):c?e[o]=cc(a):u&&(e[o]=cc(i))}else if(o==="style"){const c=typeof a=="object",u=typeof i=="object",d=typeof a=="string",f=typeof i=="string";if(c&&u)e[o]={...a,...i};else if(c&&f){const v=Ji(i);e[o]={...a,...v}}else if(d&&u){const v=Ji(a);e[o]={...v,...i}}else if(d&&f){const v=Ji(a),h=Ji(i);e[o]={...v,...h}}else c?e[o]=a:u?e[o]=i:d?e[o]=a:f&&(e[o]=i)}else e[o]=i!==void 0?i:a}}return typeof e.style=="object"&&(e.style=Tf(e.style).replaceAll(`
1068
- `," ")),e.hidden!==!0&&(e.hidden=void 0,delete e.hidden),e.disabled!==!0&&(e.disabled=void 0,delete e.disabled),e}const X0=typeof window<"u"?window:void 0;function e1(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}const wc=class wc extends Map{constructor(r){super();W(this,No);W(this,Vr,new Map);W(this,Gr,gt(0));W(this,cn,gt(0));if(r){for(var[n,o]of r)super.set(n,o);S(this,cn).v=super.size}}has(r){var n=S(this,Vr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=gt(0),n.set(r,o);else return p(S(this,Gr)),!1}return p(o),!0}forEach(r,n){Wn(this,No,Ls).call(this),super.forEach(r,n)}get(r){var n=S(this,Vr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=gt(0),n.set(r,o);else{p(S(this,Gr));return}}return p(o),super.get(r)}set(r,n){var d;var o=S(this,Vr),a=o.get(r),i=super.get(r),s=super.set(r,n),l=S(this,Gr);if(a===void 0)o.set(r,gt(0)),A(S(this,cn),super.size),ko(l);else if(i!==n){ko(a);var c=l.reactions===null?null:new Set(l.reactions),u=c===null||!((d=a.reactions)!=null&&d.every(f=>c.has(f)));u&&ko(l)}return s}delete(r){var n=S(this,Vr),o=n.get(r),a=super.delete(r);return o!==void 0&&(n.delete(r),A(S(this,cn),super.size),A(o,-1),ko(S(this,Gr))),a}clear(){if(super.size!==0){super.clear();var r=S(this,Vr);A(S(this,cn),0);for(var n of r.values())A(n,-1);ko(S(this,Gr)),r.clear()}}keys(){return p(S(this,Gr)),super.keys()}values(){return Wn(this,No,Ls).call(this),super.values()}entries(){return Wn(this,No,Ls).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(S(this,cn)),super.size}};Vr=new WeakMap,Gr=new WeakMap,cn=new WeakMap,No=new WeakSet,Ls=function(){p(S(this,Gr));var r=S(this,Vr);if(S(this,cn).v!==r.size)for(var n of vh(wc.prototype,this,"keys").call(this))r.has(n)||r.set(n,gt(0));for(var[,o]of S(this,Vr))p(o)};let uc=wc;class t1{constructor(e={}){W(this,Po);W(this,Fa);const{window:r=X0,document:n=r==null?void 0:r.document}=e;r!==void 0&&(Ct(this,Po,n),Ct(this,Fa,Um(o=>{const a=Lt(r,"focusin",o),i=Lt(r,"focusout",o);return()=>{a(),i()}})))}get current(){var e;return(e=S(this,Fa))==null||e.call(this),S(this,Po)?e1(S(this,Po)):null}}Po=new WeakMap,Fa=new WeakMap,new t1;function r1(t,e){switch(t){case"post":wt(e);break;case"pre":Ks(e);break}}function Ef(t,e,r,n={}){const{lazy:o=!1}=n;let a=!o,i=Array.isArray(t)?[]:void 0;r1(e,()=>{const s=Array.isArray(t)?t.map(c=>c()):t();if(!a){a=!0,i=s;return}const l=Gt(()=>r(s,i));return i=s,l})}function nr(t,e,r){Ef(t,"post",e,r)}function n1(t,e,r){Ef(t,"pre",e,r)}nr.pre=n1;class o1{constructor(e){W(this,za,Ie(void 0));W(this,Ba);wt(()=>{A(S(this,za),Se(S(this,Ba))),Ct(this,Ba,e())})}get current(){return p(S(this,za))}}za=new WeakMap,Ba=new WeakMap;class dc{constructor(e){W(this,qa);W(this,un);Ct(this,qa,e),Ct(this,un,Symbol(e))}get key(){return S(this,un)}exists(){return kp(S(this,un))}get(){const e=du(S(this,un));if(e===void 0)throw new Error(`Context "${S(this,qa)}" not found`);return e}getOr(e){const r=du(S(this,un));return r===void 0?e:r}set(e){return _p(S(this,un),e)}}qa=new WeakMap,un=new WeakMap;function Cf(t){wt(()=>()=>{t()})}function Ar({id:t,ref:e,deps:r=()=>!0,onRefChange:n,getRootNode:o}){nr([()=>t.current,r],([a])=>{const i=(o==null?void 0:o())??document,s=i==null?void 0:i.getElementById(a);s?e.current=s:e.current=null,n==null||n(e.current)}),Cf(()=>{e.current=null,n==null||n(null)})}function fc(t,e){return setTimeout(e,t)}function La(t){rl().then(t)}function Xi(t){return t?"open":"closed"}function a1(t){return t?"true":"false"}function hc(t){return t?"":void 0}const Af="Enter",i1="Escape",Rf=" ",s1="Tab",If=typeof document<"u",Of=l1();function l1(){var t,e;return If&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function pc(t){return t instanceof HTMLElement}function c1(t){return t instanceof Element}function u1(t){return t instanceof HTMLInputElement&&"select"in t}function d1(t,e){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function It(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}function Ye(){}function f1(t,e){const r=ee(t);function n(a){return e[r.current][a]??r.current}return{state:r,dispatch:a=>{r.current=n(a)}}}function h1(t,e){let r=Ie(Se({})),n=Ie("none");const o=t.current?"mounted":"unmounted";let a=Ie(null);const i=new o1(()=>t.current);nr([()=>e.current,()=>t.current],([f,v])=>{!f||!v||La(()=>{A(a,Se(document.getElementById(f)))})});const{state:s,dispatch:l}=f1(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});nr(()=>t.current,f=>{if(p(a)||A(a,Se(document.getElementById(e.current))),!p(a)||!(f!==i.current))return;const h=p(n),m=es(p(a));f?l("MOUNT"):m==="none"||p(r).display==="none"?l("UNMOUNT"):l(i&&h!==m?"ANIMATION_OUT":"UNMOUNT")});function c(f){if(p(a)||A(a,Se(document.getElementById(e.current))),!p(a))return;const v=es(p(a)),h=v.includes(f.animationName)||v==="none";f.target===p(a)&&h&&l("ANIMATION_END")}function u(f){p(a)||A(a,Se(document.getElementById(e.current))),p(a)&&f.target===p(a)&&A(n,Se(es(p(a))))}nr(()=>s.current,()=>{if(p(a)||A(a,Se(document.getElementById(e.current))),!p(a))return;const f=es(p(a));A(n,Se(s.current==="mounted"?f:"none"))}),nr(()=>p(a),f=>{if(f)return A(r,Se(getComputedStyle(f))),Zn(Lt(f,"animationstart",u),Lt(f,"animationcancel",c),Lt(f,"animationend",c))});const d=Te(()=>["mounted","unmountSuspended"].includes(s.current));return{get current(){return p(d)}}}function es(t){return t&&getComputedStyle(t).animationName||"none"}function ts(t,e){Ae(e,!0);let r=k(e,"present",7),n=k(e,"forceMount",7),o=k(e,"presence",7),a=k(e,"id",7);const i=h1(ee.with(()=>r()),ee.with(()=>a()));var s=ne(),l=V(s);{var c=u=>{var d=ne(),f=V(d);ut(f,()=>o()??Ge,()=>({present:i})),T(u,d)};ce(l,u=>{(n()||r()||i.current)&&u(c)})}return T(t,s),Re({get present(){return r()},set present(u){r(u),_()},get forceMount(){return n()},set forceMount(u){n(u),_()},get presence(){return o()},set presence(u){o(u),_()},get id(){return a()},set id(u){a(u),_()}})}Oe(ts,{present:{},forceMount:{},presence:{},id:{}},[],[],!0);function p1(t){return{content:`data-${t}-content`,trigger:`data-${t}-trigger`,overlay:`data-${t}-overlay`,title:`data-${t}-title`,description:`data-${t}-description`,close:`data-${t}-close`,cancel:`data-${t}-cancel`,action:`data-${t}-action`}}class g1{constructor(e){q(this,"opts");W(this,ja,Ie(null));W(this,$a,Ie(null));W(this,Za,Ie(null));W(this,Ua,Ie(null));W(this,Ha,Ie(void 0));W(this,Va,Ie(void 0));W(this,Ga,Ie(void 0));W(this,Wa,Ie(void 0));W(this,Ka,Ie(null));W(this,ss,Te(()=>p1(this.opts.variant.current)));W(this,ls,Te(()=>({"data-state":Xi(this.opts.open.current)})));this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return p(S(this,ja))}set triggerNode(e){A(S(this,ja),Se(e))}get titleNode(){return p(S(this,$a))}set titleNode(e){A(S(this,$a),Se(e))}get contentNode(){return p(S(this,Za))}set contentNode(e){A(S(this,Za),Se(e))}get descriptionNode(){return p(S(this,Ua))}set descriptionNode(e){A(S(this,Ua),Se(e))}get contentId(){return p(S(this,Ha))}set contentId(e){A(S(this,Ha),Se(e))}get titleId(){return p(S(this,Va))}set titleId(e){A(S(this,Va),Se(e))}get triggerId(){return p(S(this,Ga))}set triggerId(e){A(S(this,Ga),Se(e))}get descriptionId(){return p(S(this,Wa))}set descriptionId(e){A(S(this,Wa),Se(e))}get cancelNode(){return p(S(this,Ka))}set cancelNode(e){A(S(this,Ka),Se(e))}get attrs(){return p(S(this,ss))}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return p(S(this,ls))}}ja=new WeakMap,$a=new WeakMap,Za=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ga=new WeakMap,Wa=new WeakMap,Ka=new WeakMap,ss=new WeakMap,ls=new WeakMap;class m1{constructor(e,r){q(this,"opts");q(this,"root");W(this,cs,Te(()=>this.root.attrs[this.opts.variant.current]));W(this,us,Te(()=>({id:this.opts.id.current,[p(S(this,cs))]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps})));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Ar({...e,deps:()=>this.root.opts.open.current})}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===Rf||e.key===Af)&&(e.preventDefault(),this.root.handleClose())}get props(){return p(S(this,us))}}cs=new WeakMap,us=new WeakMap;class v1{constructor(e,r){q(this,"opts");q(this,"root");W(this,ds,Te(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps})));this.opts=e,this.root=r,Ar({...e,onRefChange:n=>{this.root.titleNode=n,this.root.titleId=n==null?void 0:n.id},deps:()=>this.root.opts.open.current})}get props(){return p(S(this,ds))}}ds=new WeakMap;class b1{constructor(e,r){q(this,"opts");q(this,"root");W(this,fs,Te(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=e,this.root=r,Ar({...e,deps:()=>this.root.opts.open.current,onRefChange:n=>{this.root.descriptionNode=n,this.root.descriptionId=n==null?void 0:n.id}})}get props(){return p(S(this,fs))}}fs=new WeakMap;class y1{constructor(e,r){q(this,"opts");q(this,"root");W(this,hs,Te(()=>({open:this.root.opts.open.current})));W(this,ps,Te(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=e,this.root=r,Ar({...e,deps:()=>this.root.opts.open.current,onRefChange:n=>{this.root.contentNode=n,this.root.contentId=n==null?void 0:n.id}})}get snippetProps(){return p(S(this,hs))}get props(){return p(S(this,ps))}}hs=new WeakMap,ps=new WeakMap;class w1{constructor(e,r){q(this,"opts");q(this,"root");W(this,gs,Te(()=>({open:this.root.opts.open.current})));W(this,ms,Te(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=e,this.root=r,Ar({...e,deps:()=>this.root.opts.open.current})}get snippetProps(){return p(S(this,gs))}get props(){return p(S(this,ms))}}gs=new WeakMap,ms=new WeakMap;const Oo=new dc("Dialog.Root");function _1(t){return Oo.set(new g1(t))}function k1(t){return new v1(t,Oo.get())}function x1(t){return new y1(t,Oo.get())}function S1(t){return new w1(t,Oo.get())}function T1(t){return new b1(t,Oo.get())}function E1(t){return new m1(t,Oo.get())}var C1=Y("<div><!></div>");function Nf(t,e){Ae(e,!0);let r=k(e,"id",23,It),n=k(e,"ref",15,null),o=k(e,"child",7),a=k(e,"children",7),i=k(e,"level",7,2),s=kr(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const l=k1({id:ee.with(()=>r()),level:ee.with(()=>i()),ref:ee.with(()=>n(),h=>n(h))}),c=Te(()=>fr(s,l.props));var u=ne(),d=V(u);{var f=h=>{var m=ne(),y=V(m);ut(y,o,()=>({props:p(c)})),T(h,m)},v=h=>{var m=C1();let y;var g=P(m);ut(g,()=>a()??Ge),O(m),se(()=>y=Kt(m,y,{...p(c)})),T(h,m)};ce(d,h=>{o()?h(f):h(v,!1)})}return T(t,u),Re({get id(){return r()},set id(h=It()){r(h),_()},get ref(){return n()},set ref(h=null){n(h),_()},get child(){return o()},set child(h){o(h),_()},get children(){return a()},set children(h){a(h),_()},get level(){return i()},set level(h=2){i(h),_()}})}Oe(Nf,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function Pf(t,e,r,n){const o=Array.isArray(e)?e:[e];return o.forEach(a=>t.addEventListener(a,r,n)),()=>{o.forEach(a=>t.removeEventListener(a,r,n))}}class Lf{constructor(e,r={bubbles:!0,cancelable:!0}){q(this,"eventName");q(this,"options");this.eventName=e,this.options=r}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,r){const n=this.createEvent(r);return e.dispatchEvent(n),n}listen(e,r,n){const o=a=>{r(a)};return Lt(e,this.eventName,o,n)}}function Mf(t,e=500){let r=null;const n=(...o)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...o)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function gc(t,e){return t===e||t.contains(e)}function Df(t){return(t==null?void 0:t.ownerDocument)??document}function A1(t,e){const{clientX:r,clientY:n}=t,o=e.getBoundingClientRect();return r<o.left||r>o.right||n<o.top||n>o.bottom}globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);class R1{constructor(e){W(this,Fo);q(this,"opts");W(this,Lo);W(this,Un);W(this,En,{pointerdown:!1});W(this,Mo,!1);W(this,Do,!1);q(this,"node",ee(null));W(this,Cn);W(this,Ya);W(this,Qa,Ie(null));W(this,dn,Ye);W(this,vs,e=>{e.defaultPrevented||this.currNode&&La(()=>{var r,n;!this.currNode||S(this,ks).call(this,e.target)||e.target&&!S(this,Do)&&((n=(r=S(this,Ya)).current)==null||n.call(r,e))})});W(this,bs,e=>{let r=e;r.defaultPrevented&&(r=Ff(e)),S(this,Lo).current(e)});W(this,zo,Mf(e=>{if(!this.currNode){S(this,dn).call(this);return}const r=this.opts.isValidEvent.current(e,this.currNode)||P1(e,this.currNode);if(!S(this,Mo)||Wn(this,Fo,yh).call(this)||!r){S(this,dn).call(this);return}let n=e;if(n.defaultPrevented&&(n=Ff(n)),S(this,Un).current!=="close"&&S(this,Un).current!=="defer-otherwise-close"){S(this,dn).call(this);return}e.pointerType==="touch"?(S(this,dn).call(this),Ct(this,dn,Pf(S(this,Cn),"click",S(this,bs),{once:!0}))):S(this,Lo).current(n)},10));W(this,ys,e=>{S(this,En)[e.type]=!0});W(this,ws,e=>{S(this,En)[e.type]=!1});W(this,_s,()=>{this.node.current&&Ct(this,Mo,N1(this.node.current))});W(this,ks,e=>this.node.current?gc(this.node.current,e):!1);W(this,Ja,Mf(()=>{for(const e in S(this,En))S(this,En)[e]=!1;Ct(this,Mo,!1)},20));W(this,xs,()=>{Ct(this,Do,!0)});W(this,Ss,()=>{Ct(this,Do,!1)});q(this,"props",{onfocuscapture:S(this,xs),onblurcapture:S(this,Ss)});this.opts=e,Ar({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),Ct(this,Un,e.interactOutsideBehavior),Ct(this,Lo,e.onInteractOutside),Ct(this,Ya,e.onFocusOutside),wt(()=>{Ct(this,Cn,Df(this.currNode))});let r=Ye;const n=()=>{S(this,Ja).call(this),globalThis.bitsDismissableLayers.delete(this),S(this,zo).destroy(),r()};nr([()=>this.opts.enabled.current,()=>this.currNode],([o,a])=>{if(!(!o||!a))return fc(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,S(this,Un)),r(),r=Wn(this,Fo,bh).call(this))}),n}),Cf(()=>{S(this,Ja).destroy(),globalThis.bitsDismissableLayers.delete(this),S(this,zo).destroy(),S(this,dn).call(this),r()})}get currNode(){return p(S(this,Qa))}set currNode(e){A(S(this,Qa),Se(e))}}Lo=new WeakMap,Un=new WeakMap,En=new WeakMap,Mo=new WeakMap,Do=new WeakMap,Cn=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,dn=new WeakMap,vs=new WeakMap,Fo=new WeakSet,bh=function(){return Zn(Lt(S(this,Cn),"pointerdown",Zn(S(this,ys),S(this,_s)),{capture:!0}),Lt(S(this,Cn),"pointerdown",Zn(S(this,ws),S(this,zo))),Lt(S(this,Cn),"focusin",S(this,vs)))},bs=new WeakMap,zo=new WeakMap,ys=new WeakMap,ws=new WeakMap,_s=new WeakMap,ks=new WeakMap,Ja=new WeakMap,yh=function(){return Object.values(S(this,En)).some(Boolean)},xs=new WeakMap,Ss=new WeakMap;function I1(t){return new R1(t)}function O1(t){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function N1(t){const e=[...globalThis.bitsDismissableLayers],r=O1(e);if(r)return r[0].node.current===t;const[n]=e[0];return n.node.current===t}function P1(t,e){if("button"in t&&t.button>0)return!1;const r=t.target;return c1(r)?Df(r).documentElement.contains(r)&&!gc(e,r)&&A1(t,e):!1}function Ff(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let o=!1;return new Proxy(n,{get:(i,s)=>s==="currentTarget"?e:s==="target"?r:s==="preventDefault"?()=>{o=!0,typeof i.preventDefault=="function"&&i.preventDefault()}:s==="defaultPrevented"?o:s in i?i[s]:t[s]})}function zf(t,e){Ae(e,!0);let r=k(e,"interactOutsideBehavior",7,"close"),n=k(e,"onInteractOutside",7,Ye),o=k(e,"onFocusOutside",7,Ye),a=k(e,"id",7),i=k(e,"children",7),s=k(e,"enabled",7),l=k(e,"isValidEvent",7,()=>!1);const c=I1({id:ee.with(()=>a()),interactOutsideBehavior:ee.with(()=>r()),onInteractOutside:ee.with(()=>n()),enabled:ee.with(()=>s()),onFocusOutside:ee.with(()=>o()),isValidEvent:ee.with(()=>l())});var u=ne(),d=V(u);return ut(d,()=>i()??Ge,()=>({props:c.props})),T(t,u),Re({get interactOutsideBehavior(){return r()},set interactOutsideBehavior(f="close"){r(f),_()},get onInteractOutside(){return n()},set onInteractOutside(f=Ye){n(f),_()},get onFocusOutside(){return o()},set onFocusOutside(f=Ye){o(f),_()},get id(){return a()},set id(f){a(f),_()},get children(){return i()},set children(f){i(f),_()},get enabled(){return s()},set enabled(f){s(f),_()},get isValidEvent(){return l()},set isValidEvent(f=()=>!1){l(f),_()}})}Oe(zf,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0),globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);class L1{constructor(e){q(this,"opts");W(this,Ts,()=>Lt(document,"keydown",S(this,Es),{passive:!1}));W(this,Es,e=>{if(e.key!==i1||!D1(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)});this.opts=e;let r=Ye;nr(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=S(this,Ts).call(this)),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}}Ts=new WeakMap,Es=new WeakMap;function M1(t){return new L1(t)}function D1(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([o,{current:a}])=>a==="close"||a==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function Bf(t,e){Ae(e,!0);let r=k(e,"escapeKeydownBehavior",7,"close"),n=k(e,"onEscapeKeydown",7,Ye),o=k(e,"children",7),a=k(e,"enabled",7);M1({escapeKeydownBehavior:ee.with(()=>r()),onEscapeKeydown:ee.with(()=>n()),enabled:ee.with(()=>a())});var i=ne(),s=V(i);return ut(s,()=>o()??Ge),T(t,i),Re({get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(l="close"){r(l),_()},get onEscapeKeydown(){return n()},set onEscapeKeydown(l=Ye){n(l),_()},get children(){return o()},set children(l){o(l),_()},get enabled(){return a()},set enabled(l){a(l),_()}})}Oe(Bf,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const Sn=ee([]);function F1(){return{add(t){const e=Sn.current[0];e&&t.id!==e.id&&e.pause(),Sn.current=qf(Sn.current,t),Sn.current.unshift(t)},remove(t){var e;Sn.current=qf(Sn.current,t),(e=Sn.current[0])==null||e.resume()},get current(){return Sn.current}}}function z1(){let t=Ie(!1),e=Ie(!1);return{id:It(),get paused(){return p(t)},get isHandlingFocus(){return p(e)},set isHandlingFocus(r){A(e,Se(r))},pause(){A(t,!0)},resume(){A(t,!1)}}}function qf(t,e){return[...t].filter(r=>r.id!==e.id)}function B1(t){return t.filter(e=>e.tagName!=="A")}function Tn(t,{select:e=!1}={}){if(!(t&&t.focus)||document.activeElement===t)return;const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&u1(t)&&e&&t.select()}function q1(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Tn(n,{select:e}),document.activeElement!==r)return!0}function jf(t,e){for(const r of t)if(!d1(r,e))return r}function $f(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function j1(t){const e=$f(t),r=jf(e,t),n=jf(e.reverse(),t);return[r,n]}/*!
1029
+ transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function rf(t,e){const r=Rl(e,["children","$$slots","$$events","$$legacy","$$host"]),n=Rl(r,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);Ee(e,!1),ia(t,W0);const[o,a]=Jt(),i=()=>gt(I,"$toasts",o),s=()=>gt(pe,"$heights",o),c=Le(),l=Le(),u=3,f="32px",d=356,m=14,h="dark",v="light";function y(M){return M!=="system"?M:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?h:v}function g(){if(typeof window>"u"||typeof document>"u")return"ltr";const M=document.documentElement.getAttribute("dir");return M==="auto"||!M?window.getComputedStyle(document.documentElement).direction:M}let w=k(e,"invert",12,!1),b=k(e,"theme",12,"light"),S=k(e,"position",12,"bottom-right"),E=k(e,"hotkey",28,()=>["altKey","KeyT"]),P=k(e,"containerAriaLabel",12,"Notifications"),F=k(e,"richColors",12,!1),O=k(e,"expand",12,!1),$=k(e,"duration",12,4e3),J=k(e,"visibleToasts",12,u),ae=k(e,"closeButton",12,!1),B=k(e,"toastOptions",28,()=>({})),X=k(e,"offset",12,null),ie=k(e,"dir",28,g);const{toasts:I,heights:pe,reset:xe}=mr;let Y=Le(!1),V=Le(!1),re=Le(y(b())),ee=Le(),ye=null,Se=!1;ng(()=>{p(ee)&&ye&&(ye.focus({preventScroll:!0}),ye=null,Se=!1)}),Ai(()=>{xe();const M=Te=>{var Rt,ir;E().every(Yr=>Te[Yr]||Te.code===Yr)&&(A(Y,!0),(Rt=p(ee))==null||Rt.focus()),Te.code==="Escape"&&(document.activeElement===p(ee)||(ir=p(ee))!=null&&ir.contains(document.activeElement))&&A(Y,!1)};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}});function _e(M){Se&&!M.currentTarget.contains(M.relatedTarget)&&(Se=!1,ye&&(ye.focus({preventScroll:!0}),ye=null))}function $e(M){Se||(Se=!0,ye=M.relatedTarget)}Ze(()=>(Ge(S()),i()),()=>{A(c,Array.from(new Set([S(),...i().filter(M=>M.position).map(M=>M.position)].filter(Boolean))))}),Ze(()=>Ge(E()),()=>{A(l,E().join("+").replace(/Key/g,"").replace(/Digit/g,""))}),Ze(()=>i(),()=>{i().length<=1&&A(Y,!1)}),Ze(()=>i(),()=>{const M=i().filter(Te=>Te.dismiss&&!Te.delete);if(M.length>0){const Te=i().map(Dt=>M.find(ir=>ir.id===Dt.id)?{...Dt,delete:!0}:Dt);I.set(Te)}}),Ze(()=>Ge(b()),()=>{if(b()!=="system"&&A(re,b()),typeof window<"u"){b()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A(re,h):A(re,v));const M=window.matchMedia("(prefers-color-scheme: dark)"),Te=({matches:Dt})=>{A(re,Dt?h:v)};"addEventListener"in M?M.addEventListener("change",Te):M.addListener(Te)}}),il(),po();var et=he(),bt=te(et);{var rt=M=>{var Te=V0();Pe(Te,"tabindex",-1),Sr(Te,5,()=>p(c),zr,(Dt,Rt,ir,Yr)=>{var T=G0();let j;Sr(T,7,()=>i().filter(H=>!H.position&&ir===0||H.position===p(Rt)),H=>H.id,(H,q,de,ue)=>{const ke=_t(()=>{var Be;return((Be=B())==null?void 0:Be.actionButtonStyle)||""}),We=_t(()=>{var Be;return((Be=B())==null?void 0:Be.cancelButtonStyle)||""}),Re=_t(()=>{var Be;return((Be=B())==null?void 0:Be.class)||""}),qe=_t(()=>{var Be;return((Be=B())==null?void 0:Be.descriptionClass)||""}),Ke=_t(()=>B().classes||{}),we=_t(()=>{var Be;return((Be=B())==null?void 0:Be.duration)??$()}),it=_t(()=>B().unstyled||!1);tf(H,{get index(){return p(de)},get toast(){return p(q)},get invert(){return w()},get visibleToasts(){return J()},get closeButton(){return ae()},get interacting(){return p(V)},get position(){return p(Rt)},get expandByDefault(){return O()},get expanded(){return p(Y)},get actionButtonStyle(){return p(ke)},get cancelButtonStyle(){return p(We)},get class(){return p(Re)},get descriptionClass(){return p(qe)},get classes(){return p(Ke)},get duration(){return p(we)},get unstyled(){return p(it)},$$slots:{"loading-icon":(Be,yr)=>{var fe=he(),at=te(fe);Tr(at,e,"loading-icon",{},dt=>{const Qr=_t(()=>p(q).type==="loading");Qd(dt,{get visible(){return p(Qr)}})}),C(Be,fe)},"success-icon":(Be,yr)=>{var fe=he(),at=te(fe);Tr(at,e,"success-icon",{},dt=>{Na(dt,{type:"success"})}),C(Be,fe)},"error-icon":(Be,yr)=>{var fe=he(),at=te(fe);Tr(at,e,"error-icon",{},dt=>{Na(dt,{type:"error"})}),C(Be,fe)},"warning-icon":(Be,yr)=>{var fe=he(),at=te(fe);Tr(at,e,"warning-icon",{},dt=>{Na(dt,{type:"warning"})}),C(Be,fe)},"info-icon":(Be,yr)=>{var fe=he(),at=te(fe);Tr(at,e,"info-icon",{},dt=>{Na(dt,{type:"info"})}),C(Be,fe)}}})}),N(T),qr(T,H=>A(ee,H),()=>p(ee)),le((H,q,de)=>{var ue;j=Qt(T,j,{tabIndex:-1,class:r.class,"data-sonner-toaster":!0,"data-theme":p(re),"data-rich-colors":F(),dir:H,"data-y-position":q,"data-x-position":de,style:r.style,...n,[ho]:{"--front-toast-height":`${(ue=s()[0])==null?void 0:ue.height}px`,"--offset":typeof X()=="number"?`${X()}px`:X()||f,"--width":`${d}px`,"--gap":`${m}px`}},"svelte-1fo5d1m"),T.dir=T.dir},[()=>ie()==="auto"?g():ie(),()=>p(Rt).split("-")[0],()=>p(Rt).split("-")[1]],_t),ct("blur",T,_e),ct("focus",T,$e),ct("mouseenter",T,()=>A(Y,!0)),ct("mousemove",T,()=>A(Y,!0)),ct("mouseleave",T,()=>{p(V)||A(Y,!1)}),ct("pointerdown",T,()=>A(V,!0)),ct("pointerup",T,()=>A(V,!1)),C(Dt,T)}),N(Te),le(()=>Pe(Te,"aria-label",`${P()} ${p(l)}`)),C(M,Te)};ce(bt,M=>{i().length>0&&M(rt)})}C(t,et);var se=Ae({get invert(){return w()},set invert(M){w(M),_()},get theme(){return b()},set theme(M){b(M),_()},get position(){return S()},set position(M){S(M),_()},get hotkey(){return E()},set hotkey(M){E(M),_()},get containerAriaLabel(){return P()},set containerAriaLabel(M){P(M),_()},get richColors(){return F()},set richColors(M){F(M),_()},get expand(){return O()},set expand(M){O(M),_()},get duration(){return $()},set duration(M){$(M),_()},get visibleToasts(){return J()},set visibleToasts(M){J(M),_()},get closeButton(){return ae()},set closeButton(M){ae(M),_()},get toastOptions(){return B()},set toastOptions(M){B(M),_()},get offset(){return X()},set offset(M){X(M),_()},get dir(){return ie()},set dir(M){ie(M),_()}});return a(),se}Ie(rf,{invert:{},theme:{},position:{},hotkey:{},containerAriaLabel:{},richColors:{},expand:{},duration:{},visibleToasts:{},closeButton:{},toastOptions:{},offset:{},dir:{}},["loading-icon","success-icon","error-icon","warning-icon","info-icon"],[],!0);const K0='@layer base{*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;font-family:theme("fontFamily.sans",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-variation-settings:theme("fontFamily.sans[1].fontVariationSettings",normal);font-feature-settings:theme("fontFamily.sans[1].fontFeatureSettings",normal);-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;border-top-width:1px;color:inherit}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-weight:inherit;font-size:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-size:1em;font-family:theme("fontFamily.mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-variation-settings:theme("fontFamily.mono[1].fontVariationSettings",normal);font-feature-settings:theme("fontFamily.mono[1].fontFeatureSettings",normal)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;border-collapse:collapse;text-indent:0}button,input,optgroup,select,textarea{margin:0;padding:0;color:inherit;font-weight:inherit;font-size:100%;line-height:inherit;font-family:inherit;font-variation-settings:inherit;font-feature-settings:inherit;letter-spacing:inherit}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-image:none;background-color:transparent}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:theme("colors.gray.400",#9ca3af);opacity:1}input::placeholder,textarea::placeholder{color:theme("colors.gray.400",#9ca3af);opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}}@value container-sm,container-md,container-lg from "./viewports.css";.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-80: 5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--font-xs: .75em;--font-body: 1rem;--font-h3: clamp(1.125rem, .9545rem + .8523cqw, 1.5rem);--font-h2: clamp(1.25rem, .7955rem + 2.2727cqw, 2.25rem);--font-h1: clamp(1.5rem, .8182rem + 3.4091cqw, 3rem);--font-weight-normal: 400;--font-weight-bold: 700;--line-height-default: 1.5;--line-height-tight: 1.25;--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--ease-out-quart: cubic-bezier(.165, .84, .44, 1)}@layer base{.chat-app{container-name:chat-app;container-type:inline-size;height:100%;transform:scale(1);background:var(--body-background)}.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}.chat-app :where(b,strong){font-weight:var(--font-weight-bold)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app>*{color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--body-font-size, var(--font-body));line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.mounted :is(.chat-app :where(.fly-in)){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}}@layer components{.chat-app :where(.container){width:100%;max-width:1024px;margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-app (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-app (min-width: 768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(.text-container)>:where(h1){font-size:var(--font-h1)}.chat-app :where(.text-container)>:where(h2){font-size:var(--font-h2)}.chat-app :where(.text-container)>:where(h3){font-size:var(--font-h3)}.chat-app :where(.text-container)>:where(h4,h5,h6){font-size:var(--font-body)}.chat-app :where(.text-container)>:where(p,ul,ol,img){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)){color:var(--anchor-color);text-decoration:underline;text-underline-offset:.15em;transition-duration:var(--default-transition-duration);transition-property:color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)):hover{color:var(--anchor-hover-color);text-decoration:none}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.btn{display:block;padding:var(--spacer-r-8) var(--spacer-r-20);border-style:solid;font-size:var(--font-sm);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function)}.btn:disabled{cursor:not-allowed;opacity:.5}.btn--primary{border-width:var(--btn-primary-border-width);border-radius:var(--btn-primary-border-radius);border-color:var(--btn-primary-border-color);background:var(--btn-primary-background);box-shadow:var(--btn-primary-box-shadow);color:var(--btn-primary-color);font-weight:var(--btn-primary-font-weight, 700)}.btn--primary:hover{border-width:var(--btn-primary-hover-border-width, var(--btn-primary-border-width));border-radius:var(--btn-primary-hover-border-radius, var(--btn-primary-border-radius));border-color:var(--btn-primary-hover-border-color, var(--btn-primary-border-color));background:var(--btn-primary-hover-background, var(--btn-primary-background));box-shadow:var(--btn-primary-hover-box-shadow, var(--btn-primary-box-shadow));color:var(--btn-primary-hover-color, var(--btn-primary-color))}.btn--secondary{border-width:var(--btn-secondary-border-width);border-radius:var(--btn-secondary-border-radius);border-color:var(--btn-secondary-border-color);background:var(--btn-secondary-background);box-shadow:var(--btn-secondary-box-shadow);color:var(--btn-secondary-color);font-weight:var(--btn-secondary-font-weight, 700)}.btn--secondary:hover{border-width:var(--btn-secondary-hover-border-width, var(--btn-secondary-border-width));border-radius:var(--btn-secondary-hover-border-radius, var(--btn-secondary-border-radius));border-color:var(--btn-secondary-hover-border-color, var(--btn-secondary-border-color));background:var(--btn-secondary-hover-background, var(--btn-secondary-background));box-shadow:var(--btn-secondary-hover-box-shadow, var(--btn-secondary-box-shadow));color:var(--btn-secondary-hover-color, var(--btn-secondary-color))}.btn--tertiary{border-width:var(--btn-tertiary-border-width);border-radius:var(--btn-tertiary-border-radius);border-color:var(--btn-tertiary-border-color);background:var(--btn-tertiary-background);box-shadow:var(--btn-tertiary-box-shadow);color:var(--btn-tertiary-color);font-weight:var(--btn-tertiary-font-weight, 700)}.btn--tertiary:hover{border-width:var(--btn-tertiary-hover-border-width, var(--btn-tertiary-border-width));border-radius:var(--btn-tertiary-hover-border-radius, var(--btn-tertiary-border-radius));border-color:var(--btn-tertiary-hover-border-color, var(--btn-tertiary-border-color));background:var(--btn-tertiary-hover-background, var(--btn-tertiary-background));box-shadow:var(--btn-tertiary-hover-box-shadow, var(--btn-tertiary-box-shadow));color:var(--btn-tertiary-hover-color, var(--btn-tertiary-color))}}@layer components{.form{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacer-r-20)}.form__item{display:flex;flex-direction:column;width:100%;gap:var(--spacer-5)}.form__label{color:var(--label-color, inherit);font-weight:var(--label-font-weight, inherit)}}@layer components{.chat-input{position:relative}.chat-input__textarea{box-sizing:border-box;display:block;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em 1.2em;border-width:var(--chat-input-border-width);border-style:solid;border-radius:var(--chat-input-border-radius);border-color:var(--chat-input-border-color);background:var(--chat-input-background);box-shadow:var(--chat-input-box-shadow);color:var(--chat-input-color);resize:none}.chat-input__textarea:focus-visible{border-width:var(--chat-input-focus-border-width, var(--chat-input-border-width));border-radius:var(--chat-input-focus-border-radius, var(--chat-input-border-radius));border-color:var(--chat-input-focus-border-color, var(--chat-input-border-color));outline-color:transparent;background:var(--chat-input-focus-background, var(--chat-input-background));box-shadow:var(--chat-input-focus-box-shadow, var(--chat-input-box-shadow));color:var(--chat-input-focus-color, var(--chat-input-focus-color))}@container chat-app (min-width: 640px){.chat-input__textarea{padding:1.25em var(--spacer-80) 1.25em 1.75em}}.chat-input__submit-button{--margin: .5em;display:flex;position:absolute;right:calc(var(--margin) + var(--chat-input-border-width, 0px));bottom:calc(var(--margin) + var(--chat-input-border-width, 0px));align-items:center;justify-content:center;width:2.5em;height:2.5em;border-width:var(--chat-input-submit-border-width, 0px);border-radius:var(--chat-input-submit-border-radius);border-color:var(--chat-input-submit-border-color);background:var(--chat-input-submit-background);box-shadow:var(--chat-input-submit-box-shadow);color:var(--chat-input-submit-color);cursor:pointer;transition-duration:.2s,.2s,.35s;transition-property:opacity,background-color,transform;transition-timing-function:ease}.chat-input__submit-button:hover{border-width:var(--chat-input-submit-hover-border-width, var(--chat-input-submit-border-width));border-radius:var(--chat-input-submit-hover-border-radius, var(--chat-input-submit-border-radius));border-color:var(--chat-input-submit-hover-border-color, var(--chat-input-submit-border-color));background:var(--chat-input-submit-hover-background, var(--chat-input-submit-background));box-shadow:var(--chat-input-submit-hover-box-shadow, var(--chat-input-submit-box-shadow));color:var(--chat-input-submit-hover-color, var(--chat-input-submit-color))}@container chat-app (min-width: 640px){.chat-input__submit-button{--margin: .75em}}.chat-input__submit-button--deactivated{transform:scale(var(--chat-input-submit-deactivated-scale, .8));border-color:var(--chat-input-submit-deactivated-border-color, var(--chat-input-submit-border-color));background:var(--chat-input-submit-deactivated-background, var(--chat-input-submit-background));cursor:default;opacity:var(--chat-input-submit-deactivated-opacity, .5);pointer-events:none}.chat-input__submit-icon{width:var(--spacer-20);height:var(--spacer-20)}}@layer components{.chat-menu{position:fixed;top:var(--spacer-16);right:var(--spacer-16)}@container chat-app (min-width: 640px){.chat-menu{top:var(--spacer-12);right:var(--spacer-12)}}.chat-menu__trigger{padding:var(--spacer-4)}.chat-menu__trigger:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.chat-menu__content{z-index:100;position:absolute;width:95vw;max-width:300px;padding:var(--spacer-r-12);border-width:var(--chat-menu-border-width);border-style:solid;border-radius:var(--chat-menu-border-radius);border-color:var(--chat-menu-border-color);background:var(--chat-menu-background);box-shadow:var(--chat-menu-box-shadow)}.chat-menu__list{display:flex;flex-direction:column;gap:1px}.chat-menu__item{display:flex;align-items:center;width:100%;padding:var(--spacer-4);gap:var(--spacer-4);border-radius:var(--chat-menu-item-border-radius);background:var(--chat-menu-item-background);color:var(--chat-menu-item-color)}.chat-menu__item:hover{background:var(--chat-menu-item-hover-background);color:var(--chat-menu-item-hover-color)}.chat-menu__item.active{background:var(--chat-menu-item-active-background);color:var(--chat-menu-item-active-color)}.chat-menu__item-icon{width:1em;height:1em;color:currentColor}.chat-menu__title{margin-bottom:var(--spacer-8);color:var(--chat-menu-title-color);font-size:var(--font-small)}.chat-menu__separator{margin:var(--spacer-r-12) 0;border-top:1px solid var(--chat-menu-separator-color)}.chat-menu__language-translation{opacity:.5}}@layer components{.chat-page{position:relative;height:100%;overflow:hidden}.chat-page__body{height:100%;padding-top:var(--spacer-48);overflow-y:auto;scrollbar-gutter:stable}.chat-page__messages{display:flex;flex-direction:column;min-height:100%;gap:var(--spacer-r-40)}.chat-page__footer{position:fixed;right:0;bottom:0;left:0}.chat-page__footer-content{display:flex;flex-direction:column;padding-bottom:var(--spacer-r-8);gap:var(--spacer-r-8);border-width:var(--chat-footer-border-width);border-style:solid;border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);border-color:var(--chat-footer-border-color);background:var(--chat-footer-background);box-shadow:var(--chat-footer-box-shadow);color:var(--chat-footer-color)}.chat-page__footer-text{font-size:var(--font-xs);text-align:center;text-wrap:balance}.chat-page__footer-text :where(a){text-decoration:underline;text-underline-offset:.15em}.chat-page__buttons{display:flex;flex-direction:row;align-self:center;margin-top:auto;margin-bottom:calc(var(--chat-footer-height) + var(--spacer-r-80));gap:var(--spacer-12)}.chat-page__scroll-to-bottom{position:absolute;top:0;left:50%;padding:var(--spacer-4);transform:translate(-50%,-150%);opacity:1}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0}}@layer components{.dialog-overlay{z-index:50;position:fixed;top:0;right:0;bottom:0;left:0;background:var(--dialog-background-overlay)}.dialog-content{z-index:51;position:fixed;top:50%;left:50%;width:calc(100% - var(--spacer-32));max-width:600px;transform:translate(-50%,-50%);border-width:var(--dialog-border-width);border-radius:var(--dialog-border-radius);border-color:var(--dialog-border-color);background:var(--dialog-background);box-shadow:var(--dialog-box-shadow, none)}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color, var(--dialog-border-color));font-weight:var(--dialog-header-font-weight, inherit);font-size:var(--dialog-header-font-size, inherit)}.dialog-title{padding:0}.dialog-close{justify-self:flex-end;margin-left:auto}.dialog-description{max-height:90cqh;padding:var(--spacer-r-24);overflow-y:auto}}@layer components{.introduction{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--spacer-r-16)}.introduction__avatar{width:var(--spacer-r-80);height:var(--spacer-r-80)}.introduction__title{font-size:var(--font-h3);text-align:center;text-wrap:balance}}@layer components{.message{display:flex}.message--bot{justify-content:flex-start;width:100%}.message--bot :where(.message__content){width:100%}.message--user{justify-content:flex-end}.message--user :where(.message__content){padding:var(--spacer-8) var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color)}.message--bot-error{color:var(--message-error-color)}}.message__bot-layout{display:flex;width:100%;gap:var(--spacer-r-16)}.message__bot-avatar{position:sticky;top:var(--spacer-r-16);flex-shrink:0;width:var(--spacer-24);height:var(--spacer-24);margin-top:calc(var(--spacer-1) * -1);margin-bottom:var(--spacer-20)}@container chat-app (min-width: 640px){.message__bot-avatar{width:var(--spacer-32);height:var(--spacer-32);margin-top:calc(var(--spacer-5) * -1);margin-bottom:var(--spacer-16)}}.message__content,.message__bot-body,.message__bot-options{min-width:0}.message__bot-body{width:100%}.message__bot-options{margin-top:var(--spacer-24);padding-top:var(--spacer-12);border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color)}@container chat-app (min-width: 640px){.message__bot-options{position:relative;min-height:var(--spacer-64);margin-top:var(--spacer-32);padding-top:0}}@container chat-app (min-width: 640px){.message__bot-references{padding-top:var(--spacer-20)}}.message__bot-actions{display:flex;position:relative;margin-left:calc(var(--spacer-8) * -1)}@container chat-app (min-width: 640px){.message__bot-actions{position:absolute;top:var(--spacer-16);right:0;gap:var(--spacer-8)}}.message__bot-action{display:flex;align-items:center;justify-content:center;width:var(--spacer-40);height:var(--spacer-40);color:var(--anchor-color)}.message__bot-action:hover{color:var(--anchor-hover-color, var(--anchor-color))}@layer components{.predefined-question{display:flex;flex-direction:column;padding:var(--spacer-r-16);gap:var(--spacer-r-12);border-width:var(--card-border-width);border-radius:var(--card-border-radius);border-color:var(--card-border-color);background:var(--card-background);box-shadow:var(--card-box-shadow, none);color:var(--card-color);text-align:left;cursor:pointer}.predefined-question:hover{border-width:var(--card-hover-border-width, var(--card-border-width));border-radius:var(--card-hover-border-radius, var(--card-border-radius));border-color:var(--card-hover-border-color, var(--card-border-color));background:var(--card-hover-background, var(--card-background));box-shadow:var(--card-hover-box-shadow, var(--card-box-shadow), none);color:var(--card-hover-color, var(--card-color))}.predefined-question:hover :where(.predefined-question__icon){color:var(--card-icon-hover-color)}.predefined-question__icon{color:var(--card-icon-color)}}@layer components{.predefined-questions{display:grid;width:100%;gap:var(--spacer-r-12)}@container chat-app (min-width: 640px){.predefined-questions{grid-template-columns:repeat(3,1fr)}}}@layer components{.reference-number{display:inline-block;position:relative}.reference-number__trigger{box-sizing:border-box;display:inline-block;position:relative;top:-1px;min-width:1.5em;height:1.5em;margin:0 .1em;padding:1px .4em 0;border-width:var(--reference-number-trigger-border-width);border-radius:var(--reference-number-trigger-border-radius);border-color:var(--reference-number-trigger-border-color);background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);color:var(--reference-number-trigger-color);font-weight:var(--font-weight-bold);font-size:var(--font-xs);line-height:1.25;text-align:center;text-decoration:none;cursor:pointer}.reference-number__trigger:hover{background:var(--reference-number-trigger-hover-background);color:var(--reference-number-trigger-hover-color)}.reference-number__trigger:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.reference-number__content-wrapper{z-index:102;position:absolute;width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width)}.reference-number__content{display:block;padding:var(--spacer-r-20);border-width:var(--reference-number-content-border-width);border-style:solid;border-radius:var(--reference-number-content-border-radius);border-color:var(--reference-number-content-border-color);background:var(--reference-number-content-background);box-shadow:var(--reference-number-content-box-shadow)}.reference-number__content:hover{border-width:var(--reference-number-content-hover-border-width, var(--reference-number-content-border-width));border-radius:var(--reference-number-content-hover-border-radius, var(--reference-number-content-border-radius));border-color:var(--reference-number-content-hover-border-color, var(--reference-number-content-border-color));background:var(--reference-number-content-hover-background, var(--reference-number-content-background));color:var(--reference-number-content-hover-color, var(--reference-number-content-color));cursor:pointer}.reference-number__content:hover :where(.reference-number__domain){background:var(--reference-number-domain-hover-background, var(--reference-number-domain-background));color:var(--reference-number-domain-hover-color, var(--reference-number-domain-color))}.reference-number__content:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference-number__content:after{z-index:101;position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;background:transparent;content:""}.reference-number__domain{display:inline-flex;max-width:100%;margin-top:var(--spacer-8);padding:var(--spacer-2) var(--spacer-10);border-width:var(--reference-number-domain-border-width);border-radius:var(--reference-number-domain-border-radius);border-color:var(--reference-number-domain-border-color);background:var(--reference-number-domain-background);box-shadow:var(--reference-number-domain-box-shadow);color:var(--reference-number-domain-color);font-weight:700;font-size:var(--font-xs)}@container chat-app (min-width: 1024px){.reference-number__domain{max-width:50%}}}@layer components{.reference{display:flex;padding:var(--spacer-12) var(--spacer-12) var(--spacer-16) var(--spacer-16);gap:var(--spacer-12);border-width:var(--reference-border-width);border-radius:var(--reference-border-radius);border-color:var(--reference-border-color);background:var(--reference-background);box-shadow:var(--reference-box-shadow);color:var(--reference-color);cursor:pointer}@container chat-app (min-width: 1024px){.reference{align-items:center;padding:var(--spacer-16) var(--spacer-16) var(--spacer-16) var(--spacer-20)}}.reference:hover{border-width:var(--reference-hover-border-width, var(--reference-border-width));border-radius:var(--reference-hover-border-radius, var(--reference-border-radius));border-color:var(--reference-hover-border-color, var(--reference-border-color));background:var(--reference-hover-background, var(--reference-background));box-shadow:var(--reference-hover-box-shadow, var(--reference-box-shadow), none);color:var(--reference-hover-color, var(--reference-color))}.reference:hover :where(.reference__numeral){color:var(--reference-numeral-hover-color)}.reference:hover :where(.reference__domain){border-width:var(--reference-domain-hover-border-width, var(--reference-domain-border-width));border-radius:var(--reference-domain-hover-border-radius, var(--reference-domain-border-radius));border-color:var(--reference-domain-hover-border-color, var(--reference-domain-border-color));background:var(--reference-domain-hover-background, var(--reference-domain-background));box-shadow:var(--reference-domain-hover-box-shadow, var(--reference-domain-box-shadow));color:var(--reference-domain-hover-color, var(--reference-domain-color))}.reference:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference__numeral{display:block;min-width:.9em;color:var(--reference-numeral-color);font-weight:700}.reference__body,.reference__domain{min-width:0}.reference__body{display:flex;flex-grow:1;flex-direction:column;align-items:flex-start;gap:var(--spacer-10)}@container chat-app (min-width: 1024px){.reference__body{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--spacer-20)}}@container chat-app (min-width: 1024px){.reference__title{-webkit-line-clamp:1}}.reference__domain{display:inline-flex;max-width:100%;padding:var(--spacer-2) var(--spacer-10);border-width:var(--reference-domain-border-width);border-radius:var(--reference-domain-border-radius);border-color:var(--reference-domain-border-color);background:var(--reference-domain-background);box-shadow:var(--reference-domain-box-shadow);color:var(--reference-domain-color);font-weight:700;font-size:var(--font-xs)}@container chat-app (min-width: 1024px){.reference__domain{max-width:50%}}.reference__icon{position:relative;flex-shrink:0;align-self:flex-end;margin-bottom:var(--spacer-2);color:var(--anchor-color)}@container chat-app (min-width: 1024px){.reference__icon{margin-top:0}}}@layer components{.references__trigger{display:flex;align-items:center;padding:var(--references-trigger-padding, var(--spacer-5) 0);gap:var(--spacer-4);border-width:var(--references-trigger-border-width);border-radius:var(--references-trigger-border-radius);border-color:var(--references-trigger-border-color);background:var(--references-trigger-background);box-shadow:var(--references-trigger-box-shadow);color:var(--references-trigger-color);font-weight:var(--references-trigger-font-weight, var(--font-weight-bold))}.references__trigger:hover{border-color:var(--references-trigger-hover-border-color);background:var(--references-trigger-hover-background);box-shadow:var(--references-trigger-hover-box-shadow);color:var(--references-trigger-hover-color)}.references__trigger[data-state=open] :where(.references__trigger-icon){transform:rotate(180deg)}.references__trigger-icon{transition:transform .2s}.references__container{display:flex;flex-direction:column;padding-top:var(--spacer-8);gap:var(--spacer-8)}.references__container :where(.fly-in){--fly-in-delay: .1s}.references__container :where(.fly-in):last-of-type{padding-bottom:var(--spacer-8)}@container chat-app (min-width: 640px){.references__container{padding-top:var(--spacer-12)}}}@layer components{.start-page{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-top:var(--spacer-r-20);padding-bottom:var(--spacer-r-20)}.start-page__introduction{margin-bottom:var(--spacer-r-48)}.start-page__chat-input{width:100%;margin-bottom:var(--spacer-r-32)}}@layer base{.toast{display:flex;align-items:center;width:100%;padding:var(--spacer-r-16);gap:var(--spacer-8);border-width:var(--toast-border-width, 1px);border-radius:var(--toast-border-radius);border-color:var(--toast-border-color, transparent);background:var(--toast-background);box-shadow:var(--toast-box-shadow);color:var(--toast-color)}.toast[data-type=success] svg{color:var(--toast-icon-success-color)}.toast[data-type=error] svg{color:var(--toast-icon-error-color)}.toast[data-type=warning] svg{color:var(--toast-icon-warning-color)}.toast[data-type=info] svg{color:var(--toast-icon-info-color)}}@layer components{.tooltip-container{display:inline-block;position:relative}.tooltip{z-index:10;position:absolute;padding:var(--spacer-3) var(--spacer-8);transform:translateY(0);border-radius:var(--tooltip-border-radius);background:var(--tooltip-background);color:var(--tooltip-color);font-size:var(--font-xs);white-space:nowrap;opacity:1;transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1)}.tooltip:after{position:absolute;border-width:5px;border-style:solid;content:""}.tooltip-top:after{bottom:-10px;left:50%;transform:translate(-50%);border-color:var(--tooltip-background) transparent transparent transparent}.tooltip-bottom:after{top:-10px;left:50%;transform:translate(-50%);border-color:transparent transparent var(--tooltip-background) transparent}.tooltip-left:after{top:50%;right:-10px;transform:translateY(-50%);border-color:transparent var(--tooltip-background) transparent transparent}.tooltip-right:after{top:50%;left:-10px;transform:translateY(-50%);border-color:transparent transparent transparent var(--tooltip-background)}.tooltip-hidden{transform:translateY(1rem);opacity:0;pointer-events:none}}@layer base,utilities,components;';class Y0{constructor(e){G(this,Ba,me(void 0));G(this,za,me(Mr(Sa.Start)));z(this,"client");z(this,"translation");z(this,"onModeChange",(e="light")=>{const{config:r,themeString:n}=cd(this.props.org,e);this.chatState.config=r,this.chatState.themeString=n,this.chatState.mode=e});z(this,"loadInitialState",async e=>{try{const r=await this.client.getUsedLanguages().catch(d=>(console.error("Failed to load used languages:",d),[])),n=fd(this.props.lang);this.translation=await wv(n,e);const o=await this.client.getPredefinedQuestions({url:window.location.href.replace(window.location.origin,""),language:n}).catch(d=>(console.warn("Failed to load predefined questions:",d),[])),a=await this.client.getMenu({url:window.location.href.replace(window.location.origin,""),language:n}).catch(d=>(console.warn("Failed to load menu:",d),[])),i=await this.client.getClassification({url:window.location.href.replace(window.location.origin,"")}).catch(d=>(console.warn("Failed to load classification:",d),{enabled:!1,impact:{enabled:!1,label:"",options:[]},quality:{enabled:!1,label:"",options:[]}})),s=await this.client.metadata,c="light",{config:l,themeString:u}=cd(e,c),f=s.mode==="maintenance";f&&this.showErrorToast("maintenanceModeError"),this.chatState={usedLanguages:r,language:n,predefinedQuestions:o,menu:a,config:l,themeString:u,isInMaintenance:f,history:this.props.devChatHistory?fv:[],mode:c,classification:i,feedbackOpenedId:void 0},Wd.subscribe(this.onModeChange.bind(this))}catch(r){Qi.error(r instanceof Error?r.message:"Failed to load the chatbot. Please reload the page.",{duration:1e4,unstyled:!0,classes:{toast:"toast"}})}});z(this,"onSubmit",e=>{const r=this.chatState.history.push({type:"user",time:new Date().toISOString(),message:e}),n={modes:this.props.modes?this.props.modes.trim().split(","):["formatting"]};this.client.chat(e,n).subscribe(o=>{"error"in o&&Qi.error(`Failed to chat: ${o.error}`,{duration:1e4,unstyled:!0,classes:{toast:"toast"}}),o.state==="streaming"||o.state==="done"?this.chatState.history[r]=o.payload:o.state==="loading"&&(this.chatState.history[r]={type:"bot-loading",time:new Date().toISOString()})})});z(this,"onStartConversation",e=>{const r=new URLSearchParams(window.location.search);r.set(od,encodeURIComponent(e)),Il(`?${r.toString()}`)});z(this,"onStartNewConversation",()=>{Il("?")});z(this,"showSuccessToast",e=>{Qi.success(this.translation[e],{unstyled:!0,duration:3e3,classes:{toast:"toast"}})});z(this,"showErrorToast",e=>{Qi.error(this.translation[e],{unstyled:!0,duration:3e3,classes:{toast:"toast"}})});z(this,"submitFeedback",async({email:e,body:r,classification:n})=>{const o=this.chatState.feedbackOpenedId;try{n&&await this.client.classification({...n,messageId:o}),r&&await this.client.feedback({messageId:o,email:e,body:r}),this.showSuccessToast("thankYouForFeedback"),this.closeFeedback()}catch(a){console.error("Feedback failed:",a),this.showErrorToast("feedbackFailed")}});z(this,"openLatestFeedback",()=>{this.chatState.feedbackOpenedId=this.client.lastRequestId});z(this,"openFeedback",e=>{this.chatState.feedbackOpenedId=e});z(this,"closeFeedback",()=>{this.chatState.feedbackOpenedId=void 0});z(this,"giveQuickFeedback",e=>{try{this.client.quickFeedback(e)}catch(r){console.error("Quick feedback failed:",r),this.showErrorToast("feedbackFailed")}this.showSuccessToast("thankYouForFeedback")});z(this,"onNavigate",()=>{const r=new URLSearchParams(window.location.search).get(od);r?(this.pageState=Sa.Chat,this.chatState&&!this.props.devChatHistory&&(this.chatState.history=[],requestAnimationFrame(()=>{this.onSubmit(decodeURIComponent(r))}))):this.pageState=Sa.Start});z(this,"onStyleInit",e=>{dv(`${K0}
1030
+
1031
+ ${this.chatState.config.customCSS??""}`,e)});z(this,"onLanguageChange",e=>{_v(e),this.loadInitialState(this.props.org),Il("?")});this.props=e,this.client=new p0({apiUrl:e.apiUrl,apiKey:e.apiKey,strict:!0})}get chatState(){return p(x(this,Ba))}set chatState(e){A(x(this,Ba),e,!0)}get pageState(){return p(x(this,za))}set pageState(e){A(x(this,za),e,!0)}}Ba=new WeakMap,za=new WeakMap;var Q0=W('<div aria-hidden="true"><!></div>');function nr(t,e){Ee(e,!0);const[r,n]=Jt(),o=()=>gt(To,"$config",r);let a=k(e,"name",7),i=k(e,"class",7);var s=Q0(),c=D(s);fo(c,()=>o().theme.svgs[a()]),N(s),le(()=>At(s,1,`svg svg--${a()??""} ${i()??""}`)),C(t,s);var l=Ae({get name(){return a()},set name(u){a(u),_()},get class(){return i()},set class(u){i(u),_()}});return n(),l}Ie(nr,{name:{},class:{}},[],[],!0);const ic=Math.min,Ao=Math.max,Ji=Math.round,Gr=t=>({x:t,y:t}),J0={left:"right",right:"left",bottom:"top",top:"bottom"},X0={start:"end",end:"start"};function nf(t,e,r){return Ao(t,ic(e,r))}function Xi(t,e){return typeof t=="function"?t(e):t}function Vn(t){return t.split("-")[0]}function es(t){return t.split("-")[1]}function of(t){return t==="x"?"y":"x"}function af(t){return t==="y"?"height":"width"}function Ro(t){return["top","bottom"].includes(Vn(t))?"y":"x"}function sf(t){return of(Ro(t))}function eb(t,e,r){r===void 0&&(r=!1);const n=es(t),o=sf(t),a=af(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=ts(i)),[i,ts(i)]}function tb(t){const e=ts(t);return[sc(t),e,sc(e)]}function sc(t){return t.replace(/start|end/g,e=>X0[e])}function rb(t,e,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?a:i;default:return[]}}function nb(t,e,r,n){const o=es(t);let a=rb(Vn(t),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),e&&(a=a.concat(a.map(sc)))),a}function ts(t){return t.replace(/left|right|bottom|top/g,e=>J0[e])}function ob(t){return{top:0,right:0,bottom:0,left:0,...t}}function ab(t){return typeof t!="number"?ob(t):{top:t,right:t,bottom:t,left:t}}function rs(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function lf(t,e,r){let{reference:n,floating:o}=t;const a=Ro(e),i=sf(e),s=af(i),c=Vn(e),l=a==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(es(e)){case"start":m[i]-=d*(r&&l?-1:1);break;case"end":m[i]+=d*(r&&l?-1:1);break}return m}const ib=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let l=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=lf(l,n,c),d=n,m={},h=0;for(let v=0;v<s.length;v++){const{name:y,fn:g}=s[v],{x:w,y:b,data:S,reset:E}=await g({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:t,floating:e}});u=w??u,f=b??f,m={...m,[y]:{...m[y],...S}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:u,y:f}=lf(l,d,c)),v=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}};async function cf(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=Xi(e,t),h=ab(m),y=s[d?f==="floating"?"reference":"floating":f],g=rs(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},E=rs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:c}):w);return{top:(g.top-E.top+h.top)/S.y,bottom:(E.bottom-g.bottom+h.bottom)/S.y,left:(g.left-E.left+h.left)/S.x,right:(E.right-g.right+h.right)/S.x}}const sb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=Xi(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=Vn(o),w=Ro(s),b=Vn(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=d||(b||!v?[ts(s)]:tb(s)),P=h!=="none";!d&&P&&E.push(...nb(s,v,h,S));const F=[s,...E],O=await cf(e,y),$=[];let J=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&$.push(O[g]),f){const ie=eb(o,i,S);$.push(O[ie[0]],O[ie[1]])}if(J=[...J,{placement:o,overflows:$}],!$.every(ie=>ie<=0)){var ae,B;const ie=(((ae=a.flip)==null?void 0:ae.index)||0)+1,I=F[ie];if(I)return{data:{index:ie,overflows:J},reset:{placement:I}};let pe=(B=J.filter(xe=>xe.overflows[0]<=0).sort((xe,Y)=>xe.overflows[1]-Y.overflows[1])[0])==null?void 0:B.placement;if(!pe)switch(m){case"bestFit":{var X;const xe=(X=J.filter(Y=>{if(P){const V=Ro(Y.placement);return V===w||V==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(V=>V>0).reduce((V,re)=>V+re,0)]).sort((Y,V)=>Y[1]-V[1])[0])==null?void 0:X[0];xe&&(pe=xe);break}case"initialPlacement":pe=s;break}if(o!==pe)return{reset:{placement:pe}}}return{}}}};async function lb(t,e){const{placement:r,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Vn(r),s=es(r),c=Ro(r)==="y",l=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,f=Xi(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),c?{x:m*u,y:d*l}:{x:d*l,y:m*u}}const cb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=e,c=await lb(e,t);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},ub=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:y=>{let{x:g,y:w}=y;return{x:g,y:w}}},...c}=Xi(t,e),l={x:r,y:n},u=await cf(e,c),f=Ro(Vn(o)),d=of(f);let m=l[d],h=l[f];if(a){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=m+u[y],b=m-u[g];m=nf(w,m,b)}if(i){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",w=h+u[y],b=h-u[g];h=nf(w,h,b)}const v=s.fn({...e,[d]:m,[f]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[d]:a,[f]:i}}}}}};function ns(){return typeof window<"u"}function Io(t){return uf(t)?(t.nodeName||"").toLowerCase():"#document"}function or(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function hn(t){var e;return(e=(uf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function uf(t){return ns()?t instanceof Node||t instanceof or(t).Node:!1}function Ir(t){return ns()?t instanceof Element||t instanceof or(t).Element:!1}function Vr(t){return ns()?t instanceof HTMLElement||t instanceof or(t).HTMLElement:!1}function df(t){return!ns()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof or(t).ShadowRoot}function Pa(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Or(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function db(t){return["table","td","th"].includes(Io(t))}function os(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function lc(t){const e=cc(),r=Ir(t)?Or(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function fb(t){let e=An(t);for(;Vr(e)&&!Oo(e);){if(lc(e))return e;if(os(e))return null;e=An(e)}return null}function cc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oo(t){return["html","body","#document"].includes(Io(t))}function Or(t){return or(t).getComputedStyle(t)}function as(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function An(t){if(Io(t)==="html")return t;const e=t.assignedSlot||t.parentNode||df(t)&&t.host||hn(t);return df(e)?e.host:e}function ff(t){const e=An(t);return Oo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Pa(e)?e:ff(e)}function hf(t,e,r){var n;e===void 0&&(e=[]);const o=ff(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=or(o);return a?(uc(i),e.concat(i,i.visualViewport||[],Pa(o)?o:[],[])):e.concat(o,hf(o,[]))}function uc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pf(t){const e=Or(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=Vr(t),a=o?t.offsetWidth:r,i=o?t.offsetHeight:n,s=Ji(r)!==a||Ji(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function gf(t){return Ir(t)?t:t.contextElement}function No(t){const e=gf(t);if(!Vr(e))return Gr(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:a}=pf(e);let i=(a?Ji(r.width):r.width)/n,s=(a?Ji(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const hb=Gr(0);function mf(t){const e=or(t);return!cc()||!e.visualViewport?hb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pb(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==or(t)?!1:e}function Fa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),a=gf(t);let i=Gr(1);e&&(n?Ir(n)&&(i=No(n)):i=No(t));const s=pb(a,r,n)?mf(a):Gr(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(a){const d=or(a),m=n&&Ir(n)?or(n):n;let h=d,v=uc(h);for(;v&&n&&m!==h;){const y=No(v),g=v.getBoundingClientRect(),w=Or(v),b=g.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,S=g.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,f*=y.y,c+=b,l+=S,h=or(v),v=uc(h)}}return rs({width:u,height:f,x:c,y:l})}function dc(t,e){const r=as(t).scrollLeft;return e?e.left+r:Fa(hn(t)).left+r}function vf(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:dc(t,n)),a=n.top+e.scrollTop;return{x:o,y:a}}function gb(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=hn(n),s=e?os(e.floating):!1;if(n===i||s&&a)return r;let c={scrollLeft:0,scrollTop:0},l=Gr(1);const u=Gr(0),f=Vr(n);if((f||!f&&!a)&&((Io(n)!=="body"||Pa(i))&&(c=as(n)),Vr(n))){const m=Fa(n);l=No(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const d=i&&!f&&!a?vf(i,c,!0):Gr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+d.x,y:r.y*l.y-c.scrollTop*l.y+u.y+d.y}}function mb(t){return Array.from(t.getClientRects())}function vb(t){const e=hn(t),r=as(t),n=t.ownerDocument.body,o=Ao(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Ao(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+dc(t);const s=-r.scrollTop;return Or(n).direction==="rtl"&&(i+=Ao(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function bb(t,e){const r=or(t),n=hn(t),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const l=cc();(!l||l&&e==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function yb(t,e){const r=Fa(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,a=Vr(t)?No(t):Gr(1),i=t.clientWidth*a.x,s=t.clientHeight*a.y,c=o*a.x,l=n*a.y;return{width:i,height:s,x:c,y:l}}function bf(t,e,r){let n;if(e==="viewport")n=bb(t,r);else if(e==="document")n=vb(hn(t));else if(Ir(e))n=yb(e,r);else{const o=mf(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return rs(n)}function yf(t,e){const r=An(t);return r===e||!Ir(r)||Oo(r)?!1:Or(r).position==="fixed"||yf(r,e)}function wb(t,e){const r=e.get(t);if(r)return r;let n=hf(t,[]).filter(s=>Ir(s)&&Io(s)!=="body"),o=null;const a=Or(t).position==="fixed";let i=a?An(t):t;for(;Ir(i)&&!Oo(i);){const s=Or(i),c=lc(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pa(i)&&!c&&yf(t,i))?n=n.filter(u=>u!==i):o=s,i=An(i)}return e.set(t,n),n}function _b(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const i=[...r==="clippingAncestors"?os(e)?[]:wb(e,this._c):[].concat(r),n],s=i[0],c=i.reduce((l,u)=>{const f=bf(e,u,o);return l.top=Ao(f.top,l.top),l.right=ic(f.right,l.right),l.bottom=ic(f.bottom,l.bottom),l.left=Ao(f.left,l.left),l},bf(e,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kb(t){const{width:e,height:r}=pf(t);return{width:e,height:r}}function xb(t,e,r){const n=Vr(e),o=hn(e),a=r==="fixed",i=Fa(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const c=Gr(0);if(n||!n&&!a)if((Io(e)!=="body"||Pa(o))&&(s=as(e)),n){const d=Fa(e,!0,a,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop}else o&&(c.x=dc(o));const l=o&&!n&&!a?vf(o,s):Gr(0),u=i.left+s.scrollLeft-c.x-l.x,f=i.top+s.scrollTop-c.y-l.y;return{x:u,y:f,width:i.width,height:i.height}}function fc(t){return Or(t).position==="static"}function wf(t,e){if(!Vr(t)||Or(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return hn(t)===r&&(r=r.ownerDocument.body),r}function _f(t,e){const r=or(t);if(os(t))return r;if(!Vr(t)){let o=An(t);for(;o&&!Oo(o);){if(Ir(o)&&!fc(o))return o;o=An(o)}return r}let n=wf(t,e);for(;n&&db(n)&&fc(n);)n=wf(n,e);return n&&Oo(n)&&fc(n)&&!lc(n)?r:n||fb(t)||r}const Sb=async function(t){const e=this.getOffsetParent||_f,r=this.getDimensions,n=await r(t.floating);return{reference:xb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tb(t){return Or(t).direction==="rtl"}const Cb={convertOffsetParentRelativeRectToViewportRelativeRect:gb,getDocumentElement:hn,getClippingRect:_b,getOffsetParent:_f,getElementRects:Sb,getClientRects:mb,getDimensions:kb,getScale:No,isElement:Ir,isRTL:Tb},kf=cb,xf=ub,Eb=sb,Sf=(t,e,r)=>{const n=new Map,o={platform:Cb,...r},a={...o.platform,_c:n};return ib(t,e,{...o,platform:a})};function hc(t,e={enabled:!0}){let{enabled:r,eventType:n,nodeForEvent:o,options:a}=Tf(e);function i(c){c.target&&t&&!t.contains(c.target)&&!c.defaultPrevented&&t.dispatchEvent(new CustomEvent("clickoutside",{detail:c}))}let s;return e.enabled!==!1&&(s=Ft(o,n,i,a)),{update(c){s==null||s(),{enabled:r,eventType:n,nodeForEvent:o,options:a}=Tf(c),r&&(s=Ft(o,n,i,a))},destroy(){s==null||s()}}}function Tf(t={}){var e;return{enabled:t.enabled??!0,nodeForEvent:((e=t.limit)==null?void 0:e.parent)??document,eventType:t.event??"click",options:typeof t.options=="boolean"?{capture:t.options}:t.options}}const Ab=t=>t;function Cf(t){const e=t-1;return e*e*e+1}function Ef(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Af(t,{delay:e=0,duration:r=400,easing:n=Ab}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:a=>`opacity: ${a*o}`}}function La(t,{delay:e=0,duration:r=400,easing:n=Cf,x:o=0,y:a=0,opacity:i=0}={}){const s=getComputedStyle(t),c=+s.opacity,l=s.transform==="none"?"":s.transform,u=c*(1-i),[f,d]=Ef(o),[m,h]=Ef(a);return{delay:e,duration:r,easing:n,css:(v,y)=>`
1032
+ transform: ${l} translate(${(1-v)*f}${d}, ${(1-v)*m}${h});
1033
+ opacity: ${c-u*y}`}}function Rb(t,{delay:e=0,duration:r=400,easing:n=Cf,axis:o="y"}={}){const a=getComputedStyle(t),i=+a.opacity,s=o==="y"?"height":"width",c=parseFloat(a[s]),l=o==="y"?["top","bottom"]:["left","right"],u=l.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),m=parseFloat(a[`margin${u[0]}`]),h=parseFloat(a[`margin${u[1]}`]),v=parseFloat(a[`border${u[0]}Width`]),y=parseFloat(a[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*i};${s}: ${g*c}px;padding-${l[0]}: ${g*f}px;padding-${l[1]}: ${g*d}px;margin-${l[0]}: ${g*m}px;margin-${l[1]}: ${g*h}px;border-${l[0]}-width: ${g*v}px;border-${l[1]}-width: ${g*y}px;min-${s}: 0`}}var Ib=(t,e)=>(t.stopPropagation(),A(e,!p(e))),Ob=W('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),Nb=(t,e,r)=>e(p(r)),Pb=W("<li><button><!> <span> </span></button></li>"),Fb=W('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),Lb=W('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),Db=W('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function Rf(t,e){var J,ae,B;Ee(e,!0);const[r,n]=Jt(),o=()=>gt(To,"$config",r),a=()=>gt(fn,"$t",r),i=()=>gt(Ca,"$selectedLanguageStore",r);let s=k(e,"menu",7),c=k(e,"usedLanguages",7),l=k(e,"currentLanguage",7),u=k(e,"onLanguageChange",7),f=me(!1),d,m=me(void 0);const h={duration:Number((J=o().theme.components.referenceNumberContent.custom)==null?void 0:J.transitionDuration)||200,delay:Number((ae=o().theme.components.referenceNumberContent.custom)==null?void 0:ae.transitionDelay)||0,y:Number((B=o().theme.components.referenceNumberContent.custom)==null?void 0:B.transitionY)||10},v=async()=>{if(!d||!p(m))return;const{x:X,y:ie}=await Sf(d,p(m),{placement:"bottom-end",middleware:[kf(8),xf({padding:8})]});Object.assign(p(m).style,{left:`${X}px`,top:`${ie}px`})};vt(()=>{p(f)&&v()}),vt(()=>{Ca.set(l())});const y=X=>{u()&&(u()(X),Ca.set(X),A(f,!1))};var g=Db(),w=D(g);w.__click=[Ib,f];var b=D(w),S=D(b,!0);N(b);var E=ne(b,2);const P=De(()=>p(f)?"dismiss":"menu");nr(E,{get name(){return p(P)}}),N(w),qr(w,X=>d=X,()=>d),bl(w,X=>hc==null?void 0:hc(X));var F=ne(w,2);{var O=X=>{var ie=Lb(),I=D(ie);Sr(I,21,()=>s()??[],zr,(Y,V)=>{var re=Ob(),ee=D(re),ye=D(ee);nr(ye,{get name(){return p(V).icon},class:"chat-menu__item-icon"});var Se=ne(ye,2),_e=D(Se,!0);N(Se),N(ee),N(re),le(()=>{Pe(ee,"href",p(V).url),Pe(ee,"target",p(V).target),Ve(_e,p(V).label)}),C(Y,re)}),N(I);var pe=ne(I,2);{var xe=Y=>{var V=Fb(),re=ne(te(V),2),ee=D(re,!0);N(re);var ye=ne(re,2);Sr(ye,21,c,zr,(Se,_e)=>{var $e=Pb(),et=D($e);let bt;et.__click=[Nb,y,_e];var rt=D(et);nr(rt,{name:"internalLink",class:"chat-menu__item-icon"});var se=ne(rt,2),M=D(se,!0);N(se),N(et),N($e),le(Te=>{bt=At(et,1,"chat-menu__item transition-colors",null,bt,Te),Ve(M,jl[p(_e)].languageNames[p(_e)])},[()=>({active:i()===p(_e)})]),C(Se,$e)}),N(ye),le(()=>Ve(ee,a().selectLanguage)),C(Y,V)};ce(pe,Y=>{c().length>0&&Y(xe)})}N(ie),qr(ie,Y=>A(m,Y),()=>p(m)),$r(3,ie,()=>La,()=>h),C(X,ie)};ce(F,X=>{p(f)&&X(O)})}N(g),le(()=>Ve(S,p(f)?a().closeMenu:a().openMenu)),ct("clickoutside",w,()=>A(f,!1)),C(t,g);var $=Ae({get menu(){return s()},set menu(X){s(X),_()},get usedLanguages(){return c()},set usedLanguages(X){c(X),_()},get currentLanguage(){return l()},set currentLanguage(X){l(X),_()},get onLanguageChange(){return u()},set onLanguageChange(X){u(X),_()}});return n(),$}lo(["click"]),Ie(Rf,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const Mb=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var Bb=W('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit"><!></button></form>');function pc(t,e){Ee(e,!0);const[r,n]=Jt(),o=()=>gt(fn,"$t",r);let a=k(e,"class",7),i=k(e,"onSubmit",7),s=Cr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),c=me(""),l=De(()=>p(c)!==""),u,f;const d=P=>{P.preventDefault(),p(c)&&(i()(p(c)),A(c,""),m())},m=()=>{u.style.height="auto"},h=()=>{m();const P=parseInt(getComputedStyle(u).borderWidth)*2;u.style.height=`${u.scrollHeight+P}px`};vt(()=>{if(u)return f=new ResizeObserver(()=>{h()}),f.observe(u),()=>{f.disconnect()}});var v=Bb();ct("resize",ta,h);let y;var g=D(v);vu(g),g.__input=h,g.__change=h,g.__keydown=[Mb,d],Pe(g,"rows",1),qr(g,P=>u=P,()=>u);var w=ne(g,2);let b;var S=D(w);nr(S,{name:"submit",class:"chat-input__submit-icon"}),N(w),N(v),le(P=>{y=Qt(v,y,{name:"chat-input",onsubmit:d,class:`chat-input ${a()??""}`,...s}),Pe(g,"placeholder",o().chatInputPlaceholder),Pe(w,"aria-label",o().chatInputSubmit),w.disabled=!p(l),b=At(w,1,"chat-input__submit-button transition-colors",null,b,P)},[()=>({"chat-input__submit-button--deactivated":!p(l)})]),xl(g,()=>p(c),P=>A(c,P)),C(t,v);var E=Ae({get class(){return a()},set class(P){a(P),_()},get onSubmit(){return i()},set onSubmit(P){i(P),_()}});return n(),E}lo(["input","change","keydown"]),Ie(pc,{class:{},onSubmit:{}},[],[],!0);var zb=W('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="quality" class="svelte-vqj1lp"> </label>'),$b=W('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),qb=W('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="impact" class="svelte-vqj1lp"> </label>'),jb=W('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),Zb=W('<div class="classification-feedback svelte-vqj1lp"><div class="classification-feedback__title svelte-vqj1lp"> </div> <!> <!></div>');const Ub={hash:"svelte-vqj1lp",code:".classification-feedback.svelte-vqj1lp {display:flex;flex-direction:column;padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);gap:var(--spacer-32);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color);}.classification-feedback__item.svelte-vqj1lp {display:flex;flex-direction:column;margin:0;padding:0;gap:var(--spacer-4);border:none;}.classification-feedback__title.svelte-vqj1lp {margin-bottom:-1rem;font-weight:bold;}.classification-feedback__label.svelte-vqj1lp {margin-bottom:var(--spacer-8);font-weight:bold;}.classification-feedback__option.svelte-vqj1lp {display:flex;align-items:center;padding-left:var(--spacer-16);gap:var(--spacer-12);&:has(input:where(.svelte-vqj1lp):checked) {background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color);}&:has(input:where(.svelte-vqj1lp):focus-visible) {border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);}&:has(input:where(.svelte-vqj1lp):focus-visible) input:where(.svelte-vqj1lp) {outline:none;}}"};function If(t,e){Ee(e,!0),ia(t,Ub);const[r,n]=Jt(),o=()=>gt(fn,"$t",r),a=[],i=[];let s=k(e,"impact",15),c=k(e,"quality",15),l=k(e,"classificationConfig",7);var u=he(),f=te(u);{var d=h=>{var v=Zb(),y=D(v),g=D(y,!0);N(y);var w=ne(y,2);{var b=P=>{var F=$b(),O=D(F),$=D(O,!0);N(O);var J=ne(O,2);Sr(J,17,()=>l().quality.options,zr,(ae,B)=>{var X=zb(),ie=D(X);_l(ie);var I,pe=ne(ie);N(X),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),Ve(pe,` ${p(B).label??""}`)}),Mu(a,[],ie,()=>(p(B).value,c()),c),C(ae,X)}),N(F),le(()=>Ve($,l().quality.label)),C(P,F)};ce(w,P=>{l().quality.options.length!==0&&P(b)})}var S=ne(w,2);{var E=P=>{var F=jb(),O=D(F),$=D(O,!0);N(O);var J=ne(O,2);Sr(J,17,()=>l().impact.options,zr,(ae,B)=>{var X=qb(),ie=D(X);_l(ie);var I,pe=ne(ie);N(X),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),Ve(pe,` ${p(B).label??""}`)}),Mu(i,[],ie,()=>(p(B).value,s()),s),C(ae,X)}),N(F),le(()=>Ve($,l().impact.label)),C(P,F)};ce(S,P=>{l().impact.options.length!==0&&P(E)})}N(v),le(()=>Ve(g,o().classificationTitle)),C(h,v)};ce(f,h=>{l()&&l().enabled&&h(d)})}C(t,u);var m=Ae({get impact(){return s()},set impact(h){s(h),_()},get quality(){return c()},set quality(h){c(h),_()},get classificationConfig(){return l()},set classificationConfig(h){l(h),_()}});return n(),m}Ie(If,{impact:{},quality:{},classificationConfig:{}},[],[],!0);function Hb(t){return typeof t=="function"}function Gb(t){return t!==null&&typeof t=="object"}const Vb=["string","number","bigint","boolean"];function gc(t){return t==null||Vb.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>gc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const Da=Symbol("box"),mc=Symbol("is-writable");function Wb(t){return Gb(t)&&Da in t}function Kb(t){return Q.isBox(t)&&mc in t}function Q(t){let e=me(Mr(t));return{[Da]:!0,[mc]:!0,get current(){return p(e)},set current(r){A(e,r,!0)}}}function Yb(t,e){const r=De(t);return e?{[Da]:!0,[mc]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Da]:!0,get current(){return t()}}}function Qb(t){return Q.isBox(t)?t:Hb(t)?Q.with(t):Q(t)}function Jb(t){return Object.entries(t).reduce((e,[r,n])=>Q.isBox(n)?(Q.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(o){n.current=o}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function Xb(t){return Q.isWritableBox(t)?{[Da]:!0,get current(){return t.current}}:t}Q.from=Qb,Q.with=Yb,Q.flatten=Jb,Q.readonly=Xb,Q.isBox=Wb,Q.isWritableBox=Kb;function Of(...t){return function(e){var r;for(const n of t)if(n){if(e.defaultPrevented)return;typeof n=="function"?n.call(this,e):(r=n.current)==null||r.call(this,e)}}}var Nf={},Pf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ey=/\n/g,ty=/^\s*/,ry=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ny=/^:\s*/,oy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ay=/^[;\s]*/,iy=/^\s+|\s+$/g,sy=`
1034
+ `,Ff="/",Lf="*",Wn="",ly="comment",cy="declaration",uy=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function o(h){var v=h.match(ey);v&&(r+=v.length);var y=h.lastIndexOf(sy);n=~y?h.length-y:n+h.length}function a(){var h={line:r,column:n};return function(v){return v.position=new i(h),l(),v}}function i(h){this.start=h,this.end={line:r,column:n},this.source=e.source}i.prototype.content=t;function s(h){var v=new Error(e.source+":"+r+":"+n+": "+h);if(v.reason=h,v.filename=e.source,v.line=r,v.column=n,v.source=t,!e.silent)throw v}function c(h){var v=h.exec(t);if(v){var y=v[0];return o(y),t=t.slice(y.length),v}}function l(){c(ty)}function u(h){var v;for(h=h||[];v=f();)v!==!1&&h.push(v);return h}function f(){var h=a();if(!(Ff!=t.charAt(0)||Lf!=t.charAt(1))){for(var v=2;Wn!=t.charAt(v)&&(Lf!=t.charAt(v)||Ff!=t.charAt(v+1));)++v;if(v+=2,Wn===t.charAt(v-1))return s("End of comment missing");var y=t.slice(2,v-2);return n+=2,o(y),t=t.slice(v),n+=2,h({type:ly,comment:y})}}function d(){var h=a(),v=c(ry);if(v){if(f(),!c(ny))return s("property missing ':'");var y=c(oy),g=h({type:cy,property:Df(v[0].replace(Pf,Wn)),value:y?Df(y[0].replace(Pf,Wn)):Wn});return c(ay),g}}function m(){var h=[];u(h);for(var v;v=d();)v!==!1&&(h.push(v),u(h));return h}return l(),m()};function Df(t){return t?t.replace(iy,Wn):Wn}var dy=$l&&$l.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nf,"__esModule",{value:!0});var Mf=Nf.default=hy,fy=dy(uy);function hy(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,fy.default)(t),o=typeof e=="function";return n.forEach(function(a){if(a.type==="declaration"){var i=a.property,s=a.value;o?e(i,s,a):s&&(r=r||{},r[i]=s)}}),r}const py=Mf.default||Mf,gy=/\d/,my=["-","_","/","."];function vy(t=""){if(!gy.test(t))return t!==t.toLowerCase()}function by(t){const e=[];let r="",n,o;for(const a of t){const i=my.includes(a);if(i===!0){e.push(r),r="",n=void 0;continue}const s=vy(a);if(o===!1){if(n===!1&&s===!0){e.push(r),r=a,n=s;continue}if(n===!0&&s===!1&&r.length>1){const c=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=c+a,n=s;continue}}r+=a,n=s,o=i}return e.push(r),e}function Bf(t){return t?by(t).map(e=>wy(e)).join(""):""}function yy(t){return _y(Bf(t||""))}function wy(t){return t?t[0].toUpperCase()+t.slice(1):""}function _y(t){return t?t[0].toLowerCase()+t.slice(1):""}function is(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Bf(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[yy(n)]=o}return py(t,r),e}function Kn(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function ky(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const xy=ky(/[A-Z]/,t=>`-${t.toLowerCase()}`);function Sy(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${xy(e)}: ${t[e]};`).join(`
1035
+ `)}function zf(t={}){return Sy(t).replace(`
1036
+ `," ")}zf({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"});function Ty(t){var e;return t.length>2&&t.startsWith("on")&&t[2]===((e=t[2])==null?void 0:e.toLowerCase())}function vr(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];for(const o in n){const a=e[o],i=n[o],s=typeof a=="function",c=typeof i=="function";if(s&&Ty(o)){const l=a,u=i;e[o]=Of(l,u)}else if(s&&c)e[o]=Kn(a,i);else if(o==="class"){const l=gc(a),u=gc(i);l&&u?e[o]=Ci(a,i):l?e[o]=Ci(a):u&&(e[o]=Ci(i))}else if(o==="style"){const l=typeof a=="object",u=typeof i=="object",f=typeof a=="string",d=typeof i=="string";if(l&&u)e[o]={...a,...i};else if(l&&d){const m=is(i);e[o]={...a,...m}}else if(f&&u){const m=is(a);e[o]={...m,...i}}else if(f&&d){const m=is(a),h=is(i);e[o]={...m,...h}}else l?e[o]=a:u?e[o]=i:f?e[o]=a:d&&(e[o]=i)}else e[o]=i!==void 0?i:a}}return typeof e.style=="object"&&(e.style=zf(e.style).replaceAll(`
1037
+ `," ")),e.hidden!==!0&&(e.hidden=void 0,delete e.hidden),e.disabled!==!0&&(e.disabled=void 0,delete e.disabled),e}const Cy=typeof window<"u"?window:void 0;function Ey(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}const Ec=class Ec extends Map{constructor(r){super();G(this,Fo);G(this,Wr,new Map);G(this,Kr,Bt(0));G(this,gn,Bt(0));if(r){for(var[n,o]of r)super.set(n,o);x(this,gn).v=super.size}}has(r){var n=x(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=Bt(0),n.set(r,o);else return p(x(this,Kr)),!1}return p(o),!0}forEach(r,n){Jn(this,Fo,Hs).call(this),super.forEach(r,n)}get(r){var n=x(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=Bt(0),n.set(r,o);else{p(x(this,Kr));return}}return p(o),super.get(r)}set(r,n){var f;var o=x(this,Wr),a=o.get(r),i=super.get(r),s=super.set(r,n),c=x(this,Kr);if(a===void 0)o.set(r,Bt(0)),A(x(this,gn),super.size),So(c);else if(i!==n){So(a);var l=c.reactions===null?null:new Set(c.reactions),u=l===null||!((f=a.reactions)!=null&&f.every(d=>l.has(d)));u&&So(c)}return s}delete(r){var n=x(this,Wr),o=n.get(r),a=super.delete(r);return o!==void 0&&(n.delete(r),A(x(this,gn),super.size),A(o,-1),So(x(this,Kr))),a}clear(){if(super.size!==0){super.clear();var r=x(this,Wr);A(x(this,gn),0);for(var n of r.values())A(n,-1);So(x(this,Kr)),r.clear()}}keys(){return p(x(this,Kr)),super.keys()}values(){return Jn(this,Fo,Hs).call(this),super.values()}entries(){return Jn(this,Fo,Hs).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(x(this,gn)),super.size}};Wr=new WeakMap,Kr=new WeakMap,gn=new WeakMap,Fo=new WeakSet,Hs=function(){p(x(this,Kr));var r=x(this,Wr);if(x(this,gn).v!==r.size)for(var n of Nh(Ec.prototype,this,"keys").call(this))r.has(n)||r.set(n,Bt(0));for(var[,o]of x(this,Wr))p(o)};let vc=Ec;class Ay{constructor(e={}){G(this,Lo);G(this,$a);const{window:r=Cy,document:n=r==null?void 0:r.document}=e;r!==void 0&&(xt(this,Lo,n),xt(this,$a,cv(o=>{const a=Ft(r,"focusin",o),i=Ft(r,"focusout",o);return()=>{a(),i()}})))}get current(){var e;return(e=x(this,$a))==null||e.call(this),x(this,Lo)?Ey(x(this,Lo)):null}}Lo=new WeakMap,$a=new WeakMap,new Ay;function Ry(t,e){switch(t){case"post":vt(e);break;case"pre":al(e);break}}function $f(t,e,r,n={}){const{lazy:o=!1}=n;let a=!o,i=Array.isArray(t)?[]:void 0;Ry(e,()=>{const s=Array.isArray(t)?t.map(l=>l()):t();if(!a){a=!0,i=s;return}const c=Kt(()=>r(s,i));return i=s,c})}function ar(t,e,r){$f(t,"post",e,r)}function Iy(t,e,r){$f(t,"pre",e,r)}ar.pre=Iy;class Oy{constructor(e){G(this,qa,me(void 0));G(this,ja);vt(()=>{A(x(this,qa),x(this,ja),!0),xt(this,ja,e())})}get current(){return p(x(this,qa))}}qa=new WeakMap,ja=new WeakMap;class bc{constructor(e){G(this,Za);G(this,mn);xt(this,Za,e),xt(this,mn,Symbol(e))}get key(){return x(this,mn)}exists(){return Np(x(this,mn))}get(){const e=mu(x(this,mn));if(e===void 0)throw new Error(`Context "${x(this,Za)}" not found`);return e}getOr(e){const r=mu(x(this,mn));return r===void 0?e:r}set(e){return Op(x(this,mn),e)}}Za=new WeakMap,mn=new WeakMap;function qf(t){vt(()=>()=>{t()})}function Nr({id:t,ref:e,deps:r=()=>!0,onRefChange:n,getRootNode:o}){ar([()=>t.current,r],([a])=>{const i=(o==null?void 0:o())??document,s=i==null?void 0:i.getElementById(a);s?e.current=s:e.current=null,n==null||n(e.current)}),qf(()=>{e.current=null,n==null||n(null)})}function yc(t,e){return setTimeout(e,t)}function Ma(t){nl().then(t)}function ss(t){return t?"open":"closed"}function Ny(t){return t?"true":"false"}function wc(t){return t?"":void 0}const jf="Enter",Py="Escape",Zf=" ",Fy="Tab",Uf=typeof document<"u",Hf=Ly();function Ly(){var t,e;return Uf&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function _c(t){return t instanceof HTMLElement}function Dy(t){return t instanceof Element}function My(t){return t instanceof HTMLInputElement&&"select"in t}function By(t,e){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function Ct(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}function Xe(){}function zy(t,e){const r=Q(t);function n(a){return e[r.current][a]??r.current}return{state:r,dispatch:a=>{r.current=n(a)}}}function $y(t,e){let r=me(Mr({})),n=me("none");const o=t.current?"mounted":"unmounted";let a=me(null);const i=new Oy(()=>t.current);ar([()=>e.current,()=>t.current],([d,m])=>{!d||!m||Ma(()=>{A(a,document.getElementById(d),!0)})});const{state:s,dispatch:c}=zy(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ar(()=>t.current,d=>{if(p(a)||A(a,document.getElementById(e.current),!0),!p(a)||!(d!==i.current))return;const h=p(n),v=ls(p(a));d?c("MOUNT"):v==="none"||p(r).display==="none"?c("UNMOUNT"):c(i&&h!==v?"ANIMATION_OUT":"UNMOUNT")});function l(d){if(p(a)||A(a,document.getElementById(e.current),!0),!p(a))return;const m=ls(p(a)),h=m.includes(d.animationName)||m==="none";d.target===p(a)&&h&&c("ANIMATION_END")}function u(d){p(a)||A(a,document.getElementById(e.current),!0),p(a)&&d.target===p(a)&&A(n,ls(p(a)),!0)}ar(()=>s.current,()=>{if(p(a)||A(a,document.getElementById(e.current),!0),!p(a))return;const d=ls(p(a));A(n,s.current==="mounted"?d:"none",!0)}),ar(()=>p(a),d=>{if(d)return A(r,getComputedStyle(d),!0),Kn(Ft(d,"animationstart",u),Ft(d,"animationcancel",l),Ft(d,"animationend",l))});const f=De(()=>["mounted","unmountSuspended"].includes(s.current));return{get current(){return p(f)}}}function ls(t){return t&&getComputedStyle(t).animationName||"none"}function cs(t,e){Ee(e,!0);let r=k(e,"present",7),n=k(e,"forceMount",7),o=k(e,"presence",7),a=k(e,"id",7);const i=$y(Q.with(()=>r()),Q.with(()=>a()));var s=he(),c=te(s);{var l=u=>{var f=he(),d=te(f);ut(d,()=>o()??Qe,()=>({present:i})),C(u,f)};ce(c,u=>{(n()||r()||i.current)&&u(l)})}return C(t,s),Ae({get present(){return r()},set present(u){r(u),_()},get forceMount(){return n()},set forceMount(u){n(u),_()},get presence(){return o()},set presence(u){o(u),_()},get id(){return a()},set id(u){a(u),_()}})}Ie(cs,{present:{},forceMount:{},presence:{},id:{}},[],[],!0);function qy(t){return{content:`data-${t}-content`,trigger:`data-${t}-trigger`,overlay:`data-${t}-overlay`,title:`data-${t}-title`,description:`data-${t}-description`,close:`data-${t}-close`,cancel:`data-${t}-cancel`,action:`data-${t}-action`}}class jy{constructor(e){z(this,"opts");G(this,Ua,me(null));G(this,Ha,me(null));G(this,Ga,me(null));G(this,Va,me(null));G(this,Wa,me(void 0));G(this,Ka,me(void 0));G(this,Ya,me(void 0));G(this,Qa,me(void 0));G(this,Ja,me(null));G(this,gs,De(()=>qy(this.opts.variant.current)));G(this,ms,De(()=>({"data-state":ss(this.opts.open.current)})));this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return p(x(this,Ua))}set triggerNode(e){A(x(this,Ua),e,!0)}get titleNode(){return p(x(this,Ha))}set titleNode(e){A(x(this,Ha),e,!0)}get contentNode(){return p(x(this,Ga))}set contentNode(e){A(x(this,Ga),e,!0)}get descriptionNode(){return p(x(this,Va))}set descriptionNode(e){A(x(this,Va),e,!0)}get contentId(){return p(x(this,Wa))}set contentId(e){A(x(this,Wa),e,!0)}get titleId(){return p(x(this,Ka))}set titleId(e){A(x(this,Ka),e,!0)}get triggerId(){return p(x(this,Ya))}set triggerId(e){A(x(this,Ya),e,!0)}get descriptionId(){return p(x(this,Qa))}set descriptionId(e){A(x(this,Qa),e,!0)}get cancelNode(){return p(x(this,Ja))}set cancelNode(e){A(x(this,Ja),e,!0)}get attrs(){return p(x(this,gs))}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return p(x(this,ms))}}Ua=new WeakMap,Ha=new WeakMap,Ga=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,Ja=new WeakMap,gs=new WeakMap,ms=new WeakMap;class Zy{constructor(e,r){z(this,"opts");z(this,"root");G(this,vs,De(()=>this.root.attrs[this.opts.variant.current]));G(this,bs,De(()=>({id:this.opts.id.current,[p(x(this,vs))]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps})));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Nr({...e,deps:()=>this.root.opts.open.current})}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===Zf||e.key===jf)&&(e.preventDefault(),this.root.handleClose())}get props(){return p(x(this,bs))}}vs=new WeakMap,bs=new WeakMap;class Uy{constructor(e,r){z(this,"opts");z(this,"root");G(this,ys,De(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps})));this.opts=e,this.root=r,Nr({...e,onRefChange:n=>{this.root.titleNode=n,this.root.titleId=n==null?void 0:n.id},deps:()=>this.root.opts.open.current})}get props(){return p(x(this,ys))}}ys=new WeakMap;class Hy{constructor(e,r){z(this,"opts");z(this,"root");G(this,ws,De(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=e,this.root=r,Nr({...e,deps:()=>this.root.opts.open.current,onRefChange:n=>{this.root.descriptionNode=n,this.root.descriptionId=n==null?void 0:n.id}})}get props(){return p(x(this,ws))}}ws=new WeakMap;class Gy{constructor(e,r){z(this,"opts");z(this,"root");G(this,_s,De(()=>({open:this.root.opts.open.current})));G(this,ks,De(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps})));this.opts=e,this.root=r,Nr({...e,deps:()=>this.root.opts.open.current,onRefChange:n=>{this.root.contentNode=n,this.root.contentId=n==null?void 0:n.id}})}get snippetProps(){return p(x(this,_s))}get props(){return p(x(this,ks))}}_s=new WeakMap,ks=new WeakMap;class Vy{constructor(e,r){z(this,"opts");z(this,"root");G(this,xs,De(()=>({open:this.root.opts.open.current})));G(this,Ss,De(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=e,this.root=r,Nr({...e,deps:()=>this.root.opts.open.current})}get snippetProps(){return p(x(this,xs))}get props(){return p(x(this,Ss))}}xs=new WeakMap,Ss=new WeakMap;const Po=new bc("Dialog.Root");function Wy(t){return Po.set(new jy(t))}function Ky(t){return new Uy(t,Po.get())}function Yy(t){return new Gy(t,Po.get())}function Qy(t){return new Vy(t,Po.get())}function Jy(t){return new Hy(t,Po.get())}function Xy(t){return new Zy(t,Po.get())}var ew=W("<div><!></div>");function Gf(t,e){Ee(e,!0);let r=k(e,"id",23,Ct),n=k(e,"ref",15,null),o=k(e,"child",7),a=k(e,"children",7),i=k(e,"level",7,2),s=Cr(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const c=Ky({id:Q.with(()=>r()),level:Q.with(()=>i()),ref:Q.with(()=>n(),h=>n(h))}),l=De(()=>vr(s,c.props));var u=he(),f=te(u);{var d=h=>{var v=he(),y=te(v);ut(y,o,()=>({props:p(l)})),C(h,v)},m=h=>{var v=ew();let y;var g=D(v);ut(g,()=>a()??Qe),N(v),le(()=>y=Qt(v,y,{...p(l)})),C(h,v)};ce(f,h=>{o()?h(d):h(m,!1)})}return C(t,u),Ae({get id(){return r()},set id(h=Ct()){r(h),_()},get ref(){return n()},set ref(h=null){n(h),_()},get child(){return o()},set child(h){o(h),_()},get children(){return a()},set children(h){a(h),_()},get level(){return i()},set level(h=2){i(h),_()}})}Ie(Gf,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function Vf(t,e,r,n){const o=Array.isArray(e)?e:[e];return o.forEach(a=>t.addEventListener(a,r,n)),()=>{o.forEach(a=>t.removeEventListener(a,r,n))}}class Wf{constructor(e,r={bubbles:!0,cancelable:!0}){z(this,"eventName");z(this,"options");this.eventName=e,this.options=r}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,r){const n=this.createEvent(r);return e.dispatchEvent(n),n}listen(e,r,n){const o=a=>{r(a)};return Ft(e,this.eventName,o,n)}}function Kf(t,e=500){let r=null;const n=(...o)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...o)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function kc(t,e){return t===e||t.contains(e)}function Yf(t){return(t==null?void 0:t.ownerDocument)??document}function tw(t,e){const{clientX:r,clientY:n}=t,o=e.getBoundingClientRect();return r<o.left||r>o.right||n<o.top||n>o.bottom}globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);class rw{constructor(e){G(this,zo);z(this,"opts");G(this,Do);G(this,Yn);G(this,On,{pointerdown:!1});G(this,Mo,!1);G(this,Bo,!1);z(this,"node",Q(null));G(this,Nn);G(this,Xa);G(this,ei,me(null));G(this,vn,Xe);G(this,Ts,e=>{e.defaultPrevented||this.currNode&&Ma(()=>{var r,n;!this.currNode||x(this,Is).call(this,e.target)||e.target&&!x(this,Bo)&&((n=(r=x(this,Xa)).current)==null||n.call(r,e))})});G(this,Cs,e=>{let r=e;r.defaultPrevented&&(r=Qf(e)),x(this,Do).current(e)});G(this,$o,Kf(e=>{if(!this.currNode){x(this,vn).call(this);return}const r=this.opts.isValidEvent.current(e,this.currNode)||iw(e,this.currNode);if(!x(this,Mo)||Jn(this,zo,Fh).call(this)||!r){x(this,vn).call(this);return}let n=e;if(n.defaultPrevented&&(n=Qf(n)),x(this,Yn).current!=="close"&&x(this,Yn).current!=="defer-otherwise-close"){x(this,vn).call(this);return}e.pointerType==="touch"?(x(this,vn).call(this),xt(this,vn,Vf(x(this,Nn),"click",x(this,Cs),{once:!0}))):x(this,Do).current(n)},10));G(this,Es,e=>{x(this,On)[e.type]=!0});G(this,As,e=>{x(this,On)[e.type]=!1});G(this,Rs,()=>{this.node.current&&xt(this,Mo,aw(this.node.current))});G(this,Is,e=>this.node.current?kc(this.node.current,e):!1);G(this,ti,Kf(()=>{for(const e in x(this,On))x(this,On)[e]=!1;xt(this,Mo,!1)},20));G(this,Os,()=>{xt(this,Bo,!0)});G(this,Ns,()=>{xt(this,Bo,!1)});z(this,"props",{onfocuscapture:x(this,Os),onblurcapture:x(this,Ns)});this.opts=e,Nr({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),xt(this,Yn,e.interactOutsideBehavior),xt(this,Do,e.onInteractOutside),xt(this,Xa,e.onFocusOutside),vt(()=>{xt(this,Nn,Yf(this.currNode))});let r=Xe;const n=()=>{x(this,ti).call(this),globalThis.bitsDismissableLayers.delete(this),x(this,$o).destroy(),r()};ar([()=>this.opts.enabled.current,()=>this.currNode],([o,a])=>{if(!(!o||!a))return yc(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,x(this,Yn)),r(),r=Jn(this,zo,Ph).call(this))}),n}),qf(()=>{x(this,ti).destroy(),globalThis.bitsDismissableLayers.delete(this),x(this,$o).destroy(),x(this,vn).call(this),r()})}get currNode(){return p(x(this,ei))}set currNode(e){A(x(this,ei),e,!0)}}Do=new WeakMap,Yn=new WeakMap,On=new WeakMap,Mo=new WeakMap,Bo=new WeakMap,Nn=new WeakMap,Xa=new WeakMap,ei=new WeakMap,vn=new WeakMap,Ts=new WeakMap,zo=new WeakSet,Ph=function(){return Kn(Ft(x(this,Nn),"pointerdown",Kn(x(this,Es),x(this,Rs)),{capture:!0}),Ft(x(this,Nn),"pointerdown",Kn(x(this,As),x(this,$o))),Ft(x(this,Nn),"focusin",x(this,Ts)))},Cs=new WeakMap,$o=new WeakMap,Es=new WeakMap,As=new WeakMap,Rs=new WeakMap,Is=new WeakMap,ti=new WeakMap,Fh=function(){return Object.values(x(this,On)).some(Boolean)},Os=new WeakMap,Ns=new WeakMap;function nw(t){return new rw(t)}function ow(t){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function aw(t){const e=[...globalThis.bitsDismissableLayers],r=ow(e);if(r)return r[0].node.current===t;const[n]=e[0];return n.node.current===t}function iw(t,e){if("button"in t&&t.button>0)return!1;const r=t.target;return Dy(r)?Yf(r).documentElement.contains(r)&&!kc(e,r)&&tw(t,e):!1}function Qf(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let o=!1;return new Proxy(n,{get:(i,s)=>s==="currentTarget"?e:s==="target"?r:s==="preventDefault"?()=>{o=!0,typeof i.preventDefault=="function"&&i.preventDefault()}:s==="defaultPrevented"?o:s in i?i[s]:t[s]})}function Jf(t,e){Ee(e,!0);let r=k(e,"interactOutsideBehavior",7,"close"),n=k(e,"onInteractOutside",7,Xe),o=k(e,"onFocusOutside",7,Xe),a=k(e,"id",7),i=k(e,"children",7),s=k(e,"enabled",7),c=k(e,"isValidEvent",7,()=>!1);const l=nw({id:Q.with(()=>a()),interactOutsideBehavior:Q.with(()=>r()),onInteractOutside:Q.with(()=>n()),enabled:Q.with(()=>s()),onFocusOutside:Q.with(()=>o()),isValidEvent:Q.with(()=>c())});var u=he(),f=te(u);return ut(f,()=>i()??Qe,()=>({props:l.props})),C(t,u),Ae({get interactOutsideBehavior(){return r()},set interactOutsideBehavior(d="close"){r(d),_()},get onInteractOutside(){return n()},set onInteractOutside(d=Xe){n(d),_()},get onFocusOutside(){return o()},set onFocusOutside(d=Xe){o(d),_()},get id(){return a()},set id(d){a(d),_()},get children(){return i()},set children(d){i(d),_()},get enabled(){return s()},set enabled(d){s(d),_()},get isValidEvent(){return c()},set isValidEvent(d=()=>!1){c(d),_()}})}Ie(Jf,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0),globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);class sw{constructor(e){z(this,"opts");G(this,Ps,()=>Ft(document,"keydown",x(this,Fs),{passive:!1}));G(this,Fs,e=>{if(e.key!==Py||!cw(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)});this.opts=e;let r=Xe;ar(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=x(this,Ps).call(this)),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}}Ps=new WeakMap,Fs=new WeakMap;function lw(t){return new sw(t)}function cw(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([o,{current:a}])=>a==="close"||a==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function Xf(t,e){Ee(e,!0);let r=k(e,"escapeKeydownBehavior",7,"close"),n=k(e,"onEscapeKeydown",7,Xe),o=k(e,"children",7),a=k(e,"enabled",7);lw({escapeKeydownBehavior:Q.with(()=>r()),onEscapeKeydown:Q.with(()=>n()),enabled:Q.with(()=>a())});var i=he(),s=te(i);return ut(s,()=>o()??Qe),C(t,i),Ae({get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(c="close"){r(c),_()},get onEscapeKeydown(){return n()},set onEscapeKeydown(c=Xe){n(c),_()},get children(){return o()},set children(c){o(c),_()},get enabled(){return a()},set enabled(c){a(c),_()}})}Ie(Xf,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const Rn=Q([]);function uw(){return{add(t){const e=Rn.current[0];e&&t.id!==e.id&&e.pause(),Rn.current=eh(Rn.current,t),Rn.current.unshift(t)},remove(t){var e;Rn.current=eh(Rn.current,t),(e=Rn.current[0])==null||e.resume()},get current(){return Rn.current}}}function dw(){let t=me(!1),e=me(!1);return{id:Ct(),get paused(){return p(t)},get isHandlingFocus(){return p(e)},set isHandlingFocus(r){A(e,r,!0)},pause(){A(t,!0)},resume(){A(t,!1)}}}function eh(t,e){return[...t].filter(r=>r.id!==e.id)}function fw(t){return t.filter(e=>e.tagName!=="A")}function In(t,{select:e=!1}={}){if(!(t&&t.focus)||document.activeElement===t)return;const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&My(t)&&e&&t.select()}function hw(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(In(n,{select:e}),document.activeElement!==r)return!0}function th(t,e){for(const r of t)if(!By(r,e))return r}function rh(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function pw(t){const e=rh(t),r=th(e,t),n=th(e.reverse(),t);return[r,n]}/*!
1069
1038
  * tabbable 6.2.0
1070
1039
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1071
- */var $1=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Z1=$1.join(","),Zf=typeof Element>"u",rs=Zf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ns=!Zf&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},U1=function t(e,r){var n;r===void 0&&(r=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),a=o===""||o==="true",i=a||r&&e&&t(e.parentNode);return i},H1=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},V1=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},G1=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||H1(e))&&!V1(e)?0:e.tabIndex},Uf=function(e){return e.tagName==="INPUT"},W1=function(e){return Uf(e)&&e.type==="hidden"},K1=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},Y1=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},Q1=function(e){if(!e.name)return!0;var r=e.form||ns(e),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(e.name));else try{o=n(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Y1(o,e.form);return!a||a===e},J1=function(e){return Uf(e)&&e.type==="radio"},X1=function(e){return J1(e)&&!Q1(e)},ey=function(e){var r,n=e&&ns(e),o=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==e){var i,s,l;for(a=!!((i=o)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!a&&o;){var c,u,d;n=ns(o),o=(c=n)===null||c===void 0?void 0:c.host,a=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return a},Hf=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},ty=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=rs.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(rs.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=e;e;){var l=e.parentElement,c=ns(e);if(l&&!l.shadowRoot&&o(l)===!0)return Hf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=s}if(ey(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Hf(e);return!1},ry=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return rs.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},ny=function(e,r){return!(r.disabled||U1(r)||W1(r)||ty(r,e)||K1(r)||ry(r))},oy=function(e,r){return!(X1(r)||G1(r)<0||!ny(e,r))},ay=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return rs.call(e,Z1)===!1?!1:oy(r,e)};const iy=new Lf("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),sy=new Lf("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),ly=new dc("FocusScope");function cy({id:t,loop:e,enabled:r,onOpenAutoFocus:n,onCloseAutoFocus:o,forceMount:a}){const i=F1(),s=z1(),l=ee(null),c=ly.getOr({ignoreCloseAutoFocus:!1});let u=null;Ar({id:t,ref:l,deps:()=>r.current});function d(g){if(!(s.paused||!l.current||s.isHandlingFocus)){s.isHandlingFocus=!0;try{const b=g.target;if(!pc(b))return;const w=l.current.contains(b);if(g.type==="focusin")if(w)u=b;else{if(c.ignoreCloseAutoFocus)return;Tn(u,{select:!0})}else g.type==="focusout"&&!w&&!c.ignoreCloseAutoFocus&&Tn(u,{select:!0})}finally{s.isHandlingFocus=!1}}}function f(g){var w;!((w=l.current)==null?void 0:w.contains(u))&&l.current&&Tn(l.current)}nr([()=>l.current,()=>r.current],([g,b])=>{if(!g||!b)return;const w=Zn(Lt(document,"focusin",d),Lt(document,"focusout",d)),R=new MutationObserver(f);return R.observe(g,{childList:!0,subtree:!0}),()=>{w(),R.disconnect()}}),nr([()=>a.current,()=>l.current],([g,b])=>{if(g)return;const w=document.activeElement;return v(b,w),()=>{b&&h(w)}}),nr([()=>a.current,()=>l.current,()=>r.current],([g,b])=>{if(!g)return;const w=document.activeElement;return v(b,w),()=>{b&&h(w)}});function v(g,b){if(g||(g=document.getElementById(t.current)),!g||!r.current)return;if(i.add(s),!g.contains(b)){const R=iy.createEvent();n.current(R),R.defaultPrevented||La(()=>{g&&(q1(B1($f(g)),{select:!0}),document.activeElement===b&&Tn(g))})}}function h(g){const b=sy.createEvent();o.current(b);const w=c.ignoreCloseAutoFocus;fc(0,()=>{!b.defaultPrevented&&g&&!w&&Tn(ay(g)?g:document.body,{select:!0}),i.remove(s)})}function m(g){if(!r.current||!e.current&&!r.current||s.paused)return;const b=g.key===s1&&!g.ctrlKey&&!g.altKey&&!g.metaKey,w=document.activeElement;if(!(b&&w))return;const R=l.current;if(!R)return;const[E,x]=j1(R);E&&x?!g.shiftKey&&w===x?(g.preventDefault(),e.current&&Tn(E,{select:!0})):g.shiftKey&&w===E&&(g.preventDefault(),e.current&&Tn(x,{select:!0})):w===R&&g.preventDefault()}const y=Te(()=>({id:t.current,tabindex:-1,onkeydown:m}));return{get props(){return p(y)}}}function Vf(t,e){Ae(e,!0);let r=k(e,"id",7),n=k(e,"trapFocus",7,!1),o=k(e,"loop",7,!1),a=k(e,"onCloseAutoFocus",7,Ye),i=k(e,"onOpenAutoFocus",7,Ye),s=k(e,"focusScope",7),l=k(e,"forceMount",7,!1);const c=cy({enabled:ee.with(()=>n()),loop:ee.with(()=>o()),onCloseAutoFocus:ee.with(()=>a()),onOpenAutoFocus:ee.with(()=>i()),id:ee.with(()=>r()),forceMount:ee.with(()=>l())});var u=ne(),d=V(u);return ut(d,()=>s()??Ge,()=>({props:c.props})),T(t,u),Re({get id(){return r()},set id(f){r(f),_()},get trapFocus(){return n()},set trapFocus(f=!1){n(f),_()},get loop(){return o()},set loop(f=!1){o(f),_()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(f=Ye){a(f),_()},get onOpenAutoFocus(){return i()},set onOpenAutoFocus(f=Ye){i(f),_()},get focusScope(){return s()},set focusScope(f){s(f),_()},get forceMount(){return l()},set forceMount(f=!1){l(f),_()}})}Oe(Vf,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0),globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);class uy{constructor(e){W(this,Cs);q(this,"opts");W(this,Bo,Ye);W(this,Xa,ee(null));W(this,As,e=>{const r=S(this,Xa).current,n=e.target;!pc(r)||!pc(n)||!this.opts.enabled.current||!hy(this)||!gc(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&Ct(this,Bo,fy(r)))});W(this,ei,()=>{S(this,Bo).call(this),Ct(this,Bo,Ye)});this.opts=e,Ar({id:e.id,ref:S(this,Xa),deps:()=>this.opts.enabled.current});let r=Ye;nr(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=Wn(this,Cs,wh).call(this)),()=>{r(),S(this,ei).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}Bo=new WeakMap,Xa=new WeakMap,Cs=new WeakSet,wh=function(){return Zn(Lt(document,"pointerdown",S(this,As)),Lt(document,"pointerup",mf(S(this,ei),this.opts.onPointerUp.current)))},As=new WeakMap,ei=new WeakMap;function dy(t){return new uy(t)}const Gf=t=>t.style.userSelect||t.style.webkitUserSelect;function fy(t){const e=document.body,r=Gf(e),n=Gf(t);return os(e,"none"),os(t,"text"),()=>{os(e,r),os(t,n)}}function os(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function hy(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Wf(t,e){Ae(e,!0);let r=k(e,"preventOverflowTextSelection",7,!0),n=k(e,"onPointerDown",7,Ye),o=k(e,"onPointerUp",7,Ye),a=k(e,"id",7),i=k(e,"children",7),s=k(e,"enabled",7);dy({id:ee.with(()=>a()),preventOverflowTextSelection:ee.with(()=>r()),onPointerDown:ee.with(()=>n()),onPointerUp:ee.with(()=>o()),enabled:ee.with(()=>s())});var l=ne(),c=V(l);return ut(c,()=>i()??Ge),T(t,l),Re({get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(u=!0){r(u),_()},get onPointerDown(){return n()},set onPointerDown(u=Ye){n(u),_()},get onPointerUp(){return o()},set onPointerUp(u=Ye){o(u),_()},get id(){return a()},set id(u){a(u),_()},get children(){return i()},set children(u){i(u),_()},get enabled(){return s()},set enabled(u){s(u),_()}})}Oe(Wf,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function py(t){let e=0,r=Ie(void 0),n;function o(){e-=1,n&&e<=0&&(n(),A(r,void 0),n=void 0)}return(...a)=>(e+=1,p(r)===void 0&&(n=Vc(()=>{A(r,Se(t(...a)))})),wt(()=>()=>{o()}),p(r))}const gy=py(()=>{const t=new uc,e=Te(()=>{for(const a of t.values())if(a)return!0;return!1});let r=Ie(null),n=null;function o(){If&&(document.body.setAttribute("style",p(r)??""),document.body.style.removeProperty("--scrollbar-width"),Of&&(n==null||n()))}return wt(()=>{const a=p(e);return Gt(()=>{if(!a)return;A(r,Se(document.body.getAttribute("style")));const i=getComputedStyle(document.body),s=window.innerWidth-document.documentElement.clientWidth,c={padding:Number.parseInt(i.paddingRight??"0",10)+s,margin:Number.parseInt(i.marginRight??"0",10)};s>0&&(document.body.style.paddingRight=`${c.padding}px`,document.body.style.marginRight=`${c.margin}px`,document.body.style.setProperty("--scrollbar-width",`${s}px`),document.body.style.overflow="hidden"),Of&&(n=Pf(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),La(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),wt(()=>()=>{n==null||n()}),{get map(){return t},resetBodyStyle:o}});function my(t,e=()=>null){const r=It(),n=gy();if(!n)return;const o=Te(e);n.map.set(r,t??!1);const a=ee.with(()=>n.map.get(r)??!1,i=>n.map.set(r,i));return wt(()=>()=>{n.map.delete(r),!vy(n.map)&&(p(o)===null?requestAnimationFrame(()=>n.resetBodyStyle()):fc(p(o),()=>n.resetBodyStyle()))}),a}function vy(t){for(const[e,r]of t)if(r)return!0;return!1}function mc(t,e){Ae(e,!0);let r=k(e,"preventScroll",7,!0),n=k(e,"restoreScrollDelay",7,null);return my(r(),()=>n()),Re({get preventScroll(){return r()},set preventScroll(o=!0){r(o),_()},get restoreScrollDelay(){return n()},set restoreScrollDelay(o=null){n(o),_()}})}Oe(mc,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function by({forceMount:t,present:e,trapFocus:r,open:n}){return t?n&&r:e&&r&&n}var yy=Y("<div><!></div>");function Kf(t,e){Ae(e,!0);let r=k(e,"id",23,It),n=k(e,"forceMount",7,!1),o=k(e,"child",7),a=k(e,"children",7),i=k(e,"ref",15,null),s=kr(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const l=S1({id:ee.with(()=>r()),ref:ee.with(()=>i(),d=>i(d))}),c=Te(()=>fr(s,l.props));var u=Te(()=>l.root.opts.open.current||n());return ts(t,{get id(){return r()},get present(){return p(u)},presence:f=>{var v=ne(),h=V(v);{var m=g=>{var b=ne(),w=V(b),R=Nt(()=>({props:fr(p(c)),...l.snippetProps}));ut(w,o,()=>p(R)),T(g,b)},y=g=>{var b=yy();const w=Te(()=>fr(p(c)));let R;var E=P(b);ut(E,()=>a()??Ge,()=>l.snippetProps),O(b),se(()=>R=Kt(b,R,{...p(w)})),T(g,b)};ce(h,g=>{o()?g(m):g(y,!1)})}T(f,v)},$$slots:{presence:!0}}),Re({get id(){return r()},set id(d=It()){r(d),_()},get forceMount(){return n()},set forceMount(d=!1){n(d),_()},get child(){return o()},set child(d){o(d),_()},get children(){return a()},set children(d){a(d),_()},get ref(){return i()},set ref(d=null){i(d),_()}})}Oe(Kf,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var wy=Y("<div><!></div>");function Yf(t,e){Ae(e,!0);let r=k(e,"id",23,It),n=k(e,"children",7),o=k(e,"child",7),a=k(e,"ref",15,null),i=kr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const s=T1({id:ee.with(()=>r()),ref:ee.with(()=>a(),v=>a(v))}),l=Te(()=>fr(i,s.props));var c=ne(),u=V(c);{var d=v=>{var h=ne(),m=V(h);ut(m,o,()=>({props:p(l)})),T(v,h)},f=v=>{var h=wy();let m;var y=P(h);ut(y,()=>n()??Ge),O(h),se(()=>m=Kt(h,m,{...p(l)})),T(v,h)};ce(u,v=>{o()?v(d):v(f,!1)})}return T(t,c),Re({get id(){return r()},set id(v=It()){r(v),_()},get children(){return n()},set children(v){n(v),_()},get child(){return o()},set child(v){o(v),_()},get ref(){return a()},set ref(v=null){a(v),_()}})}Oe(Yf,{id:{},children:{},child:{},ref:{}},[],[],!0);const _y="data-collapsible-root",ky="data-collapsible-content",xy="data-collapsible-trigger";class Sy{constructor(e){q(this,"opts");W(this,ti,Ie(null));W(this,Rs,Te(()=>({id:this.opts.id.current,"data-state":Xi(this.opts.open.current),"data-disabled":hc(this.opts.disabled.current),[_y]:""})));this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),Ar(e)}get contentNode(){return p(S(this,ti))}set contentNode(e){A(S(this,ti),Se(e))}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return p(S(this,Rs))}}ti=new WeakMap,Rs=new WeakMap;class Ty{constructor(e,r){q(this,"opts");q(this,"root");W(this,qo);W(this,jo,Ie(!1));W(this,$o,Ie(0));W(this,Zo,Ie(0));W(this,Is,Te(()=>this.opts.forceMount.current||this.root.opts.open.current));W(this,Os,Te(()=>({open:this.root.opts.open.current})));W(this,Ns,Te(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":p(S(this,Zo))?`${p(S(this,Zo))}px`:void 0,"--bits-collapsible-content-width":p(S(this,$o))?`${p(S(this,$o))}px`:void 0},"data-state":Xi(this.root.opts.open.current),"data-disabled":hc(this.root.opts.disabled.current),[ky]:""})));this.opts=e,this.root=r,S(this,jo).v=Se(r.opts.open.current),Ar({...e,deps:()=>this.present,onRefChange:n=>{this.root.contentNode=n}}),Ks(()=>{const n=requestAnimationFrame(()=>{A(S(this,jo),!1)});return()=>{cancelAnimationFrame(n)}}),nr([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&La(()=>{if(!this.opts.ref.current)return;Ct(this,qo,S(this,qo)||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName}),n.style.transitionDuration="0s",n.style.animationName="none";const o=n.getBoundingClientRect();if(A(S(this,Zo),Se(o.height)),A(S(this,$o),Se(o.width)),!p(S(this,jo))){const{animationName:a,transitionDuration:i}=S(this,qo);n.style.transitionDuration=i,n.style.animationName=a}})})}get present(){return p(S(this,Is))}get snippetProps(){return p(S(this,Os))}get props(){return p(S(this,Ns))}}qo=new WeakMap,jo=new WeakMap,$o=new WeakMap,Zo=new WeakMap,Is=new WeakMap,Os=new WeakMap,Ns=new WeakMap;class Ey{constructor(e,r){q(this,"opts");q(this,"root");W(this,Hn,Te(()=>this.opts.disabled.current||this.root.opts.disabled.current));W(this,Ps,Te(()=>{var e;return{id:this.opts.id.current,type:"button",disabled:p(S(this,Hn)),"aria-controls":(e=this.root.contentNode)==null?void 0:e.id,"aria-expanded":a1(this.root.opts.open.current),"data-state":Xi(this.root.opts.open.current),"data-disabled":hc(p(S(this,Hn))),[xy]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Ar(e)}onclick(e){if(!p(S(this,Hn))){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){p(S(this,Hn))||(e.key===Rf||e.key===Af)&&(e.preventDefault(),this.root.toggleOpen())}get props(){return p(S(this,Ps))}}Hn=new WeakMap,Ps=new WeakMap;const vc=new dc("Collapsible.Root");function Cy(t){return vc.set(new Sy(t))}function Ay(t){return new Ey(t,vc.get())}function Ry(t){return new Ty(t,vc.get())}var Iy=Y("<div><!></div>");function Qf(t,e){Ae(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"id",23,It),a=k(e,"ref",15,null),i=k(e,"open",15,!1),s=k(e,"disabled",7,!1),l=k(e,"onOpenChange",7,Ye),c=kr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","open","disabled","onOpenChange"]);const u=Cy({open:ee.with(()=>i(),y=>{i(y),l()(y)}),disabled:ee.with(()=>s()),id:ee.with(()=>o()),ref:ee.with(()=>a(),y=>a(y))}),d=Te(()=>fr(c,u.props));var f=ne(),v=V(f);{var h=y=>{var g=ne(),b=V(g);ut(b,n,()=>({props:p(d)})),T(y,g)},m=y=>{var g=Iy();let b;var w=P(g);ut(w,()=>r()??Ge),O(g),se(()=>b=Kt(g,b,{...p(d)})),T(y,g)};ce(v,y=>{n()?y(h):y(m,!1)})}return T(t,f),Re({get children(){return r()},set children(y){r(y),_()},get child(){return n()},set child(y){n(y),_()},get id(){return o()},set id(y=It()){o(y),_()},get ref(){return a()},set ref(y=null){a(y),_()},get open(){return i()},set open(y=!1){i(y),_()},get disabled(){return s()},set disabled(y=!1){s(y),_()},get onOpenChange(){return l()},set onOpenChange(y=Ye){l(y),_()}})}Oe(Qf,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{}},[],[],!0);var Oy=Y("<div><!></div>");function Jf(t,e){Ae(e,!0);let r=k(e,"child",7),n=k(e,"ref",15,null),o=k(e,"forceMount",7,!1),a=k(e,"children",7),i=k(e,"id",23,It),s=kr(e,["$$slots","$$events","$$legacy","$$host","child","ref","forceMount","children","id"]);const l=Ry({id:ee.with(()=>i()),forceMount:ee.with(()=>o()),ref:ee.with(()=>n(),c=>n(c))});return ts(t,{forceMount:!0,get present(){return l.present},get id(){return i()},presence:(u,d)=>{let f=()=>d==null?void 0:d().present;var v=ne();const h=Te(()=>fr(s,l.props,{hidden:o()?void 0:!f().current}));var m=V(v);{var y=b=>{var w=ne(),R=V(w);ut(R,r,()=>({...l.snippetProps,props:p(h)})),T(b,w)},g=b=>{var w=Oy();let R;var E=P(w);ut(E,()=>a()??Ge),O(w),se(()=>R=Kt(w,R,{...p(h)})),T(b,w)};ce(m,b=>{r()?b(y):b(g,!1)})}T(u,v)},$$slots:{presence:!0}}),Re({get child(){return r()},set child(c){r(c),_()},get ref(){return n()},set ref(c=null){n(c),_()},get forceMount(){return o()},set forceMount(c=!1){o(c),_()},get children(){return a()},set children(c){a(c),_()},get id(){return i()},set id(c=It()){i(c),_()}})}Oe(Jf,{child:{},ref:{},forceMount:{},children:{},id:{}},[],[],!0);var Ny=Y("<button><!></button>");function Xf(t,e){Ae(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"ref",15,null),a=k(e,"id",23,It),i=k(e,"disabled",7,!1),s=kr(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","disabled"]);const l=Ay({id:ee.with(()=>a()),ref:ee.with(()=>o(),h=>o(h)),disabled:ee.with(()=>i())}),c=Te(()=>fr(s,l.props));var u=ne(),d=V(u);{var f=h=>{var m=ne(),y=V(m);ut(y,n,()=>({props:p(c)})),T(h,m)},v=h=>{var m=Ny();let y;var g=P(m);ut(g,()=>r()??Ge),O(m),se(()=>y=Kt(m,y,{...p(c)})),T(h,m)};ce(d,h=>{n()?h(f):h(v,!1)})}return T(t,u),Re({get children(){return r()},set children(h){r(h),_()},get child(){return n()},set child(h){n(h),_()},get ref(){return o()},set ref(h=null){o(h),_()},get id(){return a()},set id(h=It()){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Oe(Xf,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],!0);function eh(t,e){Ae(e,!0);let r=k(e,"open",15,!1),n=k(e,"onOpenChange",7,Ye),o=k(e,"children",7);_1({variant:ee.with(()=>"dialog"),open:ee.with(()=>r(),s=>{r(s),n()(s)})});var a=ne(),i=V(a);return ut(i,()=>o()??Ge),T(t,a),Re({get open(){return r()},set open(s=!1){r(s),_()},get onOpenChange(){return n()},set onOpenChange(s=Ye){n(s),_()},get children(){return o()},set children(s){o(s),_()}})}Oe(eh,{open:{},onOpenChange:{},children:{}},[],[],!0);var Py=Y("<button><!></button>");function bc(t,e){Ae(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"id",23,It),a=k(e,"ref",15,null),i=k(e,"disabled",7,!1),s=kr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const l=E1({variant:ee.with(()=>"close"),id:ee.with(()=>o()),ref:ee.with(()=>a(),h=>a(h)),disabled:ee.with(()=>!!i())}),c=Te(()=>fr(s,l.props));var u=ne(),d=V(u);{var f=h=>{var m=ne(),y=V(m);ut(y,n,()=>({props:p(c)})),T(h,m)},v=h=>{var m=Py();let y;var g=P(m);ut(g,()=>r()??Ge),O(m),se(()=>y=Kt(m,y,{...p(c)})),T(h,m)};ce(d,h=>{n()?h(f):h(v,!1)})}return T(t,u),Re({get children(){return r()},set children(h){r(h),_()},get child(){return n()},set child(h){n(h),_()},get id(){return o()},set id(h=It()){o(h),_()},get ref(){return a()},set ref(h=null){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Oe(bc,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var Ly=Y("<!> <!>",1),My=Y("<!> <div><!></div>",1);function th(t,e){Ae(e,!0);let r=k(e,"id",23,It),n=k(e,"children",7),o=k(e,"child",7),a=k(e,"ref",15,null),i=k(e,"forceMount",7,!1),s=k(e,"onCloseAutoFocus",7,Ye),l=k(e,"onEscapeKeydown",7,Ye),c=k(e,"onInteractOutside",7,Ye),u=k(e,"trapFocus",7,!0),d=k(e,"preventScroll",7,!0),f=k(e,"restoreScrollDelay",7,null),v=kr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=x1({id:ee.with(()=>r()),ref:ee.with(()=>a(),g=>a(g))}),m=Te(()=>fr(v,h.props));var y=Te(()=>h.root.opts.open.current||i());return ts(t,vn(()=>p(m),{get forceMount(){return i()},get present(){return p(y)},presence:b=>{var w=Te(()=>by({forceMount:i(),present:h.root.opts.open.current,trapFocus:u(),open:h.root.opts.open.current}));Vf(b,vn({loop:!0,get trapFocus(){return p(w)}},()=>p(m),{onCloseAutoFocus:E=>{var x;s()(E),!E.defaultPrevented&&((x=h.root.triggerNode)==null||x.focus())},focusScope:(E,x)=>{let J=()=>x==null?void 0:x().props;Bf(E,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onEscapeKeydown:M=>{l()(M),!M.defaultPrevented&&h.root.handleClose()},children:(M,H)=>{zf(M,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onInteractOutside:z=>{c()(z),!z.defaultPrevented&&h.root.handleClose()},children:(z,F)=>{Wf(z,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},children:(oe,xe)=>{var I=ne(),Le=V(I);{var re=$=>{var G=Ly(),de=V(G);{var ue=Ze=>{mc(Ze,{get preventScroll(){return d()},get restoreScrollDelay(){return f()}})};ce(de,Ze=>{h.root.opts.open.current&&Ze(ue)})}var fe=ie(de,2),je=Nt(()=>({props:fr(p(m),J()),...h.snippetProps}));ut(fe,o,()=>p(je)),T($,G)},X=$=>{var G=My(),de=V(G);mc(de,{get preventScroll(){return d()}});var ue=ie(de,2);const fe=Te(()=>fr(p(m),J()));let je;var Ze=P(ue);ut(Ze,()=>n()??Ge),O(ue),se(()=>je=Kt(ue,je,{...p(fe)})),T($,G)};ce(Le,$=>{o()?$(re):$(X,!1)})}T(oe,I)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}}))},$$slots:{presence:!0}})),Re({get id(){return r()},set id(g=It()){r(g),_()},get children(){return n()},set children(g){n(g),_()},get child(){return o()},set child(g){o(g),_()},get ref(){return a()},set ref(g=null){a(g),_()},get forceMount(){return i()},set forceMount(g=!1){i(g),_()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(g=Ye){s(g),_()},get onEscapeKeydown(){return l()},set onEscapeKeydown(g=Ye){l(g),_()},get onInteractOutside(){return c()},set onInteractOutside(g=Ye){c(g),_()},get trapFocus(){return u()},set trapFocus(g=!0){u(g),_()},get preventScroll(){return d()},set preventScroll(g=!0){d(g),_()},get restoreScrollDelay(){return f()},set restoreScrollDelay(g=null){f(g),_()}})}Oe(th,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var Dy=Y("<div></div>"),Fy=Y('<span class="sr-only">Close</span> <!>',1),zy=Y('<div><div class="dialog-header"><!> <!></div> <!></div>'),By=Y("<!> <!>",1);function rh(t,e){var f,v,h;Ae(e,!0);const r=Yt(),n=()=>mt(xo,"$config",r);let o=k(e,"open",7),a=k(e,"content",7),i=k(e,"title",7),s=k(e,"onClose",7);const l={duration:Number((f=n().theme.components.dialog.custom)==null?void 0:f.transitionDuration)||200,delay:Number((v=n().theme.components.dialog.custom)==null?void 0:v.transitionDelay)||0,y:Number((h=n().theme.components.dialog.custom)==null?void 0:h.transitionY)||10},c=m=>{m||s()()};var u=ne(),d=V(u);return Wt(d,()=>eh,(m,y)=>{y(m,{get open(){return o()},onOpenChange:c,children:(g,b)=>{var w=By(),R=V(w);Wt(R,()=>bc,(x,J)=>{J(x,{children:(M,H)=>{var z=ne(),F=V(z);Wt(F,()=>Kf,(oe,xe)=>{xe(oe,{forceMount:!0,child:(Le,re)=>{let X=()=>re==null?void 0:re().props,$=()=>re==null?void 0:re().open;var G=ne(),de=V(G);{var ue=fe=>{var je=Dy();let Ze;se(()=>Ze=Kt(je,Ze,{...X(),class:"dialog-overlay"})),zr(3,je,()=>hf,()=>l),T(fe,je)};ce(de,fe=>{$()&&fe(ue)})}T(Le,G)},$$slots:{child:!0}})}),T(M,z)},$$slots:{default:!0}})});var E=ie(R,2);Wt(E,()=>th,(x,J)=>{J(x,{forceMount:!0,child:(H,z)=>{let F=()=>z==null?void 0:z().props,oe=()=>z==null?void 0:z().open;var xe=ne(),I=V(xe);{var Le=re=>{var X=zy();let $;var G=P(X),de=P(G);Wt(de,()=>Nf,(je,Ze)=>{Ze(je,{class:"dialog-title",children:(dt,he)=>{var Ee=ne(),Z=V(Ee);ut(Z,()=>i()??Ge),T(dt,Ee)},$$slots:{default:!0}})});var ue=ie(de,2);Wt(ue,()=>bc,(je,Ze)=>{Ze(je,{class:"dialog-close",children:(dt,he)=>{var Ee=Fy(),Z=ie(V(Ee),2);tr(Z,{name:"dismiss"}),T(dt,Ee)},$$slots:{default:!0}})}),O(G);var fe=ie(G,2);Wt(fe,()=>Yf,(je,Ze)=>{Ze(je,{class:"dialog-description",children:(dt,he)=>{var Ee=ne(),Z=V(Ee);ut(Z,a),T(dt,Ee)},$$slots:{default:!0}})}),O(X),se(()=>$=Kt(X,$,{...F(),class:"dialog-content"})),zr(3,X,()=>Na,()=>l),T(re,X)};ce(I,re=>{oe()&&re(Le)})}T(H,xe)},$$slots:{child:!0}})}),T(g,w)},$$slots:{default:!0}})}),T(t,u),Re({get open(){return o()},set open(m){o(m),_()},get content(){return a()},set content(m){a(m),_()},get title(){return i()},set title(m){i(m),_()},get onClose(){return s()},set onClose(m){s(m),_()}})}Oe(rh,{open:{},content:{},title:{},onClose:{}},[],[],!0);var qy=Y('<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"></div> <button type="submit" class="btn btn--primary"> </button></form>');function nh(t,e){Ae(e,!0);const r=Yt(),n=()=>mt(an,"$t",r);let o=k(e,"classification",7),a=k(e,"logic",7),i=Ie(""),s=Ie(""),l=Ie(void 0),c=Ie(void 0),u=Te(()=>p(l)!==void 0||p(c)!==void 0||p(i)!=="");var d=Te(()=>!!a().chatState.feedbackOpenedId);return rh(t,{get open(){return p(d)},get onClose(){return a().closeFeedback},title:h=>{var m=ne(),y=V(m);fo(y,()=>n().feedbackFormTitle),T(h,m)},content:h=>{var m=qy(),y=P(m);gf(y,{get classificationConfig(){return a().chatState.classification},get impact(){return p(l)},set impact(F){A(l,Se(F))},get quality(){return p(c)},set quality(F){A(c,Se(F))}});var g=ie(y,2),b=P(g),w=P(b,!0);O(b);var R=ie(b,2);hu(R),O(g);var E=ie(g,2),x=P(E),J=P(x,!0);O(x);var M=ie(x,2);hl(M),O(E);var H=ie(E,2),z=P(H,!0);O(H),O(m),se(()=>{He(w,n().feedbackFormMessage),ke(R,"placeholder",n().feedbackFormMessagePlaceholder),He(J,n().feedbackFormEmail),ke(M,"placeholder",n().feedbackFormEmailPlaceholder),H.disabled=!p(u),He(z,n().send)}),st("submit",m,async F=>{F.preventDefault(),o().enabled?await a().submitFeedback({email:p(s),body:p(i),classification:{impact:p(l),quality:p(c)}}):await a().submitFeedback({email:p(s),body:p(i)}),A(l,void 0),A(c,void 0),A(i,"")}),gl(R,()=>p(i),F=>A(i,F)),gl(M,()=>p(s),F=>A(s,F)),T(h,m)},$$slots:{title:!0,content:!0}}),Re({get classification(){return o()},set classification(f){o(f),_()},get logic(){return a()},set logic(f){a(f),_()}})}Oe(nh,{classification:{},logic:{}},[],[],!0);function yc(t,e){let r=null,n;function o(){e.text&&(r||(r=document.createElement("span"),r.textContent=e.text,r.className=`tooltip tooltip-${e.position||"top"} tooltip-hidden`,t.appendChild(r),r.getBoundingClientRect()),r.classList.remove("tooltip-hidden"),a())}function a(){if(!r)return;const l=t.getBoundingClientRect(),c=r.getBoundingClientRect();let u,d;switch(e.position){case"bottom":u=l.height+5,d=l.width/2-c.width/2;break;case"left":u=l.height/2-c.height/2,d=-c.width-5;break;case"right":u=l.height/2-c.height/2,d=l.width+5;break;case"top":default:u=-c.height-5,d=l.width/2-c.width/2;break}r.style.top=`${u}px`,r.style.left=`${d}px`}function i(){n=window.setTimeout(()=>{o()},e.delay||200)}function s(){clearTimeout(n),r&&(r.classList.add("tooltip-hidden"),r.addEventListener("transitionend",()=>{r==null||r.remove(),r=null},{once:!0}))}return t.classList.add("tooltip-container"),t.setAttribute("tabindex","0"),t.addEventListener("mouseenter",i),t.addEventListener("focus",i),t.addEventListener("mouseleave",s),t.addEventListener("blur",s),{update(l){e=l},destroy(){s(),t.classList.remove("tooltip-container"),t.removeEventListener("mouseenter",i),t.removeEventListener("focus",i),t.removeEventListener("mouseleave",s),t.removeEventListener("blur",s)}}}var jy=Y("<button><div><!></div></button>");function as(t,e){Ae(e,!0);let r=k(e,"class",7),n=k(e,"tooltip",7),o=k(e,"onclick",7),a=k(e,"icon",7);var i=jy();i.__click=function(...c){var u;(u=o())==null||u.apply(this,c)};var s=P(i),l=P(s);return tr(l,{get name(){return a()}}),O(s),O(i),fl(i,(c,u)=>yc==null?void 0:yc(c,u),()=>({text:n(),position:"top",delay:300})),se(()=>en(s,r())),T(t,i),Re({get class(){return r()},set class(c){r(c),_()},get tooltip(){return n()},set tooltip(c){n(c),_()},get onclick(){return o()},set onclick(c){o(c),_()},get icon(){return a()},set icon(c){a(c),_()}})}lo(["click"]),Oe(as,{class:{},tooltip:{},onclick:{},icon:{}},[],[],!0);var $y=Y('<a target="_blank" class="reference transition-colors"><span class="reference__number transition-colors"> </span> <span class="reference__body transition-colors"><span class="reference__title line-clamp line-clamp--2"> </span> <span class="reference__domain transition-colors"><span class="truncate"> </span></span></span> <!></a>');function oh(t,e){Ae(e,!0);let r=k(e,"title",7),n=k(e,"number",7),o=k(e,"url",7),a=k(e,"domainName",7);var i=$y(),s=P(i),l=P(s,!0);O(s);var c=ie(s,2),u=P(c),d=P(u,!0);O(u);var f=ie(u,2),v=P(f),h=P(v,!0);O(v),O(f),O(c);var m=ie(c,2);return tr(m,{name:"externalLink",class:"reference__icon transition-colors"}),O(i),se(()=>{ke(i,"href",o()),He(l,n()),He(d,r()),He(h,a())}),T(t,i),Re({get title(){return r()},set title(y){r(y),_()},get number(){return n()},set number(y){n(y),_()},get url(){return o()},set url(y){o(y),_()},get domainName(){return a()},set domainName(y){a(y),_()}})}Oe(oh,{title:{},number:{},url:{},domainName:{}},[],[],!0);var Zy=Y('<h4 class="references__trigger-title"> </h4> <!>',1),Uy=Y('<div class="fly-in"><!></div>'),Hy=Y("<div></div>"),Vy=Y("<!> <div><!></div>",1);function ah(t,e){Ae(e,!0);const r=Yt(),n=()=>mt(an,"$t",r);let o=k(e,"sources",7),a=k(e,"class",7),i=Ie(!1),s=Ie(!1);wt(()=>{p(i)?requestAnimationFrame(()=>{A(s,Se(p(i)))}):A(s,!1)});var l=ne(),c=V(l);return Wt(c,()=>Qf,(u,d)=>{d(u,{get class(){return`references ${a()??""}`},get open(){return p(i)},set open(f){A(i,Se(f))},children:(f,v)=>{var h=Vy(),m=V(h);Wt(m,()=>Xf,(b,w)=>{w(b,{class:"references__trigger transition-colors",children:(R,E)=>{var x=Zy(),J=V(x),M=P(J,!0);O(J);var H=ie(J,2);tr(H,{name:"chevronDown",class:"references__trigger-icon"}),se(()=>He(M,n().referenceTitle)),T(R,x)},$$slots:{default:!0}})});var y=ie(m,2),g=P(y);Wt(g,()=>Jf,(b,w)=>{w(b,{forceMount:!0,child:(E,x)=>{let J=()=>x==null?void 0:x().props,M=()=>x==null?void 0:x().open;var H=ne(),z=V(H);{var F=oe=>{var xe=Hy();let I;wr(xe,21,()=>o().used,Mr,(Le,re,X)=>{let $=()=>p(re).title,G=()=>p(re).url,de=()=>p(re).domainName,ue=()=>p(re).usedNumber;var fe=Uy();ke(fe,"style",`--fly-in-id: ${X??""};`);var je=P(fe);oh(je,{get title(){return $()},get number(){return ue()},get domainName(){return de()},get url(){return G()}}),O(fe),T(Le,fe)}),O(xe),se(()=>I=Kt(xe,I,{...J(),class:"references__container"})),zr(3,xe,()=>r0),T(oe,xe)};ce(z,oe=>{M()&&oe(F)})}T(E,H)},$$slots:{child:!0}})}),O(y),se(()=>Dr(y,"mounted",p(s))),T(f,h)},$$slots:{default:!0}})}),T(t,l),Re({get sources(){return o()},set sources(u){o(u),_()},get class(){return a()},set class(u){a(u),_()}})}Oe(ah,{sources:{},class:{}},[],[],!0);function Gy(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}function ih(t){return Math.pow(t-1,3)*(1-t)+1}var Wy=Y("<!> <!>",1),Ky=Y('<div class="message__bot-options"><!> <div class="message__bot-actions"><!> <!> <!></div></div>'),Yy=Y('<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!></div> <!></div></div>'),Qy=Y('<div class="message container"><div class="message__content"><!></div></div>');function sh(t,e){var m,y,g,b,w,R,E;Ae(e,!0);const r=Yt(),n=()=>mt(xo,"$config",r),o=()=>mt(an,"$t",r);let a=k(e,"message",7),i=k(e,"onmessageupdate",7),s=k(e,"logic",7);const l={duration:Number((m=n().theme.components.message.custom)==null?void 0:m.transitionDuration)||300,delay:Number((y=n().theme.components.message.custom)==null?void 0:y.transitionDelay)||0,y:Number((g=n().theme.components.message.custom)==null?void 0:g.transitionY)||30,ease:ih};a().type==="bot-loading"&&(l.delay+=Number((b=n().theme.components.message.custom)==null?void 0:b.transitionBotLoadingDelay)||300);const c={duration:Number((w=n().theme.components.messageOptions.custom)==null?void 0:w.transitionDuration)||300,delay:Number((R=n().theme.components.messageOptions.custom)==null?void 0:R.transitionDelay)||0,y:Number((E=n().theme.components.messageOptions.custom)==null?void 0:E.transitionY)||30,ease:ih};wt(()=>{var x;((x=a())==null?void 0:x.type)==="bot"&&a().partial&&i()()});var u=Qy(),d=P(u),f=P(d);{var v=x=>{var J=Yy(),M=P(J);tr(M,{name:"avatar",class:"message__bot-avatar"});var H=ie(M,2),z=P(H),F=P(z);{var oe=re=>{var X=Wy(),$=V(X);fo($,()=>a().message.html);var G=ie($,2);{var de=ue=>{var fe=co("...");T(ue,fe)};ce(G,ue=>{a().partial&&ue(de)})}T(re,X)},xe=re=>{var X=ne(),$=V(X);{var G=ue=>{var fe=co();se(()=>He(fe,o().messageBotLoading)),T(ue,fe)},de=ue=>{var fe=co();se(()=>He(fe,`${o().messageBotError??""} ${a().message??o().messageBotDefaultError??""}`)),T(ue,fe)};ce($,ue=>{a().type==="bot-loading"?ue(G):ue(de,!1)},!0)}T(re,X)};ce(F,re=>{a().type==="bot"?re(oe):re(xe,!1)})}O(z);var I=ie(z,2);{var Le=re=>{var X=ne(),$=V(X);{var G=de=>{var ue=Ky(),fe=P(ue);{var je=Z=>{ah(Z,{get sources(){return a().sources},class:"message__bot-references"})};ce(fe,Z=>{a().sources&&a().sources.used.length&&Z(je)})}var Ze=ie(fe,2),dt=P(Ze);as(dt,{icon:"voteUp",get tooltip(){return o().answerGood},onclick:()=>s().giveQuickFeedback({messageId:a().id,feedback:"positive"}),class:"message__bot-action transition-colors"});var he=ie(dt,2);as(he,{icon:"voteDown",get tooltip(){return o().answerBad},onclick:()=>s().giveQuickFeedback({messageId:a().id,feedback:"negative"}),class:"message__bot-action transition-colors"});var Ee=ie(he,2);as(Ee,{icon:"message",get tooltip(){return o().giveFeedback},onclick:()=>s().openFeedback(a().id),class:"message__bot-action transition-colors"}),O(Ze),O(ue),zr(3,ue,()=>Na,()=>c),T(de,ue)};ce($,de=>{a().partial||de(G)})}T(re,X)};ce(I,re=>{a().type==="bot"&&re(Le)})}O(H),O(J),T(x,J)},h=x=>{var J=ne(),M=V(J);{var H=z=>{var F=co();se(()=>He(F,a().message)),T(z,F)};ce(M,z=>{a().type==="user"&&z(H)},!0)}T(x,J)};ce(f,x=>{a().type==="bot"||a().type==="bot-loading"||a().type==="bot-error"?x(v):x(h,!1)})}return O(d),O(u),se(()=>{Dr(u,"message--bot",a().type==="bot"),Dr(u,"message--bot-loading",a().type==="bot-loading"),Dr(u,"message--bot-error",a().type==="bot-error"),Dr(u,"message--user",a().type==="user")}),zr(3,u,()=>Na,()=>l),T(t,u),Re({get message(){return a()},set message(x){a(x),_()},get onmessageupdate(){return i()},set onmessageupdate(x){i(x),_()},get logic(){return s()},set logic(x){s(x),_()}})}Oe(sh,{message:{},onmessageupdate:{},logic:{}},[],[],!0);let is;function Jy(t,e,r,n,o){is&&cancelAnimationFrame(is);const a=t instanceof Window?window.scrollY:t[n],i=performance.now();function s(l){const c=l-i,u=Math.min(c/r,1),d=o(u),f=a+(e-a)*d;t instanceof Window?window.scrollTo({top:f,behavior:"instant"}):t[n]=f,u<1?is=requestAnimationFrame(s):t.dispatchEvent(new CustomEvent("scrollcomplete"))}is=requestAnimationFrame(s)}var Xy=Y('<button class="chat-page__give-feedback btn btn--primary"> </button>'),ew=Y('<div class="chat-page__footer-text fly-in" style="--fly-in-id: 3"><!></div>'),tw=Y('<section class="chat-page"><!> <div class="chat-page__body"><div class="chat-page__messages"><!> <div class="chat-page__buttons"><!> <button class="chat-page__new-conversation btn btn--tertiary"> </button></div></div></div> <div class="chat-page__footer container"><div class="chat-page__footer-content"><button class="chat-page__scroll-to-bottom btn btn--secondary"><span class="sr-only"> </span> <!></button> <div class="fly-in" style="--fly-in-id: 2"><!></div> <!></div></div></section>');const rw={hash:"svelte-1dpsa7g",code:":host {--chat-footer-height: 0px;}"};function lh(t,e){Ae(e,!0),na(t,rw);const r=Yt(),n=()=>mt(xo,"$config",r),o=()=>mt(an,"$t",r);let a=k(e,"history",7),i=k(e,"onSubmit",7),s=k(e,"onStartNewConversation",7),l=k(e,"classification",7),c=k(e,"logic",7),u=Ie(!1),d=Ie(!1),f,v,h,m=Ie(0);const y=50,g=()=>{A(m,Se(h.offsetHeight)),f.style.setProperty("--chat-footer-height",`${p(m)}px`)};wt(()=>{const he=new ResizeObserver(g);return he.observe(h),()=>he.disconnect()});const b=()=>{Jy(f,f.scrollHeight-f.clientHeight,1e3,"scrollTop",Gy)},w=()=>{const he=f.scrollHeight-f.scrollTop-f.clientHeight<y;A(d,!he)},R=()=>{w()},E=he=>{v.offsetHeight>f.offsetHeight&&(v.style.minHeight=`calc(${v.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{b()})),i()(he)};wt(()=>{A(u,!0)});var x=tw();st("resize",Yo,R);var J=P(x);nh(J,{get classification(){return l()},get logic(){return c()}});var M=ie(J,2),H=P(M),z=P(H);wr(z,17,a,Mr,(he,Ee)=>{sh(he,{get message(){return p(Ee)},onmessageupdate:w,get logic(){return c()}})});var F=ie(z,2),oe=P(F);{var xe=he=>{var Ee=Xy();Ee.__click=function(...rt){var _t;(_t=c().openLatestFeedback)==null||_t.apply(this,rt)};var Z=P(Ee,!0);O(Ee),se(()=>He(Z,o().giveFeedback)),T(he,Ee)};ce(oe,he=>{n().showOverallFeedbackButton&&he(xe)})}var I=ie(oe,2);I.__click=function(...he){var Ee;(Ee=s())==null||Ee.apply(this,he)};var Le=P(I,!0);O(I),O(F),O(H),Br(H,he=>v=he,()=>v),O(M),Br(M,he=>f=he,()=>f);var re=ie(M,2),X=P(re),$=P(X);$.__click=b;var G=P($),de=P(G,!0);O(G);var ue=ie(G,2);tr(ue,{name:"chevronDown"}),O($);var fe=ie($,2),je=P(fe);ic(je,{onSubmit:E,class:"chat-page__chat-input"}),O(fe);var Ze=ie(fe,2);{var dt=he=>{var Ee=ew(),Z=P(Ee);fo(Z,()=>o().chatFooterText),O(Ee),T(he,Ee)};ce(Ze,he=>{o().chatFooterText!==void 0&&he(dt)})}return O(X),O(re),Br(re,he=>h=he,()=>h),O(x),se(()=>{He(Le,o().newChat),Dr(re,"mounted",p(u)),Dr($,"chat-page__scroll-to-bottom--hidden",!p(d)),He(de,o().scrollToBottom)}),st("scroll",M,w),T(t,x),Re({get history(){return a()},set history(he){a(he),_()},get onSubmit(){return i()},set onSubmit(he){i(he),_()},get onStartNewConversation(){return s()},set onStartNewConversation(he){s(he),_()},get classification(){return l()},set classification(he){l(he),_()},get logic(){return c()},set logic(he){c(he),_()}})}lo(["click"]),Oe(lh,{history:{},onSubmit:{},onStartNewConversation:{},classification:{},logic:{}},[],[],!0);var nw=Y('<div><!> <h1 class="introduction__title"><!></h1></div>');function ch(t,e){Ae(e,!0);const r=Yt(),n=()=>mt(an,"$t",r);let o=k(e,"class",7);var a=nw(),i=P(a);tr(i,{name:"avatar",class:"introduction__avatar"});var s=ie(i,2),l=P(s);return fo(l,()=>n().introductionTitle),O(s),O(a),se(()=>en(a,`introduction ${o()??""}`)),T(t,a),Re({get class(){return o()},set class(c){o(c),_()}})}Oe(ch,{class:{}},[],[],!0);var ow=(t,e,r)=>e()(r().question),aw=Y('<button class="predefined-question transition-colors" tabindex="0"><!> </button>');function uh(t,e){Ae(e,!0);let r=k(e,"onSubmit",7),n=k(e,"predefinedQuestion",7);var o=aw();o.__click=[ow,r,n];var a=P(o);tr(a,{name:"predefinedQuestion",class:"predefined-question__icon transition-colors"});var i=ie(a);return O(o),se(()=>He(i,` ${n().label??n().question??""}`)),T(t,o),Re({get onSubmit(){return r()},set onSubmit(s){r(s),_()},get predefinedQuestion(){return n()},set predefinedQuestion(s){n(s),_()}})}lo(["click"]),Oe(uh,{onSubmit:{},predefinedQuestion:{}},[],[],!0);var iw=Y("<div></div>");function dh(t,e){Ae(e,!0);let r=k(e,"predefinedQuestions",7),n=k(e,"onSubmit",7),o=k(e,"class",7),a=kr(e,["$$slots","$$events","$$legacy","$$host","predefinedQuestions","onSubmit","class"]);var i=iw();let s;return wr(i,21,r,Mr,(l,c)=>{uh(l,{get predefinedQuestion(){return p(c)},get onSubmit(){return n()}})}),O(i),se(()=>s=Kt(i,s,{class:`predefined-questions ${o()??""}`,...a})),T(t,i),Re({get predefinedQuestions(){return r()},set predefinedQuestions(l){r(l),_()},get onSubmit(){return n()},set onSubmit(l){n(l),_()},get class(){return o()},set class(l){o(l),_()}})}Oe(dh,{predefinedQuestions:{},onSubmit:{},class:{}},[],[],!0);var sw=Y('<section class="start-page container"><!> <!> <!></section>');function fh(t,e){Ae(e,!0);let r=k(e,"predefinedQuestions",7),n=k(e,"onSubmit",7),o=Ie(!1);wt(()=>{A(o,!0)});var a=sw(),i=P(a);ch(i,{class:"start-page__introduction fly-in"});var s=ie(i,2);ic(s,{get onSubmit(){return n()},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;"});var l=ie(s,2);{var c=u=>{dh(u,{get predefinedQuestions(){return r()},get onSubmit(){return n()},class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};ce(l,u=>{r()&&r().length&&u(c)})}return O(a),se(()=>Dr(a,"mounted",p(o))),T(t,a),Re({get predefinedQuestions(){return r()},set predefinedQuestions(u){r(u),_()},get onSubmit(){return n()},set onSubmit(u){n(u),_()}})}Oe(fh,{predefinedQuestions:{},onSubmit:{}},[],[],!0);var lw=Y('<div class="loader-container svelte-rzuq2t"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>');const cw={hash:"svelte-rzuq2t",code:".loader-container.svelte-rzuq2t {display:flex;z-index:1000;position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}"};function hh(t,e){Ae(e,!0),na(t,cw);let r=k(e,"color",7),n=k(e,"background",7);var o=lw(),a=P(o);return O(o),se(()=>{ke(o,"style",n()?`background: ${n()};`:""),ke(a,"fill",r()??"rgba(127, 127, 127, 0.3)")}),T(t,o),Re({get color(){return r()},set color(i){r(i),_()},get background(){return n()},set background(i){n(i),_()}})}Oe(hh,{color:{},background:{}},[],[],!0);var uw=Y("<strong> </strong>"),dw=Y('<div class="line-clamp line-clamp--12"> </div>'),fw=Y('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),hw=Y('<div class="reference-number__content-wrapper" role="tooltip"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer"><!> <!> <!></a></div>'),pw=Y('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function gw(t,e){var x,J,M;Ae(e,!0);const r=Yt(),n=()=>mt(xo,"$config",r),o=()=>mt(an,"$t",r);let a=k(e,"usedNumber",7),i=k(e,"source",7),s=Ie(!1),l,c,u=Ie(void 0);const d=i(),f={duration:Number((x=n().theme.components.referenceNumberContent.custom)==null?void 0:x.transitionDuration)||200,delay:Number((J=n().theme.components.referenceNumberContent.custom)==null?void 0:J.transitionDelay)||0,y:Number((M=n().theme.components.referenceNumberContent.custom)==null?void 0:M.transitionY)||10},v=async()=>{if(!c||!p(u))return;const{x:H,y:z}=await cf(c,p(u),{placement:"top",middleware:[sf(8),e0(),lf({padding:8})]});Object.assign(p(u).style,{left:`${H}px`,top:`${z}px`})},h=()=>{l&&(clearTimeout(l),l=void 0)},m=()=>{h(),l=setTimeout(()=>{A(s,!1)},100)},y=()=>{h(),A(s,!0)};wt(()=>{p(s)&&v()});var g=pw(),b=P(g),w=P(b,!0);O(b),Br(b,H=>c=H,()=>c);var R=ie(b,2);{var E=H=>{var z=hw(),F=P(z),oe=P(F);{var xe=$=>{var G=uw(),de=P(G,!0);O(G),se(()=>He(de,d.title)),T($,G)};ce(oe,$=>{d.title&&$(xe)})}var I=ie(oe,2);{var Le=$=>{var G=dw(),de=P(G,!0);O(G),se(()=>He(de,d.generated.summary)),T($,G)};ce(I,$=>{d.generated.summary&&$(Le)})}var re=ie(I,2);{var X=$=>{var G=fw(),de=P(G),ue=P(de,!0);O(de),O(G),se(()=>He(ue,d.url)),T($,G)};ce(re,$=>{d.url&&$(X)})}O(F),O(z),Br(z,$=>A(u,$),()=>p(u)),se(()=>ke(F,"href",d.url)),st("mouseenter",z,y),st("mouseleave",z,m),zr(3,z,()=>Na,()=>f),T(H,z)};ce(R,H=>{p(s)&&H(E)})}return O(g),se(()=>{ke(b,"href",d.url),ke(b,"aria-label",`${o().referenceLink??""}: ${d.title??""}`),He(w,a())}),st("mouseenter",b,y),st("mouseleave",b,m),st("focus",b,()=>A(s,!0)),st("blur",b,()=>A(s,!1)),T(t,g),Re({get usedNumber(){return a()},set usedNumber(H){a(H),_()},get source(){return i()},set source(H){i(H),_()}})}customElements.define("liipgpt-reference-number",Oe(gw,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-ref-number",type:"String"},usedNumber:{attribute:"data-used-number",type:"String"}},[],[],!1));var mw=Y('<link rel="stylesheet">'),vw=Y('<div class="chat-app__animation-container svelte-ayd7hh"><div class="chat-app__animation svelte-ayd7hh"><!></div></div>'),bw=Y('<div class="style-container" hidden></div> <!> <!>',1),yw=Y('<div class="chat-app__loader-container svelte-ayd7hh"><!></div>'),ww=Y('<main class="chat-app"><!> <!></main>');const _w={hash:"svelte-ayd7hh",code:".chat-app__loader-container.svelte-ayd7hh {display:flex;z-index:1000;position:relative;align-items:center;justify-content:center;width:100%;height:100%;}.chat-app__animation-container.svelte-ayd7hh {position:relative; /* Needed for absolute positioned fade-out. */height:100%;}.chat-app__animation.svelte-ayd7hh {width:100%; /* Ensure full width during absolute positioned fade-out */height:100%;}"};function ph(t,e){Ae(e,!0),na(t,_w);let r=kr(e,["$$slots","$$events","$$legacy","$$host"]),n=new xb(r);wt(()=>{n.onNavigate()});var o=ww();st("popstate",Yo,function(...s){var l;(l=n.onNavigate)==null||l.apply(this,s)}),yu(s=>{var l=ne(),c=V(l);{var u=d=>{var f=ne(),v=V(f);wr(v,17,()=>n.chatState.config.fontURLs,Mr,(h,m)=>{var y=mw();se(()=>ke(y,"href",p(m))),T(h,y)}),T(d,f)};ce(c,d=>{n.chatState&&n.chatState.config.fontURLs&&d(u)})}T(s,l)});var a=P(o);Ap(a,()=>n.loadInitialState(e.org),s=>{var l=yw(),c=P(l);_r(c,e,"loader",{},u=>{hh(u,{get background(){return e.loaderBackground},get color(){return e.loaderColor}})}),O(l),zr(2,l,()=>Wu,()=>({duration:200,delay:300})),T(s,l)},s=>{var l=bw(),c=V(l);fl(c,f=>{var v;return(v=n.onStyleInit)==null?void 0:v.call(n,f)});var u=ie(c,2);Rp(u,()=>n.pageState,f=>{var v=vw(),h=P(v),m=P(h);{var y=b=>{fh(b,{get predefinedQuestions(){return n.chatState.predefinedQuestions},get onSubmit(){return n.onStartConversation}})},g=b=>{lh(b,{get history(){return n.chatState.history},get onSubmit(){return n.onSubmit},get onStartNewConversation(){return n.onStartNewConversation},get classification(){return n.chatState.classification},logic:n})};ce(m,b=>{n.pageState===wa.Start?b(y):b(g,!1)})}O(h),O(v),zr(1,h,()=>hf,()=>({duration:300,delay:250})),zr(2,h,()=>Wu,()=>({duration:150})),T(f,v)});var d=ie(u,2);pf(d,{get menu(){return n.chatState.menu},get usedLanguages(){return n.chatState.usedLanguages},get currentLanguage(){return n.chatState.language},get onLanguageChange(){return n.onLanguageChange}}),T(s,l)});var i=ie(a,2);$d(i,{position:"top-center"}),O(o),se(()=>{var s,l;ke(o,"style",(s=n.chatState)==null?void 0:s.themeString),Fr(o,"color-scheme",((l=n.chatState)==null?void 0:l.mode)??"light")}),T(t,o),Re()}return customElements.define("liipgpt-chat",Oe(ph,{org:{type:"String"},apiUrl:{type:"String"},apiKey:{type:"String"},configOverride:{type:"String"},devChatHistory:{type:"Boolean"},lang:{type:"String"},modes:{type:"String"}},["loader"],[],!0)),Xe.LiipGPTChat=ph,Object.defineProperty(Xe,Symbol.toStringTag,{value:"Module"}),Xe}({});
1040
+ */var gw=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],mw=gw.join(","),nh=typeof Element>"u",us=nh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ds=!nh&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},vw=function t(e,r){var n;r===void 0&&(r=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),a=o===""||o==="true",i=a||r&&e&&t(e.parentNode);return i},bw=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},yw=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ww=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||bw(e))&&!yw(e)?0:e.tabIndex},oh=function(e){return e.tagName==="INPUT"},_w=function(e){return oh(e)&&e.type==="hidden"},kw=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},xw=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},Sw=function(e){if(!e.name)return!0;var r=e.form||ds(e),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(e.name));else try{o=n(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=xw(o,e.form);return!a||a===e},Tw=function(e){return oh(e)&&e.type==="radio"},Cw=function(e){return Tw(e)&&!Sw(e)},Ew=function(e){var r,n=e&&ds(e),o=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==e){var i,s,c;for(a=!!((i=o)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!a&&o;){var l,u,f;n=ds(o),o=(l=n)===null||l===void 0?void 0:l.host,a=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return a},ah=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},Aw=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=us.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(us.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=e;e;){var c=e.parentElement,l=ds(e);if(c&&!c.shadowRoot&&o(c)===!0)return ah(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=s}if(Ew(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ah(e);return!1},Rw=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return us.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},Iw=function(e,r){return!(r.disabled||vw(r)||_w(r)||Aw(r,e)||kw(r)||Rw(r))},Ow=function(e,r){return!(Cw(r)||ww(r)<0||!Iw(e,r))},Nw=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return us.call(e,mw)===!1?!1:Ow(r,e)};const Pw=new Wf("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),Fw=new Wf("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),Lw=new bc("FocusScope");function Dw({id:t,loop:e,enabled:r,onOpenAutoFocus:n,onCloseAutoFocus:o,forceMount:a}){const i=uw(),s=dw(),c=Q(null),l=Lw.getOr({ignoreCloseAutoFocus:!1});let u=null;Nr({id:t,ref:c,deps:()=>r.current});function f(g){if(!(s.paused||!c.current||s.isHandlingFocus)){s.isHandlingFocus=!0;try{const w=g.target;if(!_c(w))return;const b=c.current.contains(w);if(g.type==="focusin")if(b)u=w;else{if(l.ignoreCloseAutoFocus)return;In(u,{select:!0})}else g.type==="focusout"&&!b&&!l.ignoreCloseAutoFocus&&In(u,{select:!0})}finally{s.isHandlingFocus=!1}}}function d(g){var b;!((b=c.current)==null?void 0:b.contains(u))&&c.current&&In(c.current)}ar([()=>c.current,()=>r.current],([g,w])=>{if(!g||!w)return;const b=Kn(Ft(document,"focusin",f),Ft(document,"focusout",f)),S=new MutationObserver(d);return S.observe(g,{childList:!0,subtree:!0}),()=>{b(),S.disconnect()}}),ar([()=>a.current,()=>c.current],([g,w])=>{if(g)return;const b=document.activeElement;return m(w,b),()=>{w&&h(b)}}),ar([()=>a.current,()=>c.current,()=>r.current],([g,w])=>{if(!g)return;const b=document.activeElement;return m(w,b),()=>{w&&h(b)}});function m(g,w){if(g||(g=document.getElementById(t.current)),!g||!r.current)return;if(i.add(s),!g.contains(w)){const S=Pw.createEvent();n.current(S),S.defaultPrevented||Ma(()=>{g&&(hw(fw(rh(g)),{select:!0}),document.activeElement===w&&In(g))})}}function h(g){const w=Fw.createEvent();o.current(w);const b=l.ignoreCloseAutoFocus;yc(0,()=>{!w.defaultPrevented&&g&&!b&&In(Nw(g)?g:document.body,{select:!0}),i.remove(s)})}function v(g){if(!r.current||!e.current&&!r.current||s.paused)return;const w=g.key===Fy&&!g.ctrlKey&&!g.altKey&&!g.metaKey,b=document.activeElement;if(!(w&&b))return;const S=c.current;if(!S)return;const[E,P]=pw(S);E&&P?!g.shiftKey&&b===P?(g.preventDefault(),e.current&&In(E,{select:!0})):g.shiftKey&&b===E&&(g.preventDefault(),e.current&&In(P,{select:!0})):b===S&&g.preventDefault()}const y=De(()=>({id:t.current,tabindex:-1,onkeydown:v}));return{get props(){return p(y)}}}function ih(t,e){Ee(e,!0);let r=k(e,"id",7),n=k(e,"trapFocus",7,!1),o=k(e,"loop",7,!1),a=k(e,"onCloseAutoFocus",7,Xe),i=k(e,"onOpenAutoFocus",7,Xe),s=k(e,"focusScope",7),c=k(e,"forceMount",7,!1);const l=Dw({enabled:Q.with(()=>n()),loop:Q.with(()=>o()),onCloseAutoFocus:Q.with(()=>a()),onOpenAutoFocus:Q.with(()=>i()),id:Q.with(()=>r()),forceMount:Q.with(()=>c())});var u=he(),f=te(u);return ut(f,()=>s()??Qe,()=>({props:l.props})),C(t,u),Ae({get id(){return r()},set id(d){r(d),_()},get trapFocus(){return n()},set trapFocus(d=!1){n(d),_()},get loop(){return o()},set loop(d=!1){o(d),_()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(d=Xe){a(d),_()},get onOpenAutoFocus(){return i()},set onOpenAutoFocus(d=Xe){i(d),_()},get focusScope(){return s()},set focusScope(d){s(d),_()},get forceMount(){return c()},set forceMount(d=!1){c(d),_()}})}Ie(ih,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0),globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);class Mw{constructor(e){G(this,Ls);z(this,"opts");G(this,qo,Xe);G(this,ri,Q(null));G(this,Ds,e=>{const r=x(this,ri).current,n=e.target;!_c(r)||!_c(n)||!this.opts.enabled.current||!$w(this)||!kc(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&xt(this,qo,zw(r)))});G(this,ni,()=>{x(this,qo).call(this),xt(this,qo,Xe)});this.opts=e,Nr({id:e.id,ref:x(this,ri),deps:()=>this.opts.enabled.current});let r=Xe;ar(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=Jn(this,Ls,Lh).call(this)),()=>{r(),x(this,ni).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}qo=new WeakMap,ri=new WeakMap,Ls=new WeakSet,Lh=function(){return Kn(Ft(document,"pointerdown",x(this,Ds)),Ft(document,"pointerup",Of(x(this,ni),this.opts.onPointerUp.current)))},Ds=new WeakMap,ni=new WeakMap;function Bw(t){return new Mw(t)}const sh=t=>t.style.userSelect||t.style.webkitUserSelect;function zw(t){const e=document.body,r=sh(e),n=sh(t);return fs(e,"none"),fs(t,"text"),()=>{fs(e,r),fs(t,n)}}function fs(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function $w(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function lh(t,e){Ee(e,!0);let r=k(e,"preventOverflowTextSelection",7,!0),n=k(e,"onPointerDown",7,Xe),o=k(e,"onPointerUp",7,Xe),a=k(e,"id",7),i=k(e,"children",7),s=k(e,"enabled",7);Bw({id:Q.with(()=>a()),preventOverflowTextSelection:Q.with(()=>r()),onPointerDown:Q.with(()=>n()),onPointerUp:Q.with(()=>o()),enabled:Q.with(()=>s())});var c=he(),l=te(c);return ut(l,()=>i()??Qe),C(t,c),Ae({get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(u=!0){r(u),_()},get onPointerDown(){return n()},set onPointerDown(u=Xe){n(u),_()},get onPointerUp(){return o()},set onPointerUp(u=Xe){o(u),_()},get id(){return a()},set id(u){a(u),_()},get children(){return i()},set children(u){i(u),_()},get enabled(){return s()},set enabled(u){s(u),_()}})}Ie(lh,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function qw(t){let e=0,r=me(void 0),n;function o(){e-=1,n&&e<=0&&(n(),A(r,void 0),n=void 0)}return(...a)=>(e+=1,p(r)===void 0&&(n=uu(()=>{A(r,t(...a),!0)})),vt(()=>()=>{o()}),p(r))}const jw=qw(()=>{const t=new vc,e=De(()=>{for(const a of t.values())if(a)return!0;return!1});let r=me(null),n=null;function o(){Uf&&(document.body.setAttribute("style",p(r)??""),document.body.style.removeProperty("--scrollbar-width"),Hf&&(n==null||n()))}return vt(()=>{const a=p(e);return Kt(()=>{if(!a)return;A(r,document.body.getAttribute("style"),!0);const i=getComputedStyle(document.body),s=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(i.paddingRight??"0",10)+s,margin:Number.parseInt(i.marginRight??"0",10)};s>0&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${s}px`),document.body.style.overflow="hidden"),Hf&&(n=Vf(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),Ma(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),vt(()=>()=>{n==null||n()}),{get map(){return t},resetBodyStyle:o}});function Zw(t,e=()=>null){const r=Ct(),n=jw();if(!n)return;const o=De(e);n.map.set(r,t??!1);const a=Q.with(()=>n.map.get(r)??!1,i=>n.map.set(r,i));return vt(()=>()=>{n.map.delete(r),!Uw(n.map)&&(p(o)===null?requestAnimationFrame(()=>n.resetBodyStyle()):yc(p(o),()=>n.resetBodyStyle()))}),a}function Uw(t){for(const[e,r]of t)if(r)return!0;return!1}function xc(t,e){Ee(e,!0);let r=k(e,"preventScroll",7,!0),n=k(e,"restoreScrollDelay",7,null);return Zw(r(),()=>n()),Ae({get preventScroll(){return r()},set preventScroll(o=!0){r(o),_()},get restoreScrollDelay(){return n()},set restoreScrollDelay(o=null){n(o),_()}})}Ie(xc,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function Hw({forceMount:t,present:e,trapFocus:r,open:n}){return t?n&&r:e&&r&&n}var Gw=W("<div><!></div>");function ch(t,e){Ee(e,!0);let r=k(e,"id",23,Ct),n=k(e,"forceMount",7,!1),o=k(e,"child",7),a=k(e,"children",7),i=k(e,"ref",15,null),s=Cr(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const c=Qy({id:Q.with(()=>r()),ref:Q.with(()=>i(),f=>i(f))}),l=De(()=>vr(s,c.props)),u=De(()=>c.root.opts.open.current||n());return cs(t,{get id(){return r()},get present(){return p(u)},presence:d=>{var m=he(),h=te(m);{var v=g=>{var w=he(),b=te(w),S=_t(()=>({props:vr(p(l)),...c.snippetProps}));ut(b,o,()=>p(S)),C(g,w)},y=g=>{var w=Gw();let b;var S=D(w);ut(S,()=>a()??Qe,()=>c.snippetProps),N(w),le(E=>b=Qt(w,b,{...E}),[()=>vr(p(l))]),C(g,w)};ce(h,g=>{o()?g(v):g(y,!1)})}C(d,m)},$$slots:{presence:!0}}),Ae({get id(){return r()},set id(f=Ct()){r(f),_()},get forceMount(){return n()},set forceMount(f=!1){n(f),_()},get child(){return o()},set child(f){o(f),_()},get children(){return a()},set children(f){a(f),_()},get ref(){return i()},set ref(f=null){i(f),_()}})}Ie(ch,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var Vw=W("<div><!></div>");function uh(t,e){Ee(e,!0);let r=k(e,"id",23,Ct),n=k(e,"children",7),o=k(e,"child",7),a=k(e,"ref",15,null),i=Cr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const s=Jy({id:Q.with(()=>r()),ref:Q.with(()=>a(),m=>a(m))}),c=De(()=>vr(i,s.props));var l=he(),u=te(l);{var f=m=>{var h=he(),v=te(h);ut(v,o,()=>({props:p(c)})),C(m,h)},d=m=>{var h=Vw();let v;var y=D(h);ut(y,()=>n()??Qe),N(h),le(()=>v=Qt(h,v,{...p(c)})),C(m,h)};ce(u,m=>{o()?m(f):m(d,!1)})}return C(t,l),Ae({get id(){return r()},set id(m=Ct()){r(m),_()},get children(){return n()},set children(m){n(m),_()},get child(){return o()},set child(m){o(m),_()},get ref(){return a()},set ref(m=null){a(m),_()}})}Ie(uh,{id:{},children:{},child:{},ref:{}},[],[],!0);const Ww="data-collapsible-root",Kw="data-collapsible-content",Yw="data-collapsible-trigger";class Qw{constructor(e){z(this,"opts");G(this,oi,me(null));G(this,Ms,De(()=>({id:this.opts.id.current,"data-state":ss(this.opts.open.current),"data-disabled":wc(this.opts.disabled.current),[Ww]:""})));this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),Nr(e)}get contentNode(){return p(x(this,oi))}set contentNode(e){A(x(this,oi),e,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return p(x(this,Ms))}}oi=new WeakMap,Ms=new WeakMap;class Jw{constructor(e,r){z(this,"opts");z(this,"root");G(this,jo);G(this,Zo,me(!1));G(this,Uo,me(0));G(this,Ho,me(0));G(this,Bs,De(()=>this.opts.forceMount.current||this.root.opts.open.current));G(this,zs,De(()=>({open:this.root.opts.open.current})));G(this,$s,De(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":p(x(this,Ho))?`${p(x(this,Ho))}px`:void 0,"--bits-collapsible-content-width":p(x(this,Uo))?`${p(x(this,Uo))}px`:void 0},"data-state":ss(this.root.opts.open.current),"data-disabled":wc(this.root.opts.disabled.current),[Kw]:""})));this.opts=e,this.root=r,A(x(this,Zo),r.opts.open.current,!0),Nr({...e,deps:()=>this.present,onRefChange:n=>{this.root.contentNode=n}}),al(()=>{const n=requestAnimationFrame(()=>{A(x(this,Zo),!1)});return()=>{cancelAnimationFrame(n)}}),ar([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&Ma(()=>{if(!this.opts.ref.current)return;xt(this,jo,x(this,jo)||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName}),n.style.transitionDuration="0s",n.style.animationName="none";const o=n.getBoundingClientRect();if(A(x(this,Ho),o.height,!0),A(x(this,Uo),o.width,!0),!p(x(this,Zo))){const{animationName:a,transitionDuration:i}=x(this,jo);n.style.transitionDuration=i,n.style.animationName=a}})})}get present(){return p(x(this,Bs))}get snippetProps(){return p(x(this,zs))}get props(){return p(x(this,$s))}}jo=new WeakMap,Zo=new WeakMap,Uo=new WeakMap,Ho=new WeakMap,Bs=new WeakMap,zs=new WeakMap,$s=new WeakMap;class Xw{constructor(e,r){z(this,"opts");z(this,"root");G(this,Qn,De(()=>this.opts.disabled.current||this.root.opts.disabled.current));G(this,qs,De(()=>{var e;return{id:this.opts.id.current,type:"button",disabled:p(x(this,Qn)),"aria-controls":(e=this.root.contentNode)==null?void 0:e.id,"aria-expanded":Ny(this.root.opts.open.current),"data-state":ss(this.root.opts.open.current),"data-disabled":wc(p(x(this,Qn))),[Yw]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Nr(e)}onclick(e){if(!p(x(this,Qn))){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){p(x(this,Qn))||(e.key===Zf||e.key===jf)&&(e.preventDefault(),this.root.toggleOpen())}get props(){return p(x(this,qs))}}Qn=new WeakMap,qs=new WeakMap;const Sc=new bc("Collapsible.Root");function e1(t){return Sc.set(new Qw(t))}function t1(t){return new Xw(t,Sc.get())}function r1(t){return new Jw(t,Sc.get())}var n1=W("<div><!></div>");function dh(t,e){Ee(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"id",23,Ct),a=k(e,"ref",15,null),i=k(e,"open",15,!1),s=k(e,"disabled",7,!1),c=k(e,"onOpenChange",7,Xe),l=Cr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","open","disabled","onOpenChange"]);const u=e1({open:Q.with(()=>i(),y=>{i(y),c()(y)}),disabled:Q.with(()=>s()),id:Q.with(()=>o()),ref:Q.with(()=>a(),y=>a(y))}),f=De(()=>vr(l,u.props));var d=he(),m=te(d);{var h=y=>{var g=he(),w=te(g);ut(w,n,()=>({props:p(f)})),C(y,g)},v=y=>{var g=n1();let w;var b=D(g);ut(b,()=>r()??Qe),N(g),le(()=>w=Qt(g,w,{...p(f)})),C(y,g)};ce(m,y=>{n()?y(h):y(v,!1)})}return C(t,d),Ae({get children(){return r()},set children(y){r(y),_()},get child(){return n()},set child(y){n(y),_()},get id(){return o()},set id(y=Ct()){o(y),_()},get ref(){return a()},set ref(y=null){a(y),_()},get open(){return i()},set open(y=!1){i(y),_()},get disabled(){return s()},set disabled(y=!1){s(y),_()},get onOpenChange(){return c()},set onOpenChange(y=Xe){c(y),_()}})}Ie(dh,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{}},[],[],!0);var o1=W("<div><!></div>");function fh(t,e){Ee(e,!0);let r=k(e,"child",7),n=k(e,"ref",15,null),o=k(e,"forceMount",7,!1),a=k(e,"children",7),i=k(e,"id",23,Ct),s=Cr(e,["$$slots","$$events","$$legacy","$$host","child","ref","forceMount","children","id"]);const c=r1({id:Q.with(()=>i()),forceMount:Q.with(()=>o()),ref:Q.with(()=>n(),l=>n(l))});return cs(t,{forceMount:!0,get present(){return c.present},get id(){return i()},presence:(u,f)=>{let d=()=>f==null?void 0:f().present;var m=he();const h=De(()=>vr(s,c.props,{hidden:o()?void 0:!d().current}));var v=te(m);{var y=w=>{var b=he(),S=te(b),E=_t(()=>({...c.snippetProps,props:p(h)}));ut(S,r,()=>p(E)),C(w,b)},g=w=>{var b=o1();let S;var E=D(b);ut(E,()=>a()??Qe),N(b),le(()=>S=Qt(b,S,{...p(h)})),C(w,b)};ce(v,w=>{r()?w(y):w(g,!1)})}C(u,m)},$$slots:{presence:!0}}),Ae({get child(){return r()},set child(l){r(l),_()},get ref(){return n()},set ref(l=null){n(l),_()},get forceMount(){return o()},set forceMount(l=!1){o(l),_()},get children(){return a()},set children(l){a(l),_()},get id(){return i()},set id(l=Ct()){i(l),_()}})}Ie(fh,{child:{},ref:{},forceMount:{},children:{},id:{}},[],[],!0);var a1=W("<button><!></button>");function hh(t,e){Ee(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"ref",15,null),a=k(e,"id",23,Ct),i=k(e,"disabled",7,!1),s=Cr(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","disabled"]);const c=t1({id:Q.with(()=>a()),ref:Q.with(()=>o(),h=>o(h)),disabled:Q.with(()=>i())}),l=De(()=>vr(s,c.props));var u=he(),f=te(u);{var d=h=>{var v=he(),y=te(v);ut(y,n,()=>({props:p(l)})),C(h,v)},m=h=>{var v=a1();let y;var g=D(v);ut(g,()=>r()??Qe),N(v),le(()=>y=Qt(v,y,{...p(l)})),C(h,v)};ce(f,h=>{n()?h(d):h(m,!1)})}return C(t,u),Ae({get children(){return r()},set children(h){r(h),_()},get child(){return n()},set child(h){n(h),_()},get ref(){return o()},set ref(h=null){o(h),_()},get id(){return a()},set id(h=Ct()){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Ie(hh,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],!0);function ph(t,e){Ee(e,!0);let r=k(e,"open",15,!1),n=k(e,"onOpenChange",7,Xe),o=k(e,"children",7);Wy({variant:Q.with(()=>"dialog"),open:Q.with(()=>r(),s=>{r(s),n()(s)})});var a=he(),i=te(a);return ut(i,()=>o()??Qe),C(t,a),Ae({get open(){return r()},set open(s=!1){r(s),_()},get onOpenChange(){return n()},set onOpenChange(s=Xe){n(s),_()},get children(){return o()},set children(s){o(s),_()}})}Ie(ph,{open:{},onOpenChange:{},children:{}},[],[],!0);var i1=W("<button><!></button>");function Tc(t,e){Ee(e,!0);let r=k(e,"children",7),n=k(e,"child",7),o=k(e,"id",23,Ct),a=k(e,"ref",15,null),i=k(e,"disabled",7,!1),s=Cr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const c=Xy({variant:Q.with(()=>"close"),id:Q.with(()=>o()),ref:Q.with(()=>a(),h=>a(h)),disabled:Q.with(()=>!!i())}),l=De(()=>vr(s,c.props));var u=he(),f=te(u);{var d=h=>{var v=he(),y=te(v);ut(y,n,()=>({props:p(l)})),C(h,v)},m=h=>{var v=i1();let y;var g=D(v);ut(g,()=>r()??Qe),N(v),le(()=>y=Qt(v,y,{...p(l)})),C(h,v)};ce(f,h=>{n()?h(d):h(m,!1)})}return C(t,u),Ae({get children(){return r()},set children(h){r(h),_()},get child(){return n()},set child(h){n(h),_()},get id(){return o()},set id(h=Ct()){o(h),_()},get ref(){return a()},set ref(h=null){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Ie(Tc,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var s1=W("<!> <!>",1),l1=W("<!> <div><!></div>",1);function gh(t,e){Ee(e,!0);let r=k(e,"id",23,Ct),n=k(e,"children",7),o=k(e,"child",7),a=k(e,"ref",15,null),i=k(e,"forceMount",7,!1),s=k(e,"onCloseAutoFocus",7,Xe),c=k(e,"onEscapeKeydown",7,Xe),l=k(e,"onInteractOutside",7,Xe),u=k(e,"trapFocus",7,!0),f=k(e,"preventScroll",7,!0),d=k(e,"restoreScrollDelay",7,null),m=Cr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=Yy({id:Q.with(()=>r()),ref:Q.with(()=>a(),g=>a(g))}),v=De(()=>vr(m,h.props)),y=De(()=>h.root.opts.open.current||i());return cs(t,kn(()=>p(v),{get forceMount(){return i()},get present(){return p(y)},presence:w=>{const b=De(()=>Hw({forceMount:i(),present:h.root.opts.open.current,trapFocus:u(),open:h.root.opts.open.current}));ih(w,kn({loop:!0,get trapFocus(){return p(b)}},()=>p(v),{onCloseAutoFocus:E=>{var P;s()(E),!E.defaultPrevented&&((P=h.root.triggerNode)==null||P.focus())},focusScope:(E,P)=>{let F=()=>P==null?void 0:P().props;Xf(E,kn(()=>p(v),{get enabled(){return h.root.opts.open.current},onEscapeKeydown:O=>{c()(O),!O.defaultPrevented&&h.root.handleClose()},children:(O,$)=>{Jf(O,kn(()=>p(v),{get enabled(){return h.root.opts.open.current},onInteractOutside:J=>{l()(J),!J.defaultPrevented&&h.root.handleClose()},children:(J,ae)=>{lh(J,kn(()=>p(v),{get enabled(){return h.root.opts.open.current},children:(B,X)=>{var ie=he(),I=te(ie);{var pe=Y=>{var V=s1(),re=te(V);{var ee=_e=>{xc(_e,{get preventScroll(){return f()},get restoreScrollDelay(){return d()}})};ce(re,_e=>{h.root.opts.open.current&&_e(ee)})}var ye=ne(re,2),Se=_t(()=>({props:vr(p(v),F()),...h.snippetProps}));ut(ye,o,()=>p(Se)),C(Y,V)},xe=Y=>{var V=l1(),re=te(V);xc(re,{get preventScroll(){return f()}});var ee=ne(re,2);let ye;var Se=D(ee);ut(Se,()=>n()??Qe),N(ee),le(_e=>ye=Qt(ee,ye,{..._e}),[()=>vr(p(v),F())]),C(Y,V)};ce(I,Y=>{o()?Y(pe):Y(xe,!1)})}C(B,ie)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}}))},$$slots:{presence:!0}})),Ae({get id(){return r()},set id(g=Ct()){r(g),_()},get children(){return n()},set children(g){n(g),_()},get child(){return o()},set child(g){o(g),_()},get ref(){return a()},set ref(g=null){a(g),_()},get forceMount(){return i()},set forceMount(g=!1){i(g),_()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(g=Xe){s(g),_()},get onEscapeKeydown(){return c()},set onEscapeKeydown(g=Xe){c(g),_()},get onInteractOutside(){return l()},set onInteractOutside(g=Xe){l(g),_()},get trapFocus(){return u()},set trapFocus(g=!0){u(g),_()},get preventScroll(){return f()},set preventScroll(g=!0){f(g),_()},get restoreScrollDelay(){return d()},set restoreScrollDelay(g=null){d(g),_()}})}Ie(gh,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var c1=W("<div></div>"),u1=W('<span class="sr-only">Close</span> <!>',1),d1=W('<div><div class="dialog-header"><!> <!></div> <!></div>'),f1=W("<!> <!>",1);function mh(t,e){var h,v,y;Ee(e,!0);const[r,n]=Jt(),o=()=>gt(To,"$config",r);let a=k(e,"open",7),i=k(e,"content",7),s=k(e,"title",7),c=k(e,"onClose",7);const l={duration:Number((h=o().theme.components.dialog.custom)==null?void 0:h.transitionDuration)||200,delay:Number((v=o().theme.components.dialog.custom)==null?void 0:v.transitionDelay)||0,y:Number((y=o().theme.components.dialog.custom)==null?void 0:y.transitionY)||10},u=g=>{g||c()()};var f=he(),d=te(f);Yt(d,()=>ph,(g,w)=>{w(g,{get open(){return a()},onOpenChange:u,children:(b,S)=>{var E=f1(),P=te(E);Yt(P,()=>Tc,(O,$)=>{$(O,{children:(J,ae)=>{var B=he(),X=te(B);Yt(X,()=>ch,(ie,I)=>{I(ie,{forceMount:!0,child:(xe,Y)=>{let V=()=>Y==null?void 0:Y().props,re=()=>Y==null?void 0:Y().open;var ee=he(),ye=te(ee);{var Se=_e=>{var $e=c1();let et;le(()=>et=Qt($e,et,{...V(),class:"dialog-overlay"})),$r(3,$e,()=>Af,()=>l),C(_e,$e)};ce(ye,_e=>{re()&&_e(Se)})}C(xe,ee)},$$slots:{child:!0}})}),C(J,B)},$$slots:{default:!0}})});var F=ne(P,2);Yt(F,()=>gh,(O,$)=>{$(O,{forceMount:!0,child:(ae,B)=>{let X=()=>B==null?void 0:B().props,ie=()=>B==null?void 0:B().open;var I=he(),pe=te(I);{var xe=Y=>{var V=d1();let re;var ee=D(V),ye=D(ee);Yt(ye,()=>Gf,($e,et)=>{et($e,{class:"dialog-title",children:(bt,rt)=>{var se=he(),M=te(se);ut(M,()=>s()??Qe),C(bt,se)},$$slots:{default:!0}})});var Se=ne(ye,2);Yt(Se,()=>Tc,($e,et)=>{et($e,{class:"dialog-close",children:(bt,rt)=>{var se=u1(),M=ne(te(se),2);nr(M,{name:"dismiss"}),C(bt,se)},$$slots:{default:!0}})}),N(ee);var _e=ne(ee,2);Yt(_e,()=>uh,($e,et)=>{et($e,{class:"dialog-description",children:(bt,rt)=>{var se=he(),M=te(se);ut(M,i),C(bt,se)},$$slots:{default:!0}})}),N(V),le(()=>re=Qt(V,re,{...X(),class:"dialog-content"})),$r(3,V,()=>La,()=>l),C(Y,V)};ce(pe,Y=>{ie()&&Y(xe)})}C(ae,I)},$$slots:{child:!0}})}),C(b,E)},$$slots:{default:!0}})}),C(t,f);var m=Ae({get open(){return a()},set open(g){a(g),_()},get content(){return i()},set content(g){i(g),_()},get title(){return s()},set title(g){s(g),_()},get onClose(){return c()},set onClose(g){c(g),_()}});return n(),m}Ie(mh,{open:{},content:{},title:{},onClose:{}},[],[],!0);var h1=W('<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"></div> <button type="submit" class="btn btn--primary"> </button></form>');function vh(t,e){Ee(e,!0);const[r,n]=Jt(),o=()=>gt(fn,"$t",r);let a=k(e,"logic",7),i=me(""),s=me(""),c=me(void 0),l=me(void 0),u=De(()=>p(c)!==void 0||p(l)!==void 0||p(i)!=="");const f=De(()=>!!a().chatState.feedbackOpenedId);mh(t,{get open(){return p(f)},get onClose(){return a().closeFeedback},title:v=>{var y=he(),g=te(y);fo(g,()=>o().feedbackFormTitle),C(v,y)},content:v=>{var y=h1(),g=D(y);If(g,{get classificationConfig(){return a().chatState.classification},get impact(){return p(c)},set impact(B){A(c,B,!0)},get quality(){return p(l)},set quality(B){A(l,B,!0)}});var w=ne(g,2),b=D(w),S=D(b,!0);N(b);var E=ne(b,2);vu(E),N(w);var P=ne(w,2),F=D(P),O=D(F,!0);N(F);var $=ne(F,2);_l($),N(P);var J=ne(P,2),ae=D(J,!0);N(J),N(y),le(()=>{Ve(S,o().feedbackFormMessage),Pe(E,"placeholder",o().feedbackFormMessagePlaceholder),Ve(O,o().feedbackFormEmail),Pe($,"placeholder",o().feedbackFormEmailPlaceholder),J.disabled=!p(u),Ve(ae,o().send)}),ct("submit",y,async B=>{B.preventDefault(),a().chatState.classification?await a().submitFeedback({email:p(s),body:p(i),classification:{impact:p(c),quality:p(l)}}):await a().submitFeedback({email:p(s),body:p(i)}),A(c,void 0),A(l,void 0),A(i,"")}),xl(E,()=>p(i),B=>A(i,B)),xl($,()=>p(s),B=>A(s,B)),C(v,y)},$$slots:{title:!0,content:!0}});var d=Ae({get logic(){return a()},set logic(m){a(m),_()}});return n(),d}Ie(vh,{logic:{}},[],[],!0);function Cc(t,e){let r=null,n;function o(){e.text&&(r||(r=document.createElement("span"),r.textContent=e.text,r.className=`tooltip tooltip-${e.position||"top"} tooltip-hidden`,t.appendChild(r),r.getBoundingClientRect()),r.classList.remove("tooltip-hidden"),a())}function a(){if(!r)return;const c=t.getBoundingClientRect(),l=r.getBoundingClientRect();let u,f;switch(e.position){case"bottom":u=c.height+5,f=c.width/2-l.width/2;break;case"left":u=c.height/2-l.height/2,f=-l.width-5;break;case"right":u=c.height/2-l.height/2,f=c.width+5;break;case"top":default:u=-l.height-5,f=c.width/2-l.width/2;break}r.style.top=`${u}px`,r.style.left=`${f}px`}function i(){n=window.setTimeout(()=>{o()},e.delay||200)}function s(){clearTimeout(n),r&&(r.classList.add("tooltip-hidden"),r.addEventListener("transitionend",()=>{r==null||r.remove(),r=null},{once:!0}))}return t.classList.add("tooltip-container"),t.setAttribute("tabindex","0"),t.addEventListener("mouseenter",i),t.addEventListener("focus",i),t.addEventListener("mouseleave",s),t.addEventListener("blur",s),{update(c){e=c},destroy(){s(),t.classList.remove("tooltip-container"),t.removeEventListener("mouseenter",i),t.removeEventListener("focus",i),t.removeEventListener("mouseleave",s),t.removeEventListener("blur",s)}}}var p1=W("<button><div><!></div></button>");function hs(t,e){Ee(e,!0);let r=k(e,"class",7),n=k(e,"tooltip",7),o=k(e,"onclick",7),a=k(e,"icon",7);var i=p1();i.__click=function(...l){var u;(u=o())==null||u.apply(this,l)};var s=D(i),c=D(s);return nr(c,{get name(){return a()}}),N(s),N(i),bl(i,(l,u)=>Cc==null?void 0:Cc(l,u),()=>({text:n(),position:"top",delay:300})),le(()=>At(s,1,_n(r()))),C(t,i),Ae({get class(){return r()},set class(l){r(l),_()},get tooltip(){return n()},set tooltip(l){n(l),_()},get onclick(){return o()},set onclick(l){o(l),_()},get icon(){return a()},set icon(l){a(l),_()}})}lo(["click"]),Ie(hs,{class:{},tooltip:{},onclick:{},icon:{}},[],[],!0);var g1=W('<a target="_blank" class="reference transition-colors"><span class="reference__numeral transition-colors"> </span> <span class="reference__body transition-colors"><span class="reference__title line-clamp line-clamp--2"> </span> <span class="reference__domain transition-colors"><span class="truncate"> </span></span></span> <!></a>');function bh(t,e){Ee(e,!0);let r=k(e,"title",7),n=k(e,"number",7),o=k(e,"url",7),a=k(e,"domainName",7);var i=g1(),s=D(i),c=D(s,!0);N(s);var l=ne(s,2),u=D(l),f=D(u,!0);N(u);var d=ne(u,2),m=D(d),h=D(m,!0);N(m),N(d),N(l);var v=ne(l,2);return nr(v,{name:"externalLink",class:"reference__icon transition-colors"}),N(i),le(()=>{Pe(i,"href",o()),Ve(c,n()),Ve(f,r()),Ve(h,a())}),C(t,i),Ae({get title(){return r()},set title(y){r(y),_()},get number(){return n()},set number(y){n(y),_()},get url(){return o()},set url(y){o(y),_()},get domainName(){return a()},set domainName(y){a(y),_()}})}Ie(bh,{title:{},number:{},url:{},domainName:{}},[],[],!0);var m1=W('<div class="references__trigger-title"> </div> <!>',1),v1=W('<div class="fly-in"><!></div>'),b1=W("<div></div>"),y1=W("<!> <div><!></div>",1);function yh(t,e){Ee(e,!0);const[r,n]=Jt(),o=()=>gt(fn,"$t",r);let a=k(e,"sources",7),i=k(e,"class",7),s=me(!1),c=me(!1);vt(()=>{p(s)?requestAnimationFrame(()=>{A(c,p(s),!0)}):A(c,!1)});var l=he(),u=te(l);Yt(u,()=>dh,(d,m)=>{m(d,{get class(){return`references ${i()??""}`},get open(){return p(s)},set open(h){A(s,h,!0)},children:(h,v)=>{var y=y1(),g=te(y);Yt(g,()=>hh,(E,P)=>{P(E,{class:"references__trigger transition-colors",children:(F,O)=>{var $=m1(),J=te($),ae=D(J,!0);N(J);var B=ne(J,2);nr(B,{name:"chevronDown",class:"references__trigger-icon"}),le(()=>Ve(ae,o().referenceTitle)),C(F,$)},$$slots:{default:!0}})});var w=ne(g,2);let b;var S=D(w);Yt(S,()=>fh,(E,P)=>{P(E,{forceMount:!0,child:(O,$)=>{let J=()=>$==null?void 0:$().props,ae=()=>$==null?void 0:$().open;var B=he(),X=te(B);{var ie=I=>{var pe=b1();let xe;Sr(pe,21,()=>a().used,zr,(Y,V,re)=>{let ee=()=>p(V).title,ye=()=>p(V).url,Se=()=>p(V).domainName,_e=()=>p(V).usedNumber;var $e=v1();$n($e,`--fly-in-id: ${re??""};`);var et=D($e);bh(et,{get title(){return ee()},get number(){return _e()},get domainName(){return Se()},get url(){return ye()}}),N($e),C(Y,$e)}),N(pe),le(()=>xe=Qt(pe,xe,{...J(),class:"references__container"})),$r(3,pe,()=>Rb),C(I,pe)};ce(X,I=>{ae()&&I(ie)})}C(O,B)},$$slots:{child:!0}})}),N(w),le(E=>b=At(w,1,"",null,b,E),[()=>({mounted:p(c)})]),C(h,y)},$$slots:{default:!0}})}),C(t,l);var f=Ae({get sources(){return a()},set sources(d){a(d),_()},get class(){return i()},set class(d){i(d),_()}});return n(),f}Ie(yh,{sources:{},class:{}},[],[],!0);function w1(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}function wh(t){return Math.pow(t-1,3)*(1-t)+1}var _1=W("<!> <!>",1),k1=W('<div class="message__bot-options"><!> <div class="message__bot-actions"><!> <!> <!></div></div>'),x1=W('<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!></div> <!></div></div>'),S1=W('<div><div class="message__content"><!></div></div>');function _h(t,e){var w,b,S,E,P,F,O;Ee(e,!0);const[r,n]=Jt(),o=()=>gt(To,"$config",r),a=()=>gt(fn,"$t",r);let i=k(e,"message",7),s=k(e,"onmessageupdate",7),c=k(e,"logic",7);const l={duration:Number((w=o().theme.components.message.custom)==null?void 0:w.transitionDuration)||300,delay:Number((b=o().theme.components.message.custom)==null?void 0:b.transitionDelay)||0,y:Number((S=o().theme.components.message.custom)==null?void 0:S.transitionY)||30,ease:wh};i().type==="bot-loading"&&(l.delay+=Number((E=o().theme.components.message.custom)==null?void 0:E.transitionBotLoadingDelay)||300);const u={duration:Number((P=o().theme.components.messageOptions.custom)==null?void 0:P.transitionDuration)||300,delay:Number((F=o().theme.components.messageOptions.custom)==null?void 0:F.transitionDelay)||0,y:Number((O=o().theme.components.messageOptions.custom)==null?void 0:O.transitionY)||30,ease:wh};vt(()=>{var $;(($=i())==null?void 0:$.type)==="bot"&&i().partial&&s()()});var f=S1();let d;var m=D(f),h=D(m);{var v=$=>{var J=x1(),ae=D(J);nr(ae,{name:"avatar",class:"message__bot-avatar"});var B=ne(ae,2),X=D(B),ie=D(X);{var I=V=>{var re=_1(),ee=te(re);fo(ee,()=>i().message.html);var ye=ne(ee,2);{var Se=_e=>{var $e=co("...");C(_e,$e)};ce(ye,_e=>{i().partial&&_e(Se)})}C(V,re)},pe=(V,re)=>{{var ee=Se=>{var _e=co();le(()=>Ve(_e,a().messageBotLoading)),C(Se,_e)},ye=Se=>{var _e=co();le(()=>Ve(_e,`${a().messageBotError??""} ${i().message??a().messageBotDefaultError??""}`)),C(Se,_e)};ce(V,Se=>{i().type==="bot-loading"?Se(ee):Se(ye,!1)},re)}};ce(ie,V=>{i().type==="bot"?V(I):V(pe,!1)})}N(X);var xe=ne(X,2);{var Y=V=>{var re=he(),ee=te(re);{var ye=Se=>{var _e=k1(),$e=D(_e);{var et=Te=>{yh(Te,{get sources(){return i().sources},class:"message__bot-references"})};ce($e,Te=>{i().sources&&i().sources.used.length&&Te(et)})}var bt=ne($e,2),rt=D(bt);hs(rt,{icon:"voteUp",get tooltip(){return a().answerGood},onclick:()=>c().giveQuickFeedback({messageId:i().id,feedback:"positive"}),class:"message__bot-action transition-colors"});var se=ne(rt,2);hs(se,{icon:"voteDown",get tooltip(){return a().answerBad},onclick:()=>c().giveQuickFeedback({messageId:i().id,feedback:"negative"}),class:"message__bot-action transition-colors"});var M=ne(se,2);hs(M,{icon:"message",get tooltip(){return a().giveFeedback},onclick:()=>c().openFeedback(i().id),class:"message__bot-action transition-colors"}),N(bt),N(_e),$r(3,_e,()=>La,()=>u),C(Se,_e)};ce(ee,Se=>{i().partial||Se(ye)})}C(V,re)};ce(xe,V=>{i().type==="bot"&&V(Y)})}N(B),N(J),C($,J)},y=($,J)=>{{var ae=B=>{var X=co();le(()=>Ve(X,i().message)),C(B,X)};ce($,B=>{i().type==="user"&&B(ae)},J)}};ce(h,$=>{i().type==="bot"||i().type==="bot-loading"||i().type==="bot-error"?$(v):$(y,!1)})}N(m),N(f),le($=>d=At(f,1,"message container",null,d,$),[()=>({"message--bot":i().type==="bot","message--bot-loading":i().type==="bot-loading","message--bot-error":i().type==="bot-error","message--user":i().type==="user"})]),$r(3,f,()=>La,()=>l),C(t,f);var g=Ae({get message(){return i()},set message($){i($),_()},get onmessageupdate(){return s()},set onmessageupdate($){s($),_()},get logic(){return c()},set logic($){c($),_()}});return n(),g}Ie(_h,{message:{},onmessageupdate:{},logic:{}},[],[],!0);let ps;function T1(t,e,r,n,o){ps&&cancelAnimationFrame(ps);const a=t instanceof Window?window.scrollY:t[n],i=performance.now();function s(c){const l=c-i,u=Math.min(l/r,1),f=o(u),d=a+(e-a)*f;t instanceof Window?window.scrollTo({top:d,behavior:"instant"}):t[n]=d,u<1?ps=requestAnimationFrame(s):t.dispatchEvent(new CustomEvent("scrollcomplete"))}ps=requestAnimationFrame(s)}var C1=W('<button class="chat-page__give-feedback btn btn--primary"> </button>'),E1=W('<div class="chat-page__footer-text fly-in" style="--fly-in-id: 3"><!></div>'),A1=W('<section class="chat-page"><!> <div class="chat-page__body"><div class="chat-page__messages"><!> <div class="chat-page__buttons"><!> <button class="chat-page__new-conversation btn btn--tertiary"> </button></div></div></div> <div><div class="chat-page__footer-content"><button><span class="sr-only"> </span> <!></button> <div class="fly-in" style="--fly-in-id: 2"><!></div> <!></div></div></section>');const R1={hash:"svelte-1dpsa7g",code:":host {--chat-footer-height: 0px;}"};function kh(t,e){Ee(e,!0),ia(t,R1);const[r,n]=Jt(),o=()=>gt(To,"$config",r),a=()=>gt(fn,"$t",r);let i=k(e,"history",7),s=k(e,"onSubmit",7),c=k(e,"onStartNewConversation",7),l=k(e,"logic",7),u=me(!1),f=me(!1),d,m,h,v=me(0);const y=90,g=()=>{A(v,h.offsetHeight,!0),d.style.setProperty("--chat-footer-height",`${p(v)}px`)};vt(()=>{const se=new ResizeObserver(g);return se.observe(h),()=>se.disconnect()});const w=()=>{T1(d,d.scrollHeight-d.clientHeight,1e3,"scrollTop",w1)},b=()=>{const se=d.scrollHeight-d.scrollTop-d.clientHeight<y;A(f,!se)},S=()=>{b()},E=se=>{m.offsetHeight>d.offsetHeight&&(m.style.minHeight=`calc(${m.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{w()})),s()(se)};vt(()=>{A(u,!0)});var P=A1();ct("resize",ta,S);var F=D(P);vh(F,{get logic(){return l()}});var O=ne(F,2),$=D(O),J=D($);Sr(J,17,i,zr,(se,M)=>{_h(se,{get message(){return p(M)},onmessageupdate:b,get logic(){return l()}})});var ae=ne(J,2),B=D(ae);{var X=se=>{var M=C1();M.__click=function(...Dt){var Rt;(Rt=l().openLatestFeedback)==null||Rt.apply(this,Dt)};var Te=D(M,!0);N(M),le(()=>Ve(Te,a().giveFeedback)),C(se,M)};ce(B,se=>{o().showOverallFeedbackButton&&se(X)})}var ie=ne(B,2);ie.__click=function(...se){var M;(M=c())==null||M.apply(this,se)};var I=D(ie,!0);N(ie),N(ae),N($),qr($,se=>m=se,()=>m),N(O),qr(O,se=>d=se,()=>d);var pe=ne(O,2);let xe;var Y=D(pe),V=D(Y);V.__click=w;let re;var ee=D(V),ye=D(ee,!0);N(ee);var Se=ne(ee,2);nr(Se,{name:"chevronDown"}),N(V);var _e=ne(V,2),$e=D(_e);pc($e,{onSubmit:E,class:"chat-page__chat-input"}),N(_e);var et=ne(_e,2);{var bt=se=>{var M=E1(),Te=D(M);fo(Te,()=>a().chatFooterText),N(M),C(se,M)};ce(et,se=>{a().chatFooterText!==void 0&&se(bt)})}N(Y),N(pe),qr(pe,se=>h=se,()=>h),N(P),le((se,M)=>{Ve(I,a().newChat),xe=At(pe,1,"chat-page__footer container",null,xe,se),re=At(V,1,"chat-page__scroll-to-bottom btn btn--secondary",null,re,M),Ve(ye,a().scrollToBottom)},[()=>({mounted:p(u)}),()=>({"chat-page__scroll-to-bottom--hidden":!p(f)})]),ct("scroll",O,b),C(t,P);var rt=Ae({get history(){return i()},set history(se){i(se),_()},get onSubmit(){return s()},set onSubmit(se){s(se),_()},get onStartNewConversation(){return c()},set onStartNewConversation(se){c(se),_()},get logic(){return l()},set logic(se){l(se),_()}});return n(),rt}lo(["click"]),Ie(kh,{history:{},onSubmit:{},onStartNewConversation:{},logic:{}},[],[],!0);var I1=W('<div><!> <h1 class="introduction__title"><!></h1></div>');function xh(t,e){Ee(e,!0);const[r,n]=Jt(),o=()=>gt(fn,"$t",r);let a=k(e,"class",7);var i=I1(),s=D(i);nr(s,{name:"avatar",class:"introduction__avatar"});var c=ne(s,2),l=D(c);fo(l,()=>o().introductionTitle),N(c),N(i),le(()=>At(i,1,`introduction ${a()??""}`)),C(t,i);var u=Ae({get class(){return a()},set class(f){a(f),_()}});return n(),u}Ie(xh,{class:{}},[],[],!0);var O1=(t,e,r)=>e()(r().question),N1=W('<button class="predefined-question transition-colors" tabindex="0"><!> </button>');function Sh(t,e){Ee(e,!0);let r=k(e,"onSubmit",7),n=k(e,"predefinedQuestion",7);var o=N1();o.__click=[O1,r,n];var a=D(o);nr(a,{name:"predefinedQuestion",class:"predefined-question__icon transition-colors"});var i=ne(a,1,!0);return N(o),le(()=>Ve(i,n().label??n().question)),C(t,o),Ae({get onSubmit(){return r()},set onSubmit(s){r(s),_()},get predefinedQuestion(){return n()},set predefinedQuestion(s){n(s),_()}})}lo(["click"]),Ie(Sh,{onSubmit:{},predefinedQuestion:{}},[],[],!0);var P1=W("<div></div>");function Th(t,e){Ee(e,!0);let r=k(e,"predefinedQuestions",7),n=k(e,"onSubmit",7),o=k(e,"class",7),a=Cr(e,["$$slots","$$events","$$legacy","$$host","predefinedQuestions","onSubmit","class"]);var i=P1();let s;return Sr(i,21,r,zr,(c,l)=>{Sh(c,{get predefinedQuestion(){return p(l)},get onSubmit(){return n()}})}),N(i),le(()=>s=Qt(i,s,{class:`predefined-questions ${o()??""}`,...a})),C(t,i),Ae({get predefinedQuestions(){return r()},set predefinedQuestions(c){r(c),_()},get onSubmit(){return n()},set onSubmit(c){n(c),_()},get class(){return o()},set class(c){o(c),_()}})}Ie(Th,{predefinedQuestions:{},onSubmit:{},class:{}},[],[],!0);var F1=W("<section><!> <!> <!></section>");function Ch(t,e){Ee(e,!0);let r=k(e,"predefinedQuestions",7),n=k(e,"onSubmit",7),o=me(!1);vt(()=>{A(o,!0)});var a=F1();let i;var s=D(a);xh(s,{class:"start-page__introduction fly-in"});var c=ne(s,2);pc(c,{get onSubmit(){return n()},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;"});var l=ne(c,2);{var u=f=>{Th(f,{get predefinedQuestions(){return r()},get onSubmit(){return n()},class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};ce(l,f=>{r()&&r().length&&f(u)})}return N(a),le(f=>i=At(a,1,"start-page container",null,i,f),[()=>({mounted:p(o)})]),C(t,a),Ae({get predefinedQuestions(){return r()},set predefinedQuestions(f){r(f),_()},get onSubmit(){return n()},set onSubmit(f){n(f),_()}})}Ie(Ch,{predefinedQuestions:{},onSubmit:{}},[],[],!0);var L1=W('<div class="loader-container svelte-rzuq2t"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>');const D1={hash:"svelte-rzuq2t",code:".loader-container.svelte-rzuq2t {display:flex;z-index:1000;position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}"};function Eh(t,e){Ee(e,!0),ia(t,D1);let r=k(e,"color",7),n=k(e,"background",7);var o=L1(),a=D(o);return N(o),le(()=>{$n(o,n()?`background: ${n()};`:""),Pe(a,"fill",r()??"rgba(127, 127, 127, 0.3)")}),C(t,o),Ae({get color(){return r()},set color(i){r(i),_()},get background(){return n()},set background(i){n(i),_()}})}Ie(Eh,{color:{},background:{}},[],[],!0);var M1=W("<strong> </strong>"),B1=W('<div class="line-clamp line-clamp--12"> </div>'),z1=W('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),$1=W('<div class="reference-number__content-wrapper" role="tooltip"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer"><!> <!> <!></a></div>'),q1=W('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function j1(t,e){var O,$,J;Ee(e,!0);const[r,n]=Jt(),o=()=>gt(To,"$config",r),a=()=>gt(fn,"$t",r);let i=k(e,"usedNumber",7),s=k(e,"source",7),c=me(!1),l,u,f=me(void 0);const d=s(),m={duration:Number((O=o().theme.components.referenceNumberContent.custom)==null?void 0:O.transitionDuration)||200,delay:Number(($=o().theme.components.referenceNumberContent.custom)==null?void 0:$.transitionDelay)||0,y:Number((J=o().theme.components.referenceNumberContent.custom)==null?void 0:J.transitionY)||10},h=async()=>{if(!u||!p(f))return;const{x:ae,y:B}=await Sf(u,p(f),{placement:"top",middleware:[kf(8),Eb(),xf({padding:8})]});Object.assign(p(f).style,{left:`${ae}px`,top:`${B}px`})},v=()=>{l&&(clearTimeout(l),l=void 0)},y=()=>{v(),l=setTimeout(()=>{A(c,!1)},100)},g=()=>{v(),A(c,!0)};vt(()=>{p(c)&&h()});var w=q1(),b=D(w),S=D(b,!0);N(b),qr(b,ae=>u=ae,()=>u);var E=ne(b,2);{var P=ae=>{var B=$1(),X=D(B),ie=D(X);{var I=re=>{var ee=M1(),ye=D(ee,!0);N(ee),le(()=>Ve(ye,d.title)),C(re,ee)};ce(ie,re=>{d.title&&re(I)})}var pe=ne(ie,2);{var xe=re=>{var ee=B1(),ye=D(ee,!0);N(ee),le(()=>Ve(ye,d.generated.summary)),C(re,ee)};ce(pe,re=>{d.generated.summary&&re(xe)})}var Y=ne(pe,2);{var V=re=>{var ee=z1(),ye=D(ee),Se=D(ye,!0);N(ye),N(ee),le(()=>Ve(Se,d.url)),C(re,ee)};ce(Y,re=>{d.url&&re(V)})}N(X),N(B),qr(B,re=>A(f,re),()=>p(f)),le(()=>Pe(X,"href",d.url)),ct("mouseenter",B,g),ct("mouseleave",B,y),$r(3,B,()=>La,()=>m),C(ae,B)};ce(E,ae=>{p(c)&&ae(P)})}N(w),le(()=>{Pe(b,"href",d.url),Pe(b,"aria-label",`${a().referenceLink??""}: ${d.title??""}`),Ve(S,i())}),ct("mouseenter",b,g),ct("mouseleave",b,y),ct("focus",b,()=>A(c,!0)),ct("blur",b,()=>A(c,!1)),C(t,w);var F=Ae({get usedNumber(){return i()},set usedNumber(ae){i(ae),_()},get source(){return s()},set source(ae){s(ae),_()}});return n(),F}customElements.define("liipgpt-reference-number",Ie(j1,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-ref-number",type:"String"},usedNumber:{attribute:"data-used-number",type:"String"}},[],[],!1));var Z1=W('<link rel="stylesheet">'),U1=W('<div class="chat-app__animation-container svelte-ayd7hh"><div class="chat-app__animation svelte-ayd7hh"><!></div></div>'),H1=W('<div class="style-container" hidden></div> <!> <!>',1),G1=W('<div class="chat-app__loader-container svelte-ayd7hh"><!></div>'),V1=W('<main class="chat-app"><!> <!></main>');const W1={hash:"svelte-ayd7hh",code:".chat-app__loader-container.svelte-ayd7hh {display:flex;z-index:1000;position:relative;align-items:center;justify-content:center;width:100%;height:100%;}.chat-app__animation-container.svelte-ayd7hh {position:relative; /* Needed for absolute positioned fade-out. */height:100%;}.chat-app__animation.svelte-ayd7hh {width:100%; /* Ensure full width during absolute positioned fade-out */height:100%;}"};function Ah(t,e){Ee(e,!0),ia(t,W1);let r=Cr(e,["$$slots","$$events","$$legacy","$$host"]),n=new Y0(r);vt(()=>{n.onNavigate()});var o=V1();ct("popstate",ta,function(...c){var l;(l=n.onNavigate)==null||l.apply(this,c)}),ku(c=>{var l=he(),u=te(l);{var f=d=>{var m=he(),h=te(m);Sr(h,17,()=>n.chatState.config.fontURLs,zr,(v,y)=>{var g=Z1();le(()=>Pe(g,"href",p(y))),C(v,g)}),C(d,m)};ce(u,d=>{n.chatState&&n.chatState.config.fontURLs&&d(f)})}C(c,l)});let a;var i=D(o);Hp(i,()=>n.loadInitialState(e.org),c=>{var l=G1(),u=D(l);Tr(u,e,"loader",{},f=>{Eh(f,{get background(){return e.loaderBackground},get color(){return e.loaderColor}})}),N(l),$r(2,l,()=>ad,()=>({duration:200,delay:300})),C(c,l)},c=>{var l=H1(),u=te(l);bl(u,m=>{var h;return(h=n.onStyleInit)==null?void 0:h.call(n,m)});var f=ne(u,2);Gp(f,()=>n.pageState,m=>{var h=U1(),v=D(h),y=D(v);{var g=b=>{Ch(b,{get predefinedQuestions(){return n.chatState.predefinedQuestions},get onSubmit(){return n.onStartConversation}})},w=b=>{kh(b,{get history(){return n.chatState.history},get onSubmit(){return n.onSubmit},get onStartNewConversation(){return n.onStartNewConversation},logic:n})};ce(y,b=>{n.pageState===Sa.Start?b(g):b(w,!1)})}N(v),N(h),$r(1,v,()=>Af,()=>({duration:300,delay:250})),$r(2,v,()=>ad,()=>({duration:150})),C(m,h)});var d=ne(f,2);Rf(d,{get menu(){return n.chatState.menu},get usedLanguages(){return n.chatState.usedLanguages},get currentLanguage(){return n.chatState.language},get onLanguageChange(){return n.onLanguageChange}}),C(c,l)});var s=ne(i,2);rf(s,{position:"top-center"}),N(o),le(()=>{var c,l;return a=$n(o,(c=n.chatState)==null?void 0:c.themeString,a,{"color-scheme":((l=n.chatState)==null?void 0:l.mode)??"light"})}),C(t,o),Ae()}return customElements.define("liipgpt-chat",Ie(Ah,{org:{type:"String"},apiUrl:{type:"String"},apiKey:{type:"String"},configOverride:{type:"String"},devChatHistory:{type:"Boolean"},lang:{type:"String"},modes:{type:"String"}},["loader"],[],!0)),tt.LiipGPTChat=Ah,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}),tt}({});