@liip/liipgpt 3.4.4 → 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/liipgpt-button.iife.js +1 -1
- package/chat/liipgpt-chat.iife.js +15 -15
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/{az2UTMiX.js → BCYB8ETl.js} +1 -1
- package/configurator/_app/immutable/chunks/{B5LAyE-f.js → CMr4CaU4.js} +1 -1
- package/configurator/_app/immutable/chunks/CNNc8pdr.js +1 -0
- package/configurator/_app/immutable/chunks/{DJ-KAQCp.js → CaNlJ-gi.js} +2 -2
- package/configurator/_app/immutable/chunks/{DC7iQzPK.js → D-CSS1ZF.js} +4 -4
- package/configurator/_app/immutable/chunks/{DevUxHro.js → Do1NLQ8K.js} +1 -1
- package/configurator/_app/immutable/chunks/{DpTUJVdo.js → Dv7UbMQf.js} +1 -1
- package/configurator/_app/immutable/chunks/eaVQ1UKh.js +1 -0
- package/configurator/_app/immutable/chunks/{BUm3woLX.js → g5xYDQa8.js} +1 -1
- package/configurator/_app/immutable/chunks/ro_1FMg0.js +1 -0
- package/configurator/_app/immutable/entry/{app.Bl6ijR0o.js → app.DR1Gl7kO.js} +2 -2
- package/configurator/_app/immutable/entry/start.k5uBenaj.js +1 -0
- package/configurator/_app/immutable/nodes/{0.DQUsz_zn.js → 0.B6QVHUQr.js} +2 -2
- package/configurator/_app/immutable/nodes/{1.DRz2V13W.js → 1.CkBIbH6d.js} +1 -1
- package/configurator/_app/immutable/nodes/{2.DJcyAYWL.js → 2.BMH0adMF.js} +3 -3
- package/configurator/_app/immutable/nodes/{3.B_llVVii.js → 3.Cz2hj9Il.js} +1 -1
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +6 -6
- package/configurator/sidebar.html +6 -6
- package/package.json +1 -1
- package/configurator/_app/immutable/chunks/B3eztMjm.js +0 -1
- package/configurator/_app/immutable/chunks/D7iAOzgH.js +0 -1
- package/configurator/_app/immutable/chunks/DopJiv6A.js +0 -1
- package/configurator/_app/immutable/entry/start.ByoY54BX.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var LiipGPTChat=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var u={},d=Symbol(),f=`http://www.w3.org/1999/xhtml`,p=`http://www.w3.org/2000/svg`,m=`http://www.w3.org/1998/Math/MathML`,h=`@attach`,g=Array.isArray,_=Array.prototype.indexOf,v=Array.prototype.includes,y=Array.from,b=Object.keys,x=Object.defineProperty,S=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyDescriptors,te=Object.prototype,ne=Array.prototype,re=Object.getPrototypeOf,ie=Object.isExtensible;function ae(e){return typeof e==`function`}var C=()=>{};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,me=8192,he=16384,ge=32768,_e=1<<25,ve=65536,ye=1<<18,be=1<<19,xe=1<<20,Se=1<<25,Ce=65536,we=1<<21,Te=1<<22,Ee=1<<23,De=Symbol(`$state`),Oe=Symbol(`legacy props`),ke=Symbol(``),Ae=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},je=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function Me(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ne(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Pe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ie(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Le(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Re(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ze(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Be(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ve(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function He(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ge(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Ke(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function qe(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Je(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var w=!1;function Ye(e){w=e}var Xe;function Ze(e){if(e===null)throw Ke(),u;return Xe=e}function Qe(){return Ze(zn(Xe))}function T(e){if(w){if(zn(Xe)!==null)throw Ke(),u;Xe=e}}function $e(e=1){if(w){for(var t=e,n=Xe;t--;)n=zn(n);Xe=n}}function et(e=!0){for(var t=0,n=Xe;;){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=zn(n);e&&n.remove(),n=i}}function tt(e){if(!e||e.nodeType!==8)throw Ke(),u;return e.data}function nt(e){return e===this.v}function rt(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function it(e){return!rt(e,this.v)}var at=!1,ot=!1;function st(){ot=!0}var ct=[];function lt(e,t=!1,n=!1){return ut(e,new Map,``,ct,null,n)}function ut(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(g(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]=ut(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]=ut(e[u],t,n,r,null,a);return s}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON==`function`&&!a)return ut(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var dt=null;function ft(e){dt=e}function pt(e){return vt(`getContext`).get(e)}function mt(e,t){let n=vt(`setContext`);if(at){var r=Ar.f;!Dr&&r&32&&!dt.i||Ve()}return n.set(e,t),t}function ht(e){return vt(`hasContext`).has(e)}function gt(){return vt(`getAllContexts`)}function E(e,t=!1,n){dt={p:dt,i:!1,c:null,e:null,s:e,x:null,r:Ar,l:ot&&!t?{s:null,u:null,$:[]}:null}}function D(e){var t=dt,n=t.e;if(n!==null){t.e=null;for(var r of n)nr(r)}return e!==void 0&&(t.x=e),t.i=!0,dt=t.p,e??{}}function _t(){return!ot||dt!==null&&dt.l===null}function vt(e){return dt===null&&Me(e),dt.c??=new Map(yt(dt)||void 0)}function yt(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var bt=[];function xt(){var e=bt;bt=[],ce(e)}function St(e){if(bt.length===0&&!Vt){var t=bt;queueMicrotask(()=>{t===bt&&xt()})}bt.push(e)}function Ct(){for(;bt.length>0;)xt()}function wt(e){var t=Ar;if(t===null)return Dr.f|=Ee,e;if(!(t.f&32768)&&!(t.f&4))throw e;Tt(e,t)}function Tt(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 Et=~(fe|pe|de);function Dt(e,t){e.f=e.f&Et|t}function Ot(e){e.f&512||e.deps===null?Dt(e,de):Dt(e,pe)}function kt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=Ce,kt(t.deps))}function At(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),kt(e.deps),Dt(e,de)}var jt=[];function Mt(e,t=C){let n=null,r=new Set;function i(t){if(rt(e,t)&&(e=t,n)){let t=!jt.length;for(let t of r)t[1](),jt.push(t,e);if(t){for(let e=0;e<jt.length;e+=2)jt[e][0](jt[e+1]);jt.length=0}}}function a(t){i(t(e))}function o(o,s=C){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||C),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var Nt=!1,Pt=!1;function Ft(e){var t=Pt;try{return Pt=!1,[e(),Pt]}finally{Pt=t}}var It=new Set,Lt=null,Rt=null,zt=null,Bt=null,Vt=!1,Ht=!1,Ut=null,Wt=null,Gt=0,Kt=1,qt=class e{id=Kt++;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)Dt(n,fe),this.schedule(n);for(n of t.m)Dt(n,pe),this.schedule(n)}}#d(){if(Gt++>1e3&&(It.delete(this),Jt()),!this.#u()){for(let e of this.#o)this.#s.delete(e),Dt(e,fe),this.schedule(e);for(let e of this.#s)Dt(e,pe),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=Ut=[],r=[],i=Wt=[];for(let e of t)try{this.#f(e,n,r)}catch(t){throw tn(e),t}if(Lt=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ut=null,Wt=null,this.#u()){this.#p(r),this.#p(n);for(let[e,t]of this.#c)en(e,t)}else{this.#n===0&&It.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Rt=this,Xt(r),Xt(n),Rt=null,this.#i?.resolve()}var o=Lt;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(It.add(o),o.#d()),It.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):at&&i&16777224?n.push(r):Ur(r)&&(i&16&&this.#s.add(r),Jr(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)At(e[t],this.#o,this.#s)}capture(e,t){t!==d&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,e.v),zt?.set(e,e.v))}activate(){Lt=this}deactivate(){Lt=null,zt=null}flush(){try{Ht=!0,Lt=this,this.#d()}finally{Gt=0,Bt=null,Ut=null,Wt=null,Ht=!1,Lt=null,zt=null,xn.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),It.delete(this)}#m(){for(let s of It){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)Zt(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,St(()=>{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(Lt===null){let t=Lt=new e;Ht||(It.add(Lt),Vt||St(()=>{Lt===t&&t.flush()}))}return Lt}apply(){if(!at||!this.is_fork&&It.size===1){zt=null;return}zt=new Map(this.current);for(let e of It)if(!(e===this||e.is_fork))for(let[t,n]of e.previous)zt.has(t)||zt.set(t,n)}schedule(e){if(Bt=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(Ut!==null&&t===Ar&&(at||(Dr===null||!(Dr.f&2))&&!Nt))return;if(n&96){if(!(n&1024))return;t.f^=de}}this.#a.push(t)}};function O(e){var t=Vt;Vt=!0;try{var n;for(e&&(Lt!==null&&!Lt.is_fork&&Lt.flush(),n=e());;){if(Ct(),Lt===null)return n;Lt.flush()}}finally{Vt=t}}function Jt(){try{Re()}catch(e){Tt(e,Bt)}}var Yt=null;function Xt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ur(r)&&(Yt=new Set,Jr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&_r(r),Yt?.size>0)){xn.clear();for(let e of Yt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Yt.has(n)&&(Yt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Jr(n)}}Yt.clear()}}Yt=null}}function Zt(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?Zt(i,t,n,r):e&4194320&&!(e&2048)&&Qt(i,t,r)&&(Dt(i,fe),$t(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(v.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 $t(e){Lt.schedule(e)}function en(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Dt(e,de);for(var n=e.first;n!==null;)en(n,t),n=n.next}}function tn(e){Dt(e,de);for(var t=e.first;t!==null;)tn(t),t=t.next}function nn(e){let t=0,n=Cn(0),r;return()=>{$n()&&(I(n),cr(()=>(t===0&&(r=Qr(()=>e(()=>Dn(n)))),t+=1,()=>{St(()=>{--t,t===0&&(r?.(),r=void 0,Dn(n))})})))}}var rn=ve|be;function an(e,t,n,r){new on(e,t,n,r)}var on=class{parent;is_pending=!1;transform_error;#e;#t=w?Xe: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=nn(()=>(this.#m=Cn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=Ar;t.b=this,t.f|=128,n(e)},this.parent=Ar.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=lr(()=>{if(w){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()},rn),w&&(this.#e=Xe)}#g(){try{this.#a=dr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=dr(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=dr(()=>e(this.#e)),St(()=>{var e=this.#c=document.createDocumentFragment(),t=Ln();e.append(t),this.#a=this.#x(()=>dr(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,vr(this.#o,()=>{this.#o=null}),this.#b(Lt))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=dr(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Sr(this.#a,e);let t=this.#n.pending;this.#o=dr(()=>t(this.#e))}else this.#b(Lt)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){At(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=Ar,n=Dr,r=dt;jr(this.#i),kr(this.#i),ft(this.#i.ctx);try{return qt.ensure(),e()}catch(e){return wt(e),null}finally{jr(t),kr(n),ft(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&&vr(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,St(()=>{this.#d=!1,this.#m&&Tn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),I(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(hr(this.#a),null),this.#o&&=(hr(this.#o),null),this.#s&&=(hr(this.#s),null),w&&(Ze(this.#t),$e(),Ze(et()));var r=!1,i=!1;let a=()=>{if(r){Je();return}r=!0,i&&Ge(),this.#s!==null&&vr(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Tt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return dr(()=>{var t=Ar;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Tt(e,this.#i.parent),null}}))};St(()=>{var t;try{t=this.transform_error(e)}catch(e){Tt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Tt(e,this.#i&&this.#i.parent)):o(t)})}};function sn(e,t,n,r){let i=_t()?dn:pn;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=Ar,s=cn(),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||Tt(e,o)}ln()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=un();function d(){Promise.all(n.map(e=>fn(e))).then(e=>l([...t.map(i),...e])).catch(e=>Tt(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),ln()}):d()}function cn(){var e=Ar,t=Dr,n=dt,r=Lt;return function(i=!0){jr(e),kr(t),ft(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ln(e=!0){jr(null),kr(null),ft(null),e&&Lt?.deactivate()}function un(){var e=Ar.b,t=Lt,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 dn(e){var t=2|fe,n=Dr!==null&&Dr.f&2?Dr:null;return Ar!==null&&(Ar.f|=be),{ctx:dt,deps:null,effects:null,equals:nt,f:t,fn:e,reactions:null,rv:0,v:d,wv:0,parent:n??Ar,ac:null}}function fn(e,t,n){let r=Ar;r===null&&Ne();var i=void 0,a=Cn(d),o=!Dr,s=new Map;return sr(()=>{var t=Ar,n=le();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(ln)}catch(e){n.reject(e),ln()}var c=Lt;if(o){if(t.f&32768)var l=un();if(r.b.is_rendered())s.get(c)?.reject(Ae),s.delete(c);else{for(let e of s.values())e.reject(Ae);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===Ae),!(n===Ae||t.f&16384)){if(c.activate(),n)a.f|=Ee,Tn(a,n);else{a.f&8388608&&(a.f^=Ee),Tn(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(Ae)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),er(()=>{for(let e of s.values())e.reject(Ae)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function k(e){let t=dn(e);return at||Nr(t),t}function pn(e){let t=dn(e);return t.equals=it,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)hr(t[n])}}function hn(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function gn(e){var t,n=Ar;jr(hn(e));try{e.f&=~Ce,mn(e),t=Gr(e)}finally{jr(n)}return t}function _n(e){var t=e.v,n=gn(e);if(!e.equals(n)&&(e.wv=Hr(),(!Lt?.is_fork||e.deps===null)&&(e.v=n,Lt?.capture(e,t),e.deps===null))){Dt(e,de);return}Tr||(zt===null?Ot(e):($n()||Lt?.is_fork)&&zt.set(e,n))}function vn(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Ae),t.teardown=C,t.ac=null,qr(t,0),pr(t))}function yn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Jr(t)}var bn=new Set,xn=new Map,Sn=!1;function Cn(e,t){return{f:0,v:e,reactions:null,equals:nt,rv:0,wv:0}}function A(e,t){let n=Cn(e,t);return Nr(n),n}function wn(e,t=!1,n=!0){let r=Cn(e);return t||(r.equals=it),ot&&n&&dt!==null&&dt.l!==null&&(dt.l.s??=[]).push(r),r}function j(e,t,n=!1){return Dr!==null&&(!Or||Dr.f&131072)&&_t()&&Dr.f&4325394&&(Mr===null||!v.call(Mr,e))&&We(),Tn(e,n?kn(t):t,Wt)}function Tn(e,t,n=null){if(!e.equals(t)){var r=e.v;Tr?xn.set(e,t):xn.set(e,r),e.v=t;var i=qt.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&gn(t),zt===null&&Ot(t)}e.wv=Hr(),On(e,fe,n),_t()&&Ar!==null&&Ar.f&1024&&!(Ar.f&96)&&(Ir===null?Lr([e]):Ir.push(e)),!i.is_fork&&bn.size>0&&!Sn&&En()}return t}function En(){Sn=!1;for(let e of bn)e.f&1024&&Dt(e,pe),Ur(e)&&Jr(e);bn.clear()}function Dn(e){j(e,e.v+1)}function On(e,t,n){var r=e.reactions;if(r!==null)for(var i=_t(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===Ar)){var l=(c&fe)===0;if(l&&Dt(s,t),c&2){var u=s;zt?.delete(u),c&65536||(c&512&&(s.f|=Ce),On(u,pe,n))}else if(l){var d=s;c&16&&Yt!==null&&Yt.add(d),n===null?$t(d):n.push(d)}}}}function kn(e){if(typeof e!=`object`||!e||De in e)return e;let t=re(e);if(t!==te&&t!==ne)return e;var n=new Map,r=g(e),i=A(0),a=null,o=Br,s=e=>{if(Br===o)return e();var t=Dr,n=Br;kr(null),Vr(o);var r=e();return kr(t),Vr(n),r};return r&&n.set(`length`,A(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&He();var i=n.get(t);return i===void 0?s(()=>{var e=A(r.value,a);return n.set(t,e),e}):j(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>A(d,a));n.set(t,e),Dn(i)}}else j(r,d),Dn(i);return!0},get(t,r,i){if(r===De)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||S(t,r)?.writable)&&(o=s(()=>A(kn(c?t[r]:d),a)),n.set(r,o)),o!==void 0){var l=I(o);return l===d?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=I(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==d)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===De)return!0;var r=n.get(t),i=r!==void 0&&r.v!==d||Reflect.has(e,t);return(r!==void 0||Ar!==null&&(!i||S(e,t)?.writable))&&(r===void 0&&(r=s(()=>A(i?kn(e[t]):d,a)),n.set(t,r)),I(r)===d)?!1:i},set(e,t,o,c){var l=n.get(t),u=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(()=>A(d,a)),n.set(f+``,p)):j(p,d)}if(l===void 0)(!u||S(e,t)?.writable)&&(l=s(()=>A(void 0,a)),j(l,kn(o)),n.set(t,l));else{u=l.v!==d;var m=s(()=>kn(o));j(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&j(g,_+1)}Dn(i)}return!0},ownKeys(e){I(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==d});for(var[r,a]of n)a.v!==d&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ue()}})}function An(e){try{if(typeof e==`object`&&e&&De in e)return e[De]}catch{}return e}function jn(e,t){return Object.is(An(e),An(t))}var Mn,Nn,Pn,Fn;function In(){if(Mn===void 0){Mn=window,Nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Pn=S(t,`firstChild`).get,Fn=S(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 Ln(e=``){return document.createTextNode(e)}function Rn(e){return Pn.call(e)}function zn(e){return Fn.call(e)}function M(e,t){if(!w)return Rn(e);var n=Rn(Xe);if(n===null)n=Xe.appendChild(Ln());else if(t&&n.nodeType!==3){var r=Ln();return n?.before(r),Ze(r),r}return t&&Un(n),Ze(n),n}function N(e,t=!1){if(!w){var n=Rn(e);return n instanceof Comment&&n.data===``?zn(n):n}if(t){if(Xe?.nodeType!==3){var r=Ln();return Xe?.before(r),Ze(r),r}Un(Xe)}return Xe}function P(e,t=1,n=!1){let r=w?Xe:e;for(var i;t--;)i=r,r=zn(r);if(!w)return r;if(n){if(r?.nodeType!==3){var a=Ln();return r===null?i?.after(a):r.before(a),Ze(a),a}Un(r)}return Ze(r),r}function Bn(e){e.textContent=``}function Vn(){return!at||Yt!==null?!1:(Ar.f&ge)!==0}function Hn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Un(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 Wn(e,t){if(t){let t=document.body;e.autofocus=!0,St(()=>{document.activeElement===t&&e.focus()})}}function Gn(e){w&&Rn(e)!==null&&Bn(e)}var Kn=!1;function qn(){Kn||(Kn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Jn(e){var t=Dr,n=Ar;kr(null),jr(null);try{return e()}finally{kr(t),jr(n)}}function Yn(e,t,n,r=n){e.addEventListener(t,()=>Jn(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),qn()}function Xn(e){Ar===null&&(Dr===null&&Le(e),Ie()),Tr&&Fe(e)}function Zn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Qn(e,t){var n=Ar;n!==null&&n.f&8192&&(e|=me);var r={ctx:dt,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)Ut===null?qt.ensure().schedule(r):Ut.push(r);else if(t!==null){try{Jr(r)}catch(e){throw hr(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|=ve))}if(i!==null&&(i.parent=n,n!==null&&Zn(i,n),Dr!==null&&Dr.f&2&&!(e&64))){var a=Dr;(a.effects??=[]).push(i)}return r}function $n(){return Dr!==null&&!Or}function er(e){let t=Qn(8,null);return Dt(t,de),t.teardown=e,t}function tr(e){Xn(`$effect`);var t=Ar.f;if(!Dr&&t&32&&!(t&32768)){var n=dt;(n.e??=[]).push(e)}else return nr(e)}function nr(e){return Qn(4|xe,e)}function rr(e){return Xn(`$effect.pre`),Qn(8|xe,e)}function ir(e){qt.ensure();let t=Qn(64|be,e);return()=>{hr(t)}}function ar(e){qt.ensure();let t=Qn(64|be,e);return(e={})=>new Promise(n=>{e.outro?vr(t,()=>{hr(t),n(void 0)}):(hr(t),n(void 0))})}function or(e){return Qn(4,e)}function sr(e){return Qn(Te|be,e)}function cr(e,t=0){return Qn(8|t,e)}function F(e,t=[],n=[],r=[]){sn(r,t,n,t=>{Qn(8,()=>e(...t.map(I)))})}function lr(e,t=0){return Qn(16|t,e)}function ur(e,t=0){return Qn(ue|t,e)}function dr(e){return Qn(32|be,e)}function fr(e){var t=e.teardown;if(t!==null){let e=Tr,n=Dr;Er(!0),kr(null);try{t.call(null)}finally{Er(e),kr(n)}}}function pr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Jn(()=>{e.abort(Ae)});var r=n.next;n.f&64?n.parent=null:hr(n,t),n=r}}function mr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||hr(t),t=n}}function hr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(gr(e.nodes.start,e.nodes.end),n=!0),Dt(e,_e),pr(e,t&&!n),qr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();fr(e),e.f^=_e,e.f|=he;var i=e.parent;i!==null&&i.first!==null&&_r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function gr(e,t){for(;e!==null;){var n=e===t?null:zn(e);e.remove(),e=n}}function _r(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 vr(e,t,n=!0){var r=[];yr(e,r,!0);var i=()=>{n&&hr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function yr(e,t,n){if(!(e.f&8192)){e.f^=me;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;yr(i,t,o?n:!1),i=a}}}function br(e){xr(e,!0)}function xr(e,t){if(e.f&8192){e.f^=me,e.f&1024||(Dt(e,fe),qt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;xr(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 Sr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:zn(n);t.append(n),n=i}}var Cr=null,wr=!1,Tr=!1;function Er(e){Tr=e}var Dr=null,Or=!1;function kr(e){Dr=e}var Ar=null;function jr(e){Ar=e}var Mr=null;function Nr(e){Dr!==null&&(!at||Dr.f&2)&&(Mr===null?Mr=[e]:Mr.push(e))}var Pr=null,Fr=0,Ir=null;function Lr(e){Ir=e}var Rr=1,zr=0,Br=zr;function Vr(e){Br=e}function Hr(){return++Rr}function Ur(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~Ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ur(a)&&_n(a),a.wv>e.wv)return!0}t&512&&zt===null&&Dt(e,de)}return!1}function Wr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!at&&Mr!==null&&v.call(Mr,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Wr(a,t,!1):t===a&&(n?Dt(a,fe):a.f&1024&&Dt(a,pe),$t(a))}}function Gr(e){var t=Pr,n=Fr,r=Ir,i=Dr,a=Mr,o=dt,s=Or,c=Br,l=e.f;Pr=null,Fr=0,Ir=null,Dr=l&96?null:e,Mr=null,ft(e.ctx),Or=!1,Br=++zr,e.ac!==null&&(Jn(()=>{e.ac.abort(Ae)}),e.ac=null);try{e.f|=we;var u=e.fn,d=u();e.f|=ge;var f=e.deps,p=Lt?.is_fork;if(Pr!==null){var m;if(p||qr(e,Fr),f!==null&&Fr>0)for(f.length=Fr+Pr.length,m=0;m<Pr.length;m++)f[Fr+m]=Pr[m];else e.deps=f=Pr;if($n()&&e.f&512)for(m=Fr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Fr<f.length&&(qr(e,Fr),f.length=Fr);if(_t()&&Ir!==null&&!Or&&f!==null&&!(e.f&6146))for(m=0;m<Ir.length;m++)Wr(Ir[m],e);if(i!==null&&i!==e){if(zr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=zr;if(t!==null)for(let e of t)e.rv=zr;Ir!==null&&(r===null?r=Ir:r.push(...Ir))}return e.f&8388608&&(e.f^=Ee),d}catch(e){return wt(e)}finally{e.f^=we,Pr=t,Fr=n,Ir=r,Dr=i,Mr=a,ft(o),Or=s,Br=c}}function Kr(e,t){let n=t.reactions;if(n!==null){var r=_.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&&(Pr===null||!v.call(Pr,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~Ce),Ot(a),vn(a),qr(a,0)}}function qr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Kr(e,n[r])}function Jr(e){var t=e.f;if(!(t&16384)){Dt(e,de);var n=Ar,r=wr;Ar=e,wr=!0;try{t&16777232?mr(e):pr(e),fr(e);var i=Gr(e);e.teardown=typeof i==`function`?i:null,e.wv=Rr}finally{wr=r,Ar=n}}}async function Yr(){if(at)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),O()}function I(e){var t=(e.f&2)!=0;if(Cr?.add(e),Dr!==null&&!Or&&!(Ar!==null&&Ar.f&16384)&&(Mr===null||!v.call(Mr,e))){var n=Dr.deps;if(Dr.f&2097152)e.rv<zr&&(e.rv=zr,Pr===null&&n!==null&&n[Fr]===e?Fr++:Pr===null?Pr=[e]:Pr.push(e));else{(Dr.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[Dr]:v.call(r,Dr)||r.push(Dr)}}if(Tr&&xn.has(e))return xn.get(e);if(t){var i=e;if(Tr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Zr(i))&&(a=gn(i)),xn.set(i,a),a}var o=(i.f&512)==0&&!Or&&Dr!==null&&(wr||(Dr.f&512)!=0),s=(i.f&ge)===0;Ur(i)&&(o&&(i.f|=512),_n(i)),o&&!s&&(yn(i),Xr(i))}if(zt?.has(e))return zt.get(e);if(e.f&8388608)throw e.v;return e.v}function Xr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(yn(t),Xr(t))}function Zr(e){if(e.v===d)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(xn.has(t)||t.f&2&&Zr(t))return!0;return!1}function Qr(e){var t=Or;try{return Or=!0,e()}finally{Or=t}}function $r(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(De in e)ei(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&De in n&&ei(n)}}}function ei(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{ei(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 ti=Symbol(`events`),ni=new Set,ri=new Set;function ii(e,t,n,r={}){function i(e){if(r.capture||ui.call(t,e),!e.cancelBubble)return Jn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?St(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ai(e,t,n,r={}){var i=ii(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function oi(e,t,n,r,i){var a={capture:r,passive:i},o=ii(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&er(()=>{t.removeEventListener(e,o,a)})}function si(e,t,n){(t[ti]??={})[e]=n}function ci(e){for(var t=0;t<e.length;t++)ni.add(e[t]);for(var n of ri)n(e)}var li=null;function ui(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;li=e;var o=0,s=li===e&&e[ti];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ti]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){x(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=Dr,d=Ar;kr(null),jr(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[ti]?.[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[ti]=t,delete e.currentTarget,kr(u),jr(d)}}}var di=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function fi(e){return di?.createHTML(e)??e}function pi(e){var t=Hn(`template`);return t.innerHTML=fi(e.replaceAll(`<!>`,`<!---->`)),t.content}function mi(e,t){var n=Ar;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(w)return mi(Xe,null),Xe;i===void 0&&(i=pi(a?e:`<!>`+e),n||(i=Rn(i)));var t=r||Nn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Rn(t),s=t.lastChild;mi(o,s)}else mi(t,t);return t}}function hi(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(w)return mi(Xe,null),Xe;if(!o){var e=Rn(pi(a));if(i)for(o=document.createDocumentFragment();Rn(e);)o.appendChild(Rn(e));else o=Rn(e)}var t=o.cloneNode(!0);if(i){var n=Rn(t),r=t.lastChild;mi(n,r)}else mi(t,t);return t}}function gi(e,t){return hi(e,t,`svg`)}function _i(e=``){if(!w){var t=Ln(e+``);return mi(t,t),t}var n=Xe;return n.nodeType===3?Un(n):(n.before(n=Ln()),Ze(n)),mi(n,n),n}function R(){if(w)return mi(Xe,null),Xe;var e=document.createDocumentFragment(),t=document.createComment(``),n=Ln();return e.append(t,n),mi(t,n),e}function z(e,t){if(w){var n=Ar;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Xe),Qe();return}e!==null&&e.before(t)}function vi(){if(w&&Xe&&Xe.nodeType===8&&Xe.textContent?.startsWith(`$`)){let e=Xe.textContent.substring(1);return Qe(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function yi(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var bi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function xi(e){return bi.includes(e)}var Si=`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(`.`),Ci={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 wi(e){return e=e.toLowerCase(),Ci[e]??e}[...Si];var Ti=[`touchstart`,`touchmove`];function Ei(e){return Ti.includes(e)}var Di=[`textarea`,`script`,`style`,`title`];function Oi(e){return Di.includes(e)}var ki=!0;function Ai(e){ki=e}function B(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function ji(e,t){return Pi(e,t)}function Mi(e,t){In(),t.intro=t.intro??!1;let n=t.target,r=w,i=Xe;try{for(var a=Rn(n);a&&(a.nodeType!==8||a.data!==`[`);)a=zn(a);if(!a)throw u;Ye(!0),Ze(a);let r=Pi(e,{...t,anchor:a});return Ye(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
|
|
2
|
-
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==u&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&ze(),In(),Bn(n),Ye(!1),ji(e,t)}finally{Ye(r),Ze(i)}}var Ni=new Map;function Pi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){In();var c=void 0,l=ar(()=>{var l=n??t.appendChild(Ln());an(l,{pending:()=>{}},t=>{E({});var n=dt;if(a&&(n.c=a),i&&(r.$$events=i),w&&mi(t,null),ki=o,c=e(t,r)||{},ki=!0,w&&(Ar.nodes.end=Xe,Xe===null||Xe.nodeType!==8||Xe.data!==`]`))throw Ke(),u;D()},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=Ei(r);for(let e of[t,document]){var a=Ni.get(e);a===void 0&&(a=new Map,Ni.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ui,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(y(ni)),ri.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=Ni.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ui),r.delete(e),r.size===0&&Ni.delete(n)):r.set(e,i)}ri.delete(f),l!==n&&l.parentNode?.removeChild(l)}});return Fi.set(c,l),c}var Fi=new WeakMap;function Ii(e,t){let n=Fi.get(e);return n?(Fi.delete(e),n(t)):Promise.resolve()}var Li=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)br(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&&(hr(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();Sr(r,t),t.append(Ln()),this.#n.set(e,{effect:r,fragment:t})}else hr(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),vr(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)||(hr(n.effect),this.#n.delete(e))};ensure(e,t){var n=Lt,r=Vn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Ln();i.append(a),this.#n.set(e,{effect:dr(()=>t(a)),fragment:i})}else this.#t.set(e,dr(()=>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 w&&(this.anchor=Xe),this.#a(n)}};function V(e,t,...n){var r=new Li(e);lr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ve)}function Ri(e){dt===null&&Me(`onMount`),ot&&dt.l!==null?Bi(dt).m.push(e):tr(()=>{let t=Qr(e);if(typeof t==`function`)return t})}function zi(e){dt===null&&Me(`onDestroy`),Ri(()=>()=>Qr(e))}function Bi(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Vi(){return Symbol(h)}var Hi=0,Ui=1,Wi=2;function Gi(e,t,n,r,i){w&&Qe();var a=_t(),o=d,s=a?Cn(o):wn(o,!1,!1),c=a?Cn(o):wn(o,!1,!1),l=new Li(e);lr(()=>{var a=Lt;a.deactivate();var o=t();a.activate();var u=!1;let d=w&&oe(o)===(e.data===`[!`);if(d&&(Ze(et()),Ye(!1)),oe(o)){var f=cn(),p=!1;let e=e=>{if(!u){p=!0,f(!1),qt.ensure(),w&&Ye(!1);try{e()}finally{ln(!1),Vt||O()}}};o.then(t=>{e(()=>{Tn(s,t),l.ensure(Ui,r&&(e=>r(e,s)))})},t=>{e(()=>{if(Tn(c,t),l.ensure(Wi,i&&(e=>i(e,c))),!i)throw c.v})}),w?l.ensure(Hi,n):St(()=>{p||e(()=>{l.ensure(Hi,n)})})}else Tn(s,o),l.ensure(Ui,r&&(e=>r(e,s)));return d&&Ye(!0),()=>{u=!0}})}function H(e,t,n=!1){var r;w&&(r=Xe,Qe());var i=new Li(e),a=n?ve:0;function o(e,t){if(w){var n=tt(r);if(e!==parseInt(n.substring(1))){var a=et();Ze(a),i.anchor=a,Ye(!1),i.ensure(e,t),Ye(!0);return}}i.ensure(e,t)}lr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Ki=Symbol(`NaN`);function qi(e,t,n){w&&Qe();var r=new Li(e),i=!_t();lr(()=>{var e=t();e!==e&&(e=Ki),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Ji(e,t){return t}function Yi(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];vr(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Xi(e,y(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;Bn(u),u.append(l),e.items.clear()}Xi(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Xi(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|=Se,Sr(a,document.createDocumentFragment())):hr(t[i],n)}}var Zi;function Qi(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=w?Ze(Rn(c)):c.appendChild(Ln())}w&&Qe();var l=null,u=pn(()=>{var e=n();return g(e)?e:e==null?[]:y(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,ea(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=Se,na(l,null,o)):br(l):vr(l,()=>{l=null})))}function h(e){_.pending.delete(e)}var _={effect:lr(()=>{d=I(u);var e=d.length;let c=!1;w&&tt(o)===`[!`!=(e===0)&&(o=et(),Ze(o),Ye(!1),c=!0);for(var g=new Set,_=Lt,v=Vn(),y=0;y<e;y+=1){w&&Xe.nodeType===8&&Xe.data===`]`&&(o=Xe,c=!0,Ye(!1));var b=d[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&Tn(S.v,b),S.i&&Tn(S.i,y),v&&_.unskip_effect(S.e)):(S=ta(s,p?o:Zi??=Ln(),b,x,y,i,t,n),p||(S.e.f|=Se),s.set(x,S)),g.add(x)}if(e===0&&a&&!l&&(p?l=dr(()=>a(o)):(l=dr(()=>a(Zi??=Ln())),l.f|=Se)),e>g.size&&Pe(``,``,``),w&&e>0&&Ze(et()),!p)if(f.set(_,g),v){for(let[e,t]of s)g.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(h)}else m(_);c&&Ye(!0),I(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,w&&(o=Xe)}function $i(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function ea(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=$i(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&&(br(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=Se,g===c)na(g,null,n);else{var v=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),ra(e,u,g),ra(e,g,v),na(g,v,n),u=g,f=[],p=[],c=$i(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 S=f[0],ee=f[f.length-1];for(x=0;x<f.length;x+=1)na(f[x],b,n);for(x=0;x<p.length;x+=1)l.delete(p[x]);ra(e,S.prev,ee.next),ra(e,u,S),ra(e,ee,b),c=b,u=ee,--_,f=[],p=[]}else l.delete(g),na(g,c,n),ra(e,g.prev,g.next),ra(e,g,u===null?e.effect.first:u.next),ra(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=$i(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=$i(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Xi(e,y(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var te=[];if(l!==void 0)for(g of l)g.f&8192||te.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&te.push(c),c=$i(c.next);var ne=te.length;if(ne>0){var re=r&4&&o===0?n:null;if(a){for(_=0;_<ne;_+=1)te[_].nodes?.a?.measure();for(_=0;_<ne;_+=1)te[_].nodes?.a?.fix()}Yi(e,te,re)}}a&&St(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function ta(e,t,n,r,i,a,o,s){var c=o&1?o&16?Cn(n):wn(n,!1,!1):null,l=o&2?Cn(i):null;return{v:c,i:l,e:dr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function na(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=zn(r);if(a.before(r),r===i)return;r=o}}function ra(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function ia(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;w&&(o=Ze(Rn(c)))}F(()=>{var e=Ar;if(s===(s=t()??``)){w&&Qe();return}if(n&&!w){e.nodes=null,c.innerHTML=s,s!==``&&mi(Rn(c),c.lastChild);return}if(e.nodes!==null&&(gr(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(w){for(var a=Xe.data,l=Qe(),d=l;l!==null&&(l.nodeType!==8||l.data!==``);)d=l,l=zn(l);if(l===null)throw Ke(),u;mi(Xe,d),o=Ze(l);return}var f=Hn(r?`svg`:i?`math`:`template`,r?p:i?m:void 0);f.innerHTML=s;var h=r||i?f:f.content;if(mi(Rn(h),h.lastChild),r||i)for(;Rn(h);)o.before(Rn(h));else o.before(h)}})}function aa(e,t,n,r,i){w&&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 U(e,t,n){var r;w&&(r=Xe,Qe());var i=new Li(e);lr(()=>{var e=t()??null;if(w&&tt(r)===`[`!=(e!==null)){var a=et();Ze(a),i.anchor=a,Ye(!1),i.ensure(e,e&&(t=>n(t,e))),Ye(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ve)}var oa=()=>performance.now(),sa={tick:e=>requestAnimationFrame(e),now:()=>oa(),tasks:new Set};function ca(){let e=sa.now();sa.tasks.forEach(t=>{t.c(e)||(sa.tasks.delete(t),t.f())}),sa.tasks.size!==0&&sa.tick(ca)}function la(e){let t;return sa.tasks.size===0&&sa.tick(ca),{promise:new Promise(n=>{sa.tasks.add(t={c:e,f:n})}),abort(){sa.tasks.delete(t)}}}function ua(e,t){Jn(()=>{e.dispatchEvent(new CustomEvent(t))})}function da(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 fa(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=da(n.trim());t[i]=r.trim()}return t}var pa=e=>e;function ma(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 Jn(()=>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=ha(t,m(),p,1,()=>{ua(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=ha(t,m(),f,0,()=>{ua(t,`outroend`),e?.()})},stop:()=>{f?.abort(),p?.abort()}},g=Ar;if((g.nodes.t??=[]).push(h),i&&ki){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||(v.f&32768)!=0}_&&or(()=>{Qr(()=>h.in())})}}function ha(e,t,n,r,i){var a=r===1;if(ae(t)){var o,s=!1;return St(()=>{s||(o=ha(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 ua(e,a?`introstart`:`outrostart`),i(),{abort:C,deactivate:C,reset:C,t:()=>r};let{delay:c=0,css:l,tick:u,easing:d=pa}=t;var f=[];if(a&&n===void 0&&(u&&u(0,1),l)){var p=fa(l(0,1));f.push(p,p)}var m=()=>1-r,h=e.animate(f,{duration:c,fill:`forwards`});return h.onfinish=()=>{h.cancel(),ua(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=fa(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&&la(()=>{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=C)},deactivate:()=>{i=C},reset:()=>{r===0&&u?.(1,0)},t:()=>m()}}function ga(e,t,n,r,i,a){let o=w;w&&Qe();var s=null;w&&Xe.nodeType===1&&(s=Xe,Qe());var c=w?Xe:e,l=new Li(c,!1);lr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?p:void 0;if(e===null){l.ensure(null,null),Ai(!0);return}return l.ensure(e,t=>{if(e){if(s=w?s:Hn(e,a),mi(s,s),r){w&&Oi(e)&&s.append(document.createComment(``));var n=w?Rn(s):s.appendChild(Ln());w&&(n===null?Ye(!1):Ze(n)),r(s,n)}Ar.nodes.end=s,t.before(s)}w&&Ze(t)}),Ai(!0),()=>{e&&Ai(!1)}},ve),er(()=>{Ai(!0)}),o&&(Ye(!0),Ze(c))}function _a(e,t){let n=null,r=w;var i;if(w){n=Xe;for(var a=Rn(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=zn(a);if(a===null)Ye(!1);else{var o=zn(a);a.remove(),Ze(o)}}w||(i=document.head.appendChild(Ln()));try{lr(()=>t(i),ye|be)}finally{r&&(Ye(!0),Ze(n))}}function va(e,t){or(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Hn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function ya(e,t,n){or(()=>{var r=Qr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};cr(()=>{var e=n();$r(e),i&&rt(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function ba(e,t){var n=void 0,r;ur(()=>{n!==(n=t())&&(r&&=(hr(r),null),n&&(r=dr(()=>{or(()=>n(e))})))})}function xa(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=xa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Sa(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xa(e))&&(r&&(r+=` `),r+=t);return r}function Ca(e){return typeof e==`object`?Sa(e):e??``}var wa=[...`
|
|
3
|
-
\r\f\xA0\v`];function Ta(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||wa.includes(r[o-1]))&&(s===r.length||wa.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ea(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 Da(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Oa(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(Da)),i&&c.push(...Object.keys(i).map(Da));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=Da(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+=Ea(r)),i&&(n+=Ea(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ka(e,t,n,r,i,a){var o=e.__className;if(w||o!==n||o===void 0){var s=Ta(n,r,a);(!w||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 Aa(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 ja(e,t,n,r){var i=e.__style;if(w||i!==t){var a=Oa(t,r);(!w||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Aa(e,n?.[0],r[0]),Aa(e,n?.[1],r[1],`important`)):Aa(e,n,r));return r}function Ma(e,t,n=!1){if(e.multiple){if(t==null)return;if(!g(t))return qe();for(var r of e.options)r.selected=t.includes(Pa(r));return}for(r of e.options)if(jn(Pa(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Na(e){var t=new MutationObserver(()=>{Ma(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),er(()=>{t.disconnect()})}function Pa(e){return`__value`in e?e.__value:e.value}var Fa=Symbol(`class`),Ia=Symbol(`style`),La=Symbol(`is custom element`),Ra=Symbol(`is html`),za=je?`link`:`LINK`,Ba=je?`input`:`INPUT`,Va=je?`option`:`OPTION`,Ha=je?`select`:`SELECT`,Ua=je?`progress`:`PROGRESS`;function Wa(e){if(w){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;W(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;W(e,`checked`,null),e.checked=r}}};e.__on_r=n,St(n),qn()}}function Ga(e,t){var n=Ja(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Ua)||(e.value=t??``)}function Ka(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function W(e,t,n,r){var i=Ja(e);w&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===za)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ke]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Xa(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function qa(e,t,n,r,i=!1,a=!1){if(w&&i&&e.nodeName===Ba){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||Wa(o)}var s=Ja(e),c=s[La],l=!s[Ra];let u=w&&c;u&&Ye(!1);var f=t||{},p=e.nodeName===Va;for(var m in t)m in n||(n[m]=null);n.class?n.class=Ca(n.class):(r||n[Fa])&&(n.class=null),n[Ia]&&(n.style??=null);var h=Xa(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`){ka(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[Fa],n[Fa]),f[i]=o,f[Fa]=n[Fa];continue}if(i===`style`){ja(e,o,t?.[Ia],n[Ia]),f[i]=o,f[Ia]=n[Ia];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=xi(r);if(yi(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)si(r,e,o),ci([r]);else if(o!=null){function a(e){f[i].call(this,e)}f[n]=ii(r,e,a,t)}}else if(i===`style`)W(e,i,o);else if(i===`autofocus`)Wn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&p)Ka(e,o);else{var y=i;l||(y=wi(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]=d)):typeof o!=`function`&&W(e,y,o,a)}}}return u&&Ye(!0),f}function G(e,t,n=[],r=[],i=[],a,o=!1,s=!1){sn(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===Ha,l=!1;if(ur(()=>{var u=t(...n.map(I)),d=qa(e,r,u,a,o,s);l&&c&&`value`in u&&Ma(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||hr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&hr(i[t]),i[t]=dr(()=>ba(e,()=>f))),d[t]=f}r=d}),c){var u=e;or(()=>{Ma(u,r.value,!0),Na(u)})}l=!0})}function Ja(e){return e.__attributes??={[La]:e.nodeName.includes(`-`),[Ra]:e.namespaceURI===f}}var Ya=new Map;function Xa(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ya.get(t);if(n)return n;Ya.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 Za(e,t,n=t){var r=new WeakSet;Yn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=to(e)?no(a):a,n(a),Lt!==null&&r.add(Lt),await Yr(),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))}}}),(w&&e.defaultValue!==e.value||Qr(t)==null&&e.value)&&(n(to(e)?no(e.value):e.value),Lt!==null&&r.add(Lt)),cr(()=>{var n=t();if(e===document.activeElement){var i=at?Rt:Lt;if(r.has(i))return}to(e)&&n===no(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}var Qa=new Set;function $a(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),Yn(n,`change`,()=>{var e=n.__value;a&&(e=eo(o,e,n.checked)),i(e)},()=>i(a?[]:null)),cr(()=>{var e=r();if(w&&n.defaultChecked!==n.checked){s=!0;return}a?(e||=[],n.checked=e.includes(n.__value)):n.checked=jn(n.__value,e)}),er(()=>{var e=o.indexOf(n);e!==-1&&o.splice(e,1)}),Qa.has(o)||(Qa.add(o),St(()=>{o.sort((e,t)=>e.compareDocumentPosition(t)===4?-1:1),Qa.delete(o)})),St(()=>{if(s){var e=a?eo(o,e,n.checked):o.find(e=>e.checked)?.__value;i(e)}})}function eo(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 to(e){var t=e.type;return t===`number`||t===`range`}function no(e){return e===``?null:+e}var ro=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 io(e,t,n){var r=ro.observe(e,()=>n(e[t]));or(()=>(Qr(()=>n(e[t])),r))}function ao(e,t){return e===t||e?.[De]===t}function oo(e={},t,n,r){var i=dt.r,a=Ar;return or(()=>{var o,s;return cr(()=>{o=s,s=r?.()||[],Qr(()=>{e!==n(...s)&&(t(e,...s),o&&ao(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&&ao(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function so(e=!1){let t=dt,n=t.l.u;if(!n)return;let r=()=>$r(t.s);if(e){let e=0,n={},i=dn(()=>{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=()=>I(i)}n.b.length&&rr(()=>{co(t,r),ce(n.b)}),tr(()=>{let e=Qr(()=>n.m.map(se));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&tr(()=>{co(t,r),ce(n.a)})}function co(e,t){if(e.l.s)for(let t of e.l.s)I(t);t()}var lo={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 uo(e,t,n){return new Proxy({props:e,exclude:t},lo)}var fo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(ae(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];ae(i)&&(i=i());let a=S(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(ae(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=S(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===De||t===Oe)return!1;for(let n of e.props)if(ae(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(ae(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 po(...e){return new Proxy({props:e},fo)}function K(e,t,n,r){var i=!ot||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Qr(r):r),s);let u;if(a){var d=De in e||Oe in e;u=S(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Ft(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&Be(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?dn:pn)(()=>(g=!1,m()));a&&I(_);var v=Ar;return(function(e,t){if(arguments.length>0){let n=t?I(_):i&&a?kn(e):e;return j(_,n),g=!0,s!==void 0&&(s=n),e}return Tr&&g||v.f&16384?_.v:I(_)})}function mo(e){return new ho(e)}var ho=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=wn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return I(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===Oe?!0:(I(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return j(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Mi:ji)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!at&&(!e?.props?.$$host||e.sync===!1)&&O(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||x(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=()=>{Ii(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()}},go;typeof HTMLElement==`function`&&(go=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=Hn(`slot`);e!==`default`&&(n.name=e),z(t,n)}}let t={},n=vo(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]=_o(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=mo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ir(()=>{cr(()=>{this.$$r=!0;for(let e of b(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=_o(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]=_o(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 b(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function _o(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 vo(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function q(e,t,n,r,i,a){let o=class extends go{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return b(t).map(e=>(t[e].attribute||e).toLowerCase())}};return b(t).forEach(e=>{x(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=_o(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(S(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{x(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var{entries:yo,setPrototypeOf:bo,isFrozen:xo,getPrototypeOf:So,getOwnPropertyDescriptor:Co}=Object,{freeze:wo,seal:To,create:Eo}=Object,{apply:Do,construct:Oo}=typeof Reflect<`u`&&Reflect;wo||=function(e){return e},To||=function(e){return e},Do||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},Oo||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var ko=Uo(Array.prototype.forEach),Ao=Uo(Array.prototype.lastIndexOf),jo=Uo(Array.prototype.pop),Mo=Uo(Array.prototype.push),No=Uo(Array.prototype.splice),Po=Uo(String.prototype.toLowerCase),Fo=Uo(String.prototype.toString),Io=Uo(String.prototype.match),Lo=Uo(String.prototype.replace),Ro=Uo(String.prototype.indexOf),zo=Uo(String.prototype.trim),Bo=Uo(Object.prototype.hasOwnProperty),Vo=Uo(RegExp.prototype.test),Ho=Wo(TypeError);function Uo(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Do(e,t,r)}}function Wo(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Oo(e,n)}}function Go(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Po;bo&&bo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(xo(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ko(e){for(let t=0;t<e.length;t++)Bo(e,t)||(e[t]=null);return e}function qo(e){let t=Eo(null);for(let[n,r]of yo(e))Bo(e,n)&&(Array.isArray(r)?t[n]=Ko(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=qo(r):t[n]=r);return t}function Jo(e,t){for(;e!==null;){let n=Co(e,t);if(n){if(n.get)return Uo(n.get);if(typeof n.value==`function`)return Uo(n.value)}e=So(e)}function n(){return null}return n}var Yo=wo(`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(`.`)),Xo=wo(`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(`.`)),Zo=wo([`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`]),Qo=wo([`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`]),$o=wo(`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(`.`)),es=wo([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ts=wo([`#text`]),ns=wo(`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(`.`)),rs=wo(`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(`.`)),is=wo(`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(`.`)),as=wo([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),os=To(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ss=To(/<%[\w\W]*|[\w\W]*%>/gm),cs=To(/\$\{[\w\W]*/gm),ls=To(/^data-[\-\w.\u00B7-\uFFFF]+$/),us=To(/^aria-[\-\w]+$/),ds=To(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fs=To(/^(?:\w+script|data):/i),ps=To(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ms=To(/^html$/i),hs=To(/^[a-z][.\w]*(-[.\w]+)+$/i),gs=Object.freeze({__proto__:null,ARIA_ATTR:us,ATTR_WHITESPACE:ps,CUSTOM_ELEMENT:hs,DATA_ATTR:ls,DOCTYPE_NAME:ms,ERB_EXPR:ss,IS_ALLOWED_URI:ds,IS_SCRIPT_OR_DATA:fs,MUSTACHE_EXPR:os,TMPLIT_EXPR:cs}),_s={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vs=function(){return typeof window>`u`?null:window},ys=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}},bs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vs(),t=e=>xs(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==_s.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=Jo(m,`cloneNode`),g=Jo(m,`remove`),_=Jo(m,`nextSibling`),v=Jo(m,`childNodes`),y=Jo(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=n,{importNode:re}=r,ie=bs();t.isSupported=typeof yo==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ae,ERB_EXPR:C,TMPLIT_EXPR:oe,DATA_ATTR:se,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:le,ATTR_WHITESPACE:ue,CUSTOM_ELEMENT:de}=gs,{IS_ALLOWED_URI:fe}=gs,pe=null,me=Go({},[...Yo,...Xo,...Zo,...$o,...ts]),he=null,ge=Go({},[...ns,...rs,...is,...as]),_e=Object.seal(Eo(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}})),ve=null,ye=null,be=Object.seal(Eo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xe=!0,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!0,De=!1,Oe=!1,ke=!1,Ae=!1,je=!1,Me=!1,Ne=!0,Pe=!1,Fe=!0,Ie=!1,Le={},Re=null,ze=Go({},[`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`]),Be=null,Ve=Go({},[`audio`,`video`,`img`,`source`,`image`,`track`]),He=null,Ue=Go({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),We=`http://www.w3.org/1998/Math/MathML`,Ge=`http://www.w3.org/2000/svg`,Ke=`http://www.w3.org/1999/xhtml`,qe=Ke,Je=!1,w=null,Ye=Go({},[We,Ge,Ke],Fo),Xe=Go({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ze=Go({},[`annotation-xml`]),Qe=Go({},[`title`,`style`,`font`,`a`,`script`]),T=null,$e=[`application/xhtml+xml`,`text/html`],et=null,tt=null,nt=n.createElement(`form`),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(tt&&tt===e)){if((!e||typeof e!=`object`)&&(e={}),e=qo(e),T=$e.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,et=T===`application/xhtml+xml`?Fo:Po,pe=Bo(e,`ALLOWED_TAGS`)?Go({},e.ALLOWED_TAGS,et):me,he=Bo(e,`ALLOWED_ATTR`)?Go({},e.ALLOWED_ATTR,et):ge,w=Bo(e,`ALLOWED_NAMESPACES`)?Go({},e.ALLOWED_NAMESPACES,Fo):Ye,He=Bo(e,`ADD_URI_SAFE_ATTR`)?Go(qo(Ue),e.ADD_URI_SAFE_ATTR,et):Ue,Be=Bo(e,`ADD_DATA_URI_TAGS`)?Go(qo(Ve),e.ADD_DATA_URI_TAGS,et):Ve,Re=Bo(e,`FORBID_CONTENTS`)?Go({},e.FORBID_CONTENTS,et):ze,ve=Bo(e,`FORBID_TAGS`)?Go({},e.FORBID_TAGS,et):qo({}),ye=Bo(e,`FORBID_ATTR`)?Go({},e.FORBID_ATTR,et):qo({}),Le=Bo(e,`USE_PROFILES`)?e.USE_PROFILES:!1,xe=e.ALLOW_ARIA_ATTR!==!1,Se=e.ALLOW_DATA_ATTR!==!1,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,De=e.WHOLE_DOCUMENT||!1,Ae=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Me=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Ne=e.SANITIZE_DOM!==!1,Pe=e.SANITIZE_NAMED_PROPS||!1,Fe=e.KEEP_CONTENT!==!1,Ie=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||ds,qe=e.NAMESPACE||Ke,Xe=e.MATHML_TEXT_INTEGRATION_POINTS||Xe,Ze=e.HTML_INTEGRATION_POINTS||Ze,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(Se=!1),je&&(Ae=!0),Le&&(pe=Go({},ts),he=Eo(null),Le.html===!0&&(Go(pe,Yo),Go(he,ns)),Le.svg===!0&&(Go(pe,Xo),Go(he,rs),Go(he,as)),Le.svgFilters===!0&&(Go(pe,Zo),Go(he,rs),Go(he,as)),Le.mathMl===!0&&(Go(pe,$o),Go(he,is),Go(he,as))),Bo(e,`ADD_TAGS`)||(be.tagCheck=null),Bo(e,`ADD_ATTR`)||(be.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?be.tagCheck=e.ADD_TAGS:(pe===me&&(pe=qo(pe)),Go(pe,e.ADD_TAGS,et))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?be.attributeCheck=e.ADD_ATTR:(he===ge&&(he=qo(he)),Go(he,e.ADD_ATTR,et))),e.ADD_URI_SAFE_ATTR&&Go(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Re===ze&&(Re=qo(Re)),Go(Re,e.FORBID_CONTENTS,et)),e.ADD_FORBID_CONTENTS&&(Re===ze&&(Re=qo(Re)),Go(Re,e.ADD_FORBID_CONTENTS,et)),Fe&&(pe[`#text`]=!0),De&&Go(pe,[`html`,`head`,`body`]),pe.table&&(Go(pe,[`tbody`]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ho(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ho(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=ys(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));wo&&wo(e),tt=e}},at=Go({},[...Xo,...Zo,...Qo]),ot=Go({},[...$o,...es]),st=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:qe,tagName:`template`});let n=Po(e.tagName),r=Po(t.tagName);return w[e.namespaceURI]?e.namespaceURI===Ge?t.namespaceURI===Ke?n===`svg`:t.namespaceURI===We?n===`svg`&&(r===`annotation-xml`||Xe[r]):!!at[n]:e.namespaceURI===We?t.namespaceURI===Ke?n===`math`:t.namespaceURI===Ge?n===`math`&&Ze[r]:!!ot[n]:e.namespaceURI===Ke?t.namespaceURI===Ge&&!Ze[r]||t.namespaceURI===We&&!Xe[r]?!1:!ot[n]&&(Qe[n]||!at[n]):!!(T===`application/xhtml+xml`&&w[e.namespaceURI]):!1},ct=function(e){Mo(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},lt=function(e,n){try{Mo(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Mo(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Ae||je)try{ct(n)}catch{}else try{n.setAttribute(e,``)}catch{}},ut=function(e){let t=null,r=null;if(ke)e=`<remove></remove>`+e;else{let t=Io(e,/^[\r\n\t ]+/);r=t&&t[0]}T===`application/xhtml+xml`&&qe===Ke&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(qe===Ke)try{t=new f().parseFromString(i,T)}catch{}if(!t||!t.documentElement){t=S.createDocument(qe,`template`,null);try{t.documentElement.innerHTML=Je?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),qe===Ke?ne.call(t,De?`html`:`body`)[0]:De?t.documentElement:a},dt=function(e){return ee.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ft=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`)},pt=function(e){return typeof s==`function`&&e instanceof s};function mt(e,n,r){ko(e,e=>{e.call(t,n,r,tt)})}let ht=function(e){let n=null;if(mt(ie.beforeSanitizeElements,e,null),ft(e))return ct(e),!0;let r=et(e.nodeName);if(mt(ie.uponSanitizeElement,e,{tagName:r,allowedTags:pe}),Ee&&e.hasChildNodes()&&!pt(e.firstElementChild)&&Vo(/<[/\w!]/g,e.innerHTML)&&Vo(/<[/\w!]/g,e.textContent)||e.nodeType===_s.progressingInstruction||Ee&&e.nodeType===_s.comment&&Vo(/<[/\w]/g,e.data))return ct(e),!0;if(!(be.tagCheck instanceof Function&&be.tagCheck(r))&&(!pe[r]||ve[r])){if(!ve[r]&&E(r)&&(_e.tagNameCheck instanceof RegExp&&Vo(_e.tagNameCheck,r)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(r)))return!1;if(Fe&&!Re[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 ct(e),!0}return e instanceof c&&!st(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Vo(/<\/no(script|embed|frames)/i,e.innerHTML)?(ct(e),!0):(Te&&e.nodeType===_s.text&&(n=e.textContent,ko([ae,C,oe],e=>{n=Lo(n,e,` `)}),e.textContent!==n&&(Mo(t.removed,{element:e.cloneNode()}),e.textContent=n)),mt(ie.afterSanitizeElements,e,null),!1)},gt=function(e,t,r){if(ye[t]||Ne&&(t===`id`||t===`name`)&&(r in n||r in nt))return!1;if(!(Se&&!ye[t]&&Vo(se,t))&&!(xe&&Vo(ce,t))&&!(be.attributeCheck instanceof Function&&be.attributeCheck(t,e))){if(!he[t]||ye[t]){if(!(E(e)&&(_e.tagNameCheck instanceof RegExp&&Vo(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&Vo(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t,e))||t===`is`&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&Vo(_e.tagNameCheck,r)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(r))))return!1}else if(!He[t]&&!Vo(fe,Lo(r,ue,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ro(r,`data:`)===0&&Be[e])&&!(Ce&&!Vo(le,Lo(r,ue,``)))&&r)return!1}return!0},E=function(e){return e!==`annotation-xml`&&Io(e,de)},D=function(e){mt(ie.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||ft(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=et(a),l=s,u=a===`value`?l:zo(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,mt(ie.uponSanitizeAttribute,e,r),u=r.attrValue,Pe&&(c===`id`||c===`name`)&&(lt(a,e),u=`user-content-`+u),Ee&&Vo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){lt(a,e);continue}if(c===`attributename`&&Io(u,`href`)){lt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){lt(a,e);continue}if(!we&&Vo(/\/>/i,u)){lt(a,e);continue}Te&&ko([ae,C,oe],e=>{u=Lo(u,e,` `)});let d=et(e.nodeName);if(!gt(d,c,u)){lt(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),ft(e)?ct(e):jo(t.removed)}catch{lt(a,e)}}mt(ie.afterSanitizeAttributes,e,null)},_t=function e(t){let n=null,r=dt(t);for(mt(ie.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)mt(ie.uponSanitizeShadowNode,n,null),ht(n),D(n),n.content instanceof a&&e(n.content);mt(ie.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(Je=!e,Je&&(e=`<!-->`),typeof e!=`string`&&!pt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ho(`dirty is not a string, aborting`)}else throw Ho(`toString is not a function`);if(!t.isSupported)return e;if(Oe||it(n),t.removed=[],typeof e==`string`&&(Ie=!1),Ie){if(e.nodeName){let t=et(e.nodeName);if(!pe[t]||ve[t])throw Ho(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=ut(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===_s.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!Ae&&!Te&&!De&&e.indexOf(`<`)===-1)return b&&Me?b.createHTML(e):e;if(i=ut(e),!i)return Ae?null:Me?x:``}i&&ke&&ct(i.firstChild);let u=dt(Ie?e:i);for(;c=u.nextNode();)ht(c),D(c),c.content instanceof a&&_t(c.content);if(Ie)return e;if(Ae){if(je)for(l=te.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(he.shadowroot||he.shadowrootmode)&&(l=re.call(r,l,!0)),l}let d=De?i.outerHTML:i.innerHTML;return De&&pe[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Vo(ms,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
-
`+d),
|
|
1
|
+
var LiipGPTChat=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var u={},d=Symbol(),f=`http://www.w3.org/1999/xhtml`,p=`http://www.w3.org/2000/svg`,m=`http://www.w3.org/1998/Math/MathML`,h=`@attach`,g=Array.isArray,_=Array.prototype.indexOf,v=Array.prototype.includes,y=Array.from,b=Object.keys,x=Object.defineProperty,S=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyDescriptors,ee=Object.prototype,te=Array.prototype,ne=Object.getPrototypeOf,re=Object.isExtensible;function ie(e){return typeof e==`function`}var w=()=>{};function ae(e){return typeof e?.then==`function`}function oe(e){return e()}function se(e){for(var t=0;t<e.length;t++)e[t]()}function ce(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var le=1<<24,ue=1024,de=2048,fe=4096,pe=8192,me=16384,he=32768,ge=1<<25,_e=65536,ve=1<<18,ye=1<<19,be=1<<20,xe=1<<25,Se=65536,Ce=1<<21,we=1<<22,Te=1<<23,Ee=Symbol(`$state`),De=Symbol(`legacy props`),Oe=Symbol(``),ke=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ae=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function je(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Fe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Le(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Re(){throw Error(`https://svelte.dev/e/hydration_failed`)}function ze(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Be(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function Ve(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function He(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function We(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Ge(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ke(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function qe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function Je(e){T=e}var Ye;function Xe(e){if(e===null)throw Ge(),u;return Ye=e}function Ze(){return Xe(Rn(Ye))}function E(e){if(T){if(Rn(Ye)!==null)throw Ge(),u;Ye=e}}function Qe(e=1){if(T){for(var t=e,n=Ye;t--;)n=Rn(n);Ye=n}}function $e(e=!0){for(var t=0,n=Ye;;){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=Rn(n);e&&n.remove(),n=i}}function et(e){if(!e||e.nodeType!==8)throw Ge(),u;return e.data}function tt(e){return e===this.v}function nt(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function rt(e){return!nt(e,this.v)}var it=!1,at=!1;function ot(){at=!0}var st=[];function ct(e,t=!1,n=!1){return lt(e,new Map,``,st,null,n)}function lt(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(g(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]=lt(l,t,n,r,null,a))}return s}if(ne(e)===ee){s={},t.set(e,s),i!==null&&t.set(i,s);for(var u of Object.keys(e))s[u]=lt(e[u],t,n,r,null,a);return s}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON==`function`&&!a)return lt(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var ut=null;function dt(e){ut=e}function ft(e){return _t(`getContext`).get(e)}function pt(e,t){let n=_t(`setContext`);if(it){var r=kr.f;!Er&&r&32&&!ut.i||Be()}return n.set(e,t),t}function mt(e){return _t(`hasContext`).has(e)}function ht(){return _t(`getAllContexts`)}function D(e,t=!1,n){ut={p:ut,i:!1,c:null,e:null,s:e,x:null,r:kr,l:at&&!t?{s:null,u:null,$:[]}:null}}function O(e){var t=ut,n=t.e;if(n!==null){t.e=null;for(var r of n)tr(r)}return e!==void 0&&(t.x=e),t.i=!0,ut=t.p,e??{}}function gt(){return!at||ut!==null&&ut.l===null}function _t(e){return ut===null&&je(e),ut.c??=new Map(vt(ut)||void 0)}function vt(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var yt=[];function bt(){var e=yt;yt=[],se(e)}function xt(e){if(yt.length===0&&!Bt){var t=yt;queueMicrotask(()=>{t===yt&&bt()})}yt.push(e)}function St(){for(;yt.length>0;)bt()}function Ct(e){var t=kr;if(t===null)return Er.f|=Te,e;if(!(t.f&32768)&&!(t.f&4))throw e;wt(e,t)}function wt(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 Tt=~(de|fe|ue);function Et(e,t){e.f=e.f&Tt|t}function Dt(e){e.f&512||e.deps===null?Et(e,ue):Et(e,fe)}function Ot(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=Se,Ot(t.deps))}function kt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Ot(e.deps),Et(e,ue)}var At=[];function jt(e,t=w){let n=null,r=new Set;function i(t){if(nt(e,t)&&(e=t,n)){let t=!At.length;for(let t of r)t[1](),At.push(t,e);if(t){for(let e=0;e<At.length;e+=2)At[e][0](At[e+1]);At.length=0}}}function a(t){i(t(e))}function o(o,s=w){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||w),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var Mt=!1,Nt=!1;function Pt(e){var t=Nt;try{return Nt=!1,[e(),Nt]}finally{Nt=t}}var Ft=new Set,It=null,Lt=null,Rt=null,zt=null,Bt=!1,Vt=!1,Ht=null,Ut=null,Wt=0,Gt=1,Kt=class e{id=Gt++;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)Et(n,de),this.schedule(n);for(n of t.m)Et(n,fe),this.schedule(n)}}#d(){if(Wt++>1e3&&(Ft.delete(this),qt()),!this.#u()){for(let e of this.#o)this.#s.delete(e),Et(e,de),this.schedule(e);for(let e of this.#s)Et(e,fe),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=Ht=[],r=[],i=Ut=[];for(let e of t)try{this.#f(e,n,r)}catch(t){throw en(e),t}if(It=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ht=null,Ut=null,this.#u()){this.#p(r),this.#p(n);for(let[e,t]of this.#c)$t(e,t)}else{this.#n===0&&Ft.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Lt=this,Yt(r),Yt(n),Lt=null,this.#i?.resolve()}var o=It;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(Ft.add(o),o.#d()),Ft.has(this)||this.#m()}#f(e,t,n){e.f^=ue;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^=ue:i&4?t.push(r):it&&i&16777224?n.push(r):Hr(r)&&(i&16&&this.#s.add(r),qr(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)kt(e[t],this.#o,this.#s)}capture(e,t){t!==d&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,e.v),Rt?.set(e,e.v))}activate(){It=this}deactivate(){It=null,Rt=null}flush(){try{Vt=!0,It=this,this.#d()}finally{Wt=0,zt=null,Ht=null,Ut=null,Vt=!1,It=null,Rt=null,bn.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),Ft.delete(this)}#m(){for(let s of Ft){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)Xt(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,xt(()=>{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??=ce()).promise}static ensure(){if(It===null){let t=It=new e;Vt||(Ft.add(It),Bt||xt(()=>{It===t&&t.flush()}))}return It}apply(){if(!it||!this.is_fork&&Ft.size===1){Rt=null;return}Rt=new Map(this.current);for(let e of Ft)if(!(e===this||e.is_fork))for(let[t,n]of e.previous)Rt.has(t)||Rt.set(t,n)}schedule(e){if(zt=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(Ht!==null&&t===kr&&(it||(Er===null||!(Er.f&2))&&!Mt))return;if(n&96){if(!(n&1024))return;t.f^=ue}}this.#a.push(t)}};function k(e){var t=Bt;Bt=!0;try{var n;for(e&&(It!==null&&!It.is_fork&&It.flush(),n=e());;){if(St(),It===null)return n;It.flush()}}finally{Bt=t}}function qt(){try{Le()}catch(e){wt(e,zt)}}var Jt=null;function Yt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Hr(r)&&(Jt=new Set,qr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&gr(r),Jt?.size>0)){bn.clear();for(let e of Jt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Jt.has(n)&&(Jt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||qr(n)}}Jt.clear()}}Jt=null}}function Xt(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?Xt(i,t,n,r):e&4194320&&!(e&2048)&&Zt(i,t,r)&&(Et(i,de),Qt(i))}}function Zt(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(v.call(t,r))return!0;if(r.f&2&&Zt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Qt(e){It.schedule(e)}function $t(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Et(e,ue);for(var n=e.first;n!==null;)$t(n,t),n=n.next}}function en(e){Et(e,ue);for(var t=e.first;t!==null;)en(t),t=t.next}function tn(e){let t=0,n=Sn(0),r;return()=>{Qn()&&(L(n),sr(()=>(t===0&&(r=Zr(()=>e(()=>En(n)))),t+=1,()=>{xt(()=>{--t,t===0&&(r?.(),r=void 0,En(n))})})))}}var nn=_e|ye;function rn(e,t,n,r){new an(e,t,n,r)}var an=class{parent;is_pending=!1;transform_error;#e;#t=T?Ye: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=tn(()=>(this.#m=Sn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=kr;t.b=this,t.f|=128,n(e)},this.parent=kr.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=cr(()=>{if(T){let e=this.#t;Ze();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()},nn),T&&(this.#e=Ye)}#g(){try{this.#a=ur(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=ur(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=ur(()=>e(this.#e)),xt(()=>{var e=this.#c=document.createDocumentFragment(),t=In();e.append(t),this.#a=this.#x(()=>ur(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,_r(this.#o,()=>{this.#o=null}),this.#b(It))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=ur(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();xr(this.#a,e);let t=this.#n.pending;this.#o=ur(()=>t(this.#e))}else this.#b(It)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){kt(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=kr,n=Er,r=ut;Ar(this.#i),Or(this.#i),dt(this.#i.ctx);try{return Kt.ensure(),e()}catch(e){return Ct(e),null}finally{Ar(t),Or(n),dt(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&&_r(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,xt(()=>{this.#d=!1,this.#m&&wn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),L(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(mr(this.#a),null),this.#o&&=(mr(this.#o),null),this.#s&&=(mr(this.#s),null),T&&(Xe(this.#t),Qe(),Xe($e()));var r=!1,i=!1;let a=()=>{if(r){qe();return}r=!0,i&&We(),this.#s!==null&&_r(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){wt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return ur(()=>{var t=kr;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return wt(e,this.#i.parent),null}}))};xt(()=>{var t;try{t=this.transform_error(e)}catch(e){wt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>wt(e,this.#i&&this.#i.parent)):o(t)})}};function on(e,t,n,r){let i=gt()?un:fn;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=kr,s=sn(),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||wt(e,o)}cn()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=ln();function d(){Promise.all(n.map(e=>dn(e))).then(e=>l([...t.map(i),...e])).catch(e=>wt(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),cn()}):d()}function sn(){var e=kr,t=Er,n=ut,r=It;return function(i=!0){Ar(e),Or(t),dt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){Ar(null),Or(null),dt(null),e&&It?.deactivate()}function ln(){var e=kr.b,t=It,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 un(e){var t=2|de,n=Er!==null&&Er.f&2?Er:null;return kr!==null&&(kr.f|=ye),{ctx:ut,deps:null,effects:null,equals:tt,f:t,fn:e,reactions:null,rv:0,v:d,wv:0,parent:n??kr,ac:null}}function dn(e,t,n){let r=kr;r===null&&Me();var i=void 0,a=Sn(d),o=!Er,s=new Map;return or(()=>{var t=kr,n=ce();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(cn)}catch(e){n.reject(e),cn()}var c=It;if(o){if(t.f&32768)var l=ln();if(r.b.is_rendered())s.get(c)?.reject(ke),s.delete(c);else{for(let e of s.values())e.reject(ke);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===ke),!(n===ke||t.f&16384)){if(c.activate(),n)a.f|=Te,wn(a,n);else{a.f&8388608&&(a.f^=Te),wn(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(ke)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),$n(()=>{for(let e of s.values())e.reject(ke)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function A(e){let t=un(e);return it||Mr(t),t}function fn(e){let t=un(e);return t.equals=rt,t}function pn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)mr(t[n])}}function mn(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function hn(e){var t,n=kr;Ar(mn(e));try{e.f&=~Se,pn(e),t=Wr(e)}finally{Ar(n)}return t}function gn(e){var t=e.v,n=hn(e);if(!e.equals(n)&&(e.wv=Vr(),(!It?.is_fork||e.deps===null)&&(e.v=n,It?.capture(e,t),e.deps===null))){Et(e,ue);return}wr||(Rt===null?Dt(e):(Qn()||It?.is_fork)&&Rt.set(e,n))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ke),t.teardown=w,t.ac=null,Kr(t,0),fr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&qr(t)}var yn=new Set,bn=new Map,xn=!1;function Sn(e,t){return{f:0,v:e,reactions:null,equals:tt,rv:0,wv:0}}function j(e,t){let n=Sn(e,t);return Mr(n),n}function Cn(e,t=!1,n=!0){let r=Sn(e);return t||(r.equals=rt),at&&n&&ut!==null&&ut.l!==null&&(ut.l.s??=[]).push(r),r}function M(e,t,n=!1){return Er!==null&&(!Dr||Er.f&131072)&>()&&Er.f&4325394&&(jr===null||!v.call(jr,e))&&Ue(),wn(e,n?On(t):t,Ut)}function wn(e,t,n=null){if(!e.equals(t)){var r=e.v;wr?bn.set(e,t):bn.set(e,r),e.v=t;var i=Kt.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&hn(t),Rt===null&&Dt(t)}e.wv=Vr(),Dn(e,de,n),gt()&&kr!==null&&kr.f&1024&&!(kr.f&96)&&(Fr===null?Ir([e]):Fr.push(e)),!i.is_fork&&yn.size>0&&!xn&&Tn()}return t}function Tn(){xn=!1;for(let e of yn)e.f&1024&&Et(e,fe),Hr(e)&&qr(e);yn.clear()}function En(e){M(e,e.v+1)}function Dn(e,t,n){var r=e.reactions;if(r!==null)for(var i=gt(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===kr)){var l=(c&de)===0;if(l&&Et(s,t),c&2){var u=s;Rt?.delete(u),c&65536||(c&512&&(s.f|=Se),Dn(u,fe,n))}else if(l){var d=s;c&16&&Jt!==null&&Jt.add(d),n===null?Qt(d):n.push(d)}}}}function On(e){if(typeof e!=`object`||!e||Ee in e)return e;let t=ne(e);if(t!==ee&&t!==te)return e;var n=new Map,r=g(e),i=j(0),a=null,o=zr,s=e=>{if(zr===o)return e();var t=Er,n=zr;Or(null),Br(o);var r=e();return Or(t),Br(n),r};return r&&n.set(`length`,j(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Ve();var i=n.get(t);return i===void 0?s(()=>{var e=j(r.value,a);return n.set(t,e),e}):M(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>j(d,a));n.set(t,e),En(i)}}else M(r,d),En(i);return!0},get(t,r,i){if(r===Ee)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||S(t,r)?.writable)&&(o=s(()=>j(On(c?t[r]:d),a)),n.set(r,o)),o!==void 0){var l=L(o);return l===d?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=L(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==d)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Ee)return!0;var r=n.get(t),i=r!==void 0&&r.v!==d||Reflect.has(e,t);return(r!==void 0||kr!==null&&(!i||S(e,t)?.writable))&&(r===void 0&&(r=s(()=>j(i?On(e[t]):d,a)),n.set(t,r)),L(r)===d)?!1:i},set(e,t,o,c){var l=n.get(t),u=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(()=>j(d,a)),n.set(f+``,p)):M(p,d)}if(l===void 0)(!u||S(e,t)?.writable)&&(l=s(()=>j(void 0,a)),M(l,On(o)),n.set(t,l));else{u=l.v!==d;var m=s(()=>On(o));M(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&M(g,_+1)}En(i)}return!0},ownKeys(e){L(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==d});for(var[r,a]of n)a.v!==d&&!(r in e)&&t.push(r);return t},setPrototypeOf(){He()}})}function kn(e){try{if(typeof e==`object`&&e&&Ee in e)return e[Ee]}catch{}return e}function An(e,t){return Object.is(kn(e),kn(t))}var jn,Mn,Nn,Pn;function Fn(){if(jn===void 0){jn=window,Mn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Nn=S(t,`firstChild`).get,Pn=S(t,`nextSibling`).get,re(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),re(n)&&(n.__t=void 0)}}function In(e=``){return document.createTextNode(e)}function Ln(e){return Nn.call(e)}function Rn(e){return Pn.call(e)}function N(e,t){if(!T)return Ln(e);var n=Ln(Ye);if(n===null)n=Ye.appendChild(In());else if(t&&n.nodeType!==3){var r=In();return n?.before(r),Xe(r),r}return t&&Hn(n),Xe(n),n}function P(e,t=!1){if(!T){var n=Ln(e);return n instanceof Comment&&n.data===``?Rn(n):n}if(t){if(Ye?.nodeType!==3){var r=In();return Ye?.before(r),Xe(r),r}Hn(Ye)}return Ye}function F(e,t=1,n=!1){let r=T?Ye:e;for(var i;t--;)i=r,r=Rn(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=In();return r===null?i?.after(a):r.before(a),Xe(a),a}Hn(r)}return Xe(r),r}function zn(e){e.textContent=``}function Bn(){return!it||Jt!==null?!1:(kr.f&he)!==0}function Vn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Hn(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 Un(e,t){if(t){let t=document.body;e.autofocus=!0,xt(()=>{document.activeElement===t&&e.focus()})}}function Wn(e){T&&Ln(e)!==null&&zn(e)}var Gn=!1;function Kn(){Gn||(Gn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function qn(e){var t=Er,n=kr;Or(null),Ar(null);try{return e()}finally{Or(t),Ar(n)}}function Jn(e,t,n,r=n){e.addEventListener(t,()=>qn(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Kn()}function Yn(e){kr===null&&(Er===null&&Ie(e),Fe()),wr&&Pe(e)}function Xn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Zn(e,t){var n=kr;n!==null&&n.f&8192&&(e|=pe);var r={ctx:ut,deps:null,nodes:null,f:e|de|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)Ht===null?Kt.ensure().schedule(r):Ht.push(r);else if(t!==null){try{qr(r)}catch(e){throw mr(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|=_e))}if(i!==null&&(i.parent=n,n!==null&&Xn(i,n),Er!==null&&Er.f&2&&!(e&64))){var a=Er;(a.effects??=[]).push(i)}return r}function Qn(){return Er!==null&&!Dr}function $n(e){let t=Zn(8,null);return Et(t,ue),t.teardown=e,t}function er(e){Yn(`$effect`);var t=kr.f;if(!Er&&t&32&&!(t&32768)){var n=ut;(n.e??=[]).push(e)}else return tr(e)}function tr(e){return Zn(4|be,e)}function nr(e){return Yn(`$effect.pre`),Zn(8|be,e)}function rr(e){Kt.ensure();let t=Zn(64|ye,e);return()=>{mr(t)}}function ir(e){Kt.ensure();let t=Zn(64|ye,e);return(e={})=>new Promise(n=>{e.outro?_r(t,()=>{mr(t),n(void 0)}):(mr(t),n(void 0))})}function ar(e){return Zn(4,e)}function or(e){return Zn(we|ye,e)}function sr(e,t=0){return Zn(8|t,e)}function I(e,t=[],n=[],r=[]){on(r,t,n,t=>{Zn(8,()=>e(...t.map(L)))})}function cr(e,t=0){return Zn(16|t,e)}function lr(e,t=0){return Zn(le|t,e)}function ur(e){return Zn(32|ye,e)}function dr(e){var t=e.teardown;if(t!==null){let e=wr,n=Er;Tr(!0),Or(null);try{t.call(null)}finally{Tr(e),Or(n)}}}function fr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&qn(()=>{e.abort(ke)});var r=n.next;n.f&64?n.parent=null:mr(n,t),n=r}}function pr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||mr(t),t=n}}function mr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(hr(e.nodes.start,e.nodes.end),n=!0),Et(e,ge),fr(e,t&&!n),Kr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();dr(e),e.f^=ge,e.f|=me;var i=e.parent;i!==null&&i.first!==null&&gr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function hr(e,t){for(;e!==null;){var n=e===t?null:Rn(e);e.remove(),e=n}}function gr(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 _r(e,t,n=!0){var r=[];vr(e,r,!0);var i=()=>{n&&mr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function vr(e,t,n){if(!(e.f&8192)){e.f^=pe;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;vr(i,t,o?n:!1),i=a}}}function yr(e){br(e,!0)}function br(e,t){if(e.f&8192){e.f^=pe,e.f&1024||(Et(e,de),Kt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;br(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 xr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Rn(n);t.append(n),n=i}}var Sr=null,Cr=!1,wr=!1;function Tr(e){wr=e}var Er=null,Dr=!1;function Or(e){Er=e}var kr=null;function Ar(e){kr=e}var jr=null;function Mr(e){Er!==null&&(!it||Er.f&2)&&(jr===null?jr=[e]:jr.push(e))}var Nr=null,Pr=0,Fr=null;function Ir(e){Fr=e}var Lr=1,Rr=0,zr=Rr;function Br(e){zr=e}function Vr(){return++Lr}function Hr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~Se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Hr(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Rt===null&&Et(e,ue)}return!1}function Ur(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!it&&jr!==null&&v.call(jr,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ur(a,t,!1):t===a&&(n?Et(a,de):a.f&1024&&Et(a,fe),Qt(a))}}function Wr(e){var t=Nr,n=Pr,r=Fr,i=Er,a=jr,o=ut,s=Dr,c=zr,l=e.f;Nr=null,Pr=0,Fr=null,Er=l&96?null:e,jr=null,dt(e.ctx),Dr=!1,zr=++Rr,e.ac!==null&&(qn(()=>{e.ac.abort(ke)}),e.ac=null);try{e.f|=Ce;var u=e.fn,d=u();e.f|=he;var f=e.deps,p=It?.is_fork;if(Nr!==null){var m;if(p||Kr(e,Pr),f!==null&&Pr>0)for(f.length=Pr+Nr.length,m=0;m<Nr.length;m++)f[Pr+m]=Nr[m];else e.deps=f=Nr;if(Qn()&&e.f&512)for(m=Pr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Pr<f.length&&(Kr(e,Pr),f.length=Pr);if(gt()&&Fr!==null&&!Dr&&f!==null&&!(e.f&6146))for(m=0;m<Fr.length;m++)Ur(Fr[m],e);if(i!==null&&i!==e){if(Rr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Rr;if(t!==null)for(let e of t)e.rv=Rr;Fr!==null&&(r===null?r=Fr:r.push(...Fr))}return e.f&8388608&&(e.f^=Te),d}catch(e){return Ct(e)}finally{e.f^=Ce,Nr=t,Pr=n,Fr=r,Er=i,jr=a,dt(o),Dr=s,zr=c}}function Gr(e,t){let n=t.reactions;if(n!==null){var r=_.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&&(Nr===null||!v.call(Nr,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~Se),Dt(a),_n(a),Kr(a,0)}}function Kr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Gr(e,n[r])}function qr(e){var t=e.f;if(!(t&16384)){Et(e,ue);var n=kr,r=Cr;kr=e,Cr=!0;try{t&16777232?pr(e):fr(e),dr(e);var i=Wr(e);e.teardown=typeof i==`function`?i:null,e.wv=Lr}finally{Cr=r,kr=n}}}async function Jr(){if(it)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),k()}function L(e){var t=(e.f&2)!=0;if(Sr?.add(e),Er!==null&&!Dr&&!(kr!==null&&kr.f&16384)&&(jr===null||!v.call(jr,e))){var n=Er.deps;if(Er.f&2097152)e.rv<Rr&&(e.rv=Rr,Nr===null&&n!==null&&n[Pr]===e?Pr++:Nr===null?Nr=[e]:Nr.push(e));else{(Er.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[Er]:v.call(r,Er)||r.push(Er)}}if(wr&&bn.has(e))return bn.get(e);if(t){var i=e;if(wr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Xr(i))&&(a=hn(i)),bn.set(i,a),a}var o=(i.f&512)==0&&!Dr&&Er!==null&&(Cr||(Er.f&512)!=0),s=(i.f&he)===0;Hr(i)&&(o&&(i.f|=512),gn(i)),o&&!s&&(vn(i),Yr(i))}if(Rt?.has(e))return Rt.get(e);if(e.f&8388608)throw e.v;return e.v}function Yr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(vn(t),Yr(t))}function Xr(e){if(e.v===d)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(bn.has(t)||t.f&2&&Xr(t))return!0;return!1}function Zr(e){var t=Dr;try{return Dr=!0,e()}finally{Dr=t}}function Qr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(Ee in e)$r(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&Ee in n&&$r(n)}}}function $r(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{$r(e[n],t)}catch{}let n=ne(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=C(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}var ei=Symbol(`events`),ti=new Set,ni=new Set;function ri(e,t,n,r={}){function i(e){if(r.capture||li.call(t,e),!e.cancelBubble)return qn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?xt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ii(e,t,n,r={}){var i=ri(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function ai(e,t,n,r,i){var a={capture:r,passive:i},o=ri(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&$n(()=>{t.removeEventListener(e,o,a)})}function oi(e,t,n){(t[ei]??={})[e]=n}function si(e){for(var t=0;t<e.length;t++)ti.add(e[t]);for(var n of ni)n(e)}var ci=null;function li(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ci=e;var o=0,s=ci===e&&e[ei];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ei]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){x(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=Er,d=kr;Or(null),Ar(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[ei]?.[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[ei]=t,delete e.currentTarget,Or(u),Ar(d)}}}var ui=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function di(e){return ui?.createHTML(e)??e}function fi(e){var t=Vn(`template`);return t.innerHTML=di(e.replaceAll(`<!>`,`<!---->`)),t.content}function pi(e,t){var n=kr;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function R(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return pi(Ye,null),Ye;i===void 0&&(i=fi(a?e:`<!>`+e),n||(i=Ln(i)));var t=r||Mn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Ln(t),s=t.lastChild;pi(o,s)}else pi(t,t);return t}}function mi(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return pi(Ye,null),Ye;if(!o){var e=Ln(fi(a));if(i)for(o=document.createDocumentFragment();Ln(e);)o.appendChild(Ln(e));else o=Ln(e)}var t=o.cloneNode(!0);if(i){var n=Ln(t),r=t.lastChild;pi(n,r)}else pi(t,t);return t}}function hi(e,t){return mi(e,t,`svg`)}function gi(e=``){if(!T){var t=In(e+``);return pi(t,t),t}var n=Ye;return n.nodeType===3?Hn(n):(n.before(n=In()),Xe(n)),pi(n,n),n}function z(){if(T)return pi(Ye,null),Ye;var e=document.createDocumentFragment(),t=document.createComment(``),n=In();return e.append(t,n),pi(t,n),e}function B(e,t){if(T){var n=kr;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ye),Ze();return}e!==null&&e.before(t)}function _i(){if(T&&Ye&&Ye.nodeType===8&&Ye.textContent?.startsWith(`$`)){let e=Ye.textContent.substring(1);return Ze(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function vi(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var yi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function bi(e){return yi.includes(e)}var xi=`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(`.`),Si={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 Ci(e){return e=e.toLowerCase(),Si[e]??e}[...xi];var wi=[`touchstart`,`touchmove`];function Ti(e){return wi.includes(e)}var Ei=[`textarea`,`script`,`style`,`title`];function Di(e){return Ei.includes(e)}var Oi=!0;function ki(e){Oi=e}function V(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){Fn(),t.intro=t.intro??!1;let n=t.target,r=T,i=Ye;try{for(var a=Ln(n);a&&(a.nodeType!==8||a.data!==`[`);)a=Rn(a);if(!a)throw u;Je(!0),Xe(a);let r=Ni(e,{...t,anchor:a});return Je(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
|
|
2
|
+
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==u&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Re(),Fn(),zn(n),Je(!1),Ai(e,t)}finally{Je(r),Xe(i)}}var Mi=new Map;function Ni(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){Fn();var c=void 0,l=ir(()=>{var l=n??t.appendChild(In());rn(l,{pending:()=>{}},t=>{D({});var n=ut;if(a&&(n.c=a),i&&(r.$$events=i),T&&pi(t,null),Oi=o,c=e(t,r)||{},Oi=!0,T&&(kr.nodes.end=Ye,Ye===null||Ye.nodeType!==8||Ye.data!==`]`))throw Ge(),u;O()},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=Ti(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,li,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(y(ti)),ni.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,li),r.delete(e),r.size===0&&Mi.delete(n)):r.set(e,i)}ni.delete(f),l!==n&&l.parentNode?.removeChild(l)}});return Pi.set(c,l),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)yr(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&&(mr(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();xr(r,t),t.append(In()),this.#n.set(e,{effect:r,fragment:t})}else mr(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),_r(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)||(mr(n.effect),this.#n.delete(e))};ensure(e,t){var n=It,r=Bn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=In();i.append(a),this.#n.set(e,{effect:ur(()=>t(a)),fragment:i})}else this.#t.set(e,ur(()=>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 T&&(this.anchor=Ye),this.#a(n)}};function H(e,t,...n){var r=new Ii(e);cr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},_e)}function Li(e){ut===null&&je(`onMount`),at&&ut.l!==null?zi(ut).m.push(e):er(()=>{let t=Zr(e);if(typeof t==`function`)return t})}function Ri(e){ut===null&&je(`onDestroy`),Li(()=>()=>Zr(e))}function zi(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Bi(){return Symbol(h)}var Vi=0,Hi=1,Ui=2;function Wi(e,t,n,r,i){T&&Ze();var a=gt(),o=d,s=a?Sn(o):Cn(o,!1,!1),c=a?Sn(o):Cn(o,!1,!1),l=new Ii(e);cr(()=>{var a=It;a.deactivate();var o=t();a.activate();var u=!1;let d=T&&ae(o)===(e.data===`[!`);if(d&&(Xe($e()),Je(!1)),ae(o)){var f=sn(),p=!1;let e=e=>{if(!u){p=!0,f(!1),Kt.ensure(),T&&Je(!1);try{e()}finally{cn(!1),Bt||k()}}};o.then(t=>{e(()=>{wn(s,t),l.ensure(Hi,r&&(e=>r(e,s)))})},t=>{e(()=>{if(wn(c,t),l.ensure(Ui,i&&(e=>i(e,c))),!i)throw c.v})}),T?l.ensure(Vi,n):xt(()=>{p||e(()=>{l.ensure(Vi,n)})})}else wn(s,o),l.ensure(Hi,r&&(e=>r(e,s)));return d&&Je(!0),()=>{u=!0}})}function U(e,t,n=!1){var r;T&&(r=Ye,Ze());var i=new Ii(e),a=n?_e:0;function o(e,t){if(T){var n=et(r);if(e!==parseInt(n.substring(1))){var a=$e();Xe(a),i.anchor=a,Je(!1),i.ensure(e,t),Je(!0);return}}i.ensure(e,t)}cr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Gi=Symbol(`NaN`);function Ki(e,t,n){T&&Ze();var r=new Ii(e),i=!gt();cr(()=>{var e=t();e!==e&&(e=Gi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function qi(e,t){return t}function Ji(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];_r(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Yi(e,y(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;zn(u),u.append(l),e.items.clear()}Yi(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Yi(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|=xe,xr(a,document.createDocumentFragment())):mr(t[i],n)}}var Xi;function Zi(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=T?Xe(Ln(c)):c.appendChild(In())}T&&Ze();var l=null,u=fn(()=>{var e=n();return g(e)?e:e==null?[]:y(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,$i(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=xe,ta(l,null,o)):yr(l):_r(l,()=>{l=null})))}function h(e){_.pending.delete(e)}var _={effect:cr(()=>{d=L(u);var e=d.length;let c=!1;T&&et(o)===`[!`!=(e===0)&&(o=$e(),Xe(o),Je(!1),c=!0);for(var g=new Set,_=It,v=Bn(),y=0;y<e;y+=1){T&&Ye.nodeType===8&&Ye.data===`]`&&(o=Ye,c=!0,Je(!1));var b=d[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&wn(S.v,b),S.i&&wn(S.i,y),v&&_.unskip_effect(S.e)):(S=ea(s,p?o:Xi??=In(),b,x,y,i,t,n),p||(S.e.f|=xe),s.set(x,S)),g.add(x)}if(e===0&&a&&!l&&(p?l=ur(()=>a(o)):(l=ur(()=>a(Xi??=In())),l.f|=xe)),e>g.size&&Ne(``,``,``),T&&e>0&&Xe($e()),!p)if(f.set(_,g),v){for(let[e,t]of s)g.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(h)}else m(_);c&&Je(!0),L(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,T&&(o=Ye)}function Qi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function $i(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Qi(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&&(yr(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=xe,g===c)ta(g,null,n);else{var v=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),na(e,u,g),na(e,g,v),ta(g,v,n),u=g,f=[],p=[],c=Qi(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 S=f[0],C=f[f.length-1];for(x=0;x<f.length;x+=1)ta(f[x],b,n);for(x=0;x<p.length;x+=1)l.delete(p[x]);na(e,S.prev,C.next),na(e,u,S),na(e,C,b),c=b,u=C,--_,f=[],p=[]}else l.delete(g),ta(g,c,n),na(e,g.prev,g.next),na(e,g,u===null?e.effect.first:u.next),na(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Qi(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=Qi(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Yi(e,y(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var ee=[];if(l!==void 0)for(g of l)g.f&8192||ee.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&ee.push(c),c=Qi(c.next);var te=ee.length;if(te>0){var ne=r&4&&o===0?n:null;if(a){for(_=0;_<te;_+=1)ee[_].nodes?.a?.measure();for(_=0;_<te;_+=1)ee[_].nodes?.a?.fix()}Ji(e,ee,ne)}}a&&xt(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function ea(e,t,n,r,i,a,o,s){var c=o&1?o&16?Sn(n):Cn(n,!1,!1):null,l=o&2?Sn(i):null;return{v:c,i:l,e:ur(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ta(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=Rn(r);if(a.before(r),r===i)return;r=o}}function na(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function ra(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;T&&(o=Xe(Ln(c)))}I(()=>{var e=kr;if(s===(s=t()??``)){T&&Ze();return}if(n&&!T){e.nodes=null,c.innerHTML=s,s!==``&&pi(Ln(c),c.lastChild);return}if(e.nodes!==null&&(hr(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(T){for(var a=Ye.data,l=Ze(),d=l;l!==null&&(l.nodeType!==8||l.data!==``);)d=l,l=Rn(l);if(l===null)throw Ge(),u;pi(Ye,d),o=Xe(l);return}var f=Vn(r?`svg`:i?`math`:`template`,r?p:i?m:void 0);f.innerHTML=s;var h=r||i?f:f.content;if(pi(Ln(h),h.lastChild),r||i)for(;Ln(h);)o.before(Ln(h));else o.before(h)}})}function ia(e,t,n,r,i){T&&Ze();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 W(e,t,n){var r;T&&(r=Ye,Ze());var i=new Ii(e);cr(()=>{var e=t()??null;if(T&&et(r)===`[`!=(e!==null)){var a=$e();Xe(a),i.anchor=a,Je(!1),i.ensure(e,e&&(t=>n(t,e))),Je(!0);return}i.ensure(e,e&&(t=>n(t,e)))},_e)}var aa=()=>performance.now(),oa={tick:e=>requestAnimationFrame(e),now:()=>aa(),tasks:new Set};function sa(){let e=oa.now();oa.tasks.forEach(t=>{t.c(e)||(oa.tasks.delete(t),t.f())}),oa.tasks.size!==0&&oa.tick(sa)}function ca(e){let t;return oa.tasks.size===0&&oa.tick(sa),{promise:new Promise(n=>{oa.tasks.add(t={c:e,f:n})}),abort(){oa.tasks.delete(t)}}}function la(e,t){qn(()=>{e.dispatchEvent(new CustomEvent(t))})}function ua(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 da(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=ua(n.trim());t[i]=r.trim()}return t}var fa=e=>e;function pa(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 qn(()=>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=ma(t,m(),p,1,()=>{la(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=ma(t,m(),f,0,()=>{la(t,`outroend`),e?.()})},stop:()=>{f?.abort(),p?.abort()}},g=kr;if((g.nodes.t??=[]).push(h),i&&Oi){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||(v.f&32768)!=0}_&&ar(()=>{Zr(()=>h.in())})}}function ma(e,t,n,r,i){var a=r===1;if(ie(t)){var o,s=!1;return xt(()=>{s||(o=ma(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 la(e,a?`introstart`:`outrostart`),i(),{abort:w,deactivate:w,reset:w,t:()=>r};let{delay:c=0,css:l,tick:u,easing:d=fa}=t;var f=[];if(a&&n===void 0&&(u&&u(0,1),l)){var p=da(l(0,1));f.push(p,p)}var m=()=>1-r,h=e.animate(f,{duration:c,fill:`forwards`});return h.onfinish=()=>{h.cancel(),la(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=da(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&&ca(()=>{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=w)},deactivate:()=>{i=w},reset:()=>{r===0&&u?.(1,0)},t:()=>m()}}function ha(e,t,n,r,i,a){let o=T;T&&Ze();var s=null;T&&Ye.nodeType===1&&(s=Ye,Ze());var c=T?Ye:e,l=new Ii(c,!1);cr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?p:void 0;if(e===null){l.ensure(null,null),ki(!0);return}return l.ensure(e,t=>{if(e){if(s=T?s:Vn(e,a),pi(s,s),r){T&&Di(e)&&s.append(document.createComment(``));var n=T?Ln(s):s.appendChild(In());T&&(n===null?Je(!1):Xe(n)),r(s,n)}kr.nodes.end=s,t.before(s)}T&&Xe(t)}),ki(!0),()=>{e&&ki(!1)}},_e),$n(()=>{ki(!0)}),o&&(Je(!0),Xe(c))}function ga(e,t){let n=null,r=T;var i;if(T){n=Ye;for(var a=Ln(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=Rn(a);if(a===null)Je(!1);else{var o=Rn(a);a.remove(),Xe(o)}}T||(i=document.head.appendChild(In()));try{cr(()=>t(i),ve|ye)}finally{r&&(Je(!0),Xe(n))}}function _a(e,t){ar(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Vn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function va(e,t,n){ar(()=>{var r=Zr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};sr(()=>{var e=n();Qr(e),i&&nt(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function ya(e,t){var n=void 0,r;lr(()=>{n!==(n=t())&&(r&&=(mr(r),null),n&&(r=ur(()=>{ar(()=>n(e))})))})}function ba(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=ba(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function xa(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ba(e))&&(r&&(r+=` `),r+=t);return r}function Sa(e){return typeof e==`object`?xa(e):e??``}var Ca=[...`
|
|
3
|
+
\r\f\xA0\v`];function wa(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||Ca.includes(r[o-1]))&&(s===r.length||Ca.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ta(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 Ea(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Da(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(Ea)),i&&c.push(...Object.keys(i).map(Ea));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=Ea(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+=Ta(r)),i&&(n+=Ta(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Oa(e,t,n,r,i,a){var o=e.__className;if(T||o!==n||o===void 0){var s=wa(n,r,a);(!T||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 ka(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 Aa(e,t,n,r){var i=e.__style;if(T||i!==t){var a=Da(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(ka(e,n?.[0],r[0]),ka(e,n?.[1],r[1],`important`)):ka(e,n,r));return r}function ja(e,t,n=!1){if(e.multiple){if(t==null)return;if(!g(t))return Ke();for(var r of e.options)r.selected=t.includes(Na(r));return}for(r of e.options)if(An(Na(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Ma(e){var t=new MutationObserver(()=>{ja(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),$n(()=>{t.disconnect()})}function Na(e){return`__value`in e?e.__value:e.value}var Pa=Symbol(`class`),Fa=Symbol(`style`),Ia=Symbol(`is custom element`),La=Symbol(`is html`),Ra=Ae?`link`:`LINK`,za=Ae?`input`:`INPUT`,Ba=Ae?`option`:`OPTION`,Va=Ae?`select`:`SELECT`,Ha=Ae?`progress`:`PROGRESS`;function Ua(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;G(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;G(e,`checked`,null),e.checked=r}}};e.__on_r=n,xt(n),Kn()}}function Wa(e,t){var n=Ja(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Ha)||(e.value=t??``)}function Ga(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function G(e,t,n,r){var i=Ja(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ra)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Oe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Xa(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ka(e,t,n,r,i=!1,a=!1){if(T&&i&&e.nodeName===za){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||Ua(o)}var s=Ja(e),c=s[Ia],l=!s[La];let u=T&&c;u&&Je(!1);var f=t||{},p=e.nodeName===Ba;for(var m in t)m in n||(n[m]=null);n.class?n.class=Sa(n.class):(r||n[Pa])&&(n.class=null),n[Fa]&&(n.style??=null);var h=Xa(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`){Oa(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[Pa],n[Pa]),f[i]=o,f[Pa]=n[Pa];continue}if(i===`style`){Aa(e,o,t?.[Fa],n[Fa]),f[i]=o,f[Fa]=n[Fa];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=bi(r);if(vi(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)oi(r,e,o),si([r]);else if(o!=null){function a(e){f[i].call(this,e)}f[n]=ri(r,e,a,t)}}else if(i===`style`)G(e,i,o);else if(i===`autofocus`)Un(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&p)Ga(e,o);else{var y=i;l||(y=Ci(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]=d)):typeof o!=`function`&&G(e,y,o,a)}}}return u&&Je(!0),f}function qa(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===Va,l=!1;if(lr(()=>{var u=t(...n.map(L)),d=Ka(e,r,u,a,o,s);l&&c&&`value`in u&&ja(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||mr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&mr(i[t]),i[t]=ur(()=>ya(e,()=>f))),d[t]=f}r=d}),c){var u=e;ar(()=>{ja(u,r.value,!0),Ma(u)})}l=!0})}function Ja(e){return e.__attributes??={[Ia]:e.nodeName.includes(`-`),[La]:e.namespaceURI===f}}var Ya=new Map;function Xa(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ya.get(t);if(n)return n;Ya.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=C(i),r)r[o].set&&n.push(o);i=ne(i)}return n}function Za(e,t,n=t){var r=new WeakSet;Jn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=to(e)?no(a):a,n(a),It!==null&&r.add(It),await Jr(),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))}}}),(T&&e.defaultValue!==e.value||Zr(t)==null&&e.value)&&(n(to(e)?no(e.value):e.value),It!==null&&r.add(It)),sr(()=>{var n=t();if(e===document.activeElement){var i=it?Lt:It;if(r.has(i))return}to(e)&&n===no(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}var Qa=new Set;function $a(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),Jn(n,`change`,()=>{var e=n.__value;a&&(e=eo(o,e,n.checked)),i(e)},()=>i(a?[]:null)),sr(()=>{var e=r();if(T&&n.defaultChecked!==n.checked){s=!0;return}a?(e||=[],n.checked=e.includes(n.__value)):n.checked=An(n.__value,e)}),$n(()=>{var e=o.indexOf(n);e!==-1&&o.splice(e,1)}),Qa.has(o)||(Qa.add(o),xt(()=>{o.sort((e,t)=>e.compareDocumentPosition(t)===4?-1:1),Qa.delete(o)})),xt(()=>{if(s){var e=a?eo(o,e,n.checked):o.find(e=>e.checked)?.__value;i(e)}})}function eo(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 to(e){var t=e.type;return t===`number`||t===`range`}function no(e){return e===``?null:+e}var ro=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 io(e,t,n){var r=ro.observe(e,()=>n(e[t]));ar(()=>(Zr(()=>n(e[t])),r))}function ao(e,t){return e===t||e?.[Ee]===t}function oo(e={},t,n,r){var i=ut.r,a=kr;return ar(()=>{var o,s;return sr(()=>{o=s,s=r?.()||[],Zr(()=>{e!==n(...s)&&(t(e,...s),o&&ao(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&&ao(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function so(e=!1){let t=ut,n=t.l.u;if(!n)return;let r=()=>Qr(t.s);if(e){let e=0,n={},i=un(()=>{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=()=>L(i)}n.b.length&&nr(()=>{co(t,r),se(n.b)}),er(()=>{let e=Zr(()=>n.m.map(oe));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&er(()=>{co(t,r),se(n.a)})}function co(e,t){if(e.l.s)for(let t of e.l.s)L(t);t()}var lo={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 uo(e,t,n){return new Proxy({props:e,exclude:t},lo)}var fo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(ie(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];ie(i)&&(i=i());let a=S(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(ie(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=S(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===Ee||t===De)return!1;for(let n of e.props)if(ie(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(ie(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 po(...e){return new Proxy({props:e},fo)}function K(e,t,n,r){var i=!at||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Zr(r):r),s);let u;if(a){var d=Ee in e||De in e;u=S(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Pt(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&ze(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?un:fn)(()=>(g=!1,m()));a&&L(_);var v=kr;return(function(e,t){if(arguments.length>0){let n=t?L(_):i&&a?On(e):e;return M(_,n),g=!0,s!==void 0&&(s=n),e}return wr&&g||v.f&16384?_.v:L(_)})}function mo(e){return new ho(e)}var ho=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Cn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return L(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===De?!0:(L(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return M(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}),!it&&(!e?.props?.$$host||e.sync===!1)&&k(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||x(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()}},go;typeof HTMLElement==`function`&&(go=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=Vn(`slot`);e!==`default`&&(n.name=e),B(t,n)}}let t={},n=vo(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]=_o(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=mo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=rr(()=>{sr(()=>{this.$$r=!0;for(let e of b(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=_o(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]=_o(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 b(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function _o(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 vo(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function q(e,t,n,r,i,a){let o=class extends go{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return b(t).map(e=>(t[e].attribute||e).toLowerCase())}};return b(t).forEach(e=>{x(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=_o(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(S(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{x(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var{entries:yo,setPrototypeOf:bo,isFrozen:xo,getPrototypeOf:So,getOwnPropertyDescriptor:Co}=Object,{freeze:wo,seal:To,create:Eo}=Object,{apply:Do,construct:Oo}=typeof Reflect<`u`&&Reflect;wo||=function(e){return e},To||=function(e){return e},Do||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},Oo||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var ko=Uo(Array.prototype.forEach),Ao=Uo(Array.prototype.lastIndexOf),jo=Uo(Array.prototype.pop),Mo=Uo(Array.prototype.push),No=Uo(Array.prototype.splice),Po=Uo(String.prototype.toLowerCase),Fo=Uo(String.prototype.toString),Io=Uo(String.prototype.match),Lo=Uo(String.prototype.replace),Ro=Uo(String.prototype.indexOf),zo=Uo(String.prototype.trim),Bo=Uo(Object.prototype.hasOwnProperty),Vo=Uo(RegExp.prototype.test),Ho=Wo(TypeError);function Uo(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Do(e,t,r)}}function Wo(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Oo(e,n)}}function Go(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Po;bo&&bo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(xo(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ko(e){for(let t=0;t<e.length;t++)Bo(e,t)||(e[t]=null);return e}function qo(e){let t=Eo(null);for(let[n,r]of yo(e))Bo(e,n)&&(Array.isArray(r)?t[n]=Ko(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=qo(r):t[n]=r);return t}function Jo(e,t){for(;e!==null;){let n=Co(e,t);if(n){if(n.get)return Uo(n.get);if(typeof n.value==`function`)return Uo(n.value)}e=So(e)}function n(){return null}return n}var Yo=wo(`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(`.`)),Xo=wo(`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(`.`)),Zo=wo([`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`]),Qo=wo([`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`]),$o=wo(`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(`.`)),es=wo([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ts=wo([`#text`]),ns=wo(`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(`.`)),rs=wo(`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(`.`)),is=wo(`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(`.`)),as=wo([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),os=To(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ss=To(/<%[\w\W]*|[\w\W]*%>/gm),cs=To(/\$\{[\w\W]*/gm),ls=To(/^data-[\-\w.\u00B7-\uFFFF]+$/),us=To(/^aria-[\-\w]+$/),ds=To(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fs=To(/^(?:\w+script|data):/i),ps=To(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ms=To(/^html$/i),hs=To(/^[a-z][.\w]*(-[.\w]+)+$/i),gs=Object.freeze({__proto__:null,ARIA_ATTR:us,ATTR_WHITESPACE:ps,CUSTOM_ELEMENT:hs,DATA_ATTR:ls,DOCTYPE_NAME:ms,ERB_EXPR:ss,IS_ALLOWED_URI:ds,IS_SCRIPT_OR_DATA:fs,MUSTACHE_EXPR:os,TMPLIT_EXPR:cs}),_s={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vs=function(){return typeof window>`u`?null:window},ys=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}},bs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vs(),t=e=>xs(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==_s.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=Jo(m,`cloneNode`),g=Jo(m,`remove`),_=Jo(m,`nextSibling`),v=Jo(m,`childNodes`),y=Jo(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:ee,getElementsByTagName:te}=n,{importNode:ne}=r,re=bs();t.isSupported=typeof yo==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ie,ERB_EXPR:w,TMPLIT_EXPR:ae,DATA_ATTR:oe,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:ce,ATTR_WHITESPACE:le,CUSTOM_ELEMENT:ue}=gs,{IS_ALLOWED_URI:de}=gs,fe=null,pe=Go({},[...Yo,...Xo,...Zo,...$o,...ts]),me=null,he=Go({},[...ns,...rs,...is,...as]),ge=Object.seal(Eo(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}})),_e=null,ve=null,ye=Object.seal(Eo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),be=!0,xe=!0,Se=!1,Ce=!0,we=!1,Te=!0,Ee=!1,De=!1,Oe=!1,ke=!1,Ae=!1,je=!1,Me=!0,Ne=!1,Pe=!0,Fe=!1,Ie={},Le=null,Re=Go({},[`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`]),ze=null,Be=Go({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ve=null,He=Go({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ue=`http://www.w3.org/1998/Math/MathML`,We=`http://www.w3.org/2000/svg`,Ge=`http://www.w3.org/1999/xhtml`,Ke=Ge,qe=!1,T=null,Je=Go({},[Ue,We,Ge],Fo),Ye=Go({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Xe=Go({},[`annotation-xml`]),Ze=Go({},[`title`,`style`,`font`,`a`,`script`]),E=null,Qe=[`application/xhtml+xml`,`text/html`],$e=null,et=null,tt=n.createElement(`form`),nt=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(et&&et===e)){if((!e||typeof e!=`object`)&&(e={}),e=qo(e),E=Qe.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,$e=E===`application/xhtml+xml`?Fo:Po,fe=Bo(e,`ALLOWED_TAGS`)?Go({},e.ALLOWED_TAGS,$e):pe,me=Bo(e,`ALLOWED_ATTR`)?Go({},e.ALLOWED_ATTR,$e):he,T=Bo(e,`ALLOWED_NAMESPACES`)?Go({},e.ALLOWED_NAMESPACES,Fo):Je,Ve=Bo(e,`ADD_URI_SAFE_ATTR`)?Go(qo(He),e.ADD_URI_SAFE_ATTR,$e):He,ze=Bo(e,`ADD_DATA_URI_TAGS`)?Go(qo(Be),e.ADD_DATA_URI_TAGS,$e):Be,Le=Bo(e,`FORBID_CONTENTS`)?Go({},e.FORBID_CONTENTS,$e):Re,_e=Bo(e,`FORBID_TAGS`)?Go({},e.FORBID_TAGS,$e):qo({}),ve=Bo(e,`FORBID_ATTR`)?Go({},e.FORBID_ATTR,$e):qo({}),Ie=Bo(e,`USE_PROFILES`)?e.USE_PROFILES:!1,be=e.ALLOW_ARIA_ATTR!==!1,xe=e.ALLOW_DATA_ATTR!==!1,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=e.SAFE_FOR_TEMPLATES||!1,Te=e.SAFE_FOR_XML!==!1,Ee=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Ae=e.RETURN_DOM_FRAGMENT||!1,je=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Me=e.SANITIZE_DOM!==!1,Ne=e.SANITIZE_NAMED_PROPS||!1,Pe=e.KEEP_CONTENT!==!1,Fe=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||ds,Ke=e.NAMESPACE||Ge,Ye=e.MATHML_TEXT_INTEGRATION_POINTS||Ye,Xe=e.HTML_INTEGRATION_POINTS||Xe,ge=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(ge.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(xe=!1),Ae&&(ke=!0),Ie&&(fe=Go({},ts),me=Eo(null),Ie.html===!0&&(Go(fe,Yo),Go(me,ns)),Ie.svg===!0&&(Go(fe,Xo),Go(me,rs),Go(me,as)),Ie.svgFilters===!0&&(Go(fe,Zo),Go(me,rs),Go(me,as)),Ie.mathMl===!0&&(Go(fe,$o),Go(me,is),Go(me,as))),Bo(e,`ADD_TAGS`)||(ye.tagCheck=null),Bo(e,`ADD_ATTR`)||(ye.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ye.tagCheck=e.ADD_TAGS:(fe===pe&&(fe=qo(fe)),Go(fe,e.ADD_TAGS,$e))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ye.attributeCheck=e.ADD_ATTR:(me===he&&(me=qo(me)),Go(me,e.ADD_ATTR,$e))),e.ADD_URI_SAFE_ATTR&&Go(Ve,e.ADD_URI_SAFE_ATTR,$e),e.FORBID_CONTENTS&&(Le===Re&&(Le=qo(Le)),Go(Le,e.FORBID_CONTENTS,$e)),e.ADD_FORBID_CONTENTS&&(Le===Re&&(Le=qo(Le)),Go(Le,e.ADD_FORBID_CONTENTS,$e)),Pe&&(fe[`#text`]=!0),Ee&&Go(fe,[`html`,`head`,`body`]),fe.table&&(Go(fe,[`tbody`]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ho(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ho(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=ys(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));wo&&wo(e),et=e}},it=Go({},[...Xo,...Zo,...Qo]),at=Go({},[...$o,...es]),ot=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ke,tagName:`template`});let n=Po(e.tagName),r=Po(t.tagName);return T[e.namespaceURI]?e.namespaceURI===We?t.namespaceURI===Ge?n===`svg`:t.namespaceURI===Ue?n===`svg`&&(r===`annotation-xml`||Ye[r]):!!it[n]:e.namespaceURI===Ue?t.namespaceURI===Ge?n===`math`:t.namespaceURI===We?n===`math`&&Xe[r]:!!at[n]:e.namespaceURI===Ge?t.namespaceURI===We&&!Xe[r]||t.namespaceURI===Ue&&!Ye[r]?!1:!at[n]&&(Ze[n]||!it[n]):!!(E===`application/xhtml+xml`&&T[e.namespaceURI]):!1},st=function(e){Mo(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},ct=function(e,n){try{Mo(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Mo(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(ke||Ae)try{st(n)}catch{}else try{n.setAttribute(e,``)}catch{}},lt=function(e){let t=null,r=null;if(Oe)e=`<remove></remove>`+e;else{let t=Io(e,/^[\r\n\t ]+/);r=t&&t[0]}E===`application/xhtml+xml`&&Ke===Ge&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ke===Ge)try{t=new f().parseFromString(i,E)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ke,`template`,null);try{t.documentElement.innerHTML=qe?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ke===Ge?te.call(t,Ee?`html`:`body`)[0]:Ee?t.documentElement:a},ut=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},dt=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`)},ft=function(e){return typeof s==`function`&&e instanceof s};function pt(e,n,r){ko(e,e=>{e.call(t,n,r,et)})}let mt=function(e){let n=null;if(pt(re.beforeSanitizeElements,e,null),dt(e))return st(e),!0;let r=$e(e.nodeName);if(pt(re.uponSanitizeElement,e,{tagName:r,allowedTags:fe}),Te&&e.hasChildNodes()&&!ft(e.firstElementChild)&&Vo(/<[/\w!]/g,e.innerHTML)&&Vo(/<[/\w!]/g,e.textContent)||e.nodeType===_s.progressingInstruction||Te&&e.nodeType===_s.comment&&Vo(/<[/\w]/g,e.data))return st(e),!0;if(!(ye.tagCheck instanceof Function&&ye.tagCheck(r))&&(!fe[r]||_e[r])){if(!_e[r]&&D(r)&&(ge.tagNameCheck instanceof RegExp&&Vo(ge.tagNameCheck,r)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(r)))return!1;if(Pe&&!Le[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 st(e),!0}return e instanceof c&&!ot(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Vo(/<\/no(script|embed|frames)/i,e.innerHTML)?(st(e),!0):(we&&e.nodeType===_s.text&&(n=e.textContent,ko([ie,w,ae],e=>{n=Lo(n,e,` `)}),e.textContent!==n&&(Mo(t.removed,{element:e.cloneNode()}),e.textContent=n)),pt(re.afterSanitizeElements,e,null),!1)},ht=function(e,t,r){if(ve[t]||Me&&(t===`id`||t===`name`)&&(r in n||r in tt))return!1;if(!(xe&&!ve[t]&&Vo(oe,t))&&!(be&&Vo(se,t))&&!(ye.attributeCheck instanceof Function&&ye.attributeCheck(t,e))){if(!me[t]||ve[t]){if(!(D(e)&&(ge.tagNameCheck instanceof RegExp&&Vo(ge.tagNameCheck,e)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(e))&&(ge.attributeNameCheck instanceof RegExp&&Vo(ge.attributeNameCheck,t)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(t,e))||t===`is`&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&Vo(ge.tagNameCheck,r)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(r))))return!1}else if(!Ve[t]&&!Vo(de,Lo(r,le,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ro(r,`data:`)===0&&ze[e])&&!(Se&&!Vo(ce,Lo(r,le,``)))&&r)return!1}return!0},D=function(e){return e!==`annotation-xml`&&Io(e,ue)},O=function(e){pt(re.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||dt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:me,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=$e(a),l=s,u=a===`value`?l:zo(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,pt(re.uponSanitizeAttribute,e,r),u=r.attrValue,Ne&&(c===`id`||c===`name`)&&(ct(a,e),u=`user-content-`+u),Te&&Vo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ct(a,e);continue}if(c===`attributename`&&Io(u,`href`)){ct(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ct(a,e);continue}if(!Ce&&Vo(/\/>/i,u)){ct(a,e);continue}we&&ko([ie,w,ae],e=>{u=Lo(u,e,` `)});let d=$e(e.nodeName);if(!ht(d,c,u)){ct(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),dt(e)?st(e):jo(t.removed)}catch{ct(a,e)}}pt(re.afterSanitizeAttributes,e,null)},gt=function e(t){let n=null,r=ut(t);for(pt(re.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)pt(re.uponSanitizeShadowNode,n,null),mt(n),O(n),n.content instanceof a&&e(n.content);pt(re.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(qe=!e,qe&&(e=`<!-->`),typeof e!=`string`&&!ft(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ho(`dirty is not a string, aborting`)}else throw Ho(`toString is not a function`);if(!t.isSupported)return e;if(De||rt(n),t.removed=[],typeof e==`string`&&(Fe=!1),Fe){if(e.nodeName){let t=$e(e.nodeName);if(!fe[t]||_e[t])throw Ho(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=lt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===_s.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!ke&&!we&&!Ee&&e.indexOf(`<`)===-1)return b&&je?b.createHTML(e):e;if(i=lt(e),!i)return ke?null:je?x:``}i&&Oe&&st(i.firstChild);let u=ut(Fe?e:i);for(;c=u.nextNode();)mt(c),O(c),c.content instanceof a&>(c.content);if(Fe)return e;if(ke){if(Ae)for(l=ee.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(me.shadowroot||me.shadowrootmode)&&(l=ne.call(r,l,!0)),l}let d=Ee?i.outerHTML:i.innerHTML;return Ee&&fe[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Vo(ms,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
+
`+d),we&&ko([ie,w,ae],e=>{d=Lo(d,e,` `)}),b&&je?b.createHTML(d):d},t.setConfig=function(){rt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),De=!0},t.clearConfig=function(){et=null,De=!1},t.isValidAttribute=function(e,t,n){return et||rt({}),ht($e(e),$e(t),n)},t.addHook=function(e,t){typeof t==`function`&&Mo(re[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Ao(re[e],t);return n===-1?void 0:No(re[e],n,1)[0]}return jo(re[e])},t.removeHooks=function(e){re[e]=[]},t.removeAllHooks=function(){re=bs()},t}var Ss=xs();function Cs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ws=Cs();function Ts(e){ws=e}var Es={exec:()=>null};function Ds(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(Os.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Os={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`)},ks=/^(?:[ \t]*(?:\n|$))+/,As=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,js=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ns=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ps=/(?:[*+-]|\d{1,9}[.)])/,Fs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Is=Ds(Fs).replace(/bull/g,Ps).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(),Ls=Ds(Fs).replace(/bull/g,Ps).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(),Rs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,zs=/^[^\n]+/,Bs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Vs=Ds(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Bs).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hs=Ds(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ps).getRegex(),Us=`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`,Ws=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gs=Ds(`^ {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`,Ws).replace(`tag`,Us).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ks=Ds(Rs).replace(`hr`,Ms).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`,Us).getRegex(),qs={blockquote:Ds(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ks).getRegex(),code:As,def:Vs,fences:js,heading:Ns,hr:Ms,html:Gs,lheading:Is,list:Hs,newline:ks,paragraph:Ks,table:Es,text:zs},Js=Ds(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Ms).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`,Us).getRegex(),Ys={...qs,lheading:Ls,table:Js,paragraph:Ds(Rs).replace(`hr`,Ms).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Js).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`,Us).getRegex()},Xs={...qs,html:Ds(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Ws).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:Es,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ds(Rs).replace(`hr`,Ms).replace(`heading`,` *#{1,6} *[^
|
|
5
5
|
]`).replace(`lheading`,Is).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Zs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$s=/^( {2,}|\\)\n(?!\s*$)/,ec=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tc=/[\p{P}\p{S}]/u,nc=/[\s\p{P}\p{S}]/u,rc=/[^\s\p{P}\p{S}]/u,ic=Ds(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,nc).getRegex(),ac=/(?!~)[\p{P}\p{S}]/u,oc=/(?!~)[\s\p{P}\p{S}]/u,sc=/(?:[^\s\p{P}\p{S}]|~)/u,cc=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,uc=Ds(lc,`u`).replace(/punct/g,tc).getRegex(),dc=Ds(lc,`u`).replace(/punct/g,ac).getRegex(),fc=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,pc=Ds(fc,`gu`).replace(/notPunctSpace/g,rc).replace(/punctSpace/g,nc).replace(/punct/g,tc).getRegex(),mc=Ds(fc,`gu`).replace(/notPunctSpace/g,sc).replace(/punctSpace/g,oc).replace(/punct/g,ac).getRegex(),hc=Ds(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,rc).replace(/punctSpace/g,nc).replace(/punct/g,tc).getRegex(),gc=Ds(/\\(punct)/,`gu`).replace(/punct/g,tc).getRegex(),_c=Ds(/^<(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(),vc=Ds(Ws).replace(`(?:-->|$)`,`-->`).getRegex(),yc=Ds(`^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`,vc).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xc=Ds(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,bc).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Sc=Ds(/^!?\[(label)\]\[(ref)\]/).replace(`label`,bc).replace(`ref`,Bs).getRegex(),Cc=Ds(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Bs).getRegex(),wc={_backpedal:Es,anyPunctuation:gc,autolink:_c,blockSkip:cc,br:$s,code:Qs,del:Es,emStrongLDelim:uc,emStrongRDelimAst:pc,emStrongRDelimUnd:hc,escape:Zs,link:xc,nolink:Cc,punctuation:ic,reflink:Sc,reflinkSearch:Ds(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Sc).replace(`nolink`,Cc).getRegex(),tag:yc,text:ec,url:Es},Tc={...wc,link:Ds(/^!?\[(label)\]\((.*?)\)/).replace(`label`,bc).getRegex(),reflink:Ds(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,bc).getRegex()},Ec={...wc,emStrongRDelimAst:mc,emStrongLDelim:dc,url:Ds(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Dc={...Ec,br:Ds($s).replace(`{2,}`,`*`).getRegex(),text:Ds(Ec.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Oc={normal:qs,gfm:Ys,pedantic:Xs},kc={normal:wc,gfm:Ec,breaks:Dc,pedantic:Tc},Ac={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},jc=e=>Ac[e];function Mc(e,t){if(t){if(Os.escapeTest.test(e))return e.replace(Os.escapeReplace,jc)}else if(Os.escapeTestNoEncode.test(e))return e.replace(Os.escapeReplaceNoEncode,jc);return e}function Nc(e){try{e=encodeURI(e).replace(Os.percentDecode,`%`)}catch{return null}return e}function Pc(e,t){let n=e.replace(Os.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Os.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(Os.slashPipe,`|`);return n}function Fc(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 Ic(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 Lc(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 Rc(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
6
6
|
`).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(`
|
|
7
7
|
`)}var zc=class{options;rules;lexer;constructor(e){this.options=e||ws}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:Fc(e,`
|
|
@@ -56,7 +56,7 @@ ${e}</tr>
|
|
|
56
56
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
57
57
|
`}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>${Mc(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=Nc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Mc(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=Nc(e);if(i===null)return Mc(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Mc(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Mc(e.text)}},Hc=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``}},Uc=class e{options;renderer;textRenderer;constructor(e){this.options=e||ws,this.options.renderer=this.options.renderer||new Vc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hc}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+=`
|
|
58
58
|
`+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}},Wc=class{options;block;constructor(e){this.options=e||ws}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Bc.lex:Bc.lexInline}provideParser(){return this.block?Uc.parse:Uc.parseInline}},Gc=class{defaults=Cs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Uc;Renderer=Vc;TextRenderer=Hc;Lexer=Bc;Tokenizer=zc;Hooks=Wc;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 Vc(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 zc(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 Wc;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];Wc.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 Bc.lex(e,t??this.defaults)}parser(e,t){return Uc.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?Bc.lex:Bc.lexInline,s=i.hooks?i.hooks.provideParser():e?Uc.parse:Uc.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+=`
|
|
59
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Mc(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Kc=new Gc;function qc(e,t){return Kc.parse(e,t)}qc.options=qc.setOptions=function(e){return Kc.setOptions(e),qc.defaults=Kc.defaults,Ts(qc.defaults),qc},qc.getDefaults=Cs,qc.defaults=ws,qc.use=function(...e){return Kc.use(...e),qc.defaults=Kc.defaults,Ts(qc.defaults),qc},qc.walkTokens=function(e,t){return Kc.walkTokens(e,t)},qc.parseInline=Kc.parseInline,qc.Parser=Uc,qc.parser=Uc.parse,qc.Renderer=Vc,qc.TextRenderer=Hc,qc.Lexer=Bc,qc.lexer=Bc.lex,qc.Tokenizer=zc,qc.Hooks=Wc,qc.parse=qc,qc.options,qc.setOptions,qc.use,qc.walkTokens,qc.parseInline,Uc.parse,Bc.lex;var Jc=e=>(Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t];n&&typeof n==`object`&&Jc(n)}),Object.freeze(e)),Yc=Jc({all:[],used:[],unused:[]}),Xc=(e,t)=>{let n=Ss(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},Zc=class{marked;currentReferences=Yc;lastUsedIndex=0;DomPurity;constructor(e={}){this.marked=new Gc({async:!1,breaks:!0}).use(this.createFootnoteExtension(),...e.extensions??[]),this.DomPurity=Xc(e.window,e.newTabSrText)}createFootnoteExtension=()=>{let e=this;return{extensions:[{name:`footnote`,level:`inline`,start(e){return e.match(/\[\^(\d+)\]/)?.index},tokenizer(e){let t=/^\[\^(\d+)\]/.exec(e);if(t){let[e,n]=t;return{type:`footnote`,raw:e,refNumber:n}}},renderer(t){if(t.type===`footnote`){let n=parseInt(t.refNumber)-1,r=e.currentReferences.all[n];if(!r)return console.error(`Could not find ref with index:`,n),``;let i;return r?.referenceIndex.used?i=r.referenceIndex.used:(e.currentReferences.used.push(r),e.lastUsedIndex++,i=e.lastUsedIndex,r.referenceIndex.used=i),` <liipgpt-reference-number data-all-index="${n}" data-used-index="${i}" data-source="${JSON.stringify(r).replace(/"/g,`"`)}"></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=Yc,n}};function Qc(){let e,t;return{promise:new Promise((n,r)=>{t=n,e=r}),reject:e,resolve:t}}var $c=class{promise;resolve;reject;constructor(){let{promise:e,resolve:t,reject:n}=Qc();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`},el=class{hasValue=new $c;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`},tl=e=>{try{return new URL(e).hostname}catch{return e}};function nl(e){return e.replace(/<[^>]*>/g,``).replace(/ /g,` `).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var rl=({url:e,considered:t,title:n,description:r,summary:i})=>{let a=tl(e);return{url:e,considered:t,referenceIndex:{},score:0,metadata:{},display:{card:{title:n,description:r||i,badge:e},listItem:{title:n,badge:a}}}},il=class{store;content=new el;backendSendsMappedRefs=!1;constructor(e){this.options=e,this.store=Mt({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){this.options.onError?.(e),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=nl(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(rl(e))}updateRetrievalQuestion(e){this.store.update(t=>({...t,retrievalQuestion:e}))}getReadableStore(){return{subscribe:this.store.subscribe}}getPromise(){return this.content.toPromise()}};Object.freeze({status:`aborted`});function J(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 al=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ol=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},sl={};function cl(e){return e&&Object.assign(sl,e),sl}function ll(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 ul(e,t){return typeof t==`bigint`?t.toString():t}function dl(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function fl(e){return e==null}function pl(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ml(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var hl=Symbol(`evaluating`);function gl(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==hl)return r===void 0&&(r=hl,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _l(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vl(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function yl(e){return JSON.stringify(e)}function bl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var xl=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Sl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Cl=dl(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function wl(e){if(Sl(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Sl(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Tl(e){return wl(e)?{...e}:Array.isArray(e)?[...e]:e}var El=new Set([`string`,`number`,`symbol`]);function Dl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ol(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function kl(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 Al(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var jl={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ml(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ol(e,vl(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return _l(this,`shape`,e),e},checks:[]}))}function Nl(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ol(e,vl(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return _l(this,`shape`,r),r},checks:[]}))}function Pl(e,t){if(!wl(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 Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _l(this,`shape`,n),n}}))}function Fl(e,t){if(!wl(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _l(this,`shape`,n),n}}))}function Il(e,t){return Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return _l(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ll(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 Ol(t,vl(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 _l(this,`shape`,i),i},checks:[]}))}function Rl(e,t,n){return Ol(t,vl(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return _l(this,`shape`,i),i}}))}function zl(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 Bl(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Vl(e){return typeof e==`string`?e:e?.message}function Hl(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Vl(e.inst?._zod.def?.error?.(e))??Vl(t?.error?.(e))??Vl(n.customError?.(e))??Vl(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ul(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Wl(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Gl=(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,ul,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Kl=J(`$ZodError`,Gl),ql=J(`$ZodError`,Gl,{Parent:Error});function Jl(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Yl(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var Xl=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 al;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Hl(e,a,cl())));throw xl(t,i?.callee),t}return o.value},Zl=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=>Hl(e,a,cl())));throw xl(t,i?.callee),t}return o.value},Ql=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 al;return a.issues.length?{success:!1,error:new(e??Kl)(a.issues.map(e=>Hl(e,i,cl())))}:{success:!0,data:a.value}},$l=Ql(ql),eu=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=>Hl(e,i,cl())))}:{success:!0,data:a.value}},tu=eu(ql),nu=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Xl(e)(t,n,i)},ru=e=>(t,n,r)=>Xl(e)(t,n,r),iu=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zl(e)(t,n,i)},au=e=>async(t,n,r)=>Zl(e)(t,n,r),ou=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ql(e)(t,n,i)},su=e=>(t,n,r)=>Ql(e)(t,n,r),cu=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return eu(e)(t,n,i)},lu=e=>async(t,n,r)=>eu(e)(t,n,r),uu=/^[cC][^\s-]{8,}$/,du=/^[0-9a-z]+$/,fu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pu=/^[0-9a-vA-V]{20}$/,mu=/^[A-Za-z0-9]{27}$/,hu=/^[a-zA-Z0-9_-]{21}$/,gu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_u=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,vu=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,yu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bu=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function xu(){return new RegExp(bu,`u`)}var Su=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Tu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Eu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Du=/^[A-Za-z0-9_-]*$/,Ou=/^\+[1-9]\d{6,14}$/,ku=`(?:(?:\\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])))`,Au=RegExp(`^${ku}$`);function ju(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 Mu(e){return RegExp(`^${ju(e)}$`)}function Nu(e){let t=ju({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(`^${ku}T(?:${r})$`)}var Pu=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Fu=/^-?\d+$/,Iu=/^-?\d+(?:\.\d+)?$/,Lu=/^(?:true|false)$/i,Ru=/^[^A-Z]*$/,zu=/^[^a-z]*$/,Bu=J(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vu={number:`number`,bigint:`bigint`,object:`date`},Hu=J(`$ZodCheckLessThan`,(e,t)=>{Bu.init(e,t);let n=Vu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Uu=J(`$ZodCheckGreaterThan`,(e,t)=>{Bu.init(e,t);let n=Vu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wu=J(`$ZodCheckMultipleOf`,(e,t)=>{Bu.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ml(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gu=J(`$ZodCheckNumberFormat`,(e,t)=>{Bu.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=jl[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=Fu)}),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})}}),Ku=J(`$ZodCheckMaxLength`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ul(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qu=J(`$ZodCheckMinLength`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ul(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ju=J(`$ZodCheckLengthEquals`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ul(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yu=J(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Bu.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=()=>{})}),Xu=J(`$ZodCheckRegex`,(e,t)=>{Yu.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zu=J(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ru,Yu.init(e,t)}),Qu=J(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=zu,Yu.init(e,t)}),$u=J(`$ZodCheckIncludes`,(e,t)=>{Bu.init(e,t);let n=Dl(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ed=J(`$ZodCheckStartsWith`,(e,t)=>{Bu.init(e,t);let n=RegExp(`^${Dl(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),td=J(`$ZodCheckEndsWith`,(e,t)=>{Bu.init(e,t);let n=RegExp(`.*${Dl(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nd=J(`$ZodCheckOverwrite`,(e,t)=>{Bu.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),rd=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
59
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Mc(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Kc=new Gc;function qc(e,t){return Kc.parse(e,t)}qc.options=qc.setOptions=function(e){return Kc.setOptions(e),qc.defaults=Kc.defaults,Ts(qc.defaults),qc},qc.getDefaults=Cs,qc.defaults=ws,qc.use=function(...e){return Kc.use(...e),qc.defaults=Kc.defaults,Ts(qc.defaults),qc},qc.walkTokens=function(e,t){return Kc.walkTokens(e,t)},qc.parseInline=Kc.parseInline,qc.Parser=Uc,qc.parser=Uc.parse,qc.Renderer=Vc,qc.TextRenderer=Hc,qc.Lexer=Bc,qc.lexer=Bc.lex,qc.Tokenizer=zc,qc.Hooks=Wc,qc.parse=qc,qc.options,qc.setOptions,qc.use,qc.walkTokens,qc.parseInline,Uc.parse,Bc.lex;var Jc=e=>(Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t];n&&typeof n==`object`&&Jc(n)}),Object.freeze(e)),Yc=Jc({all:[],used:[],unused:[]}),Xc=(e,t)=>{let n=Ss(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},Zc=class{marked;currentReferences=Yc;lastUsedIndex=0;DomPurity;constructor(e={}){this.marked=new Gc({async:!1,breaks:!0}).use(this.createFootnoteExtension(),...e.extensions??[]),this.DomPurity=Xc(e.window,e.newTabSrText)}createFootnoteExtension=()=>{let e=this;return{extensions:[{name:`footnote`,level:`inline`,start(e){return e.match(/\[\^(\d+)\]/)?.index},tokenizer(e){let t=/^\[\^(\d+)\]/.exec(e);if(t){let[e,n]=t;return{type:`footnote`,raw:e,refNumber:n}}},renderer(t){if(t.type===`footnote`){let n=parseInt(t.refNumber)-1,r=e.currentReferences.all[n];if(!r)return console.error(`Could not find ref with index:`,n),``;let i;return r?.referenceIndex.used?i=r.referenceIndex.used:(e.currentReferences.used.push(r),e.lastUsedIndex++,i=e.lastUsedIndex,r.referenceIndex.used=i),` <liipgpt-reference-number data-all-index="${n}" data-used-index="${i}" data-source="${JSON.stringify(r).replace(/"/g,`"`)}"></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=Yc,n}};function Qc(){let e,t;return{promise:new Promise((n,r)=>{t=n,e=r}),reject:e,resolve:t}}var $c=class{promise;resolve;reject;constructor(){let{promise:e,resolve:t,reject:n}=Qc();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`},el=class{hasValue=new $c;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`},tl=e=>{try{return new URL(e).hostname}catch{return e}};function nl(e){return e.replace(/<[^>]*>/g,``).replace(/ /g,` `).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var rl=({url:e,considered:t,title:n,description:r,summary:i})=>{let a=tl(e);return{url:e,considered:t,referenceIndex:{},score:0,metadata:{},display:{card:{title:n,description:r||i,badge:e},listItem:{title:n,badge:a}}}},il=class{store;content=new el;backendSendsMappedRefs=!1;constructor(e){this.options=e,this.store=jt({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){this.options.onError?.(e),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=nl(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(rl(e))}updateRetrievalQuestion(e){this.store.update(t=>({...t,retrievalQuestion:e}))}getReadableStore(){return{subscribe:this.store.subscribe}}getPromise(){return this.content.toPromise()}};Object.freeze({status:`aborted`});function J(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 al=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ol=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},sl={};function cl(e){return e&&Object.assign(sl,e),sl}function ll(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 ul(e,t){return typeof t==`bigint`?t.toString():t}function dl(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function fl(e){return e==null}function pl(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ml(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var hl=Symbol(`evaluating`);function gl(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==hl)return r===void 0&&(r=hl,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _l(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vl(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function yl(e){return JSON.stringify(e)}function bl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var xl=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Sl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Cl=dl(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function wl(e){if(Sl(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Sl(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Tl(e){return wl(e)?{...e}:Array.isArray(e)?[...e]:e}var El=new Set([`string`,`number`,`symbol`]);function Dl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ol(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function kl(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 Al(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var jl={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ml(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ol(e,vl(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return _l(this,`shape`,e),e},checks:[]}))}function Nl(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ol(e,vl(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return _l(this,`shape`,r),r},checks:[]}))}function Pl(e,t){if(!wl(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 Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _l(this,`shape`,n),n}}))}function Fl(e,t){if(!wl(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return _l(this,`shape`,n),n}}))}function Il(e,t){return Ol(e,vl(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return _l(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ll(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 Ol(t,vl(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 _l(this,`shape`,i),i},checks:[]}))}function Rl(e,t,n){return Ol(t,vl(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return _l(this,`shape`,i),i}}))}function zl(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 Bl(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Vl(e){return typeof e==`string`?e:e?.message}function Hl(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Vl(e.inst?._zod.def?.error?.(e))??Vl(t?.error?.(e))??Vl(n.customError?.(e))??Vl(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ul(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Wl(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Gl=(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,ul,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Kl=J(`$ZodError`,Gl),ql=J(`$ZodError`,Gl,{Parent:Error});function Jl(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Yl(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var Xl=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 al;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Hl(e,a,cl())));throw xl(t,i?.callee),t}return o.value},Zl=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=>Hl(e,a,cl())));throw xl(t,i?.callee),t}return o.value},Ql=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 al;return a.issues.length?{success:!1,error:new(e??Kl)(a.issues.map(e=>Hl(e,i,cl())))}:{success:!0,data:a.value}},$l=Ql(ql),eu=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=>Hl(e,i,cl())))}:{success:!0,data:a.value}},tu=eu(ql),nu=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Xl(e)(t,n,i)},ru=e=>(t,n,r)=>Xl(e)(t,n,r),iu=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zl(e)(t,n,i)},au=e=>async(t,n,r)=>Zl(e)(t,n,r),ou=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ql(e)(t,n,i)},su=e=>(t,n,r)=>Ql(e)(t,n,r),cu=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return eu(e)(t,n,i)},lu=e=>async(t,n,r)=>eu(e)(t,n,r),uu=/^[cC][^\s-]{8,}$/,du=/^[0-9a-z]+$/,fu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pu=/^[0-9a-vA-V]{20}$/,mu=/^[A-Za-z0-9]{27}$/,hu=/^[a-zA-Z0-9_-]{21}$/,gu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_u=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,vu=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,yu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bu=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function xu(){return new RegExp(bu,`u`)}var Su=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Tu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Eu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Du=/^[A-Za-z0-9_-]*$/,Ou=/^\+[1-9]\d{6,14}$/,ku=`(?:(?:\\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])))`,Au=RegExp(`^${ku}$`);function ju(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 Mu(e){return RegExp(`^${ju(e)}$`)}function Nu(e){let t=ju({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(`^${ku}T(?:${r})$`)}var Pu=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Fu=/^-?\d+$/,Iu=/^-?\d+(?:\.\d+)?$/,Lu=/^(?:true|false)$/i,Ru=/^[^A-Z]*$/,zu=/^[^a-z]*$/,Bu=J(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vu={number:`number`,bigint:`bigint`,object:`date`},Hu=J(`$ZodCheckLessThan`,(e,t)=>{Bu.init(e,t);let n=Vu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Uu=J(`$ZodCheckGreaterThan`,(e,t)=>{Bu.init(e,t);let n=Vu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wu=J(`$ZodCheckMultipleOf`,(e,t)=>{Bu.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ml(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gu=J(`$ZodCheckNumberFormat`,(e,t)=>{Bu.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=jl[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=Fu)}),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})}}),Ku=J(`$ZodCheckMaxLength`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ul(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qu=J(`$ZodCheckMinLength`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ul(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ju=J(`$ZodCheckLengthEquals`,(e,t)=>{var n;Bu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!fl(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ul(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yu=J(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Bu.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=()=>{})}),Xu=J(`$ZodCheckRegex`,(e,t)=>{Yu.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zu=J(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ru,Yu.init(e,t)}),Qu=J(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=zu,Yu.init(e,t)}),$u=J(`$ZodCheckIncludes`,(e,t)=>{Bu.init(e,t);let n=Dl(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ed=J(`$ZodCheckStartsWith`,(e,t)=>{Bu.init(e,t);let n=RegExp(`^${Dl(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),td=J(`$ZodCheckEndsWith`,(e,t)=>{Bu.init(e,t);let n=RegExp(`.*${Dl(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nd=J(`$ZodCheckOverwrite`,(e,t)=>{Bu.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),rd=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
60
60
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
61
61
|
`))}},id={major:4,minor:3,patch:6},ad=J(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=id;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=zl(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 al;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=zl(e,t))});else{if(e.issues.length===t)continue;r||=zl(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(zl(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new al;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 al;return o.then(e=>t(e,r,a))}return t(o,r,a)}}gl(e,`~standard`,()=>({validate:t=>{try{let n=$l(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return tu(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),od=J(`$ZodString`,(e,t)=>{ad.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pu(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}}),sd=J(`$ZodStringFormat`,(e,t)=>{Yu.init(e,t),od.init(e,t)}),cd=J(`$ZodGUID`,(e,t)=>{t.pattern??=_u,sd.init(e,t)}),ld=J(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=vu(e)}else t.pattern??=vu();sd.init(e,t)}),ud=J(`$ZodEmail`,(e,t)=>{t.pattern??=yu,sd.init(e,t)}),dd=J(`$ZodURL`,(e,t)=>{sd.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})}}}),fd=J(`$ZodEmoji`,(e,t)=>{t.pattern??=xu(),sd.init(e,t)}),pd=J(`$ZodNanoID`,(e,t)=>{t.pattern??=hu,sd.init(e,t)}),md=J(`$ZodCUID`,(e,t)=>{t.pattern??=uu,sd.init(e,t)}),hd=J(`$ZodCUID2`,(e,t)=>{t.pattern??=du,sd.init(e,t)}),gd=J(`$ZodULID`,(e,t)=>{t.pattern??=fu,sd.init(e,t)}),_d=J(`$ZodXID`,(e,t)=>{t.pattern??=pu,sd.init(e,t)}),vd=J(`$ZodKSUID`,(e,t)=>{t.pattern??=mu,sd.init(e,t)}),yd=J(`$ZodISODateTime`,(e,t)=>{t.pattern??=Nu(t),sd.init(e,t)}),bd=J(`$ZodISODate`,(e,t)=>{t.pattern??=Au,sd.init(e,t)}),xd=J(`$ZodISOTime`,(e,t)=>{t.pattern??=Mu(t),sd.init(e,t)}),Sd=J(`$ZodISODuration`,(e,t)=>{t.pattern??=gu,sd.init(e,t)}),Cd=J(`$ZodIPv4`,(e,t)=>{t.pattern??=Su,sd.init(e,t),e._zod.bag.format=`ipv4`}),wd=J(`$ZodIPv6`,(e,t)=>{t.pattern??=Cu,sd.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Td=J(`$ZodCIDRv4`,(e,t)=>{t.pattern??=wu,sd.init(e,t)}),Ed=J(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Tu,sd.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Dd(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Od=J(`$ZodBase64`,(e,t)=>{t.pattern??=Eu,sd.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Dd(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function kd(e){if(!Du.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Dd(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ad=J(`$ZodBase64URL`,(e,t)=>{t.pattern??=Du,sd.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{kd(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),jd=J(`$ZodE164`,(e,t)=>{t.pattern??=Ou,sd.init(e,t)});function Md(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Nd=J(`$ZodJWT`,(e,t)=>{sd.init(e,t),e._zod.check=n=>{Md(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Pd=J(`$ZodNumber`,(e,t)=>{ad.init(e,t),e._zod.pattern=e._zod.bag.pattern??Iu,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}}),Fd=J(`$ZodNumberFormat`,(e,t)=>{Gu.init(e,t),Pd.init(e,t)}),Id=J(`$ZodBoolean`,(e,t)=>{ad.init(e,t),e._zod.pattern=Lu,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}}),Ld=J(`$ZodUnknown`,(e,t)=>{ad.init(e,t),e._zod.parse=e=>e}),Rd=J(`$ZodNever`,(e,t)=>{ad.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function zd(e,t,n){e.issues.length&&t.issues.push(...Bl(n,e.issues)),t.value[n]=e.value}var Bd=J(`$ZodArray`,(e,t)=>{ad.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=>zd(t,n,e))):zd(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Vd(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Bl(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Hd(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=Al(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ud(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=>Vd(e,n,i,t,u))):Vd(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 Wd=J(`$ZodObject`,(e,t)=>{if(ad.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=dl(()=>Hd(t));gl(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=Sl,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=>Vd(n,t,e,s,r))):Vd(i,t,e,s,r)}return i?Ud(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Gd=J(`$ZodObjectJIT`,(e,t)=>{Wd.init(e,t);let n=e._zod.parse,r=dl(()=>Hd(t)),i=e=>{let t=new rd([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=yl(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=yl(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
62
62
|
if (${n}.issues.length) {
|
|
@@ -411,7 +411,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
411
411
|
<p>
|
|
412
412
|
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>
|
|
413
413
|
</p>
|
|
414
|
-
`,ariaMainNavigation:`Navigation principale`,ariaMainNavigationRegion:`Navigation principale: liens, changement de langue, 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.`,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`,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`,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`}},b_=e=>{e??=y_;let t={};return e.de&&(t.de=(0,l_.default)(y_.de,e.de)),e.en&&(t.en=(0,l_.default)(y_.en,e.en)),e.fr&&(t.fr=(0,l_.default)(y_.fr,e.fr)),e.it&&(t.it=(0,l_.default)(y_.it,e.it)),t},x_=e=>({init:e?.init??[],bot:{before:e?.bot?.before??[],after:e?.bot?.after??[]},user:{before:e?.user?.before??[],after:e?.user?.after??[]}}),S_=e=>{let t;t=e.theme?.fineGrained?v_(e.theme?.fineGrained):__(e?.theme??{});let n=b_(e?.translations),r={...e,showPredefinedQuestions:e.showPredefinedQuestions??!0,showOverallFeedbackButton:e.showOverallFeedbackButton??!1,showOverallFeedbackEmail:e.showOverallFeedbackEmail??!0,showCloseChatButton:e.showCloseChatButton??!1,showContextInfo:e.showContextInfo??!1,showContextMenu:e.showContextMenu??!1,showReferencesByDefault:e.showReferencesByDefault??!1,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,messageAdditions:x_(e.messageAdditions??{}),contextVersion:e.contextVersion??0};return e.classification&&(r.classification=e.classification),e.menu&&(r.menu=e.menu),r},C_={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.`,"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.`,"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.`,"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.`,"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é.`}},w_={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`}},T_=(e,t)=>t.includes(e),E_=(e,t)=>{if(T_(e,t))return e;let n=D_();return T_(n,t)?n:`en`},D_=()=>navigator.language.split(`-`)[0],O_=(e,t)=>{localStorage.setItem(`liipgpt:selectedLanguage`,e),t&&(t.lang=e)},k_=e=>E_(localStorage.getItem(`liipgpt:selectedLanguage`),e),A_=s(((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}})),j_=Array(12).fill(0),M_=L(`<div class="sonner-loading-bar"></div>`),N_=L(`<div><div class="sonner-spinner"></div></div>`);function P_(e,t){E(t,!0);let n=K(t,`visible`,7),r=K(t,`class`,7);var i={get visible(){return n()},set visible(e){n(e),O()},get class(){return r()},set class(e){r(e),O()}},a=N_(),o=M(a);return Qi(o,23,()=>j_,(e,t)=>`spinner-bar-${t}`,(e,t)=>{z(e,M_())}),T(o),T(a),F(e=>{ka(a,1,e),W(a,`data-visible`,n())},[()=>Ca([`sonner-loading-wrapper`,r()].filter(Boolean).join(` `))]),z(e,a),D(i)}q(P_,{visible:{},class:{}},[],[],{mode:`open`});function F_(...e){return e.filter(Boolean).join(` `)}var I_=typeof document<`u`,L_=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function R_(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var z_=l(A_(),1),B_=class extends Map{#e=new Map;#t=A(0);#n=A(0);#r=Br||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return Br===this.#r?A(e):Cn(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 I(this.#t),!1;return I(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{I(this.#t);return}return I(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),j(this.#n,super.size),Dn(o);else if(i!==t){Dn(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&Dn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),j(n,-1)),r&&(j(this.#n,super.size),Dn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;j(this.#n,0);for(var t of e.values())j(t,-1);Dn(this.#t),e.clear()}}#a(){I(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)I(n)}keys(){return I(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return I(this.#n),super.size}},V_=class{#e;#t;constructor(e,t){this.#e=e,this.#t=nn(t)}get current(){return this.#t(),this.#e()}},H_=/\(.+\)/,U_=new Set([`all`,`print`,`screen`,`and`,`or`,`not`,`only`]),W_=class extends V_{constructor(e,t){let n=H_.test(e)||e.split(/[\s,]+/).some(e=>U_.has(e.trim()))?e:`(${e})`,r=window.matchMedia(n);super(()=>r.matches,e=>ai(r,`change`,e))}};new class{#e;#t;constructor(e={}){let{window:t=L_,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=nn(e=>{let n=ai(t,`focusin`,e),r=ai(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?R_(this.#e):null}};var G_=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return ht(this.#t)}get(){let e=pt(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=pt(this.#t);return t===void 0?e:t}set(e){return mt(this.#t,e)}};function K_(e,t){switch(e){case`post`:tr(t);break;case`pre`:rr(t);break}}function q_(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;K_(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Qr(()=>n(t,o));return o=t,r})}function J_(e,t,n){let r=ir(()=>{let i=!1;q_(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});tr(()=>r)}function Y_(e,t,n){q_(e,`post`,t,n)}function X_(e,t,n){q_(e,`pre`,t,n)}Y_.pre=X_;function Z_(e,t){J_(e,`post`,t)}function Q_(e,t){J_(e,`pre`,t)}Z_.pre=Q_;function $_(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 ev(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 tv(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=A(kn(o)),u=A(!1),d=A(void 0),f=A(kn([])),p=()=>{I(f).forEach(e=>e()),j(f,[],!0)},m=e=>{j(f,[...I(f),e],!0)},h=async(e,n,r=!1)=>{try{j(u,!0),j(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:I(l),refetching:r,onCleanup:m,signal:i.signal});return j(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||j(d,e,!0);return}finally{j(u,!1)}},g=s?$_(h,s):c?ev(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 I(l)},get loading(){return I(u)},get error(){return I(d)},mutate:e=>{j(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 nv(e,t,n){return tv(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Y_(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function rv(e,t,n){return tv(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Y_.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}nv.pre=rv,new G_(`richColorsContext`);var iv=new G_(`<Toaster/>`),av=0,ov=class{#e=A(kn([]));get toasts(){return I(this.#e)}set toasts(e){j(this.#e,e,!0)}#t=A(kn([]));get heights(){return I(this.#t)}set heights(e){j(this.#t,e,!0)}#n=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};addToast=e=>{I_&&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,updated:!0}};create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id&&e.id?.length>0?e.id:av++,i=e.dismissible===void 0?e.dismissable===void 0?!0:e.dismissable:e.dismissible,a=e.type===void 0?`default`:e.type;return Qr(()=>{this.toasts.find(e=>e.id===r)?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=>(Qr(()=>{if(e===void 0){this.toasts=this.toasts.map(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.#n(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=sv(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=t?.id||av++;return this.create({component:e,id:n,...t}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{let t=this.#n(e.toastId);if(t===null){this.heights.push(e);return}this.heights[t]=e};reset=()=>{this.toasts=[],this.heights=[]}};function sv(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var cv=new ov;function lv(e,t){return cv.create({message:e,...t})}var uv=class{#e=k(()=>cv.toasts.filter(e=>!e.dismiss));get toasts(){return I(this.#e)}},dv=Object.assign(lv,{success:cv.success,info:cv.info,warning:cv.warning,error:cv.error,custom:cv.custom,message:cv.message,promise:cv.promise,dismiss:cv.dismiss,loading:cv.loading,getActiveToasts:()=>cv.toasts.filter(e=>!e.dismiss)});function fv(e){return e.label!==void 0}function pv(){let e=A(kn(typeof document<`u`?document.hidden:!1));return tr(()=>ai(document,`visibilitychange`,()=>{j(e,document.hidden,!0)})),{get current(){return I(e)}}}var mv=4e3,hv=14,gv=45,_v=200,vv=.05,yv={toast:``,title:``,description:``,loader:``,closeButton:``,cancelButton:``,actionButton:``,action:``,warning:``,error:``,success:``,default:``,info:``,loading:``};function bv(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function xv(e){return 1/(1.5+Math.abs(e)/20)}var Sv=L(`<div><!></div>`),Cv=L(`<button data-close-button=""><!></button>`),wv=L(`<div data-icon=""><!> <!></div>`),Tv=L(`<div data-description=""><!></div>`),Ev=L(`<button data-button="" data-cancel=""> </button>`),Dv=L(`<button data-button=""> </button>`),Ov=L(`<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>`,1),kv=L(`<li aria-atomic="true" data-sonner-toast=""><!> <!></li>`);function Av(e,t){E(t,!0);let n=e=>{var t=R(),n=N(t),i=e=>{var t=Sv();V(M(t),v),T(t),F(e=>{ka(t,1,e),W(t,`data-visible`,I(be)===`loading`)},[()=>Ca(F_(I(Ne)?.loader,r()?.classes?.loader,`sonner-loader`))]),z(e,t)},a=e=>{{let t=k(()=>F_(I(Ne)?.loader,r().classes?.loader)),n=k(()=>I(be)===`loading`);P_(e,{get class(){return I(t)},get visible(){return I(n)}})}};H(n,e=>{v()?e(i):e(a,-1)}),z(e,t)},r=K(t,`toast`,7),i=K(t,`index`,7),a=K(t,`expanded`,7),o=K(t,`invert`,7),s=K(t,`position`,7),c=K(t,`visibleToasts`,7),l=K(t,`expandByDefault`,7),u=K(t,`closeButton`,7),d=K(t,`interacting`,7),f=K(t,`cancelButtonStyle`,7,``),p=K(t,`actionButtonStyle`,7,``),m=K(t,`duration`,7),h=K(t,`descriptionClass`,7,``),g=K(t,`classes`,7),_=K(t,`unstyled`,7,!1),v=K(t,`loadingIcon`,7),y=K(t,`successIcon`,7),b=K(t,`errorIcon`,7),x=K(t,`warningIcon`,7),S=K(t,`closeIcon`,7),ee=K(t,`infoIcon`,7),te=K(t,`defaultRichColors`,7,!1),ne=K(t,`swipeDirections`,7),re=K(t,`closeButtonAriaLabel`,7),ie=K(t,`pauseWhenPageIsHidden`,7),ae={...yv},oe=A(!1),se=A(!1),ce=A(!1),le=A(!1),ue=A(!1),de=A(0),fe=A(0),pe=r().duration||m()||mv,me=A(null),he=A(void 0),ge=A(null),_e=A(null),ve=k(()=>i()===0),ye=k(()=>i()+1<=c()),be=k(()=>r().type),xe=k(()=>r().dismissible===void 0?r().dismissable!==!1:r().dismissible!==!1),Se=k(()=>r().class||``),Ce=k(()=>r().descriptionClass||``),we=k(()=>cv.heights.findIndex(e=>e.toastId===r().id)||0),Te=k(()=>r().closeButton??u()),Ee=k(()=>r().duration??m()??mv),De=null,Oe=k(()=>s().split(`-`)),ke=k(()=>cv.heights.reduce((e,t,n)=>n>=I(we)?e:e+t.height,0)),Ae=pv(),je=k(()=>r().invert||o()),Me=k(()=>I(be)===`loading`),Ne=k(()=>({...ae,...g()})),Pe=k(()=>r().title),Fe=k(()=>r().description),Ie=A(0),Le=A(0),Re=k(()=>Math.round(I(we)*hv+I(ke)));tr(()=>{I(Pe),I(Fe);let e;e=a()||l()?1:1-i()*vv;let t=Qr(()=>I(he));if(t===void 0)return;t.style.setProperty(`height`,`auto`);let n=t.offsetHeight,o=t.getBoundingClientRect().height,s=Math.round(o/e+2**-52&100)/100;t.style.removeProperty(`height`);let c;c=Math.abs(s-n)<1?s:n,j(fe,c,!0),cv.setHeight({toastId:r().id,height:c})});function ze(){j(se,!0),j(de,I(Re),!0),cv.removeHeight(r().id),setTimeout(()=>{cv.remove(r().id)},_v)}let Be,Ve=k(()=>r().promise&&I(be)===`loading`||r().duration===1/0);function He(){j(Ie,new Date().getTime(),!0),Be=setTimeout(()=>{r().onAutoClose?.(r()),ze()},pe)}function Ue(){if(I(Le)<I(Ie)){let e=new Date().getTime()-I(Ie);pe-=e}j(Le,new Date().getTime(),!0)}tr(()=>{r().updated&&(clearTimeout(Be),pe=I(Ee),He())}),tr(()=>(I(Ve)||(a()||d()||ie()&&Ae.current?Ue():He()),()=>clearTimeout(Be))),Ri(()=>{j(oe,!0);let e=I(he)?.getBoundingClientRect().height;return j(fe,e,!0),cv.setHeight({toastId:r().id,height:e}),()=>{cv.removeHeight(r().id)}}),tr(()=>{r().delete&&Qr(()=>{ze(),r().onDismiss?.(r())})});let We=e=>{if(I(Me))return;j(de,I(Re),!0);let t=e.target;t.setPointerCapture(e.pointerId),t.tagName!==`BUTTON`&&(j(ce,!0),De={x:e.clientX,y:e.clientY})},Ge=()=>{if(I(le)||!I(xe))return;De=null;let e=Number(I(he)?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I(he)?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),n=new Date().getTime()-(I(me)?.getTime()??0),i=I(ge)===`x`?e:t,a=Math.abs(i)/n;if(Math.abs(i)>=gv||a>.11){j(de,I(Re),!0),r().onDismiss?.(r()),I(ge)===`x`?j(_e,e>0?`right`:`left`,!0):j(_e,t>0?`down`:`up`,!0),ze(),j(le,!0);return}else I(he)?.style.setProperty(`--swipe-amount-x`,`0px`),I(he)?.style.setProperty(`--swipe-amount-y`,`0px`);j(ue,!1),j(ce,!1),j(ge,null)},Ke=e=>{if(!De||!I(xe)||(window.getSelection()?.toString().length??-1)>0)return;let t=e.clientY-De.y,n=e.clientX-De.x,r=ne()??bv(s());!I(ge)&&(Math.abs(n)>1||Math.abs(t)>1)&&j(ge,Math.abs(n)>Math.abs(t)?`x`:`y`,!0);let i={x:0,y:0};if(I(ge)===`y`){if(r.includes(`top`)||r.includes(`bottom`))if(r.includes(`top`)&&t<0||r.includes(`bottom`)&&t>0)i.y=t;else{let e=t*xv(t);i.y=Math.abs(e)<Math.abs(t)?e:t}}else if(I(ge)===`x`&&(r.includes(`left`)||r.includes(`right`)))if(r.includes(`left`)&&n<0||r.includes(`right`)&&n>0)i.x=n;else{let e=n*xv(n);i.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&j(ue,!0),I(he)?.style.setProperty(`--swipe-amount-x`,`${i.x}px`),I(he)?.style.setProperty(`--swipe-amount-y`,`${i.y}px`)},qe=()=>{j(ce,!1),j(ge,null),De=null},Je=k(()=>r().icon?r().icon:I(be)===`success`?y():I(be)===`error`?b():I(be)===`warning`?x():I(be)===`info`?ee():I(be)===`loading`?v():null);var w={get toast(){return r()},set toast(e){r(e),O()},get index(){return i()},set index(e){i(e),O()},get expanded(){return a()},set expanded(e){a(e),O()},get invert(){return o()},set invert(e){o(e),O()},get position(){return s()},set position(e){s(e),O()},get visibleToasts(){return c()},set visibleToasts(e){c(e),O()},get expandByDefault(){return l()},set expandByDefault(e){l(e),O()},get closeButton(){return u()},set closeButton(e){u(e),O()},get interacting(){return d()},set interacting(e){d(e),O()},get cancelButtonStyle(){return f()},set cancelButtonStyle(e=``){f(e),O()},get actionButtonStyle(){return p()},set actionButtonStyle(e=``){p(e),O()},get duration(){return m()},set duration(e){m(e),O()},get descriptionClass(){return h()},set descriptionClass(e=``){h(e),O()},get classes(){return g()},set classes(e){g(e),O()},get unstyled(){return _()},set unstyled(e=!1){_(e),O()},get loadingIcon(){return v()},set loadingIcon(e){v(e),O()},get successIcon(){return y()},set successIcon(e){y(e),O()},get errorIcon(){return b()},set errorIcon(e){b(e),O()},get warningIcon(){return x()},set warningIcon(e){x(e),O()},get closeIcon(){return S()},set closeIcon(e){S(e),O()},get infoIcon(){return ee()},set infoIcon(e){ee(e),O()},get defaultRichColors(){return te()},set defaultRichColors(e=!1){te(e),O()},get swipeDirections(){return ne()},set swipeDirections(e){ne(e),O()},get closeButtonAriaLabel(){return re()},set closeButtonAriaLabel(e){re(e),O()},get pauseWhenPageIsHidden(){return ie()},set pauseWhenPageIsHidden(e){ie(e),O()}},Ye=kv();W(Ye,`tabindex`,0);let Xe;var Ze=M(Ye),Qe=e=>{var t=Cv();V(M(t),()=>S()??C),T(t),F(e=>{W(t,`aria-label`,re()),W(t,`data-disabled`,I(Me)),ka(t,1,e)},[()=>Ca(F_(I(Ne)?.closeButton,r()?.classes?.closeButton))]),si(`click`,t,()=>{I(Me)||!I(xe)||(ze(),r().onDismiss?.(r()))}),z(e,t)};H(Ze,e=>{I(Te)&&!r().component&&I(be)!==`loading`&&S()!==null&&e(Qe)});var $e=P(Ze,2),et=e=>{let t=k(()=>r().component);var n=R();U(N(n),()=>I(t),(e,t)=>{t(e,po(()=>r().componentProps,{closeToast:ze}))}),z(e,n)},tt=e=>{var t=Ov(),i=N(t),a=e=>{var t=wv(),i=M(t),a=e=>{var t=R(),i=N(t),a=e=>{var t=R();U(N(t),()=>r().icon,(e,t)=>{t(e,{})}),z(e,t)},o=e=>{n(e)};H(i,e=>{r().icon?e(a):e(o,-1)}),z(e,t)};H(i,e=>{(r().promise||I(be)===`loading`)&&e(a)});var o=P(i,2),s=e=>{var t=R(),n=N(t),i=e=>{var t=R();U(N(t),()=>r().icon,(e,t)=>{t(e,{})}),z(e,t)},a=e=>{var t=R();V(N(t),()=>y()??C),z(e,t)},o=e=>{var t=R();V(N(t),()=>b()??C),z(e,t)},s=e=>{var t=R();V(N(t),()=>x()??C),z(e,t)},c=e=>{var t=R();V(N(t),()=>ee()??C),z(e,t)};H(n,e=>{r().icon?e(i):I(be)===`success`?e(a,1):I(be)===`error`?e(o,2):I(be)===`warning`?e(s,3):I(be)===`info`&&e(c,4)}),z(e,t)};H(o,e=>{r().type!==`loading`&&e(s)}),T(t),F(e=>ka(t,1,e),[()=>Ca(F_(I(Ne)?.icon,r()?.classes?.icon))]),z(e,t)};H(i,e=>{(I(be)||r().icon||r().promise)&&r().icon!==null&&(I(Je)!==null||r().icon)&&e(a)});var o=P(i,2),s=M(o),c=M(s),l=e=>{var t=R(),n=N(t),i=e=>{let t=k(()=>r().title);var n=R();U(N(n),()=>I(t),(e,t)=>{t(e,po(()=>r().componentProps))}),z(e,n)},a=e=>{var t=_i();F(()=>B(t,r().title)),z(e,t)};H(n,e=>{typeof r().title==`string`?e(a,-1):e(i)}),z(e,t)};H(c,e=>{r().title&&e(l)}),T(s);var u=P(s,2),d=e=>{var t=Tv(),n=M(t),i=e=>{let t=k(()=>r().description);var n=R();U(N(n),()=>I(t),(e,t)=>{t(e,po(()=>r().componentProps))}),z(e,n)},a=e=>{var t=_i();F(()=>B(t,r().description)),z(e,t)};H(n,e=>{typeof r().description==`string`?e(a,-1):e(i)}),T(t),F(e=>ka(t,1,e),[()=>Ca(F_(h(),I(Ce),I(Ne)?.description,r().classes?.description))]),z(e,t)};H(u,e=>{r().description&&e(d)}),T(o);var m=P(o,2),g=e=>{var t=R(),n=N(t),i=e=>{var t=R();U(N(t),()=>r().cancel,(e,t)=>{t(e,{})}),z(e,t)},a=e=>{var t=Ev(),n=M(t,!0);T(t),F(e=>{ja(t,r().cancelButtonStyle??f()),ka(t,1,e),B(n,r().cancel.label)},[()=>Ca(F_(I(Ne)?.cancelButton,r()?.classes?.cancelButton))]),si(`click`,t,e=>{fv(r().cancel)&&I(xe)&&(r().cancel?.onClick?.(e),ze())}),z(e,t)},o=k(()=>fv(r().cancel));H(n,e=>{typeof r().cancel==`function`?e(i):I(o)&&e(a,1)}),z(e,t)};H(m,e=>{r().cancel&&e(g)});var _=P(m,2),v=e=>{var t=R(),n=N(t),i=e=>{var t=R();U(N(t),()=>r().action,(e,t)=>{t(e,{})}),z(e,t)},a=e=>{var t=Dv(),n=M(t,!0);T(t),F(e=>{ja(t,r().actionButtonStyle??p()),ka(t,1,e),B(n,r().action.label)},[()=>Ca(F_(I(Ne)?.actionButton,r()?.classes?.actionButton))]),si(`click`,t,e=>{fv(r().action)&&(r().action?.onClick(e),!e.defaultPrevented&&ze())}),z(e,t)},o=k(()=>fv(r().action));H(n,e=>{typeof r().action==`function`?e(i):I(o)&&e(a,1)}),z(e,t)};H(_,e=>{r().action&&e(v)}),F((e,t)=>{ka(o,1,e),ka(s,1,t)},[()=>Ca(F_(I(Ne)?.content,r()?.classes?.content)),()=>Ca(F_(I(Ne)?.title,r()?.classes?.title))]),z(e,t)};return H($e,e=>{r().component?e(et):e(tt,-1)}),T(Ye),oo(Ye,e=>j(he,e),()=>I(he)),F((e,n,a)=>{ka(Ye,1,e),W(Ye,`aria-live`,r().important?`assertive`:`polite`),W(Ye,`data-rich-colors`,r().richColors??te()),W(Ye,`data-styled`,!(r().component||r().unstyled||_())),W(Ye,`data-mounted`,I(oe)),W(Ye,`data-promise`,n),W(Ye,`data-swiped`,I(ue)),W(Ye,`data-removed`,I(se)),W(Ye,`data-visible`,I(ye)),W(Ye,`data-y-position`,I(Oe)[0]),W(Ye,`data-x-position`,I(Oe)[1]),W(Ye,`data-index`,i()),W(Ye,`data-front`,I(ve)),W(Ye,`data-swiping`,I(ce)),W(Ye,`data-dismissible`,I(xe)),W(Ye,`data-type`,I(be)),W(Ye,`data-invert`,I(je)),W(Ye,`data-swipe-out`,I(le)),W(Ye,`data-swipe-direction`,I(_e)),W(Ye,`data-expanded`,a),Xe=ja(Ye,`${t.style} ${r().style}`,Xe,{"--index":i(),"--toasts-before":i(),"--z-index":cv.toasts.length-i(),"--offset":`${I(se)?I(de):I(Re)}px`,"--initial-height":l()?`auto`:`${I(fe)}px`})},[()=>Ca(F_(t.class,I(Se),I(Ne)?.toast,r()?.classes?.toast,I(Ne)?.[I(be)],r()?.classes?.[I(be)])),()=>!!r().promise,()=>!!(a()||l()&&I(oe))]),si(`pointermove`,Ye,Ke),si(`pointerup`,Ye,Ge),si(`pointerdown`,Ye,We),oi(`dragend`,Ye,qe),z(e,Ye),D(w)}ci([`pointermove`,`pointerup`,`pointerdown`,`click`]),q(Av,{toast:{},index:{},expanded:{},invert:{},position:{},visibleToasts:{},expandByDefault:{},closeButton:{},interacting:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},descriptionClass:{},classes:{},unstyled:{},loadingIcon:{},successIcon:{},errorIcon:{},warningIcon:{},closeIcon:{},infoIcon:{},defaultRichColors:{},swipeDirections:{},closeButtonAriaLabel:{},pauseWhenPageIsHidden:{}},[],[],{mode:`open`}),st();var jv=gi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>`);function Mv(e){z(e,jv())}q(Mv,{},[],[],{mode:`open`});var Nv=gi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`);function Pv(e){z(e,Nv())}q(Pv,{},[],[],{mode:`open`});var Fv=gi(`<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>`);function Iv(e){z(e,Fv())}q(Iv,{},[],[],{mode:`open`});var Lv=gi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>`);function Rv(e){z(e,Lv())}q(Rv,{},[],[],{mode:`open`});var zv=gi(`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`);function Bv(e){z(e,zv())}q(Bv,{},[],[],{mode:`open`});var Vv=3,Hv=`24px`,Uv=`16px`,Wv=4e3,Gv=356,Kv=14,qv=`dark`,Jv=`light`;function Yv(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Uv:Hv;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{let r=e[t];r===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof r==`number`?`${r}px`:r}):o(a)}),n}var Xv=L(`<ol></ol>`),Zv=L(`<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-s0xby2"><!></section>`),Qv={hash:`svelte-s0xby2`,code:`html[dir='ltr'],
|
|
414
|
+
`,ariaMainNavigation:`Navigation principale`,ariaMainNavigationRegion:`Navigation principale: liens, changement de langue, 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.`,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`,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`,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`}},b_=e=>{e??=y_;let t={};return e.de&&(t.de=(0,l_.default)(y_.de,e.de)),e.en&&(t.en=(0,l_.default)(y_.en,e.en)),e.fr&&(t.fr=(0,l_.default)(y_.fr,e.fr)),e.it&&(t.it=(0,l_.default)(y_.it,e.it)),t},x_=e=>({init:e?.init??[],bot:{before:e?.bot?.before??[],after:e?.bot?.after??[]},user:{before:e?.user?.before??[],after:e?.user?.after??[]}}),S_=e=>{let t;t=e.theme?.fineGrained?v_(e.theme?.fineGrained):__(e?.theme??{});let n=b_(e?.translations),r={...e,showPredefinedQuestions:e.showPredefinedQuestions??!0,showOverallFeedbackButton:e.showOverallFeedbackButton??!1,showOverallFeedbackEmail:e.showOverallFeedbackEmail??!0,showCloseChatButton:e.showCloseChatButton??!1,showContextInfo:e.showContextInfo??!1,showContextMenu:e.showContextMenu??!1,showReferencesByDefault:e.showReferencesByDefault??!1,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,messageAdditions:x_(e.messageAdditions??{}),contextVersion:e.contextVersion??0};return e.classification&&(r.classification=e.classification),e.menu&&(r.menu=e.menu),r},C_={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.`,"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.`,"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.`,"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.`,"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é.`}},w_={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`}},T_=(e,t)=>t.includes(e),E_=(e,t)=>{if(T_(e,t))return e;let n=D_();return T_(n,t)?n:`en`},D_=()=>navigator.language.split(`-`)[0],O_=(e,t)=>{localStorage.setItem(`liipgpt:selectedLanguage`,e),t&&(t.lang=e)},k_=e=>E_(localStorage.getItem(`liipgpt:selectedLanguage`),e),A_=s(((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}})),j_=Array(12).fill(0),M_=R(`<div class="sonner-loading-bar"></div>`),N_=R(`<div><div class="sonner-spinner"></div></div>`);function P_(e,t){D(t,!0);let n=K(t,`visible`,7),r=K(t,`class`,7);var i={get visible(){return n()},set visible(e){n(e),k()},get class(){return r()},set class(e){r(e),k()}},a=N_(),o=N(a);return Zi(o,23,()=>j_,(e,t)=>`spinner-bar-${t}`,(e,t)=>{B(e,M_())}),E(o),E(a),I(e=>{Oa(a,1,e),G(a,`data-visible`,n())},[()=>Sa([`sonner-loading-wrapper`,r()].filter(Boolean).join(` `))]),B(e,a),O(i)}q(P_,{visible:{},class:{}},[],[],{mode:`open`});function F_(...e){return e.filter(Boolean).join(` `)}var I_=typeof document<`u`,L_=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function R_(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var z_=l(A_(),1),B_=class extends Map{#e=new Map;#t=j(0);#n=j(0);#r=zr||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return zr===this.#r?j(e):Sn(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 L(this.#t),!1;return L(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{L(this.#t);return}return L(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),M(this.#n,super.size),En(o);else if(i!==t){En(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&En(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),M(n,-1)),r&&(M(this.#n,super.size),En(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#n,0);for(var t of e.values())M(t,-1);En(this.#t),e.clear()}}#a(){L(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)L(n)}keys(){return L(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return L(this.#n),super.size}},V_=class{#e;#t;constructor(e,t){this.#e=e,this.#t=tn(t)}get current(){return this.#t(),this.#e()}},H_=/\(.+\)/,U_=new Set([`all`,`print`,`screen`,`and`,`or`,`not`,`only`]),W_=class extends V_{constructor(e,t){let n=H_.test(e)||e.split(/[\s,]+/).some(e=>U_.has(e.trim()))?e:`(${e})`,r=window.matchMedia(n);super(()=>r.matches,e=>ii(r,`change`,e))}};new class{#e;#t;constructor(e={}){let{window:t=L_,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=tn(e=>{let n=ii(t,`focusin`,e),r=ii(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?R_(this.#e):null}};var G_=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return mt(this.#t)}get(){let e=ft(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=ft(this.#t);return t===void 0?e:t}set(e){return pt(this.#t,e)}};function K_(e,t){switch(e){case`post`:er(t);break;case`pre`:nr(t);break}}function q_(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;K_(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Zr(()=>n(t,o));return o=t,r})}function J_(e,t,n){let r=rr(()=>{let i=!1;q_(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});er(()=>r)}function Y_(e,t,n){q_(e,`post`,t,n)}function X_(e,t,n){q_(e,`pre`,t,n)}Y_.pre=X_;function Z_(e,t){J_(e,`post`,t)}function Q_(e,t){J_(e,`pre`,t)}Z_.pre=Q_;function $_(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 ev(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 tv(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=j(On(o)),u=j(!1),d=j(void 0),f=j(On([])),p=()=>{L(f).forEach(e=>e()),M(f,[],!0)},m=e=>{M(f,[...L(f),e],!0)},h=async(e,n,r=!1)=>{try{M(u,!0),M(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:L(l),refetching:r,onCleanup:m,signal:i.signal});return M(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||M(d,e,!0);return}finally{M(u,!1)}},g=s?$_(h,s):c?ev(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 L(l)},get loading(){return L(u)},get error(){return L(d)},mutate:e=>{M(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 nv(e,t,n){return tv(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Y_(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function rv(e,t,n){return tv(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Y_.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}nv.pre=rv,new G_(`richColorsContext`);var iv=new G_(`<Toaster/>`),av=0,ov=class{#e=j(On([]));get toasts(){return L(this.#e)}set toasts(e){M(this.#e,e,!0)}#t=j(On([]));get heights(){return L(this.#t)}set heights(e){M(this.#t,e,!0)}#n=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};addToast=e=>{I_&&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,updated:!0}};create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id&&e.id?.length>0?e.id:av++,i=e.dismissible===void 0?e.dismissable===void 0?!0:e.dismissable:e.dismissible,a=e.type===void 0?`default`:e.type;return Zr(()=>{this.toasts.find(e=>e.id===r)?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=>(Zr(()=>{if(e===void 0){this.toasts=this.toasts.map(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.#n(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=sv(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=t?.id||av++;return this.create({component:e,id:n,...t}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{let t=this.#n(e.toastId);if(t===null){this.heights.push(e);return}this.heights[t]=e};reset=()=>{this.toasts=[],this.heights=[]}};function sv(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var cv=new ov;function lv(e,t){return cv.create({message:e,...t})}var uv=class{#e=A(()=>cv.toasts.filter(e=>!e.dismiss));get toasts(){return L(this.#e)}},dv=Object.assign(lv,{success:cv.success,info:cv.info,warning:cv.warning,error:cv.error,custom:cv.custom,message:cv.message,promise:cv.promise,dismiss:cv.dismiss,loading:cv.loading,getActiveToasts:()=>cv.toasts.filter(e=>!e.dismiss)});function fv(e){return e.label!==void 0}function pv(){let e=j(On(typeof document<`u`?document.hidden:!1));return er(()=>ii(document,`visibilitychange`,()=>{M(e,document.hidden,!0)})),{get current(){return L(e)}}}var mv=4e3,hv=14,gv=45,_v=200,vv=.05,yv={toast:``,title:``,description:``,loader:``,closeButton:``,cancelButton:``,actionButton:``,action:``,warning:``,error:``,success:``,default:``,info:``,loading:``};function bv(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function xv(e){return 1/(1.5+Math.abs(e)/20)}var Sv=R(`<div><!></div>`),Cv=R(`<button data-close-button=""><!></button>`),wv=R(`<div data-icon=""><!> <!></div>`),Tv=R(`<div data-description=""><!></div>`),Ev=R(`<button data-button="" data-cancel=""> </button>`),Dv=R(`<button data-button=""> </button>`),Ov=R(`<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>`,1),kv=R(`<li aria-atomic="true" data-sonner-toast=""><!> <!></li>`);function Av(e,t){D(t,!0);let n=e=>{var t=z(),n=P(t),i=e=>{var t=Sv();H(N(t),v),E(t),I(e=>{Oa(t,1,e),G(t,`data-visible`,L(ye)===`loading`)},[()=>Sa(F_(L(Me)?.loader,r()?.classes?.loader,`sonner-loader`))]),B(e,t)},a=e=>{{let t=A(()=>F_(L(Me)?.loader,r().classes?.loader)),n=A(()=>L(ye)===`loading`);P_(e,{get class(){return L(t)},get visible(){return L(n)}})}};U(n,e=>{v()?e(i):e(a,-1)}),B(e,t)},r=K(t,`toast`,7),i=K(t,`index`,7),a=K(t,`expanded`,7),o=K(t,`invert`,7),s=K(t,`position`,7),c=K(t,`visibleToasts`,7),l=K(t,`expandByDefault`,7),u=K(t,`closeButton`,7),d=K(t,`interacting`,7),f=K(t,`cancelButtonStyle`,7,``),p=K(t,`actionButtonStyle`,7,``),m=K(t,`duration`,7),h=K(t,`descriptionClass`,7,``),g=K(t,`classes`,7),_=K(t,`unstyled`,7,!1),v=K(t,`loadingIcon`,7),y=K(t,`successIcon`,7),b=K(t,`errorIcon`,7),x=K(t,`warningIcon`,7),S=K(t,`closeIcon`,7),C=K(t,`infoIcon`,7),ee=K(t,`defaultRichColors`,7,!1),te=K(t,`swipeDirections`,7),ne=K(t,`closeButtonAriaLabel`,7),re=K(t,`pauseWhenPageIsHidden`,7),ie={...yv},ae=j(!1),oe=j(!1),se=j(!1),ce=j(!1),le=j(!1),ue=j(0),de=j(0),fe=r().duration||m()||mv,pe=j(null),me=j(void 0),he=j(null),ge=j(null),_e=A(()=>i()===0),ve=A(()=>i()+1<=c()),ye=A(()=>r().type),be=A(()=>r().dismissible===void 0?r().dismissable!==!1:r().dismissible!==!1),xe=A(()=>r().class||``),Se=A(()=>r().descriptionClass||``),Ce=A(()=>cv.heights.findIndex(e=>e.toastId===r().id)||0),we=A(()=>r().closeButton??u()),Te=A(()=>r().duration??m()??mv),Ee=null,De=A(()=>s().split(`-`)),Oe=A(()=>cv.heights.reduce((e,t,n)=>n>=L(Ce)?e:e+t.height,0)),ke=pv(),Ae=A(()=>r().invert||o()),je=A(()=>L(ye)===`loading`),Me=A(()=>({...ie,...g()})),Ne=A(()=>r().title),Pe=A(()=>r().description),Fe=j(0),Ie=j(0),Le=A(()=>Math.round(L(Ce)*hv+L(Oe)));er(()=>{L(Ne),L(Pe);let e;e=a()||l()?1:1-i()*vv;let t=Zr(()=>L(me));if(t===void 0)return;t.style.setProperty(`height`,`auto`);let n=t.offsetHeight,o=t.getBoundingClientRect().height,s=Math.round(o/e+2**-52&100)/100;t.style.removeProperty(`height`);let c;c=Math.abs(s-n)<1?s:n,M(de,c,!0),cv.setHeight({toastId:r().id,height:c})});function Re(){M(oe,!0),M(ue,L(Le),!0),cv.removeHeight(r().id),setTimeout(()=>{cv.remove(r().id)},_v)}let ze,Be=A(()=>r().promise&&L(ye)===`loading`||r().duration===1/0);function Ve(){M(Fe,new Date().getTime(),!0),ze=setTimeout(()=>{r().onAutoClose?.(r()),Re()},fe)}function He(){if(L(Ie)<L(Fe)){let e=new Date().getTime()-L(Fe);fe-=e}M(Ie,new Date().getTime(),!0)}er(()=>{r().updated&&(clearTimeout(ze),fe=L(Te),Ve())}),er(()=>(L(Be)||(a()||d()||re()&&ke.current?He():Ve()),()=>clearTimeout(ze))),Li(()=>{M(ae,!0);let e=L(me)?.getBoundingClientRect().height;return M(de,e,!0),cv.setHeight({toastId:r().id,height:e}),()=>{cv.removeHeight(r().id)}}),er(()=>{r().delete&&Zr(()=>{Re(),r().onDismiss?.(r())})});let Ue=e=>{if(L(je))return;M(ue,L(Le),!0);let t=e.target;t.setPointerCapture(e.pointerId),t.tagName!==`BUTTON`&&(M(se,!0),Ee={x:e.clientX,y:e.clientY})},We=()=>{if(L(ce)||!L(be))return;Ee=null;let e=Number(L(me)?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(L(me)?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),n=new Date().getTime()-(L(pe)?.getTime()??0),i=L(he)===`x`?e:t,a=Math.abs(i)/n;if(Math.abs(i)>=gv||a>.11){M(ue,L(Le),!0),r().onDismiss?.(r()),L(he)===`x`?M(ge,e>0?`right`:`left`,!0):M(ge,t>0?`down`:`up`,!0),Re(),M(ce,!0);return}else L(me)?.style.setProperty(`--swipe-amount-x`,`0px`),L(me)?.style.setProperty(`--swipe-amount-y`,`0px`);M(le,!1),M(se,!1),M(he,null)},Ge=e=>{if(!Ee||!L(be)||(window.getSelection()?.toString().length??-1)>0)return;let t=e.clientY-Ee.y,n=e.clientX-Ee.x,r=te()??bv(s());!L(he)&&(Math.abs(n)>1||Math.abs(t)>1)&&M(he,Math.abs(n)>Math.abs(t)?`x`:`y`,!0);let i={x:0,y:0};if(L(he)===`y`){if(r.includes(`top`)||r.includes(`bottom`))if(r.includes(`top`)&&t<0||r.includes(`bottom`)&&t>0)i.y=t;else{let e=t*xv(t);i.y=Math.abs(e)<Math.abs(t)?e:t}}else if(L(he)===`x`&&(r.includes(`left`)||r.includes(`right`)))if(r.includes(`left`)&&n<0||r.includes(`right`)&&n>0)i.x=n;else{let e=n*xv(n);i.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&M(le,!0),L(me)?.style.setProperty(`--swipe-amount-x`,`${i.x}px`),L(me)?.style.setProperty(`--swipe-amount-y`,`${i.y}px`)},Ke=()=>{M(se,!1),M(he,null),Ee=null},qe=A(()=>r().icon?r().icon:L(ye)===`success`?y():L(ye)===`error`?b():L(ye)===`warning`?x():L(ye)===`info`?C():L(ye)===`loading`?v():null);var T={get toast(){return r()},set toast(e){r(e),k()},get index(){return i()},set index(e){i(e),k()},get expanded(){return a()},set expanded(e){a(e),k()},get invert(){return o()},set invert(e){o(e),k()},get position(){return s()},set position(e){s(e),k()},get visibleToasts(){return c()},set visibleToasts(e){c(e),k()},get expandByDefault(){return l()},set expandByDefault(e){l(e),k()},get closeButton(){return u()},set closeButton(e){u(e),k()},get interacting(){return d()},set interacting(e){d(e),k()},get cancelButtonStyle(){return f()},set cancelButtonStyle(e=``){f(e),k()},get actionButtonStyle(){return p()},set actionButtonStyle(e=``){p(e),k()},get duration(){return m()},set duration(e){m(e),k()},get descriptionClass(){return h()},set descriptionClass(e=``){h(e),k()},get classes(){return g()},set classes(e){g(e),k()},get unstyled(){return _()},set unstyled(e=!1){_(e),k()},get loadingIcon(){return v()},set loadingIcon(e){v(e),k()},get successIcon(){return y()},set successIcon(e){y(e),k()},get errorIcon(){return b()},set errorIcon(e){b(e),k()},get warningIcon(){return x()},set warningIcon(e){x(e),k()},get closeIcon(){return S()},set closeIcon(e){S(e),k()},get infoIcon(){return C()},set infoIcon(e){C(e),k()},get defaultRichColors(){return ee()},set defaultRichColors(e=!1){ee(e),k()},get swipeDirections(){return te()},set swipeDirections(e){te(e),k()},get closeButtonAriaLabel(){return ne()},set closeButtonAriaLabel(e){ne(e),k()},get pauseWhenPageIsHidden(){return re()},set pauseWhenPageIsHidden(e){re(e),k()}},Je=kv();G(Je,`tabindex`,0);let Ye;var Xe=N(Je),Ze=e=>{var t=Cv();H(N(t),()=>S()??w),E(t),I(e=>{G(t,`aria-label`,ne()),G(t,`data-disabled`,L(je)),Oa(t,1,e)},[()=>Sa(F_(L(Me)?.closeButton,r()?.classes?.closeButton))]),oi(`click`,t,()=>{L(je)||!L(be)||(Re(),r().onDismiss?.(r()))}),B(e,t)};U(Xe,e=>{L(we)&&!r().component&&L(ye)!==`loading`&&S()!==null&&e(Ze)});var Qe=F(Xe,2),$e=e=>{let t=A(()=>r().component);var n=z();W(P(n),()=>L(t),(e,t)=>{t(e,po(()=>r().componentProps,{closeToast:Re}))}),B(e,n)},et=e=>{var t=Ov(),i=P(t),a=e=>{var t=wv(),i=N(t),a=e=>{var t=z(),i=P(t),a=e=>{var t=z();W(P(t),()=>r().icon,(e,t)=>{t(e,{})}),B(e,t)},o=e=>{n(e)};U(i,e=>{r().icon?e(a):e(o,-1)}),B(e,t)};U(i,e=>{(r().promise||L(ye)===`loading`)&&e(a)});var o=F(i,2),s=e=>{var t=z(),n=P(t),i=e=>{var t=z();W(P(t),()=>r().icon,(e,t)=>{t(e,{})}),B(e,t)},a=e=>{var t=z();H(P(t),()=>y()??w),B(e,t)},o=e=>{var t=z();H(P(t),()=>b()??w),B(e,t)},s=e=>{var t=z();H(P(t),()=>x()??w),B(e,t)},c=e=>{var t=z();H(P(t),()=>C()??w),B(e,t)};U(n,e=>{r().icon?e(i):L(ye)===`success`?e(a,1):L(ye)===`error`?e(o,2):L(ye)===`warning`?e(s,3):L(ye)===`info`&&e(c,4)}),B(e,t)};U(o,e=>{r().type!==`loading`&&e(s)}),E(t),I(e=>Oa(t,1,e),[()=>Sa(F_(L(Me)?.icon,r()?.classes?.icon))]),B(e,t)};U(i,e=>{(L(ye)||r().icon||r().promise)&&r().icon!==null&&(L(qe)!==null||r().icon)&&e(a)});var o=F(i,2),s=N(o),c=N(s),l=e=>{var t=z(),n=P(t),i=e=>{let t=A(()=>r().title);var n=z();W(P(n),()=>L(t),(e,t)=>{t(e,po(()=>r().componentProps))}),B(e,n)},a=e=>{var t=gi();I(()=>V(t,r().title)),B(e,t)};U(n,e=>{typeof r().title==`string`?e(a,-1):e(i)}),B(e,t)};U(c,e=>{r().title&&e(l)}),E(s);var u=F(s,2),d=e=>{var t=Tv(),n=N(t),i=e=>{let t=A(()=>r().description);var n=z();W(P(n),()=>L(t),(e,t)=>{t(e,po(()=>r().componentProps))}),B(e,n)},a=e=>{var t=gi();I(()=>V(t,r().description)),B(e,t)};U(n,e=>{typeof r().description==`string`?e(a,-1):e(i)}),E(t),I(e=>Oa(t,1,e),[()=>Sa(F_(h(),L(Se),L(Me)?.description,r().classes?.description))]),B(e,t)};U(u,e=>{r().description&&e(d)}),E(o);var m=F(o,2),g=e=>{var t=z(),n=P(t),i=e=>{var t=z();W(P(t),()=>r().cancel,(e,t)=>{t(e,{})}),B(e,t)},a=e=>{var t=Ev(),n=N(t,!0);E(t),I(e=>{Aa(t,r().cancelButtonStyle??f()),Oa(t,1,e),V(n,r().cancel.label)},[()=>Sa(F_(L(Me)?.cancelButton,r()?.classes?.cancelButton))]),oi(`click`,t,e=>{fv(r().cancel)&&L(be)&&(r().cancel?.onClick?.(e),Re())}),B(e,t)},o=A(()=>fv(r().cancel));U(n,e=>{typeof r().cancel==`function`?e(i):L(o)&&e(a,1)}),B(e,t)};U(m,e=>{r().cancel&&e(g)});var _=F(m,2),v=e=>{var t=z(),n=P(t),i=e=>{var t=z();W(P(t),()=>r().action,(e,t)=>{t(e,{})}),B(e,t)},a=e=>{var t=Dv(),n=N(t,!0);E(t),I(e=>{Aa(t,r().actionButtonStyle??p()),Oa(t,1,e),V(n,r().action.label)},[()=>Sa(F_(L(Me)?.actionButton,r()?.classes?.actionButton))]),oi(`click`,t,e=>{fv(r().action)&&(r().action?.onClick(e),!e.defaultPrevented&&Re())}),B(e,t)},o=A(()=>fv(r().action));U(n,e=>{typeof r().action==`function`?e(i):L(o)&&e(a,1)}),B(e,t)};U(_,e=>{r().action&&e(v)}),I((e,t)=>{Oa(o,1,e),Oa(s,1,t)},[()=>Sa(F_(L(Me)?.content,r()?.classes?.content)),()=>Sa(F_(L(Me)?.title,r()?.classes?.title))]),B(e,t)};return U(Qe,e=>{r().component?e($e):e(et,-1)}),E(Je),oo(Je,e=>M(me,e),()=>L(me)),I((e,n,a)=>{Oa(Je,1,e),G(Je,`aria-live`,r().important?`assertive`:`polite`),G(Je,`data-rich-colors`,r().richColors??ee()),G(Je,`data-styled`,!(r().component||r().unstyled||_())),G(Je,`data-mounted`,L(ae)),G(Je,`data-promise`,n),G(Je,`data-swiped`,L(le)),G(Je,`data-removed`,L(oe)),G(Je,`data-visible`,L(ve)),G(Je,`data-y-position`,L(De)[0]),G(Je,`data-x-position`,L(De)[1]),G(Je,`data-index`,i()),G(Je,`data-front`,L(_e)),G(Je,`data-swiping`,L(se)),G(Je,`data-dismissible`,L(be)),G(Je,`data-type`,L(ye)),G(Je,`data-invert`,L(Ae)),G(Je,`data-swipe-out`,L(ce)),G(Je,`data-swipe-direction`,L(ge)),G(Je,`data-expanded`,a),Ye=Aa(Je,`${t.style} ${r().style}`,Ye,{"--index":i(),"--toasts-before":i(),"--z-index":cv.toasts.length-i(),"--offset":`${L(oe)?L(ue):L(Le)}px`,"--initial-height":l()?`auto`:`${L(de)}px`})},[()=>Sa(F_(t.class,L(xe),L(Me)?.toast,r()?.classes?.toast,L(Me)?.[L(ye)],r()?.classes?.[L(ye)])),()=>!!r().promise,()=>!!(a()||l()&&L(ae))]),oi(`pointermove`,Je,Ge),oi(`pointerup`,Je,We),oi(`pointerdown`,Je,Ue),ai(`dragend`,Je,Ke),B(e,Je),O(T)}si([`pointermove`,`pointerup`,`pointerdown`,`click`]),q(Av,{toast:{},index:{},expanded:{},invert:{},position:{},visibleToasts:{},expandByDefault:{},closeButton:{},interacting:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},descriptionClass:{},classes:{},unstyled:{},loadingIcon:{},successIcon:{},errorIcon:{},warningIcon:{},closeIcon:{},infoIcon:{},defaultRichColors:{},swipeDirections:{},closeButtonAriaLabel:{},pauseWhenPageIsHidden:{}},[],[],{mode:`open`}),ot();var jv=hi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>`);function Mv(e){B(e,jv())}q(Mv,{},[],[],{mode:`open`});var Nv=hi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`);function Pv(e){B(e,Nv())}q(Pv,{},[],[],{mode:`open`});var Fv=hi(`<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>`);function Iv(e){B(e,Fv())}q(Iv,{},[],[],{mode:`open`});var Lv=hi(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>`);function Rv(e){B(e,Lv())}q(Rv,{},[],[],{mode:`open`});var zv=hi(`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`);function Bv(e){B(e,zv())}q(Bv,{},[],[],{mode:`open`});var Vv=3,Hv=`24px`,Uv=`16px`,Wv=4e3,Gv=356,Kv=14,qv=`dark`,Jv=`light`;function Yv(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Uv:Hv;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{let r=e[t];r===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof r==`number`?`${r}px`:r}):o(a)}),n}var Xv=R(`<ol></ol>`),Zv=R(`<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-s0xby2"><!></section>`),Qv={hash:`svelte-s0xby2`,code:`html[dir='ltr'],
|
|
415
415
|
[data-sonner-toaster][dir='ltr'] {--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%);}html[dir='rtl'],
|
|
416
416
|
[data-sonner-toaster][dir='rtl'] {--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%);}[data-sonner-toaster] {position:fixed;width:var(--width);font-family:ui-sans-serif,
|
|
417
417
|
system-ui,
|
|
@@ -553,22 +553,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
553
553
|
.sonner-loading-bar {transition:none !important;
|
|
554
554
|
animation: none !important;}
|
|
555
555
|
}.sonner-loader {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);transform-origin:center;transition:opacity 200ms,
|
|
556
|
-
transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function $v(e,t){E(t,!0),va(e,Qv);function n(e){return e===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?qv:Jv:e}let r=K(t,`invert`,7,!1),i=K(t,`position`,7,`bottom-right`),a=K(t,`hotkey`,23,()=>[`altKey`,`KeyT`]),o=K(t,`expand`,7,!1),s=K(t,`closeButton`,7,!1),c=K(t,`offset`,7,Hv),l=K(t,`mobileOffset`,7,Uv),u=K(t,`theme`,7,`light`),d=K(t,`richColors`,7,!1),f=K(t,`duration`,7,Wv),p=K(t,`visibleToasts`,7,Vv),m=K(t,`toastOptions`,23,()=>({})),h=K(t,`dir`,7,`auto`),g=K(t,`gap`,7,Kv),_=K(t,`pauseWhenPageIsHidden`,7,!1),v=K(t,`loadingIcon`,7),y=K(t,`successIcon`,7),b=K(t,`errorIcon`,7),x=K(t,`warningIcon`,7),S=K(t,`closeIcon`,7),ee=K(t,`infoIcon`,7),te=K(t,`containerAriaLabel`,7,`Notifications`),ne=K(t,`class`,7),re=K(t,`closeButtonAriaLabel`,7,`Close toast`),ie=K(t,`onblur`,7),ae=K(t,`onfocus`,7),oe=K(t,`onmouseenter`,7),se=K(t,`onmousemove`,7),ce=K(t,`onmouseleave`,7),le=K(t,`ondragend`,7),ue=K(t,`onpointerdown`,7),de=K(t,`onpointerup`,7),fe=uo(t,`$$slots.$$events.$$legacy.$$host.invert.position.hotkey.expand.closeButton.offset.mobileOffset.theme.richColors.duration.visibleToasts.toastOptions.dir.gap.pauseWhenPageIsHidden.loadingIcon.successIcon.errorIcon.warningIcon.closeIcon.infoIcon.containerAriaLabel.class.closeButtonAriaLabel.onblur.onfocus.onmouseenter.onmousemove.onmouseleave.ondragend.onpointerdown.onpointerup`.split(`.`));function pe(){if(h()!==`auto`)return h();if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?(Qr(()=>h(window.getComputedStyle(document.documentElement).direction??`ltr`)),h()):(Qr(()=>h(e)),e)}let me=k(()=>Array.from(new Set([i(),...cv.toasts.filter(e=>e.position).map(e=>e.position)].filter(Boolean)))),he=A(!1),ge=A(!1),_e=A(kn(n(u()))),ve=A(void 0),ye=A(null),be=A(!1),xe=k(()=>a().join(`+`).replace(/Key/g,``).replace(/Digit/g,``));tr(()=>{cv.toasts.length<=1&&j(he,!1)}),tr(()=>{let e=cv.toasts.filter(e=>e.dismiss&&!e.delete);e.length>0&&(cv.toasts=cv.toasts.map(t=>e.find(e=>e.id===t.id)?{...t,delete:!0}:t))}),tr(()=>()=>{I(ve)&&I(ye)&&(I(ye).focus({preventScroll:!0}),j(ye,null),j(be,!1))}),Ri(()=>(cv.reset(),ai(document,`keydown`,e=>{a().every(t=>e[t]||e.code===t)&&(j(he,!0),I(ve)?.focus()),e.code===`Escape`&&(document.activeElement===I(ve)||I(ve)?.contains(document.activeElement))&&j(he,!1)}))),tr(()=>{if(u()!==`system`&&j(_e,u()),typeof window<`u`){u()===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?j(_e,qv):j(_e,Jv));let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=({matches:e})=>{u()===`system`&&j(_e,e?qv:Jv,!0)};`addEventListener`in e?e.addEventListener(`change`,t):e.addListener(t)}});let Se=e=>{ie()?.(e),I(be)&&!e.currentTarget.contains(e.relatedTarget)&&(j(be,!1),I(ye)&&(I(ye).focus({preventScroll:!0}),j(ye,null)))},Ce=e=>{ae()?.(e),!(e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`)&&(I(be)||(j(be,!0),j(ye,e.relatedTarget,!0)))},we=e=>{ue()?.(e),!(e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`)&&j(ge,!0)},Te=e=>{oe()?.(e),j(he,!0)},Ee=e=>{ce()?.(e),I(ge)||j(he,!1)},De=e=>{se()?.(e),j(he,!0)},Oe=e=>{le()?.(e),j(he,!1)},ke=e=>{de()?.(e),j(ge,!1)};iv.set(new uv);var Ae={get invert(){return r()},set invert(e=!1){r(e),O()},get position(){return i()},set position(e=`bottom-right`){i(e),O()},get hotkey(){return a()},set hotkey(e=[`altKey`,`KeyT`]){a(e),O()},get expand(){return o()},set expand(e=!1){o(e),O()},get closeButton(){return s()},set closeButton(e=!1){s(e),O()},get offset(){return c()},set offset(e=Hv){c(e),O()},get mobileOffset(){return l()},set mobileOffset(e=Uv){l(e),O()},get theme(){return u()},set theme(e=`light`){u(e),O()},get richColors(){return d()},set richColors(e=!1){d(e),O()},get duration(){return f()},set duration(e=Wv){f(e),O()},get visibleToasts(){return p()},set visibleToasts(e=Vv){p(e),O()},get toastOptions(){return m()},set toastOptions(e={}){m(e),O()},get dir(){return h()},set dir(e=`auto`){h(e),O()},get gap(){return g()},set gap(e=Kv){g(e),O()},get pauseWhenPageIsHidden(){return _()},set pauseWhenPageIsHidden(e=!1){_(e),O()},get loadingIcon(){return v()},set loadingIcon(e){v(e),O()},get successIcon(){return y()},set successIcon(e){y(e),O()},get errorIcon(){return b()},set errorIcon(e){b(e),O()},get warningIcon(){return x()},set warningIcon(e){x(e),O()},get closeIcon(){return S()},set closeIcon(e){S(e),O()},get infoIcon(){return ee()},set infoIcon(e){ee(e),O()},get containerAriaLabel(){return te()},set containerAriaLabel(e=`Notifications`){te(e),O()},get class(){return ne()},set class(e){ne(e),O()},get closeButtonAriaLabel(){return re()},set closeButtonAriaLabel(e=`Close toast`){re(e),O()},get onblur(){return ie()},set onblur(e){ie(e),O()},get onfocus(){return ae()},set onfocus(e){ae(e),O()},get onmouseenter(){return oe()},set onmouseenter(e){oe(e),O()},get onmousemove(){return se()},set onmousemove(e){se(e),O()},get onmouseleave(){return ce()},set onmouseleave(e){ce(e),O()},get ondragend(){return le()},set ondragend(e){le(e),O()},get onpointerdown(){return ue()},set onpointerdown(e){ue(e),O()},get onpointerup(){return de()},set onpointerup(e){de(e),O()}},je=Zv();W(je,`tabindex`,-1);var Me=M(je),Ne=e=>{var n=R();Qi(N(n),18,()=>I(me),e=>e,(e,n,i,a)=>{let u=k(()=>{let[e,t]=n.split(`-`);return{y:e,x:t}}),h=k(()=>Yv(c(),l()));var te=Xv();G(te,e=>({tabindex:-1,dir:e,class:ne(),"data-sonner-toaster":!0,"data-sonner-theme":I(_e),"data-y-position":I(u).y,"data-x-position":I(u).x,style:t.style,onblur:Se,onfocus:Ce,onmouseenter:Te,onmousemove:De,onmouseleave:Ee,ondragend:Oe,onpointerdown:we,onpointerup:ke,...fe,[Ia]:{"--front-toast-height":`${cv.heights[0]?.height}px`,"--width":`${Gv}px`,"--gap":`${g()}px`,"--offset-top":I(h)[`--offset-top`],"--offset-right":I(h)[`--offset-right`],"--offset-bottom":I(h)[`--offset-bottom`],"--offset-left":I(h)[`--offset-left`],"--mobile-offset-top":I(h)[`--mobile-offset-top`],"--mobile-offset-right":I(h)[`--mobile-offset-right`],"--mobile-offset-bottom":I(h)[`--mobile-offset-bottom`],"--mobile-offset-left":I(h)[`--mobile-offset-left`]}}),[()=>pe()],void 0,void 0,`svelte-s0xby2`),Qi(te,23,()=>cv.toasts.filter(e=>!e.position&&I(i)===0||e.position===n),e=>e.id,(e,t,i,a)=>{{let a=e=>{var t=R(),n=N(t),r=e=>{var t=R();V(N(t),()=>y()??C),z(e,t)},i=e=>{Mv(e,{})};H(n,e=>{y()?e(r):y()!==null&&e(i,1)}),z(e,t)},c=e=>{var t=R(),n=N(t),r=e=>{var t=R();V(N(t),()=>b()??C),z(e,t)},i=e=>{Pv(e,{})};H(n,e=>{b()?e(r):b()!==null&&e(i,1)}),z(e,t)},l=e=>{var t=R(),n=N(t),r=e=>{var t=R();V(N(t),()=>x()??C),z(e,t)},i=e=>{Iv(e,{})};H(n,e=>{x()?e(r):x()!==null&&e(i,1)}),z(e,t)},u=e=>{var t=R(),n=N(t),r=e=>{var t=R();V(N(t),()=>ee()??C),z(e,t)},i=e=>{Rv(e,{})};H(n,e=>{ee()?e(r):ee()!==null&&e(i,1)}),z(e,t)},h=e=>{var t=R(),n=N(t),r=e=>{var t=R();V(N(t),()=>S()??C),z(e,t)},i=e=>{Bv(e,{})};H(n,e=>{S()?e(r):S()!==null&&e(i,1)}),z(e,t)},g=k(()=>m()?.duration??f()),te=k(()=>m()?.class??``),ne=k(()=>m()?.descriptionClass||``),ie=k(()=>m()?.style??``),ae=k(()=>m().classes||{}),oe=k(()=>m().unstyled??!1),se=k(()=>m()?.cancelButtonStyle??``),ce=k(()=>m()?.actionButtonStyle??``),le=k(()=>m()?.closeButtonAriaLabel??re());Av(e,{get index(){return I(i)},get toast(){return I(t)},get defaultRichColors(){return d()},get duration(){return I(g)},get class(){return I(te)},get descriptionClass(){return I(ne)},get invert(){return r()},get visibleToasts(){return p()},get closeButton(){return s()},get interacting(){return I(ge)},get position(){return n},get style(){return I(ie)},get classes(){return I(ae)},get unstyled(){return I(oe)},get cancelButtonStyle(){return I(se)},get actionButtonStyle(){return I(ce)},get closeButtonAriaLabel(){return I(le)},get expandByDefault(){return o()},get expanded(){return I(he)},get pauseWhenPageIsHidden(){return _()},get loadingIcon(){return v()},successIcon:a,errorIcon:c,warningIcon:l,infoIcon:u,closeIcon:h,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),T(te),oo(te,e=>j(ve,e),()=>I(ve)),F(()=>te.dir=te.dir),z(e,te)}),z(e,n)};return H(Me,e=>{cv.toasts.length>0&&e(Ne)}),T(je),F(()=>W(je,`aria-label`,`${te()??``} ${I(xe)??``}`)),z(e,je),D(Ae)}q($v,{invert:{},position:{},hotkey:{},expand:{},closeButton:{},offset:{},mobileOffset:{},theme:{},richColors:{},duration:{},visibleToasts:{},toastOptions:{},dir:{},gap:{},pauseWhenPageIsHidden:{},loadingIcon:{},successIcon:{},errorIcon:{},warningIcon:{},closeIcon:{},infoIcon:{},containerAriaLabel:{},class:{},closeButtonAriaLabel:{},onblur:{},onfocus:{},onmouseenter:{},onmousemove:{},onmouseleave:{},ondragend:{},onpointerdown:{},onpointerup:{}},[],[],{mode:`open`});var ey=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)},ty=(e,t)=>{let n={};return t.forEach(t=>{n[t]=e[t]}),n},ny=console.warn,ry=()=>{},iy=(e,t)=>Qr(()=>{console.warn=ry;let n=lt(t?ty(e,t):e);return console.warn=ny,n}),ay=e=>e&&typeof e.then==`function`,oy=class{config;self;devtools;stateKeys;constructor(e,t){this.config=e,this.self=t,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&(this.stateKeys=ey(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 iy(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 Qr(()=>t.call(this.self,...r));let i=iy(r);this.sendStart(e,i);try{let n=Qr(()=>t.call(this.self,...r));return ay(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}},sy=(e,t)=>{let n={},r=new oy(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};async function cy(){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 ly(){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 uy(){return typeof window>`u`?!1:!!(window.MediaRecorder&&ly())}function dy(){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 fy(){return typeof window>`u`?!1:!!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||dy())}var py=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(!uy()||!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=ly();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 uy()}static getSupportedMediaType(){return ly()}},my=e=>(localStorage.setItem(`liipgpt-color-scheme`,e),gy([`light`,`dark`])),hy=()=>{let e=localStorage.getItem(`liipgpt-color-scheme`);return e===`light`||e===`dark`?e:`system`},gy=e=>{let t=hy();return t===`system`&&(t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),e.includes(t)?t:e[0]??`light`},_y=`liipgpt:context`,vy=class{contextVersion=0;#e=A();get currentContext(){return I(this.#e)}set currentContext(e){j(this.#e,e,!0)}getFromLocalStorage(){let e=localStorage.getItem(_y);if(e){let t;try{if(t=JSON.parse(e),t.version!==this.contextVersion){localStorage.removeItem(_y);return}else return t.context}catch(e){console.error(`Failed to parse liipgpt:context`,e);return}}}storeToLocalStorage(){localStorage.setItem(`liipgpt:context`,JSON.stringify({version:Z.data.chatConfig.contextVersion,context:this.currentContext}))}constructor(e){this.init=e,this.currentContext=this.getFromLocalStorage()??e.initialValue}getContext(){return lt(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))}},yy=()=>localStorage.getItem(_y),by=[{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\.\d{4}\.\d{4}\.\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)}],xy=e=>{for(let t of by)if(t.check(e))return t.type},Sy=`liipgpt:selectorValues`,Cy=`liipgpt:selectorKnownDefaults`,wy=()=>{try{let e=$g.getItem(Sy),t=$g.getItem(Cy);return e?{values:JSON.parse(e),knownDefaults:t?JSON.parse(t):{}}:null}catch{return null}},Ty=e=>{let t={};for(let n of e)t[n.settingName]=n.defaultValues??(n.allowEmpty?[]:[n.values[0]]).filter(Boolean);return t},Ey=(e,t)=>{try{let n=Ty(t);$g.setItem(Sy,JSON.stringify(e)),$g.setItem(Cy,JSON.stringify(n))}catch(e){console.error(`Failed to save selector values:`,e)}},Dy=e=>{try{let t=wy();if(!t)return;delete t.values[e],delete t.knownDefaults[e],$g.setItem(Sy,JSON.stringify(t.values)),$g.setItem(Cy,JSON.stringify(t.knownDefaults))}catch(e){console.error(`Failed to clear selector saved state:`,e)}},Oy=e=>{let t=wy(),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)},ky=class extends Error{constructor(e){super(e),this.name=`UnreachableError`}},Ay=(e,t)=>{let n=new URLSearchParams(window.location.search).get(`q`);return n?{name:`chat-page`,query:n}:e&&!t?{name:`consent-page`}:{name:`start-page`}},jy=e=>e?e.map(e=>({id:Kg(),...e})):[],Z=new class{#e=A(kn({}));get data(){return I(this.#e)}set data(e){j(this.#e,e,!0)}#t=A(kn({}));get targets(){return I(this.#t)}set targets(e){j(this.#t,e,!0)}#n=A(!1);get initialized(){return I(this.#n)}set initialized(e){j(this.#n,e,!0)}#r=A(0);get currentAudioVolume(){return I(this.#r)}set currentAudioVolume(e){j(this.#r,e,!0)}ariaLiveMessagesClearingTimeoutDuration=350;#i=A(null);get currentAudioRecorder(){return I(this.#i)}set currentAudioRecorder(e){j(this.#i,e,!0)}#a=A(!1);get isTranscribing(){return I(this.#a)}set isTranscribing(e){j(this.#a,e,!0)}#o=k(()=>{if(!this.initialized)return[];let e=this.data.chatConfig.menu;return e?e[this.data.language]??[]:[]});get menu(){return I(this.#o)}set menu(e){j(this.#o,e)}#s=k(()=>this.initialized?this.data.chatConfig.translations[this.data.language]??{}:{});get t(){return I(this.#s)}set t(e){j(this.#s,e)}#c=k(()=>this.initialized?C_[this.data.language]??{}:C_.en??{});get errorTranslations(){return I(this.#c)}set errorTranslations(e){j(this.#c,e)}#l=k(()=>this.initialized?w_[this.data.language]??{}:w_.en??{});get piiTranslations(){return I(this.#l)}set piiTranslations(e){j(this.#l,e)}#u=k(()=>this.initialized?this.data.currentColorScheme:`light`);get colorScheme(){return I(this.#u)}set colorScheme(e){j(this.#u,e)}#d=k(()=>this.initialized?this.data.chatConfig.fullTheme[this.data.currentColorScheme]:{});get themeBase(){return I(this.#d)}set themeBase(e){j(this.#d,e)}#f=k(()=>this.themeBase.tokens);get theme(){return I(this.#f)}set theme(e){j(this.#f,e)}#p=k(()=>{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 I(this.#p)}set selectorsWithErrors(e){j(this.#p,e)}},My,Ny,Py,Fy=sy({name:`chat-logic`,state:Z,excludeInDevTools:[`onInput`]},{async init(e){Ny=e;let t=Ny.speechRecognitionApiKey||void 0;My=new c_({apiUrl:Ny.apiUrl,apiKey:Ny.apiKey,speechRecognitionApiKey:t,strict:!0});try{let e=await My.getChatConfig();window.CHAT_CONFIG_OVERRIDE&&Object.assign(e,window.CHAT_CONFIG_OVERRIDE);let t=(await My.getMetadata()).mode===`maintenance`;t&&this.showErrorToast(`maintenance`);let n=S_(e);Ny.inlineLayout!==void 0&&(n.inlineLayout=Ny.inlineLayout);let r;r=Ny.lang?E_(Ny.lang,n.supportedLanguages):k_(n.supportedLanguages),O_(r,Z.targets.mainElement);let i=await this.getPredefinedQuestions(r),a=n.translations[r]?.ariaOpensInNewTab;a&&My.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&&(My.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=$g.getItem(`liipgpt:termsAccepted`)===`true`}catch(e){console.warn(`Failed to load terms acceptance from storage:`,e)}Z.data={currentConversationState:`idle`,chatConfig:n,language:r,predefinedQuestions:i,isInMaintenance:t,history:jy(n.messageAdditions.init),selectedColorScheme:hy(),has2ColorSchemes:s.length===2,currentColorScheme:gy(s),conversationFeedbackId:void 0,conversationFeedbackIsOpen:!1,openedPopup:void 0,props:Ny,flyoutIsOpen:!1,questionHasPii:void 0,chatInputValue:``,selectorValues:Oy(n.selectorsConfig),selectorsIsOpen:!1,currentReferencesAsideId:void 0,ariaLiveStatusMessage:void 0,ariaLiveStatusMessageClearingTimeout:void 0,wasReferencesAsideClosed:!1,isAsideMobile:!0,route:Ay(n.forceConsent??!1,c),additionalStylesheets:o,hasOpenedOverlays:!1,isInlineLayoutContained:!1,termsAccepted:c},window.LIIPGPT_LISTENERS?.route?.(Z.data.route),window.LIIPGPT_LISTENERS?.conversation?.(Z.data.currentConversationState),Z.data.selectorsIsOpen=Z.data.chatConfig.showExpandedSelectors??!1,Z.initialized=!0,this.checkForOpenedPopup(),window.addEventListener(`hashchange`,()=>{this.checkForOpenedPopup()}),this.goto(Ay(n.forceConsent??!1,c),!0)}catch(e){throw dv.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){Z.targets[e]=t},goto(e,t=!1){if(!(!t&&(0,z_.default)(Z.data.route,e)))switch(Z.data.route=e,window.LIIPGPT_LISTENERS?.route?.(e),e.name){case`consent-page`:break;case`start-page`:e.prefill&&(Z.data.chatInputValue=e.prefill);break;case`chat-page`:if(Z.data.chatInputValue=e.query,this.onSubmit(),Z.data.chatConfig.addQueryToUrlParams){let t=new URLSearchParams(window.location.search);t.set(`q`,e.query),history.pushState(null,``,`?${t.toString()}`)}break}},getSelectorConfig(e){let t=Z.data.chatConfig.selectorsConfig.find(t=>t.settingName===e);if(!t)throw Error(`Setting ${e} not found`);return t},getPrettifiedSelectorValues(){let e=Object.entries(Z.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}Z.data.selectorValues[e]=t,Ey(Z.data.selectorValues,Z.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 Dy(e),Z.data.selectorValues[e]=n,Ey(Z.data.selectorValues,Z.data.chatConfig.selectorsConfig),n},async getPredefinedQuestions(e){try{return My.getPredefinedQuestions({url:window.location.origin+window.location.pathname,language:e})}catch(e){return console.warn(`Failed to load predefined questions:`,e),[]}},setColorScheme(e){Z.data.selectedColorScheme=e,Z.data.currentColorScheme=my(e),this.setAriaLiveStatusMessage(e===`dark`?Z.t.ariaDarkSelected:Z.t.ariaLightSelected)},async abort(){await Py?.abort()},changeConversationState(e){Z.data.currentConversationState=e,window.LIIPGPT_LISTENERS?.conversation?.(e)},onInput(e){Z.data.chatConfig.blockPII&&(Z.data.questionHasPii=xy(e)),Z.data.chatInputValue=e},onSubmit(e=!1){if(Z.data.questionHasPii){console.warn(`Question contains PII, not submitting:`,Z.data.questionHasPii);return}let t=Z.data.chatConfig.questionPrefix?`${Z.data.chatConfig.questionPrefix} ${Z.data.chatInputValue}`:Z.data.chatInputValue;Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.user.before)),Z.data.history.push({type:`user`,time:new Date().toISOString(),message:Z.data.chatInputValue}),Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.user.after));let n=Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.bot.before));Z.data.history.push({id:`UNRESOLVED`,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]}});let r={features:Ny.features?Ny.features.trim().split(`,`):[`formatting`],onError:e=>{this.showErrorToast(e),window.LIIPGPT_LISTENERS?.error?.(e),(e===`pii-detected`||e===`blocked`)&&this.editLatestQuestion()},lang:Z.data.language,selectorValues:{...this.getPrettifiedSelectorValues(),context:yy()}},i=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.origin===r.origin&&n.pathname===r.pathname}catch{return!1}},a=Z.data.chatConfig.sendReferrer??`all`;if([`all`,`own`,`location`].includes(a)){let e=a===`location`||Z.data.props.flyout,t;t=e?`${window.location.protocol}//${window.location.host}${window.location.pathname}`:i(document.referrer,window.location.href)?null:document.referrer;let n=a===`own`&&!Z.data.props.flyout&&t&&!t.startsWith(window.location.origin);r.referrer=t&&!n?t:void 0}Z.data.currentConversationId||(Z.data.currentConversationId=My.createConversationId());let o=My.chat(Z.data.currentConversationId,t,r);Py=o,Z.data.lastChatResponseId=o.id,Z.data.currentConversationState!==`searching`&&this.changeConversationState(`searching`),this.setAriaLiveStatusMessage(Z.t.ariaQuestionSent);let s=!1,c,l=!!Z.data.currentReferencesAsideId;(e&&l||!e&&Z.data.chatConfig.showReferencesByDefault)&&(Z.data.isAsideMobile||this.openReferencesAside(o.id)),o.subscribe(e=>{if(Z.data.history[n]&&(Z.data.history[n]={question:Z.data.chatInputValue,...e}),Z.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()}`))}Z.data.chatConfig.showReferencesByDefault&&!Z.data.wasReferencesAsideClosed&&Z.data.currentReferencesAsideId!==e.id&&!Z.data.isAsideMobile&&this.openReferencesAside(e.id),e.state===`streaming`&&Z.data.currentConversationState!==`answering`&&this.changeConversationState(`answering`),e.state===`done`&&(this.changeConversationState(`idle`),s||(s=!0,this.setAriaLiveStatusMessage(`${Z.t.ariaAnswerReady} ... ${e.message.text} ... ${Z.t.ariaAnswerFinished}`),Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.bot.after))),Z.data.currentReferencesAsideId&&Z.data.history[n].references.used.length>0?(clearTimeout(c),c=setTimeout(()=>{this.openReferencesAside(e.id)},100)):this.closeReferencesAside())}),Z.data.chatInputValue=``},async onStartSpeechRecognition(){try{if(!await cy()){this.showErrorToast(`speech-not-supported`);return}if(await navigator.mediaDevices.getUserMedia({audio:!0}),py.isSupported())Z.data.chatInputValue=``,Z.currentAudioRecorder=new py({onDataAvailable:async e=>{Z.isTranscribing=!0,await this.handleTranscription(e)},onError:()=>{this.showErrorToast(`speech-microphone-access-denied`),Z.currentAudioRecorder=null,Z.isTranscribing=!1},onVolumeChange:e=>{Z.currentAudioVolume=e}}),Z.currentAudioRecorder.start();else{this.showErrorToast(`speech-not-supported`);return}}catch(e){throw this.showErrorToast(`speech-microphone-access-denied`),Z.currentAudioRecorder=null,Z.isTranscribing=!1,e}},editLatestQuestion(){let e=Z.data.history.findLastIndex(e=>e?.type===`user`);if(e===-1){console.error(`No last user question, available`);return}let t=Z.data.history.splice(e)[0];Z.data.chatInputValue=t.message},onStopSpeechRecognition(){if(Z.currentAudioRecorder){let e=Z.currentAudioRecorder;Z.currentAudioRecorder=null,e.stop()}Z.currentAudioVolume=0},async handleTranscription(e){if(!e){console.warn(`No audio data received`);return}try{let t=await My.transcribeAudio(e,{lang:Z.data.language});if(t.error){this.showErrorToast(`speech-transcription-failed`);return}if(t.transcript.trim()){if(Z.data.chatConfig.blockPII&&(Z.data.questionHasPii=xy(t.transcript.trim()),Z.data.questionHasPii))return;Z.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{Z.currentAudioRecorder=null,Z.isTranscribing=!1,Z.currentAudioVolume=0}},async onStartConversation(e){await this.abort(),Z.data.history=jy(Z.data.chatConfig.messageAdditions.init),Z.data.currentConversationId=My.createConversationId(),this.goto({name:`chat-page`,query:e})},async onNewConversation(){if(await this.abort(),Z.data.currentConversationId=void 0,Z.data.currentReferencesAsideId=void 0,Z.data.history=jy(Z.data.chatConfig.messageAdditions.init),Z.data.chatConfig.addQueryToUrlParams){let e=new URLSearchParams(window.location.search);e.delete(`q`),history.pushState(null,``,`?${e.toString()}`)}this.goto({name:`start-page`})},showSuccessToast(e){dv.success(Z.t[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},showErrorToast(e){dv.error(Z.errorTranslations[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},async submitFeedback(e){try{let t=Z.data.conversationFeedbackId||Z.data.lastChatResponseId;if(!t)throw new ky(`Tried to give feedback with no id.`);let n=Z.data.history.find(e=>e.type===`bot`&&e.id===t);await My.feedback(t,n?.question??``,e),setTimeout(()=>{this.showSuccessToast(`thankYouForFeedback`)},500)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},toggleReferencesAside(e){Z.data.currentReferencesAsideId===e?this.closeReferencesAside():this.openReferencesAside(e)},openReferencesAside(e){Z.data.currentReferencesAsideId=e,this.setOpenOverlay(!0)},closeReferencesAside(){Z.data.currentReferencesAsideId=void 0,Z.data.wasReferencesAsideClosed=!0,this.setOpenOverlay(!1)},setAsideMobile(e){Z.data.isAsideMobile=e},openFlyout(){Z.data.flyoutIsOpen=!0},closeFlyout(){Z.data.flyoutIsOpen=!1},openConversationFeedback(){Z.data.conversationFeedbackIsOpen=!0,this.setOpenOverlay(!0)},openMessageFeedback(e){Z.data.conversationFeedbackId=e},closeFeedback(){Z.data.conversationFeedbackIsOpen=!1,Z.data.conversationFeedbackId=void 0,this.setOpenOverlay(!1)},setOpenOverlay(e){Z.data.hasOpenedOverlays=e},setAriaLiveStatusMessage(e){Z.data.ariaLiveStatusMessage=e,clearTimeout(Z.data.ariaLiveStatusMessageClearingTimeout),Z.data.ariaLiveStatusMessageClearingTimeout=setTimeout(()=>{Z.data.ariaLiveStatusMessage=``},Z.ariaLiveMessagesClearingTimeoutDuration)},closePopup(){window.location.hash=``},checkForOpenedPopup(){let e=window.location.hash.slice(1),t=Z.t.popups?.find(t=>t.hash===e);t?Z.data.openedPopup=t:Z.data.openedPopup=void 0},async thumbs(e,t){try{let n=Z.data.history.find(t=>t.type===`bot`&&t.id===e);t===`up`?await My.thumbsUp(e,n?.question??``):await My.thumbsDown(e,n?.question??``),this.showSuccessToast(`thankYouForFeedback`)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},async onLanguageChange(e){if(Z.data.language=E_(e,Z.data.chatConfig.supportedLanguages),O_(Z.data.language,Z.targets.mainElement),Z.data.predefinedQuestions=await this.getPredefinedQuestions(Z.data.language),this.setAriaLiveStatusMessage(Z.t.ariaLanguageChanged),Z.data.chatConfig.reflectLanguageInPath){let e=new URL(window.location.href);e.pathname=`/${Z.data.language}`,window.history.replaceState({},``,e.toString())}},async acceptTerms(){Z.data.termsAccepted=!0;try{$g.setItem(`liipgpt:termsAccepted`,`true`)}catch(e){console.warn(`Failed to save terms acceptance to storage:`,e)}this.closePopup(),await Yr(),this.goto({name:`start-page`})},updateChatInput(e){Z.data.chatInputValue=e}}),Iy=(e,t)=>{let n=window.LIIPGPT_LISTENERS?.elements?.[t];if(!n)return;let r=Object.entries(n).filter(([e,t])=>typeof t==`function`&&![`init`,`destroy`].includes(e));tr(()=>(n.init?.(e),r.forEach(([t,n])=>{e.addEventListener(t,n)}),()=>{r.forEach(([t,n])=>{e.removeEventListener(t,n)}),n.destroy?.(e)}))},Ly=(e,t)=>{t&&Fy.setTarget(t,e)},Ry=L(`<div role="status" class="sr-only"> </div>`);function zy(e,t){E(t,!1),so();var n=Ry(),r=M(n,!0);T(n),F(()=>B(r,Z.data.ariaLiveStatusMessage)),z(e,n),D()}q(zy,{},[],[],{mode:`open`});var By=L(`<div aria-hidden="true"></div>`);function Vy(e,t){E(t,!0);let n=K(t,`name`,7),r=K(t,`class`,7);var i={get name(){return n()},set name(e){n(e),O()},get class(){return r()},set class(e){r(e),O()}},a=By();return ia(a,()=>Z.theme.svgs[n()],!0),T(a),F(()=>ka(a,1,`svg svg--${n()??``} ${r()??``}`)),z(e,a),D(i)}q(Vy,{name:{},class:{}},[],[],{mode:`open`});var Hy=`data-disable-tooltip-on-focus`;function Uy(e,t){let n=null,r;function i(){t.text&&(n||(n=document.createElement(`span`),n.ariaHidden=`true`,n.textContent=t.text,n.className=`tooltip tooltip-${t.position||`top`} tooltip-hidden`,e.appendChild(n),n.getBoundingClientRect()),n.classList.remove(`tooltip-hidden`),a())}function a(){if(!n)return;let r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a,o;switch(t.position){case`bottom`:a=r.height+5,o=r.width/2-i.width/2;break;case`bottom-right`:a=r.height+5,o=r.width-i.width;break;case`bottom-left`:a=r.height+5,o=0;break;case`left`:a=r.height/2-i.height/2,o=-i.width-5;break;case`right`:a=r.height/2-i.height/2,o=r.width+5;break;default:a=-i.height-5,o=r.width/2-i.width/2;break}let s=r.left+o,c=s+i.width,l=window.innerWidth;if(c>l){let e=c-l;if(o-=e+10,t.position===`top`||t.position===`bottom`){let t=e+10;n.style.setProperty(`--tooltip-arrow-offset`,`${t}px`)}}if(s<0&&(o-=s-10,t.position===`top`||t.position===`bottom`)){let e=s-10;n.style.setProperty(`--tooltip-arrow-offset`,`${e}px`)}n.style.top=`${a}px`,n.style.left=`${o}px`}function o(){r=window.setTimeout(()=>{i()},t.delay||200)}function s(e){let t=e.target;t&&!t.hasAttribute(`data-disable-tooltip-on-focus`)?o():t.removeAttribute(Hy)}function c(){clearTimeout(r),n&&(n.classList.add(`tooltip-hidden`),n.addEventListener(`transitionend`,()=>{n?.remove(),n=null},{once:!0}))}return e.classList.add(`tooltip-container`),e.setAttribute(`tabindex`,`0`),e.addEventListener(`mouseenter`,o),e.addEventListener(`focus`,s),e.addEventListener(`mouseleave`,c),e.addEventListener(`blur`,c),e.addEventListener(`click`,c),{update(e){t=e},destroy(){c(),e.classList.remove(`tooltip-container`),e.removeEventListener(`mouseenter`,o),e.removeEventListener(`focus`,s),e.removeEventListener(`mouseleave`,c),e.removeEventListener(`blur`,c),e.removeEventListener(`click`,c)}}}var Wy=L(`<button><span class="sr-only"> </span> <span><!></span></button>`);function Gy(e,t){E(t,!0);let n=K(t,`class`,7),r=K(t,`tooltip`,7),i=K(t,`label`,7),a=K(t,`onclick`,7),o=K(t,`icon`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`,`tooltip`,`label`,`onclick`,`icon`]);var c={get class(){return n()},set class(e){n(e),O()},get tooltip(){return r()},set tooltip(e){r(e),O()},get label(){return i()},set label(e){i(e),O()},get onclick(){return a()},set onclick(e){a(e),O()},get icon(){return o()},set icon(e){o(e),O()}},l=Wy();G(l,()=>({onclick:a(),...s}));var u=M(l),d=M(u,!0);T(u);var f=P(u,2);return Vy(M(f),{get name(){return o()}}),T(f),T(l),ya(l,(e,t)=>Uy?.(e,t),()=>({text:r(),position:`top`,delay:300})),F(()=>{B(d,i()),ka(f,1,Ca(n()))}),z(e,l),D(c)}q(Gy,{class:{},tooltip:{},label:{},onclick:{},icon:{}},[],[],{mode:`open`});var Ky;function qy(e,t,n,r,i){Ky&&cancelAnimationFrame(Ky);let a=e instanceof Window?r===`scrollTop`?window.scrollY:window.scrollX:e[r],o=performance.now();function s(c){let l=c-o,u=Math.min(l/n,1),d=i(u),f=a+(t-a)*d;e instanceof Window?r===`scrollTop`?window.scrollTo({top:f,behavior:`instant`}):window.scrollTo({left:f,behavior:`instant`}):e[r]=f,u<1?Ky=requestAnimationFrame(s):e.dispatchEvent(new CustomEvent(`scrollcomplete`))}Ky=requestAnimationFrame(s)}function Jy(e){return typeof e==`function`}function Yy(e){return typeof e==`object`&&!!e}var Xy=[`string`,`number`,`bigint`,`boolean`];function Zy(e){return e==null||Xy.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Zy(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var Qy=Symbol(`box`),$y=Symbol(`is-writable`);function Q(e,t){let n=k(e);return t?{[Qy]:!0,[$y]:!0,get current(){return I(n)},set current(e){t(e)}}:{[Qy]:!0,get current(){return e()}}}function eb(e){return Yy(e)&&Qy in e}function tb(e){return eb(e)&&$y in e}function nb(e){return eb(e)?e:Jy(e)?Q(e):ab(e)}function rb(e){return Object.entries(e).reduce((e,[t,n])=>eb(n)?(tb(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function ib(e){return tb(e)?{[Qy]:!0,get current(){return e.current}}:e}function ab(e){let t=A(kn(e));return{[Qy]:!0,[$y]:!0,get current(){return I(t)},set current(e){j(t,e,!0)}}}function ob(e){let t=A(kn(e));return{[Qy]:!0,[$y]:!0,get current(){return I(t)},set current(e){j(t,e,!0)}}}ob.from=nb,ob.with=Q,ob.flatten=rb,ob.readonly=ib,ob.isBox=eb,ob.isWritableBox=tb;function sb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var cb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,lb=/\n/g,ub=/^\s*/,db=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,fb=/^:\s*/,pb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,mb=/^[;\s]*/,hb=/^\s+|\s+$/g,gb=`
|
|
556
|
+
transform 200ms;}.sonner-loader[data-visible='false'] {opacity:0;transform:scale(0.8) translate(-50%, -50%);}`};function $v(e,t){D(t,!0),_a(e,Qv);function n(e){return e===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?qv:Jv:e}let r=K(t,`invert`,7,!1),i=K(t,`position`,7,`bottom-right`),a=K(t,`hotkey`,23,()=>[`altKey`,`KeyT`]),o=K(t,`expand`,7,!1),s=K(t,`closeButton`,7,!1),c=K(t,`offset`,7,Hv),l=K(t,`mobileOffset`,7,Uv),u=K(t,`theme`,7,`light`),d=K(t,`richColors`,7,!1),f=K(t,`duration`,7,Wv),p=K(t,`visibleToasts`,7,Vv),m=K(t,`toastOptions`,23,()=>({})),h=K(t,`dir`,7,`auto`),g=K(t,`gap`,7,Kv),_=K(t,`pauseWhenPageIsHidden`,7,!1),v=K(t,`loadingIcon`,7),y=K(t,`successIcon`,7),b=K(t,`errorIcon`,7),x=K(t,`warningIcon`,7),S=K(t,`closeIcon`,7),C=K(t,`infoIcon`,7),ee=K(t,`containerAriaLabel`,7,`Notifications`),te=K(t,`class`,7),ne=K(t,`closeButtonAriaLabel`,7,`Close toast`),re=K(t,`onblur`,7),ie=K(t,`onfocus`,7),ae=K(t,`onmouseenter`,7),oe=K(t,`onmousemove`,7),se=K(t,`onmouseleave`,7),ce=K(t,`ondragend`,7),le=K(t,`onpointerdown`,7),ue=K(t,`onpointerup`,7),de=uo(t,`$$slots.$$events.$$legacy.$$host.invert.position.hotkey.expand.closeButton.offset.mobileOffset.theme.richColors.duration.visibleToasts.toastOptions.dir.gap.pauseWhenPageIsHidden.loadingIcon.successIcon.errorIcon.warningIcon.closeIcon.infoIcon.containerAriaLabel.class.closeButtonAriaLabel.onblur.onfocus.onmouseenter.onmousemove.onmouseleave.ondragend.onpointerdown.onpointerup`.split(`.`));function fe(){if(h()!==`auto`)return h();if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?(Zr(()=>h(window.getComputedStyle(document.documentElement).direction??`ltr`)),h()):(Zr(()=>h(e)),e)}let pe=A(()=>Array.from(new Set([i(),...cv.toasts.filter(e=>e.position).map(e=>e.position)].filter(Boolean)))),me=j(!1),he=j(!1),ge=j(On(n(u()))),_e=j(void 0),ve=j(null),ye=j(!1),be=A(()=>a().join(`+`).replace(/Key/g,``).replace(/Digit/g,``));er(()=>{cv.toasts.length<=1&&M(me,!1)}),er(()=>{let e=cv.toasts.filter(e=>e.dismiss&&!e.delete);e.length>0&&(cv.toasts=cv.toasts.map(t=>e.find(e=>e.id===t.id)?{...t,delete:!0}:t))}),er(()=>()=>{L(_e)&&L(ve)&&(L(ve).focus({preventScroll:!0}),M(ve,null),M(ye,!1))}),Li(()=>(cv.reset(),ii(document,`keydown`,e=>{a().every(t=>e[t]||e.code===t)&&(M(me,!0),L(_e)?.focus()),e.code===`Escape`&&(document.activeElement===L(_e)||L(_e)?.contains(document.activeElement))&&M(me,!1)}))),er(()=>{if(u()!==`system`&&M(ge,u()),typeof window<`u`){u()===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(ge,qv):M(ge,Jv));let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=({matches:e})=>{u()===`system`&&M(ge,e?qv:Jv,!0)};`addEventListener`in e?e.addEventListener(`change`,t):e.addListener(t)}});let xe=e=>{re()?.(e),L(ye)&&!e.currentTarget.contains(e.relatedTarget)&&(M(ye,!1),L(ve)&&(L(ve).focus({preventScroll:!0}),M(ve,null)))},Se=e=>{ie()?.(e),!(e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`)&&(L(ye)||(M(ye,!0),M(ve,e.relatedTarget,!0)))},Ce=e=>{le()?.(e),!(e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`)&&M(he,!0)},we=e=>{ae()?.(e),M(me,!0)},Te=e=>{se()?.(e),L(he)||M(me,!1)},Ee=e=>{oe()?.(e),M(me,!0)},De=e=>{ce()?.(e),M(me,!1)},Oe=e=>{ue()?.(e),M(he,!1)};iv.set(new uv);var ke={get invert(){return r()},set invert(e=!1){r(e),k()},get position(){return i()},set position(e=`bottom-right`){i(e),k()},get hotkey(){return a()},set hotkey(e=[`altKey`,`KeyT`]){a(e),k()},get expand(){return o()},set expand(e=!1){o(e),k()},get closeButton(){return s()},set closeButton(e=!1){s(e),k()},get offset(){return c()},set offset(e=Hv){c(e),k()},get mobileOffset(){return l()},set mobileOffset(e=Uv){l(e),k()},get theme(){return u()},set theme(e=`light`){u(e),k()},get richColors(){return d()},set richColors(e=!1){d(e),k()},get duration(){return f()},set duration(e=Wv){f(e),k()},get visibleToasts(){return p()},set visibleToasts(e=Vv){p(e),k()},get toastOptions(){return m()},set toastOptions(e={}){m(e),k()},get dir(){return h()},set dir(e=`auto`){h(e),k()},get gap(){return g()},set gap(e=Kv){g(e),k()},get pauseWhenPageIsHidden(){return _()},set pauseWhenPageIsHidden(e=!1){_(e),k()},get loadingIcon(){return v()},set loadingIcon(e){v(e),k()},get successIcon(){return y()},set successIcon(e){y(e),k()},get errorIcon(){return b()},set errorIcon(e){b(e),k()},get warningIcon(){return x()},set warningIcon(e){x(e),k()},get closeIcon(){return S()},set closeIcon(e){S(e),k()},get infoIcon(){return C()},set infoIcon(e){C(e),k()},get containerAriaLabel(){return ee()},set containerAriaLabel(e=`Notifications`){ee(e),k()},get class(){return te()},set class(e){te(e),k()},get closeButtonAriaLabel(){return ne()},set closeButtonAriaLabel(e=`Close toast`){ne(e),k()},get onblur(){return re()},set onblur(e){re(e),k()},get onfocus(){return ie()},set onfocus(e){ie(e),k()},get onmouseenter(){return ae()},set onmouseenter(e){ae(e),k()},get onmousemove(){return oe()},set onmousemove(e){oe(e),k()},get onmouseleave(){return se()},set onmouseleave(e){se(e),k()},get ondragend(){return ce()},set ondragend(e){ce(e),k()},get onpointerdown(){return le()},set onpointerdown(e){le(e),k()},get onpointerup(){return ue()},set onpointerup(e){ue(e),k()}},Ae=Zv();G(Ae,`tabindex`,-1);var je=N(Ae),Me=e=>{var n=z();Zi(P(n),18,()=>L(pe),e=>e,(e,n,i,a)=>{let u=A(()=>{let[e,t]=n.split(`-`);return{y:e,x:t}}),h=A(()=>Yv(c(),l()));var ee=Xv();qa(ee,e=>({tabindex:-1,dir:e,class:te(),"data-sonner-toaster":!0,"data-sonner-theme":L(ge),"data-y-position":L(u).y,"data-x-position":L(u).x,style:t.style,onblur:xe,onfocus:Se,onmouseenter:we,onmousemove:Ee,onmouseleave:Te,ondragend:De,onpointerdown:Ce,onpointerup:Oe,...de,[Fa]:{"--front-toast-height":`${cv.heights[0]?.height}px`,"--width":`${Gv}px`,"--gap":`${g()}px`,"--offset-top":L(h)[`--offset-top`],"--offset-right":L(h)[`--offset-right`],"--offset-bottom":L(h)[`--offset-bottom`],"--offset-left":L(h)[`--offset-left`],"--mobile-offset-top":L(h)[`--mobile-offset-top`],"--mobile-offset-right":L(h)[`--mobile-offset-right`],"--mobile-offset-bottom":L(h)[`--mobile-offset-bottom`],"--mobile-offset-left":L(h)[`--mobile-offset-left`]}}),[()=>fe()],void 0,void 0,`svelte-s0xby2`),Zi(ee,23,()=>cv.toasts.filter(e=>!e.position&&L(i)===0||e.position===n),e=>e.id,(e,t,i,a)=>{{let a=e=>{var t=z(),n=P(t),r=e=>{var t=z();H(P(t),()=>y()??w),B(e,t)},i=e=>{Mv(e,{})};U(n,e=>{y()?e(r):y()!==null&&e(i,1)}),B(e,t)},c=e=>{var t=z(),n=P(t),r=e=>{var t=z();H(P(t),()=>b()??w),B(e,t)},i=e=>{Pv(e,{})};U(n,e=>{b()?e(r):b()!==null&&e(i,1)}),B(e,t)},l=e=>{var t=z(),n=P(t),r=e=>{var t=z();H(P(t),()=>x()??w),B(e,t)},i=e=>{Iv(e,{})};U(n,e=>{x()?e(r):x()!==null&&e(i,1)}),B(e,t)},u=e=>{var t=z(),n=P(t),r=e=>{var t=z();H(P(t),()=>C()??w),B(e,t)},i=e=>{Rv(e,{})};U(n,e=>{C()?e(r):C()!==null&&e(i,1)}),B(e,t)},h=e=>{var t=z(),n=P(t),r=e=>{var t=z();H(P(t),()=>S()??w),B(e,t)},i=e=>{Bv(e,{})};U(n,e=>{S()?e(r):S()!==null&&e(i,1)}),B(e,t)},g=A(()=>m()?.duration??f()),ee=A(()=>m()?.class??``),te=A(()=>m()?.descriptionClass||``),re=A(()=>m()?.style??``),ie=A(()=>m().classes||{}),ae=A(()=>m().unstyled??!1),oe=A(()=>m()?.cancelButtonStyle??``),se=A(()=>m()?.actionButtonStyle??``),ce=A(()=>m()?.closeButtonAriaLabel??ne());Av(e,{get index(){return L(i)},get toast(){return L(t)},get defaultRichColors(){return d()},get duration(){return L(g)},get class(){return L(ee)},get descriptionClass(){return L(te)},get invert(){return r()},get visibleToasts(){return p()},get closeButton(){return s()},get interacting(){return L(he)},get position(){return n},get style(){return L(re)},get classes(){return L(ie)},get unstyled(){return L(ae)},get cancelButtonStyle(){return L(oe)},get actionButtonStyle(){return L(se)},get closeButtonAriaLabel(){return L(ce)},get expandByDefault(){return o()},get expanded(){return L(me)},get pauseWhenPageIsHidden(){return _()},get loadingIcon(){return v()},successIcon:a,errorIcon:c,warningIcon:l,infoIcon:u,closeIcon:h,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),E(ee),oo(ee,e=>M(_e,e),()=>L(_e)),I(()=>ee.dir=ee.dir),B(e,ee)}),B(e,n)};return U(je,e=>{cv.toasts.length>0&&e(Me)}),E(Ae),I(()=>G(Ae,`aria-label`,`${ee()??``} ${L(be)??``}`)),B(e,Ae),O(ke)}q($v,{invert:{},position:{},hotkey:{},expand:{},closeButton:{},offset:{},mobileOffset:{},theme:{},richColors:{},duration:{},visibleToasts:{},toastOptions:{},dir:{},gap:{},pauseWhenPageIsHidden:{},loadingIcon:{},successIcon:{},errorIcon:{},warningIcon:{},closeIcon:{},infoIcon:{},containerAriaLabel:{},class:{},closeButtonAriaLabel:{},onblur:{},onfocus:{},onmouseenter:{},onmousemove:{},onmouseleave:{},ondragend:{},onpointerdown:{},onpointerup:{}},[],[],{mode:`open`});var ey=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)},ty=(e,t)=>{let n={};return t.forEach(t=>{n[t]=e[t]}),n},ny=console.warn,ry=()=>{},iy=(e,t)=>Zr(()=>{console.warn=ry;let n=ct(t?ty(e,t):e);return console.warn=ny,n}),ay=e=>e&&typeof e.then==`function`,oy=class{config;self;devtools;stateKeys;constructor(e,t){this.config=e,this.self=t,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&(this.stateKeys=ey(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 iy(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 Zr(()=>t.call(this.self,...r));let i=iy(r);this.sendStart(e,i);try{let n=Zr(()=>t.call(this.self,...r));return ay(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}},sy=(e,t)=>{let n={},r=new oy(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};async function cy(){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 ly(){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 uy(){return typeof window>`u`?!1:!!(window.MediaRecorder&&ly())}function dy(){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 fy(){return typeof window>`u`?!1:!!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||dy())}var py=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(!uy()||!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=ly();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 uy()}static getSupportedMediaType(){return ly()}},my=e=>(localStorage.setItem(`liipgpt-color-scheme`,e),gy([`light`,`dark`])),hy=()=>{let e=localStorage.getItem(`liipgpt-color-scheme`);return e===`light`||e===`dark`?e:`system`},gy=e=>{let t=hy();return t===`system`&&(t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),e.includes(t)?t:e[0]??`light`},_y=`liipgpt:context`,vy=class{contextVersion=0;#e=j();get currentContext(){return L(this.#e)}set currentContext(e){M(this.#e,e,!0)}getFromLocalStorage(){let e=localStorage.getItem(_y);if(e){let t;try{if(t=JSON.parse(e),t.version!==this.contextVersion){localStorage.removeItem(_y);return}else return t.context}catch(e){console.error(`Failed to parse liipgpt:context`,e);return}}}storeToLocalStorage(){localStorage.setItem(`liipgpt:context`,JSON.stringify({version:Z.data.chatConfig.contextVersion,context:this.currentContext}))}constructor(e){this.init=e,this.currentContext=this.getFromLocalStorage()??e.initialValue}getContext(){return ct(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))}},yy=()=>localStorage.getItem(_y),by=[{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\.\d{4}\.\d{4}\.\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)}],xy=e=>{for(let t of by)if(t.check(e))return t.type},Sy=`liipgpt:selectorValues`,Cy=`liipgpt:selectorKnownDefaults`,wy=()=>{try{let e=$g.getItem(Sy),t=$g.getItem(Cy);return e?{values:JSON.parse(e),knownDefaults:t?JSON.parse(t):{}}:null}catch{return null}},Ty=e=>{let t={};for(let n of e)t[n.settingName]=n.defaultValues??(n.allowEmpty?[]:[n.values[0]]).filter(Boolean);return t},Ey=(e,t)=>{try{let n=Ty(t);$g.setItem(Sy,JSON.stringify(e)),$g.setItem(Cy,JSON.stringify(n))}catch(e){console.error(`Failed to save selector values:`,e)}},Dy=e=>{try{let t=wy();if(!t)return;delete t.values[e],delete t.knownDefaults[e],$g.setItem(Sy,JSON.stringify(t.values)),$g.setItem(Cy,JSON.stringify(t.knownDefaults))}catch(e){console.error(`Failed to clear selector saved state:`,e)}},Oy=e=>{let t=wy(),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)},ky=class extends Error{constructor(e){super(e),this.name=`UnreachableError`}},Ay=(e,t)=>{if(e&&!t)return{name:`consent-page`};let n=new URLSearchParams(window.location.search).get(`q`);return n?{name:`chat-page`,query:n}:{name:`start-page`}},jy=e=>e?e.map(e=>({id:Kg(),...e})):[],Z=new class{#e=j(On({}));get data(){return L(this.#e)}set data(e){M(this.#e,e,!0)}#t=j(On({}));get targets(){return L(this.#t)}set targets(e){M(this.#t,e,!0)}#n=j(!1);get initialized(){return L(this.#n)}set initialized(e){M(this.#n,e,!0)}#r=j(0);get currentAudioVolume(){return L(this.#r)}set currentAudioVolume(e){M(this.#r,e,!0)}ariaLiveMessagesClearingTimeoutDuration=350;#i=j(null);get currentAudioRecorder(){return L(this.#i)}set currentAudioRecorder(e){M(this.#i,e,!0)}#a=j(!1);get isTranscribing(){return L(this.#a)}set isTranscribing(e){M(this.#a,e,!0)}#o=A(()=>{if(!this.initialized)return[];let e=this.data.chatConfig.menu;return e?e[this.data.language]??[]:[]});get menu(){return L(this.#o)}set menu(e){M(this.#o,e)}#s=A(()=>this.initialized?this.data.chatConfig.translations[this.data.language]??{}:{});get t(){return L(this.#s)}set t(e){M(this.#s,e)}#c=A(()=>this.initialized?C_[this.data.language]??{}:C_.en??{});get errorTranslations(){return L(this.#c)}set errorTranslations(e){M(this.#c,e)}#l=A(()=>this.initialized?w_[this.data.language]??{}:w_.en??{});get piiTranslations(){return L(this.#l)}set piiTranslations(e){M(this.#l,e)}#u=A(()=>this.initialized?this.data.currentColorScheme:`light`);get colorScheme(){return L(this.#u)}set colorScheme(e){M(this.#u,e)}#d=A(()=>this.initialized?this.data.chatConfig.fullTheme[this.data.currentColorScheme]:{});get themeBase(){return L(this.#d)}set themeBase(e){M(this.#d,e)}#f=A(()=>this.themeBase.tokens);get theme(){return L(this.#f)}set theme(e){M(this.#f,e)}#p=A(()=>{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 L(this.#p)}set selectorsWithErrors(e){M(this.#p,e)}},My,Ny,Py,Fy=sy({name:`chat-logic`,state:Z,excludeInDevTools:[`onInput`]},{async init(e){Ny=e;let t=Ny.speechRecognitionApiKey||void 0;My=new c_({apiUrl:Ny.apiUrl,apiKey:Ny.apiKey,speechRecognitionApiKey:t,strict:!0});try{let e=await My.getChatConfig();window.CHAT_CONFIG_OVERRIDE&&Object.assign(e,window.CHAT_CONFIG_OVERRIDE);let t=(await My.getMetadata()).mode===`maintenance`;t&&this.showErrorToast(`maintenance`);let n=S_(e);Ny.inlineLayout!==void 0&&(n.inlineLayout=Ny.inlineLayout);let r;r=Ny.lang?E_(Ny.lang,n.supportedLanguages):k_(n.supportedLanguages),O_(r,Z.targets.mainElement);let i=await this.getPredefinedQuestions(r),a=n.translations[r]?.ariaOpensInNewTab;a&&My.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&&(My.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=$g.getItem(`liipgpt:termsAccepted`)===`true`}catch(e){console.warn(`Failed to load terms acceptance from storage:`,e)}Z.data={currentConversationState:`idle`,chatConfig:n,language:r,predefinedQuestions:i,isInMaintenance:t,history:jy(n.messageAdditions.init),selectedColorScheme:hy(),has2ColorSchemes:s.length===2,currentColorScheme:gy(s),conversationFeedbackId:void 0,conversationFeedbackIsOpen:!1,openedPopup:void 0,props:Ny,flyoutIsOpen:!1,questionHasPii:void 0,chatInputValue:``,selectorValues:Oy(n.selectorsConfig),selectorsIsOpen:!1,currentReferencesAsideId:void 0,ariaLiveStatusMessage:void 0,ariaLiveStatusMessageClearingTimeout:void 0,wasReferencesAsideClosed:!1,isAsideMobile:!0,route:Ay(n.forceConsent??!1,c),additionalStylesheets:o,hasOpenedOverlays:!1,isInlineLayoutContained:!1,termsAccepted:c},window.LIIPGPT_LISTENERS?.route?.(Z.data.route),window.LIIPGPT_LISTENERS?.conversation?.(Z.data.currentConversationState),Z.data.selectorsIsOpen=Z.data.chatConfig.showExpandedSelectors??!1,Z.initialized=!0,this.checkForOpenedPopup(),window.addEventListener(`hashchange`,()=>{this.checkForOpenedPopup()}),this.goto(Ay(n.forceConsent??!1,c),!0)}catch(e){throw dv.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){Z.targets[e]=t},goto(e,t=!1){if(!(!t&&(0,z_.default)(Z.data.route,e)))switch(Z.data.route=e,window.LIIPGPT_LISTENERS?.route?.(e),e.name){case`consent-page`:break;case`start-page`:e.prefill&&(Z.data.chatInputValue=e.prefill);break;case`chat-page`:if(Z.data.chatInputValue=e.query,this.onSubmit(),Z.data.chatConfig.addQueryToUrlParams){let t=new URLSearchParams(window.location.search);t.set(`q`,e.query),history.pushState(null,``,`?${t.toString()}`)}break}},getSelectorConfig(e){let t=Z.data.chatConfig.selectorsConfig.find(t=>t.settingName===e);if(!t)throw Error(`Setting ${e} not found`);return t},getPrettifiedSelectorValues(){let e=Object.entries(Z.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}Z.data.selectorValues[e]=t,Ey(Z.data.selectorValues,Z.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 Dy(e),Z.data.selectorValues[e]=n,Ey(Z.data.selectorValues,Z.data.chatConfig.selectorsConfig),n},async getPredefinedQuestions(e){try{return My.getPredefinedQuestions({url:window.location.origin+window.location.pathname,language:e})}catch(e){return console.warn(`Failed to load predefined questions:`,e),[]}},setColorScheme(e){Z.data.selectedColorScheme=e,Z.data.currentColorScheme=my(e),this.setAriaLiveStatusMessage(e===`dark`?Z.t.ariaDarkSelected:Z.t.ariaLightSelected)},async abort(){await Py?.abort()},changeConversationState(e){Z.data.currentConversationState=e,window.LIIPGPT_LISTENERS?.conversation?.(e)},onInput(e){Z.data.chatConfig.blockPII&&(Z.data.questionHasPii=xy(e)),Z.data.chatInputValue=e},onSubmit(e=!1){if(Z.data.questionHasPii){console.warn(`Question contains PII, not submitting:`,Z.data.questionHasPii);return}let t=Z.data.chatConfig.questionPrefix?`${Z.data.chatConfig.questionPrefix} ${Z.data.chatInputValue}`:Z.data.chatInputValue;Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.user.before)),Z.data.history.push({type:`user`,time:new Date().toISOString(),message:Z.data.chatInputValue}),Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.user.after));let n=Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.bot.before));Z.data.history.push({id:`UNRESOLVED`,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]}});let r={features:Ny.features?Ny.features.trim().split(`,`):[`formatting`],onError:e=>{this.showErrorToast(e),window.LIIPGPT_LISTENERS?.error?.(e),(e===`pii-detected`||e===`blocked`)&&this.editLatestQuestion()},lang:Z.data.language,selectorValues:{...this.getPrettifiedSelectorValues(),context:yy()}},i=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.origin===r.origin&&n.pathname===r.pathname}catch{return!1}},a=Z.data.chatConfig.sendReferrer??`all`;if([`all`,`own`,`location`].includes(a)){let e=a===`location`||Z.data.props.flyout,t;t=e?`${window.location.protocol}//${window.location.host}${window.location.pathname}`:i(document.referrer,window.location.href)?null:document.referrer;let n=a===`own`&&!Z.data.props.flyout&&t&&!t.startsWith(window.location.origin);r.referrer=t&&!n?t:void 0}Z.data.currentConversationId||(Z.data.currentConversationId=My.createConversationId());let o=My.chat(Z.data.currentConversationId,t,r);Py=o,Z.data.lastChatResponseId=o.id,Z.data.currentConversationState!==`searching`&&this.changeConversationState(`searching`),this.setAriaLiveStatusMessage(Z.t.ariaQuestionSent);let s=!1,c,l=!!Z.data.currentReferencesAsideId;(e&&l||!e&&Z.data.chatConfig.showReferencesByDefault)&&(Z.data.isAsideMobile||this.openReferencesAside(o.id)),o.subscribe(e=>{if(Z.data.history[n]&&(Z.data.history[n]={question:Z.data.chatInputValue,...e}),Z.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()}`))}Z.data.chatConfig.showReferencesByDefault&&!Z.data.wasReferencesAsideClosed&&Z.data.currentReferencesAsideId!==e.id&&!Z.data.isAsideMobile&&this.openReferencesAside(e.id),e.state===`streaming`&&Z.data.currentConversationState!==`answering`&&this.changeConversationState(`answering`),e.state===`done`&&(this.changeConversationState(`idle`),s||(s=!0,this.setAriaLiveStatusMessage(`${Z.t.ariaAnswerReady} ... ${e.message.text} ... ${Z.t.ariaAnswerFinished}`),Z.data.history.push(...jy(Z.data.chatConfig.messageAdditions.bot.after))),Z.data.currentReferencesAsideId&&Z.data.history[n].references.used.length>0?(clearTimeout(c),c=setTimeout(()=>{this.openReferencesAside(e.id)},100)):this.closeReferencesAside())}),Z.data.chatInputValue=``},async onStartSpeechRecognition(){try{if(!await cy()){this.showErrorToast(`speech-not-supported`);return}if(await navigator.mediaDevices.getUserMedia({audio:!0}),py.isSupported())Z.data.chatInputValue=``,Z.currentAudioRecorder=new py({onDataAvailable:async e=>{Z.isTranscribing=!0,await this.handleTranscription(e)},onError:()=>{this.showErrorToast(`speech-microphone-access-denied`),Z.currentAudioRecorder=null,Z.isTranscribing=!1},onVolumeChange:e=>{Z.currentAudioVolume=e}}),Z.currentAudioRecorder.start();else{this.showErrorToast(`speech-not-supported`);return}}catch(e){throw this.showErrorToast(`speech-microphone-access-denied`),Z.currentAudioRecorder=null,Z.isTranscribing=!1,e}},editLatestQuestion(){let e=Z.data.history.findLastIndex(e=>e?.type===`user`);if(e===-1){console.error(`No last user question, available`);return}let t=Z.data.history.splice(e)[0];Z.data.chatInputValue=t.message},onStopSpeechRecognition(){if(Z.currentAudioRecorder){let e=Z.currentAudioRecorder;Z.currentAudioRecorder=null,e.stop()}Z.currentAudioVolume=0},async handleTranscription(e){if(!e){console.warn(`No audio data received`);return}try{let t=await My.transcribeAudio(e,{lang:Z.data.language});if(t.error){this.showErrorToast(`speech-transcription-failed`);return}if(t.transcript.trim()){if(Z.data.chatConfig.blockPII&&(Z.data.questionHasPii=xy(t.transcript.trim()),Z.data.questionHasPii))return;Z.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{Z.currentAudioRecorder=null,Z.isTranscribing=!1,Z.currentAudioVolume=0}},async onStartConversation(e){await this.abort(),Z.data.history=jy(Z.data.chatConfig.messageAdditions.init),Z.data.currentConversationId=My.createConversationId(),this.goto({name:`chat-page`,query:e})},async onNewConversation(){if(await this.abort(),Z.data.currentConversationId=void 0,Z.data.currentReferencesAsideId=void 0,Z.data.history=jy(Z.data.chatConfig.messageAdditions.init),Z.data.chatConfig.addQueryToUrlParams){let e=new URLSearchParams(window.location.search);e.delete(`q`),history.pushState(null,``,`?${e.toString()}`)}this.goto({name:`start-page`})},showSuccessToast(e){dv.success(Z.t[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},showErrorToast(e){dv.error(Z.errorTranslations[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},async submitFeedback(e){try{let t=Z.data.conversationFeedbackId||Z.data.lastChatResponseId;if(!t)throw new ky(`Tried to give feedback with no id.`);let n=Z.data.history.find(e=>e.type===`bot`&&e.id===t);await My.feedback(t,n?.question??``,e),setTimeout(()=>{this.showSuccessToast(`thankYouForFeedback`)},500)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},toggleReferencesAside(e){Z.data.currentReferencesAsideId===e?this.closeReferencesAside():this.openReferencesAside(e)},openReferencesAside(e){Z.data.currentReferencesAsideId=e,this.setOpenOverlay(!0)},closeReferencesAside(){Z.data.currentReferencesAsideId=void 0,Z.data.wasReferencesAsideClosed=!0,this.setOpenOverlay(!1)},setAsideMobile(e){Z.data.isAsideMobile=e},openFlyout(){Z.data.flyoutIsOpen=!0},closeFlyout(){Z.data.flyoutIsOpen=!1},openConversationFeedback(){Z.data.conversationFeedbackIsOpen=!0,this.setOpenOverlay(!0)},openMessageFeedback(e){Z.data.conversationFeedbackId=e},closeFeedback(){Z.data.conversationFeedbackIsOpen=!1,Z.data.conversationFeedbackId=void 0,this.setOpenOverlay(!1)},setOpenOverlay(e){Z.data.hasOpenedOverlays=e},setAriaLiveStatusMessage(e){Z.data.ariaLiveStatusMessage=e,clearTimeout(Z.data.ariaLiveStatusMessageClearingTimeout),Z.data.ariaLiveStatusMessageClearingTimeout=setTimeout(()=>{Z.data.ariaLiveStatusMessage=``},Z.ariaLiveMessagesClearingTimeoutDuration)},closePopup(){window.location.hash=``},checkForOpenedPopup(){let e=window.location.hash.slice(1),t=Z.t.popups?.find(t=>t.hash===e);t?Z.data.openedPopup=t:Z.data.openedPopup=void 0},async thumbs(e,t){try{let n=Z.data.history.find(t=>t.type===`bot`&&t.id===e);t===`up`?await My.thumbsUp(e,n?.question??``):await My.thumbsDown(e,n?.question??``),this.showSuccessToast(`thankYouForFeedback`)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},async onLanguageChange(e){if(Z.data.language=E_(e,Z.data.chatConfig.supportedLanguages),O_(Z.data.language,Z.targets.mainElement),Z.data.predefinedQuestions=await this.getPredefinedQuestions(Z.data.language),this.setAriaLiveStatusMessage(Z.t.ariaLanguageChanged),Z.data.chatConfig.reflectLanguageInPath){let e=new URL(window.location.href);e.pathname=`/${Z.data.language}`,window.history.replaceState({},``,e.toString())}},async acceptTerms(){Z.data.termsAccepted=!0;try{$g.setItem(`liipgpt:termsAccepted`,`true`)}catch(e){console.warn(`Failed to save terms acceptance to storage:`,e)}this.closePopup(),await Jr();let e=new URLSearchParams(window.location.search).get(`q`);this.goto(e?{name:`chat-page`,query:e}:{name:`start-page`})},updateChatInput(e){Z.data.chatInputValue=e}}),Iy=(e,t)=>{let n=window.LIIPGPT_LISTENERS?.elements?.[t];if(!n)return;let r=Object.entries(n).filter(([e,t])=>typeof t==`function`&&![`init`,`destroy`].includes(e));er(()=>(n.init?.(e),r.forEach(([t,n])=>{e.addEventListener(t,n)}),()=>{r.forEach(([t,n])=>{e.removeEventListener(t,n)}),n.destroy?.(e)}))},Ly=(e,t)=>{t&&Fy.setTarget(t,e)},Ry=R(`<div role="status" class="sr-only"> </div>`);function zy(e,t){D(t,!1),so();var n=Ry(),r=N(n,!0);E(n),I(()=>V(r,Z.data.ariaLiveStatusMessage)),B(e,n),O()}q(zy,{},[],[],{mode:`open`});var By=R(`<div aria-hidden="true"></div>`);function Vy(e,t){D(t,!0);let n=K(t,`name`,7),r=K(t,`class`,7);var i={get name(){return n()},set name(e){n(e),k()},get class(){return r()},set class(e){r(e),k()}},a=By();return ra(a,()=>Z.theme.svgs[n()],!0),E(a),I(()=>Oa(a,1,`svg svg--${n()??``} ${r()??``}`)),B(e,a),O(i)}q(Vy,{name:{},class:{}},[],[],{mode:`open`});var Hy=`data-disable-tooltip-on-focus`;function Uy(e,t){let n=null,r;function i(){t.text&&(n||(n=document.createElement(`span`),n.ariaHidden=`true`,n.textContent=t.text,n.className=`tooltip tooltip-${t.position||`top`} tooltip-hidden`,e.appendChild(n),n.getBoundingClientRect()),n.classList.remove(`tooltip-hidden`),a())}function a(){if(!n)return;let r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a,o;switch(t.position){case`bottom`:a=r.height+5,o=r.width/2-i.width/2;break;case`bottom-right`:a=r.height+5,o=r.width-i.width;break;case`bottom-left`:a=r.height+5,o=0;break;case`left`:a=r.height/2-i.height/2,o=-i.width-5;break;case`right`:a=r.height/2-i.height/2,o=r.width+5;break;default:a=-i.height-5,o=r.width/2-i.width/2;break}let s=r.left+o,c=s+i.width,l=window.innerWidth;if(c>l){let e=c-l;if(o-=e+10,t.position===`top`||t.position===`bottom`){let t=e+10;n.style.setProperty(`--tooltip-arrow-offset`,`${t}px`)}}if(s<0&&(o-=s-10,t.position===`top`||t.position===`bottom`)){let e=s-10;n.style.setProperty(`--tooltip-arrow-offset`,`${e}px`)}n.style.top=`${a}px`,n.style.left=`${o}px`}function o(){r=window.setTimeout(()=>{i()},t.delay||200)}function s(e){let t=e.target;t&&!t.hasAttribute(`data-disable-tooltip-on-focus`)?o():t.removeAttribute(Hy)}function c(){clearTimeout(r),n&&(n.classList.add(`tooltip-hidden`),n.addEventListener(`transitionend`,()=>{n?.remove(),n=null},{once:!0}))}return e.classList.add(`tooltip-container`),e.setAttribute(`tabindex`,`0`),e.addEventListener(`mouseenter`,o),e.addEventListener(`focus`,s),e.addEventListener(`mouseleave`,c),e.addEventListener(`blur`,c),e.addEventListener(`click`,c),{update(e){t=e},destroy(){c(),e.classList.remove(`tooltip-container`),e.removeEventListener(`mouseenter`,o),e.removeEventListener(`focus`,s),e.removeEventListener(`mouseleave`,c),e.removeEventListener(`blur`,c),e.removeEventListener(`click`,c)}}}var Wy=R(`<button><span class="sr-only"> </span> <span><!></span></button>`);function Gy(e,t){D(t,!0);let n=K(t,`class`,7),r=K(t,`tooltip`,7),i=K(t,`label`,7),a=K(t,`onclick`,7),o=K(t,`icon`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`,`tooltip`,`label`,`onclick`,`icon`]);var c={get class(){return n()},set class(e){n(e),k()},get tooltip(){return r()},set tooltip(e){r(e),k()},get label(){return i()},set label(e){i(e),k()},get onclick(){return a()},set onclick(e){a(e),k()},get icon(){return o()},set icon(e){o(e),k()}},l=Wy();qa(l,()=>({onclick:a(),...s}));var u=N(l),d=N(u,!0);E(u);var f=F(u,2);return Vy(N(f),{get name(){return o()}}),E(f),E(l),va(l,(e,t)=>Uy?.(e,t),()=>({text:r(),position:`top`,delay:300})),I(()=>{V(d,i()),Oa(f,1,Sa(n()))}),B(e,l),O(c)}q(Gy,{class:{},tooltip:{},label:{},onclick:{},icon:{}},[],[],{mode:`open`});var Ky;function qy(e,t,n,r,i){Ky&&cancelAnimationFrame(Ky);let a=e instanceof Window?r===`scrollTop`?window.scrollY:window.scrollX:e[r],o=performance.now();function s(c){let l=c-o,u=Math.min(l/n,1),d=i(u),f=a+(t-a)*d;e instanceof Window?r===`scrollTop`?window.scrollTo({top:f,behavior:`instant`}):window.scrollTo({left:f,behavior:`instant`}):e[r]=f,u<1?Ky=requestAnimationFrame(s):e.dispatchEvent(new CustomEvent(`scrollcomplete`))}Ky=requestAnimationFrame(s)}function Jy(e){return typeof e==`function`}function Yy(e){return typeof e==`object`&&!!e}var Xy=[`string`,`number`,`bigint`,`boolean`];function Zy(e){return e==null||Xy.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Zy(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var Qy=Symbol(`box`),$y=Symbol(`is-writable`);function Q(e,t){let n=A(e);return t?{[Qy]:!0,[$y]:!0,get current(){return L(n)},set current(e){t(e)}}:{[Qy]:!0,get current(){return e()}}}function eb(e){return Yy(e)&&Qy in e}function tb(e){return eb(e)&&$y in e}function nb(e){return eb(e)?e:Jy(e)?Q(e):ab(e)}function rb(e){return Object.entries(e).reduce((e,[t,n])=>eb(n)?(tb(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function ib(e){return tb(e)?{[Qy]:!0,get current(){return e.current}}:e}function ab(e){let t=j(On(e));return{[Qy]:!0,[$y]:!0,get current(){return L(t)},set current(e){M(t,e,!0)}}}function ob(e){let t=j(On(e));return{[Qy]:!0,[$y]:!0,get current(){return L(t)},set current(e){M(t,e,!0)}}}ob.from=nb,ob.with=Q,ob.flatten=rb,ob.readonly=ib,ob.isBox=eb,ob.isWritableBox=tb;function sb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var cb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,lb=/\n/g,ub=/^\s*/,db=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,fb=/^:\s*/,pb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,mb=/^[;\s]*/,hb=/^\s+|\s+$/g,gb=`
|
|
557
557
|
`,_b=`/`,vb=`*`,yb=``,bb=`comment`,xb=`declaration`;function Sb(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(lb);t&&(n+=t.length);var i=e.lastIndexOf(gb);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(ub)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(_b!=e.charAt(0)||vb!=e.charAt(1))){for(var n=2;yb!=e.charAt(n)&&(vb!=e.charAt(n)||_b!=e.charAt(n+1));)++n;if(n+=2,yb===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:bb,comment:o})}}function f(){var e=a(),t=c(db);if(t){if(d(),!c(fb))return s(`property missing ':'`);var n=c(pb),r=e({type:xb,property:Cb(t[0].replace(cb,yb)),value:n?Cb(n[0].replace(cb,yb)):yb});return c(mb),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Cb(e){return e?e.replace(hb,yb):yb}function wb(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Sb(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Tb=/\d/,Eb=[`-`,`_`,`/`,`.`];function Db(e=``){if(!Tb.test(e))return e!==e.toLowerCase()}function Ob(e){let t=[],n=``,r,i;for(let a of e){let e=Eb.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Db(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function kb(e){return e?Ob(e).map(e=>jb(e)).join(``):``}function Ab(e){return Mb(kb(e||``))}function jb(e){return e?e[0].toUpperCase()+e.slice(1):``}function Mb(e){return e?e[0].toLowerCase()+e.slice(1):``}function Nb(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[kb(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Ab(e)]=n}return wb(e,n),t}function Pb(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Fb(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Ib=Fb(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Lb(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Ib(t)}: ${e[t]};`).join(`
|
|
558
558
|
`)}function Rb(e={}){return Lb(e).replace(`
|
|
559
|
-
`,` `)}var zb=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function Bb(e){return zb.has(e)}function Vb(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&Bb(e))t[e]=sb(n,i);else if(a&&o)t[e]=Pb(n,i);else if(e===`class`){let r=Zy(n),a=Zy(i);r&&a?t[e]=
|
|
560
|
-
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Hb=Rb({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`}),Ub=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Wb(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=Ub,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=nn(e=>{let n=ai(t,`focusin`,e),r=ai(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Wb(this.#e):null}};function Gb(e){return typeof e==`function`}var Kb=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return ht(this.#t)}get(){let e=pt(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=pt(this.#t);return t===void 0?e:t}set(e){return mt(this.#t,e)}};function qb(e,t){switch(e){case`post`:tr(t);break;case`pre`:rr(t);break}}function Jb(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;qb(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Qr(()=>n(t,o));return o=t,r})}function Yb(e,t,n){let r=ir(()=>{let i=!1;Jb(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});tr(()=>r)}function Xb(e,t,n){Jb(e,`post`,t,n)}function Zb(e,t,n){Jb(e,`pre`,t,n)}Xb.pre=Zb;function Qb(e,t){Yb(e,`post`,t)}function $b(e,t){Yb(e,`pre`,t)}Qb.pre=$b;function ex(e){return Gb(e)?e():e}var tx=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=k(()=>(I(this.#s)?.(),this.getSize().width));#o=k(()=>(I(this.#s)?.(),this.getSize().height));#s=k(()=>{let e=ex(this.#r);if(e)return nn(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??Ub,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=ex(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 I(this.#s)?.(),this.getSize()}get width(){return I(this.#a)}get height(){return I(this.#o)}},nx=class{#e=()=>void 0;#t=k(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return I(this.#t)}};function rx(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 ix(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 ax(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=A(kn(o)),u=A(!1),d=A(void 0),f=A(kn([])),p=()=>{I(f).forEach(e=>e()),j(f,[],!0)},m=e=>{j(f,[...I(f),e],!0)},h=async(e,n,r=!1)=>{try{j(u,!0),j(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:I(l),refetching:r,onCleanup:m,signal:i.signal});return j(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||j(d,e,!0);return}finally{j(u,!1)}},g=s?rx(h,s):c?ix(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 I(l)},get loading(){return I(u)},get error(){return I(d)},mutate:e=>{j(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 ox(e,t,n){return ax(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Xb(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function sx(e,t,n){return ax(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Xb.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}ox.pre=sx;function cx(e){tr(()=>()=>{e()})}function lx(e){tr(()=>Qr(()=>e()))}function ux(e,t){return setTimeout(t,e)}function dx(e){Yr().then(e)}var fx=1,px=9,mx=11;function hx(e){return Yy(e)&&e.nodeType===fx&&typeof e.nodeName==`string`}function gx(e){return Yy(e)&&e.nodeType===px}function _x(e){return Yy(e)&&e.constructor?.name===`VisualViewport`}function vx(e){return Yy(e)&&e.nodeType!==void 0}function yx(e){return vx(e)&&e.nodeType===mx&&`host`in e}function bx(e,t){if(!e||!t||!hx(e)||!hx(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&yx(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xx(e){return gx(e)?e:_x(e)?e.document:e?.ownerDocument??document}function Sx(e){return yx(e)?Sx(e.host):gx(e)?e.defaultView??window:hx(e)?e.ownerDocument?.defaultView??window:window}function Cx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var wx=class{element;#e=k(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return I(this.#e)}set root(e){j(this.#e,e)}constructor(e){typeof e==`function`?this.element=Q(e):this.element=e}getDocument=()=>xx(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Cx(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Tx(e,t){return{[Vi()]:n=>eb(e)?(e.current=n,Qr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Qr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Ex(e){return e?`true`:`false`}function Dx(e){return e?`true`:void 0}function Ox(e){return e?``:void 0}function kx(e){return e?!0:void 0}function Ax(e){return e?`open`:`closed`}function jx(e,t){return t?`mixed`:e?`true`:`false`}var Mx=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Nx(e){let t=new Mx(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Px=`ArrowDown`,Fx=`ArrowLeft`,Ix=`ArrowRight`,Lx=`ArrowUp`,Rx=`CapsLock`,zx=`Control`,Bx=`Enter`,Vx=`Escape`,Hx=`Home`,Ux=`Meta`,Wx=`PageDown`,Gx=`PageUp`,Kx=`Shift`;function qx(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Jx=[Px,Gx,Hx],Yx=[Lx,Wx,`End`];[...Jx,...Yx];function Xx(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Fx:Ix,vertical:Px}[t]}function Zx(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Ix:Fx,vertical:Lx}[t]}function Qx(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Xx(e,t),prevKey:Zx(e,t)}}var $x=typeof document<`u`,eS=tS();function tS(){return $x&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function nS(e){return e instanceof HTMLElement}function rS(e){return e instanceof Element}function iS(e){return e instanceof Element||e instanceof SVGElement}function aS(e){return e.pointerType===`touch`}function oS(e){return e!==null}function sS(e){return e instanceof HTMLInputElement&&`select`in e}var cS=class{#e;#t=ob(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Qx(qx(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Hx]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Ix:Px,t=s===`ArrowUp`?Fx:Lx;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!nS(t)||t.focus()}},lS=class{#e;#t=null;constructor(e){this.#e=e,cx(()=>this.#n())}#n(){this.#t&&=(window.cancelAnimationFrame(this.#t),null)}run(e){this.#n();let t=this.#e.ref.current;if(t){if(typeof t.getAnimations!=`function`){this.#r(e);return}this.#t=window.requestAnimationFrame(()=>{let n=t.getAnimations();if(n.length===0){this.#r(e);return}Promise.allSettled(n.map(e=>e.finished)).then(()=>{this.#r(e)})})}}#r(e){let t=()=>{e()};this.#e.afterTick?dx(t):t()}},uS=class{#e;#t;#n;#r=A(!1);constructor(e){this.#e=e,j(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new lS({ref:this.#e.ref,afterTick:this.#e.open}),Xb(()=>this.#e.open.current,e=>{e&&j(this.#r,!0),this.#t&&this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||j(this.#r,!1),this.#e.onComplete?.())})})}get shouldRender(){return I(this.#r)}};function $(){}function dS(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var fS=Nx({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),pS=new Kb(`Dialog.Root | AlertDialog.Root`),mS=class e{static create(t){let n=pS.getOr(null);return pS.set(new e(t,n))}opts;#e=A(null);get triggerNode(){return I(this.#e)}set triggerNode(e){j(this.#e,e,!0)}#t=A(null);get contentNode(){return I(this.#t)}set contentNode(e){j(this.#t,e,!0)}#n=A(null);get overlayNode(){return I(this.#n)}set overlayNode(e){j(this.#n,e,!0)}#r=A(null);get descriptionNode(){return I(this.#r)}set descriptionNode(e){j(this.#r,e,!0)}#i=A(void 0);get contentId(){return I(this.#i)}set contentId(e){j(this.#i,e,!0)}#a=A(void 0);get titleId(){return I(this.#a)}set titleId(e){j(this.#a,e,!0)}#o=A(void 0);get triggerId(){return I(this.#o)}set triggerId(e){j(this.#o,e,!0)}#s=A(void 0);get descriptionId(){return I(this.#s)}set descriptionId(e){j(this.#s,e,!0)}#c=A(null);get cancelNode(){return I(this.#c)}set cancelNode(e){j(this.#c,e,!0)}#l=A(0);get nestedOpenCount(){return I(this.#l)}set nestedOpenCount(e){j(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new uS({ref:Q(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Xb(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),cx(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>fS.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=k(()=>({"data-state":Ax(this.opts.open.current)}));get sharedProps(){return I(this.#u)}set sharedProps(e){j(this.#u,e)}},hS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=k(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},gS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=Tx(this.opts.ref),Xb.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=k(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},_S=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=Tx(this.opts.ref,e=>{this.root.descriptionNode=e}),Xb.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=k(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},vS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return I(this.#e)}set snippetProps(e){j(this.#e,e)}#t=k(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":Ox(this.root.nestedOpenCount>0),"data-nested":Ox(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},yS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.overlayNode=e)}#e=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return I(this.#e)}set snippetProps(e){j(this.#e,e)}#t=k(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Ox(this.root.nestedOpenCount>0),"data-nested":Ox(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},bS=L(`<div><!></div>`);function xS(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`level`,7,2),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`level`]),l=gS.create({id:Q(()=>r()),level:Q(()=>s()),ref:Q(()=>i(),e=>i(e))}),u=k(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get child(){return a()},set child(e){a(e),O()},get children(){return o()},set children(e){o(e),O()},get level(){return s()},set level(e=2){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R();V(N(t),a,()=>({props:I(u)})),z(e,t)},h=e=>{var t=bS();G(t,()=>({...I(u)})),V(M(t),()=>o()??C),T(t),z(e,t)};return H(p,e=>{a()?e(m):e(h,-1)}),z(e,f),D(d)}q(xS,{id:{},ref:{},child:{},children:{},level:{}},[],[],{mode:`open`});function SS(e,t){E(t,!0);let n=K(t,`children`,7);var r={get children(){return n()},set children(e){n(e),O()}},i=R();return qi(N(i),n,e=>{var t=R();V(N(t),()=>n()??C),z(e,t)}),z(e,i),D(r)}q(SS,{children:{}},[],[],{mode:`open`});var CS=new Kb(`BitsConfig`);function wS(){let e=new ES(null,{});return CS.getOr(e).opts}function TS(e){return CS.set(new ES(CS.getOr(null),e))}var ES=class{opts;constructor(e,t){let n=DS(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function DS(e,t){return n=>Q(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function OS(e,t){return n=>{let r=wS();return Q(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var kS=OS(e=>e.defaultPortalTo,`body`);function AS(e,t){E(t,!0);let n=K(t,`to`,7),r=K(t,`children`,7),i=K(t,`disabled`,7),a=kS(()=>n()),o=gt(),s=k(c);function c(){if(!$x||i())return null;let e=null;return e=typeof a.current==`string`?document.querySelector(a.current):a.current,e}let l;function u(){l&&=(Ii(l),null)}Xb([()=>I(s),()=>i()],([e,t])=>{if(!e||t){u();return}return l=ji(SS,{target:e,props:{children:r()},context:o}),()=>{u()}});var d={get to(){return n()},set to(e){n(e),O()},get children(){return r()},set children(e){r(e),O()},get disabled(){return i()},set disabled(e){i(e),O()}},f=R(),p=N(f),m=e=>{var t=R();V(N(t),()=>r()??C),z(e,t)};return H(p,e=>{i()&&e(m)}),z(e,f),D(d)}q(AS,{to:{},children:{},disabled:{}},[],[],{mode:`open`});var jS=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return ai(e,this.eventName,e=>{t(e)},n)}};function MS(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function NS(e,t){return e===t||e.contains(t)}function PS(e){return e?.ownerDocument??document}function FS(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var IS=[Bx,` `],LS=[Px,Gx,Hx],RS=[Lx,Wx,`End`],zS=[...LS,...RS];[...IS],[...IS];function BS(e){return e===`indeterminate`}function VS(e){return BS(e)?`indeterminate`:e?`checked`:`unchecked`}function HS(e){return e.pointerType===`mouse`}function US(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=xx(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&sS(e)&&t&&e.select()}function WS(e,{select:t=!1}={},n){let r=n();for(let i of e)if(US(i,{select:t}),n()!==r)return!0}var GS=A(!1),KS=class e{static _refs=0;static _cleanup;constructor(){tr(()=>(e._refs===0&&(e._cleanup=ir(()=>{let e=[],t=e=>{j(GS,!1)};return e.push(ai(document,`pointerdown`,t,{capture:!0}),ai(document,`pointermove`,t,{capture:!0}),ai(document,`keydown`,e=>{j(GS,!0)},{capture:!0})),Pb(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(j(GS,!1),e._cleanup?.())}))}get current(){return I(GS)}set current(e){j(GS,e,!0)}},qS=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],JS=qS.join(`,`),YS=typeof Element>`u`,XS=YS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ZS=!YS&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},QS=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):QS(e.parentNode))},$S=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},eC=function(e,t,n){if(QS(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(JS));return t&&XS.call(e,JS)&&r.unshift(e),r=r.filter(n),r},tC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!QS(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=tC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{XS.call(a,JS)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!QS(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=tC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},nC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},rC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||$S(e))&&!nC(e)?0:e.tabIndex},iC=function(e,t){var n=rC(e);return n<0&&t&&!nC(e)?0:n},aC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oC=function(e){return e.tagName===`INPUT`},sC=function(e){return oC(e)&&e.type===`hidden`},cC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},lC=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},uC=function(e){if(!e.name)return!0;var t=e.form||ZS(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=lC(r,e.form);return!i||i===e},dC=function(e){return oC(e)&&e.type===`radio`},fC=function(e){return dC(e)&&!uC(e)},pC=function(e){var t=e&&ZS(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=ZS(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},mC=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},hC=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=XS.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(XS.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=ZS(e);if(o&&!o.shadowRoot&&r(o)===!0)return mC(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(pC(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return mC(e);return!1},gC=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return XS.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},_C=function(e,t){return!(t.disabled||sC(t)||hC(t,e)||cC(t)||gC(t))},vC=function(e,t){return!(fC(t)||rC(t)<0||!_C(e,t))},yC=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},bC=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=iC(a,i),s=i?bC(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(aC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},xC=function(e,t){return t||={},bC(t.getShadowRoot?tC([e],t.includeContainer,{filter:vC.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:yC}):eC(e,t.includeContainer,vC.bind(null,t)))},SC=function(e,t){return t||={},t.getShadowRoot?tC([e],t.includeContainer,{filter:_C.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):eC(e,t.includeContainer,_C.bind(null,t))},CC=function(e,t){if(t||={},!e)throw Error(`No node provided`);return XS.call(e,JS)===!1?!1:vC(t,e)},wC=qS.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),TC=function(e,t){if(t||={},!e)throw Error(`No node provided`);return XS.call(e,wC)===!1?!1:_C(t,e)};function EC(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function DC(e,t){if(!CC(e,EC()))return OC(e,t);let n=xx(e),r=xC(n.body,EC());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function OC(e,t){let n=xx(e);if(!TC(e,EC()))return n.body;let r=SC(n.body,EC());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>CC(e,EC()))??n.body}function kC(e,t){return e.length===t.length?e.every((e,n)=>AC(e,t[n])):!1}function AC(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?kC(e,t):typeof e==`object`&&typeof t==`object`?jC(e,t):Object.is(e,t)}function jC(e,t){if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!AC(e[i],t[i]))return!1;return!0}function MC(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function NC(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function PC(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function FC(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function IC(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return IC(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return LC(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=LC(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function LC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RC={afterMs:1e4,onChange:$};function zC(e,t){let{afterMs:n,onChange:r,getWindow:i}={...RC,...t},a=null,o=A(kn(e));function s(){return i().setTimeout(()=>{j(o,e,!0),r?.(e)},n)}return tr(()=>()=>{a&&i().clearTimeout(a)}),Q(()=>I(o),e=>{j(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var BC=class{#e;#t;#n=k(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=k(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=zC(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=I(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=IC(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&I(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},VC=class{#e;#t;#n;#r=A(null);constructor(e){this.#e=e,this.#t=k(()=>this.#e.enabled()),this.#n=zC(!1,{afterMs:e.transitTimeout??300,onChange:e=>{I(this.#t)&&this.#e.setIsPointerInTransit?.(e)},getWindow:()=>Sx(this.#e.triggerNode())}),Xb([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>!e||!t||!n?void 0:Pb(ai(e,`pointerleave`,e=>{this.#a(e,t)}),ai(t,`pointerleave`,t=>{this.#a(t,e)}))),Xb(()=>I(this.#r),()=>{let t=t=>{if(!I(this.#r))return;let n=t.target;if(!rS(n))return;let r={x:t.clientX,y:t.clientY},i=e.triggerNode()?.contains(n)||e.contentNode()?.contains(n),a=!GC(r,I(this.#r));i?this.#i():a&&(this.#i(),e.onPointerExit())},n=xx(e.triggerNode()??e.contentNode());if(n)return ai(n,`pointermove`,t)})}#i(){j(this.#r,null),this.#n.current=!1}#a(e,t){let n=e.currentTarget;if(!nS(n))return;let r={x:e.clientX,y:e.clientY},i=UC(r,HC(r,n.getBoundingClientRect())),a=WC(t.getBoundingClientRect()),o=KC([...i,...a]);j(this.#r,o,!0),this.#n.current=!0}};function HC(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function UC(e,t,n=5){let r=n*1.5;switch(t){case`top`:return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case`bottom`:return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case`left`:return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case`right`:return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function WC(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function GC(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function KC(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),qC(t)}function qC(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var JC=`data-context-menu-trigger`,YC=`data-context-menu-content`,XC=new Kb(`Menu.Root`),ZC=new Kb(`Menu.Root | Menu.Sub`),QC=new Kb(`Menu.Content`),$C=new Kb(`Menu.Group | Menu.RadioGroup`),ew=new Kb(`Menu.RadioGroup`),tw=new Kb(`Menu.CheckboxGroup`),nw=new jS(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),rw=Nx({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),iw=class e{static create(t){let n=new e(t);return XC.set(n)}opts;isUsingKeyboard=new KS;#e=A(!1);get ignoreCloseAutoFocus(){return I(this.#e)}set ignoreCloseAutoFocus(e){j(this.#e,e,!0)}#t=A(!1);get isPointerInTransit(){return I(this.#t)}set isPointerInTransit(e){j(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>rw.getAttr(e,this.opts.variant.current)},aw=class e{static create(t,n){return ZC.set(new e(t,n,null))}opts;root;parentMenu;contentId=Q(()=>``);#e=A(null);get contentNode(){return I(this.#e)}set contentNode(e){j(this.#e,e,!0)}contentPresence;#t=A(null);get triggerNode(){return I(this.#t)}set triggerNode(e){j(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),n&&Xb(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}},ow=class e{static create(t){return QC.set(new e(t,ZC.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=A(``);get search(){return I(this.#e)}set search(e){j(this.#e,e,!0)}#t=0;#n;#r=A(!1);get mounted(){return I(this.#r)}set mounted(e){j(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new wx(e.ref),this.attachment=Tx(this.opts.ref,e=>{this.parentMenu.contentNode!==e&&(this.parentMenu.contentNode=e)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new VC({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`)),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:e=>{this.parentMenu.root.isPointerInTransit=e}}),this.#n=new BC({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new cS({rootNode:Q(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:Q(()=>`vertical`)}),Xb(()=>this.parentMenu.contentNode,e=>e?nw.listen(e,()=>{dx(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),tr(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){let e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&CC(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();let n=DC(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),dx(()=>{n.focus(),dx(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===`Tab`){this.handleTabKeyDown(e);return}let t=e.target,n=e.currentTarget;if(!nS(t)||!nS(n))return;let r=t.closest(`[${this.parentMenu.root.getBitsAttr(`content`)}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,a=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code===`Space`)return;let o=this.#a();r&&!i&&a&&this.#n(e.key,o),e.target?.id===this.parentMenu.contentId.current&&zS.includes(e.key)&&(e.preventDefault(),RS.includes(e.key)&&o.reverse(),WS(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){rS(e.currentTarget)&&rS(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&dx(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(e){e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`))||this.#o()||this.parentMenu.root.isUsingKeyboard.current||(this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!iS(e.target))return;let t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}e.target.closest(`#${t}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=k(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return I(this.#s)}set snippetProps(e){j(this.#s,e)}#c=k(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":Ax(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:`auto`,contain:`layout style`},...this.attachment}));get props(){return I(this.#c)}set props(e){j(this.#c,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},sw=class{opts;content;attachment;#e=A(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=Tx(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&HS(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!nS(t))return;t.focus()}}onpointerleave(e){e.defaultPrevented||HS(e)&&this.content.onItemLeave(e)}onfocus(e){dx(()=>{e.defaultPrevented||this.opts.disabled.current||j(this.#e,!0)})}onblur(e){dx(()=>{e.defaultPrevented||j(this.#e,!1)})}#t=k(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":Ex(this.opts.disabled.current),"data-disabled":Ox(this.opts.disabled.current),"data-highlighted":I(this.#e)?``:void 0,[this.content.parentMenu.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},cw=class e{static create(t){return new e(t,new sw(t,QC.get()))}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;let e=new CustomEvent(`menuitemselect`,{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){let t=this.item.content.search!==``;if(!(this.item.opts.disabled.current||t&&e.key===` `)&&IS.includes(e.key)){if(!nS(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!nS(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=k(()=>Vb(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return I(this.#n)}set props(e){j(this.#n,e)}},lw=class e{static create(t,n){return new e(t,new cw(t,new sw(t,QC.get())),n)}opts;item;group;constructor(e,t,n=null){this.opts=e,this.item=t,this.group=n,this.group&&(Xb(()=>this.group.opts.value.current,e=>{this.opts.checked.current=e.includes(this.opts.value.current)}),Xb(()=>this.opts.checked.current,e=>{e?this.group.addValue(this.opts.value.current):this.group.removeValue(this.opts.value.current)}))}toggleChecked(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}#e=k(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return I(this.#e)}set snippetProps(e){j(this.#e,e)}#t=k(()=>({...this.item.props,role:`menuitemcheckbox`,"aria-checked":jx(this.opts.checked.current,this.opts.indeterminate.current),"data-state":VS(this.opts.checked.current),[this.item.root.getBitsAttr(`checkbox-item`)]:``}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},uw=class e{static create(t){return $C.set(new e(t,XC.get()))}opts;root;attachment;#e=A(void 0);get groupHeadingId(){return I(this.#e)}set groupHeadingId(e){j(this.#e,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref)}#t=k(()=>({id:this.opts.id.current,role:`group`,"aria-labelledby":this.groupHeadingId,[this.root.getBitsAttr(`group`)]:``,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},dw=class e{static create(t){let n=tw.getOr(null);if(n)return new e(t,n);let r=ew.getOr(null);return r?new e(t,r):new e(t,$C.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=Tx(this.opts.ref,e=>this.group.groupHeadingId=e?.id)}#e=k(()=>({id:this.opts.id.current,role:`group`,[this.group.root.getBitsAttr(`group-heading`)]:``,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},fw=class e{static create(t){return new e(t,XC.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref)}#e=k(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},pw=class e{static create(t){return $C.set(ew.set(new e(t,QC.get())))}opts;content;attachment;#e=A(null);get groupHeadingId(){return I(this.#e)}set groupHeadingId(e){j(this.#e,e,!0)}root;constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=Tx(this.opts.ref)}setValue(e){this.opts.value.current=e}#t=k(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`radio-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},mw=class e{static create(t){let n=ew.get();return new e(t,new cw(t,new sw(t,n.content)),n)}opts;item;group;attachment;#e=k(()=>this.group.opts.value.current===this.opts.value.current);get isChecked(){return I(this.#e)}set isChecked(e){j(this.#e,e)}constructor(e,t,n){this.opts=e,this.item=t,this.group=n,this.attachment=Tx(this.opts.ref)}selectValue(){this.group.setValue(this.opts.value.current)}#t=k(()=>({[this.group.root.getBitsAttr(`radio-item`)]:``,...this.item.props,role:`menuitemradio`,"aria-checked":jx(this.isChecked,!1),"data-state":VS(this.isChecked),...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},hw=class e{static create(t){return new e(t,ZC.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=Tx(this.opts.ref,e=>this.parentMenu.triggerNode=e)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType===`touch`)return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType===`touch`&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===` `||e.key===`Enter`){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===`ArrowDown`&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=k(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=k(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":Ex(this.parentMenu.opts.open.current),"aria-controls":I(this.#e),"data-disabled":Ox(this.opts.disabled.current),"data-state":Ax(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr(`trigger`)]:``,onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},gw=class e{static create(t){return tw.set(new e(t,QC.get()))}opts;content;root;attachment;#e=A(null);get groupHeadingId(){return I(this.#e)}set groupHeadingId(e){j(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=Tx(this.opts.ref)}addValue(e){if(e&&!this.opts.value.current.includes(e)){let t=[...lt(this.opts.value.current),e];if(this.opts.value.current=t,kC(this.opts.value.current,t))return;this.opts.onValueChange.current(t)}}removeValue(e){if(!e||this.opts.value.current.indexOf(e)===-1)return;let t=this.opts.value.current.filter(t=>t!==e);this.opts.value.current=t,!kC(this.opts.value.current,t)&&this.opts.onValueChange.current(t)}#t=k(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`checkbox-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}};globalThis.bitsDismissableLayers??=new Map;var _w=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=$;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,tr(()=>{this.#a=PS(this.opts.ref.current)});let t=$,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};Xb([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ux(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),cx(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&dx(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Pb(ai(this.#a,`pointerdown`,Pb(this.#f,this.#m),{capture:!0}),ai(this.#a,`pointerdown`,Pb(this.#p,this.#d)),ai(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=xw(e)),this.#e.current(e)};#d=MS(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||bw(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=xw(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=ai(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=yw(this.opts.ref.current))};#h=e=>this.opts.ref.current?NS(this.opts.ref.current,e):!1;#g=MS(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function vw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function yw(e){let t=[...globalThis.bitsDismissableLayers],n=vw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function bw(e,t){let n=e.target;if(!iS(n))return!1;let r=!!n.closest(`[${JC}]`);if(`button`in e&&e.button>0&&!r)return!1;if(`button`in e&&e.button===0&&r)return!0;let i=!!t.closest(`[${YC}]`);return r&&i?!1:PS(n).documentElement.contains(n)&&!NS(t,n)&&FS(e,t)}function xw(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Sw(e,t){E(t,!0);let n=K(t,`interactOutsideBehavior`,7,`close`),r=K(t,`onInteractOutside`,7,$),i=K(t,`onFocusOutside`,7,$),a=K(t,`id`,7),o=K(t,`children`,7),s=K(t,`enabled`,7),c=K(t,`isValidEvent`,7,()=>!1),l=K(t,`ref`,7),u=_w.create({id:Q(()=>a()),interactOutsideBehavior:Q(()=>n()),onInteractOutside:Q(()=>r()),enabled:Q(()=>s()),onFocusOutside:Q(()=>i()),isValidEvent:Q(()=>c()),ref:l()});var d={get interactOutsideBehavior(){return n()},set interactOutsideBehavior(e=`close`){n(e),O()},get onInteractOutside(){return r()},set onInteractOutside(e=$){r(e),O()},get onFocusOutside(){return i()},set onFocusOutside(e=$){i(e),O()},get id(){return a()},set id(e){a(e),O()},get children(){return o()},set children(e){o(e),O()},get enabled(){return s()},set enabled(e){s(e),O()},get isValidEvent(){return c()},set isValidEvent(e=()=>!1){c(e),O()},get ref(){return l()},set ref(e){l(e),O()}},f=R();return V(N(f),()=>o()??C,()=>({props:u.props})),z(e,f),D(d)}q(Sw,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsEscapeLayers??=new Map;var Cw=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new wx(this.opts.ref);let t=$;Xb(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ai(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!ww(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function ww(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Tw(e,t){E(t,!0);let n=K(t,`escapeKeydownBehavior`,7,`close`),r=K(t,`onEscapeKeydown`,7,$),i=K(t,`children`,7),a=K(t,`enabled`,7),o=K(t,`ref`,7);Cw.create({escapeKeydownBehavior:Q(()=>n()),onEscapeKeydown:Q(()=>r()),enabled:Q(()=>a()),ref:o()});var s={get escapeKeydownBehavior(){return n()},set escapeKeydownBehavior(e=`close`){n(e),O()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e=$){r(e),O()},get children(){return i()},set children(e){i(e),O()},get enabled(){return a()},set enabled(e){a(e),O()},get ref(){return o()},set ref(e){o(e),O()}},c=R();return V(N(c),()=>i()??C),z(e,c),D(s)}q(Tw,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`});var Ew=class e{static instance;#e=ab([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},Dw=class e{#e=!1;#t=null;#n=Ew.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(ai(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&TC(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),ai(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?xC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?SC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return Xb([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),cx(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function Ow(e,t){E(t,!0);let n=K(t,`enabled`,7,!1),r=K(t,`trapFocus`,7,!1),i=K(t,`loop`,7,!1),a=K(t,`onCloseAutoFocus`,7,$),o=K(t,`onOpenAutoFocus`,7,$),s=K(t,`focusScope`,7),c=K(t,`ref`,7),l=Dw.use({enabled:Q(()=>n()),trap:Q(()=>r()),loop:i(),onCloseAutoFocus:Q(()=>a()),onOpenAutoFocus:Q(()=>o()),ref:c()});var u={get enabled(){return n()},set enabled(e=!1){n(e),O()},get trapFocus(){return r()},set trapFocus(e=!1){r(e),O()},get loop(){return i()},set loop(e=!1){i(e),O()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(e=$){a(e),O()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(e=$){o(e),O()},get focusScope(){return s()},set focusScope(e){s(e),O()},get ref(){return c()},set ref(e){c(e),O()}},d=R();return V(N(d),()=>s()??C,()=>({props:l.props})),z(e,d),D(u)}q(Ow,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsTextSelectionLayers??=new Map;var kw=class e{static create(t){return new e(t)}opts;domContext;#e=$;constructor(e){this.opts=e,this.domContext=new wx(e.ref);let t=$;Xb(()=>this.opts.enabled.current,e=>(e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Pb(ai(this.domContext.getDocument(),`pointerdown`,this.#n),ai(this.domContext.getDocument(),`pointerup`,sb(this.#r,this.opts.onPointerUp.current)))}#n=e=>{let t=this.opts.ref.current,n=e.target;!nS(t)||!nS(n)||!this.opts.enabled.current||!Nw(this)||!bx(t,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=jw(t,this.domContext.getDocument().body)))};#r=()=>{this.#e(),this.#e=$}},Aw=e=>e.style.userSelect||e.style.webkitUserSelect;function jw(e,t){let n=Aw(t),r=Aw(e);return Mw(t,`none`),Mw(e,`text`),()=>{Mw(t,n),Mw(e,r)}}function Mw(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Nw(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function Pw(e,t){E(t,!0);let n=K(t,`preventOverflowTextSelection`,7,!0),r=K(t,`onPointerDown`,7,$),i=K(t,`onPointerUp`,7,$),a=K(t,`id`,7),o=K(t,`children`,7),s=K(t,`enabled`,7),c=K(t,`ref`,7);kw.create({id:Q(()=>a()),onPointerDown:Q(()=>r()),onPointerUp:Q(()=>i()),enabled:Q(()=>s()&&n()),ref:c()});var l={get preventOverflowTextSelection(){return n()},set preventOverflowTextSelection(e=!0){n(e),O()},get onPointerDown(){return r()},set onPointerDown(e=$){r(e),O()},get onPointerUp(){return i()},set onPointerUp(e=$){i(e),O()},get id(){return a()},set id(e){a(e),O()},get children(){return o()},set children(e){o(e),O()},get enabled(){return s()},set enabled(e){s(e),O()},get ref(){return c()},set ref(e){c(e),O()}},u=R();return V(N(u),()=>o()??C),z(e,u),D(l)}q(Pw,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsIdCounter??={current:0};function Fw(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Iw=class{#e;#t=0;#n=A();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),j(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,I(this.#n)===void 0&&(this.#r=ir(()=>{j(this.#n,this.#e(...e),!0)})),tr(()=>()=>{this.#i()}),I(this.#n)}},Lw=new B_,Rw=A(null),zw=null,Bw=null,Vw=!1,Hw=Q(()=>{for(let e of Lw.values())if(e)return!0;return!1}),Uw=null,Ww=new Iw(()=>{function e(){document.body.setAttribute(`style`,I(Rw)??``),document.body.style.removeProperty(`--scrollbar-width`),eS&&zw?.(),j(Rw,null)}function t(){Bw!==null&&(window.clearTimeout(Bw),Bw=null)}function n(e,n){t(),Vw=!0,Uw=Date.now();let r=Uw,i=()=>{Bw=null,Uw===r&&(Kw(Lw)?Vw=!1:(Vw=!1,n()))},a=e===null?24:e;Bw=window.setTimeout(i,a)}function r(){I(Rw)===null&&Lw.size===0&&!Vw&&j(Rw,document.body.getAttribute(`style`),!0)}return Xb(()=>Hw.current,()=>{if(!Hw.current)return;r(),Vw=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,eS&&(zw=ai(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),dx(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),cx(()=>()=>{zw?.()}),{get lockMap(){return Lw},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),Gw=class{#e=Fw();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=Ww.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=Q(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),cx(()=>{if(this.#r.lockMap.delete(this.#e),Kw(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function Kw(e){for(let[t,n]of e)if(n)return!0;return!1}function qw(e,t){E(t,!0);let n=K(t,`preventScroll`,7,!0),r=K(t,`restoreScrollDelay`,7,null);return n()&&new Gw(n(),()=>r()),D({get preventScroll(){return n()},set preventScroll(e=!0){n(e),O()},get restoreScrollDelay(){return r()},set restoreScrollDelay(e=null){r(e),O()}})}q(qw,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});var Jw=L(`<div><!></div>`);function Yw(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`forceMount`,7,!1),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`ref`,15,null),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`forceMount`,`child`,`children`,`ref`]),l=yS.create({id:Q(()=>r()),ref:Q(()=>s(),e=>s(e))}),u=k(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),O()},get forceMount(){return i()},set forceMount(e=!1){i(e),O()},get child(){return a()},set child(e){a(e),O()},get children(){return o()},set children(e){o(e),O()},get ref(){return s()},set ref(e=null){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R(),n=N(t),r=e=>{var t=R(),n=N(t);{let e=k(()=>({props:Vb(I(u)),...l.snippetProps}));V(n,a,()=>I(e))}z(e,t)},i=e=>{var t=Jw();G(t,e=>({...e}),[()=>Vb(I(u))]),V(M(t),()=>o()??C,()=>l.snippetProps),T(t),z(e,t)};H(n,e=>{a()?e(r):e(i,-1)}),z(e,t)};return H(p,e=>{(l.shouldRender||i())&&e(m)}),z(e,f),D(d)}q(Yw,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],{mode:`open`});var Xw=L(`<div><!></div>`);function Zw(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`]),c=_S.create({id:Q(()=>r()),ref:Q(()=>o(),e=>o(e))}),l=k(()=>Vb(s,c.props));var u={get id(){return r()},set id(e=dS(n)){r(e),O()},get children(){return i()},set children(e){i(e),O()},get child(){return a()},set child(e){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),a,()=>({props:I(l)})),z(e,t)},m=e=>{var t=Xw();G(t,()=>({...I(l)})),V(M(t),()=>i()??C),T(t),z(e,t)};return H(f,e=>{a()?e(p):e(m,-1)}),z(e,d),D(u)}q(Zw,{id:{},children:{},child:{},ref:{}},[],[],{mode:`open`});function Qw(e,t){E(t,!0);let n=K(t,`children`,7),r=K(t,`defaultPortalTo`,7),i=K(t,`defaultLocale`,7);TS({defaultPortalTo:Q(()=>r()),defaultLocale:Q(()=>i())});var a={get children(){return n()},set children(e){n(e),O()},get defaultPortalTo(){return r()},set defaultPortalTo(e){r(e),O()},get defaultLocale(){return i()},set defaultLocale(e){i(e),O()}},o=R();return V(N(o),()=>n()??C),z(e,o),D(a)}q(Qw,{children:{},defaultPortalTo:{},defaultLocale:{}},[],[],{mode:`open`});var $w=L(`<input/>`),eT=L(`<input/>`);function tT(e,t){E(t,!0);let n=K(t,`value`,15),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`value`]),i=k(()=>Vb(r,{"aria-hidden":`true`,tabindex:-1,style:Hb}));var a={get value(){return n()},set value(e){n(e),O()}},o=R(),s=N(o),c=e=>{var t=$w();G(t,()=>({...I(i),value:n()}),void 0,void 0,void 0,void 0,!0),z(e,t)},l=e=>{var t=eT();G(t,()=>({...I(i)}),void 0,void 0,void 0,void 0,!0),Za(t,n),z(e,t)};return H(s,e=>{I(i).type===`checkbox`?e(c):e(l,-1)}),z(e,o),D(a)}q(tT,{value:{}},[],[],{mode:`open`});var nT=Nx({component:`collapsible`,parts:[`root`,`content`,`trigger`]}),rT=new Kb(`Collapsible.Root`),iT=class e{static create(t){return rT.set(new e(t))}opts;attachment;#e=A(null);get contentNode(){return I(this.#e)}set contentNode(e){j(this.#e,e,!0)}contentPresence;#t=A(void 0);get contentId(){return I(this.#t)}set contentId(e){j(this.#t,e,!0)}constructor(e){this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=Tx(this.opts.ref),this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#n=k(()=>({id:this.opts.id.current,"data-state":Ax(this.opts.open.current),"data-disabled":Ox(this.opts.disabled.current),[nT.root]:``,...this.attachment}));get props(){return I(this.#n)}set props(e){j(this.#n,e)}},aT=class e{static create(t){return new e(t,rT.get())}opts;root;attachment;#e=k(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return I(this.#e)}set present(e){j(this.#e,e)}#t;#n=A(!1);#r=A(0);#i=A(0);constructor(e,t){this.opts=e,this.root=t,j(this.#n,t.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=Tx(this.opts.ref,e=>this.root.contentNode=e),Xb.pre(()=>this.opts.id.current,e=>{this.root.contentId=e}),rr(()=>{let e=requestAnimationFrame(()=>{j(this.#n,!1)});return()=>{cancelAnimationFrame(e)}}),Xb.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([e,t])=>!e||!t?void 0:ai(e,`beforematch`,()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),Xb([()=>this.opts.ref.current,()=>this.present],([e])=>{e&&dx(()=>{if(!this.opts.ref.current)return;this.#t=this.#t||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();if(j(this.#i,t.height,!0),j(this.#r,t.width,!0),!I(this.#n)){let{animationName:t,transitionDuration:n}=this.#t;e.style.transitionDuration=n,e.style.animationName=t}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#a=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return I(this.#a)}set snippetProps(e){j(this.#a,e)}#o=k(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":I(this.#i)?`${I(this.#i)}px`:void 0,"--bits-collapsible-content-width":I(this.#r)?`${I(this.#r)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?`until-found`:void 0,"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),[nT.content]:``,...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return I(this.#o)}set props(e){j(this.#o,e)}},oT=class e{static create(t){return new e(t,rT.get())}opts;root;attachment;#e=k(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!I(this.#e)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){I(this.#e)||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.toggleOpen())}#t=k(()=>({id:this.opts.id.current,type:`button`,disabled:I(this.#e),"aria-controls":this.root.contentId,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(I(this.#e)),[nT.trigger]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},sT=L(`<div><!></div>`);function cT(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`open`,15,!1),c=K(t,`disabled`,7,!1),l=K(t,`onOpenChange`,7,$),u=K(t,`onOpenChangeComplete`,7,$),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`open`,`disabled`,`onOpenChange`,`onOpenChangeComplete`]),f=iT.create({open:Q(()=>s(),e=>{s(e),l()(e)}),disabled:Q(()=>c()),id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),onOpenChangeComplete:Q(()=>u())}),p=k(()=>Vb(d,f.props));var m={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get id(){return a()},set id(e=dS(n)){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get open(){return s()},set open(e=!1){s(e),O()},get disabled(){return c()},set disabled(e=!1){c(e),O()},get onOpenChange(){return l()},set onOpenChange(e=$){l(e),O()},get onOpenChangeComplete(){return u()},set onOpenChangeComplete(e=$){u(e),O()}},h=R(),g=N(h),_=e=>{var t=R();V(N(t),i,()=>({props:I(p)})),z(e,t)},v=e=>{var t=sT();G(t,()=>({...I(p)})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(g,e=>{i()?e(_):e(v,-1)}),z(e,h),D(m)}q(cT,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{},onOpenChangeComplete:{}},[],[],{mode:`open`});var lT=L(`<div><!></div>`);function uT(e,t){let n=vi();E(t,!0);let r=K(t,`child`,7),i=K(t,`ref`,15,null),a=K(t,`forceMount`,7,!1),o=K(t,`hiddenUntilFound`,7,!1),s=K(t,`children`,7),c=K(t,`id`,23,()=>dS(n)),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`ref`,`forceMount`,`hiddenUntilFound`,`children`,`id`]),u=aT.create({id:Q(()=>c()),forceMount:Q(()=>a()),hiddenUntilFound:Q(()=>o()),ref:Q(()=>i(),e=>i(e))}),d=k(()=>Vb(l,u.props));var f={get child(){return r()},set child(e){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get forceMount(){return a()},set forceMount(e=!1){a(e),O()},get hiddenUntilFound(){return o()},set hiddenUntilFound(e=!1){o(e),O()},get children(){return s()},set children(e){s(e),O()},get id(){return c()},set id(e=dS(n)){c(e),O()}},p=R(),m=N(p),h=e=>{var t=R(),n=N(t);{let e=k(()=>({...u.snippetProps,props:I(d)}));V(n,r,()=>I(e))}z(e,t)},g=e=>{var t=lT();G(t,()=>({...I(d)})),V(M(t),()=>s()??C),T(t),z(e,t)};return H(m,e=>{r()?e(h):e(g,-1)}),z(e,p),D(f)}q(uT,{child:{},ref:{},forceMount:{},hiddenUntilFound:{},children:{},id:{}},[],[],{mode:`open`});var dT=L(`<button><!></button>`);function fT(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`disabled`,7,!1),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`,`disabled`]),l=oT.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e)),disabled:Q(()=>s())}),u=k(()=>Vb(c,l.props));var d={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get id(){return o()},set id(e=dS(n)){o(e),O()},get disabled(){return s()},set disabled(e=!1){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R();V(N(t),i,()=>({props:I(u)})),z(e,t)},h=e=>{var t=dT();G(t,()=>({...I(u)})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(p,e=>{i()?e(m):e(h,-1)}),z(e,f),D(d)}q(fT,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],{mode:`open`});var pT=[`top`,`right`,`bottom`,`left`],mT=Math.min,hT=Math.max,gT=Math.round,_T=Math.floor,vT=e=>({x:e,y:e}),yT={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bT(e,t,n){return hT(e,mT(t,n))}function xT(e,t){return typeof e==`function`?e(t):e}function ST(e){return e.split(`-`)[0]}function CT(e){return e.split(`-`)[1]}function wT(e){return e===`x`?`y`:`x`}function TT(e){return e===`y`?`height`:`width`}function ET(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function DT(e){return wT(ET(e))}function OT(e,t,n){n===void 0&&(n=!1);let r=CT(e),i=DT(e),a=TT(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=LT(o)),[o,LT(o)]}function kT(e){let t=LT(e);return[AT(e),t,AT(t)]}function AT(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jT=[`left`,`right`],MT=[`right`,`left`],NT=[`top`,`bottom`],PT=[`bottom`,`top`];function FT(e,t,n){switch(e){case`top`:case`bottom`:return n?t?MT:jT:t?jT:MT;case`left`:case`right`:return t?NT:PT;default:return[]}}function IT(e,t,n,r){let i=CT(e),a=FT(ST(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(AT)))),a}function LT(e){let t=ST(e);return yT[t]+e.slice(t.length)}function RT(e){return{top:0,right:0,bottom:0,left:0,...e}}function zT(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:RT(e)}function BT(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function VT(e,t,n){let{reference:r,floating:i}=e,a=ET(t),o=DT(t),s=TT(o),c=ST(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(CT(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function HT(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xT(t,e),p=zT(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=BT(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=BT(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var UT=50,WT=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:HT},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=VT(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<UT&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=VT(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},GT=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xT(e,t)||{};if(l==null)return{};let d=zT(u),f={x:n,y:r},p=DT(i),m=TT(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),ee=S?S[y]:0;(!ee||!await(o.isElement==null?void 0:o.isElement(S)))&&(ee=s.floating[y]||a.floating[m]);let te=b/2-x/2,ne=ee/2-h[m]/2-1,re=mT(d[_],ne),ie=mT(d[v],ne),ae=re,C=ee-h[m]-ie,oe=ee/2-h[m]/2+te,se=bT(ae,oe,C),ce=!c.arrow&&CT(i)!=null&&oe!==se&&a.reference[m]/2-(oe<ae?re:ie)-h[m]/2<0,le=ce?oe<ae?oe-ae:oe-C:0;return{[p]:f[p]+le,data:{[p]:se,centerOffset:oe-se-le,...ce&&{alignmentOffset:le}},reset:ce}}}),KT=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xT(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ST(r),_=ET(o),v=ST(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[LT(o)]:kT(o)),x=p!==`none`;!d&&x&&b.push(...IT(o,m,p,y));let S=[o,...b],ee=await s.detectOverflow(t,h),te=[],ne=i.flip?.overflows||[];if(l&&te.push(ee[g]),u){let e=OT(r,a,y);te.push(ee[e[0]],ee[e[1]])}if(ne=[...ne,{placement:r,overflows:te}],!te.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ET(t))||ne.every(e=>ET(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:ne},reset:{placement:t}};let n=ne.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=ne.filter(e=>{if(x){let t=ET(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function qT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JT(e){return pT.some(t=>e[t]>=0)}var YT=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=xT(e,t);switch(i){case`referenceHidden`:{let e=qT(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:JT(e)}}}case`escaped`:{let e=qT(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:JT(e)}}}default:return{}}}}},XT=new Set([`left`,`top`]);async function ZT(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ST(n),s=CT(n),c=ET(n)===`y`,l=XT.has(o)?-1:1,u=a&&c?-1:1,d=xT(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var QT=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ZT(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$T=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xT(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ET(ST(i)),p=wT(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=bT(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=bT(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},eE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=xT(e,t),u={x:n,y:r},d=ET(i),f=wT(d),p=u[f],m=u[d],h=xT(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=XT.has(ST(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},tE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=xT(e,t),u=await o.detectOverflow(t,l),d=ST(i),f=CT(i),p=ET(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=mT(h-u[g],v),x=mT(m-u[_],y),S=!t.middlewareData.shift,ee=b,te=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(te=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(ee=v),S&&!f){let e=hT(u.left,0),t=hT(u.right,0),n=hT(u.top,0),r=hT(u.bottom,0);p?te=m-2*(e!==0||t!==0?e+t:hT(u.left,u.right)):ee=h-2*(n!==0||r!==0?n+r:hT(u.top,u.bottom))}await c({...t,availableWidth:te,availableHeight:ee});let ne=await o.getDimensions(s.floating);return m!==ne.width||h!==ne.height?{reset:{rects:!0}}:{}}}};function nE(){return typeof window<`u`}function rE(e){return oE(e)?(e.nodeName||``).toLowerCase():`#document`}function iE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aE(e){return((oE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oE(e){return nE()?e instanceof Node||e instanceof iE(e).Node:!1}function sE(e){return nE()?e instanceof Element||e instanceof iE(e).Element:!1}function cE(e){return nE()?e instanceof HTMLElement||e instanceof iE(e).HTMLElement:!1}function lE(e){return!nE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof iE(e).ShadowRoot}function uE(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=xE(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function dE(e){return/^(table|td|th)$/.test(rE(e))}function fE(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var pE=/transform|translate|scale|rotate|perspective|filter/,mE=/paint|layout|strict|content/,hE=e=>!!e&&e!==`none`,gE;function _E(e){let t=sE(e)?xE(e):e;return hE(t.transform)||hE(t.translate)||hE(t.scale)||hE(t.rotate)||hE(t.perspective)||!yE()&&(hE(t.backdropFilter)||hE(t.filter))||pE.test(t.willChange||``)||mE.test(t.contain||``)}function vE(e){let t=CE(e);for(;cE(t)&&!bE(t);){if(_E(t))return t;if(fE(t))return null;t=CE(t)}return null}function yE(){return gE??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),gE}function bE(e){return/^(html|body|#document)$/.test(rE(e))}function xE(e){return iE(e).getComputedStyle(e)}function SE(e){return sE(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function CE(e){if(rE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||lE(e)&&e.host||aE(e);return lE(t)?t.host:t}function wE(e){let t=CE(e);return bE(t)?e.ownerDocument?e.ownerDocument.body:e.body:cE(t)&&uE(t)?t:wE(t)}function TE(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=wE(e),i=r===e.ownerDocument?.body,a=iE(r);if(i){let e=EE(a);return t.concat(a,a.visualViewport||[],uE(r)?r:[],e&&n?TE(e):[])}else return t.concat(r,TE(r,[],n))}function EE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DE(e){let t=xE(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=cE(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=gT(n)!==a||gT(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function OE(e){return sE(e)?e:e.contextElement}function kE(e){let t=OE(e);if(!cE(t))return vT(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=DE(t),o=(a?gT(n.width):n.width)/r,s=(a?gT(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var AE=vT(0);function jE(e){let t=iE(e);return!yE()||!t.visualViewport?AE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ME(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==iE(e)?!1:t}function NE(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=OE(e),o=vT(1);t&&(r?sE(r)&&(o=kE(r)):o=kE(e));let s=ME(a,n,r)?jE(a):vT(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=iE(a),t=r&&sE(r)?iE(r):r,n=e,i=EE(n);for(;i&&r&&t!==n;){let e=kE(i),t=i.getBoundingClientRect(),r=xE(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=iE(i),i=EE(n)}}return BT({width:u,height:d,x:c,y:l})}function PE(e,t){let n=SE(e).scrollLeft;return t?t.left+n:NE(aE(e)).left+n}function FE(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-PE(e,n),y:n.top+t.scrollTop}}function IE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=aE(r),s=t?fE(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=vT(1),u=vT(0),d=cE(r);if((d||!d&&!a)&&((rE(r)!==`body`||uE(o))&&(c=SE(r)),d)){let e=NE(r);l=kE(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?FE(o,c):vT(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function LE(e){return Array.from(e.getClientRects())}function RE(e){let t=aE(e),n=SE(e),r=e.ownerDocument.body,i=hT(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=hT(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+PE(e),s=-n.scrollTop;return xE(r).direction===`rtl`&&(o+=hT(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var zE=25;function BE(e,t){let n=iE(e),r=aE(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=yE();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=PE(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=zE&&(a-=o)}else l<=zE&&(a+=l);return{width:a,height:o,x:s,y:c}}function VE(e,t){let n=NE(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cE(e)?kE(e):vT(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function HE(e,t,n){let r;if(t===`viewport`)r=BE(e,n);else if(t===`document`)r=RE(aE(e));else if(sE(t))r=VE(t,n);else{let n=jE(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return BT(r)}function UE(e,t){let n=CE(e);return n===t||!sE(n)||bE(n)?!1:xE(n).position===`fixed`||UE(n,t)}function WE(e,t){let n=t.get(e);if(n)return n;let r=TE(e,[],!1).filter(e=>sE(e)&&rE(e)!==`body`),i=null,a=xE(e).position===`fixed`,o=a?CE(e):e;for(;sE(o)&&!bE(o);){let t=xE(o),n=_E(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||uE(o)&&!n&&UE(e,o))?r=r.filter(e=>e!==o):i=t,o=CE(o)}return t.set(e,r),r}function GE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?fE(t)?[]:WE(t,this._c):[].concat(n),r],o=HE(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=HE(t,a[e],i);s=hT(n.top,s),c=mT(n.right,c),l=mT(n.bottom,l),u=hT(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function KE(e){let{width:t,height:n}=DE(e);return{width:t,height:n}}function qE(e,t,n){let r=cE(t),i=aE(t),a=n===`fixed`,o=NE(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=vT(0);function l(){c.x=PE(i)}if(r||!r&&!a)if((rE(t)!==`body`||uE(i))&&(s=SE(t)),r){let e=NE(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?FE(i,s):vT(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function JE(e){return xE(e).position===`static`}function YE(e,t){if(!cE(e)||xE(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return aE(e)===n&&(n=n.ownerDocument.body),n}function XE(e,t){let n=iE(e);if(fE(e))return n;if(!cE(e)){let t=CE(e);for(;t&&!bE(t);){if(sE(t)&&!JE(t))return t;t=CE(t)}return n}let r=YE(e,t);for(;r&&dE(r)&&JE(r);)r=YE(r,t);return r&&bE(r)&&JE(r)&&!_E(r)?n:r||vE(e)||n}var ZE=async function(e){let t=this.getOffsetParent||XE,n=this.getDimensions,r=await n(e.floating);return{reference:qE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QE(e){return xE(e).direction===`rtl`}var $E={convertOffsetParentRelativeRectToViewportRelativeRect:IE,getDocumentElement:aE,getClippingRect:GE,getOffsetParent:XE,getElementRects:ZE,getClientRects:LE,getDimensions:KE,getScale:kE,isElement:sE,isRTL:QE};function eD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tD(e,t){let n=null,r,i=aE(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=_T(d),h=_T(i.clientWidth-(u+f)),g=_T(i.clientHeight-(d+p)),_=_T(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:hT(0,mT(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!eD(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function nD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=OE(e),u=i||a?[...l?TE(l):[],...t?TE(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?tD(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?NE(e):null;c&&g();function g(){let t=NE(e);h&&!eD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rD=QT,iD=$T,aD=KT,oD=tE,sD=YT,cD=GT,lD=eE,uD=(e,t,n)=>{let r=new Map,i={platform:$E,...n},a={...i.platform,_c:r};return WT(e,t,{...i,platform:a})};function dD(e){return typeof e==`function`?e():e}function fD(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pD(e,t){let n=fD(e);return Math.round(t*n)/n}function mD(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function hD(e){let t=e.whileElementsMounted,n=k(()=>dD(e.open)??!0),r=k(()=>dD(e.middleware)),i=k(()=>dD(e.transform)??!0),a=k(()=>dD(e.placement)??`bottom`),o=k(()=>dD(e.strategy)??`absolute`),s=k(()=>dD(e.sideOffset)??0),c=k(()=>dD(e.alignOffset)??0),l=e.reference,u=A(0),d=A(0),f=ab(null),p=A(kn(I(o))),m=A(kn(I(a))),h=A(kn({})),g=A(!1),_=!1,v=k(()=>{let e=f.current?pD(f.current,I(u)):I(u),t=f.current?pD(f.current,I(d)):I(d);return I(i)?{position:I(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&fD(f.current)>=1.5&&{willChange:`transform`}}:{position:I(p),left:`${e}px`,top:`${t}px`}}),y;function b(){l.current===null||f.current===null||uD(l.current,f.current,{middleware:I(r),placement:I(a),strategy:I(o)}).then(e=>{let t=l.current;if(gD(t)){j(h,{...I(h),hide:{...I(h).hide,referenceHidden:!0}},!0);return}if(!I(n)&&I(u)!==0&&I(d)!==0){let t=Math.max(Math.abs(I(s)),Math.abs(I(c)),15);if(e.x<=t&&e.y<=t)return}j(u,e.x,!0),j(d,e.y,!0),j(p,e.strategy,!0),j(m,e.placement,!0),j(h,e.middlewareData,!0),j(g,!0)})}function x(){typeof y==`function`&&(y(),y=void 0)}function S(){if(x(),t===void 0){b();return}I(n)&&(l.current===null||f.current===null||(y=t(l.current,f.current,b)))}function ee(){!I(n)&&f.current===null&&j(g,!1)}function te(){return[I(r),I(a),I(o),I(s),I(c),I(n)]}return tr(()=>{t===void 0&&I(n)&&b()}),tr(S),tr(()=>{if(t!==void 0){if(te(),!I(n)){_=!1;return}if(!I(g)){_=!1;return}if(!_){_=!0;return}b()}}),tr(ee),tr(()=>x),{floating:f,reference:l,get strategy(){return I(p)},get placement(){return I(m)},get middlewareData(){return I(h)},get isPositioned(){return I(g)},get floatingStyles(){return I(v)},get update(){return b}}}function gD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var _D={top:`bottom`,right:`left`,bottom:`top`,left:`right`},vD=new Kb(`Floating.Root`),yD=new Kb(`Floating.Content`),bD=new Kb(`Floating.Root`),xD=class e{static create(t=!1){return t?bD.set(new e):vD.set(new e)}anchorNode=ab(null);customAnchorNode=ab(null);triggerNode=ab(null);constructor(){tr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},SD=class e{static create(t,n=!1){return n?yD.set(new e(t,bD.get())):yD.set(new e(t,vD.get()))}opts;root;contentRef=ab(null);wrapperRef=ab(null);arrowRef=ab(null);contentAttachment=Tx(this.contentRef);wrapperAttachment=Tx(this.wrapperRef);arrowAttachment=Tx(this.arrowRef);arrowId=ab(Fw());#e=k(()=>{if(typeof this.opts.style==`string`)return Nb(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new tx(()=>this.arrowRef.current??void 0);#r=k(()=>this.#n?.width??0);#i=k(()=>this.#n?.height??0);#a=k(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=k(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=k(()=>I(this.#o).length>0);get hasExplicitBoundaries(){return I(this.#s)}set hasExplicitBoundaries(e){j(this.#s,e)}#c=k(()=>({padding:this.opts.collisionPadding.current,boundary:I(this.#o).filter(oS),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return I(this.#c)}set detectOverflowOptions(e){j(this.#c,e)}#l=A(void 0);#u=A(void 0);#d=A(void 0);#f=A(void 0);#p=k(()=>[rD({mainAxis:this.opts.sideOffset.current+I(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&iD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?lD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&aD({...this.detectOverflowOptions}),oD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;j(this.#l,t,!0),j(this.#u,n,!0),j(this.#d,r,!0),j(this.#f,i,!0)}}),this.arrowRef.current&&cD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),wD({arrowWidth:I(this.#r),arrowHeight:I(this.#i)}),this.opts.hideWhenDetached.current&&sD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return I(this.#p)}set middleware(e){j(this.#p,e)}floating;#m=k(()=>ED(this.floating.placement));get placedSide(){return I(this.#m)}set placedSide(e){j(this.#m,e)}#h=k(()=>DD(this.floating.placement));get placedAlign(){return I(this.#h)}set placedAlign(e){j(this.#h,e)}#g=k(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return I(this.#g)}set arrowX(e){j(this.#g,e)}#_=k(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return I(this.#_)}set arrowY(e){j(this.#_,e)}#v=k(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return I(this.#v)}set cannotCenterArrow(e){j(this.#v,e)}#y=A();get contentZIndex(){return I(this.#y)}set contentZIndex(e){j(this.#y,e,!0)}#b=k(()=>_D[this.placedSide]);get arrowBaseSide(){return I(this.#b)}set arrowBaseSide(e){j(this.#b,e)}#x=k(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${I(this.#l)}px`,"--bits-floating-available-height":`${I(this.#u)}px`,"--bits-floating-anchor-width":`${I(this.#d)}px`,"--bits-floating-anchor-height":`${I(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...I(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return I(this.#x)}set wrapperProps(e){j(this.#x,e)}#S=k(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Rb({...I(this.#e)}),...this.contentAttachment}));get props(){return I(this.#S)}set props(e){j(this.#S,e)}#C=k(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return I(this.#C)}set arrowStyle(e){j(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),Xb(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=hD({strategy:()=>this.opts.strategy.current,placement:()=>I(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>nD(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),tr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Xb(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=Sx(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),tr(()=>{this.floating.floating.current=this.wrapperRef.current})}},CD=class e{static create(t,n=!1){return n?new e(t,bD.get()):new e(t,vD.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=nb(e.virtualEl.current):t.triggerNode=e.ref}};function wD(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=TD(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function TD(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function ED(e){return TD(e)[0]}function DD(e){return TD(e)[1]}function OD(e,t){E(t,!0);let n=K(t,`children`,7),r=K(t,`tooltip`,7,!1);xD.create(r());var i={get children(){return n()},set children(e){n(e),O()},get tooltip(){return r()},set tooltip(e=!1){r(e),O()}},a=R();return V(N(a),()=>n()??C),z(e,a),D(i)}q(OD,{children:{},tooltip:{}},[],[],{mode:`open`});var kD=[Fx,Vx,Ix,Kx,Rx,zx,`Alt`,Ux,Bx,`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`],AD=[Px,Gx,Hx],jD=[Lx,Wx,`End`],MD=[...AD,...jD],ND=Nx({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),PD=new Kb(`Select.Root | Combobox.Root`);new Kb(`Select.Group | Combobox.Group`);var FD=new Kb(`Select.Content | Combobox.Content`),ID=class{opts;#e=A(!1);get touchedInput(){return I(this.#e)}set touchedInput(e){j(this.#e,e,!0)}#t=A(null);get inputNode(){return I(this.#t)}set inputNode(e){j(this.#t,e,!0)}#n=A(null);get contentNode(){return I(this.#n)}set contentNode(e){j(this.#n,e,!0)}contentPresence;#r=A(null);get viewportNode(){return I(this.#r)}set viewportNode(e){j(this.#r,e,!0)}#i=A(null);get triggerNode(){return I(this.#i)}set triggerNode(e){j(this.#i,e,!0)}#a=A(``);get valueId(){return I(this.#a)}set valueId(e){j(this.#a,e,!0)}#o=A(null);get highlightedNode(){return I(this.#o)}set highlightedNode(e){j(this.#o,e,!0)}#s=k(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return I(this.#s)}set highlightedValue(e){j(this.#s,e)}#c=k(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return I(this.#c)}set highlightedId(e){j(this.#c,e)}#l=k(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return I(this.#l)}set highlightedLabel(e){j(this.#l,e)}isUsingKeyboard=!1;isCombobox=!1;domContext=new wx(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),rr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>ND.getAttr(e,this.isCombobox?`combobox`:void 0)},LD=class extends ID{opts;isMulti=!1;#e=k(()=>this.opts.value.current!==``);get hasValue(){return I(this.#e)}set hasValue(e){j(this.#e,e)}#t=k(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return I(this.#t)}set currentLabel(e){j(this.#t,e)}#n=k(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return I(this.#n)}set candidateLabels(e){j(this.#n,e)}#r=k(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return I(this.#r)}set dataTypeaheadEnabled(e){j(this.#r,e)}constructor(e){super(e),this.opts=e,tr(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Xb(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.opts.inputValue.current=t)}setInitialHighlightedNode(){dx(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==``){let e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},RD=class extends ID{opts;isMulti=!0;#e=k(()=>this.opts.value.current.length>0);get hasValue(){return I(this.#e)}set hasValue(e){j(this.#e,e)}constructor(e){super(e),this.opts=e,tr(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Xb(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=t}setInitialHighlightedNode(){dx(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==``){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},zD=class{static create(e){let{type:t,...n}=e,r=t===`single`?new LD(n):new RD(n);return PD.set(r)}},BD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref,e=>this.root.inputNode=e),this.root.domContext=new wx(e.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),Xb([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([e,t],[n])=>{t&&(Array.isArray(e)&&Array.isArray(n)?e.length===0&&n.length!==0&&(this.root.opts.inputValue.current=``):e===``&&n!==``&&(this.root.opts.inputValue.current=``))})}onkeydown(e){if(this.root.isUsingKeyboard=!0,e.key!==`Escape`){if((e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(kD.includes(e.key)||e.key===`Tab`||e.key===`Backspace`&&this.root.opts.inputValue.current===``||(this.root.handleOpen(),this.root.hasValue))return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if(e.key===`Enter`&&!e.isComposing){e.preventDefault();let t=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t&&this.root.handleClose()}if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),MD.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=MC(t,r,i):e.key===`ArrowUp`?a=NC(t,r,i):e.key===`PageDown`?a=PC(t,r,10,i):e.key===`PageUp`?a=FC(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}kD.includes(e.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(e){this.root.opts.inputValue.current=e.currentTarget.value,this.root.setHighlightedToFirstCandidate()}#e=k(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":`list`,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr(`input`)]:``,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},VD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this)}onkeydown(e){this.root.domContext&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}onpointerdown(e){this.root.opts.disabled.current||!this.root.domContext||(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}#e=k(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},HD=class e{static create(t){return FD.set(new e(t,PD.get()))}opts;root;attachment;#e=A(!1);get isPositioned(){return I(this.#e)}set isPositioned(e){j(this.#e,e,!0)}domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref,e=>this.root.contentNode=e),this.domContext=new wx(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),cx(()=>{this.root.contentNode=null,this.isPositioned=!1}),Xb(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=k(()=>mD(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return I(this.#n)}set snippetProps(e){j(this.#n,e)}#r=k(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":Ax(this.root.opts.open.current),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...I(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return I(this.#r)}set props(e){j(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}},UD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;#e=k(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return I(this.#e)}set isSelected(e){j(this.#e,e)}#t=k(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return I(this.#t)}set isHighlighted(e){j(this.#t,e)}prevHighlighted=new nx(()=>this.isHighlighted);#n=A(!1);get mounted(){return I(this.#n)}set mounted(e){j(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref),Xb([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Xb(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;let e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#r=k(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return I(this.#r)}set snippetProps(e){j(this.#r,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType===`touch`&&!eS){ai(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=k(()=>({id:this.opts.id.current,role:`option`,"aria-selected":this.root.includesItem(this.opts.value.current)?`true`:void 0,"data-value":this.opts.value.current,"data-disabled":Ox(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?``:void 0,"data-selected":this.root.includesItem(this.opts.value.current)?``:void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return I(this.#i)}set props(e){j(this.#i,e)}},WD=class e{static create(t){return new e(t,PD.get())}opts;root;#e=k(()=>this.root.opts.name.current!==``);get shouldRender(){return I(this.#e)}set shouldRender(e){j(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=k(()=>({disabled:kx(this.root.opts.disabled.current),required:kx(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},GD=class e{static create(t){return new e(t,FD.get())}opts;content;root;attachment;#e=A(0);get prevScrollTop(){return I(this.#e)}set prevScrollTop(e){j(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Tx(e.ref,e=>{this.root.viewportNode=e})}#t=k(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},KD=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=$;#e=A(!1);get mounted(){return I(this.#e)}set mounted(e){j(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Tx(e.ref),Xb([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),tr(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=k(()=>({id:this.opts.id.current,"aria-hidden":Dx(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},qD=class e{static create(t){return new e(new KD(t,FD.get()))}scrollButtonState;content;root;#e=A(!1);get canScrollDown(){return I(this.#e)}set canScrollDown(e){j(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Xb([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),ai(this.root.viewportNode,`scroll`,()=>this.handleScroll())}),Xb([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),Xb(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=ux(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;!e||!t||(e.scrollTop+=t.offsetHeight)};#t=k(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}},JD=class e{static create(t){return new e(new KD(t,FD.get()))}scrollButtonState;content;root;#e=A(!1);get canScrollUp(){return I(this.#e)}set canScrollUp(e){j(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Xb([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),ai(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=k(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}};function YD(e,t){E(t,!0);let n=K(t,`value`,15),r=K(t,`autocomplete`,7),i=WD.create({value:Q(()=>n())});var a={get value(){return n()},set value(e){n(e),O()},get autocomplete(){return r()},set autocomplete(e){r(e),O()}},o=R(),s=N(o),c=e=>{tT(e,po(()=>i.props,{get autocomplete(){return r()},get value(){return n()},set value(e){n(e)}}))};return H(s,e=>{i.shouldRender&&e(c)}),z(e,o),D(a)}q(YD,{value:{},autocomplete:{}},[],[],{mode:`open`});var XD=L(`<!> <!>`,1);function ZD(e,t){E(t,!0);let n=K(t,`value`,15),r=K(t,`onValueChange`,7,$),i=K(t,`name`,7,``),a=K(t,`disabled`,7,!1),o=K(t,`type`,7),s=K(t,`open`,15,!1),c=K(t,`onOpenChange`,7,$),l=K(t,`onOpenChangeComplete`,7,$),u=K(t,`loop`,7,!1),d=K(t,`scrollAlignment`,7,`nearest`),f=K(t,`required`,7,!1),p=K(t,`items`,23,()=>[]),m=K(t,`allowDeselect`,7,!0),h=K(t,`inputValue`,7,``),g=K(t,`children`,7);n()===void 0&&n(o()===`single`?``:[]),Xb.pre(()=>n(),()=>{n()===void 0&&n(o()===`single`?``:[])});let _=zD.create({type:o(),value:Q(()=>n(),e=>{n(e),r()(e)}),disabled:Q(()=>a()),required:Q(()=>f()),open:Q(()=>s(),e=>{s(e),c()(e)}),loop:Q(()=>u()),scrollAlignment:Q(()=>d()),name:Q(()=>i()),isCombobox:!0,items:Q(()=>p()),allowDeselect:Q(()=>m()),inputValue:Q(()=>h(),e=>h(e)),onOpenChangeComplete:Q(()=>l())});var v={get value(){return n()},set value(e){n(e),O()},get onValueChange(){return r()},set onValueChange(e=$){r(e),O()},get name(){return i()},set name(e=``){i(e),O()},get disabled(){return a()},set disabled(e=!1){a(e),O()},get type(){return o()},set type(e){o(e),O()},get open(){return s()},set open(e=!1){s(e),O()},get onOpenChange(){return c()},set onOpenChange(e=$){c(e),O()},get onOpenChangeComplete(){return l()},set onOpenChangeComplete(e=$){l(e),O()},get loop(){return u()},set loop(e=!1){u(e),O()},get scrollAlignment(){return d()},set scrollAlignment(e=`nearest`){d(e),O()},get required(){return f()},set required(e=!1){f(e),O()},get items(){return p()},set items(e=[]){p(e),O()},get allowDeselect(){return m()},set allowDeselect(e=!0){m(e),O()},get inputValue(){return h()},set inputValue(e=``){h(e),O()},get children(){return g()},set children(e){g(e),O()}},y=XD(),b=N(y);OD(b,{children:(e,t)=>{var n=R();V(N(n),()=>g()??C),z(e,n)},$$slots:{default:!0}});var x=P(b,2),S=e=>{var t=R(),n=N(t),r=e=>{var t=R();Qi(N(t),16,()=>_.opts.value.current,e=>e,(e,t)=>{YD(e,{get value(){return t}})}),z(e,t)};H(n,e=>{_.opts.value.current.length&&e(r)}),z(e,t)},ee=k(()=>Array.isArray(_.opts.value.current)),te=e=>{YD(e,{get value(){return _.opts.value.current},set value(e){_.opts.value.current=e}})};return H(x,e=>{I(ee)?e(S):e(te,-1)}),z(e,y),D(v)}q(ZD,{value:{},onValueChange:{},name:{},disabled:{},type:{},open:{},onOpenChange:{},onOpenChangeComplete:{},loop:{},scrollAlignment:{},required:{},items:{},allowDeselect:{},inputValue:{},children:{}},[],[],{mode:`open`});function QD(e,t){E(t,!0);let n=K(t,`id`,7),r=K(t,`children`,7),i=K(t,`virtualEl`,7),a=K(t,`ref`,7),o=K(t,`tooltip`,7,!1);CD.create({id:Q(()=>n()),virtualEl:Q(()=>i()),ref:a()},o());var s={get id(){return n()},set id(e){n(e),O()},get children(){return r()},set children(e){r(e),O()},get virtualEl(){return i()},set virtualEl(e){i(e),O()},get ref(){return a()},set ref(e){a(e),O()},get tooltip(){return o()},set tooltip(e=!1){o(e),O()}},c=R();return V(N(c),()=>r()??C),z(e,c),D(s)}q(QD,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:`open`});function $D(e,t){E(t,!0);let n=K(t,`content`,7),r=K(t,`side`,7,`bottom`),i=K(t,`sideOffset`,7,0),a=K(t,`align`,7,`center`),o=K(t,`alignOffset`,7,0),s=K(t,`id`,7),c=K(t,`arrowPadding`,7,0),l=K(t,`avoidCollisions`,7,!0),u=K(t,`collisionBoundary`,23,()=>[]),d=K(t,`collisionPadding`,7,0),f=K(t,`hideWhenDetached`,7,!1),p=K(t,`onPlaced`,7,()=>{}),m=K(t,`sticky`,7,`partial`),h=K(t,`updatePositionStrategy`,7,`optimized`),g=K(t,`strategy`,7,`fixed`),_=K(t,`dir`,7,`ltr`),v=K(t,`style`,23,()=>({})),y=K(t,`wrapperId`,23,Fw),b=K(t,`customAnchor`,7,null),x=K(t,`enabled`,7),S=K(t,`tooltip`,7,!1),ee=SD.create({side:Q(()=>r()),sideOffset:Q(()=>i()),align:Q(()=>a()),alignOffset:Q(()=>o()),id:Q(()=>s()),arrowPadding:Q(()=>c()),avoidCollisions:Q(()=>l()),collisionBoundary:Q(()=>u()),collisionPadding:Q(()=>d()),hideWhenDetached:Q(()=>f()),onPlaced:Q(()=>p()),sticky:Q(()=>m()),updatePositionStrategy:Q(()=>h()),strategy:Q(()=>g()),dir:Q(()=>_()),style:Q(()=>v()),enabled:Q(()=>x()),wrapperId:Q(()=>y()),customAnchor:Q(()=>b())},S()),te=k(()=>Vb(ee.wrapperProps,{style:{pointerEvents:`auto`}}));var ne={get content(){return n()},set content(e){n(e),O()},get side(){return r()},set side(e=`bottom`){r(e),O()},get sideOffset(){return i()},set sideOffset(e=0){i(e),O()},get align(){return a()},set align(e=`center`){a(e),O()},get alignOffset(){return o()},set alignOffset(e=0){o(e),O()},get id(){return s()},set id(e){s(e),O()},get arrowPadding(){return c()},set arrowPadding(e=0){c(e),O()},get avoidCollisions(){return l()},set avoidCollisions(e=!0){l(e),O()},get collisionBoundary(){return u()},set collisionBoundary(e=[]){u(e),O()},get collisionPadding(){return d()},set collisionPadding(e=0){d(e),O()},get hideWhenDetached(){return f()},set hideWhenDetached(e=!1){f(e),O()},get onPlaced(){return p()},set onPlaced(e=()=>{}){p(e),O()},get sticky(){return m()},set sticky(e=`partial`){m(e),O()},get updatePositionStrategy(){return h()},set updatePositionStrategy(e=`optimized`){h(e),O()},get strategy(){return g()},set strategy(e=`fixed`){g(e),O()},get dir(){return _()},set dir(e=`ltr`){_(e),O()},get style(){return v()},set style(e={}){v(e),O()},get wrapperId(){return y()},set wrapperId(e=Fw()){y(e),O()},get customAnchor(){return b()},set customAnchor(e=null){b(e),O()},get enabled(){return x()},set enabled(e){x(e),O()},get tooltip(){return S()},set tooltip(e=!1){S(e),O()}},re=R();return V(N(re),()=>n()??C,()=>({props:ee.props,wrapperProps:I(te)})),z(e,re),D(ne)}q($D,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:`open`});function eO(e,t){E(t,!0);let n=K(t,`content`,7),r=K(t,`onPlaced`,7);Ri(()=>{r()?.()});var i={get content(){return n()},set content(e){n(e),O()},get onPlaced(){return r()},set onPlaced(e){r(e),O()}},a=R();return V(N(a),()=>n()??C,()=>({props:{},wrapperProps:{}})),z(e,a),D(i)}q(eO,{content:{},onPlaced:{}},[],[],{mode:`open`});var tO=L(`<input/>`);function nO(e,t){E(t,!0);let n=K(t,`id`,23,Fw),r=K(t,`ref`,15,null),i=K(t,`child`,7),a=K(t,`defaultValue`,7),o=K(t,`clearOnDeselect`,7,!1),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`defaultValue`,`clearOnDeselect`]),c=BD.create({id:Q(()=>n()),ref:Q(()=>r(),e=>r(e)),clearOnDeselect:Q(()=>o())});a()&&(c.root.opts.inputValue.current=a());let l=k(()=>Vb(s,c.props,{value:c.root.opts.inputValue.current}));var u={get id(){return n()},set id(e=Fw()){n(e),O()},get ref(){return r()},set ref(e=null){r(e),O()},get child(){return i()},set child(e){i(e),O()},get defaultValue(){return a()},set defaultValue(e){a(e),O()},get clearOnDeselect(){return o()},set clearOnDeselect(e=!1){o(e),O()}},d=R();return U(N(d),()=>QD,(e,t)=>{t(e,{get id(){return n()},get ref(){return c.opts.ref},children:(e,t)=>{var n=R(),r=N(n),a=e=>{var t=R();V(N(t),i,()=>({props:I(l)})),z(e,t)},o=e=>{var t=tO();G(t,()=>({...I(l)}),void 0,void 0,void 0,void 0,!0),z(e,t)};H(r,e=>{i()?e(a):e(o,-1)}),z(e,n)},$$slots:{default:!0}})}),z(e,d),D(u)}q(nO,{id:{},ref:{},child:{},defaultValue:{},clearOnDeselect:{}},[],[],{mode:`open`});var rO=L(`<button><!></button>`);function iO(e,t){E(t,!0);let n=K(t,`id`,23,Fw),r=K(t,`ref`,15,null),i=K(t,`child`,7),a=K(t,`children`,7),o=K(t,`type`,7,`button`),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`type`]),c=VD.create({id:Q(()=>n()),ref:Q(()=>r(),e=>r(e))}),l=k(()=>Vb(s,c.props,{type:o()}));var u={get id(){return n()},set id(e=Fw()){n(e),O()},get ref(){return r()},set ref(e=null){r(e),O()},get child(){return i()},set child(e){i(e),O()},get children(){return a()},set children(e){a(e),O()},get type(){return o()},set type(e=`button`){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),i,()=>({props:I(l)})),z(e,t)},m=e=>{var t=rO();G(t,()=>({...I(l)})),V(M(t),()=>a()??C),T(t),z(e,t)};return H(f,e=>{i()?e(p):e(m,-1)}),z(e,d),D(u)}q(iO,{id:{},ref:{},child:{},children:{},type:{}},[],[],{mode:`open`});function aO(e,t){E(t,!0);let n=K(t,`content`,7),r=K(t,`isStatic`,7,!1),i=K(t,`onPlaced`,7),a=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`content`,`isStatic`,`onPlaced`]);var o={get content(){return n()},set content(e){n(e),O()},get isStatic(){return r()},set isStatic(e=!1){r(e),O()},get onPlaced(){return i()},set onPlaced(e){i(e),O()}},s=R(),c=N(s),l=e=>{eO(e,{get content(){return n()},get onPlaced(){return i()}})},u=e=>{$D(e,po({get content(){return n()},get onPlaced(){return i()}},()=>a))};return H(c,e=>{r()?e(l):e(u,-1)}),z(e,s),D(o)}q(aO,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:`open`});var oO=L(`<!> <!>`,1);function sO(e,t){E(t,!0);let n=K(t,`popper`,7),r=K(t,`onEscapeKeydown`,7),i=K(t,`escapeKeydownBehavior`,7),a=K(t,`preventOverflowTextSelection`,7),o=K(t,`id`,7),s=K(t,`onPointerDown`,7),c=K(t,`onPointerUp`,7),l=K(t,`side`,7),u=K(t,`sideOffset`,7),d=K(t,`align`,7),f=K(t,`alignOffset`,7),p=K(t,`arrowPadding`,7),m=K(t,`avoidCollisions`,7),h=K(t,`collisionBoundary`,7),g=K(t,`collisionPadding`,7),_=K(t,`sticky`,7),v=K(t,`hideWhenDetached`,7),y=K(t,`updatePositionStrategy`,7),b=K(t,`strategy`,7),x=K(t,`dir`,7),S=K(t,`preventScroll`,7),ee=K(t,`wrapperId`,7),te=K(t,`style`,7),ne=K(t,`onPlaced`,7),re=K(t,`onInteractOutside`,7),ie=K(t,`onCloseAutoFocus`,7),ae=K(t,`onOpenAutoFocus`,7),oe=K(t,`onFocusOutside`,7),se=K(t,`interactOutsideBehavior`,7,`close`),ce=K(t,`loop`,7),le=K(t,`trapFocus`,7,!0),ue=K(t,`isValidEvent`,7,()=>!1),de=K(t,`customAnchor`,7,null),fe=K(t,`isStatic`,7,!1),pe=K(t,`enabled`,7),me=K(t,`ref`,7),he=K(t,`tooltip`,7,!1),ge=K(t,`contentPointerEvents`,7,`auto`),_e=uo(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`));return aO(e,{get isStatic(){return fe()},get id(){return o()},get side(){return l()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return m()},get collisionBoundary(){return h()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return v()},get updatePositionStrategy(){return y()},get strategy(){return b()},get dir(){return x()},get wrapperId(){return ee()},get style(){return te()},get onPlaced(){return ne()},get customAnchor(){return de()},get enabled(){return pe()},get tooltip(){return he()},content:(e,l)=>{let u=()=>l?.().props,d=()=>l?.().wrapperProps;var f=oO(),p=N(f),m=e=>{qw(e,{get preventScroll(){return S()}})},h=e=>{qw(e,{get preventScroll(){return S()}})};H(p,e=>{t.forceMount&&pe()?e(m):t.forceMount||e(h,1)}),Ow(P(p,2),{get onOpenAutoFocus(){return ae()},get onCloseAutoFocus(){return ie()},get loop(){return ce()},get enabled(){return pe()},get trapFocus(){return le()},get forceMount(){return t.forceMount},get ref(){return me()},focusScope:(e,t)=>{let l=()=>t?.().props;Tw(e,{get onEscapeKeydown(){return r()},get escapeKeydownBehavior(){return i()},get enabled(){return pe()},get ref(){return me()},children:(e,t)=>{Sw(e,{get id(){return o()},get onInteractOutside(){return re()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return se()},get isValidEvent(){return ue()},get enabled(){return pe()},get ref(){return me()},children:(e,t)=>{let r=()=>t?.().props;Pw(e,{get id(){return o()},get preventOverflowTextSelection(){return a()},get onPointerDown(){return s()},get onPointerUp(){return c()},get enabled(){return pe()},get ref(){return me()},children:(e,t)=>{var i=R(),a=N(i);{let e=k(()=>({props:Vb(_e,u(),r(),l(),{style:{pointerEvents:ge()}}),wrapperProps:d()}));V(a,()=>n()??C,()=>I(e))}z(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),z(e,f)},$$slots:{content:!0}}),D({get popper(){return n()},set popper(e){n(e),O()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e){r(e),O()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(e){i(e),O()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(e){a(e),O()},get id(){return o()},set id(e){o(e),O()},get onPointerDown(){return s()},set onPointerDown(e){s(e),O()},get onPointerUp(){return c()},set onPointerUp(e){c(e),O()},get side(){return l()},set side(e){l(e),O()},get sideOffset(){return u()},set sideOffset(e){u(e),O()},get align(){return d()},set align(e){d(e),O()},get alignOffset(){return f()},set alignOffset(e){f(e),O()},get arrowPadding(){return p()},set arrowPadding(e){p(e),O()},get avoidCollisions(){return m()},set avoidCollisions(e){m(e),O()},get collisionBoundary(){return h()},set collisionBoundary(e){h(e),O()},get collisionPadding(){return g()},set collisionPadding(e){g(e),O()},get sticky(){return _()},set sticky(e){_(e),O()},get hideWhenDetached(){return v()},set hideWhenDetached(e){v(e),O()},get updatePositionStrategy(){return y()},set updatePositionStrategy(e){y(e),O()},get strategy(){return b()},set strategy(e){b(e),O()},get dir(){return x()},set dir(e){x(e),O()},get preventScroll(){return S()},set preventScroll(e){S(e),O()},get wrapperId(){return ee()},set wrapperId(e){ee(e),O()},get style(){return te()},set style(e){te(e),O()},get onPlaced(){return ne()},set onPlaced(e){ne(e),O()},get onInteractOutside(){return re()},set onInteractOutside(e){re(e),O()},get onCloseAutoFocus(){return ie()},set onCloseAutoFocus(e){ie(e),O()},get onOpenAutoFocus(){return ae()},set onOpenAutoFocus(e){ae(e),O()},get onFocusOutside(){return oe()},set onFocusOutside(e){oe(e),O()},get interactOutsideBehavior(){return se()},set interactOutsideBehavior(e=`close`){se(e),O()},get loop(){return ce()},set loop(e){ce(e),O()},get trapFocus(){return le()},set trapFocus(e=!0){le(e),O()},get isValidEvent(){return ue()},set isValidEvent(e=()=>!1){ue(e),O()},get customAnchor(){return de()},set customAnchor(e=null){de(e),O()},get isStatic(){return fe()},set isStatic(e=!1){fe(e),O()},get enabled(){return pe()},set enabled(e){pe(e),O()},get ref(){return me()},set ref(e){me(e),O()},get tooltip(){return he()},set tooltip(e=!1){he(e),O()},get contentPointerEvents(){return ge()},set contentPointerEvents(e=`auto`){ge(e),O()}})}q(sO,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:`open`});function cO(e,t){E(t,!0);let n=K(t,`popper`,7),r=K(t,`open`,7),i=K(t,`onEscapeKeydown`,7),a=K(t,`escapeKeydownBehavior`,7),o=K(t,`preventOverflowTextSelection`,7),s=K(t,`id`,7),c=K(t,`onPointerDown`,7),l=K(t,`onPointerUp`,7),u=K(t,`side`,7),d=K(t,`sideOffset`,7),f=K(t,`align`,7),p=K(t,`alignOffset`,7),m=K(t,`arrowPadding`,7),h=K(t,`avoidCollisions`,7),g=K(t,`collisionBoundary`,7),_=K(t,`collisionPadding`,7),v=K(t,`sticky`,7),y=K(t,`hideWhenDetached`,7),b=K(t,`updatePositionStrategy`,7),x=K(t,`strategy`,7),S=K(t,`dir`,7),ee=K(t,`preventScroll`,7),te=K(t,`wrapperId`,7),ne=K(t,`style`,7),re=K(t,`onPlaced`,7),ie=K(t,`onInteractOutside`,7),ae=K(t,`onCloseAutoFocus`,7),C=K(t,`onOpenAutoFocus`,7),oe=K(t,`onFocusOutside`,7),se=K(t,`interactOutsideBehavior`,7,`close`),ce=K(t,`loop`,7),le=K(t,`trapFocus`,7,!0),ue=K(t,`isValidEvent`,7,()=>!1),de=K(t,`customAnchor`,7,null),fe=K(t,`isStatic`,7,!1),pe=K(t,`ref`,7),me=K(t,`shouldRender`,7),he=uo(t,`$$slots.$$events.$$legacy.$$host.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));var ge={get popper(){return n()},set popper(e){n(e),O()},get open(){return r()},set open(e){r(e),O()},get onEscapeKeydown(){return i()},set onEscapeKeydown(e){i(e),O()},get escapeKeydownBehavior(){return a()},set escapeKeydownBehavior(e){a(e),O()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(e){o(e),O()},get id(){return s()},set id(e){s(e),O()},get onPointerDown(){return c()},set onPointerDown(e){c(e),O()},get onPointerUp(){return l()},set onPointerUp(e){l(e),O()},get side(){return u()},set side(e){u(e),O()},get sideOffset(){return d()},set sideOffset(e){d(e),O()},get align(){return f()},set align(e){f(e),O()},get alignOffset(){return p()},set alignOffset(e){p(e),O()},get arrowPadding(){return m()},set arrowPadding(e){m(e),O()},get avoidCollisions(){return h()},set avoidCollisions(e){h(e),O()},get collisionBoundary(){return g()},set collisionBoundary(e){g(e),O()},get collisionPadding(){return _()},set collisionPadding(e){_(e),O()},get sticky(){return v()},set sticky(e){v(e),O()},get hideWhenDetached(){return y()},set hideWhenDetached(e){y(e),O()},get updatePositionStrategy(){return b()},set updatePositionStrategy(e){b(e),O()},get strategy(){return x()},set strategy(e){x(e),O()},get dir(){return S()},set dir(e){S(e),O()},get preventScroll(){return ee()},set preventScroll(e){ee(e),O()},get wrapperId(){return te()},set wrapperId(e){te(e),O()},get style(){return ne()},set style(e){ne(e),O()},get onPlaced(){return re()},set onPlaced(e){re(e),O()},get onInteractOutside(){return ie()},set onInteractOutside(e){ie(e),O()},get onCloseAutoFocus(){return ae()},set onCloseAutoFocus(e){ae(e),O()},get onOpenAutoFocus(){return C()},set onOpenAutoFocus(e){C(e),O()},get onFocusOutside(){return oe()},set onFocusOutside(e){oe(e),O()},get interactOutsideBehavior(){return se()},set interactOutsideBehavior(e=`close`){se(e),O()},get loop(){return ce()},set loop(e){ce(e),O()},get trapFocus(){return le()},set trapFocus(e=!0){le(e),O()},get isValidEvent(){return ue()},set isValidEvent(e=()=>!1){ue(e),O()},get customAnchor(){return de()},set customAnchor(e=null){de(e),O()},get isStatic(){return fe()},set isStatic(e=!1){fe(e),O()},get ref(){return pe()},set ref(e){pe(e),O()},get shouldRender(){return me()},set shouldRender(e){me(e),O()}},_e=R(),ve=N(_e),ye=e=>{sO(e,po({get popper(){return n()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return a()},get preventOverflowTextSelection(){return o()},get id(){return s()},get onPointerDown(){return c()},get onPointerUp(){return l()},get side(){return u()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return m()},get avoidCollisions(){return h()},get collisionBoundary(){return g()},get collisionPadding(){return _()},get sticky(){return v()},get hideWhenDetached(){return y()},get updatePositionStrategy(){return b()},get strategy(){return x()},get dir(){return S()},get preventScroll(){return ee()},get wrapperId(){return te()},get style(){return ne()},get onPlaced(){return re()},get customAnchor(){return de()},get isStatic(){return fe()},get enabled(){return r()},get onInteractOutside(){return ie()},get onCloseAutoFocus(){return ae()},get onOpenAutoFocus(){return C()},get interactOutsideBehavior(){return se()},get loop(){return ce()},get trapFocus(){return le()},get isValidEvent(){return ue()},get onFocusOutside(){return oe()},forceMount:!1,get ref(){return pe()}},()=>he))};return H(ve,e=>{me()&&e(ye)}),z(e,_e),D(ge)}q(cO,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:`open`});function lO(e,t){E(t,!0);let n=K(t,`popper`,7),r=K(t,`onEscapeKeydown`,7),i=K(t,`escapeKeydownBehavior`,7),a=K(t,`preventOverflowTextSelection`,7),o=K(t,`id`,7),s=K(t,`onPointerDown`,7),c=K(t,`onPointerUp`,7),l=K(t,`side`,7),u=K(t,`sideOffset`,7),d=K(t,`align`,7),f=K(t,`alignOffset`,7),p=K(t,`arrowPadding`,7),m=K(t,`avoidCollisions`,7),h=K(t,`collisionBoundary`,7),g=K(t,`collisionPadding`,7),_=K(t,`sticky`,7),v=K(t,`hideWhenDetached`,7),y=K(t,`updatePositionStrategy`,7),b=K(t,`strategy`,7),x=K(t,`dir`,7),S=K(t,`preventScroll`,7),ee=K(t,`wrapperId`,7),te=K(t,`style`,7),ne=K(t,`onPlaced`,7),re=K(t,`onInteractOutside`,7),ie=K(t,`onCloseAutoFocus`,7),ae=K(t,`onOpenAutoFocus`,7),C=K(t,`onFocusOutside`,7),oe=K(t,`interactOutsideBehavior`,7,`close`),se=K(t,`loop`,7),ce=K(t,`trapFocus`,7,!0),le=K(t,`isValidEvent`,7,()=>!1),ue=K(t,`customAnchor`,7,null),de=K(t,`isStatic`,7,!1),fe=K(t,`enabled`,7),pe=uo(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));return sO(e,po({get popper(){return n()},get onEscapeKeydown(){return r()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return s()},get onPointerUp(){return c()},get side(){return l()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return m()},get collisionBoundary(){return h()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return v()},get updatePositionStrategy(){return y()},get strategy(){return b()},get dir(){return x()},get preventScroll(){return S()},get wrapperId(){return ee()},get style(){return te()},get onPlaced(){return ne()},get customAnchor(){return ue()},get isStatic(){return de()},get enabled(){return fe()},get onInteractOutside(){return re()},get onCloseAutoFocus(){return ie()},get onOpenAutoFocus(){return ae()},get interactOutsideBehavior(){return oe()},get loop(){return se()},get trapFocus(){return ce()},get isValidEvent(){return le()},get onFocusOutside(){return C()}},()=>pe,{forceMount:!0})),D({get popper(){return n()},set popper(e){n(e),O()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e){r(e),O()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(e){i(e),O()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(e){a(e),O()},get id(){return o()},set id(e){o(e),O()},get onPointerDown(){return s()},set onPointerDown(e){s(e),O()},get onPointerUp(){return c()},set onPointerUp(e){c(e),O()},get side(){return l()},set side(e){l(e),O()},get sideOffset(){return u()},set sideOffset(e){u(e),O()},get align(){return d()},set align(e){d(e),O()},get alignOffset(){return f()},set alignOffset(e){f(e),O()},get arrowPadding(){return p()},set arrowPadding(e){p(e),O()},get avoidCollisions(){return m()},set avoidCollisions(e){m(e),O()},get collisionBoundary(){return h()},set collisionBoundary(e){h(e),O()},get collisionPadding(){return g()},set collisionPadding(e){g(e),O()},get sticky(){return _()},set sticky(e){_(e),O()},get hideWhenDetached(){return v()},set hideWhenDetached(e){v(e),O()},get updatePositionStrategy(){return y()},set updatePositionStrategy(e){y(e),O()},get strategy(){return b()},set strategy(e){b(e),O()},get dir(){return x()},set dir(e){x(e),O()},get preventScroll(){return S()},set preventScroll(e){S(e),O()},get wrapperId(){return ee()},set wrapperId(e){ee(e),O()},get style(){return te()},set style(e){te(e),O()},get onPlaced(){return ne()},set onPlaced(e){ne(e),O()},get onInteractOutside(){return re()},set onInteractOutside(e){re(e),O()},get onCloseAutoFocus(){return ie()},set onCloseAutoFocus(e){ie(e),O()},get onOpenAutoFocus(){return ae()},set onOpenAutoFocus(e){ae(e),O()},get onFocusOutside(){return C()},set onFocusOutside(e){C(e),O()},get interactOutsideBehavior(){return oe()},set interactOutsideBehavior(e=`close`){oe(e),O()},get loop(){return se()},set loop(e){se(e),O()},get trapFocus(){return ce()},set trapFocus(e=!0){ce(e),O()},get isValidEvent(){return le()},set isValidEvent(e=()=>!1){le(e),O()},get customAnchor(){return ue()},set customAnchor(e=null){ue(e),O()},get isStatic(){return de()},set isStatic(e=!1){de(e),O()},get enabled(){return fe()},set enabled(e){fe(e),O()}})}q(lO,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:`open`});var uO=L(`<div><div><!></div></div>`),dO=L(`<div><div><!></div></div>`);function fO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`forceMount`,7,!1),o=K(t,`side`,7,`bottom`),s=K(t,`onInteractOutside`,7,$),c=K(t,`onEscapeKeydown`,7,$),l=K(t,`children`,7),u=K(t,`child`,7),d=K(t,`preventScroll`,7,!1),f=K(t,`style`,7),p=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),m=HD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),onInteractOutside:Q(()=>s()),onEscapeKeydown:Q(()=>c())}),h=k(()=>Vb(p,m.props));var g={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get forceMount(){return a()},set forceMount(e=!1){a(e),O()},get side(){return o()},set side(e=`bottom`){o(e),O()},get onInteractOutside(){return s()},set onInteractOutside(e=$){s(e),O()},get onEscapeKeydown(){return c()},set onEscapeKeydown(e=$){c(e),O()},get children(){return l()},set children(e){l(e),O()},get child(){return u()},set child(e){u(e),O()},get preventScroll(){return d()},set preventScroll(e=!1){d(e),O()},get style(){return f()},set style(e){f(e),O()}},_=R(),v=N(_),y=e=>{lO(e,po(()=>I(h),()=>m.popperProps,{get ref(){return m.opts.ref},get side(){return o()},get enabled(){return m.root.opts.open.current},get id(){return r()},get preventScroll(){return d()},forceMount:!0,get shouldRender(){return m.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,i=k(()=>Vb(n(),{style:m.props.style},{style:f()}));var a=R(),o=N(a),s=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(i),wrapperProps:r(),...m.snippetProps}));V(n,u,()=>I(e))}z(e,t)},c=e=>{var t=uO();G(t,()=>({...r()}));var n=M(t);G(n,()=>({...I(i)})),V(M(n),()=>l()??C),T(n),T(t),z(e,t)};H(o,e=>{u()?e(s):e(c,-1)}),z(e,a)},$$slots:{popper:!0}}))},b=e=>{cO(e,po(()=>I(h),()=>m.popperProps,{get ref(){return m.opts.ref},get side(){return o()},get open(){return m.root.opts.open.current},get id(){return r()},get preventScroll(){return d()},forceMount:!1,get shouldRender(){return m.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,i=k(()=>Vb(n(),{style:m.props.style},{style:f()}));var a=R(),o=N(a),s=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(i),wrapperProps:r(),...m.snippetProps}));V(n,u,()=>I(e))}z(e,t)},c=e=>{var t=dO();G(t,()=>({...r()}));var n=M(t);G(n,()=>({...I(i)})),V(M(n),()=>l()??C),T(n),T(t),z(e,t)};H(o,e=>{u()?e(s):e(c,-1)}),z(e,a)},$$slots:{popper:!0}}))};return H(v,e=>{a()?e(y):a()||e(b,1)}),z(e,_),D(g)}q(fO,{id:{},ref:{},forceMount:{},side:{},onInteractOutside:{},onEscapeKeydown:{},children:{},child:{},preventScroll:{},style:{}},[],[],{mode:`open`});function pO(e,t){E(t,!0);let n=K(t,`mounted`,15,!1),r=K(t,`onMountedChange`,7,$);return lx(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),D({get mounted(){return n()},set mounted(e=!1){n(e),O()},get onMountedChange(){return r()},set onMountedChange(e=$){r(e),O()}})}q(pO,{mounted:{},onMountedChange:{}},[],[],{mode:`open`});var mO=L(`<div><!></div>`),hO=L(`<!> <!>`,1);function gO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`value`,7),o=K(t,`label`,23,a),s=K(t,`disabled`,7,!1),c=K(t,`children`,7),l=K(t,`child`,7),u=K(t,`onHighlight`,7,$),d=K(t,`onUnhighlight`,7,$),f=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),p=UD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),value:Q(()=>a()),disabled:Q(()=>s()),label:Q(()=>o()),onHighlight:Q(()=>u()),onUnhighlight:Q(()=>d())}),m=k(()=>Vb(f,p.props));var h={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get value(){return a()},set value(e){a(e),O()},get label(){return o()},set label(e=a){o(e),O()},get disabled(){return s()},set disabled(e=!1){s(e),O()},get children(){return c()},set children(e){c(e),O()},get child(){return l()},set child(e){l(e),O()},get onHighlight(){return u()},set onHighlight(e=$){u(e),O()},get onUnhighlight(){return d()},set onUnhighlight(e=$){d(e),O()}},g=hO(),_=N(g),v=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(m),...p.snippetProps}));V(n,l,()=>I(e))}z(e,t)},y=e=>{var t=mO();G(t,()=>({...I(m)})),V(M(t),()=>c()??C,()=>p.snippetProps),T(t),z(e,t)};return H(_,e=>{l()?e(v):e(y,-1)}),pO(P(_,2),{get mounted(){return p.mounted},set mounted(e){p.mounted=e}}),z(e,g),D(h)}q(gO,{id:{},ref:{},value:{},label:{},disabled:{},children:{},child:{},onHighlight:{},onUnhighlight:{}},[],[],{mode:`open`});var _O=L(`<div><!></div>`),vO={hash:`svelte-5vjl6o`,code:`
|
|
561
|
-
/* Hide scrollbars cross browser and enable momentum scroll for touch devices */[data-select-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport]::-webkit-scrollbar {display:none !important;}[data-select-viewport]::-webkit-scrollbar {display:none !important;}`};function yO(e,t){let n=vi();E(t,!0),va(e,vO);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`children`,7),o=K(t,`child`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`children`,`child`]),c=GD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),l=k(()=>Vb(s,c.props));var u={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get children(){return a()},set children(e){a(e),O()},get child(){return o()},set child(e){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),o,()=>({props:I(l)})),z(e,t)},m=e=>{var t=_O();G(t,()=>({...I(l)})),V(M(t),()=>a()??C),T(t),z(e,t)};return H(f,e=>{o()?e(p):e(m,-1)}),z(e,d),D(u)}q(yO,{id:{},ref:{},children:{},child:{}},[],[],{mode:`open`});var bO=L(`<div><!></div>`),xO=L(`<!> <!>`,1);function SO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`delay`,7,()=>50),o=K(t,`child`,7),s=K(t,`children`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),l=qD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),delay:Q(()=>a())}),u=k(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get delay(){return a()},set delay(e=()=>50){a(e),O()},get child(){return o()},set child(e){o(e),O()},get children(){return s()},set children(e){s(e),O()}},f=R(),p=N(f),m=e=>{var t=xO(),n=N(t);pO(n,{get mounted(){return l.scrollButtonState.mounted},set mounted(e){l.scrollButtonState.mounted=e}});var r=P(n,2),i=e=>{var t=R();V(N(t),o,()=>({props:c})),z(e,t)},a=e=>{var t=bO();G(t,()=>({...I(u)})),V(M(t),()=>s()??C),T(t),z(e,t)};H(r,e=>{o()?e(i):e(a,-1)}),z(e,t)};return H(p,e=>{l.canScrollDown&&e(m)}),z(e,f),D(d)}q(SO,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var CO=L(`<div><!></div>`),wO=L(`<!> <!>`,1);function TO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`delay`,7,()=>50),o=K(t,`child`,7),s=K(t,`children`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),l=JD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),delay:Q(()=>a())}),u=k(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get delay(){return a()},set delay(e=()=>50){a(e),O()},get child(){return o()},set child(e){o(e),O()},get children(){return s()},set children(e){s(e),O()}},f=R(),p=N(f),m=e=>{var t=wO(),n=N(t);pO(n,{get mounted(){return l.scrollButtonState.mounted},set mounted(e){l.scrollButtonState.mounted=e}});var r=P(n,2),i=e=>{var t=R();V(N(t),o,()=>({props:c})),z(e,t)},a=e=>{var t=CO();G(t,()=>({...I(u)})),V(M(t),()=>s()??C),T(t),z(e,t)};H(r,e=>{o()?e(i):e(a,-1)}),z(e,t)};return H(p,e=>{l.canScrollUp&&e(m)}),z(e,f),D(d)}q(TO,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var EO=L(`<div><!></div>`);function DO(e,t){let n=vi();E(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`disabled`,7,!1),c=K(t,`onSelect`,7,$),l=K(t,`closeOnSelect`,7,!0),u=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`disabled`,`onSelect`,`closeOnSelect`]),d=cw.create({id:Q(()=>o()),disabled:Q(()=>s()),onSelect:Q(()=>c()),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>l())}),f=k(()=>Vb(u,d.props));var p={get child(){return r()},set child(e){r(e),O()},get children(){return i()},set children(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get id(){return o()},set id(e=dS(n)){o(e),O()},get disabled(){return s()},set disabled(e=!1){s(e),O()},get onSelect(){return c()},set onSelect(e=$){c(e),O()},get closeOnSelect(){return l()},set closeOnSelect(e=!0){l(e),O()}},m=R(),h=N(m),g=e=>{var t=R();V(N(t),r,()=>({props:I(f)})),z(e,t)},_=e=>{var t=EO();G(t,()=>({...I(f)})),V(M(t),()=>i()??C),T(t),z(e,t)};return H(h,e=>{r()?e(g):e(_,-1)}),z(e,m),D(p)}q(DO,{child:{},children:{},ref:{},id:{},disabled:{},onSelect:{},closeOnSelect:{}},[],[],{mode:`open`});var OO=L(`<div><!></div>`);function kO(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),c=uw.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e))}),l=k(()=>Vb(s,c.props));var u={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get id(){return o()},set id(e=dS(n)){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),i,()=>({props:I(l)})),z(e,t)},m=e=>{var t=OO();G(t,()=>({...I(l)})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(f,e=>{i()?e(p):e(m,-1)}),z(e,d),D(u)}q(kO,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var AO=L(`<div><!></div>`);function jO(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),c=dw.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e))}),l=k(()=>Vb(s,c.props));var u={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get id(){return o()},set id(e=dS(n)){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),i,()=>({props:I(l)})),z(e,t)},m=e=>{var t=AO();G(t,()=>({...I(l)})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(f,e=>{i()?e(p):e(m,-1)}),z(e,d),D(u)}q(jO,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var MO=L(`<div><!></div>`);function NO(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`value`,7),s=K(t,`onSelect`,7,$),c=K(t,`id`,23,()=>dS(n)),l=K(t,`disabled`,7,!1),u=K(t,`closeOnSelect`,7,!0),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`value`,`onSelect`,`id`,`disabled`,`closeOnSelect`]),f=mw.create({value:Q(()=>o()),id:Q(()=>c()),disabled:Q(()=>l()),onSelect:Q(()=>p),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>u())});function p(e){s()(e),!e.defaultPrevented&&f.selectValue()}let m=k(()=>Vb(d,f.props));var h={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get value(){return o()},set value(e){o(e),O()},get onSelect(){return s()},set onSelect(e=$){s(e),O()},get id(){return c()},set id(e=dS(n)){c(e),O()},get disabled(){return l()},set disabled(e=!1){l(e),O()},get closeOnSelect(){return u()},set closeOnSelect(e=!0){u(e),O()}},g=R(),_=N(g),v=e=>{var t=R();V(N(t),i,()=>({props:I(m),checked:f.isChecked})),z(e,t)},y=e=>{var t=MO();G(t,()=>({...I(m)})),V(M(t),()=>r()??C,()=>({checked:f.isChecked})),T(t),z(e,t)};return H(_,e=>{i()?e(v):e(y,-1)}),z(e,g),D(h)}q(NO,{children:{},child:{},ref:{},value:{},onSelect:{},id:{},disabled:{},closeOnSelect:{}},[],[],{mode:`open`});var PO=L(`<div><!></div>`);function FO(e,t){let n=vi();E(t,!0);let r=K(t,`ref`,15,null),i=K(t,`id`,23,()=>dS(n)),a=K(t,`child`,7),o=K(t,`children`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`ref`,`id`,`child`,`children`]),c=fw.create({id:Q(()=>i()),ref:Q(()=>r(),e=>r(e))}),l=k(()=>Vb(s,c.props));var u={get ref(){return r()},set ref(e=null){r(e),O()},get id(){return i()},set id(e=dS(n)){i(e),O()},get child(){return a()},set child(e){a(e),O()},get children(){return o()},set children(e){o(e),O()}},d=R(),f=N(d),p=e=>{var t=R();V(N(t),a,()=>({props:I(l)})),z(e,t)},m=e=>{var t=PO();G(t,()=>({...I(l)})),V(M(t),()=>o()??C),T(t),z(e,t)};return H(f,e=>{a()?e(p):e(m,-1)}),z(e,d),D(u)}q(FO,{ref:{},id:{},child:{},children:{}},[],[],{mode:`open`});var IO=L(`<div><!></div>`);function LO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`value`,15,``),c=K(t,`onValueChange`,7,$),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),u=pw.create({value:Q(()=>s(),e=>{s(e),c()(e)}),ref:Q(()=>o(),e=>o(e)),id:Q(()=>r())}),d=k(()=>Vb(l,u.props));var f={get id(){return r()},set id(e=dS(n)){r(e),O()},get children(){return i()},set children(e){i(e),O()},get child(){return a()},set child(e){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get value(){return s()},set value(e=``){s(e),O()},get onValueChange(){return c()},set onValueChange(e=$){c(e),O()}},p=R(),m=N(p),h=e=>{var t=R();V(N(t),a,()=>({props:I(d)})),z(e,t)},g=e=>{var t=IO();G(t,()=>({...I(d)})),V(M(t),()=>i()??C),T(t),z(e,t)};return H(m,e=>{a()?e(h):e(g,-1)}),z(e,p),D(f)}q(LO,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});var RO=L(`<div><!></div>`);function zO(e,t){let n=vi();E(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`checked`,15,!1),s=K(t,`id`,23,()=>dS(n)),c=K(t,`onCheckedChange`,7,$),l=K(t,`disabled`,7,!1),u=K(t,`onSelect`,7,$),d=K(t,`closeOnSelect`,7,!0),f=K(t,`indeterminate`,15,!1),p=K(t,`onIndeterminateChange`,7,$),m=K(t,`value`,7,``),h=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`checked`,`id`,`onCheckedChange`,`disabled`,`onSelect`,`closeOnSelect`,`indeterminate`,`onIndeterminateChange`,`value`]),g=tw.getOr(null);g&&m()&&(g.opts.value.current.includes(m())?o(!0):o(!1)),Xb.pre(()=>m(),()=>{g&&m()&&(g.opts.value.current.includes(m())?o(!0):o(!1))});let _=lw.create({checked:Q(()=>o(),e=>{e!==o()&&(o(e),c()(e))}),id:Q(()=>s()),disabled:Q(()=>l()),onSelect:Q(()=>v),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>d()),indeterminate:Q(()=>f(),e=>{e!==f()&&(f(e),p()(e))}),value:Q(()=>m())},g);function v(e){u()(e),!e.defaultPrevented&&_.toggleChecked()}let y=k(()=>Vb(h,_.props));var b={get child(){return r()},set child(e){r(e),O()},get children(){return i()},set children(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get checked(){return o()},set checked(e=!1){o(e),O()},get id(){return s()},set id(e=dS(n)){s(e),O()},get onCheckedChange(){return c()},set onCheckedChange(e=$){c(e),O()},get disabled(){return l()},set disabled(e=!1){l(e),O()},get onSelect(){return u()},set onSelect(e=$){u(e),O()},get closeOnSelect(){return d()},set closeOnSelect(e=!0){d(e),O()},get indeterminate(){return f()},set indeterminate(e=!1){f(e),O()},get onIndeterminateChange(){return p()},set onIndeterminateChange(e=$){p(e),O()},get value(){return m()},set value(e=``){m(e),O()}},x=R(),S=N(x),ee=e=>{var t=R();V(N(t),r,()=>({checked:o(),indeterminate:f(),props:I(y)})),z(e,t)},te=e=>{var t=RO();G(t,()=>({...I(y)})),V(M(t),()=>i()??C,()=>({checked:o(),indeterminate:f()})),T(t),z(e,t)};return H(S,e=>{r()?e(ee):e(te,-1)}),z(e,x),D(b)}q(zO,{child:{},children:{},ref:{},checked:{},id:{},onCheckedChange:{},disabled:{},onSelect:{},closeOnSelect:{},indeterminate:{},onIndeterminateChange:{},value:{}},[],[],{mode:`open`});var BO=L(`<div><!></div>`);function VO(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`value`,31,()=>kn([])),c=K(t,`onValueChange`,7,$),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),u=gw.create({value:Q(()=>lt(s()),e=>{s(lt(e)),c()(e)}),onValueChange:Q(()=>c()),ref:Q(()=>o(),e=>o(e)),id:Q(()=>r())}),d=k(()=>Vb(l,u.props));var f={get id(){return r()},set id(e=dS(n)){r(e),O()},get children(){return i()},set children(e){i(e),O()},get child(){return a()},set child(e){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get value(){return s()},set value(e=[]){s(e),O()},get onValueChange(){return c()},set onValueChange(e=$){c(e),O()}},p=R(),m=N(p),h=e=>{var t=R();V(N(t),a,()=>({props:I(d)})),z(e,t)},g=e=>{var t=BO();G(t,()=>({...I(d)})),V(M(t),()=>i()??C),T(t),z(e,t)};return H(m,e=>{a()?e(h):e(g,-1)}),z(e,p),D(f)}q(VO,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});function HO(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function UO(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function WO(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var GO=class{#e;#t;#n;#r=null;#i=null;#a=[];#o=null;#s=null;#c=null;#l(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#u(){this.#l(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){this.#n!==null&&(this.#d(),this.#c=window.setTimeout(()=>{this.#c=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())},this.#n))}constructor(e){this.#e=e,this.#t=e.buffer??1;let t=e.transitIntentTimeout;this.#n=typeof t==`number`&&t>0?t:null,Xb([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){this.#o=null,this.#m();return}return this.#o&&this.#o!==e&&this.#m(),this.#o=e,[ai(xx(e),`pointermove`,n=>{this.#p([n.clientX,n.clientY],e,t)}),ai(e,`pointerleave`,e=>{let n=e.relatedTarget;if(rS(n)&&t.contains(n))return;let r=this.#e.ignoredTargets?.()??[];rS(n)&&r.some(e=>e===n||e.contains(n))||(this.#a=rS(n)&&r.length>0?r.filter(e=>n.contains(e)):[],this.#r=[e.clientX,e.clientY],this.#i=`content`,this.#u())}),ai(e,`pointerenter`,()=>{this.#m()}),ai(t,`pointerenter`,()=>{this.#m()}),ai(t,`pointerleave`,t=>{let n=t.relatedTarget;rS(n)&&e.contains(n)||(this.#r=[t.clientX,t.clientY],this.#i=`trigger`,this.#u())})].reduce((e,t)=>()=>{e(),t()},()=>{})})}#p(e,t,n){if(!this.#r||!this.#i)return;this.#l(),this.#f();let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(this.#i===`content`&&UO(e,i)){this.#m();return}if(this.#i===`trigger`&&UO(e,r)){this.#m();return}if(this.#i===`content`&&this.#a.length>0)for(let t of this.#a){let n=t.getBoundingClientRect();if(UO(e,n))return;let i=WO(r,n),a=this.#h(r,n,i);if(a&&HO(e,a))return}let a=WO(r,i),o=this.#h(r,i,a);if(o&&HO(e,o))return;let s=this.#i===`content`?i:r;HO(e,this.#g(this.#r,s,a,this.#i))||(this.#m(),this.#e.onPointerExit())}#m(){this.#r=null,this.#i=null,this.#a=[],this.#l(),this.#d()}#h(e,t,n){let r=this.#t;switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}#g(e,t,n,r){let i=this.#t*4,[a,o]=e;switch(r===`trigger`?this.#_(n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#_(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}},KO=Nx({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),qO=new Kb(`Popover.Root`),JO=class e{static create(t){return qO.set(new e(t))}opts;#e=A(null);get contentNode(){return I(this.#e)}set contentNode(e){j(this.#e,e,!0)}contentPresence;#t=A(null);get triggerNode(){return I(this.#t)}set triggerNode(e){j(this.#t,e,!0)}#n=A(null);get overlayNode(){return I(this.#n)}set overlayNode(e){j(this.#n,e,!0)}overlayPresence;#r=A(!1);get openedViaHover(){return I(this.#r)}set openedViaHover(e){j(this.#r,e,!0)}#i=A(!1);get hasInteractedWithContent(){return I(this.#i)}set hasInteractedWithContent(e){j(this.#i,e,!0)}#a=A(!1);get hoverCooldown(){return I(this.#a)}set hoverCooldown(e){j(this.#a,e,!0)}#o=A(0);get closeDelay(){return I(this.#o)}set closeDelay(e){j(this.#o,e,!0)}#s=null;#c=null;constructor(e){this.opts=e,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new uS({ref:Q(()=>this.overlayNode),open:this.opts.open}),Xb(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(e){this.#c=e}#l(){this.#s!==null&&this.#c&&(this.#c.clearTimeout(this.#s),this.#s=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#c&&(this.#s=this.#c.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#s=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}},YO=class e{static create(t){return new e(t,qO.get())}opts;root;attachment;domContext;#e=null;#t=null;#n=A(!1);constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new wx(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Xb(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}#r(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#r(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||aS(e)||(j(this.#n,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},t)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(aS(e)||(j(this.#n,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),I(this.#n)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}I(this.#n)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#s=k(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"aria-controls":this.#o(),[KO.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return I(this.#s)}set props(e){j(this.#s,e)}},XO=class e{static create(t){return new e(t,qO.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new GO({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;rS(t)&&CC(t)&&this.root.markInteraction()}onpointerenter(e){aS(e)||this.root.cancelDelayedClose()}onpointerleave(e){aS(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!rS(e.target))return;let t=e.target.closest(KO.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(rS(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return I(this.#e)}set snippetProps(e){j(this.#e,e)}#t=k(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Ax(this.root.opts.open.current),[KO.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return I(this.#t)}set props(e){j(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}},ZO=L(`<div><div><!></div></div>`),QO=L(`<div><div><!></div></div>`);function $O(e,t){let n=vi();E(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`forceMount`,7,!1),c=K(t,`onOpenAutoFocus`,7,$),l=K(t,`onCloseAutoFocus`,7,$),u=K(t,`onEscapeKeydown`,7,$),d=K(t,`onInteractOutside`,7,$),f=K(t,`trapFocus`,7,!0),p=K(t,`preventScroll`,7,!1),m=K(t,`customAnchor`,7,null),h=K(t,`style`,7),g=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),_=XO.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e)),onInteractOutside:Q(()=>d()),onEscapeKeydown:Q(()=>u()),customAnchor:Q(()=>m())}),v=k(()=>Vb(g,_.props)),y=k(()=>f()&&_.shouldTrapFocus);function b(e){_.shouldTrapFocus||e.preventDefault(),c()(e)}var x={get child(){return r()},set child(e){r(e),O()},get children(){return i()},set children(e){i(e),O()},get ref(){return a()},set ref(e=null){a(e),O()},get id(){return o()},set id(e=dS(n)){o(e),O()},get forceMount(){return s()},set forceMount(e=!1){s(e),O()},get onOpenAutoFocus(){return c()},set onOpenAutoFocus(e=$){c(e),O()},get onCloseAutoFocus(){return l()},set onCloseAutoFocus(e=$){l(e),O()},get onEscapeKeydown(){return u()},set onEscapeKeydown(e=$){u(e),O()},get onInteractOutside(){return d()},set onInteractOutside(e=$){d(e),O()},get trapFocus(){return f()},set trapFocus(e=!0){f(e),O()},get preventScroll(){return p()},set preventScroll(e=!1){p(e),O()},get customAnchor(){return m()},set customAnchor(e=null){m(e),O()},get style(){return h()},set style(e){h(e),O()}},S=R(),ee=N(S),te=e=>{lO(e,po(()=>I(v),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return I(y)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return m()},onOpenAutoFocus:b,get onCloseAutoFocus(){return l()},get shouldRender(){return _.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,a=()=>t?.().wrapperProps,o=k(()=>Vb(n(),{style:mD(`popover`)},{style:h()}));var s=R(),c=N(s),l=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(o),wrapperProps:a(),..._.snippetProps}));V(n,r,()=>I(e))}z(e,t)},u=e=>{var t=ZO();G(t,()=>({...a()}));var n=M(t);G(n,()=>({...I(o)})),V(M(n),()=>i()??C),T(n),T(t),z(e,t)};H(c,e=>{r()?e(l):e(u,-1)}),z(e,s)},$$slots:{popper:!0}}))},ne=e=>{cO(e,po(()=>I(v),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return I(y)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return m()},onOpenAutoFocus:b,get onCloseAutoFocus(){return l()},get shouldRender(){return _.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,a=()=>t?.().wrapperProps,o=k(()=>Vb(n(),{style:mD(`popover`)},{style:h()}));var s=R(),c=N(s),l=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(o),wrapperProps:a(),..._.snippetProps}));V(n,r,()=>I(e))}z(e,t)},u=e=>{var t=QO();G(t,()=>({...a()}));var n=M(t);G(n,()=>({...I(o)})),V(M(n),()=>i()??C),T(n),T(t),z(e,t)};H(c,e=>{r()?e(l):e(u,-1)}),z(e,s)},$$slots:{popper:!0}}))};return H(ee,e=>{s()?e(te):s()||e(ne,1)}),z(e,S),D(x)}q($O,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:`open`});var ek=L(`<button><!></button>`);function tk(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`type`,7,`button`),c=K(t,`disabled`,7,!1),l=K(t,`openOnHover`,7,!1),u=K(t,`openDelay`,7,700),d=K(t,`closeDelay`,7,300),f=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),p=YO.create({id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),disabled:Q(()=>!!c()),openOnHover:Q(()=>l()),openDelay:Q(()=>u()),closeDelay:Q(()=>d())}),m=k(()=>Vb(f,p.props,{type:s()}));return QD(e,{get id(){return a()},get ref(){return p.opts.ref},children:(e,t)=>{var n=R(),a=N(n),o=e=>{var t=R();V(N(t),i,()=>({props:I(m)})),z(e,t)},s=e=>{var t=ek();G(t,()=>({...I(m)})),V(M(t),()=>r()??C),T(t),z(e,t)};H(a,e=>{i()?e(o):e(s,-1)}),z(e,n)},$$slots:{default:!0}}),D({get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get id(){return a()},set id(e=dS(n)){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get type(){return s()},set type(e=`button`){s(e),O()},get disabled(){return c()},set disabled(e=!1){c(e),O()},get openOnHover(){return l()},set openOnHover(e=!1){l(e),O()},get openDelay(){return u()},set openDelay(e=700){u(e),O()},get closeDelay(){return d()},set closeDelay(e=300){d(e),O()}})}q(tk,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:`open`});function nk(e,t){E(t,!0);let n=K(t,`open`,15,!1),r=K(t,`onOpenChange`,7,$),i=K(t,`onOpenChangeComplete`,7,$),a=K(t,`children`,7);mS.create({variant:Q(()=>`dialog`),open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())});var o={get open(){return n()},set open(e=!1){n(e),O()},get onOpenChange(){return r()},set onOpenChange(e=$){r(e),O()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=$){i(e),O()},get children(){return a()},set children(e){a(e),O()}},s=R();return V(N(s),()=>a()??C),z(e,s),D(o)}q(nk,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});var rk=L(`<button><!></button>`);function ik(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`disabled`,7,!1),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`disabled`]),l=hS.create({variant:Q(()=>`close`),id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),disabled:Q(()=>!!s())}),u=k(()=>Vb(c,l.props));var d={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get id(){return a()},set id(e=dS(n)){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get disabled(){return s()},set disabled(e=!1){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R();V(N(t),i,()=>({props:I(u)})),z(e,t)},h=e=>{var t=rk();G(t,()=>({...I(u)})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(p,e=>{i()?e(m):e(h,-1)}),z(e,f),D(d)}q(ik,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],{mode:`open`});var ak=L(`<!> <!>`,1),ok=L(`<!> <div><!></div>`,1);function sk(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`forceMount`,7,!1),c=K(t,`onCloseAutoFocus`,7,$),l=K(t,`onOpenAutoFocus`,7,$),u=K(t,`onEscapeKeydown`,7,$),d=K(t,`onInteractOutside`,7,$),f=K(t,`trapFocus`,7,!0),p=K(t,`preventScroll`,7,!0),m=K(t,`restoreScrollDelay`,7,null),h=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),g=vS.create({id:Q(()=>r()),ref:Q(()=>o(),e=>o(e))}),_=k(()=>Vb(h,g.props));var v={get id(){return r()},set id(e=dS(n)){r(e),O()},get children(){return i()},set children(e){i(e),O()},get child(){return a()},set child(e){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get forceMount(){return s()},set forceMount(e=!1){s(e),O()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(e=$){c(e),O()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(e=$){l(e),O()},get onEscapeKeydown(){return u()},set onEscapeKeydown(e=$){u(e),O()},get onInteractOutside(){return d()},set onInteractOutside(e=$){d(e),O()},get trapFocus(){return f()},set trapFocus(e=!0){f(e),O()},get preventScroll(){return p()},set preventScroll(e=!0){p(e),O()},get restoreScrollDelay(){return m()},set restoreScrollDelay(e=null){m(e),O()}},y=R(),b=N(y),x=e=>{Ow(e,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return f()},get enabled(){return g.root.opts.open.current},get onOpenAutoFocus(){return l()},get onCloseAutoFocus(){return c()},focusScope:(e,t)=>{let n=()=>t?.().props;Tw(e,po(()=>I(_),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:e=>{u()(e),!e.defaultPrevented&&g.root.handleClose()},children:(e,t)=>{Sw(e,po(()=>I(_),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},onInteractOutside:e=>{d()(e),!e.defaultPrevented&&g.root.handleClose()},children:(e,t)=>{Pw(e,po(()=>I(_),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(e,t)=>{var r=R(),o=N(r),s=e=>{var t=ak(),r=N(t),i=e=>{qw(e,{get preventScroll(){return p()},get restoreScrollDelay(){return m()}})};H(r,e=>{g.root.opts.open.current&&e(i)});var o=P(r,2);{let e=k(()=>({props:Vb(I(_),n()),...g.snippetProps}));V(o,a,()=>I(e))}z(e,t)},c=e=>{var t=ok(),r=N(t);qw(r,{get preventScroll(){return p()}});var a=P(r,2);G(a,e=>({...e}),[()=>Vb(I(_),n())]),V(M(a),()=>i()??C),T(a),z(e,t)};H(o,e=>{a()?e(s):e(c,-1)}),z(e,r)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};return H(b,e=>{(g.shouldRender||s())&&e(x)}),z(e,y),D(v)}q(sk,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});function ck(e,t){E(t,!0);let n=K(t,`open`,15,!1),r=K(t,`dir`,7,`ltr`),i=K(t,`onOpenChange`,7,$),a=K(t,`onOpenChangeComplete`,7,$),o=K(t,`_internal_variant`,7,`dropdown-menu`),s=K(t,`children`,7),c=iw.create({variant:Q(()=>o()),dir:Q(()=>r()),onClose:()=>{n(!1),i()(!1)}});return aw.create({open:Q(()=>n(),e=>{n(e),i()(e)}),onOpenChangeComplete:Q(()=>a())},c),OD(e,{children:(e,t)=>{var n=R();V(N(n),()=>s()??C),z(e,n)},$$slots:{default:!0}}),D({get open(){return n()},set open(e=!1){n(e),O()},get dir(){return r()},set dir(e=`ltr`){r(e),O()},get onOpenChange(){return i()},set onOpenChange(e=$){i(e),O()},get onOpenChangeComplete(){return a()},set onOpenChangeComplete(e=$){a(e),O()},get _internal_variant(){return o()},set _internal_variant(e=`dropdown-menu`){o(e),O()},get children(){return s()},set children(e){s(e),O()}})}q(ck,{open:{},dir:{},onOpenChange:{},onOpenChangeComplete:{},_internal_variant:{},children:{}},[],[],{mode:`open`});var lk=L(`<div><div><!></div></div>`),uk=L(`<div><div><!></div></div>`);function dk(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`child`,7),a=K(t,`children`,7),o=K(t,`ref`,15,null),s=K(t,`loop`,7,!0),c=K(t,`onInteractOutside`,7,$),l=K(t,`onEscapeKeydown`,7,$),u=K(t,`onCloseAutoFocus`,7,$),d=K(t,`forceMount`,7,!1),f=K(t,`trapFocus`,7,!1),p=K(t,`style`,7),m=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`child`,`children`,`ref`,`loop`,`onInteractOutside`,`onEscapeKeydown`,`onCloseAutoFocus`,`forceMount`,`trapFocus`,`style`]),h=ow.create({id:Q(()=>r()),loop:Q(()=>s()),ref:Q(()=>o(),e=>o(e)),onCloseAutoFocus:Q(()=>u())}),g=k(()=>Vb(m,h.props));function _(e){if(h.handleInteractOutside(e),!e.defaultPrevented&&(c()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){let t=`[${h.parentMenu.root.getBitsAttr(`sub-content`)}]`;if(e.target.closest(t))return}h.parentMenu.onClose()}}function v(e){l()(e),!e.defaultPrevented&&h.parentMenu.onClose()}var y={get id(){return r()},set id(e=dS(n)){r(e),O()},get child(){return i()},set child(e){i(e),O()},get children(){return a()},set children(e){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get loop(){return s()},set loop(e=!0){s(e),O()},get onInteractOutside(){return c()},set onInteractOutside(e=$){c(e),O()},get onEscapeKeydown(){return l()},set onEscapeKeydown(e=$){l(e),O()},get onCloseAutoFocus(){return u()},set onCloseAutoFocus(e=$){u(e),O()},get forceMount(){return d()},set forceMount(e=!1){d(e),O()},get trapFocus(){return f()},set trapFocus(e=!1){f(e),O()},get style(){return p()},set style(e){p(e),O()}},b=R(),x=N(b),S=e=>{lO(e,po(()=>I(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.parentMenu.opts.open.current},onInteractOutside:_,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return s()},forceMount:!0,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,o=k(()=>Vb(n(),{style:mD(`dropdown-menu`)},{style:p()}));var s=R(),c=N(s),l=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(o),wrapperProps:r(),...h.snippetProps}));V(n,i,()=>I(e))}z(e,t)},u=e=>{var t=lk();G(t,()=>({...r()}));var n=M(t);G(n,()=>({...I(o)})),V(M(n),()=>a()??C),T(n),T(t),z(e,t)};H(c,e=>{i()?e(l):e(u,-1)}),z(e,s)},$$slots:{popper:!0}}))},ee=e=>{cO(e,po(()=>I(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.parentMenu.opts.open.current},onInteractOutside:_,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return s()},forceMount:!1,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,o=k(()=>Vb(n(),{style:mD(`dropdown-menu`)},{style:p()}));var s=R(),c=N(s),l=e=>{var t=R(),n=N(t);{let e=k(()=>({props:I(o),wrapperProps:r(),...h.snippetProps}));V(n,i,()=>I(e))}z(e,t)},u=e=>{var t=uk();G(t,()=>({...r()}));var n=M(t);G(n,()=>({...I(o)})),V(M(n),()=>a()??C),T(n),T(t),z(e,t)};H(c,e=>{i()?e(l):e(u,-1)}),z(e,s)},$$slots:{popper:!0}}))};return H(x,e=>{d()?e(S):d()||e(ee,1)}),z(e,b),D(y)}q(dk,{id:{},child:{},children:{},ref:{},loop:{},onInteractOutside:{},onEscapeKeydown:{},onCloseAutoFocus:{},forceMount:{},trapFocus:{},style:{}},[],[],{mode:`open`});var fk=L(`<button><!></button>`);function pk(e,t){let n=vi();E(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`disabled`,7,!1),c=K(t,`type`,7,`button`),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`disabled`,`type`]),u=hw.create({id:Q(()=>r()),disabled:Q(()=>s()??!1),ref:Q(()=>i(),e=>i(e))}),d=k(()=>Vb(l,u.props,{type:c()}));return QD(e,{get id(){return r()},get ref(){return u.opts.ref},children:(e,t)=>{var n=R(),r=N(n),i=e=>{var t=R();V(N(t),a,()=>({props:I(d)})),z(e,t)},s=e=>{var t=fk();G(t,()=>({...I(d)})),V(M(t),()=>o()??C),T(t),z(e,t)};H(r,e=>{a()?e(i):e(s,-1)}),z(e,n)},$$slots:{default:!0}}),D({get id(){return r()},set id(e=dS(n)){r(e),O()},get ref(){return i()},set ref(e=null){i(e),O()},get child(){return a()},set child(e){a(e),O()},get children(){return o()},set children(e){o(e),O()},get disabled(){return s()},set disabled(e=!1){s(e),O()},get type(){return c()},set type(e=`button`){c(e),O()}})}q(pk,{id:{},ref:{},child:{},children:{},disabled:{},type:{}},[],[],{mode:`open`});var mk=Nx({component:`label`,parts:[`root`]}),hk=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Tx(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=k(()=>({id:this.opts.id.current,[mk.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return I(this.#e)}set props(e){j(this.#e,e)}},gk=L(`<label><!></label>`);function _k(e,t){let n=vi();E(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`for`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`for`]),l=hk.create({id:Q(()=>a()),ref:Q(()=>o(),e=>o(e))}),u=k(()=>Vb(c,l.props,{for:s()}));var d={get children(){return r()},set children(e){r(e),O()},get child(){return i()},set child(e){i(e),O()},get id(){return a()},set id(e=dS(n)){a(e),O()},get ref(){return o()},set ref(e=null){o(e),O()},get for(){return s()},set for(e){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R();V(N(t),i,()=>({props:I(u)})),z(e,t)},h=e=>{var t=gk();G(t,()=>({...I(u),for:s()})),V(M(t),()=>r()??C),T(t),z(e,t)};return H(p,e=>{i()?e(m):e(h,-1)}),z(e,f),D(d)}q(_k,{children:{},child:{},id:{},ref:{},for:{}},[],[],{mode:`open`});function vk(e,t){E(t,!0);let n=K(t,`open`,15,!1),r=K(t,`onOpenChange`,7,$),i=K(t,`onOpenChangeComplete`,7,$),a=K(t,`children`,7);return JO.create({open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())}),OD(e,{children:(e,t)=>{var n=R();V(N(n),()=>a()??C),z(e,n)},$$slots:{default:!0}}),D({get open(){return n()},set open(e=!1){n(e),O()},get onOpenChange(){return r()},set onOpenChange(e=$){r(e),O()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=$){i(e),O()},get children(){return a()},set children(e){a(e),O()}})}q(vk,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});function yk(e){return e<.5?8*e**4:-8*(e-1)**4+1}function bk(e){return e**4}function xk(e){return(e-1)**3*(1-e)+1}function Sk(e){return--e*e*e*e*e+1}var Ck=e=>e;function wk(e){let t=e-1;return t*t*t+1}function Tk(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function Ek(e,{delay:t=0,duration:n=400,easing:r=Ck}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:e=>`opacity: ${e*i}`}}function Dk(e,{delay:t=0,duration:n=400,easing:r=wk,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Tk(i),[p,m]=Tk(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
|
|
559
|
+
`,` `)}var zb=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function Bb(e){return zb.has(e)}function Vb(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&Bb(e))t[e]=sb(n,i);else if(a&&o)t[e]=Pb(n,i);else if(e===`class`){let r=Zy(n),a=Zy(i);r&&a?t[e]=xa(n,i):r?t[e]=xa(n):a&&(t[e]=xa(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Nb(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Nb(n),...i};else if(o&&s){let r=Nb(n),a=Nb(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Rb(t.style).replaceAll(`
|
|
560
|
+
`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Hb=Rb({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`}),Ub=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Wb(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=Ub,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=tn(e=>{let n=ii(t,`focusin`,e),r=ii(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Wb(this.#e):null}};function Gb(e){return typeof e==`function`}var Kb=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return mt(this.#t)}get(){let e=ft(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=ft(this.#t);return t===void 0?e:t}set(e){return pt(this.#t,e)}};function qb(e,t){switch(e){case`post`:er(t);break;case`pre`:nr(t);break}}function Jb(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;qb(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Zr(()=>n(t,o));return o=t,r})}function Yb(e,t,n){let r=rr(()=>{let i=!1;Jb(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});er(()=>r)}function Xb(e,t,n){Jb(e,`post`,t,n)}function Zb(e,t,n){Jb(e,`pre`,t,n)}Xb.pre=Zb;function Qb(e,t){Yb(e,`post`,t)}function $b(e,t){Yb(e,`pre`,t)}Qb.pre=$b;function ex(e){return Gb(e)?e():e}var tx=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=A(()=>(L(this.#s)?.(),this.getSize().width));#o=A(()=>(L(this.#s)?.(),this.getSize().height));#s=A(()=>{let e=ex(this.#r);if(e)return tn(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??Ub,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=ex(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 L(this.#s)?.(),this.getSize()}get width(){return L(this.#a)}get height(){return L(this.#o)}},nx=class{#e=()=>void 0;#t=A(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return L(this.#t)}};function rx(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 ix(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 ax(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=j(On(o)),u=j(!1),d=j(void 0),f=j(On([])),p=()=>{L(f).forEach(e=>e()),M(f,[],!0)},m=e=>{M(f,[...L(f),e],!0)},h=async(e,n,r=!1)=>{try{M(u,!0),M(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:L(l),refetching:r,onCleanup:m,signal:i.signal});return M(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||M(d,e,!0);return}finally{M(u,!1)}},g=s?rx(h,s):c?ix(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 L(l)},get loading(){return L(u)},get error(){return L(d)},mutate:e=>{M(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 ox(e,t,n){return ax(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Xb(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function sx(e,t,n){return ax(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Xb.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}ox.pre=sx;function cx(e){er(()=>()=>{e()})}function lx(e){er(()=>Zr(()=>e()))}function ux(e,t){return setTimeout(t,e)}function dx(e){Jr().then(e)}var fx=1,px=9,mx=11;function hx(e){return Yy(e)&&e.nodeType===fx&&typeof e.nodeName==`string`}function gx(e){return Yy(e)&&e.nodeType===px}function _x(e){return Yy(e)&&e.constructor?.name===`VisualViewport`}function vx(e){return Yy(e)&&e.nodeType!==void 0}function yx(e){return vx(e)&&e.nodeType===mx&&`host`in e}function bx(e,t){if(!e||!t||!hx(e)||!hx(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&yx(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xx(e){return gx(e)?e:_x(e)?e.document:e?.ownerDocument??document}function Sx(e){return yx(e)?Sx(e.host):gx(e)?e.defaultView??window:hx(e)?e.ownerDocument?.defaultView??window:window}function Cx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var wx=class{element;#e=A(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return L(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e==`function`?this.element=Q(e):this.element=e}getDocument=()=>xx(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Cx(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Tx(e,t){return{[Bi()]:n=>eb(e)?(e.current=n,Zr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Zr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Ex(e){return e?`true`:`false`}function Dx(e){return e?`true`:void 0}function Ox(e){return e?``:void 0}function kx(e){return e?!0:void 0}function Ax(e){return e?`open`:`closed`}function jx(e,t){return t?`mixed`:e?`true`:`false`}var Mx=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Nx(e){let t=new Mx(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Px=`ArrowDown`,Fx=`ArrowLeft`,Ix=`ArrowRight`,Lx=`ArrowUp`,Rx=`CapsLock`,zx=`Control`,Bx=`Enter`,Vx=`Escape`,Hx=`Home`,Ux=`Meta`,Wx=`PageDown`,Gx=`PageUp`,Kx=`Shift`;function qx(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Jx=[Px,Gx,Hx],Yx=[Lx,Wx,`End`];[...Jx,...Yx];function Xx(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Fx:Ix,vertical:Px}[t]}function Zx(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Ix:Fx,vertical:Lx}[t]}function Qx(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Xx(e,t),prevKey:Zx(e,t)}}var $x=typeof document<`u`,eS=tS();function tS(){return $x&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function nS(e){return e instanceof HTMLElement}function rS(e){return e instanceof Element}function iS(e){return e instanceof Element||e instanceof SVGElement}function aS(e){return e.pointerType===`touch`}function oS(e){return e!==null}function sS(e){return e instanceof HTMLInputElement&&`select`in e}var cS=class{#e;#t=ob(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Qx(qx(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Hx]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Ix:Px,t=s===`ArrowUp`?Fx:Lx;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!nS(t)||t.focus()}},lS=class{#e;#t=null;constructor(e){this.#e=e,cx(()=>this.#n())}#n(){this.#t&&=(window.cancelAnimationFrame(this.#t),null)}run(e){this.#n();let t=this.#e.ref.current;if(t){if(typeof t.getAnimations!=`function`){this.#r(e);return}this.#t=window.requestAnimationFrame(()=>{let n=t.getAnimations();if(n.length===0){this.#r(e);return}Promise.allSettled(n.map(e=>e.finished)).then(()=>{this.#r(e)})})}}#r(e){let t=()=>{e()};this.#e.afterTick?dx(t):t()}},uS=class{#e;#t;#n;#r=j(!1);constructor(e){this.#e=e,M(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new lS({ref:this.#e.ref,afterTick:this.#e.open}),Xb(()=>this.#e.open.current,e=>{e&&M(this.#r,!0),this.#t&&this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||M(this.#r,!1),this.#e.onComplete?.())})})}get shouldRender(){return L(this.#r)}};function $(){}function dS(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var fS=Nx({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),pS=new Kb(`Dialog.Root | AlertDialog.Root`),mS=class e{static create(t){let n=pS.getOr(null);return pS.set(new e(t,n))}opts;#e=j(null);get triggerNode(){return L(this.#e)}set triggerNode(e){M(this.#e,e,!0)}#t=j(null);get contentNode(){return L(this.#t)}set contentNode(e){M(this.#t,e,!0)}#n=j(null);get overlayNode(){return L(this.#n)}set overlayNode(e){M(this.#n,e,!0)}#r=j(null);get descriptionNode(){return L(this.#r)}set descriptionNode(e){M(this.#r,e,!0)}#i=j(void 0);get contentId(){return L(this.#i)}set contentId(e){M(this.#i,e,!0)}#a=j(void 0);get titleId(){return L(this.#a)}set titleId(e){M(this.#a,e,!0)}#o=j(void 0);get triggerId(){return L(this.#o)}set triggerId(e){M(this.#o,e,!0)}#s=j(void 0);get descriptionId(){return L(this.#s)}set descriptionId(e){M(this.#s,e,!0)}#c=j(null);get cancelNode(){return L(this.#c)}set cancelNode(e){M(this.#c,e,!0)}#l=j(0);get nestedOpenCount(){return L(this.#l)}set nestedOpenCount(e){M(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new uS({ref:Q(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Xb(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),cx(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>fS.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=A(()=>({"data-state":Ax(this.opts.open.current)}));get sharedProps(){return L(this.#u)}set sharedProps(e){M(this.#u,e)}},hS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},gS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=Tx(this.opts.ref),Xb.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=A(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},_S=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=Tx(this.opts.ref,e=>{this.root.descriptionNode=e}),Xb.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},vS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return L(this.#e)}set snippetProps(e){M(this.#e,e)}#t=A(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":Ox(this.root.nestedOpenCount>0),"data-nested":Ox(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},yS=class e{static create(t){return new e(t,pS.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.overlayNode=e)}#e=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return L(this.#e)}set snippetProps(e){M(this.#e,e)}#t=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Ox(this.root.nestedOpenCount>0),"data-nested":Ox(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},bS=R(`<div><!></div>`);function xS(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`level`,7,2),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`level`]),l=gS.create({id:Q(()=>r()),level:Q(()=>s()),ref:Q(()=>i(),e=>i(e))}),u=A(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get child(){return a()},set child(e){a(e),k()},get children(){return o()},set children(e){o(e),k()},get level(){return s()},set level(e=2){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z();H(P(t),a,()=>({props:L(u)})),B(e,t)},h=e=>{var t=bS();qa(t,()=>({...L(u)})),H(N(t),()=>o()??w),E(t),B(e,t)};return U(p,e=>{a()?e(m):e(h,-1)}),B(e,f),O(d)}q(xS,{id:{},ref:{},child:{},children:{},level:{}},[],[],{mode:`open`});function SS(e,t){D(t,!0);let n=K(t,`children`,7);var r={get children(){return n()},set children(e){n(e),k()}},i=z();return Ki(P(i),n,e=>{var t=z();H(P(t),()=>n()??w),B(e,t)}),B(e,i),O(r)}q(SS,{children:{}},[],[],{mode:`open`});var CS=new Kb(`BitsConfig`);function wS(){let e=new ES(null,{});return CS.getOr(e).opts}function TS(e){return CS.set(new ES(CS.getOr(null),e))}var ES=class{opts;constructor(e,t){let n=DS(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function DS(e,t){return n=>Q(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function OS(e,t){return n=>{let r=wS();return Q(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var kS=OS(e=>e.defaultPortalTo,`body`);function AS(e,t){D(t,!0);let n=K(t,`to`,7),r=K(t,`children`,7),i=K(t,`disabled`,7),a=kS(()=>n()),o=ht(),s=A(c);function c(){if(!$x||i())return null;let e=null;return e=typeof a.current==`string`?document.querySelector(a.current):a.current,e}let l;function u(){l&&=(Fi(l),null)}Xb([()=>L(s),()=>i()],([e,t])=>{if(!e||t){u();return}return l=Ai(SS,{target:e,props:{children:r()},context:o}),()=>{u()}});var d={get to(){return n()},set to(e){n(e),k()},get children(){return r()},set children(e){r(e),k()},get disabled(){return i()},set disabled(e){i(e),k()}},f=z(),p=P(f),m=e=>{var t=z();H(P(t),()=>r()??w),B(e,t)};return U(p,e=>{i()&&e(m)}),B(e,f),O(d)}q(AS,{to:{},children:{},disabled:{}},[],[],{mode:`open`});var jS=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return ii(e,this.eventName,e=>{t(e)},n)}};function MS(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function NS(e,t){return e===t||e.contains(t)}function PS(e){return e?.ownerDocument??document}function FS(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var IS=[Bx,` `],LS=[Px,Gx,Hx],RS=[Lx,Wx,`End`],zS=[...LS,...RS];[...IS],[...IS];function BS(e){return e===`indeterminate`}function VS(e){return BS(e)?`indeterminate`:e?`checked`:`unchecked`}function HS(e){return e.pointerType===`mouse`}function US(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=xx(e);if(n.activeElement===e)return;let r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&sS(e)&&t&&e.select()}function WS(e,{select:t=!1}={},n){let r=n();for(let i of e)if(US(i,{select:t}),n()!==r)return!0}var GS=j(!1),KS=class e{static _refs=0;static _cleanup;constructor(){er(()=>(e._refs===0&&(e._cleanup=rr(()=>{let e=[],t=e=>{M(GS,!1)};return e.push(ii(document,`pointerdown`,t,{capture:!0}),ii(document,`pointermove`,t,{capture:!0}),ii(document,`keydown`,e=>{M(GS,!0)},{capture:!0})),Pb(...e)})),e._refs++,()=>{e._refs--,e._refs===0&&(M(GS,!1),e._cleanup?.())}))}get current(){return L(GS)}set current(e){M(GS,e,!0)}},qS=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],JS=qS.join(`,`),YS=typeof Element>`u`,XS=YS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ZS=!YS&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},QS=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):QS(e.parentNode))},$S=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},eC=function(e,t,n){if(QS(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(JS));return t&&XS.call(e,JS)&&r.unshift(e),r=r.filter(n),r},tC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!QS(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=tC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{XS.call(a,JS)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!QS(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=tC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},nC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},rC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||$S(e))&&!nC(e)?0:e.tabIndex},iC=function(e,t){var n=rC(e);return n<0&&t&&!nC(e)?0:n},aC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oC=function(e){return e.tagName===`INPUT`},sC=function(e){return oC(e)&&e.type===`hidden`},cC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},lC=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},uC=function(e){if(!e.name)return!0;var t=e.form||ZS(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=lC(r,e.form);return!i||i===e},dC=function(e){return oC(e)&&e.type===`radio`},fC=function(e){return dC(e)&&!uC(e)},pC=function(e){var t=e&&ZS(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=ZS(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},mC=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},hC=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=XS.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(XS.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=ZS(e);if(o&&!o.shadowRoot&&r(o)===!0)return mC(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(pC(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return mC(e);return!1},gC=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return XS.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},_C=function(e,t){return!(t.disabled||sC(t)||hC(t,e)||cC(t)||gC(t))},vC=function(e,t){return!(fC(t)||rC(t)<0||!_C(e,t))},yC=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},bC=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=iC(a,i),s=i?bC(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(aC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},xC=function(e,t){return t||={},bC(t.getShadowRoot?tC([e],t.includeContainer,{filter:vC.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:yC}):eC(e,t.includeContainer,vC.bind(null,t)))},SC=function(e,t){return t||={},t.getShadowRoot?tC([e],t.includeContainer,{filter:_C.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):eC(e,t.includeContainer,_C.bind(null,t))},CC=function(e,t){if(t||={},!e)throw Error(`No node provided`);return XS.call(e,JS)===!1?!1:vC(t,e)},wC=qS.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),TC=function(e,t){if(t||={},!e)throw Error(`No node provided`);return XS.call(e,wC)===!1?!1:_C(t,e)};function EC(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`}}function DC(e,t){if(!CC(e,EC()))return OC(e,t);let n=xx(e),r=xC(n.body,EC());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function OC(e,t){let n=xx(e);if(!TC(e,EC()))return n.body;let r=SC(n.body,EC());t===`prev`&&r.reverse();let i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(e=>CC(e,EC()))??n.body}function kC(e,t){return e.length===t.length?e.every((e,n)=>AC(e,t[n])):!1}function AC(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?kC(e,t):typeof e==`object`&&typeof t==`object`?jC(e,t):Object.is(e,t)}function jC(e,t){if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!AC(e[i],t[i]))return!1;return!0}function MC(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function NC(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function PC(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function FC(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function IC(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return IC(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return LC(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=LC(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function LC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RC={afterMs:1e4,onChange:$};function zC(e,t){let{afterMs:n,onChange:r,getWindow:i}={...RC,...t},a=null,o=j(On(e));function s(){return i().setTimeout(()=>{M(o,e,!0),r?.(e)},n)}return er(()=>()=>{a&&i().clearTimeout(a)}),Q(()=>L(o),e=>{M(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var BC=class{#e;#t;#n=A(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=A(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=zC(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=L(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=IC(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&L(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},VC=class{#e;#t;#n;#r=j(null);constructor(e){this.#e=e,this.#t=A(()=>this.#e.enabled()),this.#n=zC(!1,{afterMs:e.transitTimeout??300,onChange:e=>{L(this.#t)&&this.#e.setIsPointerInTransit?.(e)},getWindow:()=>Sx(this.#e.triggerNode())}),Xb([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>!e||!t||!n?void 0:Pb(ii(e,`pointerleave`,e=>{this.#a(e,t)}),ii(t,`pointerleave`,t=>{this.#a(t,e)}))),Xb(()=>L(this.#r),()=>{let t=t=>{if(!L(this.#r))return;let n=t.target;if(!rS(n))return;let r={x:t.clientX,y:t.clientY},i=e.triggerNode()?.contains(n)||e.contentNode()?.contains(n),a=!GC(r,L(this.#r));i?this.#i():a&&(this.#i(),e.onPointerExit())},n=xx(e.triggerNode()??e.contentNode());if(n)return ii(n,`pointermove`,t)})}#i(){M(this.#r,null),this.#n.current=!1}#a(e,t){let n=e.currentTarget;if(!nS(n))return;let r={x:e.clientX,y:e.clientY},i=UC(r,HC(r,n.getBoundingClientRect())),a=WC(t.getBoundingClientRect()),o=KC([...i,...a]);M(this.#r,o,!0),this.#n.current=!0}};function HC(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function UC(e,t,n=5){let r=n*1.5;switch(t){case`top`:return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case`bottom`:return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case`left`:return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case`right`:return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function WC(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function GC(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function KC(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),qC(t)}function qC(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var JC=`data-context-menu-trigger`,YC=`data-context-menu-content`,XC=new Kb(`Menu.Root`),ZC=new Kb(`Menu.Root | Menu.Sub`),QC=new Kb(`Menu.Content`),$C=new Kb(`Menu.Group | Menu.RadioGroup`),ew=new Kb(`Menu.RadioGroup`),tw=new Kb(`Menu.CheckboxGroup`),nw=new jS(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),rw=Nx({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),iw=class e{static create(t){let n=new e(t);return XC.set(n)}opts;isUsingKeyboard=new KS;#e=j(!1);get ignoreCloseAutoFocus(){return L(this.#e)}set ignoreCloseAutoFocus(e){M(this.#e,e,!0)}#t=j(!1);get isPointerInTransit(){return L(this.#t)}set isPointerInTransit(e){M(this.#t,e,!0)}constructor(e){this.opts=e}getBitsAttr=e=>rw.getAttr(e,this.opts.variant.current)},aw=class e{static create(t,n){return ZC.set(new e(t,n,null))}opts;root;parentMenu;contentId=Q(()=>``);#e=j(null);get contentNode(){return L(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=j(null);get triggerNode(){return L(this.#t)}set triggerNode(e){M(this.#t,e,!0)}constructor(e,t,n){this.opts=e,this.root=t,this.parentMenu=n,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),n&&Xb(()=>n.opts.open.current,()=>{n.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}},ow=class e{static create(t){return QC.set(new e(t,ZC.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=j(``);get search(){return L(this.#e)}set search(e){M(this.#e,e,!0)}#t=0;#n;#r=j(!1);get mounted(){return L(this.#r)}set mounted(e){M(this.#r,e,!0)}#i;constructor(e,t){this.opts=e,this.parentMenu=t,this.domContext=new wx(e.ref),this.attachment=Tx(this.opts.ref,e=>{this.parentMenu.contentNode!==e&&(this.parentMenu.contentNode=e)}),t.contentId=e.id,this.#i=e.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new VC({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`)),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:e=>{this.parentMenu.root.isPointerInTransit=e}}),this.#n=new BC({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new cS({rootNode:Q(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr(`item`),loop:this.opts.loop,orientation:Q(()=>`vertical`)}),Xb(()=>this.parentMenu.contentNode,e=>e?nw.listen(e,()=>{dx(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})}):void 0),er(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#t)})}#a(){let e=this.parentMenu.contentNode;return e?Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&CC(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let t=this.parentMenu;for(;t.parentMenu!==null;)t=t.parentMenu;if(!t.triggerNode)return;e.preventDefault();let n=DC(t.triggerNode,e.shiftKey?`prev`:`next`);n?(this.parentMenu.root.ignoreCloseAutoFocus=!0,t.onClose(),dx(()=>{n.focus(),dx(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===`Tab`){this.handleTabKeyDown(e);return}let t=e.target,n=e.currentTarget;if(!nS(t)||!nS(n))return;let r=t.closest(`[${this.parentMenu.root.getBitsAttr(`content`)}]`)?.id===this.parentMenu.contentId.current,i=e.ctrlKey||e.altKey||e.metaKey,a=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(t,e)||e.code===`Space`)return;let o=this.#a();r&&!i&&a&&this.#n(e.key,o),e.target?.id===this.parentMenu.contentId.current&&zS.includes(e.key)&&(e.preventDefault(),RS.includes(e.key)&&o.reverse(),WS(o,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){rS(e.currentTarget)&&rS(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=``))}onfocus(e){this.parentMenu.root.isUsingKeyboard.current&&dx(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(e){e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(`sub-trigger`))||this.#o()||this.parentMenu.root.isUsingKeyboard.current||(this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId(``))}onTriggerLeave(){return!!this.#o()}handleInteractOutside(e){if(!iS(e.target))return;let t=this.parentMenu.triggerNode?.id;if(e.target.id===t){e.preventDefault();return}e.target.closest(`#${t}`)&&e.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=A(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return L(this.#s)}set snippetProps(e){M(this.#s,e)}#c=A(()=>({id:this.opts.id.current,role:`menu`,"aria-orientation":`vertical`,[this.parentMenu.root.getBitsAttr(`content`)]:``,"data-state":Ax(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:`auto`,contain:`layout style`},...this.attachment}));get props(){return L(this.#c)}set props(e){M(this.#c,e)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}},sw=class{opts;content;attachment;#e=j(!1);constructor(e,t){this.opts=e,this.content=t,this.attachment=Tx(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&HS(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;let t=e.currentTarget;if(!nS(t))return;t.focus()}}onpointerleave(e){e.defaultPrevented||HS(e)&&this.content.onItemLeave(e)}onfocus(e){dx(()=>{e.defaultPrevented||this.opts.disabled.current||M(this.#e,!0)})}onblur(e){dx(()=>{e.defaultPrevented||M(this.#e,!1)})}#t=A(()=>({id:this.opts.id.current,tabindex:-1,role:`menuitem`,"aria-disabled":Ex(this.opts.disabled.current),"data-disabled":Ox(this.opts.disabled.current),"data-highlighted":L(this.#e)?``:void 0,[this.content.parentMenu.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},cw=class e{static create(t){return new e(t,new sw(t,QC.get()))}opts;item;root;#e=!1;constructor(e,t){this.opts=e,this.item=t,this.root=t.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#t(){if(this.item.opts.disabled.current)return;let e=new CustomEvent(`menuitemselect`,{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(e),e.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){let t=this.item.content.search!==``;if(!(this.item.opts.disabled.current||t&&e.key===` `)&&IS.includes(e.key)){if(!nS(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(e){this.item.opts.disabled.current||this.#t()}onpointerup(e){if(!e.defaultPrevented&&!this.#e){if(!nS(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(e){this.#e=!0}#n=A(()=>Vb(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return L(this.#n)}set props(e){M(this.#n,e)}},lw=class e{static create(t,n){return new e(t,new cw(t,new sw(t,QC.get())),n)}opts;item;group;constructor(e,t,n=null){this.opts=e,this.item=t,this.group=n,this.group&&(Xb(()=>this.group.opts.value.current,e=>{this.opts.checked.current=e.includes(this.opts.value.current)}),Xb(()=>this.opts.checked.current,e=>{e?this.group.addValue(this.opts.value.current):this.group.removeValue(this.opts.value.current)}))}toggleChecked(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}#e=A(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return L(this.#e)}set snippetProps(e){M(this.#e,e)}#t=A(()=>({...this.item.props,role:`menuitemcheckbox`,"aria-checked":jx(this.opts.checked.current,this.opts.indeterminate.current),"data-state":VS(this.opts.checked.current),[this.item.root.getBitsAttr(`checkbox-item`)]:``}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},uw=class e{static create(t){return $C.set(new e(t,XC.get()))}opts;root;attachment;#e=j(void 0);get groupHeadingId(){return L(this.#e)}set groupHeadingId(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref)}#t=A(()=>({id:this.opts.id.current,role:`group`,"aria-labelledby":this.groupHeadingId,[this.root.getBitsAttr(`group`)]:``,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},dw=class e{static create(t){let n=tw.getOr(null);if(n)return new e(t,n);let r=ew.getOr(null);return r?new e(t,r):new e(t,$C.get())}opts;group;attachment;constructor(e,t){this.opts=e,this.group=t,this.attachment=Tx(this.opts.ref,e=>this.group.groupHeadingId=e?.id)}#e=A(()=>({id:this.opts.id.current,role:`group`,[this.group.root.getBitsAttr(`group-heading`)]:``,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},fw=class e{static create(t){return new e(t,XC.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref)}#e=A(()=>({id:this.opts.id.current,role:`group`,[this.root.getBitsAttr(`separator`)]:``,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},pw=class e{static create(t){return $C.set(ew.set(new e(t,QC.get())))}opts;content;attachment;#e=j(null);get groupHeadingId(){return L(this.#e)}set groupHeadingId(e){M(this.#e,e,!0)}root;constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=Tx(this.opts.ref)}setValue(e){this.opts.value.current=e}#t=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`radio-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},mw=class e{static create(t){let n=ew.get();return new e(t,new cw(t,new sw(t,n.content)),n)}opts;item;group;attachment;#e=A(()=>this.group.opts.value.current===this.opts.value.current);get isChecked(){return L(this.#e)}set isChecked(e){M(this.#e,e)}constructor(e,t,n){this.opts=e,this.item=t,this.group=n,this.attachment=Tx(this.opts.ref)}selectValue(){this.group.setValue(this.opts.value.current)}#t=A(()=>({[this.group.root.getBitsAttr(`radio-item`)]:``,...this.item.props,role:`menuitemradio`,"aria-checked":jx(this.isChecked,!1),"data-state":VS(this.isChecked),...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},hw=class e{static create(t){return new e(t,ZC.get())}opts;parentMenu;attachment;constructor(e,t){this.opts=e,this.parentMenu=t,this.attachment=Tx(this.opts.ref,e=>this.parentMenu.triggerNode=e)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType===`touch`)return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType===`touch`&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===` `||e.key===`Enter`){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===`ArrowDown`&&(this.parentMenu.onOpen(),e.preventDefault())}};#e=A(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#t=A(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":`menu`,"aria-expanded":Ex(this.parentMenu.opts.open.current),"aria-controls":L(this.#e),"data-disabled":Ox(this.opts.disabled.current),"data-state":Ax(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr(`trigger`)]:``,onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},gw=class e{static create(t){return tw.set(new e(t,QC.get()))}opts;content;root;attachment;#e=j(null);get groupHeadingId(){return L(this.#e)}set groupHeadingId(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.parentMenu.root,this.attachment=Tx(this.opts.ref)}addValue(e){if(e&&!this.opts.value.current.includes(e)){let t=[...ct(this.opts.value.current),e];if(this.opts.value.current=t,kC(this.opts.value.current,t))return;this.opts.onValueChange.current(t)}}removeValue(e){if(!e||this.opts.value.current.indexOf(e)===-1)return;let t=this.opts.value.current.filter(t=>t!==e);this.opts.value.current=t,!kC(this.opts.value.current,t)&&this.opts.onValueChange.current(t)}#t=A(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`checkbox-group`)]:``,role:`group`,"aria-labelledby":this.groupHeadingId,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}};globalThis.bitsDismissableLayers??=new Map;var _w=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=$;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,er(()=>{this.#a=PS(this.opts.ref.current)});let t=$,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};Xb([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ux(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),cx(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&dx(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Pb(ii(this.#a,`pointerdown`,Pb(this.#f,this.#m),{capture:!0}),ii(this.#a,`pointerdown`,Pb(this.#p,this.#d)),ii(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=xw(e)),this.#e.current(e)};#d=MS(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||bw(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=xw(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=ii(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=yw(this.opts.ref.current))};#h=e=>this.opts.ref.current?NS(this.opts.ref.current,e):!1;#g=MS(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function vw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function yw(e){let t=[...globalThis.bitsDismissableLayers],n=vw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function bw(e,t){let n=e.target;if(!iS(n))return!1;let r=!!n.closest(`[${JC}]`);if(`button`in e&&e.button>0&&!r)return!1;if(`button`in e&&e.button===0&&r)return!0;let i=!!t.closest(`[${YC}]`);return r&&i?!1:PS(n).documentElement.contains(n)&&!NS(t,n)&&FS(e,t)}function xw(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Sw(e,t){D(t,!0);let n=K(t,`interactOutsideBehavior`,7,`close`),r=K(t,`onInteractOutside`,7,$),i=K(t,`onFocusOutside`,7,$),a=K(t,`id`,7),o=K(t,`children`,7),s=K(t,`enabled`,7),c=K(t,`isValidEvent`,7,()=>!1),l=K(t,`ref`,7),u=_w.create({id:Q(()=>a()),interactOutsideBehavior:Q(()=>n()),onInteractOutside:Q(()=>r()),enabled:Q(()=>s()),onFocusOutside:Q(()=>i()),isValidEvent:Q(()=>c()),ref:l()});var d={get interactOutsideBehavior(){return n()},set interactOutsideBehavior(e=`close`){n(e),k()},get onInteractOutside(){return r()},set onInteractOutside(e=$){r(e),k()},get onFocusOutside(){return i()},set onFocusOutside(e=$){i(e),k()},get id(){return a()},set id(e){a(e),k()},get children(){return o()},set children(e){o(e),k()},get enabled(){return s()},set enabled(e){s(e),k()},get isValidEvent(){return c()},set isValidEvent(e=()=>!1){c(e),k()},get ref(){return l()},set ref(e){l(e),k()}},f=z();return H(P(f),()=>o()??w,()=>({props:u.props})),B(e,f),O(d)}q(Sw,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsEscapeLayers??=new Map;var Cw=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new wx(this.opts.ref);let t=$;Xb(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ii(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!ww(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function ww(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Tw(e,t){D(t,!0);let n=K(t,`escapeKeydownBehavior`,7,`close`),r=K(t,`onEscapeKeydown`,7,$),i=K(t,`children`,7),a=K(t,`enabled`,7),o=K(t,`ref`,7);Cw.create({escapeKeydownBehavior:Q(()=>n()),onEscapeKeydown:Q(()=>r()),enabled:Q(()=>a()),ref:o()});var s={get escapeKeydownBehavior(){return n()},set escapeKeydownBehavior(e=`close`){n(e),k()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e=$){r(e),k()},get children(){return i()},set children(e){i(e),k()},get enabled(){return a()},set enabled(e){a(e),k()},get ref(){return o()},set ref(e){o(e),k()}},c=z();return H(P(c),()=>i()??w),B(e,c),O(s)}q(Tw,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`});var Ew=class e{static instance;#e=ab([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},Dw=class e{#e=!1;#t=null;#n=Ew.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(ii(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&TC(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),ii(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?xC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?SC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return Xb([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),cx(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function Ow(e,t){D(t,!0);let n=K(t,`enabled`,7,!1),r=K(t,`trapFocus`,7,!1),i=K(t,`loop`,7,!1),a=K(t,`onCloseAutoFocus`,7,$),o=K(t,`onOpenAutoFocus`,7,$),s=K(t,`focusScope`,7),c=K(t,`ref`,7),l=Dw.use({enabled:Q(()=>n()),trap:Q(()=>r()),loop:i(),onCloseAutoFocus:Q(()=>a()),onOpenAutoFocus:Q(()=>o()),ref:c()});var u={get enabled(){return n()},set enabled(e=!1){n(e),k()},get trapFocus(){return r()},set trapFocus(e=!1){r(e),k()},get loop(){return i()},set loop(e=!1){i(e),k()},get onCloseAutoFocus(){return a()},set onCloseAutoFocus(e=$){a(e),k()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(e=$){o(e),k()},get focusScope(){return s()},set focusScope(e){s(e),k()},get ref(){return c()},set ref(e){c(e),k()}},d=z();return H(P(d),()=>s()??w,()=>({props:l.props})),B(e,d),O(u)}q(Ow,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsTextSelectionLayers??=new Map;var kw=class e{static create(t){return new e(t)}opts;domContext;#e=$;constructor(e){this.opts=e,this.domContext=new wx(e.ref);let t=$;Xb(()=>this.opts.enabled.current,e=>(e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#t()),()=>{t(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Pb(ii(this.domContext.getDocument(),`pointerdown`,this.#n),ii(this.domContext.getDocument(),`pointerup`,sb(this.#r,this.opts.onPointerUp.current)))}#n=e=>{let t=this.opts.ref.current,n=e.target;!nS(t)||!nS(n)||!this.opts.enabled.current||!Nw(this)||!bx(t,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=jw(t,this.domContext.getDocument().body)))};#r=()=>{this.#e(),this.#e=$}},Aw=e=>e.style.userSelect||e.style.webkitUserSelect;function jw(e,t){let n=Aw(t),r=Aw(e);return Mw(t,`none`),Mw(e,`text`),()=>{Mw(t,n),Mw(e,r)}}function Mw(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Nw(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function Pw(e,t){D(t,!0);let n=K(t,`preventOverflowTextSelection`,7,!0),r=K(t,`onPointerDown`,7,$),i=K(t,`onPointerUp`,7,$),a=K(t,`id`,7),o=K(t,`children`,7),s=K(t,`enabled`,7),c=K(t,`ref`,7);kw.create({id:Q(()=>a()),onPointerDown:Q(()=>r()),onPointerUp:Q(()=>i()),enabled:Q(()=>s()&&n()),ref:c()});var l={get preventOverflowTextSelection(){return n()},set preventOverflowTextSelection(e=!0){n(e),k()},get onPointerDown(){return r()},set onPointerDown(e=$){r(e),k()},get onPointerUp(){return i()},set onPointerUp(e=$){i(e),k()},get id(){return a()},set id(e){a(e),k()},get children(){return o()},set children(e){o(e),k()},get enabled(){return s()},set enabled(e){s(e),k()},get ref(){return c()},set ref(e){c(e),k()}},u=z();return H(P(u),()=>o()??w),B(e,u),O(l)}q(Pw,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:`open`}),globalThis.bitsIdCounter??={current:0};function Fw(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Iw=class{#e;#t=0;#n=j();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),M(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,L(this.#n)===void 0&&(this.#r=rr(()=>{M(this.#n,this.#e(...e),!0)})),er(()=>()=>{this.#i()}),L(this.#n)}},Lw=new B_,Rw=j(null),zw=null,Bw=null,Vw=!1,Hw=Q(()=>{for(let e of Lw.values())if(e)return!0;return!1}),Uw=null,Ww=new Iw(()=>{function e(){document.body.setAttribute(`style`,L(Rw)??``),document.body.style.removeProperty(`--scrollbar-width`),eS&&zw?.(),M(Rw,null)}function t(){Bw!==null&&(window.clearTimeout(Bw),Bw=null)}function n(e,n){t(),Vw=!0,Uw=Date.now();let r=Uw,i=()=>{Bw=null,Uw===r&&(Kw(Lw)?Vw=!1:(Vw=!1,n()))},a=e===null?24:e;Bw=window.setTimeout(i,a)}function r(){L(Rw)===null&&Lw.size===0&&!Vw&&M(Rw,document.body.getAttribute(`style`),!0)}return Xb(()=>Hw.current,()=>{if(!Hw.current)return;r(),Vw=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,eS&&(zw=ii(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),dx(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),cx(()=>()=>{zw?.()}),{get lockMap(){return Lw},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),Gw=class{#e=Fw();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=Ww.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=Q(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),cx(()=>{if(this.#r.lockMap.delete(this.#e),Kw(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function Kw(e){for(let[t,n]of e)if(n)return!0;return!1}function qw(e,t){D(t,!0);let n=K(t,`preventScroll`,7,!0),r=K(t,`restoreScrollDelay`,7,null);return n()&&new Gw(n(),()=>r()),O({get preventScroll(){return n()},set preventScroll(e=!0){n(e),k()},get restoreScrollDelay(){return r()},set restoreScrollDelay(e=null){r(e),k()}})}q(qw,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});var Jw=R(`<div><!></div>`);function Yw(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`forceMount`,7,!1),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`ref`,15,null),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`forceMount`,`child`,`children`,`ref`]),l=yS.create({id:Q(()=>r()),ref:Q(()=>s(),e=>s(e))}),u=A(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),k()},get forceMount(){return i()},set forceMount(e=!1){i(e),k()},get child(){return a()},set child(e){a(e),k()},get children(){return o()},set children(e){o(e),k()},get ref(){return s()},set ref(e=null){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z(),n=P(t),r=e=>{var t=z(),n=P(t);{let e=A(()=>({props:Vb(L(u)),...l.snippetProps}));H(n,a,()=>L(e))}B(e,t)},i=e=>{var t=Jw();qa(t,e=>({...e}),[()=>Vb(L(u))]),H(N(t),()=>o()??w,()=>l.snippetProps),E(t),B(e,t)};U(n,e=>{a()?e(r):e(i,-1)}),B(e,t)};return U(p,e=>{(l.shouldRender||i())&&e(m)}),B(e,f),O(d)}q(Yw,{id:{},forceMount:{},child:{},children:{},ref:{}},[],[],{mode:`open`});var Xw=R(`<div><!></div>`);function Zw(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`]),c=_S.create({id:Q(()=>r()),ref:Q(()=>o(),e=>o(e))}),l=A(()=>Vb(s,c.props));var u={get id(){return r()},set id(e=dS(n)){r(e),k()},get children(){return i()},set children(e){i(e),k()},get child(){return a()},set child(e){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),a,()=>({props:L(l)})),B(e,t)},m=e=>{var t=Xw();qa(t,()=>({...L(l)})),H(N(t),()=>i()??w),E(t),B(e,t)};return U(f,e=>{a()?e(p):e(m,-1)}),B(e,d),O(u)}q(Zw,{id:{},children:{},child:{},ref:{}},[],[],{mode:`open`});function Qw(e,t){D(t,!0);let n=K(t,`children`,7),r=K(t,`defaultPortalTo`,7),i=K(t,`defaultLocale`,7);TS({defaultPortalTo:Q(()=>r()),defaultLocale:Q(()=>i())});var a={get children(){return n()},set children(e){n(e),k()},get defaultPortalTo(){return r()},set defaultPortalTo(e){r(e),k()},get defaultLocale(){return i()},set defaultLocale(e){i(e),k()}},o=z();return H(P(o),()=>n()??w),B(e,o),O(a)}q(Qw,{children:{},defaultPortalTo:{},defaultLocale:{}},[],[],{mode:`open`});var $w=R(`<input/>`),eT=R(`<input/>`);function tT(e,t){D(t,!0);let n=K(t,`value`,15),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`value`]),i=A(()=>Vb(r,{"aria-hidden":`true`,tabindex:-1,style:Hb}));var a={get value(){return n()},set value(e){n(e),k()}},o=z(),s=P(o),c=e=>{var t=$w();qa(t,()=>({...L(i),value:n()}),void 0,void 0,void 0,void 0,!0),B(e,t)},l=e=>{var t=eT();qa(t,()=>({...L(i)}),void 0,void 0,void 0,void 0,!0),Za(t,n),B(e,t)};return U(s,e=>{L(i).type===`checkbox`?e(c):e(l,-1)}),B(e,o),O(a)}q(tT,{value:{}},[],[],{mode:`open`});var nT=Nx({component:`collapsible`,parts:[`root`,`content`,`trigger`]}),rT=new Kb(`Collapsible.Root`),iT=class e{static create(t){return rT.set(new e(t))}opts;attachment;#e=j(null);get contentNode(){return L(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=j(void 0);get contentId(){return L(this.#t)}set contentId(e){M(this.#t,e,!0)}constructor(e){this.opts=e,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=Tx(this.opts.ref),this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#n=A(()=>({id:this.opts.id.current,"data-state":Ax(this.opts.open.current),"data-disabled":Ox(this.opts.disabled.current),[nT.root]:``,...this.attachment}));get props(){return L(this.#n)}set props(e){M(this.#n,e)}},aT=class e{static create(t){return new e(t,rT.get())}opts;root;attachment;#e=A(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return L(this.#e)}set present(e){M(this.#e,e)}#t;#n=j(!1);#r=j(0);#i=j(0);constructor(e,t){this.opts=e,this.root=t,M(this.#n,t.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=Tx(this.opts.ref,e=>this.root.contentNode=e),Xb.pre(()=>this.opts.id.current,e=>{this.root.contentId=e}),nr(()=>{let e=requestAnimationFrame(()=>{M(this.#n,!1)});return()=>{cancelAnimationFrame(e)}}),Xb.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([e,t])=>!e||!t?void 0:ii(e,`beforematch`,()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),Xb([()=>this.opts.ref.current,()=>this.present],([e])=>{e&&dx(()=>{if(!this.opts.ref.current)return;this.#t=this.#t||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();if(M(this.#i,t.height,!0),M(this.#r,t.width,!0),!L(this.#n)){let{animationName:t,transitionDuration:n}=this.#t;e.style.transitionDuration=n,e.style.animationName=t}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#a=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return L(this.#a)}set snippetProps(e){M(this.#a,e)}#o=A(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":L(this.#i)?`${L(this.#i)}px`:void 0,"--bits-collapsible-content-width":L(this.#r)?`${L(this.#r)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?`until-found`:void 0,"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),[nT.content]:``,...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return L(this.#o)}set props(e){M(this.#o,e)}},oT=class e{static create(t){return new e(t,rT.get())}opts;root;attachment;#e=A(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!L(this.#e)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){L(this.#e)||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.toggleOpen())}#t=A(()=>({id:this.opts.id.current,type:`button`,disabled:L(this.#e),"aria-controls":this.root.contentId,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(L(this.#e)),[nT.trigger]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},sT=R(`<div><!></div>`);function cT(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`open`,15,!1),c=K(t,`disabled`,7,!1),l=K(t,`onOpenChange`,7,$),u=K(t,`onOpenChangeComplete`,7,$),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`open`,`disabled`,`onOpenChange`,`onOpenChangeComplete`]),f=iT.create({open:Q(()=>s(),e=>{s(e),l()(e)}),disabled:Q(()=>c()),id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),onOpenChangeComplete:Q(()=>u())}),p=A(()=>Vb(d,f.props));var m={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get id(){return a()},set id(e=dS(n)){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get open(){return s()},set open(e=!1){s(e),k()},get disabled(){return c()},set disabled(e=!1){c(e),k()},get onOpenChange(){return l()},set onOpenChange(e=$){l(e),k()},get onOpenChangeComplete(){return u()},set onOpenChangeComplete(e=$){u(e),k()}},h=z(),g=P(h),_=e=>{var t=z();H(P(t),i,()=>({props:L(p)})),B(e,t)},v=e=>{var t=sT();qa(t,()=>({...L(p)})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(g,e=>{i()?e(_):e(v,-1)}),B(e,h),O(m)}q(cT,{children:{},child:{},id:{},ref:{},open:{},disabled:{},onOpenChange:{},onOpenChangeComplete:{}},[],[],{mode:`open`});var lT=R(`<div><!></div>`);function uT(e,t){let n=_i();D(t,!0);let r=K(t,`child`,7),i=K(t,`ref`,15,null),a=K(t,`forceMount`,7,!1),o=K(t,`hiddenUntilFound`,7,!1),s=K(t,`children`,7),c=K(t,`id`,23,()=>dS(n)),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`ref`,`forceMount`,`hiddenUntilFound`,`children`,`id`]),u=aT.create({id:Q(()=>c()),forceMount:Q(()=>a()),hiddenUntilFound:Q(()=>o()),ref:Q(()=>i(),e=>i(e))}),d=A(()=>Vb(l,u.props));var f={get child(){return r()},set child(e){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get forceMount(){return a()},set forceMount(e=!1){a(e),k()},get hiddenUntilFound(){return o()},set hiddenUntilFound(e=!1){o(e),k()},get children(){return s()},set children(e){s(e),k()},get id(){return c()},set id(e=dS(n)){c(e),k()}},p=z(),m=P(p),h=e=>{var t=z(),n=P(t);{let e=A(()=>({...u.snippetProps,props:L(d)}));H(n,r,()=>L(e))}B(e,t)},g=e=>{var t=lT();qa(t,()=>({...L(d)})),H(N(t),()=>s()??w),E(t),B(e,t)};return U(m,e=>{r()?e(h):e(g,-1)}),B(e,p),O(f)}q(uT,{child:{},ref:{},forceMount:{},hiddenUntilFound:{},children:{},id:{}},[],[],{mode:`open`});var dT=R(`<button><!></button>`);function fT(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`disabled`,7,!1),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`,`disabled`]),l=oT.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e)),disabled:Q(()=>s())}),u=A(()=>Vb(c,l.props));var d={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get id(){return o()},set id(e=dS(n)){o(e),k()},get disabled(){return s()},set disabled(e=!1){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z();H(P(t),i,()=>({props:L(u)})),B(e,t)},h=e=>{var t=dT();qa(t,()=>({...L(u)})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(p,e=>{i()?e(m):e(h,-1)}),B(e,f),O(d)}q(fT,{children:{},child:{},ref:{},id:{},disabled:{}},[],[],{mode:`open`});var pT=[`top`,`right`,`bottom`,`left`],mT=Math.min,hT=Math.max,gT=Math.round,_T=Math.floor,vT=e=>({x:e,y:e}),yT={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bT(e,t,n){return hT(e,mT(t,n))}function xT(e,t){return typeof e==`function`?e(t):e}function ST(e){return e.split(`-`)[0]}function CT(e){return e.split(`-`)[1]}function wT(e){return e===`x`?`y`:`x`}function TT(e){return e===`y`?`height`:`width`}function ET(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function DT(e){return wT(ET(e))}function OT(e,t,n){n===void 0&&(n=!1);let r=CT(e),i=DT(e),a=TT(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=LT(o)),[o,LT(o)]}function kT(e){let t=LT(e);return[AT(e),t,AT(t)]}function AT(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jT=[`left`,`right`],MT=[`right`,`left`],NT=[`top`,`bottom`],PT=[`bottom`,`top`];function FT(e,t,n){switch(e){case`top`:case`bottom`:return n?t?MT:jT:t?jT:MT;case`left`:case`right`:return t?NT:PT;default:return[]}}function IT(e,t,n,r){let i=CT(e),a=FT(ST(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(AT)))),a}function LT(e){let t=ST(e);return yT[t]+e.slice(t.length)}function RT(e){return{top:0,right:0,bottom:0,left:0,...e}}function zT(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:RT(e)}function BT(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function VT(e,t,n){let{reference:r,floating:i}=e,a=ET(t),o=DT(t),s=TT(o),c=ST(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(CT(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function HT(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xT(t,e),p=zT(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=BT(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=BT(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var UT=50,WT=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:HT},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=VT(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<UT&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=VT(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},GT=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xT(e,t)||{};if(l==null)return{};let d=zT(u),f={x:n,y:r},p=DT(i),m=TT(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let ee=b/2-x/2,te=C/2-h[m]/2-1,ne=mT(d[_],te),re=mT(d[v],te),ie=ne,w=C-h[m]-re,ae=C/2-h[m]/2+ee,oe=bT(ie,ae,w),se=!c.arrow&&CT(i)!=null&&ae!==oe&&a.reference[m]/2-(ae<ie?ne:re)-h[m]/2<0,ce=se?ae<ie?ae-ie:ae-w:0;return{[p]:f[p]+ce,data:{[p]:oe,centerOffset:ae-oe-ce,...se&&{alignmentOffset:ce}},reset:se}}}),KT=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xT(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ST(r),_=ET(o),v=ST(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[LT(o)]:kT(o)),x=p!==`none`;!d&&x&&b.push(...IT(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),ee=[],te=i.flip?.overflows||[];if(l&&ee.push(C[g]),u){let e=OT(r,a,y);ee.push(C[e[0]],C[e[1]])}if(te=[...te,{placement:r,overflows:ee}],!ee.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ET(t))||te.every(e=>ET(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:te},reset:{placement:t}};let n=te.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=te.filter(e=>{if(x){let t=ET(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function qT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JT(e){return pT.some(t=>e[t]>=0)}var YT=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=xT(e,t);switch(i){case`referenceHidden`:{let e=qT(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:JT(e)}}}case`escaped`:{let e=qT(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:JT(e)}}}default:return{}}}}},XT=new Set([`left`,`top`]);async function ZT(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ST(n),s=CT(n),c=ET(n)===`y`,l=XT.has(o)?-1:1,u=a&&c?-1:1,d=xT(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var QT=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ZT(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$T=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xT(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ET(ST(i)),p=wT(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=bT(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=bT(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},eE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=xT(e,t),u={x:n,y:r},d=ET(i),f=wT(d),p=u[f],m=u[d],h=xT(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=XT.has(ST(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},tE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=xT(e,t),u=await o.detectOverflow(t,l),d=ST(i),f=CT(i),p=ET(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=mT(h-u[g],v),x=mT(m-u[_],y),S=!t.middlewareData.shift,C=b,ee=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ee=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=hT(u.left,0),t=hT(u.right,0),n=hT(u.top,0),r=hT(u.bottom,0);p?ee=m-2*(e!==0||t!==0?e+t:hT(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:hT(u.top,u.bottom))}await c({...t,availableWidth:ee,availableHeight:C});let te=await o.getDimensions(s.floating);return m!==te.width||h!==te.height?{reset:{rects:!0}}:{}}}};function nE(){return typeof window<`u`}function rE(e){return oE(e)?(e.nodeName||``).toLowerCase():`#document`}function iE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aE(e){return((oE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oE(e){return nE()?e instanceof Node||e instanceof iE(e).Node:!1}function sE(e){return nE()?e instanceof Element||e instanceof iE(e).Element:!1}function cE(e){return nE()?e instanceof HTMLElement||e instanceof iE(e).HTMLElement:!1}function lE(e){return!nE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof iE(e).ShadowRoot}function uE(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=xE(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function dE(e){return/^(table|td|th)$/.test(rE(e))}function fE(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var pE=/transform|translate|scale|rotate|perspective|filter/,mE=/paint|layout|strict|content/,hE=e=>!!e&&e!==`none`,gE;function _E(e){let t=sE(e)?xE(e):e;return hE(t.transform)||hE(t.translate)||hE(t.scale)||hE(t.rotate)||hE(t.perspective)||!yE()&&(hE(t.backdropFilter)||hE(t.filter))||pE.test(t.willChange||``)||mE.test(t.contain||``)}function vE(e){let t=CE(e);for(;cE(t)&&!bE(t);){if(_E(t))return t;if(fE(t))return null;t=CE(t)}return null}function yE(){return gE??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),gE}function bE(e){return/^(html|body|#document)$/.test(rE(e))}function xE(e){return iE(e).getComputedStyle(e)}function SE(e){return sE(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function CE(e){if(rE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||lE(e)&&e.host||aE(e);return lE(t)?t.host:t}function wE(e){let t=CE(e);return bE(t)?e.ownerDocument?e.ownerDocument.body:e.body:cE(t)&&uE(t)?t:wE(t)}function TE(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=wE(e),i=r===e.ownerDocument?.body,a=iE(r);if(i){let e=EE(a);return t.concat(a,a.visualViewport||[],uE(r)?r:[],e&&n?TE(e):[])}else return t.concat(r,TE(r,[],n))}function EE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DE(e){let t=xE(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=cE(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=gT(n)!==a||gT(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function OE(e){return sE(e)?e:e.contextElement}function kE(e){let t=OE(e);if(!cE(t))return vT(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=DE(t),o=(a?gT(n.width):n.width)/r,s=(a?gT(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var AE=vT(0);function jE(e){let t=iE(e);return!yE()||!t.visualViewport?AE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ME(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==iE(e)?!1:t}function NE(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=OE(e),o=vT(1);t&&(r?sE(r)&&(o=kE(r)):o=kE(e));let s=ME(a,n,r)?jE(a):vT(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=iE(a),t=r&&sE(r)?iE(r):r,n=e,i=EE(n);for(;i&&r&&t!==n;){let e=kE(i),t=i.getBoundingClientRect(),r=xE(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=iE(i),i=EE(n)}}return BT({width:u,height:d,x:c,y:l})}function PE(e,t){let n=SE(e).scrollLeft;return t?t.left+n:NE(aE(e)).left+n}function FE(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-PE(e,n),y:n.top+t.scrollTop}}function IE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=aE(r),s=t?fE(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=vT(1),u=vT(0),d=cE(r);if((d||!d&&!a)&&((rE(r)!==`body`||uE(o))&&(c=SE(r)),d)){let e=NE(r);l=kE(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?FE(o,c):vT(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function LE(e){return Array.from(e.getClientRects())}function RE(e){let t=aE(e),n=SE(e),r=e.ownerDocument.body,i=hT(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=hT(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+PE(e),s=-n.scrollTop;return xE(r).direction===`rtl`&&(o+=hT(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var zE=25;function BE(e,t){let n=iE(e),r=aE(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=yE();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=PE(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=zE&&(a-=o)}else l<=zE&&(a+=l);return{width:a,height:o,x:s,y:c}}function VE(e,t){let n=NE(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cE(e)?kE(e):vT(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function HE(e,t,n){let r;if(t===`viewport`)r=BE(e,n);else if(t===`document`)r=RE(aE(e));else if(sE(t))r=VE(t,n);else{let n=jE(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return BT(r)}function UE(e,t){let n=CE(e);return n===t||!sE(n)||bE(n)?!1:xE(n).position===`fixed`||UE(n,t)}function WE(e,t){let n=t.get(e);if(n)return n;let r=TE(e,[],!1).filter(e=>sE(e)&&rE(e)!==`body`),i=null,a=xE(e).position===`fixed`,o=a?CE(e):e;for(;sE(o)&&!bE(o);){let t=xE(o),n=_E(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||uE(o)&&!n&&UE(e,o))?r=r.filter(e=>e!==o):i=t,o=CE(o)}return t.set(e,r),r}function GE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?fE(t)?[]:WE(t,this._c):[].concat(n),r],o=HE(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=HE(t,a[e],i);s=hT(n.top,s),c=mT(n.right,c),l=mT(n.bottom,l),u=hT(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function KE(e){let{width:t,height:n}=DE(e);return{width:t,height:n}}function qE(e,t,n){let r=cE(t),i=aE(t),a=n===`fixed`,o=NE(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=vT(0);function l(){c.x=PE(i)}if(r||!r&&!a)if((rE(t)!==`body`||uE(i))&&(s=SE(t)),r){let e=NE(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?FE(i,s):vT(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function JE(e){return xE(e).position===`static`}function YE(e,t){if(!cE(e)||xE(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return aE(e)===n&&(n=n.ownerDocument.body),n}function XE(e,t){let n=iE(e);if(fE(e))return n;if(!cE(e)){let t=CE(e);for(;t&&!bE(t);){if(sE(t)&&!JE(t))return t;t=CE(t)}return n}let r=YE(e,t);for(;r&&dE(r)&&JE(r);)r=YE(r,t);return r&&bE(r)&&JE(r)&&!_E(r)?n:r||vE(e)||n}var ZE=async function(e){let t=this.getOffsetParent||XE,n=this.getDimensions,r=await n(e.floating);return{reference:qE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QE(e){return xE(e).direction===`rtl`}var $E={convertOffsetParentRelativeRectToViewportRelativeRect:IE,getDocumentElement:aE,getClippingRect:GE,getOffsetParent:XE,getElementRects:ZE,getClientRects:LE,getDimensions:KE,getScale:kE,isElement:sE,isRTL:QE};function eD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tD(e,t){let n=null,r,i=aE(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=_T(d),h=_T(i.clientWidth-(u+f)),g=_T(i.clientHeight-(d+p)),_=_T(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:hT(0,mT(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!eD(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function nD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=OE(e),u=i||a?[...l?TE(l):[],...t?TE(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?tD(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?NE(e):null;c&&g();function g(){let t=NE(e);h&&!eD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rD=QT,iD=$T,aD=KT,oD=tE,sD=YT,cD=GT,lD=eE,uD=(e,t,n)=>{let r=new Map,i={platform:$E,...n},a={...i.platform,_c:r};return WT(e,t,{...i,platform:a})};function dD(e){return typeof e==`function`?e():e}function fD(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pD(e,t){let n=fD(e);return Math.round(t*n)/n}function mD(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function hD(e){let t=e.whileElementsMounted,n=A(()=>dD(e.open)??!0),r=A(()=>dD(e.middleware)),i=A(()=>dD(e.transform)??!0),a=A(()=>dD(e.placement)??`bottom`),o=A(()=>dD(e.strategy)??`absolute`),s=A(()=>dD(e.sideOffset)??0),c=A(()=>dD(e.alignOffset)??0),l=e.reference,u=j(0),d=j(0),f=ab(null),p=j(On(L(o))),m=j(On(L(a))),h=j(On({})),g=j(!1),_=!1,v=A(()=>{let e=f.current?pD(f.current,L(u)):L(u),t=f.current?pD(f.current,L(d)):L(d);return L(i)?{position:L(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&fD(f.current)>=1.5&&{willChange:`transform`}}:{position:L(p),left:`${e}px`,top:`${t}px`}}),y;function b(){l.current===null||f.current===null||uD(l.current,f.current,{middleware:L(r),placement:L(a),strategy:L(o)}).then(e=>{let t=l.current;if(gD(t)){M(h,{...L(h),hide:{...L(h).hide,referenceHidden:!0}},!0);return}if(!L(n)&&L(u)!==0&&L(d)!==0){let t=Math.max(Math.abs(L(s)),Math.abs(L(c)),15);if(e.x<=t&&e.y<=t)return}M(u,e.x,!0),M(d,e.y,!0),M(p,e.strategy,!0),M(m,e.placement,!0),M(h,e.middlewareData,!0),M(g,!0)})}function x(){typeof y==`function`&&(y(),y=void 0)}function S(){if(x(),t===void 0){b();return}L(n)&&(l.current===null||f.current===null||(y=t(l.current,f.current,b)))}function C(){!L(n)&&f.current===null&&M(g,!1)}function ee(){return[L(r),L(a),L(o),L(s),L(c),L(n)]}return er(()=>{t===void 0&&L(n)&&b()}),er(S),er(()=>{if(t!==void 0){if(ee(),!L(n)){_=!1;return}if(!L(g)){_=!1;return}if(!_){_=!0;return}b()}}),er(C),er(()=>x),{floating:f,reference:l,get strategy(){return L(p)},get placement(){return L(m)},get middlewareData(){return L(h)},get isPositioned(){return L(g)},get floatingStyles(){return L(v)},get update(){return b}}}function gD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var _D={top:`bottom`,right:`left`,bottom:`top`,left:`right`},vD=new Kb(`Floating.Root`),yD=new Kb(`Floating.Content`),bD=new Kb(`Floating.Root`),xD=class e{static create(t=!1){return t?bD.set(new e):vD.set(new e)}anchorNode=ab(null);customAnchorNode=ab(null);triggerNode=ab(null);constructor(){er(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},SD=class e{static create(t,n=!1){return n?yD.set(new e(t,bD.get())):yD.set(new e(t,vD.get()))}opts;root;contentRef=ab(null);wrapperRef=ab(null);arrowRef=ab(null);contentAttachment=Tx(this.contentRef);wrapperAttachment=Tx(this.wrapperRef);arrowAttachment=Tx(this.arrowRef);arrowId=ab(Fw());#e=A(()=>{if(typeof this.opts.style==`string`)return Nb(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new tx(()=>this.arrowRef.current??void 0);#r=A(()=>this.#n?.width??0);#i=A(()=>this.#n?.height??0);#a=A(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=A(()=>L(this.#o).length>0);get hasExplicitBoundaries(){return L(this.#s)}set hasExplicitBoundaries(e){M(this.#s,e)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:L(this.#o).filter(oS),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return L(this.#c)}set detectOverflowOptions(e){M(this.#c,e)}#l=j(void 0);#u=j(void 0);#d=j(void 0);#f=j(void 0);#p=A(()=>[rD({mainAxis:this.opts.sideOffset.current+L(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&iD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?lD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&aD({...this.detectOverflowOptions}),oD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;M(this.#l,t,!0),M(this.#u,n,!0),M(this.#d,r,!0),M(this.#f,i,!0)}}),this.arrowRef.current&&cD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),wD({arrowWidth:L(this.#r),arrowHeight:L(this.#i)}),this.opts.hideWhenDetached.current&&sD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean));get middleware(){return L(this.#p)}set middleware(e){M(this.#p,e)}floating;#m=A(()=>ED(this.floating.placement));get placedSide(){return L(this.#m)}set placedSide(e){M(this.#m,e)}#h=A(()=>DD(this.floating.placement));get placedAlign(){return L(this.#h)}set placedAlign(e){M(this.#h,e)}#g=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return L(this.#g)}set arrowX(e){M(this.#g,e)}#_=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return L(this.#_)}set arrowY(e){M(this.#_,e)}#v=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return L(this.#v)}set cannotCenterArrow(e){M(this.#v,e)}#y=j();get contentZIndex(){return L(this.#y)}set contentZIndex(e){M(this.#y,e,!0)}#b=A(()=>_D[this.placedSide]);get arrowBaseSide(){return L(this.#b)}set arrowBaseSide(e){M(this.#b,e)}#x=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${L(this.#l)}px`,"--bits-floating-available-height":`${L(this.#u)}px`,"--bits-floating-anchor-width":`${L(this.#d)}px`,"--bits-floating-anchor-height":`${L(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...L(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return L(this.#x)}set wrapperProps(e){M(this.#x,e)}#S=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Rb({...L(this.#e)}),...this.contentAttachment}));get props(){return L(this.#S)}set props(e){M(this.#S,e)}#C=A(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return L(this.#C)}set arrowStyle(e){M(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),Xb(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=hD({strategy:()=>this.opts.strategy.current,placement:()=>L(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>nD(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),er(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Xb(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=Sx(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),er(()=>{this.floating.floating.current=this.wrapperRef.current})}},CD=class e{static create(t,n=!1){return n?new e(t,bD.get()):new e(t,vD.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,e.virtualEl&&e.virtualEl.current?t.triggerNode=nb(e.virtualEl.current):t.triggerNode=e.ref}};function wD(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=TD(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function TD(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function ED(e){return TD(e)[0]}function DD(e){return TD(e)[1]}function OD(e,t){D(t,!0);let n=K(t,`children`,7),r=K(t,`tooltip`,7,!1);xD.create(r());var i={get children(){return n()},set children(e){n(e),k()},get tooltip(){return r()},set tooltip(e=!1){r(e),k()}},a=z();return H(P(a),()=>n()??w),B(e,a),O(i)}q(OD,{children:{},tooltip:{}},[],[],{mode:`open`});var kD=[Fx,Vx,Ix,Kx,Rx,zx,`Alt`,Ux,Bx,`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`],AD=[Px,Gx,Hx],jD=[Lx,Wx,`End`],MD=[...AD,...jD],ND=Nx({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),PD=new Kb(`Select.Root | Combobox.Root`);new Kb(`Select.Group | Combobox.Group`);var FD=new Kb(`Select.Content | Combobox.Content`),ID=class{opts;#e=j(!1);get touchedInput(){return L(this.#e)}set touchedInput(e){M(this.#e,e,!0)}#t=j(null);get inputNode(){return L(this.#t)}set inputNode(e){M(this.#t,e,!0)}#n=j(null);get contentNode(){return L(this.#n)}set contentNode(e){M(this.#n,e,!0)}contentPresence;#r=j(null);get viewportNode(){return L(this.#r)}set viewportNode(e){M(this.#r,e,!0)}#i=j(null);get triggerNode(){return L(this.#i)}set triggerNode(e){M(this.#i,e,!0)}#a=j(``);get valueId(){return L(this.#a)}set valueId(e){M(this.#a,e,!0)}#o=j(null);get highlightedNode(){return L(this.#o)}set highlightedNode(e){M(this.#o,e,!0)}#s=A(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return L(this.#s)}set highlightedValue(e){M(this.#s,e)}#c=A(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return L(this.#c)}set highlightedId(e){M(this.#c,e)}#l=A(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return L(this.#l)}set highlightedLabel(e){M(this.#l,e)}isUsingKeyboard=!1;isCombobox=!1;domContext=new wx(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),nr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>ND.getAttr(e,this.isCombobox?`combobox`:void 0)},LD=class extends ID{opts;isMulti=!1;#e=A(()=>this.opts.value.current!==``);get hasValue(){return L(this.#e)}set hasValue(e){M(this.#e,e)}#t=A(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return L(this.#t)}set currentLabel(e){M(this.#t,e)}#n=A(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return L(this.#n)}set candidateLabels(e){M(this.#n,e)}#r=A(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return L(this.#r)}set dataTypeaheadEnabled(e){M(this.#r,e)}constructor(e){super(e),this.opts=e,er(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Xb(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.opts.inputValue.current=t)}setInitialHighlightedNode(){dx(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==``){let e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},RD=class extends ID{opts;isMulti=!0;#e=A(()=>this.opts.value.current.length>0);get hasValue(){return L(this.#e)}set hasValue(e){M(this.#e,e)}constructor(e){super(e),this.opts=e,er(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Xb(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=t}setInitialHighlightedNode(){dx(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==``){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},zD=class{static create(e){let{type:t,...n}=e,r=t===`single`?new LD(n):new RD(n);return PD.set(r)}},BD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref,e=>this.root.inputNode=e),this.root.domContext=new wx(e.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),Xb([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([e,t],[n])=>{t&&(Array.isArray(e)&&Array.isArray(n)?e.length===0&&n.length!==0&&(this.root.opts.inputValue.current=``):e===``&&n!==``&&(this.root.opts.inputValue.current=``))})}onkeydown(e){if(this.root.isUsingKeyboard=!0,e.key!==`Escape`){if((e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(kD.includes(e.key)||e.key===`Tab`||e.key===`Backspace`&&this.root.opts.inputValue.current===``||(this.root.handleOpen(),this.root.hasValue))return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if(e.key===`Enter`&&!e.isComposing){e.preventDefault();let t=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t&&this.root.handleClose()}if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),MD.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=MC(t,r,i):e.key===`ArrowUp`?a=NC(t,r,i):e.key===`PageDown`?a=PC(t,r,10,i):e.key===`PageUp`?a=FC(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}kD.includes(e.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(e){this.root.opts.inputValue.current=e.currentTarget.value,this.root.setHighlightedToFirstCandidate()}#e=A(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":`list`,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr(`input`)]:``,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},VD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this)}onkeydown(e){this.root.domContext&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}onpointerdown(e){this.root.opts.disabled.current||!this.root.domContext||(e.preventDefault(),this.root.domContext.getActiveElement()!==this.root.inputNode&&this.root.inputNode?.focus(),this.root.toggleMenu())}#e=A(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"data-state":Ax(this.root.opts.open.current),"data-disabled":Ox(this.root.opts.disabled.current),[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},HD=class e{static create(t){return FD.set(new e(t,PD.get()))}opts;root;attachment;#e=j(!1);get isPositioned(){return L(this.#e)}set isPositioned(e){M(this.#e,e,!0)}domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref,e=>this.root.contentNode=e),this.domContext=new wx(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),cx(()=>{this.root.contentNode=null,this.isPositioned=!1}),Xb(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}#t=A(()=>mD(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return L(this.#n)}set snippetProps(e){M(this.#n,e)}#r=A(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":Ax(this.root.opts.open.current),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...L(this.#t)},onpointermove:this.onpointermove,...this.attachment}));get props(){return L(this.#r)}set props(e){M(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}},UD=class e{static create(t){return new e(t,PD.get())}opts;root;attachment;#e=A(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return L(this.#e)}set isSelected(e){M(this.#e,e)}#t=A(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return L(this.#t)}set isHighlighted(e){M(this.#t,e)}prevHighlighted=new nx(()=>this.isHighlighted);#n=j(!1);get mounted(){return L(this.#n)}set mounted(e){M(this.#n,e,!0)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(e.ref),Xb([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Xb(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;let e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}#r=A(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return L(this.#r)}set snippetProps(e){M(this.#r,e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType===`touch`&&!eS){ii(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=A(()=>({id:this.opts.id.current,role:`option`,"aria-selected":this.root.includesItem(this.opts.value.current)?`true`:void 0,"data-value":this.opts.value.current,"data-disabled":Ox(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?``:void 0,"data-selected":this.root.includesItem(this.opts.value.current)?``:void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return L(this.#i)}set props(e){M(this.#i,e)}},WD=class e{static create(t){return new e(t,PD.get())}opts;root;#e=A(()=>this.root.opts.name.current!==``);get shouldRender(){return L(this.#e)}set shouldRender(e){M(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=A(()=>({disabled:kx(this.root.opts.disabled.current),required:kx(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},GD=class e{static create(t){return new e(t,FD.get())}opts;content;root;attachment;#e=j(0);get prevScrollTop(){return L(this.#e)}set prevScrollTop(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Tx(e.ref,e=>{this.root.viewportNode=e})}#t=A(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},KD=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=$;#e=j(!1);get mounted(){return L(this.#e)}set mounted(e){M(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Tx(e.ref),Xb([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),er(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null)return;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=A(()=>({id:this.opts.id.current,"aria-hidden":Dx(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},qD=class e{static create(t){return new e(new KD(t,FD.get()))}scrollButtonState;content;root;#e=j(!1);get canScrollDown(){return L(this.#e)}set canScrollDown(e){M(this.#e,e,!0)}scrollIntoViewTimer=null;constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Xb([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),ii(this.root.viewportNode,`scroll`,()=>this.handleScroll())}),Xb([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),Xb(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=ux(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;!e||!t||(e.scrollTop+=t.offsetHeight)};#t=A(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}},JD=class e{static create(t){return new e(new KD(t,FD.get()))}scrollButtonState;content;root;#e=j(!1);get canScrollUp(){return L(this.#e)}set canScrollUp(e){M(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Xb([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),ii(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=A(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}};function YD(e,t){D(t,!0);let n=K(t,`value`,15),r=K(t,`autocomplete`,7),i=WD.create({value:Q(()=>n())});var a={get value(){return n()},set value(e){n(e),k()},get autocomplete(){return r()},set autocomplete(e){r(e),k()}},o=z(),s=P(o),c=e=>{tT(e,po(()=>i.props,{get autocomplete(){return r()},get value(){return n()},set value(e){n(e)}}))};return U(s,e=>{i.shouldRender&&e(c)}),B(e,o),O(a)}q(YD,{value:{},autocomplete:{}},[],[],{mode:`open`});var XD=R(`<!> <!>`,1);function ZD(e,t){D(t,!0);let n=K(t,`value`,15),r=K(t,`onValueChange`,7,$),i=K(t,`name`,7,``),a=K(t,`disabled`,7,!1),o=K(t,`type`,7),s=K(t,`open`,15,!1),c=K(t,`onOpenChange`,7,$),l=K(t,`onOpenChangeComplete`,7,$),u=K(t,`loop`,7,!1),d=K(t,`scrollAlignment`,7,`nearest`),f=K(t,`required`,7,!1),p=K(t,`items`,23,()=>[]),m=K(t,`allowDeselect`,7,!0),h=K(t,`inputValue`,7,``),g=K(t,`children`,7);n()===void 0&&n(o()===`single`?``:[]),Xb.pre(()=>n(),()=>{n()===void 0&&n(o()===`single`?``:[])});let _=zD.create({type:o(),value:Q(()=>n(),e=>{n(e),r()(e)}),disabled:Q(()=>a()),required:Q(()=>f()),open:Q(()=>s(),e=>{s(e),c()(e)}),loop:Q(()=>u()),scrollAlignment:Q(()=>d()),name:Q(()=>i()),isCombobox:!0,items:Q(()=>p()),allowDeselect:Q(()=>m()),inputValue:Q(()=>h(),e=>h(e)),onOpenChangeComplete:Q(()=>l())});var v={get value(){return n()},set value(e){n(e),k()},get onValueChange(){return r()},set onValueChange(e=$){r(e),k()},get name(){return i()},set name(e=``){i(e),k()},get disabled(){return a()},set disabled(e=!1){a(e),k()},get type(){return o()},set type(e){o(e),k()},get open(){return s()},set open(e=!1){s(e),k()},get onOpenChange(){return c()},set onOpenChange(e=$){c(e),k()},get onOpenChangeComplete(){return l()},set onOpenChangeComplete(e=$){l(e),k()},get loop(){return u()},set loop(e=!1){u(e),k()},get scrollAlignment(){return d()},set scrollAlignment(e=`nearest`){d(e),k()},get required(){return f()},set required(e=!1){f(e),k()},get items(){return p()},set items(e=[]){p(e),k()},get allowDeselect(){return m()},set allowDeselect(e=!0){m(e),k()},get inputValue(){return h()},set inputValue(e=``){h(e),k()},get children(){return g()},set children(e){g(e),k()}},y=XD(),b=P(y);OD(b,{children:(e,t)=>{var n=z();H(P(n),()=>g()??w),B(e,n)},$$slots:{default:!0}});var x=F(b,2),S=e=>{var t=z(),n=P(t),r=e=>{var t=z();Zi(P(t),16,()=>_.opts.value.current,e=>e,(e,t)=>{YD(e,{get value(){return t}})}),B(e,t)};U(n,e=>{_.opts.value.current.length&&e(r)}),B(e,t)},C=A(()=>Array.isArray(_.opts.value.current)),ee=e=>{YD(e,{get value(){return _.opts.value.current},set value(e){_.opts.value.current=e}})};return U(x,e=>{L(C)?e(S):e(ee,-1)}),B(e,y),O(v)}q(ZD,{value:{},onValueChange:{},name:{},disabled:{},type:{},open:{},onOpenChange:{},onOpenChangeComplete:{},loop:{},scrollAlignment:{},required:{},items:{},allowDeselect:{},inputValue:{},children:{}},[],[],{mode:`open`});function QD(e,t){D(t,!0);let n=K(t,`id`,7),r=K(t,`children`,7),i=K(t,`virtualEl`,7),a=K(t,`ref`,7),o=K(t,`tooltip`,7,!1);CD.create({id:Q(()=>n()),virtualEl:Q(()=>i()),ref:a()},o());var s={get id(){return n()},set id(e){n(e),k()},get children(){return r()},set children(e){r(e),k()},get virtualEl(){return i()},set virtualEl(e){i(e),k()},get ref(){return a()},set ref(e){a(e),k()},get tooltip(){return o()},set tooltip(e=!1){o(e),k()}},c=z();return H(P(c),()=>r()??w),B(e,c),O(s)}q(QD,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:`open`});function $D(e,t){D(t,!0);let n=K(t,`content`,7),r=K(t,`side`,7,`bottom`),i=K(t,`sideOffset`,7,0),a=K(t,`align`,7,`center`),o=K(t,`alignOffset`,7,0),s=K(t,`id`,7),c=K(t,`arrowPadding`,7,0),l=K(t,`avoidCollisions`,7,!0),u=K(t,`collisionBoundary`,23,()=>[]),d=K(t,`collisionPadding`,7,0),f=K(t,`hideWhenDetached`,7,!1),p=K(t,`onPlaced`,7,()=>{}),m=K(t,`sticky`,7,`partial`),h=K(t,`updatePositionStrategy`,7,`optimized`),g=K(t,`strategy`,7,`fixed`),_=K(t,`dir`,7,`ltr`),v=K(t,`style`,23,()=>({})),y=K(t,`wrapperId`,23,Fw),b=K(t,`customAnchor`,7,null),x=K(t,`enabled`,7),S=K(t,`tooltip`,7,!1),C=SD.create({side:Q(()=>r()),sideOffset:Q(()=>i()),align:Q(()=>a()),alignOffset:Q(()=>o()),id:Q(()=>s()),arrowPadding:Q(()=>c()),avoidCollisions:Q(()=>l()),collisionBoundary:Q(()=>u()),collisionPadding:Q(()=>d()),hideWhenDetached:Q(()=>f()),onPlaced:Q(()=>p()),sticky:Q(()=>m()),updatePositionStrategy:Q(()=>h()),strategy:Q(()=>g()),dir:Q(()=>_()),style:Q(()=>v()),enabled:Q(()=>x()),wrapperId:Q(()=>y()),customAnchor:Q(()=>b())},S()),ee=A(()=>Vb(C.wrapperProps,{style:{pointerEvents:`auto`}}));var te={get content(){return n()},set content(e){n(e),k()},get side(){return r()},set side(e=`bottom`){r(e),k()},get sideOffset(){return i()},set sideOffset(e=0){i(e),k()},get align(){return a()},set align(e=`center`){a(e),k()},get alignOffset(){return o()},set alignOffset(e=0){o(e),k()},get id(){return s()},set id(e){s(e),k()},get arrowPadding(){return c()},set arrowPadding(e=0){c(e),k()},get avoidCollisions(){return l()},set avoidCollisions(e=!0){l(e),k()},get collisionBoundary(){return u()},set collisionBoundary(e=[]){u(e),k()},get collisionPadding(){return d()},set collisionPadding(e=0){d(e),k()},get hideWhenDetached(){return f()},set hideWhenDetached(e=!1){f(e),k()},get onPlaced(){return p()},set onPlaced(e=()=>{}){p(e),k()},get sticky(){return m()},set sticky(e=`partial`){m(e),k()},get updatePositionStrategy(){return h()},set updatePositionStrategy(e=`optimized`){h(e),k()},get strategy(){return g()},set strategy(e=`fixed`){g(e),k()},get dir(){return _()},set dir(e=`ltr`){_(e),k()},get style(){return v()},set style(e={}){v(e),k()},get wrapperId(){return y()},set wrapperId(e=Fw()){y(e),k()},get customAnchor(){return b()},set customAnchor(e=null){b(e),k()},get enabled(){return x()},set enabled(e){x(e),k()},get tooltip(){return S()},set tooltip(e=!1){S(e),k()}},ne=z();return H(P(ne),()=>n()??w,()=>({props:C.props,wrapperProps:L(ee)})),B(e,ne),O(te)}q($D,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:`open`});function eO(e,t){D(t,!0);let n=K(t,`content`,7),r=K(t,`onPlaced`,7);Li(()=>{r()?.()});var i={get content(){return n()},set content(e){n(e),k()},get onPlaced(){return r()},set onPlaced(e){r(e),k()}},a=z();return H(P(a),()=>n()??w,()=>({props:{},wrapperProps:{}})),B(e,a),O(i)}q(eO,{content:{},onPlaced:{}},[],[],{mode:`open`});var tO=R(`<input/>`);function nO(e,t){D(t,!0);let n=K(t,`id`,23,Fw),r=K(t,`ref`,15,null),i=K(t,`child`,7),a=K(t,`defaultValue`,7),o=K(t,`clearOnDeselect`,7,!1),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`defaultValue`,`clearOnDeselect`]),c=BD.create({id:Q(()=>n()),ref:Q(()=>r(),e=>r(e)),clearOnDeselect:Q(()=>o())});a()&&(c.root.opts.inputValue.current=a());let l=A(()=>Vb(s,c.props,{value:c.root.opts.inputValue.current}));var u={get id(){return n()},set id(e=Fw()){n(e),k()},get ref(){return r()},set ref(e=null){r(e),k()},get child(){return i()},set child(e){i(e),k()},get defaultValue(){return a()},set defaultValue(e){a(e),k()},get clearOnDeselect(){return o()},set clearOnDeselect(e=!1){o(e),k()}},d=z();return W(P(d),()=>QD,(e,t)=>{t(e,{get id(){return n()},get ref(){return c.opts.ref},children:(e,t)=>{var n=z(),r=P(n),a=e=>{var t=z();H(P(t),i,()=>({props:L(l)})),B(e,t)},o=e=>{var t=tO();qa(t,()=>({...L(l)}),void 0,void 0,void 0,void 0,!0),B(e,t)};U(r,e=>{i()?e(a):e(o,-1)}),B(e,n)},$$slots:{default:!0}})}),B(e,d),O(u)}q(nO,{id:{},ref:{},child:{},defaultValue:{},clearOnDeselect:{}},[],[],{mode:`open`});var rO=R(`<button><!></button>`);function iO(e,t){D(t,!0);let n=K(t,`id`,23,Fw),r=K(t,`ref`,15,null),i=K(t,`child`,7),a=K(t,`children`,7),o=K(t,`type`,7,`button`),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`type`]),c=VD.create({id:Q(()=>n()),ref:Q(()=>r(),e=>r(e))}),l=A(()=>Vb(s,c.props,{type:o()}));var u={get id(){return n()},set id(e=Fw()){n(e),k()},get ref(){return r()},set ref(e=null){r(e),k()},get child(){return i()},set child(e){i(e),k()},get children(){return a()},set children(e){a(e),k()},get type(){return o()},set type(e=`button`){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),i,()=>({props:L(l)})),B(e,t)},m=e=>{var t=rO();qa(t,()=>({...L(l)})),H(N(t),()=>a()??w),E(t),B(e,t)};return U(f,e=>{i()?e(p):e(m,-1)}),B(e,d),O(u)}q(iO,{id:{},ref:{},child:{},children:{},type:{}},[],[],{mode:`open`});function aO(e,t){D(t,!0);let n=K(t,`content`,7),r=K(t,`isStatic`,7,!1),i=K(t,`onPlaced`,7),a=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`content`,`isStatic`,`onPlaced`]);var o={get content(){return n()},set content(e){n(e),k()},get isStatic(){return r()},set isStatic(e=!1){r(e),k()},get onPlaced(){return i()},set onPlaced(e){i(e),k()}},s=z(),c=P(s),l=e=>{eO(e,{get content(){return n()},get onPlaced(){return i()}})},u=e=>{$D(e,po({get content(){return n()},get onPlaced(){return i()}},()=>a))};return U(c,e=>{r()?e(l):e(u,-1)}),B(e,s),O(o)}q(aO,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:`open`});var oO=R(`<!> <!>`,1);function sO(e,t){D(t,!0);let n=K(t,`popper`,7),r=K(t,`onEscapeKeydown`,7),i=K(t,`escapeKeydownBehavior`,7),a=K(t,`preventOverflowTextSelection`,7),o=K(t,`id`,7),s=K(t,`onPointerDown`,7),c=K(t,`onPointerUp`,7),l=K(t,`side`,7),u=K(t,`sideOffset`,7),d=K(t,`align`,7),f=K(t,`alignOffset`,7),p=K(t,`arrowPadding`,7),m=K(t,`avoidCollisions`,7),h=K(t,`collisionBoundary`,7),g=K(t,`collisionPadding`,7),_=K(t,`sticky`,7),v=K(t,`hideWhenDetached`,7),y=K(t,`updatePositionStrategy`,7),b=K(t,`strategy`,7),x=K(t,`dir`,7),S=K(t,`preventScroll`,7),C=K(t,`wrapperId`,7),ee=K(t,`style`,7),te=K(t,`onPlaced`,7),ne=K(t,`onInteractOutside`,7),re=K(t,`onCloseAutoFocus`,7),ie=K(t,`onOpenAutoFocus`,7),ae=K(t,`onFocusOutside`,7),oe=K(t,`interactOutsideBehavior`,7,`close`),se=K(t,`loop`,7),ce=K(t,`trapFocus`,7,!0),le=K(t,`isValidEvent`,7,()=>!1),ue=K(t,`customAnchor`,7,null),de=K(t,`isStatic`,7,!1),fe=K(t,`enabled`,7),pe=K(t,`ref`,7),me=K(t,`tooltip`,7,!1),he=K(t,`contentPointerEvents`,7,`auto`),ge=uo(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`));return aO(e,{get isStatic(){return de()},get id(){return o()},get side(){return l()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return m()},get collisionBoundary(){return h()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return v()},get updatePositionStrategy(){return y()},get strategy(){return b()},get dir(){return x()},get wrapperId(){return C()},get style(){return ee()},get onPlaced(){return te()},get customAnchor(){return ue()},get enabled(){return fe()},get tooltip(){return me()},content:(e,l)=>{let u=()=>l?.().props,d=()=>l?.().wrapperProps;var f=oO(),p=P(f),m=e=>{qw(e,{get preventScroll(){return S()}})},h=e=>{qw(e,{get preventScroll(){return S()}})};U(p,e=>{t.forceMount&&fe()?e(m):t.forceMount||e(h,1)}),Ow(F(p,2),{get onOpenAutoFocus(){return ie()},get onCloseAutoFocus(){return re()},get loop(){return se()},get enabled(){return fe()},get trapFocus(){return ce()},get forceMount(){return t.forceMount},get ref(){return pe()},focusScope:(e,t)=>{let l=()=>t?.().props;Tw(e,{get onEscapeKeydown(){return r()},get escapeKeydownBehavior(){return i()},get enabled(){return fe()},get ref(){return pe()},children:(e,t)=>{Sw(e,{get id(){return o()},get onInteractOutside(){return ne()},get onFocusOutside(){return ae()},get interactOutsideBehavior(){return oe()},get isValidEvent(){return le()},get enabled(){return fe()},get ref(){return pe()},children:(e,t)=>{let r=()=>t?.().props;Pw(e,{get id(){return o()},get preventOverflowTextSelection(){return a()},get onPointerDown(){return s()},get onPointerUp(){return c()},get enabled(){return fe()},get ref(){return pe()},children:(e,t)=>{var i=z(),a=P(i);{let e=A(()=>({props:Vb(ge,u(),r(),l(),{style:{pointerEvents:he()}}),wrapperProps:d()}));H(a,()=>n()??w,()=>L(e))}B(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),B(e,f)},$$slots:{content:!0}}),O({get popper(){return n()},set popper(e){n(e),k()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e){r(e),k()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(e){i(e),k()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(e){a(e),k()},get id(){return o()},set id(e){o(e),k()},get onPointerDown(){return s()},set onPointerDown(e){s(e),k()},get onPointerUp(){return c()},set onPointerUp(e){c(e),k()},get side(){return l()},set side(e){l(e),k()},get sideOffset(){return u()},set sideOffset(e){u(e),k()},get align(){return d()},set align(e){d(e),k()},get alignOffset(){return f()},set alignOffset(e){f(e),k()},get arrowPadding(){return p()},set arrowPadding(e){p(e),k()},get avoidCollisions(){return m()},set avoidCollisions(e){m(e),k()},get collisionBoundary(){return h()},set collisionBoundary(e){h(e),k()},get collisionPadding(){return g()},set collisionPadding(e){g(e),k()},get sticky(){return _()},set sticky(e){_(e),k()},get hideWhenDetached(){return v()},set hideWhenDetached(e){v(e),k()},get updatePositionStrategy(){return y()},set updatePositionStrategy(e){y(e),k()},get strategy(){return b()},set strategy(e){b(e),k()},get dir(){return x()},set dir(e){x(e),k()},get preventScroll(){return S()},set preventScroll(e){S(e),k()},get wrapperId(){return C()},set wrapperId(e){C(e),k()},get style(){return ee()},set style(e){ee(e),k()},get onPlaced(){return te()},set onPlaced(e){te(e),k()},get onInteractOutside(){return ne()},set onInteractOutside(e){ne(e),k()},get onCloseAutoFocus(){return re()},set onCloseAutoFocus(e){re(e),k()},get onOpenAutoFocus(){return ie()},set onOpenAutoFocus(e){ie(e),k()},get onFocusOutside(){return ae()},set onFocusOutside(e){ae(e),k()},get interactOutsideBehavior(){return oe()},set interactOutsideBehavior(e=`close`){oe(e),k()},get loop(){return se()},set loop(e){se(e),k()},get trapFocus(){return ce()},set trapFocus(e=!0){ce(e),k()},get isValidEvent(){return le()},set isValidEvent(e=()=>!1){le(e),k()},get customAnchor(){return ue()},set customAnchor(e=null){ue(e),k()},get isStatic(){return de()},set isStatic(e=!1){de(e),k()},get enabled(){return fe()},set enabled(e){fe(e),k()},get ref(){return pe()},set ref(e){pe(e),k()},get tooltip(){return me()},set tooltip(e=!1){me(e),k()},get contentPointerEvents(){return he()},set contentPointerEvents(e=`auto`){he(e),k()}})}q(sO,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:`open`});function cO(e,t){D(t,!0);let n=K(t,`popper`,7),r=K(t,`open`,7),i=K(t,`onEscapeKeydown`,7),a=K(t,`escapeKeydownBehavior`,7),o=K(t,`preventOverflowTextSelection`,7),s=K(t,`id`,7),c=K(t,`onPointerDown`,7),l=K(t,`onPointerUp`,7),u=K(t,`side`,7),d=K(t,`sideOffset`,7),f=K(t,`align`,7),p=K(t,`alignOffset`,7),m=K(t,`arrowPadding`,7),h=K(t,`avoidCollisions`,7),g=K(t,`collisionBoundary`,7),_=K(t,`collisionPadding`,7),v=K(t,`sticky`,7),y=K(t,`hideWhenDetached`,7),b=K(t,`updatePositionStrategy`,7),x=K(t,`strategy`,7),S=K(t,`dir`,7),C=K(t,`preventScroll`,7),ee=K(t,`wrapperId`,7),te=K(t,`style`,7),ne=K(t,`onPlaced`,7),re=K(t,`onInteractOutside`,7),ie=K(t,`onCloseAutoFocus`,7),w=K(t,`onOpenAutoFocus`,7),ae=K(t,`onFocusOutside`,7),oe=K(t,`interactOutsideBehavior`,7,`close`),se=K(t,`loop`,7),ce=K(t,`trapFocus`,7,!0),le=K(t,`isValidEvent`,7,()=>!1),ue=K(t,`customAnchor`,7,null),de=K(t,`isStatic`,7,!1),fe=K(t,`ref`,7),pe=K(t,`shouldRender`,7),me=uo(t,`$$slots.$$events.$$legacy.$$host.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));var he={get popper(){return n()},set popper(e){n(e),k()},get open(){return r()},set open(e){r(e),k()},get onEscapeKeydown(){return i()},set onEscapeKeydown(e){i(e),k()},get escapeKeydownBehavior(){return a()},set escapeKeydownBehavior(e){a(e),k()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(e){o(e),k()},get id(){return s()},set id(e){s(e),k()},get onPointerDown(){return c()},set onPointerDown(e){c(e),k()},get onPointerUp(){return l()},set onPointerUp(e){l(e),k()},get side(){return u()},set side(e){u(e),k()},get sideOffset(){return d()},set sideOffset(e){d(e),k()},get align(){return f()},set align(e){f(e),k()},get alignOffset(){return p()},set alignOffset(e){p(e),k()},get arrowPadding(){return m()},set arrowPadding(e){m(e),k()},get avoidCollisions(){return h()},set avoidCollisions(e){h(e),k()},get collisionBoundary(){return g()},set collisionBoundary(e){g(e),k()},get collisionPadding(){return _()},set collisionPadding(e){_(e),k()},get sticky(){return v()},set sticky(e){v(e),k()},get hideWhenDetached(){return y()},set hideWhenDetached(e){y(e),k()},get updatePositionStrategy(){return b()},set updatePositionStrategy(e){b(e),k()},get strategy(){return x()},set strategy(e){x(e),k()},get dir(){return S()},set dir(e){S(e),k()},get preventScroll(){return C()},set preventScroll(e){C(e),k()},get wrapperId(){return ee()},set wrapperId(e){ee(e),k()},get style(){return te()},set style(e){te(e),k()},get onPlaced(){return ne()},set onPlaced(e){ne(e),k()},get onInteractOutside(){return re()},set onInteractOutside(e){re(e),k()},get onCloseAutoFocus(){return ie()},set onCloseAutoFocus(e){ie(e),k()},get onOpenAutoFocus(){return w()},set onOpenAutoFocus(e){w(e),k()},get onFocusOutside(){return ae()},set onFocusOutside(e){ae(e),k()},get interactOutsideBehavior(){return oe()},set interactOutsideBehavior(e=`close`){oe(e),k()},get loop(){return se()},set loop(e){se(e),k()},get trapFocus(){return ce()},set trapFocus(e=!0){ce(e),k()},get isValidEvent(){return le()},set isValidEvent(e=()=>!1){le(e),k()},get customAnchor(){return ue()},set customAnchor(e=null){ue(e),k()},get isStatic(){return de()},set isStatic(e=!1){de(e),k()},get ref(){return fe()},set ref(e){fe(e),k()},get shouldRender(){return pe()},set shouldRender(e){pe(e),k()}},ge=z(),_e=P(ge),ve=e=>{sO(e,po({get popper(){return n()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return a()},get preventOverflowTextSelection(){return o()},get id(){return s()},get onPointerDown(){return c()},get onPointerUp(){return l()},get side(){return u()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return m()},get avoidCollisions(){return h()},get collisionBoundary(){return g()},get collisionPadding(){return _()},get sticky(){return v()},get hideWhenDetached(){return y()},get updatePositionStrategy(){return b()},get strategy(){return x()},get dir(){return S()},get preventScroll(){return C()},get wrapperId(){return ee()},get style(){return te()},get onPlaced(){return ne()},get customAnchor(){return ue()},get isStatic(){return de()},get enabled(){return r()},get onInteractOutside(){return re()},get onCloseAutoFocus(){return ie()},get onOpenAutoFocus(){return w()},get interactOutsideBehavior(){return oe()},get loop(){return se()},get trapFocus(){return ce()},get isValidEvent(){return le()},get onFocusOutside(){return ae()},forceMount:!1,get ref(){return fe()}},()=>me))};return U(_e,e=>{pe()&&e(ve)}),B(e,ge),O(he)}q(cO,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:`open`});function lO(e,t){D(t,!0);let n=K(t,`popper`,7),r=K(t,`onEscapeKeydown`,7),i=K(t,`escapeKeydownBehavior`,7),a=K(t,`preventOverflowTextSelection`,7),o=K(t,`id`,7),s=K(t,`onPointerDown`,7),c=K(t,`onPointerUp`,7),l=K(t,`side`,7),u=K(t,`sideOffset`,7),d=K(t,`align`,7),f=K(t,`alignOffset`,7),p=K(t,`arrowPadding`,7),m=K(t,`avoidCollisions`,7),h=K(t,`collisionBoundary`,7),g=K(t,`collisionPadding`,7),_=K(t,`sticky`,7),v=K(t,`hideWhenDetached`,7),y=K(t,`updatePositionStrategy`,7),b=K(t,`strategy`,7),x=K(t,`dir`,7),S=K(t,`preventScroll`,7),C=K(t,`wrapperId`,7),ee=K(t,`style`,7),te=K(t,`onPlaced`,7),ne=K(t,`onInteractOutside`,7),re=K(t,`onCloseAutoFocus`,7),ie=K(t,`onOpenAutoFocus`,7),w=K(t,`onFocusOutside`,7),ae=K(t,`interactOutsideBehavior`,7,`close`),oe=K(t,`loop`,7),se=K(t,`trapFocus`,7,!0),ce=K(t,`isValidEvent`,7,()=>!1),le=K(t,`customAnchor`,7,null),ue=K(t,`isStatic`,7,!1),de=K(t,`enabled`,7),fe=uo(t,`$$slots.$$events.$$legacy.$$host.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));return sO(e,po({get popper(){return n()},get onEscapeKeydown(){return r()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return s()},get onPointerUp(){return c()},get side(){return l()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return m()},get collisionBoundary(){return h()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return v()},get updatePositionStrategy(){return y()},get strategy(){return b()},get dir(){return x()},get preventScroll(){return S()},get wrapperId(){return C()},get style(){return ee()},get onPlaced(){return te()},get customAnchor(){return le()},get isStatic(){return ue()},get enabled(){return de()},get onInteractOutside(){return ne()},get onCloseAutoFocus(){return re()},get onOpenAutoFocus(){return ie()},get interactOutsideBehavior(){return ae()},get loop(){return oe()},get trapFocus(){return se()},get isValidEvent(){return ce()},get onFocusOutside(){return w()}},()=>fe,{forceMount:!0})),O({get popper(){return n()},set popper(e){n(e),k()},get onEscapeKeydown(){return r()},set onEscapeKeydown(e){r(e),k()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(e){i(e),k()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(e){a(e),k()},get id(){return o()},set id(e){o(e),k()},get onPointerDown(){return s()},set onPointerDown(e){s(e),k()},get onPointerUp(){return c()},set onPointerUp(e){c(e),k()},get side(){return l()},set side(e){l(e),k()},get sideOffset(){return u()},set sideOffset(e){u(e),k()},get align(){return d()},set align(e){d(e),k()},get alignOffset(){return f()},set alignOffset(e){f(e),k()},get arrowPadding(){return p()},set arrowPadding(e){p(e),k()},get avoidCollisions(){return m()},set avoidCollisions(e){m(e),k()},get collisionBoundary(){return h()},set collisionBoundary(e){h(e),k()},get collisionPadding(){return g()},set collisionPadding(e){g(e),k()},get sticky(){return _()},set sticky(e){_(e),k()},get hideWhenDetached(){return v()},set hideWhenDetached(e){v(e),k()},get updatePositionStrategy(){return y()},set updatePositionStrategy(e){y(e),k()},get strategy(){return b()},set strategy(e){b(e),k()},get dir(){return x()},set dir(e){x(e),k()},get preventScroll(){return S()},set preventScroll(e){S(e),k()},get wrapperId(){return C()},set wrapperId(e){C(e),k()},get style(){return ee()},set style(e){ee(e),k()},get onPlaced(){return te()},set onPlaced(e){te(e),k()},get onInteractOutside(){return ne()},set onInteractOutside(e){ne(e),k()},get onCloseAutoFocus(){return re()},set onCloseAutoFocus(e){re(e),k()},get onOpenAutoFocus(){return ie()},set onOpenAutoFocus(e){ie(e),k()},get onFocusOutside(){return w()},set onFocusOutside(e){w(e),k()},get interactOutsideBehavior(){return ae()},set interactOutsideBehavior(e=`close`){ae(e),k()},get loop(){return oe()},set loop(e){oe(e),k()},get trapFocus(){return se()},set trapFocus(e=!0){se(e),k()},get isValidEvent(){return ce()},set isValidEvent(e=()=>!1){ce(e),k()},get customAnchor(){return le()},set customAnchor(e=null){le(e),k()},get isStatic(){return ue()},set isStatic(e=!1){ue(e),k()},get enabled(){return de()},set enabled(e){de(e),k()}})}q(lO,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:`open`});var uO=R(`<div><div><!></div></div>`),dO=R(`<div><div><!></div></div>`);function fO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`forceMount`,7,!1),o=K(t,`side`,7,`bottom`),s=K(t,`onInteractOutside`,7,$),c=K(t,`onEscapeKeydown`,7,$),l=K(t,`children`,7),u=K(t,`child`,7),d=K(t,`preventScroll`,7,!1),f=K(t,`style`,7),p=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),m=HD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),onInteractOutside:Q(()=>s()),onEscapeKeydown:Q(()=>c())}),h=A(()=>Vb(p,m.props));var g={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get forceMount(){return a()},set forceMount(e=!1){a(e),k()},get side(){return o()},set side(e=`bottom`){o(e),k()},get onInteractOutside(){return s()},set onInteractOutside(e=$){s(e),k()},get onEscapeKeydown(){return c()},set onEscapeKeydown(e=$){c(e),k()},get children(){return l()},set children(e){l(e),k()},get child(){return u()},set child(e){u(e),k()},get preventScroll(){return d()},set preventScroll(e=!1){d(e),k()},get style(){return f()},set style(e){f(e),k()}},_=z(),v=P(_),y=e=>{lO(e,po(()=>L(h),()=>m.popperProps,{get ref(){return m.opts.ref},get side(){return o()},get enabled(){return m.root.opts.open.current},get id(){return r()},get preventScroll(){return d()},forceMount:!0,get shouldRender(){return m.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,i=A(()=>Vb(n(),{style:m.props.style},{style:f()}));var a=z(),o=P(a),s=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(i),wrapperProps:r(),...m.snippetProps}));H(n,u,()=>L(e))}B(e,t)},c=e=>{var t=uO();qa(t,()=>({...r()}));var n=N(t);qa(n,()=>({...L(i)})),H(N(n),()=>l()??w),E(n),E(t),B(e,t)};U(o,e=>{u()?e(s):e(c,-1)}),B(e,a)},$$slots:{popper:!0}}))},b=e=>{cO(e,po(()=>L(h),()=>m.popperProps,{get ref(){return m.opts.ref},get side(){return o()},get open(){return m.root.opts.open.current},get id(){return r()},get preventScroll(){return d()},forceMount:!1,get shouldRender(){return m.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,i=A(()=>Vb(n(),{style:m.props.style},{style:f()}));var a=z(),o=P(a),s=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(i),wrapperProps:r(),...m.snippetProps}));H(n,u,()=>L(e))}B(e,t)},c=e=>{var t=dO();qa(t,()=>({...r()}));var n=N(t);qa(n,()=>({...L(i)})),H(N(n),()=>l()??w),E(n),E(t),B(e,t)};U(o,e=>{u()?e(s):e(c,-1)}),B(e,a)},$$slots:{popper:!0}}))};return U(v,e=>{a()?e(y):a()||e(b,1)}),B(e,_),O(g)}q(fO,{id:{},ref:{},forceMount:{},side:{},onInteractOutside:{},onEscapeKeydown:{},children:{},child:{},preventScroll:{},style:{}},[],[],{mode:`open`});function pO(e,t){D(t,!0);let n=K(t,`mounted`,15,!1),r=K(t,`onMountedChange`,7,$);return lx(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),O({get mounted(){return n()},set mounted(e=!1){n(e),k()},get onMountedChange(){return r()},set onMountedChange(e=$){r(e),k()}})}q(pO,{mounted:{},onMountedChange:{}},[],[],{mode:`open`});var mO=R(`<div><!></div>`),hO=R(`<!> <!>`,1);function gO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`value`,7),o=K(t,`label`,23,a),s=K(t,`disabled`,7,!1),c=K(t,`children`,7),l=K(t,`child`,7),u=K(t,`onHighlight`,7,$),d=K(t,`onUnhighlight`,7,$),f=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),p=UD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),value:Q(()=>a()),disabled:Q(()=>s()),label:Q(()=>o()),onHighlight:Q(()=>u()),onUnhighlight:Q(()=>d())}),m=A(()=>Vb(f,p.props));var h={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get value(){return a()},set value(e){a(e),k()},get label(){return o()},set label(e=a){o(e),k()},get disabled(){return s()},set disabled(e=!1){s(e),k()},get children(){return c()},set children(e){c(e),k()},get child(){return l()},set child(e){l(e),k()},get onHighlight(){return u()},set onHighlight(e=$){u(e),k()},get onUnhighlight(){return d()},set onUnhighlight(e=$){d(e),k()}},g=hO(),_=P(g),v=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(m),...p.snippetProps}));H(n,l,()=>L(e))}B(e,t)},y=e=>{var t=mO();qa(t,()=>({...L(m)})),H(N(t),()=>c()??w,()=>p.snippetProps),E(t),B(e,t)};return U(_,e=>{l()?e(v):e(y,-1)}),pO(F(_,2),{get mounted(){return p.mounted},set mounted(e){p.mounted=e}}),B(e,g),O(h)}q(gO,{id:{},ref:{},value:{},label:{},disabled:{},children:{},child:{},onHighlight:{},onUnhighlight:{}},[],[],{mode:`open`});var _O=R(`<div><!></div>`),vO={hash:`svelte-5vjl6o`,code:`
|
|
561
|
+
/* Hide scrollbars cross browser and enable momentum scroll for touch devices */[data-select-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport] {scrollbar-width:none !important;-ms-overflow-style:none !important;-webkit-overflow-scrolling:touch !important;}[data-combobox-viewport]::-webkit-scrollbar {display:none !important;}[data-select-viewport]::-webkit-scrollbar {display:none !important;}`};function yO(e,t){let n=_i();D(t,!0),_a(e,vO);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`children`,7),o=K(t,`child`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`children`,`child`]),c=GD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),l=A(()=>Vb(s,c.props));var u={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get children(){return a()},set children(e){a(e),k()},get child(){return o()},set child(e){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),o,()=>({props:L(l)})),B(e,t)},m=e=>{var t=_O();qa(t,()=>({...L(l)})),H(N(t),()=>a()??w),E(t),B(e,t)};return U(f,e=>{o()?e(p):e(m,-1)}),B(e,d),O(u)}q(yO,{id:{},ref:{},children:{},child:{}},[],[],{mode:`open`});var bO=R(`<div><!></div>`),xO=R(`<!> <!>`,1);function SO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`delay`,7,()=>50),o=K(t,`child`,7),s=K(t,`children`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),l=qD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),delay:Q(()=>a())}),u=A(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get delay(){return a()},set delay(e=()=>50){a(e),k()},get child(){return o()},set child(e){o(e),k()},get children(){return s()},set children(e){s(e),k()}},f=z(),p=P(f),m=e=>{var t=xO(),n=P(t);pO(n,{get mounted(){return l.scrollButtonState.mounted},set mounted(e){l.scrollButtonState.mounted=e}});var r=F(n,2),i=e=>{var t=z();H(P(t),o,()=>({props:c})),B(e,t)},a=e=>{var t=bO();qa(t,()=>({...L(u)})),H(N(t),()=>s()??w),E(t),B(e,t)};U(r,e=>{o()?e(i):e(a,-1)}),B(e,t)};return U(p,e=>{l.canScrollDown&&e(m)}),B(e,f),O(d)}q(SO,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var CO=R(`<div><!></div>`),wO=R(`<!> <!>`,1);function TO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`delay`,7,()=>50),o=K(t,`child`,7),s=K(t,`children`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`delay`,`child`,`children`]),l=JD.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),delay:Q(()=>a())}),u=A(()=>Vb(c,l.props));var d={get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get delay(){return a()},set delay(e=()=>50){a(e),k()},get child(){return o()},set child(e){o(e),k()},get children(){return s()},set children(e){s(e),k()}},f=z(),p=P(f),m=e=>{var t=wO(),n=P(t);pO(n,{get mounted(){return l.scrollButtonState.mounted},set mounted(e){l.scrollButtonState.mounted=e}});var r=F(n,2),i=e=>{var t=z();H(P(t),o,()=>({props:c})),B(e,t)},a=e=>{var t=CO();qa(t,()=>({...L(u)})),H(N(t),()=>s()??w),E(t),B(e,t)};U(r,e=>{o()?e(i):e(a,-1)}),B(e,t)};return U(p,e=>{l.canScrollUp&&e(m)}),B(e,f),O(d)}q(TO,{id:{},ref:{},delay:{},child:{},children:{}},[],[],{mode:`open`});var EO=R(`<div><!></div>`);function DO(e,t){let n=_i();D(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`disabled`,7,!1),c=K(t,`onSelect`,7,$),l=K(t,`closeOnSelect`,7,!0),u=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`disabled`,`onSelect`,`closeOnSelect`]),d=cw.create({id:Q(()=>o()),disabled:Q(()=>s()),onSelect:Q(()=>c()),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>l())}),f=A(()=>Vb(u,d.props));var p={get child(){return r()},set child(e){r(e),k()},get children(){return i()},set children(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get id(){return o()},set id(e=dS(n)){o(e),k()},get disabled(){return s()},set disabled(e=!1){s(e),k()},get onSelect(){return c()},set onSelect(e=$){c(e),k()},get closeOnSelect(){return l()},set closeOnSelect(e=!0){l(e),k()}},m=z(),h=P(m),g=e=>{var t=z();H(P(t),r,()=>({props:L(f)})),B(e,t)},_=e=>{var t=EO();qa(t,()=>({...L(f)})),H(N(t),()=>i()??w),E(t),B(e,t)};return U(h,e=>{r()?e(g):e(_,-1)}),B(e,m),O(p)}q(DO,{child:{},children:{},ref:{},id:{},disabled:{},onSelect:{},closeOnSelect:{}},[],[],{mode:`open`});var OO=R(`<div><!></div>`);function kO(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),c=uw.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e))}),l=A(()=>Vb(s,c.props));var u={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get id(){return o()},set id(e=dS(n)){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),i,()=>({props:L(l)})),B(e,t)},m=e=>{var t=OO();qa(t,()=>({...L(l)})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(f,e=>{i()?e(p):e(m,-1)}),B(e,d),O(u)}q(kO,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var AO=R(`<div><!></div>`);function jO(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`id`]),c=dw.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e))}),l=A(()=>Vb(s,c.props));var u={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get id(){return o()},set id(e=dS(n)){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),i,()=>({props:L(l)})),B(e,t)},m=e=>{var t=AO();qa(t,()=>({...L(l)})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(f,e=>{i()?e(p):e(m,-1)}),B(e,d),O(u)}q(jO,{children:{},child:{},ref:{},id:{}},[],[],{mode:`open`});var MO=R(`<div><!></div>`);function NO(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`ref`,15,null),o=K(t,`value`,7),s=K(t,`onSelect`,7,$),c=K(t,`id`,23,()=>dS(n)),l=K(t,`disabled`,7,!1),u=K(t,`closeOnSelect`,7,!0),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`ref`,`value`,`onSelect`,`id`,`disabled`,`closeOnSelect`]),f=mw.create({value:Q(()=>o()),id:Q(()=>c()),disabled:Q(()=>l()),onSelect:Q(()=>p),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>u())});function p(e){s()(e),!e.defaultPrevented&&f.selectValue()}let m=A(()=>Vb(d,f.props));var h={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get value(){return o()},set value(e){o(e),k()},get onSelect(){return s()},set onSelect(e=$){s(e),k()},get id(){return c()},set id(e=dS(n)){c(e),k()},get disabled(){return l()},set disabled(e=!1){l(e),k()},get closeOnSelect(){return u()},set closeOnSelect(e=!0){u(e),k()}},g=z(),_=P(g),v=e=>{var t=z();H(P(t),i,()=>({props:L(m),checked:f.isChecked})),B(e,t)},y=e=>{var t=MO();qa(t,()=>({...L(m)})),H(N(t),()=>r()??w,()=>({checked:f.isChecked})),E(t),B(e,t)};return U(_,e=>{i()?e(v):e(y,-1)}),B(e,g),O(h)}q(NO,{children:{},child:{},ref:{},value:{},onSelect:{},id:{},disabled:{},closeOnSelect:{}},[],[],{mode:`open`});var PO=R(`<div><!></div>`);function FO(e,t){let n=_i();D(t,!0);let r=K(t,`ref`,15,null),i=K(t,`id`,23,()=>dS(n)),a=K(t,`child`,7),o=K(t,`children`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`ref`,`id`,`child`,`children`]),c=fw.create({id:Q(()=>i()),ref:Q(()=>r(),e=>r(e))}),l=A(()=>Vb(s,c.props));var u={get ref(){return r()},set ref(e=null){r(e),k()},get id(){return i()},set id(e=dS(n)){i(e),k()},get child(){return a()},set child(e){a(e),k()},get children(){return o()},set children(e){o(e),k()}},d=z(),f=P(d),p=e=>{var t=z();H(P(t),a,()=>({props:L(l)})),B(e,t)},m=e=>{var t=PO();qa(t,()=>({...L(l)})),H(N(t),()=>o()??w),E(t),B(e,t)};return U(f,e=>{a()?e(p):e(m,-1)}),B(e,d),O(u)}q(FO,{ref:{},id:{},child:{},children:{}},[],[],{mode:`open`});var IO=R(`<div><!></div>`);function LO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`value`,15,``),c=K(t,`onValueChange`,7,$),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),u=pw.create({value:Q(()=>s(),e=>{s(e),c()(e)}),ref:Q(()=>o(),e=>o(e)),id:Q(()=>r())}),d=A(()=>Vb(l,u.props));var f={get id(){return r()},set id(e=dS(n)){r(e),k()},get children(){return i()},set children(e){i(e),k()},get child(){return a()},set child(e){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get value(){return s()},set value(e=``){s(e),k()},get onValueChange(){return c()},set onValueChange(e=$){c(e),k()}},p=z(),m=P(p),h=e=>{var t=z();H(P(t),a,()=>({props:L(d)})),B(e,t)},g=e=>{var t=IO();qa(t,()=>({...L(d)})),H(N(t),()=>i()??w),E(t),B(e,t)};return U(m,e=>{a()?e(h):e(g,-1)}),B(e,p),O(f)}q(LO,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});var RO=R(`<div><!></div>`);function zO(e,t){let n=_i();D(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`checked`,15,!1),s=K(t,`id`,23,()=>dS(n)),c=K(t,`onCheckedChange`,7,$),l=K(t,`disabled`,7,!1),u=K(t,`onSelect`,7,$),d=K(t,`closeOnSelect`,7,!0),f=K(t,`indeterminate`,15,!1),p=K(t,`onIndeterminateChange`,7,$),m=K(t,`value`,7,``),h=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`checked`,`id`,`onCheckedChange`,`disabled`,`onSelect`,`closeOnSelect`,`indeterminate`,`onIndeterminateChange`,`value`]),g=tw.getOr(null);g&&m()&&(g.opts.value.current.includes(m())?o(!0):o(!1)),Xb.pre(()=>m(),()=>{g&&m()&&(g.opts.value.current.includes(m())?o(!0):o(!1))});let _=lw.create({checked:Q(()=>o(),e=>{e!==o()&&(o(e),c()(e))}),id:Q(()=>s()),disabled:Q(()=>l()),onSelect:Q(()=>v),ref:Q(()=>a(),e=>a(e)),closeOnSelect:Q(()=>d()),indeterminate:Q(()=>f(),e=>{e!==f()&&(f(e),p()(e))}),value:Q(()=>m())},g);function v(e){u()(e),!e.defaultPrevented&&_.toggleChecked()}let y=A(()=>Vb(h,_.props));var b={get child(){return r()},set child(e){r(e),k()},get children(){return i()},set children(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get checked(){return o()},set checked(e=!1){o(e),k()},get id(){return s()},set id(e=dS(n)){s(e),k()},get onCheckedChange(){return c()},set onCheckedChange(e=$){c(e),k()},get disabled(){return l()},set disabled(e=!1){l(e),k()},get onSelect(){return u()},set onSelect(e=$){u(e),k()},get closeOnSelect(){return d()},set closeOnSelect(e=!0){d(e),k()},get indeterminate(){return f()},set indeterminate(e=!1){f(e),k()},get onIndeterminateChange(){return p()},set onIndeterminateChange(e=$){p(e),k()},get value(){return m()},set value(e=``){m(e),k()}},x=z(),S=P(x),C=e=>{var t=z();H(P(t),r,()=>({checked:o(),indeterminate:f(),props:L(y)})),B(e,t)},ee=e=>{var t=RO();qa(t,()=>({...L(y)})),H(N(t),()=>i()??w,()=>({checked:o(),indeterminate:f()})),E(t),B(e,t)};return U(S,e=>{r()?e(C):e(ee,-1)}),B(e,x),O(b)}q(zO,{child:{},children:{},ref:{},checked:{},id:{},onCheckedChange:{},disabled:{},onSelect:{},closeOnSelect:{},indeterminate:{},onIndeterminateChange:{},value:{}},[],[],{mode:`open`});var BO=R(`<div><!></div>`);function VO(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`value`,31,()=>On([])),c=K(t,`onValueChange`,7,$),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`value`,`onValueChange`]),u=gw.create({value:Q(()=>ct(s()),e=>{s(ct(e)),c()(e)}),onValueChange:Q(()=>c()),ref:Q(()=>o(),e=>o(e)),id:Q(()=>r())}),d=A(()=>Vb(l,u.props));var f={get id(){return r()},set id(e=dS(n)){r(e),k()},get children(){return i()},set children(e){i(e),k()},get child(){return a()},set child(e){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get value(){return s()},set value(e=[]){s(e),k()},get onValueChange(){return c()},set onValueChange(e=$){c(e),k()}},p=z(),m=P(p),h=e=>{var t=z();H(P(t),a,()=>({props:L(d)})),B(e,t)},g=e=>{var t=BO();qa(t,()=>({...L(d)})),H(N(t),()=>i()??w),E(t),B(e,t)};return U(m,e=>{a()?e(h):e(g,-1)}),B(e,p),O(f)}q(VO,{id:{},children:{},child:{},ref:{},value:{},onValueChange:{}},[],[],{mode:`open`});function HO(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function UO(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function WO(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var GO=class{#e;#t;#n;#r=null;#i=null;#a=[];#o=null;#s=null;#c=null;#l(){this.#s!==null&&(cancelAnimationFrame(this.#s),this.#s=null)}#u(){this.#l(),this.#s=requestAnimationFrame(()=>{this.#s=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){this.#n!==null&&(this.#d(),this.#c=window.setTimeout(()=>{this.#c=null,!(!this.#r||!this.#i)&&(this.#m(),this.#e.onPointerExit())},this.#n))}constructor(e){this.#e=e,this.#t=e.buffer??1;let t=e.transitIntentTimeout;this.#n=typeof t==`number`&&t>0?t:null,Xb([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){this.#o=null,this.#m();return}return this.#o&&this.#o!==e&&this.#m(),this.#o=e,[ii(xx(e),`pointermove`,n=>{this.#p([n.clientX,n.clientY],e,t)}),ii(e,`pointerleave`,e=>{let n=e.relatedTarget;if(rS(n)&&t.contains(n))return;let r=this.#e.ignoredTargets?.()??[];rS(n)&&r.some(e=>e===n||e.contains(n))||(this.#a=rS(n)&&r.length>0?r.filter(e=>n.contains(e)):[],this.#r=[e.clientX,e.clientY],this.#i=`content`,this.#u())}),ii(e,`pointerenter`,()=>{this.#m()}),ii(t,`pointerenter`,()=>{this.#m()}),ii(t,`pointerleave`,t=>{let n=t.relatedTarget;rS(n)&&e.contains(n)||(this.#r=[t.clientX,t.clientY],this.#i=`trigger`,this.#u())})].reduce((e,t)=>()=>{e(),t()},()=>{})})}#p(e,t,n){if(!this.#r||!this.#i)return;this.#l(),this.#f();let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(this.#i===`content`&&UO(e,i)){this.#m();return}if(this.#i===`trigger`&&UO(e,r)){this.#m();return}if(this.#i===`content`&&this.#a.length>0)for(let t of this.#a){let n=t.getBoundingClientRect();if(UO(e,n))return;let i=WO(r,n),a=this.#h(r,n,i);if(a&&HO(e,a))return}let a=WO(r,i),o=this.#h(r,i,a);if(o&&HO(e,o))return;let s=this.#i===`content`?i:r;HO(e,this.#g(this.#r,s,a,this.#i))||(this.#m(),this.#e.onPointerExit())}#m(){this.#r=null,this.#i=null,this.#a=[],this.#l(),this.#d()}#h(e,t,n){let r=this.#t;switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}#g(e,t,n,r){let i=this.#t*4,[a,o]=e;switch(r===`trigger`?this.#_(n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#_(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}},KO=Nx({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),qO=new Kb(`Popover.Root`),JO=class e{static create(t){return qO.set(new e(t))}opts;#e=j(null);get contentNode(){return L(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=j(null);get triggerNode(){return L(this.#t)}set triggerNode(e){M(this.#t,e,!0)}#n=j(null);get overlayNode(){return L(this.#n)}set overlayNode(e){M(this.#n,e,!0)}overlayPresence;#r=j(!1);get openedViaHover(){return L(this.#r)}set openedViaHover(e){M(this.#r,e,!0)}#i=j(!1);get hasInteractedWithContent(){return L(this.#i)}set hasInteractedWithContent(e){M(this.#i,e,!0)}#a=j(!1);get hoverCooldown(){return L(this.#a)}set hoverCooldown(e){M(this.#a,e,!0)}#o=j(0);get closeDelay(){return L(this.#o)}set closeDelay(e){M(this.#o,e,!0)}#s=null;#c=null;constructor(e){this.opts=e,this.contentPresence=new uS({ref:Q(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new uS({ref:Q(()=>this.overlayNode),open:this.opts.open}),Xb(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#l())})}setDomContext(e){this.#c=e}#l(){this.#s!==null&&this.#c&&(this.#c.clearTimeout(this.#s),this.#s=null)}toggleOpen(){this.#l(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#l(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#l(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#l(),this.closeDelay<=0?this.opts.open.current=!1:this.#c&&(this.#s=this.#c.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#s=null},this.closeDelay))))}cancelDelayedClose(){this.#l()}markInteraction(){this.hasInteractedWithContent=!0,this.#l()}},YO=class e{static create(t){return new e(t,qO.get())}opts;root;attachment;domContext;#e=null;#t=null;#n=j(!1);constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new wx(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Xb(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}#r(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#a(){this.#r(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||aS(e)||(M(this.#n,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},t)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(aS(e)||(M(this.#n,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#a(),L(this.#n)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}L(this.#n)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#a(),this.root.toggleOpen())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#s=A(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":Ex(this.root.opts.open.current),"data-state":Ax(this.root.opts.open.current),"aria-controls":this.#o(),[KO.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return L(this.#s)}set props(e){M(this.#s,e)}},XO=class e{static create(t){return new e(t,qO.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Tx(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new GO({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;rS(t)&&CC(t)&&this.root.markInteraction()}onpointerenter(e){aS(e)||this.root.cancelDelayedClose()}onpointerleave(e){aS(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!rS(e.target))return;let t=e.target.closest(KO.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(rS(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=A(()=>({open:this.root.opts.open.current}));get snippetProps(){return L(this.#e)}set snippetProps(e){M(this.#e,e)}#t=A(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Ax(this.root.opts.open.current),[KO.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return L(this.#t)}set props(e){M(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}},ZO=R(`<div><div><!></div></div>`),QO=R(`<div><div><!></div></div>`);function $O(e,t){let n=_i();D(t,!0);let r=K(t,`child`,7),i=K(t,`children`,7),a=K(t,`ref`,15,null),o=K(t,`id`,23,()=>dS(n)),s=K(t,`forceMount`,7,!1),c=K(t,`onOpenAutoFocus`,7,$),l=K(t,`onCloseAutoFocus`,7,$),u=K(t,`onEscapeKeydown`,7,$),d=K(t,`onInteractOutside`,7,$),f=K(t,`trapFocus`,7,!0),p=K(t,`preventScroll`,7,!1),m=K(t,`customAnchor`,7,null),h=K(t,`style`,7),g=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),_=XO.create({id:Q(()=>o()),ref:Q(()=>a(),e=>a(e)),onInteractOutside:Q(()=>d()),onEscapeKeydown:Q(()=>u()),customAnchor:Q(()=>m())}),v=A(()=>Vb(g,_.props)),y=A(()=>f()&&_.shouldTrapFocus);function b(e){_.shouldTrapFocus||e.preventDefault(),c()(e)}var x={get child(){return r()},set child(e){r(e),k()},get children(){return i()},set children(e){i(e),k()},get ref(){return a()},set ref(e=null){a(e),k()},get id(){return o()},set id(e=dS(n)){o(e),k()},get forceMount(){return s()},set forceMount(e=!1){s(e),k()},get onOpenAutoFocus(){return c()},set onOpenAutoFocus(e=$){c(e),k()},get onCloseAutoFocus(){return l()},set onCloseAutoFocus(e=$){l(e),k()},get onEscapeKeydown(){return u()},set onEscapeKeydown(e=$){u(e),k()},get onInteractOutside(){return d()},set onInteractOutside(e=$){d(e),k()},get trapFocus(){return f()},set trapFocus(e=!0){f(e),k()},get preventScroll(){return p()},set preventScroll(e=!1){p(e),k()},get customAnchor(){return m()},set customAnchor(e=null){m(e),k()},get style(){return h()},set style(e){h(e),k()}},S=z(),C=P(S),ee=e=>{lO(e,po(()=>L(v),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return L(y)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return m()},onOpenAutoFocus:b,get onCloseAutoFocus(){return l()},get shouldRender(){return _.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,a=()=>t?.().wrapperProps,o=A(()=>Vb(n(),{style:mD(`popover`)},{style:h()}));var s=z(),c=P(s),l=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(o),wrapperProps:a(),..._.snippetProps}));H(n,r,()=>L(e))}B(e,t)},u=e=>{var t=ZO();qa(t,()=>({...a()}));var n=N(t);qa(n,()=>({...L(o)})),H(N(n),()=>i()??w),E(n),E(t),B(e,t)};U(c,e=>{r()?e(l):e(u,-1)}),B(e,s)},$$slots:{popper:!0}}))},te=e=>{cO(e,po(()=>L(v),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return L(y)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return m()},onOpenAutoFocus:b,get onCloseAutoFocus(){return l()},get shouldRender(){return _.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,a=()=>t?.().wrapperProps,o=A(()=>Vb(n(),{style:mD(`popover`)},{style:h()}));var s=z(),c=P(s),l=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(o),wrapperProps:a(),..._.snippetProps}));H(n,r,()=>L(e))}B(e,t)},u=e=>{var t=QO();qa(t,()=>({...a()}));var n=N(t);qa(n,()=>({...L(o)})),H(N(n),()=>i()??w),E(n),E(t),B(e,t)};U(c,e=>{r()?e(l):e(u,-1)}),B(e,s)},$$slots:{popper:!0}}))};return U(C,e=>{s()?e(ee):s()||e(te,1)}),B(e,S),O(x)}q($O,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:`open`});var ek=R(`<button><!></button>`);function tk(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`type`,7,`button`),c=K(t,`disabled`,7,!1),l=K(t,`openOnHover`,7,!1),u=K(t,`openDelay`,7,700),d=K(t,`closeDelay`,7,300),f=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),p=YO.create({id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),disabled:Q(()=>!!c()),openOnHover:Q(()=>l()),openDelay:Q(()=>u()),closeDelay:Q(()=>d())}),m=A(()=>Vb(f,p.props,{type:s()}));return QD(e,{get id(){return a()},get ref(){return p.opts.ref},children:(e,t)=>{var n=z(),a=P(n),o=e=>{var t=z();H(P(t),i,()=>({props:L(m)})),B(e,t)},s=e=>{var t=ek();qa(t,()=>({...L(m)})),H(N(t),()=>r()??w),E(t),B(e,t)};U(a,e=>{i()?e(o):e(s,-1)}),B(e,n)},$$slots:{default:!0}}),O({get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get id(){return a()},set id(e=dS(n)){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get type(){return s()},set type(e=`button`){s(e),k()},get disabled(){return c()},set disabled(e=!1){c(e),k()},get openOnHover(){return l()},set openOnHover(e=!1){l(e),k()},get openDelay(){return u()},set openDelay(e=700){u(e),k()},get closeDelay(){return d()},set closeDelay(e=300){d(e),k()}})}q(tk,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:`open`});function nk(e,t){D(t,!0);let n=K(t,`open`,15,!1),r=K(t,`onOpenChange`,7,$),i=K(t,`onOpenChangeComplete`,7,$),a=K(t,`children`,7);mS.create({variant:Q(()=>`dialog`),open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())});var o={get open(){return n()},set open(e=!1){n(e),k()},get onOpenChange(){return r()},set onOpenChange(e=$){r(e),k()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=$){i(e),k()},get children(){return a()},set children(e){a(e),k()}},s=z();return H(P(s),()=>a()??w),B(e,s),O(o)}q(nk,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});var rk=R(`<button><!></button>`);function ik(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`disabled`,7,!1),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`disabled`]),l=hS.create({variant:Q(()=>`close`),id:Q(()=>a()),ref:Q(()=>o(),e=>o(e)),disabled:Q(()=>!!s())}),u=A(()=>Vb(c,l.props));var d={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get id(){return a()},set id(e=dS(n)){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get disabled(){return s()},set disabled(e=!1){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z();H(P(t),i,()=>({props:L(u)})),B(e,t)},h=e=>{var t=rk();qa(t,()=>({...L(u)})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(p,e=>{i()?e(m):e(h,-1)}),B(e,f),O(d)}q(ik,{children:{},child:{},id:{},ref:{},disabled:{}},[],[],{mode:`open`});var ak=R(`<!> <!>`,1),ok=R(`<!> <div><!></div>`,1);function sk(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`children`,7),a=K(t,`child`,7),o=K(t,`ref`,15,null),s=K(t,`forceMount`,7,!1),c=K(t,`onCloseAutoFocus`,7,$),l=K(t,`onOpenAutoFocus`,7,$),u=K(t,`onEscapeKeydown`,7,$),d=K(t,`onInteractOutside`,7,$),f=K(t,`trapFocus`,7,!0),p=K(t,`preventScroll`,7,!0),m=K(t,`restoreScrollDelay`,7,null),h=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),g=vS.create({id:Q(()=>r()),ref:Q(()=>o(),e=>o(e))}),_=A(()=>Vb(h,g.props));var v={get id(){return r()},set id(e=dS(n)){r(e),k()},get children(){return i()},set children(e){i(e),k()},get child(){return a()},set child(e){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get forceMount(){return s()},set forceMount(e=!1){s(e),k()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(e=$){c(e),k()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(e=$){l(e),k()},get onEscapeKeydown(){return u()},set onEscapeKeydown(e=$){u(e),k()},get onInteractOutside(){return d()},set onInteractOutside(e=$){d(e),k()},get trapFocus(){return f()},set trapFocus(e=!0){f(e),k()},get preventScroll(){return p()},set preventScroll(e=!0){p(e),k()},get restoreScrollDelay(){return m()},set restoreScrollDelay(e=null){m(e),k()}},y=z(),b=P(y),x=e=>{Ow(e,{get ref(){return g.opts.ref},loop:!0,get trapFocus(){return f()},get enabled(){return g.root.opts.open.current},get onOpenAutoFocus(){return l()},get onCloseAutoFocus(){return c()},focusScope:(e,t)=>{let n=()=>t?.().props;Tw(e,po(()=>L(_),{get enabled(){return g.root.opts.open.current},get ref(){return g.opts.ref},onEscapeKeydown:e=>{u()(e),!e.defaultPrevented&&g.root.handleClose()},children:(e,t)=>{Sw(e,po(()=>L(_),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},onInteractOutside:e=>{d()(e),!e.defaultPrevented&&g.root.handleClose()},children:(e,t)=>{Pw(e,po(()=>L(_),{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},children:(e,t)=>{var r=z(),o=P(r),s=e=>{var t=ak(),r=P(t),i=e=>{qw(e,{get preventScroll(){return p()},get restoreScrollDelay(){return m()}})};U(r,e=>{g.root.opts.open.current&&e(i)});var o=F(r,2);{let e=A(()=>({props:Vb(L(_),n()),...g.snippetProps}));H(o,a,()=>L(e))}B(e,t)},c=e=>{var t=ok(),r=P(t);qw(r,{get preventScroll(){return p()}});var a=F(r,2);qa(a,e=>({...e}),[()=>Vb(L(_),n())]),H(N(a),()=>i()??w),E(a),B(e,t)};U(o,e=>{a()?e(s):e(c,-1)}),B(e,r)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};return U(b,e=>{(g.shouldRender||s())&&e(x)}),B(e,y),O(v)}q(sk,{id:{},children:{},child:{},ref:{},forceMount:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},restoreScrollDelay:{}},[],[],{mode:`open`});function ck(e,t){D(t,!0);let n=K(t,`open`,15,!1),r=K(t,`dir`,7,`ltr`),i=K(t,`onOpenChange`,7,$),a=K(t,`onOpenChangeComplete`,7,$),o=K(t,`_internal_variant`,7,`dropdown-menu`),s=K(t,`children`,7),c=iw.create({variant:Q(()=>o()),dir:Q(()=>r()),onClose:()=>{n(!1),i()(!1)}});return aw.create({open:Q(()=>n(),e=>{n(e),i()(e)}),onOpenChangeComplete:Q(()=>a())},c),OD(e,{children:(e,t)=>{var n=z();H(P(n),()=>s()??w),B(e,n)},$$slots:{default:!0}}),O({get open(){return n()},set open(e=!1){n(e),k()},get dir(){return r()},set dir(e=`ltr`){r(e),k()},get onOpenChange(){return i()},set onOpenChange(e=$){i(e),k()},get onOpenChangeComplete(){return a()},set onOpenChangeComplete(e=$){a(e),k()},get _internal_variant(){return o()},set _internal_variant(e=`dropdown-menu`){o(e),k()},get children(){return s()},set children(e){s(e),k()}})}q(ck,{open:{},dir:{},onOpenChange:{},onOpenChangeComplete:{},_internal_variant:{},children:{}},[],[],{mode:`open`});var lk=R(`<div><div><!></div></div>`),uk=R(`<div><div><!></div></div>`);function dk(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`child`,7),a=K(t,`children`,7),o=K(t,`ref`,15,null),s=K(t,`loop`,7,!0),c=K(t,`onInteractOutside`,7,$),l=K(t,`onEscapeKeydown`,7,$),u=K(t,`onCloseAutoFocus`,7,$),d=K(t,`forceMount`,7,!1),f=K(t,`trapFocus`,7,!1),p=K(t,`style`,7),m=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`child`,`children`,`ref`,`loop`,`onInteractOutside`,`onEscapeKeydown`,`onCloseAutoFocus`,`forceMount`,`trapFocus`,`style`]),h=ow.create({id:Q(()=>r()),loop:Q(()=>s()),ref:Q(()=>o(),e=>o(e)),onCloseAutoFocus:Q(()=>u())}),g=A(()=>Vb(m,h.props));function _(e){if(h.handleInteractOutside(e),!e.defaultPrevented&&(c()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){let t=`[${h.parentMenu.root.getBitsAttr(`sub-content`)}]`;if(e.target.closest(t))return}h.parentMenu.onClose()}}function v(e){l()(e),!e.defaultPrevented&&h.parentMenu.onClose()}var y={get id(){return r()},set id(e=dS(n)){r(e),k()},get child(){return i()},set child(e){i(e),k()},get children(){return a()},set children(e){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get loop(){return s()},set loop(e=!0){s(e),k()},get onInteractOutside(){return c()},set onInteractOutside(e=$){c(e),k()},get onEscapeKeydown(){return l()},set onEscapeKeydown(e=$){l(e),k()},get onCloseAutoFocus(){return u()},set onCloseAutoFocus(e=$){u(e),k()},get forceMount(){return d()},set forceMount(e=!1){d(e),k()},get trapFocus(){return f()},set trapFocus(e=!1){f(e),k()},get style(){return p()},set style(e){p(e),k()}},b=z(),x=P(b),S=e=>{lO(e,po(()=>L(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.parentMenu.opts.open.current},onInteractOutside:_,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return s()},forceMount:!0,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,o=A(()=>Vb(n(),{style:mD(`dropdown-menu`)},{style:p()}));var s=z(),c=P(s),l=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(o),wrapperProps:r(),...h.snippetProps}));H(n,i,()=>L(e))}B(e,t)},u=e=>{var t=lk();qa(t,()=>({...r()}));var n=N(t);qa(n,()=>({...L(o)})),H(N(n),()=>a()??w),E(n),E(t),B(e,t)};U(c,e=>{i()?e(l):e(u,-1)}),B(e,s)},$$slots:{popper:!0}}))},C=e=>{cO(e,po(()=>L(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.parentMenu.opts.open.current},onInteractOutside:_,onEscapeKeydown:v,get trapFocus(){return f()},get loop(){return s()},forceMount:!1,get id(){return r()},get shouldRender(){return h.shouldRender},popper:(e,t)=>{let n=()=>t?.().props,r=()=>t?.().wrapperProps,o=A(()=>Vb(n(),{style:mD(`dropdown-menu`)},{style:p()}));var s=z(),c=P(s),l=e=>{var t=z(),n=P(t);{let e=A(()=>({props:L(o),wrapperProps:r(),...h.snippetProps}));H(n,i,()=>L(e))}B(e,t)},u=e=>{var t=uk();qa(t,()=>({...r()}));var n=N(t);qa(n,()=>({...L(o)})),H(N(n),()=>a()??w),E(n),E(t),B(e,t)};U(c,e=>{i()?e(l):e(u,-1)}),B(e,s)},$$slots:{popper:!0}}))};return U(x,e=>{d()?e(S):d()||e(C,1)}),B(e,b),O(y)}q(dk,{id:{},child:{},children:{},ref:{},loop:{},onInteractOutside:{},onEscapeKeydown:{},onCloseAutoFocus:{},forceMount:{},trapFocus:{},style:{}},[],[],{mode:`open`});var fk=R(`<button><!></button>`);function pk(e,t){let n=_i();D(t,!0);let r=K(t,`id`,23,()=>dS(n)),i=K(t,`ref`,15,null),a=K(t,`child`,7),o=K(t,`children`,7),s=K(t,`disabled`,7,!1),c=K(t,`type`,7,`button`),l=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`id`,`ref`,`child`,`children`,`disabled`,`type`]),u=hw.create({id:Q(()=>r()),disabled:Q(()=>s()??!1),ref:Q(()=>i(),e=>i(e))}),d=A(()=>Vb(l,u.props,{type:c()}));return QD(e,{get id(){return r()},get ref(){return u.opts.ref},children:(e,t)=>{var n=z(),r=P(n),i=e=>{var t=z();H(P(t),a,()=>({props:L(d)})),B(e,t)},s=e=>{var t=fk();qa(t,()=>({...L(d)})),H(N(t),()=>o()??w),E(t),B(e,t)};U(r,e=>{a()?e(i):e(s,-1)}),B(e,n)},$$slots:{default:!0}}),O({get id(){return r()},set id(e=dS(n)){r(e),k()},get ref(){return i()},set ref(e=null){i(e),k()},get child(){return a()},set child(e){a(e),k()},get children(){return o()},set children(e){o(e),k()},get disabled(){return s()},set disabled(e=!1){s(e),k()},get type(){return c()},set type(e=`button`){c(e),k()}})}q(pk,{id:{},ref:{},child:{},children:{},disabled:{},type:{}},[],[],{mode:`open`});var mk=Nx({component:`label`,parts:[`root`]}),hk=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Tx(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=A(()=>({id:this.opts.id.current,[mk.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return L(this.#e)}set props(e){M(this.#e,e)}},gk=R(`<label><!></label>`);function _k(e,t){let n=_i();D(t,!0);let r=K(t,`children`,7),i=K(t,`child`,7),a=K(t,`id`,23,()=>dS(n)),o=K(t,`ref`,15,null),s=K(t,`for`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`child`,`id`,`ref`,`for`]),l=hk.create({id:Q(()=>a()),ref:Q(()=>o(),e=>o(e))}),u=A(()=>Vb(c,l.props,{for:s()}));var d={get children(){return r()},set children(e){r(e),k()},get child(){return i()},set child(e){i(e),k()},get id(){return a()},set id(e=dS(n)){a(e),k()},get ref(){return o()},set ref(e=null){o(e),k()},get for(){return s()},set for(e){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z();H(P(t),i,()=>({props:L(u)})),B(e,t)},h=e=>{var t=gk();qa(t,()=>({...L(u),for:s()})),H(N(t),()=>r()??w),E(t),B(e,t)};return U(p,e=>{i()?e(m):e(h,-1)}),B(e,f),O(d)}q(_k,{children:{},child:{},id:{},ref:{},for:{}},[],[],{mode:`open`});function vk(e,t){D(t,!0);let n=K(t,`open`,15,!1),r=K(t,`onOpenChange`,7,$),i=K(t,`onOpenChangeComplete`,7,$),a=K(t,`children`,7);return JO.create({open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())}),OD(e,{children:(e,t)=>{var n=z();H(P(n),()=>a()??w),B(e,n)},$$slots:{default:!0}}),O({get open(){return n()},set open(e=!1){n(e),k()},get onOpenChange(){return r()},set onOpenChange(e=$){r(e),k()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(e=$){i(e),k()},get children(){return a()},set children(e){a(e),k()}})}q(vk,{open:{},onOpenChange:{},onOpenChangeComplete:{},children:{}},[],[],{mode:`open`});function yk(e){return e<.5?8*e**4:-8*(e-1)**4+1}function bk(e){return e**4}function xk(e){return(e-1)**3*(1-e)+1}function Sk(e){return--e*e*e*e*e+1}var Ck=e=>e;function wk(e){let t=e-1;return t*t*t+1}function Tk(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function Ek(e,{delay:t=0,duration:n=400,easing:r=Ck}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:e=>`opacity: ${e*i}`}}function Dk(e,{delay:t=0,duration:n=400,easing:r=wk,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Tk(i),[p,m]=Tk(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
|
|
562
562
|
transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m});
|
|
563
|
-
opacity: ${c-u*t}`}}var Ok=
|
|
563
|
+
opacity: ${c-u*t}`}}var Ok=R(`<div class="embed-alva embed-alva--question-box"><div class="embed-alva__body"><button class="embed-alva__close transition-colors"><span class="sr-only">Schliessen</span> <!></button> <p class="embed-alva__description">Möchten Sie jetzt an der kurzen Befragung teilnehmen? <br/> Ihre Rückmeldung hilft uns, Alva zu verbessern. <br/> Dauer: ca. 5 Minuten.</p> <div class="embed-alva__actions"><a class="btn btn--primary" target="_blank" rel="noopener noreferrer"><span class="btn__label">Ja, Umfrage ausfüllen</span></a> <button class="btn btn--secondary"><span class="btn__label">Nein, danke</span></button></div></div></div>`);function kk(e,t){D(t,!0);let n=K(t,`belowScore`,7),r=j(void 0);nr(()=>{Zr(()=>{M(r,Ak.getContext(),!0)})});let i=()=>{Ak.updateContext(e=>({...e,experimentState:`completed-without-survey`}))},a=()=>Ak.updateContext(e=>({...e,experimentState:`completed`})),o={certainty:`https://forms.office.com/e/r2xanSsUsy`,uncertainty:`https://forms.office.com/e/5C9VAhrpWS`,control:`https://forms.office.com/e/i8Mf5t4QVZ`,"<unassigned>":``},s=(e,t)=>t.enabled?Dk(e,t):{duration:0};var c={get belowScore(){return n()},set belowScore(e){n(e),k()}},l=z(),u=P(l),d=e=>{var t=z(),c=P(t),l=e=>{var t=Ok(),c=N(t),l=N(c);Vy(F(N(l),2),{name:`dismiss`}),E(l);var u=F(l,4),d=N(u),f=F(d,2);E(u),E(c),E(t),I(()=>G(d,`href`,o[L(r).assignedGroup])),oi(`click`,l,i),oi(`click`,d,a),oi(`click`,f,i),pa(5,t,()=>s,()=>({enabled:n(),duration:300,delay:1e3,y:30})),B(e,t)};U(c,e=>{(n()?L(r).nextShowCount===3:L(r).nextShowCount>=3)&&Ak.currentContext.experimentState===`in-progress`&&e(l)}),B(e,t)};return U(u,e=>{Ak.currentContext.isDesktop&&L(r).experimentState===`in-progress`&&e(d)}),B(e,l),O(c)}si([`click`]),q(kk,{belowScore:{}},[],[],{mode:`open`});var Ak=new vy({initialValue:{isDesktop:!!(new W_(`(hover: hover) and (pointer: fine)`,!1).current||navigator.userAgentData?.mobile===!1),experimentState:`new`,assignedGroup:`<unassigned>`,nextLevel:`<unassigned>`,nextShowCount:-1}}),jk=e=>{let t=new Uint32Array(1);return crypto.getRandomValues(t),e[t[0]%e.length]},Mk=()=>jk([`certainty`,`uncertainty`,`control`]),Nk=()=>jk([`low`,`medium`,`high`]),Pk=R(`<button class="debug-btn svelte-yb76lo">Reset</button>`),Fk=R(`<div class="debug-panel svelte-yb76lo"><pre class="svelte-yb76lo"><code class="svelte-yb76lo"> </code></pre> <!></div>`),Ik=R(`<div class="debug svelte-yb76lo"><!> <button class="debug-toggle svelte-yb76lo"> </button></div>`),Lk=R(`<div class="embed-alva svelte-yb76lo"><div class="embed-alva__body svelte-yb76lo"><button class="embed-alva__close transition-colors svelte-yb76lo"><span class="sr-only svelte-yb76lo">Schliessen</span> <!></button> <p class="embed-alva__title svelte-yb76lo">Helfen Sie uns, Alva zu verbessern!</p> <p class="embed-alva__description svelte-yb76lo">Nehmen Sie an einer kurzen wissenschaftlichen Befragung teil (ca. 5 Min. im Anschluss an Ihre Nutzung). <br class="svelte-yb76lo"/> <a href="#experiment-info" class="embed-alva__link svelte-yb76lo">Mehr erfahren</a></p> <div class="embed-alva__actions svelte-yb76lo"><button class="btn btn--primary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Ja, mitmachen</span></button> <button class="btn btn--secondary svelte-yb76lo"><span class="btn__label svelte-yb76lo">Nein, danke</span></button></div></div></div>`),Rk=R(`<!> <!>`,1),zk=R(`<!> <!>`,1),Bk={hash:`svelte-yb76lo`,code:`.chat-app .message--bot:has(+ .message--bot) {padding-bottom:0;}
|
|
564
564
|
/* Alva init embed styles */
|
|
565
565
|
/* Debug panel */.debug.svelte-yb76lo {display:flex;z-index:100000;position:fixed;top:0;left:20px;flex-direction:column;align-items:start;}.debug-panel.svelte-yb76lo {max-width:320px;padding:var(--spacer-10);border-radius:0 0 var(--spacer-6) 0;background-color:#68a518;color:var(--color-grey-0);font-size:var(--base-font-size-xs);}.debug-panel.svelte-yb76lo pre:where(.svelte-yb76lo) {margin:0;white-space:pre-wrap;word-break:break-word;}.debug-btn.svelte-yb76lo {width:100%;margin-top:var(--spacer-4);padding:var(--spacer-4) var(--spacer-10);border:1px solid var(--color-grey-0);border-radius:var(--spacer-4);background-color:#84cf23;color:var(--color-grey-0);font-size:var(--base-font-size-xs);}.debug-toggle.svelte-yb76lo {padding:var(--spacer-1) var(--spacer-10);border:none;border-radius:0 0 var(--spacer-4) var(--spacer-4);background-color:#68a518;color:var(--color-grey-0);font-size:var(--base-font-size-xs);line-height:var(--base-line-height-tight);}.embed-alva {padding:0;overflow:hidden;gap:2px;border-radius:var(--base-border-radius);background:var(--alva-gradient-card); /* stylelint-disable-line */background-position-x:0%;background-size:240%;transition:height 0.4s var(--default-transition-timing-function);&:after,
|
|
566
566
|
&:before {display:none;}}.embed-alva--question-box {margin-top:var(--spacer-r-56);font-size:var(--base-font-size-body);}.embed-alva__body {position:relative;padding:var(--spacer-r-24) var(--spacer-r-28);}.embed-alva__close {position:absolute;top:var(--spacer-8);right:var(--spacer-8);padding:var(--spacer-4);border:none;background:transparent;color:var(--anchor-color);&:hover {color:var(--anchor-hover-color);}}.embed-alva__title {margin:0 0 var(--spacer-4);
|
|
567
|
-
/* To not clash with x */padding-right:1rem;padding-bottom:0.8rem;color:var(--card-color);font-weight:var(--base-font-weight-bold);line-height:var(--base-line-height-tight);}.embed-alva__description {margin:0;text-wrap:balance;}.embed-alva__link {display:inline-block;color:var(--anchor-color);text-decoration:underline;&:hover {color:var(--anchor-hover-color);}}.embed-alva__actions {display:flex;margin-top:var(--spacer-r-20);gap:var(--spacer-r-8);}.embed-alva__actions .btn__label {font-size:var(--base-font-size-sm);}`};function Vk(e,t){
|
|
567
|
+
/* To not clash with x */padding-right:1rem;padding-bottom:0.8rem;color:var(--card-color);font-weight:var(--base-font-weight-bold);line-height:var(--base-line-height-tight);}.embed-alva__description {margin:0;text-wrap:balance;}.embed-alva__link {display:inline-block;color:var(--anchor-color);text-decoration:underline;&:hover {color:var(--anchor-hover-color);}}.embed-alva__actions {display:flex;margin-top:var(--spacer-r-20);gap:var(--spacer-r-8);}.embed-alva__actions .btn__label {font-size:var(--base-font-size-sm);}`};function Vk(e,t){D(t,!0),_a(e,Bk),nr(()=>{Zr(()=>{Ak.setContextVersion(Z.data.chatConfig.contextVersion)})});let n=j(!1),r=j(void 0);Li(()=>{if(Ak.currentContext.experimentState===`new`||Ak.currentContext.experimentState===`in-progress`&&Ak.currentContext.nextShowCount>=3){let e=Z.targets.scrollContainer;e&&setTimeout(()=>qy(e,0,600,`scrollTop`,yk),100)}});let i=(e,t)=>{e.style.height=`${e.offsetHeight}px`,t(),Jr().then(()=>{let t=e.scrollHeight;e.style.height=`${t}px`,e.addEventListener(`transitionend`,()=>e.style.height=``,{once:!0})})},a=()=>{Ak.updateContext(e=>({...e,experimentState:`denied`})),Z.targets.chatInput?.focus()},o=()=>{dv.success(`Vielen Dank für Ihre Teilnahme!`,{unstyled:!0,duration:4e3,classes:{toast:`toast`}}),L(r)?i(L(r),()=>Ak.updateContext(e=>({...e,experimentState:`in-progress`,assignedGroup:Mk(),nextShowCount:1,nextLevel:Nk()}))):Ak.updateContext(e=>({...e,experimentState:`in-progress`,assignedGroup:Mk(),nextShowCount:1,nextLevel:Nk()}))};var s=zk(),c=P(s),l=e=>{var t=Rk(),i=P(t),s=e=>{AS(e,{get to(){return Z.targets.portals},children:(e,t)=>{var r=Ik(),i=N(r),a=e=>{var t=Fk(),n=N(t),r=N(n),i=N(r,!0);E(r),E(n);var a=F(n,2),o=e=>{var t=Pk();oi(`click`,t,()=>Ak.resetContext()),B(e,t)};U(a,e=>{Ak.currentContext.experimentState!==`new`&&e(o)}),E(t),I(e=>V(i,e),[()=>JSON.stringify(Ak.currentContext,null,2)]),B(e,t)};U(i,e=>{L(n)&&e(a)});var o=F(i,2),s=N(o,!0);E(o),E(r),I(()=>V(s,L(n)?`▲ close`:`▼ context`)),oi(`click`,o,()=>M(n,!L(n))),B(e,r)},$$slots:{default:!0}})};U(i,e=>{window.location.origin.endsWith(`.dev.genai.liip.ch`)&&Z.targets.portals&&e(s)});var c=F(i,2),l=e=>{var t=Lk(),n=N(t),i=N(n);Vy(F(N(i),2),{name:`dismiss`}),E(i);var s=F(i,6),c=N(s),l=F(c,2);E(s),E(n),E(t),oo(t,e=>M(r,e),()=>L(r)),oi(`click`,i,a),oi(`click`,c,o),oi(`click`,l,a),B(e,t)};U(c,e=>{Ak.currentContext.experimentState===`new`&&e(l)}),B(e,t)};U(c,e=>{Ak.currentContext.isDesktop&&e(l)}),kk(F(c,2),{}),B(e,s),O()}si([`click`]),q(Vk,{},[],[],{mode:`open`});var Hk=R(`<p class="embed-alva-score svelte-16h2wiv"><span class="embed-alva-score__separator svelte-16h2wiv"></span> </p>`),Uk=R(`<p class="embed-alva-score svelte-16h2wiv"><span class="embed-alva-score__separator svelte-16h2wiv"></span> </p>`),Wk=R(`<!> <!>`,1),Gk={hash:`svelte-16h2wiv`,code:`
|
|
568
568
|
@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from '../css/viewports.css';.embed-alva-score.svelte-16h2wiv {display:flex;flex-direction:column;margin-top:calc(var(--spacer-r-24) * -1);color:var(--card-color);font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-md); /* stylelint-disable-line */line-height:var(--base-line-height-tight);text-align:right;
|
|
569
569
|
|
|
570
570
|
@container chat-container (min-width: 640px) {margin-top:calc((var(--spacer-20) + var(--spacer-r-24)) * -1);
|
|
571
|
-
}}.embed-alva-score__separator.svelte-16h2wiv {display:block;align-self:flex-end;width:4.8rem;margin-top:-0.3rem;padding-bottom:0.5rem;border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color);}`};function Kk(e,t){E(t,!0),va(e,Gk);let n=A(void 0);rr(()=>{Qr(()=>{j(n,Ak.getContext(),!0),Ak.currentContext.experimentState===`in-progress`&&Ak.updateContext(e=>({...e,nextLevel:Nk(),nextShowCount:e.nextShowCount+1}))})});let r={low:`Tief`,medium:`Mittel`,high:`Hoch`};var i=Wk(),a=N(i),o=e=>{var t=R(),i=N(t),a=e=>{var t=R(),i=N(t),a=e=>{var t=Hk(),i=P(M(t));T(t),F(()=>B(i,` Antwortsicherheit: ${r[I(n).nextLevel]??I(n).nextLevel??``}`)),z(e,t)},o=e=>{var t=Uk(),i=P(M(t));T(t),F(()=>B(i,` Antwortunsicherheit: ${r[I(n).nextLevel]??I(n).nextLevel??``}`)),z(e,t)};H(i,e=>{I(n).assignedGroup===`certainty`?e(a):I(n).assignedGroup===`uncertainty`&&e(o,1)}),z(e,t)};H(i,e=>{I(n).nextShowCount<=3&&e(a)}),z(e,t)};H(a,e=>{Ak.currentContext.isDesktop&&I(n).experimentState===`in-progress`&&e(o)}),kk(P(a,2),{belowScore:!0}),z(e,i),D()}q(Kk,{},[],[],{mode:`open`});function qk(e,t){E(t,!0);let n=K(t,`href`,7),r=K(t,`target`,7),i=K(t,`onclick`,7),a=K(t,`className`,23,()=>[]),o=K(t,`isStandalone`,7,!1),s=K(t,`children`,7),c=K(t,`type`,7,`button`),l=K(t,`use`,7),u=K(t,`class`,7),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`href`,`target`,`onclick`,`className`,`isStandalone`,`children`,`type`,`use`,`class`]),f=k(()=>n()?`a`:`button`),p=k(()=>[...Array.isArray(a())?a():a()?[a()]:[],...u()?[u()]:[]]),m=()=>({}),h=k(()=>l()??m);var g={get href(){return n()},set href(e){n(e),O()},get target(){return r()},set target(e){r(e),O()},get onclick(){return i()},set onclick(e){i(e),O()},get className(){return a()},set className(e=[]){a(e),O()},get isStandalone(){return o()},set isStandalone(e=!1){o(e),O()},get children(){return s()},set children(e){s(e),O()},get type(){return c()},set type(e=`button`){c(e),O()},get use(){return l()},set use(e){l(e),O()},get class(){return u()},set class(e){u(e),O()}},_=R();return ga(N(_),()=>I(f),!1,(e,t)=>{ya(e,e=>I(h)?.(e)),G(e,()=>({...d,onclick:n()?void 0:i(),type:n()?void 0:c(),href:n(),role:n()?`link`:`button`,target:n()?r():void 0,class:I(p),[Fa]:{"open-button--standalone":o()}}));var a=R();V(N(a),s),z(t,a)}),z(e,_),D(g)}q(qk,{href:{},target:{},onclick:{},className:{},isStandalone:{},children:{},type:{},use:{},class:{}},[],[],{mode:`open`});var Jk=L(`<p class="embed-buttons__caption"></p>`),Yk=L(`<span class="btn__label"></span> <!>`,1),Xk=L(`<div class="embed-buttons"><!> <div class="embed-buttons__buttons"></div></div>`);function Zk(e,t){E(t,!0);let n=K(t,`data`,7);var r={get data(){return n()},set data(e){n(e),O()}},i=Xk(),a=M(i),o=e=>{var t=Jk();ia(t,()=>n().caption,!0),T(t),z(e,t)};H(a,e=>{n().caption&&e(o)});var s=P(a,2);return Qi(s,21,()=>n().buttons,Ji,(e,t)=>{{let n=k(()=>[`btn`,`btn--${I(t).variant??`primary`}`]);qk(e,{get href(){return I(t).href},get target(){return I(t).target},get className(){return I(n)},children:(e,n)=>{var r=Yk(),i=N(r);ia(i,()=>I(t).label,!0),T(i);var a=P(i,2),o=e=>{Vy(e,{get name(){return I(t).icon}})};H(a,e=>{I(t).icon&&e(o)}),z(e,r)},$$slots:{default:!0}})}}),T(s),T(i),z(e,i),D(r)}q(Zk,{data:{}},[],[],{mode:`open`});var Qk=L(`<p class="embed-combobox__caption"></p>`),$k=L(`<p> </p>`),eA=L(`<div><div><!> <!> <!></div></div>`),tA=L(`<span class="btn btn--tertiary btn--square"><!> <span class="sr-only"> </span></span>`),nA=L(`<!> <!> <!>`,1),rA=L(`<div class="embed-combobox__combobox"><!></div>`),iA=L(`<div class="embed-combobox"><!> <!></div>`);function aA(e,t){E(t,!0);let n=K(t,`data`,7),r=k(()=>Z.t),i=A(``),a=A(!1),o=k(()=>I(i)===``?n().values:n().values.filter(e=>e.label.toLowerCase().includes(I(i).toLowerCase())));var s={get data(){return n()},set data(e){n(e),O()}},c=iA(),l=M(c),u=e=>{var t=Qk();ia(t,()=>n().caption,!0),T(t),z(e,t)};H(l,e=>{n().caption&&e(u)});var d=P(l,2),f=e=>{var t=rA();U(M(t),()=>ZD,(e,t)=>{t(e,{type:`single`,onOpenChange:e=>{e||j(i,``)},get open(){return I(a)},set open(e){j(a,e,!0)},children:(e,t)=>{var s=nA(),c=N(s);U(c,()=>nO,(e,t)=>{t(e,{get placeholder(){return n().placeholder},onfocus:()=>j(a,!0),onclick:()=>j(a,!0),oninput:e=>j(i,e.currentTarget.value,!0)})});var l=P(c,2);U(l,()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var n=R(),i=N(n);{let e=(e,t)=>{let n=()=>t?.().wrapperProps,i=()=>t?.().props,a=()=>t?.().open;var s=R(),c=N(s),l=e=>{var t=eA();G(t,()=>({...n()}));var a=M(t);G(a,()=>({...i()}));var s=M(a);U(s,()=>TO,(e,t)=>{t(e,{children:(e,t)=>{Vy(e,{name:`chevronUp`})},$$slots:{default:!0}})});var c=P(s,2);U(c,()=>yO,(e,t)=>{t(e,{children:(e,t)=>{var n=R();Qi(N(n),19,()=>I(o),(e,t)=>t+e.value,(e,t)=>{var n=R();U(N(n),()=>gO,(e,n)=>{n(e,{get value(){return I(t).value},children:(e,n)=>{$e();var r=_i();F(()=>B(r,I(t).label)),z(e,r)},$$slots:{default:!0}})}),z(e,n)},e=>{var t=$k(),n=M(t,!0);T(t),F(()=>B(n,I(r).noResultsFound)),z(e,t)}),z(e,n)},$$slots:{default:!0}})}),U(P(c,2),()=>SO,(e,t)=>{t(e,{children:(e,t)=>{Vy(e,{name:`chevronDown`})},$$slots:{default:!0}})}),T(a),T(t),ma(1,a,()=>Dk,()=>({duration:300,easing:xk,y:40})),ma(2,a,()=>Dk,()=>({duration:150,easing:bk,y:20})),z(e,t)};H(c,e=>{a()&&e(l)}),z(e,s)};U(i,()=>fO,(t,n)=>{n(t,{sideOffset:10,forceMount:!0,strategy:`absolute`,child:e,$$slots:{child:!0}})})}z(e,n)},$$slots:{default:!0}})}),U(P(l,2),()=>iO,(e,t)=>{t(e,{children:(e,t)=>{var n=tA(),i=M(n);Vy(i,{name:`chevronTopDown`});var a=P(i,2),o=M(a,!0);T(a),T(n),F(()=>B(o,I(r).openMenu)),z(e,n)},$$slots:{default:!0}})}),z(e,s)},$$slots:{default:!0}})}),T(t),z(e,t)};return H(d,e=>{Z.targets.portals&&e(f)}),T(c),z(e,c),D(s)}q(aA,{data:{}},[],[],{mode:`open`});var oA={buttons:Zk,combobox:aA,"alva-init":Vk,"alva-score-survey":Kk},sA=e=>{let t=oA[e];if(!t){console.error(`No embed component found with name "${e}"`);return}return t};function cA(e,t){E(t,!0);let n=K(t,`componentName`,7),r=K(t,`data`,7),i=k(()=>sA(n())),a=A(!1);Ri(()=>{requestAnimationFrame(()=>j(a,!0))});var o={get componentName(){return n()},set componentName(e){n(e),O()},get data(){return r()},set data(e){r(e),O()}},s=R(),c=N(s),l=e=>{var t=R();U(N(t),()=>I(i),(e,t)=>{t(e,{get data(){return r()}})}),z(e,t)};return H(c,e=>{I(i)&&I(a)&&e(l)}),z(e,s),D(o)}q(cA,{componentName:{},data:{}},[],[],{mode:`open`});var lA=L(`<div aria-hidden="true"><!></div>`);function uA(e,t){E(t,!0);let n=K(t,`class`,7),r=K(t,`isLarge`,7),i=K(t,`hide`,7,!1);var a={get class(){return n()},set class(e){n(e),O()},get isLarge(){return r()},set isLarge(e){r(e),O()},get hide(){return i()},set hide(e=!1){i(e),O()}},o=lA();let s;var c=M(o),l=e=>{var t=R();ia(N(t),()=>Z.theme.svgs.avatarLarge||Z.theme.svgs.avatar),z(e,t)},u=e=>{var t=R();ia(N(t),()=>Z.theme.svgs.avatar),z(e,t)};return H(c,e=>{r()?e(l):e(u,-1)}),T(o),ya(o,(e,t)=>Iy?.(e,t),()=>r()?`avatarLarge`:`avatar`),F(()=>s=ka(o,1,`svg svg--avatar ${n()??``}`,null,s,{"svg--avatar--hide":i()})),z(e,o),D(a)}q(uA,{class:{},isLarge:{},hide:{}},[],[],{mode:`open`});var dA=`data-references-toggle-button`,fA=L(` <!>`,1),pA=L(`<span class="btn__label"> </span>`),mA=L(`<div class="message__bot-references"><button><!> <!></button></div>`),hA=L(`<!> <div class="message__bot-actions"><!> <!> <!> <!></div>`,1),gA=L(`<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!> <!></div> <!></div></div>`),_A=L(`<div class="message__bot-layout"><!> <div class="message__bot-body"><!></div></div>`),vA=L(`<section><div class="message__content"><!></div></section>`);function yA(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`message`,7),i=K(t,`index`,7),a=K(t,`onmessageupdate`,7),o=K(t,`onbotmessageinit`,7),s=K(t,`onaskQuestion`,7),c=K(t,`isLast`,7,!1),l={duration:Number(Z.theme.components.message.custom?.transitionDuration)||300,delay:Number(Z.theme.components.message.custom?.transitionDelay)||0,y:Number(Z.theme.components.message.custom?.transitionY)||30,ease:xk};Qr(()=>r().type===`bot`||r().type===`component`)&&(l.delay+=Number(Z.theme.components.message.custom?.transitionBotLoadingDelay)||300);let u={duration:Number(Z.theme.components.messageOptions.custom?.transitionDuration)||300,delay:Number(Z.theme.components.messageOptions.custom?.transitionDelay)||0,y:Number(Z.theme.components.messageOptions.custom?.transitionY)||30,ease:xk};tr(()=>{r()?.type===`bot`&&r().state!==`done`&&a()()}),Qr(()=>{r()?.type===`bot`&&o()()});let d=k(()=>Z.data.history.slice(0,i()+1).filter(e=>e.type===`bot`||e.type===`component`).length),f=k(()=>r().type===`bot`||r().type===`component`?I(n).ariaAnswerFromBot.replace(`{n}`,String(I(d))):`${I(n).ariaQuestionFromYou} ${(r().message?.length??0)>20?r().message.slice(0,20)+`...`:r().message}`),p=k(()=>Z.data.currentReferencesAsideId===r().id?I(n).referencesHide:I(n).referencesDisplay);var m={get message(){return r()},set message(e){r(e),O()},get index(){return i()},set index(e){i(e),O()},get onmessageupdate(){return a()},set onmessageupdate(e){a(e),O()},get onbotmessageinit(){return o()},set onbotmessageinit(e){o(e),O()},get onaskQuestion(){return s()},set onaskQuestion(e){s(e),O()},get isLast(){return c()},set isLast(e=!1){c(e),O()}},h=vA();let g;var _=M(h),v=M(_),y=e=>{var t=gA(),i=M(t);uA(i,{class:`message__bot-avatar`});var a=P(i,2),o=M(a),l=M(o);ia(l,()=>r().message.html);var d=P(l,2),f=e=>{var t=fA(),r=N(t);Vy(P(r),{name:`messageLoading`,class:`message__bot-loading`}),F(()=>B(r,`${I(n).messageBotLoading??``} `)),z(e,t)};H(d,e=>{r().state===`loading`&&e(f)}),T(o);var m=P(o,2),h=e=>{var t=R();ga(N(t),()=>c()?`nav`:`div`,!1,(e,t)=>{G(e,()=>({"aria-label":c()?Z.t.ariaLastAnswerNavigation:void 0,class:`message__bot-options`})),ma(3,e,()=>Dk,()=>u);var i=hA(),a=N(i),o=e=>{var t=mA(),n=M(t),i=()=>Fy.toggleReferencesAside(r().id);G(n,()=>({class:`btn btn--tertiary btn--square`,onclick:i,"aria-expanded":Z.data.currentReferencesAsideId===r().id,"aria-controls":CA,[dA]:!0}));var a=M(n);Vy(a,{name:`listUnordered`});var o=P(a,2),s=e=>{var t=pA(),n=M(t,!0);T(t),F(()=>B(n,I(p))),z(e,t)};H(o,e=>{I(p)&&e(s)}),T(n),T(t),z(e,t)};H(a,e=>{r().references&&r().references.used.length&&e(o)});var l=P(a,2),d=M(l),f=e=>{Gy(e,{icon:`retry`,get label(){return I(n).ariaAskQuestionAgain},get tooltip(){return I(n).askQuestionAgain},get onclick(){return s()},class:`message__bot-action btn btn--tertiary btn--square`})};H(d,e=>{Z.data.chatConfig.askQuestionAgain&&e(f)});var m=P(d,2);Gy(m,{icon:`voteUp`,get label(){return I(n).ariaAnswerGood},get tooltip(){return I(n).answerGood},onclick:()=>Fy.thumbs(r().id,`up`),class:`message__bot-action btn btn--tertiary btn--square`});var h=P(m,2);Gy(h,{icon:`voteDown`,get label(){return I(n).ariaAnswerBad},get tooltip(){return I(n).answerBad},onclick:()=>Fy.thumbs(r().id,`down`),class:`message__bot-action btn btn--tertiary btn--square`});var g=P(h,2),_=e=>{Gy(e,{icon:`message`,get label(){return I(n).ariaGiveFeedback},"aria-haspopup":`dialog`,get"aria-expanded"(){return Z.data.conversationFeedbackIsOpen},get tooltip(){return I(n).giveFeedback},onclick:()=>Fy.openMessageFeedback(r().id),class:`message__bot-action btn btn--tertiary btn--square`})};H(g,e=>{(Z.data.chatConfig.showTextFeedback||Z.data.chatConfig.classification)&&e(_)}),T(l),z(t,i)}),z(e,t)};H(m,e=>{r().state===`done`&&e(h)}),T(a),T(t),z(e,t)},b=e=>{var t=_A(),n=M(t);uA(n,{class:`message__bot-avatar`,get hide(){return r().hideAvatar}});var i=P(n,2);cA(M(i),{get componentName(){return r().componentName},get data(){return r().data}}),T(i),T(t),z(e,t)},x=e=>{var t=_i();F(()=>B(t,r().message)),z(e,t)};return H(v,e=>{r().type===`bot`?e(y):r().type===`component`?e(b,1):r().type===`user`&&e(x,2)}),T(_),T(h),ya(h,(e,t)=>Ly?.(e,t),()=>r().type===`user`?`chatPageLastUserMessage`:void 0),F(()=>{g=ka(h,1,`message container`,null,g,{"message--bot":r().type===`bot`||r().type===`component`,"message--user":r().type===`user`,"message--no-padding":r().type===`component`&&r().noSectionPadding}),W(h,`aria-label`,I(f))}),ma(3,h,()=>Dk,()=>l),z(e,h),D(m)}q(yA,{message:{},index:{},onmessageupdate:{},onbotmessageinit:{},onaskQuestion:{},isLast:{}},[],[],{mode:`open`});var bA=e=>Array.from(e.querySelectorAll(`a[href], button, input:not([type="hidden"]), textarea, select, details,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)),xA=e=>{let t=e.getRootNode();return`activeElement`in t?t.activeElement:document.activeElement};function SA(e,t){let{firstFocusableOnMount:n=!0,resetFocusOnDestroy:r=!0,avoidFocusLoop:i=!1}=t||{},a=xA(e),o=bA(e),s,c=new MutationObserver(()=>{o=bA(e)}),l=t=>{o&&e.dataset.disabled!==`true`&&t.key===`Tab`&&(t.shiftKey?xA(e)===o[0]&&(t.preventDefault(),o[o.length-1].focus()):xA(e)===o[o.length-1]&&(t.preventDefault(),o[0].focus()))};return o&&o.length>0&&!i&&(n&&(s=o[0],requestAnimationFrame(()=>{s?.focus({preventScroll:!0})})),e.addEventListener(`keydown`,l),c.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`disabled`,`aria-hidden`,`tabindex`]})),{destroy(){o&&o.length>0&&!i&&(o=null,s=null,e.removeEventListener(`keydown`,l),c.disconnect(),r&&a&&requestAnimationFrame(()=>{a.focus({preventScroll:!0})}))}}}var CA=`aside`,wA=L(`<div></div>`),TA=L(`<h2 class="chat-app__sheet-title"> </h2>`),EA=L(`<span class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></span>`),DA=L(`<div><div class="chat-app__sheet-header"><!> <!></div> <!></div>`),OA=L(`<!> <!>`,1),kA=L(`<h2 class="chat-app__aside-title"> </h2>`),AA=L(`<div><div class="chat-app__aside-container"><div class="chat-app__aside-header"><!> <div class="chat-app__aside-close"><button class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></button></div></div> <!></div></div>`);function jA(e,t){E(t,!0);let n=K(t,`title`,7),r=K(t,`isOpen`,7),i=K(t,`isMobile`,7),a=K(t,`showReferencesByDefault`,7),o=K(t,`onClose`,7),s=K(t,`children`,7),c=A(void 0),l=null,u=e=>{e.key===`Escape`&&o()()};tr(()=>{if(!i())if(r()){if(a()||document.addEventListener(`keydown`,u),I(c)&&(l=xA(I(c)),!a()||l?.hasAttribute(`data-references-toggle-button`))){let e=bA(I(c));e[0].setAttribute(Hy,`true`),e[0].focus({preventScroll:!0})}}else document.removeEventListener(`keydown`,u),l?.hasAttribute(`data-references-toggle-button`)?l.focus({preventScroll:!0}):Z.targets.chatInput?.focus({preventScroll:!0})});var d={get title(){return n()},set title(e){n(e),O()},get isOpen(){return r()},set isOpen(e){r(e),O()},get isMobile(){return i()},set isMobile(e){i(e),O()},get showReferencesByDefault(){return a()},set showReferencesByDefault(e){a(e),O()},get onClose(){return o()},set onClose(e){o(e),O()},get children(){return s()},set children(e){s(e),O()}},f=R(),p=N(f),m=e=>{var t=R(),i=N(t),a=e=>{var t=R();U(N(t),()=>nk,(e,t)=>{t(e,{onOpenChange:e=>{e||o()()},get open(){return r()},set open(e){r(e)},children:(e,t)=>{var r=R();U(N(r),()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var r=OA(),i=N(r);{let e=(e,t)=>{let n=()=>t?.().props,r=()=>t?.().open;var i=R(),a=N(i),o=e=>{var t=wA();G(t,()=>({class:`chat-app__sheet-overlay`,...n()})),ma(1,t,()=>Ek,()=>({duration:200})),ma(2,t,()=>Ek,()=>({duration:200,delay:150})),z(e,t)};H(a,e=>{r()&&e(o)}),z(e,i)};U(i,()=>Yw,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}var a=P(i,2);{let e=(e,t)=>{let r=()=>t?.().props,i=()=>t?.().open;var a=R(),o=N(a),c=e=>{var t=DA();G(t,()=>({...r()}));var i=M(t),a=M(i),o=e=>{var t=R();U(N(t),()=>xS,(e,t)=>{t(e,{children:(e,t)=>{var r=TA(),i=M(r,!0);T(r),F(()=>B(i,n())),z(e,r)},$$slots:{default:!0}})}),z(e,t)};H(a,e=>{n()&&e(o)}),U(P(a,2),()=>ik,(e,t)=>{t(e,{class:`chat-app__sheet-close`,children:(e,t)=>{var n=EA(),r=M(n),i=M(r,!0);T(r),Vy(P(r,2),{name:`dismiss`}),T(n),F(()=>B(i,Z.t.close)),z(e,n)},$$slots:{default:!0}})}),T(i),V(P(i,2),()=>s()??C),T(t),ya(t,e=>SA?.(e)),ma(1,t,()=>Dk,()=>({x:`100%`,opacity:1,duration:650,easing:xk})),ma(2,t,()=>Dk,()=>({x:`100%`,opacity:1,duration:500,easing:yk})),z(e,t)};H(o,e=>{i()&&e(c)}),z(e,a)},t=k(()=>!Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout);U(a,()=>sk,(n,r)=>{r(n,{class:`chat-app__sheet-content`,trapFocus:!1,forceMount:!0,get preventScroll(){return I(t)},child:e,$$slots:{child:!0}})})}z(e,r)},$$slots:{default:!0}})}),z(e,r)},$$slots:{default:!0}})}),z(e,t)};H(i,e=>{Z.targets.portals&&e(a)}),z(e,t)},h=e=>{var t=AA();let i;W(t,`id`,CA);var l=M(t),u=M(l),d=M(u),f=e=>{var t=kA(),r=M(t,!0);T(t),F(()=>B(r,n())),z(e,t)};H(d,e=>{n()&&e(f)});var p=P(d,2),m=M(p),h=M(m),g=M(h,!0);T(h),Vy(P(h,2),{name:`dismiss`}),T(m),ya(m,(e,t)=>Uy?.(e,t),()=>({text:Z.t.close,position:`bottom-right`,delay:0})),T(p),T(u),V(P(u,2),()=>s()??C),T(l),T(t),ya(t,(e,t)=>SA?.(e,t),()=>({firstFocusableOnMount:!1,resetFocusOnDestroy:!1,avoidFocusLoop:a()})),oo(t,e=>j(c,e),()=>I(c)),F(()=>{i=ka(t,1,`chat-app__aside`,null,i,{open:r()}),W(t,`role`,a()?`complementary`:`dialog`),W(t,`aria-modal`,a()?`false`:`true`),W(t,`aria-label`,Z.t.ariaReferencesRegion),W(t,`aria-hidden`,!r()),B(g,Z.t.close)}),si(`click`,m,function(...e){o()?.apply(this,e)}),z(e,t)};return H(p,e=>{i()?e(m):e(h,-1)}),z(e,f),D(d)}ci([`click`]),q(jA,{title:{},isOpen:{},isMobile:{},showReferencesByDefault:{},onClose:{},children:{}},[],[],{mode:`open`});var MA=L(`<div class="chat-app__close-button"><button class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></button></div>`);function NA(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`onclick`,7);var i={get onclick(){return r()},set onclick(e){r(e),O()}},a=MA(),o=M(a),s=M(o),c=M(s,!0);return T(s),Vy(P(s,2),{name:`dismiss`}),T(o),ya(o,(e,t)=>Uy?.(e,t),()=>({text:I(n).closeChat,position:`bottom-right`,delay:600})),T(a),F(()=>{W(o,`aria-label`,I(n).closeChat),B(c,I(n).closeChat)}),si(`click`,o,function(...e){r()?.apply(this,e)}),z(e,a),D(i)}ci([`click`]),q(NA,{onclick:{}},[],[],{mode:`open`});var PA=L(`<div><!></div>`);function FA(e,t){E(t,!0);let n=K(t,`checked`,7,!1),r=K(t,`class`,7,``);var i={get checked(){return n()},set checked(e=!1){n(e),O()},get class(){return r()},set class(e=``){r(e),O()}},a=PA();return Vy(M(a),{name:`checkbox`,class:`checkbox__icon`}),T(a),F(()=>{ka(a,1,`checkbox ${r()??``}`),W(a,`data-checked`,n())}),z(e,a),D(i)}q(FA,{checked:{},class:{}},[],[],{mode:`open`});var IA=L(`<button><!> <div class="chat-input__settings-button-label"> </div> <!></button>`),LA=L(`<span class="context-box__notification" data-type="error"> </span>`),RA=L(`<!> <!>`,1),zA=L(`<!> <!>`,1),BA=L(`<!> <!>`,1),VA=L(`<div><div><div class="context-box__content"><div class="context-box__header"><span class="sr-only"> </span> <span> <!></span> <button type="button" class="context-box__close-button btn btn--tertiary btn--square"><!></button></div> <div><!></div> <!></div></div></div>`),HA=L(`<!> <!>`,1),UA=L(`<div><div></div> <!></div>`);function WA(e,t){E(t,!0);let n=K(t,`settingName`,7),r=K(t,`iconName`,7),i=K(t,`currentValues`,7),a=K(t,`possibleValues`,7),o=K(t,`disabled`,7),s=k(()=>Z.t.selectors?.[n()]||(console.error(`Missing translation for setting ${n()}`),{values:{},name:n(),intro:n(),namePlural:n(),placeholder:n(),selectAll:Z.t.selectAll,selectNone:Z.t.selectNone})),c=k(()=>()=>i().length===0?`${I(s).placeholder}`:i().length===1?`1 ${I(s).name}`:`${i().length} ${I(s).namePlural||I(s).name}`),l=k(()=>Z.selectorsWithErrors.includes(n())),u={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},d=A(!1);tr(()=>{I(d)&&setTimeout(()=>{j(d,!1)},200)});let f=()=>{j(d,!0),Fy.setSelectorValue(n(),a()),Fy.setAriaLiveStatusMessage(Z.t.ariaAllSelected)},p=async()=>{j(d,!0),Fy.setSelectorValue(n(),[]),await Yr().then(()=>{let e=Z.t.ariaAllUnselected;I(l)&&(e+=`. ${Z.t.chooseAtLeastOneOption}`),Fy.setAriaLiveStatusMessage(e)})},m=()=>{j(d,!0);let e=Fy.resetSelectorToDefaults(n());Fy.setAriaLiveStatusMessage(`${Z.t.ariaAllReseted}: ${e.join(`, `)}`)},h=A(void 0),g=A(!1);var _={get settingName(){return n()},set settingName(e){n(e),O()},get iconName(){return r()},set iconName(e){r(e),O()},get currentValues(){return i()},set currentValues(e){i(e),O()},get possibleValues(){return a()},set possibleValues(e){a(e),O()},get disabled(){return o()},set disabled(e){o(e),O()}},v=UA(),y=M(v);return oo(y,e=>j(h,e),()=>I(h)),U(P(y,2),()=>ck,(e,t)=>{t(e,{get open(){return I(g)},set open(e){j(g,e,!0)},children:(e,t)=>{var _=HA(),v=N(_);{let e=(e,t)=>{let n=()=>t?.().props;var i=IA();G(i,()=>({type:`button`,class:`chat-input__settings-button btn btn--tertiary`,"data-has-error":I(l),...n(),disabled:o(),"aria-hidden":o(),tabindex:o()?-1:void 0}));var a=M(i);Vy(a,{get name(){return r()},class:`chat-input__settings-button-icon`});var s=P(a,2),u=M(s,!0);T(s),Vy(P(s,2),{name:`chevronDownSmall`,class:`chat-input__settings-button-chevron`}),T(i),F(e=>B(u,e),[()=>I(c)()]),z(e,i)};U(v,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}U(P(v,2),()=>AS,(e,t)=>{t(e,{get to(){return I(h)},children:(e,t)=>{var r=R(),o=N(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,o=()=>t?.().props,c=()=>t?.().open;var h=R(),_=N(h),v=e=>{var t=VA();G(t,()=>({...r()}));var c=M(t);G(c,()=>({...o()}));var h=M(c),_=M(h),v=M(_),y=M(v,!0);T(v);var b=P(v,2),x=M(b),S=P(x),ee=e=>{var t=LA(),n=M(t,!0);T(t),F(()=>B(n,Z.t.chooseAtLeastOneOption)),z(e,t)};H(S,e=>{I(l)&&e(ee)}),T(b);var te=P(b,2);Vy(M(te),{name:`menuClose`}),T(te),T(_);var ne=P(_,2);let re;U(M(ne),()=>VO,(e,t)=>{t(e,{get value(){return i()},onValueChange:e=>{Fy.setSelectorValue(n(),e)},class:`display-contents`,children:(e,t)=>{var n=R();Qi(N(n),17,a,Ji,(e,t)=>{let n=k(Fw),r=k(()=>I(s).values?.[I(t)]||I(t));var i=R(),a=N(i);{let e=(e,t)=>{let i=()=>t?.().checked;var a=RA(),o=N(a);FA(o,{get checked(){return i()}}),U(P(o,2),()=>_k,(e,t)=>{t(e,{get for(){return I(n)},children:(e,t)=>{$e();var n=_i();F(()=>B(n,I(r))),z(e,n)},$$slots:{default:!0}})}),z(e,a)};U(a,()=>zO,(i,a)=>{a(i,{get value(){return I(t)},class:`context-box__menu-item context-box__menu-item--option`,get id(){return I(n)},closeOnSelect:!1,onCheckedChange:async e=>{I(d)||await Yr().then(()=>{let t=e?Z.t.ariaSelected:Z.t.ariaUnselected,n=`${I(r)}, ${t}`;I(l)&&(n+=`. ${Z.t.chooseAtLeastOneOption}`),Fy.setAriaLiveStatusMessage(n)})},children:e,$$slots:{default:!0}})})}z(e,i)}),z(e,n)},$$slots:{default:!0}})}),T(ne),U(P(ne,2),()=>kO,(e,t)=>{t(e,{class:`context-box__footer`,children:(e,t)=>{var n=BA(),r=N(n),i=e=>{var t=zA(),n=N(t);U(n,()=>DO,(e,t)=>{t(e,{onclick:f,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{$e();var n=_i();F(()=>B(n,Z.t.selectAll)),z(e,n)},$$slots:{default:!0}})}),U(P(n,2),()=>DO,(e,t)=>{t(e,{onclick:p,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{$e();var n=_i();F(()=>B(n,Z.t.selectNone)),z(e,n)},$$slots:{default:!0}})}),z(e,t)};H(r,e=>{a().length>5&&e(i)}),U(P(r,2),()=>DO,(e,t)=>{t(e,{onclick:m,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{$e();var n=_i();F(()=>B(n,Z.t.resetToDefaults)),z(e,n)},$$slots:{default:!0}})}),z(e,n)},$$slots:{default:!0}})}),T(h),T(c),T(t),F(()=>{B(y,Z.t.ariaCloseWithEsc),B(x,`${(I(s).intro||I(s).name)??``} `),W(te,`aria-label`,Z.t.close),re=ka(ne,1,`context-box__menu context-box__menu--scrollable`,null,re,{"context-box__menu--two-cols":a().length>8,"context-box__menu--three-cols":a().length>16})}),si(`click`,te,()=>j(g,!1)),ma(3,c,()=>Dk,()=>u),z(e,t)};H(_,e=>{c()&&e(v)}),z(e,h)};U(o,()=>dk,(t,n)=>{n(t,{class:`context-box context-box--dropdown`,align:`start`,sideOffset:8,forceMount:!0,strategy:`absolute`,preventScroll:!1,child:e,$$slots:{child:!0}})})}z(e,r)},$$slots:{default:!0}})}),z(e,_)},$$slots:{default:!0}})}),T(v),z(e,v),D(_)}ci([`click`]),q(WA,{settingName:{},iconName:{},currentValues:{},possibleValues:{},disabled:{}},[],[],{mode:`open`});var GA=L(`<div><div class="radio__indicator"></div></div>`);function KA(e,t){E(t,!0);let n=K(t,`checked`,7,!1),r=K(t,`class`,7,``);var i={get checked(){return n()},set checked(e=!1){n(e),O()},get class(){return r()},set class(e=``){r(e),O()}},a=GA();return F(()=>{ka(a,1,`radio ${r()??``}`),W(a,`data-checked`,n())}),z(e,a),D(i)}q(KA,{checked:{},class:{}},[],[],{mode:`open`});var qA=L(`<button><!> <div class="chat-input__settings-button-label"><span class="chat-input__settings-button-label-name"> </span> </div> <!></button>`),JA=L(`<!> <!>`,1),YA=L(`<!> <!>`,1),XA=L(`<!> <!>`,1),ZA=L(`<div><div><div class="context-box__content"><div class="context-box__header"><span class="sr-only"> </span> <span> </span> <button type="button" class="context-box__close-button btn btn--tertiary btn--square"><!></button></div> <div><!></div> <!></div></div></div>`),QA=L(`<!> <!>`,1),$A=L(`<div><div></div> <!></div>`);function ej(e,t){E(t,!0);let n=K(t,`settingName`,7),r=K(t,`iconName`,7),i=K(t,`currentValue`,7),a=K(t,`possibleValues`,7),o=K(t,`allowEmpty`,7),s=K(t,`disabled`,7),c=k(()=>Z.t.selectors?.[n()]||(console.error(`Missing translation for setting ${n()}`),{values:{},name:n(),intro:n(),namePlural:n(),placeholder:n()})),l=k(()=>i()?I(c).values?.[i()]||i():I(c).placeholder),u=k(()=>Z.selectorsWithErrors.includes(n())),d={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},f=()=>{Fy.resetSelectorToDefaults(n())},p=A(void 0),m=A(!1);var h={get settingName(){return n()},set settingName(e){n(e),O()},get iconName(){return r()},set iconName(e){r(e),O()},get currentValue(){return i()},set currentValue(e){i(e),O()},get possibleValues(){return a()},set possibleValues(e){a(e),O()},get allowEmpty(){return o()},set allowEmpty(e){o(e),O()},get disabled(){return s()},set disabled(e){s(e),O()}},g=$A(),_=M(g);return oo(_,e=>j(p,e),()=>I(p)),U(P(_,2),()=>ck,(e,t)=>{t(e,{get open(){return I(m)},set open(e){j(m,e,!0)},children:(e,t)=>{var h=QA(),g=N(h);{let e=(e,t)=>{let n=()=>t?.().props;var i=qA();G(i,()=>({type:`button`,class:`chat-input__settings-button btn btn--tertiary`,"data-has-error":I(u),...n(),disabled:s(),"aria-hidden":s(),tabindex:s()?-1:void 0}));var a=M(i);Vy(a,{get name(){return r()},class:`chat-input__settings-button-icon`});var o=P(a,2),d=M(o),f=M(d);T(d);var p=P(d);T(o),Vy(P(o,2),{name:`chevronDownSmall`,class:`chat-input__settings-button-chevron`}),T(i),F(()=>{B(f,`${I(c).name??``}:`),B(p,` ${I(l)??``}`)}),z(e,i)};U(g,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}U(P(g,2),()=>AS,(e,t)=>{t(e,{get to(){return I(p)},children:(e,t)=>{var r=R(),s=N(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,s=()=>t?.().props,l=()=>t?.().open;var u=R(),p=N(u),h=e=>{var t=ZA();G(t,()=>({...r()}));var l=M(t);G(l,()=>({...s()}));var u=M(l),p=M(u),h=M(p),g=M(h,!0);T(h);var _=P(h,2),v=M(_,!0);T(_);var y=P(_,2);Vy(M(y),{name:`menuClose`}),T(y),T(p);var b=P(p,2);let x;var S=M(b);{let e=k(()=>i()||``);U(S,()=>LO,(t,r)=>{r(t,{get value(){return I(e)},onValueChange:e=>{e?Fy.setSelectorValue(n(),[e]):Fy.setSelectorValue(n(),[])},children:(e,t)=>{var n=XA(),r=N(n),i=e=>{let t=k(Fw);var n=R(),r=N(n);{let e=(e,n)=>{let r=()=>n?.().checked;var i=JA(),a=N(i);KA(a,{get checked(){return r()}}),U(P(a,2),()=>_k,(e,n)=>{n(e,{get for(){return I(t)},children:(e,t)=>{$e();var n=_i();F(()=>B(n,I(c).placeholder)),z(e,n)},$$slots:{default:!0}})}),z(e,i)};U(r,()=>NO,(n,r)=>{r(n,{value:``,class:`context-box__menu-item context-box__menu-item--option`,get id(){return I(t)},children:e,$$slots:{default:!0}})})}z(e,n)};H(r,e=>{o()&&e(i)}),Qi(P(r,2),17,a,Ji,(e,t)=>{let n=k(Fw);var r=R(),i=N(r);{let e=(e,r)=>{let i=()=>r?.().checked;var a=YA(),o=N(a);KA(o,{get checked(){return i()}}),U(P(o,2),()=>_k,(e,r)=>{r(e,{get for(){return I(n)},children:(e,n)=>{$e();var r=_i();F(()=>B(r,I(c).values?.[I(t)]||I(t))),z(e,r)},$$slots:{default:!0}})}),z(e,a)};U(i,()=>NO,(r,i)=>{i(r,{get value(){return I(t)},class:`context-box__menu-item context-box__menu-item--option`,get id(){return I(n)},children:e,$$slots:{default:!0}})})}z(e,r)}),z(e,n)},$$slots:{default:!0}})})}T(b),U(P(b,2),()=>kO,(e,t)=>{t(e,{class:`context-box__footer`,children:(e,t)=>{var n=R();U(N(n),()=>DO,(e,t)=>{t(e,{onclick:f,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{$e();var n=_i();F(()=>B(n,Z.t.resetToDefaults)),z(e,n)},$$slots:{default:!0}})}),z(e,n)},$$slots:{default:!0}})}),T(u),T(l),T(t),F(()=>{B(g,Z.t.ariaCloseWithEsc),B(v,I(c).intro||I(c).name),W(y,`aria-label`,Z.t.close),x=ka(b,1,`context-box__menu context-box__menu--scrollable`,null,x,{"context-box__menu--two-cols":a().length>8,"context-box__menu--three-cols":a().length>16})}),si(`click`,y,()=>j(m,!1)),ma(3,l,()=>Dk,()=>d),z(e,t)};H(p,e=>{l()&&e(h)}),z(e,u)};U(s,()=>dk,(t,n)=>{n(t,{class:`context-box context-box--dropdown`,align:`start`,sideOffset:8,forceMount:!0,strategy:`absolute`,preventScroll:!1,child:e,$$slots:{child:!0}})})}z(e,r)},$$slots:{default:!0}})}),z(e,h)},$$slots:{default:!0}})}),T(g),z(e,g),D(h)}ci([`click`]),q(ej,{settingName:{},iconName:{},currentValue:{},possibleValues:{},allowEmpty:{},disabled:{}},[],[],{mode:`open`});function tj(e,t){E(t,!0);let n=K(t,`chatSettingConfig`,7),r=K(t,`settingsIsOpen`,7);var i={get chatSettingConfig(){return n()},set chatSettingConfig(e){n(e),O()},get settingsIsOpen(){return r()},set settingsIsOpen(e){r(e),O()}},a=R(),o=N(a),s=e=>{{let t=k(()=>n().iconName||n().settingName),i=k(()=>!r());ej(e,{get settingName(){return n().settingName},get iconName(){return I(t)},get currentValue(){return Z.data.selectorValues[n().settingName][0]},get possibleValues(){return n().values},get allowEmpty(){return n().allowEmpty},get disabled(){return I(i)}})}},c=e=>{{let t=k(()=>n().iconName||n().settingName),i=k(()=>!r());WA(e,{get settingName(){return n().settingName},get iconName(){return I(t)},get currentValues(){return Z.data.selectorValues[n().settingName]},get possibleValues(){return n().values},get disabled(){return I(i)}})}};return H(o,e=>{n().type===`single-select`?e(s):n().type===`multi-select`&&e(c,1)}),z(e,a),D(i)}q(tj,{chatSettingConfig:{},settingsIsOpen:{}},[],[],{mode:`open`});function nj(e,t){E(t,!0);let n=K(t,`settingsIsOpen`,7);var r={get settingsIsOpen(){return n()},set settingsIsOpen(e){n(e),O()}},i=R();return Qi(N(i),17,()=>Z.data.chatConfig.selectorsConfig,Ji,(e,t)=>{tj(e,{get settingsIsOpen(){return n()},get chatSettingConfig(){return I(t)}})}),z(e,i),D(r)}q(nj,{settingsIsOpen:{}},[],[],{mode:`open`});var rj=gi(`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><defs><linearGradient x1="0" y1="1" x2="0" y2="0"><stop></stop><stop></stop></linearGradient><mask maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24"><g stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><path d="M12 19v4"></path><path d="M8 23h8"></path></g></mask></defs><rect width="24" height="24"></rect></svg>`);function ij(e,t){E(t,!0);let n=K(t,`level`,7),r=K(t,`class`,7,``),i=K(t,`baseColor`,7,`var(--mic-base-color)`),a=K(t,`accentColor`,7,`var(--mic-accent-color)`),o=Math.random().toString(36).substring(2),s=`audio-level-gradient-${o}`,c=`audio-level-mask-${o}`;var l={get level(){return n()},set level(e){n(e),O()},get class(){return r()},set class(e=``){r(e),O()},get baseColor(){return i()},set baseColor(e=`var(--mic-base-color)`){i(e),O()},get accentColor(){return a()},set accentColor(e=`var(--mic-accent-color)`){a(e),O()}},u=rj(),d=M(u),f=M(d),p=M(f),m=P(p);T(f);var h=P(f);T(d);var g=P(d);return T(u),F(()=>{ka(u,0,`audio-level-mic-svg ${r()??``}`),W(f,`id`,s),W(p,`offset`,n()/100),W(p,`stop-color`,a()),W(m,`offset`,n()/100),W(m,`stop-color`,i()),W(h,`id`,c),W(g,`fill`,`url(#${s})`),W(g,`mask`,`url(#${c})`)}),z(e,u),D(l)}q(ij,{level:{},class:{},baseColor:{},accentColor:{}},[],[],{mode:`open`});var aj=L(`<button type="button"><div class="mic-icon" aria-hidden="true"><!></div></button>`);function oj(e,t){E(t,!0);let n=typeof window<`u`,r=k(()=>Z.t),i=K(t,`class`,7),a=k(()=>!!Z.currentAudioRecorder),o=k(()=>n&&py.isSupported()),s=k(()=>Z.currentAudioVolume||0),c=A(!1),l=async()=>{try{I(a)?Fy.onStopSpeechRecognition():await Fy.onStartSpeechRecognition(),j(c,!1)}catch(e){console.error(`Speech recognition error:`,e),j(c,!0)}};tr(()=>()=>{I(a)&&Fy.onStopSpeechRecognition()});var u={get class(){return i()},set class(e){i(e),O()}},d=R(),f=N(d),p=e=>{var t=aj();let n;var o=M(t);ij(M(o),{get level(){return I(s)}}),T(o),T(t),F(()=>{W(t,`aria-label`,I(a)?I(r).chatInputStopListening:I(r).chatInputStartListening),n=ka(t,1,`chat-input__mic-button transition-colors ${i()??``}`,null,n,{"chat-input__mic-button--listening":I(a),"chat-input__mic-button--error":I(c)})}),si(`click`,t,l),z(e,t)};return H(f,e=>{I(o)&&e(p)}),z(e,d),D(u)}ci([`click`]),q(oj,{class:{}},[],[],{mode:`open`});var sj=L(`<div class="chat-input__notification" data-type="error" aria-live="assertive"><!> <span class="chat-input__notification-label"> </span></div>`),cj=L(`<button><!></button>`),lj=L(`<button type="button" class="chat-input__settings-button btn btn--tertiary"><!> <div class="chat-input__settings-button-label"> </div></button>`),uj=L(`<!> <!>`,1),dj=L(`<nav><h2 class="sr-only"> </h2> <div class="chat-input__toggle-area"><!></div> <div class="chat-input__settings"><!></div></nav>`),fj=L(`<form><div class="animated-height chat-input__notification-wrapper"><div><!></div></div> <div role="region"><h2 class="sr-only"> </h2> <textarea name="chat-input-value" class="chat-input__textarea"></textarea> <!> <div class="chat-input__buttons"><!> <button type="submit"><span class="sr-only"> </span> <!></button></div></div></form>`);function pj(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`class`,7),i=K(t,`ariaLabel`,7),a=K(t,`onSubmit`,7),o=K(t,`avoidFocusOnMount`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`,`ariaLabel`,`onSubmit`,`avoidFocusOnMount`]),c=k(()=>Z.data.chatInputValue),l=k(()=>I(c).trim().length>(Z.data.chatConfig.questionLengthLimit||600)),u=k(()=>I(c).trim()&&!I(l)&&!Z.data.questionHasPii),d=k(()=>Z.data.currentConversationState===`answering`||Z.data.currentConversationState===`searching`),f=k(()=>!I(u)&&!I(d)),p=A(void 0),m,h=k(()=>Z.data?.chatConfig?.allowAudioInput??!0),g=k(()=>!!Z.currentAudioRecorder),_=k(()=>Z.isTranscribing),v=A(0),y=A(void 0),b=A(void 0),x=A(kn(Z.data.selectorsIsOpen)),S=A(kn(Z.data.selectorsIsOpen)),ee=k(()=>Z.data.chatConfig.selectorsConfig.length>0),te=k(()=>Z.data.chatConfig.showExpandedSelectors),ne=A(void 0),re,ie=k(()=>{let e=``;return Z.data.questionHasPii?e=Z.piiTranslations[Z.data.questionHasPii]:I(l)&&(e=I(n).messageTooLong?.replace(`{questionLengthLimit}`,(Z.data.chatConfig.questionLengthLimit||600).toString())?.replace(`{questionLength}`,I(c).trim().length.toString())),e}),ae=k(()=>()=>I(_)?I(n).messageBotLoading:I(g)&&I(n).chatInputPlaceholderListening?I(n).chatInputPlaceholderListening:I(n).chatInputPlaceholder),C=()=>{I(d)?Fy.abort():I(u)&&(a()(I(c)),fe(),fy()&&I(p)?.blur())},oe=e=>{e.preventDefault(),C()},se=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),C())},ce=e=>{e.composedPath()[0].matches(`button, a, textarea, input`)||setTimeout(()=>{I(p)?.blur()},100)},le=()=>{fy()&&window.addEventListener(`pointerdown`,ce)},ue=()=>{fy()&&window.removeEventListener(`pointerdown`,ce)},de=e=>{if(!e.value){e.value=e.placeholder;let t=Math.ceil(e.scrollHeight);return e.value=``,t}return e.scrollHeight},fe=()=>{Yr().then(()=>{if(I(p)){I(p).style.height=`auto`;let e=de(I(p));I(p).style.height=`${e}px`}})};tr(()=>{I(c)&&fe()});let pe=e=>{fe(),Fy.onInput(e.currentTarget.value),re&&clearTimeout(re),re=setTimeout(()=>{I(ie)&&Fy.setAriaLiveStatusMessage(I(ie))},1e3)},me=()=>{j(x,!1),Yr().then(()=>I(y)?.focus())};tr(()=>{if(I(p))return m=new ResizeObserver(()=>{fe()}),m.observe(I(p)),()=>{m.disconnect()}}),tr(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`prefill`);t&&(j(c,t),e.delete(`prefill`),history.replaceState(null,``,`${location.pathname}?${e.toString()}`))}),Ri(()=>{!fy()&&!o()&&setTimeout(()=>{I(p)?.focus()},100)}),tr(()=>{let e=I(x)&&!I(S);j(S,I(x),!0),e&&(I(y)?.setAttribute(Hy,`true`),Z.data.chatConfig.showExpandedSelectors||Yr().then(()=>I(b)?.focus({preventScroll:!0})))});function he(){I(p)?.focus()}var ge={focus:he,get class(){return r()},set class(e){r(e),O()},get ariaLabel(){return i()},set ariaLabel(e){i(e),O()},get onSubmit(){return a()},set onSubmit(e){a(e),O()},get avoidFocusOnMount(){return o()},set avoidFocusOnMount(e){o(e),O()}},_e=fj();oi(`resize`,Mn,fe),G(_e,()=>({name:`chat-input`,onsubmit:oe,class:`chat-input ${r()??``}`,...s}));var ve=M(_e);let ye;var be=M(ve),xe=M(be),Se=e=>{var t=sj(),n=M(t);Vy(n,{name:`warning`,class:`chat-input__notification-icon`});var r=P(n,2),i=M(r,!0);T(r),T(t),F(()=>B(i,I(ie))),ma(2,t,()=>Ek,()=>({duration:100,delay:1e3})),z(e,t)};H(xe,e=>{I(ie)&&e(Se)}),T(be),T(ve);var Ce=P(ve,2);let we;var Te=M(Ce),Ee=M(Te,!0);T(Te);var De=P(Te,2);Gn(De),W(De,`rows`,1),oo(De,e=>j(p,e),()=>I(p)),ya(De,(e,t)=>Iy?.(e,t),()=>`chatInput`),ya(De,(e,t)=>Ly?.(e,t),()=>`chatInput`);var Oe=P(De,2),ke=e=>{var t=R(),r=N(t);{let e=e=>{var t=dj(),r=M(t),i=M(r,!0);T(r);var a=P(r,2),o=M(a);{let e=(e,t)=>{let r=()=>t?.().props;var i=cj();G(i,()=>({class:`chat-input__settings-toggle-button btn btn--tertiary btn--square`,...r(),disabled:I(x),"aria-hidden":I(x),"aria-label":I(n).showSettings,tabindex:I(x)?-1:void 0})),Vy(M(i),{name:`settings`}),T(i),ya(i,(e,t)=>Uy?.(e,t),()=>({text:I(x)?``:I(n).showSettings,position:`top`,delay:0})),oo(i,e=>j(y,e),()=>I(y)),z(e,i)};U(o,()=>fT,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}T(a);var s=P(a,2);U(M(s),()=>uT,(e,t)=>{t(e,{class:`display-contents`,forceMount:!0,children:(e,t)=>{var r=uj(),i=N(r),a=e=>{var t=lj(),r=M(t);Vy(r,{name:`settingsClose`,class:`chat-input__settings-button-icon`});var i=P(r,2),a=M(i,!0);T(i),T(t),oo(t,e=>j(b,e),()=>I(b)),F(()=>{W(t,`aria-label`,I(n).hideSettings),W(t,`aria-hidden`,!I(x)),t.disabled=!I(x),W(t,`tabindex`,I(x)?void 0:-1),B(a,I(n).hideSettings)}),si(`click`,t,me),z(e,t)};H(i,e=>{I(te)||e(a)}),nj(P(i,2),{get settingsIsOpen(){return I(x)}}),z(e,r)},$$slots:{default:!0}})}),T(s),T(t),F(()=>{W(t,`aria-label`,I(n).ariaSettingsRegion),B(i,I(n).ariaSettings)}),io(s,`clientHeight`,e=>j(v,e)),z(e,t)};U(r,()=>cT,(t,n)=>{n(t,{get open(){return I(x)},set open(e){j(x,e,!0)},child:e,$$slots:{child:!0}})})}z(e,t)};H(Oe,e=>{I(ee)&&e(ke)});var Ae=P(Oe,2),je=M(Ae),Me=e=>{oj(e,{})};H(je,e=>{I(h)&&e(Me)});var Ne=P(je,2);let Pe;var Fe=M(Ne),Ie=M(Fe,!0);T(Fe);var Le=P(Fe,2),Re=e=>{Vy(e,{name:`abort`,class:`chat-input__submit-icon`})},ze=e=>{Vy(e,{name:`submit`,class:`chat-input__submit-icon`})};return H(Le,e=>{I(d)?e(Re):e(ze,-1)}),T(Ne),T(Ae),T(Ce),T(_e),F(e=>{ye=ja(ve,``,ye,{height:I(ie)?`${I(ne)}px`:`0px`}),we=ka(Ce,1,`chat-input__grid`,null,we,{"chat-input__grid--has-settings":I(ee),"chat-input__grid--settings-is-open":I(x)}),ja(Ce,`--chat-input-settings-height: ${I(x)?I(v):0}px`),W(Ce,`aria-label`,I(n).ariaAskQuestionRegion),B(Ee,I(n).ariaAskQuestion),Ga(De,I(c)),W(De,`aria-label`,i()),W(De,`placeholder`,e),Ne.disabled=I(f),Pe=ka(Ne,1,`chat-input__submit-button transition-colors`,null,Pe,{"chat-input__submit-button--deactivated":I(f)}),B(Ie,I(d)?I(n).chatInputAbort:I(n).chatInputSubmit)},[()=>I(ae)()]),io(be,`clientHeight`,e=>j(ne,e)),si(`input`,De,pe),si(`focusin`,De,le),si(`focusout`,De,ue),oi(`keypress`,De,se),z(e,_e),D(ge)}ci([`input`,`focusin`,`focusout`,`click`]),q(pj,{class:{},ariaLabel:{},onSubmit:{},avoidFocusOnMount:{}},[],[`focus`],{mode:`open`});var mj=L(`<label class="classification-feedback__option btn btn--secondary"><input type="radio" name="quality"/> </label>`),hj=L(`<fieldset class="classification-feedback__item"><legend class="classification-feedback__label"> </legend> <!></fieldset>`),gj=L(`<label class="classification-feedback__option btn btn--secondary"><input type="radio" name="impact"/> </label>`),_j=L(`<fieldset class="classification-feedback__item"><legend class="classification-feedback__label"> </legend> <!></fieldset>`),vj=L(`<div class="classification-feedback"><div class="classification-feedback__title"> </div> <!> <!></div>`);function yj(e,t){E(t,!0);let n=[],r=[],i=k(()=>Z.t),a=K(t,`impact`,15),o=K(t,`quality`,15),s=K(t,`classificationConfig`,7);var c={get impact(){return a()},set impact(e){a(e),O()},get quality(){return o()},set quality(e){o(e),O()},get classificationConfig(){return s()},set classificationConfig(e){s(e),O()}},l=R(),u=N(l),d=e=>{var t=vj(),c=M(t),l=M(c,!0);T(c);var u=P(c,2),d=e=>{var t=hj(),r=M(t),i=M(r,!0);T(r),Qi(P(r,2),17,()=>s().quality.options,Ji,(e,t)=>{var r=mj(),i=M(r);Wa(i);var a,s=P(i);T(r),F(()=>{a!==(a=I(t).value)&&(i.value=(i.__value=I(t).value)??``),B(s,` ${I(t).label??``}`)}),$a(n,[],i,()=>(I(t).value,o()),o),z(e,r)}),T(t),F(()=>B(i,s().quality.label)),z(e,t)};H(u,e=>{s().quality&&s().quality.options.length!==0&&e(d)});var f=P(u,2),p=e=>{var t=_j(),n=M(t),i=M(n,!0);T(n),Qi(P(n,2),17,()=>s().impact.options,Ji,(e,t)=>{var n=gj(),i=M(n);Wa(i);var o,s=P(i);T(n),F(()=>{o!==(o=I(t).value)&&(i.value=(i.__value=I(t).value)??``),B(s,` ${I(t).label??``}`)}),$a(r,[],i,()=>(I(t).value,a()),a),z(e,n)}),T(t),F(()=>B(i,s().impact.label)),z(e,t)};H(f,e=>{s().impact&&s().impact.options.length!==0&&e(p)}),T(t),F(()=>B(l,I(i).classificationTitle)),z(e,t)};return H(u,e=>{s()&&(s().quality||s().impact)&&e(d)}),z(e,l),D(c)}q(yj,{impact:{},quality:{},classificationConfig:{}},[],[],{mode:`open`});var bj=L(`<div></div>`),xj=L(`<div><!></div>`),Sj=L(`<span class="sr-only"> </span> <!>`,1),Cj=L(`<div class="dialog-footer"><!></div>`),wj=L(`<div><div class="dialog-header"><!> <!></div> <!> <!></div>`),Tj=L(`<!> <!>`,1);function Ej(e,t){E(t,!0);let n=K(t,`open`,7),r=K(t,`content`,7),i=K(t,`title`,7),a=K(t,`footer`,7),o=K(t,`onClose`,7),s=A(void 0),c=A(void 0),l={duration:Number(Z.theme.components.dialog.custom?.transitionDuration)||200,delay:Number(Z.theme.components.dialog.custom?.transitionDelay)||0,y:Number(Z.theme.components.dialog.custom?.transitionY)||10},u=e=>{e||o()()};tr(()=>{if(n()&&I(s)&&I(c)&&I(c).textContent){let e=nl(I(c).textContent.trim());I(s).setAttribute(`aria-label`,e),I(s).removeAttribute(`aria-labelledby`),bA(I(s))[0].focus({preventScroll:!0})}});var d={get open(){return n()},set open(e){n(e),O()},get content(){return r()},set content(e){r(e),O()},get title(){return i()},set title(e){i(e),O()},get footer(){return a()},set footer(e){a(e),O()},get onClose(){return o()},set onClose(e){o(e),O()}},f=R(),p=N(f),m=e=>{var t=R();U(N(t),()=>nk,(e,t)=>{t(e,{get open(){return n()},onOpenChange:u,children:(e,t)=>{var n=R();U(N(n),()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var n=Tj(),o=N(n);{let e=(e,t)=>{let n=()=>t?.().props,r=()=>t?.().open;var i=R(),a=N(i),o=e=>{var t=bj();G(t,()=>({...n(),class:`dialog-overlay`})),ma(3,t,()=>Ek,()=>l),z(e,t)};H(a,e=>{r()&&e(o)}),z(e,i)};U(o,()=>Yw,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}var u=P(o,2);{let e=(e,t)=>{let n=()=>t?.().props,o=()=>t?.().open;var u=R(),d=N(u),f=e=>{var t=wj();G(t,()=>({...n(),class:`dialog-content`}));var o=M(t),u=M(o);U(u,()=>xS,(e,t)=>{t(e,{class:`dialog-title h4`,children:(e,t)=>{var n=xj();V(M(n),()=>i()??C),T(n),oo(n,e=>j(c,e),()=>I(c)),z(e,n)},$$slots:{default:!0}})}),U(P(u,2),()=>ik,(e,t)=>{t(e,{class:`dialog-close`,children:(e,t)=>{var n=Sj(),r=N(n),i=M(r,!0);T(r),Vy(P(r,2),{name:`dismiss`}),F(()=>B(i,Z.t.close)),z(e,n)},$$slots:{default:!0}})}),T(o);var d=P(o,2);U(d,()=>Zw,(e,t)=>{t(e,{class:`dialog-description text-container`,children:(e,t)=>{var n=R();V(N(n),r),z(e,n)},$$slots:{default:!0}})});var f=P(d,2),p=e=>{var t=Cj();V(M(t),a),T(t),z(e,t)};H(f,e=>{a()&&e(p)}),T(t),ya(t,(e,t)=>SA?.(e,t),()=>({firstFocusableOnMount:!1})),oo(t,e=>j(s,e),()=>I(s)),ma(3,t,()=>Dk,()=>l),z(e,t)};H(d,e=>{o()&&e(f)}),z(e,u)},t=k(()=>!Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout);U(u,()=>sk,(n,r)=>{r(n,{trapFocus:!1,forceMount:!0,get preventScroll(){return I(t)},child:e,$$slots:{child:!0}})})}z(e,n)},$$slots:{default:!0}})}),z(e,n)},$$slots:{default:!0}})}),z(e,t)};return H(p,e=>{Z.targets.portals&&e(m)}),z(e,f),D(d)}q(Ej,{open:{},content:{},title:{},footer:{},onClose:{}},[],[],{mode:`open`});var Dj=L(`<div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"/></div>`),Oj=L(`<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <!> <button type="submit" class="btn btn--primary"> </button></form>`);function kj(e,t){E(t,!0);let n=k(()=>Z.t),r=A(``),i=A(``),a=A(void 0),o=A(void 0),s=k(()=>I(a)!==void 0||I(o)!==void 0||I(r)!==``);{let t=e=>{var t=R();ia(N(t),()=>I(n).feedbackFormTitle),z(e,t)},c=e=>{var t=Oj(),c=M(t);yj(c,{get classificationConfig(){return Z.data.chatConfig.classification},get impact(){return I(a)},set impact(e){j(a,e,!0)},get quality(){return I(o)},set quality(e){j(o,e,!0)}});var l=P(c,2),u=M(l),d=M(u,!0);T(u);var f=P(u,2);Gn(f),T(l);var p=P(l,2),m=e=>{var t=Dj(),r=M(t),a=M(r,!0);T(r);var o=P(r,2);Wa(o),T(t),F(()=>{B(a,I(n).feedbackFormEmail),W(o,`placeholder`,I(n).feedbackFormEmailPlaceholder)}),Za(o,()=>I(i),e=>j(i,e)),z(e,t)};H(p,e=>{Z.data.chatConfig.showOverallFeedbackEmail&&e(m)});var h=P(p,2),g=M(h,!0);T(h),T(t),F(()=>{B(d,I(n).feedbackFormMessage),W(f,`placeholder`,I(n).feedbackFormMessagePlaceholder),h.disabled=!I(s),B(g,I(n).send)}),oi(`submit`,t,async e=>{e.preventDefault(),Z.data.chatConfig.classification?await Fy.submitFeedback({email:I(i),message:I(r),classification:{impact:I(a),quality:I(o)}}):await Fy.submitFeedback({email:I(i),message:I(r)}),j(a,void 0),j(o,void 0),j(r,``),Fy.closeFeedback()}),Za(f,()=>I(r),e=>j(r,e)),z(e,t)},l=k(()=>!!Z.data.conversationFeedbackId||Z.data.conversationFeedbackIsOpen);Ej(e,{get open(){return I(l)},get onClose(){return Fy.closeFeedback},title:t,content:c,$$slots:{title:!0,content:!0}})}D()}q(kj,{},[],[],{mode:`open`});var Aj=L(`<div class="chat-page__give-feedback"><button class="btn btn--primary" aria-haspopup="dialog"> </button></div>`),jj=L(`<div class="chat-page__footer-text"></div>`),Mj=L(`<section class="chat-page"><!> <div class="chat-page__body"><h2 class="sr-only"></h2> <div class="chat-page__messages"></div> <div class="chat-page__buttons"><!></div></div> <div><div class="container"><div class="chat-page__footer-content"><button aria-hidden="true"><span class="sr-only"> </span> <!></button> <!> <a class="skip-link"> </a> <!></div></div></div></section>`);function Nj(e,t){E(t,!0);let n=k(()=>Z.t),r=A(!1),i=A(void 0),a=A(void 0),o=A(void 0),s=A(void 0),c=A(void 0),l,u=e=>{l&&qy(l,l.scrollHeight-l.clientHeight,e,`scrollTop`,yk)},d=()=>{l&&j(r,!(l.scrollHeight-l.scrollTop-l.clientHeight<90))},f,p=A(!1),m=()=>{j(p,!1),f?.disconnect(),f=new IntersectionObserver(([e])=>{e.isIntersecting?(j(p,!0),f.disconnect()):j(p,!1)},{root:Z.targets.scrollContainer,rootMargin:`0px 0px -30% 0px`}),I(s)&&f.observe(I(s))};Ri(()=>(m(),window.addEventListener(`resize`,m),()=>{f?.disconnect(),window.removeEventListener(`resize`,m)}));let h=()=>{d()},g=e=>{if(e.altKey&&e.code===`KeyR`){e.preventDefault();let t=Z.data.history.findLast(e=>e.type===`user`)?.message;Fy.goto({name:`start-page`,prefill:t})}},_=()=>{setTimeout(()=>{let{chatAppContainer:e,chatAppHeader:t,chatPageMessages:n,chatPageLastUserMessage:r}=Z.targets;if(!(Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout&&!Z.data.isInlineLayoutContained)&&e&&t&&I(s)&&n&&I(a)&&I(o)&&r){let i=e.clientHeight-t.offsetHeight-I(s).offsetHeight-I(o).offsetHeight-r.offsetHeight-parseInt(getComputedStyle(n).gap)*2;i>0?(I(a).style.setProperty(`--last-bot-message-min-height`,`${i}px`),u(1e3)):r.scrollIntoView({behavior:`smooth`})}},50)},v=()=>{Fy.onSubmit(!0)};tr(()=>{I(i)&&(l=I(i).closest(`.chat-app__main`))}),tr(()=>{if(l)return l.addEventListener(`scroll`,d),()=>{l.removeEventListener(`scroll`,d)}});let y=e=>{let t=Z.data.history[e-1];t&&t.type===`user`&&(Fy.updateChatInput(t.message),I(c)?.focus())};var b=Mj();oi(`resize`,Mn,h),oi(`keypress`,Mn,g);var x=M(b);kj(x,{});var S=P(x,2),ee=M(S);ia(ee,()=>I(n).ariaChatHistory,!0),T(ee);var te=P(ee,2);Qi(te,23,()=>Z.data.history,e=>e?.id??e?.time,(e,t,n)=>{{let r=k(()=>I(n)===Z.data.history.length-1);yA(e,{get message(){return I(t)},get index(){return I(n)},onmessageupdate:d,onbotmessageinit:_,onaskQuestion:()=>{y(I(n))},get isLast(){return I(r)}})}}),T(te),oo(te,e=>j(a,e),()=>I(a)),ya(te,(e,t)=>Ly?.(e,t),()=>`chatPageMessages`);var ne=P(te,2),re=M(ne),ie=e=>{var t=Aj(),r=M(t),i=M(r,!0);T(r),T(t),F(()=>{W(r,`aria-expanded`,Z.data.conversationFeedbackIsOpen),B(i,I(n).giveFeedback)}),si(`click`,r,()=>Fy.openConversationFeedback()),z(e,t)};H(re,e=>{Z.data.chatConfig.showOverallFeedbackButton&&e(ie)}),T(ne),oo(ne,e=>j(o,e),()=>I(o)),T(S);var ae=P(S,2),C=M(ae),oe=M(C),se=M(oe);let ce;W(se,`tabindex`,-1);var le=M(se),ue=M(le,!0);T(le),Vy(P(le,2),{name:`chevronDown`}),T(se);var de=P(se,2);oo(pj(de,{onSubmit:v,class:`chat-page__chat-input`}),e=>j(c,e,!0),()=>I(c));var fe=P(de,2),pe=M(fe,!0);T(fe);var me=P(fe,2),he=e=>{var t=jj();ia(t,()=>I(n).chatFooterText,!0),T(t),z(e,t)};H(me,e=>{I(n).chatFooterText!==void 0&&e(he)}),T(oe),T(C),T(ae),oo(ae,e=>j(s,e),()=>I(s)),T(b),oo(b,e=>j(i,e),()=>I(i)),F(()=>{ka(ae,1,Ca([`chat-page__footer`,{"chat-page__footer--unsticked":I(p)}])),ce=ka(se,1,`chat-page__scroll-to-bottom btn btn--secondary btn--square`,null,ce,{"chat-page__scroll-to-bottom--hidden":!I(r)}),se.disabled=!I(r),B(ue,I(n).scrollToBottom),W(fe,`href`,`#${UP}`),B(pe,I(n).ariaGotoMainNavigation)}),si(`click`,se,()=>{u(500)}),si(`click`,fe,function(...e){WP?.apply(this,e)}),z(e,b),D()}ci([`click`]),q(Nj,{},[],[],{mode:`open`});var Pj=L(`<div><!> <h2 class="introduction__title"></h2></div>`);function Fj(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`class`,7);var i={get class(){return r()},set class(e){r(e),O()}},a=Pj(),o=M(a);uA(o,{class:`introduction__avatar`,isLarge:!0});var s=P(o,2);return ia(s,()=>I(n).introductionTitle,!0),T(s),T(a),F(()=>ka(a,1,`introduction ${r()??``}`)),z(e,a),D(i)}q(Fj,{class:{}},[],[],{mode:`open`});var Ij=L(`<div class="consent-page__disclaimer text-container fly-in" style="--fly-in-id: 1;"></div>`),Lj=L(`<button class="btn btn--secondary" type="button"> </button>`),Rj=L(`<section><!> <!> <div class="consent-page__actions fly-in" style="--fly-in-id: 2;"><!> <button class="btn btn--primary" type="button"> </button></div></section>`);function zj(e,t){E(t,!0);let n=k(()=>Z.t),r=k(()=>I(n).popups?.find(e=>e.actions?.some(e=>e.action===`acceptTerms`))),i=A(!1);tr(()=>{j(i,!0)});var a=Rj();let o;var s=M(a);Fj(s,{class:`consent-page__introduction fly-in`});var c=P(s,2),l=e=>{var t=Ij();ia(t,()=>I(n).termsInvitationToConsent,!0),T(t),z(e,t)};H(c,e=>{I(n).termsInvitationToConsent&&e(l)});var u=P(c,2),d=M(u),f=e=>{var t=Lj(),i=M(t,!0);T(t),F(()=>B(i,I(n).termsReadButton)),si(`click`,t,()=>window.location.hash=I(r).hash),z(e,t)};H(d,e=>{I(r)&&e(f)});var p=P(d,2),m=M(p,!0);T(p),T(u),T(a),F(()=>{o=ka(a,1,`consent-page container`,null,o,{mounted:I(i)}),B(m,I(n).termsAcceptButton)}),si(`click`,p,()=>Fy.acceptTerms()),z(e,a),D()}ci([`click`]),q(zj,{},[],[],{mode:`open`});var Bj=L(`<button><span class="sr-only"> </span> <!></button>`),Vj=L(`<div><div><button type="button" class="context-box__popover-close"><!> <span class="sr-only"> </span></button> <!></div></div>`),Hj=L(`<!> <!>`,1),Uj=L(`<div><!></div>`);function Wj(e,t){E(t,!0);let n={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},r=K(t,`openLabel`,7),i=K(t,`closeLabel`,7),a=K(t,`openIcon`,7),o=K(t,`closeIcon`,7),s=K(t,`ariaLabel`,7),c=K(t,`children`,7),l=K(t,`class`,7),u=K(t,`contentClass`,7),d=K(t,`portal`,7),f=A(!1),p=A(void 0);tr(()=>{I(f)?(I(p)?.setAttribute(Hy,`true`),Qr(()=>Fy.setOpenOverlay(!0))):Qr(()=>Fy.setOpenOverlay(!1))});var m={get openLabel(){return r()},set openLabel(e){r(e),O()},get closeLabel(){return i()},set closeLabel(e){i(e),O()},get openIcon(){return a()},set openIcon(e){a(e),O()},get closeIcon(){return o()},set closeIcon(e){o(e),O()},get ariaLabel(){return s()},set ariaLabel(e){s(e),O()},get children(){return c()},set children(e){c(e),O()},get class(){return l()},set class(e){l(e),O()},get contentClass(){return u()},set contentClass(e){u(e),O()},get portal(){return d()},set portal(e){d(e),O()}},h=Uj();return U(M(h),()=>vk,(e,t)=>{t(e,{get open(){return I(f)},set open(e){j(f,e,!0)},children:(e,t)=>{var l=Hj(),m=N(l);{let e=(e,t)=>{let n=()=>t?.().props;var s=Bj();G(s,()=>({class:`context-box__trigger btn btn--tertiary btn--square`,...n(),"aria-controls":d()?.id}));var c=M(s),l=M(c,!0);T(c);var u=P(c,2);{let e=k(()=>I(f)?o():a());Vy(u,{get name(){return I(e)}})}T(s),ya(s,(e,t)=>Uy?.(e,t),()=>({text:I(f)?i():r(),position:`bottom-right`,delay:0})),oo(s,e=>j(p,e),()=>I(p)),F(()=>B(l,I(f)?i():r())),z(e,s)};U(m,()=>tk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}var h=P(m,2);{let e=k(()=>d()||Z.targets.portals);U(h,()=>AS,(t,r)=>{r(t,{get to(){return I(e)},children:(e,t)=>{var r=R(),a=N(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,a=()=>t?.().props,l=()=>t?.().open;var u=R(),d=N(u),p=e=>{var t=Vj();G(t,()=>({...r()}));var l=M(t);G(l,()=>({...a(),role:`dialog`,"aria-label":s()}));var u=M(l),d=M(u);Vy(d,{get name(){return o()}});var p=P(d,2),m=M(p,!0);T(p),T(u),V(P(u,2),c),T(l),ya(l,e=>SA?.(e)),T(t),F(()=>B(m,i())),si(`click`,u,()=>j(f,!1)),ma(3,l,()=>Dk,()=>n),z(e,t)};H(d,e=>{l()&&e(p)}),z(e,u)},t=k(()=>[`context-box__content`,u()]);U(a,()=>$O,(n,r)=>{r(n,{get class(){return I(t)},sideOffset:8,alignOffset:-11,align:`end`,side:`bottom`,strategy:`absolute`,onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:()=>I(p)?.focus(),forceMount:!0,child:e,$$slots:{child:!0}})})}z(e,r)},$$slots:{default:!0}})})}z(e,l)},$$slots:{default:!0}})}),T(h),F(()=>ka(h,1,Ca([`context-box`,l()]))),z(e,h),D(m)}ci([`click`]),q(Wj,{openLabel:{},closeLabel:{},openIcon:{},closeIcon:{},ariaLabel:{},children:{},class:{},contentClass:{},portal:{}},[],[],{mode:`open`});var Gj=L(`<div class="text-container" aria-live="polite"><span class="sr-only"> </span> <!></div>`);function Kj(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`content`,7);return Wj(e,{get openLabel(){return I(n).openInfo},get closeLabel(){return I(n).close},openIcon:`info`,closeIcon:`menuClose`,contentClass:`context-box__content--info`,get portal(){return Z.targets.chatAppHeaderPortal},get ariaLabel(){return I(n).ariaInfoTitle},children:(e,t)=>{var i=Gj(),a=M(i),o=M(a,!0);T(a),ia(P(a,2),r),T(i),F(()=>B(o,I(n).ariaCloseWithEsc)),z(e,i)},$$slots:{default:!0}}),D({get content(){return r()},set content(e){r(e),O()}})}q(Kj,{content:{}},[],[],{mode:`open`});var qj=L(`<button><span class="sr-only"> </span> <!></button>`),Jj=L(`<div><div><!></div></div>`),Yj=L(`<!> <!>`,1),Xj=L(`<div><!></div>`);function Zj(e,t){E(t,!0);let n={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},r=K(t,`openLabel`,7),i=K(t,`closeLabel`,7),a=K(t,`openIcon`,7),o=K(t,`closeIcon`,7),s=K(t,`disableAutoFocusOnOpen`,7,!1),c=K(t,`children`,7),l=K(t,`class`,7),u=K(t,`contentClass`,7),d=K(t,`portal`,7),f=A(!1),p=A(void 0);tr(()=>{I(f)?(I(p)?.setAttribute(Hy,`true`),Qr(()=>Fy.setOpenOverlay(!0))):Qr(()=>Fy.setOpenOverlay(!1))});var m={get openLabel(){return r()},set openLabel(e){r(e),O()},get closeLabel(){return i()},set closeLabel(e){i(e),O()},get openIcon(){return a()},set openIcon(e){a(e),O()},get closeIcon(){return o()},set closeIcon(e){o(e),O()},get disableAutoFocusOnOpen(){return s()},set disableAutoFocusOnOpen(e=!1){s(e),O()},get children(){return c()},set children(e){c(e),O()},get class(){return l()},set class(e){l(e),O()},get contentClass(){return u()},set contentClass(e){u(e),O()},get portal(){return d()},set portal(e){d(e),O()}},h=Xj();return U(M(h),()=>ck,(e,t)=>{t(e,{get open(){return I(f)},set open(e){j(f,e,!0)},children:(e,t)=>{var l=Yj(),m=N(l);{let e=(e,t)=>{let n=()=>t?.().props;var s=qj();G(s,()=>({class:`context-box__trigger btn btn--tertiary btn--square`,...n(),"aria-controls":d()?.id}));var c=M(s),l=M(c,!0);T(c);var u=P(c,2);{let e=k(()=>I(f)?o():a());Vy(u,{get name(){return I(e)}})}T(s),ya(s,(e,t)=>Uy?.(e,t),()=>({text:I(f)?i():r(),position:`bottom-right`,delay:0})),oo(s,e=>j(p,e),()=>I(p)),F(()=>B(l,I(f)?i():r())),z(e,s)};U(m,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}var h=P(m,2);{let e=k(()=>d()||Z.targets.portals);U(h,()=>AS,(t,r)=>{r(t,{get to(){return I(e)},children:(e,t)=>{var r=R(),i=N(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,i=()=>t?.().props,a=()=>t?.().open;var o=R(),s=N(o),l=e=>{var t=Jj();G(t,()=>({...r()}));var a=M(t);G(a,()=>({...i()})),V(M(a),c),T(a),T(t),ma(3,a,()=>Dk,()=>n),z(e,t)};H(s,e=>{a()&&e(l)}),z(e,o)},t=k(()=>[`context-box__content`,u()]);U(i,()=>dk,(n,r)=>{r(n,{get class(){return I(t)},sideOffset:8,alignOffset:-11,align:`end`,side:`bottom`,strategy:`absolute`,onOpenAutoFocus:e=>{s()&&e.preventDefault()},forceMount:!0,child:e,$$slots:{child:!0}})})}z(e,r)},$$slots:{default:!0}})})}z(e,l)},$$slots:{default:!0}})}),T(h),F(()=>ka(h,1,Ca([`context-box`,l()]))),z(e,h),D(m)}q(Zj,{openLabel:{},closeLabel:{},openIcon:{},closeIcon:{},disableAutoFocusOnOpen:{},children:{},class:{},contentClass:{},portal:{}},[],[],{mode:`open`});var Qj=e=>e.charAt(0).toUpperCase()+e.slice(1),$j=L(`<span class="sr-only"> </span>`),eM=L(`<!> <span> <!></span>`,1),tM=L(`<div class="context-box__menu"></div>`),nM=L(`<!> <span> </span>`,1),rM=L(`<!> <div class="context-box__menu"></div>`,1),iM=L(`<!> <!>`,1),aM=L(`<!> <span> </span>`,1),oM=L(`<!> <span> </span>`,1),sM=L(`<!> <div class="context-box__color-scheme-selector"><!> <!> <!></div>`,1),cM=L(`<!> <!>`,1),lM=L(`<!> <!> <!>`,1);function uM(e,t){E(t,!0);let n=k(()=>Z.t),r=e=>{Fy.onLanguageChange(e)},i=e=>`Intl`in globalThis&&Intl.DisplayNames?Qj(new Intl.DisplayNames([e],{type:`language`}).of(e)??e.toUpperCase()):e.toUpperCase(),a=e=>{Z.data.selectedColorScheme===e?Fy.setColorScheme(`system`):Fy.setColorScheme(e)};Zj(e,{get openLabel(){return I(n).openMenu},get closeLabel(){return I(n).closeMenu},openIcon:`menu`,closeIcon:`menuClose`,contentClass:`context-box__content--menu`,get portal(){return Z.targets.chatAppHeaderPortal},children:(e,t)=>{var o=lM(),s=N(o),c=e=>{var t=tM();Qi(t,21,()=>Z.menu,Ji,(e,t)=>{var r=R();U(N(r),()=>DO,(e,r)=>{r(e,{class:`context-box__menu-item transition-colors`,onSelect:()=>window.open(I(t).url,I(t).target,`noopener,noreferrer`),closeOnSelect:!0,children:(e,r)=>{var i=eM(),a=N(i);Vy(a,{get name(){return I(t).icon},class:`context-box__menu-item__icon`});var o=P(a,2),s=M(o,!0),c=P(s),l=e=>{var t=$j(),r=M(t);T(t),F(()=>B(r,`, ${I(n).ariaOpensInNewTab??``}`)),z(e,t)};H(c,e=>{I(t).target===`_blank`&&e(l)}),T(o),F(()=>B(s,I(t).label)),z(e,i)},$$slots:{default:!0}})}),z(e,r)}),T(t),z(e,t)};H(s,e=>{Z.menu.length>0&&e(c)});var l=P(s,2),u=e=>{var t=iM(),a=N(t),o=e=>{var t=R();U(N(t),()=>FO,(e,t)=>{t(e,{class:`context-box__separator`,"aria-hidden":`true`})}),z(e,t)};H(a,e=>{Z.menu.length>0&&e(o)}),U(P(a,2),()=>LO,(e,t)=>{t(e,{children:(e,t)=>{var a=rM(),o=N(a);U(o,()=>jO,(e,t)=>{t(e,{class:`context-box__title`,"aria-hidden":`true`,children:(e,t)=>{$e();var r=_i();F(()=>B(r,I(n).selectLanguage)),z(e,r)},$$slots:{default:!0}})});var s=P(o,2);Qi(s,21,()=>Z.data.chatConfig.supportedLanguages,Ji,(e,t)=>{var n=R(),a=N(n);{let e=k(()=>[`context-box__menu-item transition-colors`,{active:Z.data.language===I(t)}]);U(a,()=>NO,(n,a)=>{a(n,{get value(){return I(t)},closeOnSelect:!0,get class(){return I(e)},onSelect:()=>r(I(t)),children:(e,n)=>{var r=nM(),a=N(r);Vy(a,{name:`internalLink`,class:`context-box__menu-item__icon`});var o=P(a,2),s=M(o,!0);T(o),F(e=>B(s,e),[()=>i(I(t))]),z(e,r)},$$slots:{default:!0}})})}z(e,n)}),T(s),z(e,a)},$$slots:{default:!0}})}),z(e,t)};H(l,e=>{Z.data.chatConfig.supportedLanguages.length>0&&e(u)});var d=P(l,2),f=e=>{var t=cM(),r=N(t);U(r,()=>FO,(e,t)=>{t(e,{class:`context-box__separator`,"aria-hidden":`true`})}),U(P(r,2),()=>LO,(e,t)=>{t(e,{children:(e,t)=>{var r=sM(),i=N(r);U(i,()=>jO,(e,t)=>{t(e,{class:`context-box__title sr-only`,"aria-hidden":`true`,children:(e,t)=>{$e();var r=_i();F(()=>B(r,I(n).selectColorTheme)),z(e,r)},$$slots:{default:!0}})});var o=P(i,2),s=M(o);{let e=k(()=>[`context-box__color-scheme-selector-button transition-colors`,{"context-box__color-scheme-selector-button--active":Z.data.selectedColorScheme===`light`}]);U(s,()=>NO,(t,n)=>{n(t,{value:`light`,closeOnSelect:!0,get class(){return I(e)},onSelect:()=>a(`light`),children:(e,t)=>{var n=aM(),r=N(n);Vy(r,{name:`lightMode`});var i=P(r,2),a=M(i,!0);T(i),F(()=>B(a,Z.t.lightMode)),z(e,n)},$$slots:{default:!0}})})}var c=P(s,2);U(c,()=>FO,(e,t)=>{t(e,{class:`context-box__color-scheme-selector-separator`,"aria-hidden":`true`})});var l=P(c,2);{let e=k(()=>[`context-box__color-scheme-selector-button transition-colors`,{"context-box__color-scheme-selector-button--active":Z.data.selectedColorScheme===`dark`}]);U(l,()=>NO,(t,n)=>{n(t,{value:`dark`,closeOnSelect:!0,get class(){return I(e)},onSelect:()=>a(`dark`),children:(e,t)=>{var n=oM(),r=N(n);Vy(r,{name:`darkMode`});var i=P(r,2),a=M(i,!0);T(i),F(()=>B(a,Z.t.darkMode)),z(e,n)},$$slots:{default:!0}})})}T(o),z(e,r)},$$slots:{default:!0}})}),z(e,t)};H(d,e=>{Z.data.has2ColorSchemes&&e(f)}),z(e,o)},$$slots:{default:!0}}),D()}q(uM,{},[],[],{mode:`open`});var dM=L(`<span class="btn__label"> </span>`),fM=L(`<div><button class="btn btn--tertiary btn--square"><!> <!></button></div>`);function pM(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`class`,7);var i={get class(){return r()},set class(e){r(e),O()}},a=fM(),o=M(a),s=M(o);Vy(s,{name:`newConversation`});var c=P(s,2),l=e=>{var t=dM(),r=M(t,!0);T(t),F(()=>B(r,I(n).newChat)),z(e,t)};return H(c,e=>{I(n).newChat&&e(l)}),T(o),ya(o,(e,t)=>Uy?.(e,t),()=>({text:I(n).newChat,position:`bottom-left`,delay:600})),T(a),F(()=>{ka(a,1,Ca([`new-conversation`,r()])),W(o,`aria-label`,I(n).newChat)}),si(`click`,o,()=>Fy.onNewConversation()),ma(1,a,()=>Dk,()=>({duration:300,y:30})),ma(2,a,()=>Dk,()=>({y:15,duration:150,easing:bk})),z(e,a),D(i)}ci([`click`]),q(pM,{class:{}},[],[],{mode:`open`});var mM=L(`<div><div><!></div></div>`);function hM(e,t){E(t,!0);let n=K(t,`class`,7),r=K(t,`children`,7),i=A(void 0);var a={get class(){return n()},set class(e){n(e),O()},get children(){return r()},set children(e){r(e),O()}},o=mM();let s;var c=M(o);return V(M(c),()=>r()??C),T(c),T(o),F(()=>{ka(o,1,Ca([`animated-height`,n()])),s=ja(o,``,s,{height:I(i)?`${I(i)}px`:`auto`})}),io(c,`clientHeight`,e=>j(i,e)),z(e,o),D(a)}q(hM,{class:{},children:{}},[],[],{mode:`open`});var gM=L(`<span class="reference__number transition-colors"> </span>`),_M=L(`<span class="reference__description transition-colors line-clamp line-clamp--6"> </span>`),vM=L(`<span class="reference__breadcrumb transition-colors"> </span>`),yM=L(`<div class="reference__footer"><span class="reference__domain transition-colors"><span class="truncate"> </span></span> <!></div>`),bM=L(`<a target="_blank" rel="noopener noreferrer" class="reference transition-colors"><!> <span class="reference__body transition-colors"><span class="reference__header"><span class="reference__title line-clamp line-clamp--2 h4"> </span> <!></span> <!> <!></span></a>`);function xM(e,t){E(t,!0);let n=K(t,`reference`,7),r=k(()=>`${n().display.listItem.title}. ${n().display.card.description}. ${Z.t.ariaReferenceSource} ${n().display.listItem.badge}${n().display.listItem.breadcrumbs?` / `+n().display.listItem.breadcrumbs.join(` / `):``}`);var i={get reference(){return n()},set reference(e){n(e),O()}},a=bM(),o=M(a),s=e=>{var t=gM(),r=M(t,!0);T(t),F(()=>B(r,n().referenceIndex.used)),z(e,t)};H(o,e=>{n().referenceIndex.used&&e(s)});var c=P(o,2),l=M(c),u=M(l),d=M(u,!0);T(u),Vy(P(u,2),{name:`externalLink`,class:`reference__icon transition-colors`}),T(l);var f=P(l,2),p=e=>{var t=_M(),r=M(t,!0);T(t),F(()=>B(r,n().display.card.description)),z(e,t)};H(f,e=>{n().display.card.description&&e(p)});var m=P(f,2),h=e=>{var t=yM(),r=M(t),i=M(r),a=M(i,!0);T(i),T(r);var o=P(r,2),s=e=>{var t=R();Qi(N(t),17,()=>n().display.listItem.breadcrumbs,Ji,(e,t)=>{var n=vM(),r=M(n,!0);T(n),F(()=>B(r,I(t))),z(e,n)}),z(e,t)};H(o,e=>{n().display.listItem.breadcrumbs&&e(s)}),T(t),F(()=>B(a,n().display.listItem.badge)),z(e,t)};return H(m,e=>{n().display.listItem.badge&&e(h)}),T(c),T(a),F(()=>{W(a,`href`,n().url),W(a,`aria-label`,I(r)),B(d,n().display.listItem.title)}),z(e,a),D(i)}q(xM,{reference:{}},[],[],{mode:`open`});function SM(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};`}}var CM=L(`<div><!></div>`),wM=L(`<div class="references__toggle-title"> </div> <!>`,1),TM=L(`<div><div class="references__items"></div></div>`),EM=L(`<div><!></div>`),DM=L(`<!> <!>`,1),OM=L(`<div><!></div>`),kM=L(`<div><div class="references__items"></div> <!></div>`),AM=L(`<div><div class="references__container"><div class="references__transition"><!></div></div></div>`);function jM(e,t){E(t,!0);let n=K(t,`class`,7),r=k(()=>Z.data.history.filter(e=>e.type===`bot`).find(e=>e.id===Z.data.currentReferencesAsideId)?.references),i=k(()=>Z.data.currentReferencesAsideId),a=A(void 0),o=A(!1),s=A(void 0);tr(()=>{I(i)&&j(o,!1),j(a,I(i),!0)}),tr(()=>{I(o)&&setTimeout(()=>{Z.data.chatConfig.inlineLayout===!1&&I(s)?.scrollIntoView({behavior:`smooth`})},200)});let c={delay:200,duration:500,easing:xk,y:50};var l={get class(){return n()},set class(e){n(e),O()}},u=AM(),d=M(u),f=M(d);return qi(M(f),()=>Z.data.currentReferencesAsideId,e=>{var t=kM(),l=M(t);Qi(l,21,()=>I(r)?.used,Ji,(e,t)=>{var n=CM();xM(M(n),{get reference(){return I(t)}}),T(n),ma(1,n,()=>Dk,()=>({...c,delay:0})),z(e,n)}),T(l);var u=P(l,2),d=e=>{var t=OM();hM(M(t),{children:(e,t)=>{var i=R();U(N(i),()=>cT,(e,t)=>{t(e,{get class(){return`references__further ${n()??``}`},get open(){return I(o)},set open(e){j(o,e,!0)},children:(e,t)=>{var n=DM(),i=N(n);U(i,()=>fT,(e,t)=>{t(e,{class:`references__toggle transition-colors`,children:(e,t)=>{var n=wM(),r=N(n),i=M(r,!0);T(r),Vy(P(r,2),{name:`chevronDown`,class:`references__toggle-icon`}),F(()=>B(i,Z.t.referencesFurtherTitle)),z(e,n)},$$slots:{default:!0}})});var a=P(i,2);{let e=(e,t)=>{let n=()=>t?.().props,i=()=>t?.().open;var a=EM();G(a,()=>({...n(),class:`references__container`}));var o=M(a),l=e=>{var t=TM(),n=M(t);Qi(n,21,()=>I(r)?.unused,Ji,(e,t)=>{xM(e,{get reference(){return I(t)}})}),T(n),T(t),ma(1,t,()=>Dk,()=>({...c,delay:0})),ma(2,t,()=>Ek,()=>({duration:100})),z(e,t)};H(o,e=>{i()&&e(l)}),T(a),oo(a,e=>j(s,e),()=>I(s)),z(e,a)};U(a,()=>uT,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}z(e,n)},$$slots:{default:!0}})}),z(e,i)},$$slots:{default:!0}}),T(t),ma(1,t,()=>Dk,()=>c),z(e,t)};H(u,e=>{I(r)?.unused&&I(r).unused.length>0&&e(d)}),T(t),ma(2,t,()=>SM,()=>({duration:200,delay:I(i)?0:200})),ma(1,t,()=>Dk,()=>I(a)?c:{duration:0,y:0}),z(e,t)}),T(f),T(d),T(u),F(()=>ka(u,1,Ca([`references`,n()]))),z(e,u),D(l)}q(jM,{class:{}},[],[],{mode:`open`});var MM=L(`<button class="predefined-question transition-colors" tabindex="0"><!> </button>`);function NM(e,t){E(t,!0);let n=K(t,`onSubmit`,7),r=K(t,`predefinedQuestion`,7),i=K(t,`index`,7);var a={get onSubmit(){return n()},set onSubmit(e){n(e),O()},get predefinedQuestion(){return r()},set predefinedQuestion(e){r(e),O()},get index(){return i()},set index(e){i(e),O()}},o=MM(),s=M(o);Vy(s,{name:`predefinedQuestion`,class:`predefined-question__icon transition-colors`});var c=P(s,1,!0);return T(o),ya(o,(e,t)=>Iy?.(e,t),()=>`predefinedQuestion`),F(()=>{W(o,`data-index`,i()),B(c,r().label??r().question)}),si(`click`,o,()=>n()(r().question)),z(e,o),D(a)}ci([`click`]),q(NM,{onSubmit:{},predefinedQuestion:{},index:{}},[],[],{mode:`open`});var PM=L(`<li><!></li>`),FM=L(`<section><h2 class="sr-only"> </h2> <ul></ul></section>`);function IM(e,t){E(t,!0);let n=K(t,`class`,7),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`]);var i={get class(){return n()},set class(e){n(e),O()}},a=FM();G(a,()=>({"aria-label":Z.t.ariaPredefinedQuestionsRegion,class:n(),...r}));var o=M(a),s=M(o,!0);T(o);var c=P(o,2);let l;return Qi(c,21,()=>Z.data.predefinedQuestions,Ji,(e,t,n)=>{var r=PM();NM(M(r),{get predefinedQuestion(){return I(t)},get onSubmit(){return Fy.onStartConversation},index:n}),T(r),z(e,r)}),T(c),T(a),F(()=>{B(s,Z.t.ariaPredefinedQuestions),l=ka(c,1,`predefined-questions`,null,l,{"predefined-questions--pii-padding":Z.data.questionHasPii})}),z(e,a),D(i)}q(IM,{class:{}},[],[],{mode:`open`});var LM=L(`<div class="introduction-disclaimer text-container fly-in" style="--fly-in-id: 3;"></div>`),RM=L(`<section><!> <!> <!> <!></section>`);function zM(e,t){E(t,!0);let n=k(()=>Z.t),r=A(!1);tr(()=>{j(r,!0)});var i=RM();let a;var o=M(i);Fj(o,{class:`start-page__introduction fly-in`});var s=P(o,2);{let e=k(()=>nl(I(n).introductionTitle||``));pj(s,{get onSubmit(){return Fy.onStartConversation},class:`start-page__chat-input fly-in`,style:`--fly-in-id: 1;`,get ariaLabel(){return I(e)}})}var c=P(s,2),l=e=>{IM(e,{class:`start-page__predefined-questions fly-in`,style:`--fly-in-id: 2;`})};H(c,e=>{Z.data.predefinedQuestions&&Z.data.predefinedQuestions.length&&e(l)});var u=P(c,2),d=e=>{var t=LM();ia(t,()=>I(n).introductionDisclaimer,!0),T(t),z(e,t)};H(u,e=>{I(n).introductionDisclaimer&&e(d)}),T(i),F(()=>a=ka(i,1,`start-page container`,null,a,{mounted:I(r)})),z(e,i),D()}q(zM,{},[],[],{mode:`open`});var BM=RegExp(`([\\p{Ll}\\d])(\\p{Lu})`,`gu`),VM=RegExp(`(\\p{Lu})([\\p{Lu}][\\p{Ll}])`,`gu`),HM=RegExp(`(\\d)(\\p{Ll})`,`gu`),UM=RegExp(`(\\p{L})(\\d)`,`gu`),WM=/[^\p{L}\d]+/giu,GM=`$1\0$2`,KM=``;function qM(e,t){let n=e.trim();n=n.replace(BM,GM).replace(VM,GM),t?.separateNumbers&&(n=n.replace(HM,GM).replace(UM,GM)),n=n.replace(WM,`\0`);let r=0,i=n.length;for(;n.charAt(r)===`\0`;)r++;if(r===i)return[];for(;n.charAt(i-1)===`\0`;)i--;return n.slice(r,i).split(/\0/g)}function JM(e,t){return lN(e,t?.prefixCharacters)+qM(e,t).map(aN(t?.locale)).join(t?.delimiter??` `)}function YM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale),a=t?.mergeAmbiguousCharacters?sN(r,i):cN(r,i);return n+qM(e,t).map((e,t)=>t===0?r(e):a(e,t)).join(t?.delimiter??``)}function XM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale),a=t?.mergeAmbiguousCharacters?sN(r,i):cN(r,i);return n+qM(e,t).map(a).join(t?.delimiter??``)}function ZM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale);return n+qM(e,t).map(sN(r,i)).join(t?.delimiter??` `)}function QM(e,t){return lN(e,t?.prefixCharacters)+qM(e,t).map(oN(t?.locale)).join(t?.delimiter??`_`)}function $M(e,t){return JM(e,{delimiter:`.`,...t})}function eN(e,t){return JM(e,{delimiter:`-`,...t})}function tN(e,t){return JM(e,{delimiter:`/`,...t})}function nN(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=sN(r,oN(t?.locale));return n+qM(e,t).map((e,t)=>t===0?i(e):r(e)).join(t?.delimiter??` `)}function rN(e,t){return JM(e,{delimiter:`_`,...t})}function iN(e,t){return ZM(e,{delimiter:`-`,...t})}function aN(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function oN(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function sN(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function cN(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function lN(e,t=KM){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(t.includes(i))n+=i;else break}return n}function uN(e,t){let n=``;for(let r of e)n+=Math.random()>.5?r.toLocaleUpperCase(t):r.toLocaleLowerCase(t);return n}function dN(e,t){let n=``;for(let r of e){let e=r.toLocaleLowerCase(t);n+=r===e?r.toLocaleUpperCase(t):e}return n}var fN=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,pN=/[^\s:–—-]+|./g,mN=/\s/,hN=/.(?=[A-Z]|\..)/,gN=/[A-Za-z0-9\u00C0-\u00FF]/;function _N(e){for(var t=``,n;(n=pN.exec(e))!==null;){var r=n[0],i=n.index;if(!hN.test(r)&&(!fN.test(r)||i===0||i+r.length===e.length)&&(e.charAt(i+r.length)!==`:`||mN.test(e.charAt(i+r.length+1)))){t+=r.replace(gN,function(e){return e.toUpperCase()});continue}t+=r}return t}var vN=YM,yN=ZM,bN=QM,xN=$M,SN=JM,CN=XM,wN=tN,TN=nN,EN=rN,DN=iN,ON=eN,kN=uN,AN=dN,jN=_N,MN=e=>e.toUpperCase(),NN=(e,t)=>e.toLocaleUpperCase(t),PN=e=>e.toLowerCase(),FN=(e,t)=>e.toLocaleLowerCase(t),IN=e=>e.charAt(0).toLowerCase()+e.slice(1),LN=e=>e.charAt(0).toUpperCase()+e.slice(1),RN=e=>e===e.toUpperCase(),zN=e=>e===e.toLowerCase(),BN=class{};BN.camel=vN,BN.capital=yN,BN.constant=bN,BN.dot=xN,BN.kebab=ON,BN.lower=PN,BN.lowerFirst=IN,BN.localeLower=FN,BN.localeUpper=NN,BN.no=SN,BN.pascal=CN,BN.path=wN,BN.sentence=TN,BN.snake=EN,BN.sponge=kN,BN.swap=AN,BN.title=jN,BN.train=DN,BN.upper=MN,BN.upperFirst=LN,BN.isUpper=RN,BN.isLower=zN;var VN=640,HN=1024,UN=null,WN=()=>{if(UN)return UN;if(!globalThis.document)return 16;let e=globalThis.document.querySelector(`:root`);return UN=Number(getComputedStyle(e).fontSize.slice(0,-2)),UN},GN=({minRem:e,maxRem:t})=>{let n=WN(),r=VN/n,i=HN/n,a=(t-e)/(i-r);return`clamp( ${e}rem, ${-r*a+e}rem + ${a*100}cqw, ${t}rem )`},KN=e=>typeof e==`string`?e:typeof e==`number`?String(e):typeof e==`object`?e.minRem===e.maxRem?`${e.minRem}rem`:GN(e):``,qN=(e,t,n,r=!1)=>{let i=``;return n.forEach(n=>{let a=t[n];r&&!a&&n===`borderWidth`&&(a=`0px`),r&&!a&&n===`borderColor`&&(a=`transparent`),a&&(i+=`--${ON(e)}-${ON(n)}:${KN(a)}; `)}),i},JN=(e,t)=>Object.entries(t).map(([t,n])=>`--${e}-${ON(t)}:${KN(n)}`).join(`; `)+`; `,YN=(e,t)=>{let n=``;return n+=qN(e,t,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`borderRadius`,`color`],!0),t.hover&&(n+=qN(`${e}-hover`,t.hover,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.focus&&(n+=qN(`${e}-focus`,t.focus,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.custom&&(n+=JN(e,t.custom)),n},XN=(e,t)=>Object.entries(t).map(([t,n])=>`--color-${e}-${t}:${n}`).join(`; `)+`; `,ZN=e=>`--font-family: ${e?.family||`inherit`};`,QN=e=>`.chat-app {${ZN(e.font)} ${Object.entries(e.colors).map(([e,t])=>XN(e,t)).join(``)} ${JN(`base`,e.base)} ${Object.entries(e.components).map(([e,t])=>YN(ON(e),t)).join(``)}};`;function $N(e,t){E(t,!0);let n=K(t,`css`,7),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`css`]),i=e=>{tr(()=>{n()&&(e.innerHTML=n())})};var a={get css(){return n()},set css(e){n(e),O()}},o=R(),s=N(o),c=e=>{var t=R();ga(N(t),()=>`style`,!1,(e,t)=>{ya(e,e=>i?.(e)),G(e,()=>({...r}))}),z(e,t)};return H(s,e=>{n()&&e(c)}),z(e,o),D(a)}q($N,{css:{}},[],[],{mode:`open`});var eP=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}.toast{width:100%;padding:var(--spacer-r-20);align-items:center;gap:var(--spacer-16);border-width:var(--toast-border-width,1px);border-radius:var(--toast-border-radius);border-color:var(--toast-border-color,transparent);background:var(--toast-background);box-shadow:var(--toast-box-shadow);color:var(--toast-color);display:flex}.toast[data-type=success] svg{color:var(--toast-icon-success-color)}.toast[data-type=error] svg{color:var(--toast-icon-error-color)}.toast[data-type=warning] svg{color:var(--toast-icon-warning-color)}.toast[data-type=info] svg{color:var(--toast-icon-info-color)}.toast svg{width:var(--spacer-24)!important;height:var(--spacer-24)!important}ol[data-sonner-toaster=true]{border:var(--spacer-16) solid transparent;max-width:600px;width:100%!important}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.btn{min-height:calc(var(--btn-padding-y) * 2 + var(--btn-icon-size));padding:var(--btn-padding-y) var(--btn-padding-x);align-items:center;gap:var(--spacer-r-8);font-size:var(--base-font-size-sm);line-height:var(--base-line-height-tight);text-align:left;transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);border-style:solid;flex-wrap:nowrap;text-decoration:none;display:flex;position:relative}.btn>:where(.svg){width:var(--btn-icon-size)}.btn:disabled{cursor:not-allowed;opacity:.5}.btn--primary{border-width:var(--btn-primary-border-width);border-radius:var(--btn-primary-border-radius);border-color:var(--btn-primary-border-color);background:var(--btn-primary-background);box-shadow:var(--btn-primary-box-shadow);color:var(--btn-primary-color);font-weight:var(--btn-primary-font-weight,700)}.btn--primary:hover{border-width:var(--btn-primary-hover-border-width,var(--btn-primary-border-width));border-color:var(--btn-primary-hover-border-color,var(--btn-primary-border-color));background:var(--btn-primary-hover-background,var(--btn-primary-background));box-shadow:var(--btn-primary-hover-box-shadow,var(--btn-primary-box-shadow));color:var(--btn-primary-hover-color,var(--btn-primary-color))}.btn--secondary{border-width:var(--btn-secondary-border-width);border-radius:var(--btn-secondary-border-radius,var(--btn-primary-border-radius));border-color:var(--btn-secondary-border-color);background:var(--btn-secondary-background);box-shadow:var(--btn-secondary-box-shadow);color:var(--btn-secondary-color);font-weight:var(--btn-secondary-font-weight,700)}.btn--secondary:hover{border-width:var(--btn-secondary-hover-border-width,var(--btn-secondary-border-width));border-color:var(--btn-secondary-hover-border-color,var(--btn-secondary-border-color));background:var(--btn-secondary-hover-background,var(--btn-secondary-background));box-shadow:var(--btn-secondary-hover-box-shadow,var(--btn-secondary-box-shadow));color:var(--btn-secondary-hover-color,var(--btn-secondary-color))}.btn--tertiary{border-width:var(--btn-tertiary-border-width);border-radius:var(--btn-tertiary-border-radius,var(--btn-primary-border-radius));border-color:var(--btn-tertiary-border-color);background:var(--btn-tertiary-background);box-shadow:var(--btn-tertiary-box-shadow);color:var(--btn-tertiary-color);font-weight:var(--btn-tertiary-font-weight,700)}.btn--tertiary:hover{border-width:var(--btn-tertiary-hover-border-width,var(--btn-tertiary-border-width));border-color:var(--btn-tertiary-hover-border-color,var(--btn-tertiary-border-color));background:var(--btn-tertiary-hover-background,var(--btn-tertiary-background));box-shadow:var(--btn-tertiary-hover-box-shadow,var(--btn-tertiary-box-shadow));color:var(--btn-tertiary-hover-color,var(--btn-tertiary-color))}.btn--square{--btn-padding-x:var(--btn-padding-y)}.btn--square:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.btn--square>:where(.svg){width:var(--btn-icon-size)}.btn--square>:where(.btn__label){padding-right:calc(var(--btn-padding-x) * 1.25);display:none}@container chat-container (width>=640px){.btn--square>:where(.btn__label){display:block}}.form{align-items:flex-start;gap:var(--spacer-r-20);flex-direction:column;display:flex}.form__item{gap:var(--spacer-5);flex-direction:column;width:100%;display:flex}.form__label{color:var(--label-color,inherit);font-weight:var(--label-font-weight,inherit)}.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.chat-input{--chat-input-padding:calc(.5em + var(--chat-input-border-width));--chat-input-settings-transition-duration:.2s}@container chat-container (width>=640px){.chat-input{--chat-input-padding:calc(.75em + var(--chat-input-border-width))}}.chat-input{z-index:var(--z-index-local-overlay);position:relative}.chat-input__textarea{box-sizing:border-box;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em calc(var(--spacer-r-24) - var(--chat-input-border-width));color:var(--chat-input-color);resize:none;transition:padding var(--chat-input-settings-transition-duration) var(--default-transition-timing-function);background:0 0;border:0 solid #0000;grid-area:textarea;display:block}.chat-input__textarea:has(+.chat-input__buttons .chat-input__mic-button){padding-right:calc(2.5em + var(--spacer-64))}.chat-input__grid--has-settings .chat-input__textarea{padding-left:var(--spacer-8)}.chat-input__grid--settings-is-open .chat-input__textarea{padding-right:var(--spacer-r-16);padding-left:var(--spacer-r-16)}@container chat-container (width>=640px){.chat-input__textarea{padding:1.25em var(--spacer-80) 1.25em calc(var(--spacer-r-28) - var(--chat-input-border-width))}.chat-input__grid--has-settings .chat-input__textarea{padding-left:var(--spacer-8)}.chat-input__grid--settings-is-open .chat-input__textarea{padding-right:var(--spacer-r-28);padding-left:var(--spacer-r-28)}}.chat-input__textarea:focus,.chat-input__textarea:focus-visible{outline-color:#0000}.chat-input__grid{border-width:var(--chat-input-border-width);border-radius:var(--chat-input-border-radius);border-style:solid;border-color:var(--chat-input-border-color);background:var(--chat-input-background);box-shadow:var(--chat-input-box-shadow);transition:grid-template-rows var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), grid-template-columns var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), background var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), box-shadow var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), outline-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-radius var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function);display:flex}.chat-input__grid:has(.chat-input__textarea:focus-visible){border-width:var(--chat-input-focus-border-width,var(--chat-input-border-width));border-radius:var(--chat-input-focus-border-radius,var(--chat-input-border-radius));border-color:var(--chat-input-focus-border-color,var(--chat-input-border-color));background:var(--chat-input-focus-background,var(--chat-input-background));box-shadow:var(--chat-input-focus-box-shadow,var(--chat-input-box-shadow));color:var(--chat-input-focus-color,var(--chat-input-color));outline-color:#0000}.chat-input__grid:hover{background:var(--chat-input-hover-background,var(--chat-input-background));box-shadow:var(--chat-input-hover-box-shadow,var(--chat-input-box-shadow))}.chat-input__grid--has-settings{--chat-input-settings-height:0px;grid-template-rows:1fr var(--chat-input-settings-height);grid-template-columns:var(--btn-submit-size) 1fr;grid-template-areas:"toggle textarea"".settings";width:100%;display:grid}@container chat-container (width>=640px){.chat-input__grid--has-settings{grid-template-columns:calc(var(--btn-submit-size) + var(--spacer-r-12)) 1fr}}.chat-input__grid--settings-is-open{grid-template-columns:0 1fr}.chat-input__submit-button,.chat-input__abort-button{--margin:.5em}.chat-input__open-settings-button{margin-left:var(--spacer-r-12)}.chat-input__buttons{right:var(--chat-input-padding);bottom:var(--chat-input-padding);pointer-events:none;align-items:center;gap:.5em;display:flex;position:absolute}.chat-input__buttons>*{pointer-events:auto}.chat-input__submit-button{width:var(--btn-submit-size);height:var(--btn-submit-size);border-width:var(--chat-input-submit-border-width,0px);border-radius:var(--chat-input-submit-border-radius);border-color:var(--chat-input-submit-border-color);background:var(--chat-input-submit-background);box-shadow:var(--chat-input-submit-box-shadow);color:var(--chat-input-submit-color);cursor:pointer;justify-content:center;align-items:center;transition-property:opacity,background-color,transform;transition-duration:.2s,.2s,.35s;transition-timing-function:ease;display:flex}.chat-input__submit-button:hover{border-width:var(--chat-input-submit-hover-border-width,var(--chat-input-submit-border-width));border-radius:var(--chat-input-submit-hover-border-radius,var(--chat-input-submit-border-radius));border-color:var(--chat-input-submit-hover-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-hover-background,var(--chat-input-submit-background));box-shadow:var(--chat-input-submit-hover-box-shadow,var(--chat-input-submit-box-shadow));color:var(--chat-input-submit-hover-color,var(--chat-input-submit-color))}.chat-input__submit-button path{stroke:currentColor;stroke-width:var(--chat-input-submit-stroke-width,1.5px)}@container chat-container (width>=640px){.chat-input__submit-button{--margin:.75em}}.chat-input__submit-button--deactivated{transform:scale(var(--chat-input-submit-deactivated-scale,.8));border-color:var(--chat-input-submit-deactivated-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-deactivated-background,var(--chat-input-submit-background));color:var(--chat-input-submit-deactivated-color,var(--chat-input-submit-color));cursor:not-allowed;opacity:var(--chat-input-submit-deactivated-opacity,.5)}.chat-input__submit-button--deactivated:hover{border-color:var(--chat-input-submit-deactivated-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-deactivated-background,var(--chat-input-submit-background));color:var(--chat-input-submit-deactivated-color,var(--chat-input-submit-color))}.chat-input__submit-icon,.chat-input__abort-icon{width:var(--spacer-20);height:var(--spacer-20);pointer-events:none}.chat-input__notification-wrapper{margin-bottom:var(--spacer-4);border-radius:var(--chat-input-notification-border-radius);position:relative;overflow:hidden}.chat-input__notification{padding:var(--spacer-8);gap:var(--spacer-8);border-width:var(--chat-input-notification-border-width);border-radius:var(--chat-input-notification-border-radius);border-color:var(--chat-input-notification-border-color);background:var(--chat-input-notification-background);box-shadow:var(--chat-input-notification-box-shadow);color:var(--chat-input-notification-color);display:flex}.chat-input__notification-label{font-weight:700;font-size:var(--base-font-size-xs);padding-top:.175em;line-height:1.35}@container chat-inner-container (width>=640px){.chat-input__notification-label{font-size:var(--base-font-size-sm);padding-top:.125em}}.chat-input__notification-icon{width:var(--spacer-20);height:var(--spacer-20);flex-shrink:0}@container chat-inner-container (width>=640px){.chat-input__notification-icon{width:var(--spacer-24);height:var(--spacer-24)}}.chat-input__mic-button{border-radius:var(--chat-input-submit-border-radius);cursor:pointer;--mic-base-color:var(--color-grey-500);--mic-accent-color:var(--color-accent-500);background:0 0;border:none;justify-content:center;align-items:center;width:2.5em;height:2.5em;transition-property:background-color,color;transition-duration:.2s;transition-timing-function:ease;display:flex}.chat-input__mic-button:hover{background-color:var(--color-grey-100);--mic-base-color:var(--color-grey-700);--mic-accent-color:var(--color-accent-600)}.chat-input__mic-button--listening{background-color:var(--chat-input-notification-background);box-shadow:var(--chat-input-submit-box-shadow);--mic-base-color:#fff6;--mic-accent-color:white}.chat-input__mic-button--listening:hover{background-color:var(--color-highlight-600)}.chat-input__mic-button--error{color:var(--color-highlight-600)}.chat-input__settings{width:100%;padding:var(--chat-input-padding) var(--spacer-80) var(--chat-input-padding) var(--spacer-r-12);gap:var(--spacer-8);pointer-events:none;grid-area:settings;display:flex;position:absolute;bottom:0;left:0;overflow:hidden}@container chat-container (width>=640px){.chat-input__settings{padding-left:var(--spacer-r-20)}}.chat-input__grid--settings-is-open .chat-input__settings{pointer-events:auto;overflow:visible}.chat-input__settings-button{min-width:0;height:100%;padding-right:var(--spacer-4);padding-left:var(--spacer-4);transform:translate(calc(var(--spacer-48) * -1), 150%);border-radius:var(--chat-input-submit-border-radius);outline-offset:0;font-size:var(--base-font-size-xs);opacity:0;transition:transform var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), background var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), box-shadow var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-radius var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), opacity var(--chat-input-settings-transition-duration) calc(var(--chat-input-settings-transition-duration) / 3) var(--default-transition-timing-function);flex-shrink:1;flex-basis:auto;gap:3px}@container chat-inner-container (width>=768px){.chat-input__settings-button{padding-right:var(--spacer-12);padding-left:var(--spacer-8)}}.chat-input__settings-button:disabled{transform:translate(calc(var(--spacer-48) * 1), 150%);opacity:0}.chat-input__grid--settings-is-open .chat-input__settings-button{transform:translateX(calc(var(--spacer-4) * -1));opacity:1}.chat-input__settings-button[data-has-error=true]{border-color:var(--chat-input-notification-border-color)!important;background:var(--chat-input-notification-background)!important;color:var(--chat-input-notification-color)!important}@container chat-inner-container (width>=640px){.chat-input__settings-button .tooltip{display:none}}.chat-input__toggle-area{grid-area:toggle;justify-content:center;place-self:center;align-items:center;width:100%;height:100%;display:flex}.chat-input__grid--settings-is-open .chat-input__toggle-area{overflow:hidden}.chat-input__settings-toggle-button{width:var(--btn-submit-size);height:var(--btn-submit-size);margin-left:var(--spacer-r-8);border-radius:var(--chat-input-submit-border-radius);outline-offset:0;opacity:1;transition:transform var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), opacity var(--chat-input-settings-transition-duration) calc(var(--chat-input-settings-transition-duration) / 3) var(--default-transition-timing-function)}.chat-input__grid--settings-is-open .chat-input__settings-toggle-button{opacity:0;transform:translate(-100%)}.chat-input__settings-toggle-button .svg{flex-shrink:0}.chat-input__settings-button-icon:not(.svg--settingsClose){flex-shrink:0;display:block}@container chat-inner-container (width>=640px){.chat-input__settings-button-icon:not(.svg--settingsClose){display:none}}@container chat-inner-container (width>=768px){.chat-input__settings-button-icon:not(.svg--settingsClose){display:block}}.chat-input__settings-button-label{display:none}@container chat-inner-container (width>=640px){.chat-input__settings-button-label{text-overflow:ellipsis;white-space:nowrap;max-width:20ch;display:block;overflow:hidden}}@container chat-inner-container (width>=1024px){.chat-input__settings-button-label{max-width:40ch}}.chat-input__settings-button-label-name{display:none}@container chat-inner-container (width>=1024px){.chat-input__settings-button-label-name{display:inline}}.chat-input__settings-button-chevron{width:var(--spacer-10);height:var(--spacer-10);transition:transform .2s var(--default-transition-timing-function);flex-shrink:0}[data-state=open]>.chat-input__settings-button-chevron{transform:rotate(180deg)}.classification-feedback{margin-bottom:var(--spacer-16);gap:var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);color:var(--message-user-color);flex-direction:column;display:flex}.classification-feedback__item{gap:var(--spacer-4);border:none;flex-direction:column;margin:0;padding:0;display:flex}.classification-feedback__label{margin-bottom:var(--spacer-8)}.classification-feedback__option{padding-left:var(--spacer-16);align-items:center;gap:var(--spacer-12);display:flex}.classification-feedback__option:has(input:checked){background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color)}.classification-feedback__option:has(input:focus-visible){border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3)}.classification-feedback__option:has(input:focus-visible) input{outline:none}.context-box{z-index:var(--z-index-flyout);position:relative}.context-box__content{--context-box-side-padding:var(--spacer-r-12);z-index:var(--z-index-local-overlay);width:calc(100cqw - var(--spacer-24));border-width:var(--context-box-border-width);border-radius:var(--context-box-border-radius);border-style:solid;border-color:var(--context-box-border-color);background:var(--context-box-background);max-width:300px;box-shadow:var(--context-box-box-shadow);color:var(--context-box-color);font-size:var(--base-font-size-sm)}.context-box__content:focus-visible{outline:none}.context-box__menu{padding:var(--context-box-side-padding);gap:var(--spacer-1);flex-direction:column;display:flex}.context-box__menu--scrollable{max-height:38vh;padding-right:var(--spacer-r-20);grid-template-columns:repeat(1,minmax(280px,10cqw));display:grid;overflow-y:auto}@container chat-inner-container (width>=480px){.context-box__menu--two-cols{column-gap:var(--spacer-r-20);grid-template-columns:repeat(2,minmax(180px,42cqw));display:grid}}@container chat-inner-container (width>=768px){.context-box__menu--three-cols{grid-template-columns:repeat(3,minmax(160px,25cqw))}}.context-box__menu-item{width:100%;padding:var(--spacer-4) var(--spacer-8);align-items:center;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;display:flex;position:relative}.context-box__menu-item:hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}.context-box__menu-item:focus{z-index:var(--z-index-local-overlay)}.context-box__menu-item.active{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}.context-box__menu-item--option{align-items:baseline}.context-box__menu-item__icon{width:var(--spacer-20);height:var(--spacer-20);color:currentColor}.context-box__title{padding:calc(var(--context-box-side-padding) * 1.5) var(--context-box-side-padding) 0 var(--context-box-side-padding);color:var(--context-box-title-color);font-weight:var(--context-box-title-font-weight);font-size:var(--base-font-size-xs)}.context-box__header{min-width:200px;padding:var(--context-box-side-padding);padding-left:calc(var(--context-box-side-padding) + var(--spacer-8));justify-content:space-between;align-items:center;gap:var(--spacer-r-12);border-bottom:1px solid var(--context-box-separator-color);font-weight:var(--context-box-title-font-weight);font-size:var(--base-font-size-xs);text-wrap:balance;display:flex}.context-box__close-button{--btn-padding-y:var(--spacer-4);--btn-padding-x:var(--spacer-4);flex-shrink:0}.context-box__footer{--btn-padding-x-smaller:calc(var(--btn-padding-x) * .75);padding:calc(var(--context-box-side-padding) * .5) calc(var(--context-box-side-padding) + var(--spacer-8) - var(--btn-padding-x-smaller));border-top:1px solid var(--context-box-separator-color);flex-wrap:wrap;display:flex}.context-box__footer-item{padding-right:var(--btn-padding-x-smaller);padding-left:var(--btn-padding-x-smaller);font-size:var(--base-font-size-xs);cursor:pointer}.context-box__separator{border-top:1px solid var(--context-box-separator-color)}.context-box__language-translation{opacity:.5}.context-box__color-scheme-selector{flex-direction:row;align-items:stretch;display:flex}.context-box__color-scheme-selector-button{width:100%;margin:var(--context-box-side-padding);padding:var(--spacer-4) var(--spacer-8);justify-content:center;align-items:center;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;display:flex}.context-box__color-scheme-selector-button:hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}.context-box__color-scheme-selector-separator{border-top:0;border-left:1px solid var(--context-box-separator-color);width:1px;height:auto;display:block}.context-box__color-scheme-selector-button--active{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}.context-box__notification[data-type=error]{color:var(--context-box-error-color)}.context-box__popover-close{z-index:var(--z-index-local-overlay);top:var(--spacer-4);right:var(--spacer-4);clip:rect(0 0 0 0);width:1px;height:1px;padding:var(--spacer-4);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-background);color:var(--context-box-color);clip-path:inset(50%);cursor:pointer;border:none;position:absolute;overflow:hidden}.context-box__popover-close:focus-visible{clip:auto;clip-path:none;width:auto;height:auto;overflow:visible}.context-box__content--info{width:calc(100cqw - var(--spacer-32));max-width:600px;max-height:60cqh;padding:var(--spacer-r-32);position:relative;overflow:hidden scroll}.context-box__content--info :where(.text-container){flex-direction:column;align-items:flex-start;display:flex}[data-bits-floating-content-wrapper]{padding-right:1em}.context-box--dropdown{max-width:min(var(--container-max-width,1024px), 90cqw)}.context-box--dropdown :where(.context-box__content){width:auto;max-width:100%}.consent-page{padding-top:var(--spacer-r-40);padding-bottom:var(--spacer-r-40);justify-content:center;align-items:stretch;gap:var(--spacer-r-48);flex-direction:column;flex-grow:1;display:flex}.consent-page__introduction{text-align:center}.consent-page__disclaimer{font-size:var(--base-font-size-sm);text-align:center;text-wrap:balance}.consent-page__actions{justify-content:center;gap:var(--spacer-r-16);flex-wrap:wrap;display:flex}.chat-page{padding-top:var(--spacer-r-80);flex-direction:column;flex-grow:1;display:flex;position:relative}.chat-page__body{flex-direction:column;flex-grow:1;display:flex}.chat-page__messages{gap:var(--spacer-r-40);flex-direction:column;flex-grow:1;display:flex}.chat-page__footer{z-index:var(--z-index-footer);flex-direction:column;justify-content:flex-end;display:flex;position:sticky;bottom:0}.chat-page__footer--unsticked{position:relative}.chat-page__footer-content{padding-bottom:var(--spacer-r-8);gap:var(--spacer-r-8);border-width:var(--chat-footer-border-width);border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);border-style:solid;border-color:var(--chat-footer-border-color);background:var(--chat-footer-background);box-shadow:var(--chat-footer-box-shadow);color:var(--chat-footer-color);flex-direction:column;display:flex;position:relative}.chat-page__footer-text{font-size:var(--base-font-size-xs);text-align:center;text-wrap:balance}.chat-page__footer-text :where(a){text-underline-offset:.15em;text-decoration:underline}.chat-page__buttons{padding-top:var(--spacer-80);padding-bottom:var(--spacer-40);align-self:center}.chat-page__scroll-to-bottom{opacity:1;position:absolute;top:0;left:50%;transform:translate(-50%,-150%)}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0!important}.dialog-overlay{z-index:var(--z-index-dialog);background:var(--dialog-background-overlay);position:fixed;inset:0}.dialog-content{z-index:var(--z-index-dialog);width:calc(100% - var(--spacer-32));border-width:var(--dialog-border-width);border-radius:var(--dialog-border-radius);border-color:var(--dialog-border-color);background:var(--dialog-background);max-width:600px;max-height:90vh;box-shadow:var(--dialog-box-shadow,none);flex-direction:column;display:flex;position:fixed;top:50%;left:50%;overflow:clip;transform:translate(-50%,-50%)}.dialog-header{padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color,var(--dialog-border-color));font-weight:var(--dialog-header-font-weight,inherit);font-size:var(--dialog-header-font-size,inherit);justify-content:space-between;align-items:center;display:flex}.dialog-title{padding:0}.dialog-close{color:var(--anchor-color);justify-self:flex-end;margin-left:auto}.dialog-close:hover{color:var(--anchor-hover-color,var(--dialog-color))}.dialog-description{min-height:0;padding:var(--spacer-r-24);padding-bottom:var(--spacer-r-40);flex:1;overflow-y:auto}.dialog-footer{padding:var(--spacer-r-24);border-top-width:1px;border-top-color:var(--dialog-header-border-bottom-color,var(--dialog-border-color));background:var(--dialog-background);flex-shrink:0}.dialog-footer__actions{justify-content:flex-end;gap:var(--spacer-r-12);display:flex}:where(.flyout){z-index:var(--z-index-flyout);pointer-events:none;width:570px;max-width:100cqw;height:960px;max-height:100cqh;padding:10px;display:block;position:fixed;bottom:0;right:0}.flyout__backdrop{background-color:color-mix(in srgb, var(--flyout-backdrop-color,transparent) calc(var(--flyout-backdrop-opacity) * 100%), transparent);position:fixed;inset:0}.flyout__body{pointer-events:none;place-content:end flex-end;place-items:end;width:100%;height:100%;display:block;position:relative}.flyout__body:has(.flyout__content){pointer-events:auto}.flyout__content{width:100%;height:100%;display:block}.flyout__open-button{z-index:var(--z-index-local-overlay);pointer-events:auto;position:absolute;bottom:0;right:0}.flyout__content{filter:drop-shadow(0 0 8px #0003);border-radius:4px;overflow:clip}.flyout--defaults{right:var(--spacer-r-16);bottom:var(--spacer-r-16);width:200px;height:200px;display:block;position:fixed}.introduction{justify-content:center;align-items:center;gap:var(--spacer-r-16);flex-direction:column;display:flex}.introduction__avatar{width:var(--spacer-r-80);height:var(--spacer-r-80)}.introduction__title{font-size:var(--base-font-size-h3);text-align:center;text-wrap:balance}.introduction-disclaimer{margin-top:var(--spacer-r-32);font-size:var(--base-font-size-sm)}.message{min-height:0;transition:min-height 0 1.1s;display:flex}.message:last-child{min-height:var(--last-bot-message-min-height)}.message--bot{justify-content:flex-start;width:100%}.message--user:first-child+.message--bot{min-height:0}.message--bot :where(.message__content){width:100%}.message--user{justify-content:flex-end}.message--user :where(.message__content){padding:var(--spacer-8) var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color)}.message--no-padding{padding:0 var(--spacer-16)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}.predefined-question{width:100%;height:100%;padding:var(--spacer-r-20);gap:var(--spacer-r-12);border-width:var(--card-border-width);border-radius:var(--card-border-radius);border-color:var(--card-border-color);background:var(--card-background);box-shadow:var(--card-box-shadow,none);color:var(--card-color);line-height:var(--base-line-height-snug);text-align:left;cursor:pointer;flex-direction:column;display:flex}.predefined-question:hover{border-width:var(--card-hover-border-width,var(--card-border-width));border-radius:var(--card-hover-border-radius,var(--card-border-radius));border-color:var(--card-hover-border-color,var(--card-border-color));background:var(--card-hover-background,var(--card-background));box-shadow:var(--card-hover-box-shadow,var(--card-box-shadow), none);color:var(--card-hover-color,var(--card-color))}.predefined-question:hover :where(.predefined-question__icon){color:var(--card-icon-hover-color)}@container chat-container (width>=640px){.predefined-question{padding:var(--spacer-r-24)}}.predefined-question__icon{color:var(--card-icon-color)}.predefined-questions{gap:var(--spacer-r-12);width:100%;display:grid}@container chat-container (width>=640px){.predefined-questions{grid-template-columns:repeat(3,1fr)}}.predefined-questions--pii-padding{transform:translateY(var(--spacer-56))}.reference-number{display:inline-block;position:relative}.reference-number__trigger{box-sizing:border-box;min-width:1.5em;height:1.5em;padding:var(--reference-number-trigger-padding);border-width:var(--reference-number-trigger-border-width);border-radius:var(--reference-number-trigger-border-radius);border-color:var(--reference-number-trigger-border-color);background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);color:var(--reference-number-trigger-color);font-weight:var(--base-font-weight-bold);font-size:var(--base-font-size-xs);text-align:center;cursor:pointer;margin:0 .1em;line-height:1;text-decoration:none;display:inline-block;position:relative;top:-.1em}.reference-number__trigger:hover{background:var(--reference-number-trigger-hover-background);color:var(--reference-number-trigger-hover-color)}.reference-number__trigger:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.reference-number__content-wrapper{z-index:var(--z-index-reference-number);width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width);position:absolute}.reference-number__content{padding:var(--spacer-r-20);border-width:var(--reference-number-content-border-width);border-radius:var(--reference-number-content-border-radius);border-style:solid;border-color:var(--reference-number-content-border-color);background:var(--reference-number-content-background);box-shadow:var(--reference-number-content-box-shadow);display:block}.reference-number__content:hover{border-width:var(--reference-number-content-hover-border-width,var(--reference-number-content-border-width));border-color:var(--reference-number-content-hover-border-color,var(--reference-number-content-border-color));background:var(--reference-number-content-hover-background,var(--reference-number-content-background));color:var(--reference-number-content-hover-color,var(--reference-number-content-color));cursor:pointer}.reference-number__content:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.reference{padding:var(--spacer-12);gap:var(--spacer-12);border-width:var(--reference-border-width);border-radius:var(--reference-border-radius);border-color:var(--reference-border-color);background:var(--reference-background);box-shadow:var(--reference-box-shadow);color:var(--reference-color);cursor:pointer;display:flex}.reference:hover{border-width:var(--reference-hover-border-width,var(--reference-border-width));border-color:var(--reference-hover-border-color,var(--reference-border-color));background:var(--reference-hover-background,var(--reference-background));box-shadow:var(--reference-hover-box-shadow,var(--reference-box-shadow), none);color:var(--reference-hover-color,var(--reference-color))}.reference__number{min-width:1.5em;height:1.5em;margin-top:var(--spacer-1);padding:var(--reference-number-padding);border-width:var(--reference-number-border-width);border-radius:var(--reference-number-border-radius);border-color:var(--reference-number-border-color);background:var(--reference-number-background);box-shadow:var(--reference-number-box-shadow);color:var(--reference-number-color);font-weight:700;font-weight:var(--base-font-weight-bold);font-size:var(--base-font-size-xs);text-align:center;flex-shrink:0;line-height:1;display:block}@container chat-container (width>=640px){.reference__number{margin-top:calc(var(--spacer-1) * -1)}}a:hover .reference__number{border-width:var(--reference-number-hover-border-width,var(--reference-number-border-width));border-radius:var(--reference-number-hover-border-radius,var(--reference-number-border-radius));border-color:var(--reference-number-hover-border-color,var(--reference-number-border-color));background:var(--reference-number-hover-background,var(--reference-number-background));box-shadow:var(--reference-number-hover-box-shadow,var(--reference-number-box-shadow));color:var(--reference-number-hover-color,var(--reference-number-color))}.reference__header{justify-content:space-between;align-items:flex-start;gap:var(--spacer-12);width:100%;display:flex}.reference__title{font-size:var(--reference-font-size,var(--base-font-size-sm))}.reference__body{flex-direction:column;flex-grow:1;min-width:0;display:flex}.reference__icon{width:var(--spacer-20);color:var(--anchor-color);flex-shrink:0;position:relative}@media (hover:hover){.reference__icon{transform:translate(calc(var(--spacer-8) * -1), var(--spacer-8));opacity:0;transition:transform .2s ease-in-out,opacity .2s linear}}a:hover .reference__icon{opacity:1;transform:translate(0)}.reference__description{margin-top:var(--spacer-2);color:var(--reference-description-color);font-size:var(--base-font-size-sm)}a:hover .reference__description{color:var(--reference-description-hover-color)}.reference__footer{--footer-gap:var(--spacer-5);column-gap:var(--footer-gap);margin-top:var(--spacer-6);font-size:var(--base-font-size-xs);flex-wrap:wrap;display:flex}.reference__domain{max-width:100%;padding:var(--reference-domain-padding);border-width:var(--reference-domain-border-width);border-radius:var(--reference-domain-border-radius);border-color:var(--reference-domain-border-color);background:var(--reference-domain-background);box-shadow:var(--reference-domain-box-shadow);color:var(--reference-domain-color);font-weight:700;display:inline-flex}a:hover .reference__domain{border-width:var(--reference-domain-hover-border-width,var(--reference-domain-border-width));border-color:var(--reference-domain-hover-border-color,var(--reference-domain-border-color));background:var(--reference-domain-hover-background,var(--reference-domain-background));box-shadow:var(--reference-domain-hover-box-shadow,var(--reference-domain-box-shadow));color:var(--reference-domain-hover-color,var(--reference-domain-color))}.reference__breadcrumb{color:var(--reference-domain-color)}.reference__breadcrumb:before{padding-right:var(--footer-gap);content:"/";position:relative;top:-1px}a:hover .reference__breadcrumb{color:var(--reference-domain-hover-color,var(--reference-domain-color))}.references__container{--padding:var(--spacer-10);padding:var(--padding);flex-direction:column;display:flex}.references__transition{position:relative}.references__items{width:100%}.references__items :focus-within{z-index:var(--z-index-local-overlay);position:relative}.references__further{margin-top:var(--padding);margin-right:calc(var(--padding) * -1);margin-left:calc(var(--padding) * -1);border-top:1px solid var(--base-line-color)}.references__further :where(.references__container){scroll-margin-top:140px}.references__further :where(.reference){padding-left:var(--spacer-16)}.references__toggle{width:100%;padding:var(--spacer-20) var(--spacer-20) var(--spacer-20) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-8);border-width:var(--references-toggle-border-width);border-radius:var(--references-toggle-border-radius);border-color:var(--references-toggle-border-color);background:var(--references-toggle-background);box-shadow:var(--references-toggle-box-shadow);color:var(--references-toggle-color);font-weight:var(--references-toggle-font-weight,var(--base-font-weight-bold));font-size:var(--references-toggle-font-size,var(--base-font-size-sm));display:flex}.references__toggle:hover{border-color:var(--references-toggle-hover-border-color);background:var(--references-toggle-hover-background);box-shadow:var(--references-toggle-hover-box-shadow);color:var(--references-toggle-hover-color)}.references__toggle[data-state=open] :where(.references__toggle-icon){transform:rotate(180deg)}.references__toggle-icon{width:var(--spacer-24);transition:transform .2s}.start-page{padding-top:var(--spacer-r-40);padding-bottom:var(--spacer-r-40);flex-direction:column;flex-grow:1;justify-content:center;align-items:stretch;display:flex}.start-page__introduction{margin-bottom:var(--spacer-r-48)}.start-page__chat-input{width:100%;margin-bottom:var(--spacer-r-32)}.tooltip-container{z-index:var(--z-index-tooltip);position:relative}.tooltip-container:hover{z-index:var(--z-index-tooltip-hover)}.tooltip{--background-color:var(--tooltip-background);z-index:var(--z-index-tooltip);padding:var(--spacer-3) var(--spacer-8);border-radius:var(--tooltip-border-radius);background:var(--background-color);color:var(--tooltip-color);font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-xs);white-space:nowrap;opacity:1;transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1);position:absolute;transform:translateY(0)}.tooltip:after{content:"";border-style:solid;border-width:5px;position:absolute}.tooltip-top:after{bottom:-10px;left:calc(50% + var(--tooltip-arrow-offset,0px));border-color:var(--background-color) transparent transparent transparent;transform:translate(-50%)}.tooltip-bottom:after{top:-10px;left:calc(50% + var(--tooltip-arrow-offset,0px));border-color:transparent transparent var(--background-color) transparent;transform:translate(-50%)}.tooltip-left:after{border-color:transparent var(--background-color) transparent transparent;top:50%;right:-10px;transform:translateY(-50%)}.tooltip-right:after{border-color:transparent transparent transparent var(--background-color);top:50%;left:-10px;transform:translateY(-50%)}.tooltip-bottom-right:after{border-color:transparent transparent var(--background-color) transparent;top:-10px;left:80%;transform:translate(-50%)}.tooltip-bottom-left:after{border-color:transparent transparent var(--background-color) transparent;top:-10px;left:20px;transform:translate(-50%)}.tooltip-hidden{opacity:0;pointer-events:none;transform:translateY(1rem)}.context-box.open .tooltip{display:none}.mic-icon{justify-content:center;align-items:center;height:1.5rem;display:flex;position:relative}.mic-icon .svg{width:inherit}.audio-level-mic-svg{width:1.5rem;height:1.5rem}.embed-combobox{align-items:start;gap:var(--spacer-r-16);flex-direction:column;display:flex}.embed-combobox__combobox{border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);background:var(--input-background);align-items:stretch;width:100%;min-width:14rem;max-width:500px;display:inline-flex;position:relative}.embed-combobox__combobox:has(:focus-visible:not([data-disabled])){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}[data-combobox-input]{width:100%;padding:var(--input-padding);padding-right:var(--spacer-r-64);color:var(--input-color);background:0 0;outline:none}[data-combobox-input]::placeholder{color:var(--input-placeholder-color)}[data-combobox-trigger]{z-index:var(--z-index-local-overlay);aspect-ratio:1;border:0;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;right:0}[data-combobox-trigger] :where(.btn){border-radius:calc(var(--btn-tertiary-border-radius) * .75)}[data-combobox-trigger][data-state=open],[data-combobox-trigger]:hover,[data-combobox-trigger]:focus-visible{outline:none}:is([data-combobox-trigger][data-state=open],[data-combobox-trigger]:hover,[data-combobox-trigger]:focus-visible) :where(.btn){background:var(--btn-tertiary-hover-background);color:var(--btn-tertiary-hover-color)}[data-combobox-trigger][data-disabled],[data-combobox-input][data-disabled]{cursor:not-allowed;opacity:.5}[data-combobox-content]{z-index:var(--z-index-flyout);width:var(--bits-combobox-anchor-width);min-width:var(--bits-combobox-anchor-width);height:21rem;max-height:var(--bits-combobox-content-available-height);padding:0 var(--spacer-r-12);border-width:var(--context-box-border-width);border-radius:var(--context-box-border-radius);border-style:solid;border-color:var(--context-box-border-color);background:var(--context-box-background);box-shadow:var(--context-box-box-shadow);font-size:var(--base-font-size-sm);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}[data-combobox-viewport]{flex-direction:column;gap:1px;display:flex}[data-bits-floating-content-wrapper]{padding:0}[data-combobox-viewport]>p{margin-top:var(--spacer-r-12);padding:var(--spacer-4) var(--spacer-8)}[data-combobox-item]{padding:var(--spacer-4) var(--spacer-8);align-items:center;gap:.5rem;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;-webkit-user-select:none;user-select:none;grid-template-columns:1fr auto;transition:background .2s ease-in-out,color .2s ease-in-out;display:grid}[data-combobox-item]:first-of-type{margin-top:var(--spacer-r-12)}[data-combobox-item]:last-of-type{margin-bottom:var(--spacer-r-12)}[data-combobox-item][data-highlighted]{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}[data-combobox-item][data-selected]{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}[data-combobox-item][data-disabled]{cursor:not-allowed;opacity:.5}[data-combobox-scroll-up-button],[data-combobox-scroll-down-button]{z-index:var(--z-index-local-overlay);padding:var(--spacer-4);background:linear-gradient(to bottom, var(--context-box-background), transparent);color:var(--context-box-menu-item-color);cursor:pointer;place-items:center;display:grid;position:absolute;top:0;left:0;right:0}:is([data-combobox-scroll-up-button],[data-combobox-scroll-down-button]):hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}[data-combobox-scroll-down-button]{background:linear-gradient(to top, var(--context-box-background), transparent);top:auto;bottom:0}[data-combobox-scroll-down-button]:hover{background:var(--context-box-menu-item-hover-background)}.embed-buttons{align-items:start;gap:var(--spacer-r-16);flex-direction:column;display:flex}.embed-buttons__buttons{gap:var(--spacer-r-12);flex-wrap:wrap;display:flex}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";.checkbox{border-width:var(--checkbox-border-width);border-radius:var(--checkbox-border-radius);border-color:var(--checkbox-border-color);background:var(--checkbox-background);width:1em;height:1em;box-shadow:var(--checkbox-box-shadow);color:var(--checkbox-color);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative;top:.1em}.checkbox[data-checked=true]{border-color:var(--checkbox-checked-border-color);background:var(--checkbox-checked-background);color:var(--checkbox-checked-color)}.checkbox__icon{width:100%;height:100%;color:var(--color-background);opacity:1;transition:opacity .2s}.checkbox[data-checked=false] .checkbox__icon{opacity:0}.radio{width:var(--spacer-16);height:var(--spacer-16);border-width:var(--radio-border-width);border-color:var(--radio-border-color);background:var(--radio-background);box-shadow:var(--radio-box-shadow);color:var(--radio-color);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.radio[data-checked=true]{border-color:var(--radio-checked-border-color);background:var(--radio-checked-background);color:var(--radio-checked-color)}.radio__indicator{width:var(--spacer-8);height:var(--spacer-8);opacity:0;background:currentColor;border-radius:50%;transition:opacity .2s,transform .2s;transform:scale(0)}.radio[data-checked=true] .radio__indicator{opacity:1;transform:scale(1)}.message__bot-layout{gap:var(--spacer-r-16);width:100%;display:flex}.message__bot-avatar{top:var(--spacer-80);width:var(--spacer-24);height:var(--spacer-24);margin-top:calc(var(--spacer-1) * -1);margin-bottom:var(--spacer-20);flex-shrink:0;display:none;position:sticky;overflow:clip}@container chat-container (width>=480px){.message__bot-avatar{display:block}}@container chat-container (width>=640px){.message__bot-avatar{width:var(--spacer-32);height:var(--spacer-32);margin-top:calc(var(--spacer-3) * -1);margin-bottom:var(--spacer-16)}}.svg--avatar--hide{visibility:hidden;height:0;margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}.message__content,.message__bot-body,.message__bot-options{min-width:0}.message__bot-body{width:100%}.message__bot-options{z-index:var(--z-index-local-overlay);column-gap:var(--spacer-20);row-gap:var(--spacer-8);margin-top:var(--spacer-24);padding-top:var(--spacer-12);border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color);flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}@container chat-container (width>=640px){.message__bot-options{margin-top:var(--spacer-32);margin-bottom:var(--spacer-20)}}.message__bot-options:has(>:only-child){justify-content:flex-end}.message__bot-references{--btn-padding-x:var(--btn-padding-y);margin-left:calc(var(--btn-padding-x) * -1)}.message__bot-references :where(.btn__label){display:flex}.message__bot-actions{--btn-padding-x:var(--btn-padding-y);margin-right:calc(var(--btn-padding-x) * -1);display:flex;position:relative}@container chat-container (width>=640px){.message__bot-actions{gap:var(--spacer-8)}}.message__bot-loading{width:var(--spacer-16);height:var(--spacer-16);margin:0 var(--spacer-2);display:inline-block}`;function tP(e,{delay:t=0,duration:n=200,easing:r=e=>e,baseScale:i=0,transformOrigin:a=`bottom right`,scaleDirection:o=`scale`}={}){if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return{delay:0,duration:0,css:()=>`opacity: 1; transform: ${o}(1); transform-origin: ${a};`};let s=getComputedStyle(e),c=+s.opacity,l=s.transform.match(/scale[XY]?\(([0-9.]+)\)/),u=l?+l[1]:1,d=1-i;return{delay:t,duration:n,css:e=>{let t=r(e),n=t*u*d+i;return`opacity: ${t*c}; transform: ${o}(${n}); transform-origin: ${a};`}}}var nP=L(`<div class="loader-container svelte-6xtyn8"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>`),rP={hash:`svelte-6xtyn8`,code:`.loader-container.svelte-6xtyn8 {display:flex;z-index:var(--z-index-loader);position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}`};function iP(e,t){E(t,!0),va(e,rP);let n=K(t,`color`,7),r=K(t,`background`,7);var i={get color(){return n()},set color(e){n(e),O()},get background(){return r()},set background(e){r(e),O()}},a=nP(),o=M(a);return T(a),F(()=>{ja(a,r()?`background: ${r()};`:``),W(o,`fill`,n()??`rgba(127, 127, 127, 0.3)`)}),z(e,a),D(i)}q(iP,{color:{},background:{}},[],[],{mode:`open`});var aP=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";`,oP=typeof window<`u`?window:{screen:{},navigator:{}},sP=(oP.matchMedia||(function(){return{matches:!1}})).bind(oP),cP={get passive(){return!0}},lP=function(){};oP.addEventListener&&oP.addEventListener(`p`,lP,cP),oP.removeEventListener&&oP.removeEventListener(`p`,lP,!1),`PointerEvent`in oP;var uP=`ontouchstart`in oP,dP=`TouchEvent`in oP,fP=uP||dP&&sP(`(any-pointer: coarse)`).matches,pP=(oP.navigator.maxTouchPoints||0)>0||fP,mP=oP.navigator.userAgent||``,hP=sP(`(pointer: coarse)`).matches&&/iPad|Macintosh/.test(mP)&&Math.min(oP.screen.width||0,oP.screen.height||0)>=768,gP=(sP(`(pointer: coarse)`).matches||!sP(`(pointer: fine)`).matches&&uP)&&!/Windows.*Firefox/.test(mP),_P=sP(`(any-pointer: fine)`).matches||sP(`(any-hover: hover)`).matches||hP||!uP,vP=pP&&(_P||!gP)?`hybrid`:pP?`touchOnly`:`mouseOnly`,yP=vP===`mouseOnly`?`mouse`:vP===`touchOnly`||gP?`touch`:`mouse`,bP=L(`<div class="open-button__title"></div>`),xP=L(`<div class="open-button__mask"><div class="open-button__description"></div></div>`),SP=L(`<div class="open-button__text"><!> <!></div>`),CP=L(`<div class="sr-only"> </div>`),wP=L(`<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"></div>`,1),TP=L(`<link rel="stylesheet"/>`),EP=L(`<!> <!>`,1),DP=L(`<!> <!> <!> <main class="chat-app"><!></main>`,1);function OP(e,t){E(t,!0);let n=(e,n)=>{let r=()=>n?.().chatConfig,i=()=>n?.().language,a=()=>n?.().colorScheme,c=k(()=>{let{openButtonTitle:e,openButtonDescription:t}=r().translations[i()];return{openButtonTitle:e,openButtonDescription:t}}),l=k(()=>r().fullTheme[a()].tokens.svgs),u=k(()=>r().fullTheme[a()]?.tokens.components.openButton?.custom),d=k(()=>!!I(u)?.hideTitleWhenCollapsed);{let n=k(()=>r().buttonHref?void 0:s()?`true`:`false`),i=k(()=>r().buttonHref?void 0:`true`),a=k(()=>r().buttonHref?void 0:o()),u=k(()=>[`open-button`,t.buttonClass,Z.data.flyoutIsOpen?`open-button--expanded`:void 0,I(d)?`open-button--hide-title-when-collapsed`:void 0]);qk(e,{get href(){return r().buttonHref},onclick:fe,onmouseenter:ue,onmouseleave:de,use:ae,get"aria-expanded"(){return I(n)},get"aria-haspopup"(){return I(i)},get"aria-controls"(){return I(a)},get style(){return t.buttonStyle},get className(){return I(u)},get isStandalone(){return I(f)},children:(e,t)=>{var n=wP(),r=N(n),i=e=>{var t=SP(),n=M(t),r=e=>{var t=bP();ia(t,()=>I(c).openButtonTitle,!0),T(t),z(e,t)};H(n,e=>{I(c).openButtonTitle&&e(r)});var i=P(n,2),a=e=>{var t=xP(),n=M(t);ia(n,()=>I(c).openButtonDescription,!0),T(n),oo(n,e=>j(v,e),()=>I(v)),T(t),oo(t,e=>j(_,e),()=>I(_)),z(e,t)};H(i,e=>{I(c).openButtonDescription&&yP===`mouse`&&e(a)}),T(t),z(e,t)},a=e=>{var t=CP(),n=M(t,!0);T(t),F(()=>B(n,Z.t.ariaOpenChat)),z(e,t)};H(r,e=>{I(c).openButtonTitle||I(c).openButtonDescription?e(i):e(a,-1)});var o=P(r,2);ia(o,()=>I(l).avatar,!0),T(o),z(e,n)},$$slots:{default:!0}})}},r=A(`light`),i=K(t,`host`,7),a=K(t,`onError`,7),o=K(t,`flyoutId`,7),s=K(t,`flyoutIsOpen`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`,`flyoutId`,`flyoutIsOpen`]),l=async e=>{let t=await(await fetch(`${e}/chatconfig`)).json();return Lg.parse(t)},u=async({forceTheme:e,lang:t,apiUrl:n})=>{let r=S_(window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await l(n)),i;i=t?E_(t,r.supportedLanguages):k_(r.supportedLanguages);let a=gy(Object.keys(r.fullTheme));return{chatConfig:r,language:i,colorScheme:a}},d=(e,t)=>{if(e==null)return t;if(typeof e==`string`){let t=e.trim().toLowerCase();return!(t===``||t===`0`||t===`false`||t===`no`)}return typeof e==`number`?e!==0:typeof e==`boolean`?e:t},f=k(()=>!!i()),p=A(!1),m=A(!1),h=A(!1),g=A(void 0),_=A(void 0),v=A(void 0),y=k(()=>I(v)?.offsetWidth??0),b=k(()=>I(v)?.offsetHeight??0),x=A(void 0),S=A(!1),ee,te=A(!0);function ne(){return I(x)?(clearTimeout(I(x)),j(x,void 0),!0):!1}async function re(e){j(r,e.colorScheme,!0),ee?.(),ne(),j(S,!1);let n=e.chatConfig.fullTheme[I(r)]?.tokens.components.openButton?.custom??{},i=n.autoExpandScrollThreshold,a=Number(n.autoCollapseDelay??0),o=Number.isNaN(a)?0:Math.max(0,a),c=d(n.autoExpandOnce,!1),l=(()=>{if(i==null)return 100;if(typeof i==`string`){if(i.trim().toLowerCase()===`none`)return 0;let e=Number(i);return Number.isNaN(e)?100:e}let e=Number(i);return Number.isNaN(e)?100:e})();if(Number.isNaN(l)||l<=0)return;let u=`liipgpt-auto-expand-${t.apiUrl}`,f=!1;if(typeof window<`u`)try{f=window.localStorage.getItem(u)===`true`}catch(e){console.warn(`LiipGPT: unable to read auto-expand flag`,e)}j(h,f,!0);let p=()=>{if(!(window.scrollY/window.innerHeight*100>=l)){j(te,!0);return}if(!(I(m)||s())&&!(c&&(f||I(h)))&&I(te)){if(j(te,!1),j(m,!0),j(h,!0),ce(),c&&typeof window<`u`)try{window.localStorage.setItem(u,`true`)}catch(e){console.warn(`LiipGPT: unable to persist auto-expand flag`,e)}j(x,setTimeout(()=>{I(S)||(le(),j(m,!1)),j(x,void 0)},o),!0)}};window.addEventListener(`scroll`,p,{passive:!0}),l===0&&(await Yr(),p()),ee=()=>{window.removeEventListener(`scroll`,p)}}function ie(){ne(),j(m,!1),j(S,!1)}function ae(e){j(g,e,!0)}function C(){ee?.(),ne()}zi(C);function oe(){!I(v)||!I(_)||(I(_).style.width=`${I(y)}px`,I(_).style.height=`${I(b)}px`)}function se(){I(_)&&(I(_).style.width=`0`,I(_).style.height=`0`)}function ce(){I(g)&&(I(g).classList.add(`open-button--programmatic-expand`),oe())}function le(){I(g)&&(I(g).classList.remove(`open-button--programmatic-expand`),se())}function ue(){ne()&&j(S,!0),oe()}function de(){ne(),I(S)&&(j(m,!1),j(S,!1),I(g)?.classList.remove(`open-button--programmatic-expand`)),I(p)||se()}function fe(e){ie(),t.onclick?.(e)}let pe=k(()=>u(c).then(async e=>(await re(e),e)).catch(e=>a()(e)));var me={get host(){return i()},set host(e){i(e),O()},get onError(){return a()},set onError(e){a(e),O()},get flyoutId(){return o()},set flyoutId(e){o(e),O()},get flyoutIsOpen(){return s()},set flyoutIsOpen(e){s(e),O()}},he=R();return oi(`beforeunload`,Mn,C),_a(`1k415fq`,e=>{var t=R(),n=N(t),r=e=>{var t=R();Gi(N(t),()=>I(pe),null,(e,t)=>{let n=k(()=>I(t).chatConfig.fullTheme[I(t).colorScheme]);var r=EP(),i=N(r);Qi(i,17,()=>I(n).fontURLs??[],Ji,(e,t)=>{var n=TP();F(()=>W(n,`href`,I(t))),z(e,n)}),$N(P(i,2),{id:`font-css`,get css(){return I(n).fontCSS}}),z(e,r)}),z(e,t)};H(n,e=>{I(f)&&e(r)}),z(e,t)}),Gi(N(he),()=>I(pe),e=>{},(e,t)=>{let i=k(()=>I(t).chatConfig.fullTheme[I(r)]);var a=R(),o=N(a),s=e=>{var r=DP(),a=N(r);{let e=k(()=>QN(I(i).tokens));$N(a,{id:`theme-css`,get css(){return I(e)}})}var o=P(a,2);$N(o,{id:`app-css`,get css(){return aP}});var s=P(o,2);$N(s,{id:`custom-css`,get css(){return I(i).customCSS}});var c=P(s,2);n(M(c),()=>I(t)),T(c),z(e,r)},c=e=>{n(e,()=>I(t))};H(o,e=>{I(f)?e(s):e(c,-1)}),z(e,a)}),z(e,he),D(me)}q(OP,{host:{},onError:{},flyoutId:{},flyoutIsOpen:{}},[],[],{mode:`open`});var kP=L(`<div class="flyout__backdrop"></div>`),AP=L(`<div class="flyout__content"><!></div>`),jP=L(`<div><!> <div class="flyout__body"><!> <div><!></div></div></div>`),MP=L(`<!> <div class="chat-app__container"><div class="chat-app__loader-container"><!></div></div>`,1);function NP(e,t){E(t,!0);let n=K(t,`children`,7),r=K(t,`loaderColor`,7),i=K(t,`loaderBackground`,7),a=K(t,`flyout`,7),o=K(t,`flyoutClass`,7),s=K(t,`flyoutStyle`,7),c=K(t,`onCloseChat`,7),l=K(t,`onError`,7),u=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`loaderColor`,`loaderBackground`,`flyout`,`flyoutClass`,`flyoutStyle`,`onCloseChat`,`onError`]),d=k(()=>Z.theme?.components?.flyout?.custom??{}),f=k(()=>({enabled:Z.data?.chatConfig?.enableBackdrop??!1,delayIn:Number(I(d).backdropDelayIn??0),durationIn:Number(I(d).backdropDurationIn??200),delayOut:Number(I(d).backdropDelayOut??0),durationOut:Number(I(d).backdropDurationOut??200),baseScaleIn:Number(I(d).backdropBaseScaleIn??1),baseScaleOut:Number(I(d).backdropBaseScaleOut??1),transformOrigin:String(I(d).backdropTransformOrigin??`center`),scaleDirection:String(I(d).backdropScaleDirection??`scale`)})),p=k(()=>({in:{delay:I(f).delayIn,duration:I(f).durationIn,baseScale:I(f).baseScaleIn,transformOrigin:I(f).transformOrigin,scaleDirection:I(f).scaleDirection},out:{delay:I(f).delayOut,duration:I(f).durationOut,baseScale:I(f).baseScaleOut,transformOrigin:I(f).transformOrigin,scaleDirection:I(f).scaleDirection}})),m,h=e=>{tr(()=>{let t=e=>{m=e};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t),m=void 0}})},g=`flyout`,_=A(void 0),v=k(()=>Z.data.flyoutIsOpen),y=A(!1),b=k(()=>Z.initialized),x=k(()=>Z.data.hasOpenedOverlays);tr(()=>{!Z.data.flyoutIsOpen&&I(y)&&(I(_)?.querySelector(`button`))?.focus({preventScroll:!0}),j(y,I(v),!0)}),tr(()=>{if(I(b)&&I(v)){let e=e=>{e.key===`Escape`&&(I(x)||c()())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}}});var S={get children(){return n()},set children(e){n(e),O()},get loaderColor(){return r()},set loaderColor(e){r(e),O()},get loaderBackground(){return i()},set loaderBackground(e){i(e),O()},get flyout(){return a()},set flyout(e){a(e),O()},get flyoutClass(){return o()},set flyoutClass(e){o(e),O()},get flyoutStyle(){return s()},set flyoutStyle(e){s(e),O()},get onCloseChat(){return c()},set onCloseChat(e){c(e),O()},get onError(){return l()},set onError(e){l(e),O()}},ee=R();oi(`click`,Mn,e=>{e!==m&&a()&&c()()});var te=N(ee),ne=e=>{var t=R(),r=N(t),i=e=>{},a=e=>{var t=jP(),r=M(t),i=e=>{var t=kP();ma(1,t,()=>tP,()=>({...I(p).in,easing:Sk})),ma(2,t,()=>tP,()=>({...I(p).out,easing:Sk})),z(e,t)};H(r,e=>{Z.data.flyoutIsOpen&&I(f).enabled&&e(i)});var a=P(r,2);W(a,`id`,g);var c=M(a),d=e=>{var t=AP();V(M(t),n),T(t),ma(1,t,()=>tP,()=>({delay:0,duration:500,easing:Sk,baseScale:.3})),ma(2,t,()=>tP,()=>({delay:100,duration:300,easing:Sk,baseScale:.7})),z(e,t)};H(c,e=>{Z.data.flyoutIsOpen&&e(d)});var m=P(c,2);OP(M(m),po({get onError(){return l()},onclick:e=>{e.stopPropagation(),Fy.openFlyout()},flyoutId:g,get flyoutIsOpen(){return I(v)},buttonClass:`flyout__open-button`},()=>u)),T(m),oo(m,e=>j(_,e),()=>I(_)),T(a),ya(a,e=>h?.(e)),T(t),F(()=>{ja(t,s()),ka(t,1,Ca([`flyout`,o()]))}),z(e,t)};H(r,e=>{Z.initialized?e(a,-1):e(i)}),z(e,t)},re=e=>{var a=R(),o=N(a),s=e=>{var n=MP(),a=N(n);$N(a,{id:`app-css`,get css(){return eP}});var o=P(a,2),s=M(o);aa(M(s),t,`loader`,{},e=>{iP(e,{get background(){return i()},get color(){return r()}})}),T(s),T(o),ma(2,o,()=>SM,()=>({duration:200,delay:300})),z(e,n)},c=e=>{var t=R();V(N(t),n),z(e,t)};H(o,e=>{Z.initialized?e(c,-1):e(s)}),z(e,a)};return H(te,e=>{a()?e(ne):e(re,-1)}),z(e,ee),D(S)}q(NP,{children:{},loaderColor:{},loaderBackground:{},flyout:{},flyoutClass:{},flyoutStyle:{},onCloseChat:{},onError:{}},[`loader`],[],{mode:`open`});var PP=L(`<button type="button"> </button>`),FP=L(`<div class="dialog-footer__actions"></div>`);function IP(e,t){E(t,!1);function n(e){let t=Fy[e];typeof t==`function`&&t()}so();{let t=e=>{var t=R();ia(N(t),()=>Z.data.openedPopup?.title),z(e,t)},r=e=>{var t=R();ia(N(t),()=>Z.data.openedPopup?.content),z(e,t)},i=e=>{var t=R(),r=N(t),i=e=>{var t=FP();Qi(t,5,()=>Z.data.openedPopup.actions,Ji,(e,t)=>{let r=()=>I(t).action,i=()=>I(t).label,a=()=>I(t).type;var o=PP(),s=M(o,!0);T(o),F(()=>{ka(o,1,`btn btn--${a()??`secondary`??``}`),B(s,i())}),si(`click`,o,()=>n(r())),z(e,o)}),T(t),z(e,t)};H(r,e=>{Z.data.openedPopup?.actions?.length&&e(i)}),z(e,t)},a=pn(()=>Z.data.openedPopup!==void 0);Ej(e,{get open(){return I(a)},get onClose(){return Fy.closePopup},title:t,content:r,footer:i,$$slots:{title:!0,content:!0,footer:!0}})}D()}ci([`click`]),q(IP,{},[],[],{mode:`open`});var LP=L(`<span class="reference__description line-clamp line-clamp--6"> </span>`),RP=L(`<span class="reference__breadcrumb transition-colors"> </span>`),zP=L(`<span class="reference__footer"><span class="reference__domain transition-colors"><span class="truncate"> </span></span> <!></span>`),BP=L(`<div class="reference-number__content-wrapper" role="tooltip" aria-hidden="true"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer" tabindex="-1" aria-hidden="true"><span class="reference__header"><h3 class="reference__title line-clamp line-clamp--2 h4"> </h3> <!></span> <!> <!></a></div>`),VP=L(`<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>`);function HP(e,t){E(t,!0);let n=k(()=>Z.t),r=K(t,`usedNumber`,7),i=K(t,`source`,7),a=A(!1),o,s=A(void 0),c=A(void 0),l=k(i),u=k(()=>I(l).display.card.title),d=k(()=>I(l).display.card.description),f=k(()=>I(l).display.card.badge),p=k(()=>I(l).display.card.breadcrumbs),m={duration:Number(Z.theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(Z.theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(Z.theme.components.referenceNumberContent.custom?.transitionY)||10},h=async()=>{if(!I(s)||!I(c))return;let{x:e,y:t}=await uD(I(s),I(c),{placement:`top`,middleware:[rD(8),aD(),iD({padding:8})]});Object.assign(I(c).style,{left:`${e}px`,top:`${t}px`})},g=()=>{o&&=(clearTimeout(o),void 0)},_=()=>{g(),o=setTimeout(()=>{j(a,!1)},100)},v=`tooltip-${Kg()}`,y=e=>{e.key===`Escape`&&j(a,!1)},b=()=>{g(),j(a,!0)};tr(()=>{I(a)?document.addEventListener(`keydown`,y):document.removeEventListener(`keydown`,y)}),tr(()=>{I(a)&&h()});var x={get usedNumber(){return r()},set usedNumber(e){r(e),O()},get source(){return i()},set source(e){i(e),O()}},S=VP(),ee=M(S),te=M(ee,!0);T(ee),oo(ee,e=>j(s,e),()=>I(s));var ne=P(ee,2),re=e=>{var t=BP(),n=M(t),r=M(n),i=M(r),a=M(i,!0);T(i),Vy(P(i,2),{name:`externalLink`,class:`reference__icon transition-colors`}),T(r);var o=P(r,2),s=e=>{var t=LP(),n=M(t,!0);T(t),F(()=>B(n,I(d))),z(e,t)};H(o,e=>{I(d)&&e(s)});var h=P(o,2),g=e=>{var t=zP(),n=M(t),r=M(n),i=M(r,!0);T(r),T(n);var a=P(n,2),o=e=>{var t=R();Qi(N(t),17,()=>I(p),Ji,(e,t)=>{var n=RP(),r=M(n,!0);T(n),F(()=>B(r,I(t))),z(e,n)}),z(e,t)};H(a,e=>{I(p)&&e(o)}),T(t),F(()=>B(i,I(f))),z(e,t)};H(h,e=>{I(f)&&e(g)}),T(n),T(t),oo(t,e=>j(c,e),()=>I(c)),F(()=>{W(t,`id`,v),W(n,`href`,I(l).url),B(a,I(u))}),oi(`mouseenter`,t,b),oi(`mouseleave`,t,_),ma(3,t,()=>Dk,()=>m),z(e,t)};return H(ne,e=>{I(a)&&e(re)}),T(S),F(()=>{W(ee,`href`,I(l).url),W(ee,`aria-describedby`,I(a)?v:void 0),W(ee,`aria-label`,`${I(n).referenceLink??``}: ${I(u)??``}`),W(ee,`data-state`,I(a)?`open`:`closed`),B(te,r())}),oi(`mouseenter`,ee,b),oi(`mouseleave`,ee,_),oi(`focus`,ee,()=>j(a,!0)),oi(`blur`,ee,()=>j(a,!1)),z(e,S),D(x)}customElements.define(`liipgpt-reference-number`,q(HP,{source:{attribute:`data-source`,type:`Object`},refNumber:{attribute:`data-all-index`,type:`String`},usedNumber:{attribute:`data-used-index`,type:`String`}},[],[]));var UP=`main-navigation`,WP=e=>{e.preventDefault(),Z.targets.chatAppMainNavigation&&(Z.targets.chatAppMainNavigation.scrollIntoView({behavior:`smooth`,block:`start`}),Z.targets.chatAppMainNavigation.focus())},GP=L(`<link rel="stylesheet"/>`),KP=L(`<link rel="stylesheet"/>`),qP=L(`<!> <!> <!>`,1),JP=L(`<link rel="stylesheet"/>`),YP=L(`<!> <!> <!> <!>`,1),XP=L(`<h1 class="sr-only"> </h1>`),ZP=L(`<div class="chat-app__header-logo"></div>`),QP=L(`<!> <!> <!>`,1),$P=L(`<div class="chat-app__page-transition"><!></div>`),eF=L(`<div><div class="chat-app__main"><div class="chat-app__portals"></div> <!> <div><div class="container"><!> <nav tabindex="-1"><h2 class="sr-only absolute"> </h2> <!> <!> <!></nav> <div id="chat-app-header-portal"></div></div></div> <div class="chat-app__body"><!> <!></div></div> <!> <!></div>`),tF=L(`<main class="chat-app"><!> <!></main>`);function nF(e,t){E(t,!0);let n=K(t,`host`,7),r=K(t,`onError`,7),i=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`]);tr(()=>{let e={forceTheme:t.forceTheme,apiUrl:t.apiUrl,apiKey:t.apiKey,speechRecognitionApiKey:t.speechRecognitionApiKey,lang:t.lang,features:t.features,loaderBackground:t.loaderBackground,loaderColor:t.loaderColor,flyout:t.flyout,flyoutStyle:t.flyoutStyle,flyoutClass:t.flyoutClass,inlineLayout:t.inlineLayout};Qr(()=>Fy.init(e).catch(e=>r()(e)))});let a=k(()=>Z.data.route.name),o=()=>{Fy.closeFlyout(),n().dispatchEvent(new CustomEvent(`closechat`))};tr(()=>{Z.initialized&&Z.data?.chatConfig&&n().dispatchEvent(new CustomEvent(`configloaded`,{detail:Z.data.chatConfig}))});let s=A(void 0),c=A(null),l=m_.fineGrained?.light?.tokens?.components?.aside?.custom?.containerWidthForMobileLayout,u=A(!1),d=k(()=>I(c)?Z.data.props?.flyout||I(c)<=l:null),f=A(void 0),p=A(!1),m=A(0);tr(()=>{if(I(f)&&I(f).firstElementChild instanceof HTMLElement){let e=getComputedStyle(I(f).firstElementChild);j(m,parseFloat(e.paddingTop)||0,!0)}}),tr(()=>{let e=!1,t=()=>{e||(e=!0,requestAnimationFrame(()=>{I(s)&&(e=!1,Z.targets.scrollContainer?.scrollTop===0&&y(),j(p,I(s).scrollTop>=I(m)+1))}))};return t(),I(s)?.addEventListener(`scroll`,t,{passive:!0}),()=>I(s)?.removeEventListener(`scroll`,t)});let h=()=>{Fy.closeReferencesAside()};tr(()=>{Z.initialized&&Z.data.currentReferencesAsideId?j(u,!0):j(u,!1)});let g=A(void 0),_,v=A(!1),y=()=>{j(v,!1),_?.disconnect(),_=new IntersectionObserver(([e])=>{e.isIntersecting?(j(v,!0),_.disconnect()):j(v,!1)},{root:Z.targets.scrollContainer,rootMargin:`-15% 0px 0px 0px`}),I(g)&&_.observe(I(g))};Ri(()=>{if(I(g))return y(),window.addEventListener(`resize`,y),()=>{_?.disconnect(),window.removeEventListener(`resize`,y)}});let b=k(()=>Z.initialized);tr(()=>{I(b)&&I(d)!==null&&Qr(()=>Fy.setAsideMobile(I(d)))});let x=A(void 0),S=k(()=>Z.data?.chatConfig?.inlineLayout&&!Z.data.props.flyout);tr(()=>{let e=0,t=()=>{e=window.visualViewport?.height??window.innerHeight},n=new ResizeObserver(()=>{let t=window.innerWidth<768?.9:1;I(x)&&I(x).offsetHeight>e*t&&(Z.data.isInlineLayoutContained=!0,requestAnimationFrame(()=>{I(x)?.offsetHeight,window.dispatchEvent(new Event(`resize`))}))}),r=[`mouseup`,`click`],i=!1;fy()||r.push(`keydown`);let a=()=>{i||(i=!0,I(x)?.scrollIntoView({behavior:`smooth`}),setTimeout(()=>{i=!1},300))};return I(S)&&I(x)&&(t(),window.visualViewport?.addEventListener(`resize`,t),window.addEventListener(`resize`,t),n.observe(I(x)),r.forEach(e=>{I(x).addEventListener(e,a,!0)})),()=>{I(x)&&r.forEach(e=>{I(x).removeEventListener(e,a,!0)}),n.disconnect(),window.visualViewport?.removeEventListener(`resize`,t),window.removeEventListener(`resize`,t)}});let ee=k(()=>Z.data.props.flyout);return tr(()=>{I(b)&&I(ee)&&(n().setAttribute(`role`,`region`),Qr(()=>{n().setAttribute(`aria-label`,Z.t.ariaFlyoutRegion)}))}),_a(`3hann0`,e=>{var t=R(),n=N(t),r=e=>{var t=qP(),n=N(t);Qi(n,17,()=>Z.themeBase.fontURLs??[],Ji,(e,t)=>{var n=GP();F(()=>W(n,`href`,I(t))),z(e,n)});var r=P(n,2);Qi(r,17,()=>Z.data.additionalStylesheets,Ji,(e,t)=>{var n=KP();F(()=>W(n,`href`,I(t))),z(e,n)}),$N(P(r,2),{id:`font-css`,get css(){return Z.themeBase.fontCSS}}),z(e,t)};H(n,e=>{Z.initialized&&e(r)}),z(e,t)}),Qw(e,{get defaultPortalTo(){return I(s)},children:(e,t)=>{var n=tF();let l;var m=M(n),_=e=>{var t=YP(),n=N(t);{let e=k(()=>QN(Z.theme));$N(n,{id:`theme-css`,get css(){return I(e)}})}var r=P(n,2);$N(r,{id:`app-css`,get css(){return eP}});var i=P(r,2);$N(i,{id:`custom-css`,get css(){return Z.themeBase.customCSS}}),Qi(P(i,2),17,()=>Z.data.additionalStylesheets,Ji,(e,t)=>{var n=JP();F(()=>W(n,`href`,I(t))),z(e,n)}),z(e,t)};H(m,e=>{Z.initialized&&e(_)}),NP(P(m,2),po({onCloseChat:o,get onError(){return r()}},()=>i,{children:(e,t)=>{var n=eF(),r=M(n),i=M(r);ya(i,(e,t)=>Ly?.(e,t),()=>`portals`);var l=P(i,2);zy(l,{});var m=P(l,2),_=M(m),y=M(_),b=e=>{var t=XP(),n=M(t,!0);T(t),F(()=>B(n,Z.t.ariaPageTitle)),z(e,t)};H(y,e=>{!I(ee)&&!I(S)&&e(b)});var te=P(y,2);let ne;W(te,`id`,UP);var re=M(te),ie=M(re,!0);T(re);var ae=P(re,2),C=e=>{var t=ZP();ia(t,()=>Z.theme.svgs.headerLogo,!0),T(t),z(e,t)};H(ae,e=>{Z.theme.svgs.headerLogo&&e(C)});var oe=P(ae,2),se=e=>{pM(e,{class:`chat-app__header-new-conversation`})};H(oe,e=>{I(a)===`chat-page`&&e(se)});var ce=P(oe,2),le=e=>{var t=QP(),n=N(t),r=e=>{{let t=k(()=>Z.t.aboutThisChat||``);Kj(e,{get content(){return I(t)}})}};H(n,e=>{Z.data.chatConfig.showContextInfo&&e(r)});var i=P(n,2),a=e=>{uM(e,{})};H(i,e=>{Z.data.chatConfig.showContextMenu&&e(a)});var s=P(i,2),c=e=>{NA(e,{onclick:o})};H(s,e=>{(Z.data.chatConfig.showCloseChatButton||Z.data.props.flyout)&&e(c)}),z(e,t)};H(ce,e=>{Z.initialized&&e(le)}),T(te),ya(te,(e,t)=>Ly?.(e,t),()=>`chatAppMainNavigation`),ya(P(te,2),(e,t)=>Ly?.(e,t),()=>`chatAppHeaderPortal`),T(_),T(m),oo(m,e=>j(g,e),()=>I(g)),ya(m,(e,t)=>Ly?.(e,t),()=>`chatAppHeader`);var ue=P(m,2),de=M(ue);IP(de,{}),qi(P(de,2),()=>I(a),e=>{var t=$P(),n=M(t),r=e=>{zj(e,{})},i=e=>{zM(e,{})},o=e=>{Nj(e,{})};H(n,e=>{I(a)===`consent-page`?e(r):I(a)===`start-page`?e(i,1):I(a)===`chat-page`&&e(o,2)}),T(t),oo(t,e=>j(f,e),()=>I(f)),ma(1,t,()=>Ek,()=>({duration:300,delay:250})),ma(2,t,()=>SM,()=>({duration:150})),z(e,t)}),T(ue),T(r),oo(r,e=>j(s,e),()=>I(s)),ya(r,(e,t)=>Ly?.(e,t),()=>`scrollContainer`);var fe=P(r,2),pe=e=>{jA(e,{get isOpen(){return I(u)},get isMobile(){return I(d)},get showReferencesByDefault(){return Z.data.chatConfig.showReferencesByDefault},onClose:h,get title(){return Z.t.referencesTitle},children:(e,t)=>{jM(e,{})},$$slots:{default:!0}})};H(fe,e=>{I(d)!==null&&e(pe)}),$v(P(fe,2),{position:`top-center`,get containerAriaLabel(){return Z.t.ariaNotifications}}),T(n),or(()=>io(n,`clientWidth`,e=>j(c,e))),oo(n,e=>j(x,e),()=>I(x)),ya(n,(e,t)=>Ly?.(e,t),()=>`chatAppContainer`),F(()=>{ka(n,1,Ca([`chat-app__container`,{"chat-app__container--inline-layout":I(S),"chat-app__container--inline-layout-contained":Z.data.isInlineLayoutContained}])),ka(m,1,Ca([`chat-app__header`,{"chat-app__header--unsticked":I(v),"chat-app__header--with-logo":Z.theme.svgs.headerLogo}])),ne=ka(te,1,`chat-app__header-content`,null,ne,{"has-border":I(p)}),W(te,`aria-label`,`${Z.t.ariaMainNavigationRegion}${Z.data.chatConfig.showCloseChatButton||Z.data.props.flyout?`, ${Z.t.closeChat}`:``}`),B(ie,Z.t.ariaMainNavigation)}),z(e,n)},$$slots:{default:!0}})),T(n),F(()=>l=ja(n,``,l,{"color-scheme":Z.colorScheme||`light`})),z(e,n)},$$slots:{default:!0}}),D({get host(){return n()},set host(e){n(e),O()},get onError(){return r()},set onError(e){r(e),O()}})}q(nF,{host:{},onError:{}},[],[],{mode:`open`});var rF=L(`<div class="chat-app__container"><div class="error-message svelte-14mj70v">Server is unreachable, please try later... <button class="error-message__retry-button svelte-14mj70v">Retry</button></div></div>`),iF=L(` <!>`,1),aF={hash:`svelte-14mj70v`,code:`
|
|
571
|
+
}}.embed-alva-score__separator.svelte-16h2wiv {display:block;align-self:flex-end;width:4.8rem;margin-top:-0.3rem;padding-bottom:0.5rem;border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color);}`};function Kk(e,t){D(t,!0),_a(e,Gk);let n=j(void 0);nr(()=>{Zr(()=>{M(n,Ak.getContext(),!0),Ak.currentContext.experimentState===`in-progress`&&Ak.updateContext(e=>({...e,nextLevel:Nk(),nextShowCount:e.nextShowCount+1}))})});let r={low:`Tief`,medium:`Mittel`,high:`Hoch`};var i=Wk(),a=P(i),o=e=>{var t=z(),i=P(t),a=e=>{var t=z(),i=P(t),a=e=>{var t=Hk(),i=F(N(t));E(t),I(()=>V(i,` Antwortsicherheit: ${r[L(n).nextLevel]??L(n).nextLevel??``}`)),B(e,t)},o=e=>{var t=Uk(),i=F(N(t));E(t),I(()=>V(i,` Antwortunsicherheit: ${r[L(n).nextLevel]??L(n).nextLevel??``}`)),B(e,t)};U(i,e=>{L(n).assignedGroup===`certainty`?e(a):L(n).assignedGroup===`uncertainty`&&e(o,1)}),B(e,t)};U(i,e=>{L(n).nextShowCount<=2&&e(a)}),B(e,t)};U(a,e=>{Ak.currentContext.isDesktop&&L(n).experimentState===`in-progress`&&e(o)}),kk(F(a,2),{belowScore:!0}),B(e,i),O()}q(Kk,{},[],[],{mode:`open`});function qk(e,t){D(t,!0);let n=K(t,`href`,7),r=K(t,`target`,7),i=K(t,`onclick`,7),a=K(t,`className`,23,()=>[]),o=K(t,`isStandalone`,7,!1),s=K(t,`children`,7),c=K(t,`type`,7,`button`),l=K(t,`use`,7),u=K(t,`class`,7),d=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`href`,`target`,`onclick`,`className`,`isStandalone`,`children`,`type`,`use`,`class`]),f=A(()=>n()?`a`:`button`),p=A(()=>[...Array.isArray(a())?a():a()?[a()]:[],...u()?[u()]:[]]),m=()=>({}),h=A(()=>l()??m);var g={get href(){return n()},set href(e){n(e),k()},get target(){return r()},set target(e){r(e),k()},get onclick(){return i()},set onclick(e){i(e),k()},get className(){return a()},set className(e=[]){a(e),k()},get isStandalone(){return o()},set isStandalone(e=!1){o(e),k()},get children(){return s()},set children(e){s(e),k()},get type(){return c()},set type(e=`button`){c(e),k()},get use(){return l()},set use(e){l(e),k()},get class(){return u()},set class(e){u(e),k()}},_=z();return ha(P(_),()=>L(f),!1,(e,t)=>{va(e,e=>L(h)?.(e)),qa(e,()=>({...d,onclick:n()?void 0:i(),type:n()?void 0:c(),href:n(),role:n()?`link`:`button`,target:n()?r():void 0,class:L(p),[Pa]:{"open-button--standalone":o()}}));var a=z();H(P(a),s),B(t,a)}),B(e,_),O(g)}q(qk,{href:{},target:{},onclick:{},className:{},isStandalone:{},children:{},type:{},use:{},class:{}},[],[],{mode:`open`});var Jk=R(`<p class="embed-buttons__caption"></p>`),Yk=R(`<span class="btn__label"></span> <!>`,1),Xk=R(`<div class="embed-buttons"><!> <div class="embed-buttons__buttons"></div></div>`);function Zk(e,t){D(t,!0);let n=K(t,`data`,7);var r={get data(){return n()},set data(e){n(e),k()}},i=Xk(),a=N(i),o=e=>{var t=Jk();ra(t,()=>n().caption,!0),E(t),B(e,t)};U(a,e=>{n().caption&&e(o)});var s=F(a,2);return Zi(s,21,()=>n().buttons,qi,(e,t)=>{{let n=A(()=>[`btn`,`btn--${L(t).variant??`primary`}`]);qk(e,{get href(){return L(t).href},get target(){return L(t).target},get className(){return L(n)},children:(e,n)=>{var r=Yk(),i=P(r);ra(i,()=>L(t).label,!0),E(i);var a=F(i,2),o=e=>{Vy(e,{get name(){return L(t).icon}})};U(a,e=>{L(t).icon&&e(o)}),B(e,r)},$$slots:{default:!0}})}}),E(s),E(i),B(e,i),O(r)}q(Zk,{data:{}},[],[],{mode:`open`});var Qk=R(`<p class="embed-combobox__caption"></p>`),$k=R(`<p> </p>`),eA=R(`<div><div><!> <!> <!></div></div>`),tA=R(`<span class="btn btn--tertiary btn--square"><!> <span class="sr-only"> </span></span>`),nA=R(`<!> <!> <!>`,1),rA=R(`<div class="embed-combobox__combobox"><!></div>`),iA=R(`<div class="embed-combobox"><!> <!></div>`);function aA(e,t){D(t,!0);let n=K(t,`data`,7),r=A(()=>Z.t),i=j(``),a=j(!1),o=A(()=>L(i)===``?n().values:n().values.filter(e=>e.label.toLowerCase().includes(L(i).toLowerCase())));var s={get data(){return n()},set data(e){n(e),k()}},c=iA(),l=N(c),u=e=>{var t=Qk();ra(t,()=>n().caption,!0),E(t),B(e,t)};U(l,e=>{n().caption&&e(u)});var d=F(l,2),f=e=>{var t=rA();W(N(t),()=>ZD,(e,t)=>{t(e,{type:`single`,onOpenChange:e=>{e||M(i,``)},get open(){return L(a)},set open(e){M(a,e,!0)},children:(e,t)=>{var s=nA(),c=P(s);W(c,()=>nO,(e,t)=>{t(e,{get placeholder(){return n().placeholder},onfocus:()=>M(a,!0),onclick:()=>M(a,!0),oninput:e=>M(i,e.currentTarget.value,!0)})});var l=F(c,2);W(l,()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var n=z(),i=P(n);{let e=(e,t)=>{let n=()=>t?.().wrapperProps,i=()=>t?.().props,a=()=>t?.().open;var s=z(),c=P(s),l=e=>{var t=eA();qa(t,()=>({...n()}));var a=N(t);qa(a,()=>({...i()}));var s=N(a);W(s,()=>TO,(e,t)=>{t(e,{children:(e,t)=>{Vy(e,{name:`chevronUp`})},$$slots:{default:!0}})});var c=F(s,2);W(c,()=>yO,(e,t)=>{t(e,{children:(e,t)=>{var n=z();Zi(P(n),19,()=>L(o),(e,t)=>t+e.value,(e,t)=>{var n=z();W(P(n),()=>gO,(e,n)=>{n(e,{get value(){return L(t).value},children:(e,n)=>{Qe();var r=gi();I(()=>V(r,L(t).label)),B(e,r)},$$slots:{default:!0}})}),B(e,n)},e=>{var t=$k(),n=N(t,!0);E(t),I(()=>V(n,L(r).noResultsFound)),B(e,t)}),B(e,n)},$$slots:{default:!0}})}),W(F(c,2),()=>SO,(e,t)=>{t(e,{children:(e,t)=>{Vy(e,{name:`chevronDown`})},$$slots:{default:!0}})}),E(a),E(t),pa(1,a,()=>Dk,()=>({duration:300,easing:xk,y:40})),pa(2,a,()=>Dk,()=>({duration:150,easing:bk,y:20})),B(e,t)};U(c,e=>{a()&&e(l)}),B(e,s)};W(i,()=>fO,(t,n)=>{n(t,{sideOffset:10,forceMount:!0,strategy:`absolute`,child:e,$$slots:{child:!0}})})}B(e,n)},$$slots:{default:!0}})}),W(F(l,2),()=>iO,(e,t)=>{t(e,{children:(e,t)=>{var n=tA(),i=N(n);Vy(i,{name:`chevronTopDown`});var a=F(i,2),o=N(a,!0);E(a),E(n),I(()=>V(o,L(r).openMenu)),B(e,n)},$$slots:{default:!0}})}),B(e,s)},$$slots:{default:!0}})}),E(t),B(e,t)};return U(d,e=>{Z.targets.portals&&e(f)}),E(c),B(e,c),O(s)}q(aA,{data:{}},[],[],{mode:`open`});var oA={buttons:Zk,combobox:aA,"alva-init":Vk,"alva-score-survey":Kk},sA=e=>{let t=oA[e];if(!t){console.error(`No embed component found with name "${e}"`);return}return t};function cA(e,t){D(t,!0);let n=K(t,`componentName`,7),r=K(t,`data`,7),i=A(()=>sA(n())),a=j(!1);Li(()=>{requestAnimationFrame(()=>M(a,!0))});var o={get componentName(){return n()},set componentName(e){n(e),k()},get data(){return r()},set data(e){r(e),k()}},s=z(),c=P(s),l=e=>{var t=z();W(P(t),()=>L(i),(e,t)=>{t(e,{get data(){return r()}})}),B(e,t)};return U(c,e=>{L(i)&&L(a)&&e(l)}),B(e,s),O(o)}q(cA,{componentName:{},data:{}},[],[],{mode:`open`});var lA=R(`<div aria-hidden="true"><!></div>`);function uA(e,t){D(t,!0);let n=K(t,`class`,7),r=K(t,`isLarge`,7),i=K(t,`hide`,7,!1);var a={get class(){return n()},set class(e){n(e),k()},get isLarge(){return r()},set isLarge(e){r(e),k()},get hide(){return i()},set hide(e=!1){i(e),k()}},o=lA();let s;var c=N(o),l=e=>{var t=z();ra(P(t),()=>Z.theme.svgs.avatarLarge||Z.theme.svgs.avatar),B(e,t)},u=e=>{var t=z();ra(P(t),()=>Z.theme.svgs.avatar),B(e,t)};return U(c,e=>{r()?e(l):e(u,-1)}),E(o),va(o,(e,t)=>Iy?.(e,t),()=>r()?`avatarLarge`:`avatar`),I(()=>s=Oa(o,1,`svg svg--avatar ${n()??``}`,null,s,{"svg--avatar--hide":i()})),B(e,o),O(a)}q(uA,{class:{},isLarge:{},hide:{}},[],[],{mode:`open`});var dA=`data-references-toggle-button`,fA=R(` <!>`,1),pA=R(`<span class="btn__label"> </span>`),mA=R(`<div class="message__bot-references"><button><!> <!></button></div>`),hA=R(`<!> <div class="message__bot-actions"><!> <!> <!> <!></div>`,1),gA=R(`<div class="message__bot-layout"><!> <div class="message__bot-body"><div class="text-container"><!> <!></div> <!></div></div>`),_A=R(`<div class="message__bot-layout"><!> <div class="message__bot-body"><!></div></div>`),vA=R(`<section><div class="message__content"><!></div></section>`);function yA(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`message`,7),i=K(t,`index`,7),a=K(t,`onmessageupdate`,7),o=K(t,`onbotmessageinit`,7),s=K(t,`onaskQuestion`,7),c=K(t,`isLast`,7,!1),l={duration:Number(Z.theme.components.message.custom?.transitionDuration)||300,delay:Number(Z.theme.components.message.custom?.transitionDelay)||0,y:Number(Z.theme.components.message.custom?.transitionY)||30,ease:xk};Zr(()=>r().type===`bot`||r().type===`component`)&&(l.delay+=Number(Z.theme.components.message.custom?.transitionBotLoadingDelay)||300);let u={duration:Number(Z.theme.components.messageOptions.custom?.transitionDuration)||300,delay:Number(Z.theme.components.messageOptions.custom?.transitionDelay)||0,y:Number(Z.theme.components.messageOptions.custom?.transitionY)||30,ease:xk};er(()=>{r()?.type===`bot`&&r().state!==`done`&&a()()}),Zr(()=>{r()?.type===`bot`&&o()()});let d=A(()=>Z.data.history.slice(0,i()+1).filter(e=>e.type===`bot`||e.type===`component`).length),f=A(()=>r().type===`bot`||r().type===`component`?L(n).ariaAnswerFromBot.replace(`{n}`,String(L(d))):`${L(n).ariaQuestionFromYou} ${(r().message?.length??0)>20?r().message.slice(0,20)+`...`:r().message}`),p=A(()=>Z.data.currentReferencesAsideId===r().id?L(n).referencesHide:L(n).referencesDisplay);var m={get message(){return r()},set message(e){r(e),k()},get index(){return i()},set index(e){i(e),k()},get onmessageupdate(){return a()},set onmessageupdate(e){a(e),k()},get onbotmessageinit(){return o()},set onbotmessageinit(e){o(e),k()},get onaskQuestion(){return s()},set onaskQuestion(e){s(e),k()},get isLast(){return c()},set isLast(e=!1){c(e),k()}},h=vA();let g;var _=N(h),v=N(_),y=e=>{var t=gA(),i=N(t);uA(i,{class:`message__bot-avatar`});var a=F(i,2),o=N(a),l=N(o);ra(l,()=>r().message.html);var d=F(l,2),f=e=>{var t=fA(),r=P(t);Vy(F(r),{name:`messageLoading`,class:`message__bot-loading`}),I(()=>V(r,`${L(n).messageBotLoading??``} `)),B(e,t)};U(d,e=>{r().state===`loading`&&e(f)}),E(o);var m=F(o,2),h=e=>{var t=z();ha(P(t),()=>c()?`nav`:`div`,!1,(e,t)=>{qa(e,()=>({"aria-label":c()?Z.t.ariaLastAnswerNavigation:void 0,class:`message__bot-options`})),pa(3,e,()=>Dk,()=>u);var i=hA(),a=P(i),o=e=>{var t=mA(),n=N(t),i=()=>Fy.toggleReferencesAside(r().id);qa(n,()=>({class:`btn btn--tertiary btn--square`,onclick:i,"aria-expanded":Z.data.currentReferencesAsideId===r().id,"aria-controls":CA,[dA]:!0}));var a=N(n);Vy(a,{name:`listUnordered`});var o=F(a,2),s=e=>{var t=pA(),n=N(t,!0);E(t),I(()=>V(n,L(p))),B(e,t)};U(o,e=>{L(p)&&e(s)}),E(n),E(t),B(e,t)};U(a,e=>{r().references&&r().references.used.length&&e(o)});var l=F(a,2),d=N(l),f=e=>{Gy(e,{icon:`retry`,get label(){return L(n).ariaAskQuestionAgain},get tooltip(){return L(n).askQuestionAgain},get onclick(){return s()},class:`message__bot-action btn btn--tertiary btn--square`})};U(d,e=>{Z.data.chatConfig.askQuestionAgain&&e(f)});var m=F(d,2);Gy(m,{icon:`voteUp`,get label(){return L(n).ariaAnswerGood},get tooltip(){return L(n).answerGood},onclick:()=>Fy.thumbs(r().id,`up`),class:`message__bot-action btn btn--tertiary btn--square`});var h=F(m,2);Gy(h,{icon:`voteDown`,get label(){return L(n).ariaAnswerBad},get tooltip(){return L(n).answerBad},onclick:()=>Fy.thumbs(r().id,`down`),class:`message__bot-action btn btn--tertiary btn--square`});var g=F(h,2),_=e=>{Gy(e,{icon:`message`,get label(){return L(n).ariaGiveFeedback},"aria-haspopup":`dialog`,get"aria-expanded"(){return Z.data.conversationFeedbackIsOpen},get tooltip(){return L(n).giveFeedback},onclick:()=>Fy.openMessageFeedback(r().id),class:`message__bot-action btn btn--tertiary btn--square`})};U(g,e=>{(Z.data.chatConfig.showTextFeedback||Z.data.chatConfig.classification)&&e(_)}),E(l),B(t,i)}),B(e,t)};U(m,e=>{r().state===`done`&&e(h)}),E(a),E(t),B(e,t)},b=e=>{var t=_A(),n=N(t);uA(n,{class:`message__bot-avatar`,get hide(){return r().hideAvatar}});var i=F(n,2);cA(N(i),{get componentName(){return r().componentName},get data(){return r().data}}),E(i),E(t),B(e,t)},x=e=>{var t=gi();I(()=>V(t,r().message)),B(e,t)};return U(v,e=>{r().type===`bot`?e(y):r().type===`component`?e(b,1):r().type===`user`&&e(x,2)}),E(_),E(h),va(h,(e,t)=>Ly?.(e,t),()=>r().type===`user`?`chatPageLastUserMessage`:void 0),I(()=>{g=Oa(h,1,`message container`,null,g,{"message--bot":r().type===`bot`||r().type===`component`,"message--user":r().type===`user`,"message--no-padding":r().type===`component`&&r().noSectionPadding}),G(h,`aria-label`,L(f))}),pa(3,h,()=>Dk,()=>l),B(e,h),O(m)}q(yA,{message:{},index:{},onmessageupdate:{},onbotmessageinit:{},onaskQuestion:{},isLast:{}},[],[],{mode:`open`});var bA=e=>Array.from(e.querySelectorAll(`a[href], button, input:not([type="hidden"]), textarea, select, details,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`)&&!e.getAttribute(`aria-hidden`)),xA=e=>{let t=e.getRootNode();return`activeElement`in t?t.activeElement:document.activeElement};function SA(e,t){let{firstFocusableOnMount:n=!0,resetFocusOnDestroy:r=!0,avoidFocusLoop:i=!1}=t||{},a=xA(e),o=bA(e),s,c=new MutationObserver(()=>{o=bA(e)}),l=t=>{o&&e.dataset.disabled!==`true`&&t.key===`Tab`&&(t.shiftKey?xA(e)===o[0]&&(t.preventDefault(),o[o.length-1].focus()):xA(e)===o[o.length-1]&&(t.preventDefault(),o[0].focus()))};return o&&o.length>0&&!i&&(n&&(s=o[0],requestAnimationFrame(()=>{s?.focus({preventScroll:!0})})),e.addEventListener(`keydown`,l),c.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`disabled`,`aria-hidden`,`tabindex`]})),{destroy(){o&&o.length>0&&!i&&(o=null,s=null,e.removeEventListener(`keydown`,l),c.disconnect(),r&&a&&requestAnimationFrame(()=>{a.focus({preventScroll:!0})}))}}}var CA=`aside`,wA=R(`<div></div>`),TA=R(`<h2 class="chat-app__sheet-title"> </h2>`),EA=R(`<span class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></span>`),DA=R(`<div><div class="chat-app__sheet-header"><!> <!></div> <!></div>`),OA=R(`<!> <!>`,1),kA=R(`<h2 class="chat-app__aside-title"> </h2>`),AA=R(`<div><div class="chat-app__aside-container"><div class="chat-app__aside-header"><!> <div class="chat-app__aside-close"><button class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></button></div></div> <!></div></div>`);function jA(e,t){D(t,!0);let n=K(t,`title`,7),r=K(t,`isOpen`,7),i=K(t,`isMobile`,7),a=K(t,`showReferencesByDefault`,7),o=K(t,`onClose`,7),s=K(t,`children`,7),c=j(void 0),l=null,u=e=>{e.key===`Escape`&&o()()};er(()=>{if(!i())if(r()){if(a()||document.addEventListener(`keydown`,u),L(c)&&(l=xA(L(c)),!a()||l?.hasAttribute(`data-references-toggle-button`))){let e=bA(L(c));e[0].setAttribute(Hy,`true`),e[0].focus({preventScroll:!0})}}else document.removeEventListener(`keydown`,u),l?.hasAttribute(`data-references-toggle-button`)?l.focus({preventScroll:!0}):Z.targets.chatInput?.focus({preventScroll:!0})});var d={get title(){return n()},set title(e){n(e),k()},get isOpen(){return r()},set isOpen(e){r(e),k()},get isMobile(){return i()},set isMobile(e){i(e),k()},get showReferencesByDefault(){return a()},set showReferencesByDefault(e){a(e),k()},get onClose(){return o()},set onClose(e){o(e),k()},get children(){return s()},set children(e){s(e),k()}},f=z(),p=P(f),m=e=>{var t=z(),i=P(t),a=e=>{var t=z();W(P(t),()=>nk,(e,t)=>{t(e,{onOpenChange:e=>{e||o()()},get open(){return r()},set open(e){r(e)},children:(e,t)=>{var r=z();W(P(r),()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var r=OA(),i=P(r);{let e=(e,t)=>{let n=()=>t?.().props,r=()=>t?.().open;var i=z(),a=P(i),o=e=>{var t=wA();qa(t,()=>({class:`chat-app__sheet-overlay`,...n()})),pa(1,t,()=>Ek,()=>({duration:200})),pa(2,t,()=>Ek,()=>({duration:200,delay:150})),B(e,t)};U(a,e=>{r()&&e(o)}),B(e,i)};W(i,()=>Yw,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}var a=F(i,2);{let e=(e,t)=>{let r=()=>t?.().props,i=()=>t?.().open;var a=z(),o=P(a),c=e=>{var t=DA();qa(t,()=>({...r()}));var i=N(t),a=N(i),o=e=>{var t=z();W(P(t),()=>xS,(e,t)=>{t(e,{children:(e,t)=>{var r=TA(),i=N(r,!0);E(r),I(()=>V(i,n())),B(e,r)},$$slots:{default:!0}})}),B(e,t)};U(a,e=>{n()&&e(o)}),W(F(a,2),()=>ik,(e,t)=>{t(e,{class:`chat-app__sheet-close`,children:(e,t)=>{var n=EA(),r=N(n),i=N(r,!0);E(r),Vy(F(r,2),{name:`dismiss`}),E(n),I(()=>V(i,Z.t.close)),B(e,n)},$$slots:{default:!0}})}),E(i),H(F(i,2),()=>s()??w),E(t),va(t,e=>SA?.(e)),pa(1,t,()=>Dk,()=>({x:`100%`,opacity:1,duration:650,easing:xk})),pa(2,t,()=>Dk,()=>({x:`100%`,opacity:1,duration:500,easing:yk})),B(e,t)};U(o,e=>{i()&&e(c)}),B(e,a)},t=A(()=>!Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout);W(a,()=>sk,(n,r)=>{r(n,{class:`chat-app__sheet-content`,trapFocus:!1,forceMount:!0,get preventScroll(){return L(t)},child:e,$$slots:{child:!0}})})}B(e,r)},$$slots:{default:!0}})}),B(e,r)},$$slots:{default:!0}})}),B(e,t)};U(i,e=>{Z.targets.portals&&e(a)}),B(e,t)},h=e=>{var t=AA();let i;G(t,`id`,CA);var l=N(t),u=N(l),d=N(u),f=e=>{var t=kA(),r=N(t,!0);E(t),I(()=>V(r,n())),B(e,t)};U(d,e=>{n()&&e(f)});var p=F(d,2),m=N(p),h=N(m),g=N(h,!0);E(h),Vy(F(h,2),{name:`dismiss`}),E(m),va(m,(e,t)=>Uy?.(e,t),()=>({text:Z.t.close,position:`bottom-right`,delay:0})),E(p),E(u),H(F(u,2),()=>s()??w),E(l),E(t),va(t,(e,t)=>SA?.(e,t),()=>({firstFocusableOnMount:!1,resetFocusOnDestroy:!1,avoidFocusLoop:a()})),oo(t,e=>M(c,e),()=>L(c)),I(()=>{i=Oa(t,1,`chat-app__aside`,null,i,{open:r()}),G(t,`role`,a()?`complementary`:`dialog`),G(t,`aria-modal`,a()?`false`:`true`),G(t,`aria-label`,Z.t.ariaReferencesRegion),G(t,`aria-hidden`,!r()),V(g,Z.t.close)}),oi(`click`,m,function(...e){o()?.apply(this,e)}),B(e,t)};return U(p,e=>{i()?e(m):e(h,-1)}),B(e,f),O(d)}si([`click`]),q(jA,{title:{},isOpen:{},isMobile:{},showReferencesByDefault:{},onClose:{},children:{}},[],[],{mode:`open`});var MA=R(`<div class="chat-app__close-button"><button class="btn btn--tertiary btn--square"><span class="sr-only"> </span> <!></button></div>`);function NA(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`onclick`,7);var i={get onclick(){return r()},set onclick(e){r(e),k()}},a=MA(),o=N(a),s=N(o),c=N(s,!0);return E(s),Vy(F(s,2),{name:`dismiss`}),E(o),va(o,(e,t)=>Uy?.(e,t),()=>({text:L(n).closeChat,position:`bottom-right`,delay:600})),E(a),I(()=>{G(o,`aria-label`,L(n).closeChat),V(c,L(n).closeChat)}),oi(`click`,o,function(...e){r()?.apply(this,e)}),B(e,a),O(i)}si([`click`]),q(NA,{onclick:{}},[],[],{mode:`open`});var PA=R(`<div><!></div>`);function FA(e,t){D(t,!0);let n=K(t,`checked`,7,!1),r=K(t,`class`,7,``);var i={get checked(){return n()},set checked(e=!1){n(e),k()},get class(){return r()},set class(e=``){r(e),k()}},a=PA();return Vy(N(a),{name:`checkbox`,class:`checkbox__icon`}),E(a),I(()=>{Oa(a,1,`checkbox ${r()??``}`),G(a,`data-checked`,n())}),B(e,a),O(i)}q(FA,{checked:{},class:{}},[],[],{mode:`open`});var IA=R(`<button><!> <div class="chat-input__settings-button-label"> </div> <!></button>`),LA=R(`<span class="context-box__notification" data-type="error"> </span>`),RA=R(`<!> <!>`,1),zA=R(`<!> <!>`,1),BA=R(`<!> <!>`,1),VA=R(`<div><div><div class="context-box__content"><div class="context-box__header"><span class="sr-only"> </span> <span> <!></span> <button type="button" class="context-box__close-button btn btn--tertiary btn--square"><!></button></div> <div><!></div> <!></div></div></div>`),HA=R(`<!> <!>`,1),UA=R(`<div><div></div> <!></div>`);function WA(e,t){D(t,!0);let n=K(t,`settingName`,7),r=K(t,`iconName`,7),i=K(t,`currentValues`,7),a=K(t,`possibleValues`,7),o=K(t,`disabled`,7),s=A(()=>Z.t.selectors?.[n()]||(console.error(`Missing translation for setting ${n()}`),{values:{},name:n(),intro:n(),namePlural:n(),placeholder:n(),selectAll:Z.t.selectAll,selectNone:Z.t.selectNone})),c=A(()=>()=>i().length===0?`${L(s).placeholder}`:i().length===1?`1 ${L(s).name}`:`${i().length} ${L(s).namePlural||L(s).name}`),l=A(()=>Z.selectorsWithErrors.includes(n())),u={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},d=j(!1);er(()=>{L(d)&&setTimeout(()=>{M(d,!1)},200)});let f=()=>{M(d,!0),Fy.setSelectorValue(n(),a()),Fy.setAriaLiveStatusMessage(Z.t.ariaAllSelected)},p=async()=>{M(d,!0),Fy.setSelectorValue(n(),[]),await Jr().then(()=>{let e=Z.t.ariaAllUnselected;L(l)&&(e+=`. ${Z.t.chooseAtLeastOneOption}`),Fy.setAriaLiveStatusMessage(e)})},m=()=>{M(d,!0);let e=Fy.resetSelectorToDefaults(n());Fy.setAriaLiveStatusMessage(`${Z.t.ariaAllReseted}: ${e.join(`, `)}`)},h=j(void 0),g=j(!1);var _={get settingName(){return n()},set settingName(e){n(e),k()},get iconName(){return r()},set iconName(e){r(e),k()},get currentValues(){return i()},set currentValues(e){i(e),k()},get possibleValues(){return a()},set possibleValues(e){a(e),k()},get disabled(){return o()},set disabled(e){o(e),k()}},v=UA(),y=N(v);return oo(y,e=>M(h,e),()=>L(h)),W(F(y,2),()=>ck,(e,t)=>{t(e,{get open(){return L(g)},set open(e){M(g,e,!0)},children:(e,t)=>{var _=HA(),v=P(_);{let e=(e,t)=>{let n=()=>t?.().props;var i=IA();qa(i,()=>({type:`button`,class:`chat-input__settings-button btn btn--tertiary`,"data-has-error":L(l),...n(),disabled:o(),"aria-hidden":o(),tabindex:o()?-1:void 0}));var a=N(i);Vy(a,{get name(){return r()},class:`chat-input__settings-button-icon`});var s=F(a,2),u=N(s,!0);E(s),Vy(F(s,2),{name:`chevronDownSmall`,class:`chat-input__settings-button-chevron`}),E(i),I(e=>V(u,e),[()=>L(c)()]),B(e,i)};W(v,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}W(F(v,2),()=>AS,(e,t)=>{t(e,{get to(){return L(h)},children:(e,t)=>{var r=z(),o=P(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,o=()=>t?.().props,c=()=>t?.().open;var h=z(),_=P(h),v=e=>{var t=VA();qa(t,()=>({...r()}));var c=N(t);qa(c,()=>({...o()}));var h=N(c),_=N(h),v=N(_),y=N(v,!0);E(v);var b=F(v,2),x=N(b),S=F(x),C=e=>{var t=LA(),n=N(t,!0);E(t),I(()=>V(n,Z.t.chooseAtLeastOneOption)),B(e,t)};U(S,e=>{L(l)&&e(C)}),E(b);var ee=F(b,2);Vy(N(ee),{name:`menuClose`}),E(ee),E(_);var te=F(_,2);let ne;W(N(te),()=>VO,(e,t)=>{t(e,{get value(){return i()},onValueChange:e=>{Fy.setSelectorValue(n(),e)},class:`display-contents`,children:(e,t)=>{var n=z();Zi(P(n),17,a,qi,(e,t)=>{let n=A(Fw),r=A(()=>L(s).values?.[L(t)]||L(t));var i=z(),a=P(i);{let e=(e,t)=>{let i=()=>t?.().checked;var a=RA(),o=P(a);FA(o,{get checked(){return i()}}),W(F(o,2),()=>_k,(e,t)=>{t(e,{get for(){return L(n)},children:(e,t)=>{Qe();var n=gi();I(()=>V(n,L(r))),B(e,n)},$$slots:{default:!0}})}),B(e,a)};W(a,()=>zO,(i,a)=>{a(i,{get value(){return L(t)},class:`context-box__menu-item context-box__menu-item--option`,get id(){return L(n)},closeOnSelect:!1,onCheckedChange:async e=>{L(d)||await Jr().then(()=>{let t=e?Z.t.ariaSelected:Z.t.ariaUnselected,n=`${L(r)}, ${t}`;L(l)&&(n+=`. ${Z.t.chooseAtLeastOneOption}`),Fy.setAriaLiveStatusMessage(n)})},children:e,$$slots:{default:!0}})})}B(e,i)}),B(e,n)},$$slots:{default:!0}})}),E(te),W(F(te,2),()=>kO,(e,t)=>{t(e,{class:`context-box__footer`,children:(e,t)=>{var n=BA(),r=P(n),i=e=>{var t=zA(),n=P(t);W(n,()=>DO,(e,t)=>{t(e,{onclick:f,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{Qe();var n=gi();I(()=>V(n,Z.t.selectAll)),B(e,n)},$$slots:{default:!0}})}),W(F(n,2),()=>DO,(e,t)=>{t(e,{onclick:p,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{Qe();var n=gi();I(()=>V(n,Z.t.selectNone)),B(e,n)},$$slots:{default:!0}})}),B(e,t)};U(r,e=>{a().length>5&&e(i)}),W(F(r,2),()=>DO,(e,t)=>{t(e,{onclick:m,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{Qe();var n=gi();I(()=>V(n,Z.t.resetToDefaults)),B(e,n)},$$slots:{default:!0}})}),B(e,n)},$$slots:{default:!0}})}),E(h),E(c),E(t),I(()=>{V(y,Z.t.ariaCloseWithEsc),V(x,`${(L(s).intro||L(s).name)??``} `),G(ee,`aria-label`,Z.t.close),ne=Oa(te,1,`context-box__menu context-box__menu--scrollable`,null,ne,{"context-box__menu--two-cols":a().length>8,"context-box__menu--three-cols":a().length>16})}),oi(`click`,ee,()=>M(g,!1)),pa(3,c,()=>Dk,()=>u),B(e,t)};U(_,e=>{c()&&e(v)}),B(e,h)};W(o,()=>dk,(t,n)=>{n(t,{class:`context-box context-box--dropdown`,align:`start`,sideOffset:8,forceMount:!0,strategy:`absolute`,preventScroll:!1,child:e,$$slots:{child:!0}})})}B(e,r)},$$slots:{default:!0}})}),B(e,_)},$$slots:{default:!0}})}),E(v),B(e,v),O(_)}si([`click`]),q(WA,{settingName:{},iconName:{},currentValues:{},possibleValues:{},disabled:{}},[],[],{mode:`open`});var GA=R(`<div><div class="radio__indicator"></div></div>`);function KA(e,t){D(t,!0);let n=K(t,`checked`,7,!1),r=K(t,`class`,7,``);var i={get checked(){return n()},set checked(e=!1){n(e),k()},get class(){return r()},set class(e=``){r(e),k()}},a=GA();return I(()=>{Oa(a,1,`radio ${r()??``}`),G(a,`data-checked`,n())}),B(e,a),O(i)}q(KA,{checked:{},class:{}},[],[],{mode:`open`});var qA=R(`<button><!> <div class="chat-input__settings-button-label"><span class="chat-input__settings-button-label-name"> </span> </div> <!></button>`),JA=R(`<!> <!>`,1),YA=R(`<!> <!>`,1),XA=R(`<!> <!>`,1),ZA=R(`<div><div><div class="context-box__content"><div class="context-box__header"><span class="sr-only"> </span> <span> </span> <button type="button" class="context-box__close-button btn btn--tertiary btn--square"><!></button></div> <div><!></div> <!></div></div></div>`),QA=R(`<!> <!>`,1),$A=R(`<div><div></div> <!></div>`);function ej(e,t){D(t,!0);let n=K(t,`settingName`,7),r=K(t,`iconName`,7),i=K(t,`currentValue`,7),a=K(t,`possibleValues`,7),o=K(t,`allowEmpty`,7),s=K(t,`disabled`,7),c=A(()=>Z.t.selectors?.[n()]||(console.error(`Missing translation for setting ${n()}`),{values:{},name:n(),intro:n(),namePlural:n(),placeholder:n()})),l=A(()=>i()?L(c).values?.[i()]||i():L(c).placeholder),u=A(()=>Z.selectorsWithErrors.includes(n())),d={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},f=()=>{Fy.resetSelectorToDefaults(n())},p=j(void 0),m=j(!1);var h={get settingName(){return n()},set settingName(e){n(e),k()},get iconName(){return r()},set iconName(e){r(e),k()},get currentValue(){return i()},set currentValue(e){i(e),k()},get possibleValues(){return a()},set possibleValues(e){a(e),k()},get allowEmpty(){return o()},set allowEmpty(e){o(e),k()},get disabled(){return s()},set disabled(e){s(e),k()}},g=$A(),_=N(g);return oo(_,e=>M(p,e),()=>L(p)),W(F(_,2),()=>ck,(e,t)=>{t(e,{get open(){return L(m)},set open(e){M(m,e,!0)},children:(e,t)=>{var h=QA(),g=P(h);{let e=(e,t)=>{let n=()=>t?.().props;var i=qA();qa(i,()=>({type:`button`,class:`chat-input__settings-button btn btn--tertiary`,"data-has-error":L(u),...n(),disabled:s(),"aria-hidden":s(),tabindex:s()?-1:void 0}));var a=N(i);Vy(a,{get name(){return r()},class:`chat-input__settings-button-icon`});var o=F(a,2),d=N(o),f=N(d);E(d);var p=F(d);E(o),Vy(F(o,2),{name:`chevronDownSmall`,class:`chat-input__settings-button-chevron`}),E(i),I(()=>{V(f,`${L(c).name??``}:`),V(p,` ${L(l)??``}`)}),B(e,i)};W(g,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}W(F(g,2),()=>AS,(e,t)=>{t(e,{get to(){return L(p)},children:(e,t)=>{var r=z(),s=P(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,s=()=>t?.().props,l=()=>t?.().open;var u=z(),p=P(u),h=e=>{var t=ZA();qa(t,()=>({...r()}));var l=N(t);qa(l,()=>({...s()}));var u=N(l),p=N(u),h=N(p),g=N(h,!0);E(h);var _=F(h,2),v=N(_,!0);E(_);var y=F(_,2);Vy(N(y),{name:`menuClose`}),E(y),E(p);var b=F(p,2);let x;var S=N(b);{let e=A(()=>i()||``);W(S,()=>LO,(t,r)=>{r(t,{get value(){return L(e)},onValueChange:e=>{e?Fy.setSelectorValue(n(),[e]):Fy.setSelectorValue(n(),[])},children:(e,t)=>{var n=XA(),r=P(n),i=e=>{let t=A(Fw);var n=z(),r=P(n);{let e=(e,n)=>{let r=()=>n?.().checked;var i=JA(),a=P(i);KA(a,{get checked(){return r()}}),W(F(a,2),()=>_k,(e,n)=>{n(e,{get for(){return L(t)},children:(e,t)=>{Qe();var n=gi();I(()=>V(n,L(c).placeholder)),B(e,n)},$$slots:{default:!0}})}),B(e,i)};W(r,()=>NO,(n,r)=>{r(n,{value:``,class:`context-box__menu-item context-box__menu-item--option`,get id(){return L(t)},children:e,$$slots:{default:!0}})})}B(e,n)};U(r,e=>{o()&&e(i)}),Zi(F(r,2),17,a,qi,(e,t)=>{let n=A(Fw);var r=z(),i=P(r);{let e=(e,r)=>{let i=()=>r?.().checked;var a=YA(),o=P(a);KA(o,{get checked(){return i()}}),W(F(o,2),()=>_k,(e,r)=>{r(e,{get for(){return L(n)},children:(e,n)=>{Qe();var r=gi();I(()=>V(r,L(c).values?.[L(t)]||L(t))),B(e,r)},$$slots:{default:!0}})}),B(e,a)};W(i,()=>NO,(r,i)=>{i(r,{get value(){return L(t)},class:`context-box__menu-item context-box__menu-item--option`,get id(){return L(n)},children:e,$$slots:{default:!0}})})}B(e,r)}),B(e,n)},$$slots:{default:!0}})})}E(b),W(F(b,2),()=>kO,(e,t)=>{t(e,{class:`context-box__footer`,children:(e,t)=>{var n=z();W(P(n),()=>DO,(e,t)=>{t(e,{onclick:f,closeOnSelect:!1,class:`context-box__footer-item btn btn--tertiary`,children:(e,t)=>{Qe();var n=gi();I(()=>V(n,Z.t.resetToDefaults)),B(e,n)},$$slots:{default:!0}})}),B(e,n)},$$slots:{default:!0}})}),E(u),E(l),E(t),I(()=>{V(g,Z.t.ariaCloseWithEsc),V(v,L(c).intro||L(c).name),G(y,`aria-label`,Z.t.close),x=Oa(b,1,`context-box__menu context-box__menu--scrollable`,null,x,{"context-box__menu--two-cols":a().length>8,"context-box__menu--three-cols":a().length>16})}),oi(`click`,y,()=>M(m,!1)),pa(3,l,()=>Dk,()=>d),B(e,t)};U(p,e=>{l()&&e(h)}),B(e,u)};W(s,()=>dk,(t,n)=>{n(t,{class:`context-box context-box--dropdown`,align:`start`,sideOffset:8,forceMount:!0,strategy:`absolute`,preventScroll:!1,child:e,$$slots:{child:!0}})})}B(e,r)},$$slots:{default:!0}})}),B(e,h)},$$slots:{default:!0}})}),E(g),B(e,g),O(h)}si([`click`]),q(ej,{settingName:{},iconName:{},currentValue:{},possibleValues:{},allowEmpty:{},disabled:{}},[],[],{mode:`open`});function tj(e,t){D(t,!0);let n=K(t,`chatSettingConfig`,7),r=K(t,`settingsIsOpen`,7);var i={get chatSettingConfig(){return n()},set chatSettingConfig(e){n(e),k()},get settingsIsOpen(){return r()},set settingsIsOpen(e){r(e),k()}},a=z(),o=P(a),s=e=>{{let t=A(()=>n().iconName||n().settingName),i=A(()=>!r());ej(e,{get settingName(){return n().settingName},get iconName(){return L(t)},get currentValue(){return Z.data.selectorValues[n().settingName][0]},get possibleValues(){return n().values},get allowEmpty(){return n().allowEmpty},get disabled(){return L(i)}})}},c=e=>{{let t=A(()=>n().iconName||n().settingName),i=A(()=>!r());WA(e,{get settingName(){return n().settingName},get iconName(){return L(t)},get currentValues(){return Z.data.selectorValues[n().settingName]},get possibleValues(){return n().values},get disabled(){return L(i)}})}};return U(o,e=>{n().type===`single-select`?e(s):n().type===`multi-select`&&e(c,1)}),B(e,a),O(i)}q(tj,{chatSettingConfig:{},settingsIsOpen:{}},[],[],{mode:`open`});function nj(e,t){D(t,!0);let n=K(t,`settingsIsOpen`,7);var r={get settingsIsOpen(){return n()},set settingsIsOpen(e){n(e),k()}},i=z();return Zi(P(i),17,()=>Z.data.chatConfig.selectorsConfig,qi,(e,t)=>{tj(e,{get settingsIsOpen(){return n()},get chatSettingConfig(){return L(t)}})}),B(e,i),O(r)}q(nj,{settingsIsOpen:{}},[],[],{mode:`open`});var rj=hi(`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><defs><linearGradient x1="0" y1="1" x2="0" y2="0"><stop></stop><stop></stop></linearGradient><mask maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24"><g stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><path d="M12 19v4"></path><path d="M8 23h8"></path></g></mask></defs><rect width="24" height="24"></rect></svg>`);function ij(e,t){D(t,!0);let n=K(t,`level`,7),r=K(t,`class`,7,``),i=K(t,`baseColor`,7,`var(--mic-base-color)`),a=K(t,`accentColor`,7,`var(--mic-accent-color)`),o=Math.random().toString(36).substring(2),s=`audio-level-gradient-${o}`,c=`audio-level-mask-${o}`;var l={get level(){return n()},set level(e){n(e),k()},get class(){return r()},set class(e=``){r(e),k()},get baseColor(){return i()},set baseColor(e=`var(--mic-base-color)`){i(e),k()},get accentColor(){return a()},set accentColor(e=`var(--mic-accent-color)`){a(e),k()}},u=rj(),d=N(u),f=N(d),p=N(f),m=F(p);E(f);var h=F(f);E(d);var g=F(d);return E(u),I(()=>{Oa(u,0,`audio-level-mic-svg ${r()??``}`),G(f,`id`,s),G(p,`offset`,n()/100),G(p,`stop-color`,a()),G(m,`offset`,n()/100),G(m,`stop-color`,i()),G(h,`id`,c),G(g,`fill`,`url(#${s})`),G(g,`mask`,`url(#${c})`)}),B(e,u),O(l)}q(ij,{level:{},class:{},baseColor:{},accentColor:{}},[],[],{mode:`open`});var aj=R(`<button type="button"><div class="mic-icon" aria-hidden="true"><!></div></button>`);function oj(e,t){D(t,!0);let n=typeof window<`u`,r=A(()=>Z.t),i=K(t,`class`,7),a=A(()=>!!Z.currentAudioRecorder),o=A(()=>n&&py.isSupported()),s=A(()=>Z.currentAudioVolume||0),c=j(!1),l=async()=>{try{L(a)?Fy.onStopSpeechRecognition():await Fy.onStartSpeechRecognition(),M(c,!1)}catch(e){console.error(`Speech recognition error:`,e),M(c,!0)}};er(()=>()=>{L(a)&&Fy.onStopSpeechRecognition()});var u={get class(){return i()},set class(e){i(e),k()}},d=z(),f=P(d),p=e=>{var t=aj();let n;var o=N(t);ij(N(o),{get level(){return L(s)}}),E(o),E(t),I(()=>{G(t,`aria-label`,L(a)?L(r).chatInputStopListening:L(r).chatInputStartListening),n=Oa(t,1,`chat-input__mic-button transition-colors ${i()??``}`,null,n,{"chat-input__mic-button--listening":L(a),"chat-input__mic-button--error":L(c)})}),oi(`click`,t,l),B(e,t)};return U(f,e=>{L(o)&&e(p)}),B(e,d),O(u)}si([`click`]),q(oj,{class:{}},[],[],{mode:`open`});var sj=R(`<div class="chat-input__notification" data-type="error" aria-live="assertive"><!> <span class="chat-input__notification-label"> </span></div>`),cj=R(`<button><!></button>`),lj=R(`<button type="button" class="chat-input__settings-button btn btn--tertiary"><!> <div class="chat-input__settings-button-label"> </div></button>`),uj=R(`<!> <!>`,1),dj=R(`<nav><h2 class="sr-only"> </h2> <div class="chat-input__toggle-area"><!></div> <div class="chat-input__settings"><!></div></nav>`),fj=R(`<form><div class="animated-height chat-input__notification-wrapper"><div><!></div></div> <div role="region"><h2 class="sr-only"> </h2> <textarea name="chat-input-value" class="chat-input__textarea"></textarea> <!> <div class="chat-input__buttons"><!> <button type="submit"><span class="sr-only"> </span> <!></button></div></div></form>`);function pj(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`class`,7),i=K(t,`ariaLabel`,7),a=K(t,`onSubmit`,7),o=K(t,`avoidFocusOnMount`,7),s=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`,`ariaLabel`,`onSubmit`,`avoidFocusOnMount`]),c=A(()=>Z.data.chatInputValue),l=A(()=>L(c).trim().length>(Z.data.chatConfig.questionLengthLimit||600)),u=A(()=>L(c).trim()&&!L(l)&&!Z.data.questionHasPii),d=A(()=>Z.data.currentConversationState===`answering`||Z.data.currentConversationState===`searching`),f=A(()=>!L(u)&&!L(d)),p=j(void 0),m,h=A(()=>Z.data?.chatConfig?.allowAudioInput??!0),g=A(()=>!!Z.currentAudioRecorder),_=A(()=>Z.isTranscribing),v=j(0),y=j(void 0),b=j(void 0),x=j(On(Z.data.selectorsIsOpen)),S=j(On(Z.data.selectorsIsOpen)),C=A(()=>Z.data.chatConfig.selectorsConfig.length>0),ee=A(()=>Z.data.chatConfig.showExpandedSelectors),te=j(void 0),ne,re=A(()=>{let e=``;return Z.data.questionHasPii?e=Z.piiTranslations[Z.data.questionHasPii]:L(l)&&(e=L(n).messageTooLong?.replace(`{questionLengthLimit}`,(Z.data.chatConfig.questionLengthLimit||600).toString())?.replace(`{questionLength}`,L(c).trim().length.toString())),e}),ie=A(()=>()=>L(_)?L(n).messageBotLoading:L(g)&&L(n).chatInputPlaceholderListening?L(n).chatInputPlaceholderListening:L(n).chatInputPlaceholder),w=()=>{L(d)?Fy.abort():L(u)&&(a()(L(c)),de(),fy()&&L(p)?.blur())},ae=e=>{e.preventDefault(),w()},oe=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),w())},se=e=>{e.composedPath()[0].matches(`button, a, textarea, input`)||setTimeout(()=>{L(p)?.blur()},100)},ce=()=>{fy()&&window.addEventListener(`pointerdown`,se)},le=()=>{fy()&&window.removeEventListener(`pointerdown`,se)},ue=e=>{if(!e.value){e.value=e.placeholder;let t=Math.ceil(e.scrollHeight);return e.value=``,t}return e.scrollHeight},de=()=>{Jr().then(()=>{if(L(p)){L(p).style.height=`auto`;let e=ue(L(p));L(p).style.height=`${e}px`}})};er(()=>{L(c)&&de()});let fe=e=>{de(),Fy.onInput(e.currentTarget.value),ne&&clearTimeout(ne),ne=setTimeout(()=>{L(re)&&Fy.setAriaLiveStatusMessage(L(re))},1e3)},pe=()=>{M(x,!1),Jr().then(()=>L(y)?.focus())};er(()=>{if(L(p))return m=new ResizeObserver(()=>{de()}),m.observe(L(p)),()=>{m.disconnect()}}),er(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`prefill`);t&&(M(c,t),e.delete(`prefill`),history.replaceState(null,``,`${location.pathname}?${e.toString()}`))}),Li(()=>{!fy()&&!o()&&setTimeout(()=>{L(p)?.focus()},100)}),er(()=>{let e=L(x)&&!L(S);M(S,L(x),!0),e&&(L(y)?.setAttribute(Hy,`true`),Z.data.chatConfig.showExpandedSelectors||Jr().then(()=>L(b)?.focus({preventScroll:!0})))});function me(){L(p)?.focus()}var he={focus:me,get class(){return r()},set class(e){r(e),k()},get ariaLabel(){return i()},set ariaLabel(e){i(e),k()},get onSubmit(){return a()},set onSubmit(e){a(e),k()},get avoidFocusOnMount(){return o()},set avoidFocusOnMount(e){o(e),k()}},ge=fj();ai(`resize`,jn,de),qa(ge,()=>({name:`chat-input`,onsubmit:ae,class:`chat-input ${r()??``}`,...s}));var _e=N(ge);let ve;var ye=N(_e),be=N(ye),xe=e=>{var t=sj(),n=N(t);Vy(n,{name:`warning`,class:`chat-input__notification-icon`});var r=F(n,2),i=N(r,!0);E(r),E(t),I(()=>V(i,L(re))),pa(2,t,()=>Ek,()=>({duration:100,delay:1e3})),B(e,t)};U(be,e=>{L(re)&&e(xe)}),E(ye),E(_e);var Se=F(_e,2);let Ce;var we=N(Se),Te=N(we,!0);E(we);var Ee=F(we,2);Wn(Ee),G(Ee,`rows`,1),oo(Ee,e=>M(p,e),()=>L(p)),va(Ee,(e,t)=>Iy?.(e,t),()=>`chatInput`),va(Ee,(e,t)=>Ly?.(e,t),()=>`chatInput`);var De=F(Ee,2),Oe=e=>{var t=z(),r=P(t);{let e=e=>{var t=dj(),r=N(t),i=N(r,!0);E(r);var a=F(r,2),o=N(a);{let e=(e,t)=>{let r=()=>t?.().props;var i=cj();qa(i,()=>({class:`chat-input__settings-toggle-button btn btn--tertiary btn--square`,...r(),disabled:L(x),"aria-hidden":L(x),"aria-label":L(n).showSettings,tabindex:L(x)?-1:void 0})),Vy(N(i),{name:`settings`}),E(i),va(i,(e,t)=>Uy?.(e,t),()=>({text:L(x)?``:L(n).showSettings,position:`top`,delay:0})),oo(i,e=>M(y,e),()=>L(y)),B(e,i)};W(o,()=>fT,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}E(a);var s=F(a,2);W(N(s),()=>uT,(e,t)=>{t(e,{class:`display-contents`,forceMount:!0,children:(e,t)=>{var r=uj(),i=P(r),a=e=>{var t=lj(),r=N(t);Vy(r,{name:`settingsClose`,class:`chat-input__settings-button-icon`});var i=F(r,2),a=N(i,!0);E(i),E(t),oo(t,e=>M(b,e),()=>L(b)),I(()=>{G(t,`aria-label`,L(n).hideSettings),G(t,`aria-hidden`,!L(x)),t.disabled=!L(x),G(t,`tabindex`,L(x)?void 0:-1),V(a,L(n).hideSettings)}),oi(`click`,t,pe),B(e,t)};U(i,e=>{L(ee)||e(a)}),nj(F(i,2),{get settingsIsOpen(){return L(x)}}),B(e,r)},$$slots:{default:!0}})}),E(s),E(t),I(()=>{G(t,`aria-label`,L(n).ariaSettingsRegion),V(i,L(n).ariaSettings)}),io(s,`clientHeight`,e=>M(v,e)),B(e,t)};W(r,()=>cT,(t,n)=>{n(t,{get open(){return L(x)},set open(e){M(x,e,!0)},child:e,$$slots:{child:!0}})})}B(e,t)};U(De,e=>{L(C)&&e(Oe)});var ke=F(De,2),Ae=N(ke),je=e=>{oj(e,{})};U(Ae,e=>{L(h)&&e(je)});var Me=F(Ae,2);let Ne;var Pe=N(Me),Fe=N(Pe,!0);E(Pe);var Ie=F(Pe,2),Le=e=>{Vy(e,{name:`abort`,class:`chat-input__submit-icon`})},Re=e=>{Vy(e,{name:`submit`,class:`chat-input__submit-icon`})};return U(Ie,e=>{L(d)?e(Le):e(Re,-1)}),E(Me),E(ke),E(Se),E(ge),I(e=>{ve=Aa(_e,``,ve,{height:L(re)?`${L(te)}px`:`0px`}),Ce=Oa(Se,1,`chat-input__grid`,null,Ce,{"chat-input__grid--has-settings":L(C),"chat-input__grid--settings-is-open":L(x)}),Aa(Se,`--chat-input-settings-height: ${L(x)?L(v):0}px`),G(Se,`aria-label`,L(n).ariaAskQuestionRegion),V(Te,L(n).ariaAskQuestion),Wa(Ee,L(c)),G(Ee,`aria-label`,i()),G(Ee,`placeholder`,e),Me.disabled=L(f),Ne=Oa(Me,1,`chat-input__submit-button transition-colors`,null,Ne,{"chat-input__submit-button--deactivated":L(f)}),V(Fe,L(d)?L(n).chatInputAbort:L(n).chatInputSubmit)},[()=>L(ie)()]),io(ye,`clientHeight`,e=>M(te,e)),oi(`input`,Ee,fe),oi(`focusin`,Ee,ce),oi(`focusout`,Ee,le),ai(`keypress`,Ee,oe),B(e,ge),O(he)}si([`input`,`focusin`,`focusout`,`click`]),q(pj,{class:{},ariaLabel:{},onSubmit:{},avoidFocusOnMount:{}},[],[`focus`],{mode:`open`});var mj=R(`<label class="classification-feedback__option btn btn--secondary"><input type="radio" name="quality"/> </label>`),hj=R(`<fieldset class="classification-feedback__item"><legend class="classification-feedback__label"> </legend> <!></fieldset>`),gj=R(`<label class="classification-feedback__option btn btn--secondary"><input type="radio" name="impact"/> </label>`),_j=R(`<fieldset class="classification-feedback__item"><legend class="classification-feedback__label"> </legend> <!></fieldset>`),vj=R(`<div class="classification-feedback"><div class="classification-feedback__title"> </div> <!> <!></div>`);function yj(e,t){D(t,!0);let n=[],r=[],i=A(()=>Z.t),a=K(t,`impact`,15),o=K(t,`quality`,15),s=K(t,`classificationConfig`,7);var c={get impact(){return a()},set impact(e){a(e),k()},get quality(){return o()},set quality(e){o(e),k()},get classificationConfig(){return s()},set classificationConfig(e){s(e),k()}},l=z(),u=P(l),d=e=>{var t=vj(),c=N(t),l=N(c,!0);E(c);var u=F(c,2),d=e=>{var t=hj(),r=N(t),i=N(r,!0);E(r),Zi(F(r,2),17,()=>s().quality.options,qi,(e,t)=>{var r=mj(),i=N(r);Ua(i);var a,s=F(i);E(r),I(()=>{a!==(a=L(t).value)&&(i.value=(i.__value=L(t).value)??``),V(s,` ${L(t).label??``}`)}),$a(n,[],i,()=>(L(t).value,o()),o),B(e,r)}),E(t),I(()=>V(i,s().quality.label)),B(e,t)};U(u,e=>{s().quality&&s().quality.options.length!==0&&e(d)});var f=F(u,2),p=e=>{var t=_j(),n=N(t),i=N(n,!0);E(n),Zi(F(n,2),17,()=>s().impact.options,qi,(e,t)=>{var n=gj(),i=N(n);Ua(i);var o,s=F(i);E(n),I(()=>{o!==(o=L(t).value)&&(i.value=(i.__value=L(t).value)??``),V(s,` ${L(t).label??``}`)}),$a(r,[],i,()=>(L(t).value,a()),a),B(e,n)}),E(t),I(()=>V(i,s().impact.label)),B(e,t)};U(f,e=>{s().impact&&s().impact.options.length!==0&&e(p)}),E(t),I(()=>V(l,L(i).classificationTitle)),B(e,t)};return U(u,e=>{s()&&(s().quality||s().impact)&&e(d)}),B(e,l),O(c)}q(yj,{impact:{},quality:{},classificationConfig:{}},[],[],{mode:`open`});var bj=R(`<div></div>`),xj=R(`<div><!></div>`),Sj=R(`<span class="sr-only"> </span> <!>`,1),Cj=R(`<div class="dialog-footer"><!></div>`),wj=R(`<div><div class="dialog-header"><!> <!></div> <!> <!></div>`),Tj=R(`<!> <!>`,1);function Ej(e,t){D(t,!0);let n=K(t,`open`,7),r=K(t,`content`,7),i=K(t,`title`,7),a=K(t,`footer`,7),o=K(t,`onClose`,7),s=j(void 0),c=j(void 0),l={duration:Number(Z.theme.components.dialog.custom?.transitionDuration)||200,delay:Number(Z.theme.components.dialog.custom?.transitionDelay)||0,y:Number(Z.theme.components.dialog.custom?.transitionY)||10},u=e=>{e||o()()};er(()=>{if(n()&&L(s)&&L(c)&&L(c).textContent){let e=nl(L(c).textContent.trim());L(s).setAttribute(`aria-label`,e),L(s).removeAttribute(`aria-labelledby`),bA(L(s))[0].focus({preventScroll:!0})}});var d={get open(){return n()},set open(e){n(e),k()},get content(){return r()},set content(e){r(e),k()},get title(){return i()},set title(e){i(e),k()},get footer(){return a()},set footer(e){a(e),k()},get onClose(){return o()},set onClose(e){o(e),k()}},f=z(),p=P(f),m=e=>{var t=z();W(P(t),()=>nk,(e,t)=>{t(e,{get open(){return n()},onOpenChange:u,children:(e,t)=>{var n=z();W(P(n),()=>AS,(e,t)=>{t(e,{get to(){return Z.targets.portals},children:(e,t)=>{var n=Tj(),o=P(n);{let e=(e,t)=>{let n=()=>t?.().props,r=()=>t?.().open;var i=z(),a=P(i),o=e=>{var t=bj();qa(t,()=>({...n(),class:`dialog-overlay`})),pa(3,t,()=>Ek,()=>l),B(e,t)};U(a,e=>{r()&&e(o)}),B(e,i)};W(o,()=>Yw,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}var u=F(o,2);{let e=(e,t)=>{let n=()=>t?.().props,o=()=>t?.().open;var u=z(),d=P(u),f=e=>{var t=wj();qa(t,()=>({...n(),class:`dialog-content`}));var o=N(t),u=N(o);W(u,()=>xS,(e,t)=>{t(e,{class:`dialog-title h4`,children:(e,t)=>{var n=xj();H(N(n),()=>i()??w),E(n),oo(n,e=>M(c,e),()=>L(c)),B(e,n)},$$slots:{default:!0}})}),W(F(u,2),()=>ik,(e,t)=>{t(e,{class:`dialog-close`,children:(e,t)=>{var n=Sj(),r=P(n),i=N(r,!0);E(r),Vy(F(r,2),{name:`dismiss`}),I(()=>V(i,Z.t.close)),B(e,n)},$$slots:{default:!0}})}),E(o);var d=F(o,2);W(d,()=>Zw,(e,t)=>{t(e,{class:`dialog-description text-container`,children:(e,t)=>{var n=z();H(P(n),r),B(e,n)},$$slots:{default:!0}})});var f=F(d,2),p=e=>{var t=Cj();H(N(t),a),E(t),B(e,t)};U(f,e=>{a()&&e(p)}),E(t),va(t,(e,t)=>SA?.(e,t),()=>({firstFocusableOnMount:!1})),oo(t,e=>M(s,e),()=>L(s)),pa(3,t,()=>Dk,()=>l),B(e,t)};U(d,e=>{o()&&e(f)}),B(e,u)},t=A(()=>!Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout);W(u,()=>sk,(n,r)=>{r(n,{trapFocus:!1,forceMount:!0,get preventScroll(){return L(t)},child:e,$$slots:{child:!0}})})}B(e,n)},$$slots:{default:!0}})}),B(e,n)},$$slots:{default:!0}})}),B(e,t)};return U(p,e=>{Z.targets.portals&&e(m)}),B(e,f),O(d)}q(Ej,{open:{},content:{},title:{},footer:{},onClose:{}},[],[],{mode:`open`});var Dj=R(`<div class="form__item"><label class="form__label" for="email"> </label> <input type="email" id="email" class="input"/></div>`),Oj=R(`<form name="feedback-form" class="form"><!> <div class="form__item"><label class="form__label" for="feedback"> </label> <textarea id="feedback" class="input"></textarea></div> <!> <button type="submit" class="btn btn--primary"> </button></form>`);function kj(e,t){D(t,!0);let n=A(()=>Z.t),r=j(``),i=j(``),a=j(void 0),o=j(void 0),s=A(()=>L(a)!==void 0||L(o)!==void 0||L(r)!==``);{let t=e=>{var t=z();ra(P(t),()=>L(n).feedbackFormTitle),B(e,t)},c=e=>{var t=Oj(),c=N(t);yj(c,{get classificationConfig(){return Z.data.chatConfig.classification},get impact(){return L(a)},set impact(e){M(a,e,!0)},get quality(){return L(o)},set quality(e){M(o,e,!0)}});var l=F(c,2),u=N(l),d=N(u,!0);E(u);var f=F(u,2);Wn(f),E(l);var p=F(l,2),m=e=>{var t=Dj(),r=N(t),a=N(r,!0);E(r);var o=F(r,2);Ua(o),E(t),I(()=>{V(a,L(n).feedbackFormEmail),G(o,`placeholder`,L(n).feedbackFormEmailPlaceholder)}),Za(o,()=>L(i),e=>M(i,e)),B(e,t)};U(p,e=>{Z.data.chatConfig.showOverallFeedbackEmail&&e(m)});var h=F(p,2),g=N(h,!0);E(h),E(t),I(()=>{V(d,L(n).feedbackFormMessage),G(f,`placeholder`,L(n).feedbackFormMessagePlaceholder),h.disabled=!L(s),V(g,L(n).send)}),ai(`submit`,t,async e=>{e.preventDefault(),Z.data.chatConfig.classification?await Fy.submitFeedback({email:L(i),message:L(r),classification:{impact:L(a),quality:L(o)}}):await Fy.submitFeedback({email:L(i),message:L(r)}),M(a,void 0),M(o,void 0),M(r,``),Fy.closeFeedback()}),Za(f,()=>L(r),e=>M(r,e)),B(e,t)},l=A(()=>!!Z.data.conversationFeedbackId||Z.data.conversationFeedbackIsOpen);Ej(e,{get open(){return L(l)},get onClose(){return Fy.closeFeedback},title:t,content:c,$$slots:{title:!0,content:!0}})}O()}q(kj,{},[],[],{mode:`open`});var Aj=R(`<div class="chat-page__give-feedback"><button class="btn btn--primary" aria-haspopup="dialog"> </button></div>`),jj=R(`<div class="chat-page__footer-text"></div>`),Mj=R(`<section class="chat-page"><!> <div class="chat-page__body"><h2 class="sr-only"></h2> <div class="chat-page__messages"></div> <div class="chat-page__buttons"><!></div></div> <div><div class="container"><div class="chat-page__footer-content"><button aria-hidden="true"><span class="sr-only"> </span> <!></button> <!> <a class="skip-link"> </a> <!></div></div></div></section>`);function Nj(e,t){D(t,!0);let n=A(()=>Z.t),r=j(!1),i=j(void 0),a=j(void 0),o=j(void 0),s=j(void 0),c=j(void 0),l,u=e=>{l&&qy(l,l.scrollHeight-l.clientHeight,e,`scrollTop`,yk)},d=()=>{l&&M(r,!(l.scrollHeight-l.scrollTop-l.clientHeight<90))},f,p=j(!1),m=()=>{M(p,!1),f?.disconnect(),f=new IntersectionObserver(([e])=>{e.isIntersecting?(M(p,!0),f.disconnect()):M(p,!1)},{root:Z.targets.scrollContainer,rootMargin:`0px 0px -30% 0px`}),L(s)&&f.observe(L(s))};Li(()=>(m(),window.addEventListener(`resize`,m),()=>{f?.disconnect(),window.removeEventListener(`resize`,m)}));let h=()=>{d()},g=e=>{if(e.altKey&&e.code===`KeyR`){e.preventDefault();let t=Z.data.history.findLast(e=>e.type===`user`)?.message;Fy.goto({name:`start-page`,prefill:t})}},_=()=>{setTimeout(()=>{let{chatAppContainer:e,chatAppHeader:t,chatPageMessages:n,chatPageLastUserMessage:r}=Z.targets;if(!(Z.data.chatConfig.inlineLayout&&!Z.data.props.flyout&&!Z.data.isInlineLayoutContained)&&e&&t&&L(s)&&n&&L(a)&&L(o)&&r){let i=e.clientHeight-t.offsetHeight-L(s).offsetHeight-L(o).offsetHeight-r.offsetHeight-parseInt(getComputedStyle(n).gap)*2;i>0?(L(a).style.setProperty(`--last-bot-message-min-height`,`${i}px`),u(1e3)):r.scrollIntoView({behavior:`smooth`})}},50)},v=()=>{Fy.onSubmit(!0)};er(()=>{L(i)&&(l=L(i).closest(`.chat-app__main`))}),er(()=>{if(l)return l.addEventListener(`scroll`,d),()=>{l.removeEventListener(`scroll`,d)}});let y=e=>{let t=Z.data.history[e-1];t&&t.type===`user`&&(Fy.updateChatInput(t.message),L(c)?.focus())};var b=Mj();ai(`resize`,jn,h),ai(`keypress`,jn,g);var x=N(b);kj(x,{});var S=F(x,2),C=N(S);ra(C,()=>L(n).ariaChatHistory,!0),E(C);var ee=F(C,2);Zi(ee,23,()=>Z.data.history,e=>e?.id??e?.time,(e,t,n)=>{{let r=A(()=>L(n)===Z.data.history.length-1);yA(e,{get message(){return L(t)},get index(){return L(n)},onmessageupdate:d,onbotmessageinit:_,onaskQuestion:()=>{y(L(n))},get isLast(){return L(r)}})}}),E(ee),oo(ee,e=>M(a,e),()=>L(a)),va(ee,(e,t)=>Ly?.(e,t),()=>`chatPageMessages`);var te=F(ee,2),ne=N(te),re=e=>{var t=Aj(),r=N(t),i=N(r,!0);E(r),E(t),I(()=>{G(r,`aria-expanded`,Z.data.conversationFeedbackIsOpen),V(i,L(n).giveFeedback)}),oi(`click`,r,()=>Fy.openConversationFeedback()),B(e,t)};U(ne,e=>{Z.data.chatConfig.showOverallFeedbackButton&&e(re)}),E(te),oo(te,e=>M(o,e),()=>L(o)),E(S);var ie=F(S,2),w=N(ie),ae=N(w),oe=N(ae);let se;G(oe,`tabindex`,-1);var ce=N(oe),le=N(ce,!0);E(ce),Vy(F(ce,2),{name:`chevronDown`}),E(oe);var ue=F(oe,2);oo(pj(ue,{onSubmit:v,class:`chat-page__chat-input`}),e=>M(c,e,!0),()=>L(c));var de=F(ue,2),fe=N(de,!0);E(de);var pe=F(de,2),me=e=>{var t=jj();ra(t,()=>L(n).chatFooterText,!0),E(t),B(e,t)};U(pe,e=>{L(n).chatFooterText!==void 0&&e(me)}),E(ae),E(w),E(ie),oo(ie,e=>M(s,e),()=>L(s)),E(b),oo(b,e=>M(i,e),()=>L(i)),I(()=>{Oa(ie,1,Sa([`chat-page__footer`,{"chat-page__footer--unsticked":L(p)}])),se=Oa(oe,1,`chat-page__scroll-to-bottom btn btn--secondary btn--square`,null,se,{"chat-page__scroll-to-bottom--hidden":!L(r)}),oe.disabled=!L(r),V(le,L(n).scrollToBottom),G(de,`href`,`#${UP}`),V(fe,L(n).ariaGotoMainNavigation)}),oi(`click`,oe,()=>{u(500)}),oi(`click`,de,function(...e){WP?.apply(this,e)}),B(e,b),O()}si([`click`]),q(Nj,{},[],[],{mode:`open`});var Pj=R(`<div><!> <h2 class="introduction__title"></h2></div>`);function Fj(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`class`,7);var i={get class(){return r()},set class(e){r(e),k()}},a=Pj(),o=N(a);uA(o,{class:`introduction__avatar`,isLarge:!0});var s=F(o,2);return ra(s,()=>L(n).introductionTitle,!0),E(s),E(a),I(()=>Oa(a,1,`introduction ${r()??``}`)),B(e,a),O(i)}q(Fj,{class:{}},[],[],{mode:`open`});var Ij=R(`<div class="consent-page__disclaimer text-container fly-in" style="--fly-in-id: 1;"></div>`),Lj=R(`<button class="btn btn--secondary" type="button"> </button>`),Rj=R(`<section><!> <!> <div class="consent-page__actions fly-in" style="--fly-in-id: 2;"><!> <button class="btn btn--primary" type="button"> </button></div></section>`);function zj(e,t){D(t,!0);let n=A(()=>Z.t),r=A(()=>L(n).popups?.find(e=>e.actions?.some(e=>e.action===`acceptTerms`))),i=j(!1);er(()=>{M(i,!0)});var a=Rj();let o;var s=N(a);Fj(s,{class:`consent-page__introduction fly-in`});var c=F(s,2),l=e=>{var t=Ij();ra(t,()=>L(n).termsInvitationToConsent,!0),E(t),B(e,t)};U(c,e=>{L(n).termsInvitationToConsent&&e(l)});var u=F(c,2),d=N(u),f=e=>{var t=Lj(),i=N(t,!0);E(t),I(()=>V(i,L(n).termsReadButton)),oi(`click`,t,()=>window.location.hash=L(r).hash),B(e,t)};U(d,e=>{L(r)&&e(f)});var p=F(d,2),m=N(p,!0);E(p),E(u),E(a),I(()=>{o=Oa(a,1,`consent-page container`,null,o,{mounted:L(i)}),V(m,L(n).termsAcceptButton)}),oi(`click`,p,()=>Fy.acceptTerms()),B(e,a),O()}si([`click`]),q(zj,{},[],[],{mode:`open`});var Bj=R(`<button><span class="sr-only"> </span> <!></button>`),Vj=R(`<div><div><button type="button" class="context-box__popover-close"><!> <span class="sr-only"> </span></button> <!></div></div>`),Hj=R(`<!> <!>`,1),Uj=R(`<div><!></div>`);function Wj(e,t){D(t,!0);let n={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},r=K(t,`openLabel`,7),i=K(t,`closeLabel`,7),a=K(t,`openIcon`,7),o=K(t,`closeIcon`,7),s=K(t,`ariaLabel`,7),c=K(t,`children`,7),l=K(t,`class`,7),u=K(t,`contentClass`,7),d=K(t,`portal`,7),f=j(!1),p=j(void 0);er(()=>{L(f)?(L(p)?.setAttribute(Hy,`true`),Zr(()=>Fy.setOpenOverlay(!0))):Zr(()=>Fy.setOpenOverlay(!1))});var m={get openLabel(){return r()},set openLabel(e){r(e),k()},get closeLabel(){return i()},set closeLabel(e){i(e),k()},get openIcon(){return a()},set openIcon(e){a(e),k()},get closeIcon(){return o()},set closeIcon(e){o(e),k()},get ariaLabel(){return s()},set ariaLabel(e){s(e),k()},get children(){return c()},set children(e){c(e),k()},get class(){return l()},set class(e){l(e),k()},get contentClass(){return u()},set contentClass(e){u(e),k()},get portal(){return d()},set portal(e){d(e),k()}},h=Uj();return W(N(h),()=>vk,(e,t)=>{t(e,{get open(){return L(f)},set open(e){M(f,e,!0)},children:(e,t)=>{var l=Hj(),m=P(l);{let e=(e,t)=>{let n=()=>t?.().props;var s=Bj();qa(s,()=>({class:`context-box__trigger btn btn--tertiary btn--square`,...n(),"aria-controls":d()?.id}));var c=N(s),l=N(c,!0);E(c);var u=F(c,2);{let e=A(()=>L(f)?o():a());Vy(u,{get name(){return L(e)}})}E(s),va(s,(e,t)=>Uy?.(e,t),()=>({text:L(f)?i():r(),position:`bottom-right`,delay:0})),oo(s,e=>M(p,e),()=>L(p)),I(()=>V(l,L(f)?i():r())),B(e,s)};W(m,()=>tk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}var h=F(m,2);{let e=A(()=>d()||Z.targets.portals);W(h,()=>AS,(t,r)=>{r(t,{get to(){return L(e)},children:(e,t)=>{var r=z(),a=P(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,a=()=>t?.().props,l=()=>t?.().open;var u=z(),d=P(u),p=e=>{var t=Vj();qa(t,()=>({...r()}));var l=N(t);qa(l,()=>({...a(),role:`dialog`,"aria-label":s()}));var u=N(l),d=N(u);Vy(d,{get name(){return o()}});var p=F(d,2),m=N(p,!0);E(p),E(u),H(F(u,2),c),E(l),va(l,e=>SA?.(e)),E(t),I(()=>V(m,i())),oi(`click`,u,()=>M(f,!1)),pa(3,l,()=>Dk,()=>n),B(e,t)};U(d,e=>{l()&&e(p)}),B(e,u)},t=A(()=>[`context-box__content`,u()]);W(a,()=>$O,(n,r)=>{r(n,{get class(){return L(t)},sideOffset:8,alignOffset:-11,align:`end`,side:`bottom`,strategy:`absolute`,onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:()=>L(p)?.focus(),forceMount:!0,child:e,$$slots:{child:!0}})})}B(e,r)},$$slots:{default:!0}})})}B(e,l)},$$slots:{default:!0}})}),E(h),I(()=>Oa(h,1,Sa([`context-box`,l()]))),B(e,h),O(m)}si([`click`]),q(Wj,{openLabel:{},closeLabel:{},openIcon:{},closeIcon:{},ariaLabel:{},children:{},class:{},contentClass:{},portal:{}},[],[],{mode:`open`});var Gj=R(`<div class="text-container" aria-live="polite"><span class="sr-only"> </span> <!></div>`);function Kj(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`content`,7);return Wj(e,{get openLabel(){return L(n).openInfo},get closeLabel(){return L(n).close},openIcon:`info`,closeIcon:`menuClose`,contentClass:`context-box__content--info`,get portal(){return Z.targets.chatAppHeaderPortal},get ariaLabel(){return L(n).ariaInfoTitle},children:(e,t)=>{var i=Gj(),a=N(i),o=N(a,!0);E(a),ra(F(a,2),r),E(i),I(()=>V(o,L(n).ariaCloseWithEsc)),B(e,i)},$$slots:{default:!0}}),O({get content(){return r()},set content(e){r(e),k()}})}q(Kj,{content:{}},[],[],{mode:`open`});var qj=R(`<button><span class="sr-only"> </span> <!></button>`),Jj=R(`<div><div><!></div></div>`),Yj=R(`<!> <!>`,1),Xj=R(`<div><!></div>`);function Zj(e,t){D(t,!0);let n={duration:Number(Z.theme.components.contextBox.custom?.transitionDuration)||200,delay:Number(Z.theme.components.contextBox.custom?.transitionDelay)||0,y:Number(Z.theme.components.contextBox.custom?.transitionY)||10},r=K(t,`openLabel`,7),i=K(t,`closeLabel`,7),a=K(t,`openIcon`,7),o=K(t,`closeIcon`,7),s=K(t,`disableAutoFocusOnOpen`,7,!1),c=K(t,`children`,7),l=K(t,`class`,7),u=K(t,`contentClass`,7),d=K(t,`portal`,7),f=j(!1),p=j(void 0);er(()=>{L(f)?(L(p)?.setAttribute(Hy,`true`),Zr(()=>Fy.setOpenOverlay(!0))):Zr(()=>Fy.setOpenOverlay(!1))});var m={get openLabel(){return r()},set openLabel(e){r(e),k()},get closeLabel(){return i()},set closeLabel(e){i(e),k()},get openIcon(){return a()},set openIcon(e){a(e),k()},get closeIcon(){return o()},set closeIcon(e){o(e),k()},get disableAutoFocusOnOpen(){return s()},set disableAutoFocusOnOpen(e=!1){s(e),k()},get children(){return c()},set children(e){c(e),k()},get class(){return l()},set class(e){l(e),k()},get contentClass(){return u()},set contentClass(e){u(e),k()},get portal(){return d()},set portal(e){d(e),k()}},h=Xj();return W(N(h),()=>ck,(e,t)=>{t(e,{get open(){return L(f)},set open(e){M(f,e,!0)},children:(e,t)=>{var l=Yj(),m=P(l);{let e=(e,t)=>{let n=()=>t?.().props;var s=qj();qa(s,()=>({class:`context-box__trigger btn btn--tertiary btn--square`,...n(),"aria-controls":d()?.id}));var c=N(s),l=N(c,!0);E(c);var u=F(c,2);{let e=A(()=>L(f)?o():a());Vy(u,{get name(){return L(e)}})}E(s),va(s,(e,t)=>Uy?.(e,t),()=>({text:L(f)?i():r(),position:`bottom-right`,delay:0})),oo(s,e=>M(p,e),()=>L(p)),I(()=>V(l,L(f)?i():r())),B(e,s)};W(m,()=>pk,(t,n)=>{n(t,{child:e,$$slots:{child:!0}})})}var h=F(m,2);{let e=A(()=>d()||Z.targets.portals);W(h,()=>AS,(t,r)=>{r(t,{get to(){return L(e)},children:(e,t)=>{var r=z(),i=P(r);{let e=(e,t)=>{let r=()=>t?.().wrapperProps,i=()=>t?.().props,a=()=>t?.().open;var o=z(),s=P(o),l=e=>{var t=Jj();qa(t,()=>({...r()}));var a=N(t);qa(a,()=>({...i()})),H(N(a),c),E(a),E(t),pa(3,a,()=>Dk,()=>n),B(e,t)};U(s,e=>{a()&&e(l)}),B(e,o)},t=A(()=>[`context-box__content`,u()]);W(i,()=>dk,(n,r)=>{r(n,{get class(){return L(t)},sideOffset:8,alignOffset:-11,align:`end`,side:`bottom`,strategy:`absolute`,onOpenAutoFocus:e=>{s()&&e.preventDefault()},forceMount:!0,child:e,$$slots:{child:!0}})})}B(e,r)},$$slots:{default:!0}})})}B(e,l)},$$slots:{default:!0}})}),E(h),I(()=>Oa(h,1,Sa([`context-box`,l()]))),B(e,h),O(m)}q(Zj,{openLabel:{},closeLabel:{},openIcon:{},closeIcon:{},disableAutoFocusOnOpen:{},children:{},class:{},contentClass:{},portal:{}},[],[],{mode:`open`});var Qj=e=>e.charAt(0).toUpperCase()+e.slice(1),$j=R(`<span class="sr-only"> </span>`),eM=R(`<!> <span> <!></span>`,1),tM=R(`<div class="context-box__menu"></div>`),nM=R(`<!> <span> </span>`,1),rM=R(`<!> <div class="context-box__menu"></div>`,1),iM=R(`<!> <!>`,1),aM=R(`<!> <span> </span>`,1),oM=R(`<!> <span> </span>`,1),sM=R(`<!> <div class="context-box__color-scheme-selector"><!> <!> <!></div>`,1),cM=R(`<!> <!>`,1),lM=R(`<!> <!> <!>`,1);function uM(e,t){D(t,!0);let n=A(()=>Z.t),r=e=>{Fy.onLanguageChange(e)},i=e=>`Intl`in globalThis&&Intl.DisplayNames?Qj(new Intl.DisplayNames([e],{type:`language`}).of(e)??e.toUpperCase()):e.toUpperCase(),a=e=>{Z.data.selectedColorScheme===e?Fy.setColorScheme(`system`):Fy.setColorScheme(e)};Zj(e,{get openLabel(){return L(n).openMenu},get closeLabel(){return L(n).closeMenu},openIcon:`menu`,closeIcon:`menuClose`,contentClass:`context-box__content--menu`,get portal(){return Z.targets.chatAppHeaderPortal},children:(e,t)=>{var o=lM(),s=P(o),c=e=>{var t=tM();Zi(t,21,()=>Z.menu,qi,(e,t)=>{var r=z();W(P(r),()=>DO,(e,r)=>{r(e,{class:`context-box__menu-item transition-colors`,onSelect:()=>window.open(L(t).url,L(t).target,`noopener,noreferrer`),closeOnSelect:!0,children:(e,r)=>{var i=eM(),a=P(i);Vy(a,{get name(){return L(t).icon},class:`context-box__menu-item__icon`});var o=F(a,2),s=N(o,!0),c=F(s),l=e=>{var t=$j(),r=N(t);E(t),I(()=>V(r,`, ${L(n).ariaOpensInNewTab??``}`)),B(e,t)};U(c,e=>{L(t).target===`_blank`&&e(l)}),E(o),I(()=>V(s,L(t).label)),B(e,i)},$$slots:{default:!0}})}),B(e,r)}),E(t),B(e,t)};U(s,e=>{Z.menu.length>0&&e(c)});var l=F(s,2),u=e=>{var t=iM(),a=P(t),o=e=>{var t=z();W(P(t),()=>FO,(e,t)=>{t(e,{class:`context-box__separator`,"aria-hidden":`true`})}),B(e,t)};U(a,e=>{Z.menu.length>0&&e(o)}),W(F(a,2),()=>LO,(e,t)=>{t(e,{children:(e,t)=>{var a=rM(),o=P(a);W(o,()=>jO,(e,t)=>{t(e,{class:`context-box__title`,"aria-hidden":`true`,children:(e,t)=>{Qe();var r=gi();I(()=>V(r,L(n).selectLanguage)),B(e,r)},$$slots:{default:!0}})});var s=F(o,2);Zi(s,21,()=>Z.data.chatConfig.supportedLanguages,qi,(e,t)=>{var n=z(),a=P(n);{let e=A(()=>[`context-box__menu-item transition-colors`,{active:Z.data.language===L(t)}]);W(a,()=>NO,(n,a)=>{a(n,{get value(){return L(t)},closeOnSelect:!0,get class(){return L(e)},onSelect:()=>r(L(t)),children:(e,n)=>{var r=nM(),a=P(r);Vy(a,{name:`internalLink`,class:`context-box__menu-item__icon`});var o=F(a,2),s=N(o,!0);E(o),I(e=>V(s,e),[()=>i(L(t))]),B(e,r)},$$slots:{default:!0}})})}B(e,n)}),E(s),B(e,a)},$$slots:{default:!0}})}),B(e,t)};U(l,e=>{Z.data.chatConfig.supportedLanguages.length>0&&e(u)});var d=F(l,2),f=e=>{var t=cM(),r=P(t);W(r,()=>FO,(e,t)=>{t(e,{class:`context-box__separator`,"aria-hidden":`true`})}),W(F(r,2),()=>LO,(e,t)=>{t(e,{children:(e,t)=>{var r=sM(),i=P(r);W(i,()=>jO,(e,t)=>{t(e,{class:`context-box__title sr-only`,"aria-hidden":`true`,children:(e,t)=>{Qe();var r=gi();I(()=>V(r,L(n).selectColorTheme)),B(e,r)},$$slots:{default:!0}})});var o=F(i,2),s=N(o);{let e=A(()=>[`context-box__color-scheme-selector-button transition-colors`,{"context-box__color-scheme-selector-button--active":Z.data.selectedColorScheme===`light`}]);W(s,()=>NO,(t,n)=>{n(t,{value:`light`,closeOnSelect:!0,get class(){return L(e)},onSelect:()=>a(`light`),children:(e,t)=>{var n=aM(),r=P(n);Vy(r,{name:`lightMode`});var i=F(r,2),a=N(i,!0);E(i),I(()=>V(a,Z.t.lightMode)),B(e,n)},$$slots:{default:!0}})})}var c=F(s,2);W(c,()=>FO,(e,t)=>{t(e,{class:`context-box__color-scheme-selector-separator`,"aria-hidden":`true`})});var l=F(c,2);{let e=A(()=>[`context-box__color-scheme-selector-button transition-colors`,{"context-box__color-scheme-selector-button--active":Z.data.selectedColorScheme===`dark`}]);W(l,()=>NO,(t,n)=>{n(t,{value:`dark`,closeOnSelect:!0,get class(){return L(e)},onSelect:()=>a(`dark`),children:(e,t)=>{var n=oM(),r=P(n);Vy(r,{name:`darkMode`});var i=F(r,2),a=N(i,!0);E(i),I(()=>V(a,Z.t.darkMode)),B(e,n)},$$slots:{default:!0}})})}E(o),B(e,r)},$$slots:{default:!0}})}),B(e,t)};U(d,e=>{Z.data.has2ColorSchemes&&e(f)}),B(e,o)},$$slots:{default:!0}}),O()}q(uM,{},[],[],{mode:`open`});var dM=R(`<span class="btn__label"> </span>`),fM=R(`<div><button class="btn btn--tertiary btn--square"><!> <!></button></div>`);function pM(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`class`,7);var i={get class(){return r()},set class(e){r(e),k()}},a=fM(),o=N(a),s=N(o);Vy(s,{name:`newConversation`});var c=F(s,2),l=e=>{var t=dM(),r=N(t,!0);E(t),I(()=>V(r,L(n).newChat)),B(e,t)};return U(c,e=>{L(n).newChat&&e(l)}),E(o),va(o,(e,t)=>Uy?.(e,t),()=>({text:L(n).newChat,position:`bottom-left`,delay:600})),E(a),I(()=>{Oa(a,1,Sa([`new-conversation`,r()])),G(o,`aria-label`,L(n).newChat)}),oi(`click`,o,()=>Fy.onNewConversation()),pa(1,a,()=>Dk,()=>({duration:300,y:30})),pa(2,a,()=>Dk,()=>({y:15,duration:150,easing:bk})),B(e,a),O(i)}si([`click`]),q(pM,{class:{}},[],[],{mode:`open`});var mM=R(`<div><div><!></div></div>`);function hM(e,t){D(t,!0);let n=K(t,`class`,7),r=K(t,`children`,7),i=j(void 0);var a={get class(){return n()},set class(e){n(e),k()},get children(){return r()},set children(e){r(e),k()}},o=mM();let s;var c=N(o);return H(N(c),()=>r()??w),E(c),E(o),I(()=>{Oa(o,1,Sa([`animated-height`,n()])),s=Aa(o,``,s,{height:L(i)?`${L(i)}px`:`auto`})}),io(c,`clientHeight`,e=>M(i,e)),B(e,o),O(a)}q(hM,{class:{},children:{}},[],[],{mode:`open`});var gM=R(`<span class="reference__number transition-colors"> </span>`),_M=R(`<span class="reference__description transition-colors line-clamp line-clamp--6"> </span>`),vM=R(`<span class="reference__breadcrumb transition-colors"> </span>`),yM=R(`<div class="reference__footer"><span class="reference__domain transition-colors"><span class="truncate"> </span></span> <!></div>`),bM=R(`<a target="_blank" rel="noopener noreferrer" class="reference transition-colors"><!> <span class="reference__body transition-colors"><span class="reference__header"><span class="reference__title line-clamp line-clamp--2 h4"> </span> <!></span> <!> <!></span></a>`);function xM(e,t){D(t,!0);let n=K(t,`reference`,7),r=A(()=>`${n().display.listItem.title}. ${n().display.card.description}. ${Z.t.ariaReferenceSource} ${n().display.listItem.badge}${n().display.listItem.breadcrumbs?` / `+n().display.listItem.breadcrumbs.join(` / `):``}`);var i={get reference(){return n()},set reference(e){n(e),k()}},a=bM(),o=N(a),s=e=>{var t=gM(),r=N(t,!0);E(t),I(()=>V(r,n().referenceIndex.used)),B(e,t)};U(o,e=>{n().referenceIndex.used&&e(s)});var c=F(o,2),l=N(c),u=N(l),d=N(u,!0);E(u),Vy(F(u,2),{name:`externalLink`,class:`reference__icon transition-colors`}),E(l);var f=F(l,2),p=e=>{var t=_M(),r=N(t,!0);E(t),I(()=>V(r,n().display.card.description)),B(e,t)};U(f,e=>{n().display.card.description&&e(p)});var m=F(f,2),h=e=>{var t=yM(),r=N(t),i=N(r),a=N(i,!0);E(i),E(r);var o=F(r,2),s=e=>{var t=z();Zi(P(t),17,()=>n().display.listItem.breadcrumbs,qi,(e,t)=>{var n=vM(),r=N(n,!0);E(n),I(()=>V(r,L(t))),B(e,n)}),B(e,t)};U(o,e=>{n().display.listItem.breadcrumbs&&e(s)}),E(t),I(()=>V(a,n().display.listItem.badge)),B(e,t)};return U(m,e=>{n().display.listItem.badge&&e(h)}),E(c),E(a),I(()=>{G(a,`href`,n().url),G(a,`aria-label`,L(r)),V(d,n().display.listItem.title)}),B(e,a),O(i)}q(xM,{reference:{}},[],[],{mode:`open`});function SM(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};`}}var CM=R(`<div><!></div>`),wM=R(`<div class="references__toggle-title"> </div> <!>`,1),TM=R(`<div><div class="references__items"></div></div>`),EM=R(`<div><!></div>`),DM=R(`<!> <!>`,1),OM=R(`<div><!></div>`),kM=R(`<div><div class="references__items"></div> <!></div>`),AM=R(`<div><div class="references__container"><div class="references__transition"><!></div></div></div>`);function jM(e,t){D(t,!0);let n=K(t,`class`,7),r=A(()=>Z.data.history.filter(e=>e.type===`bot`).find(e=>e.id===Z.data.currentReferencesAsideId)?.references),i=A(()=>Z.data.currentReferencesAsideId),a=j(void 0),o=j(!1),s=j(void 0);er(()=>{L(i)&&M(o,!1),M(a,L(i),!0)}),er(()=>{L(o)&&setTimeout(()=>{Z.data.chatConfig.inlineLayout===!1&&L(s)?.scrollIntoView({behavior:`smooth`})},200)});let c={delay:200,duration:500,easing:xk,y:50};var l={get class(){return n()},set class(e){n(e),k()}},u=AM(),d=N(u),f=N(d);return Ki(N(f),()=>Z.data.currentReferencesAsideId,e=>{var t=kM(),l=N(t);Zi(l,21,()=>L(r)?.used,qi,(e,t)=>{var n=CM();xM(N(n),{get reference(){return L(t)}}),E(n),pa(1,n,()=>Dk,()=>({...c,delay:0})),B(e,n)}),E(l);var u=F(l,2),d=e=>{var t=OM();hM(N(t),{children:(e,t)=>{var i=z();W(P(i),()=>cT,(e,t)=>{t(e,{get class(){return`references__further ${n()??``}`},get open(){return L(o)},set open(e){M(o,e,!0)},children:(e,t)=>{var n=DM(),i=P(n);W(i,()=>fT,(e,t)=>{t(e,{class:`references__toggle transition-colors`,children:(e,t)=>{var n=wM(),r=P(n),i=N(r,!0);E(r),Vy(F(r,2),{name:`chevronDown`,class:`references__toggle-icon`}),I(()=>V(i,Z.t.referencesFurtherTitle)),B(e,n)},$$slots:{default:!0}})});var a=F(i,2);{let e=(e,t)=>{let n=()=>t?.().props,i=()=>t?.().open;var a=EM();qa(a,()=>({...n(),class:`references__container`}));var o=N(a),l=e=>{var t=TM(),n=N(t);Zi(n,21,()=>L(r)?.unused,qi,(e,t)=>{xM(e,{get reference(){return L(t)}})}),E(n),E(t),pa(1,t,()=>Dk,()=>({...c,delay:0})),pa(2,t,()=>Ek,()=>({duration:100})),B(e,t)};U(o,e=>{i()&&e(l)}),E(a),oo(a,e=>M(s,e),()=>L(s)),B(e,a)};W(a,()=>uT,(t,n)=>{n(t,{forceMount:!0,child:e,$$slots:{child:!0}})})}B(e,n)},$$slots:{default:!0}})}),B(e,i)},$$slots:{default:!0}}),E(t),pa(1,t,()=>Dk,()=>c),B(e,t)};U(u,e=>{L(r)?.unused&&L(r).unused.length>0&&e(d)}),E(t),pa(2,t,()=>SM,()=>({duration:200,delay:L(i)?0:200})),pa(1,t,()=>Dk,()=>L(a)?c:{duration:0,y:0}),B(e,t)}),E(f),E(d),E(u),I(()=>Oa(u,1,Sa([`references`,n()]))),B(e,u),O(l)}q(jM,{class:{}},[],[],{mode:`open`});var MM=R(`<button class="predefined-question transition-colors" tabindex="0"><!> </button>`);function NM(e,t){D(t,!0);let n=K(t,`onSubmit`,7),r=K(t,`predefinedQuestion`,7),i=K(t,`index`,7);var a={get onSubmit(){return n()},set onSubmit(e){n(e),k()},get predefinedQuestion(){return r()},set predefinedQuestion(e){r(e),k()},get index(){return i()},set index(e){i(e),k()}},o=MM(),s=N(o);Vy(s,{name:`predefinedQuestion`,class:`predefined-question__icon transition-colors`});var c=F(s,1,!0);return E(o),va(o,(e,t)=>Iy?.(e,t),()=>`predefinedQuestion`),I(()=>{G(o,`data-index`,i()),V(c,r().label??r().question)}),oi(`click`,o,()=>n()(r().question)),B(e,o),O(a)}si([`click`]),q(NM,{onSubmit:{},predefinedQuestion:{},index:{}},[],[],{mode:`open`});var PM=R(`<li><!></li>`),FM=R(`<section><h2 class="sr-only"> </h2> <ul></ul></section>`);function IM(e,t){D(t,!0);let n=K(t,`class`,7),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`class`]);var i={get class(){return n()},set class(e){n(e),k()}},a=FM();qa(a,()=>({"aria-label":Z.t.ariaPredefinedQuestionsRegion,class:n(),...r}));var o=N(a),s=N(o,!0);E(o);var c=F(o,2);let l;return Zi(c,21,()=>Z.data.predefinedQuestions,qi,(e,t,n)=>{var r=PM();NM(N(r),{get predefinedQuestion(){return L(t)},get onSubmit(){return Fy.onStartConversation},index:n}),E(r),B(e,r)}),E(c),E(a),I(()=>{V(s,Z.t.ariaPredefinedQuestions),l=Oa(c,1,`predefined-questions`,null,l,{"predefined-questions--pii-padding":Z.data.questionHasPii})}),B(e,a),O(i)}q(IM,{class:{}},[],[],{mode:`open`});var LM=R(`<div class="introduction-disclaimer text-container fly-in" style="--fly-in-id: 3;"></div>`),RM=R(`<section><!> <!> <!> <!></section>`);function zM(e,t){D(t,!0);let n=A(()=>Z.t),r=j(!1);er(()=>{M(r,!0)});var i=RM();let a;var o=N(i);Fj(o,{class:`start-page__introduction fly-in`});var s=F(o,2);{let e=A(()=>nl(L(n).introductionTitle||``));pj(s,{get onSubmit(){return Fy.onStartConversation},class:`start-page__chat-input fly-in`,style:`--fly-in-id: 1;`,get ariaLabel(){return L(e)}})}var c=F(s,2),l=e=>{IM(e,{class:`start-page__predefined-questions fly-in`,style:`--fly-in-id: 2;`})};U(c,e=>{Z.data.predefinedQuestions&&Z.data.predefinedQuestions.length&&e(l)});var u=F(c,2),d=e=>{var t=LM();ra(t,()=>L(n).introductionDisclaimer,!0),E(t),B(e,t)};U(u,e=>{L(n).introductionDisclaimer&&e(d)}),E(i),I(()=>a=Oa(i,1,`start-page container`,null,a,{mounted:L(r)})),B(e,i),O()}q(zM,{},[],[],{mode:`open`});var BM=RegExp(`([\\p{Ll}\\d])(\\p{Lu})`,`gu`),VM=RegExp(`(\\p{Lu})([\\p{Lu}][\\p{Ll}])`,`gu`),HM=RegExp(`(\\d)(\\p{Ll})`,`gu`),UM=RegExp(`(\\p{L})(\\d)`,`gu`),WM=/[^\p{L}\d]+/giu,GM=`$1\0$2`,KM=``;function qM(e,t){let n=e.trim();n=n.replace(BM,GM).replace(VM,GM),t?.separateNumbers&&(n=n.replace(HM,GM).replace(UM,GM)),n=n.replace(WM,`\0`);let r=0,i=n.length;for(;n.charAt(r)===`\0`;)r++;if(r===i)return[];for(;n.charAt(i-1)===`\0`;)i--;return n.slice(r,i).split(/\0/g)}function JM(e,t){return lN(e,t?.prefixCharacters)+qM(e,t).map(aN(t?.locale)).join(t?.delimiter??` `)}function YM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale),a=t?.mergeAmbiguousCharacters?sN(r,i):cN(r,i);return n+qM(e,t).map((e,t)=>t===0?r(e):a(e,t)).join(t?.delimiter??``)}function XM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale),a=t?.mergeAmbiguousCharacters?sN(r,i):cN(r,i);return n+qM(e,t).map(a).join(t?.delimiter??``)}function ZM(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=oN(t?.locale);return n+qM(e,t).map(sN(r,i)).join(t?.delimiter??` `)}function QM(e,t){return lN(e,t?.prefixCharacters)+qM(e,t).map(oN(t?.locale)).join(t?.delimiter??`_`)}function $M(e,t){return JM(e,{delimiter:`.`,...t})}function eN(e,t){return JM(e,{delimiter:`-`,...t})}function tN(e,t){return JM(e,{delimiter:`/`,...t})}function nN(e,t){let n=lN(e,t?.prefixCharacters),r=aN(t?.locale),i=sN(r,oN(t?.locale));return n+qM(e,t).map((e,t)=>t===0?i(e):r(e)).join(t?.delimiter??` `)}function rN(e,t){return JM(e,{delimiter:`_`,...t})}function iN(e,t){return ZM(e,{delimiter:`-`,...t})}function aN(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function oN(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function sN(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function cN(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function lN(e,t=KM){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(t.includes(i))n+=i;else break}return n}function uN(e,t){let n=``;for(let r of e)n+=Math.random()>.5?r.toLocaleUpperCase(t):r.toLocaleLowerCase(t);return n}function dN(e,t){let n=``;for(let r of e){let e=r.toLocaleLowerCase(t);n+=r===e?r.toLocaleUpperCase(t):e}return n}var fN=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,pN=/[^\s:–—-]+|./g,mN=/\s/,hN=/.(?=[A-Z]|\..)/,gN=/[A-Za-z0-9\u00C0-\u00FF]/;function _N(e){for(var t=``,n;(n=pN.exec(e))!==null;){var r=n[0],i=n.index;if(!hN.test(r)&&(!fN.test(r)||i===0||i+r.length===e.length)&&(e.charAt(i+r.length)!==`:`||mN.test(e.charAt(i+r.length+1)))){t+=r.replace(gN,function(e){return e.toUpperCase()});continue}t+=r}return t}var vN=YM,yN=ZM,bN=QM,xN=$M,SN=JM,CN=XM,wN=tN,TN=nN,EN=rN,DN=iN,ON=eN,kN=uN,AN=dN,jN=_N,MN=e=>e.toUpperCase(),NN=(e,t)=>e.toLocaleUpperCase(t),PN=e=>e.toLowerCase(),FN=(e,t)=>e.toLocaleLowerCase(t),IN=e=>e.charAt(0).toLowerCase()+e.slice(1),LN=e=>e.charAt(0).toUpperCase()+e.slice(1),RN=e=>e===e.toUpperCase(),zN=e=>e===e.toLowerCase(),BN=class{};BN.camel=vN,BN.capital=yN,BN.constant=bN,BN.dot=xN,BN.kebab=ON,BN.lower=PN,BN.lowerFirst=IN,BN.localeLower=FN,BN.localeUpper=NN,BN.no=SN,BN.pascal=CN,BN.path=wN,BN.sentence=TN,BN.snake=EN,BN.sponge=kN,BN.swap=AN,BN.title=jN,BN.train=DN,BN.upper=MN,BN.upperFirst=LN,BN.isUpper=RN,BN.isLower=zN;var VN=640,HN=1024,UN=null,WN=()=>{if(UN)return UN;if(!globalThis.document)return 16;let e=globalThis.document.querySelector(`:root`);return UN=Number(getComputedStyle(e).fontSize.slice(0,-2)),UN},GN=({minRem:e,maxRem:t})=>{let n=WN(),r=VN/n,i=HN/n,a=(t-e)/(i-r);return`clamp( ${e}rem, ${-r*a+e}rem + ${a*100}cqw, ${t}rem )`},KN=e=>typeof e==`string`?e:typeof e==`number`?String(e):typeof e==`object`?e.minRem===e.maxRem?`${e.minRem}rem`:GN(e):``,qN=(e,t,n,r=!1)=>{let i=``;return n.forEach(n=>{let a=t[n];r&&!a&&n===`borderWidth`&&(a=`0px`),r&&!a&&n===`borderColor`&&(a=`transparent`),a&&(i+=`--${ON(e)}-${ON(n)}:${KN(a)}; `)}),i},JN=(e,t)=>Object.entries(t).map(([t,n])=>`--${e}-${ON(t)}:${KN(n)}`).join(`; `)+`; `,YN=(e,t)=>{let n=``;return n+=qN(e,t,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`borderRadius`,`color`],!0),t.hover&&(n+=qN(`${e}-hover`,t.hover,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.focus&&(n+=qN(`${e}-focus`,t.focus,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.custom&&(n+=JN(e,t.custom)),n},XN=(e,t)=>Object.entries(t).map(([t,n])=>`--color-${e}-${t}:${n}`).join(`; `)+`; `,ZN=e=>`--font-family: ${e?.family||`inherit`};`,QN=e=>`.chat-app {${ZN(e.font)} ${Object.entries(e.colors).map(([e,t])=>XN(e,t)).join(``)} ${JN(`base`,e.base)} ${Object.entries(e.components).map(([e,t])=>YN(ON(e),t)).join(``)}};`;function $N(e,t){D(t,!0);let n=K(t,`css`,7),r=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`css`]),i=e=>{er(()=>{n()&&(e.innerHTML=n())})};var a={get css(){return n()},set css(e){n(e),k()}},o=z(),s=P(o),c=e=>{var t=z();ha(P(t),()=>`style`,!1,(e,t)=>{va(e,e=>i?.(e)),qa(e,()=>({...r}))}),B(e,t)};return U(s,e=>{n()&&e(c)}),B(e,o),O(a)}q($N,{css:{}},[],[],{mode:`open`});var eP=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}.toast{width:100%;padding:var(--spacer-r-20);align-items:center;gap:var(--spacer-16);border-width:var(--toast-border-width,1px);border-radius:var(--toast-border-radius);border-color:var(--toast-border-color,transparent);background:var(--toast-background);box-shadow:var(--toast-box-shadow);color:var(--toast-color);display:flex}.toast[data-type=success] svg{color:var(--toast-icon-success-color)}.toast[data-type=error] svg{color:var(--toast-icon-error-color)}.toast[data-type=warning] svg{color:var(--toast-icon-warning-color)}.toast[data-type=info] svg{color:var(--toast-icon-info-color)}.toast svg{width:var(--spacer-24)!important;height:var(--spacer-24)!important}ol[data-sonner-toaster=true]{border:var(--spacer-16) solid transparent;max-width:600px;width:100%!important}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.btn{min-height:calc(var(--btn-padding-y) * 2 + var(--btn-icon-size));padding:var(--btn-padding-y) var(--btn-padding-x);align-items:center;gap:var(--spacer-r-8);font-size:var(--base-font-size-sm);line-height:var(--base-line-height-tight);text-align:left;transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);border-style:solid;flex-wrap:nowrap;text-decoration:none;display:flex;position:relative}.btn>:where(.svg){width:var(--btn-icon-size)}.btn:disabled{cursor:not-allowed;opacity:.5}.btn--primary{border-width:var(--btn-primary-border-width);border-radius:var(--btn-primary-border-radius);border-color:var(--btn-primary-border-color);background:var(--btn-primary-background);box-shadow:var(--btn-primary-box-shadow);color:var(--btn-primary-color);font-weight:var(--btn-primary-font-weight,700)}.btn--primary:hover{border-width:var(--btn-primary-hover-border-width,var(--btn-primary-border-width));border-color:var(--btn-primary-hover-border-color,var(--btn-primary-border-color));background:var(--btn-primary-hover-background,var(--btn-primary-background));box-shadow:var(--btn-primary-hover-box-shadow,var(--btn-primary-box-shadow));color:var(--btn-primary-hover-color,var(--btn-primary-color))}.btn--secondary{border-width:var(--btn-secondary-border-width);border-radius:var(--btn-secondary-border-radius,var(--btn-primary-border-radius));border-color:var(--btn-secondary-border-color);background:var(--btn-secondary-background);box-shadow:var(--btn-secondary-box-shadow);color:var(--btn-secondary-color);font-weight:var(--btn-secondary-font-weight,700)}.btn--secondary:hover{border-width:var(--btn-secondary-hover-border-width,var(--btn-secondary-border-width));border-color:var(--btn-secondary-hover-border-color,var(--btn-secondary-border-color));background:var(--btn-secondary-hover-background,var(--btn-secondary-background));box-shadow:var(--btn-secondary-hover-box-shadow,var(--btn-secondary-box-shadow));color:var(--btn-secondary-hover-color,var(--btn-secondary-color))}.btn--tertiary{border-width:var(--btn-tertiary-border-width);border-radius:var(--btn-tertiary-border-radius,var(--btn-primary-border-radius));border-color:var(--btn-tertiary-border-color);background:var(--btn-tertiary-background);box-shadow:var(--btn-tertiary-box-shadow);color:var(--btn-tertiary-color);font-weight:var(--btn-tertiary-font-weight,700)}.btn--tertiary:hover{border-width:var(--btn-tertiary-hover-border-width,var(--btn-tertiary-border-width));border-color:var(--btn-tertiary-hover-border-color,var(--btn-tertiary-border-color));background:var(--btn-tertiary-hover-background,var(--btn-tertiary-background));box-shadow:var(--btn-tertiary-hover-box-shadow,var(--btn-tertiary-box-shadow));color:var(--btn-tertiary-hover-color,var(--btn-tertiary-color))}.btn--square{--btn-padding-x:var(--btn-padding-y)}.btn--square:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.btn--square>:where(.svg){width:var(--btn-icon-size)}.btn--square>:where(.btn__label){padding-right:calc(var(--btn-padding-x) * 1.25);display:none}@container chat-container (width>=640px){.btn--square>:where(.btn__label){display:block}}.form{align-items:flex-start;gap:var(--spacer-r-20);flex-direction:column;display:flex}.form__item{gap:var(--spacer-5);flex-direction:column;width:100%;display:flex}.form__label{color:var(--label-color,inherit);font-weight:var(--label-font-weight,inherit)}.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.chat-input{--chat-input-padding:calc(.5em + var(--chat-input-border-width));--chat-input-settings-transition-duration:.2s}@container chat-container (width>=640px){.chat-input{--chat-input-padding:calc(.75em + var(--chat-input-border-width))}}.chat-input{z-index:var(--z-index-local-overlay);position:relative}.chat-input__textarea{box-sizing:border-box;width:100%;max-height:6lh;padding:1em var(--spacer-64) 1em calc(var(--spacer-r-24) - var(--chat-input-border-width));color:var(--chat-input-color);resize:none;transition:padding var(--chat-input-settings-transition-duration) var(--default-transition-timing-function);background:0 0;border:0 solid #0000;grid-area:textarea;display:block}.chat-input__textarea:has(+.chat-input__buttons .chat-input__mic-button){padding-right:calc(2.5em + var(--spacer-64))}.chat-input__grid--has-settings .chat-input__textarea{padding-left:var(--spacer-8)}.chat-input__grid--settings-is-open .chat-input__textarea{padding-right:var(--spacer-r-16);padding-left:var(--spacer-r-16)}@container chat-container (width>=640px){.chat-input__textarea{padding:1.25em var(--spacer-80) 1.25em calc(var(--spacer-r-28) - var(--chat-input-border-width))}.chat-input__grid--has-settings .chat-input__textarea{padding-left:var(--spacer-8)}.chat-input__grid--settings-is-open .chat-input__textarea{padding-right:var(--spacer-r-28);padding-left:var(--spacer-r-28)}}.chat-input__textarea:focus,.chat-input__textarea:focus-visible{outline-color:#0000}.chat-input__grid{border-width:var(--chat-input-border-width);border-radius:var(--chat-input-border-radius);border-style:solid;border-color:var(--chat-input-border-color);background:var(--chat-input-background);box-shadow:var(--chat-input-box-shadow);transition:grid-template-rows var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), grid-template-columns var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), background var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), box-shadow var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), outline-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-radius var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function);display:flex}.chat-input__grid:has(.chat-input__textarea:focus-visible){border-width:var(--chat-input-focus-border-width,var(--chat-input-border-width));border-radius:var(--chat-input-focus-border-radius,var(--chat-input-border-radius));border-color:var(--chat-input-focus-border-color,var(--chat-input-border-color));background:var(--chat-input-focus-background,var(--chat-input-background));box-shadow:var(--chat-input-focus-box-shadow,var(--chat-input-box-shadow));color:var(--chat-input-focus-color,var(--chat-input-color));outline-color:#0000}.chat-input__grid:hover{background:var(--chat-input-hover-background,var(--chat-input-background));box-shadow:var(--chat-input-hover-box-shadow,var(--chat-input-box-shadow))}.chat-input__grid--has-settings{--chat-input-settings-height:0px;grid-template-rows:1fr var(--chat-input-settings-height);grid-template-columns:var(--btn-submit-size) 1fr;grid-template-areas:"toggle textarea"".settings";width:100%;display:grid}@container chat-container (width>=640px){.chat-input__grid--has-settings{grid-template-columns:calc(var(--btn-submit-size) + var(--spacer-r-12)) 1fr}}.chat-input__grid--settings-is-open{grid-template-columns:0 1fr}.chat-input__submit-button,.chat-input__abort-button{--margin:.5em}.chat-input__open-settings-button{margin-left:var(--spacer-r-12)}.chat-input__buttons{right:var(--chat-input-padding);bottom:var(--chat-input-padding);pointer-events:none;align-items:center;gap:.5em;display:flex;position:absolute}.chat-input__buttons>*{pointer-events:auto}.chat-input__submit-button{width:var(--btn-submit-size);height:var(--btn-submit-size);border-width:var(--chat-input-submit-border-width,0px);border-radius:var(--chat-input-submit-border-radius);border-color:var(--chat-input-submit-border-color);background:var(--chat-input-submit-background);box-shadow:var(--chat-input-submit-box-shadow);color:var(--chat-input-submit-color);cursor:pointer;justify-content:center;align-items:center;transition-property:opacity,background-color,transform;transition-duration:.2s,.2s,.35s;transition-timing-function:ease;display:flex}.chat-input__submit-button:hover{border-width:var(--chat-input-submit-hover-border-width,var(--chat-input-submit-border-width));border-radius:var(--chat-input-submit-hover-border-radius,var(--chat-input-submit-border-radius));border-color:var(--chat-input-submit-hover-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-hover-background,var(--chat-input-submit-background));box-shadow:var(--chat-input-submit-hover-box-shadow,var(--chat-input-submit-box-shadow));color:var(--chat-input-submit-hover-color,var(--chat-input-submit-color))}.chat-input__submit-button path{stroke:currentColor;stroke-width:var(--chat-input-submit-stroke-width,1.5px)}@container chat-container (width>=640px){.chat-input__submit-button{--margin:.75em}}.chat-input__submit-button--deactivated{transform:scale(var(--chat-input-submit-deactivated-scale,.8));border-color:var(--chat-input-submit-deactivated-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-deactivated-background,var(--chat-input-submit-background));color:var(--chat-input-submit-deactivated-color,var(--chat-input-submit-color));cursor:not-allowed;opacity:var(--chat-input-submit-deactivated-opacity,.5)}.chat-input__submit-button--deactivated:hover{border-color:var(--chat-input-submit-deactivated-border-color,var(--chat-input-submit-border-color));background:var(--chat-input-submit-deactivated-background,var(--chat-input-submit-background));color:var(--chat-input-submit-deactivated-color,var(--chat-input-submit-color))}.chat-input__submit-icon,.chat-input__abort-icon{width:var(--spacer-20);height:var(--spacer-20);pointer-events:none}.chat-input__notification-wrapper{margin-bottom:var(--spacer-4);border-radius:var(--chat-input-notification-border-radius);position:relative;overflow:hidden}.chat-input__notification{padding:var(--spacer-8);gap:var(--spacer-8);border-width:var(--chat-input-notification-border-width);border-radius:var(--chat-input-notification-border-radius);border-color:var(--chat-input-notification-border-color);background:var(--chat-input-notification-background);box-shadow:var(--chat-input-notification-box-shadow);color:var(--chat-input-notification-color);display:flex}.chat-input__notification-label{font-weight:700;font-size:var(--base-font-size-xs);padding-top:.175em;line-height:1.35}@container chat-inner-container (width>=640px){.chat-input__notification-label{font-size:var(--base-font-size-sm);padding-top:.125em}}.chat-input__notification-icon{width:var(--spacer-20);height:var(--spacer-20);flex-shrink:0}@container chat-inner-container (width>=640px){.chat-input__notification-icon{width:var(--spacer-24);height:var(--spacer-24)}}.chat-input__mic-button{border-radius:var(--chat-input-submit-border-radius);cursor:pointer;--mic-base-color:var(--color-grey-500);--mic-accent-color:var(--color-accent-500);background:0 0;border:none;justify-content:center;align-items:center;width:2.5em;height:2.5em;transition-property:background-color,color;transition-duration:.2s;transition-timing-function:ease;display:flex}.chat-input__mic-button:hover{background-color:var(--color-grey-100);--mic-base-color:var(--color-grey-700);--mic-accent-color:var(--color-accent-600)}.chat-input__mic-button--listening{background-color:var(--chat-input-notification-background);box-shadow:var(--chat-input-submit-box-shadow);--mic-base-color:#fff6;--mic-accent-color:white}.chat-input__mic-button--listening:hover{background-color:var(--color-highlight-600)}.chat-input__mic-button--error{color:var(--color-highlight-600)}.chat-input__settings{width:100%;padding:var(--chat-input-padding) var(--spacer-80) var(--chat-input-padding) var(--spacer-r-12);gap:var(--spacer-8);pointer-events:none;grid-area:settings;display:flex;position:absolute;bottom:0;left:0;overflow:hidden}@container chat-container (width>=640px){.chat-input__settings{padding-left:var(--spacer-r-20)}}.chat-input__grid--settings-is-open .chat-input__settings{pointer-events:auto;overflow:visible}.chat-input__settings-button{min-width:0;height:100%;padding-right:var(--spacer-4);padding-left:var(--spacer-4);transform:translate(calc(var(--spacer-48) * -1), 150%);border-radius:var(--chat-input-submit-border-radius);outline-offset:0;font-size:var(--base-font-size-xs);opacity:0;transition:transform var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), background var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), box-shadow var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), border-radius var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), color var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), opacity var(--chat-input-settings-transition-duration) calc(var(--chat-input-settings-transition-duration) / 3) var(--default-transition-timing-function);flex-shrink:1;flex-basis:auto;gap:3px}@container chat-inner-container (width>=768px){.chat-input__settings-button{padding-right:var(--spacer-12);padding-left:var(--spacer-8)}}.chat-input__settings-button:disabled{transform:translate(calc(var(--spacer-48) * 1), 150%);opacity:0}.chat-input__grid--settings-is-open .chat-input__settings-button{transform:translateX(calc(var(--spacer-4) * -1));opacity:1}.chat-input__settings-button[data-has-error=true]{border-color:var(--chat-input-notification-border-color)!important;background:var(--chat-input-notification-background)!important;color:var(--chat-input-notification-color)!important}@container chat-inner-container (width>=640px){.chat-input__settings-button .tooltip{display:none}}.chat-input__toggle-area{grid-area:toggle;justify-content:center;place-self:center;align-items:center;width:100%;height:100%;display:flex}.chat-input__grid--settings-is-open .chat-input__toggle-area{overflow:hidden}.chat-input__settings-toggle-button{width:var(--btn-submit-size);height:var(--btn-submit-size);margin-left:var(--spacer-r-8);border-radius:var(--chat-input-submit-border-radius);outline-offset:0;opacity:1;transition:transform var(--chat-input-settings-transition-duration) var(--default-transition-timing-function), opacity var(--chat-input-settings-transition-duration) calc(var(--chat-input-settings-transition-duration) / 3) var(--default-transition-timing-function)}.chat-input__grid--settings-is-open .chat-input__settings-toggle-button{opacity:0;transform:translate(-100%)}.chat-input__settings-toggle-button .svg{flex-shrink:0}.chat-input__settings-button-icon:not(.svg--settingsClose){flex-shrink:0;display:block}@container chat-inner-container (width>=640px){.chat-input__settings-button-icon:not(.svg--settingsClose){display:none}}@container chat-inner-container (width>=768px){.chat-input__settings-button-icon:not(.svg--settingsClose){display:block}}.chat-input__settings-button-label{display:none}@container chat-inner-container (width>=640px){.chat-input__settings-button-label{text-overflow:ellipsis;white-space:nowrap;max-width:20ch;display:block;overflow:hidden}}@container chat-inner-container (width>=1024px){.chat-input__settings-button-label{max-width:40ch}}.chat-input__settings-button-label-name{display:none}@container chat-inner-container (width>=1024px){.chat-input__settings-button-label-name{display:inline}}.chat-input__settings-button-chevron{width:var(--spacer-10);height:var(--spacer-10);transition:transform .2s var(--default-transition-timing-function);flex-shrink:0}[data-state=open]>.chat-input__settings-button-chevron{transform:rotate(180deg)}.classification-feedback{margin-bottom:var(--spacer-16);gap:var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);color:var(--message-user-color);flex-direction:column;display:flex}.classification-feedback__item{gap:var(--spacer-4);border:none;flex-direction:column;margin:0;padding:0;display:flex}.classification-feedback__label{margin-bottom:var(--spacer-8)}.classification-feedback__option{padding-left:var(--spacer-16);align-items:center;gap:var(--spacer-12);display:flex}.classification-feedback__option:has(input:checked){background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color)}.classification-feedback__option:has(input:focus-visible){border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3)}.classification-feedback__option:has(input:focus-visible) input{outline:none}.context-box{z-index:var(--z-index-flyout);position:relative}.context-box__content{--context-box-side-padding:var(--spacer-r-12);z-index:var(--z-index-local-overlay);width:calc(100cqw - var(--spacer-24));border-width:var(--context-box-border-width);border-radius:var(--context-box-border-radius);border-style:solid;border-color:var(--context-box-border-color);background:var(--context-box-background);max-width:300px;box-shadow:var(--context-box-box-shadow);color:var(--context-box-color);font-size:var(--base-font-size-sm)}.context-box__content:focus-visible{outline:none}.context-box__menu{padding:var(--context-box-side-padding);gap:var(--spacer-1);flex-direction:column;display:flex}.context-box__menu--scrollable{max-height:38vh;padding-right:var(--spacer-r-20);grid-template-columns:repeat(1,minmax(280px,10cqw));display:grid;overflow-y:auto}@container chat-inner-container (width>=480px){.context-box__menu--two-cols{column-gap:var(--spacer-r-20);grid-template-columns:repeat(2,minmax(180px,42cqw));display:grid}}@container chat-inner-container (width>=768px){.context-box__menu--three-cols{grid-template-columns:repeat(3,minmax(160px,25cqw))}}.context-box__menu-item{width:100%;padding:var(--spacer-4) var(--spacer-8);align-items:center;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;display:flex;position:relative}.context-box__menu-item:hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}.context-box__menu-item:focus{z-index:var(--z-index-local-overlay)}.context-box__menu-item.active{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}.context-box__menu-item--option{align-items:baseline}.context-box__menu-item__icon{width:var(--spacer-20);height:var(--spacer-20);color:currentColor}.context-box__title{padding:calc(var(--context-box-side-padding) * 1.5) var(--context-box-side-padding) 0 var(--context-box-side-padding);color:var(--context-box-title-color);font-weight:var(--context-box-title-font-weight);font-size:var(--base-font-size-xs)}.context-box__header{min-width:200px;padding:var(--context-box-side-padding);padding-left:calc(var(--context-box-side-padding) + var(--spacer-8));justify-content:space-between;align-items:center;gap:var(--spacer-r-12);border-bottom:1px solid var(--context-box-separator-color);font-weight:var(--context-box-title-font-weight);font-size:var(--base-font-size-xs);text-wrap:balance;display:flex}.context-box__close-button{--btn-padding-y:var(--spacer-4);--btn-padding-x:var(--spacer-4);flex-shrink:0}.context-box__footer{--btn-padding-x-smaller:calc(var(--btn-padding-x) * .75);padding:calc(var(--context-box-side-padding) * .5) calc(var(--context-box-side-padding) + var(--spacer-8) - var(--btn-padding-x-smaller));border-top:1px solid var(--context-box-separator-color);flex-wrap:wrap;display:flex}.context-box__footer-item{padding-right:var(--btn-padding-x-smaller);padding-left:var(--btn-padding-x-smaller);font-size:var(--base-font-size-xs);cursor:pointer}.context-box__separator{border-top:1px solid var(--context-box-separator-color)}.context-box__language-translation{opacity:.5}.context-box__color-scheme-selector{flex-direction:row;align-items:stretch;display:flex}.context-box__color-scheme-selector-button{width:100%;margin:var(--context-box-side-padding);padding:var(--spacer-4) var(--spacer-8);justify-content:center;align-items:center;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;display:flex}.context-box__color-scheme-selector-button:hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}.context-box__color-scheme-selector-separator{border-top:0;border-left:1px solid var(--context-box-separator-color);width:1px;height:auto;display:block}.context-box__color-scheme-selector-button--active{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}.context-box__notification[data-type=error]{color:var(--context-box-error-color)}.context-box__popover-close{z-index:var(--z-index-local-overlay);top:var(--spacer-4);right:var(--spacer-4);clip:rect(0 0 0 0);width:1px;height:1px;padding:var(--spacer-4);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-background);color:var(--context-box-color);clip-path:inset(50%);cursor:pointer;border:none;position:absolute;overflow:hidden}.context-box__popover-close:focus-visible{clip:auto;clip-path:none;width:auto;height:auto;overflow:visible}.context-box__content--info{width:calc(100cqw - var(--spacer-32));max-width:600px;max-height:60cqh;padding:var(--spacer-r-32);position:relative;overflow:hidden scroll}.context-box__content--info :where(.text-container){flex-direction:column;align-items:flex-start;display:flex}[data-bits-floating-content-wrapper]{padding-right:1em}.context-box--dropdown{max-width:min(var(--container-max-width,1024px), 90cqw)}.context-box--dropdown :where(.context-box__content){width:auto;max-width:100%}.consent-page{padding-top:var(--spacer-r-40);padding-bottom:var(--spacer-r-40);justify-content:center;align-items:stretch;gap:var(--spacer-r-48);flex-direction:column;flex-grow:1;display:flex}.consent-page__introduction{text-align:center}.consent-page__disclaimer{font-size:var(--base-font-size-sm);text-align:center;text-wrap:balance}.consent-page__actions{justify-content:center;gap:var(--spacer-r-16);flex-wrap:wrap;display:flex}.chat-page{padding-top:var(--spacer-r-80);flex-direction:column;flex-grow:1;display:flex;position:relative}.chat-page__body{flex-direction:column;flex-grow:1;display:flex}.chat-page__messages{gap:var(--spacer-r-40);flex-direction:column;flex-grow:1;display:flex}.chat-page__footer{z-index:var(--z-index-footer);flex-direction:column;justify-content:flex-end;display:flex;position:sticky;bottom:0}.chat-page__footer--unsticked{position:relative}.chat-page__footer-content{padding-bottom:var(--spacer-r-8);gap:var(--spacer-r-8);border-width:var(--chat-footer-border-width);border-top-right-radius:var(--chat-footer-border-radius);border-top-left-radius:var(--chat-footer-border-radius);border-style:solid;border-color:var(--chat-footer-border-color);background:var(--chat-footer-background);box-shadow:var(--chat-footer-box-shadow);color:var(--chat-footer-color);flex-direction:column;display:flex;position:relative}.chat-page__footer-text{font-size:var(--base-font-size-xs);text-align:center;text-wrap:balance}.chat-page__footer-text :where(a){text-underline-offset:.15em;text-decoration:underline}.chat-page__buttons{padding-top:var(--spacer-80);padding-bottom:var(--spacer-40);align-self:center}.chat-page__scroll-to-bottom{opacity:1;position:absolute;top:0;left:50%;transform:translate(-50%,-150%)}.chat-page__scroll-to-bottom--hidden{transform:translate(-50%);opacity:0!important}.dialog-overlay{z-index:var(--z-index-dialog);background:var(--dialog-background-overlay);position:fixed;inset:0}.dialog-content{z-index:var(--z-index-dialog);width:calc(100% - var(--spacer-32));border-width:var(--dialog-border-width);border-radius:var(--dialog-border-radius);border-color:var(--dialog-border-color);background:var(--dialog-background);max-width:600px;max-height:90vh;box-shadow:var(--dialog-box-shadow,none);flex-direction:column;display:flex;position:fixed;top:50%;left:50%;overflow:clip;transform:translate(-50%,-50%)}.dialog-header{padding:var(--spacer-r-24);border-bottom-width:1px;border-bottom-color:var(--dialog-header-border-bottom-color,var(--dialog-border-color));font-weight:var(--dialog-header-font-weight,inherit);font-size:var(--dialog-header-font-size,inherit);justify-content:space-between;align-items:center;display:flex}.dialog-title{padding:0}.dialog-close{color:var(--anchor-color);justify-self:flex-end;margin-left:auto}.dialog-close:hover{color:var(--anchor-hover-color,var(--dialog-color))}.dialog-description{min-height:0;padding:var(--spacer-r-24);padding-bottom:var(--spacer-r-40);flex:1;overflow-y:auto}.dialog-footer{padding:var(--spacer-r-24);border-top-width:1px;border-top-color:var(--dialog-header-border-bottom-color,var(--dialog-border-color));background:var(--dialog-background);flex-shrink:0}.dialog-footer__actions{justify-content:flex-end;gap:var(--spacer-r-12);display:flex}:where(.flyout){z-index:var(--z-index-flyout);pointer-events:none;width:570px;max-width:100cqw;height:960px;max-height:100cqh;padding:10px;display:block;position:fixed;bottom:0;right:0}.flyout__backdrop{background-color:color-mix(in srgb, var(--flyout-backdrop-color,transparent) calc(var(--flyout-backdrop-opacity) * 100%), transparent);position:fixed;inset:0}.flyout__body{pointer-events:none;place-content:end flex-end;place-items:end;width:100%;height:100%;display:block;position:relative}.flyout__body:has(.flyout__content){pointer-events:auto}.flyout__content{width:100%;height:100%;display:block}.flyout__open-button{z-index:var(--z-index-local-overlay);pointer-events:auto;position:absolute;bottom:0;right:0}.flyout__content{filter:drop-shadow(0 0 8px #0003);border-radius:4px;overflow:clip}.flyout--defaults{right:var(--spacer-r-16);bottom:var(--spacer-r-16);width:200px;height:200px;display:block;position:fixed}.introduction{justify-content:center;align-items:center;gap:var(--spacer-r-16);flex-direction:column;display:flex}.introduction__avatar{width:var(--spacer-r-80);height:var(--spacer-r-80)}.introduction__title{font-size:var(--base-font-size-h3);text-align:center;text-wrap:balance}.introduction-disclaimer{margin-top:var(--spacer-r-32);font-size:var(--base-font-size-sm)}.message{min-height:0;transition:min-height 0 1.1s;display:flex}.message:last-child{min-height:var(--last-bot-message-min-height)}.message--bot{justify-content:flex-start;width:100%}.message--user:first-child+.message--bot{min-height:0}.message--bot :where(.message__content){width:100%}.message--user{justify-content:flex-end}.message--user :where(.message__content){padding:var(--spacer-8) var(--spacer-16);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color)}.message--no-padding{padding:0 var(--spacer-16)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}.predefined-question{width:100%;height:100%;padding:var(--spacer-r-20);gap:var(--spacer-r-12);border-width:var(--card-border-width);border-radius:var(--card-border-radius);border-color:var(--card-border-color);background:var(--card-background);box-shadow:var(--card-box-shadow,none);color:var(--card-color);line-height:var(--base-line-height-snug);text-align:left;cursor:pointer;flex-direction:column;display:flex}.predefined-question:hover{border-width:var(--card-hover-border-width,var(--card-border-width));border-radius:var(--card-hover-border-radius,var(--card-border-radius));border-color:var(--card-hover-border-color,var(--card-border-color));background:var(--card-hover-background,var(--card-background));box-shadow:var(--card-hover-box-shadow,var(--card-box-shadow), none);color:var(--card-hover-color,var(--card-color))}.predefined-question:hover :where(.predefined-question__icon){color:var(--card-icon-hover-color)}@container chat-container (width>=640px){.predefined-question{padding:var(--spacer-r-24)}}.predefined-question__icon{color:var(--card-icon-color)}.predefined-questions{gap:var(--spacer-r-12);width:100%;display:grid}@container chat-container (width>=640px){.predefined-questions{grid-template-columns:repeat(3,1fr)}}.predefined-questions--pii-padding{transform:translateY(var(--spacer-56))}.reference-number{display:inline-block;position:relative}.reference-number__trigger{box-sizing:border-box;min-width:1.5em;height:1.5em;padding:var(--reference-number-trigger-padding);border-width:var(--reference-number-trigger-border-width);border-radius:var(--reference-number-trigger-border-radius);border-color:var(--reference-number-trigger-border-color);background:var(--reference-number-trigger-background);box-shadow:var(--reference-number-trigger-box-shadow);color:var(--reference-number-trigger-color);font-weight:var(--base-font-weight-bold);font-size:var(--base-font-size-xs);text-align:center;cursor:pointer;margin:0 .1em;line-height:1;text-decoration:none;display:inline-block;position:relative;top:-.1em}.reference-number__trigger:hover{background:var(--reference-number-trigger-hover-background);color:var(--reference-number-trigger-hover-color)}.reference-number__trigger:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.reference-number__content-wrapper{z-index:var(--z-index-reference-number);width:var(--reference-number-content-width);max-width:var(--reference-number-content-max-width);position:absolute}.reference-number__content{padding:var(--spacer-r-20);border-width:var(--reference-number-content-border-width);border-radius:var(--reference-number-content-border-radius);border-style:solid;border-color:var(--reference-number-content-border-color);background:var(--reference-number-content-background);box-shadow:var(--reference-number-content-box-shadow);display:block}.reference-number__content:hover{border-width:var(--reference-number-content-hover-border-width,var(--reference-number-content-border-width));border-color:var(--reference-number-content-hover-border-color,var(--reference-number-content-border-color));background:var(--reference-number-content-hover-background,var(--reference-number-content-background));color:var(--reference-number-content-hover-color,var(--reference-number-content-color));cursor:pointer}.reference-number__content:after{z-index:var(--z-index-local-overlay);content:"";background:0 0;position:absolute;inset:-.5em}.reference{padding:var(--spacer-12);gap:var(--spacer-12);border-width:var(--reference-border-width);border-radius:var(--reference-border-radius);border-color:var(--reference-border-color);background:var(--reference-background);box-shadow:var(--reference-box-shadow);color:var(--reference-color);cursor:pointer;display:flex}.reference:hover{border-width:var(--reference-hover-border-width,var(--reference-border-width));border-color:var(--reference-hover-border-color,var(--reference-border-color));background:var(--reference-hover-background,var(--reference-background));box-shadow:var(--reference-hover-box-shadow,var(--reference-box-shadow), none);color:var(--reference-hover-color,var(--reference-color))}.reference__number{min-width:1.5em;height:1.5em;margin-top:var(--spacer-1);padding:var(--reference-number-padding);border-width:var(--reference-number-border-width);border-radius:var(--reference-number-border-radius);border-color:var(--reference-number-border-color);background:var(--reference-number-background);box-shadow:var(--reference-number-box-shadow);color:var(--reference-number-color);font-weight:700;font-weight:var(--base-font-weight-bold);font-size:var(--base-font-size-xs);text-align:center;flex-shrink:0;line-height:1;display:block}@container chat-container (width>=640px){.reference__number{margin-top:calc(var(--spacer-1) * -1)}}a:hover .reference__number{border-width:var(--reference-number-hover-border-width,var(--reference-number-border-width));border-radius:var(--reference-number-hover-border-radius,var(--reference-number-border-radius));border-color:var(--reference-number-hover-border-color,var(--reference-number-border-color));background:var(--reference-number-hover-background,var(--reference-number-background));box-shadow:var(--reference-number-hover-box-shadow,var(--reference-number-box-shadow));color:var(--reference-number-hover-color,var(--reference-number-color))}.reference__header{justify-content:space-between;align-items:flex-start;gap:var(--spacer-12);width:100%;display:flex}.reference__title{font-size:var(--reference-font-size,var(--base-font-size-sm))}.reference__body{flex-direction:column;flex-grow:1;min-width:0;display:flex}.reference__icon{width:var(--spacer-20);color:var(--anchor-color);flex-shrink:0;position:relative}@media (hover:hover){.reference__icon{transform:translate(calc(var(--spacer-8) * -1), var(--spacer-8));opacity:0;transition:transform .2s ease-in-out,opacity .2s linear}}a:hover .reference__icon{opacity:1;transform:translate(0)}.reference__description{margin-top:var(--spacer-2);color:var(--reference-description-color);font-size:var(--base-font-size-sm)}a:hover .reference__description{color:var(--reference-description-hover-color)}.reference__footer{--footer-gap:var(--spacer-5);column-gap:var(--footer-gap);margin-top:var(--spacer-6);font-size:var(--base-font-size-xs);flex-wrap:wrap;display:flex}.reference__domain{max-width:100%;padding:var(--reference-domain-padding);border-width:var(--reference-domain-border-width);border-radius:var(--reference-domain-border-radius);border-color:var(--reference-domain-border-color);background:var(--reference-domain-background);box-shadow:var(--reference-domain-box-shadow);color:var(--reference-domain-color);font-weight:700;display:inline-flex}a:hover .reference__domain{border-width:var(--reference-domain-hover-border-width,var(--reference-domain-border-width));border-color:var(--reference-domain-hover-border-color,var(--reference-domain-border-color));background:var(--reference-domain-hover-background,var(--reference-domain-background));box-shadow:var(--reference-domain-hover-box-shadow,var(--reference-domain-box-shadow));color:var(--reference-domain-hover-color,var(--reference-domain-color))}.reference__breadcrumb{color:var(--reference-domain-color)}.reference__breadcrumb:before{padding-right:var(--footer-gap);content:"/";position:relative;top:-1px}a:hover .reference__breadcrumb{color:var(--reference-domain-hover-color,var(--reference-domain-color))}.references__container{--padding:var(--spacer-10);padding:var(--padding);flex-direction:column;display:flex}.references__transition{position:relative}.references__items{width:100%}.references__items :focus-within{z-index:var(--z-index-local-overlay);position:relative}.references__further{margin-top:var(--padding);margin-right:calc(var(--padding) * -1);margin-left:calc(var(--padding) * -1);border-top:1px solid var(--base-line-color)}.references__further :where(.references__container){scroll-margin-top:140px}.references__further :where(.reference){padding-left:var(--spacer-16)}.references__toggle{width:100%;padding:var(--spacer-20) var(--spacer-20) var(--spacer-20) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-8);border-width:var(--references-toggle-border-width);border-radius:var(--references-toggle-border-radius);border-color:var(--references-toggle-border-color);background:var(--references-toggle-background);box-shadow:var(--references-toggle-box-shadow);color:var(--references-toggle-color);font-weight:var(--references-toggle-font-weight,var(--base-font-weight-bold));font-size:var(--references-toggle-font-size,var(--base-font-size-sm));display:flex}.references__toggle:hover{border-color:var(--references-toggle-hover-border-color);background:var(--references-toggle-hover-background);box-shadow:var(--references-toggle-hover-box-shadow);color:var(--references-toggle-hover-color)}.references__toggle[data-state=open] :where(.references__toggle-icon){transform:rotate(180deg)}.references__toggle-icon{width:var(--spacer-24);transition:transform .2s}.start-page{padding-top:var(--spacer-r-40);padding-bottom:var(--spacer-r-40);flex-direction:column;flex-grow:1;justify-content:center;align-items:stretch;display:flex}.start-page__introduction{margin-bottom:var(--spacer-r-48)}.start-page__chat-input{width:100%;margin-bottom:var(--spacer-r-32)}.tooltip-container{z-index:var(--z-index-tooltip);position:relative}.tooltip-container:hover{z-index:var(--z-index-tooltip-hover)}.tooltip{--background-color:var(--tooltip-background);z-index:var(--z-index-tooltip);padding:var(--spacer-3) var(--spacer-8);border-radius:var(--tooltip-border-radius);background:var(--background-color);color:var(--tooltip-color);font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-xs);white-space:nowrap;opacity:1;transition:opacity .15s cubic-bezier(.33,1,.68,1),transform .15s cubic-bezier(.33,1,.68,1);position:absolute;transform:translateY(0)}.tooltip:after{content:"";border-style:solid;border-width:5px;position:absolute}.tooltip-top:after{bottom:-10px;left:calc(50% + var(--tooltip-arrow-offset,0px));border-color:var(--background-color) transparent transparent transparent;transform:translate(-50%)}.tooltip-bottom:after{top:-10px;left:calc(50% + var(--tooltip-arrow-offset,0px));border-color:transparent transparent var(--background-color) transparent;transform:translate(-50%)}.tooltip-left:after{border-color:transparent var(--background-color) transparent transparent;top:50%;right:-10px;transform:translateY(-50%)}.tooltip-right:after{border-color:transparent transparent transparent var(--background-color);top:50%;left:-10px;transform:translateY(-50%)}.tooltip-bottom-right:after{border-color:transparent transparent var(--background-color) transparent;top:-10px;left:80%;transform:translate(-50%)}.tooltip-bottom-left:after{border-color:transparent transparent var(--background-color) transparent;top:-10px;left:20px;transform:translate(-50%)}.tooltip-hidden{opacity:0;pointer-events:none;transform:translateY(1rem)}.context-box.open .tooltip{display:none}.mic-icon{justify-content:center;align-items:center;height:1.5rem;display:flex;position:relative}.mic-icon .svg{width:inherit}.audio-level-mic-svg{width:1.5rem;height:1.5rem}.embed-combobox{align-items:start;gap:var(--spacer-r-16);flex-direction:column;display:flex}.embed-combobox__combobox{border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);background:var(--input-background);align-items:stretch;width:100%;min-width:14rem;max-width:500px;display:inline-flex;position:relative}.embed-combobox__combobox:has(:focus-visible:not([data-disabled])){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);outline-offset:var(--spacer-2)}[data-combobox-input]{width:100%;padding:var(--input-padding);padding-right:var(--spacer-r-64);color:var(--input-color);background:0 0;outline:none}[data-combobox-input]::placeholder{color:var(--input-placeholder-color)}[data-combobox-trigger]{z-index:var(--z-index-local-overlay);aspect-ratio:1;border:0;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;right:0}[data-combobox-trigger] :where(.btn){border-radius:calc(var(--btn-tertiary-border-radius) * .75)}[data-combobox-trigger][data-state=open],[data-combobox-trigger]:hover,[data-combobox-trigger]:focus-visible{outline:none}:is([data-combobox-trigger][data-state=open],[data-combobox-trigger]:hover,[data-combobox-trigger]:focus-visible) :where(.btn){background:var(--btn-tertiary-hover-background);color:var(--btn-tertiary-hover-color)}[data-combobox-trigger][data-disabled],[data-combobox-input][data-disabled]{cursor:not-allowed;opacity:.5}[data-combobox-content]{z-index:var(--z-index-flyout);width:var(--bits-combobox-anchor-width);min-width:var(--bits-combobox-anchor-width);height:21rem;max-height:var(--bits-combobox-content-available-height);padding:0 var(--spacer-r-12);border-width:var(--context-box-border-width);border-radius:var(--context-box-border-radius);border-style:solid;border-color:var(--context-box-border-color);background:var(--context-box-background);box-shadow:var(--context-box-box-shadow);font-size:var(--base-font-size-sm);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}[data-combobox-viewport]{flex-direction:column;gap:1px;display:flex}[data-bits-floating-content-wrapper]{padding:0}[data-combobox-viewport]>p{margin-top:var(--spacer-r-12);padding:var(--spacer-4) var(--spacer-8)}[data-combobox-item]{padding:var(--spacer-4) var(--spacer-8);align-items:center;gap:.5rem;gap:var(--spacer-8);border-radius:var(--context-box-menu-item-border-radius);background:var(--context-box-menu-item-background);color:var(--context-box-menu-item-color);cursor:pointer;-webkit-user-select:none;user-select:none;grid-template-columns:1fr auto;transition:background .2s ease-in-out,color .2s ease-in-out;display:grid}[data-combobox-item]:first-of-type{margin-top:var(--spacer-r-12)}[data-combobox-item]:last-of-type{margin-bottom:var(--spacer-r-12)}[data-combobox-item][data-highlighted]{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}[data-combobox-item][data-selected]{background:var(--context-box-menu-item-active-background);color:var(--context-box-menu-item-active-color)}[data-combobox-item][data-disabled]{cursor:not-allowed;opacity:.5}[data-combobox-scroll-up-button],[data-combobox-scroll-down-button]{z-index:var(--z-index-local-overlay);padding:var(--spacer-4);background:linear-gradient(to bottom, var(--context-box-background), transparent);color:var(--context-box-menu-item-color);cursor:pointer;place-items:center;display:grid;position:absolute;top:0;left:0;right:0}:is([data-combobox-scroll-up-button],[data-combobox-scroll-down-button]):hover{background:var(--context-box-menu-item-hover-background);color:var(--context-box-menu-item-hover-color)}[data-combobox-scroll-down-button]{background:linear-gradient(to top, var(--context-box-background), transparent);top:auto;bottom:0}[data-combobox-scroll-down-button]:hover{background:var(--context-box-menu-item-hover-background)}.embed-buttons{align-items:start;gap:var(--spacer-r-16);flex-direction:column;display:flex}.embed-buttons__buttons{gap:var(--spacer-r-12);flex-wrap:wrap;display:flex}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";.checkbox{border-width:var(--checkbox-border-width);border-radius:var(--checkbox-border-radius);border-color:var(--checkbox-border-color);background:var(--checkbox-background);width:1em;height:1em;box-shadow:var(--checkbox-box-shadow);color:var(--checkbox-color);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative;top:.1em}.checkbox[data-checked=true]{border-color:var(--checkbox-checked-border-color);background:var(--checkbox-checked-background);color:var(--checkbox-checked-color)}.checkbox__icon{width:100%;height:100%;color:var(--color-background);opacity:1;transition:opacity .2s}.checkbox[data-checked=false] .checkbox__icon{opacity:0}.radio{width:var(--spacer-16);height:var(--spacer-16);border-width:var(--radio-border-width);border-color:var(--radio-border-color);background:var(--radio-background);box-shadow:var(--radio-box-shadow);color:var(--radio-color);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,box-shadow,transform,translate,opacity;transition-timing-function:var(--default-transition-timing-function);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.radio[data-checked=true]{border-color:var(--radio-checked-border-color);background:var(--radio-checked-background);color:var(--radio-checked-color)}.radio__indicator{width:var(--spacer-8);height:var(--spacer-8);opacity:0;background:currentColor;border-radius:50%;transition:opacity .2s,transform .2s;transform:scale(0)}.radio[data-checked=true] .radio__indicator{opacity:1;transform:scale(1)}.message__bot-layout{gap:var(--spacer-r-16);width:100%;display:flex}.message__bot-avatar{top:var(--spacer-80);width:var(--spacer-24);height:var(--spacer-24);margin-top:calc(var(--spacer-1) * -1);margin-bottom:var(--spacer-20);flex-shrink:0;display:none;position:sticky;overflow:clip}@container chat-container (width>=480px){.message__bot-avatar{display:block}}@container chat-container (width>=640px){.message__bot-avatar{width:var(--spacer-32);height:var(--spacer-32);margin-top:calc(var(--spacer-3) * -1);margin-bottom:var(--spacer-16)}}.svg--avatar--hide{visibility:hidden;height:0;margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}.message__content,.message__bot-body,.message__bot-options{min-width:0}.message__bot-body{width:100%}.message__bot-options{z-index:var(--z-index-local-overlay);column-gap:var(--spacer-20);row-gap:var(--spacer-8);margin-top:var(--spacer-24);padding-top:var(--spacer-12);border-top-width:var(--message-options-border-width);border-color:var(--message-options-border-color);flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}@container chat-container (width>=640px){.message__bot-options{margin-top:var(--spacer-32);margin-bottom:var(--spacer-20)}}.message__bot-options:has(>:only-child){justify-content:flex-end}.message__bot-references{--btn-padding-x:var(--btn-padding-y);margin-left:calc(var(--btn-padding-x) * -1)}.message__bot-references :where(.btn__label){display:flex}.message__bot-actions{--btn-padding-x:var(--btn-padding-y);margin-right:calc(var(--btn-padding-x) * -1);display:flex;position:relative}@container chat-container (width>=640px){.message__bot-actions{gap:var(--spacer-8)}}.message__bot-loading{width:var(--spacer-16);height:var(--spacer-16);margin:0 var(--spacer-2);display:inline-block}`;function tP(e,{delay:t=0,duration:n=200,easing:r=e=>e,baseScale:i=0,transformOrigin:a=`bottom right`,scaleDirection:o=`scale`}={}){if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return{delay:0,duration:0,css:()=>`opacity: 1; transform: ${o}(1); transform-origin: ${a};`};let s=getComputedStyle(e),c=+s.opacity,l=s.transform.match(/scale[XY]?\(([0-9.]+)\)/),u=l?+l[1]:1,d=1-i;return{delay:t,duration:n,css:e=>{let t=r(e),n=t*u*d+i;return`opacity: ${t*c}; transform: ${o}(${n}); transform-origin: ${a};`}}}var nP=R(`<div class="loader-container svelte-6xtyn8"><svg width="40" height="40" viewBox="0 0 24 24"><circle cx="4" cy="12" r="3"><animate id="spinner_qFRN" begin="0;spinner_OcgL.end+0.25s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="12" cy="12" r="3"><animate begin="spinner_qFRN.begin+0.1s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle><circle cx="20" cy="12" r="3"><animate id="spinner_OcgL" begin="spinner_qFRN.begin+0.2s" attributeName="cy" calcMode="spline" dur="0.6s" values="12;6;12" keySplines=".33,.66,.66,1;.33,0,.66,.33"></animate></circle></svg></div>`),rP={hash:`svelte-6xtyn8`,code:`.loader-container.svelte-6xtyn8 {display:flex;z-index:var(--z-index-loader);position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;background-color:#fff;}`};function iP(e,t){D(t,!0),_a(e,rP);let n=K(t,`color`,7),r=K(t,`background`,7);var i={get color(){return n()},set color(e){n(e),k()},get background(){return r()},set background(e){r(e),k()}},a=nP(),o=N(a);return E(a),I(()=>{Aa(a,r()?`background: ${r()};`:``),G(o,`fill`,n()??`rgba(127, 127, 127, 0.3)`)}),B(e,a),O(i)}q(iP,{color:{},background:{}},[],[],{mode:`open`});var aP=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";`,oP=typeof window<`u`?window:{screen:{},navigator:{}},sP=(oP.matchMedia||(function(){return{matches:!1}})).bind(oP),cP={get passive(){return!0}},lP=function(){};oP.addEventListener&&oP.addEventListener(`p`,lP,cP),oP.removeEventListener&&oP.removeEventListener(`p`,lP,!1),`PointerEvent`in oP;var uP=`ontouchstart`in oP,dP=`TouchEvent`in oP,fP=uP||dP&&sP(`(any-pointer: coarse)`).matches,pP=(oP.navigator.maxTouchPoints||0)>0||fP,mP=oP.navigator.userAgent||``,hP=sP(`(pointer: coarse)`).matches&&/iPad|Macintosh/.test(mP)&&Math.min(oP.screen.width||0,oP.screen.height||0)>=768,gP=(sP(`(pointer: coarse)`).matches||!sP(`(pointer: fine)`).matches&&uP)&&!/Windows.*Firefox/.test(mP),_P=sP(`(any-pointer: fine)`).matches||sP(`(any-hover: hover)`).matches||hP||!uP,vP=pP&&(_P||!gP)?`hybrid`:pP?`touchOnly`:`mouseOnly`,yP=vP===`mouseOnly`?`mouse`:vP===`touchOnly`||gP?`touch`:`mouse`,bP=R(`<div class="open-button__title"></div>`),xP=R(`<div class="open-button__mask"><div class="open-button__description"></div></div>`),SP=R(`<div class="open-button__text"><!> <!></div>`),CP=R(`<div class="sr-only"> </div>`),wP=R(`<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"></div>`,1),TP=R(`<link rel="stylesheet"/>`),EP=R(`<!> <!>`,1),DP=R(`<!> <!> <!> <main class="chat-app"><!></main>`,1);function OP(e,t){D(t,!0);let n=(e,n)=>{let r=()=>n?.().chatConfig,i=()=>n?.().language,a=()=>n?.().colorScheme,c=A(()=>{let{openButtonTitle:e,openButtonDescription:t}=r().translations[i()];return{openButtonTitle:e,openButtonDescription:t}}),l=A(()=>r().fullTheme[a()].tokens.svgs),u=A(()=>r().fullTheme[a()]?.tokens.components.openButton?.custom),d=A(()=>!!L(u)?.hideTitleWhenCollapsed);{let n=A(()=>r().buttonHref?void 0:s()?`true`:`false`),i=A(()=>r().buttonHref?void 0:`true`),a=A(()=>r().buttonHref?void 0:o()),u=A(()=>[`open-button`,t.buttonClass,Z.data.flyoutIsOpen?`open-button--expanded`:void 0,L(d)?`open-button--hide-title-when-collapsed`:void 0]);qk(e,{get href(){return r().buttonHref},onclick:de,onmouseenter:le,onmouseleave:ue,use:ie,get"aria-expanded"(){return L(n)},get"aria-haspopup"(){return L(i)},get"aria-controls"(){return L(a)},get style(){return t.buttonStyle},get className(){return L(u)},get isStandalone(){return L(f)},children:(e,t)=>{var n=wP(),r=P(n),i=e=>{var t=SP(),n=N(t),r=e=>{var t=bP();ra(t,()=>L(c).openButtonTitle,!0),E(t),B(e,t)};U(n,e=>{L(c).openButtonTitle&&e(r)});var i=F(n,2),a=e=>{var t=xP(),n=N(t);ra(n,()=>L(c).openButtonDescription,!0),E(n),oo(n,e=>M(v,e),()=>L(v)),E(t),oo(t,e=>M(_,e),()=>L(_)),B(e,t)};U(i,e=>{L(c).openButtonDescription&&yP===`mouse`&&e(a)}),E(t),B(e,t)},a=e=>{var t=CP(),n=N(t,!0);E(t),I(()=>V(n,Z.t.ariaOpenChat)),B(e,t)};U(r,e=>{L(c).openButtonTitle||L(c).openButtonDescription?e(i):e(a,-1)});var o=F(r,2);ra(o,()=>L(l).avatar,!0),E(o),B(e,n)},$$slots:{default:!0}})}},r=j(`light`),i=K(t,`host`,7),a=K(t,`onError`,7),o=K(t,`flyoutId`,7),s=K(t,`flyoutIsOpen`,7),c=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`,`flyoutId`,`flyoutIsOpen`]),l=async e=>{let t=await(await fetch(`${e}/chatconfig`)).json();return Lg.parse(t)},u=async({forceTheme:e,lang:t,apiUrl:n})=>{let r=S_(window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await l(n)),i;i=t?E_(t,r.supportedLanguages):k_(r.supportedLanguages);let a=gy(Object.keys(r.fullTheme));return{chatConfig:r,language:i,colorScheme:a}},d=(e,t)=>{if(e==null)return t;if(typeof e==`string`){let t=e.trim().toLowerCase();return!(t===``||t===`0`||t===`false`||t===`no`)}return typeof e==`number`?e!==0:typeof e==`boolean`?e:t},f=A(()=>!!i()),p=j(!1),m=j(!1),h=j(!1),g=j(void 0),_=j(void 0),v=j(void 0),y=A(()=>L(v)?.offsetWidth??0),b=A(()=>L(v)?.offsetHeight??0),x=j(void 0),S=j(!1),C,ee=j(!0);function te(){return L(x)?(clearTimeout(L(x)),M(x,void 0),!0):!1}async function ne(e){M(r,e.colorScheme,!0),C?.(),te(),M(S,!1);let n=e.chatConfig.fullTheme[L(r)]?.tokens.components.openButton?.custom??{},i=n.autoExpandScrollThreshold,a=Number(n.autoCollapseDelay??0),o=Number.isNaN(a)?0:Math.max(0,a),c=d(n.autoExpandOnce,!1),l=(()=>{if(i==null)return 100;if(typeof i==`string`){if(i.trim().toLowerCase()===`none`)return 0;let e=Number(i);return Number.isNaN(e)?100:e}let e=Number(i);return Number.isNaN(e)?100:e})();if(Number.isNaN(l)||l<=0)return;let u=`liipgpt-auto-expand-${t.apiUrl}`,f=!1;if(typeof window<`u`)try{f=window.localStorage.getItem(u)===`true`}catch(e){console.warn(`LiipGPT: unable to read auto-expand flag`,e)}M(h,f,!0);let p=()=>{if(!(window.scrollY/window.innerHeight*100>=l)){M(ee,!0);return}if(!(L(m)||s())&&!(c&&(f||L(h)))&&L(ee)){if(M(ee,!1),M(m,!0),M(h,!0),se(),c&&typeof window<`u`)try{window.localStorage.setItem(u,`true`)}catch(e){console.warn(`LiipGPT: unable to persist auto-expand flag`,e)}M(x,setTimeout(()=>{L(S)||(ce(),M(m,!1)),M(x,void 0)},o),!0)}};window.addEventListener(`scroll`,p,{passive:!0}),l===0&&(await Jr(),p()),C=()=>{window.removeEventListener(`scroll`,p)}}function re(){te(),M(m,!1),M(S,!1)}function ie(e){M(g,e,!0)}function w(){C?.(),te()}Ri(w);function ae(){!L(v)||!L(_)||(L(_).style.width=`${L(y)}px`,L(_).style.height=`${L(b)}px`)}function oe(){L(_)&&(L(_).style.width=`0`,L(_).style.height=`0`)}function se(){L(g)&&(L(g).classList.add(`open-button--programmatic-expand`),ae())}function ce(){L(g)&&(L(g).classList.remove(`open-button--programmatic-expand`),oe())}function le(){te()&&M(S,!0),ae()}function ue(){te(),L(S)&&(M(m,!1),M(S,!1),L(g)?.classList.remove(`open-button--programmatic-expand`)),L(p)||oe()}function de(e){re(),t.onclick?.(e)}let fe=A(()=>u(c).then(async e=>(await ne(e),e)).catch(e=>a()(e)));var pe={get host(){return i()},set host(e){i(e),k()},get onError(){return a()},set onError(e){a(e),k()},get flyoutId(){return o()},set flyoutId(e){o(e),k()},get flyoutIsOpen(){return s()},set flyoutIsOpen(e){s(e),k()}},me=z();return ai(`beforeunload`,jn,w),ga(`1k415fq`,e=>{var t=z(),n=P(t),r=e=>{var t=z();Wi(P(t),()=>L(fe),null,(e,t)=>{let n=A(()=>L(t).chatConfig.fullTheme[L(t).colorScheme]);var r=EP(),i=P(r);Zi(i,17,()=>L(n).fontURLs??[],qi,(e,t)=>{var n=TP();I(()=>G(n,`href`,L(t))),B(e,n)}),$N(F(i,2),{id:`font-css`,get css(){return L(n).fontCSS}}),B(e,r)}),B(e,t)};U(n,e=>{L(f)&&e(r)}),B(e,t)}),Wi(P(me),()=>L(fe),e=>{},(e,t)=>{let i=A(()=>L(t).chatConfig.fullTheme[L(r)]);var a=z(),o=P(a),s=e=>{var r=DP(),a=P(r);{let e=A(()=>QN(L(i).tokens));$N(a,{id:`theme-css`,get css(){return L(e)}})}var o=F(a,2);$N(o,{id:`app-css`,get css(){return aP}});var s=F(o,2);$N(s,{id:`custom-css`,get css(){return L(i).customCSS}});var c=F(s,2);n(N(c),()=>L(t)),E(c),B(e,r)},c=e=>{n(e,()=>L(t))};U(o,e=>{L(f)?e(s):e(c,-1)}),B(e,a)}),B(e,me),O(pe)}q(OP,{host:{},onError:{},flyoutId:{},flyoutIsOpen:{}},[],[],{mode:`open`});var kP=R(`<div class="flyout__backdrop"></div>`),AP=R(`<div class="flyout__content"><!></div>`),jP=R(`<div><!> <div class="flyout__body"><!> <div><!></div></div></div>`),MP=R(`<!> <div class="chat-app__container"><div class="chat-app__loader-container"><!></div></div>`,1);function NP(e,t){D(t,!0);let n=K(t,`children`,7),r=K(t,`loaderColor`,7),i=K(t,`loaderBackground`,7),a=K(t,`flyout`,7),o=K(t,`flyoutClass`,7),s=K(t,`flyoutStyle`,7),c=K(t,`onCloseChat`,7),l=K(t,`onError`,7),u=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`children`,`loaderColor`,`loaderBackground`,`flyout`,`flyoutClass`,`flyoutStyle`,`onCloseChat`,`onError`]),d=A(()=>Z.theme?.components?.flyout?.custom??{}),f=A(()=>({enabled:Z.data?.chatConfig?.enableBackdrop??!1,delayIn:Number(L(d).backdropDelayIn??0),durationIn:Number(L(d).backdropDurationIn??200),delayOut:Number(L(d).backdropDelayOut??0),durationOut:Number(L(d).backdropDurationOut??200),baseScaleIn:Number(L(d).backdropBaseScaleIn??1),baseScaleOut:Number(L(d).backdropBaseScaleOut??1),transformOrigin:String(L(d).backdropTransformOrigin??`center`),scaleDirection:String(L(d).backdropScaleDirection??`scale`)})),p=A(()=>({in:{delay:L(f).delayIn,duration:L(f).durationIn,baseScale:L(f).baseScaleIn,transformOrigin:L(f).transformOrigin,scaleDirection:L(f).scaleDirection},out:{delay:L(f).delayOut,duration:L(f).durationOut,baseScale:L(f).baseScaleOut,transformOrigin:L(f).transformOrigin,scaleDirection:L(f).scaleDirection}})),m,h=e=>{er(()=>{let t=e=>{m=e};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t),m=void 0}})},g=`flyout`,_=j(void 0),v=A(()=>Z.data.flyoutIsOpen),y=j(!1),b=A(()=>Z.initialized),x=A(()=>Z.data.hasOpenedOverlays);er(()=>{!Z.data.flyoutIsOpen&&L(y)&&(L(_)?.querySelector(`button`))?.focus({preventScroll:!0}),M(y,L(v),!0)}),er(()=>{if(L(b)&&L(v)){let e=e=>{e.key===`Escape`&&(L(x)||c()())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}}});var S={get children(){return n()},set children(e){n(e),k()},get loaderColor(){return r()},set loaderColor(e){r(e),k()},get loaderBackground(){return i()},set loaderBackground(e){i(e),k()},get flyout(){return a()},set flyout(e){a(e),k()},get flyoutClass(){return o()},set flyoutClass(e){o(e),k()},get flyoutStyle(){return s()},set flyoutStyle(e){s(e),k()},get onCloseChat(){return c()},set onCloseChat(e){c(e),k()},get onError(){return l()},set onError(e){l(e),k()}},C=z();ai(`click`,jn,e=>{e!==m&&a()&&c()()});var ee=P(C),te=e=>{var t=z(),r=P(t),i=e=>{},a=e=>{var t=jP(),r=N(t),i=e=>{var t=kP();pa(1,t,()=>tP,()=>({...L(p).in,easing:Sk})),pa(2,t,()=>tP,()=>({...L(p).out,easing:Sk})),B(e,t)};U(r,e=>{Z.data.flyoutIsOpen&&L(f).enabled&&e(i)});var a=F(r,2);G(a,`id`,g);var c=N(a),d=e=>{var t=AP();H(N(t),n),E(t),pa(1,t,()=>tP,()=>({delay:0,duration:500,easing:Sk,baseScale:.3})),pa(2,t,()=>tP,()=>({delay:100,duration:300,easing:Sk,baseScale:.7})),B(e,t)};U(c,e=>{Z.data.flyoutIsOpen&&e(d)});var m=F(c,2);OP(N(m),po({get onError(){return l()},onclick:e=>{e.stopPropagation(),Fy.openFlyout()},flyoutId:g,get flyoutIsOpen(){return L(v)},buttonClass:`flyout__open-button`},()=>u)),E(m),oo(m,e=>M(_,e),()=>L(_)),E(a),va(a,e=>h?.(e)),E(t),I(()=>{Aa(t,s()),Oa(t,1,Sa([`flyout`,o()]))}),B(e,t)};U(r,e=>{Z.initialized?e(a,-1):e(i)}),B(e,t)},ne=e=>{var a=z(),o=P(a),s=e=>{var n=MP(),a=P(n);$N(a,{id:`app-css`,get css(){return eP}});var o=F(a,2),s=N(o);ia(N(s),t,`loader`,{},e=>{iP(e,{get background(){return i()},get color(){return r()}})}),E(s),E(o),pa(2,o,()=>SM,()=>({duration:200,delay:300})),B(e,n)},c=e=>{var t=z();H(P(t),n),B(e,t)};U(o,e=>{Z.initialized?e(c,-1):e(s)}),B(e,a)};return U(ee,e=>{a()?e(te):e(ne,-1)}),B(e,C),O(S)}q(NP,{children:{},loaderColor:{},loaderBackground:{},flyout:{},flyoutClass:{},flyoutStyle:{},onCloseChat:{},onError:{}},[`loader`],[],{mode:`open`});var PP=R(`<button type="button"> </button>`),FP=R(`<div class="dialog-footer__actions"></div>`);function IP(e,t){D(t,!1);function n(e){let t=Fy[e];typeof t==`function`&&t()}so();{let t=e=>{var t=z();ra(P(t),()=>Z.data.openedPopup?.title),B(e,t)},r=e=>{var t=z();ra(P(t),()=>Z.data.openedPopup?.content),B(e,t)},i=e=>{var t=z(),r=P(t),i=e=>{var t=FP();Zi(t,5,()=>Z.data.openedPopup.actions,qi,(e,t)=>{let r=()=>L(t).action,i=()=>L(t).label,a=()=>L(t).type;var o=PP(),s=N(o,!0);E(o),I(()=>{Oa(o,1,`btn btn--${a()??`secondary`??``}`),V(s,i())}),oi(`click`,o,()=>n(r())),B(e,o)}),E(t),B(e,t)};U(r,e=>{Z.data.openedPopup?.actions?.length&&e(i)}),B(e,t)},a=fn(()=>Z.data.openedPopup!==void 0);Ej(e,{get open(){return L(a)},get onClose(){return Fy.closePopup},title:t,content:r,footer:i,$$slots:{title:!0,content:!0,footer:!0}})}O()}si([`click`]),q(IP,{},[],[],{mode:`open`});var LP=R(`<span class="reference__description line-clamp line-clamp--6"> </span>`),RP=R(`<span class="reference__breadcrumb transition-colors"> </span>`),zP=R(`<span class="reference__footer"><span class="reference__domain transition-colors"><span class="truncate"> </span></span> <!></span>`),BP=R(`<div class="reference-number__content-wrapper" role="tooltip" aria-hidden="true"><a class="reference-number__content transition-colors no-link-styling" target="_blank" rel="noopener noreferrer" tabindex="-1" aria-hidden="true"><span class="reference__header"><h3 class="reference__title line-clamp line-clamp--2 h4"> </h3> <!></span> <!> <!></a></div>`),VP=R(`<div class="reference-number"><a target="_blank" rel="noopener noreferrer" class="reference-number__trigger transition-colors no-link-styling"> </a> <!></div>`);function HP(e,t){D(t,!0);let n=A(()=>Z.t),r=K(t,`usedNumber`,7),i=K(t,`source`,7),a=j(!1),o,s=j(void 0),c=j(void 0),l=A(i),u=A(()=>L(l).display.card.title),d=A(()=>L(l).display.card.description),f=A(()=>L(l).display.card.badge),p=A(()=>L(l).display.card.breadcrumbs),m={duration:Number(Z.theme.components.referenceNumberContent.custom?.transitionDuration)||200,delay:Number(Z.theme.components.referenceNumberContent.custom?.transitionDelay)||0,y:Number(Z.theme.components.referenceNumberContent.custom?.transitionY)||10},h=async()=>{if(!L(s)||!L(c))return;let{x:e,y:t}=await uD(L(s),L(c),{placement:`top`,middleware:[rD(8),aD(),iD({padding:8})]});Object.assign(L(c).style,{left:`${e}px`,top:`${t}px`})},g=()=>{o&&=(clearTimeout(o),void 0)},_=()=>{g(),o=setTimeout(()=>{M(a,!1)},100)},v=`tooltip-${Kg()}`,y=e=>{e.key===`Escape`&&M(a,!1)},b=()=>{g(),M(a,!0)};er(()=>{L(a)?document.addEventListener(`keydown`,y):document.removeEventListener(`keydown`,y)}),er(()=>{L(a)&&h()});var x={get usedNumber(){return r()},set usedNumber(e){r(e),k()},get source(){return i()},set source(e){i(e),k()}},S=VP(),C=N(S),ee=N(C,!0);E(C),oo(C,e=>M(s,e),()=>L(s));var te=F(C,2),ne=e=>{var t=BP(),n=N(t),r=N(n),i=N(r),a=N(i,!0);E(i),Vy(F(i,2),{name:`externalLink`,class:`reference__icon transition-colors`}),E(r);var o=F(r,2),s=e=>{var t=LP(),n=N(t,!0);E(t),I(()=>V(n,L(d))),B(e,t)};U(o,e=>{L(d)&&e(s)});var h=F(o,2),g=e=>{var t=zP(),n=N(t),r=N(n),i=N(r,!0);E(r),E(n);var a=F(n,2),o=e=>{var t=z();Zi(P(t),17,()=>L(p),qi,(e,t)=>{var n=RP(),r=N(n,!0);E(n),I(()=>V(r,L(t))),B(e,n)}),B(e,t)};U(a,e=>{L(p)&&e(o)}),E(t),I(()=>V(i,L(f))),B(e,t)};U(h,e=>{L(f)&&e(g)}),E(n),E(t),oo(t,e=>M(c,e),()=>L(c)),I(()=>{G(t,`id`,v),G(n,`href`,L(l).url),V(a,L(u))}),ai(`mouseenter`,t,b),ai(`mouseleave`,t,_),pa(3,t,()=>Dk,()=>m),B(e,t)};return U(te,e=>{L(a)&&e(ne)}),E(S),I(()=>{G(C,`href`,L(l).url),G(C,`aria-describedby`,L(a)?v:void 0),G(C,`aria-label`,`${L(n).referenceLink??``}: ${L(u)??``}`),G(C,`data-state`,L(a)?`open`:`closed`),V(ee,r())}),ai(`mouseenter`,C,b),ai(`mouseleave`,C,_),ai(`focus`,C,()=>M(a,!0)),ai(`blur`,C,()=>M(a,!1)),B(e,S),O(x)}customElements.define(`liipgpt-reference-number`,q(HP,{source:{attribute:`data-source`,type:`Object`},refNumber:{attribute:`data-all-index`,type:`String`},usedNumber:{attribute:`data-used-index`,type:`String`}},[],[]));var UP=`main-navigation`,WP=e=>{e.preventDefault(),Z.targets.chatAppMainNavigation&&(Z.targets.chatAppMainNavigation.scrollIntoView({behavior:`smooth`,block:`start`}),Z.targets.chatAppMainNavigation.focus())},GP=R(`<link rel="stylesheet"/>`),KP=R(`<link rel="stylesheet"/>`),qP=R(`<!> <!> <!>`,1),JP=R(`<link rel="stylesheet"/>`),YP=R(`<!> <!> <!> <!>`,1),XP=R(`<h1 class="sr-only"> </h1>`),ZP=R(`<div class="chat-app__header-logo"></div>`),QP=R(`<!> <!> <!>`,1),$P=R(`<div class="chat-app__page-transition"><!></div>`),eF=R(`<div><div class="chat-app__main"><div class="chat-app__portals"></div> <!> <div><div class="container"><!> <nav tabindex="-1"><h2 class="sr-only absolute"> </h2> <!> <!> <!></nav> <div id="chat-app-header-portal"></div></div></div> <div class="chat-app__body"><!> <!></div></div> <!> <!></div>`),tF=R(`<div><!> <!></div>`);function nF(e,t){D(t,!0);let n=K(t,`host`,7),r=K(t,`onError`,7),i=uo(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`]);er(()=>{let e={forceTheme:t.forceTheme,apiUrl:t.apiUrl,apiKey:t.apiKey,speechRecognitionApiKey:t.speechRecognitionApiKey,lang:t.lang,features:t.features,loaderBackground:t.loaderBackground,loaderColor:t.loaderColor,flyout:t.flyout,flyoutStyle:t.flyoutStyle,flyoutClass:t.flyoutClass,chatClass:t.chatClass,inlineLayout:t.inlineLayout};Zr(()=>Fy.init(e).catch(e=>r()(e)))});let a=A(()=>Z.data.route.name),o=()=>{Fy.closeFlyout(),n().dispatchEvent(new CustomEvent(`closechat`))};er(()=>{Z.initialized&&Z.data?.chatConfig&&n().dispatchEvent(new CustomEvent(`configloaded`,{detail:Z.data.chatConfig}))});let s=j(void 0),c=j(null),l=m_.fineGrained?.light?.tokens?.components?.aside?.custom?.containerWidthForMobileLayout,u=j(!1),d=A(()=>L(c)?Z.data.props?.flyout||L(c)<=l:null),f=j(void 0),p=j(!1),m=j(0);er(()=>{if(L(f)&&L(f).firstElementChild instanceof HTMLElement){let e=getComputedStyle(L(f).firstElementChild);M(m,parseFloat(e.paddingTop)||0,!0)}}),er(()=>{let e=!1,t=()=>{e||(e=!0,requestAnimationFrame(()=>{L(s)&&(e=!1,Z.targets.scrollContainer?.scrollTop===0&&y(),M(p,L(s).scrollTop>=L(m)+1))}))};return t(),L(s)?.addEventListener(`scroll`,t,{passive:!0}),()=>L(s)?.removeEventListener(`scroll`,t)});let h=()=>{Fy.closeReferencesAside()};er(()=>{Z.initialized&&Z.data.currentReferencesAsideId?M(u,!0):M(u,!1)});let g=j(void 0),_,v=j(!1),y=()=>{M(v,!1),_?.disconnect(),_=new IntersectionObserver(([e])=>{e.isIntersecting?(M(v,!0),_.disconnect()):M(v,!1)},{root:Z.targets.scrollContainer,rootMargin:`-15% 0px 0px 0px`}),L(g)&&_.observe(L(g))};Li(()=>{if(L(g))return y(),window.addEventListener(`resize`,y),()=>{_?.disconnect(),window.removeEventListener(`resize`,y)}});let b=A(()=>Z.initialized);er(()=>{L(b)&&L(d)!==null&&Zr(()=>Fy.setAsideMobile(L(d)))});let x=j(void 0),S=A(()=>Z.data?.chatConfig?.inlineLayout&&!Z.data.props.flyout);er(()=>{let e=0,t=()=>{e=window.visualViewport?.height??window.innerHeight},n=new ResizeObserver(()=>{let t=window.innerWidth<768?.9:1;L(x)&&L(x).offsetHeight>e*t&&(Z.data.isInlineLayoutContained=!0,requestAnimationFrame(()=>{L(x)?.offsetHeight,window.dispatchEvent(new Event(`resize`))}))}),r=[`mouseup`,`click`],i=!1;fy()||r.push(`keydown`);let a=()=>{i||(i=!0,L(x)?.scrollIntoView({behavior:`smooth`}),setTimeout(()=>{i=!1},300))};return L(S)&&L(x)&&(t(),window.visualViewport?.addEventListener(`resize`,t),window.addEventListener(`resize`,t),n.observe(L(x)),r.forEach(e=>{L(x).addEventListener(e,a,!0)})),()=>{L(x)&&r.forEach(e=>{L(x).removeEventListener(e,a,!0)}),n.disconnect(),window.visualViewport?.removeEventListener(`resize`,t),window.removeEventListener(`resize`,t)}});let C=A(()=>Z.data.props?.flyout);return er(()=>{L(b)&&L(C)&&(n().setAttribute(`role`,`region`),Zr(()=>{n().setAttribute(`aria-label`,Z.t.ariaFlyoutRegion)}))}),ga(`3hann0`,e=>{var t=z(),n=P(t),r=e=>{var t=qP(),n=P(t);Zi(n,17,()=>Z.themeBase.fontURLs??[],qi,(e,t)=>{var n=GP();I(()=>G(n,`href`,L(t))),B(e,n)});var r=F(n,2);Zi(r,17,()=>Z.data.additionalStylesheets,qi,(e,t)=>{var n=KP();I(()=>G(n,`href`,L(t))),B(e,n)}),$N(F(r,2),{id:`font-css`,get css(){return Z.themeBase.fontCSS}}),B(e,t)};U(n,e=>{Z.initialized&&e(r)}),B(e,t)}),Qw(e,{get defaultPortalTo(){return L(s)},children:(e,n)=>{var l=tF();let m;var _=N(l),y=e=>{var t=YP(),n=P(t);{let e=A(()=>QN(Z.theme));$N(n,{id:`theme-css`,get css(){return L(e)}})}var r=F(n,2);$N(r,{id:`app-css`,get css(){return eP}});var i=F(r,2);$N(i,{id:`custom-css`,get css(){return Z.themeBase.customCSS}}),Zi(F(i,2),17,()=>Z.data.additionalStylesheets,qi,(e,t)=>{var n=JP();I(()=>G(n,`href`,L(t))),B(e,n)}),B(e,t)};U(_,e=>{Z.initialized&&e(y)}),NP(F(_,2),po({onCloseChat:o,get onError(){return r()}},()=>i,{children:(e,t)=>{var n=eF(),r=N(n),i=N(r);va(i,(e,t)=>Ly?.(e,t),()=>`portals`);var l=F(i,2);zy(l,{});var m=F(l,2),_=N(m),y=N(_),b=e=>{var t=XP(),n=N(t,!0);E(t),I(()=>V(n,Z.t.ariaPageTitle)),B(e,t)};U(y,e=>{!L(C)&&!L(S)&&e(b)});var ee=F(y,2);let te;G(ee,`id`,UP);var ne=N(ee),re=N(ne,!0);E(ne);var ie=F(ne,2),w=e=>{var t=ZP();ra(t,()=>Z.theme.svgs.headerLogo,!0),E(t),B(e,t)};U(ie,e=>{Z.theme.svgs.headerLogo&&e(w)});var ae=F(ie,2),oe=e=>{pM(e,{class:`chat-app__header-new-conversation`})};U(ae,e=>{L(a)===`chat-page`&&e(oe)});var se=F(ae,2),ce=e=>{var t=QP(),n=P(t),r=e=>{{let t=A(()=>Z.t.aboutThisChat||``);Kj(e,{get content(){return L(t)}})}};U(n,e=>{Z.data.chatConfig.showContextInfo&&e(r)});var i=F(n,2),a=e=>{uM(e,{})};U(i,e=>{Z.data.chatConfig.showContextMenu&&e(a)});var s=F(i,2),c=e=>{NA(e,{onclick:o})};U(s,e=>{(Z.data.chatConfig.showCloseChatButton||Z.data.props.flyout)&&e(c)}),B(e,t)};U(se,e=>{Z.initialized&&e(ce)}),E(ee),va(ee,(e,t)=>Ly?.(e,t),()=>`chatAppMainNavigation`),va(F(ee,2),(e,t)=>Ly?.(e,t),()=>`chatAppHeaderPortal`),E(_),E(m),oo(m,e=>M(g,e),()=>L(g)),va(m,(e,t)=>Ly?.(e,t),()=>`chatAppHeader`);var le=F(m,2),ue=N(le);IP(ue,{}),Ki(F(ue,2),()=>L(a),e=>{var t=$P(),n=N(t),r=e=>{zj(e,{})},i=e=>{zM(e,{})},o=e=>{Nj(e,{})};U(n,e=>{L(a)===`consent-page`?e(r):L(a)===`start-page`?e(i,1):L(a)===`chat-page`&&e(o,2)}),E(t),oo(t,e=>M(f,e),()=>L(f)),pa(1,t,()=>Ek,()=>({duration:300,delay:250})),pa(2,t,()=>SM,()=>({duration:150})),B(e,t)}),E(le),E(r),oo(r,e=>M(s,e),()=>L(s)),va(r,(e,t)=>Ly?.(e,t),()=>`scrollContainer`);var de=F(r,2),fe=e=>{jA(e,{get isOpen(){return L(u)},get isMobile(){return L(d)},get showReferencesByDefault(){return Z.data.chatConfig.showReferencesByDefault},onClose:h,get title(){return Z.t.referencesTitle},children:(e,t)=>{jM(e,{})},$$slots:{default:!0}})};U(de,e=>{L(d)!==null&&e(fe)}),$v(F(de,2),{position:`top-center`,get containerAriaLabel(){return Z.t.ariaNotifications}}),E(n),ar(()=>io(n,`clientWidth`,e=>M(c,e))),oo(n,e=>M(x,e),()=>L(x)),va(n,(e,t)=>Ly?.(e,t),()=>`chatAppContainer`),I(()=>{Oa(n,1,Sa([`chat-app__container`,{"chat-app__container--inline-layout":L(S),"chat-app__container--inline-layout-contained":Z.data.isInlineLayoutContained}])),Oa(m,1,Sa([`chat-app__header`,{"chat-app__header--unsticked":L(v),"chat-app__header--with-logo":Z.theme.svgs.headerLogo}])),te=Oa(ee,1,`chat-app__header-content`,null,te,{"has-border":L(p)}),G(ee,`aria-label`,`${Z.t.ariaMainNavigationRegion}${Z.data.chatConfig.showCloseChatButton||Z.data.props.flyout?`, ${Z.t.closeChat}`:``}`),V(re,Z.t.ariaMainNavigation)}),B(e,n)},$$slots:{default:!0}})),E(l),I(()=>{Oa(l,1,Sa([`chat-app`,t.chatClass])),G(l,`role`,!L(C)&&!L(S)?`main`:void 0),m=Aa(l,``,m,{"color-scheme":Z.colorScheme||`light`})}),B(e,l)},$$slots:{default:!0}}),O({get host(){return n()},set host(e){n(e),k()},get onError(){return r()},set onError(e){r(e),k()}})}q(nF,{host:{},onError:{}},[],[],{mode:`open`});var rF=R(`<div class="chat-app__container"><div class="error-message svelte-14mj70v">Server is unreachable, please try later... <button class="error-message__retry-button svelte-14mj70v">Retry</button></div></div>`),iF=R(` <!>`,1),aF={hash:`svelte-14mj70v`,code:`
|
|
572
572
|
/* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-14mj70v {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
|
|
573
573
|
BlinkMacSystemFont,
|
|
574
574
|
avenir next,
|
|
@@ -581,5 +581,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
581
581
|
roboto,
|
|
582
582
|
noto,
|
|
583
583
|
arial,
|
|
584
|
-
sans-serif;}.error-message__retry-button.svelte-14mj70v {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function oF(e,t){
|
|
585
|
-
`,t())??``]),
|
|
584
|
+
sans-serif;}.error-message__retry-button.svelte-14mj70v {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function oF(e,t){D(t,!0),_a(e,aF);let n=(e,t=w,n=w)=>{Qe();var r=iF(),a=P(r),o=F(a),s=e=>{},c=e=>{var t=rF(),r=N(t),i=F(N(r));E(r),E(t),oi(`click`,i,()=>n()()),B(e,t)};U(o,e=>{i()?e(s):e(c,-1)}),I(e=>V(a,`${e??``} `),[()=>console.error(`Panic, uncaught error:
|
|
585
|
+
`,t())??``]),B(e,r)},r=K(t,`body`,7),i=K(t,`silent`,7),a=j(void 0),o=e=>{M(a,{error:e},!0)};var s={get body(){return r()},set body(e){r(e),k()},get silent(){return i()},set silent(e){i(e),k()}},c=z();return rn(P(c),{get failed(){return n}},e=>{var t=z(),i=P(t),s=e=>{n(e,()=>L(a).error,()=>()=>{M(a,void 0)})},c=e=>{var t=z();H(P(t),r,()=>o),B(e,t)};U(i,e=>{L(a)?e(s):e(c,-1)}),B(e,t)}),B(e,c),O(s)}si([`click`]),q(oF,{body:{},silent:{}},[],[],{mode:`open`});function sF(e,t){D(t,!0);let n=K(t,`forceTheme`,7),r=K(t,`apiUrl`,7),i=K(t,`apiKey`,7),a=K(t,`speechRecognitionApiKey`,7),o=K(t,`lang`,7),s=K(t,`features`,7),c=K(t,`loaderBackground`,7),l=K(t,`loaderColor`,7),u=K(t,`flyout`,7),d=K(t,`flyoutStyle`,7),f=K(t,`flyoutClass`,7),p=K(t,`chatClass`,7),m=K(t,`inlineLayout`,7),h=A(()=>({forceTheme:n(),apiUrl:r(),apiKey:i(),speechRecognitionApiKey:a(),lang:o(),features:s(),loaderBackground:c(),loaderColor:l(),flyout:u(),flyoutStyle:d(),flyoutClass:f(),chatClass:p(),inlineLayout:m()}));var g={get forceTheme(){return n()},set forceTheme(e){n(e),k()},get apiUrl(){return r()},set apiUrl(e){r(e),k()},get apiKey(){return i()},set apiKey(e){i(e),k()},get speechRecognitionApiKey(){return a()},set speechRecognitionApiKey(e){a(e),k()},get lang(){return o()},set lang(e){o(e),k()},get features(){return s()},set features(e){s(e),k()},get loaderBackground(){return c()},set loaderBackground(e){c(e),k()},get loaderColor(){return l()},set loaderColor(e){l(e),k()},get flyout(){return u()},set flyout(e){u(e),k()},get flyoutStyle(){return d()},set flyoutStyle(e){d(e),k()},get flyoutClass(){return f()},set flyoutClass(e){f(e),k()},get chatClass(){return p()},set chatClass(e){p(e),k()},get inlineLayout(){return m()},set inlineLayout(e){m(e),k()}};{let n=(e,n=w)=>{nF(e,po({host:t.$$host,get onError(){return n()}},()=>L(h)))},r=A(()=>L(h).flyout??!1);oF(e,{get silent(){return L(r)},body:n,$$slots:{body:!0}})}return O(g)}return customElements.define(`liipgpt-chat`,q(sF,{forceTheme:{attribute:`force-theme`,type:`String`},apiUrl:{attribute:`api-url`,type:`String`},apiKey:{attribute:`api-key`,type:`String`},speechRecognitionApiKey:{attribute:`speech-recognition-api-key`,type:`String`},lang:{attribute:`lang`,type:`String`},features:{attribute:`features`,type:`String`},loaderBackground:{attribute:`loader-background`,type:`String`},loaderColor:{attribute:`loader-color`,type:`String`},flyout:{attribute:`flyout`,type:`Boolean`},flyoutStyle:{attribute:`flyout-style`,type:`String`},flyoutClass:{attribute:`flyout-class`,type:`String`},chatClass:{attribute:`chat-class`,type:`String`},inlineLayout:{attribute:`inline-layout`,type:`Boolean`}},[],[],{mode:`open`})),e.LiipGPTChat=sF,e})({});
|