@liip/liipgpt 0.0.14 → 0.0.15

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,4 +1,4 @@
1
- var LiipGPTChat=function(Ye){"use strict";var Aw=Object.defineProperty;var Rw=Object.getPrototypeOf;var Iw=Reflect.get;var mh=Ye=>{throw TypeError(Ye)};var Ow=(Ye,at,gt)=>at in Ye?Aw(Ye,at,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Ye[at]=gt;var ae=(Ye,at,gt)=>Ow(Ye,typeof at!="symbol"?at+"":at,gt),Oc=(Ye,at,gt)=>at.has(Ye)||mh("Cannot "+gt);var E=(Ye,at,gt)=>(Oc(Ye,at,"read from private field"),gt?gt.call(Ye):at.get(Ye)),Y=(Ye,at,gt)=>at.has(Ye)?mh("Cannot add the same private member more than once"):at instanceof WeakSet?at.add(Ye):at.set(Ye,gt),Et=(Ye,at,gt,Qn)=>(Oc(Ye,at,"write to private field"),Qn?Qn.call(Ye,gt):at.set(Ye,gt),gt),Yn=(Ye,at,gt)=>(Oc(Ye,at,"access private method"),gt);var vh=(Ye,at,gt)=>Iw(Rw(Ye),gt,at);var ln,pr,Wr,Kr,cn,Lo,Ms,Mo,za,Fa,Ba,qa,un,$a,ja,Za,Ua,Ha,Va,Ga,Wa,Ka,ss,ls,cs,us,ds,fs,hs,ps,gs,ms,vs,Do,Vn,Cn,zo,Fo,En,Ya,Qa,dn,bs,Bo,bh,ys,qo,ws,_s,ks,xs,Ja,yh,Ss,Ts,Cs,Es,$o,Xa,As,wh,Rs,ei,ti,Is,jo,Zo,Uo,Ho,Os,Ns,Ps,Gn,Ls;const at="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(at);const gt=1,Qn=2,Nc=4,_h=8,kh=16,xh=1,Sh=2,Pc=4,Th=8,Ch=16,Eh=1,Ah=2,Rh=4,Ih=1,Oh=2,Ds="[",zs="[!",Fs="]",Jn={},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 zh=["touchstart","touchmove"];function Fh(t){return zh.includes(t)}const Lc=!1;var Bs=Array.isArray,qs=Array.from,ii=Object.keys,si=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Mc=Object.getOwnPropertyDescriptors,Bh=Object.prototype,qh=Array.prototype,$s=Object.getPrototypeOf;function Xn(t){return typeof t=="function"}const qe=()=>{};function $h(t){return typeof(t==null?void 0:t.then)=="function"}function jh(t){return t()}function Yo(t){for(var e=0;e<t.length;e++)t[e]()}const gr=2,Dc=4,Qo=8,li=16,mr=32,eo=64,js=128,In=256,ci=512,zt=1024,hn=2048,to=4096,Nr=8192,ro=16384,zc=32768,no=65536,Zh=1<<17,Fc=1<<19,Bc=1<<20,Pr=Symbol("$state"),Zs=Symbol("legacy props"),Uh=Symbol("");function qc(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 Us(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 oo=!1;function rp(){oo=!0}function mt(t,e){var r={f:0,v:t,reactions:null,equals:qc,version:0};return r}function ke(t){return $c(mt(t))}function On(t,e=!1){var n;const r=mt(t);return e||(r.equals=Us),oo&&ze!==null&&ze.l!==null&&((n=ze.l).s??(n.s=[])).push(r),r}function He(t,e=!1){return $c(On(t,e))}function $c(t){return Ve!==null&&Ve.f&gr&&(Mr===null?hp([t]):Mr.push(t)),t}function R(t,e){return Ve!==null&&lo()&&Ve.f&(gr|li)&&(Mr===null||!Mr.includes(t))&&tp(),ao(t,e)}function ao(t,e){return t.equals(e)||(t.v=e,t.version=du(),jc(t,hn),lo()&&Ne!==null&&Ne.f&zt&&!(Ne.f&mr)&&(Pt!==null&&Pt.includes(t)?(wr(Ne,hn),vi(Ne)):pn===null?pp([t]):pn.push(t))),e}function jc(t,e){var r=t.reactions;if(r!==null)for(var n=lo(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;s&hn||!n&&i===Ne||(wr(i,e),s&(zt|In)&&(s&gr?jc(i,to):vi(i)))}}function di(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let ve=!1;function vr(t){ve=t}let Me;function Ft(t){if(t===null)throw di(),Jn;return Me=t}function Lr(){return Ft(br(Me))}function O(t){if(ve){if(br(Me)!==null)throw di(),Jn;Me=t}}function Hs(){for(var t=0,e=Me;;){if(e.nodeType===8){var r=e.data;if(r===Fs){if(t===0)return e;t-=1}else(r===Ds||r===zs)&&(t+=1)}var n=br(e);e.remove(),e=n}}function xe(t,e=null,r){if(typeof t!="object"||t===null||Pr in t)return t;const n=$s(t);if(n!==Bh&&n!==qh)return t;var o=new Map,a=Bs(t),i=mt(0);a&&o.set("length",mt(t.length));var s;return new Proxy(t,{defineProperty(c,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Jh();var d=o.get(l);return d===void 0?(d=mt(u.value),o.set(l,d)):R(d,xe(u.value,s)),!0},deleteProperty(c,l){var u=o.get(l);if(u===void 0)l in c&&o.set(l,mt(Ot));else{if(a&&typeof l=="string"){var d=o.get("length"),f=Number(l);Number.isInteger(f)&&f<d.v&&R(d,f)}R(u,Ot),Zc(i)}return!0},get(c,l,u){var h;if(l===Pr)return t;var d=o.get(l),f=l in c;if(d===void 0&&(!f||(h=Yr(c,l))!=null&&h.writable)&&(d=mt(xe(f?c[l]:Ot,s)),o.set(l,d)),d!==void 0){var v=p(d);return v===Ot?void 0:v}return Reflect.get(c,l,u)},getOwnPropertyDescriptor(c,l){var u=Reflect.getOwnPropertyDescriptor(c,l);if(u&&"value"in u){var d=o.get(l);d&&(u.value=p(d))}else if(u===void 0){var f=o.get(l),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(c,l){var v;if(l===Pr)return!0;var u=o.get(l),d=u!==void 0&&u.v!==Ot||Reflect.has(c,l);if(u!==void 0||Ne!==null&&(!d||(v=Yr(c,l))!=null&&v.writable)){u===void 0&&(u=mt(d?xe(c[l],s):Ot),o.set(l,u));var f=p(u);if(f===Ot)return!1}return d},set(c,l,u,d){var w;var f=o.get(l),v=l in c;if(a&&l==="length")for(var h=u;h<f.v;h+=1){var m=o.get(h+"");m!==void 0?R(m,Ot):h in c&&(m=mt(Ot),o.set(h+"",m))}f===void 0?(!v||(w=Yr(c,l))!=null&&w.writable)&&(f=mt(void 0),R(f,xe(u,s)),o.set(l,f)):(v=f.v!==Ot,R(f,xe(u,s)));var y=Reflect.getOwnPropertyDescriptor(c,l);if(y!=null&&y.set&&y.set.call(d,u),!v){if(a&&typeof l=="string"){var g=o.get("length"),b=Number(l);Number.isInteger(b)&&b>=g.v&&R(g,b+1)}Zc(i)}return!0},ownKeys(c){p(i);var l=Reflect.ownKeys(c).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 c)&&l.push(u);return l},setPrototypeOf(){Xh()}})}function Zc(t,e=1){R(t,t.v+e)}function Uc(t){return t!==null&&typeof t=="object"&&Pr in t?t[Pr]:t}function np(t,e){return Object.is(Uc(t),Uc(e))}var Jo,Hc,Vc;function Vs(){if(Jo===void 0){Jo=window;var t=Element.prototype,e=Node.prototype;Hc=Yr(e,"firstChild").get,Vc=Yr(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 Qr(t=""){return document.createTextNode(t)}function ir(t){return Hc.call(t)}function br(t){return Vc.call(t)}function P(t,e){if(!ve)return ir(t);var r=ir(Me);if(r===null)r=Me.appendChild(Qr());else if(e&&r.nodeType!==3){var n=Qr();return r==null||r.before(n),Ft(n),n}return Ft(r),r}function U(t,e){if(!ve){var r=ir(t);return r instanceof Comment&&r.data===""?br(r):r}return Me}function se(t,e=1,r=!1){let n=ve?Me:t;for(var o;e--;)o=n,n=br(n);if(!ve)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var i=Qr();return n===null?o==null||o.after(i):n.before(i),Ft(i),i}return Ft(n),n}function Gs(t){t.textContent=""}function Se(t){var e=gr|hn;Ne===null?e|=In:Ne.f|=Bc;var r=Ve!==null&&Ve.f&gr?Ve:null;const n={children:null,ctx:ze,deps:null,equals:qc,f:e,fn:t,reactions:null,v:null,version:0,parent:r??Ne};return r!==null&&(r.children??(r.children=[])).push(n),n}function Nt(t){const e=Se(t);return e.equals=Us,e}function Gc(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&gr?Ws(n):yr(n)}}}function op(t){for(var e=t.parent;e!==null;){if(!(e.f&gr))return e;e=e.parent}return null}function Wc(t){var e,r=Ne;Kt(op(t));try{Gc(t),e=fu(t)}finally{Kt(r)}return e}function Kc(t){var e=Wc(t),r=(gn||t.f&In)&&t.deps!==null?to:zt;wr(t,r),t.equals(e)||(t.v=e,t.version=du())}function Ws(t){Gc(t),ra(t,0),wr(t,ro),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Yc(t){Ne===null&&Ve===null&&Wh(),Ve!==null&&Ve.f&In&&Gh(),rl&&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&eo)!==0,a=Ne,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=io;try{su(!0),na(i),i.f|=zc}catch(u){throw yr(i),u}finally{su(s)}}else e!==null&&vi(i);var c=r&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&Bc)===0;if(!c&&!o&&n&&(a!==null&&ap(i,a),Ve!==null&&Ve.f&gr)){var l=Ve;(l.children??(l.children=[])).push(i)}return i}function ip(){return Ve===null?!1:!gn}function Ks(t){const e=Nn(Qo,null,!1);return wr(e,zt),e.teardown=t,e}function wt(t){Yc();var e=Ne!==null&&(Ne.f&mr)!==0&&ze!==null&&!ze.m;if(e){var r=ze;(r.e??(r.e=[])).push({fn:t,effect:Ne,reaction:Ve})}else{var n=Xo(t);return n}}function Ys(t){return Yc(),Jr(t)}function Qc(t){const e=Nn(eo,t,!0);return()=>{yr(e)}}function sp(t){const e=Nn(eo,t,!0);return(r={})=>new Promise(n=>{r.outro?en(e,()=>{yr(e),n(void 0)}):(yr(e),n(void 0))})}function Xo(t){return Nn(Dc,t,!1)}function $e(t,e){var r=ze,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=Jr(()=>{t(),!n.ran&&(n.ran=!0,R(r.l.r2,!0),Yt(e))})}function Qs(){var t=ze;Jr(()=>{if(p(t.l.r2)){for(var e of t.l.r1){var r=e.effect;r.f&zt&&wr(r,to),co(r)&&na(r),e.ran=!1}t.l.r2.v=!1}})}function Jr(t){return Nn(Qo,t,!0)}function le(t){return Xr(t)}function Xr(t,e=0){return Nn(Qo|li|e,t,!0)}function Xt(t,e=!0){return Nn(Qo|mr,t,!0,e)}function Jc(t){var e=t.teardown;if(e!==null){const r=rl,n=Ve;lu(!0),sr(null);try{e.call(null)}finally{lu(r),sr(n)}}}function Xc(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)Ws(e[r])}}function eu(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;yr(r,e),r=n}}function lp(t){for(var e=t.first;e!==null;){var r=e.next;e.f&mr||yr(e),e=r}}function yr(t,e=!0){var r=!1;if((e||t.f&Fc)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var a=n===o?null:br(n);n.remove(),n=a}r=!0}eu(t,e&&!r),Xc(t),ra(t,0),wr(t,ro);var i=t.transitions;if(i!==null)for(const c of i)c.stop();Jc(t);var s=t.parent;s!==null&&s.first!==null&&tu(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function tu(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 en(t,e){var r=[];Js(t,r,!0),ru(r,()=>{yr(t),e&&e()})}function ru(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function Js(t,e,r){if(!(t.f&Nr)){if(t.f^=Nr,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&no)!==0||(n.f&mr)!==0;Js(n,e,a?r:!1),n=o}}}function Pn(t){nu(t,!0)}function nu(t,e){if(t.f&Nr){co(t)&&na(t),t.f^=Nr;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&no)!==0||(r.f&mr)!==0;nu(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,Xs=[],el=[];function ou(){fi=!1;const t=Xs.slice();Xs=[],Yo(t)}function au(){hi=!1;const t=el.slice();el=[],Yo(t)}function tn(t){fi||(fi=!0,queueMicrotask(ou)),Xs.push(t)}function up(t){hi||(hi=!0,cp(au)),el.push(t)}function dp(){fi&&ou(),hi&&au()}function tl(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const iu=0,fp=1;let pi=!1,gi=iu,ea=!1,ta=null,io=!1,rl=!1;function su(t){io=t}function lu(t){rl=t}let Ln=[],so=0,Nw=[],Ve=null;function sr(t){Ve=t}let Ne=null;function Kt(t){Ne=t}let Mr=null;function hp(t){Mr=t}let Pt=null,er=0,pn=null;function pp(t){pn=t}let cu=1,gn=!1,ze=null;function uu(t){ze=t}function du(){return++cu}function lo(){return!oo||ze!==null&&ze.l===null}function co(t){var i,s;var e=t.f;if(e&hn)return!0;if(e&to){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(co(a)&&Kc(a),n&&Ne!==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||Ne!==null&&!gn)&&wr(t,zt)}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&ro)===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 fu(t){var f;var e=Pt,r=er,n=pn,o=Ve,a=gn,i=Mr,s=ze,c=t.f;Pt=null,er=0,pn=null,Ve=c&(mr|eo)?null:t,gn=!io&&(c&In)!==0,Mr=null,ze=t.ctx;try{var l=(0,t.fn)(),u=t.deps;if(Pt!==null){var d;if(ra(t,er),u!==null&&er>0)for(u.length=er+Pt.length,d=0;d<Pt.length;d++)u[er+d]=Pt[d];else t.deps=u=Pt;if(!gn)for(d=er;d<u.length;d++)((f=u[d]).reactions??(f.reactions=[])).push(t)}else u!==null&&er<u.length&&(ra(t,er),u.length=er);return l}finally{Pt=e,er=r,pn=n,Ve=o,gn=a,Mr=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&gr&&(Pt===null||!Pt.includes(e))&&(wr(e,to),e.f&(In|ci)||(e.f^=ci),ra(e,0))}function ra(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)vp(t,r[n])}function na(t){var e=t.f;if(!(e&ro)){wr(t,zt);var r=Ne,n=ze;Ne=t;try{e&li?lp(t):eu(t),Xc(t),Jc(t);var o=fu(t);t.teardown=typeof o=="function"?o:null,t.version=cu}catch(a){mi(a,t,r,n||t.ctx)}finally{Ne=r}}}function hu(){if(so>1e3){so=0;try{Kh()}catch(t){if(ta!==null)mi(t,ta,null);else throw t}}so++}function pu(t){var e=t.length;if(e!==0){hu();var r=io;io=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&zt||(o.f^=zt);var a=[];gu(o,a),bp(a)}}finally{io=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&(ro|Nr)))try{co(n)&&(na(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?tu(n):n.fn=null))}catch(o){mi(o,n,null,n.ctx)}}}function yp(){if(ea=!1,so>1001)return;const t=Ln;Ln=[],pu(t),ea||(so=0,ta=null)}function vi(t){gi===iu&&(ea||(ea=!0,queueMicrotask(yp))),ta=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(eo|mr)){if(!(r&zt))return;e.f^=zt}}Ln.push(e)}function gu(t,e){var r=t.first,n=[];e:for(;r!==null;){var o=r.f,a=(o&mr)!==0,i=a&&(o&zt)!==0,s=r.next;if(!i&&!(o&Nr))if(o&Qo){if(a)r.f^=zt;else try{co(r)&&na(r)}catch(d){mi(d,r,null,r.ctx)}var c=r.first;if(c!==null){r=c;continue}}else o&Dc&&n.push(r);if(s===null){let d=r.parent;for(;d!==null;){if(t===d)break e;var l=d.next;if(l!==null){r=l;continue e}d=d.parent}}r=s}for(var u=0;u<n.length;u++)c=n[u],e.push(c),gu(c,e)}function _(t){var e=gi,r=Ln;try{hu();const o=[];gi=fp,Ln=o,ea=!1,pu(r);var n=t==null?void 0:t();return dp(),(Ln.length>0||o.length>0)&&_(),so=0,ta=null,n}finally{gi=e,Ln=r}}async function nl(){await Promise.resolve(),_()}function p(t){var u;var e=t.f,r=(e&gr)!==0;if(r&&e&ro){var n=Wc(t);return Ws(t),n}if(Ve!==null){Mr!==null&&Mr.includes(t)&&ep();var o=Ve.deps;Pt===null&&o!==null&&o[er]===t?er++:Pt===null?Pt=[t]:Pt.push(t),pn!==null&&Ne!==null&&Ne.f&zt&&!(Ne.f&mr)&&pn.includes(t)&&(wr(Ne,hn),vi(Ne))}else if(r&&t.deps===null)for(var a=t,i=a.parent,s=a;i!==null;)if(i.f&gr){var c=i;s=c,i=c.parent}else{var l=i;(u=l.deriveds)!=null&&u.includes(s)||(l.deriveds??(l.deriveds=[])).push(s);break}return r&&(a=t,co(a)&&Kc(a)),t.v}function Yt(t){const e=Ve;try{return Ve=null,t()}finally{Ve=e}}const wp=~(hn|to|zt);function wr(t,e){t.f=t.f&wp|e}function mu(t){return ol().get(t)}function _p(t,e){return ol().set(t,e),e}function kp(t){return ol().has(t)}function ol(t){return ze===null&&tl(),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 vu(t,e=1){var r=p(t),n=e===1?r++:r--;return R(t,r),n}function Ae(t,e=!1,r){ze={p:ze,c:null,e:null,m:!1,s:t,x:null,l:null},oo&&!e&&(ze.l={s:null,u:null,r1:[],r2:mt(!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=Ne,n=Ve;e.e=null;try{for(var o=0;o<i.length;o++){var a=i[o];Kt(a.effect),sr(a.reaction),Xo(a.fn)}}finally{Kt(r),sr(n)}}ze=e.p,e.m=!0}return t||{}}function Ze(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Pr in t)al(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Pr in r&&al(r)}}}function al(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{al(t[n],e)}catch{}const r=$s(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Mc(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,tn(()=>{document.activeElement===r&&t.focus()})}}function bu(t){ve&&ir(t)!==null&&Gs(t)}let yu=!1;function wu(){yu||(yu=!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 _u(t){var e=Ve,r=Ne;sr(null),Kt(null);try{return t()}finally{sr(e),Kt(r)}}function ku(t,e,r,n=r){t.addEventListener(e,()=>_u(r));const o=t.__on_r;o?t.__on_r=()=>{o(),n(!0)}:t.__on_r=()=>n(!0),wu()}const xu=new Set,il=new Set;function sl(t,e,r,n){function o(a){if(n.capture||oa.call(e,a),!a.cancelBubble)return _u(()=>r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?tn(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function Lt(t,e,r,n={}){var o=sl(e,t,r,n);return()=>{t.removeEventListener(e,o,n)}}function ct(t,e,r,n,o){var a={capture:n,passive:o},i=sl(t,e,r,a);(e===document.body||e===window||e===document)&&Ks(()=>{e.removeEventListener(t,i,a)})}function Mn(t){for(var e=0;e<t.length;e++)xu.add(t[e]);for(var r of il)r(t)}function oa(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 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){si(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=Ve,d=Ne;sr(null),Kt(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(Bs(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,sr(u),Kt(d)}}}let lr;function Tp(){lr=void 0}function Cp(t){let e=null,r=ve;var n;if(ve){for(e=Me,lr===void 0&&(lr=ir(document.head));lr!==null&&(lr.nodeType!==8||lr.data!==Ds);)lr=br(lr);lr===null?vr(!1):lr=Ft(br(lr))}ve||(n=document.head.appendChild(Qr()));try{Xr(()=>t(n),Fc)}finally{r&&(vr(!0),lr=Me,Ft(e))}}function ll(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function cr(t,e){var r=Ne;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function J(t,e){var r=(e&Ih)!==0,n=(e&Oh)!==0,o,a=!t.startsWith("<!>");return()=>{if(ve)return cr(Me,null),Me;o===void 0&&(o=ll(a?t:"<!>"+t),r||(o=ir(o)));var i=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=ir(i),c=i.lastChild;cr(s,c)}else cr(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 cr(Me,null),Me;if(!a){var i=ll(o),s=ir(i);a=ir(s)}var c=a.cloneNode(!0);return cr(c,c),c}}function uo(t=""){if(!ve){var e=Qr(t+"");return cr(e,e),e}var r=Me;return r.nodeType!==3&&(r.before(r=Qr()),Ft(r)),cr(r,r),r}function ie(){if(ve)return cr(Me,null),Me;var t=document.createDocumentFragment(),e=document.createComment(""),r=Qr();return t.append(e,r),cr(e,r),t}function T(t,e){if(ve){Ne.nodes_end=Me,Lr();return}t!==null&&t.before(e)}let cl=!0;function je(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 Su(t,e){return Tu(t,e)}function Ep(t,e){Vs(),e.intro=e.intro??!1;const r=e.target,n=ve,o=Me;try{for(var a=ir(r);a&&(a.nodeType!==8||a.data!==Ds);)a=br(a);if(!a)throw Jn;vr(!0),Ft(a),Lr();const i=Tu(t,{...e,anchor:a});if(Me===null||Me.nodeType!==8||Me.data!==Fs)throw di(),Jn;return vr(!1),i}catch(i){if(i===Jn)return e.recover===!1&&Yh(),Vs(),Gs(r),vr(!1),Su(t,e);throw i}finally{vr(n),Ft(o),Tp()}}const fo=new Map;function Tu(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){Vs();var s=new Set,c=d=>{for(var f=0;f<d.length;f++){var v=d[f];if(!s.has(v)){s.add(v);var h=Fh(v);e.addEventListener(v,oa,{passive:h});var m=fo.get(v);m===void 0?(document.addEventListener(v,oa,{passive:h}),fo.set(v,1)):fo.set(v,m+1)}}};c(qs(xu)),il.add(c);var l=void 0,u=sp(()=>{var d=r??e.appendChild(Qr());return Xt(()=>{if(a){Ae({});var f=ze;f.c=a}o&&(n.$$events=o),ve&&cr(d,null),cl=i,l=t(d,n)||{},cl=!0,ve&&(Ne.nodes_end=Me),a&&Re()}),()=>{var h;for(var f of s){e.removeEventListener(f,oa);var v=fo.get(f);--v===0?(document.removeEventListener(f,oa),fo.delete(f)):fo.set(f,v)}il.delete(c),d!==r&&((h=d.parentNode)==null||h.removeChild(d))}});return ul.set(l,u),l}let ul=new WeakMap;function Ap(t,e){const r=ul.get(t);return r?(ul.delete(t),r(e)):Promise.resolve()}const dl=0,yi=1,fl=2;function Rp(t,e,r,n,o){ve&&Lr();var a=t,i=lo(),s=ze,c=Ot,l,u,d,f=(i?mt:On)(void 0),v=(i?mt:On)(void 0),h=!1;function m(g,b){h=!0,b&&(Kt(y),sr(y),uu(s));try{g===dl&&r&&(l?Pn(l):l=Xt(()=>r(a))),g===yi&&n&&(u?Pn(u):u=Xt(()=>n(a,f))),g===fl&&o&&(d?Pn(d):d=Xt(()=>o(a,v))),g!==dl&&l&&en(l,()=>l=null),g!==yi&&u&&en(u,()=>u=null),g!==fl&&d&&en(d,()=>d=null)}finally{b&&(uu(null),sr(null),Kt(null),_())}}var y=Xr(()=>{if(c!==(c=e())){if($h(c)){var g=c;h=!1,g.then(b=>{g===c&&(ao(f,b),m(yi,!0))},b=>{if(g===c)throw ao(v,b),m(fl,!0),v.v}),ve?r&&(l=Xt(()=>r(a))):tn(()=>{h||m(dl,!0)})}else ao(f,c),m(yi,!1);return()=>c=Ot}});ve&&(a=Me)}function fe(t,e,r=!1){ve&&Lr();var n=t,o=null,a=null,i=Ot,s=r?no:0,c=!1;const l=(d,f=!0)=>{c=!0,u(f,d)},u=(d,f)=>{if(i===(i=d))return;let v=!1;if(ve){const h=n.data===zs;!!i===h&&(n=Hs(),Ft(n),vr(!1),v=!0)}i?(o?Pn(o):f&&(o=Xt(()=>f(n))),a&&en(a,()=>{a=null})):(a?Pn(a):f&&(a=Xt(()=>f(n))),o&&en(o,()=>{o=null})),v&&vr(!0)};Xr(()=>{c=!1,e(l),c||u(null,null)},s),ve&&(n=Me)}function Ip(t,e,r){ve&&Lr();var n=t,o=Ot,a,i=lo()?Hh:ui;Xr(()=>{i(o,o=e())&&(a&&en(a),a=Xt(()=>r(n)))}),ve&&(n=Me)}function Dr(t,e){return e}function Op(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)Js(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var c=r.parentNode;Gs(c),c.append(r),n.clear(),mn(t,e[0].prev,e[a-1].next)}ru(o,()=>{for(var l=0;l<a;l++){var u=e[l];s||(n.delete(u.k),mn(t,u.prev,u.next)),yr(u.e,!s)}})}function _r(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null},c=(e&Nc)!==0;if(c){var l=t;i=ve?Ft(ir(l)):l.appendChild(Qr())}ve&&Lr();var u=null,d=!1;Xr(()=>{var f=r(),v=Bs(f)?f:f==null?[]:qs(f),h=v.length;if(d&&h===0)return;d=h===0;let m=!1;if(ve){var y=i.data===zs;y!==(h===0)&&(i=Hs(),Ft(i),vr(!1),m=!0)}if(ve){for(var g=null,b,w=0;w<h;w++){if(Me.nodeType===8&&Me.data===Fs){i=Me,m=!0,vr(!1);break}var I=v[w],S=n(I,w);b=Cu(Me,s,g,null,I,S,w,o,e),s.items.set(S,b),g=b}h>0&&Ft(Hs())}if(!ve){var k=Ve;Np(v,s,i,o,e,(k.f&Nr)!==0,n)}a!==null&&(h===0?u?Pn(u):u=Xt(()=>a(i)):u!==null&&en(u,()=>{u=null})),m&&vr(!0),r()}),ve&&(i=Me)}function Np(t,e,r,n,o,a,i,s){var he,V,Z,z;var c=(o&_h)!==0,l=(o&(gt|Qn))!==0,u=t.length,d=e.items,f=e.first,v=f,h,m=null,y,g=[],b=[],w,I,S,k;if(c)for(k=0;k<u;k+=1)w=t[k],I=i(w,k),S=d.get(I),S!==void 0&&((he=S.a)==null||he.measure(),(y??(y=new Set)).add(S));for(k=0;k<u;k+=1){if(w=t[k],I=i(w,k),S=d.get(I),S===void 0){var M=v?v.e.nodes_start:r;m=Cu(M,e,m,m===null?e.first:m.next,w,I,k,n,o),d.set(I,m),g=[],b=[],v=m.next;continue}if(l&&Pp(S,w,k,o),S.e.f&Nr&&(Pn(S.e),c&&((V=S.a)==null||V.unfix(),(y??(y=new Set)).delete(S))),S!==v){if(h!==void 0&&h.has(S)){if(g.length<b.length){var L=b[0],G;m=L.prev;var W=g[0],$=g[g.length-1];for(G=0;G<g.length;G+=1)Eu(g[G],L,r);for(G=0;G<b.length;G+=1)h.delete(b[G]);mn(e,W.prev,$.next),mn(e,m,W),mn(e,$,L),v=L,m=$,k-=1,g=[],b=[]}else h.delete(S),Eu(S,v,r),mn(e,S.prev,S.next),mn(e,S,m===null?e.first:m.next),mn(e,m,S),m=S;continue}for(g=[],b=[];v!==null&&v.k!==I;)(a||!(v.e.f&Nr))&&(h??(h=new Set)).add(v),b.push(v),v=v.next;if(v===null)continue;S=v}g.push(S),m=S,v=S.next}if(v!==null||h!==void 0){for(var re=h===void 0?[]:qs(h);v!==null;)(a||!(v.e.f&Nr))&&re.push(v),v=v.next;var de=re.length;if(de>0){var C=o&Nc&&u===0?r:null;if(c){for(k=0;k<de;k+=1)(Z=re[k].a)==null||Z.measure();for(k=0;k<de;k+=1)(z=re[k].a)==null||z.fix()}Op(e,re,C,d)}}c&&tn(()=>{var K;if(y!==void 0)for(S of y)(K=S.a)==null||K.apply()}),Ne.first=e.first&&e.first.e,Ne.last=m&&m.e}function Pp(t,e,r,n){n&gt&&ao(t.v,e),n&Qn?ao(t.i,r):t.i=r}function Cu(t,e,r,n,o,a,i,s,c,l){var u=(c&gt)!==0,d=(c&kh)===0,f=u?d?On(o):mt(o):o,v=c&Qn?mt(i):i,h={i:v,v:f,k:a,a:null,e:null,prev:r,next:n};try{return h.e=Xt(()=>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 Eu(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=br(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 ho(t,e,r,n,o){var a=t,i="",s;Xr(()=>{if(i===(i=e()??"")){ve&&Lr();return}s!==void 0&&(yr(s),s=void 0),i!==""&&(s=Xt(()=>{if(ve){Me.data;for(var c=Lr(),l=c;c!==null&&(c.nodeType!==8||c.data!=="");)l=c,c=br(c);if(c===null)throw di(),Jn;cr(Me,l),a=Ft(c);return}var u=i+"",d=ll(u);cr(ir(d),d.lastChild),a.before(d)}))})}function zr(t,e,r,n,o){var s;ve&&Lr();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 Je(t,e,...r){var n=t,o=qe,a;Xr(()=>{o!==(o=e())&&(a&&(yr(a),a=null),a=Xt(()=>o(n,...r)))},no),ve&&(n=Me)}function Bt(t,e,r){ve&&Lr();var n=t,o,a;Xr(()=>{o!==(o=e())&&(a&&(en(a),a=null),o&&(a=Xt(()=>r(n,o))))},no),ve&&(n=Me)}function wi(t,e){tn(()=>{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 _i(t,e,r){Xo(()=>{var n=Yt(()=>e(t,r==null?void 0:r())||{});if(r&&(n!=null&&n.update)){var o=!1,a={};Jr(()=>{var i=r();Ze(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;Ce(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var o=t.checked;Ce(t,"checked",null),t.checked=o}}};t.__on_r=r,up(r),wu()}}function Lp(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ce(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"&&Ru(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function qt(t,e,r,n,o=!1,a=!1,i=!1){var s=e||{},c=t.tagName==="OPTION";for(var l in e)l in r||(r[l]=null);n!==void 0&&(r.class=r.class?r.class+" "+n:n);var u=Ru(t),d=t.__attributes??(t.__attributes={});for(const g in r){let b=r[g];if(c&&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={},I="$$"+g;let S=g.slice(2);var h=Lh(S);if(Nh(S)&&(S=S.slice(0,-7),w.capture=!0),!h&&f){if(b!=null)continue;t.removeEventListener(S,s[I],w),s[I]=null}if(b!=null)if(h)t[`__${S}`]=b,Mn([S]);else{let k=function(M){s[g].call(this,M)};s[I]=sl(S,t,k,w)}else h&&(t[`__${S}`]=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"&&c)Lp(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 I=w.defaultValue;w.removeAttribute(m),w.defaultValue=I}else{let I=w.defaultChecked;w.removeAttribute(m),w.defaultChecked=I}}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")||Ce(t,m,b))}g==="style"&&"__styles"in t&&(t.__styles={})}}}return s}var Au=new Map;function Ru(t){var e=Au.get(t.nodeName);if(e)return e;Au.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=Mc(n);for(var a in r)r[a].set&&e.push(a);n=$s(n)}return e}function kr(t,e){var r=t.__className,n=Mp(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 Mp(t){return t??""}function Fr(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 Br(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 Dp=()=>performance.now(),rn={tick:t=>requestAnimationFrame(t),now:()=>Dp(),tasks:new Set};function Iu(){const t=rn.now();rn.tasks.forEach(e=>{e.c(t)||(rn.tasks.delete(e),e.f())}),rn.tasks.size!==0&&rn.tick(Iu)}function zp(t){let e;return rn.tasks.size===0&&rn.tick(Iu),{promise:new Promise(r=>{rn.tasks.add(e={c:t,f:r})}),abort(){rn.tasks.delete(e)}}}function ki(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 Ou(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 Bp=t=>t;function xr(t,e,r,n){var o=(t&Eh)!==0,a=(t&Ah)!==0,i=o&&a,s=(t&Rh)!==0,c=i?"both":o?"in":"out",l,u=e.inert,d,f;function v(){var b=Ve,w=Ne;sr(null),Kt(null);try{return l??(l=r()(e,(n==null?void 0:n())??{},{direction:c}))}finally{sr(b),Kt(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(),ki(e,"introstart"),d=pl(e,v(),f,1,()=>{ki(e,"introend"),d==null||d.abort(),d=l=void 0})},out(b){if(!a){b==null||b(),l=void 0;return}e.inert=!0,ki(e,"outrostart"),f=pl(e,v(),d,0,()=>{ki(e,"outroend"),b==null||b()})},stop:()=>{d==null||d.abort(),f==null||f.abort()}},m=Ne;if((m.transitions??(m.transitions=[])).push(h),o&&cl){var y=s;if(!y){for(var g=m.parent;g&&g.f&no;)for(;(g=g.parent)&&!(g.f&li););y=!g||(g.f&zc)!==0}y&&Xo(()=>{Yt(()=>h.in())})}}function pl(t,e,r,n,o){var a=n===1;if(Xn(e)){var i,s=!1;return tn(()=>{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:qe,deactivate:qe,reset:qe,t:()=>n};const{delay:c=0,css:l,tick:u,easing:d=Bp}=e;var f=[];if(a&&r===void 0&&(u&&u(0,1),l)){var v=Ou(l(0,1));f.push(v,v)}var h=()=>1-n,m=t.animate(f,{duration:c});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(l)for(var I=Math.ceil(b/16.666666666666668),S=0;S<=I;S+=1){var k=y+g*d(S/I),M=l(k,1-k);w.push(Ou(M))}h=()=>{var L=m.currentTime;return y+g*d(L/b)},u&&zp(()=>{if(m.playState!=="running")return!1;var L=h();return u(L,1-L),!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=qe)},deactivate:()=>{o=qe},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function gl(t,e,r=e){var n=lo();ku(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||Yt(e)==null&&t.value)&&r(vl(t)?bl(t.value):t.value),Jr(()=>{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 Nu(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),ku(r,"change",()=>{var l=r.__value;a&&(l=Pu(i,l,r.checked)),o(l)},()=>o(a?[]:null)),Jr(()=>{var l=n();if(ve&&r.defaultChecked!==r.checked){s=!0;return}a?(l=l||[],r.checked=l.includes(r.__value)):r.checked=np(r.__value,l)}),Ks(()=>{var l=i.indexOf(r);l!==-1&&i.splice(l,1)}),ml.has(i)||(ml.add(i),tn(()=>{i.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),ml.delete(i)})),tn(()=>{if(s){var l;if(a)l=Pu(i,l,r.checked);else{var u=i.find(d=>d.checked);l=u==null?void 0:u.__value}o(l)}})}function Pu(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 Lu(t,e){return t===e||(t==null?void 0:t[Pr])===e}function qr(t={},e,r,n){return Xo(()=>{var o,a;return Jr(()=>{o=a,a=[],Yt(()=>{t!==r(...a)&&(e(t,...a),o&&Lu(r(...o),t)&&e(null,...o))})}),()=>{tn(()=>{a&&Lu(r(...a),t)&&e(null,...a)})}}),t}function po(t=!1){const e=ze,r=e.l.u;if(!r)return;let n=()=>Ze(e.s);if(t){let o=0,a={};const i=Se(()=>{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&&Ys(()=>{Mu(e,n),Yo(r.b)}),wt(()=>{const o=Yt(()=>r.m.map(jh));return()=>{for(const a of o)typeof a=="function"&&a()}}),r.a.length&&wt(()=>{Mu(e,n),Yo(r.a)})}function Mu(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}function xi(t){ze===null&&tl(),oo&&ze.l!==null?$p(ze).m.push(t):wt(()=>{const e=Yt(t);if(typeof e=="function")return e})}function qp(t){ze===null&&tl(),xi(()=>()=>Yt(t))}function $p(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),qe;const n=Yt(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}let Si=!1;function vt(t,e,r){const n=r[e]??(r[e]={store:null,source:On(void 0),unsubscribe:qe});if(n.store!==t)if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=qe;else{var o=!0;n.unsubscribe=yl(t,a=>{o?n.source.v=a:R(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=qe),t}function $t(){const t={};return Ks(()=>{for(var e in t)t[e].unsubscribe()}),t}function Zp(t){var e=Si;try{return Si=!1,[t(),Si]}finally{Si=e}}const Up={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 Sr(t,e,r){return new Proxy({props:t,exclude:e},Up)}const Hp={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]=x({get[e](){return t.props[e]}},e,Pc)),t.special[e](r),vu(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),vu(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:mt(0)},Hp)}const Vp={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(Xn(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];Xn(o)&&(o=o());const a=Yr(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(Xn(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=Yr(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Pr||e===Zs)return!1;for(let r of t.props)if(Xn(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props){Xn(r)&&(r=r());for(const n in r)e.includes(n)||e.push(n)}return e}};function vn(...t){return new Proxy({props:t},Vp)}function Du(t){for(var e=Ne,r=Ne;e!==null&&!(e.f&(mr|eo));)e=e.parent;try{return Kt(e),t()}finally{Kt(r)}}function x(t,e,r,n){var M;var o=(r&xh)!==0,a=!oo||(r&Sh)!==0,i=(r&Th)!==0,s=(r&Ch)!==0,c=!1,l;i?[l,c]=Zp(()=>t[e]):l=t[e];var u=Pr in t||Zs in t,d=((M=Yr(t,e))==null?void 0:M.set)??(u&&i&&e in t?L=>t[e]=L:void 0),f=n,v=!0,h=!1,m=()=>(h=!0,v&&(v=!1,s?f=Yt(n):f=n),f);l===void 0&&n!==void 0&&(d&&a&&Qh(),l=m(),d&&d(l));var y;if(a)y=()=>{var L=t[e];return L===void 0?m():(v=!0,h=!1,L)};else{var g=Du(()=>(o?Se:Nt)(()=>t[e]));g.f|=Zh,y=()=>{var L=p(g);return L!==void 0&&(f=void 0),L===void 0?f:L}}if(!(r&Pc))return y;if(d){var b=t.$$legacy;return function(L,G){return arguments.length>0?((!a||!G||b||c)&&d(G?y():L),L):y()}}var w=!1,I=!1,S=On(l),k=Du(()=>Se(()=>{var L=y(),G=p(S);return w?(w=!1,I=!0,G):(I=!1,S.v=L)}));return o||(k.equals=Us),function(L,G){if(arguments.length>0){const W=G?p(k):a&&i?xe(L):L;return k.equals(W)||(w=!0,R(S,W),h&&f!==void 0&&(f=W),Yt(()=>p(k))),L}return p(k)}}function Gp(t){return new Wp(t)}class Wp{constructor(e){Y(this,ln);Y(this,pr);var a;var r=new Map,n=(i,s)=>{var c=On(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===Zs?!0:(p(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,c){return R(r.get(s)??n(s,c),c),Reflect.set(i,s,c)}});Et(this,pr,(e.hydrate?Ep:Su)(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)&&_(),Et(this,ln,o.$$events);for(const i of Object.keys(E(this,pr)))i==="$set"||i==="$destroy"||i==="$on"||si(this,i,{get(){return E(this,pr)[i]},set(s){E(this,pr)[i]=s},enumerable:!0});E(this,pr).$set=i=>{Object.assign(o,i)},E(this,pr).$destroy=()=>{Ap(E(this,pr))}}$set(e){E(this,pr).$set(e)}$on(e,r){E(this,ln)[e]=E(this,ln)[e]||[];const n=(...o)=>r.call(this,...o);return E(this,ln)[e].push(n),()=>{E(this,ln)[e]=E(this,ln)[e].filter(o=>o!==n)}}$destroy(){E(this,pr).$destroy()}}ln=new WeakMap,pr=new WeakMap;let zu;typeof HTMLElement=="function"&&(zu=class extends HTMLElement{constructor(e,r,n){super();ae(this,"$$ctor");ae(this,"$$s");ae(this,"$$c");ae(this,"$$cn",!1);ae(this,"$$d",{});ae(this,"$$r",!1);ae(this,"$$p_d",{});ae(this,"$$l",{});ae(this,"$$l_u",new Map);ae(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=Kp(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]=Ti(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=Gp({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Qc(()=>{Jr(()=>{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=Ti(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]=Ti(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 Ti(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 Kp(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 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(c){var d;c=Ti(s,c,e),this.$$d[s]=c;var l=this.$$c;if(l){var u=(d=Yr(l,s))==null?void 0:d.get;u?l[s]=c:l.$set({[s]:c})}}})}),n.forEach(s=>{si(i.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),t.element=i,i}const Yp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`@import '../utils/media.css';
1
+ var LiipGPTChat=function(tt){"use strict";var Ew=Object.defineProperty;var Cw=Object.getPrototypeOf;var Aw=Reflect.get;var mh=tt=>{throw TypeError(tt)};var Rw=(tt,lt,mt)=>lt in tt?Ew(tt,lt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):tt[lt]=mt;var ae=(tt,lt,mt)=>Rw(tt,typeof lt!="symbol"?lt+"":lt,mt),Oc=(tt,lt,mt)=>lt.has(tt)||mh("Cannot "+mt);var E=(tt,lt,mt)=>(Oc(tt,lt,"read from private field"),mt?mt.call(tt):lt.get(tt)),K=(tt,lt,mt)=>lt.has(tt)?mh("Cannot add the same private member more than once"):lt instanceof WeakSet?lt.add(tt):lt.set(tt,mt),At=(tt,lt,mt,Jn)=>(Oc(tt,lt,"write to private field"),Jn?Jn.call(tt,mt):lt.set(tt,mt),mt),Qn=(tt,lt,mt)=>(Oc(tt,lt,"access private method"),mt);var vh=(tt,lt,mt)=>Aw(Cw(tt),mt,lt);var ln,pr,Wr,Kr,cn,Lo,zs,Mo,Fa,Ba,qa,$a,un,ja,Za,Ua,Ha,Va,Ga,Wa,Ka,Ya,cs,us,ds,fs,hs,ps,gs,ms,vs,bs,ys,Do,Gn,En,zo,Fo,Cn,Qa,Ja,dn,ws,Bo,bh,_s,qo,ks,xs,Ss,Ts,Xa,yh,Es,Cs,As,Rs,$o,ei,Is,wh,Os,ti,ri,Ns,jo,Zo,Uo,Ho,Ps,Ls,Ms,Wn,Ds;const lt="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(lt);const mt=1,Jn=2,Nc=4,_h=8,kh=16,xh=1,Sh=2,Pc=4,Th=8,Eh=16,Ch=1,Ah=2,Rh=4,Ih=1,Oh=2,Fs="[",Bs="[!",qs="]",Xn={},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 zh=["touchstart","touchmove"];function Fh(t){return zh.includes(t)}const Lc=!1;var $s=Array.isArray,js=Array.from,si=Object.keys,li=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Mc=Object.getOwnPropertyDescriptors,Bh=Object.prototype,qh=Array.prototype,Zs=Object.getPrototypeOf;function eo(t){return typeof t=="function"}const He=()=>{};function $h(t){return typeof(t==null?void 0:t.then)=="function"}function jh(t){return t()}function Yo(t){for(var e=0;e<t.length;e++)t[e]()}const gr=2,Dc=4,Qo=8,ci=16,mr=32,to=64,Us=128,In=256,ui=512,zt=1024,hn=2048,ro=4096,Or=8192,no=16384,zc=32768,oo=65536,Zh=1<<17,Fc=1<<19,Bc=1<<20,Nr=Symbol("$state"),Hs=Symbol("legacy props"),Uh=Symbol("");function qc(t){return t===this.v}function di(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 Vs(t){return!di(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 ao=!1;function rp(){ao=!0}function vt(t,e){var r={f:0,v:t,reactions:null,equals:qc,version:0};return r}function we(t){return $c(vt(t))}function On(t,e=!1){var n;const r=vt(t);return e||(r.equals=Vs),ao&&Be!==null&&Be.l!==null&&((n=Be.l).s??(n.s=[])).push(r),r}function Ke(t,e=!1){return $c(On(t,e))}function $c(t){return Ye!==null&&Ye.f&gr&&(Lr===null?hp([t]):Lr.push(t)),t}function A(t,e){return Ye!==null&&co()&&Ye.f&(gr|ci)&&(Lr===null||!Lr.includes(t))&&tp(),io(t,e)}function io(t,e){return t.equals(e)||(t.v=e,t.version=du(),jc(t,hn),co()&&Le!==null&&Le.f&zt&&!(Le.f&mr)&&(Pt!==null&&Pt.includes(t)?(wr(Le,hn),bi(Le)):pn===null?pp([t]):pn.push(t))),e}function jc(t,e){var r=t.reactions;if(r!==null)for(var n=co(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;s&hn||!n&&i===Le||(wr(i,e),s&(zt|In)&&(s&gr?jc(i,ro):bi(i)))}}function fi(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let ve=!1;function vr(t){ve=t}let De;function Ft(t){if(t===null)throw fi(),Xn;return De=t}function Pr(){return Ft(br(De))}function O(t){if(ve){if(br(De)!==null)throw fi(),Xn;De=t}}function Gs(){for(var t=0,e=De;;){if(e.nodeType===8){var r=e.data;if(r===qs){if(t===0)return e;t-=1}else(r===Fs||r===Bs)&&(t+=1)}var n=br(e);e.remove(),e=n}}function xe(t,e=null,r){if(typeof t!="object"||t===null||Nr in t)return t;const n=Zs(t);if(n!==Bh&&n!==qh)return t;var o=new Map,a=$s(t),i=vt(0);a&&o.set("length",vt(t.length));var s;return new Proxy(t,{defineProperty(c,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Jh();var d=o.get(l);return d===void 0?(d=vt(u.value),o.set(l,d)):A(d,xe(u.value,s)),!0},deleteProperty(c,l){var u=o.get(l);if(u===void 0)l in c&&o.set(l,vt(Ot));else{if(a&&typeof l=="string"){var d=o.get("length"),f=Number(l);Number.isInteger(f)&&f<d.v&&A(d,f)}A(u,Ot),Zc(i)}return!0},get(c,l,u){var h;if(l===Nr)return t;var d=o.get(l),f=l in c;if(d===void 0&&(!f||(h=Yr(c,l))!=null&&h.writable)&&(d=vt(xe(f?c[l]:Ot,s)),o.set(l,d)),d!==void 0){var v=p(d);return v===Ot?void 0:v}return Reflect.get(c,l,u)},getOwnPropertyDescriptor(c,l){var u=Reflect.getOwnPropertyDescriptor(c,l);if(u&&"value"in u){var d=o.get(l);d&&(u.value=p(d))}else if(u===void 0){var f=o.get(l),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(c,l){var v;if(l===Nr)return!0;var u=o.get(l),d=u!==void 0&&u.v!==Ot||Reflect.has(c,l);if(u!==void 0||Le!==null&&(!d||(v=Yr(c,l))!=null&&v.writable)){u===void 0&&(u=vt(d?xe(c[l],s):Ot),o.set(l,u));var f=p(u);if(f===Ot)return!1}return d},set(c,l,u,d){var w;var f=o.get(l),v=l in c;if(a&&l==="length")for(var h=u;h<f.v;h+=1){var m=o.get(h+"");m!==void 0?A(m,Ot):h in c&&(m=vt(Ot),o.set(h+"",m))}f===void 0?(!v||(w=Yr(c,l))!=null&&w.writable)&&(f=vt(void 0),A(f,xe(u,s)),o.set(l,f)):(v=f.v!==Ot,A(f,xe(u,s)));var y=Reflect.getOwnPropertyDescriptor(c,l);if(y!=null&&y.set&&y.set.call(d,u),!v){if(a&&typeof l=="string"){var g=o.get("length"),b=Number(l);Number.isInteger(b)&&b>=g.v&&A(g,b+1)}Zc(i)}return!0},ownKeys(c){p(i);var l=Reflect.ownKeys(c).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 c)&&l.push(u);return l},setPrototypeOf(){Xh()}})}function Zc(t,e=1){A(t,t.v+e)}function Uc(t){return t!==null&&typeof t=="object"&&Nr in t?t[Nr]:t}function np(t,e){return Object.is(Uc(t),Uc(e))}var Jo,Hc,Vc;function Ws(){if(Jo===void 0){Jo=window;var t=Element.prototype,e=Node.prototype;Hc=Yr(e,"firstChild").get,Vc=Yr(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 Qr(t=""){return document.createTextNode(t)}function ir(t){return Hc.call(t)}function br(t){return Vc.call(t)}function N(t,e){if(!ve)return ir(t);var r=ir(De);if(r===null)r=De.appendChild(Qr());else if(e&&r.nodeType!==3){var n=Qr();return r==null||r.before(n),Ft(n),n}return Ft(r),r}function U(t,e){if(!ve){var r=ir(t);return r instanceof Comment&&r.data===""?br(r):r}return De}function ne(t,e=1,r=!1){let n=ve?De:t;for(var o;e--;)o=n,n=br(n);if(!ve)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var i=Qr();return n===null?o==null||o.after(i):n.before(i),Ft(i),i}return Ft(n),n}function Ks(t){t.textContent=""}function Se(t){var e=gr|hn;Le===null?e|=In:Le.f|=Bc;var r=Ye!==null&&Ye.f&gr?Ye:null;const n={children:null,ctx:Be,deps:null,equals:qc,f:e,fn:t,reactions:null,v:null,version:0,parent:r??Le};return r!==null&&(r.children??(r.children=[])).push(n),n}function Nt(t){const e=Se(t);return e.equals=Vs,e}function Gc(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&gr?Ys(n):yr(n)}}}function op(t){for(var e=t.parent;e!==null;){if(!(e.f&gr))return e;e=e.parent}return null}function Wc(t){var e,r=Le;Kt(op(t));try{Gc(t),e=fu(t)}finally{Kt(r)}return e}function Kc(t){var e=Wc(t),r=(gn||t.f&In)&&t.deps!==null?ro:zt;wr(t,r),t.equals(e)||(t.v=e,t.version=du())}function Ys(t){Gc(t),ra(t,0),wr(t,no),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Yc(t){Le===null&&Ye===null&&Wh(),Ye!==null&&Ye.f&In&&Gh(),ol&&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&to)!==0,a=Le,i={ctx:Be,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=so;try{su(!0),na(i),i.f|=zc}catch(u){throw yr(i),u}finally{su(s)}}else e!==null&&bi(i);var c=r&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&Bc)===0;if(!c&&!o&&n&&(a!==null&&ap(i,a),Ye!==null&&Ye.f&gr)){var l=Ye;(l.children??(l.children=[])).push(i)}return i}function ip(){return Ye===null?!1:!gn}function Qs(t){const e=Nn(Qo,null,!1);return wr(e,zt),e.teardown=t,e}function _t(t){Yc();var e=Le!==null&&(Le.f&mr)!==0&&Be!==null&&!Be.m;if(e){var r=Be;(r.e??(r.e=[])).push({fn:t,effect:Le,reaction:Ye})}else{var n=Xo(t);return n}}function Js(t){return Yc(),Jr(t)}function Qc(t){const e=Nn(to,t,!0);return()=>{yr(e)}}function sp(t){const e=Nn(to,t,!0);return(r={})=>new Promise(n=>{r.outro?en(e,()=>{yr(e),n(void 0)}):(yr(e),n(void 0))})}function Xo(t){return Nn(Dc,t,!1)}function Ve(t,e){var r=Be,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=Jr(()=>{t(),!n.ran&&(n.ran=!0,A(r.l.r2,!0),Yt(e))})}function Xs(){var t=Be;Jr(()=>{if(p(t.l.r2)){for(var e of t.l.r1){var r=e.effect;r.f&zt&&wr(r,ro),uo(r)&&na(r),e.ran=!1}t.l.r2.v=!1}})}function Jr(t){return Nn(Qo,t,!0)}function ue(t){return Xr(t)}function Xr(t,e=0){return Nn(Qo|ci|e,t,!0)}function Xt(t,e=!0){return Nn(Qo|mr,t,!0,e)}function Jc(t){var e=t.teardown;if(e!==null){const r=ol,n=Ye;lu(!0),sr(null);try{e.call(null)}finally{lu(r),sr(n)}}}function Xc(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)Ys(e[r])}}function eu(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;yr(r,e),r=n}}function lp(t){for(var e=t.first;e!==null;){var r=e.next;e.f&mr||yr(e),e=r}}function yr(t,e=!0){var r=!1;if((e||t.f&Fc)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var a=n===o?null:br(n);n.remove(),n=a}r=!0}eu(t,e&&!r),Xc(t),ra(t,0),wr(t,no);var i=t.transitions;if(i!==null)for(const c of i)c.stop();Jc(t);var s=t.parent;s!==null&&s.first!==null&&tu(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function tu(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 en(t,e){var r=[];el(t,r,!0),ru(r,()=>{yr(t),e&&e()})}function ru(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function el(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&oo)!==0||(n.f&mr)!==0;el(n,e,a?r:!1),n=o}}}function Pn(t){nu(t,!0)}function nu(t,e){if(t.f&Or){uo(t)&&na(t),t.f^=Or;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&oo)!==0||(r.f&mr)!==0;nu(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 hi=!1,pi=!1,tl=[],rl=[];function ou(){hi=!1;const t=tl.slice();tl=[],Yo(t)}function au(){pi=!1;const t=rl.slice();rl=[],Yo(t)}function tn(t){hi||(hi=!0,queueMicrotask(ou)),tl.push(t)}function up(t){pi||(pi=!0,cp(au)),rl.push(t)}function dp(){hi&&ou(),pi&&au()}function nl(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const iu=0,fp=1;let gi=!1,mi=iu,ea=!1,ta=null,so=!1,ol=!1;function su(t){so=t}function lu(t){ol=t}let Ln=[],lo=0,Iw=[],Ye=null;function sr(t){Ye=t}let Le=null;function Kt(t){Le=t}let Lr=null;function hp(t){Lr=t}let Pt=null,er=0,pn=null;function pp(t){pn=t}let cu=1,gn=!1,Be=null;function uu(t){Be=t}function du(){return++cu}function co(){return!ao||Be!==null&&Be.l===null}function uo(t){var i,s;var e=t.f;if(e&hn)return!0;if(e&ro){var r=t.deps,n=(e&In)!==0;if(r!==null){var o;if(e&ui){for(o=0;o<r.length;o++)((i=r[o]).reactions??(i.reactions=[])).push(t);t.f^=ui}for(o=0;o<r.length;o++){var a=r[o];if(uo(a)&&Kc(a),n&&Le!==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||Le!==null&&!gn)&&wr(t,zt)}return!1}function gp(t,e){for(var r=e;r!==null;){if(r.f&Us)try{r.fn(t);return}catch{r.f^=Us}r=r.parent}throw gi=!1,t}function mp(t){return(t.f&no)===0&&(t.parent===null||(t.parent.f&Us)===0)}function vi(t,e,r,n){if(gi){if(r===null&&(gi=!1),mp(e))throw t;return}r!==null&&(gi=!0);{gp(t,e);return}}function fu(t){var f;var e=Pt,r=er,n=pn,o=Ye,a=gn,i=Lr,s=Be,c=t.f;Pt=null,er=0,pn=null,Ye=c&(mr|to)?null:t,gn=!so&&(c&In)!==0,Lr=null,Be=t.ctx;try{var l=(0,t.fn)(),u=t.deps;if(Pt!==null){var d;if(ra(t,er),u!==null&&er>0)for(u.length=er+Pt.length,d=0;d<Pt.length;d++)u[er+d]=Pt[d];else t.deps=u=Pt;if(!gn)for(d=er;d<u.length;d++)((f=u[d]).reactions??(f.reactions=[])).push(t)}else u!==null&&er<u.length&&(ra(t,er),u.length=er);return l}finally{Pt=e,er=r,pn=n,Ye=o,gn=a,Lr=i,Be=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&gr&&(Pt===null||!Pt.includes(e))&&(wr(e,ro),e.f&(In|ui)||(e.f^=ui),ra(e,0))}function ra(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)vp(t,r[n])}function na(t){var e=t.f;if(!(e&no)){wr(t,zt);var r=Le,n=Be;Le=t;try{e&ci?lp(t):eu(t),Xc(t),Jc(t);var o=fu(t);t.teardown=typeof o=="function"?o:null,t.version=cu}catch(a){vi(a,t,r,n||t.ctx)}finally{Le=r}}}function hu(){if(lo>1e3){lo=0;try{Kh()}catch(t){if(ta!==null)vi(t,ta,null);else throw t}}lo++}function pu(t){var e=t.length;if(e!==0){hu();var r=so;so=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&zt||(o.f^=zt);var a=[];gu(o,a),bp(a)}}finally{so=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&(no|Or)))try{uo(n)&&(na(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?tu(n):n.fn=null))}catch(o){vi(o,n,null,n.ctx)}}}function yp(){if(ea=!1,lo>1001)return;const t=Ln;Ln=[],pu(t),ea||(lo=0,ta=null)}function bi(t){mi===iu&&(ea||(ea=!0,queueMicrotask(yp))),ta=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(to|mr)){if(!(r&zt))return;e.f^=zt}}Ln.push(e)}function gu(t,e){var r=t.first,n=[];e:for(;r!==null;){var o=r.f,a=(o&mr)!==0,i=a&&(o&zt)!==0,s=r.next;if(!i&&!(o&Or))if(o&Qo){if(a)r.f^=zt;else try{uo(r)&&na(r)}catch(d){vi(d,r,null,r.ctx)}var c=r.first;if(c!==null){r=c;continue}}else o&Dc&&n.push(r);if(s===null){let d=r.parent;for(;d!==null;){if(t===d)break e;var l=d.next;if(l!==null){r=l;continue e}d=d.parent}}r=s}for(var u=0;u<n.length;u++)c=n[u],e.push(c),gu(c,e)}function _(t){var e=mi,r=Ln;try{hu();const o=[];mi=fp,Ln=o,ea=!1,pu(r);var n=t==null?void 0:t();return dp(),(Ln.length>0||o.length>0)&&_(),lo=0,ta=null,n}finally{mi=e,Ln=r}}async function al(){await Promise.resolve(),_()}function p(t){var u;var e=t.f,r=(e&gr)!==0;if(r&&e&no){var n=Wc(t);return Ys(t),n}if(Ye!==null){Lr!==null&&Lr.includes(t)&&ep();var o=Ye.deps;Pt===null&&o!==null&&o[er]===t?er++:Pt===null?Pt=[t]:Pt.push(t),pn!==null&&Le!==null&&Le.f&zt&&!(Le.f&mr)&&pn.includes(t)&&(wr(Le,hn),bi(Le))}else if(r&&t.deps===null)for(var a=t,i=a.parent,s=a;i!==null;)if(i.f&gr){var c=i;s=c,i=c.parent}else{var l=i;(u=l.deriveds)!=null&&u.includes(s)||(l.deriveds??(l.deriveds=[])).push(s);break}return r&&(a=t,uo(a)&&Kc(a)),t.v}function Yt(t){const e=Ye;try{return Ye=null,t()}finally{Ye=e}}const wp=~(hn|ro|zt);function wr(t,e){t.f=t.f&wp|e}function mu(t){return il().get(t)}function _p(t,e){return il().set(t,e),e}function kp(t){return il().has(t)}function il(t){return Be===null&&nl(),Be.c??(Be.c=new Map(xp(Be)||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 vu(t,e=1){var r=p(t),n=e===1?r++:r--;return A(t,r),n}function Re(t,e=!1,r){Be={p:Be,c:null,e:null,m:!1,s:t,x:null,l:null},ao&&!e&&(Be.l={s:null,u:null,r1:[],r2:vt(!1)})}function Ie(t){const e=Be;if(e!==null){t!==void 0&&(e.x=t);const i=e.e;if(i!==null){var r=Le,n=Ye;e.e=null;try{for(var o=0;o<i.length;o++){var a=i[o];Kt(a.effect),sr(a.reaction),Xo(a.fn)}}finally{Kt(r),sr(n)}}Be=e.p,e.m=!0}return t||{}}function Ge(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Nr in t)sl(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Nr in r&&sl(r)}}}function sl(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{sl(t[n],e)}catch{}const r=Zs(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Mc(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,tn(()=>{document.activeElement===r&&t.focus()})}}function ll(t){ve&&ir(t)!==null&&Ks(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 wu(t){var e=Ye,r=Le;sr(null),Kt(null);try{return t()}finally{sr(e),Kt(r)}}function _u(t,e,r,n=r){t.addEventListener(e,()=>wu(r));const o=t.__on_r;o?t.__on_r=()=>{o(),n(!0)}:t.__on_r=()=>n(!0),yu()}const ku=new Set,cl=new Set;function ul(t,e,r,n){function o(a){if(n.capture||oa.call(e,a),!a.cancelBubble)return wu(()=>r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?tn(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function Lt(t,e,r,n={}){var o=ul(e,t,r,n);return()=>{t.removeEventListener(e,o,n)}}function dt(t,e,r,n,o){var a={capture:n,passive:o},i=ul(t,e,r,a);(e===document.body||e===window||e===document)&&Qs(()=>{e.removeEventListener(t,i,a)})}function Mn(t){for(var e=0;e<t.length;e++)ku.add(t[e]);for(var r of cl)r(t)}function oa(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 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){li(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=Ye,d=Le;sr(null),Kt(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($s(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,sr(u),Kt(d)}}}let lr;function Tp(){lr=void 0}function Ep(t){let e=null,r=ve;var n;if(ve){for(e=De,lr===void 0&&(lr=ir(document.head));lr!==null&&(lr.nodeType!==8||lr.data!==Fs);)lr=br(lr);lr===null?vr(!1):lr=Ft(br(lr))}ve||(n=document.head.appendChild(Qr()));try{Xr(()=>t(n),Fc)}finally{r&&(vr(!0),lr=De,Ft(e))}}function dl(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function cr(t,e){var r=Le;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function te(t,e){var r=(e&Ih)!==0,n=(e&Oh)!==0,o,a=!t.startsWith("<!>");return()=>{if(ve)return cr(De,null),De;o===void 0&&(o=dl(a?t:"<!>"+t),r||(o=ir(o)));var i=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=ir(i),c=i.lastChild;cr(s,c)}else cr(i,i);return i}}function yi(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,a;return()=>{if(ve)return cr(De,null),De;if(!a){var i=dl(o),s=ir(i);a=ir(s)}var c=a.cloneNode(!0);return cr(c,c),c}}function fo(t=""){if(!ve){var e=Qr(t+"");return cr(e,e),e}var r=De;return r.nodeType!==3&&(r.before(r=Qr()),Ft(r)),cr(r,r),r}function se(){if(ve)return cr(De,null),De;var t=document.createDocumentFragment(),e=document.createComment(""),r=Qr();return t.append(e,r),cr(e,r),t}function T(t,e){if(ve){Le.nodes_end=De,Pr();return}t!==null&&t.before(e)}let fl=!0;function qe(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 xu(t,e){return Su(t,e)}function Cp(t,e){Ws(),e.intro=e.intro??!1;const r=e.target,n=ve,o=De;try{for(var a=ir(r);a&&(a.nodeType!==8||a.data!==Fs);)a=br(a);if(!a)throw Xn;vr(!0),Ft(a),Pr();const i=Su(t,{...e,anchor:a});if(De===null||De.nodeType!==8||De.data!==qs)throw fi(),Xn;return vr(!1),i}catch(i){if(i===Xn)return e.recover===!1&&Yh(),Ws(),Ks(r),vr(!1),xu(t,e);throw i}finally{vr(n),Ft(o),Tp()}}const ho=new Map;function Su(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){Ws();var s=new Set,c=d=>{for(var f=0;f<d.length;f++){var v=d[f];if(!s.has(v)){s.add(v);var h=Fh(v);e.addEventListener(v,oa,{passive:h});var m=ho.get(v);m===void 0?(document.addEventListener(v,oa,{passive:h}),ho.set(v,1)):ho.set(v,m+1)}}};c(js(ku)),cl.add(c);var l=void 0,u=sp(()=>{var d=r??e.appendChild(Qr());return Xt(()=>{if(a){Re({});var f=Be;f.c=a}o&&(n.$$events=o),ve&&cr(d,null),fl=i,l=t(d,n)||{},fl=!0,ve&&(Le.nodes_end=De),a&&Ie()}),()=>{var h;for(var f of s){e.removeEventListener(f,oa);var v=ho.get(f);--v===0?(document.removeEventListener(f,oa),ho.delete(f)):ho.set(f,v)}cl.delete(c),d!==r&&((h=d.parentNode)==null||h.removeChild(d))}});return hl.set(l,u),l}let hl=new WeakMap;function Ap(t,e){const r=hl.get(t);return r?(hl.delete(t),r(e)):Promise.resolve()}const pl=0,wi=1,gl=2;function Rp(t,e,r,n,o){ve&&Pr();var a=t,i=co(),s=Be,c=Ot,l,u,d,f=(i?vt:On)(void 0),v=(i?vt:On)(void 0),h=!1;function m(g,b){h=!0,b&&(Kt(y),sr(y),uu(s));try{g===pl&&r&&(l?Pn(l):l=Xt(()=>r(a))),g===wi&&n&&(u?Pn(u):u=Xt(()=>n(a,f))),g===gl&&o&&(d?Pn(d):d=Xt(()=>o(a,v))),g!==pl&&l&&en(l,()=>l=null),g!==wi&&u&&en(u,()=>u=null),g!==gl&&d&&en(d,()=>d=null)}finally{b&&(uu(null),sr(null),Kt(null),_())}}var y=Xr(()=>{if(c!==(c=e())){if($h(c)){var g=c;h=!1,g.then(b=>{g===c&&(io(f,b),m(wi,!0))},b=>{if(g===c)throw io(v,b),m(gl,!0),v.v}),ve?r&&(l=Xt(()=>r(a))):tn(()=>{h||m(pl,!0)})}else io(f,c),m(wi,!1);return()=>c=Ot}});ve&&(a=De)}function de(t,e,r=!1){ve&&Pr();var n=t,o=null,a=null,i=Ot,s=r?oo:0,c=!1;const l=(d,f=!0)=>{c=!0,u(f,d)},u=(d,f)=>{if(i===(i=d))return;let v=!1;if(ve){const h=n.data===Bs;!!i===h&&(n=Gs(),Ft(n),vr(!1),v=!0)}i?(o?Pn(o):f&&(o=Xt(()=>f(n))),a&&en(a,()=>{a=null})):(a?Pn(a):f&&(a=Xt(()=>f(n))),o&&en(o,()=>{o=null})),v&&vr(!0)};Xr(()=>{c=!1,e(l),c||u(null,null)},s),ve&&(n=De)}function Ip(t,e,r){ve&&Pr();var n=t,o=Ot,a,i=co()?Hh:di;Xr(()=>{i(o,o=e())&&(a&&en(a),a=Xt(()=>r(n)))}),ve&&(n=De)}function Mr(t,e){return e}function Op(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)el(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var c=r.parentNode;Ks(c),c.append(r),n.clear(),mn(t,e[0].prev,e[a-1].next)}ru(o,()=>{for(var l=0;l<a;l++){var u=e[l];s||(n.delete(u.k),mn(t,u.prev,u.next)),yr(u.e,!s)}})}function _r(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null},c=(e&Nc)!==0;if(c){var l=t;i=ve?Ft(ir(l)):l.appendChild(Qr())}ve&&Pr();var u=null,d=!1;Xr(()=>{var f=r(),v=$s(f)?f:f==null?[]:js(f),h=v.length;if(d&&h===0)return;d=h===0;let m=!1;if(ve){var y=i.data===Bs;y!==(h===0)&&(i=Gs(),Ft(i),vr(!1),m=!0)}if(ve){for(var g=null,b,w=0;w<h;w++){if(De.nodeType===8&&De.data===qs){i=De,m=!0,vr(!1);break}var I=v[w],S=n(I,w);b=Tu(De,s,g,null,I,S,w,o,e),s.items.set(S,b),g=b}h>0&&Ft(Gs())}if(!ve){var k=Ye;Np(v,s,i,o,e,(k.f&Or)!==0,n)}a!==null&&(h===0?u?Pn(u):u=Xt(()=>a(i)):u!==null&&en(u,()=>{u=null})),m&&vr(!0),r()}),ve&&(i=De)}function Np(t,e,r,n,o,a,i,s){var Ee,ie,Z,D;var c=(o&_h)!==0,l=(o&(mt|Jn))!==0,u=t.length,d=e.items,f=e.first,v=f,h,m=null,y,g=[],b=[],w,I,S,k;if(c)for(k=0;k<u;k+=1)w=t[k],I=i(w,k),S=d.get(I),S!==void 0&&((Ee=S.a)==null||Ee.measure(),(y??(y=new Set)).add(S));for(k=0;k<u;k+=1){if(w=t[k],I=i(w,k),S=d.get(I),S===void 0){var z=v?v.e.nodes_start:r;m=Tu(z,e,m,m===null?e.first:m.next,w,I,k,n,o),d.set(I,m),g=[],b=[],v=m.next;continue}if(l&&Pp(S,w,k,o),S.e.f&Or&&(Pn(S.e),c&&((ie=S.a)==null||ie.unfix(),(y??(y=new Set)).delete(S))),S!==v){if(h!==void 0&&h.has(S)){if(g.length<b.length){var L=b[0],V;m=L.prev;var G=g[0],$=g[g.length-1];for(V=0;V<g.length;V+=1)Eu(g[V],L,r);for(V=0;V<b.length;V+=1)h.delete(b[V]);mn(e,G.prev,$.next),mn(e,m,G),mn(e,$,L),v=L,m=$,k-=1,g=[],b=[]}else h.delete(S),Eu(S,v,r),mn(e,S.prev,S.next),mn(e,S,m===null?e.first:m.next),mn(e,m,S),m=S;continue}for(g=[],b=[];v!==null&&v.k!==I;)(a||!(v.e.f&Or))&&(h??(h=new Set)).add(v),b.push(v),v=v.next;if(v===null)continue;S=v}g.push(S),m=S,v=S.next}if(v!==null||h!==void 0){for(var ee=h===void 0?[]:js(h);v!==null;)(a||!(v.e.f&Or))&&ee.push(v),v=v.next;var fe=ee.length;if(fe>0){var C=o&Nc&&u===0?r:null;if(c){for(k=0;k<fe;k+=1)(Z=ee[k].a)==null||Z.measure();for(k=0;k<fe;k+=1)(D=ee[k].a)==null||D.fix()}Op(e,ee,C,d)}}c&&tn(()=>{var Y;if(y!==void 0)for(S of y)(Y=S.a)==null||Y.apply()}),Le.first=e.first&&e.first.e,Le.last=m&&m.e}function Pp(t,e,r,n){n&mt&&io(t.v,e),n&Jn?io(t.i,r):t.i=r}function Tu(t,e,r,n,o,a,i,s,c,l){var u=(c&mt)!==0,d=(c&kh)===0,f=u?d?On(o):vt(o):o,v=c&Jn?vt(i):i,h={i:v,v:f,k:a,a:null,e:null,prev:r,next:n};try{return h.e=Xt(()=>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 Eu(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=br(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 po(t,e,r,n,o){var a=t,i="",s;Xr(()=>{if(i===(i=e()??"")){ve&&Pr();return}s!==void 0&&(yr(s),s=void 0),i!==""&&(s=Xt(()=>{if(ve){De.data;for(var c=Pr(),l=c;c!==null&&(c.nodeType!==8||c.data!=="");)l=c,c=br(c);if(c===null)throw fi(),Xn;cr(De,l),a=Ft(c);return}var u=i+"",d=dl(u);cr(ir(d),d.lastChild),a.before(d)}))})}function Dr(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 nt(t,e,...r){var n=t,o=He,a;Xr(()=>{o!==(o=e())&&(a&&(yr(a),a=null),a=Xt(()=>o(n,...r)))},oo),ve&&(n=De)}function Bt(t,e,r){ve&&Pr();var n=t,o,a;Xr(()=>{o!==(o=e())&&(a&&(en(a),a=null),o&&(a=Xt(()=>r(n,o))))},oo),ve&&(n=De)}function _i(t,e){tn(()=>{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 ki(t,e,r){Xo(()=>{var n=Yt(()=>e(t,r==null?void 0:r())||{});if(r&&(n!=null&&n.update)){var o=!1,a={};Jr(()=>{var i=r();Ge(i),o&&di(a,i)&&(a=i,n.update(i))}),o=!0}if(n!=null&&n.destroy)return()=>n.destroy()})}function xi(t){if(ve){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Te(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var o=t.checked;Te(t,"checked",null),t.checked=o}}};t.__on_r=r,up(r),yu()}}function Lp(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Te(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"&&Au(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function qt(t,e,r,n,o=!1,a=!1,i=!1){var s=e||{},c=t.tagName==="OPTION";for(var l in e)l in r||(r[l]=null);n!==void 0&&(r.class=r.class?r.class+" "+n:n);var u=Au(t),d=t.__attributes??(t.__attributes={});for(const g in r){let b=r[g];if(c&&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={},I="$$"+g;let S=g.slice(2);var h=Lh(S);if(Nh(S)&&(S=S.slice(0,-7),w.capture=!0),!h&&f){if(b!=null)continue;t.removeEventListener(S,s[I],w),s[I]=null}if(b!=null)if(h)t[`__${S}`]=b,Mn([S]);else{let k=function(z){s[g].call(this,z)};s[I]=ul(S,t,k,w)}else h&&(t[`__${S}`]=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"&&c)Lp(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 I=w.defaultValue;w.removeAttribute(m),w.defaultValue=I}else{let I=w.defaultChecked;w.removeAttribute(m),w.defaultChecked=I}}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")||Te(t,m,b))}g==="style"&&"__styles"in t&&(t.__styles={})}}}return s}var Cu=new Map;function Au(t){var e=Cu.get(t.nodeName);if(e)return e;Cu.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=Mc(n);for(var a in r)r[a].set&&e.push(a);n=Zs(n)}return e}function kr(t,e){var r=t.__className,n=Mp(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 Mp(t){return t??""}function zr(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 Dp=()=>performance.now(),rn={tick:t=>requestAnimationFrame(t),now:()=>Dp(),tasks:new Set};function Ru(){const t=rn.now();rn.tasks.forEach(e=>{e.c(t)||(rn.tasks.delete(e),e.f())}),rn.tasks.size!==0&&rn.tick(Ru)}function zp(t){let e;return rn.tasks.size===0&&rn.tick(Ru),{promise:new Promise(r=>{rn.tasks.add(e={c:t,f:r})}),abort(){rn.tasks.delete(e)}}}function Si(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 Iu(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 Bp=t=>t;function Br(t,e,r,n){var o=(t&Ch)!==0,a=(t&Ah)!==0,i=o&&a,s=(t&Rh)!==0,c=i?"both":o?"in":"out",l,u=e.inert,d,f;function v(){var b=Ye,w=Le;sr(null),Kt(null);try{return l??(l=r()(e,(n==null?void 0:n())??{},{direction:c}))}finally{sr(b),Kt(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(),Si(e,"introstart"),d=ml(e,v(),f,1,()=>{Si(e,"introend"),d==null||d.abort(),d=l=void 0})},out(b){if(!a){b==null||b(),l=void 0;return}e.inert=!0,Si(e,"outrostart"),f=ml(e,v(),d,0,()=>{Si(e,"outroend"),b==null||b()})},stop:()=>{d==null||d.abort(),f==null||f.abort()}},m=Le;if((m.transitions??(m.transitions=[])).push(h),o&&fl){var y=s;if(!y){for(var g=m.parent;g&&g.f&oo;)for(;(g=g.parent)&&!(g.f&ci););y=!g||(g.f&zc)!==0}y&&Xo(()=>{Yt(()=>h.in())})}}function ml(t,e,r,n,o){var a=n===1;if(eo(e)){var i,s=!1;return tn(()=>{if(!s){var y=e({direction:a?"in":"out"});i=ml(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:He,deactivate:He,reset:He,t:()=>n};const{delay:c=0,css:l,tick:u,easing:d=Bp}=e;var f=[];if(a&&r===void 0&&(u&&u(0,1),l)){var v=Iu(l(0,1));f.push(v,v)}var h=()=>1-n,m=t.animate(f,{duration:c});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(l)for(var I=Math.ceil(b/16.666666666666668),S=0;S<=I;S+=1){var k=y+g*d(S/I),z=l(k,1-k);w.push(Iu(z))}h=()=>{var L=m.currentTime;return y+g*d(L/b)},u&&zp(()=>{if(m.playState!=="running")return!1;var L=h();return u(L,1-L),!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=He)},deactivate:()=>{o=He},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function aa(t,e,r=e){var n=co();_u(t,"input",o=>{var a=o?t.defaultValue:t.value;if(a=bl(t)?yl(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||Yt(e)==null&&t.value)&&r(bl(t)?yl(t.value):t.value),Jr(()=>{var o=e();bl(t)&&o===yl(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}const vl=new Set;function Ou(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),_u(r,"change",()=>{var l=r.__value;a&&(l=Nu(i,l,r.checked)),o(l)},()=>o(a?[]:null)),Jr(()=>{var l=n();if(ve&&r.defaultChecked!==r.checked){s=!0;return}a?(l=l||[],r.checked=l.includes(r.__value)):r.checked=np(r.__value,l)}),Qs(()=>{var l=i.indexOf(r);l!==-1&&i.splice(l,1)}),vl.has(i)||(vl.add(i),tn(()=>{i.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),vl.delete(i)})),tn(()=>{if(s){var l;if(a)l=Nu(i,l,r.checked);else{var u=i.find(d=>d.checked);l=u==null?void 0:u.__value}o(l)}})}function Nu(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 bl(t){var e=t.type;return e==="number"||e==="range"}function yl(t){return t===""?null:+t}function Pu(t,e){return t===e||(t==null?void 0:t[Nr])===e}function qr(t={},e,r,n){return Xo(()=>{var o,a;return Jr(()=>{o=a,a=[],Yt(()=>{t!==r(...a)&&(e(t,...a),o&&Pu(r(...o),t)&&e(null,...o))})}),()=>{tn(()=>{a&&Pu(r(...a),t)&&e(null,...a)})}}),t}function go(t=!1){const e=Be,r=e.l.u;if(!r)return;let n=()=>Ge(e.s);if(t){let o=0,a={};const i=Se(()=>{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&&Js(()=>{Lu(e,n),Yo(r.b)}),_t(()=>{const o=Yt(()=>r.m.map(jh));return()=>{for(const a of o)typeof a=="function"&&a()}}),r.a.length&&_t(()=>{Lu(e,n),Yo(r.a)})}function Lu(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}function Ti(t){Be===null&&nl(),ao&&Be.l!==null?$p(Be).m.push(t):_t(()=>{const e=Yt(t);if(typeof e=="function")return e})}function qp(t){Be===null&&nl(),Ti(()=>()=>Yt(t))}function $p(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}function wl(t,e,r){if(t==null)return e(void 0),r&&r(void 0),He;const n=Yt(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}let Ei=!1;function bt(t,e,r){const n=r[e]??(r[e]={store:null,source:On(void 0),unsubscribe:He});if(n.store!==t)if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=He;else{var o=!0;n.unsubscribe=wl(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=He),t}function $t(){const t={};return Qs(()=>{for(var e in t)t[e].unsubscribe()}),t}function Zp(t){var e=Ei;try{return Ei=!1,[t(),Ei]}finally{Ei=e}}const Up={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 xr(t,e,r){return new Proxy({props:t,exclude:e},Up)}const Hp={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]=x({get[e](){return t.props[e]}},e,Pc)),t.special[e](r),vu(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),vu(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 _l(t,e){return new Proxy({props:t,exclude:e,special:{},version:vt(0)},Hp)}const Vp={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(eo(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];eo(o)&&(o=o());const a=Yr(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(eo(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=Yr(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Nr||e===Hs)return!1;for(let r of t.props)if(eo(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props){eo(r)&&(r=r());for(const n in r)e.includes(n)||e.push(n)}return e}};function vn(...t){return new Proxy({props:t},Vp)}function Mu(t){for(var e=Le,r=Le;e!==null&&!(e.f&(mr|to));)e=e.parent;try{return Kt(e),t()}finally{Kt(r)}}function x(t,e,r,n){var z;var o=(r&xh)!==0,a=!ao||(r&Sh)!==0,i=(r&Th)!==0,s=(r&Eh)!==0,c=!1,l;i?[l,c]=Zp(()=>t[e]):l=t[e];var u=Nr in t||Hs in t,d=((z=Yr(t,e))==null?void 0:z.set)??(u&&i&&e in t?L=>t[e]=L:void 0),f=n,v=!0,h=!1,m=()=>(h=!0,v&&(v=!1,s?f=Yt(n):f=n),f);l===void 0&&n!==void 0&&(d&&a&&Qh(),l=m(),d&&d(l));var y;if(a)y=()=>{var L=t[e];return L===void 0?m():(v=!0,h=!1,L)};else{var g=Mu(()=>(o?Se:Nt)(()=>t[e]));g.f|=Zh,y=()=>{var L=p(g);return L!==void 0&&(f=void 0),L===void 0?f:L}}if(!(r&Pc))return y;if(d){var b=t.$$legacy;return function(L,V){return arguments.length>0?((!a||!V||b||c)&&d(V?y():L),L):y()}}var w=!1,I=!1,S=On(l),k=Mu(()=>Se(()=>{var L=y(),V=p(S);return w?(w=!1,I=!0,V):(I=!1,S.v=L)}));return o||(k.equals=Vs),function(L,V){if(arguments.length>0){const G=V?p(k):a&&i?xe(L):L;return k.equals(G)||(w=!0,A(S,G),h&&f!==void 0&&(f=G),Yt(()=>p(k))),L}return p(k)}}function Gp(t){return new Wp(t)}class Wp{constructor(e){K(this,ln);K(this,pr);var a;var r=new Map,n=(i,s)=>{var c=On(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===Hs?!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)}});At(this,pr,(e.hydrate?Cp: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)&&_(),At(this,ln,o.$$events);for(const i of Object.keys(E(this,pr)))i==="$set"||i==="$destroy"||i==="$on"||li(this,i,{get(){return E(this,pr)[i]},set(s){E(this,pr)[i]=s},enumerable:!0});E(this,pr).$set=i=>{Object.assign(o,i)},E(this,pr).$destroy=()=>{Ap(E(this,pr))}}$set(e){E(this,pr).$set(e)}$on(e,r){E(this,ln)[e]=E(this,ln)[e]||[];const n=(...o)=>r.call(this,...o);return E(this,ln)[e].push(n),()=>{E(this,ln)[e]=E(this,ln)[e].filter(o=>o!==n)}}$destroy(){E(this,pr).$destroy()}}ln=new WeakMap,pr=new WeakMap;let Du;typeof HTMLElement=="function"&&(Du=class extends HTMLElement{constructor(e,r,n){super();ae(this,"$$ctor");ae(this,"$$s");ae(this,"$$c");ae(this,"$$cn",!1);ae(this,"$$d",{});ae(this,"$$r",!1);ae(this,"$$p_d",{});ae(this,"$$l",{});ae(this,"$$l_u",new Map);ae(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=Kp(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]=Ci(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=Gp({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Qc(()=>{Jr(()=>{var o;this.$$r=!0;for(const a of si(this.$$c)){if(!((o=this.$$p_d[a])!=null&&o.reflect))continue;this.$$d[a]=this.$$c[a];const i=Ci(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]=Ci(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 si(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Ci(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 Kp(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 Du{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return si(e).map(s=>(e[s].attribute||s).toLowerCase())}};return si(e).forEach(s=>{li(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var d;c=Ci(s,c,e),this.$$d[s]=c;var l=this.$$c;if(l){var u=(d=Yr(l,s))==null?void 0:d.get;u?l[s]=c:l.$set({[s]:c})}}})}),n.forEach(s=>{li(i.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),t.element=i,i}const Yp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`@import '../utils/media.css';
2
2
 
3
3
  /* CSS properties have to be outside the container class for the animation to work */
4
4
  @property --gradient-color-start {
@@ -144,7 +144,7 @@ var LiipGPTChat=function(Ye){"use strict";var Aw=Object.defineProperty;var Rw=Ob
144
144
  </g>
145
145
  </g>
146
146
  </svg>
147
- `}}}},Symbol.toStringTag,{value:"Module"})),Ci={showPredefinedQuestions:!0,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:`
147
+ `}}}},Symbol.toStringTag,{value:"Module"})),Ai={showPredefinedQuestions:!0,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:`
148
148
  <svg viewBox="0 0 24 24">
149
149
  <circle cx="12" cy="12" r="11" fill="var(--color-grey-100)"/>
150
150
  <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
@@ -153,7 +153,7 @@ var LiipGPTChat=function(Ye){"use strict";var Aw=Object.defineProperty;var Rw=Ob
153
153
  <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
154
  </g>
155
155
  </svg>
156
- `}}},Qp=Object.freeze(Object.defineProperty({__proto__:null,config:Ci},Symbol.toStringTag,{value:"Module"})),Fu={...Ci,theme:{...Ci.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"}}}},Jp=Object.freeze(Object.defineProperty({__proto__:null,config:Fu},Symbol.toStringTag,{value:"Module"})),Xp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`/* Custom styles for LiipGPT */
156
+ `}}},Qp=Object.freeze(Object.defineProperty({__proto__:null,config:Ai},Symbol.toStringTag,{value:"Module"})),zu={...Ai,theme:{...Ai.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"}}}},Jp=Object.freeze(Object.defineProperty({__proto__:null,config:zu},Symbol.toStringTag,{value:"Module"})),Xp=Object.freeze(Object.defineProperty({__proto__:null,config:{customCSS:`/* Custom styles for LiipGPT */
157
157
 
158
158
  .chat-app {
159
159
  .liipgpt-gradient-text {
@@ -355,14 +355,14 @@ var LiipGPTChat=function(Ye){"use strict";var Aw=Object.defineProperty;var Rw=Ob
355
355
  <!-- Grain -->
356
356
  <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
357
357
  </svg>
358
- `}}}},Symbol.toStringTag,{value:"Module"}));var Fe;(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})(Fe||(Fe={}));var _l;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(_l||(_l={}));const X=Fe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nn=t=>{switch(typeof t){case"undefined":return X.undefined;case"string":return X.string;case"number":return isNaN(t)?X.nan:X.number;case"boolean":return X.boolean;case"function":return X.function;case"bigint":return X.bigint;case"symbol":return X.symbol;case"object":return Array.isArray(t)?X.array:t===null?X.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?X.promise:typeof Map<"u"&&t instanceof Map?X.map:typeof Set<"u"&&t instanceof Set?X.set:typeof Date<"u"&&t instanceof Date?X.date:X.object;default:return X.unknown}},N=Fe.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"]),eg=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class tr 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 tr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Fe.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()}}tr.create=t=>new tr(t);const go=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===X.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Fe.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${Fe.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Fe.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${Fe.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}"`:Fe.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,Fe.assertNever(t)}return{message:r}};let Bu=go;function tg(t){Bu=t}function Ei(){return Bu}const Ai=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}},rg=[];function H(t,e){const r=Ei(),n=Ai({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===go?void 0:go].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"}),mo=t=>({status:"dirty",value:t}),jt=t=>({status:"valid",value:t}),kl=t=>t.status==="aborted",xl=t=>t.status==="dirty",Dn=t=>t.status==="valid",aa=t=>typeof Promise<"u"&&t instanceof Promise;function Ri(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 qu(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 ue;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ue||(ue={}));var ia,sa;class $r{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 $u=(t,e)=>{if(Dn(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 tr(t.common.issues);return this._error=r,this._error}}};function Ee(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 nn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:nn(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:nn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(aa(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:nn(e)},a=this._parseSync({data:e,path:o.path,parent:o});return $u(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:nn(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:o});return Dn(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=>Dn(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:nn(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(aa(o)?o:Promise.resolve(o));return $u(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(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 Er({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 Zr.create(this,this._def)}nullable(){return _n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this)}promise(){return wo.create(this,this._def)}or(e){return da.create([this,e],this._def)}and(e){return fa.create(this,e,this._def)}transform(e){return new Er({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new va({...Ee(this._def),innerType:this,defaultValue:r,typeName:pe.ZodDefault})}brand(){return new Cl({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new ba({...Ee(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 ya.create(this,e)}readonly(){return wa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ng=/^c[^\s-]{8,}$/i,og=/^[0-9a-z]+$/,ag=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ig=/^[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,sg=/^[a-z0-9_-]{21}$/i,lg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,cg=/^[-+]?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)?)??$/,ug=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Sl;const 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])$/,hg=/^(?:(?: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]))$/,gg=/^(([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])$/,mg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vg=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ju="((\\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])))",bg=new RegExp(`^${ju}$`);function Zu(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 yg(t){return new RegExp(`^${Zu(t)}$`)}function Uu(t){let e=`${ju}T${Zu(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 wg(t,e){return!!((e==="v4"||!e)&&fg.test(t)||(e==="v6"||!e)&&pg.test(t))}function _g(t,e){if(!lg.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 kg(t,e){return!!((e==="v4"||!e)&&hg.test(t)||(e==="v6"||!e)&&gg.test(t))}class Tr extends Oe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==X.string){const a=this._getOrReturnCtx(e);return H(a,{code:N.invalid_type,expected:X.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),H(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),H(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?H(o,{code:N.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&H(o,{code:N.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")ug.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Sl||(Sl=new RegExp(dg,"u")),Sl.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")ig.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")sg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")ng.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")og.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:N.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")ag.test(e.data)||(o=this._getOrReturnCtx(e,o),H(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),H(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),H(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),H(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),H(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),H(o,{code:N.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Uu(a).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:N.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?bg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:N.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?yg(a).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:N.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?cg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?wg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?_g(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?kg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?mg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:N.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?vg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:N.invalid_string,message:a.message}),n.dirty()):Fe.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,...ue.errToObj(n)})}_addCheck(e){return new Tr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ue.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ue.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ue.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ue.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ue.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ue.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ue.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ue.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ue.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ue.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ue.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ue.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ue.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,...ue.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,...ue.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ue.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ue.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ue.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ue.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ue.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ue.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ue.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ue.errToObj(r)})}nonempty(e){return this.min(1,ue.errToObj(e))}trim(){return new Tr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tr({...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}}Tr.create=t=>{var e;return new Tr({checks:[],typeName:pe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ee(t)})};function xg(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 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)!==X.number){const a=this._getOrReturnCtx(e);return H(a,{code:N.invalid_type,expected:X.number,received:a.parsedType}),ge}let n;const o=new Mt;for(const a of this._def.checks)a.kind==="int"?Fe.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),H(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),H(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),H(n,{code:N.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?xg(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),H(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),H(n,{code:N.not_finite,message:a.message}),o.dirty()):Fe.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ue.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ue.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ue.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ue.toString(r))}setLimit(e,r,n,o){return new bn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ue.toString(o)}]})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ue.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ue.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ue.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ue.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ue.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ue.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ue.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ue.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ue.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"&&Fe.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,...Ee(t)});class yn 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)!==X.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),H(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),H(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),H(n,{code:N.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):Fe.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return H(r,{code:N.invalid_type,expected:X.bigint,received:r.parsedType}),ge}gte(e,r){return this.setLimit("min",e,!0,ue.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ue.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ue.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ue.toString(r))}setLimit(e,r,n,o){return new yn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ue.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:ue.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ue.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ue.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ue.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ue.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,...Ee(t)})};class la extends Oe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==X.boolean){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.boolean,received:n.parsedType}),ge}return jt(e.data)}}la.create=t=>new la({typeName:pe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ee(t)});class zn extends Oe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==X.date){const a=this._getOrReturnCtx(e);return H(a,{code:N.invalid_type,expected:X.date,received:a.parsedType}),ge}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return H(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),H(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),H(o,{code:N.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Fe.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ue.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ue.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}}zn.create=t=>new zn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:pe.ZodDate,...Ee(t)});class Ii extends Oe{_parse(e){if(this._getType(e)!==X.symbol){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.symbol,received:n.parsedType}),ge}return jt(e.data)}}Ii.create=t=>new Ii({typeName:pe.ZodSymbol,...Ee(t)});class ca extends Oe{_parse(e){if(this._getType(e)!==X.undefined){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.undefined,received:n.parsedType}),ge}return jt(e.data)}}ca.create=t=>new ca({typeName:pe.ZodUndefined,...Ee(t)});class ua extends Oe{_parse(e){if(this._getType(e)!==X.null){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.null,received:n.parsedType}),ge}return jt(e.data)}}ua.create=t=>new ua({typeName:pe.ZodNull,...Ee(t)});class vo extends Oe{constructor(){super(...arguments),this._any=!0}_parse(e){return jt(e.data)}}vo.create=t=>new vo({typeName:pe.ZodAny,...Ee(t)});class Fn extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return jt(e.data)}}Fn.create=t=>new Fn({typeName:pe.ZodUnknown,...Ee(t)});class on extends Oe{_parse(e){const r=this._getOrReturnCtx(e);return H(r,{code:N.invalid_type,expected:X.never,received:r.parsedType}),ge}}on.create=t=>new on({typeName:pe.ZodNever,...Ee(t)});class Oi extends Oe{_parse(e){if(this._getType(e)!==X.undefined){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.void,received:n.parsedType}),ge}return jt(e.data)}}Oi.create=t=>new Oi({typeName:pe.ZodVoid,...Ee(t)});class Cr extends Oe{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==X.array)return H(r,{code:N.invalid_type,expected:X.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)&&(H(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&&(H(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&&(H(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 $r(r,i,r.path,s)))).then(i=>Mt.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new $r(r,i,r.path,s)));return Mt.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Cr({...this._def,minLength:{value:e,message:ue.toString(r)}})}max(e,r){return new Cr({...this._def,maxLength:{value:e,message:ue.toString(r)}})}length(e,r){return new Cr({...this._def,exactLength:{value:e,message:ue.toString(r)}})}nonempty(e){return this.min(1,e)}}Cr.create=(t,e)=>new Cr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(e)});function bo(t){if(t instanceof bt){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Zr.create(bo(n))}return new bt({...t._def,shape:()=>e})}else return t instanceof Cr?new Cr({...t._def,type:bo(t.element)}):t instanceof Zr?Zr.create(bo(t.unwrap())):t instanceof _n?_n.create(bo(t.unwrap())):t instanceof jr?jr.create(t.items.map(e=>bo(e))):t}class bt 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=Fe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==X.object){const l=this._getOrReturnCtx(e);return H(l,{code:N.invalid_type,expected:X.object,received:l.parsedType}),ge}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof on&&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],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new $r(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof on){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&&(H(o,{code:N.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 d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new $r(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>Mt.mergeObjectSync(n,l)):Mt.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return ue.errToObj,new bt({...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=ue.errToObj(e).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(e){return new bt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new bt({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 bt({...this._def,catchall:e})}pick(e){const r={};return Fe.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new bt({...this._def,shape:()=>r})}omit(e){const r={};return Fe.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new bt({...this._def,shape:()=>r})}deepPartial(){return bo(this)}partial(e){const r={};return Fe.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}),new bt({...this._def,shape:()=>r})}required(e){const r={};return Fe.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Zr;)a=a._def.innerType;r[n]=a}}),new bt({...this._def,shape:()=>r})}keyof(){return Hu(Fe.objectKeys(this.shape))}}bt.create=(t,e)=>new bt({shape:()=>t,unknownKeys:"strip",catchall:on.create(),typeName:pe.ZodObject,...Ee(e)}),bt.strictCreate=(t,e)=>new bt({shape:()=>t,unknownKeys:"strict",catchall:on.create(),typeName:pe.ZodObject,...Ee(e)}),bt.lazycreate=(t,e)=>new bt({shape:t,unknownKeys:"strip",catchall:on.create(),typeName:pe.ZodObject,...Ee(e)});class da 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 tr(s.ctx.common.issues));return H(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 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 tr(c));return H(r,{code:N.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}}da.create=(t,e)=>new da({options:t,typeName:pe.ZodUnion,...Ee(e)});const an=t=>t instanceof pa?an(t.schema):t instanceof Er?an(t.innerType()):t instanceof ga?[t.value]:t instanceof wn?t.options:t instanceof ma?Fe.objectValues(t.enum):t instanceof va?an(t._def.innerType):t instanceof ca?[void 0]:t instanceof ua?[null]:t instanceof Zr?[void 0,...an(t.unwrap())]:t instanceof _n?[null,...an(t.unwrap())]:t instanceof Cl||t instanceof wa?an(t.unwrap()):t instanceof ba?an(t._def.innerType):[];class Ni extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==X.object)return H(r,{code:N.invalid_type,expected:X.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}):(H(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=an(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 Ni({typeName:pe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...Ee(n)})}}function Tl(t,e){const r=nn(t),n=nn(e);if(t===e)return{valid:!0,data:t};if(r===X.object&&n===X.object){const o=Fe.objectKeys(e),a=Fe.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const c=Tl(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(r===X.array&&n===X.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=Tl(i,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===X.date&&n===X.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class fa extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(a,i)=>{if(kl(a)||kl(i))return ge;const s=Tl(a.value,i.value);return s.valid?((xl(a)||xl(i))&&r.dirty(),{status:r.value,value:s.data}):(H(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}))}}fa.create=(t,e,r)=>new fa({left:t,right:e,typeName:pe.ZodIntersection,...Ee(r)});class jr extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.array)return H(n,{code:N.invalid_type,expected:X.array,received:n.parsedType}),ge;if(n.data.length<this._def.items.length)return H(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&&(H(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 c=this._def.items[s]||this._def.rest;return c?c._parse(new $r(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,...Ee(e)})};class ha 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!==X.object)return H(n,{code:N.invalid_type,expected:X.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 $r(n,s,n.path,s)),value:i._parse(new $r(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 Oe?new ha({keyType:e,valueType:r,typeName:pe.ZodRecord,...Ee(n)}):new ha({keyType:Tr.create(),valueType:e,typeName:pe.ZodRecord,...Ee(r)})}}class Pi 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!==X.map)return H(n,{code:N.invalid_type,expected:X.map,received:n.parsedType}),ge;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new $r(n,s,n.path,[l,"key"])),value:a._parse(new $r(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 ge;(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 ge;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Pi.create=(t,e,r)=>new Pi({valueType:e,keyType:t,typeName:pe.ZodMap,...Ee(r)});class Bn extends Oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.set)return H(n,{code:N.invalid_type,expected:X.set,received:n.parsedType}),ge;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(H(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&&(H(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(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ge;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 $r(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,r){return new Bn({...this._def,minSize:{value:e,message:ue.toString(r)}})}max(e,r){return new Bn({...this._def,maxSize:{value:e,message:ue.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Bn.create=(t,e)=>new Bn({valueType:t,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(e)});class yo extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==X.function)return H(r,{code:N.invalid_type,expected:X.function,received:r.parsedType}),ge;function n(s,c){return Ai({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ei(),go].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:c}})}function o(s,c){return Ai({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ei(),go].filter(l=>!!l),issueData:{code:N.invalid_return_type,returnTypeError:c}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof wo){const s=this;return jt(async function(...c){const l=new tr([]),u=await s._def.args.parseAsync(c,a).catch(v=>{throw l.addIssue(n(c,v)),l}),d=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(v=>{throw l.addIssue(o(d,v)),l})})}else{const s=this;return jt(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new tr([n(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new tr([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new yo({...this._def,args:jr.create(e).rest(Fn.create())})}returns(e){return new yo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new yo({args:e||jr.create([]).rest(Fn.create()),returns:r||Fn.create(),typeName:pe.ZodFunction,...Ee(n)})}}class pa 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})}}pa.create=(t,e)=>new pa({getter:t,typeName:pe.ZodLazy,...Ee(e)});class ga extends Oe{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return H(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}}ga.create=(t,e)=>new ga({value:t,typeName:pe.ZodLiteral,...Ee(e)});function Hu(t,e){return new wn({values:t,typeName:pe.ZodEnum,...Ee(e)})}class wn extends Oe{constructor(){super(...arguments),ia.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{expected:Fe.joinValues(n),received:r.parsedType,code:N.invalid_type}),ge}if(Ri(this,ia)||qu(this,ia,new Set(this._def.values)),!Ri(this,ia).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{received:r.data,code:N.invalid_enum_value,options:n}),ge}return jt(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})}}ia=new WeakMap,wn.create=Hu;class ma extends Oe{constructor(){super(...arguments),sa.set(this,void 0)}_parse(e){const r=Fe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==X.string&&n.parsedType!==X.number){const o=Fe.objectValues(r);return H(n,{expected:Fe.joinValues(o),received:n.parsedType,code:N.invalid_type}),ge}if(Ri(this,sa)||qu(this,sa,new Set(Fe.getValidEnumValues(this._def.values))),!Ri(this,sa).has(e.data)){const o=Fe.objectValues(r);return H(n,{received:n.data,code:N.invalid_enum_value,options:o}),ge}return jt(e.data)}get enum(){return this._def.values}}sa=new WeakMap,ma.create=(t,e)=>new ma({values:t,typeName:pe.ZodNativeEnum,...Ee(e)});class wo extends Oe{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==X.promise&&r.common.async===!1)return H(r,{code:N.invalid_type,expected:X.promise,received:r.parsedType}),ge;const n=r.parsedType===X.promise?r.data:Promise.resolve(r.data);return jt(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}wo.create=(t,e)=>new wo({type:t,typeName:pe.ZodPromise,...Ee(e)});class Er extends Oe{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=>{H(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 c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?ge:c.status==="dirty"||r.value==="dirty"?mo(c.value):c});{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"?mo(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"?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(!Dn(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=>Dn(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):i);Fe.assertNever(o)}}Er.create=(t,e,r)=>new Er({schema:t,typeName:pe.ZodEffects,effect:e,...Ee(r)}),Er.createWithPreprocess=(t,e,r)=>new Er({schema:e,effect:{type:"preprocess",transform:t},typeName:pe.ZodEffects,...Ee(r)});class Zr extends Oe{_parse(e){return this._getType(e)===X.undefined?jt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zr.create=(t,e)=>new Zr({innerType:t,typeName:pe.ZodOptional,...Ee(e)});class _n extends Oe{_parse(e){return this._getType(e)===X.null?jt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:pe.ZodNullable,...Ee(e)});class va extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===X.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}va.create=(t,e)=>new va({innerType:t,typeName:pe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ee(e)});class ba 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 aa(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new tr(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ba.create=(t,e)=>new ba({innerType:t,typeName:pe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ee(e)});class Li extends Oe{_parse(e){if(this._getType(e)!==X.nan){const n=this._getOrReturnCtx(e);return H(n,{code:N.invalid_type,expected:X.nan,received:n.parsedType}),ge}return{status:"valid",value:e.data}}}Li.create=t=>new Li({typeName:pe.ZodNaN,...Ee(t)});const Sg=Symbol("zod_brand");class Cl 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 ya 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"?ge:a.status==="dirty"?(r.dirty(),mo(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 ya({in:e,out:r,typeName:pe.ZodPipeline})}}class wa extends Oe{_parse(e){const r=this._def.innerType._parse(e),n=o=>(Dn(o)&&(o.value=Object.freeze(o.value)),o);return aa(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}wa.create=(t,e)=>new wa({innerType:t,typeName:pe.ZodReadonly,...Ee(e)});function Vu(t,e={},r){return t?vo.create().superRefine((n,o)=>{var a,i;if(!t(n)){const s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):vo.create()}const Tg={object:bt.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 Cg=(t,e={message:`Input not instance of ${t.name}`})=>Vu(r=>r instanceof t,e),Gu=Tr.create,Wu=bn.create,Eg=Li.create,Ag=yn.create,Ku=la.create,Rg=zn.create,Ig=Ii.create,Og=ca.create,Ng=ua.create,Pg=vo.create,Lg=Fn.create,Mg=on.create,Dg=Oi.create,zg=Cr.create,Fg=bt.create,Bg=bt.strictCreate,qg=da.create,$g=Ni.create,jg=fa.create,Zg=jr.create,Ug=ha.create,Hg=Pi.create,Vg=Bn.create,Gg=yo.create,Wg=pa.create,Kg=ga.create,Yg=wn.create,Qg=ma.create,Jg=wo.create,Yu=Er.create,Xg=Zr.create,em=_n.create,tm=Er.createWithPreprocess,rm=ya.create;var B=Object.freeze({__proto__:null,defaultErrorMap:go,setErrorMap:tg,getErrorMap:Ei,makeIssue:Ai,EMPTY_PATH:rg,addIssueToContext:H,ParseStatus:Mt,INVALID:ge,DIRTY:mo,OK:jt,isAborted:kl,isDirty:xl,isValid:Dn,isAsync:aa,get util(){return Fe},get objectUtil(){return _l},ZodParsedType:X,getParsedType:nn,ZodType:Oe,datetimeRegex:Uu,ZodString:Tr,ZodNumber:bn,ZodBigInt:yn,ZodBoolean:la,ZodDate:zn,ZodSymbol:Ii,ZodUndefined:ca,ZodNull:ua,ZodAny:vo,ZodUnknown:Fn,ZodNever:on,ZodVoid:Oi,ZodArray:Cr,ZodObject:bt,ZodUnion:da,ZodDiscriminatedUnion:Ni,ZodIntersection:fa,ZodTuple:jr,ZodRecord:ha,ZodMap:Pi,ZodSet:Bn,ZodFunction:yo,ZodLazy:pa,ZodLiteral:ga,ZodEnum:wn,ZodNativeEnum:ma,ZodPromise:wo,ZodEffects:Er,ZodTransformer:Er,ZodOptional:Zr,ZodNullable:_n,ZodDefault:va,ZodCatch:ba,ZodNaN:Li,BRAND:Sg,ZodBranded:Cl,ZodPipeline:ya,ZodReadonly:wa,custom:Vu,Schema:Oe,ZodSchema:Oe,late:Tg,get ZodFirstPartyTypeKind(){return pe},coerce:{string:t=>Tr.create({...t,coerce:!0}),number:t=>bn.create({...t,coerce:!0}),boolean:t=>la.create({...t,coerce:!0}),bigint:t=>yn.create({...t,coerce:!0}),date:t=>zn.create({...t,coerce:!0})},any:Pg,array:zg,bigint:Ag,boolean:Ku,date:Rg,discriminatedUnion:$g,effect:Yu,enum:Yg,function:Gg,instanceof:Cg,intersection:jg,lazy:Wg,literal:Kg,map:Hg,nan:Eg,nativeEnum:Qg,never:Mg,null:Ng,nullable:em,number:Wu,object:Fg,oboolean:()=>Ku().optional(),onumber:()=>Wu().optional(),optional:Xg,ostring:()=>Gu().optional(),pipeline:rm,preprocess:tm,promise:Jg,record:Ug,set:Vg,strictObject:Bg,string:Gu,symbol:Ig,transformer:Yu,tuple:Zg,undefined:Og,union:qg,unknown:Lg,void:Dg,NEVER:ge,ZodIssueCode:N,quotelessJson:eg,ZodError:tr});const nm=B.object({minRem:B.number(),maxRem:B.number()}),El=B.object({0:B.string().optional(),50:B.string(),100:B.string(),200:B.string(),300:B.string(),400:B.string(),500:B.string(),600:B.string(),700:B.string(),800:B.string(),900:B.string(),950:B.string(),1e3:B.string().optional()}),Al=B.object({color:B.string().optional(),background:B.string().optional(),borderWidth:B.string().optional(),borderColor:B.string().optional(),boxShadow:B.string().optional()}),om=B.object({borderRadius:nm.optional(),custom:B.record(B.string(),B.union([B.string(),B.number()])).optional(),hover:Al.optional(),focus:Al.optional()}).and(Al),am=B.object({family:B.string()}),im=B.object({font:am,colors:B.object({brand:El,highlight:El,grey:El}),components:B.record(B.string(),om),svgs:B.record(B.enum(["predefinedQuestion","edit","voteUp","voteDown","retry","message","thread","submit","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","chevronDown","internalLink","externalLink","liip","avatar"]),B.string())}),sm=B.object({label:B.string(),icon:B.string(),url:B.string(),target:B.enum(["_blank","_self"]).optional()}),lm=B.object({showPredefinedQuestions:B.boolean(),customCSS:B.string().optional(),fontURLs:B.string().array().optional(),theme:im,menu:B.record(B.string(),B.array(sm)).optional()}),cm=640,um=1024;let Mi=null;const dm=()=>{if(Mi)return Mi;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Mi=Number(getComputedStyle(t).fontSize.slice(0,-2)),Mi},fm=(t,e)=>{const r=dm(),n=cm/r,o=um/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},hm=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),pm=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),gm=new RegExp("(\\d)(\\p{Ll})","gu"),mm=new RegExp("(\\p{L})(\\d)","gu"),vm=/[^\p{L}\d]+/giu,Di="$1\0$2",bm="";function ym(t,e){let r=t.trim();r=r.replace(hm,Di).replace(pm,Di),e!=null&&e.separateNumbers&&(r=r.replace(gm,Di).replace(mm,Di)),r=r.replace(vm,"\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 wm(t,e){return xm(t,e==null?void 0:e.prefixCharacters)+ym(t,e).map(km(e==null?void 0:e.locale)).join((e==null?void 0:e.delimiter)??" ")}function _m(t,e){return wm(t,{delimiter:"-",...e})}function km(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function xm(t,e=bm){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,Sm=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:fm(t.minRem,t.maxRem):"",Rl=(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)}:${Sm(i)}; `)}),o},Tm=(t,e)=>{let r="";return r+=Rl(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Rl(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Rl(`${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},Cm=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Em=t=>`--font-family: ${t.family};`,Am=t=>{const e=Em(t.font),r=Object.entries(t.colors).map(([o,a])=>Cm(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>Tm(zi(o),a)).join("");return[e,r,n].join(" ")},Il=t=>t.replace("./","").split("/")[0],Ol="q";var _a=(t=>(t.Start="start",t.Chat="chat",t))(_a||{});function Rm(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 Im(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Om=function(e){return Nm(e)&&!Pm(e)};function Nm(t){return!!t&&typeof t=="object"}function Pm(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Dm(t)}var Lm=typeof Symbol=="function"&&Symbol.for,Mm=Lm?Symbol.for("react.element"):60103;function Dm(t){return t.$$typeof===Mm}function zm(t){return Array.isArray(t)?[]:{}}function ka(t,e){return e.clone!==!1&&e.isMergeableObject(t)?_o(zm(t),t,e):t}function Fm(t,e,r){return t.concat(e).map(function(n){return ka(n,r)})}function Bm(t,e){if(!e.customMerge)return _o;var r=e.customMerge(t);return typeof r=="function"?r:_o}function qm(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Qu(t){return Object.keys(t).concat(qm(t))}function Ju(t,e){try{return e in t}catch{return!1}}function $m(t,e){return Ju(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function jm(t,e,r){var n={};return r.isMergeableObject(t)&&Qu(t).forEach(function(o){n[o]=ka(t[o],r)}),Qu(e).forEach(function(o){$m(t,o)||(Ju(t,o)&&r.isMergeableObject(e[o])?n[o]=Bm(o,r)(t[o],e[o],r):n[o]=ka(e[o],r))}),n}function _o(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Fm,r.isMergeableObject=r.isMergeableObject||Om,r.cloneUnlessOtherwiseSpecified=ka;var n=Array.isArray(e),o=Array.isArray(t),a=n===o;return a?n?r.arrayMerge(t,e,r):jm(t,e,r):ka(e,r)}_o.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return _o(n,o,r)},{})};var Zm=_o,Um=Zm;const Pl=Im(Um),ko=[];function Hm(t,e){return{subscribe:Zt(t,e).subscribe}}function Zt(t,e=qe){let r=null;const n=new Set;function o(s){if(ui(t,s)&&(t=s,r)){const c=!ko.length;for(const l of n)l[1](),ko.push(l,t);if(c){for(let l=0;l<ko.length;l+=2)ko[l][0](ko[l+1]);ko.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 Xu(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 Hm(r,(i,s)=>{let c=!1;const l=[];let u=0,d=qe;const f=()=>{if(u)return;d();const h=e(n?l[0]:l,i,s);a?i(h):d=typeof h=="function"?h:qe},v=o.map((h,m)=>yl(h,y=>{l[m]=y,u&=~(1<<m),c&&f()},()=>{u|=1<<m}));return c=!0,f(),function(){Yo(v),d(),c=!1}})}function xa(t){let e;return yl(t,r=>e=r)(),e}function xo(t){R(t,t.v+1)}function Vm(t){let e=0,r=mt(0),n;return()=>{ip()&&(p(r),Jr(()=>(e===0&&(n=Yt(()=>t(()=>xo(r)))),e+=1,()=>{nl().then(()=>{e-=1,e===0&&(n==null||n(),n=void 0)})})))}}const Gm=(()=>{const t=Object.assign({"./alva/alva-light-config.ts":Yp,"./default/default-light-config.ts":Qp}),e=Object.assign({"./default/default-dark-config.ts":Jp,"./liipgpt/liipgpt-dark-config.ts":Xp}),r=[],n=new Map,o=new Map;return Object.entries(t).forEach(([a,{config:i}])=>{const s=Il(a);r.push(s),n.set(s,Pl(Ci,i))}),Object.entries(e).forEach(([a,{config:i}])=>{const s=Il(a);r.push(s),o.set(s,Pl(Fu,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}]}))})(),ed=Zt(void 0),td=(t,e)=>{const r=Gm[t][e];if(!r)throw new Error(`Config for ${t} not found`);const n=lm.safeParse(r);return n.error&&console.warn("Incomplete config",n.error),ed.set(r),{config:r,themeString:Am(r.theme)}},Sa=ed;var Wm=J('<div aria-hidden="true"><!></div>');function Qt(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Sa,"$config",r);let o=x(e,"name",7),a=x(e,"class",7);var i=Wm(),s=P(i);return ho(s,()=>n().theme.svgs[o()]),O(i),le(()=>kr(i,`svg svg--${o()??""} ${a()??""}`)),T(t,i),Re({get name(){return o()},set name(c){o(c),_()},get class(){return a()},set class(c){a(c),_()}})}Ie(Qt,{name:{},class:{}},[],[],!0);const 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",feedbackFormTitle:"Feedback geben, um unseren Chatbot zu verbessern",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!",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",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!",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",feedbackFormTitle:"<h4>Give feedback to improve our 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!",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:"Envoyer un feedback",sendFeedback:"Envoyer un feedback",feedbackFormTitle:"<h4>Give feedback to improve our 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!",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 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"})),Qm=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"})),Jm=B.object({predefinedQuestions:B.string(),introductionTitle:B.string(),referenceTitle:B.string(),chatInputPlaceholder:B.string(),chatInputSubmit:B.string(),referenceLink:B.string(),newChat:B.string(),messageBotLoading:B.string(),messageBotError:B.string(),messageBotDefaultError:B.string(),chatFooterText:B.string().optional(),scrollToBottom:B.string(),openMenu:B.string(),closeMenu:B.string(),send:B.string(),thankYouForFeedback:B.string(),giveFeedback:B.string(),sendFeedback:B.string(),feedbackFormTitle:B.string(),feedbackFormMessage:B.string(),feedbackFormMessagePlaceholder:B.string(),feedbackFormEmail:B.string(),feedbackFormEmailPlaceholder:B.string(),answerGood:B.string(),answerBad:B.string(),classificationSubmit:B.string(),classificationThankYou:B.string(),selectLanguage:B.string(),languageNames:B.record(B.string(),B.string())}),Xm=(()=>{const e=Object.entries(Object.assign({"./alva/alva-translations.ts":Ym,"./default/default-translations.ts":Km,"./liipgpt/liipgpt-translations.ts":Qm})).map(([r,{translations:n}])=>[Il(r),Pl(Ll,n)]);return Object.fromEntries(e)})(),rd=t=>new Proxy(t,{get(e,r){return typeof r=="string"&&e[r]===void 0?r.toUpperCase():e[r]}}),nd=Zt(rd({})),ev=["en","de","fr","it"],Ml="en",Fi=t=>ev.includes(t),Ta=Zt(""),od=t=>{const e=xa(Ta);if(e&&Fi(e))return e;if(t&&Fi(t))return t;const r=navigator.language.split("-")[0];return r&&Fi(r)?r:Ml},tv=async(t,e)=>{if(!e)throw new Error("org is required");const r=Fi(t)?t:od(t),n=Xm[e];let o=n[r];o||(console.warn(`Translation not found for ${r}, switching to ${Ml}`),o=n[Ml]);const a=Jm.safeParse(o);a.error&&console.error("Translation is invalid",a.error),nd.set(rd(o))},rv=t=>{Ta.set(t)},Ur=nd,Dl=Math.min,So=Math.max,Bi=Math.round,Hr=t=>({x:t,y:t}),nv={left:"right",right:"left",bottom:"top",top:"bottom"},ov={start:"end",end:"start"};function ad(t,e,r){return So(t,Dl(e,r))}function qi(t,e){return typeof t=="function"?t(e):t}function qn(t){return t.split("-")[0]}function $i(t){return t.split("-")[1]}function id(t){return t==="x"?"y":"x"}function sd(t){return t==="y"?"height":"width"}function To(t){return["top","bottom"].includes(qn(t))?"y":"x"}function ld(t){return id(To(t))}function av(t,e,r){r===void 0&&(r=!1);const n=$i(t),o=ld(t),a=sd(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=ji(i)),[i,ji(i)]}function iv(t){const e=ji(t);return[zl(t),e,zl(e)]}function zl(t){return t.replace(/start|end/g,e=>ov[e])}function sv(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 lv(t,e,r,n){const o=$i(t);let a=sv(qn(t),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),e&&(a=a.concat(a.map(zl)))),a}function ji(t){return t.replace(/left|right|bottom|top/g,e=>nv[e])}function cv(t){return{top:0,right:0,bottom:0,left:0,...t}}function uv(t){return typeof t!="number"?cv(t):{top:t,right:t,bottom:t,left:t}}function Zi(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 cd(t,e,r){let{reference:n,floating:o}=t;const a=To(e),i=ld(e),s=sd(i),c=qn(e),l=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(c){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($i(e)){case"start":v[i]-=f*(r&&l?-1:1);break;case"end":v[i]+=f*(r&&l?-1:1);break}return v}const dv=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:d}=cd(l,n,c),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:I,reset:S}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:v,rects:l,platform:i,elements:{reference:t,floating:e}});u=b??u,d=w??d,v={...v,[y]:{...v[y],...I}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):S.rects),{x:u,y:d}=cd(l,f,c)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:v}};async function ud(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:d="floating",altBoundary:f=!1,padding:v=0}=qi(e,t),h=uv(v),y=s[f?d==="floating"?"reference":"floating":d],g=Zi(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})),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)),I=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},S=Zi(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:c}):b);return{top:(g.top-S.top+h.top)/I.y,bottom:(S.bottom-g.bottom+h.bottom)/I.y,left:(g.left-S.left+h.left)/I.x,right:(S.right-g.right+h.right)/I.x}}const fv=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:d=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=qi(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=qn(o),b=To(s),w=qn(s)===s,I=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=f||(w||!m?[ji(s)]:iv(s)),k=h!=="none";!f&&k&&S.push(...lv(s,m,h,I));const M=[s,...S],L=await ud(e,y),G=[];let W=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&G.push(L[g]),d){const C=av(o,i,I);G.push(L[C[0]],L[C[1]])}if(W=[...W,{placement:o,overflows:G}],!G.every(C=>C<=0)){var $,re;const C=((($=a.flip)==null?void 0:$.index)||0)+1,he=M[C];if(he)return{data:{index:C,overflows:W},reset:{placement:he}};let V=(re=W.filter(Z=>Z.overflows[0]<=0).sort((Z,z)=>Z.overflows[1]-z.overflows[1])[0])==null?void 0:re.placement;if(!V)switch(v){case"bestFit":{var de;const Z=(de=W.filter(z=>{if(k){const K=To(z.placement);return K===b||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,q)=>K+q,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:de[0];Z&&(V=Z);break}case"initialPlacement":V=s;break}if(o!==V)return{reset:{placement:V}}}return{}}}};async function hv(t,e){const{placement:r,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=qn(r),s=$i(r),c=To(r)==="y",l=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,d=qi(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),c?{x:v*u,y:f*l}:{x:f*l,y:v*u}}const pv=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 hv(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}}}}},gv=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}}},...c}=qi(t,e),l={x:r,y:n},u=await ud(e,c),d=To(qn(o)),f=id(d);let v=l[f],h=l[d];if(a){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],w=v-u[g];v=ad(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=ad(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 Ui(){return typeof window<"u"}function Co(t){return dd(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=(dd(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function dd(t){return Ui()?t instanceof Node||t instanceof rr(t).Node:!1}function Ar(t){return Ui()?t instanceof Element||t instanceof rr(t).Element:!1}function Vr(t){return Ui()?t instanceof HTMLElement||t instanceof rr(t).HTMLElement:!1}function fd(t){return!Ui()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof rr(t).ShadowRoot}function Ca(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Rr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function mv(t){return["table","td","th"].includes(Co(t))}function Hi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Fl(t){const e=Bl(),r=Ar(t)?Rr(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 vv(t){let e=kn(t);for(;Vr(e)&&!Eo(e);){if(Fl(e))return e;if(Hi(e))return null;e=kn(e)}return null}function Bl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(Co(t))}function Rr(t){return rr(t).getComputedStyle(t)}function Vi(t){return Ar(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kn(t){if(Co(t)==="html")return t;const e=t.assignedSlot||t.parentNode||fd(t)&&t.host||sn(t);return fd(e)?e.host:e}function hd(t){const e=kn(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Ca(e)?e:hd(e)}function ql(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=hd(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=rr(o);if(a){const s=$l(i);return e.concat(i,i.visualViewport||[],Ca(o)?o:[],s&&r?ql(s):[])}return e.concat(o,ql(o,[],r))}function $l(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pd(t){const e=Rr(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=Bi(r)!==a||Bi(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function gd(t){return Ar(t)?t:t.contextElement}function Ao(t){const e=gd(t);if(!Vr(e))return Hr(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:a}=pd(e);let i=(a?Bi(r.width):r.width)/n,s=(a?Bi(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const bv=Hr(0);function md(t){const e=rr(t);return!Bl()||!e.visualViewport?bv:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function yv(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==rr(t)?!1:e}function Ea(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),a=gd(t);let i=Hr(1);e&&(n?Ar(n)&&(i=Ao(n)):i=Ao(t));const s=yv(a,r,n)?md(a):Hr(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const f=rr(a),v=n&&Ar(n)?rr(n):n;let h=f,m=$l(h);for(;m&&n&&v!==h;){const y=Ao(m),g=m.getBoundingClientRect(),b=Rr(m),w=g.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,I=g.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=w,l+=I,h=rr(m),m=$l(h)}}return Zi({width:u,height:d,x:c,y:l})}function jl(t,e){const r=Vi(t).scrollLeft;return e?e.left+r:Ea(sn(t)).left+r}function vd(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:jl(t,n)),a=n.top+e.scrollTop;return{x:o,y:a}}function wv(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=sn(n),s=e?Hi(e.floating):!1;if(n===i||s&&a)return r;let c={scrollLeft:0,scrollTop:0},l=Hr(1);const u=Hr(0),d=Vr(n);if((d||!d&&!a)&&((Co(n)!=="body"||Ca(i))&&(c=Vi(n)),Vr(n))){const v=Ea(n);l=Ao(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const f=i&&!d&&!a?vd(i,c,!0):Hr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _v(t){return Array.from(t.getClientRects())}function kv(t){const e=sn(t),r=Vi(t),n=t.ownerDocument.body,o=So(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=So(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+jl(t);const s=-r.scrollTop;return Rr(n).direction==="rtl"&&(i+=So(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function xv(t,e){const r=rr(t),n=sn(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=Bl();(!l||l&&e==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function Sv(t,e){const r=Ea(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,a=Vr(t)?Ao(t):Hr(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 bd(t,e,r){let n;if(e==="viewport")n=xv(t,r);else if(e==="document")n=kv(sn(t));else if(Ar(e))n=Sv(e,r);else{const o=md(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Zi(n)}function yd(t,e){const r=kn(t);return r===e||!Ar(r)||Eo(r)?!1:Rr(r).position==="fixed"||yd(r,e)}function Tv(t,e){const r=e.get(t);if(r)return r;let n=ql(t,[],!1).filter(s=>Ar(s)&&Co(s)!=="body"),o=null;const a=Rr(t).position==="fixed";let i=a?kn(t):t;for(;Ar(i)&&!Eo(i);){const s=Rr(i),c=Fl(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ca(i)&&!c&&yd(t,i))?n=n.filter(u=>u!==i):o=s,i=kn(i)}return e.set(t,n),n}function Cv(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const i=[...r==="clippingAncestors"?Hi(e)?[]:Tv(e,this._c):[].concat(r),n],s=i[0],c=i.reduce((l,u)=>{const d=bd(e,u,o);return l.top=So(d.top,l.top),l.right=Dl(d.right,l.right),l.bottom=Dl(d.bottom,l.bottom),l.left=So(d.left,l.left),l},bd(e,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ev(t){const{width:e,height:r}=pd(t);return{width:e,height:r}}function Av(t,e,r){const n=Vr(e),o=sn(e),a=r==="fixed",i=Ea(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const c=Hr(0);if(n||!n&&!a)if((Co(e)!=="body"||Ca(o))&&(s=Vi(e)),n){const f=Ea(e,!0,a,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else o&&(c.x=jl(o));const l=o&&!n&&!a?vd(o,s):Hr(0),u=i.left+s.scrollLeft-c.x-l.x,d=i.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:i.width,height:i.height}}function Zl(t){return Rr(t).position==="static"}function wd(t,e){if(!Vr(t)||Rr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return sn(t)===r&&(r=r.ownerDocument.body),r}function _d(t,e){const r=rr(t);if(Hi(t))return r;if(!Vr(t)){let o=kn(t);for(;o&&!Eo(o);){if(Ar(o)&&!Zl(o))return o;o=kn(o)}return r}let n=wd(t,e);for(;n&&mv(n)&&Zl(n);)n=wd(n,e);return n&&Eo(n)&&Zl(n)&&!Fl(n)?r:n||vv(t)||r}const Rv=async function(t){const e=this.getOffsetParent||_d,r=this.getDimensions,n=await r(t.floating);return{reference:Av(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Iv(t){return Rr(t).direction==="rtl"}const Ov={convertOffsetParentRelativeRectToViewportRelativeRect:wv,getDocumentElement:sn,getClippingRect:Cv,getOffsetParent:_d,getElementRects:Rv,getClientRects:_v,getDimensions:Ev,getScale:Ao,isElement:Ar,isRTL:Iv},kd=pv,xd=gv,Sd=fv,Td=(t,e,r)=>{const n=new Map,o={platform:Ov,...r},a={...o.platform,_c:n};return dv(t,e,{...o,platform:a})};function Ul(t,e={enabled:!0}){let{enabled:r,eventType:n,nodeForEvent:o,options:a}=Cd(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=Lt(o,n,i,a)),{update(c){s==null||s(),{enabled:r,eventType:n,nodeForEvent:o,options:a}=Cd(c),r&&(s=Lt(o,n,i,a))},destroy(){s==null||s()}}}function Cd(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 Nv=t=>t;function Ed(t){const e=t-1;return e*e*e+1}function Ad(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Hl(t,{delay:e=0,duration:r=400,easing:n=Nv}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:a=>`opacity: ${a*o}`}}function Ro(t,{delay:e=0,duration:r=400,easing:n=Ed,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),[d,f]=Ad(o),[v,h]=Ad(a);return{delay:e,duration:r,easing:n,css:(m,y)=>`
358
+ `}}}},Symbol.toStringTag,{value:"Module"}));var $e;(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})($e||($e={}));var kl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(kl||(kl={}));const J=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nn=t=>{switch(typeof t){case"undefined":return J.undefined;case"string":return J.string;case"number":return isNaN(t)?J.nan:J.number;case"boolean":return J.boolean;case"function":return J.function;case"bigint":return J.bigint;case"symbol":return J.symbol;case"object":return Array.isArray(t)?J.array:t===null?J.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?J.promise:typeof Map<"u"&&t instanceof Map?J.map:typeof Set<"u"&&t instanceof Set?J.set:typeof Date<"u"&&t instanceof Date?J.date:J.object;default:return J.unknown}},P=$e.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"]),eg=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class tr 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 tr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.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()}}tr.create=t=>new tr(t);const mo=(t,e)=>{let r;switch(t.code){case P.invalid_type:t.received===J.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case P.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:r=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case P.invalid_union:r="Invalid input";break;case P.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case P.invalid_enum_value:r=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case P.invalid_arguments:r="Invalid function arguments";break;case P.invalid_return_type:r="Invalid function return type";break;case P.invalid_date:r="Invalid date";break;case P.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}"`:$e.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case P.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 P.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 P.custom:r="Invalid input";break;case P.invalid_intersection_types:r="Intersection results could not be merged";break;case P.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case P.not_finite:r="Number must be finite";break;default:r=e.defaultError,$e.assertNever(t)}return{message:r}};let Fu=mo;function tg(t){Fu=t}function Ri(){return Fu}const Ii=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}},rg=[];function H(t,e){const r=Ri(),n=Ii({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===mo?void 0:mo].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"}),vo=t=>({status:"dirty",value:t}),jt=t=>({status:"valid",value:t}),xl=t=>t.status==="aborted",Sl=t=>t.status==="dirty",Dn=t=>t.status==="valid",ia=t=>typeof Promise<"u"&&t instanceof Promise;function Oi(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 Bu(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 ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ce||(ce={}));var sa,la;class $r{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 qu=(t,e)=>{if(Dn(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 tr(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 Ne{get description(){return this._def.description}_getType(e){return nn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:nn(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:nn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(ia(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:nn(e)},a=this._parseSync({data:e,path:o.path,parent:o});return qu(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:nn(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:o});return Dn(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=>Dn(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:nn(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(ia(o)?o:Promise.resolve(o));return qu(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:P.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 Er({schema:this,typeName:he.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 Zr.create(this,this._def)}nullable(){return _n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Tr.create(this)}promise(){return _o.create(this,this._def)}or(e){return fa.create([this,e],this._def)}and(e){return ha.create(this,e,this._def)}transform(e){return new Er({...Ce(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new ba({...Ce(this._def),innerType:this,defaultValue:r,typeName:he.ZodDefault})}brand(){return new Cl({typeName:he.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new ya({...Ce(this._def),innerType:this,catchValue:r,typeName:he.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return wa.create(this,e)}readonly(){return _a.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ng=/^c[^\s-]{8,}$/i,og=/^[0-9a-z]+$/,ag=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ig=/^[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,sg=/^[a-z0-9_-]{21}$/i,lg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,cg=/^[-+]?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)?)??$/,ug=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Tl;const 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])$/,hg=/^(?:(?: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]))$/,gg=/^(([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])$/,mg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vg=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$u="((\\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])))",bg=new RegExp(`^${$u}$`);function ju(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 yg(t){return new RegExp(`^${ju(t)}$`)}function Zu(t){let e=`${$u}T${ju(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 wg(t,e){return!!((e==="v4"||!e)&&fg.test(t)||(e==="v6"||!e)&&pg.test(t))}function _g(t,e){if(!lg.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 kg(t,e){return!!((e==="v4"||!e)&&hg.test(t)||(e==="v6"||!e)&&gg.test(t))}class Sr extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==J.string){const a=this._getOrReturnCtx(e);return H(a,{code:P.invalid_type,expected:J.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),H(o,{code:P.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),H(o,{code:P.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?H(o,{code:P.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&H(o,{code:P.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")ug.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Tl||(Tl=new RegExp(dg,"u")),Tl.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")ig.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")sg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")ng.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")og.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")ag.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ulid",code:P.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),H(o,{validation:"url",code:P.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),H(o,{validation:"regex",code:P.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),H(o,{code:P.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),H(o,{code:P.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:P.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Zu(a).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:P.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?bg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:P.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?yg(a).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:P.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?cg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:P.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?wg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:P.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?_g(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:P.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?kg(e.data,a.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:P.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?mg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:P.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?vg.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:P.invalid_string,message:a.message}),n.dirty()):$e.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:P.invalid_string,...ce.errToObj(n)})}_addCheck(e){return new Sr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ce.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ce.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ce.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ce.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ce.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ce.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,...ce.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,...ce.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ce.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ce.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ce.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ce.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ce.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ce.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ce.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ce.errToObj(r)})}nonempty(e){return this.min(1,ce.errToObj(e))}trim(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Sr({...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}}Sr.create=t=>{var e;return new Sr({checks:[],typeName:he.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function xg(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)!==J.number){const a=this._getOrReturnCtx(e);return H(a,{code:P.invalid_type,expected:J.number,received:a.parsedType}),ge}let n;const o=new Mt;for(const a of this._def.checks)a.kind==="int"?$e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:P.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),H(n,{code:P.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),H(n,{code:P.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?xg(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),H(n,{code:P.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:P.not_finite,message:a.message}),o.dirty()):$e.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ce.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ce.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ce.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ce.toString(r))}setLimit(e,r,n,o){return new bn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ce.toString(o)}]})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.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"&&$e.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:he.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)!==J.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),H(n,{code:P.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),H(n,{code:P.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),H(n,{code:P.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):$e.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return H(r,{code:P.invalid_type,expected:J.bigint,received:r.parsedType}),ge}gte(e,r){return this.setLimit("min",e,!0,ce.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ce.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ce.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ce.toString(r))}setLimit(e,r,n,o){return new yn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ce.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:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ce.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:he.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class ca extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==J.boolean){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.boolean,received:n.parsedType}),ge}return jt(e.data)}}ca.create=t=>new ca({typeName:he.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class zn extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==J.date){const a=this._getOrReturnCtx(e);return H(a,{code:P.invalid_type,expected:J.date,received:a.parsedType}),ge}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return H(a,{code:P.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),H(o,{code:P.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),H(o,{code:P.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):$e.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ce.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}}zn.create=t=>new zn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:he.ZodDate,...Ce(t)});class Ni extends Ne{_parse(e){if(this._getType(e)!==J.symbol){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.symbol,received:n.parsedType}),ge}return jt(e.data)}}Ni.create=t=>new Ni({typeName:he.ZodSymbol,...Ce(t)});class ua extends Ne{_parse(e){if(this._getType(e)!==J.undefined){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.undefined,received:n.parsedType}),ge}return jt(e.data)}}ua.create=t=>new ua({typeName:he.ZodUndefined,...Ce(t)});class da extends Ne{_parse(e){if(this._getType(e)!==J.null){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.null,received:n.parsedType}),ge}return jt(e.data)}}da.create=t=>new da({typeName:he.ZodNull,...Ce(t)});class bo extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return jt(e.data)}}bo.create=t=>new bo({typeName:he.ZodAny,...Ce(t)});class Fn extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return jt(e.data)}}Fn.create=t=>new Fn({typeName:he.ZodUnknown,...Ce(t)});class on extends Ne{_parse(e){const r=this._getOrReturnCtx(e);return H(r,{code:P.invalid_type,expected:J.never,received:r.parsedType}),ge}}on.create=t=>new on({typeName:he.ZodNever,...Ce(t)});class Pi extends Ne{_parse(e){if(this._getType(e)!==J.undefined){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.void,received:n.parsedType}),ge}return jt(e.data)}}Pi.create=t=>new Pi({typeName:he.ZodVoid,...Ce(t)});class Tr extends Ne{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==J.array)return H(r,{code:P.invalid_type,expected:J.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)&&(H(r,{code:i?P.too_big:P.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&&(H(r,{code:P.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&&(H(r,{code:P.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 $r(r,i,r.path,s)))).then(i=>Mt.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new $r(r,i,r.path,s)));return Mt.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Tr({...this._def,minLength:{value:e,message:ce.toString(r)}})}max(e,r){return new Tr({...this._def,maxLength:{value:e,message:ce.toString(r)}})}length(e,r){return new Tr({...this._def,exactLength:{value:e,message:ce.toString(r)}})}nonempty(e){return this.min(1,e)}}Tr.create=(t,e)=>new Tr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...Ce(e)});function yo(t){if(t instanceof yt){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Zr.create(yo(n))}return new yt({...t._def,shape:()=>e})}else return t instanceof Tr?new Tr({...t._def,type:yo(t.element)}):t instanceof Zr?Zr.create(yo(t.unwrap())):t instanceof _n?_n.create(yo(t.unwrap())):t instanceof jr?jr.create(t.items.map(e=>yo(e))):t}class yt 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=$e.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==J.object){const l=this._getOrReturnCtx(e);return H(l,{code:P.invalid_type,expected:J.object,received:l.parsedType}),ge}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof on&&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],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new $r(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof on){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&&(H(o,{code:P.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 d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new $r(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>Mt.mergeObjectSync(n,l)):Mt.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return ce.errToObj,new yt({...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=ce.errToObj(e).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(e){return new yt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new yt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:he.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new yt({...this._def,catchall:e})}pick(e){const r={};return $e.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new yt({...this._def,shape:()=>r})}omit(e){const r={};return $e.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new yt({...this._def,shape:()=>r})}deepPartial(){return yo(this)}partial(e){const r={};return $e.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}),new yt({...this._def,shape:()=>r})}required(e){const r={};return $e.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Zr;)a=a._def.innerType;r[n]=a}}),new yt({...this._def,shape:()=>r})}keyof(){return Uu($e.objectKeys(this.shape))}}yt.create=(t,e)=>new yt({shape:()=>t,unknownKeys:"strip",catchall:on.create(),typeName:he.ZodObject,...Ce(e)}),yt.strictCreate=(t,e)=>new yt({shape:()=>t,unknownKeys:"strict",catchall:on.create(),typeName:he.ZodObject,...Ce(e)}),yt.lazycreate=(t,e)=>new yt({shape:t,unknownKeys:"strip",catchall:on.create(),typeName:he.ZodObject,...Ce(e)});class fa 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 tr(s.ctx.common.issues));return H(r,{code:P.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 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 tr(c));return H(r,{code:P.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}}fa.create=(t,e)=>new fa({options:t,typeName:he.ZodUnion,...Ce(e)});const an=t=>t instanceof ga?an(t.schema):t instanceof Er?an(t.innerType()):t instanceof ma?[t.value]:t instanceof wn?t.options:t instanceof va?$e.objectValues(t.enum):t instanceof ba?an(t._def.innerType):t instanceof ua?[void 0]:t instanceof da?[null]:t instanceof Zr?[void 0,...an(t.unwrap())]:t instanceof _n?[null,...an(t.unwrap())]:t instanceof Cl||t instanceof _a?an(t.unwrap()):t instanceof ya?an(t._def.innerType):[];class Li extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.object)return H(r,{code:P.invalid_type,expected:J.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}):(H(r,{code:P.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=an(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 Li({typeName:he.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...Ce(n)})}}function El(t,e){const r=nn(t),n=nn(e);if(t===e)return{valid:!0,data:t};if(r===J.object&&n===J.object){const o=$e.objectKeys(e),a=$e.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const c=El(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(r===J.array&&n===J.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=El(i,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===J.date&&n===J.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ha 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}):(H(n,{code:P.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}))}}ha.create=(t,e,r)=>new ha({left:t,right:e,typeName:he.ZodIntersection,...Ce(r)});class jr extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==J.array)return H(n,{code:P.invalid_type,expected:J.array,received:n.parsedType}),ge;if(n.data.length<this._def.items.length)return H(n,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&n.data.length>this._def.items.length&&(H(n,{code:P.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 $r(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:he.ZodTuple,rest:null,...Ce(e)})};class pa 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!==J.object)return H(n,{code:P.invalid_type,expected:J.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 $r(n,s,n.path,s)),value:i._parse(new $r(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 pa({keyType:e,valueType:r,typeName:he.ZodRecord,...Ce(n)}):new pa({keyType:Sr.create(),valueType:e,typeName:he.ZodRecord,...Ce(r)})}}class Mi 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!==J.map)return H(n,{code:P.invalid_type,expected:J.map,received:n.parsedType}),ge;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new $r(n,s,n.path,[l,"key"])),value:a._parse(new $r(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 ge;(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 ge;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Mi.create=(t,e,r)=>new Mi({valueType:e,keyType:t,typeName:he.ZodMap,...Ce(r)});class Bn extends Ne{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==J.set)return H(n,{code:P.invalid_type,expected:J.set,received:n.parsedType}),ge;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(H(n,{code:P.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&&(H(n,{code:P.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 ge;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 $r(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,r){return new Bn({...this._def,minSize:{value:e,message:ce.toString(r)}})}max(e,r){return new Bn({...this._def,maxSize:{value:e,message:ce.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Bn.create=(t,e)=>new Bn({valueType:t,minSize:null,maxSize:null,typeName:he.ZodSet,...Ce(e)});class wo extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.function)return H(r,{code:P.invalid_type,expected:J.function,received:r.parsedType}),ge;function n(s,c){return Ii({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ri(),mo].filter(l=>!!l),issueData:{code:P.invalid_arguments,argumentsError:c}})}function o(s,c){return Ii({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ri(),mo].filter(l=>!!l),issueData:{code:P.invalid_return_type,returnTypeError:c}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof _o){const s=this;return jt(async function(...c){const l=new tr([]),u=await s._def.args.parseAsync(c,a).catch(v=>{throw l.addIssue(n(c,v)),l}),d=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(v=>{throw l.addIssue(o(d,v)),l})})}else{const s=this;return jt(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new tr([n(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new tr([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new wo({...this._def,args:jr.create(e).rest(Fn.create())})}returns(e){return new wo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new wo({args:e||jr.create([]).rest(Fn.create()),returns:r||Fn.create(),typeName:he.ZodFunction,...Ce(n)})}}class ga 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})}}ga.create=(t,e)=>new ga({getter:t,typeName:he.ZodLazy,...Ce(e)});class ma extends Ne{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:P.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:e.data}}get value(){return this._def.value}}ma.create=(t,e)=>new ma({value:t,typeName:he.ZodLiteral,...Ce(e)});function Uu(t,e){return new wn({values:t,typeName:he.ZodEnum,...Ce(e)})}class wn extends Ne{constructor(){super(...arguments),sa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{expected:$e.joinValues(n),received:r.parsedType,code:P.invalid_type}),ge}if(Oi(this,sa)||Bu(this,sa,new Set(this._def.values)),!Oi(this,sa).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return H(r,{received:r.data,code:P.invalid_enum_value,options:n}),ge}return jt(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})}}sa=new WeakMap,wn.create=Uu;class va extends Ne{constructor(){super(...arguments),la.set(this,void 0)}_parse(e){const r=$e.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==J.string&&n.parsedType!==J.number){const o=$e.objectValues(r);return H(n,{expected:$e.joinValues(o),received:n.parsedType,code:P.invalid_type}),ge}if(Oi(this,la)||Bu(this,la,new Set($e.getValidEnumValues(this._def.values))),!Oi(this,la).has(e.data)){const o=$e.objectValues(r);return H(n,{received:n.data,code:P.invalid_enum_value,options:o}),ge}return jt(e.data)}get enum(){return this._def.values}}la=new WeakMap,va.create=(t,e)=>new va({values:t,typeName:he.ZodNativeEnum,...Ce(e)});class _o extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.promise&&r.common.async===!1)return H(r,{code:P.invalid_type,expected:J.promise,received:r.parsedType}),ge;const n=r.parsedType===J.promise?r.data:Promise.resolve(r.data);return jt(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}_o.create=(t,e)=>new _o({type:t,typeName:he.ZodPromise,...Ce(e)});class Er extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.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=>{H(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 c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?ge:c.status==="dirty"||r.value==="dirty"?vo(c.value):c});{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"?vo(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"?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(!Dn(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=>Dn(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):i);$e.assertNever(o)}}Er.create=(t,e,r)=>new Er({schema:t,typeName:he.ZodEffects,effect:e,...Ce(r)}),Er.createWithPreprocess=(t,e,r)=>new Er({schema:e,effect:{type:"preprocess",transform:t},typeName:he.ZodEffects,...Ce(r)});class Zr extends Ne{_parse(e){return this._getType(e)===J.undefined?jt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zr.create=(t,e)=>new Zr({innerType:t,typeName:he.ZodOptional,...Ce(e)});class _n extends Ne{_parse(e){return this._getType(e)===J.null?jt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:he.ZodNullable,...Ce(e)});class ba extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===J.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ba.create=(t,e)=>new ba({innerType:t,typeName:he.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class ya 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 ia(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new tr(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ya.create=(t,e)=>new ya({innerType:t,typeName:he.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class Di extends Ne{_parse(e){if(this._getType(e)!==J.nan){const n=this._getOrReturnCtx(e);return H(n,{code:P.invalid_type,expected:J.nan,received:n.parsedType}),ge}return{status:"valid",value:e.data}}}Di.create=t=>new Di({typeName:he.ZodNaN,...Ce(t)});const Sg=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 wa 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(),vo(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 wa({in:e,out:r,typeName:he.ZodPipeline})}}class _a extends Ne{_parse(e){const r=this._def.innerType._parse(e),n=o=>(Dn(o)&&(o.value=Object.freeze(o.value)),o);return ia(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}_a.create=(t,e)=>new _a({innerType:t,typeName:he.ZodReadonly,...Ce(e)});function Hu(t,e={},r){return t?bo.create().superRefine((n,o)=>{var a,i;if(!t(n)){const s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&i!==void 0?i:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):bo.create()}const Tg={object:yt.lazycreate};var he;(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"})(he||(he={}));const Eg=(t,e={message:`Input not instance of ${t.name}`})=>Hu(r=>r instanceof t,e),Vu=Sr.create,Gu=bn.create,Cg=Di.create,Ag=yn.create,Wu=ca.create,Rg=zn.create,Ig=Ni.create,Og=ua.create,Ng=da.create,Pg=bo.create,Lg=Fn.create,Mg=on.create,Dg=Pi.create,zg=Tr.create,Fg=yt.create,Bg=yt.strictCreate,qg=fa.create,$g=Li.create,jg=ha.create,Zg=jr.create,Ug=pa.create,Hg=Mi.create,Vg=Bn.create,Gg=wo.create,Wg=ga.create,Kg=ma.create,Yg=wn.create,Qg=va.create,Jg=_o.create,Ku=Er.create,Xg=Zr.create,em=_n.create,tm=Er.createWithPreprocess,rm=wa.create;var B=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:tg,getErrorMap:Ri,makeIssue:Ii,EMPTY_PATH:rg,addIssueToContext:H,ParseStatus:Mt,INVALID:ge,DIRTY:vo,OK:jt,isAborted:xl,isDirty:Sl,isValid:Dn,isAsync:ia,get util(){return $e},get objectUtil(){return kl},ZodParsedType:J,getParsedType:nn,ZodType:Ne,datetimeRegex:Zu,ZodString:Sr,ZodNumber:bn,ZodBigInt:yn,ZodBoolean:ca,ZodDate:zn,ZodSymbol:Ni,ZodUndefined:ua,ZodNull:da,ZodAny:bo,ZodUnknown:Fn,ZodNever:on,ZodVoid:Pi,ZodArray:Tr,ZodObject:yt,ZodUnion:fa,ZodDiscriminatedUnion:Li,ZodIntersection:ha,ZodTuple:jr,ZodRecord:pa,ZodMap:Mi,ZodSet:Bn,ZodFunction:wo,ZodLazy:ga,ZodLiteral:ma,ZodEnum:wn,ZodNativeEnum:va,ZodPromise:_o,ZodEffects:Er,ZodTransformer:Er,ZodOptional:Zr,ZodNullable:_n,ZodDefault:ba,ZodCatch:ya,ZodNaN:Di,BRAND:Sg,ZodBranded:Cl,ZodPipeline:wa,ZodReadonly:_a,custom:Hu,Schema:Ne,ZodSchema:Ne,late:Tg,get ZodFirstPartyTypeKind(){return he},coerce:{string:t=>Sr.create({...t,coerce:!0}),number:t=>bn.create({...t,coerce:!0}),boolean:t=>ca.create({...t,coerce:!0}),bigint:t=>yn.create({...t,coerce:!0}),date:t=>zn.create({...t,coerce:!0})},any:Pg,array:zg,bigint:Ag,boolean:Wu,date:Rg,discriminatedUnion:$g,effect:Ku,enum:Yg,function:Gg,instanceof:Eg,intersection:jg,lazy:Wg,literal:Kg,map:Hg,nan:Cg,nativeEnum:Qg,never:Mg,null:Ng,nullable:em,number:Gu,object:Fg,oboolean:()=>Wu().optional(),onumber:()=>Gu().optional(),optional:Xg,ostring:()=>Vu().optional(),pipeline:rm,preprocess:tm,promise:Jg,record:Ug,set:Vg,strictObject:Bg,string:Vu,symbol:Ig,transformer:Ku,tuple:Zg,undefined:Og,union:qg,unknown:Lg,void:Dg,NEVER:ge,ZodIssueCode:P,quotelessJson:eg,ZodError:tr});const nm=B.object({minRem:B.number(),maxRem:B.number()}),Al=B.object({0:B.string().optional(),50:B.string(),100:B.string(),200:B.string(),300:B.string(),400:B.string(),500:B.string(),600:B.string(),700:B.string(),800:B.string(),900:B.string(),950:B.string(),1e3:B.string().optional()}),Rl=B.object({color:B.string().optional(),background:B.string().optional(),borderWidth:B.string().optional(),borderColor:B.string().optional(),boxShadow:B.string().optional()}),om=B.object({borderRadius:nm.optional(),custom:B.record(B.string(),B.union([B.string(),B.number()])).optional(),hover:Rl.optional(),focus:Rl.optional()}).and(Rl),am=B.object({family:B.string()}),im=B.object({font:am,colors:B.object({brand:Al,highlight:Al,grey:Al}),components:B.record(B.string(),om),svgs:B.record(B.enum(["predefinedQuestion","edit","voteUp","voteDown","retry","message","thread","submit","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","chevronDown","internalLink","externalLink","liip","avatar"]),B.string())}),sm=B.object({label:B.string(),icon:B.string(),url:B.string(),target:B.enum(["_blank","_self"]).optional()}),lm=B.object({showPredefinedQuestions:B.boolean(),customCSS:B.string().optional(),fontURLs:B.string().array().optional(),theme:im,menu:B.record(B.string(),B.array(sm)).optional()}),cm=640,um=1024;let zi=null;const dm=()=>{if(zi)return zi;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return zi=Number(getComputedStyle(t).fontSize.slice(0,-2)),zi},fm=(t,e)=>{const r=dm(),n=cm/r,o=um/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},hm=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),pm=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),gm=new RegExp("(\\d)(\\p{Ll})","gu"),mm=new RegExp("(\\p{L})(\\d)","gu"),vm=/[^\p{L}\d]+/giu,Fi="$1\0$2",bm="";function ym(t,e){let r=t.trim();r=r.replace(hm,Fi).replace(pm,Fi),e!=null&&e.separateNumbers&&(r=r.replace(gm,Fi).replace(mm,Fi)),r=r.replace(vm,"\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 wm(t,e){return xm(t,e==null?void 0:e.prefixCharacters)+ym(t,e).map(km(e==null?void 0:e.locale)).join((e==null?void 0:e.delimiter)??" ")}function _m(t,e){return wm(t,{delimiter:"-",...e})}function km(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function xm(t,e=bm){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 Bi=_m,Sm=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:fm(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+=`--${Bi(t)}-${Bi(a)}:${Sm(i)}; `)}),o},Tm=(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}-${Bi(n)}:${o}`).join("; ")+"; "),r},Em=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",Cm=t=>`--font-family: ${t.family};`,Am=t=>{const e=Cm(t.font),r=Object.entries(t.colors).map(([o,a])=>Em(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>Tm(Bi(o),a)).join("");return[e,r,n].join(" ")},Ol=t=>t.replace("./","").split("/")[0],Nl="q";var ka=(t=>(t.Start="start",t.Chat="chat",t))(ka||{});function Rm(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 Pl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Im(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Om=function(e){return Nm(e)&&!Pm(e)};function Nm(t){return!!t&&typeof t=="object"}function Pm(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Dm(t)}var Lm=typeof Symbol=="function"&&Symbol.for,Mm=Lm?Symbol.for("react.element"):60103;function Dm(t){return t.$$typeof===Mm}function zm(t){return Array.isArray(t)?[]:{}}function xa(t,e){return e.clone!==!1&&e.isMergeableObject(t)?ko(zm(t),t,e):t}function Fm(t,e,r){return t.concat(e).map(function(n){return xa(n,r)})}function Bm(t,e){if(!e.customMerge)return ko;var r=e.customMerge(t);return typeof r=="function"?r:ko}function qm(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Yu(t){return Object.keys(t).concat(qm(t))}function Qu(t,e){try{return e in t}catch{return!1}}function $m(t,e){return Qu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function jm(t,e,r){var n={};return r.isMergeableObject(t)&&Yu(t).forEach(function(o){n[o]=xa(t[o],r)}),Yu(e).forEach(function(o){$m(t,o)||(Qu(t,o)&&r.isMergeableObject(e[o])?n[o]=Bm(o,r)(t[o],e[o],r):n[o]=xa(e[o],r))}),n}function ko(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Fm,r.isMergeableObject=r.isMergeableObject||Om,r.cloneUnlessOtherwiseSpecified=xa;var n=Array.isArray(e),o=Array.isArray(t),a=n===o;return a?n?r.arrayMerge(t,e,r):jm(t,e,r):xa(e,r)}ko.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return ko(n,o,r)},{})};var Zm=ko,Um=Zm;const Ll=Im(Um),xo=[];function Hm(t,e){return{subscribe:Zt(t,e).subscribe}}function Zt(t,e=He){let r=null;const n=new Set;function o(s){if(di(t,s)&&(t=s,r)){const c=!xo.length;for(const l of n)l[1](),xo.push(l,t);if(c){for(let l=0;l<xo.length;l+=2)xo[l][0](xo[l+1]);xo.length=0}}}function a(s){o(s(t))}function i(s,c=He){const l=[s,c];return n.add(l),n.size===1&&(r=e(o,a)||He),s(t),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:o,update:a,subscribe:i}}function Ju(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 Hm(r,(i,s)=>{let c=!1;const l=[];let u=0,d=He;const f=()=>{if(u)return;d();const h=e(n?l[0]:l,i,s);a?i(h):d=typeof h=="function"?h:He},v=o.map((h,m)=>wl(h,y=>{l[m]=y,u&=~(1<<m),c&&f()},()=>{u|=1<<m}));return c=!0,f(),function(){Yo(v),d(),c=!1}})}function Sa(t){let e;return wl(t,r=>e=r)(),e}function So(t){A(t,t.v+1)}function Vm(t){let e=0,r=vt(0),n;return()=>{ip()&&(p(r),Jr(()=>(e===0&&(n=Yt(()=>t(()=>So(r)))),e+=1,()=>{al().then(()=>{e-=1,e===0&&(n==null||n(),n=void 0)})})))}}const Gm=(()=>{const t=Object.assign({"./alva/alva-light-config.ts":Yp,"./default/default-light-config.ts":Qp}),e=Object.assign({"./default/default-dark-config.ts":Jp,"./liipgpt/liipgpt-dark-config.ts":Xp}),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,Ll(Ai,i))}),Object.entries(e).forEach(([a,{config:i}])=>{const s=Ol(a);r.push(s),o.set(s,Ll(zu,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}]}))})(),Xu=Zt(void 0),ed=(t,e)=>{const r=Gm[t][e];if(!r)throw new Error(`Config for ${t} not found`);const n=lm.safeParse(r);return n.error&&console.warn("Incomplete config",n.error),Xu.set(r),{config:r,themeString:Am(r.theme)}},Ta=Xu;var Wm=te('<div aria-hidden="true"><!></div>');function Qt(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ta,"$config",r);let o=x(e,"name",7),a=x(e,"class",7);var i=Wm(),s=N(i);return po(s,()=>n().theme.svgs[o()]),O(i),ue(()=>kr(i,`svg svg--${o()??""} ${a()??""}`)),T(t,i),Ie({get name(){return o()},set name(c){o(c),_()},get class(){return a()},set class(c){a(c),_()}})}Oe(Qt,{name:{},class:{}},[],[],!0);const Ml={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",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",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",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",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:Ml},Symbol.toStringTag,{value:"Module"})),Ym=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"})),Qm=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"})),Jm=B.object({predefinedQuestions:B.string(),introductionTitle:B.string(),referenceTitle:B.string(),chatInputPlaceholder:B.string(),chatInputSubmit:B.string(),referenceLink:B.string(),newChat:B.string(),messageBotLoading:B.string(),messageBotError:B.string(),messageBotDefaultError:B.string(),chatFooterText:B.string().optional(),scrollToBottom:B.string(),openMenu:B.string(),closeMenu:B.string(),send:B.string(),thankYouForFeedback:B.string(),giveFeedback:B.string(),sendFeedback:B.string(),feedbackFormTitle:B.string(),feedbackFormMessage:B.string(),feedbackFormMessagePlaceholder:B.string(),feedbackFormEmail:B.string(),feedbackFormEmailPlaceholder:B.string(),answerGood:B.string(),answerBad:B.string(),classificationSubmit:B.string(),classificationThankYou:B.string(),classificationTitle:B.string(),selectLanguage:B.string(),languageNames:B.record(B.string(),B.string())}),Xm=(()=>{const e=Object.entries(Object.assign({"./alva/alva-translations.ts":Ym,"./default/default-translations.ts":Km,"./liipgpt/liipgpt-translations.ts":Qm})).map(([r,{translations:n}])=>[Ol(r),Ll(Ml,n)]);return Object.fromEntries(e)})(),td=t=>new Proxy(t,{get(e,r){return typeof r=="string"&&e[r]===void 0?r.toUpperCase():e[r]}}),rd=Zt(td({})),ev=["en","de","fr","it"],Dl="en",qi=t=>ev.includes(t),Ea=Zt(""),nd=t=>{const e=Sa(Ea);if(e&&qi(e))return e;if(t&&qi(t))return t;const r=navigator.language.split("-")[0];return r&&qi(r)?r:Dl},tv=async(t,e)=>{if(!e)throw new Error("org is required");const r=qi(t)?t:nd(t),n=Xm[e];let o=n[r];o||(console.warn(`Translation not found for ${r}, switching to ${Dl}`),o=n[Dl]);const a=Jm.safeParse(o);a.error&&console.error("Translation is invalid",a.error),rd.set(td(o))},rv=t=>{Ea.set(t)},Ur=rd,zl=Math.min,To=Math.max,$i=Math.round,Hr=t=>({x:t,y:t}),nv={left:"right",right:"left",bottom:"top",top:"bottom"},ov={start:"end",end:"start"};function od(t,e,r){return To(t,zl(e,r))}function ji(t,e){return typeof t=="function"?t(e):t}function qn(t){return t.split("-")[0]}function Zi(t){return t.split("-")[1]}function ad(t){return t==="x"?"y":"x"}function id(t){return t==="y"?"height":"width"}function Eo(t){return["top","bottom"].includes(qn(t))?"y":"x"}function sd(t){return ad(Eo(t))}function av(t,e,r){r===void 0&&(r=!1);const n=Zi(t),o=sd(t),a=id(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Ui(i)),[i,Ui(i)]}function iv(t){const e=Ui(t);return[Fl(t),e,Fl(e)]}function Fl(t){return t.replace(/start|end/g,e=>ov[e])}function sv(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 lv(t,e,r,n){const o=Zi(t);let a=sv(qn(t),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),e&&(a=a.concat(a.map(Fl)))),a}function Ui(t){return t.replace(/left|right|bottom|top/g,e=>nv[e])}function cv(t){return{top:0,right:0,bottom:0,left:0,...t}}function uv(t){return typeof t!="number"?cv(t):{top:t,right:t,bottom:t,left:t}}function Hi(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 ld(t,e,r){let{reference:n,floating:o}=t;const a=Eo(e),i=sd(e),s=id(i),c=qn(e),l=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(c){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(Zi(e)){case"start":v[i]-=f*(r&&l?-1:1);break;case"end":v[i]+=f*(r&&l?-1:1);break}return v}const dv=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:d}=ld(l,n,c),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:I,reset:S}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:v,rects:l,platform:i,elements:{reference:t,floating:e}});u=b??u,d=w??d,v={...v,[y]:{...v[y],...I}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):S.rects),{x:u,y:d}=ld(l,f,c)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:v}};async function cd(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:d="floating",altBoundary:f=!1,padding:v=0}=ji(e,t),h=uv(v),y=s[f?d==="floating"?"reference":"floating":d],g=Hi(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})),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)),I=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},S=Hi(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:c}):b);return{top:(g.top-S.top+h.top)/I.y,bottom:(S.bottom-g.bottom+h.bottom)/I.y,left:(g.left-S.left+h.left)/I.x,right:(S.right-g.right+h.right)/I.x}}const fv=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:d=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=ji(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=qn(o),b=Eo(s),w=qn(s)===s,I=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=f||(w||!m?[Ui(s)]:iv(s)),k=h!=="none";!f&&k&&S.push(...lv(s,m,h,I));const z=[s,...S],L=await cd(e,y),V=[];let G=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&V.push(L[g]),d){const C=av(o,i,I);V.push(L[C[0]],L[C[1]])}if(G=[...G,{placement:o,overflows:V}],!V.every(C=>C<=0)){var $,ee;const C=((($=a.flip)==null?void 0:$.index)||0)+1,Ee=z[C];if(Ee)return{data:{index:C,overflows:G},reset:{placement:Ee}};let ie=(ee=G.filter(Z=>Z.overflows[0]<=0).sort((Z,D)=>Z.overflows[1]-D.overflows[1])[0])==null?void 0:ee.placement;if(!ie)switch(v){case"bestFit":{var fe;const Z=(fe=G.filter(D=>{if(k){const Y=Eo(D.placement);return Y===b||Y==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(Y=>Y>0).reduce((Y,F)=>Y+F,0)]).sort((D,Y)=>D[1]-Y[1])[0])==null?void 0:fe[0];Z&&(ie=Z);break}case"initialPlacement":ie=s;break}if(o!==ie)return{reset:{placement:ie}}}return{}}}};async function hv(t,e){const{placement:r,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=qn(r),s=Zi(r),c=Eo(r)==="y",l=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,d=ji(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),c?{x:v*u,y:f*l}:{x:f*l,y:v*u}}const pv=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 hv(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}}}}},gv=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}}},...c}=ji(t,e),l={x:r,y:n},u=await cd(e,c),d=Eo(qn(o)),f=ad(d);let v=l[f],h=l[d];if(a){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],w=v-u[g];v=od(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=od(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 Vi(){return typeof window<"u"}function Co(t){return ud(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=(ud(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ud(t){return Vi()?t instanceof Node||t instanceof rr(t).Node:!1}function Cr(t){return Vi()?t instanceof Element||t instanceof rr(t).Element:!1}function Vr(t){return Vi()?t instanceof HTMLElement||t instanceof rr(t).HTMLElement:!1}function dd(t){return!Vi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof rr(t).ShadowRoot}function Ca(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Ar(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function mv(t){return["table","td","th"].includes(Co(t))}function Gi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Bl(t){const e=ql(),r=Cr(t)?Ar(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 vv(t){let e=kn(t);for(;Vr(e)&&!Ao(e);){if(Bl(e))return e;if(Gi(e))return null;e=kn(e)}return null}function ql(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ao(t){return["html","body","#document"].includes(Co(t))}function Ar(t){return rr(t).getComputedStyle(t)}function Wi(t){return Cr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kn(t){if(Co(t)==="html")return t;const e=t.assignedSlot||t.parentNode||dd(t)&&t.host||sn(t);return dd(e)?e.host:e}function fd(t){const e=kn(t);return Ao(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Ca(e)?e:fd(e)}function $l(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=fd(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=rr(o);if(a){const s=jl(i);return e.concat(i,i.visualViewport||[],Ca(o)?o:[],s&&r?$l(s):[])}return e.concat(o,$l(o,[],r))}function jl(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function hd(t){const e=Ar(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=$i(r)!==a||$i(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function pd(t){return Cr(t)?t:t.contextElement}function Ro(t){const e=pd(t);if(!Vr(e))return Hr(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:a}=hd(e);let i=(a?$i(r.width):r.width)/n,s=(a?$i(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const bv=Hr(0);function gd(t){const e=rr(t);return!ql()||!e.visualViewport?bv:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function yv(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==rr(t)?!1:e}function Aa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),a=pd(t);let i=Hr(1);e&&(n?Cr(n)&&(i=Ro(n)):i=Ro(t));const s=yv(a,r,n)?gd(a):Hr(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const f=rr(a),v=n&&Cr(n)?rr(n):n;let h=f,m=jl(h);for(;m&&n&&v!==h;){const y=Ro(m),g=m.getBoundingClientRect(),b=Ar(m),w=g.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,I=g.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=w,l+=I,h=rr(m),m=jl(h)}}return Hi({width:u,height:d,x:c,y:l})}function Zl(t,e){const r=Wi(t).scrollLeft;return e?e.left+r:Aa(sn(t)).left+r}function md(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:Zl(t,n)),a=n.top+e.scrollTop;return{x:o,y:a}}function wv(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=sn(n),s=e?Gi(e.floating):!1;if(n===i||s&&a)return r;let c={scrollLeft:0,scrollTop:0},l=Hr(1);const u=Hr(0),d=Vr(n);if((d||!d&&!a)&&((Co(n)!=="body"||Ca(i))&&(c=Wi(n)),Vr(n))){const v=Aa(n);l=Ro(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const f=i&&!d&&!a?md(i,c,!0):Hr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _v(t){return Array.from(t.getClientRects())}function kv(t){const e=sn(t),r=Wi(t),n=t.ownerDocument.body,o=To(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=To(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Zl(t);const s=-r.scrollTop;return Ar(n).direction==="rtl"&&(i+=To(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function xv(t,e){const r=rr(t),n=sn(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=ql();(!l||l&&e==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function Sv(t,e){const r=Aa(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,a=Vr(t)?Ro(t):Hr(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 vd(t,e,r){let n;if(e==="viewport")n=xv(t,r);else if(e==="document")n=kv(sn(t));else if(Cr(e))n=Sv(e,r);else{const o=gd(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Hi(n)}function bd(t,e){const r=kn(t);return r===e||!Cr(r)||Ao(r)?!1:Ar(r).position==="fixed"||bd(r,e)}function Tv(t,e){const r=e.get(t);if(r)return r;let n=$l(t,[],!1).filter(s=>Cr(s)&&Co(s)!=="body"),o=null;const a=Ar(t).position==="fixed";let i=a?kn(t):t;for(;Cr(i)&&!Ao(i);){const s=Ar(i),c=Bl(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ca(i)&&!c&&bd(t,i))?n=n.filter(u=>u!==i):o=s,i=kn(i)}return e.set(t,n),n}function Ev(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const i=[...r==="clippingAncestors"?Gi(e)?[]:Tv(e,this._c):[].concat(r),n],s=i[0],c=i.reduce((l,u)=>{const d=vd(e,u,o);return l.top=To(d.top,l.top),l.right=zl(d.right,l.right),l.bottom=zl(d.bottom,l.bottom),l.left=To(d.left,l.left),l},vd(e,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Cv(t){const{width:e,height:r}=hd(t);return{width:e,height:r}}function Av(t,e,r){const n=Vr(e),o=sn(e),a=r==="fixed",i=Aa(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const c=Hr(0);if(n||!n&&!a)if((Co(e)!=="body"||Ca(o))&&(s=Wi(e)),n){const f=Aa(e,!0,a,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else o&&(c.x=Zl(o));const l=o&&!n&&!a?md(o,s):Hr(0),u=i.left+s.scrollLeft-c.x-l.x,d=i.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:i.width,height:i.height}}function Ul(t){return Ar(t).position==="static"}function yd(t,e){if(!Vr(t)||Ar(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return sn(t)===r&&(r=r.ownerDocument.body),r}function wd(t,e){const r=rr(t);if(Gi(t))return r;if(!Vr(t)){let o=kn(t);for(;o&&!Ao(o);){if(Cr(o)&&!Ul(o))return o;o=kn(o)}return r}let n=yd(t,e);for(;n&&mv(n)&&Ul(n);)n=yd(n,e);return n&&Ao(n)&&Ul(n)&&!Bl(n)?r:n||vv(t)||r}const Rv=async function(t){const e=this.getOffsetParent||wd,r=this.getDimensions,n=await r(t.floating);return{reference:Av(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Iv(t){return Ar(t).direction==="rtl"}const Ov={convertOffsetParentRelativeRectToViewportRelativeRect:wv,getDocumentElement:sn,getClippingRect:Ev,getOffsetParent:wd,getElementRects:Rv,getClientRects:_v,getDimensions:Cv,getScale:Ro,isElement:Cr,isRTL:Iv},_d=pv,kd=gv,xd=fv,Sd=(t,e,r)=>{const n=new Map,o={platform:Ov,...r},a={...o.platform,_c:n};return dv(t,e,{...o,platform:a})};function Hl(t,e={enabled:!0}){let{enabled:r,eventType:n,nodeForEvent:o,options:a}=Td(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=Lt(o,n,i,a)),{update(c){s==null||s(),{enabled:r,eventType:n,nodeForEvent:o,options:a}=Td(c),r&&(s=Lt(o,n,i,a))},destroy(){s==null||s()}}}function Td(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 Nv=t=>t;function Ed(t){const e=t-1;return e*e*e+1}function Cd(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Ad(t,{delay:e=0,duration:r=400,easing:n=Nv}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:a=>`opacity: ${a*o}`}}function Io(t,{delay:e=0,duration:r=400,easing:n=Ed,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),[d,f]=Cd(o),[v,h]=Cd(a);return{delay:e,duration:r,easing:n,css:(m,y)=>`
359
359
  transform: ${l} translate(${(1-m)*d}${f}, ${(1-m)*v}${h});
360
- opacity: ${c-u*y}`}}function Pv(t,{delay:e=0,duration:r=400,easing:n=Ed,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)}`),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*c}px;padding-${l[0]}: ${g*d}px;padding-${l[1]}: ${g*f}px;margin-${l[0]}: ${g*v}px;margin-${l[1]}: ${g*h}px;border-${l[0]}-width: ${g*m}px;border-${l[1]}-width: ${g*y}px;`}}var Lv=(t,e)=>(t.stopPropagation(),R(e,!p(e))),Mv=J('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),Dv=(t,e,r)=>e(p(r)),zv=J('<li><button class="chat-menu__item transition-colors"><!> <span> </span></button></li>'),Fv=J('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),Bv=J('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),qv=J('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function Rd(t,e){var L,G,W;Ae(e,!0);const r=$t(),n=()=>vt(Sa,"$config",r),o=()=>vt(Ur,"$t",r),a=()=>vt(Ta,"$selectedLanguageStore",r);let i=x(e,"menu",7),s=x(e,"usedLanguages",7),c=x(e,"currentLanguage",7),l=x(e,"onLanguageChange",7),u=ke(!1),d,f=ke(void 0);const v={duration:Number((L=n().theme.components.referenceNumberContent.custom)==null?void 0:L.transitionDuration)||200,delay:Number((G=n().theme.components.referenceNumberContent.custom)==null?void 0:G.transitionDelay)||0,y:Number((W=n().theme.components.referenceNumberContent.custom)==null?void 0:W.transitionY)||10},h=async()=>{if(!d||!p(f))return;const{x:$,y:re}=await Td(d,p(f),{placement:"top",middleware:[kd(8),Sd(),xd({padding:8})]});Object.assign(p(f).style,{left:`${$}px`,top:`${re}px`})};wt(()=>{p(u)&&h()}),wt(()=>{Ta.set(c())});const m=$=>{l()&&(l()($),Ta.set($),R(u,!1))};var y=qv(),g=P(y);g.__click=[Lv,u];var b=P(g),w=P(b,!0);O(b);var I=se(b,2),S=Se(()=>p(u)?"dismiss":"menu");Qt(I,{get name(){return p(S)}}),O(g),qr(g,$=>d=$,()=>d),_i(g,$=>Ul==null?void 0:Ul($));var k=se(g,2);{var M=$=>{var re=Bv(),de=P(re);_r(de,21,()=>i()??[],Dr,(V,Z)=>{var z=Mv(),K=P(z),q=P(K);Qt(q,{get name(){return p(Z).icon},class:"chat-menu__item-icon"});var ne=se(q,2),Te=P(ne,!0);O(ne),O(K),O(z),le(()=>{Ce(K,"href",p(Z).url),Ce(K,"target",p(Z).target),je(Te,p(Z).label)}),T(V,z)}),O(de);var C=se(de,2);{var he=V=>{var Z=Fv(),z=se(U(Z),2),K=P(z,!0);O(z);var q=se(z,2);_r(q,21,s,Dr,(ne,Te)=>{var it=zv(),tt=P(it);tt.__click=[Dv,m,Te];var ut=P(tt);Qt(ut,{name:"internalLink",class:"chat-menu__item-icon"});var It=se(ut,2),nt=P(It,!0);O(It),O(tt),O(it),le(()=>{Fr(tt,"active",a()===p(Te)),je(nt,Ll[p(Te)].languageNames[p(Te)])}),T(ne,it)}),O(q),le(()=>je(K,o().selectLanguage)),T(V,Z)};fe(C,V=>{s().length>0&&V(he)})}O(re),qr(re,V=>R(f,V),()=>p(f)),xr(3,re,()=>Ro,()=>v),T($,re)};fe(k,$=>{p(u)&&$(M)})}return O(y),le(()=>je(w,p(u)?o().closeMenu:o().openMenu)),ct("clickoutside",g,()=>R(u,!1)),T(t,y),Re({get menu(){return i()},set menu($){i($),_()},get usedLanguages(){return s()},set usedLanguages($){s($),_()},get currentLanguage(){return c()},set currentLanguage($){c($),_()},get onLanguageChange(){return l()},set onLanguageChange($){l($),_()}})}Mn(["click"]),Ie(Rd,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const $v=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var jv=J('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit" class="chat-input__submit-button transition-colors"><!></button></form>');function Vl(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"class",7),a=x(e,"onSubmit",7),i=Sr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),s=ke(""),c=Se(()=>p(s)!==""),l,u;const d=w=>{w.preventDefault(),p(s)&&(a()(p(s)),R(s,""),f())},f=()=>{l.style.height="auto"},v=()=>{f();const w=parseInt(getComputedStyle(l).borderWidth)*2;l.style.height=`${l.scrollHeight+w}px`};wt(()=>{if(l)return u=new ResizeObserver(()=>{v()}),u.observe(l),()=>{u.disconnect()}});var h=jv();ct("resize",Jo,v);let m;var y=P(h);bu(y),y.__input=v,y.__change=v,y.__keydown=[$v,d],Ce(y,"rows",1),qr(y,w=>l=w,()=>l);var g=se(y,2),b=P(g);return Qt(b,{name:"submit",class:"chat-input__submit-icon"}),O(g),O(h),le(()=>{m=qt(h,m,{name:"chat-input",onsubmit:d,class:`chat-input ${o()??""}`,...i}),Ce(y,"placeholder",n().chatInputPlaceholder),Ce(g,"aria-label",n().chatInputSubmit),g.disabled=!p(c),Fr(g,"chat-input__submit-button--deactivated",!p(c))}),gl(y,()=>p(s),w=>R(s,w)),T(t,h),Re({get class(){return o()},set class(w){o(w),_()},get onSubmit(){return a()},set onSubmit(w){a(w),_()}})}Mn(["input","change","keydown"]),Ie(Vl,{class:{},onSubmit:{}},[],[],!0);const Io=new Map;class Zv{get length(){return Io.size}clear(){Io.clear()}getItem(e){return Io.get(e)||null}key(e){return Array.from(Io.keys())[e]||null}removeItem(e){Io.delete(e)}setItem(e,r){Io.set(e,String(r))}}const Gl=globalThis.localStorage??new Zv;function Wl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let $n=Wl();function Id(t){$n=t}const Aa={exec:()=>null};function Xe(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")},Uv=/^(?:[ \t]*(?:\n|$))+/,Hv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ra=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Od=/(?:[*+-]|\d{1,9}[.)])/,Nd=Xe(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Od).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(),Kl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wv=/^[^\n]+/,Yl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Kv=Xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yv=Xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Od).getRegex(),Gi="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",Ql=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qv=Xe("^ {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",Ql).replace("tag",Gi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pd=Xe(Kl).replace("hr",Ra).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",Gi).getRegex(),Jl={blockquote:Xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pd).getRegex(),code:Hv,def:Kv,fences:Vv,heading:Gv,hr:Ra,html:Qv,lheading:Nd,list:Yv,newline:Uv,paragraph:Pd,table:Aa,text:Wv},Ld=Xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ra).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",Gi).getRegex(),Jv={...Jl,table:Ld,paragraph:Xe(Kl).replace("hr",Ra).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",Gi).getRegex()},Xv={...Jl,html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ql).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:Aa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xe(Kl).replace("hr",Ra).replace("heading",` *#{1,6} *[^
361
- ]`).replace("lheading",Nd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},eb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Md=/^( {2,}|\\)\n(?!\s*$)/,rb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wi=/[\p{P}\p{S}]/u,Xl=/[\s\p{P}\p{S}]/u,Dd=/[^\s\p{P}\p{S}]/u,nb=Xe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xl).getRegex(),ob=/(?!~)[\p{P}\p{S}]/u,ab=/(?!~)[\s\p{P}\p{S}]/u,ib=/(?:[^\s\p{P}\p{S}]|~)/u,sb=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lb=Xe(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,Wi).getRegex(),zd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cb=Xe(zd,"gu").replace(/notPunctSpace/g,Dd).replace(/punctSpace/g,Xl).replace(/punct/g,Wi).getRegex(),ub=Xe(zd,"gu").replace(/notPunctSpace/g,ib).replace(/punctSpace/g,ab).replace(/punct/g,ob).getRegex(),db=Xe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Dd).replace(/punctSpace/g,Xl).replace(/punct/g,Wi).getRegex(),fb=Xe(/\\(punct)/,"gu").replace(/punct/g,Wi).getRegex(),hb=Xe(/^<(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(),pb=Xe(Ql).replace("(?:-->|$)","-->").getRegex(),gb=Xe("^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",pb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ki=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,mb=Xe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ki).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fd=Xe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ki).replace("ref",Yl).getRegex(),Bd=Xe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yl).getRegex(),vb=Xe("reflink|nolink(?!\\()","g").replace("reflink",Fd).replace("nolink",Bd).getRegex(),ec={_backpedal:Aa,anyPunctuation:fb,autolink:hb,blockSkip:sb,br:Md,code:tb,del:Aa,emStrongLDelim:lb,emStrongRDelimAst:cb,emStrongRDelimUnd:db,escape:eb,link:mb,nolink:Bd,punctuation:nb,reflink:Fd,reflinkSearch:vb,tag:gb,text:rb,url:Aa},bb={...ec,link:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ki).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ki).getRegex()},tc={...ec,emStrongRDelimAst:ub,url:Xe(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},yb={...tc,br:Xe(Md).replace("{2,}","*").getRegex(),text:Xe(tc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Yi={normal:Jl,gfm:Jv,pedantic:Xv},Ia={normal:ec,gfm:tc,breaks:yb,pedantic:bb},wb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qd=t=>wb[t];function Gr(t,e){if(e){if(Ut.escapeTest.test(t))return t.replace(Ut.escapeReplace,qd)}else if(Ut.escapeTestNoEncode.test(t))return t.replace(Ut.escapeReplaceNoEncode,qd);return t}function $d(t){try{t=encodeURI(t).replace(Ut.percentDecode,"%")}catch{return null}return t}function jd(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 Oa(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 _b(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 Zd(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 kb(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const o=n[1];return e.split(`
360
+ opacity: ${c-u*y}`}}function Pv(t,{delay:e=0,duration:r=400,easing:n=Ed,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)}`),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*c}px;padding-${l[0]}: ${g*d}px;padding-${l[1]}: ${g*f}px;margin-${l[0]}: ${g*v}px;margin-${l[1]}: ${g*h}px;border-${l[0]}-width: ${g*m}px;border-${l[1]}-width: ${g*y}px;`}}var Lv=(t,e)=>(t.stopPropagation(),A(e,!p(e))),Mv=te('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),Dv=(t,e,r)=>e(p(r)),zv=te('<li><button class="chat-menu__item transition-colors"><!> <span> </span></button></li>'),Fv=te('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),Bv=te('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),qv=te('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function Rd(t,e){var L,V,G;Re(e,!0);const r=$t(),n=()=>bt(Ta,"$config",r),o=()=>bt(Ur,"$t",r),a=()=>bt(Ea,"$selectedLanguageStore",r);let i=x(e,"menu",7),s=x(e,"usedLanguages",7),c=x(e,"currentLanguage",7),l=x(e,"onLanguageChange",7),u=we(!1),d,f=we(void 0);const v={duration:Number((L=n().theme.components.referenceNumberContent.custom)==null?void 0:L.transitionDuration)||200,delay:Number((V=n().theme.components.referenceNumberContent.custom)==null?void 0:V.transitionDelay)||0,y:Number((G=n().theme.components.referenceNumberContent.custom)==null?void 0:G.transitionY)||10},h=async()=>{if(!d||!p(f))return;const{x:$,y:ee}=await Sd(d,p(f),{placement:"top",middleware:[_d(8),xd(),kd({padding:8})]});Object.assign(p(f).style,{left:`${$}px`,top:`${ee}px`})};_t(()=>{p(u)&&h()}),_t(()=>{Ea.set(c())});const m=$=>{l()&&(l()($),Ea.set($),A(u,!1))};var y=qv(),g=N(y);g.__click=[Lv,u];var b=N(g),w=N(b,!0);O(b);var I=ne(b,2),S=Se(()=>p(u)?"dismiss":"menu");Qt(I,{get name(){return p(S)}}),O(g),qr(g,$=>d=$,()=>d),ki(g,$=>Hl==null?void 0:Hl($));var k=ne(g,2);{var z=$=>{var ee=Bv(),fe=N(ee);_r(fe,21,()=>i()??[],Mr,(ie,Z)=>{var D=Mv(),Y=N(D),F=N(Y);Qt(F,{get name(){return p(Z).icon},class:"chat-menu__item-icon"});var re=ne(F,2),pe=N(re,!0);O(re),O(Y),O(D),ue(()=>{Te(Y,"href",p(Z).url),Te(Y,"target",p(Z).target),qe(pe,p(Z).label)}),T(ie,D)}),O(fe);var C=ne(fe,2);{var Ee=ie=>{var Z=Fv(),D=ne(U(Z),2),Y=N(D,!0);O(D);var F=ne(D,2);_r(F,21,s,Mr,(re,pe)=>{var ze=zv(),Pe=N(ze);Pe.__click=[Dv,m,pe];var Ze=N(Pe);Qt(Ze,{name:"internalLink",class:"chat-menu__item-icon"});var Je=ne(Ze,2),Ue=N(Je,!0);O(Je),O(Pe),O(ze),ue(()=>{zr(Pe,"active",a()===p(pe)),qe(Ue,Ml[p(pe)].languageNames[p(pe)])}),T(re,ze)}),O(F),ue(()=>qe(Y,o().selectLanguage)),T(ie,Z)};de(C,ie=>{s().length>0&&ie(Ee)})}O(ee),qr(ee,ie=>A(f,ie),()=>p(f)),Br(3,ee,()=>Io,()=>v),T($,ee)};de(k,$=>{p(u)&&$(z)})}return O(y),ue(()=>qe(w,p(u)?o().closeMenu:o().openMenu)),dt("clickoutside",g,()=>A(u,!1)),T(t,y),Ie({get menu(){return i()},set menu($){i($),_()},get usedLanguages(){return s()},set usedLanguages($){s($),_()},get currentLanguage(){return c()},set currentLanguage($){c($),_()},get onLanguageChange(){return l()},set onLanguageChange($){l($),_()}})}Mn(["click"]),Oe(Rd,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const $v=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var jv=te('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit" class="chat-input__submit-button transition-colors"><!></button></form>');function Vl(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"class",7),a=x(e,"onSubmit",7),i=xr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),s=we(""),c=Se(()=>p(s)!==""),l,u;const d=w=>{w.preventDefault(),p(s)&&(a()(p(s)),A(s,""),f())},f=()=>{l.style.height="auto"},v=()=>{f();const w=parseInt(getComputedStyle(l).borderWidth)*2;l.style.height=`${l.scrollHeight+w}px`};_t(()=>{if(l)return u=new ResizeObserver(()=>{v()}),u.observe(l),()=>{u.disconnect()}});var h=jv();dt("resize",Jo,v);let m;var y=N(h);ll(y),y.__input=v,y.__change=v,y.__keydown=[$v,d],Te(y,"rows",1),qr(y,w=>l=w,()=>l);var g=ne(y,2),b=N(g);return Qt(b,{name:"submit",class:"chat-input__submit-icon"}),O(g),O(h),ue(()=>{m=qt(h,m,{name:"chat-input",onsubmit:d,class:`chat-input ${o()??""}`,...i}),Te(y,"placeholder",n().chatInputPlaceholder),Te(g,"aria-label",n().chatInputSubmit),g.disabled=!p(c),zr(g,"chat-input__submit-button--deactivated",!p(c))}),aa(y,()=>p(s),w=>A(s,w)),T(t,h),Ie({get class(){return o()},set class(w){o(w),_()},get onSubmit(){return a()},set onSubmit(w){a(w),_()}})}Mn(["input","change","keydown"]),Oe(Vl,{class:{},onSubmit:{}},[],[],!0);const Oo=new Map;class Zv{get length(){return Oo.size}clear(){Oo.clear()}getItem(e){return Oo.get(e)||null}key(e){return Array.from(Oo.keys())[e]||null}removeItem(e){Oo.delete(e)}setItem(e,r){Oo.set(e,String(r))}}const Gl=globalThis.localStorage??new Zv;function Wl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let $n=Wl();function Id(t){$n=t}const Ra={exec:()=>null};function ot(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")},Uv=/^(?:[ \t]*(?:\n|$))+/,Hv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ia=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Od=/(?:[*+-]|\d{1,9}[.)])/,Nd=ot(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Od).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(),Kl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wv=/^[^\n]+/,Yl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Kv=ot(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yv=ot(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Od).getRegex(),Ki="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",Ql=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qv=ot("^ {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",Ql).replace("tag",Ki).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pd=ot(Kl).replace("hr",Ia).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",Ki).getRegex(),Jl={blockquote:ot(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pd).getRegex(),code:Hv,def:Kv,fences:Vv,heading:Gv,hr:Ia,html:Qv,lheading:Nd,list:Yv,newline:Uv,paragraph:Pd,table:Ra,text:Wv},Ld=ot("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ia).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",Ki).getRegex(),Jv={...Jl,table:Ld,paragraph:ot(Kl).replace("hr",Ia).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",Ki).getRegex()},Xv={...Jl,html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ql).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:Ra,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(Kl).replace("hr",Ia).replace("heading",` *#{1,6} *[^
361
+ ]`).replace("lheading",Nd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},eb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Md=/^( {2,}|\\)\n(?!\s*$)/,rb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Yi=/[\p{P}\p{S}]/u,Xl=/[\s\p{P}\p{S}]/u,Dd=/[^\s\p{P}\p{S}]/u,nb=ot(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xl).getRegex(),ob=/(?!~)[\p{P}\p{S}]/u,ab=/(?!~)[\s\p{P}\p{S}]/u,ib=/(?:[^\s\p{P}\p{S}]|~)/u,sb=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lb=ot(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,Yi).getRegex(),zd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cb=ot(zd,"gu").replace(/notPunctSpace/g,Dd).replace(/punctSpace/g,Xl).replace(/punct/g,Yi).getRegex(),ub=ot(zd,"gu").replace(/notPunctSpace/g,ib).replace(/punctSpace/g,ab).replace(/punct/g,ob).getRegex(),db=ot("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Dd).replace(/punctSpace/g,Xl).replace(/punct/g,Yi).getRegex(),fb=ot(/\\(punct)/,"gu").replace(/punct/g,Yi).getRegex(),hb=ot(/^<(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(),pb=ot(Ql).replace("(?:-->|$)","-->").getRegex(),gb=ot("^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",pb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,mb=ot(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Qi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fd=ot(/^!?\[(label)\]\[(ref)\]/).replace("label",Qi).replace("ref",Yl).getRegex(),Bd=ot(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yl).getRegex(),vb=ot("reflink|nolink(?!\\()","g").replace("reflink",Fd).replace("nolink",Bd).getRegex(),ec={_backpedal:Ra,anyPunctuation:fb,autolink:hb,blockSkip:sb,br:Md,code:tb,del:Ra,emStrongLDelim:lb,emStrongRDelimAst:cb,emStrongRDelimUnd:db,escape:eb,link:mb,nolink:Bd,punctuation:nb,reflink:Fd,reflinkSearch:vb,tag:gb,text:rb,url:Ra},bb={...ec,link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",Qi).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qi).getRegex()},tc={...ec,emStrongRDelimAst:ub,url:ot(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},yb={...tc,br:ot(Md).replace("{2,}","*").getRegex(),text:ot(tc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ji={normal:Jl,gfm:Jv,pedantic:Xv},Oa={normal:ec,gfm:tc,breaks:yb,pedantic:bb},wb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qd=t=>wb[t];function Gr(t,e){if(e){if(Ut.escapeTest.test(t))return t.replace(Ut.escapeReplace,qd)}else if(Ut.escapeTestNoEncode.test(t))return t.replace(Ut.escapeReplaceNoEncode,qd);return t}function $d(t){try{t=encodeURI(t).replace(Ut.percentDecode,"%")}catch{return null}return t}function jd(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 Na(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 _b(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 Zd(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 kb(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const o=n[1];return e.split(`
362
362
  `).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(`
363
- `)}class Qi{constructor(e){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=e||$n}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:Oa(n,`
364
- `)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],o=kb(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=Oa(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:Oa(r[0],`
365
- `)}}blockquote(e){const r=this.rules.block.blockquote.exec(e);if(r){let n=Oa(r[0],`
363
+ `)}class Xi{constructor(e){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=e||$n}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:Na(n,`
364
+ `)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],o=kb(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=Na(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:Na(r[0],`
365
+ `)}}blockquote(e){const r=this.rules.block.blockquote.exec(e);if(r){let n=Na(r[0],`
366
366
  `).split(`
367
367
  `),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(`
368
368
  `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
@@ -376,13 +376,13 @@ ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
376
376
  `);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="",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(`
377
377
  `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),v=e.split(`
378
378
  `,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+`
379
- `,e=e.substring(v.length+1),l=!0),!l){const b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),I=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m);for(;e;){const M=e.split(`
380
- `,1)[0];let L;if(v=M,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),L=v):L=v.replace(this.rules.other.tabCharGlobal," "),I.test(v)||S.test(v)||k.test(v)||b.test(v)||w.test(v))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!v.trim())d+=`
379
+ `,e=e.substring(v.length+1),l=!0),!l){const b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),I=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m);for(;e;){const z=e.split(`
380
+ `,1)[0];let L;if(v=z,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),L=v):L=v.replace(this.rules.other.tabCharGlobal," "),I.test(v)||S.test(v)||k.test(v)||b.test(v)||w.test(v))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!v.trim())d+=`
381
381
  `+L.slice(m);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(f)||S.test(f)||w.test(f))break;d+=`
382
- `+v}!h&&!v.trim()&&(h=!0),u+=M+`
383
- `,e=e.substring(M.length+1),f=L.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 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(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 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=jd(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(`
382
+ `+v}!h&&!v.trim()&&(h=!0),u+=z+`
383
+ `,e=e.substring(z.length+1),f=L.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 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(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 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=jd(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(`
384
384
  `):[],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(jd(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)===`
385
- `?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=Oa(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=_b(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)),Zd(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 Zd(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 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(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 f=[...o[0]][0].length,v=e.slice(0,i+o.index+f+c);if(Math.min(i,c)%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 ur{constructor(e){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||$n,this.options.tokenizer=this.options.tokenizer||new Qi,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:Yi.normal,inline:Ia.normal};this.options.pedantic?(r.block=Yi.pedantic,r.inline=Ia.pedantic):this.options.gfm&&(r.block=Yi.gfm,this.options.breaks?r.inline=Ia.breaks:r.inline=Ia.gfm),this.tokenizer.rules=r}static get rules(){return{block:Yi,inline:Ia}}static lex(e,r){return new ur(r).lex(e)}static lexInline(e,r){return new ur(r).inlineTokens(e)}lex(e){e=e.replace(Ut.carriageReturn,`
385
+ `?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=Na(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=_b(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)),Zd(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 Zd(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 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(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 f=[...o[0]][0].length,v=e.slice(0,i+o.index+f+c);if(Math.min(i,c)%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 ur{constructor(e){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||$n,this.options.tokenizer=this.options.tokenizer||new Xi,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:Ji.normal,inline:Oa.normal};this.options.pedantic?(r.block=Ji.pedantic,r.inline=Oa.pedantic):this.options.gfm&&(r.block=Ji.gfm,this.options.breaks?r.inline=Oa.breaks:r.inline=Oa.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ji,inline:Oa}}static lex(e,r){return new ur(r).lex(e)}static lexInline(e,r){return new ur(r).inlineTokens(e)}lex(e){e=e.replace(Ut.carriageReturn,`
386
386
  `),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+=`
387
387
  `: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+=`
388
388
  `+s.raw,l.text+=`
@@ -392,7 +392,7 @@ ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
392
392
  `+s.raw,l.text+=`
393
393
  `+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+=`
394
394
  `+s.raw,l.text+=`
395
- `+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(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((l=this.options.extensions)!=null&&l.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 Ji{constructor(e){ae(this,"options");ae(this,"parser");this.options=e||$n}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,"")+`
395
+ `+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(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((l=this.options.extensions)!=null&&l.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 es{constructor(e){ae(this,"options");ae(this,"parser");this.options=e||$n}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,"")+`
396
396
  `;return o?'<pre><code class="language-'+Gr(o)+'">'+(n?a:Gr(a,!0))+`</code></pre>
397
397
  `:"<pre><code>"+(n?a:Gr(a,!0))+`</code></pre>
398
398
  `}blockquote({tokens:e}){return`<blockquote>
@@ -410,15 +410,15 @@ ${this.parser.parse(e)}</blockquote>
410
410
  `}tablerow({text:e}){return`<tr>
411
411
  ${e}</tr>
412
412
  `}tablecell(e){const r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
413
- `}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>${Gr(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=$d(e);if(a===null)return o;e=a;let i='<a href="'+e+'"';return r&&(i+=' title="'+Gr(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n}){const o=$d(e);if(o===null)return Gr(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Gr(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Gr(e.text)}}class rc{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 dr{constructor(e){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=e||$n,this.options.renderer=this.options.renderer||new Ji,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rc}static parse(e,r){return new dr(r).parse(e)}static parseInline(e,r){return new dr(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+=`
414
- `+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 Na{constructor(e){ae(this,"options");ae(this,"block");this.options=e||$n}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ur.lex:ur.lexInline}provideParser(){return this.block?dr.parse:dr.parseInline}}ae(Na,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Ud{constructor(...e){ae(this,"defaults",Wl());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",dr);ae(this,"Renderer",Ji);ae(this,"TextRenderer",rc);ae(this,"Lexer",ur);ae(this,"Tokenizer",Qi);ae(this,"Hooks",Na);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 Ji(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 d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new Qi(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 d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Na;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];Na.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(c.call(a,u)).then(f=>l.call(a,f));const d=c.call(a,u);return l.call(a,d)}:a[s]=(...u)=>{let d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d}}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 ur.lex(e,r??this.defaults)}parser(e,r){return dr.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?ur.lex:ur.lexInline,l=i.hooks?i.hooks.provideParser():e?dr.parse:dr.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 d=l(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return s(u)}}}onError(e,r){return n=>{if(n.message+=`
415
- Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Gr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const jn=new Ud;function et(t,e){return jn.parse(t,e)}et.options=et.setOptions=function(t){return jn.setOptions(t),et.defaults=jn.defaults,Id(et.defaults),et},et.getDefaults=Wl,et.defaults=$n,et.use=function(...t){return jn.use(...t),et.defaults=jn.defaults,Id(et.defaults),et},et.walkTokens=function(t,e){return jn.walkTokens(t,e)},et.parseInline=jn.parseInline,et.Parser=dr,et.parser=dr.parse,et.Renderer=Ji,et.TextRenderer=rc,et.Lexer=ur,et.lexer=ur.lex,et.Tokenizer=Qi,et.Hooks=Na,et.parse=et,et.options,et.setOptions,et.use,et.walkTokens,et.parseInline,dr.parse,ur.lex;const xb=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>`}}}]}),Hd=(t,e)=>new Ud().use(xb(e)).parse(t);var nc={exports:{}};/** @license
413
+ `}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>${Gr(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=$d(e);if(a===null)return o;e=a;let i='<a href="'+e+'"';return r&&(i+=' title="'+Gr(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n}){const o=$d(e);if(o===null)return Gr(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Gr(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Gr(e.text)}}class rc{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 dr{constructor(e){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=e||$n,this.options.renderer=this.options.renderer||new es,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rc}static parse(e,r){return new dr(r).parse(e)}static parseInline(e,r){return new dr(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+=`
414
+ `+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 Pa{constructor(e){ae(this,"options");ae(this,"block");this.options=e||$n}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ur.lex:ur.lexInline}provideParser(){return this.block?dr.parse:dr.parseInline}}ae(Pa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Ud{constructor(...e){ae(this,"defaults",Wl());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",dr);ae(this,"Renderer",es);ae(this,"TextRenderer",rc);ae(this,"Lexer",ur);ae(this,"Tokenizer",Xi);ae(this,"Hooks",Pa);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 es(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 d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new Xi(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 d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Pa;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];Pa.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(c.call(a,u)).then(f=>l.call(a,f));const d=c.call(a,u);return l.call(a,d)}:a[s]=(...u)=>{let d=c.apply(a,u);return d===!1&&(d=l.apply(a,u)),d}}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 ur.lex(e,r??this.defaults)}parser(e,r){return dr.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?ur.lex:ur.lexInline,l=i.hooks?i.hooks.provideParser():e?dr.parse:dr.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 d=l(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return s(u)}}}onError(e,r){return n=>{if(n.message+=`
415
+ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Gr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const jn=new Ud;function at(t,e){return jn.parse(t,e)}at.options=at.setOptions=function(t){return jn.setOptions(t),at.defaults=jn.defaults,Id(at.defaults),at},at.getDefaults=Wl,at.defaults=$n,at.use=function(...t){return jn.use(...t),at.defaults=jn.defaults,Id(at.defaults),at},at.walkTokens=function(t,e){return jn.walkTokens(t,e)},at.parseInline=jn.parseInline,at.Parser=dr,at.parser=dr.parse,at.Renderer=es,at.TextRenderer=rc,at.Lexer=ur,at.lexer=ur.lex,at.Tokenizer=Xi,at.Hooks=Pa,at.parse=at,at.options,at.setOptions,at.use,at.walkTokens,at.parseInline,dr.parse,ur.lex;const xb=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>`}}}]}),Hd=(t,e)=>new Ud().use(xb(e)).parse(t);var nc={exports:{}};/** @license
416
416
  * eventsource.js
417
417
  * Available under MIT License (MIT)
418
418
  * https://github.com/Yaffle/EventSource/
419
- */(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,d=r.fetch,f=r.Response,v=r.TextDecoder,h=r.TextEncoder,m=r.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(A){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(A){function D(){}return D.prototype=A,new D}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=d;d=function(A,D){var oe=D.signal;return y(A,{headers:D.headers,credentials:D.credentials,cache:D.cache}).then(function(F){var me=F.body.getReader();return oe._reader=me,oe._aborted&&oe._reader.cancel(),{status:F.status,statusText:F.statusText,headers:F.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(A){function D(Be,Ue,Q){if(Q===1)return Be>=128>>Ue&&Be<<Ue<=2047;if(Q===2)return Be>=2048>>Ue&&Be<<Ue<=55295||Be>=57344>>Ue&&Be<<Ue<=65535;if(Q===3)return Be>=65536>>Ue&&Be<<Ue<=1114111;throw new Error}function oe(Be,Ue){if(Be===6)return Ue>>6>15?3:Ue>31?2:1;if(Be===12)return Ue>15?3:2;if(Be===18)return 3;throw new Error}for(var F=65533,me="",ce=this.bitsNeeded,we=this.codePoint,We=0;We<A.length;We+=1){var Le=A[We];ce!==0&&(Le<128||Le>191||!D(we<<6|Le&63,ce-6,oe(ce,we)))&&(ce=0,we=F,me+=String.fromCharCode(we)),ce===0?(Le>=0&&Le<=127?(ce=0,we=Le):Le>=192&&Le<=223?(ce=6,we=Le&31):Le>=224&&Le<=239?(ce=12,we=Le&15):Le>=240&&Le<=247?(ce=18,we=Le&7):(ce=0,we=F),ce!==0&&!D(we,ce,oe(ce,we))&&(ce=0,we=F)):(ce-=6,we=we<<6|Le&63),ce===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=ce,this.codePoint=we,me};var b=function(){try{return new v().decode(new h().encode("test"),{stream:!0})==="test"}catch(A){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+A)}return!1};(v==null||h==null||!b())&&(v=g);var w=function(){};function I(A){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=A,this._sendTimeout=0,this._abort=w}I.prototype.open=function(A,D){this._abort(!0);var oe=this,F=this._xhr,me=1,ce=0;this._abort=function(Q){oe._sendTimeout!==0&&(o(oe._sendTimeout),oe._sendTimeout=0),(me===1||me===2||me===3)&&(me=4,F.onload=w,F.onerror=w,F.onabort=w,F.onprogress=w,F.onreadystatechange=w,F.abort(),ce!==0&&(o(ce),ce=0),Q||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),me=0};var we=function(){if(me===1){var Q=0,Ke="",lt=void 0;if("contentType"in F)Q=200,Ke="OK",lt=F.contentType;else try{Q=F.status,Ke=F.statusText,lt=F.getResponseHeader("Content-Type")}catch{Q=0,Ke="",lt=void 0}Q!==0&&(me=2,oe.readyState=2,oe.status=Q,oe.statusText=Ke,oe._contentType=lt,oe.onreadystatechange())}},We=function(){if(we(),me===2||me===3){me=3;var Q="";try{Q=F.responseText}catch{}oe.readyState=3,oe.responseText=Q,oe.onprogress()}},Le=function(Q,Ke){if((Ke==null||Ke.preventDefault==null)&&(Ke={preventDefault:w}),We(),me===1||me===2||me===3){if(me=4,ce!==0&&(o(ce),ce=0),oe.readyState=4,Q==="load")oe.onload(Ke);else if(Q==="error")oe.onerror(Ke);else if(Q==="abort")oe.onabort(Ke);else throw new TypeError;oe.onreadystatechange()}},Be=function(Q){F!=null&&(F.readyState===4?(!("onload"in F)||!("onerror"in F)||!("onabort"in F))&&Le(F.responseText===""?"error":"load",Q):F.readyState===3?"onprogress"in F||We():F.readyState===2&&we())},Ue=function(){ce=n(function(){Ue()},500),F.readyState===3&&We()};"onload"in F&&(F.onload=function(Q){Le("load",Q)}),"onerror"in F&&(F.onerror=function(Q){Le("error",Q)}),"onabort"in F&&(F.onabort=function(Q){Le("abort",Q)}),"onprogress"in F&&(F.onprogress=We),"onreadystatechange"in F&&(F.onreadystatechange=function(Q){Be(Q)}),("contentType"in F||!("ontimeout"in a.prototype))&&(D+=(D.indexOf("?")===-1?"?":"&")+"padding=true"),F.open(A,D,!0),"readyState"in F&&(ce=n(function(){Ue()},0))},I.prototype.abort=function(){this._abort(!1)},I.prototype.getResponseHeader=function(A){return this._contentType},I.prototype.setRequestHeader=function(A,D){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(A,D)},I.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},I.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 A=this;A._sendTimeout=n(function(){A._sendTimeout=0,A.send()},4);return}var D=this._xhr;"withCredentials"in D&&(D.withCredentials=this.withCredentials);try{D.send(void 0)}catch(oe){throw oe}};function S(A){return A.replace(/[A-Z]/g,function(D){return String.fromCharCode(D.charCodeAt(0)+32)})}function k(A){for(var D=Object.create(null),oe=A.split(`\r
420
- `),F=0;F<oe.length;F+=1){var me=oe[F],ce=me.split(": "),we=ce.shift(),We=ce.join(": ");D[S(we)]=We}this._map=D}k.prototype.get=function(A){return this._map[S(A)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function M(){}M.prototype.open=function(A,D,oe,F,me,ce,we){A.open("GET",me);var We=0;A.onprogress=function(){var Be=A.responseText,Ue=Be.slice(We);We+=Ue.length,oe(Ue)},A.onerror=function(Be){Be.preventDefault(),F(new Error("NetworkError"))},A.onload=function(){F(null)},A.onabort=function(){F(null)},A.onreadystatechange=function(){if(A.readyState===a.HEADERS_RECEIVED){var Be=A.status,Ue=A.statusText,Q=A.getResponseHeader("Content-Type"),Ke=A.getAllResponseHeaders();D(Be,Ue,Q,new k(Ke))}},A.withCredentials=ce;for(var Le in we)Object.prototype.hasOwnProperty.call(we,Le)&&A.setRequestHeader(Le,we[Le]);return A.send(),A};function L(A){this._headers=A}L.prototype.get=function(A){return this._headers.get(A)};function G(){}G.prototype.open=function(A,D,oe,F,me,ce,we){var We=null,Le=new m,Be=Le.signal,Ue=new v;return d(me,{headers:we,credentials:ce?"include":"same-origin",signal:Be,cache:"no-store"}).then(function(Q){return We=Q.body.getReader(),D(Q.status,Q.statusText,Q.headers.get("Content-Type"),new L(Q.headers)),new u(function(Ke,lt){var be=function(){We.read().then(function(dt){if(dt.done)Ke(void 0);else{var Tt=Ue.decode(dt.value,{stream:!0});oe(Tt),be()}}).catch(function(dt){lt(dt)})};be()})}).catch(function(Q){if(Q.name!=="AbortError")return Q}).then(function(Q){F(Q)}),{abort:function(){We!=null&&We.cancel(),Le.abort()}}};function W(){this._listeners=Object.create(null)}function $(A){n(function(){throw A},0)}W.prototype.dispatchEvent=function(A){A.target=this;var D=this._listeners[A.type];if(D!=null)for(var oe=D.length,F=0;F<oe;F+=1){var me=D[F];try{typeof me.handleEvent=="function"?me.handleEvent(A):me.call(this,A)}catch(ce){$(ce)}}},W.prototype.addEventListener=function(A,D){A=String(A);var oe=this._listeners,F=oe[A];F==null&&(F=[],oe[A]=F);for(var me=!1,ce=0;ce<F.length;ce+=1)F[ce]===D&&(me=!0);me||F.push(D)},W.prototype.removeEventListener=function(A,D){A=String(A);var oe=this._listeners,F=oe[A];if(F!=null){for(var me=[],ce=0;ce<F.length;ce+=1)F[ce]!==D&&me.push(F[ce]);me.length===0?delete oe[A]:oe[A]=me}};function re(A){this.type=A,this.target=void 0}function de(A,D){re.call(this,A),this.data=D.data,this.lastEventId=D.lastEventId}de.prototype=Object.create(re.prototype);function C(A,D){re.call(this,A),this.status=D.status,this.statusText=D.statusText,this.headers=D.headers}C.prototype=Object.create(re.prototype);function he(A,D){re.call(this,A),this.error=D.error}he.prototype=Object.create(re.prototype);var V=-1,Z=0,z=1,K=2,q=-1,ne=0,Te=1,it=2,tt=3,ut=/^text\/event\-stream(;.*)?$/i,It=1e3,nt=18e6,te=function(A,D){var oe=A==null?D:parseInt(A,10);return oe!==oe&&(oe=D),Pe(oe)},Pe=function(A){return Math.min(Math.max(A,It),nt)},st=function(A,D,oe){try{typeof D=="function"&&D.call(A,oe)}catch(F){$(F)}};function Qe(A,D){W.call(this),D=D||{},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,ht(this,A,D)}function Ht(){return a!=null&&"withCredentials"in a.prototype||i==null?new a:new i}var Ir=d!=null&&f!=null&&"body"in f.prototype;function ht(A,D,oe){D=String(D);var F=!!oe.withCredentials,me=oe.lastEventIdQueryParameterName||"lastEventId",ce=Pe(1e3),we=te(oe.heartbeatTimeout,45e3),We="",Le=ce,Be=!1,Ue=0,Q=oe.headers||{},Ke=oe.Transport,lt=Ir&&Ke==null?void 0:new I(Ke!=null?new Ke:Ht()),be=Ke!=null&&typeof Ke!="string"?new Ke:lt==null?new G:new M,dt=void 0,Tt=0,ar=V,An="",Vo="",Or="",j="",ye=ne,_t=0,yt=0,ft=function(kt,xt,Vt,Gt){if(ar===Z)if(kt===200&&Vt!=null&&ut.test(Vt)){ar=z,Be=Date.now(),Le=ce,A.readyState=z;var De=new C("open",{status:kt,statusText:xt,headers:Gt});A.dispatchEvent(De),st(A,A.onopen,De)}else{var _e="";kt!==200?(xt&&(xt=xt.replace(/\s+/g," ")),_e="EventSource's response has a status "+kt+" "+xt+" that is not 200. Aborting the connection."):_e="EventSource's response has a Content-Type specifying an unsupported type: "+(Vt==null?"-":Vt.replace(/\s+/g," "))+". Aborting the connection.",ri();var De=new C("error",{status:kt,statusText:xt,headers:Gt});A.dispatchEvent(De),st(A,A.onerror,De),console.error(_e)}},At=function(kt){if(ar===z){for(var xt=-1,Vt=0;Vt<kt.length;Vt+=1){var Gt=kt.charCodeAt(Vt);(Gt===10||Gt===13)&&(xt=Vt)}var De=(xt!==-1?j:"")+kt.slice(0,xt+1);j=(xt===-1?j:"")+kt.slice(xt+1),kt!==""&&(Be=Date.now(),Ue+=kt.length);for(var _e=0;_e<De.length;_e+=1){var Gt=De.charCodeAt(_e);if(ye===q&&Gt===10)ye=ne;else if(ye===q&&(ye=ne),Gt===13||Gt===10){if(ye!==ne){ye===Te&&(yt=_e+1);var Ct=De.slice(_t,yt-1),Rt=De.slice(yt+(yt<_e&&De.charCodeAt(yt)===32?1:0),_e);Ct==="data"?(An+=`
421
- `,An+=Rt):Ct==="id"?Vo=Rt:Ct==="event"?Or=Rt:Ct==="retry"?(ce=te(Rt,ce),Le=ce):Ct==="heartbeatTimeout"&&(we=te(Rt,we),Tt!==0&&(o(Tt),Tt=n(function(){Wn()},we)))}if(ye===ne){if(An!==""){We=Vo,Or===""&&(Or="message");var pt=new de(Or,{data:An.slice(1),lastEventId:Vo});if(A.dispatchEvent(pt),Or==="open"?st(A,A.onopen,pt):Or==="message"?st(A,A.onmessage,pt):Or==="error"&&st(A,A.onerror,pt),ar===K)return}An="",Or=""}ye=Gt===13?q:ne}else ye===ne&&(_t=_e,ye=Te),ye===Te?Gt===58&&(yt=_e+1,ye=it):ye===it&&(ye=tt)}}},Rn=function(kt){if(ar===z||ar===Z){ar=V,Tt!==0&&(o(Tt),Tt=0),Tt=n(function(){Wn()},Le),Le=Pe(Math.min(ce*16,Le*2)),A.readyState=Z;var xt=new he("error",{error:kt});A.dispatchEvent(xt),st(A,A.onerror,xt),kt!=null&&console.error(kt)}},ri=function(){ar=K,dt!=null&&(dt.abort(),dt=void 0),Tt!==0&&(o(Tt),Tt=0),A.readyState=K},Wn=function(){if(Tt=0,ar!==V){if(!Be&&dt!=null)Rn(new Error("No activity within "+we+" milliseconds. "+(ar===Z?"No response received.":Ue+" chars received.")+" Reconnecting.")),dt!=null&&(dt.abort(),dt=void 0);else{var kt=Math.max((Be||Date.now())+we-Date.now(),1);Be=!1,Tt=n(function(){Wn()},kt)}return}Be=!1,Ue=0,Tt=n(function(){Wn()},we),ar=Z,An="",Or="",Vo=We,j="",_t=0,yt=0,ye=ne;var xt=D;if(D.slice(0,5)!=="data:"&&D.slice(0,5)!=="blob:"&&We!==""){var Vt=D.indexOf("?");xt=Vt===-1?D:D.slice(0,Vt+1)+D.slice(Vt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rt,pt){return pt===me?"":Rt}),xt+=(D.indexOf("?")===-1?"?":"&")+me+"="+encodeURIComponent(We)}var Gt=A.withCredentials,De={};De.Accept="text/event-stream";var _e=A.headers;if(_e!=null)for(var Ct in _e)Object.prototype.hasOwnProperty.call(_e,Ct)&&(De[Ct]=_e[Ct]);try{dt=be.open(lt,ft,At,Rn,xt,Gt,De)}catch(Rt){throw ri(),Rt}};A.url=D,A.readyState=Z,A.withCredentials=F,A.headers=Q,A._close=ri,Wn()}Qe.prototype=Object.create(W.prototype),Qe.prototype.CONNECTING=Z,Qe.prototype.OPEN=z,Qe.prototype.CLOSED=K,Qe.prototype.close=function(){this._close()},Qe.CONNECTING=Z,Qe.OPEN=z,Qe.CLOSED=K,Qe.prototype.withCredentials=void 0;var Dt=c;a!=null&&(c==null||!("withCredentials"in c.prototype))&&(Dt=Qe),function(A){{var D=A(e);D!==void 0&&(t.exports=D)}}(function(A){A.EventSourcePolyfill=Qe,A.NativeEventSource=c,A.EventSource=Dt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Nl:globalThis)})(nc,nc.exports);var Vd=nc.exports;const Gd=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!=null)),Sb=t=>{try{return new URL(t).hostname}catch{return t}},Tb=t=>({url:t.usedLinks.url,title:t.usedLinks.title,referenceNumber:t.usedLinks.number,domainName:Sb(t.usedLinks.url),breadcrumb:[],generated:{title:t.usedLinks.title??"",summary:t.usedLinks.description??t.usedLinks.summary??""}}),Wd=(t,e)=>{const r=t.all.length,n=Tb(e);return n.referenceNumber=r+1,t.all.push(n),t},Cb=Vd.NativeEventSource||Vd.EventSourcePolyfill;let Kd;class Pa{constructor({apiUrl:e,apiKey:r="X9hL4Gp5W2D7eRtF"}){ae(this,"apiUrl");ae(this,"apiKey");ae(this,"lastRequestId",null);ae(this,"metadata");this.apiUrl=e,this.apiKey=r,this.metadata=this.getUserData(),Kd=this}async getUserData(){var n;const e=Gl.getItem("uID"),r=await this.fetchData("/log",{},{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({referrer:((n=globalThis==null?void 0:globalThis.document)==null?void 0:n.referrer)||null,uID:e})});if("maintenance"in r&&r.maintenance)return{mode:"maintenance"};if(!("id"in r))throw new Error("Could not retrieve a user id");return Gl.setItem("uID",r.id),{mode:"ready",userId:r.id,conversationId:r.cID}}static getInstance(){return Kd}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={}){return(await fetch(`${this.apiUrl}${e}?${new URLSearchParams(Gd(r)).toString()}`,{...n,headers:{...(n==null?void 0:n.headers)||{},"api-key":this.apiKey}})).json()}async fetchSSE(e,r={}){return new Cb(`${this.apiUrl}${e}?${new URLSearchParams({...Gd(r),key:this.apiKey}).toString()}`)}async quickFeedback(e){const r={...e,rID:this.lastRequestId};return this.postData("/quickfeedback",r,"Got an error when trying to post quick feedback")}async feedback(e){if((await this.metadata).mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const n=await Gl.getItem("uID"),o={...e,rID:this.lastRequestId,uID:n};return this.postData("/feedback",o,"Got an error when trying to post feedback")}async getClassification(e={}){return(await this.fetchData("/chatconfig",e)).classification}async classification(e){const r={...e,rID:this.lastRequestId};return this.postData("/classification",r,"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){return(await this.getChatConfig()).menu[e.language]??[]}async getUsedLanguages(){const e=await this.getChatConfig();return Object.keys(e.menu)}async chatInternal(e,r={}){const n=await this.metadata;if(n.mode==="maintenance")throw new Error("Can not chat in maintenance mode");return this.fetchSSE("/assistant/sse",{query:e,uID:n.userId,cID:n.conversationId,lang:r.lang,model:r.model,chat:"true"})}chat(e,r={}){const n=Zt({state:"loading"});let o=!0,a=!1;const i=new Date().toISOString();return this.chatInternal(e,r).then(s=>{s.onmessage=c=>{const l=JSON.parse(c.data);"id"in l&&(this.lastRequestId=l.id),"response"in l?l.response==="__CLR__"?o=!1:l.response==="__THIS_IS_THE_ANSWER_END__"?(a=!0,n.update(u=>{if(u.state!=="streaming")throw new Error("Invalid state transition to done");return{payload:{...u.payload,partial:!1},state:"done"}})):o===!1&&a===!1&&n.update(u=>{if(u.state==="streaming"){const d=u.payload.message.markdown+l.response;return{state:"streaming",payload:{...u.payload,partial:!0,message:{markdown:d,html:Hd(d,u.payload)}}}}if(u.state==="loading"){const d=l.response;return{state:"streaming",payload:{type:"bot",time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:d,html:Hd(d,{type:"bot",time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:"",html:""}})}}}}else throw console.error("Invalid message state",u),new Error("Invalid message state")}):"usedLinks"in l&&n.update(u=>{var d;if(u.state==="loading")return{state:"streaming",payload:{type:"bot",time:i,partial:!0,message:{markdown:"",html:""},sources:Wd({all:[],used:[]},l)}};if(u.state==="streaming")return{state:"streaming",payload:{...u.payload,partial:!0,sources:Wd((d=u.payload)==null?void 0:d.sources,l)}};throw console.error("Invalid source state",u),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}}rp();var Eb=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>'),Ab=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>'),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="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>'),Ib=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 La(t,e){Ae(e,!1);let r=x(e,"type",12,"success");var n=ie(),o=U(n);{var a=s=>{var c=Eb();T(s,c)},i=s=>{var c=ie(),l=U(c);{var u=f=>{var v=Ab();T(f,v)},d=f=>{var v=ie(),h=U(v);{var m=g=>{var b=Rb();T(g,b)},y=g=>{var b=ie(),w=U(b);{var I=k=>{var M=Ib();T(k,M)},S=k=>{};fe(w,k=>{r()==="warning"?k(I):k(S,!1)},!0)}T(g,b)};fe(h,g=>{r()==="info"?g(m):g(y,!1)},!0)}T(f,v)};fe(l,f=>{r()==="error"?f(u):f(d,!1)},!0)}T(s,c)};fe(o,s=>{r()==="success"?s(a):s(i,!1)})}return T(t,n),Re({get type(){return r()},set type(s){r(s),_()}})}Ie(La,{type:{}},[],[],!0);var Ob=J('<div class="sonner-loading-bar"></div>'),Nb=J('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Yd(t,e){Ae(e,!1);let r=x(e,"visible",12);const n=Array(12).fill(0);po();var o=Nb(),a=P(o);return _r(a,5,()=>n,Dr,(i,s)=>{var c=Ob();T(i,c)}),O(a),O(o),le(()=>Ce(o,"data-visible",r())),T(t,o),Re({get visible(){return r()},set visible(i){r(i),_()}})}Ie(Yd,{visible:{}},[],[],!0);function Oo(...t){return t.filter(Boolean).join(" ")}const Qd=typeof document<"u";function Jd(t){const e=Zt(t);function r(o){Qd&&e.set(o)}function n(o){Qd&&e.update(o)}return{subscribe:e.subscribe,set:r,update:n}}let Xd=0;function Pb(){const t=Jd([]),e=Jd([]);function r(g){t.update(b=>[g,...b])}function n(g){var G;const{message:b,...w}=g,I=typeof(g==null?void 0:g.id)=="number"||g.id&&((G=g.id)==null?void 0:G.length)>0?g.id:Xd++,S=g.dismissable===void 0?!0:g.dismissable,k=g.type===void 0?"default":g.type;return xa(t).find(W=>W.id===I)?t.update(W=>W.map($=>$.id===I?{...$,...g,id:I,title:b,dismissable:S,type:k,updated:!0}:{...$,updated:!1})):r({...w,id:I,title:b,dismissable:S,type:k}),I}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 c(g,b){return n({...b,type:"success",message:g})}function l(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 I=g instanceof Promise?g:g();let S=w!==void 0;return I.then(k=>{if(k&&typeof k.ok=="boolean"&&!k.ok){S=!1;const M=typeof b.error=="function"?b.error(`HTTP error! status: ${k.status}`):b.error;n({id:w,type:"error",message:M})}else if(b.success!==void 0){S=!1;const M=typeof b.success=="function"?b.success(k):b.success;n({id:w,type:"success",message:M})}}).catch(k=>{if(b.error!==void 0){S=!1;const M=typeof b.error=="function"?b.error(k):b.error;n({id:w,type:"error",message:M})}}).finally(()=>{var k;S&&(o(w),w=void 0),(k=b.finally)==null||k.call(b)}),w}function v(g,b){const w=(b==null?void 0:b.id)||Xd++;return n({component:g,id:w,...b}),w}function h(g){e.update(b=>b.filter(w=>w.toastId!==g))}function m(g){if(xa(e).find(w=>w.toastId===g.toastId)===void 0){e.update(w=>[g,...w]);return}e.update(w=>w.map(I=>I.toastId===g.toastId?g:I))}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:d,promise:f,custom:v,removeHeight:h,setHeight:m,reset:y,toasts:t,heights:e}}const fr=Pb();function Lb(t,e){return fr.create({message:t,...e})}const No=Object.assign(Lb,{success:fr.success,info:fr.info,warning:fr.warning,error:fr.error,custom:fr.custom,message:fr.message,promise:fr.promise,dismiss:fr.dismiss,loading:fr.loading}),Mb=t=>({subscribe:t});var Db=J('<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>'),zb=J('<div data-icon=""><!> <!></div>'),Fb=J('<div data-title=""><!></div>'),Bb=J('<div data-description=""><!></div>'),qb=J('<button data-button="" data-cancel=""> </button>'),$b=J('<button data-button=""> </button>'),jb=J('<!> <div data-content=""><!> <!></div> <!> <!>',1),Zb=J('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function ef(t,e){const r=wl(e,["children","$$slots","$$events","$$legacy","$$host"]);Ae(e,!1);const n=$t(),o=()=>vt(W,"$heights",n),a=()=>vt(p(Ue),"$effect",n),i=()=>vt(G,"$toasts",n),s=He(void 0,!0),c=He(void 0,!0),l=He(void 0,!0),u=He(void 0,!0),d=He(void 0,!0),f=He(void 0,!0),v=He(void 0,!0),h=He(void 0,!0),m=He(void 0,!0),y=He(void 0,!0),g=He(void 0,!0),b=He(void 0,!0),w=4e3,I=14,S=20,k=200,M=.05,L={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:G,heights:W,removeHeight:$,setHeight:re,remove:de}=fr;let C=x(e,"toast",13),he=x(e,"index",13),V=x(e,"expanded",13),Z=x(e,"invert",13),z=x(e,"position",13),K=x(e,"visibleToasts",13),q=x(e,"expandByDefault",13),ne=x(e,"closeButton",13),Te=x(e,"interacting",13),it=x(e,"cancelButtonStyle",13,""),tt=x(e,"actionButtonStyle",13,""),ut=x(e,"duration",13,4e3),It=x(e,"descriptionClass",13,""),nt=x(e,"classes",29,()=>({})),te=x(e,"unstyled",13,!1),Pe=He(!1,!0),st=He(!1,!0),Qe=He(!1,!0),Ht=He(!1,!0),Ir=He(0,!0),ht=He(0,!0),Dt=He(void 0,!0),A=He(0,!0),D=0,oe=0,F=null;async function me(){if(!p(Pe))return;await nl();let j;V()||q()?j=1:j=1-he()*M,p(Dt).style.setProperty("height","auto");const ye=p(Dt).offsetHeight,_t=p(Dt).getBoundingClientRect().height,yt=Math.round((_t/j+Number.EPSILON)*100)/100;p(Dt).style.removeProperty("height");let ft;Math.abs(yt-ye)<1?ft=yt:ft=ye,R(ht,ft),re({toastId:C().id,height:ft})}function ce(){R(st,!0),R(Ir,p(A)),$(C().id),setTimeout(()=>{de(C().id)},k)}let we=He(void 0,!0),We=He(C().duration||ut()||w,!0);function Le(){if(oe<D){const j=new Date().getTime()-D;R(We,p(We)-j)}oe=new Date().getTime()}function Be(){D=new Date().getTime(),R(we,setTimeout(()=>{var j,ye;(ye=(j=C()).onAutoClose)==null||ye.call(j,C()),ce()},p(We)))}let Ue=He(void 0,!0);xi(()=>{R(Pe,!0);const j=p(Dt).getBoundingClientRect().height;return R(ht,j),re({toastId:C().id,height:j}),()=>$(C().id)});function Q(j){if(p(g))return;R(Ir,p(A));const ye=j.target;ye.setPointerCapture(j.pointerId),ye.tagName!=="BUTTON"&&(R(Qe,!0),F={x:j.clientX,y:j.clientY})}function Ke(){var ye,_t,yt;if(p(Ht))return;F=null;const j=Number(((ye=p(Dt))==null?void 0:ye.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(j)>=S){R(Ir,p(A)),(yt=(_t=C()).onDismiss)==null||yt.call(_t,C()),ce(),R(Ht,!0);return}p(Dt).style.setProperty("--swipe-amount","0px"),R(Qe,!1)}function lt(j){if(!F)return;const ye=j.clientY-F.y,_t=j.clientX-F.x,ft=(p(m)[0]==="top"?Math.min:Math.max)(0,ye),At=j.pointerType==="touch"?10:2;Math.abs(ft)>At?p(Dt).style.setProperty("--swipe-amount",`${ye}px`):Math.abs(_t)>At&&(F=null)}$e(()=>Ze(nt()),()=>{nt({...L,...nt()})}),$e(()=>Ze(he()),()=>{R(s,he()===0)}),$e(()=>(Ze(he()),Ze(K())),()=>{R(c,he()+1<=K())}),$e(()=>Ze(C()),()=>{R(l,C().title)}),$e(()=>Ze(C()),()=>{R(u,C().description)}),$e(()=>Ze(C()),()=>{R(d,C().type)}),$e(()=>Ze(C()),()=>{R(f,C().class||"")}),$e(()=>Ze(C()),()=>{R(v,C().descriptionClass||"")}),$e(()=>(o(),Ze(C())),()=>{R(h,o().findIndex(j=>j.toastId===C().id)||0)}),$e(()=>Ze(z()),()=>{R(m,z().split("-"))}),$e(()=>(o(),p(h)),()=>{R(y,o().reduce((j,ye,_t)=>_t>=p(h)?j:j+ye.height,0))}),$e(()=>(Ze(Z()),Ze(C())),()=>{Z(C().invert||Z())}),$e(()=>p(d),()=>{R(g,p(d)==="loading")}),$e(()=>(p(h),p(y)),()=>{R(A,Math.round(p(h)*I+p(y)))}),$e(()=>(p(l),p(u)),()=>{p(l),p(u),me()}),$e(()=>(Ze(C()),p(we),Ze(ut())),()=>{C().updated&&(clearTimeout(p(we)),R(We,C().duration||ut()||w),Be())}),$e(()=>(Ze(C()),p(d)),()=>{R(b,C().promise&&p(d)==="loading"||C().duration===Number.POSITIVE_INFINITY)}),$e(()=>(p(b),Ze(V()),Ze(Te()),p(we)),()=>{jp(R(Ue,Mb(()=>(p(b)||(V()||Te()?Le():Be()),()=>clearTimeout(p(we))))),"$effect",n)}),$e(()=>a(),()=>{a()}),$e(()=>Ze(C()),()=>{C().delete&&ce()}),Qs(),po(!0);var be=Zb();Ce(be,"tabindex",0);const dt=Nt(()=>{var j,ye,_t,yt,ft,At;return Oo(r.class,p(f),(j=nt())==null?void 0:j.toast,(_t=(ye=C())==null?void 0:ye.classes)==null?void 0:_t.toast,(yt=nt())==null?void 0:yt[p(d)],(At=(ft=C())==null?void 0:ft.classes)==null?void 0:At[p(d)])});le(()=>Ce(be,"data-promise",!!C().promise)),le(()=>Ce(be,"data-expanded",!!(V()||q()&&p(Pe))));var Tt=P(be);{var ar=j=>{var ye=Db(),_t=Se(()=>p(g)?void 0:()=>{var ft,At;ce(),(At=(ft=C()).onDismiss)==null||At.call(ft,C())});const yt=Nt(()=>{var ft,At,Rn;return Oo((ft=nt())==null?void 0:ft.closeButton,(Rn=(At=C())==null?void 0:At.classes)==null?void 0:Rn.closeButton)});le(()=>{Ce(ye,"data-disabled",p(g)),kr(ye,p(yt))}),ct("click",ye,function(...ft){var At;(At=p(_t))==null||At.apply(this,ft)}),T(j,ye)};fe(Tt,j=>{ne()&&!C().component&&j(ar)})}var An=se(Tt,2);{var Vo=j=>{var ye=ie(),_t=U(ye);Bt(_t,()=>C().component,(yt,ft)=>{ft(yt,vn(()=>C().componentProps,{$$events:{closeToast:ce}}))}),T(j,ye)},Or=j=>{var ye=jb(),_t=U(ye);{var yt=De=>{var _e=zb(),Ct=P(_e);{var Rt=rt=>{var Wt=ie(),fn=U(Wt);zr(fn,e,"loading-icon",{},null),T(rt,Wt)};fe(Ct,rt=>{(C().promise||p(d)==="loading")&&!C().icon&&rt(Rt)})}var pt=se(Ct,2);{var Jt=rt=>{var Wt=ie(),fn=U(Wt);Bt(fn,()=>C().icon,(Kn,Cc)=>{Cc(Kn,{})}),T(rt,Wt)},ot=rt=>{var Wt=ie(),fn=U(Wt);{var Kn=Go=>{var ni=ie(),Ec=U(ni);zr(Ec,e,"success-icon",{},null),T(Go,ni)},Cc=Go=>{var ni=ie(),Ec=U(ni);{var kw=Wo=>{var oi=ie(),Ac=U(oi);zr(Ac,e,"error-icon",{},null),T(Wo,oi)},xw=Wo=>{var oi=ie(),Ac=U(oi);{var Sw=Ko=>{var ai=ie(),Rc=U(ai);zr(Rc,e,"warning-icon",{},null),T(Ko,ai)},Tw=Ko=>{var ai=ie(),Rc=U(ai);{var Cw=Ic=>{var gh=ie(),Ew=U(gh);zr(Ew,e,"info-icon",{},null),T(Ic,gh)};fe(Rc,Ic=>{p(d)==="info"&&Ic(Cw)},!0)}T(Ko,ai)};fe(Ac,Ko=>{p(d)==="warning"?Ko(Sw):Ko(Tw,!1)},!0)}T(Wo,oi)};fe(Ec,Wo=>{p(d)==="error"?Wo(kw):Wo(xw,!1)},!0)}T(Go,ni)};fe(fn,Go=>{p(d)==="success"?Go(Kn):Go(Cc,!1)},!0)}T(rt,Wt)};fe(pt,rt=>{C().icon?rt(Jt):rt(ot,!1)})}O(_e),T(De,_e)};fe(_t,De=>{(p(d)!=="default"||C().icon||C().promise)&&De(yt)})}var ft=se(_t,2),At=P(ft);{var Rn=De=>{var _e=Fb();const Ct=Nt(()=>{var ot,rt,Wt;return Oo((ot=nt())==null?void 0:ot.title,(Wt=(rt=C())==null?void 0:rt.classes)==null?void 0:Wt.title)});var Rt=P(_e);{var pt=ot=>{var rt=ie(),Wt=U(rt);Bt(Wt,()=>C().title,(fn,Kn)=>{Kn(fn,vn(()=>C().componentProps))}),T(ot,rt)},Jt=ot=>{var rt=uo();le(()=>je(rt,C().title)),T(ot,rt)};fe(Rt,ot=>{typeof C().title!="string"?ot(pt):ot(Jt,!1)})}O(_e),le(()=>kr(_e,p(Ct))),T(De,_e)};fe(At,De=>{C().title&&De(Rn)})}var ri=se(At,2);{var Wn=De=>{var _e=Bb();const Ct=Nt(()=>{var ot,rt;return Oo(It(),p(v),(ot=nt())==null?void 0:ot.description,(rt=C().classes)==null?void 0:rt.description)});var Rt=P(_e);{var pt=ot=>{var rt=ie(),Wt=U(rt);Bt(Wt,()=>C().description,(fn,Kn)=>{Kn(fn,vn(()=>C().componentProps))}),T(ot,rt)},Jt=ot=>{var rt=uo();le(()=>je(rt,C().description)),T(ot,rt)};fe(Rt,ot=>{typeof C().description!="string"?ot(pt):ot(Jt,!1)})}O(_e),le(()=>kr(_e,p(Ct))),T(De,_e)};fe(ri,De=>{C().description&&De(Wn)})}O(ft);var kt=se(ft,2);{var xt=De=>{var _e=qb();const Ct=Nt(()=>{var pt,Jt,ot;return Oo((pt=nt())==null?void 0:pt.cancelButton,(ot=(Jt=C())==null?void 0:Jt.classes)==null?void 0:ot.cancelButton)});var Rt=P(_e,!0);O(_e),le(()=>{Ce(_e,"style",it()),kr(_e,p(Ct)),je(Rt,C().cancel.label)}),ct("click",_e,()=>{var pt;ce(),(pt=C().cancel)!=null&&pt.onClick&&C().cancel.onClick()}),T(De,_e)};fe(kt,De=>{C().cancel&&De(xt)})}var Vt=se(kt,2);{var Gt=De=>{var _e=$b();const Ct=Nt(()=>{var pt,Jt,ot;return Oo((pt=nt())==null?void 0:pt.actionButton,(ot=(Jt=C())==null?void 0:Jt.classes)==null?void 0:ot.actionButton)});var Rt=P(_e,!0);O(_e),le(()=>{Ce(_e,"style",tt()),kr(_e,p(Ct)),je(Rt,C().action.label)}),ct("click",_e,pt=>{var Jt;(Jt=C().action)==null||Jt.onClick(pt),!pt.defaultPrevented&&ce()}),T(De,_e)};fe(Vt,De=>{C().action&&De(Gt)})}T(j,ye)};fe(An,j=>{C().component?j(Vo):j(Or,!1)})}return O(be),qr(be,j=>R(Dt,j),()=>p(Dt)),le(()=>{var j;Ce(be,"aria-live",C().important?"assertive":"polite"),kr(be,p(dt)),Ce(be,"data-styled",!(C().component||(j=C())!=null&&j.unstyled||te())),Ce(be,"data-mounted",p(Pe)),Ce(be,"data-removed",p(st)),Ce(be,"data-visible",p(c)),Ce(be,"data-y-position",p(m)[0]),Ce(be,"data-x-position",p(m)[1]),Ce(be,"data-index",he()),Ce(be,"data-front",p(s)),Ce(be,"data-swiping",p(Qe)),Ce(be,"data-type",p(d)),Ce(be,"data-invert",Z()),Ce(be,"data-swipe-out",p(Ht)),Ce(be,"style",`${r.style} ${C().style}`),Br(be,"--index",he()),Br(be,"--toasts-before",he()),Br(be,"--z-index",i().length-he()),Br(be,"--offset",`${p(st)?p(Ir):p(A)}px`),Br(be,"--initial-height",`${p(ht)}px`)}),ct("pointerdown",be,Q),ct("pointerup",be,Ke),ct("pointermove",be,lt),T(t,be),Re({get toast(){return C()},set toast(j){C(j),_()},get index(){return he()},set index(j){he(j),_()},get expanded(){return V()},set expanded(j){V(j),_()},get invert(){return Z()},set invert(j){Z(j),_()},get position(){return z()},set position(j){z(j),_()},get visibleToasts(){return K()},set visibleToasts(j){K(j),_()},get expandByDefault(){return q()},set expandByDefault(j){q(j),_()},get closeButton(){return ne()},set closeButton(j){ne(j),_()},get interacting(){return Te()},set interacting(j){Te(j),_()},get cancelButtonStyle(){return it()},set cancelButtonStyle(j){it(j),_()},get actionButtonStyle(){return tt()},set actionButtonStyle(j){tt(j),_()},get duration(){return ut()},set duration(j){ut(j),_()},get descriptionClass(){return It()},set descriptionClass(j){It(j),_()},get classes(){return nt()},set classes(j){nt(j),_()},get unstyled(){return te()},set unstyled(j){te(j),_()}})}Ie(ef,{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 Ub=J("<ol></ol>"),Hb=J('<section class="svelte-1fo5d1m"></section>');const Vb={hash:"svelte-1fo5d1m",code:`:where(html[dir='ltr']),
419
+ */(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,d=r.fetch,f=r.Response,v=r.TextDecoder,h=r.TextEncoder,m=r.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(R){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(R){function M(){}return M.prototype=R,new M}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=d;d=function(R,M){var oe=M.signal;return y(R,{headers:M.headers,credentials:M.credentials,cache:M.cache}).then(function(q){var me=q.body.getReader();return oe._reader=me,oe._aborted&&oe._reader.cancel(),{status:q.status,statusText:q.statusText,headers:q.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(R){function M(je,We,Q){if(Q===1)return je>=128>>We&&je<<We<=2047;if(Q===2)return je>=2048>>We&&je<<We<=55295||je>=57344>>We&&je<<We<=65535;if(Q===3)return je>=65536>>We&&je<<We<=1114111;throw new Error}function oe(je,We){if(je===6)return We>>6>15?3:We>31?2:1;if(je===12)return We>15?3:2;if(je===18)return 3;throw new Error}for(var q=65533,me="",le=this.bitsNeeded,_e=this.codePoint,Xe=0;Xe<R.length;Xe+=1){var Me=R[Xe];le!==0&&(Me<128||Me>191||!M(_e<<6|Me&63,le-6,oe(le,_e)))&&(le=0,_e=q,me+=String.fromCharCode(_e)),le===0?(Me>=0&&Me<=127?(le=0,_e=Me):Me>=192&&Me<=223?(le=6,_e=Me&31):Me>=224&&Me<=239?(le=12,_e=Me&15):Me>=240&&Me<=247?(le=18,_e=Me&7):(le=0,_e=q),le!==0&&!M(_e,le,oe(le,_e))&&(le=0,_e=q)):(le-=6,_e=_e<<6|Me&63),le===0&&(_e<=65535?me+=String.fromCharCode(_e):(me+=String.fromCharCode(55296+(_e-65535-1>>10)),me+=String.fromCharCode(56320+(_e-65535-1&1023))))}return this.bitsNeeded=le,this.codePoint=_e,me};var b=function(){try{return new v().decode(new h().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(v==null||h==null||!b())&&(v=g);var w=function(){};function I(R){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=R,this._sendTimeout=0,this._abort=w}I.prototype.open=function(R,M){this._abort(!0);var oe=this,q=this._xhr,me=1,le=0;this._abort=function(Q){oe._sendTimeout!==0&&(o(oe._sendTimeout),oe._sendTimeout=0),(me===1||me===2||me===3)&&(me=4,q.onload=w,q.onerror=w,q.onabort=w,q.onprogress=w,q.onreadystatechange=w,q.abort(),le!==0&&(o(le),le=0),Q||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),me=0};var _e=function(){if(me===1){var Q=0,et="",ut=void 0;if("contentType"in q)Q=200,et="OK",ut=q.contentType;else try{Q=q.status,et=q.statusText,ut=q.getResponseHeader("Content-Type")}catch{Q=0,et="",ut=void 0}Q!==0&&(me=2,oe.readyState=2,oe.status=Q,oe.statusText=et,oe._contentType=ut,oe.onreadystatechange())}},Xe=function(){if(_e(),me===2||me===3){me=3;var Q="";try{Q=q.responseText}catch{}oe.readyState=3,oe.responseText=Q,oe.onprogress()}},Me=function(Q,et){if((et==null||et.preventDefault==null)&&(et={preventDefault:w}),Xe(),me===1||me===2||me===3){if(me=4,le!==0&&(o(le),le=0),oe.readyState=4,Q==="load")oe.onload(et);else if(Q==="error")oe.onerror(et);else if(Q==="abort")oe.onabort(et);else throw new TypeError;oe.onreadystatechange()}},je=function(Q){q!=null&&(q.readyState===4?(!("onload"in q)||!("onerror"in q)||!("onabort"in q))&&Me(q.responseText===""?"error":"load",Q):q.readyState===3?"onprogress"in q||Xe():q.readyState===2&&_e())},We=function(){le=n(function(){We()},500),q.readyState===3&&Xe()};"onload"in q&&(q.onload=function(Q){Me("load",Q)}),"onerror"in q&&(q.onerror=function(Q){Me("error",Q)}),"onabort"in q&&(q.onabort=function(Q){Me("abort",Q)}),"onprogress"in q&&(q.onprogress=Xe),"onreadystatechange"in q&&(q.onreadystatechange=function(Q){je(Q)}),("contentType"in q||!("ontimeout"in a.prototype))&&(M+=(M.indexOf("?")===-1?"?":"&")+"padding=true"),q.open(R,M,!0),"readyState"in q&&(le=n(function(){We()},0))},I.prototype.abort=function(){this._abort(!1)},I.prototype.getResponseHeader=function(R){return this._contentType},I.prototype.setRequestHeader=function(R,M){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(R,M)},I.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},I.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 R=this;R._sendTimeout=n(function(){R._sendTimeout=0,R.send()},4);return}var M=this._xhr;"withCredentials"in M&&(M.withCredentials=this.withCredentials);try{M.send(void 0)}catch(oe){throw oe}};function S(R){return R.replace(/[A-Z]/g,function(M){return String.fromCharCode(M.charCodeAt(0)+32)})}function k(R){for(var M=Object.create(null),oe=R.split(`\r
420
+ `),q=0;q<oe.length;q+=1){var me=oe[q],le=me.split(": "),_e=le.shift(),Xe=le.join(": ");M[S(_e)]=Xe}this._map=M}k.prototype.get=function(R){return this._map[S(R)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function z(){}z.prototype.open=function(R,M,oe,q,me,le,_e){R.open("GET",me);var Xe=0;R.onprogress=function(){var je=R.responseText,We=je.slice(Xe);Xe+=We.length,oe(We)},R.onerror=function(je){je.preventDefault(),q(new Error("NetworkError"))},R.onload=function(){q(null)},R.onabort=function(){q(null)},R.onreadystatechange=function(){if(R.readyState===a.HEADERS_RECEIVED){var je=R.status,We=R.statusText,Q=R.getResponseHeader("Content-Type"),et=R.getAllResponseHeaders();M(je,We,Q,new k(et))}},R.withCredentials=le;for(var Me in _e)Object.prototype.hasOwnProperty.call(_e,Me)&&R.setRequestHeader(Me,_e[Me]);return R.send(),R};function L(R){this._headers=R}L.prototype.get=function(R){return this._headers.get(R)};function V(){}V.prototype.open=function(R,M,oe,q,me,le,_e){var Xe=null,Me=new m,je=Me.signal,We=new v;return d(me,{headers:_e,credentials:le?"include":"same-origin",signal:je,cache:"no-store"}).then(function(Q){return Xe=Q.body.getReader(),M(Q.status,Q.statusText,Q.headers.get("Content-Type"),new L(Q.headers)),new u(function(et,ut){var be=function(){Xe.read().then(function(ft){if(ft.done)et(void 0);else{var Et=We.decode(ft.value,{stream:!0});oe(Et),be()}}).catch(function(ft){ut(ft)})};be()})}).catch(function(Q){if(Q.name!=="AbortError")return Q}).then(function(Q){q(Q)}),{abort:function(){Xe!=null&&Xe.cancel(),Me.abort()}}};function G(){this._listeners=Object.create(null)}function $(R){n(function(){throw R},0)}G.prototype.dispatchEvent=function(R){R.target=this;var M=this._listeners[R.type];if(M!=null)for(var oe=M.length,q=0;q<oe;q+=1){var me=M[q];try{typeof me.handleEvent=="function"?me.handleEvent(R):me.call(this,R)}catch(le){$(le)}}},G.prototype.addEventListener=function(R,M){R=String(R);var oe=this._listeners,q=oe[R];q==null&&(q=[],oe[R]=q);for(var me=!1,le=0;le<q.length;le+=1)q[le]===M&&(me=!0);me||q.push(M)},G.prototype.removeEventListener=function(R,M){R=String(R);var oe=this._listeners,q=oe[R];if(q!=null){for(var me=[],le=0;le<q.length;le+=1)q[le]!==M&&me.push(q[le]);me.length===0?delete oe[R]:oe[R]=me}};function ee(R){this.type=R,this.target=void 0}function fe(R,M){ee.call(this,R),this.data=M.data,this.lastEventId=M.lastEventId}fe.prototype=Object.create(ee.prototype);function C(R,M){ee.call(this,R),this.status=M.status,this.statusText=M.statusText,this.headers=M.headers}C.prototype=Object.create(ee.prototype);function Ee(R,M){ee.call(this,R),this.error=M.error}Ee.prototype=Object.create(ee.prototype);var ie=-1,Z=0,D=1,Y=2,F=-1,re=0,pe=1,ze=2,Pe=3,Ze=/^text\/event\-stream(;.*)?$/i,Je=1e3,Ue=18e6,W=function(R,M){var oe=R==null?M:parseInt(R,10);return oe!==oe&&(oe=M),Ae(oe)},Ae=function(R){return Math.min(Math.max(R,Je),Ue)},ct=function(R,M,oe){try{typeof M=="function"&&M.call(R,oe)}catch(q){$(q)}};function rt(R,M){G.call(this),M=M||{},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,pt(this,R,M)}function Ht(){return a!=null&&"withCredentials"in a.prototype||i==null?new a:new i}var Rr=d!=null&&f!=null&&"body"in f.prototype;function pt(R,M,oe){M=String(M);var q=!!oe.withCredentials,me=oe.lastEventIdQueryParameterName||"lastEventId",le=Ae(1e3),_e=W(oe.heartbeatTimeout,45e3),Xe="",Me=le,je=!1,We=0,Q=oe.headers||{},et=oe.Transport,ut=Rr&&et==null?void 0:new I(et!=null?new et:Ht()),be=et!=null&&typeof et!="string"?new et:ut==null?new V:new z,ft=void 0,Et=0,ar=ie,An="",Vo="",Ir="",j="",ye=re,kt=0,wt=0,ht=function(xt,St,Vt,Gt){if(ar===Z)if(xt===200&&Vt!=null&&Ze.test(Vt)){ar=D,je=Date.now(),Me=le,R.readyState=D;var Fe=new C("open",{status:xt,statusText:St,headers:Gt});R.dispatchEvent(Fe),ct(R,R.onopen,Fe)}else{var ke="";xt!==200?(St&&(St=St.replace(/\s+/g," ")),ke="EventSource's response has a status "+xt+" "+St+" that is not 200. Aborting the connection."):ke="EventSource's response has a Content-Type specifying an unsupported type: "+(Vt==null?"-":Vt.replace(/\s+/g," "))+". Aborting the connection.",ni();var Fe=new C("error",{status:xt,statusText:St,headers:Gt});R.dispatchEvent(Fe),ct(R,R.onerror,Fe),console.error(ke)}},Rt=function(xt){if(ar===D){for(var St=-1,Vt=0;Vt<xt.length;Vt+=1){var Gt=xt.charCodeAt(Vt);(Gt===10||Gt===13)&&(St=Vt)}var Fe=(St!==-1?j:"")+xt.slice(0,St+1);j=(St===-1?j:"")+xt.slice(St+1),xt!==""&&(je=Date.now(),We+=xt.length);for(var ke=0;ke<Fe.length;ke+=1){var Gt=Fe.charCodeAt(ke);if(ye===F&&Gt===10)ye=re;else if(ye===F&&(ye=re),Gt===13||Gt===10){if(ye!==re){ye===pe&&(wt=ke+1);var Ct=Fe.slice(kt,wt-1),It=Fe.slice(wt+(wt<ke&&Fe.charCodeAt(wt)===32?1:0),ke);Ct==="data"?(An+=`
421
+ `,An+=It):Ct==="id"?Vo=It:Ct==="event"?Ir=It:Ct==="retry"?(le=W(It,le),Me=le):Ct==="heartbeatTimeout"&&(_e=W(It,_e),Et!==0&&(o(Et),Et=n(function(){Kn()},_e)))}if(ye===re){if(An!==""){Xe=Vo,Ir===""&&(Ir="message");var gt=new fe(Ir,{data:An.slice(1),lastEventId:Vo});if(R.dispatchEvent(gt),Ir==="open"?ct(R,R.onopen,gt):Ir==="message"?ct(R,R.onmessage,gt):Ir==="error"&&ct(R,R.onerror,gt),ar===Y)return}An="",Ir=""}ye=Gt===13?F:re}else ye===re&&(kt=ke,ye=pe),ye===pe?Gt===58&&(wt=ke+1,ye=ze):ye===ze&&(ye=Pe)}}},Rn=function(xt){if(ar===D||ar===Z){ar=ie,Et!==0&&(o(Et),Et=0),Et=n(function(){Kn()},Me),Me=Ae(Math.min(le*16,Me*2)),R.readyState=Z;var St=new Ee("error",{error:xt});R.dispatchEvent(St),ct(R,R.onerror,St),xt!=null&&console.error(xt)}},ni=function(){ar=Y,ft!=null&&(ft.abort(),ft=void 0),Et!==0&&(o(Et),Et=0),R.readyState=Y},Kn=function(){if(Et=0,ar!==ie){if(!je&&ft!=null)Rn(new Error("No activity within "+_e+" milliseconds. "+(ar===Z?"No response received.":We+" chars received.")+" Reconnecting.")),ft!=null&&(ft.abort(),ft=void 0);else{var xt=Math.max((je||Date.now())+_e-Date.now(),1);je=!1,Et=n(function(){Kn()},xt)}return}je=!1,We=0,Et=n(function(){Kn()},_e),ar=Z,An="",Ir="",Vo=Xe,j="",kt=0,wt=0,ye=re;var St=M;if(M.slice(0,5)!=="data:"&&M.slice(0,5)!=="blob:"&&Xe!==""){var Vt=M.indexOf("?");St=Vt===-1?M:M.slice(0,Vt+1)+M.slice(Vt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(It,gt){return gt===me?"":It}),St+=(M.indexOf("?")===-1?"?":"&")+me+"="+encodeURIComponent(Xe)}var Gt=R.withCredentials,Fe={};Fe.Accept="text/event-stream";var ke=R.headers;if(ke!=null)for(var Ct in ke)Object.prototype.hasOwnProperty.call(ke,Ct)&&(Fe[Ct]=ke[Ct]);try{ft=be.open(ut,ht,Rt,Rn,St,Gt,Fe)}catch(It){throw ni(),It}};R.url=M,R.readyState=Z,R.withCredentials=q,R.headers=Q,R._close=ni,Kn()}rt.prototype=Object.create(G.prototype),rt.prototype.CONNECTING=Z,rt.prototype.OPEN=D,rt.prototype.CLOSED=Y,rt.prototype.close=function(){this._close()},rt.CONNECTING=Z,rt.OPEN=D,rt.CLOSED=Y,rt.prototype.withCredentials=void 0;var Dt=c;a!=null&&(c==null||!("withCredentials"in c.prototype))&&(Dt=rt),function(R){{var M=R(e);M!==void 0&&(t.exports=M)}}(function(R){R.EventSourcePolyfill=rt,R.NativeEventSource=c,R.EventSource=Dt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Pl:globalThis)})(nc,nc.exports);var Vd=nc.exports;const Gd=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!=null)),Sb=t=>{try{return new URL(t).hostname}catch{return t}},Tb=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:Sb(t.usedLinks.url),breadcrumb:e,generated:{summary:t.usedLinks.description??t.usedLinks.summary??""}}},Wd=(t,e)=>{const r=t.all.length,n=Tb(e);return n.referenceNumber=r+1,t.all.push(n),t},Eb=Vd.NativeEventSource||Vd.EventSourcePolyfill;let Kd;class La{constructor({apiUrl:e,apiKey:r="X9hL4Gp5W2D7eRtF"}){ae(this,"apiUrl");ae(this,"apiKey");ae(this,"lastRequestId",null);ae(this,"metadata");this.apiUrl=e,this.apiKey=r,this.metadata=this.getUserData(),Kd=this}async getUserData(){var e;try{const r=Gl.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 Gl.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 Kd}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(Gd(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 Eb(`${this.apiUrl}${e}?${new URLSearchParams({...Gd(r),key:this.apiKey}).toString()}`)}async quickFeedback(e){const r={...e,rID:this.lastRequestId};return this.postData("/quickfeedback",r,"Got an error when trying to post quick feedback")}async feedback(e){try{if((await this.metadata).mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const n=await Gl.getItem("uID"),o={...e,rID:this.lastRequestId,uID: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(e){const r={...e,rID:this.lastRequestId};return this.postData("/classification",r,"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;if(n.mode==="maintenance")throw new Error("Can not chat in maintenance mode");return this.fetchSSE("/assistant/sse",{query:e,uID:n.userId,cID:n.conversationId,lang:r.lang,model:r.model,chat:"true"})}chat(e,r={}){const n=Zt({state:"loading"});let o=!0,a=!1;const i=new Date().toISOString();return this.chatInternal(e,r).then(s=>{s.onmessage=c=>{const l=JSON.parse(c.data);"id"in l&&(this.lastRequestId=l.id),"response"in l?l.response==="__CLR__"?o=!1:l.response==="__THIS_IS_THE_ANSWER_END__"?(a=!0,n.update(u=>{if(u.state!=="streaming")throw new Error("Invalid state transition to done");return{payload:{...u.payload,partial:!1},state:"done"}})):o===!1&&a===!1&&n.update(u=>{if(u.state==="streaming"){const d=u.payload.message.markdown+l.response;return{state:"streaming",payload:{...u.payload,partial:!0,message:{markdown:d,html:Hd(d,u.payload)}}}}if(u.state==="loading"){const d=l.response;return{state:"streaming",payload:{type:"bot",time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:d,html:Hd(d,{type:"bot",time:i,partial:!0,sources:{all:[],used:[]},message:{markdown:"",html:""}})}}}}else throw console.error("Invalid message state",u),new Error("Invalid message state")}):"usedLinks"in l&&n.update(u=>{var d;if(u.state==="loading")return{state:"streaming",payload:{type:"bot",time:i,partial:!0,message:{markdown:"",html:""},sources:Wd({all:[],used:[]},l)}};if(u.state==="streaming")return{state:"streaming",payload:{...u.payload,partial:!0,sources:Wd((d=u.payload)==null?void 0:d.sources,l)}};throw console.error("Invalid source state",u),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}}rp();var Cb=yi('<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>'),Ab=yi('<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>'),Rb=yi('<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>'),Ib=yi('<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 Ma(t,e){Re(e,!1);let r=x(e,"type",12,"success");var n=se(),o=U(n);{var a=s=>{var c=Cb();T(s,c)},i=s=>{var c=se(),l=U(c);{var u=f=>{var v=Ab();T(f,v)},d=f=>{var v=se(),h=U(v);{var m=g=>{var b=Rb();T(g,b)},y=g=>{var b=se(),w=U(b);{var I=k=>{var z=Ib();T(k,z)},S=k=>{};de(w,k=>{r()==="warning"?k(I):k(S,!1)},!0)}T(g,b)};de(h,g=>{r()==="info"?g(m):g(y,!1)},!0)}T(f,v)};de(l,f=>{r()==="error"?f(u):f(d,!1)},!0)}T(s,c)};de(o,s=>{r()==="success"?s(a):s(i,!1)})}return T(t,n),Ie({get type(){return r()},set type(s){r(s),_()}})}Oe(Ma,{type:{}},[],[],!0);var Ob=te('<div class="sonner-loading-bar"></div>'),Nb=te('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Yd(t,e){Re(e,!1);let r=x(e,"visible",12);const n=Array(12).fill(0);go();var o=Nb(),a=N(o);return _r(a,5,()=>n,Mr,(i,s)=>{var c=Ob();T(i,c)}),O(a),O(o),ue(()=>Te(o,"data-visible",r())),T(t,o),Ie({get visible(){return r()},set visible(i){r(i),_()}})}Oe(Yd,{visible:{}},[],[],!0);function No(...t){return t.filter(Boolean).join(" ")}const Qd=typeof document<"u";function Jd(t){const e=Zt(t);function r(o){Qd&&e.set(o)}function n(o){Qd&&e.update(o)}return{subscribe:e.subscribe,set:r,update:n}}let Xd=0;function Pb(){const t=Jd([]),e=Jd([]);function r(g){t.update(b=>[g,...b])}function n(g){var V;const{message:b,...w}=g,I=typeof(g==null?void 0:g.id)=="number"||g.id&&((V=g.id)==null?void 0:V.length)>0?g.id:Xd++,S=g.dismissable===void 0?!0:g.dismissable,k=g.type===void 0?"default":g.type;return Sa(t).find(G=>G.id===I)?t.update(G=>G.map($=>$.id===I?{...$,...g,id:I,title:b,dismissable:S,type:k,updated:!0}:{...$,updated:!1})):r({...w,id:I,title:b,dismissable:S,type:k}),I}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 c(g,b){return n({...b,type:"success",message:g})}function l(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 I=g instanceof Promise?g:g();let S=w!==void 0;return I.then(k=>{if(k&&typeof k.ok=="boolean"&&!k.ok){S=!1;const z=typeof b.error=="function"?b.error(`HTTP error! status: ${k.status}`):b.error;n({id:w,type:"error",message:z})}else if(b.success!==void 0){S=!1;const z=typeof b.success=="function"?b.success(k):b.success;n({id:w,type:"success",message:z})}}).catch(k=>{if(b.error!==void 0){S=!1;const z=typeof b.error=="function"?b.error(k):b.error;n({id:w,type:"error",message:z})}}).finally(()=>{var k;S&&(o(w),w=void 0),(k=b.finally)==null||k.call(b)}),w}function v(g,b){const w=(b==null?void 0:b.id)||Xd++;return n({component:g,id:w,...b}),w}function h(g){e.update(b=>b.filter(w=>w.toastId!==g))}function m(g){if(Sa(e).find(w=>w.toastId===g.toastId)===void 0){e.update(w=>[g,...w]);return}e.update(w=>w.map(I=>I.toastId===g.toastId?g:I))}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:d,promise:f,custom:v,removeHeight:h,setHeight:m,reset:y,toasts:t,heights:e}}const fr=Pb();function Lb(t,e){return fr.create({message:t,...e})}const Zn=Object.assign(Lb,{success:fr.success,info:fr.info,warning:fr.warning,error:fr.error,custom:fr.custom,message:fr.message,promise:fr.promise,dismiss:fr.dismiss,loading:fr.loading}),Mb=t=>({subscribe:t});var Db=te('<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>'),zb=te('<div data-icon=""><!> <!></div>'),Fb=te('<div data-title=""><!></div>'),Bb=te('<div data-description=""><!></div>'),qb=te('<button data-button="" data-cancel=""> </button>'),$b=te('<button data-button=""> </button>'),jb=te('<!> <div data-content=""><!> <!></div> <!> <!>',1),Zb=te('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function ef(t,e){const r=_l(e,["children","$$slots","$$events","$$legacy","$$host"]);Re(e,!1);const n=$t(),o=()=>bt(G,"$heights",n),a=()=>bt(p(We),"$effect",n),i=()=>bt(V,"$toasts",n),s=Ke(void 0,!0),c=Ke(void 0,!0),l=Ke(void 0,!0),u=Ke(void 0,!0),d=Ke(void 0,!0),f=Ke(void 0,!0),v=Ke(void 0,!0),h=Ke(void 0,!0),m=Ke(void 0,!0),y=Ke(void 0,!0),g=Ke(void 0,!0),b=Ke(void 0,!0),w=4e3,I=14,S=20,k=200,z=.05,L={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:V,heights:G,removeHeight:$,setHeight:ee,remove:fe}=fr;let C=x(e,"toast",13),Ee=x(e,"index",13),ie=x(e,"expanded",13),Z=x(e,"invert",13),D=x(e,"position",13),Y=x(e,"visibleToasts",13),F=x(e,"expandByDefault",13),re=x(e,"closeButton",13),pe=x(e,"interacting",13),ze=x(e,"cancelButtonStyle",13,""),Pe=x(e,"actionButtonStyle",13,""),Ze=x(e,"duration",13,4e3),Je=x(e,"descriptionClass",13,""),Ue=x(e,"classes",29,()=>({})),W=x(e,"unstyled",13,!1),Ae=Ke(!1,!0),ct=Ke(!1,!0),rt=Ke(!1,!0),Ht=Ke(!1,!0),Rr=Ke(0,!0),pt=Ke(0,!0),Dt=Ke(void 0,!0),R=Ke(0,!0),M=0,oe=0,q=null;async function me(){if(!p(Ae))return;await al();let j;ie()||F()?j=1:j=1-Ee()*z,p(Dt).style.setProperty("height","auto");const ye=p(Dt).offsetHeight,kt=p(Dt).getBoundingClientRect().height,wt=Math.round((kt/j+Number.EPSILON)*100)/100;p(Dt).style.removeProperty("height");let ht;Math.abs(wt-ye)<1?ht=wt:ht=ye,A(pt,ht),ee({toastId:C().id,height:ht})}function le(){A(ct,!0),A(Rr,p(R)),$(C().id),setTimeout(()=>{fe(C().id)},k)}let _e=Ke(void 0,!0),Xe=Ke(C().duration||Ze()||w,!0);function Me(){if(oe<M){const j=new Date().getTime()-M;A(Xe,p(Xe)-j)}oe=new Date().getTime()}function je(){M=new Date().getTime(),A(_e,setTimeout(()=>{var j,ye;(ye=(j=C()).onAutoClose)==null||ye.call(j,C()),le()},p(Xe)))}let We=Ke(void 0,!0);Ti(()=>{A(Ae,!0);const j=p(Dt).getBoundingClientRect().height;return A(pt,j),ee({toastId:C().id,height:j}),()=>$(C().id)});function Q(j){if(p(g))return;A(Rr,p(R));const ye=j.target;ye.setPointerCapture(j.pointerId),ye.tagName!=="BUTTON"&&(A(rt,!0),q={x:j.clientX,y:j.clientY})}function et(){var ye,kt,wt;if(p(Ht))return;q=null;const j=Number(((ye=p(Dt))==null?void 0:ye.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(j)>=S){A(Rr,p(R)),(wt=(kt=C()).onDismiss)==null||wt.call(kt,C()),le(),A(Ht,!0);return}p(Dt).style.setProperty("--swipe-amount","0px"),A(rt,!1)}function ut(j){if(!q)return;const ye=j.clientY-q.y,kt=j.clientX-q.x,ht=(p(m)[0]==="top"?Math.min:Math.max)(0,ye),Rt=j.pointerType==="touch"?10:2;Math.abs(ht)>Rt?p(Dt).style.setProperty("--swipe-amount",`${ye}px`):Math.abs(kt)>Rt&&(q=null)}Ve(()=>Ge(Ue()),()=>{Ue({...L,...Ue()})}),Ve(()=>Ge(Ee()),()=>{A(s,Ee()===0)}),Ve(()=>(Ge(Ee()),Ge(Y())),()=>{A(c,Ee()+1<=Y())}),Ve(()=>Ge(C()),()=>{A(l,C().title)}),Ve(()=>Ge(C()),()=>{A(u,C().description)}),Ve(()=>Ge(C()),()=>{A(d,C().type)}),Ve(()=>Ge(C()),()=>{A(f,C().class||"")}),Ve(()=>Ge(C()),()=>{A(v,C().descriptionClass||"")}),Ve(()=>(o(),Ge(C())),()=>{A(h,o().findIndex(j=>j.toastId===C().id)||0)}),Ve(()=>Ge(D()),()=>{A(m,D().split("-"))}),Ve(()=>(o(),p(h)),()=>{A(y,o().reduce((j,ye,kt)=>kt>=p(h)?j:j+ye.height,0))}),Ve(()=>(Ge(Z()),Ge(C())),()=>{Z(C().invert||Z())}),Ve(()=>p(d),()=>{A(g,p(d)==="loading")}),Ve(()=>(p(h),p(y)),()=>{A(R,Math.round(p(h)*I+p(y)))}),Ve(()=>(p(l),p(u)),()=>{p(l),p(u),me()}),Ve(()=>(Ge(C()),p(_e),Ge(Ze())),()=>{C().updated&&(clearTimeout(p(_e)),A(Xe,C().duration||Ze()||w),je())}),Ve(()=>(Ge(C()),p(d)),()=>{A(b,C().promise&&p(d)==="loading"||C().duration===Number.POSITIVE_INFINITY)}),Ve(()=>(p(b),Ge(ie()),Ge(pe()),p(_e)),()=>{jp(A(We,Mb(()=>(p(b)||(ie()||pe()?Me():je()),()=>clearTimeout(p(_e))))),"$effect",n)}),Ve(()=>a(),()=>{a()}),Ve(()=>Ge(C()),()=>{C().delete&&le()}),Xs(),go(!0);var be=Zb();Te(be,"tabindex",0);const ft=Nt(()=>{var j,ye,kt,wt,ht,Rt;return No(r.class,p(f),(j=Ue())==null?void 0:j.toast,(kt=(ye=C())==null?void 0:ye.classes)==null?void 0:kt.toast,(wt=Ue())==null?void 0:wt[p(d)],(Rt=(ht=C())==null?void 0:ht.classes)==null?void 0:Rt[p(d)])});ue(()=>Te(be,"data-promise",!!C().promise)),ue(()=>Te(be,"data-expanded",!!(ie()||F()&&p(Ae))));var Et=N(be);{var ar=j=>{var ye=Db(),kt=Se(()=>p(g)?void 0:()=>{var ht,Rt;le(),(Rt=(ht=C()).onDismiss)==null||Rt.call(ht,C())});const wt=Nt(()=>{var ht,Rt,Rn;return No((ht=Ue())==null?void 0:ht.closeButton,(Rn=(Rt=C())==null?void 0:Rt.classes)==null?void 0:Rn.closeButton)});ue(()=>{Te(ye,"data-disabled",p(g)),kr(ye,p(wt))}),dt("click",ye,function(...ht){var Rt;(Rt=p(kt))==null||Rt.apply(this,ht)}),T(j,ye)};de(Et,j=>{re()&&!C().component&&j(ar)})}var An=ne(Et,2);{var Vo=j=>{var ye=se(),kt=U(ye);Bt(kt,()=>C().component,(wt,ht)=>{ht(wt,vn(()=>C().componentProps,{$$events:{closeToast:le}}))}),T(j,ye)},Ir=j=>{var ye=jb(),kt=U(ye);{var wt=Fe=>{var ke=zb(),Ct=N(ke);{var It=it=>{var Wt=se(),fn=U(Wt);Dr(fn,e,"loading-icon",{},null),T(it,Wt)};de(Ct,it=>{(C().promise||p(d)==="loading")&&!C().icon&&it(It)})}var gt=ne(Ct,2);{var Jt=it=>{var Wt=se(),fn=U(Wt);Bt(fn,()=>C().icon,(Yn,Ec)=>{Ec(Yn,{})}),T(it,Wt)},st=it=>{var Wt=se(),fn=U(Wt);{var Yn=Go=>{var oi=se(),Cc=U(oi);Dr(Cc,e,"success-icon",{},null),T(Go,oi)},Ec=Go=>{var oi=se(),Cc=U(oi);{var ww=Wo=>{var ai=se(),Ac=U(ai);Dr(Ac,e,"error-icon",{},null),T(Wo,ai)},_w=Wo=>{var ai=se(),Ac=U(ai);{var kw=Ko=>{var ii=se(),Rc=U(ii);Dr(Rc,e,"warning-icon",{},null),T(Ko,ii)},xw=Ko=>{var ii=se(),Rc=U(ii);{var Sw=Ic=>{var gh=se(),Tw=U(gh);Dr(Tw,e,"info-icon",{},null),T(Ic,gh)};de(Rc,Ic=>{p(d)==="info"&&Ic(Sw)},!0)}T(Ko,ii)};de(Ac,Ko=>{p(d)==="warning"?Ko(kw):Ko(xw,!1)},!0)}T(Wo,ai)};de(Cc,Wo=>{p(d)==="error"?Wo(ww):Wo(_w,!1)},!0)}T(Go,oi)};de(fn,Go=>{p(d)==="success"?Go(Yn):Go(Ec,!1)},!0)}T(it,Wt)};de(gt,it=>{C().icon?it(Jt):it(st,!1)})}O(ke),T(Fe,ke)};de(kt,Fe=>{(p(d)!=="default"||C().icon||C().promise)&&Fe(wt)})}var ht=ne(kt,2),Rt=N(ht);{var Rn=Fe=>{var ke=Fb();const Ct=Nt(()=>{var st,it,Wt;return No((st=Ue())==null?void 0:st.title,(Wt=(it=C())==null?void 0:it.classes)==null?void 0:Wt.title)});var It=N(ke);{var gt=st=>{var it=se(),Wt=U(it);Bt(Wt,()=>C().title,(fn,Yn)=>{Yn(fn,vn(()=>C().componentProps))}),T(st,it)},Jt=st=>{var it=fo();ue(()=>qe(it,C().title)),T(st,it)};de(It,st=>{typeof C().title!="string"?st(gt):st(Jt,!1)})}O(ke),ue(()=>kr(ke,p(Ct))),T(Fe,ke)};de(Rt,Fe=>{C().title&&Fe(Rn)})}var ni=ne(Rt,2);{var Kn=Fe=>{var ke=Bb();const Ct=Nt(()=>{var st,it;return No(Je(),p(v),(st=Ue())==null?void 0:st.description,(it=C().classes)==null?void 0:it.description)});var It=N(ke);{var gt=st=>{var it=se(),Wt=U(it);Bt(Wt,()=>C().description,(fn,Yn)=>{Yn(fn,vn(()=>C().componentProps))}),T(st,it)},Jt=st=>{var it=fo();ue(()=>qe(it,C().description)),T(st,it)};de(It,st=>{typeof C().description!="string"?st(gt):st(Jt,!1)})}O(ke),ue(()=>kr(ke,p(Ct))),T(Fe,ke)};de(ni,Fe=>{C().description&&Fe(Kn)})}O(ht);var xt=ne(ht,2);{var St=Fe=>{var ke=qb();const Ct=Nt(()=>{var gt,Jt,st;return No((gt=Ue())==null?void 0:gt.cancelButton,(st=(Jt=C())==null?void 0:Jt.classes)==null?void 0:st.cancelButton)});var It=N(ke,!0);O(ke),ue(()=>{Te(ke,"style",ze()),kr(ke,p(Ct)),qe(It,C().cancel.label)}),dt("click",ke,()=>{var gt;le(),(gt=C().cancel)!=null&&gt.onClick&&C().cancel.onClick()}),T(Fe,ke)};de(xt,Fe=>{C().cancel&&Fe(St)})}var Vt=ne(xt,2);{var Gt=Fe=>{var ke=$b();const Ct=Nt(()=>{var gt,Jt,st;return No((gt=Ue())==null?void 0:gt.actionButton,(st=(Jt=C())==null?void 0:Jt.classes)==null?void 0:st.actionButton)});var It=N(ke,!0);O(ke),ue(()=>{Te(ke,"style",Pe()),kr(ke,p(Ct)),qe(It,C().action.label)}),dt("click",ke,gt=>{var Jt;(Jt=C().action)==null||Jt.onClick(gt),!gt.defaultPrevented&&le()}),T(Fe,ke)};de(Vt,Fe=>{C().action&&Fe(Gt)})}T(j,ye)};de(An,j=>{C().component?j(Vo):j(Ir,!1)})}return O(be),qr(be,j=>A(Dt,j),()=>p(Dt)),ue(()=>{var j;Te(be,"aria-live",C().important?"assertive":"polite"),kr(be,p(ft)),Te(be,"data-styled",!(C().component||(j=C())!=null&&j.unstyled||W())),Te(be,"data-mounted",p(Ae)),Te(be,"data-removed",p(ct)),Te(be,"data-visible",p(c)),Te(be,"data-y-position",p(m)[0]),Te(be,"data-x-position",p(m)[1]),Te(be,"data-index",Ee()),Te(be,"data-front",p(s)),Te(be,"data-swiping",p(rt)),Te(be,"data-type",p(d)),Te(be,"data-invert",Z()),Te(be,"data-swipe-out",p(Ht)),Te(be,"style",`${r.style} ${C().style}`),Fr(be,"--index",Ee()),Fr(be,"--toasts-before",Ee()),Fr(be,"--z-index",i().length-Ee()),Fr(be,"--offset",`${p(ct)?p(Rr):p(R)}px`),Fr(be,"--initial-height",`${p(pt)}px`)}),dt("pointerdown",be,Q),dt("pointerup",be,et),dt("pointermove",be,ut),T(t,be),Ie({get toast(){return C()},set toast(j){C(j),_()},get index(){return Ee()},set index(j){Ee(j),_()},get expanded(){return ie()},set expanded(j){ie(j),_()},get invert(){return Z()},set invert(j){Z(j),_()},get position(){return D()},set position(j){D(j),_()},get visibleToasts(){return Y()},set visibleToasts(j){Y(j),_()},get expandByDefault(){return F()},set expandByDefault(j){F(j),_()},get closeButton(){return re()},set closeButton(j){re(j),_()},get interacting(){return pe()},set interacting(j){pe(j),_()},get cancelButtonStyle(){return ze()},set cancelButtonStyle(j){ze(j),_()},get actionButtonStyle(){return Pe()},set actionButtonStyle(j){Pe(j),_()},get duration(){return Ze()},set duration(j){Ze(j),_()},get descriptionClass(){return Je()},set descriptionClass(j){Je(j),_()},get classes(){return Ue()},set classes(j){Ue(j),_()},get unstyled(){return W()},set unstyled(j){W(j),_()}})}Oe(ef,{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 Ub=te("<ol></ol>"),Hb=te('<section class="svelte-1fo5d1m"></section>');const Vb={hash:"svelte-1fo5d1m",code:`:where(html[dir='ltr']),
422
422
  :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']),
423
423
  :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,
424
424
  system-ui,
@@ -550,14 +550,14 @@ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An err
550
550
  .sonner-loading-bar {transition:none !important;
551
551
  animation: none !important;}
552
552
  }.sonner-loader {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);transform-origin:center;transition:opacity 200ms,
553
- transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function tf(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),wi(t,Vb);const o=$t(),a=()=>vt(C,"$toasts",o),i=()=>vt(he,"$heights",o),s=He(),c=He(),l=3,u="32px",d=356,f=14,v="dark",h="light";function m(te){return te!=="system"?te: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 te=document.documentElement.getAttribute("dir");return te==="auto"||!te?window.getComputedStyle(document.documentElement).direction:te}let g=x(e,"invert",12,!1),b=x(e,"theme",12,"light"),w=x(e,"position",12,"bottom-right"),I=x(e,"hotkey",28,()=>["altKey","KeyT"]),S=x(e,"containerAriaLabel",12,"Notifications"),k=x(e,"richColors",12,!1),M=x(e,"expand",12,!1),L=x(e,"duration",12,4e3),G=x(e,"visibleToasts",12,l),W=x(e,"closeButton",12,!1),$=x(e,"toastOptions",28,()=>({})),re=x(e,"offset",12,null),de=x(e,"dir",28,y);const{toasts:C,heights:he,reset:V}=fr;let Z=He(!1),z=He(!1),K=He(m(b())),q=He(),ne=null,Te=!1;qp(()=>{p(q)&&ne&&(ne.focus({preventScroll:!0}),ne=null,Te=!1)}),xi(()=>{V();const te=Pe=>{var Qe,Ht;I().every(Ir=>Pe[Ir]||Pe.code===Ir)&&(R(Z,!0),(Qe=p(q))==null||Qe.focus()),Pe.code==="Escape"&&(document.activeElement===p(q)||(Ht=p(q))!=null&&Ht.contains(document.activeElement))&&R(Z,!1)};return document.addEventListener("keydown",te),()=>{document.removeEventListener("keydown",te)}});function it(te){Te&&!te.currentTarget.contains(te.relatedTarget)&&(Te=!1,ne&&(ne.focus({preventScroll:!0}),ne=null))}function tt(te){Te||(Te=!0,ne=te.relatedTarget)}$e(()=>(Ze(w()),a()),()=>{R(s,Array.from(new Set([w(),...a().filter(te=>te.position).map(te=>te.position)].filter(Boolean))))}),$e(()=>Ze(I()),()=>{R(c,I().join("+").replace(/Key/g,"").replace(/Digit/g,""))}),$e(()=>a(),()=>{a().length<=1&&R(Z,!1)}),$e(()=>a(),()=>{const te=a().filter(Pe=>Pe.dismiss&&!Pe.delete);if(te.length>0){const Pe=a().map(st=>te.find(Ht=>Ht.id===st.id)?{...st,delete:!0}:st);C.set(Pe)}}),$e(()=>Ze(b()),()=>{if(b()!=="system"&&R(K,b()),typeof window<"u"){b()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R(K,v):R(K,h));const te=window.matchMedia("(prefers-color-scheme: dark)"),Pe=({matches:st})=>{R(K,st?v:h)};"addEventListener"in te?te.addEventListener("change",Pe):te.addListener(Pe)}}),Qs(),po();var ut=ie(),It=U(ut);{var nt=te=>{var Pe=Hb();Ce(Pe,"tabindex",-1),_r(Pe,5,()=>p(s),Dr,(Qe,Ht,Ir)=>{var ht=Ub();let Dt;_r(ht,7,()=>a().filter(D=>!D.position&&Ir===0||D.position===p(Ht)),D=>D.id,(D,oe,F)=>{var me=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.actionButtonStyle)||""}),ce=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.cancelButtonStyle)||""}),we=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.class)||""}),We=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.descriptionClass)||""}),Le=Nt(()=>$().classes||{}),Be=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.duration)??L()}),Ue=Nt(()=>$().unstyled||!1);ef(D,{get index(){return p(F)},get toast(){return p(oe)},get invert(){return g()},get visibleToasts(){return G()},get closeButton(){return W()},get interacting(){return p(z)},get position(){return p(Ht)},get expandByDefault(){return M()},get expanded(){return p(Z)},get actionButtonStyle(){return p(me)},get cancelButtonStyle(){return p(ce)},get class(){return p(we)},get descriptionClass(){return p(We)},get classes(){return p(Le)},get duration(){return p(Be)},get unstyled(){return p(Ue)},$$slots:{"loading-icon":(Q,Ke)=>{var lt=ie(),be=U(lt);zr(be,e,"loading-icon",{},dt=>{var Tt=Nt(()=>p(oe).type==="loading");Yd(dt,{get visible(){return p(Tt)}})}),T(Q,lt)},"success-icon":(Q,Ke)=>{var lt=ie(),be=U(lt);zr(be,e,"success-icon",{},dt=>{La(dt,{type:"success"})}),T(Q,lt)},"error-icon":(Q,Ke)=>{var lt=ie(),be=U(lt);zr(be,e,"error-icon",{},dt=>{La(dt,{type:"error"})}),T(Q,lt)},"warning-icon":(Q,Ke)=>{var lt=ie(),be=U(lt);zr(be,e,"warning-icon",{},dt=>{La(dt,{type:"warning"})}),T(Q,lt)},"info-icon":(Q,Ke)=>{var lt=ie(),be=U(lt);zr(be,e,"info-icon",{},dt=>{La(dt,{type:"info"})}),T(Q,lt)}}})}),O(ht),qr(ht,D=>R(q,D),()=>p(q)),le(()=>{var D;Dt=qt(ht,Dt,{tabIndex:-1,class:r.class,"data-sonner-toaster":!0,"data-theme":p(K),"data-rich-colors":k(),dir:de()==="auto"?y():de(),"data-y-position":p(Ht).split("-")[0],"data-x-position":p(Ht).split("-")[1],style:r.style,...n},"svelte-1fo5d1m"),Br(ht,"--front-toast-height",`${(D=i()[0])==null?void 0:D.height}px`),Br(ht,"--offset",typeof re()=="number"?`${re()}px`:re()||u),Br(ht,"--width",`${d}px`),Br(ht,"--gap",`${f}px`),ht.dir=ht.dir}),ct("blur",ht,it),ct("focus",ht,tt),ct("mouseenter",ht,()=>R(Z,!0)),ct("mousemove",ht,()=>R(Z,!0)),ct("mouseleave",ht,()=>{p(z)||R(Z,!1)}),ct("pointerdown",ht,()=>R(z,!0)),ct("pointerup",ht,()=>R(z,!1)),T(Qe,ht)}),O(Pe),le(()=>Ce(Pe,"aria-label",`${S()} ${p(c)}`)),T(te,Pe)};fe(It,te=>{a().length>0&&te(nt)})}return T(t,ut),Re({get invert(){return g()},set invert(te){g(te),_()},get theme(){return b()},set theme(te){b(te),_()},get position(){return w()},set position(te){w(te),_()},get hotkey(){return I()},set hotkey(te){I(te),_()},get containerAriaLabel(){return S()},set containerAriaLabel(te){S(te),_()},get richColors(){return k()},set richColors(te){k(te),_()},get expand(){return M()},set expand(te){M(te),_()},get duration(){return L()},set duration(te){L(te),_()},get visibleToasts(){return G()},set visibleToasts(te){G(te),_()},get closeButton(){return W()},set closeButton(te){W(te),_()},get toastOptions(){return $()},set toastOptions(te){$(te),_()},get offset(){return re()},set offset(te){re(te),_()},get dir(){return de()},set dir(te){de(te),_()}})}Ie(tf,{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 Gb=async(t,e,r,n,o)=>{if(p(e)===void 0||p(r)===void 0)return;const a=Pa.getInstance();if(a)try{await a.classification({impact:p(e),quality:p(r)}),R(n,!0),No.success(o().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}catch(i){No.error(String(i),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}};var Wb=J('<label class="classification-feedback__option btn btn--secondary svelte-kmm5dm"><input type="radio" name="impact" class="svelte-kmm5dm"> </label>'),Kb=J('<label class="classification-feedback__option btn btn--secondary svelte-kmm5dm"><input type="radio" name="quality" class="svelte-kmm5dm"> </label>'),Yb=J('<button class="classification-feedback__submit btn btn--primary svelte-kmm5dm"> </button>'),Qb=J('<div class="classification-feedback__thank-you svelte-kmm5dm"> </div>'),Jb=J('<div><fieldset class="svelte-kmm5dm"><legend class="svelte-kmm5dm"> </legend> <!></fieldset> <fieldset class="svelte-kmm5dm"><legend class="svelte-kmm5dm"> </legend> <!></fieldset> <!></div>');const Xb={hash:"svelte-kmm5dm",code:".classification-feedback.svelte-kmm5dm {display:flex;flex-direction:column;gap:var(--spacer-32);padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);color:var(--message-user-color);background:var(--message-user-background);border-width:var(--message-user-border-width);border-color:var(--message-user-border-color);border-radius:var(--message-user-border-radius);box-shadow:var(--message-user-box-shadow);}fieldset.svelte-kmm5dm {display:flex;flex-direction:column;gap:var(--spacer-4);border:none;padding:0;margin:0;}legend.svelte-kmm5dm {font-weight:bold;margin-bottom:var(--spacer-8);}.classification-feedback__option.svelte-kmm5dm {display:flex;align-items:center;gap:var(--spacer-12);padding-left:var(--spacer-16);&:has(input:where(.svelte-kmm5dm):checked) {color:var(--btn-secondary-hover-color);background:var(--btn-secondary-hover-background);}}.classification-feedback__submit.svelte-kmm5dm {align-self:flex-start;}.classification-feedback__thank-you.svelte-kmm5dm {text-align:center;padding:var(--spacer-12);}"};function rf(t,e){Ae(e,!0),wi(t,Xb);const r=$t(),n=()=>vt(Ur,"$t",r),o=[],a=[];let i=x(e,"class",7),s=ke(void 0),c=ke(void 0),l=ke(!1),u=ke(void 0),d=ke(!1);wt(()=>{R(d,!0)}),(async()=>{const y=Pa.getInstance();if(!y)return;const g=await y.getClassification({url:window.location.href.replace(window.location.origin,"")});R(u,xe(g))})();var v=ie(),h=U(v);{var m=y=>{var g=Jb(),b=P(g),w=P(b),I=P(w,!0);O(w);var S=se(w,2);_r(S,17,()=>p(u).impact.options,Dr,(de,C)=>{var he=Wb(),V=P(he);hl(V);var Z,z=se(V);O(he),le(()=>{Z!==(Z=p(C).value)&&(V.value=(V.__value=p(C).value)==null?"":p(C).value),V.disabled=p(l),je(z,` ${p(C).label??""}`)}),Nu(o,[],V,()=>(p(C).value,p(s)),K=>R(s,K)),T(de,he)}),O(b);var k=se(b,2),M=P(k),L=P(M,!0);O(M);var G=se(M,2);_r(G,17,()=>p(u).quality.options,Dr,(de,C)=>{var he=Kb(),V=P(he);hl(V);var Z,z=se(V);O(he),le(()=>{Z!==(Z=p(C).value)&&(V.value=(V.__value=p(C).value)==null?"":p(C).value),V.disabled=p(l),je(z,` ${p(C).label??""}`)}),Nu(a,[],V,()=>(p(C).value,p(c)),K=>R(c,K)),T(de,he)}),O(k);var W=se(k,2);{var $=de=>{var C=Yb();C.__click=[Gb,s,c,l,n];var he=P(C,!0);O(C),le(()=>{C.disabled=p(s)===void 0||p(c)===void 0,je(he,n().send)}),T(de,C)},re=de=>{var C=Qb(),he=P(C,!0);O(C),le(()=>je(he,n().thankYouForFeedback)),xr(3,C,()=>Hl,()=>({duration:300})),T(de,C)};fe(W,de=>{p(l)?de(re,!1):de($)})}O(g),le(()=>{kr(g,`classification-feedback ${i()??""} svelte-kmm5dm`),je(I,p(u).impact.label),je(L,p(u).quality.label)}),xr(1,g,()=>Ro,()=>({y:20,duration:300})),T(y,g)};fe(h,y=>{p(u)&&p(d)&&y(m)})}return T(t,v),Re({get class(){return i()},set class(y){i(y),_()}})}Mn(["click"]),Ie(rf,{class:{}},[],[],!0);function e0(t){return typeof t=="function"}function t0(t){return t!==null&&typeof t=="object"}const r0=["string","number","bigint","boolean"];function oc(t){return t==null||r0.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>oc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const Ma=Symbol("box"),ac=Symbol("is-writable");function n0(t){return t0(t)&&Ma in t}function o0(t){return ee.isBox(t)&&ac in t}function ee(t){let e=ke(xe(t));return{[Ma]:!0,[ac]:!0,get current(){return p(e)},set current(r){R(e,xe(r))}}}function a0(t,e){const r=Se(t);return e?{[Ma]:!0,[ac]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Ma]:!0,get current(){return t()}}}function i0(t){return ee.isBox(t)?t:e0(t)?ee.with(t):ee(t)}function s0(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 l0(t){return ee.isWritableBox(t)?{[Ma]:!0,get current(){return t.current}}:t}ee.from=i0,ee.with=a0,ee.flatten=s0,ee.readonly=l0,ee.isBox=n0,ee.isWritableBox=o0;function nf(...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 of={},af=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,c0=/\n/g,u0=/^\s*/,d0=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,f0=/^:\s*/,h0=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p0=/^[;\s]*/,g0=/^\s+|\s+$/g,m0=`
554
- `,sf="/",lf="*",Zn="",v0="comment",b0="declaration",y0=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(m0);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),l(),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 c(h){var m=h.exec(t);if(m){var y=m[0];return o(y),t=t.slice(y.length),m}}function l(){c(u0)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=a();if(!(sf!=t.charAt(0)||lf!=t.charAt(1))){for(var m=2;Zn!=t.charAt(m)&&(lf!=t.charAt(m)||sf!=t.charAt(m+1));)++m;if(m+=2,Zn===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:v0,comment:y})}}function f(){var h=a(),m=c(d0);if(m){if(d(),!c(f0))return s("property missing ':'");var y=c(h0),g=h({type:b0,property:cf(m[0].replace(af,Zn)),value:y?cf(y[0].replace(af,Zn)):Zn});return c(p0),g}}function v(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return l(),v()};function cf(t){return t?t.replace(g0,Zn):Zn}var w0=Nl&&Nl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});var uf=of.default=k0,_0=w0(y0);function k0(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,_0.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 x0=uf.default||uf,S0=/\d/,T0=["-","_","/","."];function C0(t=""){if(!S0.test(t))return t!==t.toLowerCase()}function E0(t){const e=[];let r="",n,o;for(const a of t){const i=T0.includes(a);if(i===!0){e.push(r),r="",n=void 0;continue}const s=C0(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 df(t){return t?E0(t).map(e=>R0(e)).join(""):""}function A0(t){return I0(df(t||""))}function R0(t){return t?t[0].toUpperCase()+t.slice(1):""}function I0(t){return t?t[0].toLowerCase()+t.slice(1):""}function Xi(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[df(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[A0(n)]=o}return x0(t,r),e}function Un(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function ff(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=ff(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function ic(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=ff(t))&&(n&&(n+=" "),n+=e);return n}function O0(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 N0=O0(/[A-Z]/,t=>`-${t.toLowerCase()}`);function P0(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=>`${N0(e)}: ${t[e]};`).join(`
555
- `)}function hf(t={}){return P0(t).replace(`
556
- `," ")}hf({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 L0(t){var e;return t.length>2&&t.startsWith("on")&&t[2]===((e=t[2])==null?void 0:e.toLowerCase())}function nr(...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&&L0(o)){const l=a,u=i;e[o]=nf(l,u)}else if(s&&c)e[o]=Un(a,i);else if(o==="class"){const l=oc(a),u=oc(i);l&&u?e[o]=ic(a,i):l?e[o]=ic(a):u&&(e[o]=ic(i))}else if(o==="style"){const l=typeof a=="object",u=typeof i=="object",d=typeof a=="string",f=typeof i=="string";if(l&&u)e[o]={...a,...i};else if(l&&f){const v=Xi(i);e[o]={...a,...v}}else if(d&&u){const v=Xi(a);e[o]={...v,...i}}else if(d&&f){const v=Xi(a),h=Xi(i);e[o]={...v,...h}}else l?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=hf(e.style).replaceAll(`
557
- `," ")),e.hidden!==!0&&(e.hidden=void 0,delete e.hidden),e.disabled!==!0&&(e.disabled=void 0,delete e.disabled),e}const M0=typeof window<"u"?window:void 0;function D0(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}const Tc=class Tc extends Map{constructor(r){super();Y(this,Lo);Y(this,Wr,new Map);Y(this,Kr,mt(0));Y(this,cn,mt(0));if(r){for(var[n,o]of r)super.set(n,o);E(this,cn).v=super.size}}has(r){var n=E(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=mt(0),n.set(r,o);else return p(E(this,Kr)),!1}return p(o),!0}forEach(r,n){Yn(this,Lo,Ms).call(this),super.forEach(r,n)}get(r){var n=E(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=mt(0),n.set(r,o);else{p(E(this,Kr));return}}return p(o),super.get(r)}set(r,n){var d;var o=E(this,Wr),a=o.get(r),i=super.get(r),s=super.set(r,n),c=E(this,Kr);if(a===void 0)o.set(r,mt(0)),R(E(this,cn),super.size),xo(c);else if(i!==n){xo(a);var l=c.reactions===null?null:new Set(c.reactions),u=l===null||!((d=a.reactions)!=null&&d.every(f=>l.has(f)));u&&xo(c)}return s}delete(r){var n=E(this,Wr),o=n.get(r),a=super.delete(r);return o!==void 0&&(n.delete(r),R(E(this,cn),super.size),R(o,-1),xo(E(this,Kr))),a}clear(){if(super.size!==0){super.clear();var r=E(this,Wr);R(E(this,cn),0);for(var n of r.values())R(n,-1);xo(E(this,Kr)),r.clear()}}keys(){return p(E(this,Kr)),super.keys()}values(){return Yn(this,Lo,Ms).call(this),super.values()}entries(){return Yn(this,Lo,Ms).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(E(this,cn)),super.size}};Wr=new WeakMap,Kr=new WeakMap,cn=new WeakMap,Lo=new WeakSet,Ms=function(){p(E(this,Kr));var r=E(this,Wr);if(E(this,cn).v!==r.size)for(var n of vh(Tc.prototype,this,"keys").call(this))r.has(n)||r.set(n,mt(0));for(var[,o]of E(this,Wr))p(o)};let sc=Tc;class z0{constructor(e={}){Y(this,Mo);Y(this,za);const{window:r=M0,document:n=r==null?void 0:r.document}=e;r!==void 0&&(Et(this,Mo,n),Et(this,za,Vm(o=>{const a=Lt(r,"focusin",o),i=Lt(r,"focusout",o);return()=>{a(),i()}})))}get current(){var e;return(e=E(this,za))==null||e.call(this),E(this,Mo)?D0(E(this,Mo)):null}}Mo=new WeakMap,za=new WeakMap,new z0;function F0(t,e){switch(t){case"post":wt(e);break;case"pre":Ys(e);break}}function pf(t,e,r,n={}){const{lazy:o=!1}=n;let a=!o,i=Array.isArray(t)?[]:void 0;F0(e,()=>{const s=Array.isArray(t)?t.map(l=>l()):t();if(!a){a=!0,i=s;return}const c=Yt(()=>r(s,i));return i=s,c})}function or(t,e,r){pf(t,"post",e,r)}function B0(t,e,r){pf(t,"pre",e,r)}or.pre=B0;class q0{constructor(e){Y(this,Fa,ke(void 0));Y(this,Ba);wt(()=>{R(E(this,Fa),xe(E(this,Ba))),Et(this,Ba,e())})}get current(){return p(E(this,Fa))}}Fa=new WeakMap,Ba=new WeakMap;class lc{constructor(e){Y(this,qa);Y(this,un);Et(this,qa,e),Et(this,un,Symbol(e))}get key(){return E(this,un)}exists(){return kp(E(this,un))}get(){const e=mu(E(this,un));if(e===void 0)throw new Error(`Context "${E(this,qa)}" not found`);return e}getOr(e){const r=mu(E(this,un));return r===void 0?e:r}set(e){return _p(E(this,un),e)}}qa=new WeakMap,un=new WeakMap;function gf(t){wt(()=>()=>{t()})}function hr({id:t,ref:e,deps:r=()=>!0,onRefChange:n,getRootNode:o}){or([()=>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)}),gf(()=>{e.current=null,n==null||n(null)})}function cc(t,e){return setTimeout(e,t)}function Da(t){nl().then(t)}function es(t){return t?"open":"closed"}function mf(t){return t?"true":"false"}function uc(t){return t?"":void 0}const dc="Enter",$0="Escape",fc=" ",j0="Tab",vf=typeof document<"u",bf=Z0();function Z0(){var t,e;return vf&&((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 hc(t){return t instanceof HTMLElement}function U0(t){return t instanceof Element}function H0(t){return t instanceof HTMLInputElement&&"select"in t}function V0(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 St(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}function Ge(){}function G0(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 W0(t,e){let r=ke(xe({})),n=ke("none");const o=t.current?"mounted":"unmounted";let a=ke(null);const i=new q0(()=>t.current);or([()=>e.current,()=>t.current],([f,v])=>{!f||!v||Da(()=>{R(a,xe(document.getElementById(f)))})});const{state:s,dispatch:c}=G0(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});or(()=>t.current,f=>{if(p(a)||R(a,xe(document.getElementById(e.current))),!p(a)||!(f!==i.current))return;const h=p(n),m=ts(p(a));f?c("MOUNT"):m==="none"||p(r).display==="none"?c("UNMOUNT"):c(i&&h!==m?"ANIMATION_OUT":"UNMOUNT")});function l(f){if(p(a)||R(a,xe(document.getElementById(e.current))),!p(a))return;const v=ts(p(a)),h=v.includes(f.animationName)||v==="none";f.target===p(a)&&h&&c("ANIMATION_END")}function u(f){p(a)||R(a,xe(document.getElementById(e.current))),p(a)&&f.target===p(a)&&R(n,xe(ts(p(a))))}or(()=>s.current,()=>{if(p(a)||R(a,xe(document.getElementById(e.current))),!p(a))return;const f=ts(p(a));R(n,xe(s.current==="mounted"?f:"none"))}),or(()=>p(a),f=>{if(f)return R(r,xe(getComputedStyle(f))),Un(Lt(f,"animationstart",u),Lt(f,"animationcancel",l),Lt(f,"animationend",l))});const d=Se(()=>["mounted","unmountSuspended"].includes(s.current));return{get current(){return p(d)}}}function ts(t){return t&&getComputedStyle(t).animationName||"none"}function rs(t,e){Ae(e,!0);let r=x(e,"present",7),n=x(e,"forceMount",7),o=x(e,"presence",7),a=x(e,"id",7);const i=W0(ee.with(()=>r()),ee.with(()=>a()));var s=ie(),c=U(s);{var l=u=>{var d=ie(),f=U(d);Je(f,()=>o()??qe,()=>({present:i})),T(u,d)};fe(c,u=>{(n()||r()||i.current)&&u(l)})}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),_()}})}Ie(rs,{present:{},forceMount:{},presence:{},id:{}},[],[],!0);function K0(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 Y0{constructor(e){ae(this,"opts");Y(this,$a,ke(null));Y(this,ja,ke(null));Y(this,Za,ke(null));Y(this,Ua,ke(null));Y(this,Ha,ke(void 0));Y(this,Va,ke(void 0));Y(this,Ga,ke(void 0));Y(this,Wa,ke(void 0));Y(this,Ka,ke(null));Y(this,ss,Se(()=>K0(this.opts.variant.current)));Y(this,ls,Se(()=>({"data-state":es(this.opts.open.current)})));this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return p(E(this,$a))}set triggerNode(e){R(E(this,$a),xe(e))}get titleNode(){return p(E(this,ja))}set titleNode(e){R(E(this,ja),xe(e))}get contentNode(){return p(E(this,Za))}set contentNode(e){R(E(this,Za),xe(e))}get descriptionNode(){return p(E(this,Ua))}set descriptionNode(e){R(E(this,Ua),xe(e))}get contentId(){return p(E(this,Ha))}set contentId(e){R(E(this,Ha),xe(e))}get titleId(){return p(E(this,Va))}set titleId(e){R(E(this,Va),xe(e))}get triggerId(){return p(E(this,Ga))}set triggerId(e){R(E(this,Ga),xe(e))}get descriptionId(){return p(E(this,Wa))}set descriptionId(e){R(E(this,Wa),xe(e))}get cancelNode(){return p(E(this,Ka))}set cancelNode(e){R(E(this,Ka),xe(e))}get attrs(){return p(E(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(E(this,ls))}}$a=new WeakMap,ja=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 Q0{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,cs,Se(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":mf(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.attrs.trigger]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps})));this.opts=e,this.root=r,hr({...e,onRefChange:n=>{this.root.triggerNode=n,this.root.triggerId=n==null?void 0:n.id}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleOpen()}onkeydown(e){this.opts.disabled.current||(e.key===fc||e.key===dc)&&(e.preventDefault(),this.root.handleOpen())}get props(){return p(E(this,cs))}}cs=new WeakMap;class J0{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,us,Se(()=>this.root.attrs[this.opts.variant.current]));Y(this,ds,Se(()=>({id:this.opts.id.current,[p(E(this,us))]:"",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),hr({...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===fc||e.key===dc)&&(e.preventDefault(),this.root.handleClose())}get props(){return p(E(this,ds))}}us=new WeakMap,ds=new WeakMap;class X0{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,fs,Se(()=>({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,hr({...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(E(this,fs))}}fs=new WeakMap;class e1{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,hs,Se(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=e,this.root=r,hr({...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(E(this,hs))}}hs=new WeakMap;class t1{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,ps,Se(()=>({open:this.root.opts.open.current})));Y(this,gs,Se(()=>({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,hr({...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(E(this,ps))}get props(){return p(E(this,gs))}}ps=new WeakMap,gs=new WeakMap;class r1{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,ms,Se(()=>({open:this.root.opts.open.current})));Y(this,vs,Se(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=e,this.root=r,hr({...e,deps:()=>this.root.opts.open.current})}get snippetProps(){return p(E(this,ms))}get props(){return p(E(this,vs))}}ms=new WeakMap,vs=new WeakMap;const Hn=new lc("Dialog.Root");function n1(t){return Hn.set(new Y0(t))}function o1(t){return new Q0(t,Hn.get())}function a1(t){return new X0(t,Hn.get())}function i1(t){return new t1(t,Hn.get())}function s1(t){return new r1(t,Hn.get())}function l1(t){return new e1(t,Hn.get())}function c1(t){return new J0(t,Hn.get())}var u1=J("<div><!></div>");function yf(t,e){Ae(e,!0);let r=x(e,"id",23,St),n=x(e,"ref",15,null),o=x(e,"child",7),a=x(e,"children",7),i=x(e,"level",7,2),s=Sr(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const c=a1({id:ee.with(()=>r()),level:ee.with(()=>i()),ref:ee.with(()=>n(),h=>n(h))}),l=Se(()=>nr(s,c.props));var u=ie(),d=U(u);{var f=h=>{var m=ie(),y=U(m);Je(y,o,()=>({props:p(l)})),T(h,m)},v=h=>{var m=u1();let y;var g=P(m);Je(g,()=>a()??qe),O(m),le(()=>y=qt(m,y,{...p(l)})),T(h,m)};fe(d,h=>{o()?h(f):h(v,!1)})}return T(t,u),Re({get id(){return r()},set id(h=St()){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(yf,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function wf(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 _f{constructor(e,r={bubbles:!0,cancelable:!0}){ae(this,"eventName");ae(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 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 pc(t,e){return t===e||t.contains(e)}function xf(t){return(t==null?void 0:t.ownerDocument)??document}function d1(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 f1{constructor(e){Y(this,Bo);ae(this,"opts");Y(this,Do);Y(this,Vn);Y(this,Cn,{pointerdown:!1});Y(this,zo,!1);Y(this,Fo,!1);ae(this,"node",ee(null));Y(this,En);Y(this,Ya);Y(this,Qa,ke(null));Y(this,dn,Ge);Y(this,bs,e=>{e.defaultPrevented||this.currNode&&Da(()=>{var r,n;!this.currNode||E(this,xs).call(this,e.target)||e.target&&!E(this,Fo)&&((n=(r=E(this,Ya)).current)==null||n.call(r,e))})});Y(this,ys,e=>{let r=e;r.defaultPrevented&&(r=Sf(e)),E(this,Do).current(e)});Y(this,qo,kf(e=>{if(!this.currNode){E(this,dn).call(this);return}const r=this.opts.isValidEvent.current(e,this.currNode)||m1(e,this.currNode);if(!E(this,zo)||Yn(this,Bo,yh).call(this)||!r){E(this,dn).call(this);return}let n=e;if(n.defaultPrevented&&(n=Sf(n)),E(this,Vn).current!=="close"&&E(this,Vn).current!=="defer-otherwise-close"){E(this,dn).call(this);return}e.pointerType==="touch"?(E(this,dn).call(this),Et(this,dn,wf(E(this,En),"click",E(this,ys),{once:!0}))):E(this,Do).current(n)},10));Y(this,ws,e=>{E(this,Cn)[e.type]=!0});Y(this,_s,e=>{E(this,Cn)[e.type]=!1});Y(this,ks,()=>{this.node.current&&Et(this,zo,g1(this.node.current))});Y(this,xs,e=>this.node.current?pc(this.node.current,e):!1);Y(this,Ja,kf(()=>{for(const e in E(this,Cn))E(this,Cn)[e]=!1;Et(this,zo,!1)},20));Y(this,Ss,()=>{Et(this,Fo,!0)});Y(this,Ts,()=>{Et(this,Fo,!1)});ae(this,"props",{onfocuscapture:E(this,Ss),onblurcapture:E(this,Ts)});this.opts=e,hr({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),Et(this,Vn,e.interactOutsideBehavior),Et(this,Do,e.onInteractOutside),Et(this,Ya,e.onFocusOutside),wt(()=>{Et(this,En,xf(this.currNode))});let r=Ge;const n=()=>{E(this,Ja).call(this),globalThis.bitsDismissableLayers.delete(this),E(this,qo).destroy(),r()};or([()=>this.opts.enabled.current,()=>this.currNode],([o,a])=>{if(!(!o||!a))return cc(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,E(this,Vn)),r(),r=Yn(this,Bo,bh).call(this))}),n}),gf(()=>{E(this,Ja).destroy(),globalThis.bitsDismissableLayers.delete(this),E(this,qo).destroy(),E(this,dn).call(this),r()})}get currNode(){return p(E(this,Qa))}set currNode(e){R(E(this,Qa),xe(e))}}Do=new WeakMap,Vn=new WeakMap,Cn=new WeakMap,zo=new WeakMap,Fo=new WeakMap,En=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,dn=new WeakMap,bs=new WeakMap,Bo=new WeakSet,bh=function(){return Un(Lt(E(this,En),"pointerdown",Un(E(this,ws),E(this,ks)),{capture:!0}),Lt(E(this,En),"pointerdown",Un(E(this,_s),E(this,qo))),Lt(E(this,En),"focusin",E(this,bs)))},ys=new WeakMap,qo=new WeakMap,ws=new WeakMap,_s=new WeakMap,ks=new WeakMap,xs=new WeakMap,Ja=new WeakMap,yh=function(){return Object.values(E(this,Cn)).some(Boolean)},Ss=new WeakMap,Ts=new WeakMap;function h1(t){return new f1(t)}function p1(t){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function g1(t){const e=[...globalThis.bitsDismissableLayers],r=p1(e);if(r)return r[0].node.current===t;const[n]=e[0];return n.node.current===t}function m1(t,e){if("button"in t&&t.button>0)return!1;const r=t.target;return U0(r)?xf(r).documentElement.contains(r)&&!pc(e,r)&&d1(t,e):!1}function Sf(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 Tf(t,e){Ae(e,!0);let r=x(e,"interactOutsideBehavior",7,"close"),n=x(e,"onInteractOutside",7,Ge),o=x(e,"onFocusOutside",7,Ge),a=x(e,"id",7),i=x(e,"children",7),s=x(e,"enabled",7),c=x(e,"isValidEvent",7,()=>!1);const l=h1({id:ee.with(()=>a()),interactOutsideBehavior:ee.with(()=>r()),onInteractOutside:ee.with(()=>n()),enabled:ee.with(()=>s()),onFocusOutside:ee.with(()=>o()),isValidEvent:ee.with(()=>c())});var u=ie(),d=U(u);return Je(d,()=>i()??qe,()=>({props:l.props})),T(t,u),Re({get interactOutsideBehavior(){return r()},set interactOutsideBehavior(f="close"){r(f),_()},get onInteractOutside(){return n()},set onInteractOutside(f=Ge){n(f),_()},get onFocusOutside(){return o()},set onFocusOutside(f=Ge){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 c()},set isValidEvent(f=()=>!1){c(f),_()}})}Ie(Tf,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0),globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);class v1{constructor(e){ae(this,"opts");Y(this,Cs,()=>Lt(document,"keydown",E(this,Es),{passive:!1}));Y(this,Es,e=>{if(e.key!==$0||!y1(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=Ge;or(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=E(this,Cs).call(this)),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}}Cs=new WeakMap,Es=new WeakMap;function b1(t){return new v1(t)}function y1(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 Cf(t,e){Ae(e,!0);let r=x(e,"escapeKeydownBehavior",7,"close"),n=x(e,"onEscapeKeydown",7,Ge),o=x(e,"children",7),a=x(e,"enabled",7);b1({escapeKeydownBehavior:ee.with(()=>r()),onEscapeKeydown:ee.with(()=>n()),enabled:ee.with(()=>a())});var i=ie(),s=U(i);return Je(s,()=>o()??qe),T(t,i),Re({get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(c="close"){r(c),_()},get onEscapeKeydown(){return n()},set onEscapeKeydown(c=Ge){n(c),_()},get children(){return o()},set children(c){o(c),_()},get enabled(){return a()},set enabled(c){a(c),_()}})}Ie(Cf,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const xn=ee([]);function w1(){return{add(t){const e=xn.current[0];e&&t.id!==e.id&&e.pause(),xn.current=Ef(xn.current,t),xn.current.unshift(t)},remove(t){var e;xn.current=Ef(xn.current,t),(e=xn.current[0])==null||e.resume()},get current(){return xn.current}}}function _1(){let t=ke(!1),e=ke(!1);return{id:St(),get paused(){return p(t)},get isHandlingFocus(){return p(e)},set isHandlingFocus(r){R(e,xe(r))},pause(){R(t,!0)},resume(){R(t,!1)}}}function Ef(t,e){return[...t].filter(r=>r.id!==e.id)}function k1(t){return t.filter(e=>e.tagName!=="A")}function Sn(t,{select:e=!1}={}){if(!(t&&t.focus)||document.activeElement===t)return;const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&H0(t)&&e&&t.select()}function x1(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Sn(n,{select:e}),document.activeElement!==r)return!0}function Af(t,e){for(const r of t)if(!V0(r,e))return r}function Rf(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 S1(t){const e=Rf(t),r=Af(e,t),n=Af(e.reverse(),t);return[r,n]}/*!
553
+ transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function tf(t,e){const r=_l(e,["children","$$slots","$$events","$$legacy","$$host"]),n=_l(r,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);Re(e,!1),_i(t,Vb);const o=$t(),a=()=>bt(C,"$toasts",o),i=()=>bt(Ee,"$heights",o),s=Ke(),c=Ke(),l=3,u="32px",d=356,f=14,v="dark",h="light";function m(W){return W!=="system"?W: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 W=document.documentElement.getAttribute("dir");return W==="auto"||!W?window.getComputedStyle(document.documentElement).direction:W}let g=x(e,"invert",12,!1),b=x(e,"theme",12,"light"),w=x(e,"position",12,"bottom-right"),I=x(e,"hotkey",28,()=>["altKey","KeyT"]),S=x(e,"containerAriaLabel",12,"Notifications"),k=x(e,"richColors",12,!1),z=x(e,"expand",12,!1),L=x(e,"duration",12,4e3),V=x(e,"visibleToasts",12,l),G=x(e,"closeButton",12,!1),$=x(e,"toastOptions",28,()=>({})),ee=x(e,"offset",12,null),fe=x(e,"dir",28,y);const{toasts:C,heights:Ee,reset:ie}=fr;let Z=Ke(!1),D=Ke(!1),Y=Ke(m(b())),F=Ke(),re=null,pe=!1;qp(()=>{p(F)&&re&&(re.focus({preventScroll:!0}),re=null,pe=!1)}),Ti(()=>{ie();const W=Ae=>{var rt,Ht;I().every(Rr=>Ae[Rr]||Ae.code===Rr)&&(A(Z,!0),(rt=p(F))==null||rt.focus()),Ae.code==="Escape"&&(document.activeElement===p(F)||(Ht=p(F))!=null&&Ht.contains(document.activeElement))&&A(Z,!1)};return document.addEventListener("keydown",W),()=>{document.removeEventListener("keydown",W)}});function ze(W){pe&&!W.currentTarget.contains(W.relatedTarget)&&(pe=!1,re&&(re.focus({preventScroll:!0}),re=null))}function Pe(W){pe||(pe=!0,re=W.relatedTarget)}Ve(()=>(Ge(w()),a()),()=>{A(s,Array.from(new Set([w(),...a().filter(W=>W.position).map(W=>W.position)].filter(Boolean))))}),Ve(()=>Ge(I()),()=>{A(c,I().join("+").replace(/Key/g,"").replace(/Digit/g,""))}),Ve(()=>a(),()=>{a().length<=1&&A(Z,!1)}),Ve(()=>a(),()=>{const W=a().filter(Ae=>Ae.dismiss&&!Ae.delete);if(W.length>0){const Ae=a().map(ct=>W.find(Ht=>Ht.id===ct.id)?{...ct,delete:!0}:ct);C.set(Ae)}}),Ve(()=>Ge(b()),()=>{if(b()!=="system"&&A(Y,b()),typeof window<"u"){b()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A(Y,v):A(Y,h));const W=window.matchMedia("(prefers-color-scheme: dark)"),Ae=({matches:ct})=>{A(Y,ct?v:h)};"addEventListener"in W?W.addEventListener("change",Ae):W.addListener(Ae)}}),Xs(),go();var Ze=se(),Je=U(Ze);{var Ue=W=>{var Ae=Hb();Te(Ae,"tabindex",-1),_r(Ae,5,()=>p(s),Mr,(rt,Ht,Rr)=>{var pt=Ub();let Dt;_r(pt,7,()=>a().filter(M=>!M.position&&Rr===0||M.position===p(Ht)),M=>M.id,(M,oe,q)=>{var me=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.actionButtonStyle)||""}),le=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.cancelButtonStyle)||""}),_e=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.class)||""}),Xe=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.descriptionClass)||""}),Me=Nt(()=>$().classes||{}),je=Nt(()=>{var Q;return((Q=$())==null?void 0:Q.duration)??L()}),We=Nt(()=>$().unstyled||!1);ef(M,{get index(){return p(q)},get toast(){return p(oe)},get invert(){return g()},get visibleToasts(){return V()},get closeButton(){return G()},get interacting(){return p(D)},get position(){return p(Ht)},get expandByDefault(){return z()},get expanded(){return p(Z)},get actionButtonStyle(){return p(me)},get cancelButtonStyle(){return p(le)},get class(){return p(_e)},get descriptionClass(){return p(Xe)},get classes(){return p(Me)},get duration(){return p(je)},get unstyled(){return p(We)},$$slots:{"loading-icon":(Q,et)=>{var ut=se(),be=U(ut);Dr(be,e,"loading-icon",{},ft=>{var Et=Nt(()=>p(oe).type==="loading");Yd(ft,{get visible(){return p(Et)}})}),T(Q,ut)},"success-icon":(Q,et)=>{var ut=se(),be=U(ut);Dr(be,e,"success-icon",{},ft=>{Ma(ft,{type:"success"})}),T(Q,ut)},"error-icon":(Q,et)=>{var ut=se(),be=U(ut);Dr(be,e,"error-icon",{},ft=>{Ma(ft,{type:"error"})}),T(Q,ut)},"warning-icon":(Q,et)=>{var ut=se(),be=U(ut);Dr(be,e,"warning-icon",{},ft=>{Ma(ft,{type:"warning"})}),T(Q,ut)},"info-icon":(Q,et)=>{var ut=se(),be=U(ut);Dr(be,e,"info-icon",{},ft=>{Ma(ft,{type:"info"})}),T(Q,ut)}}})}),O(pt),qr(pt,M=>A(F,M),()=>p(F)),ue(()=>{var M;Dt=qt(pt,Dt,{tabIndex:-1,class:r.class,"data-sonner-toaster":!0,"data-theme":p(Y),"data-rich-colors":k(),dir:fe()==="auto"?y():fe(),"data-y-position":p(Ht).split("-")[0],"data-x-position":p(Ht).split("-")[1],style:r.style,...n},"svelte-1fo5d1m"),Fr(pt,"--front-toast-height",`${(M=i()[0])==null?void 0:M.height}px`),Fr(pt,"--offset",typeof ee()=="number"?`${ee()}px`:ee()||u),Fr(pt,"--width",`${d}px`),Fr(pt,"--gap",`${f}px`),pt.dir=pt.dir}),dt("blur",pt,ze),dt("focus",pt,Pe),dt("mouseenter",pt,()=>A(Z,!0)),dt("mousemove",pt,()=>A(Z,!0)),dt("mouseleave",pt,()=>{p(D)||A(Z,!1)}),dt("pointerdown",pt,()=>A(D,!0)),dt("pointerup",pt,()=>A(D,!1)),T(rt,pt)}),O(Ae),ue(()=>Te(Ae,"aria-label",`${S()} ${p(c)}`)),T(W,Ae)};de(Je,W=>{a().length>0&&W(Ue)})}return T(t,Ze),Ie({get invert(){return g()},set invert(W){g(W),_()},get theme(){return b()},set theme(W){b(W),_()},get position(){return w()},set position(W){w(W),_()},get hotkey(){return I()},set hotkey(W){I(W),_()},get containerAriaLabel(){return S()},set containerAriaLabel(W){S(W),_()},get richColors(){return k()},set richColors(W){k(W),_()},get expand(){return z()},set expand(W){z(W),_()},get duration(){return L()},set duration(W){L(W),_()},get visibleToasts(){return V()},set visibleToasts(W){V(W),_()},get closeButton(){return G()},set closeButton(W){G(W),_()},get toastOptions(){return $()},set toastOptions(W){$(W),_()},get offset(){return ee()},set offset(W){ee(W),_()},get dir(){return fe()},set dir(W){fe(W),_()}})}Oe(tf,{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 Gb=async(t,e,r,n,o,a)=>{const i=La.getInstance();if(i)try{await i.classification({impact:p(e),quality:p(r),query:p(n),email:p(o)}),Zn.success(a().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}catch(s){Zn.error(String(s),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}};var Wb=te('<label class="classification-feedback__option btn btn--secondary svelte-2w2sf1"><input type="radio" name="impact" class="svelte-2w2sf1"> </label>'),Kb=te('<label class="classification-feedback__option btn btn--secondary svelte-2w2sf1"><input type="radio" name="quality" class="svelte-2w2sf1"> </label>'),Yb=te('<div><div class="classification-feedback__title svelte-2w2sf1"> </div> <fieldset class="classification-feedback__item svelte-2w2sf1"><legend class="classification-feedback__label svelte-2w2sf1"> </legend> <!></fieldset> <fieldset class="classification-feedback__item svelte-2w2sf1"><legend class="classification-feedback__label svelte-2w2sf1"> </legend> <!></fieldset> <div class="classification-feedback__item svelte-2w2sf1"><label class="classification-feedback__label svelte-2w2sf1" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <div class="classification-feedback__item svelte-2w2sf1"><label class="classification-feedback__label svelte-2w2sf1" for="email"> </label> <input type="email" id="email" class="input svelte-2w2sf1"></div> <button class="classification-feedback__submit btn btn--primary svelte-2w2sf1"> </button></div>');const Qb={hash:"svelte-2w2sf1",code:".classification-feedback.svelte-2w2sf1 {display:flex;flex-direction:column;gap:var(--spacer-32);padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);color:var(--message-user-color);background:var(--message-user-background);border-width:var(--message-user-border-width);border-color:var(--message-user-border-color);border-radius:var(--message-user-border-radius);box-shadow:var(--message-user-box-shadow);}.classification-feedback__item.svelte-2w2sf1 {display:flex;flex-direction:column;gap:var(--spacer-4);border:none;padding:0;margin:0;}.classification-feedback__title.svelte-2w2sf1 {font-weight:bold;margin-bottom:-1rem;}.classification-feedback__label.svelte-2w2sf1 {font-weight:bold;margin-bottom:var(--spacer-8);}.classification-feedback__option.svelte-2w2sf1 {display:flex;align-items:center;gap:var(--spacer-12);padding-left:var(--spacer-16);&:has(input:where(.svelte-2w2sf1):checked) {color:var(--btn-secondary-hover-color);background:var(--btn-secondary-hover-background);}&:has(input:where(.svelte-2w2sf1):focus-visible) {outline-style:solid;border-radius:var(--spacer-8);outline-width:var(--spacer-3);outline-color:var(--body-focus-color);}&:has(input:where(.svelte-2w2sf1):focus-visible) input:where(.svelte-2w2sf1) {outline:none;}}.classification-feedback__submit.svelte-2w2sf1 {align-self:flex-start;}.classification-feedback__thank-you.svelte-2w2sf1 {text-align:center;padding:var(--spacer-12);}"};function rf(t,e){Re(e,!0),_i(t,Qb);const r=$t(),n=()=>bt(Ur,"$t",r),o=[],a=[];let i=x(e,"class",7),s=we(void 0),c=we(void 0),l=we(""),u=we(""),d=we(void 0),f=we(!1);_t(()=>{A(f,!0)}),(async()=>{const g=La.getInstance();if(!g)return;const b=await g.getClassification({url:window.location.href.replace(window.location.origin,"")});A(d,xe(b))})();var h=se(),m=U(h);{var y=g=>{var b=Yb(),w=N(b),I=N(w,!0);O(w);var S=ne(w,2),k=N(S),z=N(k,!0);O(k);var L=ne(k,2);_r(L,17,()=>p(d).impact.options,Mr,(ze,Pe)=>{var Ze=Wb(),Je=N(Ze);xi(Je);var Ue,W=ne(Je);O(Ze),ue(()=>{Ue!==(Ue=p(Pe).value)&&(Je.value=(Je.__value=p(Pe).value)==null?"":p(Pe).value),qe(W,` ${p(Pe).label??""}`)}),Ou(o,[],Je,()=>(p(Pe).value,p(s)),Ae=>A(s,Ae)),T(ze,Ze)}),O(S);var V=ne(S,2),G=N(V),$=N(G,!0);O(G);var ee=ne(G,2);_r(ee,17,()=>p(d).quality.options,Mr,(ze,Pe)=>{var Ze=Kb(),Je=N(Ze);xi(Je);var Ue,W=ne(Je);O(Ze),ue(()=>{Ue!==(Ue=p(Pe).value)&&(Je.value=(Je.__value=p(Pe).value)==null?"":p(Pe).value),qe(W,` ${p(Pe).label??""}`)}),Ou(a,[],Je,()=>(p(Pe).value,p(c)),Ae=>A(c,Ae)),T(ze,Ze)}),O(V);var fe=ne(V,2),C=N(fe),Ee=N(C,!0);O(C);var ie=ne(C,2);ll(ie),O(fe);var Z=ne(fe,2),D=N(Z),Y=N(D,!0);O(D);var F=ne(D,2);xi(F),O(Z);var re=ne(Z,2);re.__click=[Gb,s,c,l,u,n];var pe=N(re,!0);O(re),O(b),ue(()=>{kr(b,`classification-feedback ${i()??""} svelte-2w2sf1`),qe(I,n().classificationTitle),qe(z,p(d).impact.label),qe($,p(d).quality.label),qe(Ee,n().feedbackFormMessage),Te(ie,"placeholder",n().feedbackFormMessagePlaceholder),qe(Y,n().feedbackFormEmail),Te(F,"placeholder",n().feedbackFormEmailPlaceholder),qe(pe,n().send)}),aa(ie,()=>p(l),ze=>A(l,ze)),aa(F,()=>p(u),ze=>A(u,ze)),Br(1,b,()=>Io,()=>({y:20,duration:300})),T(g,b)};de(m,g=>{p(d)&&p(f)&&g(y)})}return T(t,h),Ie({get class(){return i()},set class(g){i(g),_()}})}Mn(["click"]),Oe(rf,{class:{}},[],[],!0);function Jb(t){return typeof t=="function"}function Xb(t){return t!==null&&typeof t=="object"}const e0=["string","number","bigint","boolean"];function oc(t){return t==null||e0.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>oc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const Da=Symbol("box"),ac=Symbol("is-writable");function t0(t){return Xb(t)&&Da in t}function r0(t){return X.isBox(t)&&ac in t}function X(t){let e=we(xe(t));return{[Da]:!0,[ac]:!0,get current(){return p(e)},set current(r){A(e,xe(r))}}}function n0(t,e){const r=Se(t);return e?{[Da]:!0,[ac]:!0,get current(){return p(r)},set current(n){e(n)}}:{[Da]:!0,get current(){return t()}}}function o0(t){return X.isBox(t)?t:Jb(t)?X.with(t):X(t)}function a0(t){return Object.entries(t).reduce((e,[r,n])=>X.isBox(n)?(X.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 i0(t){return X.isWritableBox(t)?{[Da]:!0,get current(){return t.current}}:t}X.from=o0,X.with=n0,X.flatten=a0,X.readonly=i0,X.isBox=t0,X.isWritableBox=r0;function nf(...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 of={},af=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s0=/\n/g,l0=/^\s*/,c0=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u0=/^:\s*/,d0=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f0=/^[;\s]*/,h0=/^\s+|\s+$/g,p0=`
554
+ `,sf="/",lf="*",Un="",g0="comment",m0="declaration",v0=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(s0);m&&(r+=m.length);var y=h.lastIndexOf(p0);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),l(),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 c(h){var m=h.exec(t);if(m){var y=m[0];return o(y),t=t.slice(y.length),m}}function l(){c(l0)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=a();if(!(sf!=t.charAt(0)||lf!=t.charAt(1))){for(var m=2;Un!=t.charAt(m)&&(lf!=t.charAt(m)||sf!=t.charAt(m+1));)++m;if(m+=2,Un===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:g0,comment:y})}}function f(){var h=a(),m=c(c0);if(m){if(d(),!c(u0))return s("property missing ':'");var y=c(d0),g=h({type:m0,property:cf(m[0].replace(af,Un)),value:y?cf(y[0].replace(af,Un)):Un});return c(f0),g}}function v(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return l(),v()};function cf(t){return t?t.replace(h0,Un):Un}var b0=Pl&&Pl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});var uf=of.default=w0,y0=b0(v0);function w0(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,y0.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 _0=uf.default||uf,k0=/\d/,x0=["-","_","/","."];function S0(t=""){if(!k0.test(t))return t!==t.toLowerCase()}function T0(t){const e=[];let r="",n,o;for(const a of t){const i=x0.includes(a);if(i===!0){e.push(r),r="",n=void 0;continue}const s=S0(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 df(t){return t?T0(t).map(e=>C0(e)).join(""):""}function E0(t){return A0(df(t||""))}function C0(t){return t?t[0].toUpperCase()+t.slice(1):""}function A0(t){return t?t[0].toLowerCase()+t.slice(1):""}function ts(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[df(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[E0(n)]=o}return _0(t,r),e}function Hn(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function ff(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=ff(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function ic(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=ff(t))&&(n&&(n+=" "),n+=e);return n}function R0(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 I0=R0(/[A-Z]/,t=>`-${t.toLowerCase()}`);function O0(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=>`${I0(e)}: ${t[e]};`).join(`
555
+ `)}function hf(t={}){return O0(t).replace(`
556
+ `," ")}hf({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 N0(t){var e;return t.length>2&&t.startsWith("on")&&t[2]===((e=t[2])==null?void 0:e.toLowerCase())}function nr(...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&&N0(o)){const l=a,u=i;e[o]=nf(l,u)}else if(s&&c)e[o]=Hn(a,i);else if(o==="class"){const l=oc(a),u=oc(i);l&&u?e[o]=ic(a,i):l?e[o]=ic(a):u&&(e[o]=ic(i))}else if(o==="style"){const l=typeof a=="object",u=typeof i=="object",d=typeof a=="string",f=typeof i=="string";if(l&&u)e[o]={...a,...i};else if(l&&f){const v=ts(i);e[o]={...a,...v}}else if(d&&u){const v=ts(a);e[o]={...v,...i}}else if(d&&f){const v=ts(a),h=ts(i);e[o]={...v,...h}}else l?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=hf(e.style).replaceAll(`
557
+ `," ")),e.hidden!==!0&&(e.hidden=void 0,delete e.hidden),e.disabled!==!0&&(e.disabled=void 0,delete e.disabled),e}const P0=typeof window<"u"?window:void 0;function L0(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}const Tc=class Tc extends Map{constructor(r){super();K(this,Lo);K(this,Wr,new Map);K(this,Kr,vt(0));K(this,cn,vt(0));if(r){for(var[n,o]of r)super.set(n,o);E(this,cn).v=super.size}}has(r){var n=E(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=vt(0),n.set(r,o);else return p(E(this,Kr)),!1}return p(o),!0}forEach(r,n){Qn(this,Lo,zs).call(this),super.forEach(r,n)}get(r){var n=E(this,Wr),o=n.get(r);if(o===void 0){var a=super.get(r);if(a!==void 0)o=vt(0),n.set(r,o);else{p(E(this,Kr));return}}return p(o),super.get(r)}set(r,n){var d;var o=E(this,Wr),a=o.get(r),i=super.get(r),s=super.set(r,n),c=E(this,Kr);if(a===void 0)o.set(r,vt(0)),A(E(this,cn),super.size),So(c);else if(i!==n){So(a);var l=c.reactions===null?null:new Set(c.reactions),u=l===null||!((d=a.reactions)!=null&&d.every(f=>l.has(f)));u&&So(c)}return s}delete(r){var n=E(this,Wr),o=n.get(r),a=super.delete(r);return o!==void 0&&(n.delete(r),A(E(this,cn),super.size),A(o,-1),So(E(this,Kr))),a}clear(){if(super.size!==0){super.clear();var r=E(this,Wr);A(E(this,cn),0);for(var n of r.values())A(n,-1);So(E(this,Kr)),r.clear()}}keys(){return p(E(this,Kr)),super.keys()}values(){return Qn(this,Lo,zs).call(this),super.values()}entries(){return Qn(this,Lo,zs).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(E(this,cn)),super.size}};Wr=new WeakMap,Kr=new WeakMap,cn=new WeakMap,Lo=new WeakSet,zs=function(){p(E(this,Kr));var r=E(this,Wr);if(E(this,cn).v!==r.size)for(var n of vh(Tc.prototype,this,"keys").call(this))r.has(n)||r.set(n,vt(0));for(var[,o]of E(this,Wr))p(o)};let sc=Tc;class M0{constructor(e={}){K(this,Mo);K(this,Fa);const{window:r=P0,document:n=r==null?void 0:r.document}=e;r!==void 0&&(At(this,Mo,n),At(this,Fa,Vm(o=>{const a=Lt(r,"focusin",o),i=Lt(r,"focusout",o);return()=>{a(),i()}})))}get current(){var e;return(e=E(this,Fa))==null||e.call(this),E(this,Mo)?L0(E(this,Mo)):null}}Mo=new WeakMap,Fa=new WeakMap,new M0;function D0(t,e){switch(t){case"post":_t(e);break;case"pre":Js(e);break}}function pf(t,e,r,n={}){const{lazy:o=!1}=n;let a=!o,i=Array.isArray(t)?[]:void 0;D0(e,()=>{const s=Array.isArray(t)?t.map(l=>l()):t();if(!a){a=!0,i=s;return}const c=Yt(()=>r(s,i));return i=s,c})}function or(t,e,r){pf(t,"post",e,r)}function z0(t,e,r){pf(t,"pre",e,r)}or.pre=z0;class F0{constructor(e){K(this,Ba,we(void 0));K(this,qa);_t(()=>{A(E(this,Ba),xe(E(this,qa))),At(this,qa,e())})}get current(){return p(E(this,Ba))}}Ba=new WeakMap,qa=new WeakMap;class lc{constructor(e){K(this,$a);K(this,un);At(this,$a,e),At(this,un,Symbol(e))}get key(){return E(this,un)}exists(){return kp(E(this,un))}get(){const e=mu(E(this,un));if(e===void 0)throw new Error(`Context "${E(this,$a)}" not found`);return e}getOr(e){const r=mu(E(this,un));return r===void 0?e:r}set(e){return _p(E(this,un),e)}}$a=new WeakMap,un=new WeakMap;function gf(t){_t(()=>()=>{t()})}function hr({id:t,ref:e,deps:r=()=>!0,onRefChange:n,getRootNode:o}){or([()=>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)}),gf(()=>{e.current=null,n==null||n(null)})}function cc(t,e){return setTimeout(e,t)}function za(t){al().then(t)}function rs(t){return t?"open":"closed"}function mf(t){return t?"true":"false"}function uc(t){return t?"":void 0}const dc="Enter",B0="Escape",fc=" ",q0="Tab",vf=typeof document<"u",bf=$0();function $0(){var t,e;return vf&&((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 hc(t){return t instanceof HTMLElement}function j0(t){return t instanceof Element}function Z0(t){return t instanceof HTMLInputElement&&"select"in t}function U0(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 Tt(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}function Qe(){}function H0(t,e){const r=X(t);function n(a){return e[r.current][a]??r.current}return{state:r,dispatch:a=>{r.current=n(a)}}}function V0(t,e){let r=we(xe({})),n=we("none");const o=t.current?"mounted":"unmounted";let a=we(null);const i=new F0(()=>t.current);or([()=>e.current,()=>t.current],([f,v])=>{!f||!v||za(()=>{A(a,xe(document.getElementById(f)))})});const{state:s,dispatch:c}=H0(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});or(()=>t.current,f=>{if(p(a)||A(a,xe(document.getElementById(e.current))),!p(a)||!(f!==i.current))return;const h=p(n),m=ns(p(a));f?c("MOUNT"):m==="none"||p(r).display==="none"?c("UNMOUNT"):c(i&&h!==m?"ANIMATION_OUT":"UNMOUNT")});function l(f){if(p(a)||A(a,xe(document.getElementById(e.current))),!p(a))return;const v=ns(p(a)),h=v.includes(f.animationName)||v==="none";f.target===p(a)&&h&&c("ANIMATION_END")}function u(f){p(a)||A(a,xe(document.getElementById(e.current))),p(a)&&f.target===p(a)&&A(n,xe(ns(p(a))))}or(()=>s.current,()=>{if(p(a)||A(a,xe(document.getElementById(e.current))),!p(a))return;const f=ns(p(a));A(n,xe(s.current==="mounted"?f:"none"))}),or(()=>p(a),f=>{if(f)return A(r,xe(getComputedStyle(f))),Hn(Lt(f,"animationstart",u),Lt(f,"animationcancel",l),Lt(f,"animationend",l))});const d=Se(()=>["mounted","unmountSuspended"].includes(s.current));return{get current(){return p(d)}}}function ns(t){return t&&getComputedStyle(t).animationName||"none"}function os(t,e){Re(e,!0);let r=x(e,"present",7),n=x(e,"forceMount",7),o=x(e,"presence",7),a=x(e,"id",7);const i=V0(X.with(()=>r()),X.with(()=>a()));var s=se(),c=U(s);{var l=u=>{var d=se(),f=U(d);nt(f,()=>o()??He,()=>({present:i})),T(u,d)};de(c,u=>{(n()||r()||i.current)&&u(l)})}return T(t,s),Ie({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(os,{present:{},forceMount:{},presence:{},id:{}},[],[],!0);function G0(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 W0{constructor(e){ae(this,"opts");K(this,ja,we(null));K(this,Za,we(null));K(this,Ua,we(null));K(this,Ha,we(null));K(this,Va,we(void 0));K(this,Ga,we(void 0));K(this,Wa,we(void 0));K(this,Ka,we(void 0));K(this,Ya,we(null));K(this,cs,Se(()=>G0(this.opts.variant.current)));K(this,us,Se(()=>({"data-state":rs(this.opts.open.current)})));this.opts=e,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return p(E(this,ja))}set triggerNode(e){A(E(this,ja),xe(e))}get titleNode(){return p(E(this,Za))}set titleNode(e){A(E(this,Za),xe(e))}get contentNode(){return p(E(this,Ua))}set contentNode(e){A(E(this,Ua),xe(e))}get descriptionNode(){return p(E(this,Ha))}set descriptionNode(e){A(E(this,Ha),xe(e))}get contentId(){return p(E(this,Va))}set contentId(e){A(E(this,Va),xe(e))}get titleId(){return p(E(this,Ga))}set titleId(e){A(E(this,Ga),xe(e))}get triggerId(){return p(E(this,Wa))}set triggerId(e){A(E(this,Wa),xe(e))}get descriptionId(){return p(E(this,Ka))}set descriptionId(e){A(E(this,Ka),xe(e))}get cancelNode(){return p(E(this,Ya))}set cancelNode(e){A(E(this,Ya),xe(e))}get attrs(){return p(E(this,cs))}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return p(E(this,us))}}ja=new WeakMap,Za=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ga=new WeakMap,Wa=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,cs=new WeakMap,us=new WeakMap;class K0{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,ds,Se(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":mf(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.attrs.trigger]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps})));this.opts=e,this.root=r,hr({...e,onRefChange:n=>{this.root.triggerNode=n,this.root.triggerId=n==null?void 0:n.id}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleOpen()}onkeydown(e){this.opts.disabled.current||(e.key===fc||e.key===dc)&&(e.preventDefault(),this.root.handleOpen())}get props(){return p(E(this,ds))}}ds=new WeakMap;class Y0{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,fs,Se(()=>this.root.attrs[this.opts.variant.current]));K(this,hs,Se(()=>({id:this.opts.id.current,[p(E(this,fs))]:"",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),hr({...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===fc||e.key===dc)&&(e.preventDefault(),this.root.handleClose())}get props(){return p(E(this,hs))}}fs=new WeakMap,hs=new WeakMap;class Q0{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,ps,Se(()=>({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,hr({...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(E(this,ps))}}ps=new WeakMap;class J0{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,gs,Se(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=e,this.root=r,hr({...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(E(this,gs))}}gs=new WeakMap;class X0{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,ms,Se(()=>({open:this.root.opts.open.current})));K(this,vs,Se(()=>({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,hr({...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(E(this,ms))}get props(){return p(E(this,vs))}}ms=new WeakMap,vs=new WeakMap;class e1{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,bs,Se(()=>({open:this.root.opts.open.current})));K(this,ys,Se(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=e,this.root=r,hr({...e,deps:()=>this.root.opts.open.current})}get snippetProps(){return p(E(this,bs))}get props(){return p(E(this,ys))}}bs=new WeakMap,ys=new WeakMap;const Vn=new lc("Dialog.Root");function t1(t){return Vn.set(new W0(t))}function r1(t){return new K0(t,Vn.get())}function n1(t){return new Q0(t,Vn.get())}function o1(t){return new X0(t,Vn.get())}function a1(t){return new e1(t,Vn.get())}function i1(t){return new J0(t,Vn.get())}function s1(t){return new Y0(t,Vn.get())}var l1=te("<div><!></div>");function yf(t,e){Re(e,!0);let r=x(e,"id",23,Tt),n=x(e,"ref",15,null),o=x(e,"child",7),a=x(e,"children",7),i=x(e,"level",7,2),s=xr(e,["$$slots","$$events","$$legacy","$$host","id","ref","child","children","level"]);const c=n1({id:X.with(()=>r()),level:X.with(()=>i()),ref:X.with(()=>n(),h=>n(h))}),l=Se(()=>nr(s,c.props));var u=se(),d=U(u);{var f=h=>{var m=se(),y=U(m);nt(y,o,()=>({props:p(l)})),T(h,m)},v=h=>{var m=l1();let y;var g=N(m);nt(g,()=>a()??He),O(m),ue(()=>y=qt(m,y,{...p(l)})),T(h,m)};de(d,h=>{o()?h(f):h(v,!1)})}return T(t,u),Ie({get id(){return r()},set id(h=Tt()){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(yf,{id:{},ref:{},child:{},children:{},level:{}},[],[],!0);function wf(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 _f{constructor(e,r={bubbles:!0,cancelable:!0}){ae(this,"eventName");ae(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 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 pc(t,e){return t===e||t.contains(e)}function xf(t){return(t==null?void 0:t.ownerDocument)??document}function c1(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 u1{constructor(e){K(this,Bo);ae(this,"opts");K(this,Do);K(this,Gn);K(this,En,{pointerdown:!1});K(this,zo,!1);K(this,Fo,!1);ae(this,"node",X(null));K(this,Cn);K(this,Qa);K(this,Ja,we(null));K(this,dn,Qe);K(this,ws,e=>{e.defaultPrevented||this.currNode&&za(()=>{var r,n;!this.currNode||E(this,Ts).call(this,e.target)||e.target&&!E(this,Fo)&&((n=(r=E(this,Qa)).current)==null||n.call(r,e))})});K(this,_s,e=>{let r=e;r.defaultPrevented&&(r=Sf(e)),E(this,Do).current(e)});K(this,qo,kf(e=>{if(!this.currNode){E(this,dn).call(this);return}const r=this.opts.isValidEvent.current(e,this.currNode)||p1(e,this.currNode);if(!E(this,zo)||Qn(this,Bo,yh).call(this)||!r){E(this,dn).call(this);return}let n=e;if(n.defaultPrevented&&(n=Sf(n)),E(this,Gn).current!=="close"&&E(this,Gn).current!=="defer-otherwise-close"){E(this,dn).call(this);return}e.pointerType==="touch"?(E(this,dn).call(this),At(this,dn,wf(E(this,Cn),"click",E(this,_s),{once:!0}))):E(this,Do).current(n)},10));K(this,ks,e=>{E(this,En)[e.type]=!0});K(this,xs,e=>{E(this,En)[e.type]=!1});K(this,Ss,()=>{this.node.current&&At(this,zo,h1(this.node.current))});K(this,Ts,e=>this.node.current?pc(this.node.current,e):!1);K(this,Xa,kf(()=>{for(const e in E(this,En))E(this,En)[e]=!1;At(this,zo,!1)},20));K(this,Es,()=>{At(this,Fo,!0)});K(this,Cs,()=>{At(this,Fo,!1)});ae(this,"props",{onfocuscapture:E(this,Es),onblurcapture:E(this,Cs)});this.opts=e,hr({id:e.id,ref:this.node,deps:()=>e.enabled.current,onRefChange:o=>{this.currNode=o}}),At(this,Gn,e.interactOutsideBehavior),At(this,Do,e.onInteractOutside),At(this,Qa,e.onFocusOutside),_t(()=>{At(this,Cn,xf(this.currNode))});let r=Qe;const n=()=>{E(this,Xa).call(this),globalThis.bitsDismissableLayers.delete(this),E(this,qo).destroy(),r()};or([()=>this.opts.enabled.current,()=>this.currNode],([o,a])=>{if(!(!o||!a))return cc(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,E(this,Gn)),r(),r=Qn(this,Bo,bh).call(this))}),n}),gf(()=>{E(this,Xa).destroy(),globalThis.bitsDismissableLayers.delete(this),E(this,qo).destroy(),E(this,dn).call(this),r()})}get currNode(){return p(E(this,Ja))}set currNode(e){A(E(this,Ja),xe(e))}}Do=new WeakMap,Gn=new WeakMap,En=new WeakMap,zo=new WeakMap,Fo=new WeakMap,Cn=new WeakMap,Qa=new WeakMap,Ja=new WeakMap,dn=new WeakMap,ws=new WeakMap,Bo=new WeakSet,bh=function(){return Hn(Lt(E(this,Cn),"pointerdown",Hn(E(this,ks),E(this,Ss)),{capture:!0}),Lt(E(this,Cn),"pointerdown",Hn(E(this,xs),E(this,qo))),Lt(E(this,Cn),"focusin",E(this,ws)))},_s=new WeakMap,qo=new WeakMap,ks=new WeakMap,xs=new WeakMap,Ss=new WeakMap,Ts=new WeakMap,Xa=new WeakMap,yh=function(){return Object.values(E(this,En)).some(Boolean)},Es=new WeakMap,Cs=new WeakMap;function d1(t){return new u1(t)}function f1(t){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function h1(t){const e=[...globalThis.bitsDismissableLayers],r=f1(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 j0(r)?xf(r).documentElement.contains(r)&&!pc(e,r)&&c1(t,e):!1}function Sf(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 Tf(t,e){Re(e,!0);let r=x(e,"interactOutsideBehavior",7,"close"),n=x(e,"onInteractOutside",7,Qe),o=x(e,"onFocusOutside",7,Qe),a=x(e,"id",7),i=x(e,"children",7),s=x(e,"enabled",7),c=x(e,"isValidEvent",7,()=>!1);const l=d1({id:X.with(()=>a()),interactOutsideBehavior:X.with(()=>r()),onInteractOutside:X.with(()=>n()),enabled:X.with(()=>s()),onFocusOutside:X.with(()=>o()),isValidEvent:X.with(()=>c())});var u=se(),d=U(u);return nt(d,()=>i()??He,()=>({props:l.props})),T(t,u),Ie({get interactOutsideBehavior(){return r()},set interactOutsideBehavior(f="close"){r(f),_()},get onInteractOutside(){return n()},set onInteractOutside(f=Qe){n(f),_()},get onFocusOutside(){return o()},set onFocusOutside(f=Qe){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 c()},set isValidEvent(f=()=>!1){c(f),_()}})}Oe(Tf,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{}},[],[],!0),globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);class g1{constructor(e){ae(this,"opts");K(this,As,()=>Lt(document,"keydown",E(this,Rs),{passive:!1}));K(this,Rs,e=>{if(e.key!==B0||!v1(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=Qe;or(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=E(this,As).call(this)),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}}As=new WeakMap,Rs=new WeakMap;function m1(t){return new g1(t)}function v1(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 Ef(t,e){Re(e,!0);let r=x(e,"escapeKeydownBehavior",7,"close"),n=x(e,"onEscapeKeydown",7,Qe),o=x(e,"children",7),a=x(e,"enabled",7);m1({escapeKeydownBehavior:X.with(()=>r()),onEscapeKeydown:X.with(()=>n()),enabled:X.with(()=>a())});var i=se(),s=U(i);return nt(s,()=>o()??He),T(t,i),Ie({get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(c="close"){r(c),_()},get onEscapeKeydown(){return n()},set onEscapeKeydown(c=Qe){n(c),_()},get children(){return o()},set children(c){o(c),_()},get enabled(){return a()},set enabled(c){a(c),_()}})}Oe(Ef,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{}},[],[],!0);const xn=X([]);function b1(){return{add(t){const e=xn.current[0];e&&t.id!==e.id&&e.pause(),xn.current=Cf(xn.current,t),xn.current.unshift(t)},remove(t){var e;xn.current=Cf(xn.current,t),(e=xn.current[0])==null||e.resume()},get current(){return xn.current}}}function y1(){let t=we(!1),e=we(!1);return{id:Tt(),get paused(){return p(t)},get isHandlingFocus(){return p(e)},set isHandlingFocus(r){A(e,xe(r))},pause(){A(t,!0)},resume(){A(t,!1)}}}function Cf(t,e){return[...t].filter(r=>r.id!==e.id)}function w1(t){return t.filter(e=>e.tagName!=="A")}function Sn(t,{select:e=!1}={}){if(!(t&&t.focus)||document.activeElement===t)return;const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Z0(t)&&e&&t.select()}function _1(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Sn(n,{select:e}),document.activeElement!==r)return!0}function Af(t,e){for(const r of t)if(!U0(r,e))return r}function Rf(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 k1(t){const e=Rf(t),r=Af(e,t),n=Af(e.reverse(),t);return[r,n]}/*!
558
558
  * tabbable 6.2.0
559
559
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
560
- */var T1=["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])"],C1=T1.join(","),If=typeof Element>"u",ns=If?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,os=!If&&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},E1=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},A1=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},R1=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},I1=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||A1(e))&&!R1(e)?0:e.tabIndex},Of=function(e){return e.tagName==="INPUT"},O1=function(e){return Of(e)&&e.type==="hidden"},N1=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},P1=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},L1=function(e){if(!e.name)return!0;var r=e.form||os(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=P1(o,e.form);return!a||a===e},M1=function(e){return Of(e)&&e.type==="radio"},D1=function(e){return M1(e)&&!L1(e)},z1=function(e){var r,n=e&&os(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,d;n=os(o),o=(l=n)===null||l===void 0?void 0:l.host,a=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return a},Nf=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},F1=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=ns.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(ns.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=os(e);if(c&&!c.shadowRoot&&o(c)===!0)return Nf(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=s}if(z1(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Nf(e);return!1},B1=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 ns.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},q1=function(e,r){return!(r.disabled||E1(r)||O1(r)||F1(r,e)||N1(r)||B1(r))},$1=function(e,r){return!(D1(r)||I1(r)<0||!q1(e,r))},j1=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return ns.call(e,C1)===!1?!1:$1(r,e)};const Z1=new _f("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),U1=new _f("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),H1=new lc("FocusScope");function V1({id:t,loop:e,enabled:r,onOpenAutoFocus:n,onCloseAutoFocus:o,forceMount:a}){const i=w1(),s=_1(),c=ee(null),l=H1.getOr({ignoreCloseAutoFocus:!1});let u=null;hr({id:t,ref:c,deps:()=>r.current});function d(g){if(!(s.paused||!c.current||s.isHandlingFocus)){s.isHandlingFocus=!0;try{const b=g.target;if(!hc(b))return;const w=c.current.contains(b);if(g.type==="focusin")if(w)u=b;else{if(l.ignoreCloseAutoFocus)return;Sn(u,{select:!0})}else g.type==="focusout"&&!w&&!l.ignoreCloseAutoFocus&&Sn(u,{select:!0})}finally{s.isHandlingFocus=!1}}}function f(g){var w;!((w=c.current)==null?void 0:w.contains(u))&&c.current&&Sn(c.current)}or([()=>c.current,()=>r.current],([g,b])=>{if(!g||!b)return;const w=Un(Lt(document,"focusin",d),Lt(document,"focusout",d)),I=new MutationObserver(f);return I.observe(g,{childList:!0,subtree:!0}),()=>{w(),I.disconnect()}}),or([()=>a.current,()=>c.current],([g,b])=>{if(g)return;const w=document.activeElement;return v(b,w),()=>{b&&h(w)}}),or([()=>a.current,()=>c.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 I=Z1.createEvent();n.current(I),I.defaultPrevented||Da(()=>{g&&(x1(k1(Rf(g)),{select:!0}),document.activeElement===b&&Sn(g))})}}function h(g){const b=U1.createEvent();o.current(b);const w=l.ignoreCloseAutoFocus;cc(0,()=>{!b.defaultPrevented&&g&&!w&&Sn(j1(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===j0&&!g.ctrlKey&&!g.altKey&&!g.metaKey,w=document.activeElement;if(!(b&&w))return;const I=c.current;if(!I)return;const[S,k]=S1(I);S&&k?!g.shiftKey&&w===k?(g.preventDefault(),e.current&&Sn(S,{select:!0})):g.shiftKey&&w===S&&(g.preventDefault(),e.current&&Sn(k,{select:!0})):w===I&&g.preventDefault()}const y=Se(()=>({id:t.current,tabindex:-1,onkeydown:m}));return{get props(){return p(y)}}}function Pf(t,e){Ae(e,!0);let r=x(e,"id",7),n=x(e,"trapFocus",7,!1),o=x(e,"loop",7,!1),a=x(e,"onCloseAutoFocus",7,Ge),i=x(e,"onOpenAutoFocus",7,Ge),s=x(e,"focusScope",7),c=x(e,"forceMount",7,!1);const l=V1({enabled:ee.with(()=>n()),loop:ee.with(()=>o()),onCloseAutoFocus:ee.with(()=>a()),onOpenAutoFocus:ee.with(()=>i()),id:ee.with(()=>r()),forceMount:ee.with(()=>c())});var u=ie(),d=U(u);return Je(d,()=>s()??qe,()=>({props:l.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=Ge){a(f),_()},get onOpenAutoFocus(){return i()},set onOpenAutoFocus(f=Ge){i(f),_()},get focusScope(){return s()},set focusScope(f){s(f),_()},get forceMount(){return c()},set forceMount(f=!1){c(f),_()}})}Ie(Pf,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0),globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);class G1{constructor(e){Y(this,As);ae(this,"opts");Y(this,$o,Ge);Y(this,Xa,ee(null));Y(this,Rs,e=>{const r=E(this,Xa).current,n=e.target;!hc(r)||!hc(n)||!this.opts.enabled.current||!Y1(this)||!pc(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&Et(this,$o,K1(r)))});Y(this,ei,()=>{E(this,$o).call(this),Et(this,$o,Ge)});this.opts=e,hr({id:e.id,ref:E(this,Xa),deps:()=>this.opts.enabled.current});let r=Ge;or(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=Yn(this,As,wh).call(this)),()=>{r(),E(this,ei).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}$o=new WeakMap,Xa=new WeakMap,As=new WeakSet,wh=function(){return Un(Lt(document,"pointerdown",E(this,Rs)),Lt(document,"pointerup",nf(E(this,ei),this.opts.onPointerUp.current)))},Rs=new WeakMap,ei=new WeakMap;function W1(t){return new G1(t)}const Lf=t=>t.style.userSelect||t.style.webkitUserSelect;function K1(t){const e=document.body,r=Lf(e),n=Lf(t);return as(e,"none"),as(t,"text"),()=>{as(e,r),as(t,n)}}function as(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function Y1(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Mf(t,e){Ae(e,!0);let r=x(e,"preventOverflowTextSelection",7,!0),n=x(e,"onPointerDown",7,Ge),o=x(e,"onPointerUp",7,Ge),a=x(e,"id",7),i=x(e,"children",7),s=x(e,"enabled",7);W1({id:ee.with(()=>a()),preventOverflowTextSelection:ee.with(()=>r()),onPointerDown:ee.with(()=>n()),onPointerUp:ee.with(()=>o()),enabled:ee.with(()=>s())});var c=ie(),l=U(c);return Je(l,()=>i()??qe),T(t,c),Re({get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(u=!0){r(u),_()},get onPointerDown(){return n()},set onPointerDown(u=Ge){n(u),_()},get onPointerUp(){return o()},set onPointerUp(u=Ge){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(Mf,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function Q1(t){let e=0,r=ke(void 0),n;function o(){e-=1,n&&e<=0&&(n(),R(r,void 0),n=void 0)}return(...a)=>(e+=1,p(r)===void 0&&(n=Qc(()=>{R(r,xe(t(...a)))})),wt(()=>()=>{o()}),p(r))}const J1=Q1(()=>{const t=new sc,e=Se(()=>{for(const a of t.values())if(a)return!0;return!1});let r=ke(null),n=null;function o(){vf&&(document.body.setAttribute("style",p(r)??""),document.body.style.removeProperty("--scrollbar-width"),bf&&(n==null||n()))}return wt(()=>{const a=p(e);return Yt(()=>{if(!a)return;R(r,xe(document.body.getAttribute("style")));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"),bf&&(n=wf(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),Da(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),wt(()=>()=>{n==null||n()}),{get map(){return t},resetBodyStyle:o}});function X1(t,e=()=>null){const r=St(),n=J1();if(!n)return;const o=Se(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),!ey(n.map)&&(p(o)===null?requestAnimationFrame(()=>n.resetBodyStyle()):cc(p(o),()=>n.resetBodyStyle()))}),a}function ey(t){for(const[e,r]of t)if(r)return!0;return!1}function gc(t,e){Ae(e,!0);let r=x(e,"preventScroll",7,!0),n=x(e,"restoreScrollDelay",7,null);return X1(r(),()=>n()),Re({get preventScroll(){return r()},set preventScroll(o=!0){r(o),_()},get restoreScrollDelay(){return n()},set restoreScrollDelay(o=null){n(o),_()}})}Ie(gc,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function ty({forceMount:t,present:e,trapFocus:r,open:n}){return t?n&&r:e&&r&&n}var ry=J("<div><!></div>");function Df(t,e){Ae(e,!0);let r=x(e,"id",23,St),n=x(e,"forceMount",7,!1),o=x(e,"child",7),a=x(e,"children",7),i=x(e,"ref",15,null),s=Sr(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const c=s1({id:ee.with(()=>r()),ref:ee.with(()=>i(),d=>i(d))}),l=Se(()=>nr(s,c.props));var u=Se(()=>c.root.opts.open.current||n());return rs(t,{get id(){return r()},get present(){return p(u)},presence:f=>{var v=ie(),h=U(v);{var m=g=>{var b=ie(),w=U(b),I=Nt(()=>({props:nr(p(l)),...c.snippetProps}));Je(w,o,()=>p(I)),T(g,b)},y=g=>{var b=ry();const w=Se(()=>nr(p(l)));let I;var S=P(b);Je(S,()=>a()??qe,()=>c.snippetProps),O(b),le(()=>I=qt(b,I,{...p(w)})),T(g,b)};fe(h,g=>{o()?g(m):g(y,!1)})}T(f,v)},$$slots:{presence:!0}}),Re({get id(){return r()},set id(d=St()){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),_()}})}Ie(Df,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var ny=J("<button><!></button>");function zf(t,e){Ae(e,!0);let r=x(e,"id",23,St),n=x(e,"ref",15,null),o=x(e,"children",7),a=x(e,"child",7),i=x(e,"disabled",7,!1),s=Sr(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","disabled"]);const c=o1({id:ee.with(()=>r()),ref:ee.with(()=>n(),h=>n(h)),disabled:ee.with(()=>!!i())}),l=Se(()=>nr(s,c.props));var u=ie(),d=U(u);{var f=h=>{var m=ie(),y=U(m);Je(y,a,()=>({props:p(l)})),T(h,m)},v=h=>{var m=ny();let y;var g=P(m);Je(g,()=>o()??qe),O(m),le(()=>y=qt(m,y,{...p(l)})),T(h,m)};fe(d,h=>{a()?h(f):h(v,!1)})}return T(t,u),Re({get id(){return r()},set id(h=St()){r(h),_()},get ref(){return n()},set ref(h=null){n(h),_()},get children(){return o()},set children(h){o(h),_()},get child(){return a()},set child(h){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Ie(zf,{id:{},ref:{},children:{},child:{},disabled:{}},[],[],!0);var oy=J("<div><!></div>");function Ff(t,e){Ae(e,!0);let r=x(e,"id",23,St),n=x(e,"children",7),o=x(e,"child",7),a=x(e,"ref",15,null),i=Sr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const s=l1({id:ee.with(()=>r()),ref:ee.with(()=>a(),v=>a(v))}),c=Se(()=>nr(i,s.props));var l=ie(),u=U(l);{var d=v=>{var h=ie(),m=U(h);Je(m,o,()=>({props:p(c)})),T(v,h)},f=v=>{var h=oy();let m;var y=P(h);Je(y,()=>n()??qe),O(h),le(()=>m=qt(h,m,{...p(c)})),T(v,h)};fe(u,v=>{o()?v(d):v(f,!1)})}return T(t,l),Re({get id(){return r()},set id(v=St()){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),_()}})}Ie(Ff,{id:{},children:{},child:{},ref:{}},[],[],!0);const ay="data-collapsible-root",iy="data-collapsible-content",sy="data-collapsible-trigger";class ly{constructor(e){ae(this,"opts");Y(this,ti,ke(null));Y(this,Is,Se(()=>({id:this.opts.id.current,"data-state":es(this.opts.open.current),"data-disabled":uc(this.opts.disabled.current),[ay]:""})));this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),hr(e)}get contentNode(){return p(E(this,ti))}set contentNode(e){R(E(this,ti),xe(e))}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return p(E(this,Is))}}ti=new WeakMap,Is=new WeakMap;class cy{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,jo);Y(this,Zo,ke(!1));Y(this,Uo,ke(0));Y(this,Ho,ke(0));Y(this,Os,Se(()=>this.opts.forceMount.current||this.root.opts.open.current));Y(this,Ns,Se(()=>({open:this.root.opts.open.current})));Y(this,Ps,Se(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":p(E(this,Ho))?`${p(E(this,Ho))}px`:void 0,"--bits-collapsible-content-width":p(E(this,Uo))?`${p(E(this,Uo))}px`:void 0},"data-state":es(this.root.opts.open.current),"data-disabled":uc(this.root.opts.disabled.current),[iy]:""})));this.opts=e,this.root=r,E(this,Zo).v=xe(r.opts.open.current),hr({...e,deps:()=>this.present,onRefChange:n=>{this.root.contentNode=n}}),Ys(()=>{const n=requestAnimationFrame(()=>{R(E(this,Zo),!1)});return()=>{cancelAnimationFrame(n)}}),or([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&Da(()=>{if(!this.opts.ref.current)return;Et(this,jo,E(this,jo)||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName}),n.style.transitionDuration="0s",n.style.animationName="none";const o=n.getBoundingClientRect();if(R(E(this,Ho),xe(o.height)),R(E(this,Uo),xe(o.width)),!p(E(this,Zo))){const{animationName:a,transitionDuration:i}=E(this,jo);n.style.transitionDuration=i,n.style.animationName=a}})})}get present(){return p(E(this,Os))}get snippetProps(){return p(E(this,Ns))}get props(){return p(E(this,Ps))}}jo=new WeakMap,Zo=new WeakMap,Uo=new WeakMap,Ho=new WeakMap,Os=new WeakMap,Ns=new WeakMap,Ps=new WeakMap;class uy{constructor(e,r){ae(this,"opts");ae(this,"root");Y(this,Gn,Se(()=>this.opts.disabled.current||this.root.opts.disabled.current));Y(this,Ls,Se(()=>{var e;return{id:this.opts.id.current,type:"button",disabled:p(E(this,Gn)),"aria-controls":(e=this.root.contentNode)==null?void 0:e.id,"aria-expanded":mf(this.root.opts.open.current),"data-state":es(this.root.opts.open.current),"data-disabled":uc(p(E(this,Gn))),[sy]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),hr(e)}onclick(e){if(!p(E(this,Gn))){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){p(E(this,Gn))||(e.key===fc||e.key===dc)&&(e.preventDefault(),this.root.toggleOpen())}get props(){return p(E(this,Ls))}}Gn=new WeakMap,Ls=new WeakMap;const mc=new lc("Collapsible.Root");function dy(t){return mc.set(new ly(t))}function fy(t){return new uy(t,mc.get())}function hy(t){return new cy(t,mc.get())}var py=J("<div><!></div>");function Bf(t,e){Ae(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"id",23,St),a=x(e,"ref",15,null),i=x(e,"open",15,!1),s=x(e,"disabled",7,!1),c=x(e,"onOpenChange",7,Ge),l=Sr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","open","disabled","onOpenChange"]);const u=dy({open:ee.with(()=>i(),y=>{i(y),c()(y)}),disabled:ee.with(()=>s()),id:ee.with(()=>o()),ref:ee.with(()=>a(),y=>a(y))}),d=Se(()=>nr(l,u.props));var f=ie(),v=U(f);{var h=y=>{var g=ie(),b=U(g);Je(b,n,()=>({props:p(d)})),T(y,g)},m=y=>{var g=py();let b;var w=P(g);Je(w,()=>r()??qe),O(g),le(()=>b=qt(g,b,{...p(d)})),T(y,g)};fe(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=St()){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=Ge){c(y),_()}})}Ie(Bf,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{}},[],[],!0);var gy=J("<div><!></div>");function qf(t,e){Ae(e,!0);let r=x(e,"child",7),n=x(e,"ref",15,null),o=x(e,"forceMount",7,!1),a=x(e,"children",7),i=x(e,"id",23,St),s=Sr(e,["$$slots","$$events","$$legacy","$$host","child","ref","forceMount","children","id"]);const c=hy({id:ee.with(()=>i()),forceMount:ee.with(()=>o()),ref:ee.with(()=>n(),l=>n(l))});return rs(t,{forceMount:!0,get present(){return c.present},get id(){return i()},presence:(u,d)=>{let f=()=>d==null?void 0:d().present;var v=ie();const h=Se(()=>nr(s,c.props,{hidden:o()?void 0:!f().current}));var m=U(v);{var y=b=>{var w=ie(),I=U(w);Je(I,r,()=>({...c.snippetProps,props:p(h)})),T(b,w)},g=b=>{var w=gy();let I;var S=P(w);Je(S,()=>a()??qe),O(w),le(()=>I=qt(w,I,{...p(h)})),T(b,w)};fe(m,b=>{r()?b(y):b(g,!1)})}T(u,v)},$$slots:{presence:!0}}),Re({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=St()){i(l),_()}})}Ie(qf,{child:{},ref:{},forceMount:{},children:{},id:{}},[],[],!0);var my=J("<button><!></button>");function $f(t,e){Ae(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"ref",15,null),a=x(e,"id",23,St),i=x(e,"disabled",7,!1),s=Sr(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","disabled"]);const c=fy({id:ee.with(()=>a()),ref:ee.with(()=>o(),h=>o(h)),disabled:ee.with(()=>i())}),l=Se(()=>nr(s,c.props));var u=ie(),d=U(u);{var f=h=>{var m=ie(),y=U(m);Je(y,n,()=>({props:p(l)})),T(h,m)},v=h=>{var m=my();let y;var g=P(m);Je(g,()=>r()??qe),O(m),le(()=>y=qt(m,y,{...p(l)})),T(h,m)};fe(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=St()){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Ie($f,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],!0);function jf(t,e){Ae(e,!0);let r=x(e,"open",15,!1),n=x(e,"onOpenChange",7,Ge),o=x(e,"children",7);n1({variant:ee.with(()=>"dialog"),open:ee.with(()=>r(),s=>{r(s),n()(s)})});var a=ie(),i=U(a);return Je(i,()=>o()??qe),T(t,a),Re({get open(){return r()},set open(s=!1){r(s),_()},get onOpenChange(){return n()},set onOpenChange(s=Ge){n(s),_()},get children(){return o()},set children(s){o(s),_()}})}Ie(jf,{open:{},onOpenChange:{},children:{}},[],[],!0);var vy=J("<button><!></button>");function vc(t,e){Ae(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"id",23,St),a=x(e,"ref",15,null),i=x(e,"disabled",7,!1),s=Sr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const c=c1({variant:ee.with(()=>"close"),id:ee.with(()=>o()),ref:ee.with(()=>a(),h=>a(h)),disabled:ee.with(()=>!!i())}),l=Se(()=>nr(s,c.props));var u=ie(),d=U(u);{var f=h=>{var m=ie(),y=U(m);Je(y,n,()=>({props:p(l)})),T(h,m)},v=h=>{var m=vy();let y;var g=P(m);Je(g,()=>r()??qe),O(m),le(()=>y=qt(m,y,{...p(l)})),T(h,m)};fe(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=St()){o(h),_()},get ref(){return a()},set ref(h=null){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Ie(vc,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var by=J("<!> <!>",1),yy=J("<!> <div><!></div>",1);function Zf(t,e){Ae(e,!0);let r=x(e,"id",23,St),n=x(e,"children",7),o=x(e,"child",7),a=x(e,"ref",15,null),i=x(e,"forceMount",7,!1),s=x(e,"onCloseAutoFocus",7,Ge),c=x(e,"onEscapeKeydown",7,Ge),l=x(e,"onInteractOutside",7,Ge),u=x(e,"trapFocus",7,!0),d=x(e,"preventScroll",7,!0),f=x(e,"restoreScrollDelay",7,null),v=Sr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=i1({id:ee.with(()=>r()),ref:ee.with(()=>a(),g=>a(g))}),m=Se(()=>nr(v,h.props));var y=Se(()=>h.root.opts.open.current||i());return rs(t,vn(()=>p(m),{get forceMount(){return i()},get present(){return p(y)},presence:b=>{var w=Se(()=>ty({forceMount:i(),present:h.root.opts.open.current,trapFocus:u(),open:h.root.opts.open.current}));Pf(b,vn({loop:!0,get trapFocus(){return p(w)}},()=>p(m),{onCloseAutoFocus:S=>{var k;s()(S),!S.defaultPrevented&&((k=h.root.triggerNode)==null||k.focus())},focusScope:(S,k)=>{let M=()=>k==null?void 0:k().props;Cf(S,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onEscapeKeydown:L=>{c()(L),!L.defaultPrevented&&h.root.handleClose()},children:(L,G)=>{Tf(L,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onInteractOutside:W=>{l()(W),!W.defaultPrevented&&h.root.handleClose()},children:(W,$)=>{Mf(W,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},children:(re,de)=>{var C=ie(),he=U(C);{var V=z=>{var K=by(),q=U(K);{var ne=tt=>{gc(tt,{get preventScroll(){return d()},get restoreScrollDelay(){return f()}})};fe(q,tt=>{h.root.opts.open.current&&tt(ne)})}var Te=se(q,2),it=Nt(()=>({props:nr(p(m),M()),...h.snippetProps}));Je(Te,o,()=>p(it)),T(z,K)},Z=z=>{var K=yy(),q=U(K);gc(q,{get preventScroll(){return d()}});var ne=se(q,2);const Te=Se(()=>nr(p(m),M()));let it;var tt=P(ne);Je(tt,()=>n()??qe),O(ne),le(()=>it=qt(ne,it,{...p(Te)})),T(z,K)};fe(he,z=>{o()?z(V):z(Z,!1)})}T(re,C)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}}))},$$slots:{presence:!0}})),Re({get id(){return r()},set id(g=St()){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=Ge){s(g),_()},get onEscapeKeydown(){return c()},set onEscapeKeydown(g=Ge){c(g),_()},get onInteractOutside(){return l()},set onInteractOutside(g=Ge){l(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),_()}})}Ie(Zf,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var wy=J("<div></div>"),_y=J('<span class="sr-only">Close</span> <!>',1),ky=J('<div><div class="dialog-header"><!> <!></div> <!> <!></div>'),xy=J("<!> <!> <!>",1);function Uf(t,e){var f,v,h;Ae(e,!0);const r=$t(),n=()=>vt(Sa,"$config",r);let o=x(e,"open",15,!1),a=x(e,"button",7),i=x(e,"content",7),s=x(e,"children",7),c=x(e,"title",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};var u=ie(),d=U(u);return Bt(d,()=>jf,(m,y)=>{y(m,{get open(){return o()},set open(g){o(g)},children:(g,b)=>{var w=xy(),I=U(w);Bt(I,()=>zf,(M,L)=>{L(M,{class:"dialog-trigger",children:(G,W)=>{var $=ie(),re=U($);Je(re,a),T(G,$)},$$slots:{default:!0}})});var S=se(I,2);Bt(S,()=>vc,(M,L)=>{L(M,{children:(G,W)=>{var $=ie(),re=U($);Bt(re,()=>Df,(de,C)=>{C(de,{forceMount:!0,child:(V,Z)=>{let z=()=>Z==null?void 0:Z().props,K=()=>Z==null?void 0:Z().open;var q=ie(),ne=U(q);{var Te=it=>{var tt=wy();let ut;le(()=>ut=qt(tt,ut,{...z(),class:"dialog-overlay"})),xr(3,tt,()=>Hl,()=>l),T(it,tt)};fe(ne,it=>{K()&&it(Te)})}T(V,q)},$$slots:{child:!0}})}),T(G,$)},$$slots:{default:!0}})});var k=se(S,2);Bt(k,()=>Zf,(M,L)=>{L(M,{forceMount:!0,child:(W,$)=>{let re=()=>$==null?void 0:$().props,de=()=>$==null?void 0:$().open;var C=ie(),he=U(C);{var V=Z=>{var z=ky();let K;var q=P(z),ne=P(q);Bt(ne,()=>yf,(ut,It)=>{It(ut,{class:"dialog-title",children:(nt,te)=>{var Pe=ie(),st=U(Pe);Je(st,()=>c()??qe),T(nt,Pe)},$$slots:{default:!0}})});var Te=se(ne,2);Bt(Te,()=>vc,(ut,It)=>{It(ut,{class:"dialog-close",children:(nt,te)=>{var Pe=_y(),st=se(U(Pe),2);Qt(st,{name:"dismiss"}),T(nt,Pe)},$$slots:{default:!0}})}),O(q);var it=se(q,2);Bt(it,()=>Ff,(ut,It)=>{It(ut,{class:"dialog-description",children:(nt,te)=>{var Pe=ie(),st=U(Pe);Je(st,i),T(nt,Pe)},$$slots:{default:!0}})});var tt=se(it,2);Je(tt,()=>s()??qe),O(z),le(()=>K=qt(z,K,{...re(),class:"dialog-content"})),xr(3,z,()=>Ro,()=>l),T(Z,z)};fe(he,Z=>{de()&&Z(V)})}T(W,C)},$$slots:{child:!0}})}),T(g,w)},$$slots:{default:!0}})}),T(t,u),Re({get open(){return o()},set open(m=!1){o(m),_()},get button(){return a()},set button(m){a(m),_()},get content(){return i()},set content(m){i(m),_()},get children(){return s()},set children(m){s(m),_()},get title(){return c()},set title(m){c(m),_()}})}Ie(Uf,{open:{},button:{},content:{},children:{},title:{}},[],[],!0);function Po(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,d;switch(e.position){case"bottom":u=c.height+5,d=c.width/2-l.width/2;break;case"left":u=c.height/2-l.height/2,d=-l.width-5;break;case"right":u=c.height/2-l.height/2,d=c.width+5;break;case"top":default:u=-l.height-5,d=c.width/2-l.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(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 Sy=J('<div><span class="sr-only"> </span> <!></div>'),Ty=J('<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 Hf(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"class",7),a=ke(""),i=ke(""),s=ke(!1);async function c(l){if(l.preventDefault(),!p(a).trim())return;const u=Pa.getInstance();if(!u)return;const f=new URLSearchParams(window.location.search).get(Ol)??"";try{await u.feedback({query:decodeURIComponent(f),email:p(i),body:p(a)}),No.success(n().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}}),R(s,!1)}catch(v){No.error(String(v),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}}return Uf(t,{get open(){return p(s)},set open(f){R(s,xe(f))},button:f=>{var v=Sy(),h=P(v),m=P(h,!0);O(h);var y=se(h,2);Qt(y,{name:"message"}),O(v),_i(v,(g,b)=>Po==null?void 0:Po(g,b),()=>({text:n().giveFeedback,position:"top",delay:200})),le(()=>{kr(v,o()),je(m,n().sendFeedback)}),T(f,v)},title:f=>{var v=ie(),h=U(v);ho(h,()=>n().feedbackFormTitle),T(f,v)},content:f=>{var v=Ty(),h=P(v),m=P(h),y=P(m,!0);O(m);var g=se(m,2);bu(g),O(h);var b=se(h,2),w=P(b),I=P(w,!0);O(w);var S=se(w,2);hl(S),O(b);var k=se(b,2);le(()=>k.disabled=!p(a).trim());var M=P(k,!0);O(k),O(v),le(()=>{je(y,n().feedbackFormMessage),Ce(g,"placeholder",n().feedbackFormMessagePlaceholder),je(I,n().feedbackFormEmail),Ce(S,"placeholder",n().feedbackFormEmailPlaceholder),je(M,n().send)}),ct("submit",v,L=>{L.preventDefault(),c(L)}),gl(g,()=>p(a),L=>R(a,L)),gl(S,()=>p(i),L=>R(i,L)),T(f,v)},$$slots:{button:!0,title:!0,content:!0}}),Re({get class(){return o()},set class(l){o(l),_()}})}Ie(Hf,{class:{}},[],[],!0);async function Cy(t,e,r){const n=Pa.getInstance();if(n)try{await n.quickFeedback({feedback:e()}),No.success(r().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}catch(o){No.error(String(o),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}}var Ey=J("<button><!></button>");function bc(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"class",7),a=x(e,"vote",7);var i=Ey();i.__click=[Cy,a,n];var s=P(i),c=Se(()=>a()==="positive"?"voteUp":"voteDown");return Qt(s,{get name(){return p(c)}}),O(i),_i(i,(l,u)=>Po==null?void 0:Po(l,u),()=>({text:a()==="positive"?n().answerGood:n().answerBad,position:"top",delay:300})),le(()=>kr(i,o())),T(t,i),Re({get class(){return o()},set class(l){o(l),_()},get vote(){return a()},set vote(l){a(l),_()}})}Mn(["click"]),Ie(bc,{class:{},vote:{}},[],[],!0);var Ay=J('<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 Vf(t,e){Ae(e,!0);let r=x(e,"title",7),n=x(e,"number",7),o=x(e,"url",7);var a=Ay(),i=P(a),s=P(i,!0);O(i);var c=se(i,2),l=P(c),u=P(l,!0);O(l);var d=se(l,2),f=P(d),v=P(f,!0);O(f),O(d),O(c);var h=se(c,2);return Qt(h,{name:"externalLink",class:"reference__icon transition-colors"}),O(a),le(()=>{Ce(a,"href",o()),je(s,n()),je(u,r()),je(v,o())}),T(t,a),Re({get title(){return r()},set title(m){r(m),_()},get number(){return n()},set number(m){n(m),_()},get url(){return o()},set url(m){o(m),_()}})}Ie(Vf,{title:{},number:{},url:{}},[],[],!0);var Ry=J('<h4 class="references__trigger-title"> </h4> <!>',1),Iy=J('<div class="fly-in"><!></div>'),Oy=J("<div></div>"),Ny=J("<!> <div><!></div>",1);function Gf(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"sources",7),a=x(e,"class",7),i=ke(!1),s=ke(!1);wt(()=>{p(i)?requestAnimationFrame(()=>{R(s,xe(p(i)))}):R(s,!1)});var c=ie(),l=U(c);return Bt(l,()=>Bf,(u,d)=>{d(u,{get class(){return`references ${a()??""}`},get open(){return p(i)},set open(f){R(i,xe(f))},children:(f,v)=>{var h=Ny(),m=U(h);Bt(m,()=>$f,(b,w)=>{w(b,{class:"references__trigger transition-colors",children:(I,S)=>{var k=Ry(),M=U(k),L=P(M,!0);O(M);var G=se(M,2);Qt(G,{name:"chevronDown",class:"references__trigger-icon"}),le(()=>je(L,n().referenceTitle)),T(I,k)},$$slots:{default:!0}})});var y=se(m,2),g=P(y);Bt(g,()=>qf,(b,w)=>{w(b,{forceMount:!0,child:(S,k)=>{let M=()=>k==null?void 0:k().props,L=()=>k==null?void 0:k().open;var G=ie(),W=U(G);{var $=re=>{var de=Oy();let C;_r(de,21,()=>o().used,Dr,(he,V,Z)=>{let z=()=>p(V).title,K=()=>p(V).url,q=()=>p(V).usedNumber;var ne=Iy();Ce(ne,"style",`--fly-in-id: ${Z??""};`);var Te=P(ne);Vf(Te,{get title(){return z()},get number(){return q()},get url(){return K()}}),O(ne),T(he,ne)}),O(de),le(()=>C=qt(de,C,{...M(),class:"references__container"})),xr(3,de,()=>Pv),T(re,de)};fe(W,re=>{L()&&re($)})}T(S,G)},$$slots:{child:!0}})}),O(y),le(()=>Fr(y,"mounted",p(s))),T(f,h)},$$slots:{default:!0}})}),T(t,c),Re({get sources(){return o()},set sources(u){o(u),_()},get class(){return a()},set class(u){a(u),_()}})}Ie(Gf,{sources:{},class:{}},[],[],!0);function Py(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}function Wf(t){return Math.pow(t-1,3)*(1-t)+1}var Ly=J("<!> <!>",1),My=J('<!> <div class="message__bot-options"><!> <div class="message__bot-actions"><!> <!> <!></div></div>',1),Dy=J('<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!></div> <!></div></div>'),zy=J('<div class="message container"><div class="message__content"><!></div></div>');function Kf(t,e){var m,y,g,b,w,I,S;Ae(e,!0);const r=$t(),n=()=>vt(Sa,"$config",r),o=()=>vt(Ur,"$t",r);let a=x(e,"message",7),i=x(e,"onmessageupdate",7),s=x(e,"classification",7);const c={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:Wf};a().type==="bot-loading"&&(c.delay+=Number((b=n().theme.components.message.custom)==null?void 0:b.transitionBotLoadingDelay)||300);const l={duration:Number((w=n().theme.components.messageOptions.custom)==null?void 0:w.transitionDuration)||300,delay:Number((I=n().theme.components.messageOptions.custom)==null?void 0:I.transitionDelay)||0,y:Number((S=n().theme.components.messageOptions.custom)==null?void 0:S.transitionY)||30,ease:Wf};wt(()=>{var k;((k=a())==null?void 0:k.type)==="bot"&&a().partial&&i()()});var u=zy(),d=P(u),f=P(d);{var v=k=>{var M=Dy(),L=P(M);Qt(L,{name:"avatar",class:"message__bot-avatar"});var G=se(L,2),W=P(G),$=P(W);{var re=V=>{var Z=Ly(),z=U(Z);ho(z,()=>a().message.html);var K=se(z,2);{var q=ne=>{var Te=uo("...");T(ne,Te)};fe(K,ne=>{a().partial&&ne(q)})}T(V,Z)},de=V=>{var Z=ie(),z=U(Z);{var K=ne=>{var Te=uo();le(()=>je(Te,o().messageBotLoading)),T(ne,Te)},q=ne=>{var Te=uo();le(()=>je(Te,`${o().messageBotError??""} ${a().message??o().messageBotDefaultError??""}`)),T(ne,Te)};fe(z,ne=>{a().type==="bot-loading"?ne(K):ne(q,!1)},!0)}T(V,Z)};fe($,V=>{a().type==="bot"?V(re):V(de,!1)})}O(W);var C=se(W,2);{var he=V=>{var Z=ie(),z=U(Z);{var K=q=>{var ne=My(),Te=U(ne);{var it=Qe=>{rf(Qe,{})};fe(Te,Qe=>{s()&&s().enabled&&Qe(it)})}var tt=se(Te,2),ut=P(tt);{var It=Qe=>{Gf(Qe,{get sources(){return a().sources},class:"message__bot-references"})};fe(ut,Qe=>{a().sources&&a().sources.used.length&&Qe(It)})}var nt=se(ut,2),te=P(nt);bc(te,{vote:"positive",class:"message__bot-action transition-colors"});var Pe=se(te,2);bc(Pe,{vote:"negative",class:"message__bot-action transition-colors"});var st=se(Pe,2);Hf(st,{class:"message__bot-action transition-colors"}),O(nt),O(tt),xr(3,tt,()=>Ro,()=>l),T(q,ne)};fe(z,q=>{a().partial||q(K)})}T(V,Z)};fe(C,V=>{a().type==="bot"&&V(he)})}O(G),O(M),T(k,M)},h=k=>{var M=ie(),L=U(M);{var G=W=>{var $=uo();le(()=>je($,a().message)),T(W,$)};fe(L,W=>{a().type==="user"&&W(G)},!0)}T(k,M)};fe(f,k=>{a().type==="bot"||a().type==="bot-loading"||a().type==="bot-error"?k(v):k(h,!1)})}return O(d),O(u),le(()=>{Fr(u,"message--bot",a().type==="bot"),Fr(u,"message--bot-loading",a().type==="bot-loading"),Fr(u,"message--bot-error",a().type==="bot-error"),Fr(u,"message--user",a().type==="user")}),xr(3,u,()=>Ro,()=>c),T(t,u),Re({get message(){return a()},set message(k){a(k),_()},get onmessageupdate(){return i()},set onmessageupdate(k){i(k),_()},get classification(){return s()},set classification(k){s(k),_()}})}Ie(Kf,{message:{},onmessageupdate:{},classification:{}},[],[],!0);let is;function Fy(t,e,r,n,o){is&&cancelAnimationFrame(is);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),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 By=J('<div class="chat-page__footer-text fly-in" style="--fly-in-id: 3"><!></div>'),qy=J('<section class="chat-page"><div class="chat-page__body"><div class="chat-page__messages"><!> <button class="chat-page__new-conversation btn btn--tertiary"> </button></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 $y={hash:"svelte-1dpsa7g",code:":host {--chat-footer-height: 0px;}"};function Yf(t,e){Ae(e,!0),wi(t,$y);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"history",7),a=x(e,"onSubmit",7),i=x(e,"onStartNewConversation",7),s=x(e,"classification",7),c=ke(!1),l=ke(!1),u,d,f,v=ke(0);const h=50,m=()=>{R(v,xe(f.offsetHeight)),u.style.setProperty("--chat-footer-height",`${p(v)}px`)};wt(()=>{const q=new ResizeObserver(m);return q.observe(f),()=>q.disconnect()});const y=()=>{Fy(u,u.scrollHeight-u.clientHeight,1e3,"scrollTop",Py)},g=()=>{const q=u.scrollHeight-u.scrollTop-u.clientHeight<h;R(l,!q)},b=()=>{g()},w=q=>{d.offsetHeight>u.offsetHeight&&(d.style.minHeight=`calc(${d.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{y()})),a()(q)};wt(()=>{R(c,!0)});var I=qy();ct("resize",Jo,b);var S=P(I),k=P(S),M=P(k);_r(M,17,o,Dr,(q,ne)=>{Kf(q,{get message(){return p(ne)},onmessageupdate:g,get classification(){return s()}})});var L=se(M,2);L.__click=function(...q){var ne;(ne=i())==null||ne.apply(this,q)};var G=P(L,!0);O(L),O(k),qr(k,q=>d=q,()=>d),O(S),qr(S,q=>u=q,()=>u);var W=se(S,2),$=P(W),re=P($);re.__click=y;var de=P(re),C=P(de,!0);O(de);var he=se(de,2);Qt(he,{name:"chevronDown"}),O(re);var V=se(re,2),Z=P(V);Vl(Z,{onSubmit:w,class:"chat-page__chat-input"}),O(V);var z=se(V,2);{var K=q=>{var ne=By(),Te=P(ne);ho(Te,()=>n().chatFooterText),O(ne),T(q,ne)};fe(z,q=>{n().chatFooterText!==void 0&&q(K)})}return O($),O(W),qr(W,q=>f=q,()=>f),O(I),le(()=>{je(G,n().newChat),Fr(W,"mounted",p(c)),Fr(re,"chat-page__scroll-to-bottom--hidden",!p(l)),je(C,n().scrollToBottom)}),ct("scroll",S,g),T(t,I),Re({get history(){return o()},set history(q){o(q),_()},get onSubmit(){return a()},set onSubmit(q){a(q),_()},get onStartNewConversation(){return i()},set onStartNewConversation(q){i(q),_()},get classification(){return s()},set classification(q){s(q),_()}})}Mn(["click"]),Ie(Yf,{history:{},onSubmit:{},onStartNewConversation:{},classification:{}},[],[],!0);var jy=J("<strong> </strong>"),Zy=J('<div class="line-clamp line-clamp--12"> </div>'),Uy=J('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),Hy=J('<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>'),Vy=J('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function Gy(t,e){var k,M,L;Ae(e,!0);const r=$t(),n=()=>vt(Sa,"$config",r),o=()=>vt(Ur,"$t",r);let a=x(e,"usedNumber",7),i=x(e,"source",7),s=ke(!1),c,l,u=ke(void 0);const d=i(),f={duration:Number((k=n().theme.components.referenceNumberContent.custom)==null?void 0:k.transitionDuration)||200,delay:Number((M=n().theme.components.referenceNumberContent.custom)==null?void 0:M.transitionDelay)||0,y:Number((L=n().theme.components.referenceNumberContent.custom)==null?void 0:L.transitionY)||10},v=async()=>{if(!l||!p(u))return;const{x:G,y:W}=await Td(l,p(u),{placement:"top",middleware:[kd(8),Sd(),xd({padding:8})]});Object.assign(p(u).style,{left:`${G}px`,top:`${W}px`})},h=()=>{c&&(clearTimeout(c),c=void 0)},m=()=>{h(),c=setTimeout(()=>{R(s,!1)},100)},y=()=>{h(),R(s,!0)};wt(()=>{p(s)&&v()});var g=Vy(),b=P(g),w=P(b,!0);O(b),qr(b,G=>l=G,()=>l);var I=se(b,2);{var S=G=>{var W=Hy(),$=P(W),re=P($);{var de=z=>{var K=jy(),q=P(K,!0);O(K),le(()=>je(q,d.generated.title)),T(z,K)};fe(re,z=>{d.generated.title&&z(de)})}var C=se(re,2);{var he=z=>{var K=Zy(),q=P(K,!0);O(K),le(()=>je(q,d.generated.summary)),T(z,K)};fe(C,z=>{d.generated.summary&&z(he)})}var V=se(C,2);{var Z=z=>{var K=Uy(),q=P(K),ne=P(q,!0);O(q),O(K),le(()=>je(ne,d.url)),T(z,K)};fe(V,z=>{d.url&&z(Z)})}O($),O(W),qr(W,z=>R(u,z),()=>p(u)),le(()=>Ce($,"href",d.url)),ct("mouseenter",W,y),ct("mouseleave",W,m),xr(3,W,()=>Ro,()=>f),T(G,W)};fe(I,G=>{p(s)&&G(S)})}return O(g),le(()=>{Ce(b,"href",d.url),Ce(b,"aria-label",`${o().referenceLink??""}: ${d.title??""}`),je(w,a())}),ct("mouseenter",b,y),ct("mouseleave",b,m),ct("focus",b,()=>R(s,!0)),ct("blur",b,()=>R(s,!1)),T(t,g),Re({get usedNumber(){return a()},set usedNumber(G){a(G),_()},get source(){return i()},set source(G){i(G),_()}})}customElements.define("liipgpt-reference-number",Ie(Gy,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-ref-number",type:"String"},usedNumber:{attribute:"data-used-number",type:"String"}},[],[],!1));var Wy=J('<div><!> <h1 class="introduction__title"><!></h1></div>');function Qf(t,e){Ae(e,!0);const r=$t(),n=()=>vt(Ur,"$t",r);let o=x(e,"class",7);var a=Wy(),i=P(a);Qt(i,{name:"avatar",class:"introduction__avatar"});var s=se(i,2),c=P(s);return ho(c,()=>n().introductionTitle),O(s),O(a),le(()=>kr(a,`introduction ${o()??""}`)),T(t,a),Re({get class(){return o()},set class(l){o(l),_()}})}Ie(Qf,{class:{}},[],[],!0);var Ky=(t,e,r)=>e()(r().question),Yy=J('<button class="predefined-question transition-colors" tabindex="0"><!> </button>');function Jf(t,e){Ae(e,!0);let r=x(e,"onSubmit",7),n=x(e,"predefinedQuestion",7);var o=Yy();o.__click=[Ky,r,n];var a=P(o);Qt(a,{name:"predefinedQuestion",class:"predefined-question__icon transition-colors"});var i=se(a);return O(o),le(()=>je(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),_()}})}Mn(["click"]),Ie(Jf,{onSubmit:{},predefinedQuestion:{}},[],[],!0);var Qy=J("<div></div>");function Xf(t,e){Ae(e,!0);let r=x(e,"predefinedQuestions",7),n=x(e,"onSubmit",7),o=x(e,"class",7),a=Sr(e,["$$slots","$$events","$$legacy","$$host","predefinedQuestions","onSubmit","class"]);var i=Qy();let s;return _r(i,21,r,Dr,(c,l)=>{Jf(c,{get predefinedQuestion(){return p(l)},get onSubmit(){return n()}})}),O(i),le(()=>s=qt(i,s,{class:`predefined-questions ${o()??""}`,...a})),T(t,i),Re({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(Xf,{predefinedQuestions:{},onSubmit:{},class:{}},[],[],!0);var Jy=J('<section class="start-page container"><!> <!> <!></section>');function eh(t,e){Ae(e,!0);let r=x(e,"predefinedQuestions",7),n=x(e,"onSubmit",7),o=ke(!1);wt(()=>{R(o,!0)});var a=Jy(),i=P(a);Qf(i,{class:"start-page__introduction fly-in"});var s=se(i,2);Vl(s,{get onSubmit(){return n()},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;"});var c=se(s,2);{var l=u=>{Xf(u,{get predefinedQuestions(){return r()},get onSubmit(){return n()},class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};fe(c,u=>{r()&&r().length&&u(l)})}return O(a),le(()=>Fr(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),_()}})}Ie(eh,{predefinedQuestions:{},onSubmit:{}},[],[],!0);const Xy=(t,e)=>{if(globalThis.document){const r=document.createElement("style");r.innerHTML=t||"",e.appendChild(r)}},ew=[{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:
560
+ */var x1=["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])"],S1=x1.join(","),If=typeof Element>"u",as=If?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,is=!If&&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},T1=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},E1=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},C1=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},A1=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||E1(e))&&!C1(e)?0:e.tabIndex},Of=function(e){return e.tagName==="INPUT"},R1=function(e){return Of(e)&&e.type==="hidden"},I1=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},O1=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},N1=function(e){if(!e.name)return!0;var r=e.form||is(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=O1(o,e.form);return!a||a===e},P1=function(e){return Of(e)&&e.type==="radio"},L1=function(e){return P1(e)&&!N1(e)},M1=function(e){var r,n=e&&is(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,d;n=is(o),o=(l=n)===null||l===void 0?void 0:l.host,a=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return a},Nf=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},D1=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=as.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(as.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=is(e);if(c&&!c.shadowRoot&&o(c)===!0)return Nf(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=s}if(M1(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Nf(e);return!1},z1=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 as.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},F1=function(e,r){return!(r.disabled||T1(r)||R1(r)||D1(r,e)||I1(r)||z1(r))},B1=function(e,r){return!(L1(r)||A1(r)<0||!F1(e,r))},q1=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return as.call(e,S1)===!1?!1:B1(r,e)};const $1=new _f("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),j1=new _f("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),Z1=new lc("FocusScope");function U1({id:t,loop:e,enabled:r,onOpenAutoFocus:n,onCloseAutoFocus:o,forceMount:a}){const i=b1(),s=y1(),c=X(null),l=Z1.getOr({ignoreCloseAutoFocus:!1});let u=null;hr({id:t,ref:c,deps:()=>r.current});function d(g){if(!(s.paused||!c.current||s.isHandlingFocus)){s.isHandlingFocus=!0;try{const b=g.target;if(!hc(b))return;const w=c.current.contains(b);if(g.type==="focusin")if(w)u=b;else{if(l.ignoreCloseAutoFocus)return;Sn(u,{select:!0})}else g.type==="focusout"&&!w&&!l.ignoreCloseAutoFocus&&Sn(u,{select:!0})}finally{s.isHandlingFocus=!1}}}function f(g){var w;!((w=c.current)==null?void 0:w.contains(u))&&c.current&&Sn(c.current)}or([()=>c.current,()=>r.current],([g,b])=>{if(!g||!b)return;const w=Hn(Lt(document,"focusin",d),Lt(document,"focusout",d)),I=new MutationObserver(f);return I.observe(g,{childList:!0,subtree:!0}),()=>{w(),I.disconnect()}}),or([()=>a.current,()=>c.current],([g,b])=>{if(g)return;const w=document.activeElement;return v(b,w),()=>{b&&h(w)}}),or([()=>a.current,()=>c.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 I=$1.createEvent();n.current(I),I.defaultPrevented||za(()=>{g&&(_1(w1(Rf(g)),{select:!0}),document.activeElement===b&&Sn(g))})}}function h(g){const b=j1.createEvent();o.current(b);const w=l.ignoreCloseAutoFocus;cc(0,()=>{!b.defaultPrevented&&g&&!w&&Sn(q1(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===q0&&!g.ctrlKey&&!g.altKey&&!g.metaKey,w=document.activeElement;if(!(b&&w))return;const I=c.current;if(!I)return;const[S,k]=k1(I);S&&k?!g.shiftKey&&w===k?(g.preventDefault(),e.current&&Sn(S,{select:!0})):g.shiftKey&&w===S&&(g.preventDefault(),e.current&&Sn(k,{select:!0})):w===I&&g.preventDefault()}const y=Se(()=>({id:t.current,tabindex:-1,onkeydown:m}));return{get props(){return p(y)}}}function Pf(t,e){Re(e,!0);let r=x(e,"id",7),n=x(e,"trapFocus",7,!1),o=x(e,"loop",7,!1),a=x(e,"onCloseAutoFocus",7,Qe),i=x(e,"onOpenAutoFocus",7,Qe),s=x(e,"focusScope",7),c=x(e,"forceMount",7,!1);const l=U1({enabled:X.with(()=>n()),loop:X.with(()=>o()),onCloseAutoFocus:X.with(()=>a()),onOpenAutoFocus:X.with(()=>i()),id:X.with(()=>r()),forceMount:X.with(()=>c())});var u=se(),d=U(u);return nt(d,()=>s()??He,()=>({props:l.props})),T(t,u),Ie({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=Qe){a(f),_()},get onOpenAutoFocus(){return i()},set onOpenAutoFocus(f=Qe){i(f),_()},get focusScope(){return s()},set focusScope(f){s(f),_()},get forceMount(){return c()},set forceMount(f=!1){c(f),_()}})}Oe(Pf,{id:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},forceMount:{}},[],[],!0),globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);class H1{constructor(e){K(this,Is);ae(this,"opts");K(this,$o,Qe);K(this,ei,X(null));K(this,Os,e=>{const r=E(this,ei).current,n=e.target;!hc(r)||!hc(n)||!this.opts.enabled.current||!W1(this)||!pc(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&At(this,$o,G1(r)))});K(this,ti,()=>{E(this,$o).call(this),At(this,$o,Qe)});this.opts=e,hr({id:e.id,ref:E(this,ei),deps:()=>this.opts.enabled.current});let r=Qe;or(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=Qn(this,Is,wh).call(this)),()=>{r(),E(this,ti).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}$o=new WeakMap,ei=new WeakMap,Is=new WeakSet,wh=function(){return Hn(Lt(document,"pointerdown",E(this,Os)),Lt(document,"pointerup",nf(E(this,ti),this.opts.onPointerUp.current)))},Os=new WeakMap,ti=new WeakMap;function V1(t){return new H1(t)}const Lf=t=>t.style.userSelect||t.style.webkitUserSelect;function G1(t){const e=document.body,r=Lf(e),n=Lf(t);return ss(e,"none"),ss(t,"text"),()=>{ss(e,r),ss(t,n)}}function ss(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function W1(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Mf(t,e){Re(e,!0);let r=x(e,"preventOverflowTextSelection",7,!0),n=x(e,"onPointerDown",7,Qe),o=x(e,"onPointerUp",7,Qe),a=x(e,"id",7),i=x(e,"children",7),s=x(e,"enabled",7);V1({id:X.with(()=>a()),preventOverflowTextSelection:X.with(()=>r()),onPointerDown:X.with(()=>n()),onPointerUp:X.with(()=>o()),enabled:X.with(()=>s())});var c=se(),l=U(c);return nt(l,()=>i()??He),T(t,c),Ie({get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(u=!0){r(u),_()},get onPointerDown(){return n()},set onPointerDown(u=Qe){n(u),_()},get onPointerUp(){return o()},set onPointerUp(u=Qe){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(Mf,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{}},[],[],!0);function K1(t){let e=0,r=we(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=Qc(()=>{A(r,xe(t(...a)))})),_t(()=>()=>{o()}),p(r))}const Y1=K1(()=>{const t=new sc,e=Se(()=>{for(const a of t.values())if(a)return!0;return!1});let r=we(null),n=null;function o(){vf&&(document.body.setAttribute("style",p(r)??""),document.body.style.removeProperty("--scrollbar-width"),bf&&(n==null||n()))}return _t(()=>{const a=p(e);return Yt(()=>{if(!a)return;A(r,xe(document.body.getAttribute("style")));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"),bf&&(n=wf(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),za(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),_t(()=>()=>{n==null||n()}),{get map(){return t},resetBodyStyle:o}});function Q1(t,e=()=>null){const r=Tt(),n=Y1();if(!n)return;const o=Se(e);n.map.set(r,t??!1);const a=X.with(()=>n.map.get(r)??!1,i=>n.map.set(r,i));return _t(()=>()=>{n.map.delete(r),!J1(n.map)&&(p(o)===null?requestAnimationFrame(()=>n.resetBodyStyle()):cc(p(o),()=>n.resetBodyStyle()))}),a}function J1(t){for(const[e,r]of t)if(r)return!0;return!1}function gc(t,e){Re(e,!0);let r=x(e,"preventScroll",7,!0),n=x(e,"restoreScrollDelay",7,null);return Q1(r(),()=>n()),Ie({get preventScroll(){return r()},set preventScroll(o=!0){r(o),_()},get restoreScrollDelay(){return n()},set restoreScrollDelay(o=null){n(o),_()}})}Oe(gc,{preventScroll:{},restoreScrollDelay:{}},[],[],!0);function X1({forceMount:t,present:e,trapFocus:r,open:n}){return t?n&&r:e&&r&&n}var ey=te("<div><!></div>");function Df(t,e){Re(e,!0);let r=x(e,"id",23,Tt),n=x(e,"forceMount",7,!1),o=x(e,"child",7),a=x(e,"children",7),i=x(e,"ref",15,null),s=xr(e,["$$slots","$$events","$$legacy","$$host","id","forceMount","child","children","ref"]);const c=a1({id:X.with(()=>r()),ref:X.with(()=>i(),d=>i(d))}),l=Se(()=>nr(s,c.props));var u=Se(()=>c.root.opts.open.current||n());return os(t,{get id(){return r()},get present(){return p(u)},presence:f=>{var v=se(),h=U(v);{var m=g=>{var b=se(),w=U(b),I=Nt(()=>({props:nr(p(l)),...c.snippetProps}));nt(w,o,()=>p(I)),T(g,b)},y=g=>{var b=ey();const w=Se(()=>nr(p(l)));let I;var S=N(b);nt(S,()=>a()??He,()=>c.snippetProps),O(b),ue(()=>I=qt(b,I,{...p(w)})),T(g,b)};de(h,g=>{o()?g(m):g(y,!1)})}T(f,v)},$$slots:{presence:!0}}),Ie({get id(){return r()},set id(d=Tt()){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(Df,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],!0);var ty=te("<button><!></button>");function zf(t,e){Re(e,!0);let r=x(e,"id",23,Tt),n=x(e,"ref",15,null),o=x(e,"children",7),a=x(e,"child",7),i=x(e,"disabled",7,!1),s=xr(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","disabled"]);const c=r1({id:X.with(()=>r()),ref:X.with(()=>n(),h=>n(h)),disabled:X.with(()=>!!i())}),l=Se(()=>nr(s,c.props));var u=se(),d=U(u);{var f=h=>{var m=se(),y=U(m);nt(y,a,()=>({props:p(l)})),T(h,m)},v=h=>{var m=ty();let y;var g=N(m);nt(g,()=>o()??He),O(m),ue(()=>y=qt(m,y,{...p(l)})),T(h,m)};de(d,h=>{a()?h(f):h(v,!1)})}return T(t,u),Ie({get id(){return r()},set id(h=Tt()){r(h),_()},get ref(){return n()},set ref(h=null){n(h),_()},get children(){return o()},set children(h){o(h),_()},get child(){return a()},set child(h){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Oe(zf,{id:{},ref:{},children:{},child:{},disabled:{}},[],[],!0);var ry=te("<div><!></div>");function Ff(t,e){Re(e,!0);let r=x(e,"id",23,Tt),n=x(e,"children",7),o=x(e,"child",7),a=x(e,"ref",15,null),i=xr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref"]);const s=i1({id:X.with(()=>r()),ref:X.with(()=>a(),v=>a(v))}),c=Se(()=>nr(i,s.props));var l=se(),u=U(l);{var d=v=>{var h=se(),m=U(h);nt(m,o,()=>({props:p(c)})),T(v,h)},f=v=>{var h=ry();let m;var y=N(h);nt(y,()=>n()??He),O(h),ue(()=>m=qt(h,m,{...p(c)})),T(v,h)};de(u,v=>{o()?v(d):v(f,!1)})}return T(t,l),Ie({get id(){return r()},set id(v=Tt()){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(Ff,{id:{},children:{},child:{},ref:{}},[],[],!0);const ny="data-collapsible-root",oy="data-collapsible-content",ay="data-collapsible-trigger";class iy{constructor(e){ae(this,"opts");K(this,ri,we(null));K(this,Ns,Se(()=>({id:this.opts.id.current,"data-state":rs(this.opts.open.current),"data-disabled":uc(this.opts.disabled.current),[ny]:""})));this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),hr(e)}get contentNode(){return p(E(this,ri))}set contentNode(e){A(E(this,ri),xe(e))}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return p(E(this,Ns))}}ri=new WeakMap,Ns=new WeakMap;class sy{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,jo);K(this,Zo,we(!1));K(this,Uo,we(0));K(this,Ho,we(0));K(this,Ps,Se(()=>this.opts.forceMount.current||this.root.opts.open.current));K(this,Ls,Se(()=>({open:this.root.opts.open.current})));K(this,Ms,Se(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":p(E(this,Ho))?`${p(E(this,Ho))}px`:void 0,"--bits-collapsible-content-width":p(E(this,Uo))?`${p(E(this,Uo))}px`:void 0},"data-state":rs(this.root.opts.open.current),"data-disabled":uc(this.root.opts.disabled.current),[oy]:""})));this.opts=e,this.root=r,E(this,Zo).v=xe(r.opts.open.current),hr({...e,deps:()=>this.present,onRefChange:n=>{this.root.contentNode=n}}),Js(()=>{const n=requestAnimationFrame(()=>{A(E(this,Zo),!1)});return()=>{cancelAnimationFrame(n)}}),or([()=>this.opts.ref.current,()=>this.present],([n])=>{n&&za(()=>{if(!this.opts.ref.current)return;At(this,jo,E(this,jo)||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName}),n.style.transitionDuration="0s",n.style.animationName="none";const o=n.getBoundingClientRect();if(A(E(this,Ho),xe(o.height)),A(E(this,Uo),xe(o.width)),!p(E(this,Zo))){const{animationName:a,transitionDuration:i}=E(this,jo);n.style.transitionDuration=i,n.style.animationName=a}})})}get present(){return p(E(this,Ps))}get snippetProps(){return p(E(this,Ls))}get props(){return p(E(this,Ms))}}jo=new WeakMap,Zo=new WeakMap,Uo=new WeakMap,Ho=new WeakMap,Ps=new WeakMap,Ls=new WeakMap,Ms=new WeakMap;class ly{constructor(e,r){ae(this,"opts");ae(this,"root");K(this,Wn,Se(()=>this.opts.disabled.current||this.root.opts.disabled.current));K(this,Ds,Se(()=>{var e;return{id:this.opts.id.current,type:"button",disabled:p(E(this,Wn)),"aria-controls":(e=this.root.contentNode)==null?void 0:e.id,"aria-expanded":mf(this.root.opts.open.current),"data-state":rs(this.root.opts.open.current),"data-disabled":uc(p(E(this,Wn))),[ay]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),hr(e)}onclick(e){if(!p(E(this,Wn))){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){p(E(this,Wn))||(e.key===fc||e.key===dc)&&(e.preventDefault(),this.root.toggleOpen())}get props(){return p(E(this,Ds))}}Wn=new WeakMap,Ds=new WeakMap;const mc=new lc("Collapsible.Root");function cy(t){return mc.set(new iy(t))}function uy(t){return new ly(t,mc.get())}function dy(t){return new sy(t,mc.get())}var fy=te("<div><!></div>");function Bf(t,e){Re(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"id",23,Tt),a=x(e,"ref",15,null),i=x(e,"open",15,!1),s=x(e,"disabled",7,!1),c=x(e,"onOpenChange",7,Qe),l=xr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","open","disabled","onOpenChange"]);const u=cy({open:X.with(()=>i(),y=>{i(y),c()(y)}),disabled:X.with(()=>s()),id:X.with(()=>o()),ref:X.with(()=>a(),y=>a(y))}),d=Se(()=>nr(l,u.props));var f=se(),v=U(f);{var h=y=>{var g=se(),b=U(g);nt(b,n,()=>({props:p(d)})),T(y,g)},m=y=>{var g=fy();let b;var w=N(g);nt(w,()=>r()??He),O(g),ue(()=>b=qt(g,b,{...p(d)})),T(y,g)};de(v,y=>{n()?y(h):y(m,!1)})}return T(t,f),Ie({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=Tt()){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=Qe){c(y),_()}})}Oe(Bf,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{}},[],[],!0);var hy=te("<div><!></div>");function qf(t,e){Re(e,!0);let r=x(e,"child",7),n=x(e,"ref",15,null),o=x(e,"forceMount",7,!1),a=x(e,"children",7),i=x(e,"id",23,Tt),s=xr(e,["$$slots","$$events","$$legacy","$$host","child","ref","forceMount","children","id"]);const c=dy({id:X.with(()=>i()),forceMount:X.with(()=>o()),ref:X.with(()=>n(),l=>n(l))});return os(t,{forceMount:!0,get present(){return c.present},get id(){return i()},presence:(u,d)=>{let f=()=>d==null?void 0:d().present;var v=se();const h=Se(()=>nr(s,c.props,{hidden:o()?void 0:!f().current}));var m=U(v);{var y=b=>{var w=se(),I=U(w);nt(I,r,()=>({...c.snippetProps,props:p(h)})),T(b,w)},g=b=>{var w=hy();let I;var S=N(w);nt(S,()=>a()??He),O(w),ue(()=>I=qt(w,I,{...p(h)})),T(b,w)};de(m,b=>{r()?b(y):b(g,!1)})}T(u,v)},$$slots:{presence:!0}}),Ie({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=Tt()){i(l),_()}})}Oe(qf,{child:{},ref:{},forceMount:{},children:{},id:{}},[],[],!0);var py=te("<button><!></button>");function $f(t,e){Re(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"ref",15,null),a=x(e,"id",23,Tt),i=x(e,"disabled",7,!1),s=xr(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","disabled"]);const c=uy({id:X.with(()=>a()),ref:X.with(()=>o(),h=>o(h)),disabled:X.with(()=>i())}),l=Se(()=>nr(s,c.props));var u=se(),d=U(u);{var f=h=>{var m=se(),y=U(m);nt(y,n,()=>({props:p(l)})),T(h,m)},v=h=>{var m=py();let y;var g=N(m);nt(g,()=>r()??He),O(m),ue(()=>y=qt(m,y,{...p(l)})),T(h,m)};de(d,h=>{n()?h(f):h(v,!1)})}return T(t,u),Ie({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=Tt()){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Oe($f,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],!0);function jf(t,e){Re(e,!0);let r=x(e,"open",15,!1),n=x(e,"onOpenChange",7,Qe),o=x(e,"children",7);t1({variant:X.with(()=>"dialog"),open:X.with(()=>r(),s=>{r(s),n()(s)})});var a=se(),i=U(a);return nt(i,()=>o()??He),T(t,a),Ie({get open(){return r()},set open(s=!1){r(s),_()},get onOpenChange(){return n()},set onOpenChange(s=Qe){n(s),_()},get children(){return o()},set children(s){o(s),_()}})}Oe(jf,{open:{},onOpenChange:{},children:{}},[],[],!0);var gy=te("<button><!></button>");function vc(t,e){Re(e,!0);let r=x(e,"children",7),n=x(e,"child",7),o=x(e,"id",23,Tt),a=x(e,"ref",15,null),i=x(e,"disabled",7,!1),s=xr(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","disabled"]);const c=s1({variant:X.with(()=>"close"),id:X.with(()=>o()),ref:X.with(()=>a(),h=>a(h)),disabled:X.with(()=>!!i())}),l=Se(()=>nr(s,c.props));var u=se(),d=U(u);{var f=h=>{var m=se(),y=U(m);nt(y,n,()=>({props:p(l)})),T(h,m)},v=h=>{var m=gy();let y;var g=N(m);nt(g,()=>r()??He),O(m),ue(()=>y=qt(m,y,{...p(l)})),T(h,m)};de(d,h=>{n()?h(f):h(v,!1)})}return T(t,u),Ie({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=Tt()){o(h),_()},get ref(){return a()},set ref(h=null){a(h),_()},get disabled(){return i()},set disabled(h=!1){i(h),_()}})}Oe(vc,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],!0);var my=te("<!> <!>",1),vy=te("<!> <div><!></div>",1);function Zf(t,e){Re(e,!0);let r=x(e,"id",23,Tt),n=x(e,"children",7),o=x(e,"child",7),a=x(e,"ref",15,null),i=x(e,"forceMount",7,!1),s=x(e,"onCloseAutoFocus",7,Qe),c=x(e,"onEscapeKeydown",7,Qe),l=x(e,"onInteractOutside",7,Qe),u=x(e,"trapFocus",7,!0),d=x(e,"preventScroll",7,!0),f=x(e,"restoreScrollDelay",7,null),v=xr(e,["$$slots","$$events","$$legacy","$$host","id","children","child","ref","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const h=o1({id:X.with(()=>r()),ref:X.with(()=>a(),g=>a(g))}),m=Se(()=>nr(v,h.props));var y=Se(()=>h.root.opts.open.current||i());return os(t,vn(()=>p(m),{get forceMount(){return i()},get present(){return p(y)},presence:b=>{var w=Se(()=>X1({forceMount:i(),present:h.root.opts.open.current,trapFocus:u(),open:h.root.opts.open.current}));Pf(b,vn({loop:!0,get trapFocus(){return p(w)}},()=>p(m),{onCloseAutoFocus:S=>{var k;s()(S),!S.defaultPrevented&&((k=h.root.triggerNode)==null||k.focus())},focusScope:(S,k)=>{let z=()=>k==null?void 0:k().props;Ef(S,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onEscapeKeydown:L=>{c()(L),!L.defaultPrevented&&h.root.handleClose()},children:(L,V)=>{Tf(L,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},onInteractOutside:G=>{l()(G),!G.defaultPrevented&&h.root.handleClose()},children:(G,$)=>{Mf(G,vn(()=>p(m),{get enabled(){return h.root.opts.open.current},children:(ee,fe)=>{var C=se(),Ee=U(C);{var ie=D=>{var Y=my(),F=U(Y);{var re=Pe=>{gc(Pe,{get preventScroll(){return d()},get restoreScrollDelay(){return f()}})};de(F,Pe=>{h.root.opts.open.current&&Pe(re)})}var pe=ne(F,2),ze=Nt(()=>({props:nr(p(m),z()),...h.snippetProps}));nt(pe,o,()=>p(ze)),T(D,Y)},Z=D=>{var Y=vy(),F=U(Y);gc(F,{get preventScroll(){return d()}});var re=ne(F,2);const pe=Se(()=>nr(p(m),z()));let ze;var Pe=N(re);nt(Pe,()=>n()??He),O(re),ue(()=>ze=qt(re,ze,{...p(pe)})),T(D,Y)};de(Ee,D=>{o()?D(ie):D(Z,!1)})}T(ee,C)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}}))},$$slots:{presence:!0}})),Ie({get id(){return r()},set id(g=Tt()){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=Qe){s(g),_()},get onEscapeKeydown(){return c()},set onEscapeKeydown(g=Qe){c(g),_()},get onInteractOutside(){return l()},set onInteractOutside(g=Qe){l(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(Zf,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],!0);var by=te("<div></div>"),yy=te('<span class="sr-only">Close</span> <!>',1),wy=te('<div><div class="dialog-header"><!> <!></div> <!> <!></div>'),_y=te("<!> <!> <!>",1);function Uf(t,e){var f,v,h;Re(e,!0);const r=$t(),n=()=>bt(Ta,"$config",r);let o=x(e,"open",15,!1),a=x(e,"button",7),i=x(e,"content",7),s=x(e,"children",7),c=x(e,"title",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};var u=se(),d=U(u);return Bt(d,()=>jf,(m,y)=>{y(m,{get open(){return o()},set open(g){o(g)},children:(g,b)=>{var w=_y(),I=U(w);Bt(I,()=>zf,(z,L)=>{L(z,{class:"dialog-trigger",children:(V,G)=>{var $=se(),ee=U($);nt(ee,a),T(V,$)},$$slots:{default:!0}})});var S=ne(I,2);Bt(S,()=>vc,(z,L)=>{L(z,{children:(V,G)=>{var $=se(),ee=U($);Bt(ee,()=>Df,(fe,C)=>{C(fe,{forceMount:!0,child:(ie,Z)=>{let D=()=>Z==null?void 0:Z().props,Y=()=>Z==null?void 0:Z().open;var F=se(),re=U(F);{var pe=ze=>{var Pe=by();let Ze;ue(()=>Ze=qt(Pe,Ze,{...D(),class:"dialog-overlay"})),Br(3,Pe,()=>Ad,()=>l),T(ze,Pe)};de(re,ze=>{Y()&&ze(pe)})}T(ie,F)},$$slots:{child:!0}})}),T(V,$)},$$slots:{default:!0}})});var k=ne(S,2);Bt(k,()=>Zf,(z,L)=>{L(z,{forceMount:!0,child:(G,$)=>{let ee=()=>$==null?void 0:$().props,fe=()=>$==null?void 0:$().open;var C=se(),Ee=U(C);{var ie=Z=>{var D=wy();let Y;var F=N(D),re=N(F);Bt(re,()=>yf,(Ze,Je)=>{Je(Ze,{class:"dialog-title",children:(Ue,W)=>{var Ae=se(),ct=U(Ae);nt(ct,()=>c()??He),T(Ue,Ae)},$$slots:{default:!0}})});var pe=ne(re,2);Bt(pe,()=>vc,(Ze,Je)=>{Je(Ze,{class:"dialog-close",children:(Ue,W)=>{var Ae=yy(),ct=ne(U(Ae),2);Qt(ct,{name:"dismiss"}),T(Ue,Ae)},$$slots:{default:!0}})}),O(F);var ze=ne(F,2);Bt(ze,()=>Ff,(Ze,Je)=>{Je(Ze,{class:"dialog-description",children:(Ue,W)=>{var Ae=se(),ct=U(Ae);nt(ct,i),T(Ue,Ae)},$$slots:{default:!0}})});var Pe=ne(ze,2);nt(Pe,()=>s()??He),O(D),ue(()=>Y=qt(D,Y,{...ee(),class:"dialog-content"})),Br(3,D,()=>Io,()=>l),T(Z,D)};de(Ee,Z=>{fe()&&Z(ie)})}T(G,C)},$$slots:{child:!0}})}),T(g,w)},$$slots:{default:!0}})}),T(t,u),Ie({get open(){return o()},set open(m=!1){o(m),_()},get button(){return a()},set button(m){a(m),_()},get content(){return i()},set content(m){i(m),_()},get children(){return s()},set children(m){s(m),_()},get title(){return c()},set title(m){c(m),_()}})}Oe(Uf,{open:{},button:{},content:{},children:{},title:{}},[],[],!0);function Po(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,d;switch(e.position){case"bottom":u=c.height+5,d=c.width/2-l.width/2;break;case"left":u=c.height/2-l.height/2,d=-l.width-5;break;case"right":u=c.height/2-l.height/2,d=c.width+5;break;case"top":default:u=-l.height-5,d=c.width/2-l.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(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 ky=te('<div><span class="sr-only"> </span> <!></div>'),xy=te('<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 Hf(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"class",7),a=we(""),i=we(""),s=we(!1);async function c(l){if(l.preventDefault(),!p(a).trim())return;const u=La.getInstance();if(!u)return;const f=new URLSearchParams(window.location.search).get(Nl)??"";try{await u.feedback({query:decodeURIComponent(f),email:p(i),body:p(a)}),Zn.success(n().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}}),A(s,!1)}catch(v){Zn.error(String(v),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}}return Uf(t,{get open(){return p(s)},set open(f){A(s,xe(f))},button:f=>{var v=ky(),h=N(v),m=N(h,!0);O(h);var y=ne(h,2);Qt(y,{name:"message"}),O(v),ki(v,(g,b)=>Po==null?void 0:Po(g,b),()=>({text:n().giveFeedback,position:"top",delay:200})),ue(()=>{kr(v,o()),qe(m,n().sendFeedback)}),T(f,v)},title:f=>{var v=se(),h=U(v);po(h,()=>n().feedbackFormTitle),T(f,v)},content:f=>{var v=xy(),h=N(v),m=N(h),y=N(m,!0);O(m);var g=ne(m,2);ll(g),O(h);var b=ne(h,2),w=N(b),I=N(w,!0);O(w);var S=ne(w,2);xi(S),O(b);var k=ne(b,2);ue(()=>k.disabled=!p(a).trim());var z=N(k,!0);O(k),O(v),ue(()=>{qe(y,n().feedbackFormMessage),Te(g,"placeholder",n().feedbackFormMessagePlaceholder),qe(I,n().feedbackFormEmail),Te(S,"placeholder",n().feedbackFormEmailPlaceholder),qe(z,n().send)}),dt("submit",v,L=>{L.preventDefault(),c(L)}),aa(g,()=>p(a),L=>A(a,L)),aa(S,()=>p(i),L=>A(i,L)),T(f,v)},$$slots:{button:!0,title:!0,content:!0}}),Ie({get class(){return o()},set class(l){o(l),_()}})}Oe(Hf,{class:{}},[],[],!0);async function Sy(t,e,r){const n=La.getInstance();if(n)try{await n.quickFeedback({feedback:e()}),Zn.success(r().thankYouForFeedback,{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}catch(o){Zn.error(String(o),{unstyled:!0,duration:3e3,classes:{toast:"toast"}})}}var Ty=te("<button><!></button>");function bc(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"class",7),a=x(e,"vote",7);var i=Ty();i.__click=[Sy,a,n];var s=N(i),c=Se(()=>a()==="positive"?"voteUp":"voteDown");return Qt(s,{get name(){return p(c)}}),O(i),ki(i,(l,u)=>Po==null?void 0:Po(l,u),()=>({text:a()==="positive"?n().answerGood:n().answerBad,position:"top",delay:300})),ue(()=>kr(i,o())),T(t,i),Ie({get class(){return o()},set class(l){o(l),_()},get vote(){return a()},set vote(l){a(l),_()}})}Mn(["click"]),Oe(bc,{class:{},vote:{}},[],[],!0);var Ey=te('<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 Vf(t,e){Re(e,!0);let r=x(e,"title",7),n=x(e,"number",7),o=x(e,"url",7),a=x(e,"domainName",7);var i=Ey(),s=N(i),c=N(s,!0);O(s);var l=ne(s,2),u=N(l),d=N(u,!0);O(u);var f=ne(u,2),v=N(f),h=N(v,!0);O(v),O(f),O(l);var m=ne(l,2);return Qt(m,{name:"externalLink",class:"reference__icon transition-colors"}),O(i),ue(()=>{Te(i,"href",o()),qe(c,n()),qe(d,r()),qe(h,a())}),T(t,i),Ie({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(Vf,{title:{},number:{},url:{},domainName:{}},[],[],!0);var Cy=te('<h4 class="references__trigger-title"> </h4> <!>',1),Ay=te('<div class="fly-in"><!></div>'),Ry=te("<div></div>"),Iy=te("<!> <div><!></div>",1);function Gf(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"sources",7),a=x(e,"class",7),i=we(!1),s=we(!1);_t(()=>{p(i)?requestAnimationFrame(()=>{A(s,xe(p(i)))}):A(s,!1)});var c=se(),l=U(c);return Bt(l,()=>Bf,(u,d)=>{d(u,{get class(){return`references ${a()??""}`},get open(){return p(i)},set open(f){A(i,xe(f))},children:(f,v)=>{var h=Iy(),m=U(h);Bt(m,()=>$f,(b,w)=>{w(b,{class:"references__trigger transition-colors",children:(I,S)=>{var k=Cy(),z=U(k),L=N(z,!0);O(z);var V=ne(z,2);Qt(V,{name:"chevronDown",class:"references__trigger-icon"}),ue(()=>qe(L,n().referenceTitle)),T(I,k)},$$slots:{default:!0}})});var y=ne(m,2),g=N(y);Bt(g,()=>qf,(b,w)=>{w(b,{forceMount:!0,child:(S,k)=>{let z=()=>k==null?void 0:k().props,L=()=>k==null?void 0:k().open;var V=se(),G=U(V);{var $=ee=>{var fe=Ry();let C;_r(fe,21,()=>o().used,Mr,(Ee,ie,Z)=>{let D=()=>p(ie).title,Y=()=>p(ie).url,F=()=>p(ie).domainName,re=()=>p(ie).usedNumber;var pe=Ay();Te(pe,"style",`--fly-in-id: ${Z??""};`);var ze=N(pe);Vf(ze,{get title(){return D()},get number(){return re()},get domainName(){return F()},get url(){return Y()}}),O(pe),T(Ee,pe)}),O(fe),ue(()=>C=qt(fe,C,{...z(),class:"references__container"})),Br(3,fe,()=>Pv),T(ee,fe)};de(G,ee=>{L()&&ee($)})}T(S,V)},$$slots:{child:!0}})}),O(y),ue(()=>zr(y,"mounted",p(s))),T(f,h)},$$slots:{default:!0}})}),T(t,c),Ie({get sources(){return o()},set sources(u){o(u),_()},get class(){return a()},set class(u){a(u),_()}})}Oe(Gf,{sources:{},class:{}},[],[],!0);function Oy(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}function Wf(t){return Math.pow(t-1,3)*(1-t)+1}var Ny=te("<!> <!>",1),Py=te('<!> <div class="message__bot-options"><!> <div class="message__bot-actions"><!> <!> <!></div></div>',1),Ly=te('<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!></div> <!></div></div>'),My=te('<div class="message container"><div class="message__content"><!></div></div>');function Kf(t,e){var m,y,g,b,w,I,S;Re(e,!0);const r=$t(),n=()=>bt(Ta,"$config",r),o=()=>bt(Ur,"$t",r);let a=x(e,"message",7),i=x(e,"onmessageupdate",7),s=x(e,"classification",7);const c={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:Wf};a().type==="bot-loading"&&(c.delay+=Number((b=n().theme.components.message.custom)==null?void 0:b.transitionBotLoadingDelay)||300);const l={duration:Number((w=n().theme.components.messageOptions.custom)==null?void 0:w.transitionDuration)||300,delay:Number((I=n().theme.components.messageOptions.custom)==null?void 0:I.transitionDelay)||0,y:Number((S=n().theme.components.messageOptions.custom)==null?void 0:S.transitionY)||30,ease:Wf};_t(()=>{var k;((k=a())==null?void 0:k.type)==="bot"&&a().partial&&i()()});var u=My(),d=N(u),f=N(d);{var v=k=>{var z=Ly(),L=N(z);Qt(L,{name:"avatar",class:"message__bot-avatar"});var V=ne(L,2),G=N(V),$=N(G);{var ee=ie=>{var Z=Ny(),D=U(Z);po(D,()=>a().message.html);var Y=ne(D,2);{var F=re=>{var pe=fo("...");T(re,pe)};de(Y,re=>{a().partial&&re(F)})}T(ie,Z)},fe=ie=>{var Z=se(),D=U(Z);{var Y=re=>{var pe=fo();ue(()=>qe(pe,o().messageBotLoading)),T(re,pe)},F=re=>{var pe=fo();ue(()=>qe(pe,`${o().messageBotError??""} ${a().message??o().messageBotDefaultError??""}`)),T(re,pe)};de(D,re=>{a().type==="bot-loading"?re(Y):re(F,!1)},!0)}T(ie,Z)};de($,ie=>{a().type==="bot"?ie(ee):ie(fe,!1)})}O(G);var C=ne(G,2);{var Ee=ie=>{var Z=se(),D=U(Z);{var Y=F=>{var re=Py(),pe=U(re);{var ze=rt=>{rf(rt,{})};de(pe,rt=>{s()&&s().enabled&&rt(ze)})}var Pe=ne(pe,2),Ze=N(Pe);{var Je=rt=>{Gf(rt,{get sources(){return a().sources},class:"message__bot-references"})};de(Ze,rt=>{a().sources&&a().sources.used.length&&rt(Je)})}var Ue=ne(Ze,2),W=N(Ue);bc(W,{vote:"positive",class:"message__bot-action transition-colors"});var Ae=ne(W,2);bc(Ae,{vote:"negative",class:"message__bot-action transition-colors"});var ct=ne(Ae,2);Hf(ct,{class:"message__bot-action transition-colors"}),O(Ue),O(Pe),Br(3,Pe,()=>Io,()=>l),T(F,re)};de(D,F=>{a().partial||F(Y)})}T(ie,Z)};de(C,ie=>{a().type==="bot"&&ie(Ee)})}O(V),O(z),T(k,z)},h=k=>{var z=se(),L=U(z);{var V=G=>{var $=fo();ue(()=>qe($,a().message)),T(G,$)};de(L,G=>{a().type==="user"&&G(V)},!0)}T(k,z)};de(f,k=>{a().type==="bot"||a().type==="bot-loading"||a().type==="bot-error"?k(v):k(h,!1)})}return O(d),O(u),ue(()=>{zr(u,"message--bot",a().type==="bot"),zr(u,"message--bot-loading",a().type==="bot-loading"),zr(u,"message--bot-error",a().type==="bot-error"),zr(u,"message--user",a().type==="user")}),Br(3,u,()=>Io,()=>c),T(t,u),Ie({get message(){return a()},set message(k){a(k),_()},get onmessageupdate(){return i()},set onmessageupdate(k){i(k),_()},get classification(){return s()},set classification(k){s(k),_()}})}Oe(Kf,{message:{},onmessageupdate:{},classification:{}},[],[],!0);let ls;function Dy(t,e,r,n,o){ls&&cancelAnimationFrame(ls);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),d=o(u),f=a+(e-a)*d;t instanceof Window?window.scrollTo({top:f,behavior:"instant"}):t[n]=f,u<1?ls=requestAnimationFrame(s):t.dispatchEvent(new CustomEvent("scrollcomplete"))}ls=requestAnimationFrame(s)}var zy=te('<div class="chat-page__footer-text fly-in" style="--fly-in-id: 3"><!></div>'),Fy=te('<section class="chat-page"><div class="chat-page__body"><div class="chat-page__messages"><!> <button class="chat-page__new-conversation btn btn--tertiary"> </button></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 By={hash:"svelte-1dpsa7g",code:":host {--chat-footer-height: 0px;}"};function Yf(t,e){Re(e,!0),_i(t,By);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"history",7),a=x(e,"onSubmit",7),i=x(e,"onStartNewConversation",7),s=x(e,"classification",7),c=we(!1),l=we(!1),u,d,f,v=we(0);const h=50,m=()=>{A(v,xe(f.offsetHeight)),u.style.setProperty("--chat-footer-height",`${p(v)}px`)};_t(()=>{const F=new ResizeObserver(m);return F.observe(f),()=>F.disconnect()});const y=()=>{Dy(u,u.scrollHeight-u.clientHeight,1e3,"scrollTop",Oy)},g=()=>{const F=u.scrollHeight-u.scrollTop-u.clientHeight<h;A(l,!F)},b=()=>{g()},w=F=>{d.offsetHeight>u.offsetHeight&&(d.style.minHeight=`calc(${d.offsetHeight}px + 40cqh)`,requestAnimationFrame(()=>{y()})),a()(F)};_t(()=>{A(c,!0)});var I=Fy();dt("resize",Jo,b);var S=N(I),k=N(S),z=N(k);_r(z,17,o,Mr,(F,re)=>{Kf(F,{get message(){return p(re)},onmessageupdate:g,get classification(){return s()}})});var L=ne(z,2);L.__click=function(...F){var re;(re=i())==null||re.apply(this,F)};var V=N(L,!0);O(L),O(k),qr(k,F=>d=F,()=>d),O(S),qr(S,F=>u=F,()=>u);var G=ne(S,2),$=N(G),ee=N($);ee.__click=y;var fe=N(ee),C=N(fe,!0);O(fe);var Ee=ne(fe,2);Qt(Ee,{name:"chevronDown"}),O(ee);var ie=ne(ee,2),Z=N(ie);Vl(Z,{onSubmit:w,class:"chat-page__chat-input"}),O(ie);var D=ne(ie,2);{var Y=F=>{var re=zy(),pe=N(re);po(pe,()=>n().chatFooterText),O(re),T(F,re)};de(D,F=>{n().chatFooterText!==void 0&&F(Y)})}return O($),O(G),qr(G,F=>f=F,()=>f),O(I),ue(()=>{qe(V,n().newChat),zr(G,"mounted",p(c)),zr(ee,"chat-page__scroll-to-bottom--hidden",!p(l)),qe(C,n().scrollToBottom)}),dt("scroll",S,g),T(t,I),Ie({get history(){return o()},set history(F){o(F),_()},get onSubmit(){return a()},set onSubmit(F){a(F),_()},get onStartNewConversation(){return i()},set onStartNewConversation(F){i(F),_()},get classification(){return s()},set classification(F){s(F),_()}})}Mn(["click"]),Oe(Yf,{history:{},onSubmit:{},onStartNewConversation:{},classification:{}},[],[],!0);var qy=te("<strong> </strong>"),$y=te('<div class="line-clamp line-clamp--12"> </div>'),jy=te('<div class="reference-number__domain transition-colors"><span class="truncate"> </span></div>'),Zy=te('<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>'),Uy=te('<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>');function Hy(t,e){var k,z,L;Re(e,!0);const r=$t(),n=()=>bt(Ta,"$config",r),o=()=>bt(Ur,"$t",r);let a=x(e,"usedNumber",7),i=x(e,"source",7),s=we(!1),c,l,u=we(void 0);const d=i(),f={duration:Number((k=n().theme.components.referenceNumberContent.custom)==null?void 0:k.transitionDuration)||200,delay:Number((z=n().theme.components.referenceNumberContent.custom)==null?void 0:z.transitionDelay)||0,y:Number((L=n().theme.components.referenceNumberContent.custom)==null?void 0:L.transitionY)||10},v=async()=>{if(!l||!p(u))return;const{x:V,y:G}=await Sd(l,p(u),{placement:"top",middleware:[_d(8),xd(),kd({padding:8})]});Object.assign(p(u).style,{left:`${V}px`,top:`${G}px`})},h=()=>{c&&(clearTimeout(c),c=void 0)},m=()=>{h(),c=setTimeout(()=>{A(s,!1)},100)},y=()=>{h(),A(s,!0)};_t(()=>{p(s)&&v()});var g=Uy(),b=N(g),w=N(b,!0);O(b),qr(b,V=>l=V,()=>l);var I=ne(b,2);{var S=V=>{var G=Zy(),$=N(G),ee=N($);{var fe=D=>{var Y=qy(),F=N(Y,!0);O(Y),ue(()=>qe(F,d.title)),T(D,Y)};de(ee,D=>{d.title&&D(fe)})}var C=ne(ee,2);{var Ee=D=>{var Y=$y(),F=N(Y,!0);O(Y),ue(()=>qe(F,d.generated.summary)),T(D,Y)};de(C,D=>{d.generated.summary&&D(Ee)})}var ie=ne(C,2);{var Z=D=>{var Y=jy(),F=N(Y),re=N(F,!0);O(F),O(Y),ue(()=>qe(re,d.url)),T(D,Y)};de(ie,D=>{d.url&&D(Z)})}O($),O(G),qr(G,D=>A(u,D),()=>p(u)),ue(()=>Te($,"href",d.url)),dt("mouseenter",G,y),dt("mouseleave",G,m),Br(3,G,()=>Io,()=>f),T(V,G)};de(I,V=>{p(s)&&V(S)})}return O(g),ue(()=>{Te(b,"href",d.url),Te(b,"aria-label",`${o().referenceLink??""}: ${d.title??""}`),qe(w,a())}),dt("mouseenter",b,y),dt("mouseleave",b,m),dt("focus",b,()=>A(s,!0)),dt("blur",b,()=>A(s,!1)),T(t,g),Ie({get usedNumber(){return a()},set usedNumber(V){a(V),_()},get source(){return i()},set source(V){i(V),_()}})}customElements.define("liipgpt-reference-number",Oe(Hy,{source:{attribute:"data-source",type:"Object"},refNumber:{attribute:"data-ref-number",type:"String"},usedNumber:{attribute:"data-used-number",type:"String"}},[],[],!1));var Vy=te('<div><!> <h1 class="introduction__title"><!></h1></div>');function Qf(t,e){Re(e,!0);const r=$t(),n=()=>bt(Ur,"$t",r);let o=x(e,"class",7);var a=Vy(),i=N(a);Qt(i,{name:"avatar",class:"introduction__avatar"});var s=ne(i,2),c=N(s);return po(c,()=>n().introductionTitle),O(s),O(a),ue(()=>kr(a,`introduction ${o()??""}`)),T(t,a),Ie({get class(){return o()},set class(l){o(l),_()}})}Oe(Qf,{class:{}},[],[],!0);var Gy=(t,e,r)=>e()(r().question),Wy=te('<button class="predefined-question transition-colors" tabindex="0"><!> </button>');function Jf(t,e){Re(e,!0);let r=x(e,"onSubmit",7),n=x(e,"predefinedQuestion",7);var o=Wy();o.__click=[Gy,r,n];var a=N(o);Qt(a,{name:"predefinedQuestion",class:"predefined-question__icon transition-colors"});var i=ne(a);return O(o),ue(()=>qe(i,` ${n().label??n().question??""}`)),T(t,o),Ie({get onSubmit(){return r()},set onSubmit(s){r(s),_()},get predefinedQuestion(){return n()},set predefinedQuestion(s){n(s),_()}})}Mn(["click"]),Oe(Jf,{onSubmit:{},predefinedQuestion:{}},[],[],!0);var Ky=te("<div></div>");function Xf(t,e){Re(e,!0);let r=x(e,"predefinedQuestions",7),n=x(e,"onSubmit",7),o=x(e,"class",7),a=xr(e,["$$slots","$$events","$$legacy","$$host","predefinedQuestions","onSubmit","class"]);var i=Ky();let s;return _r(i,21,r,Mr,(c,l)=>{Jf(c,{get predefinedQuestion(){return p(l)},get onSubmit(){return n()}})}),O(i),ue(()=>s=qt(i,s,{class:`predefined-questions ${o()??""}`,...a})),T(t,i),Ie({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),_()}})}Oe(Xf,{predefinedQuestions:{},onSubmit:{},class:{}},[],[],!0);var Yy=te('<section class="start-page container"><!> <!> <!></section>');function eh(t,e){Re(e,!0);let r=x(e,"predefinedQuestions",7),n=x(e,"onSubmit",7),o=we(!1);_t(()=>{A(o,!0)});var a=Yy(),i=N(a);Qf(i,{class:"start-page__introduction fly-in"});var s=ne(i,2);Vl(s,{get onSubmit(){return n()},class:"start-page__chat-input fly-in",style:"--fly-in-id: 1;"});var c=ne(s,2);{var l=u=>{Xf(u,{get predefinedQuestions(){return r()},get onSubmit(){return n()},class:"start-page__predefined-questions fly-in",style:"--fly-in-id: 2;"})};de(c,u=>{r()&&r().length&&u(l)})}return O(a),ue(()=>zr(a,"mounted",p(o))),T(t,a),Ie({get predefinedQuestions(){return r()},set predefinedQuestions(u){r(u),_()},get onSubmit(){return n()},set onSubmit(u){n(u),_()}})}Oe(eh,{predefinedQuestions:{},onSubmit:{}},[],[],!0);const Qy=(t,e)=>{if(globalThis.document){const r=document.createElement("style");r.innerHTML=t||"",e.appendChild(r)}},Jy=[{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:
561
561
 
562
562
  - A report on projects that received recognition, highlighting customer satisfaction and product feedback[^1].
563
563
  - A blog post discussing the data-centric landscape and various data processing solutions[^2].
@@ -1066,6 +1066,6 @@ Subscribe to blog updates using the RSS Feed.`},usedNumber:6}]}}];let th,rh;func
1066
1066
  -o-transition: none !important;
1067
1067
  -ms-transition: none !important;
1068
1068
  transition: none !important;
1069
- }`);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(),th=window.setTimeout(()=>{t(),rh=window.setTimeout(o,120)},120)}function oh(t){return t.filter(e=>e.length>0)}const ah={getItem:t=>null,setItem:(t,e)=>{}},Tn=typeof document<"u",tw=["dark","light","system"],yc=Zt("mode-watcher-mode"),wc=Zt("mode-watcher-theme"),ih=nw(),_c=aw(),sh=Zt(void 0),lh=ow(),kc=Zt(!0),ch=Zt([]),uh=Zt([]),dh=iw(),rw=sw();function nw(){const t="system",e=Tn?localStorage:ah,r=e.getItem(o());let n=xc(r)?r:t;function o(){return xa(yc)}const{subscribe:a,set:i}=Zt(n,()=>{if(!Tn)return;const c=l=>{if(l.key!==o())return;const u=l.newValue;xc(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 ow(){const t=Tn?localStorage:ah,e=t.getItem(n());let r=e??"";function n(){return xa(wc)}const{subscribe:o,set:a}=Zt(r,()=>{if(!Tn)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 aw(){let e=!0;const{subscribe:r,set:n}=Zt(void 0,()=>{if(!Tn)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(!Tn)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 iw(){const{subscribe:t}=Xu([ih,_c,sh,kc,ch,uh],([e,r,n,o,a,i])=>{if(!Tn)return;const s=e==="system"?r:e,c=oh(a),l=oh(i);function u(){const d=document.documentElement,f=document.querySelector('meta[name="theme-color"]');s==="light"?(c.length&&d.classList.remove(...c),l.length&&d.classList.add(...l),d.style.colorScheme="light",f&&n&&f.setAttribute("content",n.light)):(l.length&&d.classList.remove(...l),c.length&&d.classList.add(...c),d.style.colorScheme="dark",f&&n&&f.setAttribute("content",n.dark))}return o?nh(u):u(),s});return{subscribe:t}}function sw(){const{subscribe:t}=Xu([lh,kc],([e,r])=>{if(!Tn)return;function n(){document.documentElement.setAttribute("data-theme",e)}return r?nh(n):n(),e});return{subscribe:t}}function xc(t){return typeof t!="string"?!1:tw.includes(t)}function lw(t){ih.set(t)}function cw(t){lh.set(t)}function Kw(t){return t}function uw({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 d=document.querySelector('meta[name="theme-color"]');d&&d.setAttribute("content",c==="light"?e.light:e.dark)}l&&(s.setAttribute("data-theme",l),localStorage.setItem(i,l)),localStorage.setItem(a,c)}var dw=J('<meta name="theme-color">');function fh(t,e){Ae(e,!1);let r=x(e,"themeColors",28,()=>{});po();var n=ie(),o=U(n);{var a=i=>{var s=dw();le(()=>Ce(s,"content",r().dark)),T(i,s)};fe(o,i=>{r()&&i(a)})}return T(t,n),Re({get themeColors(){return r()},set themeColors(i){r(i),_()}})}Ie(fh,{themeColors:{}},[],[],!0);var fw=J('<meta name="theme-color">'),hw=J("<!> <!>",1);function hh(t,e){Ae(e,!1);let r=x(e,"trueNonce",12,""),n=x(e,"initConfig",12),o=x(e,"themeColors",28,()=>{});return po(),Cp(a=>{var i=hw(),s=U(i);{var c=u=>{var d=fw();le(()=>Ce(d,"content",o().dark)),T(u,d)};fe(s,u=>{o()&&u(c)})}var l=se(s,2);ho(l,()=>`<script${r()?` nonce=${r()}`:""}>(`+uw.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),_()}})}Ie(hh,{trueNonce:{},initConfig:{},themeColors:{}},[],[],!0);function pw(t,e){Ae(e,!1);const r=$t(),n=()=>vt(yc,"$modeStorageKeyStore",r),o=()=>vt(wc,"$themeStorageKeyStore",r),a=He();let i=x(e,"track",12,!0),s=x(e,"defaultMode",12,"system"),c=x(e,"themeColors",28,()=>{}),l=x(e,"disableTransitions",12,!0),u=x(e,"darkClassNames",28,()=>["dark"]),d=x(e,"lightClassNames",28,()=>[]),f=x(e,"defaultTheme",12,""),v=x(e,"nonce",12,""),h=x(e,"themeStorageKey",12,"mode-watcher-theme"),m=x(e,"modeStorageKey",12,"mode-watcher-mode"),y=x(e,"disableHeadScriptInjection",12,!1);xi(()=>{const k=dh.subscribe(()=>{}),M=rw.subscribe(()=>{});_c.tracking(i()),_c.query();const L=localStorage.getItem(n());lw(xc(L)?L:s());const G=localStorage.getItem(o());return cw(G||f()),()=>{k(),M()}});const g={defaultMode:s(),themeColors:c(),darkClassNames:u(),lightClassNames:d(),defaultTheme:f(),modeStorageKey:m(),themeStorageKey:h()};$e(()=>Ze(l()),()=>{kc.set(l())}),$e(()=>Ze(c()),()=>{sh.set(c())}),$e(()=>Ze(u()),()=>{ch.set(u())}),$e(()=>Ze(d()),()=>{uh.set(d())}),$e(()=>Ze(m()),()=>{yc.set(m())}),$e(()=>Ze(h()),()=>{wc.set(h())}),$e(()=>Ze(v()),()=>{R(a,typeof window>"u"?v():"")}),Qs(),po();var b=ie(),w=U(b);{var I=k=>{fh(k,{get themeColors(){return c()}})},S=k=>{hh(k,{get trueNonce(){return p(a)},initConfig:g,get themeColors(){return c()}})};fe(w,k=>{y()?k(I):k(S,!1)})}return T(t,b),Re({get track(){return i()},set track(k){i(k),_()},get defaultMode(){return s()},set defaultMode(k){s(k),_()},get themeColors(){return c()},set themeColors(k){c(k),_()},get disableTransitions(){return l()},set disableTransitions(k){l(k),_()},get darkClassNames(){return u()},set darkClassNames(k){u(k),_()},get lightClassNames(){return d()},set lightClassNames(k){d(k),_()},get defaultTheme(){return f()},set defaultTheme(k){f(k),_()},get nonce(){return v()},set nonce(k){v(k),_()},get themeStorageKey(){return h()},set themeStorageKey(k){h(k),_()},get modeStorageKey(){return m()},set modeStorageKey(k){m(k),_()},get disableHeadScriptInjection(){return y()},set disableHeadScriptInjection(k){y(k),_()}})}Ie(pw,{track:{},defaultMode:{},themeColors:{},disableTransitions:{},darkClassNames:{},lightClassNames:{},defaultTheme:{},nonce:{},themeStorageKey:{},modeStorageKey:{},disableHeadScriptInjection:{}},[],[],!0);const gw='@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%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;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-feature-settings:theme("fontFamily.sans[1].fontFeatureSettings",normal);font-variation-settings:theme("fontFamily.sans[1].fontVariationSettings",normal);-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:theme("fontFamily.mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:theme("fontFamily.mono[1].fontFeatureSettings",normal);font-variation-settings:theme("fontFamily.mono[1].fontVariationSettings",normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-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{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:theme("colors.gray.400",#9ca3af)}input::placeholder,textarea::placeholder{opacity:1;color:theme("colors.gray.400",#9ca3af)}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{height:100%;container-type:inline-size;container-name:chat-app;font-family:var(--font-family);font-optical-sizing:auto;font-weight:var(--font-weight-normal);font-style:normal;font-size:var(--font-body);line-height:var(--line-height-default);color:var(--body-color);background:var(--body-background);transform:scale(1)}.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,textarea){width:100%;color:var(--input-color);background:var(--input-background);border-width:var(--input-border-width);border-color:var(--input-border-color);border-radius:var(--input-border-radius);box-shadow:var(--input-box-shadow, none);padding:var(--input-padding)}.chat-app :where(input,textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input,textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(*:focus-visible){outline-style:solid;border-radius:var(--spacer-8);outline-width:var(--spacer-3);outline-color:var(--body-focus-color);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{color:var(--body-selection-color);background:var(--body-selection-background)}.chat-app *::selection{color:var(--body-selection-color);background:var(--body-selection-background)}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";position:absolute;bottom:0;left:0;right:0;top:0;background-color:transparent}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.chat-app :where(.transition-colors){transition-property:color,background-color,border-color,box-shadow;transition-duration:var(--default-transition-duration);transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){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-duration:var(--default-transition-duration);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);opacity:0;transform:translateY(var(--fly-in-y));transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-delay:0s,1s;transition-timing-function:ease,var(--ease-out-quart)}.mounted :is(.chat-app :where(.fly-in)){opacity:1;transform:translateY(0);transition-duration:var(--fly-in-duration);transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional))}.chat-app :where(.truncate){display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-app :where(.line-clamp){overflow:hidden;display:-webkit-box;-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;padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@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){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;left:0;top:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)){color:var(--anchor-color);text-decoration:underline;text-underline-offset:.15em;transition-property:color;transition-duration:var(--default-transition-duration);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;border-style:solid;padding:var(--spacer-r-8) var(--spacer-r-20);font-size:var(--font-sm);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-duration:var(--default-transition-duration);transition-timing-function:var(--default-transition-timing-function)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn--primary{color:var(--btn-primary-color);background:var(--btn-primary-background);border-width:var(--btn-primary-border-width);border-color:var(--btn-primary-border-color);border-radius:var(--btn-primary-border-radius);box-shadow:var(--btn-primary-box-shadow)}.btn--primary:hover{color:var(--btn-primary-hover-color, var(--btn-primary-color));background:var(--btn-primary-hover-background, var(--btn-primary-background));border-width:var(--btn-primary-hover-border-width, var(--btn-primary-border-width));border-color:var(--btn-primary-hover-border-color, var(--btn-primary-border-color));border-radius:var(--btn-primary-hover-border-radius, var(--btn-primary-border-radius));box-shadow:var(--btn-primary-hover-box-shadow, var(--btn-primary-box-shadow))}.btn--secondary{color:var(--btn-secondary-color);background:var(--btn-secondary-background);border-width:var(--btn-secondary-border-width);border-color:var(--btn-secondary-border-color);border-radius:var(--btn-secondary-border-radius);box-shadow:var(--btn-secondary-box-shadow)}.btn--secondary:hover{color:var(--btn-secondary-hover-color, var(--btn-secondary-color));background:var(--btn-secondary-hover-background, var(--btn-secondary-background));border-width:var(--btn-secondary-hover-border-width, var(--btn-secondary-border-width));border-color:var(--btn-secondary-hover-border-color, var(--btn-secondary-border-color));border-radius:var(--btn-secondary-hover-border-radius, var(--btn-secondary-border-radius));box-shadow:var(--btn-secondary-hover-box-shadow, var(--btn-secondary-box-shadow))}.btn--tertiary{color:var(--btn-tertiary-color);background:var(--btn-tertiary-background);border-width:var(--btn-tertiary-border-width);border-color:var(--btn-tertiary-border-color);border-radius:var(--btn-tertiary-border-radius);box-shadow:var(--btn-tertiary-box-shadow)}.btn--tertiary:hover{color:var(--btn-tertiary-hover-color, var(--btn-tertiary-color));background:var(--btn-tertiary-hover-background, var(--btn-tertiary-background));border-width:var(--btn-tertiary-hover-border-width, var(--btn-tertiary-border-width));border-color:var(--btn-tertiary-hover-border-color, var(--btn-tertiary-border-color));border-radius:var(--btn-tertiary-hover-border-radius, var(--btn-tertiary-border-radius));box-shadow:var(--btn-tertiary-hover-box-shadow, var(--btn-tertiary-box-shadow))}}@layer components{.form{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacer-r-20)}.form__item{display:flex;flex-direction:column;gap:var(--spacer-5);width:100%}.form__label{color:var(--label-color, inherit);font-weight:var(--label-font-weight, inherit)}}@layer components{.chat-input{position:relative}.chat-input__textarea{display:block;box-sizing:border-box;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em 1.2em;color:var(--chat-input-color);background:var(--chat-input-background);border-style:solid;border-width:var(--chat-input-border-width);border-color:var(--chat-input-border-color);border-radius:var(--chat-input-border-radius);box-shadow:var(--chat-input-box-shadow);resize:none}.chat-input__textarea:focus-visible{color:var(--chat-input-focus-color, var(--chat-input-focus-color));background:var(--chat-input-focus-background, var(--chat-input-background));border-width:var(--chat-input-focus-border-width, var(--chat-input-border-width));border-color:var(--chat-input-focus-border-color, var(--chat-input-border-color));border-radius:var(--chat-input-focus-border-radius, var(--chat-input-border-radius));box-shadow:var(--chat-input-focus-box-shadow, var(--chat-input-box-shadow));outline-color:transparent}@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;align-items:center;justify-content:center;width:var(--spacer-40);height:var(--spacer-40);position:absolute;bottom:calc(var(--margin) + var(--chat-input-border-width, 0px));right:calc(var(--margin) + var(--chat-input-border-width, 0px));color:var(--chat-input-submit-color);font-size:0;background:var(--chat-input-submit-background);border-width:var(--chat-input-submit-border-width, 0px);border-color:var(--chat-input-submit-border-color);border-radius:var(--chat-input-submit-border-radius);box-shadow:var(--chat-input-submit-box-shadow);transition-property:opacity,background-color,transform;transition-duration:.2s,.2s,.35s;transition-timing-function:ease;cursor:pointer}.chat-input__submit-button:hover{color:var(--chat-input-submit-hover-color, var(--chat-input-submit-color));background:var(--chat-input-submit-hover-background, var(--chat-input-submit-background));border-width:var(--chat-input-submit-hover-border-width, var(--chat-input-submit-border-width));border-color:var(--chat-input-submit-hover-border-color, var(--chat-input-submit-border-color));border-radius:var(--chat-input-submit-hover-border-radius, var(--chat-input-submit-border-radius));box-shadow:var(--chat-input-submit-hover-box-shadow, var(--chat-input-submit-box-shadow))}@container chat-app (min-width: 640px){.chat-input__submit-button{--margin: var(--spacer-12)}}.chat-input__submit-button--deactivated{background:var(--chat-input-submit-deactivated-background, var(--chat-input-submit-background));opacity:var(--chat-input-submit-deactivated-opacity, .5);transform:scale(var(--chat-input-submit-deactivated-scale, .8));cursor:default;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)}}@media (--screen-lg){.chat-menu{top:auto;right:var(--spacer-16);bottom:var(--spacer-16)}}.chat-menu__trigger{padding:var(--spacer-4)}.chat-menu__trigger:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.chat-menu__content{width:95vw;max-width:300px;padding:var(--spacer-r-12);position:absolute;z-index:100;background:var(--chat-menu-background);border-style:solid;border-width:var(--chat-menu-border-width);border-color:var(--chat-menu-border-color);border-radius:var(--chat-menu-border-radius);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;gap:var(--spacer-4);width:100%;padding:var(--spacer-4);color:var(--chat-menu-item-color);border-radius:var(--chat-menu-item-border-radius);background:var(--chat-menu-item-background)}.chat-menu__item:hover{color:var(--chat-menu-item-hover-color);background:var(--chat-menu-item-hover-background)}.chat-menu__item.active{color:var(--chat-menu-item-active-color);background:var(--chat-menu-item-active-background)}.chat-menu__item-icon{width:1em;height:1em;color:currentColor}.chat-menu__title{font-size:var(--font-small);color:var(--chat-menu-title-color);margin-bottom:var(--spacer-8)}.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{height:100%;position:relative;overflow:hidden}.chat-page__body{height:100%;overflow-y:auto;scrollbar-gutter:stable;padding-top:var(--spacer-48)}.chat-page__messages{display:flex;flex-direction:column;gap:var(--spacer-r-40);min-height:100%}.chat-page__footer{position:fixed;bottom:0;right:0;left:0}.chat-page__footer-content{display:flex;flex-direction:column;gap:var(--spacer-r-8);padding-bottom:var(--spacer-r-8);color:var(--chat-footer-color);background:var(--chat-footer-background);border-style:solid;border-width:var(--chat-footer-border-width);border-color:var(--chat-footer-border-color);border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);box-shadow:var(--chat-footer-box-shadow)}.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__new-conversation{align-self:center;margin-top:auto;margin-bottom:calc(var(--chat-footer-height) + var(--spacer-r-40))}.chat-page__scroll-to-bottom{padding:var(--spacer-4);position:absolute;top:0;left:50%;transform:translate(-50%,-150%);opacity:1}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0}}@layer components{.dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:var(--dialog-background-overlay)}.dialog-content{width:calc(100% - var(--spacer-32));max-width:600px;background:var(--dialog-background);border-width:var(--dialog-border-width);border-color:var(--dialog-border-color);border-radius:var(--dialog-border-radius);position:fixed;left:50%;top:50%;z-index:51;box-shadow:var(--dialog-box-shadow, none);transform:translate(-50%,-50%)}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color, var(--dialog-border-color));font-size:var(--dialog-header-font-size, inherit);font-weight:var(--dialog-header-font-weight, 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;gap:var(--spacer-r-16);justify-content:center}.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--user{justify-content:flex-end}.message--user :where(.message__content){padding:var(--spacer-8) var(--spacer-16);color:var(--message-user-color);background:var(--message-user-background);border-width:var(--message-user-border-width);border-color:var(--message-user-border-color);border-radius:var(--message-user-border-radius);box-shadow:var(--message-user-box-shadow)}.message--bot-error{color:var(--message-error-color)}}.message__bot-layout{display:flex;gap:var(--spacer-r-16)}.message__bot-avatar{flex-shrink:0;position:sticky;top:var(--spacer-r-16);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-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;margin-top:var(--spacer-32);padding-top:0;min-height:var(--spacer-64)}}@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;right:0;top:var(--spacer-20);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;gap:var(--spacer-r-12);padding:var(--spacer-r-16);color:var(--card-color);text-align:left;background:var(--card-background);border-width:var(--card-border-width);border-color:var(--card-border-color);border-radius:var(--card-border-radius);box-shadow:var(--card-box-shadow, none);cursor:pointer}.predefined-question:hover{color:var(--card-hover-color, var(--card-color));background:var(--card-hover-background, var(--card-background));border-width:var(--card-hover-border-width, var(--card-border-width));border-color:var(--card-hover-border-color, var(--card-border-color));border-radius:var(--card-hover-border-radius, var(--card-border-radius));box-shadow:var(--card-hover-box-shadow, var(--card-box-shadow), none)}.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;gap:var(--spacer-r-12);width:100%}@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{display:inline-block;height:1.5em;min-width:1.5em;padding:1px .4em 0;margin:0 .1em;box-sizing:border-box;position:relative;top:-1px;font-size:var(--font-xs);font-weight:var(--font-weight-bold);color:var(--reference-number-trigger-color);text-align:center;text-decoration:none;background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);border-width:var(--reference-number-trigger-border-width);border-color:var(--reference-number-trigger-border-color);border-radius:var(--reference-number-trigger-border-radius);cursor:pointer}.reference-number__trigger:hover{color:var(--reference-number-trigger-hover-color);background:var(--reference-number-trigger-hover-background)}.reference-number__trigger:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.reference-number__content-wrapper{width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width);position:absolute;z-index:102}.reference-number__content{display:block;padding:var(--spacer-r-20);background:var(--reference-number-content-background);border-style:solid;border-width:var(--reference-number-content-border-width);border-color:var(--reference-number-content-border-color);border-radius:var(--reference-number-content-border-radius);box-shadow:var(--reference-number-content-box-shadow)}.reference-number__content:hover{color:var(--reference-number-content-hover-color, var(--reference-number-content-color));background:var(--reference-number-content-hover-background, var(--reference-number-content-background));border-width:var(--reference-number-content-hover-border-width, var(--reference-number-content-border-width));border-color:var(--reference-number-content-hover-border-color, var(--reference-number-content-border-color));border-radius:var(--reference-number-content-hover-border-radius, var(--reference-number-content-border-radius));cursor:pointer}.reference-number__content:hover :where(.reference-number__domain){color:var(--reference-number-domain-hover-color, var(--reference-number-domain-color));background:var(--reference-number-domain-hover-background, var(--reference-number-domain-background))}.reference-number__content:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference-number__content:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.reference-number__domain{display:inline-flex;max-width:100%;padding:var(--spacer-2) var(--spacer-10);margin-top:var(--spacer-8);color:var(--reference-number-domain-color);background:var(--reference-number-domain-background);font-size:var(--font-xs);font-weight:700;border-width:var(--reference-number-domain-border-width);border-color:var(--reference-number-domain-border-color);border-radius:var(--reference-number-domain-border-radius);box-shadow:var(--reference-number-domain-box-shadow)}@media (--screen-lg){.reference-number__domain{max-width:50%}}}@layer components{.reference{display:flex;gap:var(--spacer-12);padding:var(--spacer-12) var(--spacer-12) var(--spacer-16) var(--spacer-16);color:var(--reference-color);background:var(--reference-background);border-width:var(--reference-border-width);border-color:var(--reference-border-color);border-radius:var(--reference-border-radius);box-shadow:var(--reference-box-shadow);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{color:var(--reference-hover-color, var(--reference-color));background:var(--reference-hover-background, var(--reference-background));border-width:var(--reference-hover-border-width, var(--reference-border-width));border-color:var(--reference-hover-border-color, var(--reference-border-color));border-radius:var(--reference-hover-border-radius, var(--reference-border-radius));box-shadow:var(--reference-hover-box-shadow, var(--reference-box-shadow), none)}.reference:hover :where(.reference__number){color:var(--reference-number-trigger-hover-color)}.reference:hover :where(.reference__domain){color:var(--reference-domain-hover-color, var(--reference-domain-color));background:var(--reference-domain-hover-background, var(--reference-domain-background));border-width:var(--reference-domain-hover-border-width, var(--reference-domain-border-width));border-color:var(--reference-domain-hover-border-color, var(--reference-domain-border-color));border-radius:var(--reference-domain-hover-border-radius, var(--reference-domain-border-radius));box-shadow:var(--reference-domain-hover-box-shadow, var(--reference-domain-box-shadow))}.reference:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference__number{display:block;color:var(--reference-number-trigger-color);font-weight:700;min-width:.9em}.reference__body,.reference__domain{min-width:0}.reference__body{display:flex;flex-direction:column;align-items:flex-start;flex-grow:1;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);color:var(--reference-domain-color);background:var(--reference-domain-background);font-size:var(--font-xs);font-weight:700;border-width:var(--reference-domain-border-width);border-color:var(--reference-domain-border-color);border-radius:var(--reference-domain-border-radius);box-shadow:var(--reference-domain-box-shadow)}@container chat-app (min-width: 1024px){.reference__domain{max-width:50%}}.reference__icon{flex-shrink:0;align-self:flex-end;position:relative;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;gap:var(--spacer-8);padding-top: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;gap:var(--spacer-8);width:100%;padding:var(--spacer-r-16);color:var(--toast-color);background:var(--toast-background);border-width:var(--toast-border-width, 1px);border-color:var(--toast-border-color, transparent);border-radius:var(--toast-border-radius);box-shadow:var(--toast-box-shadow)}.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{position:relative;display:inline-block}.tooltip{padding:var(--spacer-3) var(--spacer-8);position:absolute;z-index:10;background:var(--tooltip-background);color:var(--tooltip-color);border-radius:var(--tooltip-border-radius);font-size:var(--font-xs);white-space:nowrap;opacity:1;transform:translateY(0);transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1)}.tooltip:after{content:"";position:absolute;border-width:5px;border-style:solid}.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{opacity:0;transform:translateY(1rem);pointer-events:none}}@layer base,utilities,components;',Sc=t=>{window.history.pushState({},"",t),window.dispatchEvent(new Event("popstate"))};var mw=J('<link rel="stylesheet">'),vw=J('<div class="chat-app__animation-container svelte-l4zd7c"><div class="chat-app__animation svelte-l4zd7c"><!></div></div>'),bw=J('<div class="style-container" hidden><!></div> <!> <!>',1),yw=J('<div class="container">Loading...</div>'),ww=J('<main class="chat-app"><!> <!></main>');const _w={hash:"svelte-l4zd7c",code:".chat-app__animation-container.svelte-l4zd7c {height:100%;position:relative; /* Needed for absolute positioned fade-out. */}.chat-app__animation.svelte-l4zd7c {width:100%; /* Ensure full width during absolute positioned fade-out */height:100%;}"};function ph(t,e){Ae(e,!0),wi(t,_w);let r=x(e,"org",7),n=x(e,"apiUrl",7),o=x(e,"apiKey",7),a=x(e,"devChatHistory",7),i=x(e,"lang",7),s=ke(void 0),c=ke(xe(_a.Start));const l=new Pa({apiUrl:n(),apiKey:o()}),u=(S="light")=>{const{config:k,themeString:M}=td(r(),S);p(s).config=k,p(s).themeString=M,p(s).mode=S},d=async S=>{const k=await l.getUsedLanguages(),M=od(i());await tv(M,S);const L=await l.getPredefinedQuestions({url:window.location.href.replace(window.location.origin,""),language:M}),G=await l.getMenu({url:window.location.href.replace(window.location.origin,""),language:M}),W=await l.getClassification({url:window.location.href.replace(window.location.origin,"")}),$=await l.metadata,re="light",{config:de,themeString:C}=td(S,re);R(s,xe({usedLanguages:k,language:M,predefinedQuestions:L,menu:G,config:de,themeString:C,isInMaintenance:$.mode==="maintenance",history:a()?ew:[],mode:re,classification:W})),dh.subscribe(u)},f=S=>{const k=p(s).history.push({type:"user",time:new Date().toISOString(),message:S});l.chat(S).subscribe(M=>{M.state==="streaming"||M.state==="done"?p(s).history[k]=M.payload:M.state==="loading"&&(p(s).history[k]={type:"bot-loading",time:new Date().toISOString()})})},v=S=>{const k=new URLSearchParams(window.location.search);k.set(Ol,encodeURIComponent(S)),Sc(`?${k.toString()}`)},h=()=>{Sc("?")},m=()=>{const k=new URLSearchParams(window.location.search).get(Ol);k?(R(c,xe(_a.Chat)),p(s)&&!a()&&(p(s).history=[],requestAnimationFrame(()=>{f(decodeURIComponent(k))}))):R(c,xe(_a.Start))};wt(()=>{m()});const y=S=>{Xy(`${gw}
1069
+ }`);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(),th=window.setTimeout(()=>{t(),rh=window.setTimeout(o,120)},120)}function oh(t){return t.filter(e=>e.length>0)}const ah={getItem:t=>null,setItem:(t,e)=>{}},Tn=typeof document<"u",Xy=["dark","light","system"],yc=Zt("mode-watcher-mode"),wc=Zt("mode-watcher-theme"),ih=tw(),_c=nw(),sh=Zt(void 0),lh=rw(),kc=Zt(!0),ch=Zt([]),uh=Zt([]),dh=ow(),ew=aw();function tw(){const t="system",e=Tn?localStorage:ah,r=e.getItem(o());let n=xc(r)?r:t;function o(){return Sa(yc)}const{subscribe:a,set:i}=Zt(n,()=>{if(!Tn)return;const c=l=>{if(l.key!==o())return;const u=l.newValue;xc(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 rw(){const t=Tn?localStorage:ah,e=t.getItem(n());let r=e??"";function n(){return Sa(wc)}const{subscribe:o,set:a}=Zt(r,()=>{if(!Tn)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 nw(){let e=!0;const{subscribe:r,set:n}=Zt(void 0,()=>{if(!Tn)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(!Tn)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 ow(){const{subscribe:t}=Ju([ih,_c,sh,kc,ch,uh],([e,r,n,o,a,i])=>{if(!Tn)return;const s=e==="system"?r:e,c=oh(a),l=oh(i);function u(){const d=document.documentElement,f=document.querySelector('meta[name="theme-color"]');s==="light"?(c.length&&d.classList.remove(...c),l.length&&d.classList.add(...l),d.style.colorScheme="light",f&&n&&f.setAttribute("content",n.light)):(l.length&&d.classList.remove(...l),c.length&&d.classList.add(...c),d.style.colorScheme="dark",f&&n&&f.setAttribute("content",n.dark))}return o?nh(u):u(),s});return{subscribe:t}}function aw(){const{subscribe:t}=Ju([lh,kc],([e,r])=>{if(!Tn)return;function n(){document.documentElement.setAttribute("data-theme",e)}return r?nh(n):n(),e});return{subscribe:t}}function xc(t){return typeof t!="string"?!1:Xy.includes(t)}function iw(t){ih.set(t)}function sw(t){lh.set(t)}function Gw(t){return t}function lw({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 d=document.querySelector('meta[name="theme-color"]');d&&d.setAttribute("content",c==="light"?e.light:e.dark)}l&&(s.setAttribute("data-theme",l),localStorage.setItem(i,l)),localStorage.setItem(a,c)}var cw=te('<meta name="theme-color">');function fh(t,e){Re(e,!1);let r=x(e,"themeColors",28,()=>{});go();var n=se(),o=U(n);{var a=i=>{var s=cw();ue(()=>Te(s,"content",r().dark)),T(i,s)};de(o,i=>{r()&&i(a)})}return T(t,n),Ie({get themeColors(){return r()},set themeColors(i){r(i),_()}})}Oe(fh,{themeColors:{}},[],[],!0);var uw=te('<meta name="theme-color">'),dw=te("<!> <!>",1);function hh(t,e){Re(e,!1);let r=x(e,"trueNonce",12,""),n=x(e,"initConfig",12),o=x(e,"themeColors",28,()=>{});return go(),Ep(a=>{var i=dw(),s=U(i);{var c=u=>{var d=uw();ue(()=>Te(d,"content",o().dark)),T(u,d)};de(s,u=>{o()&&u(c)})}var l=ne(s,2);po(l,()=>`<script${r()?` nonce=${r()}`:""}>(`+lw.toString()+")("+JSON.stringify(n())+");<\/script>",!1,!1),T(a,i)}),Ie({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(hh,{trueNonce:{},initConfig:{},themeColors:{}},[],[],!0);function fw(t,e){Re(e,!1);const r=$t(),n=()=>bt(yc,"$modeStorageKeyStore",r),o=()=>bt(wc,"$themeStorageKeyStore",r),a=Ke();let i=x(e,"track",12,!0),s=x(e,"defaultMode",12,"system"),c=x(e,"themeColors",28,()=>{}),l=x(e,"disableTransitions",12,!0),u=x(e,"darkClassNames",28,()=>["dark"]),d=x(e,"lightClassNames",28,()=>[]),f=x(e,"defaultTheme",12,""),v=x(e,"nonce",12,""),h=x(e,"themeStorageKey",12,"mode-watcher-theme"),m=x(e,"modeStorageKey",12,"mode-watcher-mode"),y=x(e,"disableHeadScriptInjection",12,!1);Ti(()=>{const k=dh.subscribe(()=>{}),z=ew.subscribe(()=>{});_c.tracking(i()),_c.query();const L=localStorage.getItem(n());iw(xc(L)?L:s());const V=localStorage.getItem(o());return sw(V||f()),()=>{k(),z()}});const g={defaultMode:s(),themeColors:c(),darkClassNames:u(),lightClassNames:d(),defaultTheme:f(),modeStorageKey:m(),themeStorageKey:h()};Ve(()=>Ge(l()),()=>{kc.set(l())}),Ve(()=>Ge(c()),()=>{sh.set(c())}),Ve(()=>Ge(u()),()=>{ch.set(u())}),Ve(()=>Ge(d()),()=>{uh.set(d())}),Ve(()=>Ge(m()),()=>{yc.set(m())}),Ve(()=>Ge(h()),()=>{wc.set(h())}),Ve(()=>Ge(v()),()=>{A(a,typeof window>"u"?v():"")}),Xs(),go();var b=se(),w=U(b);{var I=k=>{fh(k,{get themeColors(){return c()}})},S=k=>{hh(k,{get trueNonce(){return p(a)},initConfig:g,get themeColors(){return c()}})};de(w,k=>{y()?k(I):k(S,!1)})}return T(t,b),Ie({get track(){return i()},set track(k){i(k),_()},get defaultMode(){return s()},set defaultMode(k){s(k),_()},get themeColors(){return c()},set themeColors(k){c(k),_()},get disableTransitions(){return l()},set disableTransitions(k){l(k),_()},get darkClassNames(){return u()},set darkClassNames(k){u(k),_()},get lightClassNames(){return d()},set lightClassNames(k){d(k),_()},get defaultTheme(){return f()},set defaultTheme(k){f(k),_()},get nonce(){return v()},set nonce(k){v(k),_()},get themeStorageKey(){return h()},set themeStorageKey(k){h(k),_()},get modeStorageKey(){return m()},set modeStorageKey(k){m(k),_()},get disableHeadScriptInjection(){return y()},set disableHeadScriptInjection(k){y(k),_()}})}Oe(fw,{track:{},defaultMode:{},themeColors:{},disableTransitions:{},darkClassNames:{},lightClassNames:{},defaultTheme:{},nonce:{},themeStorageKey:{},modeStorageKey:{},disableHeadScriptInjection:{}},[],[],!0);const hw='@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%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;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-feature-settings:theme("fontFamily.sans[1].fontFeatureSettings",normal);font-variation-settings:theme("fontFamily.sans[1].fontVariationSettings",normal);-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:theme("fontFamily.mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:theme("fontFamily.mono[1].fontFeatureSettings",normal);font-variation-settings:theme("fontFamily.mono[1].fontVariationSettings",normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-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{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:theme("colors.gray.400",#9ca3af)}input::placeholder,textarea::placeholder{opacity:1;color:theme("colors.gray.400",#9ca3af)}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{height:100%;container-type:inline-size;container-name:chat-app;font-family:var(--font-family);font-optical-sizing:auto;font-weight:var(--font-weight-normal);font-style:normal;font-size:var(--font-body);line-height:var(--line-height-default);color:var(--body-color);background:var(--body-background);transform:scale(1)}.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%;color:var(--input-color);background:var(--input-background);border-width:var(--input-border-width);border-color:var(--input-border-color);border-radius:var(--input-border-radius);box-shadow:var(--input-box-shadow, none);padding:var(--input-padding)}.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){outline-style:solid;border-radius:var(--spacer-8);outline-width:var(--spacer-3);outline-color:var(--body-focus-color);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{color:var(--body-selection-color);background:var(--body-selection-background)}.chat-app *::selection{color:var(--body-selection-color);background:var(--body-selection-background)}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";position:absolute;bottom:0;left:0;right:0;top:0;background-color:transparent}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.chat-app :where(.transition-colors){transition-property:color,background-color,border-color,box-shadow;transition-duration:var(--default-transition-duration);transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){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-duration:var(--default-transition-duration);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);opacity:0;transform:translateY(var(--fly-in-y));transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-delay:0s,1s;transition-timing-function:ease,var(--ease-out-quart)}.mounted :is(.chat-app :where(.fly-in)){opacity:1;transform:translateY(0);transition-duration:var(--fly-in-duration);transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional))}.chat-app :where(.truncate){display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-app :where(.line-clamp){overflow:hidden;display:-webkit-box;-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;padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@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){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;left:0;top:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling)){color:var(--anchor-color);text-decoration:underline;text-underline-offset:.15em;transition-property:color;transition-duration:var(--default-transition-duration);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;border-style:solid;padding:var(--spacer-r-8) var(--spacer-r-20);font-size:var(--font-sm);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-duration:var(--default-transition-duration);transition-timing-function:var(--default-transition-timing-function)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn--primary{color:var(--btn-primary-color);background:var(--btn-primary-background);border-width:var(--btn-primary-border-width);border-color:var(--btn-primary-border-color);border-radius:var(--btn-primary-border-radius);box-shadow:var(--btn-primary-box-shadow)}.btn--primary:hover{color:var(--btn-primary-hover-color, var(--btn-primary-color));background:var(--btn-primary-hover-background, var(--btn-primary-background));border-width:var(--btn-primary-hover-border-width, var(--btn-primary-border-width));border-color:var(--btn-primary-hover-border-color, var(--btn-primary-border-color));border-radius:var(--btn-primary-hover-border-radius, var(--btn-primary-border-radius));box-shadow:var(--btn-primary-hover-box-shadow, var(--btn-primary-box-shadow))}.btn--secondary{color:var(--btn-secondary-color);background:var(--btn-secondary-background);border-width:var(--btn-secondary-border-width);border-color:var(--btn-secondary-border-color);border-radius:var(--btn-secondary-border-radius);box-shadow:var(--btn-secondary-box-shadow)}.btn--secondary:hover{color:var(--btn-secondary-hover-color, var(--btn-secondary-color));background:var(--btn-secondary-hover-background, var(--btn-secondary-background));border-width:var(--btn-secondary-hover-border-width, var(--btn-secondary-border-width));border-color:var(--btn-secondary-hover-border-color, var(--btn-secondary-border-color));border-radius:var(--btn-secondary-hover-border-radius, var(--btn-secondary-border-radius));box-shadow:var(--btn-secondary-hover-box-shadow, var(--btn-secondary-box-shadow))}.btn--tertiary{color:var(--btn-tertiary-color);background:var(--btn-tertiary-background);border-width:var(--btn-tertiary-border-width);border-color:var(--btn-tertiary-border-color);border-radius:var(--btn-tertiary-border-radius);box-shadow:var(--btn-tertiary-box-shadow)}.btn--tertiary:hover{color:var(--btn-tertiary-hover-color, var(--btn-tertiary-color));background:var(--btn-tertiary-hover-background, var(--btn-tertiary-background));border-width:var(--btn-tertiary-hover-border-width, var(--btn-tertiary-border-width));border-color:var(--btn-tertiary-hover-border-color, var(--btn-tertiary-border-color));border-radius:var(--btn-tertiary-hover-border-radius, var(--btn-tertiary-border-radius));box-shadow:var(--btn-tertiary-hover-box-shadow, var(--btn-tertiary-box-shadow))}}@layer components{.form{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacer-r-20)}.form__item{display:flex;flex-direction:column;gap:var(--spacer-5);width:100%}.form__label{color:var(--label-color, inherit);font-weight:var(--label-font-weight, inherit)}}@layer components{.chat-input{position:relative}.chat-input__textarea{display:block;box-sizing:border-box;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em 1.2em;color:var(--chat-input-color);background:var(--chat-input-background);border-style:solid;border-width:var(--chat-input-border-width);border-color:var(--chat-input-border-color);border-radius:var(--chat-input-border-radius);box-shadow:var(--chat-input-box-shadow);resize:none}.chat-input__textarea:focus-visible{color:var(--chat-input-focus-color, var(--chat-input-focus-color));background:var(--chat-input-focus-background, var(--chat-input-background));border-width:var(--chat-input-focus-border-width, var(--chat-input-border-width));border-color:var(--chat-input-focus-border-color, var(--chat-input-border-color));border-radius:var(--chat-input-focus-border-radius, var(--chat-input-border-radius));box-shadow:var(--chat-input-focus-box-shadow, var(--chat-input-box-shadow));outline-color:transparent}@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;align-items:center;justify-content:center;width:var(--spacer-40);height:var(--spacer-40);position:absolute;bottom:calc(var(--margin) + var(--chat-input-border-width, 0px));right:calc(var(--margin) + var(--chat-input-border-width, 0px));color:var(--chat-input-submit-color);font-size:0;background:var(--chat-input-submit-background);border-width:var(--chat-input-submit-border-width, 0px);border-color:var(--chat-input-submit-border-color);border-radius:var(--chat-input-submit-border-radius);box-shadow:var(--chat-input-submit-box-shadow);transition-property:opacity,background-color,transform;transition-duration:.2s,.2s,.35s;transition-timing-function:ease;cursor:pointer}.chat-input__submit-button:hover{color:var(--chat-input-submit-hover-color, var(--chat-input-submit-color));background:var(--chat-input-submit-hover-background, var(--chat-input-submit-background));border-width:var(--chat-input-submit-hover-border-width, var(--chat-input-submit-border-width));border-color:var(--chat-input-submit-hover-border-color, var(--chat-input-submit-border-color));border-radius:var(--chat-input-submit-hover-border-radius, var(--chat-input-submit-border-radius));box-shadow:var(--chat-input-submit-hover-box-shadow, var(--chat-input-submit-box-shadow))}@container chat-app (min-width: 640px){.chat-input__submit-button{--margin: var(--spacer-12)}}.chat-input__submit-button--deactivated{background:var(--chat-input-submit-deactivated-background, var(--chat-input-submit-background));opacity:var(--chat-input-submit-deactivated-opacity, .5);transform:scale(var(--chat-input-submit-deactivated-scale, .8));cursor:default;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)}}@media (--screen-lg){.chat-menu{top:auto;right:var(--spacer-16);bottom:var(--spacer-16)}}.chat-menu__trigger{padding:var(--spacer-4)}.chat-menu__trigger:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.chat-menu__content{width:95vw;max-width:300px;padding:var(--spacer-r-12);position:absolute;z-index:100;background:var(--chat-menu-background);border-style:solid;border-width:var(--chat-menu-border-width);border-color:var(--chat-menu-border-color);border-radius:var(--chat-menu-border-radius);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;gap:var(--spacer-4);width:100%;padding:var(--spacer-4);color:var(--chat-menu-item-color);border-radius:var(--chat-menu-item-border-radius);background:var(--chat-menu-item-background)}.chat-menu__item:hover{color:var(--chat-menu-item-hover-color);background:var(--chat-menu-item-hover-background)}.chat-menu__item.active{color:var(--chat-menu-item-active-color);background:var(--chat-menu-item-active-background)}.chat-menu__item-icon{width:1em;height:1em;color:currentColor}.chat-menu__title{font-size:var(--font-small);color:var(--chat-menu-title-color);margin-bottom:var(--spacer-8)}.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{height:100%;position:relative;overflow:hidden}.chat-page__body{height:100%;overflow-y:auto;scrollbar-gutter:stable;padding-top:var(--spacer-48)}.chat-page__messages{display:flex;flex-direction:column;gap:var(--spacer-r-40);min-height:100%}.chat-page__footer{position:fixed;bottom:0;right:0;left:0}.chat-page__footer-content{display:flex;flex-direction:column;gap:var(--spacer-r-8);padding-bottom:var(--spacer-r-8);color:var(--chat-footer-color);background:var(--chat-footer-background);border-style:solid;border-width:var(--chat-footer-border-width);border-color:var(--chat-footer-border-color);border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);box-shadow:var(--chat-footer-box-shadow)}.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__new-conversation{align-self:center;margin-top:auto;margin-bottom:calc(var(--chat-footer-height) + var(--spacer-r-40))}.chat-page__scroll-to-bottom{padding:var(--spacer-4);position:absolute;top:0;left:50%;transform:translate(-50%,-150%);opacity:1}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0}}@layer components{.dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:var(--dialog-background-overlay)}.dialog-content{width:calc(100% - var(--spacer-32));max-width:600px;background:var(--dialog-background);border-width:var(--dialog-border-width);border-color:var(--dialog-border-color);border-radius:var(--dialog-border-radius);position:fixed;left:50%;top:50%;z-index:51;box-shadow:var(--dialog-box-shadow, none);transform:translate(-50%,-50%)}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color, var(--dialog-border-color));font-size:var(--dialog-header-font-size, inherit);font-weight:var(--dialog-header-font-weight, 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;gap:var(--spacer-r-16);justify-content:center}.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);color:var(--message-user-color);background:var(--message-user-background);border-width:var(--message-user-border-width);border-color:var(--message-user-border-color);border-radius:var(--message-user-border-radius);box-shadow:var(--message-user-box-shadow)}.message--bot-error{color:var(--message-error-color)}}.message__bot-layout{display:flex;gap:var(--spacer-r-16);width:100%}.message__bot-avatar{flex-shrink:0;position:sticky;top:var(--spacer-r-16);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;margin-top:var(--spacer-32);padding-top:0;min-height:var(--spacer-64)}}@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;right:0;top:var(--spacer-20);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;gap:var(--spacer-r-12);padding:var(--spacer-r-16);color:var(--card-color);text-align:left;background:var(--card-background);border-width:var(--card-border-width);border-color:var(--card-border-color);border-radius:var(--card-border-radius);box-shadow:var(--card-box-shadow, none);cursor:pointer}.predefined-question:hover{color:var(--card-hover-color, var(--card-color));background:var(--card-hover-background, var(--card-background));border-width:var(--card-hover-border-width, var(--card-border-width));border-color:var(--card-hover-border-color, var(--card-border-color));border-radius:var(--card-hover-border-radius, var(--card-border-radius));box-shadow:var(--card-hover-box-shadow, var(--card-box-shadow), none)}.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;gap:var(--spacer-r-12);width:100%}@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{display:inline-block;height:1.5em;min-width:1.5em;padding:1px .4em 0;margin:0 .1em;box-sizing:border-box;position:relative;top:-1px;font-size:var(--font-xs);font-weight:var(--font-weight-bold);color:var(--reference-number-trigger-color);text-align:center;text-decoration:none;background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);border-width:var(--reference-number-trigger-border-width);border-color:var(--reference-number-trigger-border-color);border-radius:var(--reference-number-trigger-border-radius);cursor:pointer}.reference-number__trigger:hover{color:var(--reference-number-trigger-hover-color);background:var(--reference-number-trigger-hover-background)}.reference-number__trigger:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.reference-number__content-wrapper{width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width);position:absolute;z-index:102}.reference-number__content{display:block;padding:var(--spacer-r-20);background:var(--reference-number-content-background);border-style:solid;border-width:var(--reference-number-content-border-width);border-color:var(--reference-number-content-border-color);border-radius:var(--reference-number-content-border-radius);box-shadow:var(--reference-number-content-box-shadow)}.reference-number__content:hover{color:var(--reference-number-content-hover-color, var(--reference-number-content-color));background:var(--reference-number-content-hover-background, var(--reference-number-content-background));border-width:var(--reference-number-content-hover-border-width, var(--reference-number-content-border-width));border-color:var(--reference-number-content-hover-border-color, var(--reference-number-content-border-color));border-radius:var(--reference-number-content-hover-border-radius, var(--reference-number-content-border-radius));cursor:pointer}.reference-number__content:hover :where(.reference-number__domain){color:var(--reference-number-domain-hover-color, var(--reference-number-domain-color));background:var(--reference-number-domain-hover-background, var(--reference-number-domain-background))}.reference-number__content:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference-number__content:after{content:"";position:absolute;top:-.5em;right:-.5em;bottom:-.5em;left:-.5em;z-index:101;background:transparent}.reference-number__domain{display:inline-flex;max-width:100%;padding:var(--spacer-2) var(--spacer-10);margin-top:var(--spacer-8);color:var(--reference-number-domain-color);background:var(--reference-number-domain-background);font-size:var(--font-xs);font-weight:700;border-width:var(--reference-number-domain-border-width);border-color:var(--reference-number-domain-border-color);border-radius:var(--reference-number-domain-border-radius);box-shadow:var(--reference-number-domain-box-shadow)}@media (--screen-lg){.reference-number__domain{max-width:50%}}}@layer components{.reference{display:flex;gap:var(--spacer-12);padding:var(--spacer-12) var(--spacer-12) var(--spacer-16) var(--spacer-16);color:var(--reference-color);background:var(--reference-background);border-width:var(--reference-border-width);border-color:var(--reference-border-color);border-radius:var(--reference-border-radius);box-shadow:var(--reference-box-shadow);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{color:var(--reference-hover-color, var(--reference-color));background:var(--reference-hover-background, var(--reference-background));border-width:var(--reference-hover-border-width, var(--reference-border-width));border-color:var(--reference-hover-border-color, var(--reference-border-color));border-radius:var(--reference-hover-border-radius, var(--reference-border-radius));box-shadow:var(--reference-hover-box-shadow, var(--reference-box-shadow), none)}.reference:hover :where(.reference__number){color:var(--reference-number-trigger-hover-color)}.reference:hover :where(.reference__domain){color:var(--reference-domain-hover-color, var(--reference-domain-color));background:var(--reference-domain-hover-background, var(--reference-domain-background));border-width:var(--reference-domain-hover-border-width, var(--reference-domain-border-width));border-color:var(--reference-domain-hover-border-color, var(--reference-domain-border-color));border-radius:var(--reference-domain-hover-border-radius, var(--reference-domain-border-radius));box-shadow:var(--reference-domain-hover-box-shadow, var(--reference-domain-box-shadow))}.reference:hover :where(.reference__icon){color:var(--anchor-hover-color)}.reference__number{display:block;color:var(--reference-number-trigger-color);font-weight:700;min-width:.9em}.reference__body,.reference__domain{min-width:0}.reference__body{display:flex;flex-direction:column;align-items:flex-start;flex-grow:1;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);color:var(--reference-domain-color);background:var(--reference-domain-background);font-size:var(--font-xs);font-weight:700;border-width:var(--reference-domain-border-width);border-color:var(--reference-domain-border-color);border-radius:var(--reference-domain-border-radius);box-shadow:var(--reference-domain-box-shadow)}@container chat-app (min-width: 1024px){.reference__domain{max-width:50%}}.reference__icon{flex-shrink:0;align-self:flex-end;position:relative;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;gap:var(--spacer-8);padding-top: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;gap:var(--spacer-8);width:100%;padding:var(--spacer-r-16);color:var(--toast-color);background:var(--toast-background);border-width:var(--toast-border-width, 1px);border-color:var(--toast-border-color, transparent);border-radius:var(--toast-border-radius);box-shadow:var(--toast-box-shadow)}.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{position:relative;display:inline-block}.tooltip{padding:var(--spacer-3) var(--spacer-8);position:absolute;z-index:10;background:var(--tooltip-background);color:var(--tooltip-color);border-radius:var(--tooltip-border-radius);font-size:var(--font-xs);white-space:nowrap;opacity:1;transform:translateY(0);transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1)}.tooltip:after{content:"";position:absolute;border-width:5px;border-style:solid}.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{opacity:0;transform:translateY(1rem);pointer-events:none}}@layer base,utilities,components;',Sc=t=>{window.history.pushState({},"",t),window.dispatchEvent(new Event("popstate"))};var pw=te('<link rel="stylesheet">'),gw=te('<div class="chat-app__animation-container svelte-l4zd7c"><div class="chat-app__animation svelte-l4zd7c"><!></div></div>'),mw=te('<div class="style-container" hidden><!></div> <!> <!>',1),vw=te('<div class="container">Loading...</div>'),bw=te('<main class="chat-app"><!> <!></main>');const yw={hash:"svelte-l4zd7c",code:".chat-app__animation-container.svelte-l4zd7c {height:100%;position:relative; /* Needed for absolute positioned fade-out. */}.chat-app__animation.svelte-l4zd7c {width:100%; /* Ensure full width during absolute positioned fade-out */height:100%;}"};function ph(t,e){Re(e,!0),_i(t,yw);let r=x(e,"org",7),n=x(e,"apiUrl",7),o=x(e,"apiKey",7),a=x(e,"devChatHistory",7),i=x(e,"lang",7),s=we(void 0),c=we(xe(ka.Start));const l=new La({apiUrl:n(),apiKey:o()}),u=(S="light")=>{const{config:k,themeString:z}=ed(r(),S);p(s).config=k,p(s).themeString=z,p(s).mode=S},d=async S=>{try{const k=await l.getUsedLanguages(),z=nd(i());await tv(z,S);const L=await l.getPredefinedQuestions({url:window.location.href.replace(window.location.origin,""),language:z}),V=await l.getMenu({url:window.location.href.replace(window.location.origin,""),language:z}),G=await l.getClassification({url:window.location.href.replace(window.location.origin,"")}),$=await l.metadata,ee="light",{config:fe,themeString:C}=ed(S,ee);A(s,xe({usedLanguages:k,language:z,predefinedQuestions:L,menu:V,config:fe,themeString:C,isInMaintenance:$.mode==="maintenance",history:a()?Jy:[],mode:ee,classification:G})),dh.subscribe(u)}catch(k){Zn.error(k instanceof Error?k.message:"Failed to load the chatbot. Please reload the page.",{duration:1e4,unstyled:!0,classes:{toast:"toast"}})}},f=S=>{const k=p(s).history.push({type:"user",time:new Date().toISOString(),message:S});l.chat(S).subscribe(z=>{z.state==="streaming"||z.state==="done"?p(s).history[k]=z.payload:z.state==="loading"&&(p(s).history[k]={type:"bot-loading",time:new Date().toISOString()})})},v=S=>{const k=new URLSearchParams(window.location.search);k.set(Nl,encodeURIComponent(S)),Sc(`?${k.toString()}`)},h=()=>{Sc("?")},m=()=>{const k=new URLSearchParams(window.location.search).get(Nl);k?(A(c,xe(ka.Chat)),p(s)&&!a()&&(p(s).history=[],requestAnimationFrame(()=>{f(decodeURIComponent(k))}))):A(c,xe(ka.Start))};_t(()=>{m()});const y=S=>{Qy(`${hw}
1070
1070
 
1071
- ${p(s).config.customCSS??""}`,S)},g=S=>{rv(S),d(r()),Sc("?")};var b=ww();ct("popstate",Jo,m);var w=P(b);Rp(w,()=>d(r()),S=>{var k=yw();T(S,k)},S=>{var k=bw(),M=U(k),L=P(M);{var G=re=>{var de=ie(),C=U(de);_r(C,17,()=>p(s).config.fontURLs,Dr,(he,V)=>{var Z=mw();le(()=>Ce(Z,"href",p(V))),T(he,Z)}),T(re,de)};fe(L,re=>{p(s)&&p(s).config.fontURLs&&re(G)})}O(M),_i(M,re=>y==null?void 0:y(re));var W=se(M,2);Ip(W,()=>p(c),re=>{var de=vw(),C=P(de),he=P(C);{var V=z=>{eh(z,{get predefinedQuestions(){return p(s).predefinedQuestions},onSubmit:v})},Z=z=>{Yf(z,{get history(){return p(s).history},onSubmit:f,onStartNewConversation:h,get classification(){return p(s).classification}})};fe(he,z=>{p(c)===_a.Start?z(V):z(Z,!1)})}O(C),O(de),xr(1,C,()=>Hl,()=>({duration:300,delay:250})),xr(2,C,()=>Rm,()=>({duration:150})),T(re,de)});var $=se(W,2);Rd($,{get menu(){return p(s).menu},get usedLanguages(){return p(s).usedLanguages},get currentLanguage(){return p(s).language},onLanguageChange:g}),T(S,k)});var I=se(w,2);return tf(I,{position:"top-center"}),O(b),le(()=>{var S,k;Ce(b,"style",(S=p(s))==null?void 0:S.themeString),Br(b,"color-scheme",((k=p(s))==null?void 0:k.mode)??"light")}),T(t,b),Re({get org(){return r()},set org(S){r(S),_()},get apiUrl(){return n()},set apiUrl(S){n(S),_()},get apiKey(){return o()},set apiKey(S){o(S),_()},get devChatHistory(){return a()},set devChatHistory(S){a(S),_()},get lang(){return i()},set lang(S){i(S),_()}})}return customElements.define("liipgpt-chat",Ie(ph,{org:{type:"String"},apiUrl:{type:"String"},apiKey:{type:"String"},configOverride:{type:"String"},devChatHistory:{type:"Boolean"},lang:{type:"String"}},[],[],!0)),Ye.LiipGPTChat=ph,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"}),Ye}({});
1071
+ ${p(s).config.customCSS??""}`,S)},g=S=>{rv(S),d(r()),Sc("?")};var b=bw();dt("popstate",Jo,m);var w=N(b);Rp(w,()=>d(r()),S=>{var k=vw();T(S,k)},S=>{var k=mw(),z=U(k),L=N(z);{var V=ee=>{var fe=se(),C=U(fe);_r(C,17,()=>p(s).config.fontURLs,Mr,(Ee,ie)=>{var Z=pw();ue(()=>Te(Z,"href",p(ie))),T(Ee,Z)}),T(ee,fe)};de(L,ee=>{p(s)&&p(s).config.fontURLs&&ee(V)})}O(z),ki(z,ee=>y==null?void 0:y(ee));var G=ne(z,2);Ip(G,()=>p(c),ee=>{var fe=gw(),C=N(fe),Ee=N(C);{var ie=D=>{eh(D,{get predefinedQuestions(){return p(s).predefinedQuestions},onSubmit:v})},Z=D=>{Yf(D,{get history(){return p(s).history},onSubmit:f,onStartNewConversation:h,get classification(){return p(s).classification}})};de(Ee,D=>{p(c)===ka.Start?D(ie):D(Z,!1)})}O(C),O(fe),Br(1,C,()=>Ad,()=>({duration:300,delay:250})),Br(2,C,()=>Rm,()=>({duration:150})),T(ee,fe)});var $=ne(G,2);Rd($,{get menu(){return p(s).menu},get usedLanguages(){return p(s).usedLanguages},get currentLanguage(){return p(s).language},onLanguageChange:g}),T(S,k)});var I=ne(w,2);return tf(I,{position:"top-center"}),O(b),ue(()=>{var S,k;Te(b,"style",(S=p(s))==null?void 0:S.themeString),Fr(b,"color-scheme",((k=p(s))==null?void 0:k.mode)??"light")}),T(t,b),Ie({get org(){return r()},set org(S){r(S),_()},get apiUrl(){return n()},set apiUrl(S){n(S),_()},get apiKey(){return o()},set apiKey(S){o(S),_()},get devChatHistory(){return a()},set devChatHistory(S){a(S),_()},get lang(){return i()},set lang(S){i(S),_()}})}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"}},[],[],!0)),tt.LiipGPTChat=ph,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}),tt}({});