@liip/liipgpt 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/button/liipgpt-button.iife.js +6 -6
  2. package/chat/liipgpt-chat.iife.js +31 -31
  3. package/config/index.cjs +2 -1
  4. package/config/index.d.ts +8 -0
  5. package/config/index.js +2 -1
  6. package/configurator/_app/env.js +1 -1
  7. package/configurator/_app/immutable/chunks/{CaDmIJkP.js → BnEwtLey.js} +3 -3
  8. package/configurator/_app/immutable/chunks/{DTGU2mqM.js → CBr0si-w.js} +1 -1
  9. package/configurator/_app/immutable/chunks/{DqybDqwy.js → CQ3p7-DI.js} +1 -1
  10. package/configurator/_app/immutable/chunks/CqH0QXRP.js +1 -0
  11. package/configurator/_app/immutable/chunks/{DkXqbGhE.js → CxgcR10w.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{DCtHJYgu.js → Cy8wbfRb.js} +1 -1
  13. package/configurator/_app/immutable/chunks/{BzVylwd7.js → D6mAnY0-.js} +1 -1
  14. package/configurator/_app/immutable/chunks/{BynrE7QB.js → DeDaIr-m.js} +1 -1
  15. package/configurator/_app/immutable/chunks/{DH3truD-.js → dR-jW0T5.js} +32 -32
  16. package/configurator/_app/immutable/chunks/{BmumJykv.js → qnNG2BJ8.js} +1 -1
  17. package/configurator/_app/immutable/entry/{app.0vDWmuRN.js → app.DQ1xtJww.js} +2 -2
  18. package/configurator/_app/immutable/entry/start.CxotJNtS.js +1 -0
  19. package/configurator/_app/immutable/nodes/{0.C1WA-Sd0.js → 0.1RFJkIO3.js} +3 -1
  20. package/configurator/_app/immutable/nodes/{1.D_clQXr4.js → 1.BGVJgVHX.js} +1 -1
  21. package/configurator/_app/immutable/nodes/2.DEQ8Upwu.js +1 -0
  22. package/configurator/_app/immutable/nodes/{3.CVRgUIw6.js → 3.BYbNCdl3.js} +1 -1
  23. package/configurator/_app/version.json +1 -1
  24. package/configurator/index.html +6 -6
  25. package/configurator/sidebar.html +6 -6
  26. package/index.cjs +4 -5
  27. package/index.d.ts +33 -0
  28. package/index.js +4 -5
  29. package/package.json +1 -1
  30. package/configurator/_app/immutable/chunks/CXbcLk5j.js +0 -1
  31. package/configurator/_app/immutable/entry/start.DR9kqzeI.js +0 -1
  32. package/configurator/_app/immutable/nodes/2.DVQmbfVp.js +0 -1
@@ -1,5 +1,5 @@
1
- var LiipGPTButton=function(Fr){"use strict";const Ia="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Ia);const Ma=1,ja=2,Na=16,La=1,Pa=2,Ba=4,Fa=8,Da=16,za=1,Za=2,nr="[",or="[!",Dr="]",Je={},W=Symbol(),Va="http://www.w3.org/1999/xhtml",Ua="http://www.w3.org/2000/svg",Wa="@attach",Mn=!1;var ar=Array.isArray,Ga=Array.prototype.indexOf,zr=Array.from,ir=Object.keys,sr=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,qa=Object.getOwnPropertyDescriptors,Ha=Object.prototype,Ya=Array.prototype,jn=Object.getPrototypeOf,Nn=Object.isExtensible;function jt(t){return typeof t=="function"}const lr=()=>{};function Ln(t){return typeof t?.then=="function"}function Pn(t){for(var e=0;e<t.length;e++)t[e]()}const re=2,Zr=4,cr=8,Vr=16,$e=32,Xe=64,ur=128,ne=256,dr=512,oe=1024,Ae=2048,et=4096,Oe=8192,fr=16384,Bn=32768,pt=65536,Fn=1<<17,Dn=1<<18,Ur=1<<19,Wr=1<<20,zn=1<<21,Fe=Symbol("$state"),Gr=Symbol("legacy props"),Qa=Symbol(""),Zn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ka=1,Ja=3,tt=8;function Vn(t){return t===this.v}function Xa(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Un(t){return!Xa(t,this.v)}function ei(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ti(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ri(t){throw new Error("https://svelte.dev/e/effect_orphan")}function ni(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function oi(){throw new Error("https://svelte.dev/e/hydration_failed")}function ai(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ii(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function li(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Nt=!1,ci=!1;function ui(){Nt=!0}let G=null;function vt(t){G=t}function mt(t,e=!1,r){G={p:G,c:null,e:null,s:t,x:null,l:null},Nt&&!e&&(G.l={s:null,u:null,r1:[],r2:nt(!1)})}function gt(t){var e=G,r=e.e;if(r!==null){e.e=null;for(var n of r)no(n)}return t!==void 0&&(e.x=t),G=e.p,t??{}}function Lt(){return!Nt||G!==null&&G.l===null}function bt(t){if(typeof t!="object"||t===null||Fe in t)return t;const e=jn(t);if(e!==Ha&&e!==Ya)return t;var r=new Map,n=ar(t),o=ae(0),a=it,i=s=>{if(it===a)return s();var c=P,l=it;te(null),vo(a);var u=s();return te(c),vo(l),u};return n&&r.set("length",ae(t.length)),new Proxy(t,{defineProperty(s,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ii();var u=r.get(c);return u===void 0?u=i(()=>{var f=ae(l.value);return r.set(c,f),f}):Q(u,l.value,!0),!0},deleteProperty(s,c){var l=r.get(c);if(l===void 0){if(c in s){const d=i(()=>ae(W));r.set(c,d),Hr(o)}}else{if(n&&typeof c=="string"){var u=r.get("length"),f=Number(c);Number.isInteger(f)&&f<u.v&&Q(u,f)}Q(l,W),Hr(o)}return!0},get(s,c,l){if(c===Fe)return t;var u=r.get(c),f=c in s;if(u===void 0&&(!f||Ee(s,c)?.writable)&&(u=i(()=>{var m=bt(f?s[c]:W),_=ae(m);return _}),r.set(c,u)),u!==void 0){var d=R(u);return d===W?void 0:d}return Reflect.get(s,c,l)},getOwnPropertyDescriptor(s,c){var l=Reflect.getOwnPropertyDescriptor(s,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=R(u))}else if(l===void 0){var f=r.get(c),d=f?.v;if(f!==void 0&&d!==W)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return l},has(s,c){if(c===Fe)return!0;var l=r.get(c),u=l!==void 0&&l.v!==W||Reflect.has(s,c);if(l!==void 0||j!==null&&(!u||Ee(s,c)?.writable)){l===void 0&&(l=i(()=>{var d=u?bt(s[c]):W,m=ae(d);return m}),r.set(c,l));var f=R(l);if(f===W)return!1}return u},set(s,c,l,u){var f=r.get(c),d=c in s;if(n&&c==="length")for(var m=l;m<f.v;m+=1){var _=r.get(m+"");_!==void 0?Q(_,W):m in s&&(_=i(()=>ae(W)),r.set(m+"",_))}if(f===void 0)(!d||Ee(s,c)?.writable)&&(f=i(()=>ae(void 0)),Q(f,bt(l)),r.set(c,f));else{d=f.v!==W;var b=i(()=>bt(l));Q(f,b)}var T=Reflect.getOwnPropertyDescriptor(s,c);if(T?.set&&T.set.call(u,l),!d){if(n&&typeof c=="string"){var p=r.get("length"),k=Number(c);Number.isInteger(k)&&k>=p.v&&Q(p,k+1)}Hr(o)}return!0},ownKeys(s){R(o);var c=Reflect.ownKeys(s).filter(f=>{var d=r.get(f);return d===void 0||d.v!==W});for(var[l,u]of r)u.v!==W&&!(l in s)&&c.push(l);return c},setPrototypeOf(){si()}})}function Wn(t){try{if(t!==null&&typeof t=="object"&&Fe in t)return t[Fe]}catch{}return t}function di(t,e){return Object.is(Wn(t),Wn(e))}function Pt(t){var e=re|Ae,r=P!==null&&(P.f&re)!==0?P:null;return j===null||r!==null&&(r.f&ne)!==0?e|=ne:j.f|=Ur,{ctx:G,deps:null,effects:null,equals:Vn,f:e,fn:t,reactions:null,rv:0,v:W,wv:0,parent:r??j,ac:null}}function ve(t){const e=Pt(t);return po(e),e}function hr(t){const e=Pt(t);return e.equals=Un,e}function Gn(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Y(e[r])}}function fi(t){for(var e=t.parent;e!==null;){if((e.f&re)===0)return e;e=e.parent}return null}function qr(t){var e,r=j;we(fi(t));try{Gn(t),e=bo(t)}finally{we(r)}return e}function qn(t){var e=qr(t);if(t.equals(e)||(t.v=e,t.wv=mo()),!Ze){var r=(Ve||(t.f&ne)!==0)&&t.deps!==null?et:oe;xe(t,r)}}const rt=new Map;function nt(t,e){var r={f:0,v:t,reactions:null,equals:Vn,rv:0,wv:0};return r}function ae(t,e){const r=nt(t);return po(r),r}function pr(t,e=!1,r=!0){const n=nt(t);return e||(n.equals=Un),Nt&&r&&G!==null&&G.l!==null&&(G.l.s??=[]).push(n),n}function Q(t,e,r=!1){P!==null&&(!ye||(P.f&Fn)!==0)&&Lt()&&(P.f&(re|Vr|Fn))!==0&&!Me?.includes(t)&&li();let n=r?bt(e):e;return Bt(t,n)}function Bt(t,e){if(!t.equals(e)){var r=t.v;Ze?rt.set(t,e):rt.set(t,r),t.v=e,(t.f&re)!==0&&((t.f&Ae)!==0&&qr(t),xe(t,(t.f&ne)===0?oe:et)),t.wv=mo(),Hn(t,Ae),Lt()&&j!==null&&(j.f&oe)!==0&&(j.f&($e|Xe))===0&&(ue===null?xi([t]):ue.push(t))}return e}function Hr(t){Q(t,t.v+1)}function Hn(t,e){var r=t.reactions;if(r!==null)for(var n=Lt(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;(s&Ae)===0&&(!n&&i===j||(xe(i,e),(s&(oe|ne))!==0&&((s&re)!==0?Hn(i,et):kr(i))))}}function Ft(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function hi(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let E=!1;function q(t){E=t}let I;function H(t){if(t===null)throw Ft(),Je;return I=t}function ge(){return H(ce(I))}function be(t){if(E){if(ce(I)!==null)throw Ft(),Je;I=t}}function Yn(t=1){if(E){for(var e=t,r=I;e--;)r=ce(r);I=r}}function Dt(){for(var t=0,e=I;;){if(e.nodeType===tt){var r=e.data;if(r===Dr){if(t===0)return e;t-=1}else(r===nr||r===or)&&(t+=1)}var n=ce(e);e.remove(),e=n}}function Qn(t){if(!t||t.nodeType!==tt)throw Ft(),Je;return t.data}var Kn,Jn,Xn,eo;function Yr(){if(Kn===void 0){Kn=window,Jn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Xn=Ee(e,"firstChild").get,eo=Ee(e,"nextSibling").get,Nn(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Nn(r)&&(r.__t=void 0)}}function kt(t=""){return document.createTextNode(t)}function le(t){return Xn.call(t)}function ce(t){return eo.call(t)}function ke(t,e){if(!E)return le(t);var r=le(I);return r===null&&(r=I.appendChild(kt())),H(r),r}function ee(t,e){if(!E){var r=le(t);return r instanceof Comment&&r.data===""?ce(r):r}return I}function De(t,e=1,r=!1){let n=E?I:t;for(var o;e--;)o=n,n=ce(n);if(!E)return n;if(r&&n?.nodeType!==Ja){var a=kt();return n===null?o?.after(a):n.before(a),H(a),a}return H(n),n}function to(t){t.textContent=""}function pi(t){j===null&&P===null&&ri(),P!==null&&(P.f&ne)!==0&&j===null&&ti(),Ze&&ei()}function vi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ze(t,e,r,n=!0){var o=j,a={ctx:G,deps:null,nodes_start:null,nodes_end:null,f:t|Ae,first:null,fn:e,last:null,next:null,parent:o,b:o&&o.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Xr(a),a.f|=Bn}catch(c){throw Y(a),c}else e!==null&&kr(a);var i=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(Ur|ur))===0;if(!i&&n&&(o!==null&&vi(a,o),P!==null&&(P.f&re)!==0)){var s=P;(s.effects??=[]).push(a)}return a}function ro(t){const e=ze(cr,null,!1);return xe(e,oe),e.teardown=t,e}function mi(t){if(pi(),!P&&j&&(j.f&$e)!==0){var e=G;(e.e??=[]).push(t)}else return no(t)}function no(t){return ze(Zr|zn,t,!1)}function gi(t){const e=ze(Xe,t,!0);return()=>{Y(e)}}function bi(t){const e=ze(Xe,t,!0);return(r={})=>new Promise(n=>{r.outro?Ie(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function vr(t){return ze(Zr,t,!1)}function oo(t){return ze(cr,t,!0)}function zt(t,e=[],r=Pt){const n=e.map(r);return _e(()=>t(...n.map(R)))}function _e(t,e=0){var r=ze(cr|Vr|e,t,!0);return r}function K(t,e=!0){return ze(cr|$e,t,!0,e)}function ao(t){var e=t.teardown;if(e!==null){const r=Ze,n=P;ho(!0),te(null);try{e.call(null)}finally{ho(r),te(n)}}}function io(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){r.ac?.abort(Zn);var n=r.next;(r.f&Xe)!==0?r.parent=null:Y(r,e),r=n}}function ki(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&$e)===0&&Y(e),e=r}}function Y(t,e=!0){var r=!1;(e||(t.f&Dn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(so(t.nodes_start,t.nodes_end),r=!0),io(t,e&&!r),br(t,0),xe(t,fr);var n=t.transitions;if(n!==null)for(const a of n)a.stop();ao(t);var o=t.parent;o!==null&&o.first!==null&&lo(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function so(t,e){for(;t!==null;){var r=t===e?null:ce(t);t.remove(),t=r}}function lo(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 Ie(t,e){var r=[];Qr(t,r,!0),co(r,()=>{Y(t),e&&e()})}function co(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function Qr(t,e,r){if((t.f&Oe)===0){if(t.f^=Oe,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&pt)!==0||(n.f&$e)!==0;Qr(n,e,a?r:!1),n=o}}}function ot(t){uo(t,!0)}function uo(t,e){if((t.f&Oe)!==0){t.f^=Oe;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&pt)!==0||(r.f&$e)!==0;uo(r,o?e:!1),r=n}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||e)&&a.in()}}let Zt=[],Kr=[];function fo(){var t=Zt;Zt=[],Pn(t)}function _i(){var t=Kr;Kr=[],Pn(t)}function _t(t){Zt.length===0&&queueMicrotask(fo),Zt.push(t)}function yi(){Zt.length>0&&fo(),Kr.length>0&&_i()}function wi(t){var e=j;if((e.f&Bn)===0){if((e.f&ur)===0)throw t;e.fn(t)}else Jr(t,e)}function Jr(t,e){for(;e!==null;){if((e.f&ur)!==0)try{e.b.error(t);return}catch{}e=e.parent}throw t}let Vt=!1,Ut=null,at=!1,Ze=!1;function ho(t){Ze=t}let Wt=[],uc=[],P=null,ye=!1;function te(t){P=t}let j=null;function we(t){j=t}let Me=null;function po(t){P!==null&&P.f&Wr&&(Me===null?Me=[t]:Me.push(t))}let J=null,ie=0,ue=null;function xi(t){ue=t}let mr=1,Gt=0,it=Gt;function vo(t){it=t}let Ve=!1;function mo(){return++mr}function gr(t){var e=t.f;if((e&Ae)!==0)return!0;if((e&et)!==0){var r=t.deps,n=(e&ne)!==0;if(r!==null){var o,a,i=(e&dr)!==0,s=n&&j!==null&&!Ve,c=r.length;if(i||s){var l=t,u=l.parent;for(o=0;o<c;o++)a=r[o],(i||!a?.reactions?.includes(l))&&(a.reactions??=[]).push(l);i&&(l.f^=dr),s&&u!==null&&(u.f&ne)===0&&(l.f^=ne)}for(o=0;o<c;o++)if(a=r[o],gr(a)&&qn(a),a.wv>t.wv)return!0}(!n||j!==null&&!Ve)&&xe(t,oe)}return!1}function go(t,e,r=!0){var n=t.reactions;if(n!==null&&!Me?.includes(t))for(var o=0;o<n.length;o++){var a=n[o];(a.f&re)!==0?go(a,e,!1):e===a&&(r?xe(a,Ae):(a.f&oe)!==0&&xe(a,et),kr(a))}}function bo(t){var e=J,r=ie,n=ue,o=P,a=Ve,i=Me,s=G,c=ye,l=it,u=t.f;J=null,ie=0,ue=null,Ve=(u&ne)!==0&&(ye||!at||P===null),P=(u&($e|Xe))===0?t:null,Me=null,vt(t.ctx),ye=!1,it=++Gt,t.f|=Wr,t.ac!==null&&(t.ac.abort(Zn),t.ac=null);try{var f=(0,t.fn)(),d=t.deps;if(J!==null){var m;if(br(t,ie),d!==null&&ie>0)for(d.length=ie+J.length,m=0;m<J.length;m++)d[ie+m]=J[m];else t.deps=d=J;if(!Ve||(u&re)!==0&&t.reactions!==null)for(m=ie;m<d.length;m++)(d[m].reactions??=[]).push(t)}else d!==null&&ie<d.length&&(br(t,ie),d.length=ie);if(Lt()&&ue!==null&&!ye&&d!==null&&(t.f&(re|et|Ae))===0)for(m=0;m<ue.length;m++)go(ue[m],t);return o!==null&&o!==t&&(Gt++,ue!==null&&(n===null?n=ue:n.push(...ue))),f}catch(_){wi(_)}finally{J=e,ie=r,ue=n,P=o,Ve=a,Me=i,vt(s),ye=c,it=l,t.f^=Wr}}function Ci(t,e){let r=e.reactions;if(r!==null){var n=Ga.call(r,t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&(e.f&re)!==0&&(J===null||!J.includes(e))&&(xe(e,et),(e.f&(ne|dr))===0&&(e.f^=dr),Gn(e),br(e,0))}function br(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Ci(t,r[n])}function Xr(t){var e=t.f;if((e&fr)===0){xe(t,oe);var r=j,n=at;j=t,at=!0;try{(e&Vr)!==0?ki(t):io(t),ao(t);var o=bo(t);t.teardown=typeof o=="function"?o:null,t.wv=mr;var a;Mn&&ci&&(t.f&Ae)!==0&&t.deps}finally{at=n,j=r}}}function Ri(){try{ni()}catch(t){if(Ut!==null)Jr(t,Ut);else throw t}}function ko(){var t=at;try{var e=0;for(at=!0;Wt.length>0;){e++>1e3&&Ri();var r=Wt,n=r.length;Wt=[];for(var o=0;o<n;o++){var a=Ti(r[o]);Si(a)}rt.clear()}}finally{Vt=!1,at=t,Ut=null}}function Si(t){var e=t.length;if(e!==0){for(var r=0;r<e;r++){var n=t[r];if((n.f&(fr|Oe))===0&&gr(n)){var o=mr;if(Xr(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?lo(n):n.fn=null),mr>o&&(n.f&zn)!==0)break}}for(;r<e;r+=1)kr(t[r])}}function kr(t){Vt||(Vt=!0,queueMicrotask(ko));for(var e=Ut=t;e.parent!==null;){e=e.parent;var r=e.f;if((r&(Xe|$e))!==0){if((r&oe)===0)return;e.f^=oe}}Wt.push(e)}function Ti(t){for(var e=[],r=t;r!==null;){var n=r.f,o=(n&($e|Xe))!==0,a=o&&(n&oe)!==0;if(!a&&(n&Oe)===0){(n&Zr)!==0?e.push(r):o?r.f^=oe:gr(r)&&Xr(r);var i=r.first;if(i!==null){r=i;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return e}function Z(t){for(var e;;){if(yi(),Wt.length===0)return Vt=!1,Ut=null,e;Vt=!0,ko()}}function R(t){var e=t.f,r=(e&re)!==0;if(P!==null&&!ye){if(!Me?.includes(t)){var n=P.deps;t.rv<Gt&&(t.rv=Gt,J===null&&n!==null&&n[ie]===t?ie++:J===null?J=[t]:(!Ve||!J.includes(t))&&J.push(t))}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&ne)===0&&(o.f^=ne)}if(r&&!Ze&&(o=t,gr(o)&&qn(o)),Ze){if(rt.has(t))return rt.get(t);if(r){o=t;var i=o.v;return((o.f&oe)!==0||_o(o))&&(i=qr(o)),rt.set(o,i),i}}return t.v}function _o(t){if(t.v===W)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(rt.has(e)||(e.f&re)!==0&&_o(e))return!0;return!1}function en(t){var e=ye;try{return ye=!0,t()}finally{ye=e}}const Ei=-7169;function xe(t,e){t.f=t.f&Ei|e}function $i(t,e){if(e){const r=document.body;t.autofocus=!0,_t(()=>{document.activeElement===r&&t.focus()})}}function Ai(t){var e=P,r=j;te(null),we(null);try{return t()}finally{te(e),we(r)}}const yo=new Set,tn=new Set;function wo(t,e,r,n={}){function o(a){if(n.capture||qt.call(e,a),!a.cancelBubble)return Ai(()=>r?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?_t(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function _r(t,e,r,n,o){var a={capture:n,passive:o},i=wo(t,e,r,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ro(()=>{e.removeEventListener(t,i,a)})}function rn(t){for(var e=0;e<t.length;e++)yo.add(t[e]);for(var r of tn)r(t)}function qt(t){var e=this,r=e.ownerDocument,n=t.type,o=t.composedPath?.()||[],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){sr(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=P,f=j;te(null),we(null);try{for(var d,m=[];a!==null;){var _=a.assignedSlot||a.parentNode||a.host||null;try{var b=a["__"+n];if(b!=null&&(!a.disabled||t.target===a))if(ar(b)){var[T,...p]=b;T.apply(a,[t,...p])}else b.call(a,t)}catch(k){d?m.push(k):d=k}if(t.cancelBubble||_===e||_===null)break;a=_}if(d){for(let k of m)queueMicrotask(()=>{throw k});throw d}}finally{t.__root=e,delete t.currentTarget,te(u),we(f)}}}let de;function Oi(){de=void 0}function Ii(t){let e=null,r=E;var n;if(E){for(e=I,de===void 0&&(de=le(document.head));de!==null&&(de.nodeType!==tt||de.data!==nr);)de=ce(de);de===null?q(!1):de=H(ce(de))}E||(n=document.head.appendChild(kt()));try{_e(()=>t(n),Dn)}finally{r&&(q(!0),de=I,H(e))}}function xo(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function je(t,e){var r=j;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function me(t,e){var r=(e&za)!==0,n=(e&Za)!==0,o,a=!t.startsWith("<!>");return()=>{if(E)return je(I,null),I;o===void 0&&(o=xo(a?t:"<!>"+t),r||(o=le(o)));var i=n||Jn?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=le(i),c=i.lastChild;je(s,c)}else je(i,i);return i}}function Ce(){if(E)return je(I,null),I;var t=document.createDocumentFragment(),e=document.createComment(""),r=kt();return t.append(e,r),je(e,r),t}function D(t,e){if(E){j.nodes_end=I,ge();return}t!==null&&t.before(e)}function Mi(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ji=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ni(t){return ji.includes(t)}const Li={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Pi(t){return t=t.toLowerCase(),Li[t]??t}const Bi=["touchstart","touchmove"];function Fi(t){return Bi.includes(t)}const Di=["textarea","script","style","title"];function zi(t){return Di.includes(t)}function Zi(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Co(t,e){return Ro(t,e)}function Vi(t,e){Yr(),e.intro=e.intro??!1;const r=e.target,n=E,o=I;try{for(var a=le(r);a&&(a.nodeType!==tt||a.data!==nr);)a=ce(a);if(!a)throw Je;q(!0),H(a),ge();const i=Ro(t,{...e,anchor:a});if(I===null||I.nodeType!==tt||I.data!==Dr)throw Ft(),Je;return q(!1),i}catch(i){if(i===Je)return e.recover===!1&&oi(),Yr(),to(r),q(!1),Co(t,e);throw i}finally{q(n),H(o),Oi()}}const yt=new Map;function Ro(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){Yr();var s=new Set,c=f=>{for(var d=0;d<f.length;d++){var m=f[d];if(!s.has(m)){s.add(m);var _=Fi(m);e.addEventListener(m,qt,{passive:_});var b=yt.get(m);b===void 0?(document.addEventListener(m,qt,{passive:_}),yt.set(m,1)):yt.set(m,b+1)}}};c(zr(yo)),tn.add(c);var l=void 0,u=bi(()=>{var f=r??e.appendChild(kt());return K(()=>{if(a){mt({});var d=G;d.c=a}o&&(n.$$events=o),E&&je(f,null),l=t(f,n)||{},E&&(j.nodes_end=I),a&&gt()}),()=>{for(var d of s){e.removeEventListener(d,qt);var m=yt.get(d);--m===0?(document.removeEventListener(d,qt),yt.delete(d)):yt.set(d,m)}tn.delete(c),f!==r&&f.parentNode?.removeChild(f)}});return nn.set(l,u),l}let nn=new WeakMap;function Ui(t,e){const r=nn.get(t);return r?(nn.delete(t),r(e)):Promise.resolve()}function on(t,e,...r){var n=t,o=lr,a;_e(()=>{o!==(o=e())&&(a&&(Y(a),a=null),a=K(()=>o(n,...r)))},pt),E&&(n=I)}const an=0,yr=1,sn=2;function So(t,e,r,n,o){E&&ge();var a=t,i=Lt(),s=G,c=W,l,u,f,d=i?nt(void 0):pr(void 0,!1,!1),m=i?nt(void 0):pr(void 0,!1,!1),_=!1;function b(p,k){_=!0,k&&(we(T),te(T),vt(s));try{p===an&&r&&(l?ot(l):l=K(()=>r(a))),p===yr&&n&&(u?ot(u):u=K(()=>n(a,d))),p!==an&&l&&Ie(l,()=>l=null),p!==yr&&u&&Ie(u,()=>u=null),p!==sn&&f&&Ie(f,()=>f=null)}finally{k&&(vt(null),te(null),we(null),Z())}}var T=_e(()=>{if(c===(c=e()))return;let p=E&&Ln(c)===(a.data===or);if(p&&(a=Dt(),H(a),q(!1),p=!0),Ln(c)){var k=c;_=!1,k.then(v=>{k===c&&(Bt(d,v),b(yr,!0))},v=>{if(k===c)throw Bt(m,v),b(sn,!0),m.v}),E?r&&(l=K(()=>r(a))):_t(()=>{_||b(an,!0)})}else Bt(d,c),b(yr,!1);return p&&q(!0),()=>c=W});E&&(a=I)}function Ne(t,e,[r,n]=[0,0]){E&&r===0&&ge();var o=t,a=null,i=null,s=W,c=r>0?pt:0,l=!1;const u=(d,m=!0)=>{l=!0,f(m,d)},f=(d,m)=>{if(s===(s=d))return;let _=!1;if(E&&n!==-1){if(r===0){const T=Qn(o);T===nr?n=0:T===or?n=1/0:(n=parseInt(T.substring(1)),n!==n&&(n=s?1/0:-1))}const b=n>r;!!s===b&&(o=Dt(),H(o),q(!1),_=!0,n=-1)}s?(a?ot(a):m&&(a=K(()=>m(o))),i&&Ie(i,()=>{i=null})):(i?ot(i):m&&(i=K(()=>m(o,[r+1,n]))),a&&Ie(a,()=>{a=null})),_&&q(!0)};_e(()=>{l=!1,e(u),l||f(null,null)},c),E&&(o=I)}function Wi(t,e){return e}function Gi(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)Qr(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var c=r.parentNode;to(c),c.append(r),n.clear(),Ue(t,e[0].prev,e[a-1].next)}co(o,()=>{for(var l=0;l<a;l++){var u=e[l];s||(n.delete(u.k),Ue(t,u.prev,u.next)),Y(u.e,!s)}})}function qi(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null};E&&ge();var c=null,l=!1,u=hr(()=>{var f=r();return ar(f)?f:f==null?[]:zr(f)});_e(()=>{var f=R(u),d=f.length;if(l&&d===0)return;l=d===0;let m=!1;if(E){var _=Qn(i)===or;_!==(d===0)&&(i=Dt(),H(i),q(!1),m=!0)}if(E){for(var b=null,T,p=0;p<d;p++){if(I.nodeType===tt&&I.data===Dr){i=I,m=!0,q(!1);break}var k=f[p],v=n(k,p);T=To(I,s,b,null,k,v,p,o,e,r),s.items.set(v,T),b=T}d>0&&H(Dt())}E||Hi(f,s,i,o,e,n,r),a!==null&&(d===0?c?ot(c):c=K(()=>a(i)):c!==null&&Ie(c,()=>{c=null})),m&&q(!0),R(u)}),E&&(i=I)}function Hi(t,e,r,n,o,a,i){var s=t.length,c=e.items,l=e.first,u=l,f,d=null,m=[],_=[],b,T,p,k;for(k=0;k<s;k+=1){if(b=t[k],T=a(b,k),p=c.get(T),p===void 0){var v=u?u.e.nodes_start:r;d=To(v,e,d,d===null?e.first:d.next,b,T,k,n,o,i),c.set(T,d),m=[],_=[],u=d.next;continue}if(Yi(p,b,k),(p.e.f&Oe)!==0&&ot(p.e),p!==u){if(f!==void 0&&f.has(p)){if(m.length<_.length){var x=_[0],S;d=x.prev;var F=m[0],B=m[m.length-1];for(S=0;S<m.length;S+=1)Eo(m[S],x,r);for(S=0;S<_.length;S+=1)f.delete(_[S]);Ue(e,F.prev,B.next),Ue(e,d,F),Ue(e,B,x),u=x,d=B,k-=1,m=[],_=[]}else f.delete(p),Eo(p,u,r),Ue(e,p.prev,p.next),Ue(e,p,d===null?e.first:d.next),Ue(e,d,p),d=p;continue}for(m=[],_=[];u!==null&&u.k!==T;)(u.e.f&Oe)===0&&(f??=new Set).add(u),_.push(u),u=u.next;if(u===null)continue;p=u}m.push(p),d=p,u=p.next}if(u!==null||f!==void 0){for(var z=f===void 0?[]:zr(f);u!==null;)(u.e.f&Oe)===0&&z.push(u),u=u.next;var se=z.length;if(se>0){var Be=null;Gi(e,z,Be,c)}}j.first=e.first&&e.first.e,j.last=d&&d.e}function Yi(t,e,r,n){Bt(t.v,e),t.i=r}function To(t,e,r,n,o,a,i,s,c,l){var u=(c&Ma)!==0,f=(c&Na)===0,d=u?f?pr(o,!1,!1):nt(o):o,m=(c&ja)===0?i:nt(i),_={i:m,v:d,k:a,a:null,e:null,prev:r,next:n};try{return _.e=K(()=>s(t,d,m,l),E),_.e.prev=r&&r.e,_.e.next=n&&n.e,r===null?e.first=_:(r.next=_,r.e.next=_.e),n!==null&&(n.prev=_,n.e.prev=_.e),_}finally{}}function Eo(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=ce(a);o.before(a),a=i}}function Ue(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 ln(t,e,r=!1,n=!1,o=!1){var a=t,i="";zt(()=>{var s=j;if(i===(i=e()??"")){E&&ge();return}if(s.nodes_start!==null&&(so(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),i!==""){if(E){I.data;for(var c=ge(),l=c;c!==null&&(c.nodeType!==tt||c.data!=="");)l=c,c=ce(c);if(c===null)throw Ft(),Je;je(I,l),a=H(c);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var f=xo(u);if((r||n)&&(f=le(f)),je(le(f),f.lastChild),r||n)for(;le(f);)a.before(le(f));else a.before(f)}})}function Qi(t,e,r,n,o,a){let i=E;E&&ge();var s,c,l=null;E&&I.nodeType===Ka&&(l=I,ge());var u=E?I:t,f;_e(()=>{const d=e()||null;var m=d==="svg"?Ua:null;d!==s&&(f&&(d===null?Ie(f,()=>{f=null,c=null}):d===c?ot(f):Y(f)),d&&d!==c&&(f=K(()=>{if(l=E?l:m?document.createElementNS(m,d):document.createElement(d),je(l,l),n){E&&zi(d)&&l.append(document.createComment(""));var _=E?le(l):l.appendChild(kt());E&&(_===null?q(!1):H(_)),n(l,_)}j.nodes_end=l,u.before(l)})),s=d,s&&(c=s))},pt),i&&(q(!0),H(u))}function Ki(t,e){_t(()=>{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 Ji(t,e,r){vr(()=>{var n=en(()=>e(t,r?.())||{});if(n?.destroy)return()=>n.destroy()})}function Xi(t,e){var r=void 0,n;_e(()=>{r!==(r=e())&&(n&&(Y(n),n=null),r&&(n=K(()=>{vr(()=>r(t))})))})}function $o(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=$o(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function es(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=$o(t))&&(n&&(n+=" "),n+=e);return n}function cn(t){return typeof t=="object"?es(t):t??""}const Ao=[...`
2
- \r\f \v\uFEFF`];function ts(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var o in r)if(r[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,i=0;(i=n.indexOf(o,i))>=0;){var s=i+a;(i===0||Ao.includes(n[i-1]))&&(s===n.length||Ao.includes(n[s]))?n=(i===0?"":n.substring(0,i))+n.substring(s+1):i=s}}return n===""?null:n}function Oo(t,e=!1){var r=e?" !important;":";",n="";for(var o in t){var a=t[o];a!=null&&a!==""&&(n+=" "+o+": "+a+r)}return n}function un(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function rs(t,e){if(e){var r="",n,o;if(Array.isArray(e)?(n=e[0],o=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,s=!1,c=[];n&&c.push(...Object.keys(n).map(un)),o&&c.push(...Object.keys(o).map(un));var l=0,u=-1;const b=t.length;for(var f=0;f<b;f++){var d=t[f];if(s?d==="/"&&t[f-1]==="*"&&(s=!1):a?a===d&&(a=!1):d==="/"&&t[f+1]==="*"?s=!0:d==='"'||d==="'"?a=d:d==="("?i++:d===")"&&i--,!s&&a===!1&&i===0){if(d===":"&&u===-1)u=f;else if(d===";"||f===b-1){if(u!==-1){var m=un(t.substring(l,u).trim());if(!c.includes(m)){d!==";"&&f++;var _=t.substring(l,f).trim();r+=" "+_+";"}}l=f+1,u=-1}}}}return n&&(r+=Oo(n)),o&&(r+=Oo(o,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function dn(t,e,r,n,o,a){var i=t.__className;if(E||i!==r||i===void 0){var s=ts(r,n,a);(!E||s!==t.getAttribute("class"))&&(s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s)),t.__className=r}else if(a&&o!==a)for(var c in a){var l=!!a[c];(o==null||l!==!!o[c])&&t.classList.toggle(c,l)}return a}function fn(t,e={},r,n){for(var o in r){var a=r[o];e[o]!==a&&(r[o]==null?t.style.removeProperty(o):t.style.setProperty(o,a,n))}}function hn(t,e,r,n){var o=t.__style;if(E||o!==e){var a=rs(e,n);(!E||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(fn(t,r?.[0],n[0]),fn(t,r?.[1],n[1],"important")):fn(t,r,n));return n}function pn(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ar(e))return hi();for(var n of t.options)n.selected=e.includes(Io(n));return}for(n of t.options){var o=Io(n);if(di(o,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function ns(t){var e=new MutationObserver(()=>{pn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ro(()=>{e.disconnect()})}function Io(t){return"__value"in t?t.__value:t.value}const Ht=Symbol("class"),Yt=Symbol("style"),Mo=Symbol("is custom element"),jo=Symbol("is html");function os(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function wr(t,e,r,n){var o=No(t);E&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="loading"&&(t[Qa]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Po(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function as(t,e,r,n,o=!1){var a=No(t),i=a[Mo],s=!a[jo];let c=E&&i;c&&q(!1);var l=e||{},u=t.tagName==="OPTION";for(var f in e)f in r||(r[f]=null);r.class?r.class=cn(r.class):r[Ht]&&(r.class=null),r[Yt]&&(r.style??=null);var d=Po(t);for(const v in r){let x=r[v];if(u&&v==="value"&&x==null){t.value=t.__value="",l[v]=x;continue}if(v==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";dn(t,m,x,n,e?.[Ht],r[Ht]),l[v]=x,l[Ht]=r[Ht];continue}if(v==="style"){hn(t,x,e?.[Yt],r[Yt]),l[v]=x,l[Yt]=r[Yt];continue}var _=l[v];if(!(x===_&&!(x===void 0&&t.hasAttribute(v)))){l[v]=x;var b=v[0]+v[1];if(b!=="$$")if(b==="on"){const S={},F="$$"+v;let B=v.slice(2);var T=Ni(B);if(Mi(B)&&(B=B.slice(0,-7),S.capture=!0),!T&&_){if(x!=null)continue;t.removeEventListener(B,l[F],S),l[F]=null}if(x!=null)if(T)t[`__${B}`]=x,rn([B]);else{let z=function(se){l[v].call(this,se)};l[F]=wo(B,t,z,S)}else T&&(t[`__${B}`]=void 0)}else if(v==="style")wr(t,v,x);else if(v==="autofocus")$i(t,!!x);else if(!i&&(v==="__value"||v==="value"&&x!=null))t.value=t.__value=x;else if(v==="selected"&&u)os(t,x);else{var p=v;s||(p=Pi(p));var k=p==="defaultValue"||p==="defaultChecked";if(x==null&&!i&&!k)if(a[v]=null,p==="value"||p==="checked"){let S=t;const F=e===void 0;if(p==="value"){let B=S.defaultValue;S.removeAttribute(p),S.defaultValue=B,S.value=S.__value=F?B:null}else{let B=S.defaultChecked;S.removeAttribute(p),S.defaultChecked=B,S.checked=F?B:!1}}else t.removeAttribute(v);else k||d.includes(p)&&(i||typeof x!="string")?t[p]=x:typeof x!="function"&&wr(t,p,x)}}}return c&&q(!0),l}function is(t,e,r=[],n,o=!1,a=Pt){const i=r.map(a);var s=void 0,c={},l=t.nodeName==="SELECT",u=!1;if(_e(()=>{var d=e(...i.map(R)),m=as(t,s,d,n,o);u&&l&&"value"in d&&pn(t,d.value);for(let b of Object.getOwnPropertySymbols(c))d[b]||Y(c[b]);for(let b of Object.getOwnPropertySymbols(d)){var _=d[b];b.description===Wa&&(!s||_!==s[b])&&(c[b]&&Y(c[b]),c[b]=K(()=>Xi(t,()=>_))),m[b]=_}s=m}),l){var f=t;vr(()=>{pn(f,s.value,!0),ns(f)})}u=!0}function No(t){return t.__attributes??={[Mo]:t.nodeName.includes("-"),[jo]:t.namespaceURI===Va}}var Lo=new Map;function Po(t){var e=Lo.get(t.nodeName);if(e)return e;Lo.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=qa(n);for(var a in r)r[a].set&&e.push(a);n=jn(n)}return e}function Bo(t,e){return t===e||t?.[Fe]===e}function Fo(t={},e,r,n){return vr(()=>{var o,a;return oo(()=>{o=a,a=[],en(()=>{t!==r(...a)&&(e(t,...a),o&&Bo(r(...o),t)&&e(null,...o))})}),()=>{_t(()=>{a&&Bo(r(...a),t)&&e(null,...a)})}}),t}let xr=!1;function ss(t){var e=xr;try{return xr=!1,[t(),xr]}finally{xr=e}}const ls={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 Do(t,e,r){return new Proxy({props:t,exclude:e},ls)}const cs={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(jt(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];jt(o)&&(o=o());const a=Ee(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(jt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=Ee(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Fe||e===Gr)return!1;for(let r of t.props)if(jt(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(jt(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function us(...t){return new Proxy({props:t},cs)}function U(t,e,r,n){var o=!Nt||(r&Pa)!==0,a=(r&Fa)!==0,i=(r&Da)!==0,s=n,c=!0,l=()=>(c&&(c=!1,s=i?en(n):n),s),u;if(a){var f=Fe in t||Gr in t;u=Ee(t,e)?.set??(f&&e in t?v=>t[e]=v:void 0)}var d,m=!1;a?[d,m]=ss(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=l(),u&&(o&&ai(),u(d)));var _;if(o?_=()=>{var v=t[e];return v===void 0?l():(c=!0,v)}:_=()=>{var v=t[e];return v!==void 0&&(s=void 0),v===void 0?s:v},o&&(r&Ba)===0)return _;if(u){var b=t.$$legacy;return function(v,x){return arguments.length>0?((!o||!x||b||m)&&u(x?_():v),v):_()}}var T=!1,p=((r&La)!==0?Pt:hr)(()=>(T=!1,_()));a&&R(p);var k=j;return function(v,x){if(arguments.length>0){const S=x?R(p):o&&a?bt(v):v;return Q(p,S),T=!0,s!==void 0&&(s=S),v}return Ze&&T||(k.f&fr)!==0?p.v:R(p)}}var ds=pt|Ur|ur;function fs(t,e,r){new hs(t,e,r)}class hs{#e;#t;#i;#s;#n;#o=null;#r=null;#a=!1;constructor(e,r,n){this.#e=e,this.#i=r,this.#s=n,this.#t=I,this.#n=_e(()=>{j.b=this,E&&ge();try{this.#o=K(()=>n(this.#e))}catch(o){this.error(o)}},ds),E&&(this.#e=I)}#l(e){var r=j,n=P,o=G;we(this.#n),te(this.#n),vt(this.#n.ctx);try{return e()}finally{we(r),te(n),vt(o)}}error(e){var r=this.#i.onerror;let n=this.#i.failed;const o=()=>{this.#r!==null&&Ie(this.#r,()=>{this.#r=null}),this.#o=this.#l(()=>(this.#a=!1,K(()=>this.#s(this.#e))))};if(this.#a||!r&&!n)throw e;var a=P;try{te(null),r?.(e,o)}finally{te(a)}this.#o&&(Y(this.#o),this.#o=null),this.#r&&(Y(this.#r),this.#r=null),E&&(H(this.#t),Yn(),H(Dt())),n&&_t(()=>{this.#r=this.#l(()=>{this.#a=!0;try{return K(()=>{n(this.#e,()=>e,()=>o)})}catch(i){return Jr(i,this.#n.parent),null}finally{this.#a=!1}})})}}function ps(t){return new vs(t)}class vs{#e;#t;constructor(e){var r=new Map,n=(a,i)=>{var s=pr(i,!1,!1);return r.set(a,s),s};const o=new Proxy({...e.props||{},$$events:{}},{get(a,i){return R(r.get(i)??n(i,Reflect.get(a,i)))},has(a,i){return i===Gr?!0:(R(r.get(i)??n(i,Reflect.get(a,i))),Reflect.has(a,i))},set(a,i,s){return Q(r.get(i)??n(i,s),s),Reflect.set(a,i,s)}});this.#t=(e.hydrate?Vi:Co)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Z(),this.#e=o.$$events;for(const a of Object.keys(this.#t))a==="$set"||a==="$destroy"||a==="$on"||sr(this,a,{get(){return this.#t[a]},set(i){this.#t[a]=i},enumerable:!0});this.#t.$set=a=>{Object.assign(o,a)},this.#t.$destroy=()=>{Ui(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...o)=>r.call(this,...o);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}let zo;typeof HTMLElement=="function"&&(zo=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return o=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),D(o,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=ms(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=Cr(o,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ps({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=gi(()=>{oo(()=>{this.$$r=!0;for(const n of ir(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const o=Cr(n,this.$$d[n],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,o)}this.$$r=!1})});for(const n in this.$$l)for(const o of this.$$l[n]){const a=this.$$c.$on(n,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Cr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return ir(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Cr(t,e,r,n){const o=r[t]?.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 ms(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Qt(t,e,r,n,o,a){let i=class extends zo{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return ir(e).map(s=>(e[s].attribute||s).toLowerCase())}};return ir(e).forEach(s=>{sr(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){c=Cr(s,c,e),this.$$d[s]=c;var l=this.$$c;if(l){var u=Ee(l,s)?.get;u?l[s]=c:l.$set({[s]:c})}}})}),n.forEach(s=>{sr(i.prototype,s,{get(){return this.$$c?.[s]}})}),t.element=i,i}var gs=(t,e)=>e()(),bs=me('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),ks=me(" <!>",1);const _s={hash:"svelte-4thrqu",code:`
1
+ var LiipGPTButton=function(Fr){"use strict";const Ia="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Ia);const Ma=1,ja=2,Na=16,La=1,Pa=2,Ba=4,Fa=8,za=16,Da=1,Za=2,or="[",ar="[!",zr="]",Je={},q=Symbol(),Va="http://www.w3.org/1999/xhtml",Ua="http://www.w3.org/2000/svg",qa="@attach",Mn=!1;var ir=Array.isArray,Wa=Array.prototype.indexOf,Dr=Array.from,sr=Object.keys,lr=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,Ga=Object.getOwnPropertyDescriptors,Ha=Object.prototype,Ya=Array.prototype,jn=Object.getPrototypeOf,Nn=Object.isExtensible;function jt(t){return typeof t=="function"}const cr=()=>{};function Ln(t){return typeof t?.then=="function"}function Pn(t){for(var e=0;e<t.length;e++)t[e]()}const re=2,Zr=4,ur=8,Vr=16,$e=32,Xe=64,dr=128,ne=256,fr=512,oe=1024,Ae=2048,et=4096,Oe=8192,hr=16384,Bn=32768,pt=65536,Fn=1<<17,zn=1<<18,Ur=1<<19,qr=1<<20,Dn=1<<21,Fe=Symbol("$state"),Wr=Symbol("legacy props"),Qa=Symbol(""),Zn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ka=1,Ja=3,tt=8;function Vn(t){return t===this.v}function Xa(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Un(t){return!Xa(t,this.v)}function ei(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ti(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ri(t){throw new Error("https://svelte.dev/e/effect_orphan")}function ni(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function oi(){throw new Error("https://svelte.dev/e/hydration_failed")}function ai(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ii(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function li(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Nt=!1,ci=!1;function ui(){Nt=!0}let W=null;function mt(t){W=t}function vt(t,e=!1,r){W={p:W,c:null,e:null,s:t,x:null,l:null},Nt&&!e&&(W.l={s:null,u:null,r1:[],r2:nt(!1)})}function gt(t){var e=W,r=e.e;if(r!==null){e.e=null;for(var n of r)no(n)}return t!==void 0&&(e.x=t),W=e.p,t??{}}function Lt(){return!Nt||W!==null&&W.l===null}function bt(t){if(typeof t!="object"||t===null||Fe in t)return t;const e=jn(t);if(e!==Ha&&e!==Ya)return t;var r=new Map,n=ir(t),o=ae(0),a=it,i=s=>{if(it===a)return s();var c=P,l=it;te(null),mo(a);var u=s();return te(c),mo(l),u};return n&&r.set("length",ae(t.length)),new Proxy(t,{defineProperty(s,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ii();var u=r.get(c);return u===void 0?u=i(()=>{var f=ae(l.value);return r.set(c,f),f}):Q(u,l.value,!0),!0},deleteProperty(s,c){var l=r.get(c);if(l===void 0){if(c in s){const d=i(()=>ae(q));r.set(c,d),Hr(o)}}else{if(n&&typeof c=="string"){var u=r.get("length"),f=Number(c);Number.isInteger(f)&&f<u.v&&Q(u,f)}Q(l,q),Hr(o)}return!0},get(s,c,l){if(c===Fe)return t;var u=r.get(c),f=c in s;if(u===void 0&&(!f||Ee(s,c)?.writable)&&(u=i(()=>{var v=bt(f?s[c]:q),_=ae(v);return _}),r.set(c,u)),u!==void 0){var d=R(u);return d===q?void 0:d}return Reflect.get(s,c,l)},getOwnPropertyDescriptor(s,c){var l=Reflect.getOwnPropertyDescriptor(s,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=R(u))}else if(l===void 0){var f=r.get(c),d=f?.v;if(f!==void 0&&d!==q)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return l},has(s,c){if(c===Fe)return!0;var l=r.get(c),u=l!==void 0&&l.v!==q||Reflect.has(s,c);if(l!==void 0||j!==null&&(!u||Ee(s,c)?.writable)){l===void 0&&(l=i(()=>{var d=u?bt(s[c]):q,v=ae(d);return v}),r.set(c,l));var f=R(l);if(f===q)return!1}return u},set(s,c,l,u){var f=r.get(c),d=c in s;if(n&&c==="length")for(var v=l;v<f.v;v+=1){var _=r.get(v+"");_!==void 0?Q(_,q):v in s&&(_=i(()=>ae(q)),r.set(v+"",_))}if(f===void 0)(!d||Ee(s,c)?.writable)&&(f=i(()=>ae(void 0)),Q(f,bt(l)),r.set(c,f));else{d=f.v!==q;var b=i(()=>bt(l));Q(f,b)}var T=Reflect.getOwnPropertyDescriptor(s,c);if(T?.set&&T.set.call(u,l),!d){if(n&&typeof c=="string"){var p=r.get("length"),k=Number(c);Number.isInteger(k)&&k>=p.v&&Q(p,k+1)}Hr(o)}return!0},ownKeys(s){R(o);var c=Reflect.ownKeys(s).filter(f=>{var d=r.get(f);return d===void 0||d.v!==q});for(var[l,u]of r)u.v!==q&&!(l in s)&&c.push(l);return c},setPrototypeOf(){si()}})}function qn(t){try{if(t!==null&&typeof t=="object"&&Fe in t)return t[Fe]}catch{}return t}function di(t,e){return Object.is(qn(t),qn(e))}function Pt(t){var e=re|Ae,r=P!==null&&(P.f&re)!==0?P:null;return j===null||r!==null&&(r.f&ne)!==0?e|=ne:j.f|=Ur,{ctx:W,deps:null,effects:null,equals:Vn,f:e,fn:t,reactions:null,rv:0,v:q,wv:0,parent:r??j,ac:null}}function me(t){const e=Pt(t);return po(e),e}function pr(t){const e=Pt(t);return e.equals=Un,e}function Wn(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Y(e[r])}}function fi(t){for(var e=t.parent;e!==null;){if((e.f&re)===0)return e;e=e.parent}return null}function Gr(t){var e,r=j;we(fi(t));try{Wn(t),e=bo(t)}finally{we(r)}return e}function Gn(t){var e=Gr(t);if(t.equals(e)||(t.v=e,t.wv=vo()),!Ze){var r=(Ve||(t.f&ne)!==0)&&t.deps!==null?et:oe;xe(t,r)}}const rt=new Map;function nt(t,e){var r={f:0,v:t,reactions:null,equals:Vn,rv:0,wv:0};return r}function ae(t,e){const r=nt(t);return po(r),r}function mr(t,e=!1,r=!0){const n=nt(t);return e||(n.equals=Un),Nt&&r&&W!==null&&W.l!==null&&(W.l.s??=[]).push(n),n}function Q(t,e,r=!1){P!==null&&(!ye||(P.f&Fn)!==0)&&Lt()&&(P.f&(re|Vr|Fn))!==0&&!Me?.includes(t)&&li();let n=r?bt(e):e;return Bt(t,n)}function Bt(t,e){if(!t.equals(e)){var r=t.v;Ze?rt.set(t,e):rt.set(t,r),t.v=e,(t.f&re)!==0&&((t.f&Ae)!==0&&Gr(t),xe(t,(t.f&ne)===0?oe:et)),t.wv=vo(),Hn(t,Ae),Lt()&&j!==null&&(j.f&oe)!==0&&(j.f&($e|Xe))===0&&(ue===null?xi([t]):ue.push(t))}return e}function Hr(t){Q(t,t.v+1)}function Hn(t,e){var r=t.reactions;if(r!==null)for(var n=Lt(),o=r.length,a=0;a<o;a++){var i=r[a],s=i.f;(s&Ae)===0&&(!n&&i===j||(xe(i,e),(s&(oe|ne))!==0&&((s&re)!==0?Hn(i,et):_r(i))))}}function Ft(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function hi(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let E=!1;function G(t){E=t}let I;function H(t){if(t===null)throw Ft(),Je;return I=t}function ge(){return H(ce(I))}function be(t){if(E){if(ce(I)!==null)throw Ft(),Je;I=t}}function Yn(t=1){if(E){for(var e=t,r=I;e--;)r=ce(r);I=r}}function zt(){for(var t=0,e=I;;){if(e.nodeType===tt){var r=e.data;if(r===zr){if(t===0)return e;t-=1}else(r===or||r===ar)&&(t+=1)}var n=ce(e);e.remove(),e=n}}function Qn(t){if(!t||t.nodeType!==tt)throw Ft(),Je;return t.data}var Kn,Jn,Xn,eo;function Yr(){if(Kn===void 0){Kn=window,Jn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Xn=Ee(e,"firstChild").get,eo=Ee(e,"nextSibling").get,Nn(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Nn(r)&&(r.__t=void 0)}}function kt(t=""){return document.createTextNode(t)}function le(t){return Xn.call(t)}function ce(t){return eo.call(t)}function ke(t,e){if(!E)return le(t);var r=le(I);return r===null&&(r=I.appendChild(kt())),H(r),r}function ee(t,e){if(!E){var r=le(t);return r instanceof Comment&&r.data===""?ce(r):r}return I}function ze(t,e=1,r=!1){let n=E?I:t;for(var o;e--;)o=n,n=ce(n);if(!E)return n;if(r&&n?.nodeType!==Ja){var a=kt();return n===null?o?.after(a):n.before(a),H(a),a}return H(n),n}function to(t){t.textContent=""}function pi(t){j===null&&P===null&&ri(),P!==null&&(P.f&ne)!==0&&j===null&&ti(),Ze&&ei()}function mi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function De(t,e,r,n=!0){var o=j,a={ctx:W,deps:null,nodes_start:null,nodes_end:null,f:t|Ae,first:null,fn:e,last:null,next:null,parent:o,b:o&&o.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Xr(a),a.f|=Bn}catch(c){throw Y(a),c}else e!==null&&_r(a);var i=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(Ur|dr))===0;if(!i&&n&&(o!==null&&mi(a,o),P!==null&&(P.f&re)!==0)){var s=P;(s.effects??=[]).push(a)}return a}function ro(t){const e=De(ur,null,!1);return xe(e,oe),e.teardown=t,e}function vi(t){if(pi(),!P&&j&&(j.f&$e)!==0){var e=W;(e.e??=[]).push(t)}else return no(t)}function no(t){return De(Zr|Dn,t,!1)}function gi(t){const e=De(Xe,t,!0);return()=>{Y(e)}}function bi(t){const e=De(Xe,t,!0);return(r={})=>new Promise(n=>{r.outro?Ie(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function vr(t){return De(Zr,t,!1)}function oo(t){return De(ur,t,!0)}function Dt(t,e=[],r=Pt){const n=e.map(r);return _e(()=>t(...n.map(R)))}function _e(t,e=0){var r=De(ur|Vr|e,t,!0);return r}function K(t,e=!0){return De(ur|$e,t,!0,e)}function ao(t){var e=t.teardown;if(e!==null){const r=Ze,n=P;ho(!0),te(null);try{e.call(null)}finally{ho(r),te(n)}}}function io(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){r.ac?.abort(Zn);var n=r.next;(r.f&Xe)!==0?r.parent=null:Y(r,e),r=n}}function ki(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&$e)===0&&Y(e),e=r}}function Y(t,e=!0){var r=!1;(e||(t.f&zn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(so(t.nodes_start,t.nodes_end),r=!0),io(t,e&&!r),kr(t,0),xe(t,hr);var n=t.transitions;if(n!==null)for(const a of n)a.stop();ao(t);var o=t.parent;o!==null&&o.first!==null&&lo(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function so(t,e){for(;t!==null;){var r=t===e?null:ce(t);t.remove(),t=r}}function lo(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 Ie(t,e){var r=[];Qr(t,r,!0),co(r,()=>{Y(t),e&&e()})}function co(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function Qr(t,e,r){if((t.f&Oe)===0){if(t.f^=Oe,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&pt)!==0||(n.f&$e)!==0;Qr(n,e,a?r:!1),n=o}}}function ot(t){uo(t,!0)}function uo(t,e){if((t.f&Oe)!==0){t.f^=Oe;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&pt)!==0||(r.f&$e)!==0;uo(r,o?e:!1),r=n}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||e)&&a.in()}}let Zt=[],Kr=[];function fo(){var t=Zt;Zt=[],Pn(t)}function _i(){var t=Kr;Kr=[],Pn(t)}function _t(t){Zt.length===0&&queueMicrotask(fo),Zt.push(t)}function yi(){Zt.length>0&&fo(),Kr.length>0&&_i()}function wi(t){var e=j;if((e.f&Bn)===0){if((e.f&dr)===0)throw t;e.fn(t)}else Jr(t,e)}function Jr(t,e){for(;e!==null;){if((e.f&dr)!==0)try{e.b.error(t);return}catch{}e=e.parent}throw t}let Vt=!1,Ut=null,at=!1,Ze=!1;function ho(t){Ze=t}let qt=[],uc=[],P=null,ye=!1;function te(t){P=t}let j=null;function we(t){j=t}let Me=null;function po(t){P!==null&&P.f&qr&&(Me===null?Me=[t]:Me.push(t))}let J=null,ie=0,ue=null;function xi(t){ue=t}let gr=1,Wt=0,it=Wt;function mo(t){it=t}let Ve=!1;function vo(){return++gr}function br(t){var e=t.f;if((e&Ae)!==0)return!0;if((e&et)!==0){var r=t.deps,n=(e&ne)!==0;if(r!==null){var o,a,i=(e&fr)!==0,s=n&&j!==null&&!Ve,c=r.length;if(i||s){var l=t,u=l.parent;for(o=0;o<c;o++)a=r[o],(i||!a?.reactions?.includes(l))&&(a.reactions??=[]).push(l);i&&(l.f^=fr),s&&u!==null&&(u.f&ne)===0&&(l.f^=ne)}for(o=0;o<c;o++)if(a=r[o],br(a)&&Gn(a),a.wv>t.wv)return!0}(!n||j!==null&&!Ve)&&xe(t,oe)}return!1}function go(t,e,r=!0){var n=t.reactions;if(n!==null&&!Me?.includes(t))for(var o=0;o<n.length;o++){var a=n[o];(a.f&re)!==0?go(a,e,!1):e===a&&(r?xe(a,Ae):(a.f&oe)!==0&&xe(a,et),_r(a))}}function bo(t){var e=J,r=ie,n=ue,o=P,a=Ve,i=Me,s=W,c=ye,l=it,u=t.f;J=null,ie=0,ue=null,Ve=(u&ne)!==0&&(ye||!at||P===null),P=(u&($e|Xe))===0?t:null,Me=null,mt(t.ctx),ye=!1,it=++Wt,t.f|=qr,t.ac!==null&&(t.ac.abort(Zn),t.ac=null);try{var f=(0,t.fn)(),d=t.deps;if(J!==null){var v;if(kr(t,ie),d!==null&&ie>0)for(d.length=ie+J.length,v=0;v<J.length;v++)d[ie+v]=J[v];else t.deps=d=J;if(!Ve||(u&re)!==0&&t.reactions!==null)for(v=ie;v<d.length;v++)(d[v].reactions??=[]).push(t)}else d!==null&&ie<d.length&&(kr(t,ie),d.length=ie);if(Lt()&&ue!==null&&!ye&&d!==null&&(t.f&(re|et|Ae))===0)for(v=0;v<ue.length;v++)go(ue[v],t);return o!==null&&o!==t&&(Wt++,ue!==null&&(n===null?n=ue:n.push(...ue))),f}catch(_){wi(_)}finally{J=e,ie=r,ue=n,P=o,Ve=a,Me=i,mt(s),ye=c,it=l,t.f^=qr}}function Ci(t,e){let r=e.reactions;if(r!==null){var n=Wa.call(r,t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&(e.f&re)!==0&&(J===null||!J.includes(e))&&(xe(e,et),(e.f&(ne|fr))===0&&(e.f^=fr),Wn(e),kr(e,0))}function kr(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Ci(t,r[n])}function Xr(t){var e=t.f;if((e&hr)===0){xe(t,oe);var r=j,n=at;j=t,at=!0;try{(e&Vr)!==0?ki(t):io(t),ao(t);var o=bo(t);t.teardown=typeof o=="function"?o:null,t.wv=gr;var a;Mn&&ci&&(t.f&Ae)!==0&&t.deps}finally{at=n,j=r}}}function Ri(){try{ni()}catch(t){if(Ut!==null)Jr(t,Ut);else throw t}}function ko(){var t=at;try{var e=0;for(at=!0;qt.length>0;){e++>1e3&&Ri();var r=qt,n=r.length;qt=[];for(var o=0;o<n;o++){var a=Ti(r[o]);Si(a)}rt.clear()}}finally{Vt=!1,at=t,Ut=null}}function Si(t){var e=t.length;if(e!==0){for(var r=0;r<e;r++){var n=t[r];if((n.f&(hr|Oe))===0&&br(n)){var o=gr;if(Xr(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?lo(n):n.fn=null),gr>o&&(n.f&Dn)!==0)break}}for(;r<e;r+=1)_r(t[r])}}function _r(t){Vt||(Vt=!0,queueMicrotask(ko));for(var e=Ut=t;e.parent!==null;){e=e.parent;var r=e.f;if((r&(Xe|$e))!==0){if((r&oe)===0)return;e.f^=oe}}qt.push(e)}function Ti(t){for(var e=[],r=t;r!==null;){var n=r.f,o=(n&($e|Xe))!==0,a=o&&(n&oe)!==0;if(!a&&(n&Oe)===0){(n&Zr)!==0?e.push(r):o?r.f^=oe:br(r)&&Xr(r);var i=r.first;if(i!==null){r=i;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return e}function Z(t){for(var e;;){if(yi(),qt.length===0)return Vt=!1,Ut=null,e;Vt=!0,ko()}}function R(t){var e=t.f,r=(e&re)!==0;if(P!==null&&!ye){if(!Me?.includes(t)){var n=P.deps;t.rv<Wt&&(t.rv=Wt,J===null&&n!==null&&n[ie]===t?ie++:J===null?J=[t]:(!Ve||!J.includes(t))&&J.push(t))}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&ne)===0&&(o.f^=ne)}if(r&&!Ze&&(o=t,br(o)&&Gn(o)),Ze){if(rt.has(t))return rt.get(t);if(r){o=t;var i=o.v;return((o.f&oe)!==0||_o(o))&&(i=Gr(o)),rt.set(o,i),i}}return t.v}function _o(t){if(t.v===q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(rt.has(e)||(e.f&re)!==0&&_o(e))return!0;return!1}function en(t){var e=ye;try{return ye=!0,t()}finally{ye=e}}const Ei=-7169;function xe(t,e){t.f=t.f&Ei|e}function $i(t,e){if(e){const r=document.body;t.autofocus=!0,_t(()=>{document.activeElement===r&&t.focus()})}}function Ai(t){var e=P,r=j;te(null),we(null);try{return t()}finally{te(e),we(r)}}const yo=new Set,tn=new Set;function wo(t,e,r,n={}){function o(a){if(n.capture||Gt.call(e,a),!a.cancelBubble)return Ai(()=>r?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?_t(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function yr(t,e,r,n,o){var a={capture:n,passive:o},i=wo(t,e,r,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ro(()=>{e.removeEventListener(t,i,a)})}function rn(t){for(var e=0;e<t.length;e++)yo.add(t[e]);for(var r of tn)r(t)}function Gt(t){var e=this,r=e.ownerDocument,n=t.type,o=t.composedPath?.()||[],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){lr(t,"currentTarget",{configurable:!0,get(){return a||r}});var u=P,f=j;te(null),we(null);try{for(var d,v=[];a!==null;){var _=a.assignedSlot||a.parentNode||a.host||null;try{var b=a["__"+n];if(b!=null&&(!a.disabled||t.target===a))if(ir(b)){var[T,...p]=b;T.apply(a,[t,...p])}else b.call(a,t)}catch(k){d?v.push(k):d=k}if(t.cancelBubble||_===e||_===null)break;a=_}if(d){for(let k of v)queueMicrotask(()=>{throw k});throw d}}finally{t.__root=e,delete t.currentTarget,te(u),we(f)}}}let de;function Oi(){de=void 0}function Ii(t){let e=null,r=E;var n;if(E){for(e=I,de===void 0&&(de=le(document.head));de!==null&&(de.nodeType!==tt||de.data!==or);)de=ce(de);de===null?G(!1):de=H(ce(de))}E||(n=document.head.appendChild(kt()));try{_e(()=>t(n),zn)}finally{r&&(G(!0),de=I,H(e))}}function xo(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function je(t,e){var r=j;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function ve(t,e){var r=(e&Da)!==0,n=(e&Za)!==0,o,a=!t.startsWith("<!>");return()=>{if(E)return je(I,null),I;o===void 0&&(o=xo(a?t:"<!>"+t),r||(o=le(o)));var i=n||Jn?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=le(i),c=i.lastChild;je(s,c)}else je(i,i);return i}}function Ce(){if(E)return je(I,null),I;var t=document.createDocumentFragment(),e=document.createComment(""),r=kt();return t.append(e,r),je(e,r),t}function z(t,e){if(E){j.nodes_end=I,ge();return}t!==null&&t.before(e)}function Mi(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ji=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ni(t){return ji.includes(t)}const Li={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Pi(t){return t=t.toLowerCase(),Li[t]??t}const Bi=["touchstart","touchmove"];function Fi(t){return Bi.includes(t)}const zi=["textarea","script","style","title"];function Di(t){return zi.includes(t)}function Zi(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Co(t,e){return Ro(t,e)}function Vi(t,e){Yr(),e.intro=e.intro??!1;const r=e.target,n=E,o=I;try{for(var a=le(r);a&&(a.nodeType!==tt||a.data!==or);)a=ce(a);if(!a)throw Je;G(!0),H(a),ge();const i=Ro(t,{...e,anchor:a});if(I===null||I.nodeType!==tt||I.data!==zr)throw Ft(),Je;return G(!1),i}catch(i){if(i===Je)return e.recover===!1&&oi(),Yr(),to(r),G(!1),Co(t,e);throw i}finally{G(n),H(o),Oi()}}const yt=new Map;function Ro(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:i=!0}){Yr();var s=new Set,c=f=>{for(var d=0;d<f.length;d++){var v=f[d];if(!s.has(v)){s.add(v);var _=Fi(v);e.addEventListener(v,Gt,{passive:_});var b=yt.get(v);b===void 0?(document.addEventListener(v,Gt,{passive:_}),yt.set(v,1)):yt.set(v,b+1)}}};c(Dr(yo)),tn.add(c);var l=void 0,u=bi(()=>{var f=r??e.appendChild(kt());return K(()=>{if(a){vt({});var d=W;d.c=a}o&&(n.$$events=o),E&&je(f,null),l=t(f,n)||{},E&&(j.nodes_end=I),a&&gt()}),()=>{for(var d of s){e.removeEventListener(d,Gt);var v=yt.get(d);--v===0?(document.removeEventListener(d,Gt),yt.delete(d)):yt.set(d,v)}tn.delete(c),f!==r&&f.parentNode?.removeChild(f)}});return nn.set(l,u),l}let nn=new WeakMap;function Ui(t,e){const r=nn.get(t);return r?(nn.delete(t),r(e)):Promise.resolve()}function on(t,e,...r){var n=t,o=cr,a;_e(()=>{o!==(o=e())&&(a&&(Y(a),a=null),a=K(()=>o(n,...r)))},pt),E&&(n=I)}const an=0,wr=1,sn=2;function So(t,e,r,n,o){E&&ge();var a=t,i=Lt(),s=W,c=q,l,u,f,d=i?nt(void 0):mr(void 0,!1,!1),v=i?nt(void 0):mr(void 0,!1,!1),_=!1;function b(p,k){_=!0,k&&(we(T),te(T),mt(s));try{p===an&&r&&(l?ot(l):l=K(()=>r(a))),p===wr&&n&&(u?ot(u):u=K(()=>n(a,d))),p!==an&&l&&Ie(l,()=>l=null),p!==wr&&u&&Ie(u,()=>u=null),p!==sn&&f&&Ie(f,()=>f=null)}finally{k&&(mt(null),te(null),we(null),Z())}}var T=_e(()=>{if(c===(c=e()))return;let p=E&&Ln(c)===(a.data===ar);if(p&&(a=zt(),H(a),G(!1),p=!0),Ln(c)){var k=c;_=!1,k.then(m=>{k===c&&(Bt(d,m),b(wr,!0))},m=>{if(k===c)throw Bt(v,m),b(sn,!0),v.v}),E?r&&(l=K(()=>r(a))):_t(()=>{_||b(an,!0)})}else Bt(d,c),b(wr,!1);return p&&G(!0),()=>c=q});E&&(a=I)}function Ne(t,e,[r,n]=[0,0]){E&&r===0&&ge();var o=t,a=null,i=null,s=q,c=r>0?pt:0,l=!1;const u=(d,v=!0)=>{l=!0,f(v,d)},f=(d,v)=>{if(s===(s=d))return;let _=!1;if(E&&n!==-1){if(r===0){const T=Qn(o);T===or?n=0:T===ar?n=1/0:(n=parseInt(T.substring(1)),n!==n&&(n=s?1/0:-1))}const b=n>r;!!s===b&&(o=zt(),H(o),G(!1),_=!0,n=-1)}s?(a?ot(a):v&&(a=K(()=>v(o))),i&&Ie(i,()=>{i=null})):(i?ot(i):v&&(i=K(()=>v(o,[r+1,n]))),a&&Ie(a,()=>{a=null})),_&&G(!0)};_e(()=>{l=!1,e(u),l||f(null,null)},c),E&&(o=I)}function qi(t,e){return e}function Wi(t,e,r,n){for(var o=[],a=e.length,i=0;i<a;i++)Qr(e[i].e,o,!0);var s=a>0&&o.length===0&&r!==null;if(s){var c=r.parentNode;to(c),c.append(r),n.clear(),Ue(t,e[0].prev,e[a-1].next)}co(o,()=>{for(var l=0;l<a;l++){var u=e[l];s||(n.delete(u.k),Ue(t,u.prev,u.next)),Y(u.e,!s)}})}function Gi(t,e,r,n,o,a=null){var i=t,s={flags:e,items:new Map,first:null};E&&ge();var c=null,l=!1,u=pr(()=>{var f=r();return ir(f)?f:f==null?[]:Dr(f)});_e(()=>{var f=R(u),d=f.length;if(l&&d===0)return;l=d===0;let v=!1;if(E){var _=Qn(i)===ar;_!==(d===0)&&(i=zt(),H(i),G(!1),v=!0)}if(E){for(var b=null,T,p=0;p<d;p++){if(I.nodeType===tt&&I.data===zr){i=I,v=!0,G(!1);break}var k=f[p],m=n(k,p);T=To(I,s,b,null,k,m,p,o,e,r),s.items.set(m,T),b=T}d>0&&H(zt())}E||Hi(f,s,i,o,e,n,r),a!==null&&(d===0?c?ot(c):c=K(()=>a(i)):c!==null&&Ie(c,()=>{c=null})),v&&G(!0),R(u)}),E&&(i=I)}function Hi(t,e,r,n,o,a,i){var s=t.length,c=e.items,l=e.first,u=l,f,d=null,v=[],_=[],b,T,p,k;for(k=0;k<s;k+=1){if(b=t[k],T=a(b,k),p=c.get(T),p===void 0){var m=u?u.e.nodes_start:r;d=To(m,e,d,d===null?e.first:d.next,b,T,k,n,o,i),c.set(T,d),v=[],_=[],u=d.next;continue}if(Yi(p,b,k),(p.e.f&Oe)!==0&&ot(p.e),p!==u){if(f!==void 0&&f.has(p)){if(v.length<_.length){var x=_[0],S;d=x.prev;var F=v[0],B=v[v.length-1];for(S=0;S<v.length;S+=1)Eo(v[S],x,r);for(S=0;S<_.length;S+=1)f.delete(_[S]);Ue(e,F.prev,B.next),Ue(e,d,F),Ue(e,B,x),u=x,d=B,k-=1,v=[],_=[]}else f.delete(p),Eo(p,u,r),Ue(e,p.prev,p.next),Ue(e,p,d===null?e.first:d.next),Ue(e,d,p),d=p;continue}for(v=[],_=[];u!==null&&u.k!==T;)(u.e.f&Oe)===0&&(f??=new Set).add(u),_.push(u),u=u.next;if(u===null)continue;p=u}v.push(p),d=p,u=p.next}if(u!==null||f!==void 0){for(var D=f===void 0?[]:Dr(f);u!==null;)(u.e.f&Oe)===0&&D.push(u),u=u.next;var se=D.length;if(se>0){var Be=null;Wi(e,D,Be,c)}}j.first=e.first&&e.first.e,j.last=d&&d.e}function Yi(t,e,r,n){Bt(t.v,e),t.i=r}function To(t,e,r,n,o,a,i,s,c,l){var u=(c&Ma)!==0,f=(c&Na)===0,d=u?f?mr(o,!1,!1):nt(o):o,v=(c&ja)===0?i:nt(i),_={i:v,v:d,k:a,a:null,e:null,prev:r,next:n};try{return _.e=K(()=>s(t,d,v,l),E),_.e.prev=r&&r.e,_.e.next=n&&n.e,r===null?e.first=_:(r.next=_,r.e.next=_.e),n!==null&&(n.prev=_,n.e.prev=_.e),_}finally{}}function Eo(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=ce(a);o.before(a),a=i}}function Ue(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 ln(t,e,r=!1,n=!1,o=!1){var a=t,i="";Dt(()=>{var s=j;if(i===(i=e()??"")){E&&ge();return}if(s.nodes_start!==null&&(so(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),i!==""){if(E){I.data;for(var c=ge(),l=c;c!==null&&(c.nodeType!==tt||c.data!=="");)l=c,c=ce(c);if(c===null)throw Ft(),Je;je(I,l),a=H(c);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var f=xo(u);if((r||n)&&(f=le(f)),je(le(f),f.lastChild),r||n)for(;le(f);)a.before(le(f));else a.before(f)}})}function Qi(t,e,r,n,o,a){let i=E;E&&ge();var s,c,l=null;E&&I.nodeType===Ka&&(l=I,ge());var u=E?I:t,f;_e(()=>{const d=e()||null;var v=d==="svg"?Ua:null;d!==s&&(f&&(d===null?Ie(f,()=>{f=null,c=null}):d===c?ot(f):Y(f)),d&&d!==c&&(f=K(()=>{if(l=E?l:v?document.createElementNS(v,d):document.createElement(d),je(l,l),n){E&&Di(d)&&l.append(document.createComment(""));var _=E?le(l):l.appendChild(kt());E&&(_===null?G(!1):H(_)),n(l,_)}j.nodes_end=l,u.before(l)})),s=d,s&&(c=s))},pt),i&&(G(!0),H(u))}function Ki(t,e){_t(()=>{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 Ji(t,e,r){vr(()=>{var n=en(()=>e(t,r?.())||{});if(n?.destroy)return()=>n.destroy()})}function Xi(t,e){var r=void 0,n;_e(()=>{r!==(r=e())&&(n&&(Y(n),n=null),r&&(n=K(()=>{vr(()=>r(t))})))})}function $o(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=$o(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function es(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=$o(t))&&(n&&(n+=" "),n+=e);return n}function cn(t){return typeof t=="object"?es(t):t??""}const Ao=[...`
2
+ \r\f \v\uFEFF`];function ts(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var o in r)if(r[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,i=0;(i=n.indexOf(o,i))>=0;){var s=i+a;(i===0||Ao.includes(n[i-1]))&&(s===n.length||Ao.includes(n[s]))?n=(i===0?"":n.substring(0,i))+n.substring(s+1):i=s}}return n===""?null:n}function Oo(t,e=!1){var r=e?" !important;":";",n="";for(var o in t){var a=t[o];a!=null&&a!==""&&(n+=" "+o+": "+a+r)}return n}function un(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function rs(t,e){if(e){var r="",n,o;if(Array.isArray(e)?(n=e[0],o=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,s=!1,c=[];n&&c.push(...Object.keys(n).map(un)),o&&c.push(...Object.keys(o).map(un));var l=0,u=-1;const b=t.length;for(var f=0;f<b;f++){var d=t[f];if(s?d==="/"&&t[f-1]==="*"&&(s=!1):a?a===d&&(a=!1):d==="/"&&t[f+1]==="*"?s=!0:d==='"'||d==="'"?a=d:d==="("?i++:d===")"&&i--,!s&&a===!1&&i===0){if(d===":"&&u===-1)u=f;else if(d===";"||f===b-1){if(u!==-1){var v=un(t.substring(l,u).trim());if(!c.includes(v)){d!==";"&&f++;var _=t.substring(l,f).trim();r+=" "+_+";"}}l=f+1,u=-1}}}}return n&&(r+=Oo(n)),o&&(r+=Oo(o,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function dn(t,e,r,n,o,a){var i=t.__className;if(E||i!==r||i===void 0){var s=ts(r,n,a);(!E||s!==t.getAttribute("class"))&&(s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s)),t.__className=r}else if(a&&o!==a)for(var c in a){var l=!!a[c];(o==null||l!==!!o[c])&&t.classList.toggle(c,l)}return a}function fn(t,e={},r,n){for(var o in r){var a=r[o];e[o]!==a&&(r[o]==null?t.style.removeProperty(o):t.style.setProperty(o,a,n))}}function hn(t,e,r,n){var o=t.__style;if(E||o!==e){var a=rs(e,n);(!E||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(fn(t,r?.[0],n[0]),fn(t,r?.[1],n[1],"important")):fn(t,r,n));return n}function pn(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ir(e))return hi();for(var n of t.options)n.selected=e.includes(Io(n));return}for(n of t.options){var o=Io(n);if(di(o,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function ns(t){var e=new MutationObserver(()=>{pn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ro(()=>{e.disconnect()})}function Io(t){return"__value"in t?t.__value:t.value}const Ht=Symbol("class"),Yt=Symbol("style"),Mo=Symbol("is custom element"),jo=Symbol("is html");function os(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function xr(t,e,r,n){var o=No(t);E&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="loading"&&(t[Qa]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Po(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function as(t,e,r,n,o=!1){var a=No(t),i=a[Mo],s=!a[jo];let c=E&&i;c&&G(!1);var l=e||{},u=t.tagName==="OPTION";for(var f in e)f in r||(r[f]=null);r.class?r.class=cn(r.class):r[Ht]&&(r.class=null),r[Yt]&&(r.style??=null);var d=Po(t);for(const m in r){let x=r[m];if(u&&m==="value"&&x==null){t.value=t.__value="",l[m]=x;continue}if(m==="class"){var v=t.namespaceURI==="http://www.w3.org/1999/xhtml";dn(t,v,x,n,e?.[Ht],r[Ht]),l[m]=x,l[Ht]=r[Ht];continue}if(m==="style"){hn(t,x,e?.[Yt],r[Yt]),l[m]=x,l[Yt]=r[Yt];continue}var _=l[m];if(!(x===_&&!(x===void 0&&t.hasAttribute(m)))){l[m]=x;var b=m[0]+m[1];if(b!=="$$")if(b==="on"){const S={},F="$$"+m;let B=m.slice(2);var T=Ni(B);if(Mi(B)&&(B=B.slice(0,-7),S.capture=!0),!T&&_){if(x!=null)continue;t.removeEventListener(B,l[F],S),l[F]=null}if(x!=null)if(T)t[`__${B}`]=x,rn([B]);else{let D=function(se){l[m].call(this,se)};l[F]=wo(B,t,D,S)}else T&&(t[`__${B}`]=void 0)}else if(m==="style")xr(t,m,x);else if(m==="autofocus")$i(t,!!x);else if(!i&&(m==="__value"||m==="value"&&x!=null))t.value=t.__value=x;else if(m==="selected"&&u)os(t,x);else{var p=m;s||(p=Pi(p));var k=p==="defaultValue"||p==="defaultChecked";if(x==null&&!i&&!k)if(a[m]=null,p==="value"||p==="checked"){let S=t;const F=e===void 0;if(p==="value"){let B=S.defaultValue;S.removeAttribute(p),S.defaultValue=B,S.value=S.__value=F?B:null}else{let B=S.defaultChecked;S.removeAttribute(p),S.defaultChecked=B,S.checked=F?B:!1}}else t.removeAttribute(m);else k||d.includes(p)&&(i||typeof x!="string")?t[p]=x:typeof x!="function"&&xr(t,p,x)}}}return c&&G(!0),l}function is(t,e,r=[],n,o=!1,a=Pt){const i=r.map(a);var s=void 0,c={},l=t.nodeName==="SELECT",u=!1;if(_e(()=>{var d=e(...i.map(R)),v=as(t,s,d,n,o);u&&l&&"value"in d&&pn(t,d.value);for(let b of Object.getOwnPropertySymbols(c))d[b]||Y(c[b]);for(let b of Object.getOwnPropertySymbols(d)){var _=d[b];b.description===qa&&(!s||_!==s[b])&&(c[b]&&Y(c[b]),c[b]=K(()=>Xi(t,()=>_))),v[b]=_}s=v}),l){var f=t;vr(()=>{pn(f,s.value,!0),ns(f)})}u=!0}function No(t){return t.__attributes??={[Mo]:t.nodeName.includes("-"),[jo]:t.namespaceURI===Va}}var Lo=new Map;function Po(t){var e=Lo.get(t.nodeName);if(e)return e;Lo.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=Ga(n);for(var a in r)r[a].set&&e.push(a);n=jn(n)}return e}function Bo(t,e){return t===e||t?.[Fe]===e}function Fo(t={},e,r,n){return vr(()=>{var o,a;return oo(()=>{o=a,a=[],en(()=>{t!==r(...a)&&(e(t,...a),o&&Bo(r(...o),t)&&e(null,...o))})}),()=>{_t(()=>{a&&Bo(r(...a),t)&&e(null,...a)})}}),t}let Cr=!1;function ss(t){var e=Cr;try{return Cr=!1,[t(),Cr]}finally{Cr=e}}const ls={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 zo(t,e,r){return new Proxy({props:t,exclude:e},ls)}const cs={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(jt(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];jt(o)&&(o=o());const a=Ee(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(jt(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const o=Ee(n,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Fe||e===Wr)return!1;for(let r of t.props)if(jt(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(jt(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function us(...t){return new Proxy({props:t},cs)}function U(t,e,r,n){var o=!Nt||(r&Pa)!==0,a=(r&Fa)!==0,i=(r&za)!==0,s=n,c=!0,l=()=>(c&&(c=!1,s=i?en(n):n),s),u;if(a){var f=Fe in t||Wr in t;u=Ee(t,e)?.set??(f&&e in t?m=>t[e]=m:void 0)}var d,v=!1;a?[d,v]=ss(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=l(),u&&(o&&ai(),u(d)));var _;if(o?_=()=>{var m=t[e];return m===void 0?l():(c=!0,m)}:_=()=>{var m=t[e];return m!==void 0&&(s=void 0),m===void 0?s:m},o&&(r&Ba)===0)return _;if(u){var b=t.$$legacy;return function(m,x){return arguments.length>0?((!o||!x||b||v)&&u(x?_():m),m):_()}}var T=!1,p=((r&La)!==0?Pt:pr)(()=>(T=!1,_()));a&&R(p);var k=j;return function(m,x){if(arguments.length>0){const S=x?R(p):o&&a?bt(m):m;return Q(p,S),T=!0,s!==void 0&&(s=S),m}return Ze&&T||(k.f&hr)!==0?p.v:R(p)}}var ds=pt|Ur|dr;function fs(t,e,r){new hs(t,e,r)}class hs{#e;#t;#i;#s;#n;#o=null;#r=null;#a=!1;constructor(e,r,n){this.#e=e,this.#i=r,this.#s=n,this.#t=I,this.#n=_e(()=>{j.b=this,E&&ge();try{this.#o=K(()=>n(this.#e))}catch(o){this.error(o)}},ds),E&&(this.#e=I)}#l(e){var r=j,n=P,o=W;we(this.#n),te(this.#n),mt(this.#n.ctx);try{return e()}finally{we(r),te(n),mt(o)}}error(e){var r=this.#i.onerror;let n=this.#i.failed;const o=()=>{this.#r!==null&&Ie(this.#r,()=>{this.#r=null}),this.#o=this.#l(()=>(this.#a=!1,K(()=>this.#s(this.#e))))};if(this.#a||!r&&!n)throw e;var a=P;try{te(null),r?.(e,o)}finally{te(a)}this.#o&&(Y(this.#o),this.#o=null),this.#r&&(Y(this.#r),this.#r=null),E&&(H(this.#t),Yn(),H(zt())),n&&_t(()=>{this.#r=this.#l(()=>{this.#a=!0;try{return K(()=>{n(this.#e,()=>e,()=>o)})}catch(i){return Jr(i,this.#n.parent),null}finally{this.#a=!1}})})}}function ps(t){return new ms(t)}class ms{#e;#t;constructor(e){var r=new Map,n=(a,i)=>{var s=mr(i,!1,!1);return r.set(a,s),s};const o=new Proxy({...e.props||{},$$events:{}},{get(a,i){return R(r.get(i)??n(i,Reflect.get(a,i)))},has(a,i){return i===Wr?!0:(R(r.get(i)??n(i,Reflect.get(a,i))),Reflect.has(a,i))},set(a,i,s){return Q(r.get(i)??n(i,s),s),Reflect.set(a,i,s)}});this.#t=(e.hydrate?Vi:Co)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Z(),this.#e=o.$$events;for(const a of Object.keys(this.#t))a==="$set"||a==="$destroy"||a==="$on"||lr(this,a,{get(){return this.#t[a]},set(i){this.#t[a]=i},enumerable:!0});this.#t.$set=a=>{Object.assign(o,a)},this.#t.$destroy=()=>{Ui(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...o)=>r.call(this,...o);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}let Do;typeof HTMLElement=="function"&&(Do=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&this.attachShadow({mode:"open"})}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return o=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),z(o,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=vs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=Rr(o,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ps({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=gi(()=>{oo(()=>{this.$$r=!0;for(const n of sr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const o=Rr(n,this.$$d[n],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,o)}this.$$r=!1})});for(const n in this.$$l)for(const o of this.$$l[n]){const a=this.$$c.$on(n,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Rr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return sr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Rr(t,e,r,n){const o=r[t]?.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 vs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Qt(t,e,r,n,o,a){let i=class extends Do{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return sr(e).map(s=>(e[s].attribute||s).toLowerCase())}};return sr(e).forEach(s=>{lr(i.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){c=Rr(s,c,e),this.$$d[s]=c;var l=this.$$c;if(l){var u=Ee(l,s)?.get;u?l[s]=c:l.$set({[s]:c})}}})}),n.forEach(s=>{lr(i.prototype,s,{get(){return this.$$c?.[s]}})}),t.element=i,i}var gs=(t,e)=>e()(),bs=ve('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),ks=ve(" <!>",1);const _s={hash:"svelte-4thrqu",code:`
3
3
  /* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
4
4
  BlinkMacSystemFont,
5
5
  avenir next,
@@ -12,8 +12,8 @@ var LiipGPTButton=function(Fr){"use strict";const Ia="5";typeof window<"u"&&((wi
12
12
  roboto,
13
13
  noto,
14
14
  arial,
15
- sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function Zo(t,e){mt(e,!0),Ki(t,_s);const r=(l,u=lr,f=lr)=>{Yn();var d=ks(),m=ee(d),_=De(m);{var b=p=>{},T=p=>{var k=bs(),v=ke(k),x=De(ke(v));x.__click=[gs,f],be(v),be(k),D(p,k)};Ne(_,p=>{o()?p(b):p(T,!1)})}zt(p=>Zi(m,`${p??""} `),[()=>console.error(`Panic, uncaught error:
16
- `,u())??""]),D(l,d)};let n=U(e,"body",7),o=U(e,"silent",7),a=ae(void 0);const i=l=>{Q(a,{error:l},!0)};var s=Ce(),c=ee(s);return fs(c,{get failed(){return r}},l=>{var u=Ce(),f=ee(u);{var d=_=>{r(_,()=>R(a).error,()=>()=>{Q(a,void 0)})},m=_=>{var b=Ce(),T=ee(b);on(T,n,()=>i),D(_,b)};Ne(f,_=>{R(a)?_(d):_(m,!1)})}D(l,u)}),D(t,s),gt({get body(){return n()},set body(l){n(l),Z()},get silent(){return o()},set silent(l){o(l),Z()}})}rn(["click"]),Qt(Zo,{body:{},silent:{}},[],[],!0);const ys='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings: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}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}.chat-app :where(b,strong){font-weight:var(--font-weight-bold)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app>*{color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--body-font-size, var(--font-body));line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}.chat-app :where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (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,table){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{display:flex;height:100%}.chat-app__main{container-name:chat-container;container-type:inline-size;display:block;width:100%;height:100%;transform:scale(1);background:var(--body-background)}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__header{padding:var(--spacer-16);z-index:var(--z-index-header);position:fixed;top:0;right:0;left:0;border-width:var(--header-border-width);border-style:solid;border-color:var(--header-border-color);background:var(--header-background);box-shadow:var(--header-box-shadow);pointer-events:none}@container chat-container (min-width: 640px){.chat-app__header{padding:var(--spacer-12)}}.chat-app__header-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacer-r-12)}.chat-app__header-container>:where(*){pointer-events:auto}.chat-app__body{position:relative;width:100%;height:100%}.chat-app__page-transition{width:100%;height:100%}.chat-app__aside{visibility:hidden;width:0;overflow:hidden;background:var(--color-brand-100);opacity:0;transition:width .3s ease-in-out,opacity .3s ease-in-out}.chat-app__aside.open{visibility:visible;width:300px;opacity:1}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button:hover .open-button__text{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}',ws=()=>{const t=localStorage.getItem("liipgpt-color-scheme");return t==="light"||t==="dark"?t:"system"},xs=t=>{let e=ws();return e==="system"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),t.includes(e)?e:t[0]??"light"},Cs=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Rs=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Ss=new RegExp("(\\d)(\\p{Ll})","gu"),Ts=new RegExp("(\\p{L})(\\d)","gu"),Es=/[^\p{L}\d]+/giu,Rr="$1\0$2",$s="";function As(t,e){let r=t.trim();r=r.replace(Cs,Rr).replace(Rs,Rr),e?.separateNumbers&&(r=r.replace(Ss,Rr).replace(Ts,Rr)),r=r.replace(Es,"\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 Os(t,e){return js(t,e?.prefixCharacters)+As(t,e).map(Ms(e?.locale)).join(e?.delimiter??" ")}function Is(t,e){return Os(t,{delimiter:"-",...e})}function Ms(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function js(t,e=$s){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 Sr=Is;var N;(function(t){t.assertEqual=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"&&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})(N||(N={}));var Vo;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Vo||(Vo={}));const w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),We=t=>{switch(typeof t){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(t)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(t)?w.array:t===null?w.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?w.promise:typeof Map<"u"&&t instanceof Map?w.map:typeof Set<"u"&&t instanceof Set?w.set:typeof Date<"u"&&t instanceof Date?w.date:w.object;default:return w.unknown}},g=N.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"]);class Le 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 Le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const o of this.issues)if(o.path.length>0){const a=o.path[0];r[a]=r[a]||[],r[a].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Le.create=t=>new Le(t);const vn=(t,e)=>{let r;switch(t.code){case g.invalid_type:t.received===w.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case g.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,N.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(t.keys,", ")}`;break;case g.invalid_union:r="Invalid input";break;case g.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(t.options)}`;break;case g.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(t.options)}, received '${t.received}'`;break;case g.invalid_arguments:r="Invalid function arguments";break;case g.invalid_return_type:r="Invalid function return type";break;case g.invalid_date:r="Invalid date";break;case g.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}"`:N.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case g.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==="bigint"?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 g.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 g.custom:r="Invalid input";break;case g.invalid_intersection_types:r="Intersection results could not be merged";break;case g.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case g.not_finite:r="Number must be finite";break;default:r=e.defaultError,N.assertNever(t)}return{message:r}};let Ns=vn;function Ls(){return Ns}const Ps=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}};function y(t,e){const r=Ls(),n=Ps({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===vn?void 0:vn].filter(o=>!!o)});t.common.issues.push(n)}class X{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 A;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 X.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 A;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 A=Object.freeze({status:"aborted"}),Kt=t=>({status:"dirty",value:t}),fe=t=>({status:"valid",value:t}),Uo=t=>t.status==="aborted",Wo=t=>t.status==="dirty",wt=t=>t.status==="valid",Tr=t=>typeof Promise<"u"&&t instanceof Promise;var C;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(C||(C={}));class Re{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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Go=(t,e)=>{if(wt(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 Le(t.common.issues);return this._error=r,this._error}}};function O(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)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:o}}class M{get description(){return this._def.description}_getType(e){return We(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:We(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:We(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Tr(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){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Go(n,o)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return wt(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>wt(n)?{value:n.value}:{issues:r.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?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(Tr(o)?o:Promise.resolve(o));return Go(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:g.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 St({schema:this,typeName:$.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 qe.create(this,this._def)}nullable(){return Tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Ir.create(this,this._def)}or(e){return $r.create([this,e],this._def)}and(e){return Ar.create(this,e,this._def)}transform(e){return new St({...O(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new _n({...O(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new il({typeName:$.ZodBranded,type:this,...O(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new yn({...O(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return wn.create(this,e)}readonly(){return xn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bs=/^c[^\s-]{8,}$/i,Fs=/^[0-9a-z]+$/,Ds=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zs=/^[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,Zs=/^[a-z0-9_-]{21}$/i,Vs=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Us=/^[-+]?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)?)??$/,Ws=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gs="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mn;const qs=/^(?:(?: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])$/,Hs=/^(?:(?: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])$/,Ys=/^(([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]))$/,Qs=/^(([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])$/,Ks=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Js=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qo="((\\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])))",Xs=new RegExp(`^${qo}$`);function Ho(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function el(t){return new RegExp(`^${Ho(t)}$`)}function tl(t){let e=`${qo}T${Ho(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 rl(t,e){return!!((e==="v4"||!e)&&qs.test(t)||(e==="v6"||!e)&&Ys.test(t))}function nl(t,e){if(!Vs.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const 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||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function ol(t,e){return!!((e==="v4"||!e)&&Hs.test(t)||(e==="v6"||!e)&&Qs.test(t))}class Pe extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==w.string){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.string,received:a.parsedType}),A}const n=new X;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),y(o,{code:g.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),y(o,{code:g.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?y(o,{code:g.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&y(o,{code:g.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Ws.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"email",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")mn||(mn=new RegExp(Gs,"u")),mn.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"emoji",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")zs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"uuid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Zs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"nanoid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Bs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cuid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Fs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cuid2",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Ds.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"ulid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),y(o,{validation:"url",code:g.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),y(o,{validation:"regex",code:g.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),y(o,{code:g.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),y(o,{code:g.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?tl(a).test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Xs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?el(a).test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Us.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"duration",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?rl(e.data,a.version)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"ip",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?nl(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"jwt",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?ol(e.data,a.version)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cidr",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Ks.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"base64",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Js.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"base64url",code:g.invalid_string,message:a.message}),n.dirty()):N.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:g.invalid_string,...C.errToObj(n)})}_addCheck(e){return new Pe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...C.errToObj(e)})}url(e){return this._addCheck({kind:"url",...C.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...C.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...C.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...C.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...C.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...C.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...C.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...C.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...C.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...C.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...C.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...C.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...C.errToObj(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?.precision>"u"?null:e?.precision,...C.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...C.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...C.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...C.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...C.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...C.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...C.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...C.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...C.errToObj(r)})}nonempty(e){return this.min(1,C.errToObj(e))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...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}}Pe.create=t=>new Pe({checks:[],typeName:$.ZodString,coerce:t?.coerce??!1,...O(t)});function al(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,a=Number.parseInt(t.toFixed(o).replace(".","")),i=Number.parseInt(e.toFixed(o).replace(".",""));return a%i/10**o}class xt extends M{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)!==w.number){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.number,received:a.parsedType}),A}let n;const o=new X;for(const a of this._def.checks)a.kind==="int"?N.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:g.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),y(n,{code:g.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),y(n,{code:g.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?al(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),y(n,{code:g.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:g.not_finite,message:a.message}),o.dirty()):N.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,C.toString(r))}gt(e,r){return this.setLimit("min",e,!1,C.toString(r))}lte(e,r){return this.setLimit("max",e,!0,C.toString(r))}lt(e,r){return this.setLimit("max",e,!1,C.toString(r))}setLimit(e,r,n,o){return new xt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:C.toString(o)}]})}_addCheck(e){return new xt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:C.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:C.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:C.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:C.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:C.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:C.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:C.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:C.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:C.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"&&N.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)}}xt.create=t=>new xt({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||!1,...O(t)});class Jt extends M{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)!==w.bigint)return this._getInvalidInput(e);let n;const o=new X;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),y(n,{code:g.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),y(n,{code:g.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),y(n,{code:g.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):N.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return y(r,{code:g.invalid_type,expected:w.bigint,received:r.parsedType}),A}gte(e,r){return this.setLimit("min",e,!0,C.toString(r))}gt(e,r){return this.setLimit("min",e,!1,C.toString(r))}lte(e,r){return this.setLimit("max",e,!0,C.toString(r))}lt(e,r){return this.setLimit("max",e,!1,C.toString(r))}setLimit(e,r,n,o){return new Jt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:C.toString(o)}]})}_addCheck(e){return new Jt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:C.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:C.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:C.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:C.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:C.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}}Jt.create=t=>new Jt({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??!1,...O(t)});class gn extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.boolean,received:n.parsedType}),A}return fe(e.data)}}gn.create=t=>new gn({typeName:$.ZodBoolean,coerce:t?.coerce||!1,...O(t)});class Er extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.date,received:a.parsedType}),A}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_date}),A}const n=new X;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),y(o,{code:g.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),y(o,{code:g.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):N.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Er({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:C.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:C.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}}Er.create=t=>new Er({checks:[],coerce:t?.coerce||!1,typeName:$.ZodDate,...O(t)});class Yo extends M{_parse(e){if(this._getType(e)!==w.symbol){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.symbol,received:n.parsedType}),A}return fe(e.data)}}Yo.create=t=>new Yo({typeName:$.ZodSymbol,...O(t)});class Qo extends M{_parse(e){if(this._getType(e)!==w.undefined){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.undefined,received:n.parsedType}),A}return fe(e.data)}}Qo.create=t=>new Qo({typeName:$.ZodUndefined,...O(t)});class Ko extends M{_parse(e){if(this._getType(e)!==w.null){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.null,received:n.parsedType}),A}return fe(e.data)}}Ko.create=t=>new Ko({typeName:$.ZodNull,...O(t)});class Jo extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return fe(e.data)}}Jo.create=t=>new Jo({typeName:$.ZodAny,...O(t)});class Xo extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return fe(e.data)}}Xo.create=t=>new Xo({typeName:$.ZodUnknown,...O(t)});class Ge extends M{_parse(e){const r=this._getOrReturnCtx(e);return y(r,{code:g.invalid_type,expected:w.never,received:r.parsedType}),A}}Ge.create=t=>new Ge({typeName:$.ZodNever,...O(t)});class ea extends M{_parse(e){if(this._getType(e)!==w.undefined){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.void,received:n.parsedType}),A}return fe(e.data)}}ea.create=t=>new ea({typeName:$.ZodVoid,...O(t)});class Se extends M{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==w.array)return y(r,{code:g.invalid_type,expected:w.array,received:r.parsedType}),A;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(i||s)&&(y(r,{code:i?g.too_big:g.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&&(y(r,{code:g.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&&(y(r,{code:g.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 Re(r,i,r.path,s)))).then(i=>X.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new Re(r,i,r.path,s)));return X.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Se({...this._def,minLength:{value:e,message:C.toString(r)}})}max(e,r){return new Se({...this._def,maxLength:{value:e,message:C.toString(r)}})}length(e,r){return new Se({...this._def,exactLength:{value:e,message:C.toString(r)}})}nonempty(e){return this.min(1,e)}}Se.create=(t,e)=>new Se({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...O(e)});function Ct(t){if(t instanceof V){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=qe.create(Ct(n))}return new V({...t._def,shape:()=>e})}else return t instanceof Se?new Se({...t._def,type:Ct(t.element)}):t instanceof qe?qe.create(Ct(t.unwrap())):t instanceof Tt?Tt.create(Ct(t.unwrap())):t instanceof st?st.create(t.items.map(e=>Ct(e))):t}class V extends M{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=N.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==w.object){const l=this._getOrReturnCtx(e);return y(l,{code:g.invalid_type,expected:w.object,received:l.parsedType}),A}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ge&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const u=a[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Re(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Ge){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&&(y(o,{code:g.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Re(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key,d=await u.value;l.push({key:f,value:d,alwaysSet:u.alwaysSet})}return l}).then(l=>X.mergeObjectSync(n,l)):X.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return C.errToObj,new V({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:C.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new V({...this._def,unknownKeys:"strip"})}passthrough(){return new V({...this._def,unknownKeys:"passthrough"})}extend(e){return new V({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new V({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new V({...this._def,catchall:e})}pick(e){const r={};for(const n of N.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new V({...this._def,shape:()=>r})}omit(e){const r={};for(const n of N.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new V({...this._def,shape:()=>r})}deepPartial(){return Ct(this)}partial(e){const r={};for(const n of N.objectKeys(this.shape)){const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new V({...this._def,shape:()=>r})}required(e){const r={};for(const n of N.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof qe;)a=a._def.innerType;r[n]=a}return new V({...this._def,shape:()=>r})}keyof(){return na(N.objectKeys(this.shape))}}V.create=(t,e)=>new V({shape:()=>t,unknownKeys:"strip",catchall:Ge.create(),typeName:$.ZodObject,...O(e)}),V.strictCreate=(t,e)=>new V({shape:()=>t,unknownKeys:"strict",catchall:Ge.create(),typeName:$.ZodObject,...O(e)}),V.lazycreate=(t,e)=>new V({shape:t,unknownKeys:"strip",catchall:Ge.create(),typeName:$.ZodObject,...O(e)});class $r extends M{_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 Le(s.ctx.common.issues));return y(r,{code:g.invalid_union,unionErrors:i}),A}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 Le(c));return y(r,{code:g.invalid_union,unionErrors:s}),A}}get options(){return this._def.options}}$r.create=(t,e)=>new $r({options:t,typeName:$.ZodUnion,...O(e)});function bn(t,e){const r=We(t),n=We(e);if(t===e)return{valid:!0,data:t};if(r===w.object&&n===w.object){const o=N.objectKeys(e),a=N.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const c=bn(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.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=bn(i,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===w.date&&n===w.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ar extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(a,i)=>{if(Uo(a)||Uo(i))return A;const s=bn(a.value,i.value);return s.valid?((Wo(a)||Wo(i))&&r.dirty(),{status:r.value,value:s.data}):(y(n,{code:g.invalid_intersection_types}),A)};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}))}}Ar.create=(t,e,r)=>new Ar({left:t,right:e,typeName:$.ZodIntersection,...O(r)});class st extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==w.array)return y(n,{code:g.invalid_type,expected:w.array,received:n.parsedType}),A;if(n.data.length<this._def.items.length)return y(n,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:g.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 Re(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>X.mergeArray(r,i)):X.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new st({...this._def,rest:e})}}st.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new st({items:t,typeName:$.ZodTuple,rest:null,...O(e)})};class Or extends M{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!==w.object)return y(n,{code:g.invalid_type,expected:w.object,received:n.parsedType}),A;const o=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)o.push({key:a._parse(new Re(n,s,n.path,s)),value:i._parse(new Re(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?X.mergeObjectAsync(r,o):X.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new Or({keyType:e,valueType:r,typeName:$.ZodRecord,...O(n)}):new Or({keyType:Pe.create(),valueType:e,typeName:$.ZodRecord,...O(r)})}}class ta extends M{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!==w.map)return y(n,{code:g.invalid_type,expected:w.map,received:n.parsedType}),A;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new Re(n,s,n.path,[l,"key"])),value:a._parse(new Re(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 A;(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 A;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}ta.create=(t,e,r)=>new ta({valueType:e,keyType:t,typeName:$.ZodMap,...O(r)});class Xt extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==w.set)return y(n,{code:g.invalid_type,expected:w.set,received:n.parsedType}),A;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(y(n,{code:g.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&&(y(n,{code:g.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 A;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 Re(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,r){return new Xt({...this._def,minSize:{value:e,message:C.toString(r)}})}max(e,r){return new Xt({...this._def,maxSize:{value:e,message:C.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Xt.create=(t,e)=>new Xt({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...O(e)});class ra extends M{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})}}ra.create=(t,e)=>new ra({getter:t,typeName:$.ZodLazy,...O(e)});class kn extends M{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return y(r,{received:r.data,code:g.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}kn.create=(t,e)=>new kn({value:t,typeName:$.ZodLiteral,...O(e)});function na(t,e){return new Rt({values:t,typeName:$.ZodEnum,...O(e)})}class Rt extends M{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:g.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return y(r,{received:r.data,code:g.invalid_enum_value,options:n}),A}return fe(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 Rt.create(e,{...this._def,...r})}exclude(e,r=this._def){return Rt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Rt.create=na;class oa extends M{_parse(e){const r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==w.string&&n.parsedType!==w.number){const o=N.objectValues(r);return y(n,{expected:N.joinValues(o),received:n.parsedType,code:g.invalid_type}),A}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=N.objectValues(r);return y(n,{received:n.data,code:g.invalid_enum_value,options:o}),A}return fe(e.data)}get enum(){return this._def.values}}oa.create=(t,e)=>new oa({values:t,typeName:$.ZodNativeEnum,...O(e)});class Ir extends M{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:g.invalid_type,expected:w.promise,received:r.parsedType}),A;const n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return fe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ir.create=(t,e)=>new Ir({type:t,typeName:$.ZodPromise,...O(e)});class St extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.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=>{y(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 A;const c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?A:c.status==="dirty"||r.value==="dirty"?Kt(c.value):c});{if(r.value==="aborted")return A;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?A:s.status==="dirty"||r.value==="dirty"?Kt(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"?A:(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"?A:(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(!wt(i))return A;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=>wt(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):A);N.assertNever(o)}}St.create=(t,e,r)=>new St({schema:t,typeName:$.ZodEffects,effect:e,...O(r)}),St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...O(r)});class qe extends M{_parse(e){return this._getType(e)===w.undefined?fe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}qe.create=(t,e)=>new qe({innerType:t,typeName:$.ZodOptional,...O(e)});class Tt extends M{_parse(e){return this._getType(e)===w.null?fe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tt.create=(t,e)=>new Tt({innerType:t,typeName:$.ZodNullable,...O(e)});class _n extends M{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});class yn extends M{_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 Tr(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Le(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}yn.create=(t,e)=>new yn({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});class aa extends M{_parse(e){if(this._getType(e)!==w.nan){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.nan,received:n.parsedType}),A}return{status:"valid",value:e.data}}}aa.create=t=>new aa({typeName:$.ZodNaN,...O(t)});class il extends M{_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 wn extends M{_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"?A:a.status==="dirty"?(r.dirty(),Kt(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"?A: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 wn({in:e,out:r,typeName:$.ZodPipeline})}}class xn extends M{_parse(e){const r=this._def.innerType._parse(e),n=o=>(wt(o)&&(o.value=Object.freeze(o.value)),o);return Tr(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}xn.create=(t,e)=>new xn({innerType:t,typeName:$.ZodReadonly,...O(e)});var $;(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"})($||($={}));const h=Pe.create,Mr=xt.create,Te=gn.create;Ge.create;const er=Se.create,L=V.create,jr=$r.create;Ar.create,st.create;const He=Or.create,sl=kn.create,Nr=Rt.create;Ir.create,qe.create,Tt.create;const ll=640,cl=1024;let Lr=null;const ul=()=>{if(Lr)return Lr;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Lr=Number(getComputedStyle(t).fontSize.slice(0,-2)),Lr},ia=({minRem:t,maxRem:e})=>{const r=ul(),n=ll/r,o=cl/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},Cn=L({minRem:Mr(),maxRem:Mr()}),Pr=L({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),Rn=L({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),dl=L({borderRadius:Cn.optional(),custom:He(h(),jr([h(),Mr()])).optional(),hover:Rn.optional(),focus:Rn.optional()}).and(Rn),fl=L({family:h()}),hl=He(Nr(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","internalLink","externalLink","liip","avatar","openChat","speechInput","lightMode","darkMode"]),h()),pl=L({font:fl,colors:L({brand:Pr,accent:Pr.optional(),highlight:Pr,grey:Pr}),components:He(h(),dl),svgs:hl}),Br=L({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:pl});L({light:Br,dark:Br});const vl=L({light:Br,dark:Br}).deepPartial(),ml=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:ia(t):"",Sn=(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+=`--${Sr(t)}-${Sr(a)}:${ml(i)}; `)}),o},gl=(t,e)=>{let r="";return r+=Sn(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Sn(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Sn(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=Object.entries(e.custom).map(([n,o])=>`--${t}-${Sr(n)}:${o}`).join("; ")+"; "),r},bl=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",kl=t=>`--font-family: ${t.family};`,_l=t=>{const e=kl(t.font),r=Object.entries(t.colors).map(([o,a])=>bl(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>gl(Sr(o),a)).join("");return`.chat-app {${e} ${r} ${n}};`};var Tn={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};const sa=L({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),la=Nr(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),ca=jr([sa,la]),yl=jr([sa.and(L({0:h(),1e3:h()})),la]),ua=L({avatarImageUrl:h().optional(),colors:L({brand:ca.optional(),highlight:ca.optional(),grey:yl.optional(),background:h().optional(),text:h().optional(),anchor:L({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:L({size:Cn.optional(),family:h().optional(),urls:er(h()).optional()}).optional(),borderRadius:Cn.optional(),fineGrained:vl.optional()}),wl=L({blocked:h(),maintenance:h(),"rate-limit":h(),"server-error":h(),"too-short":h(),"too-long":h(),"quota-reached":h(),aborted:h(),"sse-error":h(),"client-error":h(),"unexpected-call":h(),"incomplete-error":h(),"feedback-failed":h(),"speech-not-supported":h(),"speech-transcription-failed":h(),"speech-no-text-detected":h(),"speech-microphone-access-denied":h(),"pii-detected":h()}),xl=L({email:h(),creditCard:h(),ahv:h(),phoneSwiss:h(),phoneInternational:h(),swissPassport:h(),longNumber:h()}),da=L({predefinedQuestions:h(),introductionTitle:h(),introductionDisclaimer:h().optional(),referenceTitle:h(),chatInputPlaceholder:h(),chatInputPlaceholderListening:h().optional(),chatInputSubmit:h(),chatInputStartListening:h(),chatInputStopListening:h(),referenceLink:h(),newChat:h(),maintenanceModeError:h(),messageBotLoading:h(),messageBotError:h(),messageBotDefaultError:h(),chatFooterText:h().optional(),scrollToBottom:h(),openButtonTitle:h().optional(),openButtonDescription:h().optional(),openMenu:h(),openInfo:h(),aboutThisChat:h().optional(),closeMenu:h(),closeChat:h(),close:h(),send:h(),thankYouForFeedback:h(),giveFeedback:h(),sendFeedback:h(),feedbackFormTitle:h(),feedbackFormMessage:h(),feedbackFormMessagePlaceholder:h(),feedbackFormEmail:h(),feedbackFormEmailPlaceholder:h(),answerGood:h(),answerBad:h(),classificationSubmit:h(),classificationThankYou:h(),classificationTitle:h(),selectLanguage:h(),lightMode:h(),darkMode:h()}),Et=Nr(["en","de","fr","it"]),fa=He(Et,da.partial());He(Et,wl),He(Et,xl);const ha=L({label:h(),options:er(L({label:h(),value:Mr()}))}),Cl=L({label:h(),icon:h(),url:h(),target:Nr(["_blank","_self"]).optional()}),Rl=L({label:h().nullable(),question:h()}),pa=L({impact:ha.optional(),quality:ha.optional()});L({classification:pa.optional()}),L({predefinedQuestions:er(Rl)}),jr([L({maintenance:sl(!0)}),L({id:h(),cID:h()})]),He(Et,da);const Sl=L({showPredefinedQuestions:Te(),showOverallFeedbackButton:Te(),showCloseChatButton:Te(),showContextMenu:Te(),showContextInfo:Te(),allowAudioInput:Te(),blockPII:Te(),questionPrefix:h(),menu:He(Et,er(Cl)).optional(),supportedLanguages:er(Et),classification:pa.optional(),showTextFeedback:Te(),theme:ua,translations:fa,buttonHref:h().optional(),addQueryToUrlParams:Te().optional(),renderKatex:Te().optional()}).partial().and(L({theme:L({name:h().optional()}).optional()})),En=t=>typeof t=="string"?Tn[t]:t,Tl=t=>{const e=En(t?.colors?.brand||Tn.gray),r=En(t?.colors?.highlight||e),n={0:"#ffffff",1e3:"#000000",...En(t?.colors?.grey||Tn.gray)},o={avatarImageUrl:t.avatarImageUrl,colors:{brand:e,highlight:r,grey:n,background:t?.colors?.background||n[0],text:t?.colors?.text||n[900],anchor:{default:t?.colors?.anchor?.default||e[600],hover:t?.colors?.anchor?.hover||e[800]}},font:{size:t.font?.size||{minRem:1,maxRem:1.2},family:t.font?.family||"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif",urls:t.font?.urls||[]},borderRadius:t.borderRadius||{minRem:.25,maxRem:.5}};let a="";return o.avatarImageUrl?a=`<img src="${o.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:a=`
15
+ sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function Zo(t,e){vt(e,!0),Ki(t,_s);const r=(l,u=cr,f=cr)=>{Yn();var d=ks(),v=ee(d),_=ze(v);{var b=p=>{},T=p=>{var k=bs(),m=ke(k),x=ze(ke(m));x.__click=[gs,f],be(m),be(k),z(p,k)};Ne(_,p=>{o()?p(b):p(T,!1)})}Dt(p=>Zi(v,`${p??""} `),[()=>console.error(`Panic, uncaught error:
16
+ `,u())??""]),z(l,d)};let n=U(e,"body",7),o=U(e,"silent",7),a=ae(void 0);const i=l=>{Q(a,{error:l},!0)};var s=Ce(),c=ee(s);return fs(c,{get failed(){return r}},l=>{var u=Ce(),f=ee(u);{var d=_=>{r(_,()=>R(a).error,()=>()=>{Q(a,void 0)})},v=_=>{var b=Ce(),T=ee(b);on(T,n,()=>i),z(_,b)};Ne(f,_=>{R(a)?_(d):_(v,!1)})}z(l,u)}),z(t,s),gt({get body(){return n()},set body(l){n(l),Z()},get silent(){return o()},set silent(l){o(l),Z()}})}rn(["click"]),Qt(Zo,{body:{},silent:{}},[],[],!0);const ys='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings: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}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-6: .375rem;--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-120: 7.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-sm: .875em;--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-snug: 1.375;--line-height-tight: 1.25;--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--z-index-flyout: 10000;--z-index-dialog: 600;--z-index-loader: 500;--z-index-reference-number: 400;--z-index-footer: 300;--z-index-tooltip: 200;--z-index-header: 100;--z-index-local-overlay: 10;--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--fly-in-id: 0;--chat-footer-height: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,h6){font-weight:var(--font-weight-bold);line-height:var(--line-height-tight)}.chat-app :where(b,strong){font-weight:var(--font-weight-bold)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app>*{color:var(--body-color);font-style:normal;font-weight:var(--font-weight-normal);font-size:var(--body-font-size, var(--font-body));line-height:var(--line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--12){-webkit-line-clamp:12}.chat-app :where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (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,table){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{display:flex;height:100%}.chat-app__main{container-name:chat-container;container-type:inline-size;display:block;width:100%;height:100%;transform:scale(1);background:var(--body-background)}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__header{padding:var(--spacer-16);z-index:var(--z-index-header);position:fixed;top:0;right:0;left:0;border-width:var(--header-border-width);border-style:solid;border-color:var(--header-border-color);background:var(--header-background);box-shadow:var(--header-box-shadow);pointer-events:none}@container chat-container (min-width: 640px){.chat-app__header{padding:var(--spacer-12)}}.chat-app__header-container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacer-r-12)}.chat-app__header-container>:where(*){pointer-events:auto}.chat-app__body{position:relative;width:100%;height:100%}.chat-app__page-transition{width:100%;height:100%}.chat-app__aside{visibility:hidden;width:0;overflow:hidden;background:var(--color-brand-100);opacity:0;transition:width .3s ease-in-out,opacity .3s ease-in-out}.chat-app__aside.open{visibility:visible;width:300px;opacity:1}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button:hover .open-button__text{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}',ws=()=>{const t=localStorage.getItem("liipgpt-color-scheme");return t==="light"||t==="dark"?t:"system"},xs=t=>{let e=ws();return e==="system"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),t.includes(e)?e:t[0]??"light"},Cs=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Rs=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Ss=new RegExp("(\\d)(\\p{Ll})","gu"),Ts=new RegExp("(\\p{L})(\\d)","gu"),Es=/[^\p{L}\d]+/giu,Sr="$1\0$2",$s="";function As(t,e){let r=t.trim();r=r.replace(Cs,Sr).replace(Rs,Sr),e?.separateNumbers&&(r=r.replace(Ss,Sr).replace(Ts,Sr)),r=r.replace(Es,"\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 Os(t,e){return js(t,e?.prefixCharacters)+As(t,e).map(Ms(e?.locale)).join(e?.delimiter??" ")}function Is(t,e){return Os(t,{delimiter:"-",...e})}function Ms(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function js(t,e=$s){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 Tr=Is;var N;(function(t){t.assertEqual=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"&&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})(N||(N={}));var Vo;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Vo||(Vo={}));const w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qe=t=>{switch(typeof t){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(t)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(t)?w.array:t===null?w.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?w.promise:typeof Map<"u"&&t instanceof Map?w.map:typeof Set<"u"&&t instanceof Set?w.set:typeof Date<"u"&&t instanceof Date?w.date:w.object;default:return w.unknown}},g=N.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"]);class Le 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 Le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const o of this.issues)if(o.path.length>0){const a=o.path[0];r[a]=r[a]||[],r[a].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Le.create=t=>new Le(t);const mn=(t,e)=>{let r;switch(t.code){case g.invalid_type:t.received===w.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case g.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,N.jsonStringifyReplacer)}`;break;case g.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(t.keys,", ")}`;break;case g.invalid_union:r="Invalid input";break;case g.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(t.options)}`;break;case g.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(t.options)}, received '${t.received}'`;break;case g.invalid_arguments:r="Invalid function arguments";break;case g.invalid_return_type:r="Invalid function return type";break;case g.invalid_date:r="Invalid date";break;case g.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}"`:N.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case g.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==="bigint"?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 g.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 g.custom:r="Invalid input";break;case g.invalid_intersection_types:r="Intersection results could not be merged";break;case g.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case g.not_finite:r="Number must be finite";break;default:r=e.defaultError,N.assertNever(t)}return{message:r}};let Ns=mn;function Ls(){return Ns}const Ps=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}};function y(t,e){const r=Ls(),n=Ps({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===mn?void 0:mn].filter(o=>!!o)});t.common.issues.push(n)}class X{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 A;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 X.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 A;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 A=Object.freeze({status:"aborted"}),Kt=t=>({status:"dirty",value:t}),fe=t=>({status:"valid",value:t}),Uo=t=>t.status==="aborted",qo=t=>t.status==="dirty",wt=t=>t.status==="valid",Er=t=>typeof Promise<"u"&&t instanceof Promise;var C;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(C||(C={}));class Re{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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wo=(t,e)=>{if(wt(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 Le(t.common.issues);return this._error=r,this._error}}};function O(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)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:o}}class M{get description(){return this._def.description}_getType(e){return qe(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Er(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){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Wo(n,o)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return wt(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>wt(n)?{value:n.value}:{issues:r.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?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)},o=this._parse({data:e,path:n.path,parent:n}),a=await(Er(o)?o:Promise.resolve(o));return Wo(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:g.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 St({schema:this,typeName:$.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 Ge.create(this,this._def)}nullable(){return Tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Mr.create(this,this._def)}or(e){return Ar.create([this,e],this._def)}and(e){return Or.create(this,e,this._def)}transform(e){return new St({...O(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new _n({...O(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new il({typeName:$.ZodBranded,type:this,...O(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new yn({...O(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return wn.create(this,e)}readonly(){return xn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bs=/^c[^\s-]{8,}$/i,Fs=/^[0-9a-z]+$/,zs=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ds=/^[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,Zs=/^[a-z0-9_-]{21}$/i,Vs=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Us=/^[-+]?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)?)??$/,qs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ws="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vn;const Gs=/^(?:(?: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])$/,Hs=/^(?:(?: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])$/,Ys=/^(([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]))$/,Qs=/^(([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])$/,Ks=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Js=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Go="((\\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])))",Xs=new RegExp(`^${Go}$`);function Ho(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function el(t){return new RegExp(`^${Ho(t)}$`)}function tl(t){let e=`${Go}T${Ho(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 rl(t,e){return!!((e==="v4"||!e)&&Gs.test(t)||(e==="v6"||!e)&&Ys.test(t))}function nl(t,e){if(!Vs.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const 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||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function ol(t,e){return!!((e==="v4"||!e)&&Hs.test(t)||(e==="v6"||!e)&&Qs.test(t))}class Pe extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==w.string){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.string,received:a.parsedType}),A}const n=new X;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),y(o,{code:g.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),y(o,{code:g.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?y(o,{code:g.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&y(o,{code:g.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")qs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"email",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")vn||(vn=new RegExp(Ws,"u")),vn.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"emoji",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Ds.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"uuid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Zs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"nanoid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Bs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cuid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Fs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cuid2",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")zs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"ulid",code:g.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),y(o,{validation:"url",code:g.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),y(o,{validation:"regex",code:g.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),y(o,{code:g.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),y(o,{code:g.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?tl(a).test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Xs.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?el(a).test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{code:g.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Us.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"duration",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?rl(e.data,a.version)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"ip",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?nl(e.data,a.alg)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"jwt",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?ol(e.data,a.version)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"cidr",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Ks.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"base64",code:g.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Js.test(e.data)||(o=this._getOrReturnCtx(e,o),y(o,{validation:"base64url",code:g.invalid_string,message:a.message}),n.dirty()):N.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:g.invalid_string,...C.errToObj(n)})}_addCheck(e){return new Pe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...C.errToObj(e)})}url(e){return this._addCheck({kind:"url",...C.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...C.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...C.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...C.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...C.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...C.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...C.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...C.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...C.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...C.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...C.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...C.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...C.errToObj(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?.precision>"u"?null:e?.precision,...C.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...C.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...C.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...C.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...C.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...C.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...C.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...C.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...C.errToObj(r)})}nonempty(e){return this.min(1,C.errToObj(e))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...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}}Pe.create=t=>new Pe({checks:[],typeName:$.ZodString,coerce:t?.coerce??!1,...O(t)});function al(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,a=Number.parseInt(t.toFixed(o).replace(".","")),i=Number.parseInt(e.toFixed(o).replace(".",""));return a%i/10**o}class xt extends M{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)!==w.number){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.number,received:a.parsedType}),A}let n;const o=new X;for(const a of this._def.checks)a.kind==="int"?N.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:g.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),y(n,{code:g.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),y(n,{code:g.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?al(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),y(n,{code:g.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:g.not_finite,message:a.message}),o.dirty()):N.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,C.toString(r))}gt(e,r){return this.setLimit("min",e,!1,C.toString(r))}lte(e,r){return this.setLimit("max",e,!0,C.toString(r))}lt(e,r){return this.setLimit("max",e,!1,C.toString(r))}setLimit(e,r,n,o){return new xt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:C.toString(o)}]})}_addCheck(e){return new xt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:C.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:C.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:C.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:C.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:C.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:C.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:C.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:C.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:C.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"&&N.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)}}xt.create=t=>new xt({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||!1,...O(t)});class Jt extends M{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)!==w.bigint)return this._getInvalidInput(e);let n;const o=new X;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),y(n,{code:g.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),y(n,{code:g.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),y(n,{code:g.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):N.assertNever(a);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return y(r,{code:g.invalid_type,expected:w.bigint,received:r.parsedType}),A}gte(e,r){return this.setLimit("min",e,!0,C.toString(r))}gt(e,r){return this.setLimit("min",e,!1,C.toString(r))}lte(e,r){return this.setLimit("max",e,!0,C.toString(r))}lt(e,r){return this.setLimit("max",e,!1,C.toString(r))}setLimit(e,r,n,o){return new Jt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:C.toString(o)}]})}_addCheck(e){return new Jt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:C.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:C.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:C.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:C.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:C.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}}Jt.create=t=>new Jt({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??!1,...O(t)});class gn extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.boolean,received:n.parsedType}),A}return fe(e.data)}}gn.create=t=>new gn({typeName:$.ZodBoolean,coerce:t?.coerce||!1,...O(t)});class $r extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_type,expected:w.date,received:a.parsedType}),A}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return y(a,{code:g.invalid_date}),A}const n=new X;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),y(o,{code:g.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),y(o,{code:g.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):N.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $r({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:C.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:C.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}}$r.create=t=>new $r({checks:[],coerce:t?.coerce||!1,typeName:$.ZodDate,...O(t)});class Yo extends M{_parse(e){if(this._getType(e)!==w.symbol){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.symbol,received:n.parsedType}),A}return fe(e.data)}}Yo.create=t=>new Yo({typeName:$.ZodSymbol,...O(t)});class Qo extends M{_parse(e){if(this._getType(e)!==w.undefined){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.undefined,received:n.parsedType}),A}return fe(e.data)}}Qo.create=t=>new Qo({typeName:$.ZodUndefined,...O(t)});class Ko extends M{_parse(e){if(this._getType(e)!==w.null){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.null,received:n.parsedType}),A}return fe(e.data)}}Ko.create=t=>new Ko({typeName:$.ZodNull,...O(t)});class Jo extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return fe(e.data)}}Jo.create=t=>new Jo({typeName:$.ZodAny,...O(t)});class Xo extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return fe(e.data)}}Xo.create=t=>new Xo({typeName:$.ZodUnknown,...O(t)});class We extends M{_parse(e){const r=this._getOrReturnCtx(e);return y(r,{code:g.invalid_type,expected:w.never,received:r.parsedType}),A}}We.create=t=>new We({typeName:$.ZodNever,...O(t)});class ea extends M{_parse(e){if(this._getType(e)!==w.undefined){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.void,received:n.parsedType}),A}return fe(e.data)}}ea.create=t=>new ea({typeName:$.ZodVoid,...O(t)});class Se extends M{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==w.array)return y(r,{code:g.invalid_type,expected:w.array,received:r.parsedType}),A;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(i||s)&&(y(r,{code:i?g.too_big:g.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&&(y(r,{code:g.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&&(y(r,{code:g.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 Re(r,i,r.path,s)))).then(i=>X.mergeArray(n,i));const a=[...r.data].map((i,s)=>o.type._parseSync(new Re(r,i,r.path,s)));return X.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Se({...this._def,minLength:{value:e,message:C.toString(r)}})}max(e,r){return new Se({...this._def,maxLength:{value:e,message:C.toString(r)}})}length(e,r){return new Se({...this._def,exactLength:{value:e,message:C.toString(r)}})}nonempty(e){return this.min(1,e)}}Se.create=(t,e)=>new Se({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...O(e)});function Ct(t){if(t instanceof V){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ge.create(Ct(n))}return new V({...t._def,shape:()=>e})}else return t instanceof Se?new Se({...t._def,type:Ct(t.element)}):t instanceof Ge?Ge.create(Ct(t.unwrap())):t instanceof Tt?Tt.create(Ct(t.unwrap())):t instanceof st?st.create(t.items.map(e=>Ct(e))):t}class V extends M{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=N.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==w.object){const l=this._getOrReturnCtx(e);return y(l,{code:g.invalid_type,expected:w.object,received:l.parsedType}),A}const{status:n,ctx:o}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof We&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const u=a[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Re(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof We){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&&(y(o,{code:g.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Re(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key,d=await u.value;l.push({key:f,value:d,alwaysSet:u.alwaysSet})}return l}).then(l=>X.mergeObjectSync(n,l)):X.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return C.errToObj,new V({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:C.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new V({...this._def,unknownKeys:"strip"})}passthrough(){return new V({...this._def,unknownKeys:"passthrough"})}extend(e){return new V({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new V({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new V({...this._def,catchall:e})}pick(e){const r={};for(const n of N.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new V({...this._def,shape:()=>r})}omit(e){const r={};for(const n of N.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new V({...this._def,shape:()=>r})}deepPartial(){return Ct(this)}partial(e){const r={};for(const n of N.objectKeys(this.shape)){const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new V({...this._def,shape:()=>r})}required(e){const r={};for(const n of N.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ge;)a=a._def.innerType;r[n]=a}return new V({...this._def,shape:()=>r})}keyof(){return na(N.objectKeys(this.shape))}}V.create=(t,e)=>new V({shape:()=>t,unknownKeys:"strip",catchall:We.create(),typeName:$.ZodObject,...O(e)}),V.strictCreate=(t,e)=>new V({shape:()=>t,unknownKeys:"strict",catchall:We.create(),typeName:$.ZodObject,...O(e)}),V.lazycreate=(t,e)=>new V({shape:t,unknownKeys:"strip",catchall:We.create(),typeName:$.ZodObject,...O(e)});class Ar extends M{_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 Le(s.ctx.common.issues));return y(r,{code:g.invalid_union,unionErrors:i}),A}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 Le(c));return y(r,{code:g.invalid_union,unionErrors:s}),A}}get options(){return this._def.options}}Ar.create=(t,e)=>new Ar({options:t,typeName:$.ZodUnion,...O(e)});function bn(t,e){const r=qe(t),n=qe(e);if(t===e)return{valid:!0,data:t};if(r===w.object&&n===w.object){const o=N.objectKeys(e),a=N.objectKeys(t).filter(s=>o.indexOf(s)!==-1),i={...t,...e};for(const s of a){const c=bn(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.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=bn(i,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===w.date&&n===w.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Or extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(a,i)=>{if(Uo(a)||Uo(i))return A;const s=bn(a.value,i.value);return s.valid?((qo(a)||qo(i))&&r.dirty(),{status:r.value,value:s.data}):(y(n,{code:g.invalid_intersection_types}),A)};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}))}}Or.create=(t,e,r)=>new Or({left:t,right:e,typeName:$.ZodIntersection,...O(r)});class st extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==w.array)return y(n,{code:g.invalid_type,expected:w.array,received:n.parsedType}),A;if(n.data.length<this._def.items.length)return y(n,{code:g.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:g.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 Re(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>X.mergeArray(r,i)):X.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new st({...this._def,rest:e})}}st.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new st({items:t,typeName:$.ZodTuple,rest:null,...O(e)})};class Ir extends M{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!==w.object)return y(n,{code:g.invalid_type,expected:w.object,received:n.parsedType}),A;const o=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)o.push({key:a._parse(new Re(n,s,n.path,s)),value:i._parse(new Re(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?X.mergeObjectAsync(r,o):X.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new Ir({keyType:e,valueType:r,typeName:$.ZodRecord,...O(n)}):new Ir({keyType:Pe.create(),valueType:e,typeName:$.ZodRecord,...O(r)})}}class ta extends M{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!==w.map)return y(n,{code:g.invalid_type,expected:w.map,received:n.parsedType}),A;const o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new Re(n,s,n.path,[l,"key"])),value:a._parse(new Re(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 A;(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 A;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}ta.create=(t,e,r)=>new ta({valueType:e,keyType:t,typeName:$.ZodMap,...O(r)});class Xt extends M{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==w.set)return y(n,{code:g.invalid_type,expected:w.set,received:n.parsedType}),A;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(y(n,{code:g.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&&(y(n,{code:g.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 A;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 Re(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,r){return new Xt({...this._def,minSize:{value:e,message:C.toString(r)}})}max(e,r){return new Xt({...this._def,maxSize:{value:e,message:C.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Xt.create=(t,e)=>new Xt({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...O(e)});class ra extends M{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})}}ra.create=(t,e)=>new ra({getter:t,typeName:$.ZodLazy,...O(e)});class kn extends M{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return y(r,{received:r.data,code:g.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}kn.create=(t,e)=>new kn({value:t,typeName:$.ZodLiteral,...O(e)});function na(t,e){return new Rt({values:t,typeName:$.ZodEnum,...O(e)})}class Rt extends M{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:g.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return y(r,{received:r.data,code:g.invalid_enum_value,options:n}),A}return fe(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 Rt.create(e,{...this._def,...r})}exclude(e,r=this._def){return Rt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Rt.create=na;class oa extends M{_parse(e){const r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==w.string&&n.parsedType!==w.number){const o=N.objectValues(r);return y(n,{expected:N.joinValues(o),received:n.parsedType,code:g.invalid_type}),A}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=N.objectValues(r);return y(n,{received:n.data,code:g.invalid_enum_value,options:o}),A}return fe(e.data)}get enum(){return this._def.values}}oa.create=(t,e)=>new oa({values:t,typeName:$.ZodNativeEnum,...O(e)});class Mr extends M{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:g.invalid_type,expected:w.promise,received:r.parsedType}),A;const n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return fe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Mr.create=(t,e)=>new Mr({type:t,typeName:$.ZodPromise,...O(e)});class St extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.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=>{y(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 A;const c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?A:c.status==="dirty"||r.value==="dirty"?Kt(c.value):c});{if(r.value==="aborted")return A;const s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?A:s.status==="dirty"||r.value==="dirty"?Kt(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"?A:(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"?A:(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(!wt(i))return A;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=>wt(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):A);N.assertNever(o)}}St.create=(t,e,r)=>new St({schema:t,typeName:$.ZodEffects,effect:e,...O(r)}),St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...O(r)});class Ge extends M{_parse(e){return this._getType(e)===w.undefined?fe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ge.create=(t,e)=>new Ge({innerType:t,typeName:$.ZodOptional,...O(e)});class Tt extends M{_parse(e){return this._getType(e)===w.null?fe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tt.create=(t,e)=>new Tt({innerType:t,typeName:$.ZodNullable,...O(e)});class _n extends M{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...O(e)});class yn extends M{_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 Er(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Le(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}yn.create=(t,e)=>new yn({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...O(e)});class aa extends M{_parse(e){if(this._getType(e)!==w.nan){const n=this._getOrReturnCtx(e);return y(n,{code:g.invalid_type,expected:w.nan,received:n.parsedType}),A}return{status:"valid",value:e.data}}}aa.create=t=>new aa({typeName:$.ZodNaN,...O(t)});class il extends M{_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 wn extends M{_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"?A:a.status==="dirty"?(r.dirty(),Kt(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"?A: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 wn({in:e,out:r,typeName:$.ZodPipeline})}}class xn extends M{_parse(e){const r=this._def.innerType._parse(e),n=o=>(wt(o)&&(o.value=Object.freeze(o.value)),o);return Er(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}xn.create=(t,e)=>new xn({innerType:t,typeName:$.ZodReadonly,...O(e)});var $;(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"})($||($={}));const h=Pe.create,jr=xt.create,Te=gn.create;We.create;const er=Se.create,L=V.create,Nr=Ar.create;Or.create,st.create;const He=Ir.create,sl=kn.create,tr=Rt.create;Mr.create,Ge.create,Tt.create;const ll=640,cl=1024;let Lr=null;const ul=()=>{if(Lr)return Lr;if(!globalThis.document)return 16;const t=globalThis.document.querySelector(":root");return Lr=Number(getComputedStyle(t).fontSize.slice(0,-2)),Lr},ia=({minRem:t,maxRem:e})=>{const r=ul(),n=ll/r,o=cl/r,a=(e-t)/(o-n),i=-n*a+t;return`clamp( ${t}rem, ${i}rem + ${a*100}cqw, ${e}rem )`},Cn=L({minRem:jr(),maxRem:jr()}),Pr=L({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),Rn=L({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),dl=L({borderRadius:Cn.optional(),custom:He(h(),Nr([h(),jr()])).optional(),hover:Rn.optional(),focus:Rn.optional()}).and(Rn),fl=L({family:h()}),hl=He(tr(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","internalLink","externalLink","liip","avatar","openChat","speechInput","lightMode","darkMode"]),h()),pl=L({font:fl,colors:L({brand:Pr,accent:Pr.optional(),highlight:Pr,grey:Pr}),components:He(h(),dl),svgs:hl}),Br=L({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:pl});L({light:Br,dark:Br});const ml=L({light:Br,dark:Br}).deepPartial(),vl=t=>typeof t=="string"?t:typeof t=="object"?t.minRem===t.maxRem?`${t.minRem}rem`:ia(t):"",Sn=(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+=`--${Tr(t)}-${Tr(a)}:${vl(i)}; `)}),o},gl=(t,e)=>{let r="";return r+=Sn(t,e,["background","borderWidth","borderColor","boxShadow","borderRadius","color"],!0),e.hover&&(r+=Sn(`${t}-hover`,e.hover,["background","borderWidth","borderColor","boxShadow","color"])),e.focus&&(r+=Sn(`${t}-focus`,e.focus,["background","borderWidth","borderColor","boxShadow","color"])),e.custom&&(r+=Object.entries(e.custom).map(([n,o])=>`--${t}-${Tr(n)}:${o}`).join("; ")+"; "),r},bl=(t,e)=>Object.entries(e).map(([r,n])=>`--color-${t}-${r}:${n}`).join("; ")+"; ",kl=t=>`--font-family: ${t.family};`,_l=t=>{const e=kl(t.font),r=Object.entries(t.colors).map(([o,a])=>bl(o,a)).join(""),n=Object.entries(t.components).map(([o,a])=>gl(Tr(o),a)).join("");return`.chat-app {${e} ${r} ${n}};`};var Tn={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};const sa=L({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),la=tr(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),ca=Nr([sa,la]),yl=Nr([sa.and(L({0:h(),1e3:h()})),la]),ua=L({avatarImageUrl:h().optional(),colors:L({brand:ca.optional(),highlight:ca.optional(),grey:yl.optional(),background:h().optional(),text:h().optional(),anchor:L({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:L({size:Cn.optional(),family:h().optional(),urls:er(h()).optional()}).optional(),borderRadius:Cn.optional(),fineGrained:ml.optional()}),wl=L({blocked:h(),maintenance:h(),"rate-limit":h(),"server-error":h(),"too-short":h(),"too-long":h(),"quota-reached":h(),aborted:h(),"sse-error":h(),"client-error":h(),"unexpected-call":h(),"incomplete-error":h(),"feedback-failed":h(),"speech-not-supported":h(),"speech-transcription-failed":h(),"speech-no-text-detected":h(),"speech-microphone-access-denied":h(),"pii-detected":h()}),xl=L({email:h(),creditCard:h(),ahv:h(),phoneSwiss:h(),phoneInternational:h(),swissPassport:h(),longNumber:h()}),da=L({predefinedQuestions:h(),introductionTitle:h(),introductionDisclaimer:h().optional(),referenceTitle:h(),chatInputPlaceholder:h(),chatInputPlaceholderListening:h().optional(),chatInputSubmit:h(),chatInputStartListening:h(),chatInputStopListening:h(),referenceLink:h(),newChat:h(),maintenanceModeError:h(),messageBotLoading:h(),messageBotError:h(),messageBotDefaultError:h(),chatFooterText:h().optional(),scrollToBottom:h(),openButtonTitle:h().optional(),openButtonDescription:h().optional(),openMenu:h(),openInfo:h(),aboutThisChat:h().optional(),closeMenu:h(),closeChat:h(),close:h(),send:h(),thankYouForFeedback:h(),giveFeedback:h(),sendFeedback:h(),feedbackFormTitle:h(),feedbackFormMessage:h(),feedbackFormMessagePlaceholder:h(),feedbackFormEmail:h(),feedbackFormEmailPlaceholder:h(),answerGood:h(),answerBad:h(),classificationSubmit:h(),classificationThankYou:h(),classificationTitle:h(),selectLanguage:h(),lightMode:h(),darkMode:h()}),Et=tr(["en","de","fr","it"]),fa=He(Et,da.partial());He(Et,wl),He(Et,xl);const ha=L({label:h(),options:er(L({label:h(),value:jr()}))}),Cl=L({label:h(),icon:h(),url:h(),target:tr(["_blank","_self"]).optional()}),Rl=L({label:h().nullable(),question:h()}),pa=L({impact:ha.optional(),quality:ha.optional()});L({classification:pa.optional()}),L({predefinedQuestions:er(Rl)}),Nr([L({maintenance:sl(!0)}),L({id:h(),cID:h()})]),He(Et,da);const Sl=L({showPredefinedQuestions:Te(),showOverallFeedbackButton:Te(),showCloseChatButton:Te(),showContextMenu:Te(),showContextInfo:Te(),allowAudioInput:Te(),blockPII:Te(),questionPrefix:h(),menu:He(Et,er(Cl)).optional(),supportedLanguages:er(Et),classification:pa.optional(),showTextFeedback:Te(),theme:ua,translations:fa,buttonHref:h().optional(),addQueryToUrlParams:Te().optional(),renderKatex:Te().optional(),sendReferrer:tr(["all","own","none","location"]).optional()}).partial().and(L({theme:L({name:h().optional()}).optional()})),En=t=>typeof t=="string"?Tn[t]:t,Tl=t=>{const e=En(t?.colors?.brand||Tn.gray),r=En(t?.colors?.highlight||e),n={0:"#ffffff",1e3:"#000000",...En(t?.colors?.grey||Tn.gray)},o={avatarImageUrl:t.avatarImageUrl,colors:{brand:e,highlight:r,grey:n,background:t?.colors?.background||n[0],text:t?.colors?.text||n[900],anchor:{default:t?.colors?.anchor?.default||e[600],hover:t?.colors?.anchor?.hover||e[800]}},font:{size:t.font?.size||{minRem:1,maxRem:1.2},family:t.font?.family||"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif",urls:t.font?.urls||[]},borderRadius:t.borderRadius||{minRem:.25,maxRem:.5}};let a="";return o.avatarImageUrl?a=`<img src="${o.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:a=`
17
17
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
18
18
  <style>
19
19
  .svg--avatar {
@@ -171,7 +171,7 @@ var LiipGPTButton=function(Fr){"use strict";const Ia="5";typeof window<"u"&&((wi
171
171
  <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>
172
172
  <path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
173
173
  </svg>
174
- `}}}};function El(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $n,va;function $l(){if(va)return $n;va=1;var t=function(k){return e(k)&&!r(k)};function e(p){return!!p&&typeof p=="object"}function r(p){var k=Object.prototype.toString.call(p);return k==="[object RegExp]"||k==="[object Date]"||a(p)}var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103;function a(p){return p.$$typeof===o}function i(p){return Array.isArray(p)?[]:{}}function s(p,k){return k.clone!==!1&&k.isMergeableObject(p)?b(i(p),p,k):p}function c(p,k,v){return p.concat(k).map(function(x){return s(x,v)})}function l(p,k){if(!k.customMerge)return b;var v=k.customMerge(p);return typeof v=="function"?v:b}function u(p){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(p).filter(function(k){return Object.propertyIsEnumerable.call(p,k)}):[]}function f(p){return Object.keys(p).concat(u(p))}function d(p,k){try{return k in p}catch{return!1}}function m(p,k){return d(p,k)&&!(Object.hasOwnProperty.call(p,k)&&Object.propertyIsEnumerable.call(p,k))}function _(p,k,v){var x={};return v.isMergeableObject(p)&&f(p).forEach(function(S){x[S]=s(p[S],v)}),f(k).forEach(function(S){m(p,S)||(d(p,S)&&v.isMergeableObject(k[S])?x[S]=l(S,v)(p[S],k[S],v):x[S]=s(k[S],v))}),x}function b(p,k,v){v=v||{},v.arrayMerge=v.arrayMerge||c,v.isMergeableObject=v.isMergeableObject||t,v.cloneUnlessOtherwiseSpecified=s;var x=Array.isArray(k),S=Array.isArray(p),F=x===S;return F?x?v.arrayMerge(p,k,v):_(p,k,v):s(k,v)}b.all=function(k,v){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(x,S){return b(x,S,v)},{})};var T=b;return $n=T,$n}var Al=$l();const Ye=El(Al),ma={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},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-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",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)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},pillDefault:{color:"var(--color-grey-700)",background:"var(--color-grey-200)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-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:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:{minRem:.75,maxRem:1},borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},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:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--card-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceNumeral:{color:"var(--anchor-color)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",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)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",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" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></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>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
174
+ `}}}};function El(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $n,ma;function $l(){if(ma)return $n;ma=1;var t=function(k){return e(k)&&!r(k)};function e(p){return!!p&&typeof p=="object"}function r(p){var k=Object.prototype.toString.call(p);return k==="[object RegExp]"||k==="[object Date]"||a(p)}var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103;function a(p){return p.$$typeof===o}function i(p){return Array.isArray(p)?[]:{}}function s(p,k){return k.clone!==!1&&k.isMergeableObject(p)?b(i(p),p,k):p}function c(p,k,m){return p.concat(k).map(function(x){return s(x,m)})}function l(p,k){if(!k.customMerge)return b;var m=k.customMerge(p);return typeof m=="function"?m:b}function u(p){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(p).filter(function(k){return Object.propertyIsEnumerable.call(p,k)}):[]}function f(p){return Object.keys(p).concat(u(p))}function d(p,k){try{return k in p}catch{return!1}}function v(p,k){return d(p,k)&&!(Object.hasOwnProperty.call(p,k)&&Object.propertyIsEnumerable.call(p,k))}function _(p,k,m){var x={};return m.isMergeableObject(p)&&f(p).forEach(function(S){x[S]=s(p[S],m)}),f(k).forEach(function(S){v(p,S)||(d(p,S)&&m.isMergeableObject(k[S])?x[S]=l(S,m)(p[S],k[S],m):x[S]=s(k[S],m))}),x}function b(p,k,m){m=m||{},m.arrayMerge=m.arrayMerge||c,m.isMergeableObject=m.isMergeableObject||t,m.cloneUnlessOtherwiseSpecified=s;var x=Array.isArray(k),S=Array.isArray(p),F=x===S;return F?x?m.arrayMerge(p,k,m):_(p,k,m):s(k,m)}b.all=function(k,m){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(x,S){return b(x,S,m)},{})};var T=b;return $n=T,$n}var Al=$l();const Ye=El(Al),va={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},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-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",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)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},pillDefault:{color:"var(--color-grey-700)",background:"var(--color-grey-200)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-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:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:{minRem:.75,maxRem:1},boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:{minRem:.75,maxRem:1},borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},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:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--card-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesTrigger:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceNumeral:{color:"var(--anchor-color)"},referenceDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",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)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},referenceNumberDomain:{color:"var(--pill-default-color)",background:"var(--pill-default-background)",hover:{color:"var(--pill-default-hover-color)",background:"var(--pill-default-hover-background)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",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" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></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>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
175
175
  <circle cx="6" cy="23" r="1.75" fill="currentColor">
176
176
  <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
177
177
  </circle>
@@ -228,4 +228,4 @@ var LiipGPTButton=function(Fr){"use strict";const Ia="5";typeof window<"u"&&((wi
228
228
  <svg viewBox="0 0 24 24" fill="none">
229
229
  <path d="M17.4546 19.3866C19.2134 18.1336 20.4574 16.2846 20.9554 14.1833C20.27 14.9892 19.4098 15.6282 18.4403 16.0517C17.4708 16.4753 16.4176 16.6723 15.3605 16.6277C14.3035 16.5831 13.2706 16.2981 12.3402 15.7944C11.4098 15.2908 10.6065 14.5816 9.99136 13.7209C9.37618 12.8601 8.96532 11.8705 8.78999 10.8272C8.61467 9.78384 8.67951 8.71426 8.97957 7.69974C9.27963 6.68522 9.80703 5.75246 10.5217 4.97235C11.2363 4.19223 12.1194 3.5853 13.1038 3.19768C11.6649 3.0599 10.2141 3.2727 8.87542 3.81787C7.53673 4.36304 6.35002 5.22437 5.41679 6.32817C4.48357 7.43197 3.83159 8.7454 3.51665 10.1561C3.2017 11.5668 3.23314 13.0328 3.6083 14.4287C3.98345 15.8246 4.69115 17.1089 5.67085 18.1717C6.65055 19.2344 7.87311 20.0441 9.23394 20.5313C10.5948 21.0186 12.0534 21.169 13.485 20.9696C14.9166 20.7703 16.2787 20.2271 17.4546 19.3866Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
230
230
  </svg>
231
- `}}},Ol=Ye(ma,{tokens:{components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},line:{color:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--color-grey-0)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},pillDefault:{color:"var(--color-grey-200)",background:"var(--color-grey-600)",boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-700)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),$t={fineGrained:{light:ma,dark:Ol}},Il=Object.freeze(Object.defineProperty({__proto__:null,theme:$t},Symbol.toStringTag,{value:"Module"})),Ml=t=>{const e=Tl(t);return{light:Ye($t.fineGrained.light,e)}},jl=t=>{const e={};return t.dark&&(e.dark=Ye($t.fineGrained.dark,t.dark)),t.light&&(e.light=Ye($t.fineGrained.light,t.light)),!t.dark&&!t.light&&(e.light=t.light),e},At={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputPlaceholderListening:"Ich höre zu...",chatInputSubmit:"Aufforderung senden",chatInputStartListening:"Spracherkennung starten",chatInputStopListening:"Spracherkennung beenden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',referenceLink:"Link zur Referenz",newChat:"Neuer Chat",maintenanceModeError:"Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",messageBotLoading:"Lass mich nachdenken",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceTitle:"Referenzen anzeigen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",closeChat:"Chat schließen",close:"Schließen",openInfo:"Info öffnen",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",lightMode:"Hell",darkMode:"Dunkel"},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputPlaceholderListening:"I'm listening...",chatInputSubmit:"Send prompt",chatInputStartListening:"Start speech recognition",chatInputStopListening:"Stop speech recognition",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',referenceLink:"Link to reference",newChat:"New discussion",maintenanceModeError:"The chat is currently not available. Please try again later.",messageBotLoading:"Let me think",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceTitle:"Show references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",closeChat:"Close chat",openInfo:"Open info",close:"Close",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",lightMode:"Light",darkMode:"Dark"},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputPlaceholderListening:"Sto ascoltando...",chatInputSubmit:"Invia richiesta",chatInputStartListening:"Avvia il riconoscimento vocale",chatInputStopListening:"Ferma il riconoscimento vocale",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',referenceLink:"Link alla referenza",newChat:"Nuova discussione",maintenanceModeError:"Il chat è attualmente non disponibile. Per favore riprova più tardi.",messageBotLoading:"Fammi pensare",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceTitle:"Mostra riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",closeChat:"Chiudi chat",openInfo:"Apri info",close:"Chiudi",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",lightMode:"Chiaro",darkMode:"Scuro"},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputPlaceholderListening:"J'écoute...",chatInputSubmit:"Envoyer la demande",chatInputStartListening:"Démarrer la reconnaissance vocale",chatInputStopListening:"Arrêter la reconnaissance vocale",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",referenceLink:"Lien vers la référence",newChat:"Nouvelle discussion",maintenanceModeError:"Le chat est actuellement indisponible. Veuillez réessayer plus tard.",messageBotLoading:"Laissez-moi réfléchir",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceTitle:"Afficher les références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",closeChat:"Fermer le chat",openInfo:"Ouvrir info",close:"Fermer",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",lightMode:"Clair",darkMode:"Sombre"}},Nl=Object.freeze(Object.defineProperty({__proto__:null,translations:At},Symbol.toStringTag,{value:"Module"})),Ll=t=>{t=t??At;const e={};return t.de&&(e.de=Ye(At.de,t.de)),t.en&&(e.en=Ye(At.en,t.en)),t.fr&&(e.fr=Ye(At.fr,t.fr)),t.it&&(e.it=Ye(At.it,t.it)),e},Pl=t=>{let e;t.theme?.fineGrained?e=jl(t.theme?.fineGrained):e=Ml(t?.theme??{});const r=Ll(t?.translations),n={...t,showPredefinedQuestions:t.showPredefinedQuestions??!0,showOverallFeedbackButton:t.showOverallFeedbackButton??!1,showCloseChatButton:t.showCloseChatButton??!1,showContextInfo:t.showContextInfo??!1,showContextMenu:t.showContextMenu??!1,showTextFeedback:t.showTextFeedback??!0,questionPrefix:t.questionPrefix??"",blockPII:t.blockPII??!1,allowAudioInput:t.allowAudioInput??!1,supportedLanguages:t.supportedLanguages??Object.keys(r),fullTheme:e,translations:r,buttonHref:t.buttonHref,addQueryToUrlParams:t.addQueryToUrlParams??!0,renderKatex:t.renderKatex??!1};return t.classification&&(n.classification=t.classification),t.menu&&(n.menu=t.menu),n},An=structuredClone($t.fineGrained.light);An.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},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"}};const ga=structuredClone($t.fineGrained.dark);ga.tokens.colors=An.tokens.colors;const Bl=Object.freeze(Object.defineProperty({__proto__:null,theme:{fineGrained:{light:An,dark:ga}}},Symbol.toStringTag,{value:"Module"})),ba=t=>t.split("/").pop().split(".")[0],Fl=Object.assign({"./default/fallback-dev.theme.ts":Bl,"./default/fallback.theme.ts":Il}),ka=new Map;Object.entries(Fl).forEach(([t,e])=>{const{error:r,data:n}=ua.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}ka.set(ba(t),n)}),Array.from(ka.keys());const Dl=Object.assign({"./default/fallback.translations.ts":Nl}),_a=new Map;Object.entries(Dl).forEach(([t,e])=>{const{error:r,data:n}=fa.safeParse(e?.translations);if(r){console.error(`Invalid translations in ${t}:`,r);return}_a.set(ba(t),n)}),Array.from(_a.keys());const zl=["en","de","fr","it"],Zl="en",ya=t=>zl.includes(t),wa=t=>{if(ya(t))return t;const e=Vl();return ya(e)?e:Zl},Vl=()=>navigator.language.split("-")[0],Ul=()=>wa(localStorage.getItem("liipgpt:selectedLanguage"));var he=typeof window<"u"?window:{screen:{},navigator:{}},Ot=(he.matchMedia||function(){return{matches:!1}}).bind(he),Wl={get passive(){return!0}},xa=function(){};he.addEventListener&&he.addEventListener("p",xa,Wl),he.removeEventListener&&he.removeEventListener("p",xa,!1);var On="ontouchstart"in he,Gl="TouchEvent"in he,ql=On||Gl&&Ot("(any-pointer: coarse)").matches,Ca=(he.navigator.maxTouchPoints||0)>0||ql,Ra=he.navigator.userAgent||"",Hl=Ot("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Ra)&&Math.min(he.screen.width||0,he.screen.height||0)>=768,Sa=(Ot("(pointer: coarse)").matches||!Ot("(pointer: fine)").matches&&On)&&!/Windows.*Firefox/.test(Ra),Yl=Ot("(any-pointer: fine)").matches||Ot("(any-hover: hover)").matches||Hl||!On,Ta=Ca&&(Yl||!Sa)?"hybrid":Ca?"touchOnly":"mouseOnly",Ql=Ta==="mouseOnly"?"mouse":Ta==="touchOnly"||Sa?"touch":"mouse";ui();var Kl=me("<a><!></a>"),Jl=me('<button type="button"><!></button>');function Ea(t,e){mt(e,!1);let r=U(e,"href",12),n=U(e,"onclick",12),o=U(e,"onmouseenter",12),a=U(e,"onmouseleave",12),i=U(e,"style",12),s=U(e,"className",12),c=U(e,"isStandalone",12,!1),l=U(e,"children",12);const u=Array.isArray(s())?s():s()?[s()]:[];var f=Ce(),d=ee(f);{var m=b=>{var T=Kl();let p;var k=ke(T);on(k,l),be(T),zt(v=>{wr(T,"href",r()),p=dn(T,1,cn(u),null,p,v),hn(T,i())},[()=>({"open-button--standalone":c()})],hr),_r("mouseenter",T,function(...v){o()?.apply(this,v)}),_r("mouseleave",T,function(...v){a()?.apply(this,v)}),D(b,T)},_=b=>{var T=Jl();T.__click=function(...v){n()?.apply(this,v)};let p;var k=ke(T);on(k,l),be(T),zt(v=>{p=dn(T,1,cn(u),null,p,v),hn(T,i())},[()=>({"open-button--standalone":c()})],hr),_r("mouseenter",T,function(...v){o()?.apply(this,v)}),_r("mouseleave",T,function(...v){a()?.apply(this,v)}),D(b,T)};Ne(d,b=>{r()?b(m):b(_,!1)})}return D(t,f),gt({get href(){return r()},set href(b){r(b),Z()},get onclick(){return n()},set onclick(b){n(b),Z()},get onmouseenter(){return o()},set onmouseenter(b){o(b),Z()},get onmouseleave(){return a()},set onmouseleave(b){a(b),Z()},get style(){return i()},set style(b){i(b),Z()},get className(){return s()},set className(b){s(b),Z()},get isStandalone(){return c()},set isStandalone(b){c(b),Z()},get children(){return l()},set children(b){l(b),Z()}})}rn(["click"]),Qt(Ea,{href:{},onclick:{},onmouseenter:{},onmouseleave:{},style:{},className:{},isStandalone:{},children:{}},[],[],!0);function tr(t,e){mt(e,!0);let r=U(e,"css",7),n=Do(e,["$$slots","$$events","$$legacy","$$host","css"]);const o=c=>{mi(()=>{r()&&(c.innerHTML=r())})};var a=Ce(),i=ee(a);{var s=c=>{var l=Ce(),u=ee(l);Qi(u,()=>"style",!1,(f,d)=>{Ji(f,m=>o?.(m)),is(f,()=>({...n}))}),D(c,l)};Ne(i,c=>{r()&&c(s)})}return D(t,a),gt({get css(){return r()},set css(c){r(c),Z()}})}Qt(tr,{css:{}},[],[],!0);var Xl=me('<div class="open-button__title"><!></div>'),ec=me('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),tc=me('<div class="open-button__text"><!> <!></div>'),rc=me('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),nc=me('<link rel="stylesheet"/>'),oc=me("<!> <!>",1),ac=me('<!> <!> <!> <main class="chat-app"><!></main>',1);function $a(t,e){mt(e,!0);const r=(x,S)=>{let F=()=>S?.().theme,B=()=>S?.().language;const z=ve(()=>{const{openButtonTitle:pe,openButtonDescription:lt}=F().translations[B()];return{openButtonTitle:pe,openButtonDescription:lt}}),se=ve(()=>F().fullTheme[R(n)].tokens.svgs),Be=ve(()=>["open-button",e.buttonClass]);Ea(x,{get href(){return F().buttonHref},get onclick(){return e.onclick},onmouseenter:b,onmouseleave:T,get style(){return e.buttonStyle},get className(){return R(Be)},get isStandalone(){return R(l)},children:(pe,lt)=>{var Qe=rc(),ct=ee(Qe);{var ut=ft=>{var Mt=tc(),Oa=ke(Mt);{var ic=ht=>{var Ke=Xl(),rr=ke(Ke);ln(rr,()=>R(z).openButtonTitle),be(Ke),D(ht,Ke)};Ne(Oa,ht=>{R(z).openButtonTitle&&ht(ic)})}var sc=De(Oa,2);{var lc=ht=>{var Ke=ec(),rr=ke(Ke),cc=ke(rr);ln(cc,()=>R(z).openButtonDescription),be(rr),Fo(rr,In=>Q(d,In),()=>R(d)),be(Ke),Fo(Ke,In=>Q(f,In),()=>R(f)),D(ht,Ke)};Ne(sc,ht=>{R(z).openButtonDescription&&Ql==="mouse"&&ht(lc)})}be(Mt),D(ft,Mt)};Ne(ct,ft=>{(R(z).openButtonTitle||R(z).openButtonDescription)&&ft(ut)})}var dt=De(ct,2),It=ke(dt);ln(It,()=>R(se).avatar),be(dt),D(pe,Qe)},$$slots:{default:!0}})};let n=ae("light"),o=U(e,"host",7),a=U(e,"onError",7),i=Do(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);const s=async x=>{const F=await(await fetch(`${x}/chatconfig`)).json();return Sl.parse(F)},c=async({forceTheme:x,lang:S,apiUrl:F})=>{const B=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await s(F);let z;S?z=wa(S):z=Ul();const se=Pl(B),Be=Object.keys(se.fullTheme);return Q(n,xs(Be),!0),{theme:se,language:z}};let l=ve(()=>!!o()),u=ae(!1),f=ae(void 0),d=ae(void 0),m=ve(()=>R(d)?.offsetWidth??0),_=ve(()=>R(d)?.offsetHeight??0);function b(){!R(d)||!R(f)||(R(f).style.width=`${R(m)}px`,R(f).style.height=`${R(_)}px`)}function T(){!R(u)&&R(f)&&(R(f).style.width="0",R(f).style.height="0")}let p=ve(()=>c(i).catch(x=>a()(x)));var k=Ce();Ii(x=>{var S=Ce(),F=ee(S);{var B=z=>{var se=Ce(),Be=ee(se);So(Be,()=>R(p),null,(pe,lt)=>{var Qe=oc();const ct=ve(()=>R(lt).theme.fullTheme[R(n)]);var ut=ee(Qe);qi(ut,17,()=>R(ct).fontURLs??[],Wi,(It,ft)=>{var Mt=nc();zt(()=>wr(Mt,"href",R(ft))),D(It,Mt)});var dt=De(ut,2);tr(dt,{id:"font-css",get css(){return R(ct).fontCSS}}),D(pe,Qe)}),D(z,se)};Ne(F,z=>{R(l)&&z(B)})}D(x,S)});var v=ee(k);return So(v,()=>R(p),x=>{},(x,S)=>{var F=Ce();const B=ve(()=>R(S).theme.fullTheme[R(n)]);var z=ee(F);{var se=pe=>{var lt=ac(),Qe=ee(lt);const ct=ve(()=>_l(R(B).tokens));tr(Qe,{id:"theme-css",get css(){return R(ct)}});var ut=De(Qe,2);tr(ut,{id:"app-css",get css(){return ys}});var dt=De(ut,2);tr(dt,{id:"custom-css",get css(){return R(B).customCSS}});var It=De(dt,2),ft=ke(It);r(ft,()=>R(S)),be(It),D(pe,lt)},Be=pe=>{r(pe,()=>R(S))};Ne(z,pe=>{R(l)?pe(se):pe(Be,!1)})}D(x,F)}),D(t,k),gt({get host(){return o()},set host(x){o(x),Z()},get onError(){return a()},set onError(x){a(x),Z()}})}Qt($a,{host:{},onError:{}},[],[],!0);function Aa(t,e){mt(e,!0);let r=U(e,"onclick",7),n=U(e,"buttonClass",7),o=U(e,"buttonStyle",7),a=U(e,"apiUrl",7),i=U(e,"forceTheme",7),s=U(e,"lang",7),c=ve(()=>({onclick:r(),buttonClass:n(),buttonStyle:o(),apiUrl:a(),forceTheme:i(),lang:s()}));return Zo(t,{silent:!0,body:(u,f=lr)=>{$a(u,us({host:e.$$host,get onError(){return f()}},()=>R(c)))},$$slots:{body:!0}}),gt({get onclick(){return r()},set onclick(l){r(l),Z()},get buttonClass(){return n()},set buttonClass(l){n(l),Z()},get buttonStyle(){return o()},set buttonStyle(l){o(l),Z()},get apiUrl(){return a()},set apiUrl(l){a(l),Z()},get forceTheme(){return i()},set forceTheme(l){i(l),Z()},get lang(){return s()},set lang(l){s(l),Z()}})}return customElements.define("liipgpt-button",Qt(Aa,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0)),Fr.LiipGPTButton=Aa,Object.defineProperty(Fr,Symbol.toStringTag,{value:"Module"}),Fr}({});
231
+ `}}},Ol=Ye(va,{tokens:{components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},line:{color:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--color-grey-0)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},pillDefault:{color:"var(--color-grey-200)",background:"var(--color-grey-600)",boxShadow:"var(--card-box-shadow)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-700)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),$t={fineGrained:{light:va,dark:Ol}},Il=Object.freeze(Object.defineProperty({__proto__:null,theme:$t},Symbol.toStringTag,{value:"Module"})),Ml=t=>{const e=Tl(t);return{light:Ye($t.fineGrained.light,e)}},jl=t=>{const e={};return t.dark&&(e.dark=Ye($t.fineGrained.dark,t.dark)),t.light&&(e.light=Ye($t.fineGrained.light,t.light)),!t.dark&&!t.light&&(e.light=t.light),e},At={de:{answerGood:"Gute Antwort",answerBad:"Schlechte Antwort",predefinedQuestions:"Vordefinierte Fragen:",chatInputPlaceholder:"Fragen Sie mich etwas",chatInputPlaceholderListening:"Ich höre zu...",chatInputSubmit:"Aufforderung senden",chatInputStartListening:"Spracherkennung starten",chatInputStopListening:"Spracherkennung beenden",introductionTitle:'Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?',referenceLink:"Link zur Referenz",newChat:"Neuer Chat",maintenanceModeError:"Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.",messageBotLoading:"Lass mich nachdenken",messageBotError:"Es ist ein Fehler aufgetreten:",messageBotDefaultError:"Unbekannter Fehler",referenceTitle:"Referenzen anzeigen",chatFooterText:"",scrollToBottom:"Nach unten scrollen",openMenu:"Menü öffnen",closeMenu:"Menü schließen",closeChat:"Chat schließen",close:"Schließen",openInfo:"Info öffnen",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",lightMode:"Hell",darkMode:"Dunkel"},en:{answerGood:"Good answer",answerBad:"Bad answer",predefinedQuestions:"Predefined Questions:",chatInputPlaceholder:"Ask me something",chatInputPlaceholderListening:"I'm listening...",chatInputSubmit:"Send prompt",chatInputStartListening:"Start speech recognition",chatInputStopListening:"Stop speech recognition",introductionTitle:'I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?',referenceLink:"Link to reference",newChat:"New discussion",maintenanceModeError:"The chat is currently not available. Please try again later.",messageBotLoading:"Let me think",messageBotError:"An error occurred:",messageBotDefaultError:"Unknown error",referenceTitle:"Show references",chatFooterText:"",scrollToBottom:"Scroll to bottom",openMenu:"Open menu",closeMenu:"Close menu",closeChat:"Close chat",openInfo:"Open info",close:"Close",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",lightMode:"Light",darkMode:"Dark"},it:{answerGood:"Risposta buona",answerBad:"Risposta cattiva",predefinedQuestions:"Domande predefinite:",chatInputPlaceholder:"Chiedimi qualcosa",chatInputPlaceholderListening:"Sto ascoltando...",chatInputSubmit:"Invia richiesta",chatInputStartListening:"Avvia il riconoscimento vocale",chatInputStopListening:"Ferma il riconoscimento vocale",introductionTitle:'Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?',referenceLink:"Link alla referenza",newChat:"Nuova discussione",maintenanceModeError:"Il chat è attualmente non disponibile. Per favore riprova più tardi.",messageBotLoading:"Fammi pensare",messageBotError:"Si è verificato un errore:",messageBotDefaultError:"Errore sconosciuto",referenceTitle:"Mostra riferimenti",chatFooterText:"",scrollToBottom:"Scorri verso il basso",openMenu:"Apri menu",closeMenu:"Chiudi menu",closeChat:"Chiudi chat",openInfo:"Apri info",close:"Chiudi",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",lightMode:"Chiaro",darkMode:"Scuro"},fr:{answerGood:"Réponse bonne",answerBad:"Réponse mauvaise",predefinedQuestions:"Questions prédéfinies:",chatInputPlaceholder:"Posez-moi une question",chatInputPlaceholderListening:"J'écoute...",chatInputSubmit:"Envoyer la demande",chatInputStartListening:"Démarrer la reconnaissance vocale",chatInputStopListening:"Arrêter la reconnaissance vocale",introductionTitle:"Je suis <span class='liipgpt-gradient-text'>LiipGPT</span>. Comment puis-je vous aider aujourd'hui?",referenceLink:"Lien vers la référence",newChat:"Nouvelle discussion",maintenanceModeError:"Le chat est actuellement indisponible. Veuillez réessayer plus tard.",messageBotLoading:"Laissez-moi réfléchir",messageBotError:"Une erreur est survenue:",messageBotDefaultError:"Erreur inconnue",referenceTitle:"Afficher les références",chatFooterText:"",scrollToBottom:"Scroller vers le bas",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu",closeChat:"Fermer le chat",openInfo:"Ouvrir info",close:"Fermer",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",lightMode:"Clair",darkMode:"Sombre"}},Nl=Object.freeze(Object.defineProperty({__proto__:null,translations:At},Symbol.toStringTag,{value:"Module"})),Ll=t=>{t=t??At;const e={};return t.de&&(e.de=Ye(At.de,t.de)),t.en&&(e.en=Ye(At.en,t.en)),t.fr&&(e.fr=Ye(At.fr,t.fr)),t.it&&(e.it=Ye(At.it,t.it)),e},Pl=t=>{let e;t.theme?.fineGrained?e=jl(t.theme?.fineGrained):e=Ml(t?.theme??{});const r=Ll(t?.translations),n={...t,showPredefinedQuestions:t.showPredefinedQuestions??!0,showOverallFeedbackButton:t.showOverallFeedbackButton??!1,showCloseChatButton:t.showCloseChatButton??!1,showContextInfo:t.showContextInfo??!1,showContextMenu:t.showContextMenu??!1,showTextFeedback:t.showTextFeedback??!0,questionPrefix:t.questionPrefix??"",blockPII:t.blockPII??!1,allowAudioInput:t.allowAudioInput??!1,supportedLanguages:t.supportedLanguages??Object.keys(r),fullTheme:e,translations:r,buttonHref:t.buttonHref,addQueryToUrlParams:t.addQueryToUrlParams??!0,renderKatex:t.renderKatex??!1,sendReferrer:t.sendReferrer??"all"};return t.classification&&(n.classification=t.classification),t.menu&&(n.menu=t.menu),n},An=structuredClone($t.fineGrained.light);An.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},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"}};const ga=structuredClone($t.fineGrained.dark);ga.tokens.colors=An.tokens.colors;const Bl=Object.freeze(Object.defineProperty({__proto__:null,theme:{fineGrained:{light:An,dark:ga}}},Symbol.toStringTag,{value:"Module"})),ba=t=>t.split("/").pop().split(".")[0],Fl=Object.assign({"./default/fallback-dev.theme.ts":Bl,"./default/fallback.theme.ts":Il}),ka=new Map;Object.entries(Fl).forEach(([t,e])=>{const{error:r,data:n}=ua.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}ka.set(ba(t),n)}),Array.from(ka.keys());const zl=Object.assign({"./default/fallback.translations.ts":Nl}),_a=new Map;Object.entries(zl).forEach(([t,e])=>{const{error:r,data:n}=fa.safeParse(e?.translations);if(r){console.error(`Invalid translations in ${t}:`,r);return}_a.set(ba(t),n)}),Array.from(_a.keys());const Dl=["en","de","fr","it"],Zl="en",ya=t=>Dl.includes(t),wa=t=>{if(ya(t))return t;const e=Vl();return ya(e)?e:Zl},Vl=()=>navigator.language.split("-")[0],Ul=()=>wa(localStorage.getItem("liipgpt:selectedLanguage"));var he=typeof window<"u"?window:{screen:{},navigator:{}},Ot=(he.matchMedia||function(){return{matches:!1}}).bind(he),ql={get passive(){return!0}},xa=function(){};he.addEventListener&&he.addEventListener("p",xa,ql),he.removeEventListener&&he.removeEventListener("p",xa,!1);var On="ontouchstart"in he,Wl="TouchEvent"in he,Gl=On||Wl&&Ot("(any-pointer: coarse)").matches,Ca=(he.navigator.maxTouchPoints||0)>0||Gl,Ra=he.navigator.userAgent||"",Hl=Ot("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Ra)&&Math.min(he.screen.width||0,he.screen.height||0)>=768,Sa=(Ot("(pointer: coarse)").matches||!Ot("(pointer: fine)").matches&&On)&&!/Windows.*Firefox/.test(Ra),Yl=Ot("(any-pointer: fine)").matches||Ot("(any-hover: hover)").matches||Hl||!On,Ta=Ca&&(Yl||!Sa)?"hybrid":Ca?"touchOnly":"mouseOnly",Ql=Ta==="mouseOnly"?"mouse":Ta==="touchOnly"||Sa?"touch":"mouse";ui();var Kl=ve("<a><!></a>"),Jl=ve('<button type="button"><!></button>');function Ea(t,e){vt(e,!1);let r=U(e,"href",12),n=U(e,"onclick",12),o=U(e,"onmouseenter",12),a=U(e,"onmouseleave",12),i=U(e,"style",12),s=U(e,"className",12),c=U(e,"isStandalone",12,!1),l=U(e,"children",12);const u=Array.isArray(s())?s():s()?[s()]:[];var f=Ce(),d=ee(f);{var v=b=>{var T=Kl();let p;var k=ke(T);on(k,l),be(T),Dt(m=>{xr(T,"href",r()),p=dn(T,1,cn(u),null,p,m),hn(T,i())},[()=>({"open-button--standalone":c()})],pr),yr("mouseenter",T,function(...m){o()?.apply(this,m)}),yr("mouseleave",T,function(...m){a()?.apply(this,m)}),z(b,T)},_=b=>{var T=Jl();T.__click=function(...m){n()?.apply(this,m)};let p;var k=ke(T);on(k,l),be(T),Dt(m=>{p=dn(T,1,cn(u),null,p,m),hn(T,i())},[()=>({"open-button--standalone":c()})],pr),yr("mouseenter",T,function(...m){o()?.apply(this,m)}),yr("mouseleave",T,function(...m){a()?.apply(this,m)}),z(b,T)};Ne(d,b=>{r()?b(v):b(_,!1)})}return z(t,f),gt({get href(){return r()},set href(b){r(b),Z()},get onclick(){return n()},set onclick(b){n(b),Z()},get onmouseenter(){return o()},set onmouseenter(b){o(b),Z()},get onmouseleave(){return a()},set onmouseleave(b){a(b),Z()},get style(){return i()},set style(b){i(b),Z()},get className(){return s()},set className(b){s(b),Z()},get isStandalone(){return c()},set isStandalone(b){c(b),Z()},get children(){return l()},set children(b){l(b),Z()}})}rn(["click"]),Qt(Ea,{href:{},onclick:{},onmouseenter:{},onmouseleave:{},style:{},className:{},isStandalone:{},children:{}},[],[],!0);function rr(t,e){vt(e,!0);let r=U(e,"css",7),n=zo(e,["$$slots","$$events","$$legacy","$$host","css"]);const o=c=>{vi(()=>{r()&&(c.innerHTML=r())})};var a=Ce(),i=ee(a);{var s=c=>{var l=Ce(),u=ee(l);Qi(u,()=>"style",!1,(f,d)=>{Ji(f,v=>o?.(v)),is(f,()=>({...n}))}),z(c,l)};Ne(i,c=>{r()&&c(s)})}return z(t,a),gt({get css(){return r()},set css(c){r(c),Z()}})}Qt(rr,{css:{}},[],[],!0);var Xl=ve('<div class="open-button__title"><!></div>'),ec=ve('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),tc=ve('<div class="open-button__text"><!> <!></div>'),rc=ve('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),nc=ve('<link rel="stylesheet"/>'),oc=ve("<!> <!>",1),ac=ve('<!> <!> <!> <main class="chat-app"><!></main>',1);function $a(t,e){vt(e,!0);const r=(x,S)=>{let F=()=>S?.().theme,B=()=>S?.().language;const D=me(()=>{const{openButtonTitle:pe,openButtonDescription:lt}=F().translations[B()];return{openButtonTitle:pe,openButtonDescription:lt}}),se=me(()=>F().fullTheme[R(n)].tokens.svgs),Be=me(()=>["open-button",e.buttonClass]);Ea(x,{get href(){return F().buttonHref},get onclick(){return e.onclick},onmouseenter:b,onmouseleave:T,get style(){return e.buttonStyle},get className(){return R(Be)},get isStandalone(){return R(l)},children:(pe,lt)=>{var Qe=rc(),ct=ee(Qe);{var ut=ft=>{var Mt=tc(),Oa=ke(Mt);{var ic=ht=>{var Ke=Xl(),nr=ke(Ke);ln(nr,()=>R(D).openButtonTitle),be(Ke),z(ht,Ke)};Ne(Oa,ht=>{R(D).openButtonTitle&&ht(ic)})}var sc=ze(Oa,2);{var lc=ht=>{var Ke=ec(),nr=ke(Ke),cc=ke(nr);ln(cc,()=>R(D).openButtonDescription),be(nr),Fo(nr,In=>Q(d,In),()=>R(d)),be(Ke),Fo(Ke,In=>Q(f,In),()=>R(f)),z(ht,Ke)};Ne(sc,ht=>{R(D).openButtonDescription&&Ql==="mouse"&&ht(lc)})}be(Mt),z(ft,Mt)};Ne(ct,ft=>{(R(D).openButtonTitle||R(D).openButtonDescription)&&ft(ut)})}var dt=ze(ct,2),It=ke(dt);ln(It,()=>R(se).avatar),be(dt),z(pe,Qe)},$$slots:{default:!0}})};let n=ae("light"),o=U(e,"host",7),a=U(e,"onError",7),i=zo(e,["$$slots","$$events","$$legacy","$$host","host","onError"]);const s=async x=>{const F=await(await fetch(`${x}/chatconfig`)).json();return Sl.parse(F)},c=async({forceTheme:x,lang:S,apiUrl:F})=>{const B=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await s(F);let D;S?D=wa(S):D=Ul();const se=Pl(B),Be=Object.keys(se.fullTheme);return Q(n,xs(Be),!0),{theme:se,language:D}};let l=me(()=>!!o()),u=ae(!1),f=ae(void 0),d=ae(void 0),v=me(()=>R(d)?.offsetWidth??0),_=me(()=>R(d)?.offsetHeight??0);function b(){!R(d)||!R(f)||(R(f).style.width=`${R(v)}px`,R(f).style.height=`${R(_)}px`)}function T(){!R(u)&&R(f)&&(R(f).style.width="0",R(f).style.height="0")}let p=me(()=>c(i).catch(x=>a()(x)));var k=Ce();Ii(x=>{var S=Ce(),F=ee(S);{var B=D=>{var se=Ce(),Be=ee(se);So(Be,()=>R(p),null,(pe,lt)=>{var Qe=oc();const ct=me(()=>R(lt).theme.fullTheme[R(n)]);var ut=ee(Qe);Gi(ut,17,()=>R(ct).fontURLs??[],qi,(It,ft)=>{var Mt=nc();Dt(()=>xr(Mt,"href",R(ft))),z(It,Mt)});var dt=ze(ut,2);rr(dt,{id:"font-css",get css(){return R(ct).fontCSS}}),z(pe,Qe)}),z(D,se)};Ne(F,D=>{R(l)&&D(B)})}z(x,S)});var m=ee(k);return So(m,()=>R(p),x=>{},(x,S)=>{var F=Ce();const B=me(()=>R(S).theme.fullTheme[R(n)]);var D=ee(F);{var se=pe=>{var lt=ac(),Qe=ee(lt);const ct=me(()=>_l(R(B).tokens));rr(Qe,{id:"theme-css",get css(){return R(ct)}});var ut=ze(Qe,2);rr(ut,{id:"app-css",get css(){return ys}});var dt=ze(ut,2);rr(dt,{id:"custom-css",get css(){return R(B).customCSS}});var It=ze(dt,2),ft=ke(It);r(ft,()=>R(S)),be(It),z(pe,lt)},Be=pe=>{r(pe,()=>R(S))};Ne(D,pe=>{R(l)?pe(se):pe(Be,!1)})}z(x,F)}),z(t,k),gt({get host(){return o()},set host(x){o(x),Z()},get onError(){return a()},set onError(x){a(x),Z()}})}Qt($a,{host:{},onError:{}},[],[],!0);function Aa(t,e){vt(e,!0);let r=U(e,"onclick",7),n=U(e,"buttonClass",7),o=U(e,"buttonStyle",7),a=U(e,"apiUrl",7),i=U(e,"forceTheme",7),s=U(e,"lang",7),c=me(()=>({onclick:r(),buttonClass:n(),buttonStyle:o(),apiUrl:a(),forceTheme:i(),lang:s()}));return Zo(t,{silent:!0,body:(u,f=cr)=>{$a(u,us({host:e.$$host,get onError(){return f()}},()=>R(c)))},$$slots:{body:!0}}),gt({get onclick(){return r()},set onclick(l){r(l),Z()},get buttonClass(){return n()},set buttonClass(l){n(l),Z()},get buttonStyle(){return o()},set buttonStyle(l){o(l),Z()},get apiUrl(){return a()},set apiUrl(l){a(l),Z()},get forceTheme(){return i()},set forceTheme(l){i(l),Z()},get lang(){return s()},set lang(l){s(l),Z()}})}return customElements.define("liipgpt-button",Qt(Aa,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0)),Fr.LiipGPTButton=Aa,Object.defineProperty(Fr,Symbol.toStringTag,{value:"Module"}),Fr}({});