@liip/liipgpt 3.13.0 → 3.14.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/chat/button-or-link-PGZlLHeY.js +389 -0
  2. package/chat/chat-panel-CMEF6dCY.js +167 -0
  3. package/chat/liipgpt-chat.iife.js +152 -144
  4. package/chat/liipgpt-chat.js +3 -547
  5. package/configurator/_app/env.js +1 -1
  6. package/configurator/_app/immutable/chunks/{BndQp4ie.js → 1875LovI.js} +1 -1
  7. package/configurator/_app/immutable/chunks/{C6xrTJ8-.js → 7SXCsozV.js} +1 -1
  8. package/configurator/_app/immutable/chunks/{DmZKIk3Y.js → BFOCQ3BT.js} +1 -1
  9. package/configurator/_app/immutable/chunks/BY7oLUru.js +151 -0
  10. package/configurator/_app/immutable/chunks/C9E5N_bV.js +1 -0
  11. package/configurator/_app/immutable/chunks/CO3VICxJ.js +2 -0
  12. package/configurator/_app/immutable/chunks/CeK7PEDP.js +16 -0
  13. package/configurator/_app/immutable/chunks/ChVlwB2a.js +1 -0
  14. package/configurator/_app/immutable/chunks/{Dy0FGVSs.js → CuN4mAaD.js} +1 -1
  15. package/configurator/_app/immutable/chunks/DOcPbtv_.js +1 -0
  16. package/configurator/_app/immutable/chunks/DzSGfCej.js +1 -0
  17. package/configurator/_app/immutable/chunks/{k-nJVsgE.js → U8ZkcQ3P.js} +1 -1
  18. package/configurator/_app/immutable/chunks/{BMJ5aYRa.js → _ctYO-6x.js} +1 -1
  19. package/configurator/_app/immutable/chunks/{DLkzrfsn.js → j6EnY7OK2.js} +2 -2
  20. package/configurator/_app/immutable/entry/{app.BHBkpDs8.js → app.sVdrjZAP.js} +2 -2
  21. package/configurator/_app/immutable/entry/start.DaITnMLh.js +1 -0
  22. package/configurator/_app/immutable/nodes/{0.DLWEcFHQ.js → 0.CVHzDxkZ.js} +2 -2
  23. package/configurator/_app/immutable/nodes/{1.KI8fWs2N.js → 1.CUreVIW4.js} +1 -1
  24. package/configurator/_app/immutable/nodes/{2.B59b_gVk.js → 2.D9FNKDzU.js} +5 -5
  25. package/configurator/_app/immutable/nodes/{3.DN70KT-c.js → 3.D2_zL1r0.js} +1 -1
  26. package/configurator/_app/version.json +1 -1
  27. package/configurator/index.html +6 -6
  28. package/configurator/sidebar.html +6 -6
  29. package/package.json +1 -1
  30. package/configurator/_app/immutable/chunks/BBWpG1hF.js +0 -1
  31. package/configurator/_app/immutable/chunks/BKRBEPI5.js +0 -143
  32. package/configurator/_app/immutable/chunks/DeKAuPLN.js +0 -1
  33. package/configurator/_app/immutable/chunks/Q68dKsWV.js +0 -16
  34. package/configurator/_app/immutable/entry/start._nmsyr-e.js +0 -1
  35. /package/configurator/_app/immutable/chunks/{CNNudH1c.js → 88r4b_k4.js} +0 -0
  36. /package/configurator/_app/immutable/chunks/{DHHLckcz.js → DQTfiEmH.js} +0 -0
  37. /package/configurator/_app/immutable/chunks/{MqTIsSeD.js → Ti2dF09M.js} +0 -0
@@ -0,0 +1,389 @@
1
+ /*! @liip/liipgpt | Copyright 2025-2026 Liip AG | Apache-2.0 | see LICENSE and NOTICE */
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var l={},u=Symbol(),d=`http://www.w3.org/1999/xhtml`,f=`http://www.w3.org/2000/svg`,p=`http://www.w3.org/1998/Math/MathML`,m=`@attach`,h=Array.isArray,g=Array.prototype.indexOf,_=Array.prototype.includes,v=Array.from,y=Object.keys,b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyDescriptors,te=Object.prototype,ne=Array.prototype,re=Object.getPrototypeOf,ie=Object.isExtensible;function S(e){return typeof e==`function`}var ae=()=>{};function oe(e){return typeof e?.then==`function`}function se(e){return e()}function ce(e){for(var t=0;t<e.length;t++)e[t]()}function le(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ue=1<<24,de=1024,fe=2048,pe=4096,C=8192,me=16384,w=32768,he=1<<25,T=65536,ge=1<<18,_e=1<<19,ve=1<<20,ye=1<<25,be=65536,xe=1<<21,Se=1<<22,Ce=1<<23,we=Symbol(`$state`),Te=Symbol(`legacy props`),Ee=Symbol(``),De=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Oe=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ke(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ae(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function je(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Me(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ne(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Fe(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ie(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Le(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Re(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Ue(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function We(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ge(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}function Ke(e){console.warn(`https://svelte.dev/e/transition_slide_display`)}var E=!1;function D(e){E=e}var O;function k(e){if(e===null)throw Ue(),l;return O=e}function qe(){return k(Nn(O))}function Je(e){if(E){if(Nn(O)!==null)throw Ue(),l;O=e}}function Ye(e=1){if(E){for(var t=e,n=O;t--;)n=Nn(n);O=n}}function A(e=!0){for(var t=0,n=O;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Nn(n);e&&n.remove(),n=i}}function Xe(e){if(!e||e.nodeType!==8)throw Ue(),l;return e.data}function Ze(e){return e===this.v}function Qe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function $e(e){return!Qe(e,this.v)}var et=!1,tt=!1;function nt(){tt=!0}var rt=[];function it(e,t=!1,n=!1){return at(e,new Map,``,rt,null,n)}function at(e,t,n,r,i=null,a=!1){if(typeof e==`object`&&e){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(h(e)){var s=Array(e.length);t.set(e,s),i!==null&&t.set(i,s);for(var c=0;c<e.length;c+=1){var l=e[c];c in e&&(s[c]=at(l,t,n,r,null,a))}return s}if(re(e)===te){s={},t.set(e,s),i!==null&&t.set(i,s);for(var u of Object.keys(e))s[u]=at(e[u],t,n,r,null,a);return s}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON==`function`&&!a)return at(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var j=null;function ot(e){j=e}function st(e){return mt(`getContext`).get(e)}function ct(e,t){let n=mt(`setContext`);if(et){var r=z.f;!R&&r&32&&!j.i||Re()}return n.set(e,t),t}function lt(e){return mt(`hasContext`).has(e)}function ut(){return mt(`getAllContexts`)}function dt(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:z,l:tt&&!t?{s:null,u:null,$:[]}:null}}function ft(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)$n(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function pt(){return!tt||j!==null&&j.l===null}function mt(e){return j===null&&ke(e),j.c??=new Map(ht(j)||void 0)}function ht(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var gt=[];function _t(){var e=gt;gt=[],ce(e)}function vt(e){if(gt.length===0&&!Ft){var t=gt;queueMicrotask(()=>{t===gt&&_t()})}gt.push(e)}function yt(){for(;gt.length>0;)_t()}function bt(e){var t=z;if(t===null)return R.f|=Ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;xt(e,t)}function xt(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var St=~(fe|pe|de);function M(e,t){e.f=e.f&St|t}function Ct(e){e.f&512||e.deps===null?M(e,de):M(e,pe)}function wt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=be,wt(t.deps))}function Tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),wt(e.deps),M(e,de)}var Et=[];function Dt(e,t=ae){let n=null,r=new Set;function i(t){if(Qe(e,t)&&(e=t,n)){let t=!Et.length;for(let t of r)t[1](),Et.push(t,e);if(t){for(let e=0;e<Et.length;e+=2)Et[e][0](Et[e+1]);Et.length=0}}}function a(t){i(t(e))}function o(o,s=ae){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||ae),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var Ot=!1,kt=!1;function At(e){var t=kt;try{return kt=!1,[e(),kt]}finally{kt=t}}var jt=new Set,N=null,Mt=null,Nt=null,Pt=null,Ft=!1,It=!1,Lt=null,Rt=null,zt=0,Bt=1,Vt=class e{id=Bt++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=0;#i=null;#a=[];#o=new Set;#s=new Set;#c=new Map;is_fork=!1;#l=!1;#u(){return this.is_fork||this.#r>0}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#c.get(e);if(t){this.#c.delete(e);for(var n of t.d)M(n,fe),this.schedule(n);for(n of t.m)M(n,pe),this.schedule(n)}}#d(){if(zt++>1e3&&(jt.delete(this),Ut()),!this.#u()){for(let e of this.#o)this.#s.delete(e),M(e,fe),this.schedule(e);for(let e of this.#s)M(e,pe),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=Lt=[],r=[],i=Rt=[];for(let e of t)try{this.#f(e,n,r)}catch(t){throw Xt(e),t}if(N=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Lt=null,Rt=null,this.#u()){this.#p(r),this.#p(n);for(let[e,t]of this.#c)Yt(e,t)}else{this.#n===0&&jt.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Mt=this,Gt(r),Gt(n),Mt=null,this.#i?.resolve()}var o=N;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(jt.add(o),o.#d()),jt.has(this)||this.#m()}#f(e,t,n){e.f^=de;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=de:i&4?t.push(r):et&&i&16777224?n.push(r):zr(r)&&(i&16&&this.#s.add(r),Wr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#p(e){for(var t=0;t<e.length;t+=1)Tt(e[t],this.#o,this.#s)}capture(e,t){t!==u&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,e.v),Nt?.set(e,e.v))}activate(){N=this}deactivate(){N=null,Nt=null}flush(){try{It=!0,N=this,this.#d()}finally{zt=0,Pt=null,Lt=null,Rt=null,It=!1,N=null,Nt=null,gn.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),jt.delete(this)}#m(){for(let s of jt){var e=s.id<this.id,t=[];for(let[n,r]of this.current){if(s.current.has(n))if(e&&r!==s.current.get(n))s.current.set(n,r);else continue;t.push(n)}var n=[...s.current.keys()].filter(e=>!this.current.has(e));if(n.length===0)e&&s.discard();else if(t.length>0){s.activate();var r=new Set,i=new Map;for(var a of t)Kt(a,n,r,i);if(s.#a.length>0){s.apply();for(var o of s.#a)s.#f(o,[],[]);s.#a=[]}s.deactivate()}}}increment(e){this.#n+=1,e&&(this.#r+=1)}decrement(e,t){--this.#n,e&&--this.#r,!(this.#l||t)&&(this.#l=!0,vt(()=>{this.#l=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#o.add(t);for(let e of t)this.#s.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=le()).promise}static ensure(){if(N===null){let t=N=new e;It||(jt.add(N),Ft||vt(()=>{N===t&&t.flush()}))}return N}apply(){if(!et||!this.is_fork&&jt.size===1){Nt=null;return}Nt=new Map(this.current);for(let e of jt)if(!(e===this||e.is_fork))for(let[t,n]of e.previous)Nt.has(t)||Nt.set(t,n)}schedule(e){if(Pt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Lt!==null&&t===z&&(et||(R===null||!(R.f&2))&&!Ot))return;if(n&96){if(!(n&1024))return;t.f^=de}}this.#a.push(t)}};function Ht(e){var t=Ft;Ft=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(yt(),N===null)return n;N.flush()}}finally{Ft=t}}function Ut(){try{Fe()}catch(e){xt(e,Pt)}}var Wt=null;function Gt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&zr(r)&&(Wt=new Set,Wr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&hr(r),Wt?.size>0)){gn.clear();for(let e of Wt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Wt.has(n)&&(Wt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Wr(n)}}Wt.clear()}}Wt=null}}function Kt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Kt(i,t,n,r):e&4194320&&!(e&2048)&&qt(i,t,r)&&(M(i,fe),Jt(i))}}function qt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(_.call(t,r))return!0;if(r.f&2&&qt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Jt(e){N.schedule(e)}function Yt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),M(e,de);for(var n=e.first;n!==null;)Yt(n,t),n=n.next}}function Xt(e){M(e,de);for(var t=e.first;t!==null;)Xt(t),t=t.next}function Zt(e){let t=0,n=vn(0),r;return()=>{Xn()&&(B(n),ar(()=>(t===0&&(r=V(()=>e(()=>Sn(n)))),t+=1,()=>{vt(()=>{--t,t===0&&(r?.(),r=void 0,Sn(n))})})))}}var Qt=T|_e;function $t(e,t,n,r){new en(e,t,n,r)}var en=class{parent;is_pending=!1;transform_error;#e;#t=E?O:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Zt(()=>(this.#m=vn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=z;t.b=this,t.f|=128,n(e)},this.parent=z.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=sr(()=>{if(E){let e=this.#t;qe();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Qt),E&&(this.#e=O)}#g(){try{this.#a=lr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=lr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=lr(()=>e(this.#e)),vt(()=>{var e=this.#c=document.createDocumentFragment(),t=Mn();e.append(t),this.#a=this.#x(()=>lr(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,gr(this.#o,()=>{this.#o=null}),this.#b(N))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=lr(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();br(this.#a,e);let t=this.#n.pending;this.#o=lr(()=>t(this.#e))}else this.#b(N)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Tt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=z,n=R,r=j;Dr(this.#i),Er(this.#i),ot(this.#i.ctx);try{return Vt.ensure(),e()}catch(e){return bt(e),null}finally{Dr(t),Er(n),ot(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&gr(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,vt(()=>{this.#d=!1,this.#m&&bn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),B(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(pr(this.#a),null),this.#o&&=(pr(this.#o),null),this.#s&&=(pr(this.#s),null),E&&(k(this.#t),Ye(),k(A()));var r=!1,i=!1;let a=()=>{if(r){Ge();return}r=!0,i&&He(),this.#s!==null&&gr(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){xt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return lr(()=>{var t=z;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return xt(e,this.#i.parent),null}}))};vt(()=>{var t;try{t=this.transform_error(e)}catch(e){xt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>xt(e,this.#i&&this.#i.parent)):o(t)})}};function tn(e,t,n,r){let i=pt()?on:cn;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=z,s=nn(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||xt(e,o)}rn()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=an();function d(){Promise.all(n.map(e=>sn(e))).then(e=>l([...t.map(i),...e])).catch(e=>xt(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),rn()}):d()}function nn(){var e=z,t=R,n=j,r=N;return function(i=!0){Dr(e),Er(t),ot(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function rn(e=!0){Dr(null),Er(null),ot(null),e&&N?.deactivate()}function an(){var e=z.b,t=N,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function on(e){var t=2|fe,n=R!==null&&R.f&2?R:null;return z!==null&&(z.f|=_e),{ctx:j,deps:null,effects:null,equals:Ze,f:t,fn:e,reactions:null,rv:0,v:u,wv:0,parent:n??z,ac:null}}function sn(e,t,n){let r=z;r===null&&Ae();var i=void 0,a=vn(u),o=!R,s=new Map;return ir(()=>{var t=z,n=le();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(rn)}catch(e){n.reject(e),rn()}var c=N;if(o){if(t.f&32768)var l=an();if(r.b.is_rendered())s.get(c)?.reject(De),s.delete(c);else{for(let e of s.values())e.reject(De);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===De),!(n===De||t.f&16384)){if(c.activate(),n)a.f|=Ce,bn(a,n);else{a.f&8388608&&(a.f^=Ce),bn(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(De)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),Zn(()=>{for(let e of s.values())e.reject(De)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function P(e){let t=on(e);return et||kr(t),t}function cn(e){let t=on(e);return t.equals=$e,t}function ln(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)pr(t[n])}}function un(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function dn(e){var t,n=z;Dr(un(e));try{e.f&=~be,ln(e),t=Vr(e)}finally{Dr(n)}return t}function fn(e){var t=e.v,n=dn(e);if(!e.equals(n)&&(e.wv=Rr(),(!N?.is_fork||e.deps===null)&&(e.v=n,N?.capture(e,t),e.deps===null))){M(e,de);return}Cr||(Nt===null?Ct(e):(Xn()||N?.is_fork)&&Nt.set(e,n))}function pn(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(De),t.teardown=ae,t.ac=null,Ur(t,0),dr(t))}function mn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Wr(t)}var hn=new Set,gn=new Map,_n=!1;function vn(e,t){return{f:0,v:e,reactions:null,equals:Ze,rv:0,wv:0}}function F(e,t){let n=vn(e,t);return kr(n),n}function yn(e,t=!1,n=!0){let r=vn(e);return t||(r.equals=$e),tt&&n&&j!==null&&j.l!==null&&(j.l.s??=[]).push(r),r}function I(e,t,n=!1){return R!==null&&(!Tr||R.f&131072)&&pt()&&R.f&4325394&&(Or===null||!_.call(Or,e))&&Ve(),bn(e,n?wn(t):t,Rt)}function bn(e,t,n=null){if(!e.equals(t)){var r=e.v;Cr?gn.set(e,t):gn.set(e,r),e.v=t;var i=Vt.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&dn(t),Nt===null&&Ct(t)}e.wv=Rr(),Cn(e,fe,n),pt()&&z!==null&&z.f&1024&&!(z.f&96)&&(Mr===null?Nr([e]):Mr.push(e)),!i.is_fork&&hn.size>0&&!_n&&xn()}return t}function xn(){_n=!1;for(let e of hn)e.f&1024&&M(e,pe),zr(e)&&Wr(e);hn.clear()}function Sn(e){I(e,e.v+1)}function Cn(e,t,n){var r=e.reactions;if(r!==null)for(var i=pt(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===z)){var l=(c&fe)===0;if(l&&M(s,t),c&2){var u=s;Nt?.delete(u),c&65536||(c&512&&(s.f|=be),Cn(u,pe,n))}else if(l){var d=s;c&16&&Wt!==null&&Wt.add(d),n===null?Jt(d):n.push(d)}}}}function wn(e){if(typeof e!=`object`||!e||we in e)return e;let t=re(e);if(t!==te&&t!==ne)return e;var n=new Map,r=h(e),i=F(0),a=null,o=Ir,s=e=>{if(Ir===o)return e();var t=R,n=Ir;Er(null),Lr(o);var r=e();return Er(t),Lr(n),r};return r&&n.set(`length`,F(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&ze();var i=n.get(t);return i===void 0?s(()=>{var e=F(r.value,a);return n.set(t,e),e}):I(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>F(u,a));n.set(t,e),Sn(i)}}else I(r,u),Sn(i);return!0},get(t,r,i){if(r===we)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||x(t,r)?.writable)&&(o=s(()=>F(wn(c?t[r]:u),a)),n.set(r,o)),o!==void 0){var l=B(o);return l===u?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=B(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==u)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===we)return!0;var r=n.get(t),i=r!==void 0&&r.v!==u||Reflect.has(e,t);return(r!==void 0||z!==null&&(!i||x(e,t)?.writable))&&(r===void 0&&(r=s(()=>F(i?wn(e[t]):u,a)),n.set(t,r)),B(r)===u)?!1:i},set(e,t,o,c){var l=n.get(t),d=t in e;if(r&&t===`length`)for(var f=o;f<l.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>F(u,a)),n.set(f+``,p)):I(p,u)}if(l===void 0)(!d||x(e,t)?.writable)&&(l=s(()=>F(void 0,a)),I(l,wn(o)),n.set(t,l));else{d=l.v!==u;var m=s(()=>wn(o));I(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!d){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&I(g,_+1)}Sn(i)}return!0},ownKeys(e){B(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==u});for(var[r,a]of n)a.v!==u&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Be()}})}function Tn(e){try{if(typeof e==`object`&&e&&we in e)return e[we]}catch{}return e}function En(e,t){return Object.is(Tn(e),Tn(t))}var Dn,On,kn,An;function jn(){if(Dn===void 0){Dn=window,On=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;kn=x(t,`firstChild`).get,An=x(t,`nextSibling`).get,ie(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ie(n)&&(n.__t=void 0)}}function Mn(e=``){return document.createTextNode(e)}function L(e){return kn.call(e)}function Nn(e){return An.call(e)}function Pn(e,t){if(!E)return L(e);var n=L(O);if(n===null)n=O.appendChild(Mn());else if(t&&n.nodeType!==3){var r=Mn();return n?.before(r),k(r),r}return t&&Bn(n),k(n),n}function Fn(e,t=!1){if(!E){var n=L(e);return n instanceof Comment&&n.data===``?Nn(n):n}if(t){if(O?.nodeType!==3){var r=Mn();return O?.before(r),k(r),r}Bn(O)}return O}function In(e,t=1,n=!1){let r=E?O:e;for(var i;t--;)i=r,r=Nn(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=Mn();return r===null?i?.after(a):r.before(a),k(a),a}Bn(r)}return k(r),r}function Ln(e){e.textContent=``}function Rn(){return!et||Wt!==null?!1:(z.f&w)!==0}function zn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Bn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Vn(e,t){if(t){let t=document.body;e.autofocus=!0,vt(()=>{document.activeElement===t&&e.focus()})}}function Hn(e){E&&L(e)!==null&&Ln(e)}var Un=!1;function Wn(){Un||(Un=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Gn(e){var t=R,n=z;Er(null),Dr(null);try{return e()}finally{Er(t),Dr(n)}}function Kn(e,t,n,r=n){e.addEventListener(t,()=>Gn(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Wn()}function qn(e){z===null&&(R===null&&Pe(e),Ne()),Cr&&Me(e)}function Jn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Yn(e,t){var n=z;n!==null&&n.f&8192&&(e|=C);var r={ctx:j,deps:null,nodes:null,f:e|fe|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(e&4)Lt===null?Vt.ensure().schedule(r):Lt.push(r);else if(t!==null){try{Wr(r)}catch(e){throw pr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=T))}if(i!==null&&(i.parent=n,n!==null&&Jn(i,n),R!==null&&R.f&2&&!(e&64))){var a=R;(a.effects??=[]).push(i)}return r}function Xn(){return R!==null&&!Tr}function Zn(e){let t=Yn(8,null);return M(t,de),t.teardown=e,t}function Qn(e){qn(`$effect`);var t=z.f;if(!R&&t&32&&!(t&32768)){var n=j;(n.e??=[]).push(e)}else return $n(e)}function $n(e){return Yn(4|ve,e)}function er(e){return qn(`$effect.pre`),Yn(8|ve,e)}function tr(e){Vt.ensure();let t=Yn(64|_e,e);return()=>{pr(t)}}function nr(e){Vt.ensure();let t=Yn(64|_e,e);return(e={})=>new Promise(n=>{e.outro?gr(t,()=>{pr(t),n(void 0)}):(pr(t),n(void 0))})}function rr(e){return Yn(4,e)}function ir(e){return Yn(Se|_e,e)}function ar(e,t=0){return Yn(8|t,e)}function or(e,t=[],n=[],r=[]){tn(r,t,n,t=>{Yn(8,()=>e(...t.map(B)))})}function sr(e,t=0){return Yn(16|t,e)}function cr(e,t=0){return Yn(ue|t,e)}function lr(e){return Yn(32|_e,e)}function ur(e){var t=e.teardown;if(t!==null){let e=Cr,n=R;wr(!0),Er(null);try{t.call(null)}finally{wr(e),Er(n)}}}function dr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Gn(()=>{e.abort(De)});var r=n.next;n.f&64?n.parent=null:pr(n,t),n=r}}function fr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||pr(t),t=n}}function pr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(mr(e.nodes.start,e.nodes.end),n=!0),M(e,he),dr(e,t&&!n),Ur(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();ur(e),e.f^=he,e.f|=me;var i=e.parent;i!==null&&i.first!==null&&hr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function mr(e,t){for(;e!==null;){var n=e===t?null:Nn(e);e.remove(),e=n}}function hr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function gr(e,t,n=!0){var r=[];_r(e,r,!0);var i=()=>{n&&pr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function _r(e,t,n){if(!(e.f&8192)){e.f^=C;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;_r(i,t,o?n:!1),i=a}}}function vr(e){yr(e,!0)}function yr(e,t){if(e.f&8192){e.f^=C,e.f&1024||(M(e,fe),Vt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;yr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function br(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Nn(n);t.append(n),n=i}}var xr=null,Sr=!1,Cr=!1;function wr(e){Cr=e}var R=null,Tr=!1;function Er(e){R=e}var z=null;function Dr(e){z=e}var Or=null;function kr(e){R!==null&&(!et||R.f&2)&&(Or===null?Or=[e]:Or.push(e))}var Ar=null,jr=0,Mr=null;function Nr(e){Mr=e}var Pr=1,Fr=0,Ir=Fr;function Lr(e){Ir=e}function Rr(){return++Pr}function zr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~be),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(zr(a)&&fn(a),a.wv>e.wv)return!0}t&512&&Nt===null&&M(e,de)}return!1}function Br(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!et&&Or!==null&&_.call(Or,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Br(a,t,!1):t===a&&(n?M(a,fe):a.f&1024&&M(a,pe),Jt(a))}}function Vr(e){var t=Ar,n=jr,r=Mr,i=R,a=Or,o=j,s=Tr,c=Ir,l=e.f;Ar=null,jr=0,Mr=null,R=l&96?null:e,Or=null,ot(e.ctx),Tr=!1,Ir=++Fr,e.ac!==null&&(Gn(()=>{e.ac.abort(De)}),e.ac=null);try{e.f|=xe;var u=e.fn,d=u();e.f|=w;var f=e.deps,p=N?.is_fork;if(Ar!==null){var m;if(p||Ur(e,jr),f!==null&&jr>0)for(f.length=jr+Ar.length,m=0;m<Ar.length;m++)f[jr+m]=Ar[m];else e.deps=f=Ar;if(Xn()&&e.f&512)for(m=jr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&jr<f.length&&(Ur(e,jr),f.length=jr);if(pt()&&Mr!==null&&!Tr&&f!==null&&!(e.f&6146))for(m=0;m<Mr.length;m++)Br(Mr[m],e);if(i!==null&&i!==e){if(Fr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Fr;if(t!==null)for(let e of t)e.rv=Fr;Mr!==null&&(r===null?r=Mr:r.push(...Mr))}return e.f&8388608&&(e.f^=Ce),d}catch(e){return bt(e)}finally{e.f^=xe,Ar=t,jr=n,Mr=r,R=i,Or=a,ot(o),Tr=s,Ir=c}}function Hr(e,t){let n=t.reactions;if(n!==null){var r=g.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(Ar===null||!_.call(Ar,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~be),Ct(a),pn(a),Ur(a,0)}}function Ur(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hr(e,n[r])}function Wr(e){var t=e.f;if(!(t&16384)){M(e,de);var n=z,r=Sr;z=e,Sr=!0;try{t&16777232?fr(e):dr(e),ur(e);var i=Vr(e);e.teardown=typeof i==`function`?i:null,e.wv=Pr}finally{Sr=r,z=n}}}async function Gr(){if(et)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Ht()}function B(e){var t=(e.f&2)!=0;if(xr?.add(e),R!==null&&!Tr&&!(z!==null&&z.f&16384)&&(Or===null||!_.call(Or,e))){var n=R.deps;if(R.f&2097152)e.rv<Fr&&(e.rv=Fr,Ar===null&&n!==null&&n[jr]===e?jr++:Ar===null?Ar=[e]:Ar.push(e));else{(R.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[R]:_.call(r,R)||r.push(R)}}if(Cr&&gn.has(e))return gn.get(e);if(t){var i=e;if(Cr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||qr(i))&&(a=dn(i)),gn.set(i,a),a}var o=(i.f&512)==0&&!Tr&&R!==null&&(Sr||(R.f&512)!=0),s=(i.f&w)===0;zr(i)&&(o&&(i.f|=512),fn(i)),o&&!s&&(mn(i),Kr(i))}if(Nt?.has(e))return Nt.get(e);if(e.f&8388608)throw e.v;return e.v}function Kr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(mn(t),Kr(t))}function qr(e){if(e.v===u)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(gn.has(t)||t.f&2&&qr(t))return!0;return!1}function V(e){var t=Tr;try{return Tr=!0,e()}finally{Tr=t}}function Jr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(we in e)Yr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&we in n&&Yr(n)}}}function Yr(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Yr(e[n],t)}catch{}let n=re(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=ee(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}var Xr=Symbol(`events`),Zr=new Set,Qr=new Set;function $r(e,t,n,r={}){function i(e){if(r.capture||ai.call(t,e),!e.cancelBubble)return Gn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?vt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ei(e,t,n,r={}){var i=$r(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function ti(e,t,n,r,i){var a={capture:r,passive:i},o=$r(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Zn(()=>{t.removeEventListener(e,o,a)})}function ni(e,t,n){(t[Xr]??={})[e]=n}function ri(e){for(var t=0;t<e.length;t++)Zr.add(e[t]);for(var n of Qr)n(e)}var ii=null;function ai(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ii=e;var o=0,s=ii===e&&e[Xr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Xr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){b(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=R,d=z;Er(null),Dr(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[Xr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Xr]=t,delete e.currentTarget,Er(u),Dr(d)}}}var oi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function si(e){return oi?.createHTML(e)??e}function ci(e){var t=zn(`template`);return t.innerHTML=si(e.replaceAll(`<!>`,`<!---->`)),t.content}function li(e,t){var n=z;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ui(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return li(O,null),O;i===void 0&&(i=ci(a?e:`<!>`+e),n||(i=L(i)));var t=r||On?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;li(o,s)}else li(t,t);return t}}function di(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return li(O,null),O;if(!o){var e=L(ci(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;li(n,r)}else li(t,t);return t}}function fi(e,t){return di(e,t,`svg`)}function pi(e=``){if(!E){var t=Mn(e+``);return li(t,t),t}var n=O;return n.nodeType===3?Bn(n):(n.before(n=Mn()),k(n)),li(n,n),n}function mi(){if(E)return li(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=Mn();return e.append(t,n),li(t,n),e}function hi(e,t){if(E){var n=z;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),qe();return}e!==null&&e.before(t)}function gi(){if(E&&O&&O.nodeType===8&&O.textContent?.startsWith(`$`)){let e=O.textContent.substring(1);return qe(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function _i(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var vi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function yi(e){return vi.includes(e)}var bi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),xi={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 Si(e){return e=e.toLowerCase(),xi[e]??e}[...bi];var Ci=[`touchstart`,`touchmove`];function wi(e){return Ci.includes(e)}var Ti=[`textarea`,`script`,`style`,`title`];function Ei(e){return Ti.includes(e)}var Di=!0;function Oi(e){Di=e}function ki(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Ai(e,t){return Ni(e,t)}function ji(e,t){jn(),t.intro=t.intro??!1;let n=t.target,r=E,i=O;try{for(var a=L(n);a&&(a.nodeType!==8||a.data!==`[`);)a=Nn(a);if(!a)throw l;D(!0),k(a);let r=Ni(e,{...t,anchor:a});return D(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
3
+ `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==l&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Ie(),jn(),Ln(n),D(!1),Ai(e,t)}finally{D(r),k(i)}}var Mi=new Map;function Ni(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){jn();var c=void 0,u=nr(()=>{var u=n??t.appendChild(Mn());$t(u,{pending:()=>{}},t=>{dt({});var n=j;if(a&&(n.c=a),i&&(r.$$events=i),E&&li(t,null),Di=o,c=e(t,r)||{},Di=!0,E&&(z.nodes.end=O,O===null||O.nodeType!==8||O.data!==`]`))throw Ue(),l;ft()},s);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=wi(r);for(let e of[t,document]){var a=Mi.get(e);a===void 0&&(a=new Map,Mi.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ai,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(v(Zr)),Qr.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=Mi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ai),r.delete(e),r.size===0&&Mi.delete(n)):r.set(e,i)}Qr.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return Pi.set(c,u),c}var Pi=new WeakMap;function Fi(e,t){let n=Pi.get(e);return n?(Pi.delete(e),n(t)):Promise.resolve()}var Ii=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)vr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(pr(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();br(r,t),t.append(Mn()),this.#n.set(e,{effect:r,fragment:t})}else pr(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),gr(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(pr(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=Rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Mn();i.append(a),this.#n.set(e,{effect:lr(()=>t(a)),fragment:i})}else this.#t.set(e,lr(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=O),this.#a(n)}};function Li(e,t,...n){var r=new Ii(e);sr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},T)}function Ri(e){j===null&&ke(`onMount`),tt&&j.l!==null?Bi(j).m.push(e):Qn(()=>{let t=V(e);if(typeof t==`function`)return t})}function zi(e){j===null&&ke(`onDestroy`),Ri(()=>()=>V(e))}function Bi(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Vi(){return Symbol(m)}var Hi=0,Ui=1,Wi=2;function Gi(e,t,n,r,i){E&&qe();var a=pt(),o=u,s=a?vn(o):yn(o,!1,!1),c=a?vn(o):yn(o,!1,!1),l=new Ii(e);sr(()=>{var a=N;a.deactivate();var o=t();a.activate();var u=!1;let d=E&&oe(o)===(e.data===`[!`);if(d&&(k(A()),D(!1)),oe(o)){var f=nn(),p=!1;let e=e=>{if(!u){p=!0,f(!1),Vt.ensure(),E&&D(!1);try{e()}finally{rn(!1),Ft||Ht()}}};o.then(t=>{e(()=>{bn(s,t),l.ensure(Ui,r&&(e=>r(e,s)))})},t=>{e(()=>{if(bn(c,t),l.ensure(Wi,i&&(e=>i(e,c))),!i)throw c.v})}),E?l.ensure(Hi,n):vt(()=>{p||e(()=>{l.ensure(Hi,n)})})}else bn(s,o),l.ensure(Ui,r&&(e=>r(e,s)));return d&&D(!0),()=>{u=!0}})}function Ki(e,t,n=!1){var r;E&&(r=O,qe());var i=new Ii(e),a=n?T:0;function o(e,t){if(E){var n=Xe(r);if(e!==parseInt(n.substring(1))){var a=A();k(a),i.anchor=a,D(!1),i.ensure(e,t),D(!0);return}}i.ensure(e,t)}sr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var qi=Symbol(`NaN`);function Ji(e,t,n){E&&qe();var r=new Ii(e),i=!pt();sr(()=>{var e=t();e!==e&&(e=qi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Yi(e,t){return t}function Xi(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];gr(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Zi(e,v(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;Ln(u),u.append(l),e.items.clear()}Zi(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Zi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ye,br(a,document.createDocumentFragment())):pr(t[i],n)}}var Qi;function $i(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=E?k(L(c)):c.appendChild(Mn())}E&&qe();var l=null,u=cn(()=>{var e=n();return h(e)?e:e==null?[]:v(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,ta(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=ye,ra(l,null,o)):vr(l):gr(l,()=>{l=null})))}function g(e){_.pending.delete(e)}var _={effect:sr(()=>{d=B(u);var e=d.length;let c=!1;E&&Xe(o)===`[!`!=(e===0)&&(o=A(),k(o),D(!1),c=!0);for(var h=new Set,_=N,v=Rn(),y=0;y<e;y+=1){E&&O.nodeType===8&&O.data===`]`&&(o=O,c=!0,D(!1));var b=d[y],x=r(b,y),ee=p?null:s.get(x);ee?(ee.v&&bn(ee.v,b),ee.i&&bn(ee.i,y),v&&_.unskip_effect(ee.e)):(ee=na(s,p?o:Qi??=Mn(),b,x,y,i,t,n),p||(ee.e.f|=ye),s.set(x,ee)),h.add(x)}if(e===0&&a&&!l&&(p?l=lr(()=>a(o)):(l=lr(()=>a(Qi??=Mn())),l.f|=ye)),e>h.size&&je(``,``,``),E&&e>0&&k(A()),!p)if(f.set(_,h),v){for(let[e,t]of s)h.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(g)}else m(_);c&&D(!0),B(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,E&&(o=O)}function ea(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function ta(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=ea(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(vr(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=ye,g===c)ra(g,null,n);else{var y=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),ia(e,u,g),ia(e,g,y),ra(g,y,n),u=g,f=[],p=[],c=ea(u.next);continue}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var b=p[0],x;u=b.prev;var ee=f[0],te=f[f.length-1];for(x=0;x<f.length;x+=1)ra(f[x],b,n);for(x=0;x<p.length;x+=1)l.delete(p[x]);ia(e,ee.prev,te.next),ia(e,u,ee),ia(e,te,b),c=b,u=te,--_,f=[],p=[]}else l.delete(g),ra(g,c,n),ia(e,g.prev,g.next),ia(e,g,u===null?e.effect.first:u.next),ia(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=ea(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=ea(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Zi(e,v(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var ne=[];if(l!==void 0)for(g of l)g.f&8192||ne.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&ne.push(c),c=ea(c.next);var re=ne.length;if(re>0){var ie=r&4&&o===0?n:null;if(a){for(_=0;_<re;_+=1)ne[_].nodes?.a?.measure();for(_=0;_<re;_+=1)ne[_].nodes?.a?.fix()}Xi(e,ne,ie)}}a&&vt(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function na(e,t,n,r,i,a,o,s){var c=o&1?o&16?vn(n):yn(n,!1,!1):null,l=o&2?vn(i):null;return{v:c,i:l,e:lr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ra(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Nn(r);if(a.before(r),r===i)return;r=o}}function ia(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function aa(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;E&&(o=k(L(c)))}or(()=>{var e=z;if(s===(s=t()??``)){E&&qe();return}if(n&&!E){e.nodes=null,c.innerHTML=s,s!==``&&li(L(c),c.lastChild);return}if(e.nodes!==null&&(mr(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(E){for(var a=O.data,u=qe(),d=u;u!==null&&(u.nodeType!==8||u.data!==``);)d=u,u=Nn(u);if(u===null)throw Ue(),l;li(O,d),o=k(u);return}var m=zn(r?`svg`:i?`math`:`template`,r?f:i?p:void 0);m.innerHTML=s;var h=r||i?m:m.content;if(li(L(h),h.lastChild),r||i)for(;L(h);)o.before(L(h));else o.before(h)}})}function oa(e,t,n,r,i){E&&qe();var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n===`default`?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}function sa(e,t,n){var r;E&&(r=O,qe());var i=new Ii(e);sr(()=>{var e=t()??null;if(E&&Xe(r)===`[`!=(e!==null)){var a=A();k(a),i.anchor=a,D(!1),i.ensure(e,e&&(t=>n(t,e))),D(!0);return}i.ensure(e,e&&(t=>n(t,e)))},T)}var ca=()=>performance.now(),la={tick:e=>requestAnimationFrame(e),now:()=>ca(),tasks:new Set};function ua(){let e=la.now();la.tasks.forEach(t=>{t.c(e)||(la.tasks.delete(t),t.f())}),la.tasks.size!==0&&la.tick(ua)}function da(e){let t;return la.tasks.size===0&&la.tick(ua),{promise:new Promise(n=>{la.tasks.add(t={c:e,f:n})}),abort(){la.tasks.delete(t)}}}function fa(e,t){Gn(()=>{e.dispatchEvent(new CustomEvent(t))})}function pa(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function ma(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=pa(n.trim());t[i]=r.trim()}return t}var ha=e=>e;function ga(e,t,n,r){var i=(e&1)!=0,a=(e&2)!=0,o=i&&a,s=(e&4)!=0,c=o?`both`:i?`in`:`out`,l,u=t.inert,d=t.style.overflow,f,p;function m(){return Gn(()=>l??=n()(t,r?.()??{},{direction:c}))}var h={is_global:s,in(){if(t.inert=u,!i){p?.abort(),p?.reset?.();return}a||f?.abort(),f=_a(t,m(),p,1,()=>{fa(t,`introend`),f?.abort(),f=l=void 0,t.style.overflow=d})},out(e){if(!a){e?.(),l=void 0;return}t.inert=!0,p=_a(t,m(),f,0,()=>{fa(t,`outroend`),e?.()})},stop:()=>{f?.abort(),p?.abort()}},g=z;if((g.nodes.t??=[]).push(h),i&&Di){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||(v.f&32768)!=0}_&&rr(()=>{V(()=>h.in())})}}function _a(e,t,n,r,i){var a=r===1;if(S(t)){var o,s=!1;return vt(()=>{s||(o=_a(e,t({direction:a?`in`:`out`}),n,r,i))}),{abort:()=>{s=!0,o?.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return fa(e,a?`introstart`:`outrostart`),i(),{abort:ae,deactivate:ae,reset:ae,t:()=>r};let{delay:c=0,css:l,tick:u,easing:d=ha}=t;var f=[];if(a&&n===void 0&&(u&&u(0,1),l)){var p=ma(l(0,1));f.push(p,p)}var m=()=>1-r,h=e.animate(f,{duration:c,fill:`forwards`});return h.onfinish=()=>{h.cancel(),fa(e,a?`introstart`:`outrostart`);var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),f=[];if(c>0){var p=!1;if(l)for(var g=Math.ceil(c/(1e3/60)),_=0;_<=g;_+=1){var v=o+s*d(_/g),y=ma(l(v,1-v));f.push(y),p||=y.overflow===`hidden`}p&&(e.style.overflow=`hidden`),m=()=>{var e=h.currentTime;return o+s*d(e/c)},u&&da(()=>{if(h.playState!==`running`)return!1;var e=m();return u(e,1-e),!0})}h=e.animate(f,{duration:c,fill:`forwards`}),h.onfinish=()=>{m=()=>r,u?.(r,1-r),i()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ae)},deactivate:()=>{i=ae},reset:()=>{r===0&&u?.(1,0)},t:()=>m()}}function va(e,t,n,r,i,a){let o=E;E&&qe();var s=null;E&&O.nodeType===1&&(s=O,qe());var c=E?O:e,l=new Ii(c,!1);sr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?f:void 0;if(e===null){l.ensure(null,null),Oi(!0);return}return l.ensure(e,t=>{if(e){if(s=E?s:zn(e,a),li(s,s),r){E&&Ei(e)&&s.append(document.createComment(``));var n=E?L(s):s.appendChild(Mn());E&&(n===null?D(!1):k(n)),r(s,n)}z.nodes.end=s,t.before(s)}E&&k(t)}),Oi(!0),()=>{e&&Oi(!1)}},T),Zn(()=>{Oi(!0)}),o&&(D(!0),k(c))}function ya(e,t){let n=null,r=E;var i;if(E){n=O;for(var a=L(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=Nn(a);if(a===null)D(!1);else{var o=Nn(a);a.remove(),k(o)}}E||(i=document.head.appendChild(Mn()));try{sr(()=>t(i),ge|_e)}finally{r&&(D(!0),k(n))}}function ba(e,t){rr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=zn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function xa(e,t,n){rr(()=>{var r=V(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};ar(()=>{var e=n();Jr(e),i&&Qe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Sa(e,t){var n=void 0,r;cr(()=>{n!==(n=t())&&(r&&=(pr(r),null),n&&(r=lr(()=>{rr(()=>n(e))})))})}function Ca(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ca(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function wa(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ca(e))&&(r&&(r+=` `),r+=t);return r}function Ta(e){return typeof e==`object`?wa(e):e??``}var Ea=[...`
4
+ \r\f\xA0\v`];function Da(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ea.includes(r[o-1]))&&(s===r.length||Ea.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Oa(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ka(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Aa(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ka)),i&&c.push(...Object.keys(i).map(ka));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ka(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Oa(r)),i&&(n+=Oa(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ja(e,t,n,r,i,a){var o=e.__className;if(E||o!==n||o===void 0){var s=Da(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ma(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Na(e,t,n,r){var i=e.__style;if(E||i!==t){var a=Aa(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Ma(e,n?.[0],r[0]),Ma(e,n?.[1],r[1],`important`)):Ma(e,n,r));return r}function Pa(e,t,n=!1){if(e.multiple){if(t==null)return;if(!h(t))return We();for(var r of e.options)r.selected=t.includes(La(r));return}for(r of e.options)if(En(La(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Fa(e){var t=new MutationObserver(()=>{Pa(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Zn(()=>{t.disconnect()})}function Ia(e,t,n=t){var r=new WeakSet,i=!0;Kn(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),La);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&La(o)}n(a),e.__value=a,N!==null&&r.add(N)}),rr(()=>{var a=t();if(e===document.activeElement){var o=et?Mt:N;if(r.has(o))return}if(Pa(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=La(s),n(a))}e.__value=a,i=!1}),Fa(e)}function La(e){return`__value`in e?e.__value:e.value}var Ra=Symbol(`class`),za=Symbol(`style`),Ba=Symbol(`is custom element`),Va=Symbol(`is html`),Ha=Oe?`link`:`LINK`,Ua=Oe?`input`:`INPUT`,Wa=Oe?`option`:`OPTION`,Ga=Oe?`select`:`SELECT`,Ka=Oe?`progress`:`PROGRESS`;function qa(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Za(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Za(e,`checked`,null),e.checked=r}}};e.__on_r=n,vt(n),Wn()}}function Ja(e,t){var n=eo(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Ka)||(e.value=t??``)}function Ya(e,t){var n=eo(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Xa(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Za(e,t,n,r){var i=eo(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ha)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Ee]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&no(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Qa(e,t,n,r,i=!1,a=!1){if(E&&i&&e.nodeName===Ua){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||qa(o)}var s=eo(e),c=s[Ba],l=!s[Va];let d=E&&c;d&&D(!1);var f=t||{},p=e.nodeName===Wa;for(var m in t)m in n||(n[m]=null);n.class?n.class=Ta(n.class):(r||n[Ra])&&(n.class=null),n[za]&&(n.style??=null);var h=no(e);for(let i in n){let o=n[i];if(p&&i===`value`&&o==null){e.value=e.__value=``,f[i]=o;continue}if(i===`class`){ja(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[Ra],n[Ra]),f[i]=o,f[Ra]=n[Ra];continue}if(i===`style`){Na(e,o,t?.[za],n[za]),f[i]=o,f[za]=n[za];continue}var g=f[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){f[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=yi(r);if(_i(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,f[n],t),f[n]=null}if(v)ni(r,e,o),ri([r]);else if(o!=null){function a(e){f[i].call(this,e)}f[n]=$r(r,e,a,t)}}else if(i===`style`)Za(e,i,o);else if(i===`autofocus`)Vn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&p)Xa(e,o);else{var y=i;l||(y=Si(y));var b=y===`defaultValue`||y===`defaultChecked`;if(o==null&&!c&&!b)if(s[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else b||h.includes(y)&&(c||typeof o!=`string`)?(e[y]=o,y in s&&(s[y]=u)):typeof o!=`function`&&Za(e,y,o,a)}}}return d&&D(!0),f}function $a(e,t,n=[],r=[],i=[],a,o=!1,s=!1){tn(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===Ga,l=!1;if(cr(()=>{var u=t(...n.map(B)),d=Qa(e,r,u,a,o,s);l&&c&&`value`in u&&Pa(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||pr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&pr(i[t]),i[t]=lr(()=>Sa(e,()=>f))),d[t]=f}r=d}),c){var u=e;rr(()=>{Pa(u,r.value,!0),Fa(u)})}l=!0})}function eo(e){return e.__attributes??={[Ba]:e.nodeName.includes(`-`),[Va]:e.namespaceURI===d}}var to=new Map;function no(e){var t=e.getAttribute(`is`)||e.nodeName,n=to.get(t);if(n)return n;to.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=ee(i),r)r[o].set&&n.push(o);i=re(i)}return n}function ro(e,t,n=t){var r=new WeakSet;Kn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=so(e)?co(a):a,n(a),N!==null&&r.add(N),await Gr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(E&&e.defaultValue!==e.value||V(t)==null&&e.value)&&(n(so(e)?co(e.value):e.value),N!==null&&r.add(N)),ar(()=>{var n=t();if(e===document.activeElement){var i=et?Mt:N;if(r.has(i))return}so(e)&&n===co(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}var io=new Set;function ao(e,t,n,r,i=r){var a=n.getAttribute(`type`)===`checkbox`,o=e;let s=!1;if(t!==null)for(var c of t)o=o[c]??=[];o.push(n),Kn(n,`change`,()=>{var e=n.__value;a&&(e=oo(o,e,n.checked)),i(e)},()=>i(a?[]:null)),ar(()=>{var e=r();if(E&&n.defaultChecked!==n.checked){s=!0;return}a?(e||=[],n.checked=e.includes(n.__value)):n.checked=En(n.__value,e)}),Zn(()=>{var e=o.indexOf(n);e!==-1&&o.splice(e,1)}),io.has(o)||(io.add(o),vt(()=>{o.sort((e,t)=>e.compareDocumentPosition(t)===4?-1:1),io.delete(o)})),vt(()=>{if(s){var e=a?oo(o,e,n.checked):o.find(e=>e.checked)?.__value;i(e)}})}function oo(e,t,n){for(var r=new Set,i=0;i<e.length;i+=1)e[i].checked&&r.add(e[i].__value);return n||r.delete(t),Array.from(r)}function so(e){var t=e.type;return t===`number`||t===`range`}function co(e){return e===``?null:+e}var lo=new class e{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(e){this.#n=e}observe(e,t){var n=this.#e.get(e)||new Set;return n.add(t),this.#e.set(e,n),this.#r().observe(e,this.#n),()=>{var n=this.#e.get(e);n.delete(t),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#r(){return this.#t??=new ResizeObserver(t=>{for(var n of t){e.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}})}}({box:`border-box`});function uo(e,t,n){var r=lo.observe(e,()=>n(e[t]));rr(()=>(V(()=>n(e[t])),r))}function fo(e,t){return e===t||e?.[we]===t}function po(e={},t,n,r){var i=j.r,a=z;return rr(()=>{var o,s;return ar(()=>{o=s,s=r?.()||[],V(()=>{e!==n(...s)&&(t(e,...s),o&&fo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&fo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function mo(e=!1){let t=j,n=t.l.u;if(!n)return;let r=()=>Jr(t.s);if(e){let e=0,n={},i=on(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>B(i)}n.b.length&&er(()=>{ho(t,r),ce(n.b)}),Qn(()=>{let e=V(()=>n.m.map(se));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&Qn(()=>{ho(t,r),ce(n.a)})}function ho(e,t){if(e.l.s)for(let t of e.l.s)B(t);t()}var go={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function _o(e,t,n){return new Proxy({props:e,exclude:t},go)}var vo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(S(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];S(i)&&(i=i());let a=x(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(S(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=x(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===we||t===Te)return!1;for(let n of e.props)if(S(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(S(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function yo(...e){return new Proxy({props:e},vo)}function bo(e,t,n,r){var i=!tt||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?V(r):r),s);let u;if(a){var d=we in e||Te in e;u=x(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=At(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&Le(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return m;if(u){var h=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()})}var g=!1,_=(n&1?on:cn)(()=>(g=!1,m()));a&&B(_);var v=z;return(function(e,t){if(arguments.length>0){let n=t?B(_):i&&a?wn(e):e;return I(_,n),g=!0,s!==void 0&&(s=n),e}return Cr&&g||v.f&16384?_.v:B(_)})}function xo(e){return new So(e)}var So=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=yn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return B(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===Te?!0:(B(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?ji:Ai)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!et&&(!e?.props?.$$host||e.sync===!1)&&Ht(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||b(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Fi(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Co;typeof HTMLElement==`function`&&(Co=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=zn(`slot`);e!==`default`&&(n.name=e),hi(t,n)}}let t={},n=To(this);for(let r of this.$$s)r in n&&(r===`default`&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=wo(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=xo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=tr(()=>{ar(()=>{this.$$r=!0;for(let e of y(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=wo(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=wo(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return y(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function wo(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function To(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Eo(e,t,n,r,i,a){let o=class extends Co{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return y(t).map(e=>(t[e].attribute||e).toLowerCase())}};return y(t).forEach(e=>{b(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=wo(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(x(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{b(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var{entries:Do,setPrototypeOf:Oo,isFrozen:ko,getPrototypeOf:Ao,getOwnPropertyDescriptor:jo}=Object,{freeze:Mo,seal:No,create:Po}=Object,{apply:Fo,construct:Io}=typeof Reflect<`u`&&Reflect;Mo||=function(e){return e},No||=function(e){return e},Fo||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Io||=function(e){return new e(...[...arguments].slice(1))};var Lo=Zo(Array.prototype.forEach),Ro=Zo(Array.prototype.lastIndexOf),zo=Zo(Array.prototype.pop),Bo=Zo(Array.prototype.push),Vo=Zo(Array.prototype.splice),Ho=Zo(String.prototype.toLowerCase),Uo=Zo(String.prototype.toString),Wo=Zo(String.prototype.match),Go=Zo(String.prototype.replace),Ko=Zo(String.prototype.indexOf),qo=Zo(String.prototype.trim),Jo=Zo(Object.prototype.hasOwnProperty),Yo=Zo(RegExp.prototype.test),Xo=Qo(TypeError);function Zo(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Fo(e,t,n)}}function Qo(e){return function(){return Io(e,[...arguments])}}function H(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ho;Oo&&Oo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ko(t)||(t[r]=e),i=e)}e[i]=!0}return e}function $o(e){for(let t=0;t<e.length;t++)Jo(e,t)||(e[t]=null);return e}function es(e){let t=Po(null);for(let[n,r]of Do(e))Jo(e,n)&&(Array.isArray(r)?t[n]=$o(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=es(r):t[n]=r);return t}function ts(e,t){for(;e!==null;){let n=jo(e,t);if(n){if(n.get)return Zo(n.get);if(typeof n.value==`function`)return Zo(n.value)}e=Ao(e)}function n(){return null}return n}var ns=Mo(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),rs=Mo(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),is=Mo([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),as=Mo([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),os=Mo(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),ss=Mo([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),cs=Mo([`#text`]),ls=Mo(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),us=Mo(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ds=Mo(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),fs=Mo([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ps=No(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ms=No(/<%[\w\W]*|[\w\W]*%>/gm),hs=No(/\$\{[\w\W]*/gm),gs=No(/^data-[\-\w.\u00B7-\uFFFF]+$/),_s=No(/^aria-[\-\w]+$/),vs=No(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ys=No(/^(?:\w+script|data):/i),bs=No(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xs=No(/^html$/i),Ss=No(/^[a-z][.\w]*(-[.\w]+)+$/i),Cs=Object.freeze({__proto__:null,ARIA_ATTR:_s,ATTR_WHITESPACE:bs,CUSTOM_ELEMENT:Ss,DATA_ATTR:gs,DOCTYPE_NAME:xs,ERB_EXPR:ms,IS_ALLOWED_URI:vs,IS_SCRIPT_OR_DATA:ys,MUSTACHE_EXPR:ps,TMPLIT_EXPR:hs}),ws={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ts=function(){return typeof window>`u`?null:window},Es=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ds=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Os(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ts(),t=e=>Os(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==ws.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=ts(m,`cloneNode`),g=ts(m,`remove`),_=ts(m,`nextSibling`),v=ts(m,`childNodes`),y=ts(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=n,{importNode:ie}=r,S=Ds();t.isSupported=typeof Do==`function`&&typeof y==`function`&&ee&&ee.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:fe}=Cs,{IS_ALLOWED_URI:pe}=Cs,C=null,me=H({},[...ns,...rs,...is,...os,...cs]),w=null,he=H({},[...ls,...us,...ds,...fs]),T=Object.seal(Po(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,_e=null,ve=Object.seal(Po(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ye=!0,be=!0,xe=!1,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!1,De=!1,Oe=!1,ke=!1,Ae=!1,je=!0,Me=!1,Ne=!0,Pe=!1,Fe={},Ie=null,Le=H({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Re=null,ze=H({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Be=null,Ve=H({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),He=`http://www.w3.org/1998/Math/MathML`,Ue=`http://www.w3.org/2000/svg`,We=`http://www.w3.org/1999/xhtml`,Ge=We,Ke=!1,E=null,D=H({},[He,Ue,We],Uo),O=H({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),k=H({},[`annotation-xml`]),qe=H({},[`title`,`style`,`font`,`a`,`script`]),Je=null,Ye=[`application/xhtml+xml`,`text/html`],A=null,Xe=null,Ze=n.createElement(`form`),Qe=function(e){return e instanceof RegExp||e instanceof Function},$e=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xe&&Xe===e)){if((!e||typeof e!=`object`)&&(e={}),e=es(e),Je=Ye.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,A=Je===`application/xhtml+xml`?Uo:Ho,C=Jo(e,`ALLOWED_TAGS`)?H({},e.ALLOWED_TAGS,A):me,w=Jo(e,`ALLOWED_ATTR`)?H({},e.ALLOWED_ATTR,A):he,E=Jo(e,`ALLOWED_NAMESPACES`)?H({},e.ALLOWED_NAMESPACES,Uo):D,Be=Jo(e,`ADD_URI_SAFE_ATTR`)?H(es(Ve),e.ADD_URI_SAFE_ATTR,A):Ve,Re=Jo(e,`ADD_DATA_URI_TAGS`)?H(es(ze),e.ADD_DATA_URI_TAGS,A):ze,Ie=Jo(e,`FORBID_CONTENTS`)?H({},e.FORBID_CONTENTS,A):Le,ge=Jo(e,`FORBID_TAGS`)?H({},e.FORBID_TAGS,A):es({}),_e=Jo(e,`FORBID_ATTR`)?H({},e.FORBID_ATTR,A):es({}),Fe=Jo(e,`USE_PROFILES`)?e.USE_PROFILES:!1,ye=e.ALLOW_ARIA_ATTR!==!1,be=e.ALLOW_DATA_ATTR!==!1,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=e.SAFE_FOR_TEMPLATES||!1,we=e.SAFE_FOR_XML!==!1,Te=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ae=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,je=e.SANITIZE_DOM!==!1,Me=e.SANITIZE_NAMED_PROPS||!1,Ne=e.KEEP_CONTENT!==!1,Pe=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||vs,Ge=e.NAMESPACE||We,O=e.MATHML_TEXT_INTEGRATION_POINTS||O,k=e.HTML_INTEGRATION_POINTS||k,T=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(T.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(T.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(T.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(be=!1),ke&&(Oe=!0),Fe&&(C=H({},cs),w=Po(null),Fe.html===!0&&(H(C,ns),H(w,ls)),Fe.svg===!0&&(H(C,rs),H(w,us),H(w,fs)),Fe.svgFilters===!0&&(H(C,is),H(w,us),H(w,fs)),Fe.mathMl===!0&&(H(C,os),H(w,ds),H(w,fs))),Jo(e,`ADD_TAGS`)||(ve.tagCheck=null),Jo(e,`ADD_ATTR`)||(ve.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ve.tagCheck=e.ADD_TAGS:(C===me&&(C=es(C)),H(C,e.ADD_TAGS,A))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ve.attributeCheck=e.ADD_ATTR:(w===he&&(w=es(w)),H(w,e.ADD_ATTR,A))),e.ADD_URI_SAFE_ATTR&&H(Be,e.ADD_URI_SAFE_ATTR,A),e.FORBID_CONTENTS&&(Ie===Le&&(Ie=es(Ie)),H(Ie,e.FORBID_CONTENTS,A)),e.ADD_FORBID_CONTENTS&&(Ie===Le&&(Ie=es(Ie)),H(Ie,e.ADD_FORBID_CONTENTS,A)),Ne&&(C[`#text`]=!0),Te&&H(C,[`html`,`head`,`body`]),C.table&&(H(C,[`tbody`]),delete ge.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Xo(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Xo(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=Es(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));Mo&&Mo(e),Xe=e}},et=H({},[...rs,...is,...as]),tt=H({},[...os,...ss]),nt=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ge,tagName:`template`});let n=Ho(e.tagName),r=Ho(t.tagName);return E[e.namespaceURI]?e.namespaceURI===Ue?t.namespaceURI===We?n===`svg`:t.namespaceURI===He?n===`svg`&&(r===`annotation-xml`||O[r]):!!et[n]:e.namespaceURI===He?t.namespaceURI===We?n===`math`:t.namespaceURI===Ue?n===`math`&&k[r]:!!tt[n]:e.namespaceURI===We?t.namespaceURI===Ue&&!k[r]||t.namespaceURI===He&&!O[r]?!1:!tt[n]&&(qe[n]||!et[n]):!!(Je===`application/xhtml+xml`&&E[e.namespaceURI]):!1},rt=function(e){Bo(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},it=function(e,n){try{Bo(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Bo(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Oe||ke)try{rt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},at=function(e){let t=null,r=null;if(De)e=`<remove></remove>`+e;else{let t=Wo(e,/^[\r\n\t ]+/);r=t&&t[0]}Je===`application/xhtml+xml`&&Ge===We&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ge===We)try{t=new f().parseFromString(i,Je)}catch{}if(!t||!t.documentElement){t=ee.createDocument(Ge,`template`,null);try{t.documentElement.innerHTML=Ke?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ge===We?re.call(t,Te?`html`:`body`)[0]:Te?t.documentElement:a},j=function(e){return te.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ot=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},st=function(e){return typeof s==`function`&&e instanceof s};function ct(e,n,r){Lo(e,e=>{e.call(t,n,r,Xe)})}let lt=function(e){let n=null;if(ct(S.beforeSanitizeElements,e,null),ot(e))return rt(e),!0;let r=A(e.nodeName);if(ct(S.uponSanitizeElement,e,{tagName:r,allowedTags:C}),we&&e.hasChildNodes()&&!st(e.firstElementChild)&&Yo(/<[/\w!]/g,e.innerHTML)&&Yo(/<[/\w!]/g,e.textContent)||e.nodeType===ws.progressingInstruction||we&&e.nodeType===ws.comment&&Yo(/<[/\w]/g,e.data))return rt(e),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(r))&&(!C[r]||ge[r])){if(!ge[r]&&dt(r)&&(T.tagNameCheck instanceof RegExp&&Yo(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r)))return!1;if(Ne&&!Ie[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return rt(e),!0}return e instanceof c&&!nt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Yo(/<\/no(script|embed|frames)/i,e.innerHTML)?(rt(e),!0):(Ce&&e.nodeType===ws.text&&(n=e.textContent,Lo([ae,oe,se],e=>{n=Go(n,e,` `)}),e.textContent!==n&&(Bo(t.removed,{element:e.cloneNode()}),e.textContent=n)),ct(S.afterSanitizeElements,e,null),!1)},ut=function(e,t,r){if(_e[t]||je&&(t===`id`||t===`name`)&&(r in n||r in Ze))return!1;if(!(be&&!_e[t]&&Yo(ce,t))&&!(ye&&Yo(le,t))&&!(ve.attributeCheck instanceof Function&&ve.attributeCheck(t,e))){if(!w[t]||_e[t]){if(!(dt(e)&&(T.tagNameCheck instanceof RegExp&&Yo(T.tagNameCheck,e)||T.tagNameCheck instanceof Function&&T.tagNameCheck(e))&&(T.attributeNameCheck instanceof RegExp&&Yo(T.attributeNameCheck,t)||T.attributeNameCheck instanceof Function&&T.attributeNameCheck(t,e))||t===`is`&&T.allowCustomizedBuiltInElements&&(T.tagNameCheck instanceof RegExp&&Yo(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r))))return!1}else if(!Be[t]&&!Yo(pe,Go(r,de,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ko(r,`data:`)===0&&Re[e])&&!(xe&&!Yo(ue,Go(r,de,``)))&&r)return!1}return!0},dt=function(e){return e!==`annotation-xml`&&Wo(e,fe)},ft=function(e){ct(S.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||ot(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=A(a),l=s,u=a===`value`?l:qo(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,ct(S.uponSanitizeAttribute,e,r),u=r.attrValue,Me&&(c===`id`||c===`name`)&&(it(a,e),u=`user-content-`+u),we&&Yo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){it(a,e);continue}if(c===`attributename`&&Wo(u,`href`)){it(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){it(a,e);continue}if(!Se&&Yo(/\/>/i,u)){it(a,e);continue}Ce&&Lo([ae,oe,se],e=>{u=Go(u,e,` `)});let d=A(e.nodeName);if(!ut(d,c,u)){it(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),ot(e)?rt(e):zo(t.removed)}catch{it(a,e)}}ct(S.afterSanitizeAttributes,e,null)},pt=function e(t){let n=null,r=j(t);for(ct(S.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ct(S.uponSanitizeShadowNode,n,null),lt(n),ft(n),n.content instanceof a&&e(n.content);ct(S.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Ke=!e,Ke&&(e=`<!-->`),typeof e!=`string`&&!st(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Xo(`dirty is not a string, aborting`)}else throw Xo(`toString is not a function`);if(!t.isSupported)return e;if(Ee||$e(n),t.removed=[],typeof e==`string`&&(Pe=!1),Pe){if(e.nodeName){let t=A(e.nodeName);if(!C[t]||ge[t])throw Xo(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=at(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===ws.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!Oe&&!Ce&&!Te&&e.indexOf(`<`)===-1)return b&&Ae?b.createHTML(e):e;if(i=at(e),!i)return Oe?null:Ae?x:``}i&&De&&rt(i.firstChild);let u=j(Pe?e:i);for(;c=u.nextNode();)lt(c),ft(c),c.content instanceof a&&pt(c.content);if(Pe)return e;if(Oe){if(ke)for(l=ne.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(w.shadowroot||w.shadowrootmode)&&(l=ie.call(r,l,!0)),l}let d=Te?i.outerHTML:i.innerHTML;return Te&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Yo(xs,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
5
+ `+d),Ce&&Lo([ae,oe,se],e=>{d=Go(d,e,` `)}),b&&Ae?b.createHTML(d):d},t.setConfig=function(){$e(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ee=!0},t.clearConfig=function(){Xe=null,Ee=!1},t.isValidAttribute=function(e,t,n){return Xe||$e({}),ut(A(e),A(t),n)},t.addHook=function(e,t){typeof t==`function`&&Bo(S[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Ro(S[e],t);return n===-1?void 0:Vo(S[e],n,1)[0]}return zo(S[e])},t.removeHooks=function(e){S[e]=[]},t.removeAllHooks=function(){S=Ds()},t}var ks=Os();function As(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var js=As();function Ms(e){js=e}var Ns={exec:()=>null};function U(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Ps.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ps={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Fs=/^(?:[ \t]*(?:\n|$))+/,Is=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ls=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,zs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bs=/(?:[*+-]|\d{1,9}[.)])/,Vs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hs=U(Vs).replace(/bull/g,Bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Us=U(Vs).replace(/bull/g,Bs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ws=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gs=/^[^\n]+/,Ks=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qs=U(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ks).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Js=U(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bs).getRegex(),Ys=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Xs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zs=U(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Xs).replace(`tag`,Ys).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qs=U(Ws).replace(`hr`,Rs).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Ys).getRegex(),$s={blockquote:U(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Qs).getRegex(),code:Is,def:qs,fences:Ls,heading:zs,hr:Rs,html:Zs,lheading:Hs,list:Js,newline:Fs,paragraph:Qs,table:Ns,text:Gs},ec=U(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Rs).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Ys).getRegex(),tc={...$s,lheading:Us,table:ec,paragraph:U(Ws).replace(`hr`,Rs).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ec).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Ys).getRegex()},nc={...$s,html:U(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Xs).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ns,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U(Ws).replace(`hr`,Rs).replace(`heading`,` *#{1,6} *[^
6
+ ]`).replace(`lheading`,Hs).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},rc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ic=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ac=/^( {2,}|\\)\n(?!\s*$)/,oc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,sc=/[\p{P}\p{S}]/u,cc=/[\s\p{P}\p{S}]/u,lc=/[^\s\p{P}\p{S}]/u,uc=U(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,cc).getRegex(),dc=/(?!~)[\p{P}\p{S}]/u,fc=/(?!~)[\s\p{P}\p{S}]/u,pc=/(?:[^\s\p{P}\p{S}]|~)/u,mc=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,hc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,gc=U(hc,`u`).replace(/punct/g,sc).getRegex(),_c=U(hc,`u`).replace(/punct/g,dc).getRegex(),vc=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,yc=U(vc,`gu`).replace(/notPunctSpace/g,lc).replace(/punctSpace/g,cc).replace(/punct/g,sc).getRegex(),bc=U(vc,`gu`).replace(/notPunctSpace/g,pc).replace(/punctSpace/g,fc).replace(/punct/g,dc).getRegex(),xc=U(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,lc).replace(/punctSpace/g,cc).replace(/punct/g,sc).getRegex(),Sc=U(/\\(punct)/,`gu`).replace(/punct/g,sc).getRegex(),Cc=U(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wc=U(Xs).replace(`(?:-->|$)`,`-->`).getRegex(),Tc=U(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,wc).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ec=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Dc=U(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,Ec).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oc=U(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ec).replace(`ref`,Ks).getRegex(),kc=U(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ks).getRegex(),Ac={_backpedal:Ns,anyPunctuation:Sc,autolink:Cc,blockSkip:mc,br:ac,code:ic,del:Ns,emStrongLDelim:gc,emStrongRDelimAst:yc,emStrongRDelimUnd:xc,escape:rc,link:Dc,nolink:kc,punctuation:uc,reflink:Oc,reflinkSearch:U(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Oc).replace(`nolink`,kc).getRegex(),tag:Tc,text:oc,url:Ns},jc={...Ac,link:U(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Ec).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Ec).getRegex()},Mc={...Ac,emStrongRDelimAst:bc,emStrongLDelim:_c,url:U(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nc={...Mc,br:U(ac).replace(`{2,}`,`*`).getRegex(),text:U(Mc.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Pc={normal:$s,gfm:tc,pedantic:nc},Fc={normal:Ac,gfm:Mc,breaks:Nc,pedantic:jc},Ic={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Lc=e=>Ic[e];function Rc(e,t){if(t){if(Ps.escapeTest.test(e))return e.replace(Ps.escapeReplace,Lc)}else if(Ps.escapeTestNoEncode.test(e))return e.replace(Ps.escapeReplaceNoEncode,Lc);return e}function zc(e){try{e=encodeURI(e).replace(Ps.percentDecode,`%`)}catch{return null}return e}function Bc(e,t){let n=e.replace(Ps.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Ps.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Ps.slashPipe,`|`);return n}function Vc(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Hc(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Uc(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Wc(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
7
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
8
+ `)}var Gc=class{options;rules;lexer;constructor(e){this.options=e||js}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Vc(e,`
9
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Wc(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Vc(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Vc(t[0],`
10
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Vc(t[0],`
11
+ `).split(`
12
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
13
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
14
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
15
+ ${s}`:s,r=r?`${r}
16
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
17
+ `+e.join(`
18
+ `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
19
+ `+e.join(`
20
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
21
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
22
+ `,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
23
+ `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
24
+ `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
25
+ `,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
26
+ `+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
27
+ `+l}!u&&!l.trim()&&(u=!0),r+=f+`
28
+ `,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Bc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
29
+ `):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Bc(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
30
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Vc(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Hc(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Uc(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Uc(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Kc=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||js,this.options.tokenizer=this.options.tokenizer||new Gc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Ps,block:Pc.normal,inline:Fc.normal};this.options.pedantic?(t.block=Pc.pedantic,t.inline=Fc.pedantic):this.options.gfm&&(t.block=Pc.gfm,this.options.breaks?t.inline=Fc.breaks:t.inline=Fc.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pc,inline:Fc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Ps.carriageReturn,`
31
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Ps.tabCharGlobal,` `).replace(Ps.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
32
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
33
+ `+r.raw,n.text+=`
34
+ `+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
35
+ `+r.raw,n.text+=`
36
+ `+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=`
37
+ `+r.raw,a.text+=`
38
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=`
39
+ `+r.raw,n.text+=`
40
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},qc=class{options;parser;constructor(e){this.options=e||js}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Ps.notSpaceStart)?.[0],i=e.replace(Ps.endingNewline,``)+`
41
+ `;return r?`<pre><code class="language-`+Rc(r)+`">`+(n?i:Rc(i,!0))+`</code></pre>
42
+ `:`<pre><code>`+(n?i:Rc(i,!0))+`</code></pre>
43
+ `}blockquote({tokens:e}){return`<blockquote>
44
+ ${this.parser.parse(e)}</blockquote>
45
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
46
+ `}hr(e){return`<hr>
47
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
48
+ `+r+`</`+i+`>
49
+ `}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Rc(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
50
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
51
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
52
+ <thead>
53
+ `+t+`</thead>
54
+ `+r+`</table>
55
+ `}tablerow({text:e}){return`<tr>
56
+ ${e}</tr>
57
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
58
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Rc(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=zc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Rc(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=zc(e);if(i===null)return Rc(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Rc(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Rc(e.text)}},Jc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Yc=class e{options;renderer;textRenderer;constructor(e){this.options=e||js,this.options.renderer=this.options.renderer||new qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
59
+ `+this.renderer.text(i);t?n+=this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Xc=class{options;block;constructor(e){this.options=e||js}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Kc.lex:Kc.lexInline}provideParser(){return this.block?Yc.parse:Yc.parseInline}},Zc=class{defaults=As();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Yc;Renderer=qc;TextRenderer=Jc;Lexer=Kc;Tokenizer=Gc;Hooks=Xc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new qc(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Gc(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Xc;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Xc.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Kc.lex(e,t??this.defaults)}parser(e,t){return Yc.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?Kc.lex:Kc.lexInline,s=i.hooks?i.hooks.provideParser():e?Yc.parse:Yc.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
60
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Rc(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Qc=new Zc;function W(e,t){return Qc.parse(e,t)}W.options=W.setOptions=function(e){return Qc.setOptions(e),W.defaults=Qc.defaults,Ms(W.defaults),W},W.getDefaults=As,W.defaults=js,W.use=function(...e){return Qc.use(...e),W.defaults=Qc.defaults,Ms(W.defaults),W},W.walkTokens=function(e,t){return Qc.walkTokens(e,t)},W.parseInline=Qc.parseInline,W.Parser=Yc,W.parser=Yc.parse,W.Renderer=qc,W.TextRenderer=Jc,W.Lexer=Kc,W.lexer=Kc.lex,W.Tokenizer=Gc,W.Hooks=Xc,W.parse=W,W.options,W.setOptions,W.use,W.walkTokens,W.parseInline,Yc.parse,Kc.lex;var $c=e=>(Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t];n&&typeof n==`object`&&$c(n)}),Object.freeze(e)),el=$c({all:[],used:[],unused:[]}),tl=(e,t)=>{let n=ks(e);return n.addHook(`uponSanitizeElement`,function(e,t){let n=t.tagName||e.nodeName.toLowerCase();n.startsWith(`liipgpt-`)&&(t.allowedTags[n]=!0)}),n.addHook(`afterSanitizeAttributes`,function(e){if(e.tagName!==`A`||!e.getAttribute(`href`)?.startsWith(`http`)||(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`),!t||e.querySelector(`.sr-only`)))return;let n=e.ownerDocument.createElement(`span`);n.className=`sr-only`,n.textContent=` ${t}`,e.appendChild(n)}),n},nl=class{marked;currentReferences=el;lastUsedIndex=0;DomPurity;constructor(e={}){this.marked=new Zc({async:!1,breaks:!0}).use(this.createFootnoteExtension(),...e.extensions??[]),this.DomPurity=tl(e.window,e.newTabSrText)}createFootnoteExtension=()=>{let e=this;return{extensions:[{name:`footnote`,level:`inline`,start(e){return e.match(/\[\^(\d+(?:\.\d+)?)\]/)?.index},tokenizer(e){let t=/^\[\^(\d+(?:\.\d+)?)\]/.exec(e);if(t){let[e,n]=t;return{type:`footnote`,raw:e,refNumber:n}}},renderer(t){if(t.type===`footnote`){let n=e.currentReferences.all,r=n.some(e=>e.citationId!==void 0)?n.findIndex(e=>e.citationId===t.refNumber):/^\d+$/.test(t.refNumber)?Number(t.refNumber)-1:-1,i=e.currentReferences.all[r];if(!i)return console.error(`Could not find ref for citation:`,t.refNumber),``;let a;return i?.referenceIndex.used?a=i.referenceIndex.used:(e.currentReferences.used.push(i),e.lastUsedIndex++,a=e.lastUsedIndex,i.referenceIndex.used=a),` <liipgpt-reference-number data-all-index="${r}" data-used-index="${a}" data-source="${JSON.stringify(i).replace(/"/g,`&quot;`)}"></liipgpt-reference-number>`}}}]}};parse(e){return this.DomPurity.sanitize(this.marked.parse(e),{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0,mathMl:!0},FORBID_TAGS:[`hr`],ADD_ATTR:[`target`]})}toHTML(e,t){this.currentReferences=t;let n=this.parse(e);return this.currentReferences=el,n}};function rl(){let e,t;return{promise:new Promise((n,r)=>{t=n,e=r}),reject:e,resolve:t}}var il=class{promise;resolve;reject;constructor(){let{promise:e,resolve:t,reject:n}=rl();this.promise=e,this.resolve=t,this.reject=n}then(e,t){return this.promise.then(e,t)}catch(e){return this.promise.catch(e)}finally(e){return this.promise.finally(e)}toPromise(){return this.promise}[Symbol.toStringTag]=`Flag`},al=class{hasValue=new il;currentValue;setValue(e){this.currentValue=e,this.hasValue.resolve()}cleanup(e){this.hasValue.reject(e)}getCurrentValue(){return this.currentValue}async toPromise(){return await this.hasValue,this.currentValue}then(e,t){return this.toPromise().then(e,t)}catch(e){return this.toPromise().catch(e)}finally(e){return this.toPromise().finally(e)}[Symbol.toStringTag]=`FutureValue`},ol=e=>{try{return new URL(e).hostname}catch{return e}};function sl(e){return e.replace(/<[^>]*>/g,``).replace(/&nbsp;/g,` `).replace(/&amp;/g,`&`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&quot;/g,`"`)}var cl=({citationId:e,url:t,considered:n,title:r,description:i,summary:a})=>{let o=ol(t),s=i||a;return{...e?{citationId:e}:{},url:t,considered:n,referenceIndex:{},score:0,metadata:{},display:{card:{title:r,description:s,badge:t},listItem:{title:r,badge:o}}}},ll=class{store;content=new al;backendSendsMappedRefs=!1;constructor(e){this.options=e,this.store=Dt({id:e.id,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]},retrievalQuestion:e.userQuestion})}pushError(e,t){this.options.onError?.(e,t),this.store.update(t=>({...t,errors:[...t.errors,e]}))}updateRequestId(e){this.store.update(t=>({...t,id:e}))}updateText(e){this.store.update(t=>{let n=t.message.markdown+e,r=this.options.markdownRenderer.toHTML(n,t.references);return{...t,state:`streaming`,message:{markdown:n,html:r,text:``}}})}finishMessage(){this.store.update(e=>{let t={...e,state:`done`};return t.references.unused=t.references.all.filter(e=>e.referenceIndex.used===void 0),t.message.text=sl(t.message.html),this.options?.onFinish?.(t),this.content.setValue(t),t})}addReference(e){this.store.update(t=>{let n=t.references.all,r=n.length,i=[...n,{...e,referenceIndex:{all:r}}];return{...t,references:{used:t.references.used,all:i}}})}addMappedReference(e){this.backendSendsMappedRefs=!0,this.addReference(e)}addOldReference(e){this.backendSendsMappedRefs||this.addReference(cl(e))}updateRetrievalQuestion(e){this.store.update(t=>({...t,retrievalQuestion:e}))}setNoFeedback(){this.store.update(e=>({...e,noFeedback:!0}))}getReadableStore(){return{subscribe:this.store.subscribe}}getPromise(){return this.content.toPromise()}},ul=[{type:`email`,check:e=>/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/.test(e)},{type:`creditCard`,check:e=>/\b(?:\d[ -]*?){13,16}\b/.test(e)},{type:`ahv`,check:e=>/\b756[.\s-]?\d{2,4}[.\s-]?\d{2,4}[.\s-]?\d{2}\b/.test(e)},{type:`phoneSwiss`,check:e=>/\b0(?:\s*\d){2}(?:\s*\/\s*)?(?:\s*\d){7,}\b/.test(e)},{type:`phoneInternational`,check:e=>/(?:\+|00)(?:\s*\d){10,}\b/.test(e)},{type:`swissPassport`,check:e=>/\b[A-HJ-NP-Z](?=.*\d)[A-HJ-NP-Z0-9]{7}\b/.test(e)},{type:`longNumber`,check:e=>/\b\d{9,}\b/.test(e)}],dl=e=>{for(let t of ul)if(t.check(e))return t.type};Object.freeze({status:`aborted`});function G(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var fl=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},pl={};function ml(e){return e&&Object.assign(pl,e),pl}function hl(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function gl(e,t){return typeof t==`bigint`?t.toString():t}function _l(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function vl(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var yl=Symbol(`evaluating`);function bl(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==yl)return r===void 0&&(r=yl,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function xl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Sl(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}var Cl=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function wl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Tl(e){if(wl(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(wl(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function El(e){return Tl(e)?{...e}:Array.isArray(e)?[...e]:e}var Dl=new Set([`string`,`number`,`symbol`]);function Ol(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function kl(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Al(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function jl(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ml={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Nl(e,t){if(!Tl(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return kl(e,Sl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return xl(this,`shape`,n),n}}))}function Pl(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return kl(t,Sl(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return xl(this,`shape`,i),i},checks:[]}))}function Fl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Il(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ll(e){return typeof e==`string`?e:e?.message}function Rl(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ll(e.inst?._zod.def?.error?.(e))??Ll(t?.error?.(e))??Ll(n.customError?.(e))??Ll(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}var zl=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,gl,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Bl=G(`$ZodError`,zl),Vl=G(`$ZodError`,zl,{Parent:Error}),Hl=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new fl;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Rl(e,a,ml())));throw Cl(t,i?.callee),t}return o.value})(Vl),Ul=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Rl(e,a,ml())));throw Cl(t,i?.callee),t}return o.value})(Vl),Wl=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new fl;return a.issues.length?{success:!1,error:new(e??Bl)(a.issues.map(e=>Rl(e,i,ml())))}:{success:!0,data:a.value}})(Vl),Gl=(e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Rl(e,i,ml())))}:{success:!0,data:a.value}})(Vl),Kl=`(?:(?:\\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])))`;`${Kl}`;function ql(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Jl(e){let t=ql({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Kl}T(?:${r})$`)}var Yl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Xl=/^-?\d+$/,Zl=/^-?\d+(?:\.\d+)?$/,Ql=/^(?:true|false)$/i,$l=G(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eu=G(`$ZodCheckNumberFormat`,(e,t)=>{$l.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ml[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Xl)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),tu=G(`$ZodCheckStringFormat`,(e,t)=>{var n,r;$l.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nu={major:4,minor:3,patch:6},ru=G(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nu;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Fl(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new fl;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Fl(e,t))});else{if(e.issues.length===t)continue;r||=Fl(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Fl(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new fl;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new fl;return o.then(e=>t(e,r,a))}return t(o,r,a)}}bl(e,`~standard`,()=>({validate:t=>{try{let n=Wl(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Gl(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),iu=G(`$ZodString`,(e,t)=>{ru.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Yl(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),au=G(`$ZodStringFormat`,(e,t)=>{tu.init(e,t),iu.init(e,t)}),ou=G(`$ZodURL`,(e,t)=>{au.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),su=G(`$ZodISODateTime`,(e,t)=>{t.pattern??=Jl(t),au.init(e,t)}),cu=G(`$ZodNumber`,(e,t)=>{ru.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),lu=G(`$ZodNumberFormat`,(e,t)=>{eu.init(e,t),cu.init(e,t)}),uu=G(`$ZodBoolean`,(e,t)=>{ru.init(e,t),e._zod.pattern=Ql,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),du=G(`$ZodUnknown`,(e,t)=>{ru.init(e,t),e._zod.parse=e=>e});function fu(e,t,n){e.issues.length&&t.issues.push(...Il(n,e.issues)),t.value[n]=e.value}var pu=G(`$ZodArray`,(e,t)=>{ru.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>fu(t,n,e))):fu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function mu(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Il(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function hu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=jl(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function gu(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>mu(e,n,i,t,u))):mu(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var _u=G(`$ZodObject`,(e,t)=>{if(ru.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=_l(()=>hu(t));bl(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=wl,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>mu(n,t,e,s,r))):mu(i,t,e,s,r)}return i?gu(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}});function vu(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Fl(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Rl(e,r,ml())))}),t)}var yu=G(`$ZodUnion`,(e,t)=>{ru.init(e,t),bl(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),bl(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),bl(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),bl(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>vl(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>vu(t,i,e,a)):vu(s,i,e,a)}}),bu=G(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,yu.init(e,t);let n=e._zod.parse;bl(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=_l(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!wl(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),xu=G(`$ZodIntersection`,(e,t)=>{ru.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Cu(e,t,n)):Cu(e,i,a)}});function Su(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Tl(e)&&Tl(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Su(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Su(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Cu(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Fl(e))return e;let o=Su(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var wu=G(`$ZodRecord`,(e,t)=>{ru.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Tl(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...Il(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...Il(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Zl.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Rl(e,r,ml())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Il(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Il(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Tu=G(`$ZodEnum`,(e,t)=>{ru.init(e,t);let n=hl(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Dl.has(typeof e)).map(e=>typeof e==`string`?Ol(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Eu=G(`$ZodLiteral`,(e,t)=>{if(ru.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Ol(e):e?Ol(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}});function Du(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Ou=G(`$ZodOptional`,(e,t)=>{ru.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,bl(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bl(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vl(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Du(t,e.value)):Du(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ku=G(`$ZodNullable`,(e,t)=>{ru.init(e,t),bl(e._zod,`optin`,()=>t.innerType._zod.optin),bl(e._zod,`optout`,()=>t.innerType._zod.optout),bl(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vl(e.source)}|null)$`):void 0}),bl(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Au=G(`$ZodDefault`,(e,t)=>{ru.init(e,t),e._zod.optin=`optional`,bl(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ju(e,t)):ju(r,t)}});function ju(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Mu,Nu=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Pu(){return new Nu}(Mu=globalThis).__zod_globalRegistry??(Mu.__zod_globalRegistry=Pu()),globalThis.__zod_globalRegistry;function Fu(e,t){return new e({type:`string`,...Al(t)})}function Iu(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Al(t)})}function Lu(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Al(t)})}function Ru(e,t){return new e({type:`number`,checks:[],...Al(t)})}function zu(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Al(t)})}function Bu(e,t){return new e({type:`boolean`,...Al(t)})}function Vu(e){return new e({type:`unknown`})}var Hu=G(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);ru.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>Hl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Wl(e,t,n),e.parseAsync=async(t,n)=>Ul(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Gl(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>kl(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),Uu=G(`ZodMiniString`,(e,t)=>{iu.init(e,t),Hu.init(e,t)});function K(e){return Fu(Uu,e)}var Wu=G(`ZodMiniStringFormat`,(e,t)=>{au.init(e,t),Uu.init(e,t)}),Gu=G(`ZodMiniURL`,(e,t)=>{ou.init(e,t),Wu.init(e,t)});function Ku(e){return Iu(Gu,e)}var qu=G(`ZodMiniNumber`,(e,t)=>{cu.init(e,t),Hu.init(e,t)});function q(e){return Ru(qu,e)}var Ju=G(`ZodMiniNumberFormat`,(e,t)=>{lu.init(e,t),qu.init(e,t)});function Yu(e){return zu(Ju,e)}var Xu=G(`ZodMiniBoolean`,(e,t)=>{uu.init(e,t),Hu.init(e,t)});function J(e){return Bu(Xu,e)}var Zu=G(`ZodMiniUnknown`,(e,t)=>{du.init(e,t),Hu.init(e,t)});function Qu(){return Vu(Zu)}var $u=G(`ZodMiniArray`,(e,t)=>{pu.init(e,t),Hu.init(e,t)});function Y(e,t){return new $u({type:`array`,element:e,...Al(t)})}var ed=G(`ZodMiniObject`,(e,t)=>{_u.init(e,t),Hu.init(e,t),bl(e,`shape`,()=>t.shape)});function X(e,t){return new ed({type:`object`,shape:e??{},...Al(t)})}function td(e,t){return Nl(e,t)}function nd(e,t){return Pl(gd,e,t)}var rd=G(`ZodMiniUnion`,(e,t)=>{yu.init(e,t),Hu.init(e,t)});function id(e,t){return new rd({type:`union`,options:e,...Al(t)})}var ad=G(`ZodMiniDiscriminatedUnion`,(e,t)=>{bu.init(e,t),Hu.init(e,t)});function od(e,t,n){return new ad({type:`union`,options:t,discriminator:e,...Al(n)})}var sd=G(`ZodMiniIntersection`,(e,t)=>{xu.init(e,t),Hu.init(e,t)});function cd(e,t){return new sd({type:`intersection`,left:e,right:t})}var ld=G(`ZodMiniRecord`,(e,t)=>{wu.init(e,t),Hu.init(e,t)});function ud(e,t,n){return new ld({type:`record`,keyType:e,valueType:t,...Al(n)})}function dd(e,t,n){let r=kl(e);return r._zod.values=void 0,new ld({type:`record`,keyType:r,valueType:t,...Al(n)})}var fd=G(`ZodMiniEnum`,(e,t)=>{Tu.init(e,t),Hu.init(e,t),e.options=Object.values(t.entries)});function pd(e,t){return new fd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Al(t)})}var md=G(`ZodMiniLiteral`,(e,t)=>{Eu.init(e,t),Hu.init(e,t)});function hd(e,t){return new md({type:`literal`,values:Array.isArray(e)?e:[e],...Al(t)})}var gd=G(`ZodMiniOptional`,(e,t)=>{Ou.init(e,t),Hu.init(e,t)});function Z(e){return new gd({type:`optional`,innerType:e})}var _d=G(`ZodMiniNullable`,(e,t)=>{ku.init(e,t),Hu.init(e,t)});function vd(e){return new _d({type:`nullable`,innerType:e})}var yd=G(`ZodMiniDefault`,(e,t)=>{Au.init(e,t),Hu.init(e,t)});function bd(e,t){return new yd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():El(t)}})}var xd=G(`ZodMiniISODateTime`,(e,t)=>{su.init(e,t),Wu.init(e,t)});function Sd(e){return Lu(xd,e)}var Cd=[`en`,`de`,`fr`,`it`],wd=X({name:K(),namePlural:Z(K()),intro:Z(K()),placeholder:K(),values:ud(K(),K())}),Td=X({introductionTitle:K(),introductionDisclaimer:Z(K()),termsInvitationToConsent:Z(K()),chatInputPlaceholder:K(),chatInputPlaceholderListening:Z(K()),chatInputSubmit:K(),chatInputAbort:K(),chatInputStartListening:K(),chatInputStopListening:K(),referenceLink:K(),referencesDisplay:K(),referencesHide:K(),referencesTitle:K(),referencesFurtherTitle:K(),newChat:K(),maintenanceModeError:K(),messageBotLoading:K(),messageBotError:K(),messageBotDefaultError:K(),noResultsFound:K(),chatFooterText:Z(K()),scrollToBottom:K(),openButtonTitle:Z(K()),openButtonDescription:Z(K()),openMenu:K(),openInfo:K(),aboutThisChat:Z(K()),closeMenu:K(),closeChat:K(),close:K(),send:K(),thankYouForFeedback:K(),answerFormThankYou:K(),giveFeedback:K(),sendFeedback:K(),feedbackFormTitle:K(),feedbackFormMessage:K(),feedbackFormMessagePlaceholder:K(),feedbackFormEmail:K(),feedbackFormEmailPlaceholder:K(),askQuestionAgain:K(),answerGood:K(),answerBad:K(),classificationSubmit:K(),classificationThankYou:K(),classificationTitle:K(),selectLanguage:K(),languageChanged:K(),selectColorTheme:K(),lightMode:K(),darkMode:K(),ariaMainNavigation:K(),ariaMainNavigationInfo:K(),ariaMainNavigationLinks:K(),ariaMainNavigationLanguageSwitch:K(),ariaMainNavigationColorMode:K(),ariaGotoMainNavigation:K(),ariaAskQuestion:K(),ariaAskQuestionRegion:K(),ariaNotifications:K(),ariaPredefinedQuestions:K(),ariaPredefinedQuestionsRegion:K(),ariaChatHistory:K(),ariaOpenChat:K(),ariaQuestionFromYou:K(),ariaAnswerFromBot:K(),ariaLastAnswerNavigation:K(),ariaQuestionSent:K(),ariaAnswerReady:K(),ariaAnswerFinished:K(),ariaAnswerFinishedWithSelectedTopic:K(),ariaAskQuestionAgain:K(),ariaAnswerGood:K(),ariaAnswerBad:K(),ariaReferenceSource:K(),ariaGiveFeedback:K(),ariaAnswerForm:K(),ariaLanguageChanged:K(),ariaLightSelected:K(),ariaDarkSelected:K(),ariaSettings:K(),ariaSettingsRegion:K(),ariaReferencesRegion:K(),ariaOpensInNewTab:K(),ariaPageTitle:K(),ariaCloseWithEsc:K(),ariaInfoTitle:K(),ariaFlyoutRegion:K(),ariaSelected:K(),ariaUnselected:K(),ariaAllSelected:K(),ariaAllUnselected:K(),ariaAllReseted:K(),ariaChangeTopic:K(),popups:Z(Y(X({hash:K(),title:K(),content:K(),actions:Z(Y(X({action:K(),label:K(),type:Z(pd([`primary`,`secondary`]))})))}))),termsAcceptButton:Z(K()),termsReadButton:Z(K()),selectors:Z(ud(K(),wd)),hideSettings:K(),showSettings:K(),chooseAtLeastOneOption:K(),selectAll:K(),selectNone:K(),resetToDefaults:K(),messageTooLong:K(),selectedTopic:K(),changeTopic:K(),searchSummaryExpand:K(),searchSummaryCollapse:K(),searchSummaryOptInDefault:K(),searchSummaryOptOut:K(),searchSummaryError:K(),searchSummaryDisclaimer:Z(K()),searchSummaryLoading:K(),searchSummaryFollowUpPlaceholder:K(),searchSummaryFollowUpSubmit:K(),ariaSearchSummaryExpand:K(),ariaSearchSummaryCollapse:K(),ariaSearchSummaryOptOut:K(),ariaSearchSummaryFollowUpInput:K(),jsonLdEventDate:K(),jsonLdEventLocation:K(),jsonLdEventDescription:K(),jsonLdEventCtaLabel:K(),jsonLdCtaLabel:K(),jsonLdMapOpenMap:K(),ariaJsonLdMapCanvas:K(),ariaJsonLdEventCard:K(),ariaJsonLdMapCard:K(),ariaJsonLdCtaCard:K()}),Ed=pd(Cd),Dd=dd(Ed,td(nd(Td),{selectors:Z(ud(K(),wd))})),Od=dd(Ed,K()),kd=cd(od(`componentName`,[X({componentName:hd(`buttons`),data:X({caption:Z(K()),buttons:Y(X({label:K(),href:Z(Ku()),value:K(),variant:Z(pd([`primary`,`secondary`,`tertiary`])),icon:Z(K()),target:Z(K())}))})}),X({componentName:hd(`combobox`),data:X({caption:Z(Od),placeholder:Od,values:Y(X({label:Od,value:K(),metadata:Z(ud(K(),Qu()))})),removeComponentAfterValueSelection:Z(J()),selectorKey:Z(K())})}),X({componentName:hd(`alva-init`),data:X({})}),X({componentName:hd(`alva-score-survey`),data:X({})})]),X({type:hd(`component`),id:Z(K()),time:Z(K()),hideAvatar:Z(J()),noSectionPadding:Z(J()),hideChatInput:Z(J())})),Ad=id([K(),q(),J(),Y(K()),Y(q()),Y(J())]),jd=X({title:K(),description:Z(K()),badge:Z(K()),breadcrumbs:Z(Y(K())),previewImage:Z(K()),date:Z(Sd())}),Md=td(X({url:Ku(),score:q(),metadata:ud(K(),Ad),language:Z(K())}),jd.shape),Nd=X({type:hd(`user`),time:K(),message:K(),id:Z(K())}),Pd=td(X({citationId:Z(K()),url:K(),score:q(),metadata:ud(K(),id([K(),q(),J(),Y(K()),Y(q()),Y(J())])),considered:J(),display:X({card:jd,listItem:jd})}),{referenceIndex:X({all:q(),used:Z(q())})}),Fd=X({type:hd(`bot`),time:K(),id:K(),message:X({markdown:K(),html:K(),text:K()}),references:X({all:Y(Pd),used:Y(Pd),unused:Y(Pd)}),errors:Y(id([pd([`pii-detected`,`blocked`,`maintenance`,`rate-limit`,`server-error`,`too-short`,`too-long`,`quota-reached`,`aborted`]),hd(`sse-error`),hd(`client-error`),hd(`unexpected-call`)])),retrievalQuestion:Z(K()),noFeedback:Z(J()),feedback:Z(pd([`up`,`down`]))}),Id=id([id([td(Fd,{state:hd(`loading`)}),td(Fd,{state:pd([`streaming`,`done`])})]),Nd,kd]),Ld=Y(X({question:K(),answer:K()})),Rd={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)`},mauve:{50:`oklch(98.5% 0 0)`,100:`oklch(96% 0.003 325.6)`,200:`oklch(92.2% 0.005 325.62)`,300:`oklch(86.5% 0.012 325.68)`,400:`oklch(71.1% 0.019 323.02)`,500:`oklch(54.2% 0.034 322.5)`,600:`oklch(43.5% 0.029 321.78)`,700:`oklch(36.4% 0.029 323.89)`,800:`oklch(26.3% 0.024 320.12)`,900:`oklch(21.2% 0.019 322.12)`,950:`oklch(14.5% 0.008 326)`},olive:{50:`oklch(98.8% 0.003 106.5)`,100:`oklch(96.6% 0.005 106.5)`,200:`oklch(93% 0.007 106.5)`,300:`oklch(88% 0.011 106.6)`,400:`oklch(73.7% 0.021 106.9)`,500:`oklch(58% 0.031 107.3)`,600:`oklch(46.6% 0.025 107.3)`,700:`oklch(39.4% 0.023 107.4)`,800:`oklch(28.6% 0.016 107.4)`,900:`oklch(22.8% 0.013 107.4)`,950:`oklch(15.3% 0.006 107.1)`},mist:{50:`oklch(98.7% 0.002 197.1)`,100:`oklch(96.3% 0.002 197.1)`,200:`oklch(92.5% 0.005 214.3)`,300:`oklch(87.2% 0.007 219.6)`,400:`oklch(72.3% 0.014 214.4)`,500:`oklch(56% 0.021 213.5)`,600:`oklch(45% 0.017 213.2)`,700:`oklch(37.8% 0.015 216)`,800:`oklch(27.5% 0.011 216.9)`,900:`oklch(21.8% 0.008 223.9)`,950:`oklch(14.8% 0.004 228.8)`},taupe:{50:`oklch(98.6% 0.002 67.8)`,100:`oklch(96% 0.002 17.2)`,200:`oklch(92.2% 0.005 34.3)`,300:`oklch(86.8% 0.007 39.5)`,400:`oklch(71.4% 0.014 41.2)`,500:`oklch(54.7% 0.021 43.1)`,600:`oklch(43.8% 0.017 39.3)`,700:`oklch(36.7% 0.016 35.7)`,800:`oklch(26.8% 0.011 36.5)`,900:`oklch(21.4% 0.009 43.1)`,950:`oklch(14.7% 0.004 49.3)`},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)`}},zd=id([X({minRem:q(),maxRem:q()}),K()]),Bd=X({0:Z(K()),50:K(),100:K(),200:K(),300:K(),400:K(),500:K(),600:K(),700:K(),800:K(),900:K(),950:K(),1e3:Z(K())}),Vd=X({color:Z(K()),background:Z(K()),borderWidth:Z(K()),borderColor:Z(K()),boxShadow:Z(K())}),Hd=X({customCSS:Z(K()),fontCSS:Z(K()),fontURLs:Z(Y(K())),tokens:Z(X({font:Z(X({family:Z(K())})),colors:Z(X({brand:Z(nd(Bd)),accent:Z(nd(Bd)),highlight:Z(nd(Bd)),grey:Z(nd(Bd))})),base:Z(X({fontSizeXs:Z(zd),fontSizeSm:Z(zd),fontSizeBody:Z(zd),fontSizeH3:Z(zd),fontSizeH2:Z(zd),fontSizeH1:Z(zd),fontWeightNormal:Z(K()),fontWeightBold:Z(K()),fontWeightTitle:Z(K()),lineHeightDefault:Z(K()),lineHeightSnug:Z(K()),lineHeightTight:Z(K()),borderRadius:Z(zd),lineColor:Z(K()),boxShadow:Z(K())})),components:Z(ud(K(),cd(X({borderRadius:Z(zd),custom:Z(ud(K(),id([K(),q()]))),hover:Z(Vd),focus:Z(Vd)}),Vd))),svgs:Z(dd(pd(`predefinedQuestion.edit.newConversation.voteUp.voteDown.retry.message.messageLoading.thread.submit.abort.expand.help.attach.record.reward.share.audio.copy.dismiss.menu.info.menuClose.chevronDown.chevronUp.chevronTopDown.chevronDownSmall.internalLink.externalLink.liip.avatar.avatarLarge.openChat.speechInput.listUnordered.lightMode.darkMode.settings.settingsClose.sources.model.checkbox.warning.topic.headerLogo.embedAvatar.forward.phone.email`.split(`.`)),K()))}))}),Ud=X({light:Z(Hd),dark:Z(Hd)}),Wd=X({50:K(),100:K(),200:K(),300:K(),400:K(),500:K(),600:K(),700:K(),800:K(),900:K(),950:K()}),Gd=pd([`slate`,`gray`,`zinc`,`neutral`,`stone`,`red`,`orange`,`amber`,`yellow`,`lime`,`green`,`emerald`,`teal`,`cyan`,`sky`,`blue`,`indigo`,`violet`,`purple`,`fuchsia`,`pink`,`rose`]),Kd=id([Wd,Gd]),qd=X({avatarImageUrl:Z(K()),colors:Z(X({brand:Z(Kd),highlight:Z(Kd),grey:Z(id([cd(Wd,X({0:K(),1e3:K()})),Gd])),background:Z(K()),text:Z(K()),anchor:Z(X({default:Z(K()),hover:Z(K())}))})),font:Z(X({family:Z(K()),urls:Z(Y(K())),sizeXs:Z(zd),sizeSm:Z(zd),sizeBody:Z(zd),sizeH3:Z(zd),sizeH2:Z(zd),sizeH1:Z(zd),weightNormal:Z(K()),weightBold:Z(K()),weightTitle:Z(K())})),borderRadius:Z(zd),fineGrained:Z(Ud)}),Jd=X({label:K(),options:Y(X({label:K(),value:q()}))}),Yd=X({label:K(),icon:K(),url:K(),target:Z(pd([`_blank`,`_self`]))}),Xd=X({id:Z(K()),label:vd(K()),question:K(),switchQuestionId:Z(K())}),Zd=X({impact:Z(Jd),quality:Z(Jd),order:Z(Y(pd([`quality`,`impact`])))}),Qd=X({predefinedQuestions:Y(Xd)}),$d=id([X({maintenance:hd(!0)}),X({id:K(),cID:K()})]),ef=X({settingName:K(),iconName:K(),settingIntro:Z(K()),type:pd([`single-select`,`multi-select`]),allowEmpty:J(),values:Y(K()),defaultValues:Z(Y(K()))}),tf=X({receiverEmail:K(),triggerLabel:Od,title:Z(Od),caption:Z(Od),submitLabel:Od,fields:Y(X({type:pd([`text`,`select`,`checkbox`,`radio`]),name:K(),label:Od,placeholder:Z(Od),required:Z(J()),options:Z(Y(X({value:K(),label:Od})))}))}),nf=X({before:Z(Y(Id)),after:Z(Y(Id))}),rf=cd(nd(X({forcePredefinedQuestions:Z(J()),forceChatPage:Z(J()),showOverallFeedbackButton:J(),showOverallFeedbackEmail:J(),showCloseChatButton:J(),showContextMenu:J(),showContextInfo:J(),showReferencesByDefault:J(),referencesLayout:Z(pd([`aside`,`inline`])),showExpandedSelectors:J(),showTextFeedback:J(),inlineLayout:J(),allowAudioInput:J(),blockPII:J(),questionPrefix:K(),menu:Z(dd(Ed,Y(Yd))),supportedLanguages:Y(Ed),classification:Z(Zd),answerForm:Z(tf),theme:qd,translations:Dd,buttonHref:Z(K()),addQueryToUrlParams:Z(J()),addRetrievalQuestionToUrlParams:Z(J()),renderKatex:Z(J()),reflectLanguageInPath:Z(J()),sendReferrer:Z(pd([`all`,`own`,`none`,`location`])),selectorsConfig:bd(Y(ef),[]),questionLengthLimit:Z(q()),forceConsent:Z(J()),askQuestionAgain:J(),enableBackdrop:Z(J()),parentPageContext:X({extractSelectors:Z(Y(K()))}),messageAdditions:Z(X({init:Z(Y(Id)),bot:Z(nf),user:Z(nf)})),contextVersion:Z(q()),selectedTopicResetPredefinedQuestionId:Z(K())})),X({theme:Z(X({name:Z(K())}))})),af=class{id;constructor(e){this.chatResponseData=e,this.id=this.chatResponseData.id}async isReadyForFeedback(){return await this.chatResponseData.readyForFeedback.toPromise(),!0}subscribe(e,t){return this.chatResponseData.readableStore.subscribe(e,t)}getContent(){return this.chatResponseData.content.toPromise()}abort(){return this.chatResponseData.abort()}async thumbsUp(){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.thumbsUp(this.id,this.chatResponseData.question)}async thumbsDown(){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.thumbsDown(this.id,this.chatResponseData.question)}async feedback(e){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.feedback(this.id,this.chatResponseData.question,e)}},of=[];for(let e=0;e<256;++e)of.push((e+256).toString(16).slice(1));function sf(e,t=0){return(of[e[t+0]]+of[e[t+1]]+of[e[t+2]]+of[e[t+3]]+`-`+of[e[t+4]]+of[e[t+5]]+`-`+of[e[t+6]]+of[e[t+7]]+`-`+of[e[t+8]]+of[e[t+9]]+`-`+of[e[t+10]]+of[e[t+11]]+of[e[t+12]]+of[e[t+13]]+of[e[t+14]]+of[e[t+15]]).toLowerCase()}var cf,lf=new Uint8Array(16);function uf(){if(!cf){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);cf=crypto.getRandomValues.bind(crypto)}return cf(lf)}var df={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ff(e,t,n){e||={};let r=e.random??e.rng?.()??uf();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return sf(r)}function pf(e,t,n){return df.randomUUID&&!t&&!e?df.randomUUID():ff(e,t,n)}var mf={};function hf(e,t,n){let r;if(e)r=_f(e.random??e.rng?.()??uf(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=uf();gf(mf,e,i),r=_f(i,mf.msecs,mf.seq,t,n)}return t??sf(r)}function gf(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function _f(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}var vf=new Map,yf=class{get length(){return vf.size}clear(){vf.clear()}getItem(e){return vf.get(e)||null}key(e){return Array.from(vf.keys())[e]||null}removeItem(e){vf.delete(e)}setItem(e,t){vf.set(e,String(t))}},bf=globalThis.localStorage??new yf,xf=async(e,t)=>{try{let n=bf.getItem(`liipgpt:uID`)||bf.getItem(`uID`),r={method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({referrer:globalThis?.document?.referrer||null,uID:n,...t?{startParameters:t}:{}})},i=await e.fetchData(`/login`,$d,{},r).catch(t=>(console.log(`Failed to /login use /log`,t),e.fetchData(`/log`,$d,{},r)));if(`maintenance`in i&&i.maintenance)return{mode:`maintenance`};if(!(`id`in i))throw Error(`Invalid response format: missing user id`);return bf.setItem(`liipgpt:uID`,i.id),{mode:`ready`,userId:i.id}}catch(e){throw console.error(`Failed to fetch user data:`,e),e}},Sf=function(e,t){if(!(this instanceof Sf))return new Sf(e,t);this.url=e,t||={},this.headers=t.headers||{},this.payload=t.payload===void 0?``:t.payload,this.method=t.method||this.payload&&`POST`||`GET`,this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=t.autoReconnect===void 0?!1:t.autoReconnect,this.reconnectDelay=t.reconnectDelay===void 0?3e3:t.reconnectDelay,this.maxRetries=t.maxRetries===void 0?null:t.maxRetries,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=t.useLastEventId===void 0?!0:t.useLastEventId,this.FIELD_SEPARATOR=`:`,this.listeners={},this.xhr=null,this.readyState=Sf.INITIALIZING,this.progress=0,this.chunk=``,this.lastEventId=``,this._hasParsedBom=!1,this.addEventListener=function(e,t){this.listeners[e]===void 0&&(this.listeners[e]=[]),this.listeners[e].indexOf(t)===-1&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(this.listeners[e]===void 0)return;let n=[];this.listeners[e].forEach(function(e){e!==t&&n.push(e)}),n.length===0?delete this.listeners[e]:this.listeners[e]=n},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t=`on`+e.type;return this.hasOwnProperty(t)&&(this[t].call(this,e),e.defaultPrevented)?!1:this.listeners[e.type]?this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}):!0},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk=``,this._setReadyState(Sf.CLOSED),this.autoReconnect){if(this.maxRetries!==null&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?`/`+this.maxRetries:``})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent(`readystatechange`);t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent(`error`);t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent(`abort`)),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300){this._onStreamFailure(e);return}this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length,!this._hasParsedBom&&this.chunk.length===0&&(t.charCodeAt(0)===65279&&(t=t.substring(1)),this._hasParsedBom=!0);let n=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),r=n.pop();n.forEach(function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}.bind(this)),this.chunk=r},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk=``,this._markClosed()},this._parseEventChunk=function(e){if(!e||e.length===0)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};if(e.split(/\n|\r\n|\r/).forEach(function(e){let n=e.indexOf(this.FIELD_SEPARATOR),r,i;if(n>0){let t=e[n+1]===` `?2:1;r=e.substring(0,n),i=e.substring(n+t)}else if(n<0)r=e,i=``;else return;r in t&&(r===`data`&&t[r]!==null?t.data+=`
61
+ `+i:t[r]=i)}.bind(this)),t.id!==null&&t.id.indexOf(`\0`)===-1&&(this.lastEventId=t.id),t.retry!==null&&/^[0-9]+$/.test(t.retry)&&(this.reconnectDelay=parseInt(t.retry,10)),t.data===null)return null;let n=new CustomEvent(t.event||`message`);return n.id=t.id,n.data=t.data||``,n.lastEventId=this.lastEventId,n},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={},t=this.xhr.getAllResponseHeaders().trim().split(`\r
62
+ `);for(let n of t){let[t,...r]=n.split(`:`),i=r.join(`:`).trim();e[t.trim().toLowerCase()]=e[t.trim().toLowerCase()]||[],e[t.trim().toLowerCase()].push(i)}let n=new CustomEvent(`open`);n.responseCode=this.xhr.status,n.headers=e,this.dispatchEvent(n),this._setReadyState(Sf.OPEN)}},this.stream=function(){if(!this.xhr){this._setReadyState(Sf.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener(`progress`,this._onStreamProgress.bind(this)),this.xhr.addEventListener(`load`,this._onStreamLoaded.bind(this)),this.xhr.addEventListener(`readystatechange`,this._onReadyStateChange.bind(this)),this.xhr.addEventListener(`error`,this._onStreamFailure.bind(this)),this.xhr.addEventListener(`abort`,this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url);for(let e in this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader(`Last-Event-ID`,this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.autoReconnect=!1,this.xhr&&this.xhr.abort()},(t.start===void 0||t.start)&&this.stream()};Sf.INITIALIZING=-1,Sf.CONNECTING=0,Sf.OPEN=1,Sf.CLOSED=2;var Cf=class{eventSource;triggeredOnClose=!1;constructor(e,t,n){this.options=t,this.payload=n;let r={headers:{"content-type":`application/json`}};n&&(r.payload=JSON.stringify(n)),t.apiKey&&(r.headers[`api-key`]=t.apiKey),this.eventSource=new(t.EventSource??Sf)(e,r),this.eventSource.onmessage=e=>{try{let n=JSON.parse(e.data);t.onMessage(n)}catch(e){t.onError(new CustomEvent(`parse-error`,{detail:e}))}},this.eventSource.onerror=e=>{t.onError(e),this.isClosed()&&this.close()}}isClosed(){return this.eventSource.readyState===EventSource.CLOSED}close(){this.isClosed()||this.eventSource.close(),this.triggeredOnClose||(this.triggeredOnClose=!0,this.options.onClose())}},wf=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!=null)),Tf=class{constructor(e){this.options=e}getDefaultHeaders(e={}){let t={"Content-Type":`application/json`,...e};return this.options.apiKey&&(t[`api-key`]=this.options.apiKey),t}get speechRecognitionApiKey(){return this.options.speechRecognitionApiKey}async subscribeSse(e,t={},n){let r=wf(t);return this.options.apiKey&&(n.apiKey=this.options.apiKey),new Cf(`${this.options.apiUrl}${e}`,n,r)}async fetchData(e,t,n={},r={}){let i=`${this.options.apiUrl}${e}?${new URLSearchParams(wf(n)).toString()}`,a={...r,headers:this.getDefaultHeaders(r?.headers)},o=await fetch(i,a);if(!o.ok){let e=await o.text();throw Error(`API request failed: ${o.status} - ${e}`)}let s=await o.json(),{success:c,data:l,error:u}=t.safeParse(s);if(this.options.strict){if(!c)throw console.error(`Server response has wrong type:
63
+ `,{error:u,url:i,opts:a,data:s}),Error(`Server response has wrong type: ${u.message}`);return l}else return c||console.warn(`Server response has wrong type:
64
+ `,{error:u,url:i,opts:a,data:s}),s}async postData(e,t){let n=await fetch(`${this.options.apiUrl}${e}`,{method:`POST`,headers:this.getDefaultHeaders(),body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw Error(`${n.status} - ${e}`)}return n}async postFormData(e,t){let n=await fetch(`${this.options.apiUrl}${e}`,{method:`POST`,body:t});if(!n.ok){let e=await n.text();throw Error(`${n.status} - ${e}`)}return n}},Ef=X({links:Y(id([X({url:Z(Ku()),title:Z(K()),considered:Z(J()),orgMetadata:Z(X({authors:Z(Y(K()))})),type:Z(K()),date:Z(Sd()),similarity:Z(q()),content:Z(K()),fromFullTextSearch:Z(J()),rerank:Z(X({index:Z(Yu()),adjustment:Z(q()),score:Z(q()),similarityOld:Z(q())}))}),Md]))}),Df=e=>{if(`metadata`in e)return e;console.warn(`Please upgrade your backend you are currently using an old api feature.`);let t=e.orgMetadata??{};e?.fromFullTextSearch&&(t.fromFullTextSearch=e?.fromFullTextSearch),e?.rerank&&(t.rerank=e?.rerank);let n=[],r=e.title??``;if(e.title&&e.title.includes(` > `)){let t=e.title.split(` > `);r=t.pop()??``,n=t}return{url:e.url??``,title:r,score:e.similarity||0,breadcrumbs:n,metadata:t,description:e.content,date:e.date}},Of=7,kf=8,Af=160,jf=e=>{let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===`<`){let r=e.indexOf(`>`,n);if(r!==-1){t.push({type:`tag`,value:e.slice(n,r+1)}),n=r+1;continue}}if(/\s/.test(r)){let r=n;for(;r<e.length&&/\s/.test(e[r]);)r++;t.push({type:`space`,value:e.slice(n,r)}),n=r;continue}let i=n;for(;i<e.length&&!/\s/.test(e[i])&&e[i]!==`<`;)i++;t.push({type:`word`,value:e.slice(n,i)}),n=i}return t},Mf=e=>{let t=jf(e),n=[],r=``,i=!1;for(let e of t)e.type===`space`&&i?(n.push(r),r=e.value,i=!1):(r+=e.value,e.type===`word`&&(i=!0));return r&&n.push(r),n},Nf=e=>Math.max(kf,Math.min(Af,e.length*Of)),Pf=class{queue=[];timeoutId=null;isProcessing=!1;constructor(e){this.onText=e}ingestText(e){let t=Mf(e);if(t.length>=5){for(let e of t)this.queue.push({kind:`text`,chunk:e,delayMs:Nf(e)});this.kickoff();return}this.runAfterTyping(()=>this.onText(e))}runAfterTyping(e){if(this.queue.length===0&&!this.isProcessing){e();return}this.queue.push({kind:`fn`,fn:e}),this.kickoff()}runWithWarmup(e){this.queue.push({kind:`fn`,fn:e}),this.kickoff()}clear(){this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.queue=[],this.isProcessing=!1}kickoff(){this.isProcessing||this.timeoutId!==null||(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.processNext()},750))}processNext(){let e=this.queue.shift();if(!e){this.isProcessing=!1;return}this.isProcessing=!0,e.kind===`text`?(this.onText(e.chunk),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.processNext()},e.delayMs)):(e.fn(),this.processNext())}},Ff=class{constructor(e){this.results=e}},If=45e3,Lf=class{internalData;renderers=new Map;markedExtensions=[];_newTabSrText;chatTimeout;constructor(e){this.chatTimeout=e.chatTimeout??If;let t=new Tf({apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,strict:e.strict??!1,EventSource:e.EventSource??EventSource});this.internalData={restClient:t,metadata:xf(t,e.startParameters),searchResponseMap:new Map,chatResponseMap:new Map,conversationMap:new Map}}setMarkedExtensions(...e){this.markedExtensions=e}setNewTabSrText(e){this._newTabSrText=e}getMetadata(){return this.internalData.metadata}createConversationId(){let e=hf();return this.renderers.set(e,new nl({extensions:this.markedExtensions,newTabSrText:this._newTabSrText})),e}chat(e,t,n={}){let r=new al,i=hf(),a=new il,o=new ll({id:i,onError:(e,t)=>{n.onError?.(e,t)},onFinish:e=>{r.setValue(e)},markdownRenderer:this.renderers.get(e)??new nl({extensions:this.markedExtensions,newTabSrText:this._newTabSrText}),userQuestion:t}),s=async()=>{await a,!(f&&!c.getCurrentValue())&&(await c).close()},c=new al,l=new Pf(e=>o.updateText(e)),u=n.timeout??this.chatTimeout,d,f=!1,p=()=>{d!==void 0&&clearTimeout(d),d=void 0},m=()=>{f=!0,d=void 0,console.error(`No SSE activity for ${u}ms, giving up on chat request ${i}`),l.clear(),o.pushError(`sse-error`);let e=c.getCurrentValue();if(e){e.close();return}o.finishMessage(),a.resolve()},h=()=>{p(),u>0&&!f&&(d=setTimeout(m,u))};h(),(async()=>{let s=await this.internalData.metadata;if(s.mode===`maintenance`)throw Error(`Can not chat in maintenance mode`);let u=await this.internalData.restClient.subscribeSse(`/assistant/sse`,{query:t,uID:s.userId,cID:e,rID:i,lang:n.lang,feature:n.features?.join(`,`),referrer:n.referrer,source:n.source,...n.selectorValues??{},...n.mode?{mode:n.mode}:{},...n.cache?{cache:!0}:{},...n.predefinedQuestionId?{predefinedQuestionId:n.predefinedQuestionId}:{},...n.switchQuestionId?{switchQuestionId:n.switchQuestionId}:{},chat:`true`,version:`2`},{onClose:()=>{p(),l.clear(),o.finishMessage(),a.resolve(),r.cleanup()},onMessage:t=>{let r=t;switch(h(),r.type){case`error`:l.runAfterTyping(()=>o.pushError(r.error,r.message));break;case`id`:r.for===`request`&&i!==r.id&&console.warn(`Unexpected request id "${r.id}" expected "${i}"`),r.for===`conversation`&&e!==r.id&&console.warn(`Unexpected conversation id "${r.id}" expected "${e}"`);break;case`state`:r.state===`history-entry-initialized`&&a.resolve();break;case`text`:l.ingestText(r.text);break;case`done`:case`answer-done`:p(),l.runAfterTyping(()=>{o.finishMessage(),a.resolve(),c.then(e=>e.close())});break;case`unexpected-call`:l.runAfterTyping(()=>{console.error(`unexpected-call:`,r),o.pushError(`unexpected-call`)});break;case`jsonld-component`:case`mapped-reference`:l.runAfterTyping(()=>o.addMappedReference(r.reference));break;case`reference`:l.runAfterTyping(()=>o.addOldReference(r.reference));break;case`retrieval-question`:l.runAfterTyping(()=>o.updateRetrievalQuestion(r.question));break;case`no-feedback`:l.runAfterTyping(()=>o.setNoFeedback());break;case`component`:l.runWithWarmup(()=>n.onEmbed?.(r));break}l.runAfterTyping(()=>n.onMessage?.(r))},onError:e=>{console.error(` sse-error:`,e),!(`data`in e&&!e.data&&`responseCode`in e&&e.responseCode===0)&&o.pushError(`sse-error`)}});c.setValue(u),f&&u.close()})();let g=new af({question:t,id:i,content:r,readableStore:o.getReadableStore(),readyForFeedback:a,abort:s,liipgptClientPrimitive:this});return this.internalData.chatResponseMap.set(g.id,g),g}async thumbs(e,t,n){if((await this.internalData.metadata).mode!==`ready`)throw Error(`Can not post feedback unless we are in ready mode`);let r={feedback:n,rID:e,query:t};await this.internalData.restClient.postData(`/quickfeedback`,r)}thumbsUp(e,t){return this.thumbs(e,t,`positive`)}thumbsDown(e,t){return this.thumbs(e,t,`negative`)}async feedback(e,t,n){let r=await this.internalData.metadata;if(r.mode!==`ready`)throw Error(`Can not post feedback unless we are in ready mode`);if(n.message){let i={body:n.message,email:n.email,rID:e,uID:r.userId,query:t};await this.internalData.restClient.postData(`/feedback`,i)}n.classification&&await this.internalData.restClient.postData(`/classification`,{impact:n.classification.impact,quality:n.classification.quality,rID:e})}async submitAnswerForm(e){let t=await this.internalData.metadata;if(t.mode!==`ready`)throw Error(`Can not submit the answer form unless we are in ready mode`);let n={receiverEmail:e.receiverEmail,fields:e.fields,query:e.question,answer:e.answer,rID:e.requestId,uID:t.userId,lang:e.lang};await this.internalData.restClient.postData(`/customform`,n)}async userAction(e,t={}){let n=await this.internalData.metadata;if(n.mode!==`ready`)throw Error(`Can not post user action unless we are in ready mode`);let r={uID:n.userId,cID:t.conversationId,lang:t.lang,userAction:e};await this.internalData.restClient.postData(`/assistant/userAction`,r)}async search(e,t={}){let n=await this.internalData.metadata,r=n.mode===`ready`?n.userId:void 0,{links:i}=await this.internalData.restClient.fetchData(`/assistant/search`,Ef,{modelId:t.model,lang:t.language,query:e,mapResults:`true`,uID:r});return new Ff(i.map(Df))}async getChatConfig(){return this.internalData.restClient.fetchData(`/chatconfig`,rf)}async getChatHistory(e,t){try{let n=await this.internalData.restClient.postData(`/chathistory`,{cID:e,uID:t}),r=Ld.safeParse(await n.json());return r.success?r.data:[]}catch(e){return console.error(`Failed to load chat history:`,e),[]}}async getPredefinedQuestions(e){return(await this.internalData.restClient.fetchData(`/topics/questions`,Qd,e)).predefinedQuestions}async transcribeAudio(e,t={}){let n=await this.internalData.metadata,r=t.lang||`de-CH`;if(n.mode===`maintenance`)throw Error(`Can not transcribe audio in maintenance mode`);try{let t=(e=>e.includes(`mp4`)?`mp4`:e.includes(`webm`)?`webm`:(e.includes(`wav`),`wav`))(e.type),n=new FormData;return n.append(`file`,e,`audio.${t}`),n.append(`lang`,r),n.append(`type`,e.type),{transcript:await(await this.internalData.restClient.postFormData(`/speech?key=${this.internalData.restClient.speechRecognitionApiKey||``}&lang=${r}`,n)).text()||``,error:void 0}}catch(e){return console.error(`Error transcribing audio:`,e),{transcript:``,error:e instanceof Error?e.message:`Unknown error`}}}},Rf=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.origin===r.origin&&n.pathname===r.pathname}catch{return!1}},zf=e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}},Bf=()=>`${window.location.protocol}//${window.location.host}${window.location.pathname}`;function Vf(e,{embedded:t}){let n=e??`all`;if(n===`none`)return;if(t||n===`location`)return Bf();let r=Rf(document.referrer,window.location.href)?``:document.referrer;if(r&&!(n===`own`&&!zf(r)))return r}var Hf=c(o(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))(),1),Uf=e=>typeof e!=`object`||!e,Wf=e=>{if(Uf(e))return e;if(Array.isArray(e))return e.map(Wf);let t=Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Wf(t)]);return Object.fromEntries(t)},Gf=(e,t)=>(0,Hf.default)(e,Wf(t)),Kf={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`}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:`400`,fontWeightBold:`700`,fontWeightTitle:`700`,lineHeightDefault:`1.5`,lineHeightSnug:`1.375`,lineHeightTight:`1.25`,borderRadius:{minRem:.5,maxRem:.75},lineColor:`color-mix(in srgb, var(--color-brand-950) 20%, transparent)`,boxShadow:`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)`},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)`,focusWidth:`var(--spacer-3)`,focusOffset:`var(--spacer-2)`,focusStyle:`solid`}},container:{custom:{maxWidth:`1024px`}},avatar:{color:`var(--color-brand-400)`,background:`var(--color-grey-100)`},anchor:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-950)`}},btnPrimary:{color:`var(--color-grey-0)`,background:`var(--color-brand-700)`,borderRadius:`var(--base-border-radius)`,hover:{background:`var(--color-brand-900)`}},btnSecondary:{color:`var(--color-brand-700)`,background:`var(--color-brand-100)`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-200)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--color-grey-900)`,background:`var(--color-grey-100)`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-100)`},custom:{iconColor:`var(--anchor-color)`,iconHoverColor:`var(--anchor-hover-color)`}},input:{background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-r-16) var(--spacer-r-20)`,placeholderColor:`var(--color-grey-500)`,placeholderOpacity:`1`}},label:{color:`var(--color-grey-900)`,custom:{fontWeight:`var(--base-font-weight-bold)`}},hr:{color:`var(--base-line-color)`},checkbox:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`0.2em`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},radio:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},contextBox:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:`var(--color-grey-1000)`,titleFontWeight:`var(--base-font-weight-bold)`,separatorColor:`var(--base-line-color)`,errorColor:`var(--message-error-color)`}},contextBoxMenuItem:{background:`transparent`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`,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:`var(--base-border-radius)`,boxShadow:`0px -10px 20px 5px color-mix(in srgb, var(--body-background) 100%, transparent)`},chatInput:{color:`var(--color-grey-700)`,background:`var(--card-background)`,borderRadius:`var(--base-border-radius)`,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:`calc(var(--base-border-radius) / 1.25)`,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:`#DD135A`,color:`var(--color-grey-0)`,borderColor:`#DD135A`,borderWidth:`1px`,borderRadius:`var(--chat-input-border-radius)`},selectedTopic:{color:`var(--body-color)`,background:`var(--color-brand-100)`,borderColor:`var(--body-background)`,borderWidth:`2px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-10) var(--spacer-20)`,separatorWidth:`var(--spacer-2)`,labelGap:`var(--spacer-12)`,btnColor:`var(--btn-tertiary-color)`,btnHoverColor:`var(--btn-tertiary-hover-color)`}},dialog:{background:`var(--card-background)`,color:`var(--body-color)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:`rgba(0, 0, 0, 0.25)`,headerBorderBottomColor:`var(--base-line-color)`}},aside:{background:`var(--card-background)`,custom:{width:`400px`,containerWidthForMobileLayout:1024,backgroundOverlay:`rgba(0, 0, 0, 0.4)`,headerColor:`var(--card-color)`,headerBorderColor:`var(--base-line-color)`,headerBorderWidth:`1px`}},message:{color:`var(--body-color)`,custom:{errorColor:`#C91658`,transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:`var(--base-line-color)`,borderWidth:`1px`,custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageJsonLdMap:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`,custom:{markerColor:`#6658c8`,tileUrl:`https://tile.openstreetmap.org/{z}/{x}/{y}.png`}},messageJsonLdEvent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageJsonLdCta:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageUser:{color:`var(--body-color)`,background:`var(--card-background)`,boxShadow:`var(--card-box-shadow)`,borderRadius:`var(--card-border-radius)`},openButton:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-background)`,borderWidth:`0`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`},custom:{hideTitleWhenCollapsed:0,autoExpandScrollThreshold:0,autoCollapseDelay:0,autoExpandOnce:0}},referencesToggle:{color:`var(--color-brand-700)`,hover:{color:`var(--anchor-hover-color)`}},referenceNumberTrigger:{color:`var(--btn-secondary-color)`,background:`var(--btn-secondary-background)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{padding:`0.25em`}},referenceDomain:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-800)`},custom:{padding:`0px`}},referenceNumberContent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,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(--base-box-shadow)`,custom:{width:`95cqi`,maxWidth:`450px`,transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--body-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`}},referenceDescription:{color:`var(--reference-color)`,hover:{color:`var(--reference-hover-color)`}},referenceNumber:{color:`var(--reference-number-trigger-color)`,background:`var(--body-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`,borderRadius:`var(--reference-number-trigger-border-radius)`,hover:{color:`var(--reference-number-trigger-color)`,background:`var(--reference-number-trigger-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`},custom:{padding:`var(--reference-number-trigger-padding)`}},toast:{background:`var(--card-background)`,color:`var(--body-color)`,boxShadow:`var(--base-box-shadow)`,borderRadius:`var(--card-border-radius)`,custom:{iconSuccessColor:`#22c55e`,iconErrorColor:`#ef4444`,iconWarningColor:`#f97316`,iconInfoColor:`#3b82f6`}},tooltip:{background:`var(--color-grey-200)`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`},flyout:{custom:{backdropColor:`var(--color-brand-800)`,backdropOpacity:`0.4`,backdropDelayIn:`0`,backdropDurationIn:`200`,backdropDelayOut:`0`,backdropDurationOut:`150`,backdropBaseScaleIn:`1`,backdropBaseScaleOut:`1`,backdropTransformOrigin:`center`,backdropScaleDirection:`scale`}},searchSummary:{color:`var(--card-color)`,background:`var(--color-grey-50)`,borderColor:`var(--color-grey-100)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-footer-background)`}}},svgs:{predefinedQuestion:`
65
+ <svg viewBox="0 0 24 24" >
66
+ <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>
67
+ <path d="M0.5 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>
68
+ <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>
69
+ <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>
70
+ </svg>
71
+ `,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:`
72
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
73
+ <g stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
74
+ <path d="M19.701 5.488a10.063 10.063 0 0 0-7.7-3.573C6.43 1.915 1.914 6.43 1.914 12c0 1.17.2 2.293.565 3.338m1.84 3.199A10.063 10.063 0 0 0 12 22.085c5.57 0 10.085-4.515 10.085-10.085 0-1.224-.218-2.397-.617-3.482" stroke-miterlimit="10"/>
75
+ <path d="M16.802 5.784h3.16v-3.16M7.198 18.216h-3.16v3.16"/>
76
+ </g>
77
+ </svg>
78
+ `,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">
79
+ <circle cx="6" cy="23" r="1.75" fill="currentColor">
80
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
81
+ </circle>
82
+ <circle cx="12" cy="23" r="1.75" fill="currentColor">
83
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.3s"/>
84
+ </circle>
85
+ <circle cx="18" cy="23" r="1.75" fill="currentColor">
86
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
87
+ </circle>
88
+ </svg>`,thread:`<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,submit:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>`,abort:`<svg viewBox="0 0 24 24"><g fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 5h14v14H5z"/></g></svg>`,expand:`<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,help:`<svg fill="none" viewBox="0 0 12 12"><path d="M5.04 7.955v-.161c.004-.555.053-.998.148-1.328.099-.33.241-.596.429-.799.187-.203.412-.387.675-.552.197-.127.373-.258.528-.395a1.71 1.71 0 0 0 .371-.452 1.15 1.15 0 0 0 .138-.561c0-.219-.052-.41-.157-.576a1.045 1.045 0 0 0-.423-.38 1.26 1.26 0 0 0-.58-.133c-.207 0-.402.046-.586.138a1.117 1.117 0 0 0-.452.4c-.117.174-.18.39-.19.65H3c.016-.633.168-1.157.457-1.569.288-.416.67-.725 1.146-.928.476-.206 1-.309 1.575-.309.631 0 1.19.105 1.675.314.485.206.865.506 1.141.9.276.392.414.867.414 1.422 0 .37-.062.7-.185.99-.12.285-.29.538-.51.76a3.943 3.943 0 0 1-.775.595c-.25.15-.457.304-.618.466a1.584 1.584 0 0 0-.357.562 2.42 2.42 0 0 0-.119.785v.161H5.041ZM5.984 11c-.317 0-.588-.111-.814-.333a1.095 1.095 0 0 1-.328-.809c-.003-.31.106-.577.328-.799.226-.222.497-.333.814-.333.301 0 .566.111.794.333a1.092 1.092 0 0 1 .181 1.375 1.23 1.23 0 0 1-.414.414 1.081 1.081 0 0 1-.561.152Z" fill="currentColor"/></svg>`,attach:`<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,record:`<svg viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" fill="currentColor"/><path d="M19 10v2a7 7 0 0 1-14 0v-2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 23h8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`,reward:`<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,share:`<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>`,audio:`<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,copy:`<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>`,dismiss:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>`,menu:`<svg viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path d="m4 6h16"/><path d="m4 12h16"/><path d="m4 18h16"/></g></svg>`,menuClose:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>`,externalLink:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>`,internalLink:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>`,chevronDown:`<svg viewBox="0 0 24 24"><path d="m20 8-8 8-8-8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>`,chevronUp:`<svg viewBox="0 0 24 24"><path d="m20 16-8-8-8 8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>`,chevronTopDown:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m19 9-7-7-7 7"/><path d="m19 15-7 7-7-7"/></g></svg>`,chevronDownSmall:`<svg viewBox="0 0 10 10" fill="none"><path d="M8.75 3.75C7.25 5.25 5 7.5 5 7.50L1.25 3.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,liip:`<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>`,avatar:`
89
+ <div style="border-radius: 9999px; overflow: hidden;">
90
+ <svg viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
91
+ <style>
92
+ .svg--avatar {
93
+ --logo-color1: var(--color-brand-500);
94
+ --logo-color1-transparent: var(--color-brand-400);
95
+
96
+ --logo-color2: var(--color-highlight-400);
97
+ --logo-color2-transparent: var(--color-highlight-500);
98
+
99
+ --logo-color3: var(--color-brand-400);
100
+ --logo-color3-transparent: var(--color-highlight-500);
101
+
102
+ --logo-color4: var(--color-highlight-400);
103
+ --logo-color4-transparent: var(--color-brand-500);
104
+
105
+ --logo-glass-color: oklch(1 0 0 / 0.2); /* Soft white glass effect */
106
+ }
107
+
108
+ #group1 {
109
+ animation: group1_anim 8000ms ease-in-out infinite normal forwards;
110
+ /* Delay animation after fly-in animation */
111
+ transform: translate(30px, 30px);
112
+ animation-delay: 0.8s;
113
+ }
114
+
115
+ @keyframes group1_anim {
116
+ 0% { transform: translate(30px, 30px); }
117
+ 25% { transform: translate(50px, 100px); }
118
+ 50% { transform: translate(90px, 30px); }
119
+ 75% { transform: translate(50px, 50px); }
120
+ 100% { transform: translate(30px, 30px); }
121
+ }
122
+
123
+ #group2 {
124
+ animation: group2_anim 8000ms ease-in-out infinite normal forwards;
125
+ /* Delay animation after fly-in animation */
126
+ transform: translate(-35px, -35px);
127
+ animation-delay: 0.8s;
128
+ }
129
+
130
+ @keyframes group2_anim {
131
+ 0% { transform: translate(-35px, -35px); }
132
+ 25% { transform: translate(25px, 40px); }
133
+ 50% { transform: translate(100px, 35px); }
134
+ 75% { transform: translate(25px, 25px); }
135
+ 100% { transform: translate(-35px, -35px); }
136
+ }
137
+
138
+ #group3 {
139
+ overflow: visible;
140
+ animation: group3_anim 8000ms ease-in-out infinite normal forwards;
141
+ /* Delay animation after fly-in animation */
142
+ transform: translate(120px, 20px);
143
+ animation-delay: 0.8s;
144
+ }
145
+
146
+ @keyframes group3_anim {
147
+ 0% { transform: translate(120px, 20px); }
148
+ 25% { transform: translate(30px, 17px); }
149
+ 50% { transform: translate(35px, 20px); }
150
+ 75% { transform: translate(30px, 120px); }
151
+ 100% { transform: translate(120px, 20px); }
152
+ }
153
+
154
+ #group4 {
155
+ animation: group4_anim 12000ms ease-in-out infinite normal forwards;
156
+ /* Delay animation after fly-in animation */
157
+ transform: translate(40px, -40px);
158
+ animation-delay: 0.8s;
159
+ }
160
+
161
+ @keyframes group4_anim {
162
+ 0% { transform: translate(40px, -40px); }
163
+ 25% { transform: translate(25px, 45px); }
164
+ 50% { transform: translate(-20px, 120px); }
165
+ 75% { transform: translate(50px, 0px); }
166
+ 100% { transform: translate(40px, -40px); }
167
+ }
168
+ </style>
169
+ <defs>
170
+ <!-- Define the circular masks -->
171
+ <mask id="circleMask1">
172
+ <rect width="100" height="100" fill="black" />
173
+ <circle cx="50" cy="50" r="50" fill="white" />
174
+ </mask>
175
+ <mask id="circleMask2">
176
+ <rect width="100" height="100" fill="black" />
177
+ <circle cx="50" cy="50" r="46" fill="white" />
178
+ </mask>
179
+
180
+ <!-- Radial Gradients for Animations -->
181
+ <radialGradient id="gradient1" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
182
+ <stop offset="0%" stop-color="var(--logo-color1)" />
183
+ <stop offset="80%" stop-color="var(--logo-color1-transparent)" />
184
+ </radialGradient>
185
+ <radialGradient id="gradient2" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
186
+ <stop offset="0%" stop-color="var(--logo-color2)" />
187
+ <stop offset="80%" stop-color="var(--logo-color2-transparent)" />
188
+ </radialGradient>
189
+ <radialGradient id="gradient3" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
190
+ <stop offset="0%" stop-color="var(--logo-color3)" />
191
+ <stop offset="50%" stop-color="var(--logo-color3-transparent)" />
192
+ </radialGradient>
193
+ <radialGradient id="gradient4" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
194
+ <stop offset="0%" stop-color="var(--logo-color4)" />
195
+ <stop offset="80%" stop-color="var(--logo-color4-transparent)" />
196
+ </radialGradient>
197
+
198
+ <!-- Radial Gradient for Centered Disc -->
199
+ <radialGradient id="centerGradient" cx="0.5" cy="0.5" r="0.5" spreadMethod="pad">
200
+ <stop offset="0%" stop-color="rgba(255, 255, 255, 0)" />
201
+ <stop offset="75%" stop-color="rgba(255, 255, 255, 0)" />
202
+ <stop offset="100%" stop-color="var(--logo-glass-color)" />
203
+ </radialGradient>
204
+
205
+ <!-- Gaussian blur filter -->
206
+ <filter id="blurFilter" x="-150%" y="-150%" width="400%" height="400%">
207
+ <feGaussianBlur stdDeviation="8" />
208
+ </filter>
209
+
210
+ </defs>
211
+
212
+ <!-- Larger Disc (border) -->
213
+ <g mask="url(#circleMask1)">
214
+ <circle cx="50" cy="50" r="50" fill="var(--logo-color2)" />
215
+ <g id="group1">
216
+ <ellipse x="50" rx="500" ry="80" fill="url(#gradient3)" filter="url(#blurFilter)" />
217
+ </g>
218
+ <g id="group2">
219
+ <ellipse rx="100" ry="100" fill="url(#gradient2)" filter="url(#blurFilter)" />
220
+ </g>
221
+ <g id="group3">
222
+ <ellipse rx="100" ry="100" fill="url(#gradient1)" filter="url(#blurFilter)" />
223
+ </g>
224
+ </g>
225
+
226
+ <!-- Smaller Disc -->
227
+ <g mask="url(#circleMask2)">
228
+ <circle cx="50" cy="50" r="46" fill="var(--logo-color1)" />
229
+ <g id="group1">
230
+ <ellipse x="50" rx="100" ry="80" fill="url(#gradient1)" filter="url(#blurFilter)" />
231
+ </g>
232
+ <g id="group2">
233
+ <ellipse rx="80" ry="50" fill="url(#gradient2)" filter="url(#blurFilter)" />
234
+ </g>
235
+ <g id="group3">
236
+ <ellipse rx="60" ry="40" fill="url(#gradient3)" filter="url(#blurFilter)" />
237
+ </g>
238
+ <g id="group4">
239
+ <ellipse rx="30" ry="40" fill="url(#gradient4)" filter="url(#blurFilter)" />
240
+ </g>
241
+
242
+ <!-- Grain -->
243
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" filter='url(#grainFilter)' style="mix-blend-mode: soft-light;" />
244
+ </g>
245
+
246
+ <!-- Grain -->
247
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
248
+ </svg>
249
+ </div>
250
+ `,avatarLarge:``,info:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>`,openChat:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m12 4v17"/><path d="m19 11-7-7-7 7"/></g></svg>`,speechInput:`
251
+ <svg width="0" height="0">
252
+ <defs>
253
+ <mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
254
+ <rect width="1" height="1" fill="black" />
255
+ <g
256
+ fill="none"
257
+ stroke="white"
258
+ stroke-width="2"
259
+ stroke-linecap="round"
260
+ stroke-linejoin="round"
261
+ transform="translate(0.1, 0.05) scale(0.035, 0.035)"
262
+ >
263
+ <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
264
+ <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
265
+ <path d="M12 19v4"></path>
266
+ <path d="M8 23h8"></path>
267
+ </g>
268
+ </mask>
269
+ </defs>
270
+ </svg>
271
+ `,listUnordered:`
272
+ <svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
273
+ <path d='M8 6H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
274
+ <path d='M8 12H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
275
+ <path d='M8 18H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
276
+ <path d='M3 6H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
277
+ <path d='M3 12H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
278
+ <path d='M3 18H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
279
+ </svg>
280
+ `,lightMode:`
281
+ <svg viewBox="0 0 24 24" fill="none">
282
+ <path d="M18.5625 12C18.5625 10.2595 17.8711 8.59032 16.6404 7.35961C15.4097 6.1289 13.7405 5.4375 12 5.4375C10.2595 5.4375 8.59032 6.1289 7.35961 7.35961C6.1289 8.59032 5.4375 10.2595 5.4375 12C5.4375 13.7405 6.1289 15.4097 7.35961 16.6404C8.59032 17.8711 10.2595 18.5625 12 18.5625C13.7405 18.5625 15.4097 17.8711 16.6404 16.6404C17.8711 15.4097 18.5625 13.7405 18.5625 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
283
+ <path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
284
+ <path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
285
+ <path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
286
+ <path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
287
+ <path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
288
+ <path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
289
+ <path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
290
+ <path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
291
+ </svg>
292
+
293
+ `,darkMode:`
294
+ <svg viewBox="0 0 24 24" fill="none">
295
+ <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"/>
296
+ </svg>
297
+ `,settings:`
298
+ <svg fill="none" viewBox="0 0 24 24">
299
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
300
+ <path d="M5.08008 12H1.26074"></path>
301
+ <path d="M22.7383 12H10.0059"></path>
302
+ <path d="M13.9941 20.1172H1.26074"></path>
303
+ <path d="M22.7383 20.1172h-3.8184"></path>
304
+ <path d="m13.9941 4.02344 -12.73336 0"></path>
305
+ <path d="M22.7383 4.02344h-3.8184"></path>
306
+ <path d="M5.08 12.002a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
307
+ <path d="M13.994 20.119a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
308
+ <path d="M13.994 3.885a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
309
+ </g>
310
+ </svg>
311
+ `,settingsClose:`
312
+ <svg fill="none" viewBox="0 0 24 24">
313
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
314
+ <path d="m6 18 12-12"/>
315
+ <path d="m18 18-12-12"/>
316
+ </g>
317
+ </svg>
318
+ `,sources:`
319
+ <svg fill="none" viewBox="0 0 24 24" width="24">
320
+ <g fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
321
+ <path d="m20.3713 11.9655c.0006 1.0543-.2065 2.0983-.6093 3.0726-.4029.9742-.9936 1.8595-1.7386 2.6054-.7449.7458-1.6294 1.3376-2.603 1.7416s-2.0172.6122-3.0712.6127c-2.1389-.0355-4.17716-.9146-5.67123-2.4459-1.49408-1.5313-2.32301-3.5908-2.30639-5.7304.00172-2.04515.80385-4.00834 2.23469-5.46928s3.37664-2.30352 5.42083-2.34734c.1155-.00487.231-.00696.3478-.00696 1.0491-.00569 2.089.19629 3.0598.5943.9707.39801 1.8531.9842 2.5964 1.72479s1.3327 1.62095 1.7343 2.59038c.4017.96942.6076 2.00871.6059 3.05811z"/>
322
+ <path d="m12.3713 3.9978c-3.99996 4.52568-3.99996 10.4299 0 16"/>
323
+ <path d="m12.3713 3.9978c4 4.52627 4 10.4292 0 16"/>
324
+ <path d="m4.37134 11.9978h15.99996"/>
325
+ </g>
326
+ </svg>
327
+ `,model:`
328
+ <svg fill="none" viewBox="0 0 24 24">
329
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
330
+ <path d="m2.63867 10.0059c3.35563-.67463 6.05732-3.40917 6.73292-6.8516.67571 3.44243 3.37671 6.17697 6.73231 6.8516m0 .0039c-3.3556.6746-6.0573 3.4091-6.73291 6.8516-.6756-3.4425-3.37669-6.177-6.73232-6.8516"/>
331
+ <path d="m13.6367 17.3983c2.0766-.4174 3.7486-2.1097 4.1668-4.2401.4181 2.1304 2.0896 3.8227 4.1663 4.2401m0 .0024c-2.0767.4176-3.7487 2.1098-4.1667 4.2402-.4181-2.1304-2.0898-3.8226-4.1664-4.2402"/>
332
+ </g>
333
+ </svg>
334
+ `,checkbox:`
335
+ <svg viewBox="0 0 24 24" fill="none">
336
+ <path d="M18 6L10 16L5 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
337
+ </svg>
338
+ `,warning:`
339
+ <svg fill="none" viewBox="0 0 24 24">
340
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M20 11.8499c0.0058 2.1364 -0.8308 4.1889 -2.3284 5.7125C16.174 19.086 14.1362 19.9579 12 19.9889c-1.0431 0.0158 -2.07902 -0.1757 -3.04759 -0.5634 -0.96857 -0.3877 -1.85052 -0.9638 -2.59471 -1.695 -0.74419 -0.7312 -1.3358 -1.6028 -1.74052 -2.5644 -0.40472 -0.9616 -0.61449 -1.9939 -0.61715 -3.0372 -0.00576 -2.13645 0.83084 -4.18908 2.32839 -5.71284C7.82597 4.8923 9.86379 4.02023 12 3.98892c1.0432 -0.01562 2.0792 0.17602 3.0477 0.56381 0.9686 0.38779 1.8505 0.96402 2.5947 1.69526 0.7442 0.73125 1.3358 1.60296 1.7405 2.56458 0.4047 0.96163 0.6145 1.99403 0.6171 3.03733v0Z" stroke-width="2"></path>
341
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 12.989V7.98804" stroke-width="2"></path>
342
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 15.512h-0.004" stroke-width="2"></path>
343
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.001 15.512H12" stroke-width="2"></path>
344
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.50003 20.0341c-1.10018 -1.0257 -1.97829 -2.2662 -2.58007 -3.6447 -0.60179 -1.3786 -0.91445 -2.8659 -0.91867 -4.37 -0.004213 -1.5042 0.3001 -2.99325 0.89415 -4.37514 0.59404 -1.38189 1.46518 -2.62726 2.55959 -3.65915" stroke-width="2"></path>
345
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M19.523 3.96411c1.0995 1.03065 1.9754 2.27621 2.5736 3.65943 0.5981 1.38321 0.9056 2.87456 0.9034 4.38156 -0.0021 1.507 -0.3139 2.9975 -0.916 4.379 -0.6021 1.3815 -1.4816 2.6245 -2.584 3.652" stroke-width="2"></path>
346
+ <path stroke="currentColor" d="M11.998 16.0161c-0.138 0 -0.25 -0.1119 -0.25 -0.25s0.112 -0.25 0.25 -0.25" stroke-width="2"></path>
347
+ <path stroke="currentColor" d="M11.998 16.0161c0.1381 0 0.25 -0.1119 0.25 -0.25s-0.1119 -0.25 -0.25 -0.25" stroke-width="2"></path>
348
+ </svg>
349
+ `,topic:`
350
+ <svg fill="none" viewBox="0 0 24 24">
351
+ <g stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
352
+ <path d="M17.625 4.776a27.989 27.989 0 0 1 4.212-.35.469.469 0 0 1 .476.47v14.78a.469.469 0 0 1-.463.469c-7.6.096-9.85 2.56-9.85 2.56m0 0V6.987s-2.25-2.46-9.837-2.56a.469.469 0 0 0-.475.469v14.78a.469.469 0 0 0 .462.469c7.6.096 9.85 2.56 9.85 2.56Z"/>
353
+ <path d="M12 22.237a6.525 6.525 0 0 1 5.625-5.625V1.764a.47.47 0 0 0-.62-.444C12.324 2.918 12 6.327 12 6.768"/>
354
+ </g>
355
+ </svg>
356
+ `,forward:`
357
+ <svg fill="none" viewBox="0 0 24 24">
358
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="m11.1 19.7001 8.1 -7.8 -8.1 -7.8v4.40002H8.89999c-4.5 0 -8.200001 3.69998 -8.200001 8.19998v2.7c0 0.3 0.2 0.5 0.500001 0.5h0.09999c0.2 0 0.40001 -0.2 0.40001 -0.4 0.2 -2.3 2.1 -4.2001 4.5 -4.2001H11v4.4001h0.1Z" stroke-width="1"></path>
359
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="m15.1 19.7001 8.2 -7.8 -8.2 -7.8" stroke-width="1"></path>
360
+ </svg>
361
+ `,embedAvatar:``,phone:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z"/></svg>`,email:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 7 10-7"/></svg>`,headerLogo:``}}},qf={fineGrained:{light:Kf,dark:Gf(Kf,{tokens:{base:{lineColor:`color-mix(in srgb, var(--color-brand-100) 20%, transparent)`},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)`}},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(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--body-color)`,background:`var(--color-grey-800)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-900)`}},input:{background:`var(--color-grey-900)`,borderColor:`var(--color-grey-700)`,custom:{placeholderColor:`var(--color-grey-400)`}},label:{color:`var(--color-grey-50)`},checkbox:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},radio:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},contextBox:{custom:{titleColor:`var(--color-grey-50)`}},referenceDescription:{color:`var(--color-grey-300)`,hover:{color:`var(--color-grey-300)`}},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)`},searchSummary:{color:`var(--body-color)`,background:`var(--color-grey-800)`,borderColor:`var(--color-grey-700)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-background)`}},messageJsonLdMap:{custom:{markerColor:`#6658c8`,mapStyleUrl:`https://tiles.openfreemap.org/styles/fiord`}}}}})}},Jf=e=>typeof e==`string`?Rd[e]:e,Yf=e=>{let t=Jf(e?.colors?.brand||Rd.gray),n=Jf(e?.colors?.highlight||t),r={0:`#ffffff`,1e3:`#000000`,...Jf(e?.colors?.grey||Rd.gray)},i;return i=e.avatarImageUrl?`<img src="${e.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));" />`:qf.fineGrained.light.tokens.svgs.avatar,{fontURLs:e.font?.urls,tokens:{font:{family:e.font?.family},colors:{brand:t,highlight:n,grey:r},base:{fontSizeXs:e.font?.sizeXs,fontSizeSm:e.font?.sizeSm,fontSizeBody:e.font?.sizeBody,fontSizeH3:e.font?.sizeH3,fontSizeH2:e.font?.sizeH2,fontSizeH1:e.font?.sizeH1,fontWeightNormal:e.font?.weightBold,fontWeightBold:e.font?.weightNormal,fontWeightTitle:e.font?.weightTitle,borderRadius:e.borderRadius},components:{body:{background:e.colors?.background,color:e.colors?.text},anchor:{color:e.colors?.anchor?.default,hover:{color:e.colors?.anchor?.hover}}},svgs:{avatar:i}}}},Xf=e=>{let t=Yf(e);return{light:Gf(qf.fineGrained.light,t)}},Zf=e=>{let t={};return e.dark&&(t.dark=Gf(qf.fineGrained.dark,e.dark)),e.light&&(t.light=Gf(qf.fineGrained.light,e.light)),!e.dark&&!e.light&&(t.light=e.light),t},Qf={de:{askQuestionAgain:`Frage erneut stellen`,answerGood:`Gute Antwort`,answerBad:`Schlechte Antwort`,chatInputPlaceholder:`Fragen Sie mich etwas`,chatInputPlaceholderListening:`Ich höre zu...`,chatInputSubmit:`Aufforderung senden`,chatInputAbort:`Antwort unterbrechen`,chatInputStartListening:`Spracherkennung starten`,chatInputStopListening:`Spracherkennung beenden`,introductionTitle:`Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?`,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`,referenceLink:`Link zur Referenz`,referencesDisplay:`Referenzen anzeigen`,referencesHide:`Referenzen ausblenden`,referencesTitle:`Referenzen`,referencesFurtherTitle:`Weitere Referenzen`,chatFooterText:``,scrollToBottom:`Nach unten scrollen`,openMenu:`Menü öffnen`,closeMenu:`Menü schliessen`,closeChat:`Chat schliessen`,close:`Schliessen`,openInfo:`Info öffnen`,send:`Abschicken`,thankYouForFeedback:`Danke für Dein Feedback!`,answerFormThankYou:`Vielen Dank, Ihre Anfrage wurde gesendet.`,giveFeedback:`Feedback geben`,sendFeedback:`Feedback senden`,feedbackFormTitle:`Feedback geben, um unseren Chatbot zu verbessern`,feedbackFormMessage:`Ihre Nachricht`,feedbackFormMessagePlaceholder:`Schreiben Sie hier Ihre Nachricht...`,feedbackFormEmail:`E-Mail`,feedbackFormEmailPlaceholder:`Ihre E-Mail eingeben...`,classificationSubmit:`Abschicken`,classificationThankYou:`Danke für Dein Feedback!`,classificationTitle:`Bitte bewerten Sie den Einfluss und die Qualität der Antwort`,selectLanguage:`Sprache auswählen`,languageChanged:`Sprache auf Deutsch geändert.`,selectColorTheme:`Farbmodus wählen`,lightMode:`Hell`,darkMode:`Dunkel`,noResultsFound:`Keine Ergebnisse gefunden`,aboutThisChat:`
362
+ <p>
363
+ <strong>Dies ist ein Platzhaltertext, um dem Chatbot Kontext zu geben</strong>
364
+ </p>
365
+ <p>
366
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">Weitere Informationen <span class="sr-only">, (öffnet in einem neuen Tab)</span></a>
367
+ </p>
368
+ `,ariaMainNavigation:`Hauptnavigation`,ariaMainNavigationInfo:`Über diesen Chat`,ariaMainNavigationLinks:`Links`,ariaMainNavigationLanguageSwitch:`Sprachwechsel`,ariaMainNavigationColorMode:`Farbmodus`,ariaGotoMainNavigation:`Zur Hauptnavigation springen`,ariaAskQuestion:`Texteingabe`,ariaAskQuestionRegion:`Stellen Sie eine Frage`,ariaNotifications:`Benachrichtigungen`,ariaPredefinedQuestions:`Vordefinierte Fragen`,ariaPredefinedQuestionsRegion:`Probieren Sie unsere Beispielfragen`,ariaChatHistory:`Chatverlauf`,ariaOpenChat:`Chat öffnen`,ariaQuestionFromYou:`Ihre Frage:`,ariaAnswerFromBot:`Antwort {n} vom Assistenten:`,ariaLastAnswerNavigation:`Navigation und Optionen für die letzte Antwort`,ariaQuestionSent:`Frage gesendet. Antwort wird generiert.`,ariaAnswerReady:`Antwort bereit.`,ariaAnswerFinished:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAnswerFinishedWithSelectedTopic:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um das gewählte Thema zu ändern, den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAskQuestionAgain:`Letzte Frage in das Chat-Eingabefeld kopieren, um sie erneut zu stellen`,ariaAnswerGood:`Diese Antwort als gut bewerten`,ariaAnswerBad:`Diese Antwort als schlecht bewerten`,ariaReferenceSource:`Quelle:`,ariaGiveFeedback:`Detailliertes Feedback zur Antwort geben`,ariaAnswerForm:`Formular zu dieser Antwort öffnen`,ariaLanguageChanged:`Sprache auf Deutsch geändert.`,ariaLightSelected:`Hellmodus aktiviert.`,ariaDarkSelected:`Dunkelmodus aktiviert.`,ariaSettings:`Chateinstellungen`,ariaSettingsRegion:`Passen Sie Ihre Chat-Präferenzen an`,ariaReferencesRegion:`Referenzen zur aktuellen Frage`,ariaOpensInNewTab:`(öffnet in neuem Tab)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Diesen Inhalt mit der Escape-Taste schliessen`,ariaInfoTitle:`Über diesen Chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`ausgewählt`,ariaUnselected:`nicht ausgewählt`,ariaAllSelected:`Alle Elemente ausgewählt`,ariaAllUnselected:`Alle Elemente nicht ausgewählt`,ariaAllReseted:`Standardelemente ausgewählt`,ariaChangeTopic:`Thema ändern`,hideSettings:`Einstellungen ausblenden`,showSettings:`Einstellungen`,chooseAtLeastOneOption:`Wählen Sie mindestens eine Option`,selectAll:`Alle auswählen`,selectNone:`Alle abwählen`,resetToDefaults:`Zurücksetzen`,messageTooLong:`Ihre Nachricht muss kürzer als {questionLengthLimit} Zeichen sein. Aktuell ist sie {questionLength} Zeichen lang`,selectedTopic:`Ausgewähltes Thema`,changeTopic:`Thema ändern`,searchSummaryExpand:`Gesamte Antwort`,searchSummaryCollapse:`Weniger anzeigen`,searchSummaryOptInDefault:`KI-Suche aktivieren`,searchSummaryOptOut:`KI-Suche deaktivieren`,searchSummaryError:`Etwas ist schiefgelaufen.`,searchSummaryDisclaimer:`<p><strong>Ich bin ein KI-Assistent.</strong></p><p>Meine Antworten werden von einer künstlichen Intelligenz generiert und sind deshalb nicht immer korrekt. Wenn Sie mich aktivieren, unterstütze ich Sie bei der Suche nach den richtigen Informationen.</p>`,searchSummaryLoading:`Antwort wird generiert…`,searchSummaryFollowUpPlaceholder:`Stellen Sie eine Folgefrage…`,searchSummaryFollowUpSubmit:`Im Chat fortfahren`,ariaSearchSummaryExpand:`Vollständige Antwort anzeigen`,ariaSearchSummaryCollapse:`Antwort einklappen`,ariaSearchSummaryOptOut:`KI-Suche deaktivieren`,ariaSearchSummaryFollowUpInput:`Frage stellen`,jsonLdEventDate:`Datum`,jsonLdEventLocation:`Ort`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Zum Event`,jsonLdCtaLabel:`Mehr erfahren`,jsonLdMapOpenMap:`Karte öffnen`,ariaJsonLdMapCanvas:`Karte`,ariaJsonLdEventCard:`Veranstaltung`,ariaJsonLdMapCard:`Standort`,ariaJsonLdCtaCard:`Link`},en:{askQuestionAgain:`Ask question again`,answerGood:`Good answer`,answerBad:`Bad answer`,chatInputPlaceholder:`Ask me something`,chatInputPlaceholderListening:`I'm listening...`,chatInputSubmit:`Send prompt`,chatInputAbort:`Stop response`,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?`,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`,referenceLink:`Link to reference`,referencesDisplay:`Show references`,referencesHide:`Hide references`,referencesTitle:`References`,referencesFurtherTitle:`More 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!`,answerFormThankYou:`Thank you, your request has been sent.`,giveFeedback:`Give feedback`,sendFeedback:`Send feedback`,feedbackFormTitle:`Give feedback to improve our Chatbot`,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 answer`,selectLanguage:`Select language`,languageChanged:`Language changed to English.`,selectColorTheme:`Choose color mode`,lightMode:`Light`,darkMode:`Dark`,noResultsFound:`No results found`,aboutThisChat:`
369
+ <p>
370
+ <strong>This is a placeholder text to give context to the chat-bot</strong>
371
+ </p>
372
+ <p>
373
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">More information <span class="sr-only">, (opens in a new tab)</span></a>
374
+ </p>
375
+ `,ariaMainNavigation:`Main navigation`,ariaMainNavigationInfo:`About this chat`,ariaMainNavigationLinks:`Links`,ariaMainNavigationLanguageSwitch:`Language switch`,ariaMainNavigationColorMode:`Color mode`,ariaGotoMainNavigation:`Go to main navigation`,ariaAskQuestion:`Text input`,ariaAskQuestionRegion:`Ask a question`,ariaNotifications:`Notifications`,ariaPredefinedQuestions:`Predefined Questions`,ariaPredefinedQuestionsRegion:`Try our sample questions`,ariaChatHistory:`Chat history`,ariaOpenChat:`Open chat`,ariaQuestionFromYou:`Your question:`,ariaAnswerFromBot:`Answer {n} from Assistant:`,ariaLastAnswerNavigation:`Navigation and options for the last answer`,ariaQuestionSent:`Question sent. Generating answer...`,ariaAnswerReady:`Answer ready.`,ariaAnswerFinished:`Answer complete. Ask a further question or navigate back to review the chat history, provide feedback, or view references linked to the answer.`,ariaAnswerFinishedWithSelectedTopic:`Answer complete. Ask a further question or navigate back to change the selected topic, review the chat history, provide feedback, or view references linked to the answer.`,ariaAskQuestionAgain:`Copy the last question into the chat-input to ask it again`,ariaAnswerGood:`Rate this answer as good`,ariaAnswerBad:`Rate this answer as bad`,ariaReferenceSource:`Source:`,ariaGiveFeedback:`Give detailed feedback on the answer`,ariaAnswerForm:`Open the form for this answer`,ariaLanguageChanged:`Language changed to English.`,ariaLightSelected:`Light mode activated.`,ariaDarkSelected:`Dark mode activated.`,ariaSettings:`Chat settings`,ariaSettingsRegion:`Adjust your chat preferences`,ariaReferencesRegion:`References for the current question`,ariaOpensInNewTab:`(opens in new tab)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Close this content by pressing the Escape key`,ariaInfoTitle:`About this chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`selected`,ariaUnselected:`unselected`,ariaAllSelected:`All items selected`,ariaAllUnselected:`All items unselected`,ariaAllReseted:`Default items selected`,ariaChangeTopic:`Change topic`,hideSettings:`Hide settings`,showSettings:`Show settings`,chooseAtLeastOneOption:`Select at least one option`,selectAll:`Select all`,selectNone:`Deselect all`,resetToDefaults:`Reset to defaults`,messageTooLong:`Your message has to be shorter than {questionLengthLimit} characters. Currently it is {questionLength} characters long`,selectedTopic:`Selected topic`,changeTopic:`Change topic`,searchSummaryExpand:`Full answer`,searchSummaryCollapse:`Show less`,searchSummaryOptInDefault:`Enable AI search`,searchSummaryOptOut:`Disable AI search`,searchSummaryError:`Something went wrong.`,searchSummaryDisclaimer:`<p><strong>I am an AI assistant.</strong></p><p>My answers are generated by artificial intelligence and may not always be correct. If you activate me, I will help you find the right information.</p>`,searchSummaryLoading:`Generating answer…`,searchSummaryFollowUpPlaceholder:`Ask a follow-up question…`,searchSummaryFollowUpSubmit:`Continue in chat`,ariaSearchSummaryExpand:`Show full answer`,ariaSearchSummaryCollapse:`Collapse answer`,ariaSearchSummaryOptOut:`Disable AI search`,ariaSearchSummaryFollowUpInput:`Ask a follow-up question`,jsonLdEventDate:`Date`,jsonLdEventLocation:`Location`,jsonLdEventDescription:`Info`,jsonLdEventCtaLabel:`View event`,jsonLdCtaLabel:`Learn more`,jsonLdMapOpenMap:`Open map`,ariaJsonLdMapCanvas:`Map`,ariaJsonLdEventCard:`Event`,ariaJsonLdMapCard:`Location`,ariaJsonLdCtaCard:`Link`},it:{askQuestionAgain:`Chiedi di nuovo`,answerGood:`Risposta buona`,answerBad:`Risposta cattiva`,openButtonTitle:`Hai una domanda?`,openButtonDescription:`Sono LiipGPT. Posso aiutarti con i contenuti di questo sito.`,chatInputPlaceholder:`Chiedimi qualcosa`,chatInputPlaceholderListening:`Sto ascoltando...`,chatInputSubmit:`Invia richiesta`,chatInputAbort:`Interrompi risposta`,chatInputStartListening:`Avvia il riconoscimento vocale`,chatInputStopListening:`Ferma il riconoscimento vocale`,introductionTitle:`Sono <span class="liipgpt-gradient-text">LiipGPT</span>. Come posso aiutarti oggi?`,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`,referenceLink:`Link alla referenza`,referencesDisplay:`Mostra riferimenti`,referencesHide:`Nascondi riferimenti`,referencesTitle:`Riferimenti`,referencesFurtherTitle:`Più 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!`,answerFormThankYou:`Grazie, la tua richiesta è stata inviata.`,giveFeedback:`Invia feedback`,sendFeedback:`Invia feedback`,feedbackFormTitle:`Invia feedback per migliorare il nostro Chatbot`,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:`Valuta l'impatto e la qualità della risposta`,selectLanguage:`Selezionare la lingua`,languageChanged:`Lingua cambiata in italiano.`,selectColorTheme:`Scegli modalità colore`,lightMode:`Chiaro`,darkMode:`Scuro`,noResultsFound:`Nessun risultato trovato`,aboutThisChat:`
376
+ <p>
377
+ <strong>Questo è un testo segnaposto per dare contesto al chatbot</strong>
378
+ </p>
379
+ <p>
380
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">Ulteriori informazioni <span class="sr-only">, (apre in una nuova scheda)</span></a>
381
+ </p>
382
+ `,ariaMainNavigation:`Navigazione principale`,ariaMainNavigationInfo:`Informazioni su questo chat`,ariaMainNavigationLinks:`Link`,ariaMainNavigationLanguageSwitch:`Cambio lingua`,ariaMainNavigationColorMode:`Modalità colore`,ariaGotoMainNavigation:`Vai alla navigazione principale`,ariaAskQuestion:`Input testo`,ariaAskQuestionRegion:`Fai una domanda`,ariaNotifications:`Notifiche`,ariaPredefinedQuestions:`Domande predefinite`,ariaPredefinedQuestionsRegion:`Prova le nostre domande di esempio`,ariaChatHistory:`Cronologia chat`,ariaOpenChat:`Apri chat`,ariaQuestionFromYou:`La tua domanda:`,ariaAnswerFromBot:`Risposta {n} dall'Assistente:`,ariaLastAnswerNavigation:`Navigazione e opzioni per l'ultima risposta`,ariaQuestionSent:`Domanda inviata. Generazione risposta in corso...`,ariaAnswerReady:`Risposta pronta.`,ariaAnswerFinished:`Risposta completata. Fai un'altra domanda o naviga indietro per rivedere la cronologia della chat, fornire feedback o visualizzare i riferimenti collegati alla risposta.`,ariaAnswerFinishedWithSelectedTopic:`Risposta completata. Fai un'altra domanda o naviga indietro per cambiare l'argomento selezionato, rivedere la cronologia della chat, fornire feedback o visualizzare i riferimenti collegati alla risposta.`,ariaAskQuestionAgain:`Copia l'ultima domanda nel campo di input della chat per ripeterla`,ariaAnswerGood:`Valuta questa risposta come buona`,ariaAnswerBad:`Valuta questa risposta come cattiva`,ariaReferenceSource:`Fonte:`,ariaGiveFeedback:`Invia feedback dettagliato sulla risposta`,ariaAnswerForm:`Apri il modulo per questa risposta`,ariaLanguageChanged:`Lingua cambiata in italiano.`,ariaLightSelected:`Modalità chiara attivata.`,ariaDarkSelected:`Modalità scura attivata.`,ariaSettings:`Impostazioni chat`,ariaSettingsRegion:`Personalizza le tue preferenze di chat`,ariaReferencesRegion:`Riferimenti alla domanda corrente`,ariaOpensInNewTab:`(apre in una nuova scheda)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Chiudere questo contenuto premendo il tasto Escape`,ariaInfoTitle:`Informazioni su questo chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`selezionato`,ariaUnselected:`non selezionato`,ariaAllSelected:`Tutti gli elementi selezionati`,ariaAllUnselected:`Tutti gli elementi non selezionati`,ariaAllReseted:`Elementi predefiniti selezionati`,ariaChangeTopic:`Cambia argomento`,hideSettings:`Nascondi impostazioni`,showSettings:`Impostazioni`,chooseAtLeastOneOption:`Seleziona almeno una opzione`,selectAll:`Seleziona tutto`,selectNone:`Deseleziona tutto`,resetToDefaults:`Ripristina predefiniti`,messageTooLong:`Il tuo messaggio deve essere più corto di {questionLengthLimit} caratteri. Attualmente è lungo {questionLength} caratteri`,selectedTopic:`Argomento selezionato`,changeTopic:`Cambia argomento`,searchSummaryExpand:`Risposta completa`,searchSummaryCollapse:`Mostra meno`,searchSummaryOptInDefault:`Attiva la ricerca IA`,searchSummaryOptOut:`Disattiva la ricerca IA`,searchSummaryError:`Si è verificato un errore.`,searchSummaryDisclaimer:`<p><strong>Sono un assistente IA.</strong></p><p>Le mie risposte sono generate dall'intelligenza artificiale e potrebbero non essere sempre corrette.</p>`,searchSummaryLoading:`Generazione della risposta…`,searchSummaryFollowUpPlaceholder:`Fai una domanda di approfondimento…`,searchSummaryFollowUpSubmit:`Continua nella chat`,ariaSearchSummaryExpand:`Mostra la risposta completa`,ariaSearchSummaryCollapse:`Comprimi la risposta`,ariaSearchSummaryOptOut:`Disattiva la ricerca IA`,ariaSearchSummaryFollowUpInput:`Fai una domanda di approfondimento`,jsonLdEventDate:`Data`,jsonLdEventLocation:`Luogo`,jsonLdEventDescription:`Info`,jsonLdEventCtaLabel:`Vai all'evento`,jsonLdCtaLabel:`Scopri di più`,jsonLdMapOpenMap:`Apri la mappa`,ariaJsonLdMapCanvas:`Mappa`,ariaJsonLdEventCard:`Evento`,ariaJsonLdMapCard:`Posizione`,ariaJsonLdCtaCard:`Link`},fr:{askQuestionAgain:`Reposer la question`,answerGood:`Bonne réponse`,answerBad:`Mauvaise réponse`,chatInputPlaceholder:`Posez-moi une question`,chatInputPlaceholderListening:`J'écoute...`,chatInputSubmit:`Envoyer la demande`,chatInputAbort:`Interrompre la réponse`,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?`,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`,referenceLink:`Lien vers la référence`,referencesDisplay:`Afficher les références`,referencesHide:`Masquer les références`,referencesTitle:`Références`,referencesFurtherTitle:`Plus de 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!`,answerFormThankYou:`Merci, votre demande a été envoyée.`,giveFeedback:`Donner un feedback`,sendFeedback:`Envoyer un feedback`,feedbackFormTitle:`Donnez un feedback pour améliorer notre Chatbot`,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é de la réponse`,selectLanguage:`Choisir la langue`,languageChanged:`Langue française sélectionnée.`,selectColorTheme:`Choisir le mode couleur`,lightMode:`Clair`,darkMode:`Sombre`,noResultsFound:`Aucun résultat trouvé`,aboutThisChat:`
383
+ <p>
384
+ <strong>Ceci est un texte d'espace réservé pour donner du contexte au chatbot</strong>
385
+ </p>
386
+ <p>
387
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">Plus d'informations <span class="sr-only">, (ouvre dans un nouvel onglet)</span></a>
388
+ </p>
389
+ `,ariaMainNavigation:`Navigation principale`,ariaMainNavigationInfo:`À propos de ce chat`,ariaMainNavigationLinks:`Liens`,ariaMainNavigationLanguageSwitch:`Changement de langue`,ariaMainNavigationColorMode:`Mode couleur`,ariaGotoMainNavigation:`Aller à la navigation principale`,ariaAskQuestion:`Saisie texte`,ariaAskQuestionRegion:`Poser une question`,ariaNotifications:`Notifications`,ariaPredefinedQuestions:`Questions prédéfinies`,ariaPredefinedQuestionsRegion:`Essayez nos questions d'exemple`,ariaChatHistory:`Historique du chat`,ariaOpenChat:`Ouvrir le chat`,ariaQuestionFromYou:`Votre question:`,ariaAnswerFromBot:`Réponse {n} de l'Assistant:`,ariaLastAnswerNavigation:`Navigation et options pour la dernière réponse`,ariaQuestionSent:`Question envoyée. Génération de la réponse en cours...`,ariaAnswerReady:`Réponse prête.`,ariaAnswerFinished:`Réponse terminée. Posez une autre question ou naviguez en arrière pour consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAnswerFinishedWithSelectedTopic:`Réponse terminée. Posez une autre question ou naviguez en arrière pour changer le sujet sélectionné, consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAskQuestionAgain:`Copier la dernière question dans le champ de saisie pour la reposer`,ariaAnswerGood:`Évaluer cette réponse comme bonne`,ariaAnswerBad:`Évaluer cette réponse comme mauvaise`,ariaReferenceSource:`Source:`,ariaGiveFeedback:`Donner un feedback détaillé sur la réponse`,ariaAnswerForm:`Ouvrir le formulaire pour cette réponse`,ariaLanguageChanged:`Langue française sélectionnée.`,ariaLightSelected:`Mode clair activé.`,ariaDarkSelected:`Mode sombre activé.`,ariaSettings:`Paramètres du chat`,ariaSettingsRegion:`Ajustez vos préférences de chat`,ariaReferencesRegion:`Références pour la question actuelle`,ariaOpensInNewTab:`(ouvre dans un nouvel onglet)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Fermer ce contenu en appuyant sur la touche Échap`,ariaInfoTitle:`À propos de ce chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`sélectionné`,ariaUnselected:`non sélectionné`,ariaAllSelected:`Tous les éléments sélectionnés`,ariaAllUnselected:`Tous les éléments non sélectionnés`,ariaAllReseted:`Éléments par défaut sélectionnés`,ariaChangeTopic:`Changer de sujet`,hideSettings:`Masquer les paramètres`,showSettings:`Paramètres`,chooseAtLeastOneOption:`Veuillez choisir au moins une option`,selectAll:`Tout sélectionner`,selectNone:`Tout désélectionner`,resetToDefaults:`Réinitialiser`,messageTooLong:`Votre message doit être plus court que {questionLengthLimit} caractères. Actuellement, il fait {questionLength} caractères`,selectedTopic:`Sujet sélectionné`,changeTopic:`Changer de sujet`,searchSummaryExpand:`Réponse complète`,searchSummaryCollapse:`Afficher moins`,searchSummaryOptInDefault:`Activer la recherche IA`,searchSummaryOptOut:`Désactiver la recherche IA`,searchSummaryError:`Une erreur s'est produite.`,searchSummaryDisclaimer:`<p><strong>Je suis un assistant IA.</strong></p><p>Mes réponses sont générées par l'intelligence artificielle et peuvent ne pas toujours être correctes.</p>`,searchSummaryLoading:`Génération de la réponse…`,searchSummaryFollowUpPlaceholder:`Posez une question de suivi…`,searchSummaryFollowUpSubmit:`Continuer dans le chat`,ariaSearchSummaryExpand:`Afficher la réponse complète`,ariaSearchSummaryCollapse:`Réduire la réponse`,ariaSearchSummaryOptOut:`Désactiver la recherche IA`,ariaSearchSummaryFollowUpInput:`Poser une question de suivi`,jsonLdEventDate:`Date`,jsonLdEventLocation:`Lieu`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Voir l'événement`,jsonLdCtaLabel:`En savoir plus`,jsonLdMapOpenMap:`Ouvrir la carte`,ariaJsonLdMapCanvas:`Carte`,ariaJsonLdEventCard:`Événement`,ariaJsonLdMapCard:`Localisation`,ariaJsonLdCtaCard:`Lien`}},$f=e=>(e??=Qf,{de:(0,Hf.default)(Qf.de,e.de??{}),en:(0,Hf.default)(Qf.en,e.en??{}),fr:(0,Hf.default)(Qf.fr,e.fr??{}),it:(0,Hf.default)(Qf.it,e.it??{})}),ep=e=>({init:e?.init??[],bot:{before:e?.bot?.before??[],after:e?.bot?.after??[]},user:{before:e?.user?.before??[],after:e?.user?.after??[]}}),tp=e=>{let t;t=e.theme?.fineGrained?Zf(e.theme?.fineGrained):Xf(e?.theme??{});let n=$f(e?.translations),r={...e,forcePredefinedQuestions:e.forcePredefinedQuestions??!1,forceChatPage:e.forceChatPage??!1,showOverallFeedbackButton:e.showOverallFeedbackButton??!1,showOverallFeedbackEmail:e.showOverallFeedbackEmail??!0,showCloseChatButton:e.showCloseChatButton??!1,showContextInfo:e.showContextInfo??!1,showContextMenu:e.showContextMenu??!1,showReferencesByDefault:e.showReferencesByDefault??!1,referencesLayout:e.referencesLayout??`aside`,showTextFeedback:e.showTextFeedback??!0,showExpandedSelectors:e.showExpandedSelectors??!1,inlineLayout:e.inlineLayout??!1,questionPrefix:e.questionPrefix??``,blockPII:e.blockPII??!1,allowAudioInput:e.allowAudioInput??!1,supportedLanguages:e.supportedLanguages??Object.keys(n),fullTheme:t,translations:n,buttonHref:e.buttonHref,addQueryToUrlParams:e.addQueryToUrlParams??!0,addRetrievalQuestionToUrlParams:e.addRetrievalQuestionToUrlParams??!1,renderKatex:e.renderKatex??!1,sendReferrer:e.sendReferrer??`all`,selectorsConfig:e.selectorsConfig??[],questionLengthLimit:e.questionLengthLimit??600,forceConsent:e.forceConsent??!1,askQuestionAgain:e.askQuestionAgain??!1,enableBackdrop:e.enableBackdrop??!1,parentPageContext:e.parentPageContext??{},messageAdditions:ep(e.messageAdditions??{}),contextVersion:e.contextVersion??0};return e.classification&&(r.classification=e.classification),e.menu&&(r.menu=e.menu),e.answerForm&&(r.answerForm=e.answerForm),r},np=(e,t)=>t.includes(e),rp=(e,t)=>{if(np(e,t))return e;let n=ip();return np(n,t)?n:`en`},ip=()=>navigator.language.split(`-`)[0],ap=(e,t)=>{localStorage.setItem(`liipgpt:selectedLanguage`,e),t&&(t.lang=e)},op=e=>rp(localStorage.getItem(`liipgpt:selectedLanguage`),e),sp=(e,t,n)=>{if(!e)return``;if(e[t])return e[t];for(let t of n)if(e[t])return e[t];return e.en?e.en:Object.values(e).find(e=>typeof e==`string`&&e.length>0)??``},cp=(e,t)=>Array.from(new Set([e,...t,`en`,...Cd])),lp=(e,t,n,r)=>{for(let i of cp(n,r)){let n=e[i]?.selectors?.[t];if(n)return n}},up=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}));function dp(...e){return e.filter(Boolean).join(` `)}var fp=typeof document<`u`,pp=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function mp(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var hp=class extends Map{#e=new Map;#t=F(0);#n=F(0);#r=Ir||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return Ir===this.#r?F(e):vn(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return B(this.#t),!1;return B(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{B(this.#t);return}return B(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),I(this.#n,super.size),Sn(o);else if(i!==t){Sn(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&Sn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),I(n,-1)),r&&(I(this.#n,super.size),Sn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#n,0);for(var t of e.values())I(t,-1);Sn(this.#t),e.clear()}}#a(){B(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)B(n)}keys(){return B(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return B(this.#n),super.size}},gp=class{#e;#t;constructor(e,t){this.#e=e,this.#t=Zt(t)}get current(){return this.#t(),this.#e()}},_p=/\(.+\)/,vp=new Set([`all`,`print`,`screen`,`and`,`or`,`not`,`only`]),yp=class extends gp{constructor(e,t){let n=_p.test(e)||e.split(/[\s,]+/).some(e=>vp.has(e.trim()))?e:`(${e})`,r=window.matchMedia(n);super(()=>r.matches,e=>ei(r,`change`,e))}};new class{#e;#t;constructor(e={}){let{window:t=pp,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=Zt(e=>{let n=ei(t,`focusin`,e),r=ei(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?mp(this.#e):null}};function bp(e){return typeof e==`function`}var xp=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return lt(this.#t)}get(){let e=st(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=st(this.#t);return t===void 0?e:t}set(e){return ct(this.#t,e)}};function Sp(e,t){switch(e){case`post`:Qn(t);break;case`pre`:er(t);break}}function Cp(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Sp(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=V(()=>n(t,o));return o=t,r})}function wp(e,t,n){let r=tr(()=>{let i=!1;Cp(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});Qn(()=>r)}function Tp(e,t,n){Cp(e,`post`,t,n)}function Ep(e,t,n){Cp(e,`pre`,t,n)}Tp.pre=Ep;function Dp(e,t){wp(e,`post`,t)}function Op(e,t){wp(e,`pre`,t)}Dp.pre=Op;function kp(e){return bp(e)?e():e}var Ap=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=P(()=>(B(this.#s)?.(),this.getSize().width));#o=P(()=>(B(this.#s)?.(),this.getSize().height));#s=P(()=>{let e=kp(this.#r);if(e)return Zt(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??pp,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=kp(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return B(this.#s)?.(),this.getSize()}get width(){return B(this.#a)}get height(){return B(this.#o)}},jp=class{#e=()=>void 0;#t=P(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return B(this.#t)}};function Mp(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function Np(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function Pp(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=F(wn(o)),u=F(!1),d=F(void 0),f=F(wn([])),p=()=>{B(f).forEach(e=>e()),I(f,[],!0)},m=e=>{I(f,[...B(f),e],!0)},h=async(e,n,r=!1)=>{try{I(u,!0),I(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:B(l),refetching:r,onCleanup:m,signal:i.signal});return I(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||I(d,e,!0);return}finally{I(u,!1)}},g=s?Mp(h,s):c?Np(h,c):h,_=Array.isArray(e)?e:[e],v;return r((t,n)=>{a&&v||(v=t,g(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return B(l)},get loading(){return B(u)},get error(){return B(d)},mutate:e=>{I(l,e,!0)},refetch:t=>{let n=_.map(e=>e());return g(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function Fp(e,t,n){return Pp(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Tp(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function Ip(e,t,n){return Pp(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Tp.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}Fp.pre=Ip,new xp(`richColorsContext`);var Lp=new xp(`<Toaster/>`),Rp=0;function zp(e){return typeof e?.id==`number`||typeof e?.id==`string`&&e.id.length>0?e.id:Rp++}var Bp=class{#e=F(wn([]));get toasts(){return B(this.#e)}set toasts(e){I(this.#e,e,!0)}#t=F(wn([]));get heights(){return B(this.#t)}set heights(e){I(this.#t,e,!0)}#n=new Map;#r=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};#i=e=>this.heights.findIndex(t=>t.toastId===e);addToast=e=>{fp&&this.toasts.unshift(e)};updateToast=({id:e,data:t,type:n,message:r})=>{let i=this.toasts.findIndex(t=>t.id===e),a=this.toasts[i];this.toasts[i]={...a,...t,id:e,title:r,type:n,dismiss:!1,delete:!1,updated:!0}};markDismissed=e=>{let t=this.#r(e);if(t===null)return;let n=this.toasts[t];n&&(!n.dismiss||!n.delete)&&(this.toasts[t]={...n,dismiss:!0,delete:!0})};scheduleRemoval=(e,t)=>{this.cancelRemoval(e),this.#n.set(e,setTimeout(()=>{this.#n.delete(e),this.remove(e)},t))};cancelRemoval=e=>{let t=this.#n.get(e);t!==void 0&&(clearTimeout(t),this.#n.delete(e))};create=e=>{let{message:t,...n}=e,r=zp(e),i=e.dismissible===void 0?e.dismissable===void 0?!0:e.dismissable:e.dismissible,a=e.type===void 0?`default`:e.type;return V(()=>{this.cancelRemoval(r);let o=this.toasts.find(e=>e.id===r);o?.dismiss||o?.delete?(this.remove(r),this.addToast({...n,id:r,title:t,dismissible:i,type:a,updated:!0})):o?this.updateToast({id:r,data:e,type:a,message:t,dismissible:i}):this.addToast({...n,id:r,title:t,dismissible:i,type:a})}),r};dismiss=e=>(V(()=>{if(e===void 0){this.toasts=this.toasts.map(e=>e.dismiss?e:{...e,dismiss:!0});return}let t=this.toasts.findIndex(t=>t.id===e);this.toasts[t]&&(this.toasts[t]={...this.toasts[t],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}let t=this.#r(e);if(t!==null)return this.toasts.splice(t,1),e};message=(e,t)=>this.create({...t,type:`default`,message:e});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:typeof t.loading==`string`?t.loading:t.loading()}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(e=>{if(typeof e==`object`&&e&&`ok`in e&&typeof e.ok==`boolean`&&!e.ok){i=!1;let t=Vp(e);this.create({id:n,type:`error`,message:t})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?t.success(e):t.success;this.create({id:n,type:`success`,message:r})}}).catch(e=>{if(t.error!==void 0){i=!1;let r=typeof t.error==`function`?t.error(e):t.error;this.create({id:n,type:`error`,message:r})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),n};custom=(e,t)=>{let n=zp(t);return this.create({component:e,...t,id:n}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{V(()=>{let t=this.#i(e.toastId);if(t!==-1){this.heights[t]=e;return}let n=new Map(this.toasts.map((e,t)=>[e.id,t])),r=n.get(e.toastId)??-1,i=this.heights.findIndex(e=>(n.get(e.toastId)??1/0)>r);i===-1?this.heights.push(e):this.heights.splice(i,0,e)})};reset=()=>{this.toasts=[],this.heights=[],this.#n.forEach(e=>clearTimeout(e)),this.#n.clear()}};function Vp(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var Hp=new Bp;function Up(e,t){return Hp.message(e,t)}var Wp=class{#e=P(()=>Hp.toasts.filter(e=>!e.dismiss));get toasts(){return B(this.#e)}},Gp=Object.assign(Up,{success:Hp.success,info:Hp.info,warning:Hp.warning,error:Hp.error,custom:Hp.custom,message:Hp.message,promise:Hp.promise,dismiss:Hp.dismiss,loading:Hp.loading,getActiveToasts:()=>Hp.toasts.filter(e=>!e.dismiss)}),Kp=e=>{let t=new Set;Object.getOwnPropertyNames(e).forEach(e=>t.add(e));let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)},qp=(e,t)=>{let n={};return t.forEach(t=>{n[t]=e[t]}),n},Jp=console.warn,Yp=()=>{},Xp=(e,t)=>V(()=>{console.warn=Yp;let n=it(t?qp(e,t):e);return console.warn=Jp,n}),Zp=e=>e&&typeof e.then==`function`,Qp=class{config;self;devtools;stateKeys;constructor(e,t){this.config=e,this.self=t,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&(this.stateKeys=Kp(this.config.state),this.devtools=window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:this.config.name??`updatelogic`}),this.devtools.init(this.createStateSnapshot()),this.devtools.subscribe(e=>{e.type===`DISPATCH`&&e.state}))}createStateSnapshot(){return Xp(this.config.state,this.stateKeys)}sendStart(e,t){this.devtools.send({type:`→ ${e}`,args:t},this.createStateSnapshot())}sendError(e,t,n){this.devtools.send({type:`❌ ${e}`,args:t,error:n},this.createStateSnapshot())}sendSuccess(e,t,n){this.devtools.send({type:`✓ ${e}`,args:t,return:n},this.createStateSnapshot())}isIncluded(e){return this.config.excludeInDevTools?!this.config.excludeInDevTools.includes(e):!0}createProxyFunction(e,t){let n=this.devtools&&this.isIncluded(e);return typeof t==`function`?(...r)=>{if(!n)return V(()=>t.call(this.self,...r));let i=Xp(r);this.sendStart(e,i);try{let n=V(()=>t.call(this.self,...r));return Zp(n)?n.then(t=>(this.sendSuccess(e,i,t),t),t=>{throw this.sendError(e,i,t),t}):(this.sendSuccess(e,i,n),n)}catch(t){throw this.sendError(e,i,t),t}}:t}},$p=(e,t)=>{let n={},r=new Qp(e,n);return Object.keys(t).forEach(e=>{if(e===`state`||e===`name`)return;let i=t[e];n[e]=r.createProxyFunction(e,i)}),n},em={de:{aborted:`Verbindung zum Server wurde unerwartet unterbrochen. Bitte versuchen Sie es erneut.`,"client-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"server-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"sse-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,blocked:`Ihre Anfrage wurde blockiert.`,"pii-detected":`Es wurden persönliche Daten erkannt. Bitte entfernen Sie diese und versuchen Sie es erneut.`,"incomplete-error":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"unexpected-call":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"quota-reached":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,"rate-limit":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,maintenance:`Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.`,"too-long":`Ihre Frage war zu lang, versuchen Sie es mit einer Kürzeren.`,"too-short":`Ihre Frage war zu kurz, versuchen Sie es mit einer Längeren.`,"feedback-failed":`Feedback senden fehlgeschlagen. Bitte versuchen Sie es erneut.`,"answer-form-failed":`Formular konnte nicht gesendet werden. Bitte versuchen Sie es erneut.`,"speech-not-supported":`Spracherkennung wird nicht unterstützt.`,"speech-transcription-failed":`Sprachtranskription fehlgeschlagen.`,"speech-no-text-detected":`Kein Text in der Spracheingabe erkannt.`,"speech-microphone-access-denied":`Mikrofonzugriff verweigert.`},en:{aborted:`Connection to the server was unexpectedly interrupted. Please try again.`,"client-error":`An unknown error has occurred. Please try again.`,"server-error":`An unknown error has occurred. Please try again.`,"sse-error":`An unknown error has occurred. Please try again.`,blocked:`Your request has been blocked.`,"pii-detected":`Personal data has been detected. Please remove it and try again.`,"incomplete-error":`An unknown error has occurred. The response might be incomplete.`,"unexpected-call":`An unknown error has occurred. The response might be incomplete.`,"quota-reached":`Quota exceeded. Please try again later.`,"rate-limit":`Quota exceeded. Please try again later.`,maintenance:`The chat is currently unavailable. Please try again later.`,"too-long":`Your question was too long, try a shorter one.`,"too-short":`Your question was too short, try a longer one.`,"feedback-failed":`Failed to send feedback. Please try again.`,"answer-form-failed":`Failed to send the form. Please try again.`,"speech-not-supported":`Speech recognition is not supported.`,"speech-transcription-failed":`Speech transcription failed.`,"speech-no-text-detected":`No text detected in speech input.`,"speech-microphone-access-denied":`Microphone access denied.`},it:{aborted:`La connessione al server è stata interrotta inaspettatamente. Si prega di riprovare.`,"client-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"server-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"sse-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,blocked:`La tua richiesta è stata bloccata.`,"pii-detected":`Sono stati rilevati dati personali. Si prega di rimuoverli e riprovare.`,"incomplete-error":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"unexpected-call":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"quota-reached":`Quota superata. Si prega di riprovare più tardi.`,"rate-limit":`Quota superata. Si prega di riprovare più tardi.`,maintenance:`La chat non è attualmente disponibile. Si prega di riprovare più tardi.`,"too-long":`La tua domanda era troppo lunga, prova con una più breve.`,"too-short":`La tua domanda era troppo breve, prova con una più lunga.`,"feedback-failed":`Invio del feedback non riuscito. Si prega di riprovare.`,"answer-form-failed":`Invio del modulo non riuscito. Si prega di riprovare.`,"speech-not-supported":`Il riconoscimento vocale non è supportato.`,"speech-transcription-failed":`Trascrizione vocale fallita.`,"speech-no-text-detected":`Nessun testo rilevato nell'input vocale.`,"speech-microphone-access-denied":`Accesso al microfono negato.`},fr:{aborted:`La connexion au serveur a été interrompue de façon inattendue. Veuillez réessayer.`,"client-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"server-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"sse-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"pii-detected":`Des données personnelles ont été détectées. Veuillez les supprimer et réessayer.`,blocked:`Votre demande a été bloquée.`,"incomplete-error":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"unexpected-call":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"quota-reached":`Quota dépassé. Veuillez réessayer plus tard.`,"rate-limit":`Quota dépassé. Veuillez réessayer plus tard.`,maintenance:`Le chat est actuellement indisponible. Veuillez réessayer plus tard.`,"too-long":`Votre question était trop longue, essayez d'en poser une plus courte.`,"too-short":`Votre question était trop courte, essayez d'en poser une plus longue.`,"feedback-failed":`Échec de l'envoi du feedback. Veuillez réessayer.`,"answer-form-failed":`Échec de l'envoi du formulaire. Veuillez réessayer.`,"speech-not-supported":`La reconnaissance vocale n'est pas prise en charge.`,"speech-transcription-failed":`Échec de la transcription vocale.`,"speech-no-text-detected":`Aucun texte détecté dans l'entrée vocale.`,"speech-microphone-access-denied":`Accès au microphone refusé.`}},tm={de:{email:`Bitte keine E-Mail Adressen eingeben`,creditCard:`Bitte keine Kreditkarteninformationen eingeben`,ahv:`Bitte keine AHV-Nummern eingeben`,phoneSwiss:`Bitte keine Telefonnummern eingeben`,phoneInternational:`Bitte keine Telefonnummern eingeben`,swissPassport:`Bitte keine Passinformationen eingeben`,longNumber:`Bitte keine langen Nummern eingeben`},en:{email:`Please do not enter email addresses`,creditCard:`Please do not enter credit card information`,ahv:`Please do not enter AHV numbers`,phoneSwiss:`Please do not enter phone numbers`,phoneInternational:`Please do not enter phone numbers`,swissPassport:`Please do not enter passport information`,longNumber:`Please do not enter long numbers`},it:{email:`Si prega di non inserire indirizzi email`,creditCard:`Si prega di non inserire informazioni sulla carta di credito`,ahv:`Si prega di non inserire numeri AVS`,phoneSwiss:`Si prega di non inserire numeri di telefono`,phoneInternational:`Si prega di non inserire numeri di telefono`,swissPassport:`Si prega di non inserire informazioni sul passaporto`,longNumber:`Si prega di non inserire numeri lunghi`},fr:{email:`Veuillez ne pas saisir d'adresses e-mail`,creditCard:`Veuillez ne pas saisir d'informations de carte de crédit`,ahv:`Veuillez ne pas saisir de numéros AVS`,phoneSwiss:`Veuillez ne pas saisir de numéros de téléphone`,phoneInternational:`Veuillez ne pas saisir de numéros de téléphone`,swissPassport:`Veuillez ne pas saisir d'informations de passeport`,longNumber:`Veuillez ne pas saisir de longs numéros`}},Q=new class{#e=F(wn({}));get data(){return B(this.#e)}set data(e){I(this.#e,e,!0)}#t=F(wn({}));get targets(){return B(this.#t)}set targets(e){I(this.#t,e,!0)}#n=F(!1);get initialized(){return B(this.#n)}set initialized(e){I(this.#n,e,!0)}#r=F(0);get currentAudioVolume(){return B(this.#r)}set currentAudioVolume(e){I(this.#r,e,!0)}ariaLiveMessagesClearingTimeoutDuration=350;#i=F(null);get currentAudioRecorder(){return B(this.#i)}set currentAudioRecorder(e){I(this.#i,e,!0)}#a=F(!1);get isTranscribing(){return B(this.#a)}set isTranscribing(e){I(this.#a,e,!0)}#o=P(()=>{if(!this.initialized)return[];let e=this.data.chatConfig.menu;return e?e[this.data.language]??[]:[]});get menu(){return B(this.#o)}set menu(e){I(this.#o,e)}#s=P(()=>this.initialized?this.data.chatConfig.translations[this.data.language]??{}:{});get t(){return B(this.#s)}set t(e){I(this.#s,e)}#c=P(()=>this.initialized?em[this.data.language]??{}:em.en??{});get errorTranslations(){return B(this.#c)}set errorTranslations(e){I(this.#c,e)}#l=P(()=>this.initialized?tm[this.data.language]??{}:tm.en??{});get piiTranslations(){return B(this.#l)}set piiTranslations(e){I(this.#l,e)}#u=P(()=>this.initialized?this.data.currentColorScheme:`light`);get colorScheme(){return B(this.#u)}set colorScheme(e){I(this.#u,e)}#d=P(()=>this.initialized?this.data.chatConfig.fullTheme[this.data.currentColorScheme]:{});get themeBase(){return B(this.#d)}set themeBase(e){I(this.#d,e)}#f=P(()=>this.themeBase.tokens);get theme(){return B(this.#f)}set theme(e){I(this.#f,e)}#p=P(()=>{if(!this.initialized)return[];let e=[];for(let t of this.data.chatConfig.selectorsConfig)t.allowEmpty||(this.data.selectorValues[t.settingName]||[]).length===0&&e.push(t.settingName);return e});get selectorsWithErrors(){return B(this.#p)}set selectorsWithErrors(e){I(this.#p,e)}#m=P(()=>{if(!this.initialized)return{};let e=this.data.chatConfig,t={};for(let n of e.selectorsConfig){let r=lp(e.translations,n.settingName,this.data.language,e.supportedLanguages);r||console.error(`Missing translation for setting ${n.settingName} in all languages`),t[n.settingName]=r??{name:n.settingName,placeholder:``,values:{}}}return t});get selectorTranslations(){return B(this.#m)}set selectorTranslations(e){I(this.#m,e)}#h=P(()=>{if(!this.initialized)return!1;let e=this.data.chatConfig;return this.data.route.name===`chat-page`&&!e.forceChatPage||e.showContextInfo||e.showContextMenu||e.showCloseChatButton||this.data.props.flyout});get hasMainNavigationContent(){return B(this.#h)}set hasMainNavigationContent(e){I(this.#h,e)}#g=P(()=>{if(!this.initialized)return``;let e=this.t,t=this.data.chatConfig,n=this.data.route.name===`chat-page`&&!t.forceChatPage,r=[];return n&&r.push(e.newChat),t.showContextInfo&&r.push(e.ariaMainNavigationInfo),t.showContextMenu&&(this.menu.length>0&&r.push(e.ariaMainNavigationLinks),t.supportedLanguages.length>0&&r.push(e.ariaMainNavigationLanguageSwitch),this.data.has2ColorSchemes&&r.push(e.ariaMainNavigationColorMode)),(t.showCloseChatButton||this.data.props.flyout)&&r.push(e.closeChat),r.length===0?e.ariaMainNavigation:`${e.ariaMainNavigation}: ${r.join(`, `)}`});get ariaMainNavigationRegion(){return B(this.#g)}set ariaMainNavigationRegion(e){I(this.#g,e)}};async function nm(){if(typeof navigator>`u`||!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return!1;try{return(await navigator.mediaDevices.enumerateDevices()).some(e=>e.kind===`audioinput`)}catch(e){return console.error(`Error checking for microphone:`,e),!1}}function rm(){return typeof window>`u`||!window.MediaRecorder?null:MediaRecorder.isTypeSupported(`audio/mp4`)?`audio/mp4`:MediaRecorder.isTypeSupported(`audio/webm`)?`audio/webm`:MediaRecorder.isTypeSupported(`audio/wav`)?`audio/wav`:null}function im(){return typeof window>`u`?!1:!!(window.MediaRecorder&&rm())}function am(){if(typeof window>`u`)return!1;if(`ontouchstart`in window||navigator.maxTouchPoints>0)return!0;let e=navigator.msMaxTouchPoints;return!!(`msMaxTouchPoints`in navigator&&e&&e>0)}function om(){return typeof window>`u`?!1:!!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||am())}var sm=class{mediaRecorder=null;audioChunks=[];started=!1;starting=!1;stream=null;options;audioContext=null;analyser=null;dataArray=null;volumeUpdateInterval=null;constructor(e={}){this.options=e}async start(){if(this.started||this.starting){console.warn(`AudioRecorder: Start already in progress or already started`);return}if(!im()||!navigator.mediaDevices){let e=Error(`MediaRecorder not supported or no microphone access`);throw this.options.onError?.(e),e}try{if(this.starting=!0,this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1}),!this.starting){this.stopStream(this.stream);return}this.mediaRecorder&&this.mediaRecorder.state!==`inactive`&&(console.warn(`AudioRecorder: MediaRecorder already active, stopping previous recording`),this.mediaRecorder.stop(),this.cleanup()),this.started=!0,this.starting=!1;let e=rm();if(!e)throw Error(`No supported media type found`);let t={mimeType:e};this.mediaRecorder=new MediaRecorder(this.stream,t),this.audioChunks=[],this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.audioChunks.push(e.data)},this.mediaRecorder.onstop=async()=>{let t=this.audioChunks.length>0?new Blob(this.audioChunks,{type:e}):null;await this.options.onDataAvailable?.(t),this.options.onStop?.(),this.cleanup()},this.mediaRecorder.onerror=e=>{let t=Error(`MediaRecorder error: ${e}`);this.options.onError?.(t),this.cleanup()},this.mediaRecorder.start(),this.setupVolumeAnalysis(this.stream),this.options.onStart?.()}catch(e){this.started=!1,this.starting=!1;let t=e instanceof Error?e:Error(String(e));throw this.options.onError?.(t),t}}stop(){this.started=!1,this.starting=!1,this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.mediaRecorder&&this.mediaRecorder.state!==`inactive`?this.mediaRecorder.stop():(this.stream&&this.stopStream(this.stream),this.cleanup())}setupVolumeAnalysis(e){if(this.options.onVolumeChange)try{this.audioContext=new AudioContext,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256,this.analyser.smoothingTimeConstant=.8;let t=this.analyser.frequencyBinCount;this.dataArray=new Uint8Array(t),this.audioContext.createMediaStreamSource(e).connect(this.analyser),this.startVolumeMonitoring()}catch(e){console.warn(`Failed to set up volume analysis:`,e)}}startVolumeMonitoring(){!this.analyser||!this.dataArray||!this.options.onVolumeChange||(this.volumeUpdateInterval=window.setInterval(()=>{if(!this.analyser||!this.dataArray||!this.started)return;this.analyser.getByteFrequencyData(this.dataArray);let e=0;for(let t=0;t<this.dataArray.length;t++)e+=this.dataArray[t]*this.dataArray[t];let t=Math.sqrt(e/this.dataArray.length)/255;t=(t*3)**.7;let n=Math.min(100,Math.max(0,Math.round(t*100)));this.options.onVolumeChange?.(n)},100))}get recording(){return this.started&&this.mediaRecorder?.state===`recording`}get isStarting(){return this.starting}stopStream(e){e.getTracks().forEach(e=>e.stop())}cleanup(){this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.audioContext&&=(this.audioContext.close().catch(console.warn),null),this.analyser=null,this.dataArray=null,this.stream&&=(this.stopStream(this.stream),null),this.mediaRecorder=null,this.audioChunks=[],this.started=!1,this.starting=!1}static isSupported(){return im()}static getSupportedMediaType(){return rm()}},cm=e=>(localStorage.setItem(`liipgpt-color-scheme`,e),um([`light`,`dark`])),lm=()=>{let e=localStorage.getItem(`liipgpt-color-scheme`);return e===`light`||e===`dark`?e:`system`},um=e=>{let t=lm();return t===`system`&&(t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),e.includes(t)?t:e[0]??`light`},dm=ks(),fm=(e,t)=>{if(e instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement){t.textContent=e.value;return}if(e instanceof HTMLSelectElement&&t instanceof HTMLSelectElement){Array.from(e.options).forEach((e,n)=>{t.options[n]&&(t.options[n].selected=e.selected)});return}e instanceof HTMLInputElement&&t instanceof HTMLInputElement&&(t.setAttribute(`value`,e.value),(e.type===`checkbox`||e.type===`radio`)&&(e.checked?t.setAttribute(`checked`,`checked`):t.removeAttribute(`checked`)))},pm=e=>{let t=e.cloneNode(!0);if(!(t instanceof Element))return``;let n=`input, textarea, select`,r=e.querySelectorAll(n),i=t.querySelectorAll(n);return r.forEach((e,t)=>{let n=i[t];n&&fm(e,n)}),dm.sanitize(t.outerHTML,{FORBID_TAGS:[`style`,`script`],FORBID_ATTR:[`style`,`class`]})},mm=e=>{if(!e?.length)return[];let t=e.join(`,`),n=document.querySelectorAll(t);return Array.from(n,pm)},hm=`liipgpt:context`,gm=class{contextVersion=0;#e=F();get currentContext(){return B(this.#e)}set currentContext(e){I(this.#e,e,!0)}getFromLocalStorage(){let e=localStorage.getItem(hm);if(e){let t;try{if(t=JSON.parse(e),t.version!==this.contextVersion){localStorage.removeItem(hm);return}else return t.context}catch(e){console.error(`Failed to parse liipgpt:context`,e);return}}}storeToLocalStorage(){localStorage.setItem(`liipgpt:context`,JSON.stringify({version:Q.data.chatConfig.contextVersion,context:this.currentContext}))}constructor(e){this.init=e,this.currentContext=this.getFromLocalStorage()??e.initialValue}getContext(){return it(this.currentContext)}setContextVersion(e){this.contextVersion=e}setContext(e){this.currentContext=e,this.storeToLocalStorage()}resetContext(){this.currentContext=this.init.initialValue,this.storeToLocalStorage()}updateContext(e){this.setContext(e(this.currentContext))}},_m=()=>localStorage.getItem(hm),vm=`liipgpt:selectorValues`,ym=`liipgpt:selectorKnownDefaults`,bm=()=>{try{let e=bf.getItem(vm),t=bf.getItem(ym);return e?{values:JSON.parse(e),knownDefaults:t?JSON.parse(t):{}}:null}catch{return null}},xm=e=>{let t={};for(let n of e)t[n.settingName]=n.defaultValues??(n.allowEmpty?[]:[n.values[0]]).filter(Boolean);return t},Sm=(e,t)=>{try{let n=xm(t);bf.setItem(vm,JSON.stringify(e)),bf.setItem(ym,JSON.stringify(n))}catch(e){console.error(`Failed to save selector values:`,e)}},Cm=e=>{try{let t=bm();if(!t)return;delete t.values[e],delete t.knownDefaults[e],bf.setItem(vm,JSON.stringify(t.values)),bf.setItem(ym,JSON.stringify(t.knownDefaults))}catch(e){console.error(`Failed to clear selector saved state:`,e)}},wm=e=>{let t=bm(),n=e.map(e=>{let n=e.defaultValues??(e.allowEmpty?[]:[e.values[0]]).filter(Boolean);if(!t?.values[e.settingName])return[e.settingName,n];let r=t.values[e.settingName],i=t.knownDefaults[e.settingName]||[],a=r.filter(t=>e.values.includes(t)),o=i.filter(e=>!n.includes(e)),s=a.filter(e=>!o.includes(e)),c=n.filter(e=>!i.includes(e)&&!s.includes(e)),l=[...s,...c];return l.length===0&&!e.allowEmpty?[e.settingName,n]:[e.settingName,l]});return Object.fromEntries(n)},Tm=class extends Error{constructor(e){super(e),this.name=`UnreachableError`}},Em=c(up(),1),Dm=(e,t)=>{if(!e)return;let n=t.find(t=>t.id===e);return n||console.warn(`autofire-predefined-question-id="${e}" did not match any loaded predefined question. Falling back to default routing.`),n},Om=(e,t,n,r,i)=>{if(e&&!t)return{name:`consent-page`};let a=new URLSearchParams(window.location.search),o=a.get(`q`),s=a.get(`id`)??void 0,c=a.get(`sid`)??void 0;return o?{name:`chat-page`,query:o,predefinedQuestionId:s,switchQuestionId:c}:i?{name:`chat-page`,query:i}:r?{name:`chat-page`,query:r.question,predefinedQuestionId:r.id}:n?{name:`chat-page`}:{name:`start-page`}},km=`follow-up-q`,Am=e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e),jm=()=>{let e=new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`cID`)??void 0;return{cID:e&&Am(e)?e:void 0,followUpQuestion:new URLSearchParams(window.location.search).get(km)?.trim()||void 0}},Mm=()=>{let e=new URLSearchParams(window.location.search);if(!e.has(km))return;e.delete(km);let t=e.toString();history.replaceState(null,``,`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`)},Nm=e=>{if(e)try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t;console.warn(`additional-start-parameters must be a JSON object. Received: ${e}`);return}catch(t){console.warn(`Failed to parse additional-start-parameters as JSON: ${e}`,t);return}},Pm=e=>{let t=Nm(e);return t?(e=>Array.isArray(e)?e.map(String):typeof e==`string`?e.split(`,`).map(e=>e.trim()).filter(Boolean):[])(t.scopeAvailableSlugs).length===1:!1},Fm=e=>e?e.map(e=>({id:pf(),...e})):[],Im,$,Lm,Rm=$p({name:`chat-logic`,state:Q,excludeInDevTools:[`onInput`]},{async init(e){$=e;let t=$.speechRecognitionApiKey||void 0;Im=new Lf({apiUrl:$.apiUrl,apiKey:$.apiKey,speechRecognitionApiKey:t,strict:!0,startParameters:Nm($.additionalStartParameters)});try{let e=await Im.getChatConfig();window.CHAT_CONFIG_OVERRIDE&&Object.assign(e,window.CHAT_CONFIG_OVERRIDE);let t=(await Im.getMetadata()).mode===`maintenance`;t&&this.showErrorToast(`maintenance`);let n=tp(e);$.inlineLayout!==void 0&&(n.inlineLayout=$.inlineLayout),$.forceChatPage!==void 0&&(n.forceChatPage=$.forceChatPage);let r;r=$.lang?rp($.lang,n.supportedLanguages):op(n.supportedLanguages),ap(r,Q.targets.mainElement);let i=await this.getPredefinedQuestions(r),a=n.translations[r]?.ariaOpensInNewTab;a&&Im.setNewTabSrText(a);let o=[];if(n.renderKatex){let e=await import(`https://esm.sh/marked-katex-extension@5.1.5`).catch(e=>{console.error(`Couldn't load marked-katex-extension:`,e)});e&&(Im.setMarkedExtensions(e.default({nonStandard:!0,output:`mathml`})),o.push(`https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css`))}let s=Object.keys(n.fullTheme),c=!1;if(n.forceConsent)try{c=bf.getItem(`liipgpt:termsAccepted`)===`true`}catch(e){console.warn(`Failed to load terms acceptance from storage:`,e)}let l=Dm($.autofirePredefinedQuestionId,i);Q.data={currentConversationState:`idle`,chatConfig:n,language:r,predefinedQuestions:i,isInMaintenance:t,history:Fm(n.messageAdditions.init),selectedColorScheme:lm(),has2ColorSchemes:s.length===2,currentColorScheme:um(s),conversationFeedbackId:void 0,conversationFeedbackIsOpen:!1,answerFormMessageId:void 0,openedPopup:void 0,props:$,flyoutIsOpen:!1,questionHasPii:void 0,chatInputValue:``,selectorValues:wm(n.selectorsConfig),selectorsIsOpen:!1,predefinedQuestionId:void 0,switchQuestionId:void 0,currentReferencesAsideId:void 0,ariaLiveStatusMessage:void 0,ariaLiveStatusMessageClearingTimeout:void 0,wasReferencesAsideClosed:!1,isAsideMobile:!0,route:Om(n.forceConsent??!1,c,n.forceChatPage??!1,l,$.question),additionalStylesheets:o,hasOpenedOverlays:!1,isInlineLayoutContained:!1,termsAccepted:c,selectedTopic:void 0},window.LIIPGPT_LISTENERS?.route?.(Q.data.route),window.LIIPGPT_LISTENERS?.conversation?.(Q.data.currentConversationState),Q.data.selectorsIsOpen=Q.data.chatConfig.showExpandedSelectors??!1,Q.initialized=!0,this.checkForOpenedPopup(),window.addEventListener(`hashchange`,()=>{this.checkForOpenedPopup()}),await this.startFromHandoverOrRoute(()=>this.goto(Om(n.forceConsent??!1,c,n.forceChatPage??!1,l,$.question),!0))}catch(e){throw Gp.error(e instanceof Error?e.message:`Failed to load the chatbot. Please reload the page.`,{duration:1e4,unstyled:!0,classes:{toast:`toast`}}),e}},setTarget(e,t){Q.targets[e]=t},goto(e,t=!1){if(!(!t&&(0,Em.default)(Q.data.route,e)))switch(Q.data.route=e,window.LIIPGPT_LISTENERS?.route?.(e),e.name){case`consent-page`:break;case`start-page`:e.prefill&&(Q.data.chatInputValue=e.prefill);break;case`chat-page`:if(Q.data.chatInputValue=e.query??``,Q.data.predefinedQuestionId=e.predefinedQuestionId,Q.data.switchQuestionId=e.switchQuestionId,e.query&&(this.onSubmit(),Q.data.chatConfig.addQueryToUrlParams)){let t=new URLSearchParams(window.location.search);t.set(`q`,e.query),e.predefinedQuestionId?t.set(`id`,e.predefinedQuestionId):t.delete(`id`),e.switchQuestionId?t.set(`sid`,e.switchQuestionId):t.delete(`sid`),history.pushState(null,``,`?${t.toString()}${window.location.hash}`)}break}},getSelectorConfig(e){let t=Q.data.chatConfig.selectorsConfig.find(t=>t.settingName===e);if(!t)throw Error(`Setting ${e} not found`);return t},getPrettifiedSelectorValues(){let e=Object.entries(Q.data.selectorValues).map(([e,t])=>{let n;try{n=this.getSelectorConfig(e)}catch(t){console.error(`Error getting selector config for ${e}: ${t}`);return}return n.type===`single-select`?[e,t[0]]:[e,t]}).filter(e=>!!e);return Object.fromEntries(e)},setSelectorValue(e,t){let n=this.getSelectorConfig(e);if(!n){console.warn(`Trying to set setting ${e} but it is not defined in the chat config`);return}if(n.type===`single-select`&&t.length>1){console.warn(`Trying to set multiple values for single-select setting ${e}`);return}Q.data.selectorValues[e]=t,Sm(Q.data.selectorValues,Q.data.chatConfig.selectorsConfig)},resetSelectorToDefaults(e){let t=this.getSelectorConfig(e);if(!t){console.warn(`Trying to reset setting ${e} but it is not defined in the chat config`);return}let n=t.defaultValues??(t.allowEmpty?[]:[t.values[0]]).filter(Boolean);return Cm(e),Q.data.selectorValues[e]=n,Sm(Q.data.selectorValues,Q.data.chatConfig.selectorsConfig),n},async getPredefinedQuestions(e){if($?.hidePredefinedQuestions)return[];try{return Im.getPredefinedQuestions({url:window.location.origin+window.location.pathname,language:e})}catch(e){return console.warn(`Failed to load predefined questions:`,e),[]}},setColorScheme(e){Q.data.selectedColorScheme=e,Q.data.currentColorScheme=cm(e),this.setAriaLiveStatusMessage(e===`dark`?Q.t.ariaDarkSelected:Q.t.ariaLightSelected)},async abort(){await Lm?.abort()},changeConversationState(e){Q.data.currentConversationState=e,window.LIIPGPT_LISTENERS?.conversation?.(e)},onInput(e){Q.data.chatConfig.blockPII&&(Q.data.questionHasPii=dl(e)),Q.data.chatInputValue=e,Q.data.predefinedQuestionId=void 0,Q.data.switchQuestionId=void 0},onSubmit(e=!1,t,n=!1){let r=mm(Q.data.chatConfig.parentPageContext?.extractSelectors);if(Q.data.questionHasPii){console.warn(`Question contains PII, not submitting:`,Q.data.questionHasPii);return}let i=Q.data.chatConfig.questionPrefix?`${Q.data.chatConfig.questionPrefix} ${Q.data.chatInputValue}`:Q.data.chatInputValue;n||(Q.data.history.push(...Fm(Q.data.chatConfig.messageAdditions.user.before)),Q.data.history.push({type:`user`,time:new Date().toISOString(),message:Q.data.chatInputValue}),Q.data.history.push(...Fm(Q.data.chatConfig.messageAdditions.user.after)));let a=Q.data.history.push(...Fm(Q.data.chatConfig.messageAdditions.bot.before));Q.data.history.push({id:`UNRESOLVED`,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]}});let o=!1,s=!1,c={features:$.features?$.features.trim().split(`,`):[`formatting`],mode:$.mode||void 0,cache:$.cache||void 0,onError:(e,t)=>{this.showErrorToast(e,t),window.LIIPGPT_LISTENERS?.error?.(e,t),(e===`pii-detected`||e===`blocked`)&&this.editLatestQuestion()},onMessage:e=>{e.type===`topic-selected`&&(Q.data.selectedTopic={label:e.label,placeholder:e.placeholder,locked:Pm($.additionalStartParameters)}),e.type===`state`&&e.state!==`history-entry-initialized`&&!s&&(s=!0,this.setAriaLiveStatusMessage(Q.t.ariaQuestionSent))},lang:Q.data.language,selectorValues:{...this.getPrettifiedSelectorValues(),context:_m(),...t},predefinedQuestionId:Q.data.predefinedQuestionId,switchQuestionId:Q.data.switchQuestionId,onEmbed:e=>{let t=Q.data.history[a];t&&t.type===`bot`&&!t.message.markdown?(Q.data.history[a]={...e,id:t.id??pf()},o=!0):Q.data.history.push({...e,id:pf()})}};Q.data.predefinedQuestionId=void 0,Q.data.switchQuestionId=void 0,r.length&&(c.selectorValues.parentPageContextHtml=r),c.referrer=Vf(Q.data.chatConfig.sendReferrer,{embedded:!!Q.data.props.flyout}),Q.data.props.source?c.source=Q.data.props.source:Q.data.props.flyout&&(c.source=`flyout`),Q.data.currentConversationId||(Q.data.currentConversationId=Im.createConversationId());let l=Im.chat(Q.data.currentConversationId,i,c);Lm=l,Q.data.lastChatResponseId=l.id,Q.data.currentConversationState!==`searching`&&this.changeConversationState(`searching`);let u=!1,d,f=!!Q.data.currentReferencesAsideId;(e&&f||!e&&Q.data.chatConfig.showReferencesByDefault)&&(Q.data.isAsideMobile||this.openReferencesAside(l.id)),l.subscribe(e=>{if(!o&&Q.data.history[a]&&(Q.data.history[a]={question:Q.data.chatInputValue,...e}),Q.data.chatConfig.addRetrievalQuestionToUrlParams&&e.retrievalQuestion){let t=new URLSearchParams(window.location.search);t.get(`search`)!==e.retrievalQuestion&&(t.set(`search`,e.retrievalQuestion),history.replaceState(null,``,`?${t.toString()}${window.location.hash}`))}Q.data.chatConfig.showReferencesByDefault&&!Q.data.wasReferencesAsideClosed&&Q.data.currentReferencesAsideId!==e.id&&!Q.data.isAsideMobile&&this.openReferencesAside(e.id),e.state===`streaming`&&Q.data.currentConversationState!==`answering`&&this.changeConversationState(`answering`),e.state===`done`&&(this.changeConversationState(`idle`),u||(u=!0,this.setAriaLiveStatusMessage(`${Q.t.ariaAnswerReady} ... ${e.message.text} ... ${Q.data.selectedTopic?Q.t.ariaAnswerFinishedWithSelectedTopic:Q.t.ariaAnswerFinished}`),Q.data.history.push(...Fm(Q.data.chatConfig.messageAdditions.bot.after))),Q.data.currentReferencesAsideId&&e.references.used.length>0?(clearTimeout(d),d=setTimeout(()=>{this.openReferencesAside(e.id)},100)):this.closeReferencesAside())}),Q.data.chatInputValue=``},async onStartSpeechRecognition(){try{if(!await nm()){this.showErrorToast(`speech-not-supported`);return}if(await navigator.mediaDevices.getUserMedia({audio:!0}),sm.isSupported())Q.data.chatInputValue=``,Q.currentAudioRecorder=new sm({onDataAvailable:async e=>{Q.isTranscribing=!0,await this.handleTranscription(e)},onError:()=>{this.showErrorToast(`speech-microphone-access-denied`),Q.currentAudioRecorder=null,Q.isTranscribing=!1},onVolumeChange:e=>{Q.currentAudioVolume=e}}),Q.currentAudioRecorder.start();else{this.showErrorToast(`speech-not-supported`);return}}catch(e){throw this.showErrorToast(`speech-microphone-access-denied`),Q.currentAudioRecorder=null,Q.isTranscribing=!1,e}},editLatestQuestion(){let e=Q.data.history.findLastIndex(e=>e?.type===`user`);if(e===-1){console.error(`No last user question, available`);return}let t=Q.data.history.splice(e)[0];Q.data.chatInputValue=t.message},onStopSpeechRecognition(){if(Q.currentAudioRecorder){let e=Q.currentAudioRecorder;Q.currentAudioRecorder=null,e.stop()}Q.currentAudioVolume=0},async handleTranscription(e){if(!e){console.warn(`No audio data received`);return}try{let t=await Im.transcribeAudio(e,{lang:Q.data.language});if(t.error){this.showErrorToast(`speech-transcription-failed`);return}if(t.transcript.trim()){if(Q.data.chatConfig.blockPII&&(Q.data.questionHasPii=dl(t.transcript.trim()),Q.data.questionHasPii))return;Q.data.chatInputValue=t.transcript.trim()}else this.showErrorToast(`speech-no-text-detected`)}catch(e){console.error(`Speech transcription error:`,e),this.showErrorToast(`speech-transcription-failed`)}finally{Q.currentAudioRecorder=null,Q.isTranscribing=!1,Q.currentAudioVolume=0}},async startFromHandoverOrRoute(e){let{cID:t,followUpQuestion:n}=jm();if(!t){e();return}let r=await this.rehydrateFromSearchSummaryHandover(t);n?(Q.data.route={name:`chat-page`},Q.data.chatInputValue=n,this.onSubmit(!0)):r||e(),Mm()},async rehydrateFromSearchSummaryHandover(e){Q.data.currentConversationId=e;let t=await Im.getMetadata(),n=t.mode===`ready`?t.userId:void 0,r=n?await Im.getChatHistory(e,n):[];if(r.length===0)return Q.data.currentConversationId=void 0,!1;let i={all:[],used:[],unused:[]},a=new nl({newTabSrText:Q.t.ariaOpensInNewTab}),o=[];for(let{question:e,answer:t}of r)o.push({type:`user`,time:new Date().toISOString(),message:e,id:pf()}),o.push({id:pf(),state:`done`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:t,html:a.toHTML(t,i),text:t},references:{all:[],used:[],unused:[]}});return Q.data.history=[...Fm(Q.data.chatConfig.messageAdditions.init),...o],Q.data.route={name:`chat-page`},!0},async onStartConversation(e,t,n){await this.abort(),Q.data.history=Fm(Q.data.chatConfig.messageAdditions.init),Q.data.currentConversationId=Im.createConversationId(),this.goto({name:`chat-page`,query:e,predefinedQuestionId:t,switchQuestionId:n})},async onNewConversation(){await this.abort();let e=Q.data.currentConversationId;if(Q.data.currentConversationId=void 0,Q.data.currentReferencesAsideId=void 0,Q.data.history=Fm(Q.data.chatConfig.messageAdditions.init),Q.data.predefinedQuestionId=void 0,Q.data.switchQuestionId=void 0,Q.data.selectedTopic=void 0,Q.data.chatConfig.addQueryToUrlParams){let e=new URLSearchParams(window.location.search);e.delete(`q`),e.delete(`id`),e.delete(`sid`),history.pushState(null,``,`?${e.toString()}${window.location.hash}`)}this.goto({name:`start-page`}),e&&Im.userAction(`newDiscussion`,{conversationId:e,lang:Q.data.language}).catch(e=>{console.error(`Failed to notify backend of new discussion:`,e)})},async onChangeTopic(){let e=Q.data.chatConfig.selectedTopicResetPredefinedQuestionId;if(!e){console.warn("No selectedTopicResetPredefinedQuestionId available to reset the selected topic. Set it in the `Config DB` in the backend, in a `generalConfig` default set.");return}await this.abort(),Q.data.selectedTopic=void 0,Q.data.predefinedQuestionId=e,Q.data.switchQuestionId=void 0,Q.data.chatInputValue=``,this.onSubmit(!0,void 0,!0)},showSuccessToast(e){Gp.success(Q.t[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},showErrorToast(e,t){let n=t?.trim()?t:Q.errorTranslations[e];Gp.error(n,{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},async submitFeedback(e){try{let t=Q.data.conversationFeedbackId||Q.data.lastChatResponseId;if(!t)throw new Tm(`Tried to give feedback with no id.`);let n=Q.data.history.find(e=>e.type===`bot`&&e.id===t);await Im.feedback(t,n?.question??``,e),setTimeout(()=>{this.showSuccessToast(`thankYouForFeedback`)},500)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},toggleReferencesAside(e){Q.data.currentReferencesAsideId===e?this.closeReferencesAside():this.openReferencesAside(e)},openReferencesAside(e){Q.data.chatConfig.referencesLayout!==`inline`&&(Q.data.currentReferencesAsideId=e,this.setOpenOverlay(!0))},closeReferencesAside(){Q.data.currentReferencesAsideId=void 0,Q.data.wasReferencesAsideClosed=!0,this.setOpenOverlay(!1)},setAsideMobile(e){Q.data.isAsideMobile=e},openFlyout(){Q.data.flyoutIsOpen=!0},closeFlyout(){Q.data.flyoutIsOpen=!1},openConversationFeedback(){Q.data.conversationFeedbackIsOpen=!0,this.setOpenOverlay(!0)},openMessageFeedback(e){Q.data.conversationFeedbackId=e},closeFeedback(){Q.data.conversationFeedbackIsOpen=!1,Q.data.conversationFeedbackId=void 0,this.setOpenOverlay(!1)},openAnswerForm(e){Q.data.answerFormMessageId=e,this.setOpenOverlay(!0)},closeAnswerForm(){Q.data.answerFormMessageId=void 0,this.setOpenOverlay(!1)},async submitAnswerForm(e){try{let t=Q.data.chatConfig.answerForm,n=Q.data.answerFormMessageId;if(!t)throw new Tm(`Tried to submit the answer form with no answerForm config.`);if(!n)throw new Tm(`Tried to submit the answer form with no message id.`);let r=Q.data.history.findIndex(e=>e.type===`bot`&&e.id===n),i=r===-1?void 0:Q.data.history[r],a=Q.data.history.slice(0,r===-1?void 0:r).findLast(e=>e.type===`user`)?.message,o=i?.question||a||(i?.type===`bot`?i.retrievalQuestion??``:``);await Im.submitAnswerForm({receiverEmail:t.receiverEmail,fields:t.fields.map(t=>({name:t.name,value:e[t.name]??``})),question:o,answer:i?.type===`bot`?i.message.text:``,requestId:n,lang:Q.data.language}),setTimeout(()=>{this.showSuccessToast(`answerFormThankYou`)},500)}catch(e){console.error(`Answer form submission failed:`,e),this.showErrorToast(`answer-form-failed`)}},setOpenOverlay(e){Q.data.hasOpenedOverlays=e},setAriaLiveStatusMessage(e){Q.data.ariaLiveStatusMessage=e,clearTimeout(Q.data.ariaLiveStatusMessageClearingTimeout),Q.data.ariaLiveStatusMessageClearingTimeout=setTimeout(()=>{Q.data.ariaLiveStatusMessage=``},Q.ariaLiveMessagesClearingTimeoutDuration)},closePopup(){window.location.hash=``},checkForOpenedPopup(){let e=window.location.hash.slice(1),t=Q.t.popups?.find(t=>t.hash===e);t?Q.data.openedPopup=t:Q.data.openedPopup=void 0},async thumbs(e,t){try{let n=Q.data.history.find(t=>t.type===`bot`&&t.id===e),r=n?.type===`bot`?n:void 0;if(r?.feedback===t)return;t===`up`?await Im.thumbsUp(e,n?.question??``):await Im.thumbsDown(e,n?.question??``);let i=!r?.feedback;r&&(r.feedback=t),i&&this.showSuccessToast(`thankYouForFeedback`)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},async onLanguageChange(e){if(Q.data.language=rp(e,Q.data.chatConfig.supportedLanguages),ap(Q.data.language,Q.targets.mainElement),Q.data.predefinedQuestions=await this.getPredefinedQuestions(Q.data.language),this.setAriaLiveStatusMessage(Q.t.ariaLanguageChanged),Q.data.chatConfig.reflectLanguageInPath){let e=new URL(window.location.href);e.pathname=`/${Q.data.language}`,window.history.replaceState({},``,e.toString())}},async acceptTerms(){Q.data.termsAccepted=!0;try{bf.setItem(`liipgpt:termsAccepted`,`true`)}catch(e){console.warn(`Failed to save terms acceptance to storage:`,e)}this.closePopup(),await Gr(),this.goto(Om(Q.data.chatConfig.forceConsent??!1,!0,Q.data.chatConfig.forceChatPage??!1,Dm(Q.data.props.autofirePredefinedQuestionId,Q.data.predefinedQuestions),Q.data.props.question))},updateChatInput(e){Q.data.chatInputValue=e}});function zm(e,{delay:t=0,duration:n=500,resetTop:r=!0}){let i=+getComputedStyle(e).opacity;return e.style.position=`absolute`,r&&(e.style.top=`0px`),{delay:t,duration:n,css:e=>`opacity: ${e*i};`}}function Bm(e){return e<.5?8*e**4:-8*(e-1)**4+1}function Vm(e){return e**4}function Hm(e){return(e-1)**3*(1-e)+1}function Um(e){return--e*e*e*e*e+1}function Wm(e,t){dt(t,!0);let n=bo(t,`href`,7),r=bo(t,`target`,7),i=bo(t,`onclick`,7),a=bo(t,`className`,23,()=>[]),o=bo(t,`isStandalone`,7,!1),s=bo(t,`children`,7),c=bo(t,`type`,7,`button`),l=bo(t,`use`,7),u=bo(t,`class`,7),d=_o(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`href`,`target`,`onclick`,`className`,`isStandalone`,`children`,`type`,`use`,`class`]),f=P(()=>n()?`a`:`button`),p=P(()=>[...Array.isArray(a())?a():a()?[a()]:[],...u()?[u()]:[]]),m=()=>({}),h=P(()=>l()??m);var g={get href(){return n()},set href(e){n(e),Ht()},get target(){return r()},set target(e){r(e),Ht()},get onclick(){return i()},set onclick(e){i(e),Ht()},get className(){return a()},set className(e=[]){a(e),Ht()},get isStandalone(){return o()},set isStandalone(e=!1){o(e),Ht()},get children(){return s()},set children(e){s(e),Ht()},get type(){return c()},set type(e=`button`){c(e),Ht()},get use(){return l()},set use(e){l(e),Ht()},get class(){return u()},set class(e){u(e),Ht()}},_=mi();return va(Fn(_),()=>B(f),!1,(e,t)=>{xa(e,e=>B(h)?.(e)),$a(e,()=>({...d,onclick:n()?void 0:i(),type:n()?void 0:c(),href:n(),role:n()?`link`:`button`,target:n()?r():void 0,class:B(p),[Ra]:{"open-button--standalone":o()}}));var a=mi();Li(Fn(a),s),hi(t,a)}),hi(e,_),ft(g)}Eo(Wm,{href:{},target:{},onclick:{},className:{},isStandalone:{},children:{},type:{},use:{},class:{}},[],[],{mode:`open`});export{wa as $,it as $t,Mf as A,B as At,ao as B,Pn as Bt,dp as C,fi as Ct,tp as D,ni as Dt,sp as E,ri as Et,_o as F,or as Ft,qa as G,F as Gt,Ra as H,In as Ht,yo as I,Qn as It,Ja as J,$t as Jt,Za as K,cn as Kt,mo as L,er as Lt,sl as M,V as Mt,Eo as N,rr as Nt,qf as O,ti as Ot,bo as P,tr as Pt,Ta as Q,dt as Qt,po as R,Hn as Rt,hp as S,ui as St,rp as T,pi as Tt,za as U,wn as Ut,ro as V,Fn as Vt,$a as W,I as Wt,Na as X,ut as Xt,Ia as Y,Ht as Yt,ja as Z,ft as Zt,jp as _,Ai as _t,Um as a,sa as at,xp as b,hi as bt,gm as c,$i as ct,om as d,Ki as dt,nt as en,xa as et,Q as f,Gi as ft,Lp as g,Li as gt,Hp as h,Ri as ht,Hm as i,ae as in,ga as it,pf as j,Gr as jt,Nf as k,ei as kt,um as l,Yi as lt,Gp as m,zi as mt,Vm as n,Je as nn,ya as nt,zm as o,oa as ot,Wp as p,Vi as pt,Ya as q,P as qt,Bm as r,Ke as rn,va as rt,Rm as s,aa as st,Wm as t,Ye as tn,ba as tt,sm as u,Ji as ut,Ap as v,ki as vt,op as w,gi as wt,yp as x,mi as xt,Tp as y,Fi as yt,uo as z,Dn as zt};