wineater-bot 4.21.0 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- (function(Z,Q){typeof exports=="object"&&typeof module<"u"?module.exports=Q():typeof define=="function"&&define.amd?define(Q):(Z=typeof globalThis<"u"?globalThis:Z||self,Z.WineaterChatbot=Q())})(this,function(){"use strict";var au=Object.defineProperty;var Oo=Z=>{throw TypeError(Z)};var su=(Z,Q,le)=>Q in Z?au(Z,Q,{enumerable:!0,configurable:!0,writable:!0,value:le}):Z[Q]=le;var at=(Z,Q,le)=>su(Z,typeof Q!="symbol"?Q+"":Q,le),ri=(Z,Q,le)=>Q.has(Z)||Oo("Cannot "+le);var h=(Z,Q,le)=>(ri(Z,Q,"read from private field"),le?le.call(Z):Q.get(Z)),j=(Z,Q,le)=>Q.has(Z)?Oo("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(Z):Q.set(Z,le),R=(Z,Q,le,bn)=>(ri(Z,Q,"write to private field"),bn?bn.call(Z,le):Q.set(Z,le),le),Y=(Z,Q,le)=>(ri(Z,Q,"access private method"),le);var Ao,hn,vn,qt,Ft,Bn,pn,gn,he,ii,Yt,oi,jo,qo,Fe,Ue,Qr,nt,Ut,rt,He,Pe,it,wt,Ct,Ht,Et,Vt,Tt,fr,ve,lu,uu,ai,wr,_r,si,Ye,ot,Ne,Gt,Mn,Ln,hr,zn,On,mn,wn,Ze,Fo,Zt,Do,Ro;const Z="5";typeof window<"u"&&((Ao=window.__svelte??(window.__svelte={})).v??(Ao.v=new Set)).add(Z);const Q=1,le=2,bn=4,Uo=8,Ho=16,Vo=1,Go=2,Ko=4,Yo=8,Zo=16,Qo=1,Jo=2,me=Symbol(),Xo="http://www.w3.org/1999/xhtml",br=!1;var yr=Array.isArray,$o=Array.prototype.indexOf,kr=Array.from,ea=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,ta=Object.getOwnPropertyDescriptors,na=Object.prototype,ra=Array.prototype,li=Object.getPrototypeOf,ui=Object.isExtensible;function ia(e){for(var t=0;t<e.length;t++)e[t]()}function ci(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ge=2,xr=4,Sr=8,st=16,lt=32,At=64,Yn=128,Ve=512,we=1024,Ce=2048,ut=4096,Ie=8192,ct=16384,Cr=32768,Dt=65536,di=1<<17,fi=1<<18,Jt=1<<19,oa=1<<20,Rt=32768,Er=1<<21,Tr=1<<22,bt=1<<23,Wt=Symbol("$state"),aa=Symbol("legacy props"),sa=Symbol(""),Xt=new class extends Error{constructor(){super(...arguments);at(this,"name","StaleReactionError");at(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function la(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ua(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ca(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function da(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ha(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function va(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function pa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ga(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ma(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function wa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function _a(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ba(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function hi(e){return e===this.v}function ya(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vi(e){return!ya(e,this.v)}let $t=!1,ka=!1;function xa(){$t=!0}let ue=null;function en(e){ue=e}function dt(e,t=!1,n){ue={p:ue,i:!1,c:null,e:null,s:e,x:null,l:$t&&!t?{s:null,u:null,$:[]}:null}}function ft(e){var t=ue,n=t.e;if(n!==null){t.e=null;for(var r of n)Wi(r)}return e!==void 0&&(t.x=e),t.i=!0,ue=t.p,e??{}}function yn(){return!$t||ue!==null&&ue.l===null}let Nt=[];function pi(){var e=Nt;Nt=[],ia(e)}function tn(e){if(Nt.length===0&&!kn){var t=Nt;queueMicrotask(()=>{t===Nt&&pi()})}Nt.push(e)}function Sa(){for(;Nt.length>0;)pi()}function gi(e){var t=K;if(t===null)return F.f|=bt,e;if(t.f&Cr)nn(e,t);else{if(!(t.f&Yn))throw e;t.b.error(e)}}function nn(e,t){for(;t!==null;){if(t.f&Yn)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Zn=new Set;let V=null,Qn=null,ce=null,ze=[],Jn=null,Pr=!1,kn=!1;const dr=class dr{constructor(){j(this,he);at(this,"committed",!1);at(this,"current",new Map);at(this,"previous",new Map);j(this,hn,new Set);j(this,vn,new Set);j(this,qt,0);j(this,Ft,0);j(this,Bn,null);j(this,pn,[]);j(this,gn,[]);at(this,"skipped_effects",new Set);at(this,"is_fork",!1)}is_deferred(){return this.is_fork||h(this,Ft)>0}process(t){var r;ze=[],Qn=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of t)Y(this,he,ii).call(this,i,n);this.is_fork||Y(this,he,jo).call(this),this.is_deferred()?(Y(this,he,Yt).call(this,n.effects),Y(this,he,Yt).call(this,n.render_effects),Y(this,he,Yt).call(this,n.block_effects)):(Qn=this,V=null,wi(n.render_effects),wi(n.effects),Qn=null,(r=h(this,Bn))==null||r.resolve()),ce=null}capture(t,n){this.previous.has(t)||this.previous.set(t,n),t.f&bt||(this.current.set(t,t.v),ce==null||ce.set(t,t.v))}activate(){V=this,this.apply()}deactivate(){V===this&&(V=null,ce=null)}flush(){if(this.activate(),ze.length>0){if(mi(),V!==null&&V!==this)return}else h(this,qt)===0&&this.process([]);this.deactivate()}discard(){for(const t of h(this,vn))t(this);h(this,vn).clear()}increment(t){R(this,qt,h(this,qt)+1),t&&R(this,Ft,h(this,Ft)+1)}decrement(t){R(this,qt,h(this,qt)-1),t&&R(this,Ft,h(this,Ft)-1),this.revive()}revive(){for(const t of h(this,pn))be(t,Ce),Bt(t);for(const t of h(this,gn))be(t,ut),Bt(t);R(this,pn,[]),R(this,gn,[]),this.flush()}oncommit(t){h(this,hn).add(t)}ondiscard(t){h(this,vn).add(t)}settled(){return(h(this,Bn)??R(this,Bn,ci())).promise}static ensure(){if(V===null){const t=V=new dr;Zn.add(V),kn||dr.enqueue(()=>{V===t&&t.flush()})}return V}static enqueue(t){tn(t)}apply(){}};hn=new WeakMap,vn=new WeakMap,qt=new WeakMap,Ft=new WeakMap,Bn=new WeakMap,pn=new WeakMap,gn=new WeakMap,he=new WeakSet,ii=function(t,n){var v;t.f^=we;for(var r=t.first;r!==null;){var i=r.f,o=(i&(lt|At))!==0,s=o&&(i&we)!==0,u=s||(i&Ie)!==0||this.skipped_effects.has(r);if(r.f&Yn&&((v=r.b)!=null&&v.is_pending())&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!u&&r.fn!==null){o?r.f^=we:i&xr?n.effects.push(r):Tn(r)&&(r.f&st&&n.block_effects.push(r),Pn(r));var a=r.first;if(a!==null){r=a;continue}}var d=r.parent;for(r=r.next;r===null&&d!==null;)d===n.effect&&(Y(this,he,Yt).call(this,n.effects),Y(this,he,Yt).call(this,n.render_effects),Y(this,he,Yt).call(this,n.block_effects),n=n.parent),r=d.next,d=d.parent}},Yt=function(t){for(const n of t)(n.f&Ce?h(this,pn):h(this,gn)).push(n),Y(this,he,oi).call(this,n.deps),be(n,we)},oi=function(t){if(t!==null)for(const n of t)!(n.f&ge)||!(n.f&Rt)||(n.f^=Rt,Y(this,he,oi).call(this,n.deps))},jo=function(){if(h(this,Ft)===0){for(const t of h(this,hn))t();h(this,hn).clear()}h(this,qt)===0&&Y(this,he,qo).call(this)},qo=function(){var o;if(Zn.size>1){this.previous.clear();var t=ce,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of Zn){if(s===this){n=!1;continue}const u=[];for(const[d,v]of this.current){if(s.current.has(d))if(n&&v!==s.current.get(d))s.current.set(d,v);else continue;u.push(d)}if(u.length===0)continue;const a=[...s.current.keys()].filter(d=>!this.current.has(d));if(a.length>0){var i=ze;ze=[];const d=new Set,v=new Map;for(const p of u)_i(p,a,d,v);if(ze.length>0){V=s,s.apply();for(const p of ze)Y(o=s,he,ii).call(o,p,r);s.deactivate()}ze=i}}V=null,ce=t}this.committed=!0,Zn.delete(this)};let ht=dr;function Ca(e){var t=kn;kn=!0;try{for(var n;;){if(Sa(),ze.length===0&&(V==null||V.flush(),ze.length===0))return Jn=null,n;mi()}}finally{kn=t}}function mi(){var e=kt;Pr=!0;var t=null;try{var n=0;for(rr(!0);ze.length>0;){var r=ht.ensure();if(n++>1e3){var i,o;Ea()}r.process(ze),yt.clear()}}finally{Pr=!1,rr(e),Jn=null}}function Ea(){try{ha()}catch(e){nn(e,Jn)}}let Ge=null;function wi(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(ct|Ie))&&Tn(r)&&(Ge=new Set,Pn(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Li(r):r.fn=null),(Ge==null?void 0:Ge.size)>0)){yt.clear();for(const i of Ge){if(i.f&(ct|Ie))continue;const o=[i];let s=i.parent;for(;s!==null;)Ge.has(s)&&(Ge.delete(s),o.push(s)),s=s.parent;for(let u=o.length-1;u>=0;u--){const a=o[u];a.f&(ct|Ie)||Pn(a)}}Ge.clear()}}Ge=null}}function _i(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;o&ge?_i(i,t,n,r):o&(Tr|st)&&!(o&Ce)&&bi(i,t,r)&&(be(i,Ce),Bt(i))}}function bi(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if(i.f&ge&&bi(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Bt(e){for(var t=Jn=e;t.parent!==null;){t=t.parent;var n=t.f;if(Pr&&t===K&&n&st&&!(n&fi))return;if(n&(At|lt)){if(!(n&we))return;t.f^=we}}ze.push(t)}function Ta(e){let t=0,n=Lt(0),r;return()=>{tr()&&(l(n),Nr(()=>(t===0&&(r=In(()=>e(()=>xn(n)))),t+=1,()=>{tn(()=>{t-=1,t===0&&(r==null||r(),r=void 0,xn(n))})})))}}var Pa=Dt|Jt|Yn;function Ia(e,t,n){new Aa(e,t,n)}class Aa{constructor(t,n,r){j(this,ve);at(this,"parent");j(this,Fe,!1);j(this,Ue);j(this,Qr,null);j(this,nt);j(this,Ut);j(this,rt);j(this,He,null);j(this,Pe,null);j(this,it,null);j(this,wt,null);j(this,Ct,null);j(this,Ht,0);j(this,Et,0);j(this,Vt,!1);j(this,Tt,null);j(this,fr,Ta(()=>(R(this,Tt,Lt(h(this,Ht))),()=>{R(this,Tt,null)})));R(this,Ue,t),R(this,nt,n),R(this,Ut,r),this.parent=K.b,R(this,Fe,!!h(this,nt).pending),R(this,rt,nr(()=>{K.b=this;{var i=Y(this,ve,ai).call(this);try{R(this,He,je(()=>r(i)))}catch(o){this.error(o)}h(this,Et)>0?Y(this,ve,_r).call(this):R(this,Fe,!1)}return()=>{var o;(o=h(this,Ct))==null||o.remove()}},Pa))}is_pending(){return h(this,Fe)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!h(this,nt).pending}update_pending_count(t){Y(this,ve,si).call(this,t),R(this,Ht,h(this,Ht)+t),h(this,Tt)&&on(h(this,Tt),h(this,Ht))}get_effect_pending(){return h(this,fr).call(this),l(h(this,Tt))}error(t){var n=h(this,nt).onerror;let r=h(this,nt).failed;if(h(this,Vt)||!n&&!r)throw t;h(this,He)&&(Ee(h(this,He)),R(this,He,null)),h(this,Pe)&&(Ee(h(this,Pe)),R(this,Pe,null)),h(this,it)&&(Ee(h(this,it)),R(this,it,null));var i=!1,o=!1;const s=()=>{if(i){ba();return}i=!0,o&&wa(),ht.ensure(),R(this,Ht,0),h(this,it)!==null&&sn(h(this,it),()=>{R(this,it,null)}),R(this,Fe,this.has_pending_snippet()),R(this,He,Y(this,ve,wr).call(this,()=>(R(this,Vt,!1),je(()=>h(this,Ut).call(this,h(this,Ue)))))),h(this,Et)>0?Y(this,ve,_r).call(this):R(this,Fe,!1)};var u=F;try{Te(null),o=!0,n==null||n(t,s),o=!1}catch(a){nn(a,h(this,rt)&&h(this,rt).parent)}finally{Te(u)}r&&tn(()=>{R(this,it,Y(this,ve,wr).call(this,()=>{ht.ensure(),R(this,Vt,!0);try{return je(()=>{r(h(this,Ue),()=>t,()=>s)})}catch(a){return nn(a,h(this,rt).parent),null}finally{R(this,Vt,!1)}}))})}}Fe=new WeakMap,Ue=new WeakMap,Qr=new WeakMap,nt=new WeakMap,Ut=new WeakMap,rt=new WeakMap,He=new WeakMap,Pe=new WeakMap,it=new WeakMap,wt=new WeakMap,Ct=new WeakMap,Ht=new WeakMap,Et=new WeakMap,Vt=new WeakMap,Tt=new WeakMap,fr=new WeakMap,ve=new WeakSet,lu=function(){try{R(this,He,je(()=>h(this,Ut).call(this,h(this,Ue))))}catch(t){this.error(t)}R(this,Fe,!1)},uu=function(){const t=h(this,nt).pending;t&&(R(this,Pe,je(()=>t(h(this,Ue)))),ht.enqueue(()=>{var n=Y(this,ve,ai).call(this);R(this,He,Y(this,ve,wr).call(this,()=>(ht.ensure(),je(()=>h(this,Ut).call(this,n))))),h(this,Et)>0?Y(this,ve,_r).call(this):(sn(h(this,Pe),()=>{R(this,Pe,null)}),R(this,Fe,!1))}))},ai=function(){var t=h(this,Ue);return h(this,Fe)&&(R(this,Ct,vt()),h(this,Ue).before(h(this,Ct)),t=h(this,Ct)),t},wr=function(t){var n=K,r=F,i=ue;tt(h(this,rt)),Te(h(this,rt)),en(h(this,rt).ctx);try{return t()}catch(o){return gi(o),null}finally{tt(n),Te(r),en(i)}},_r=function(){const t=h(this,nt).pending;h(this,He)!==null&&(R(this,wt,document.createDocumentFragment()),h(this,wt).append(h(this,Ct)),ji(h(this,He),h(this,wt))),h(this,Pe)===null&&R(this,Pe,je(()=>t(h(this,Ue))))},si=function(t){var n;if(!this.has_pending_snippet()){this.parent&&Y(n=this.parent,ve,si).call(n,t);return}R(this,Et,h(this,Et)+t),h(this,Et)===0&&(R(this,Fe,!1),h(this,Pe)&&sn(h(this,Pe),()=>{R(this,Pe,null)}),h(this,wt)&&(h(this,Ue).before(h(this,wt)),R(this,wt,null)))};function rn(e,t){return t}function Da(e,t,n){for(var r=[],i=t.length,o=0;o<i;o++)Br(t[o].e,r,!0);zi(r,()=>{var s=r.length===0&&n!==null;if(s){var u=n,a=u.parentNode;Fa(a),a.append(u),e.items.clear(),$e(e,t[0].prev,t[i-1].next)}for(var d=0;d<i;d++){var v=t[d];s||(e.items.delete(v.k),$e(e,v.prev,v.next)),Ee(v.e,!s)}e.first===t[0]&&(e.first=t[0].prev)})}function Mt(e,t,n,r,i,o=null){var s=e,u=new Map,a=null,d=(t&bn)!==0,v=(t&Q)!==0,p=(t&le)!==0;if(d){var f=e;s=f.appendChild(vt())}var c=null,w=Ar(()=>{var m=n();return yr(m)?m:m==null?[]:kr(m)}),b,_=!0;function k(){Ra(q,b,s,t,r),c!==null&&(b.length===0?(c.fragment?(s.before(c.fragment),c.fragment=null):Mr(c.effect),A.first=c.effect):sn(c.effect,()=>{c=null}))}var A=nr(()=>{b=l(w);for(var m=b.length,E=new Set,P=V,C=null,D=Di(),N=0;N<m;N+=1){var X=b[N],J=r(X,N),L=_?null:u.get(J);L?(v&&on(L.v,X),p?on(L.i,N):L.i=N,D&&P.skipped_effects.delete(L.e)):(L=Wa(_?s:null,C,X,J,N,i,t,n),_&&(L.o=!0,C===null?a=L:C.next=L,C=L),u.set(J,L)),E.add(J)}if(m===0&&o&&!c)if(_)c={fragment:null,effect:je(()=>o(s))};else{var pe=document.createDocumentFragment(),ee=vt();pe.append(ee),c={fragment:pe,effect:je(()=>o(ee))}}if(!_)if(D){for(const[ye,Qe]of u)E.has(ye)||P.skipped_effects.add(Qe.e);P.oncommit(k),P.ondiscard(()=>{})}else k();l(w)}),q={effect:A,items:u,first:a};_=!1}function Ra(e,t,n,r,i){var X,J,L,pe;var o=(r&Uo)!==0,s=t.length,u=e.items,a=e.first,d,v=null,p,f=[],c=[],w,b,_,k;if(o)for(k=0;k<s;k+=1)w=t[k],b=i(w,k),_=u.get(b),(X=_.a)==null||X.measure(),(p??(p=new Set)).add(_);for(k=0;k<s;k+=1){if(w=t[k],b=i(w,k),_=u.get(b),e.first??(e.first=_),!_.o){_.o=!0;var A=v?v.next:a;$e(e,v,_),$e(e,_,A),Ir(_,A,n),v=_,f=[],c=[],a=v.next;continue}if(_.e.f&Ie&&(Mr(_.e),o&&((J=_.a)==null||J.unfix(),(p??(p=new Set)).delete(_))),_!==a){if(d!==void 0&&d.has(_)){if(f.length<c.length){var q=c[0],m;v=q.prev;var E=f[0],P=f[f.length-1];for(m=0;m<f.length;m+=1)Ir(f[m],q,n);for(m=0;m<c.length;m+=1)d.delete(c[m]);$e(e,E.prev,P.next),$e(e,v,E),$e(e,P,q),a=q,v=P,k-=1,f=[],c=[]}else d.delete(_),Ir(_,a,n),$e(e,_.prev,_.next),$e(e,_,v===null?e.first:v.next),$e(e,v,_),v=_;continue}for(f=[],c=[];a!==null&&a.k!==b;)a.e.f&Ie||(d??(d=new Set)).add(a),c.push(a),a=a.next;if(a===null)continue;_=a}f.push(_),v=_,a=_.next}if(a!==null||d!==void 0){for(var C=d===void 0?[]:kr(d);a!==null;)a.e.f&Ie||C.push(a),a=a.next;var D=C.length;if(D>0){var N=r&bn&&s===0?n:null;if(o){for(k=0;k<D;k+=1)(L=C[k].a)==null||L.measure();for(k=0;k<D;k+=1)(pe=C[k].a)==null||pe.fix()}Da(e,C,N)}}o&&tn(()=>{var ee;if(p!==void 0)for(_ of p)(ee=_.a)==null||ee.apply()})}function Wa(e,t,n,r,i,o,s,u){var a=(s&Q)!==0,d=(s&Ho)===0,v=a?d?za(n,!1,!1):Lt(n):n,p=s&le?Lt(i):i,f={i:p,v,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var c=document.createDocumentFragment();c.append(e=vt())}return f.e=je(()=>o(e,v,p,u)),t!==null&&(t.next=f),f}finally{}}function Ir(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,o=e.e.nodes_start;o!==null&&o!==r;){var s=Sn(o);i.before(o),o=s}}function $e(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Na(e,t,n,r){const i=yn()?$n:Ar;if(n.length===0&&e.length===0){r(t.map(i));return}var o=V,s=K,u=Ba();function a(){Promise.all(n.map(d=>Ma(d))).then(d=>{u();try{r([...t.map(i),...d])}catch(v){s.f&ct||nn(v,s)}o==null||o.deactivate(),Xn()}).catch(d=>{nn(d,s)})}e.length>0?Promise.all(e).then(()=>{u();try{return a()}finally{o==null||o.deactivate(),Xn()}}):a()}function Ba(){var e=K,t=F,n=ue,r=V;return function(o=!0){tt(e),Te(t),en(n),o&&(r==null||r.activate())}}function Xn(){tt(null),Te(null),en(null)}function $n(e){var t=ge|Ce,n=F!==null&&F.f&ge?F:null;return K!==null&&(K.f|=Jt),{ctx:ue,deps:null,effects:null,equals:hi,f:t,fn:e,reactions:null,rv:0,v:me,wv:0,parent:n??K,ac:null}}function Ma(e,t){let n=K;n===null&&ua();var r=n.b,i=void 0,o=Lt(me),s=!F,u=new Map;return Ya(()=>{var f;var a=ci();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{d===V&&d.committed&&d.deactivate(),Xn()})}catch(c){a.reject(c),Xn()}var d=V;if(s){var v=!r.is_pending();r.update_pending_count(1),d.increment(v),(f=u.get(d))==null||f.reject(Xt),u.delete(d),u.set(d,a)}const p=(c,w=void 0)=>{if(d.activate(),w)w!==Xt&&(o.f|=bt,on(o,w));else{o.f&bt&&(o.f^=bt),on(o,c);for(const[b,_]of u){if(u.delete(b),b===d)break;_.reject(Xt)}}s&&(r.update_pending_count(-1),d.decrement(v))};a.promise.then(p,c=>p(null,c||"unknown"))}),Wr(()=>{for(const a of u.values())a.reject(Xt)}),new Promise(a=>{function d(v){function p(){v===i?a(o):d(i)}v.then(p,p)}d(i)})}function re(e){const t=$n(e);return Fi(t),t}function Ar(e){const t=$n(e);return t.equals=vi,t}function yi(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ee(t[n])}}function La(e){for(var t=e.parent;t!==null;){if(!(t.f&ge))return t.f&ct?null:t;t=t.parent}return null}function Dr(e){var t,n=K;tt(La(e));try{e.f&=~Rt,yi(e),t=Ki(e)}finally{tt(n)}return t}function ki(e){var t=Dr(e);if(e.equals(t)||(V!=null&&V.is_fork||(e.v=t),e.wv=Vi()),!zt)if(ce!==null)tr()&&ce.set(e,t);else{var n=e.f&Ve?we:ut;be(e,n)}}let Rr=new Set;const yt=new Map;let xi=!1;function Lt(e,t){var n={f:0,v:e,reactions:null,equals:hi,rv:0,wv:0};return n}function G(e,t){const n=Lt(e);return Fi(n),n}function za(e,t=!1,n=!0){var i;const r=Lt(e);return t||(r.equals=vi),$t&&n&&ue!==null&&ue.l!==null&&((i=ue.l).s??(i.s=[])).push(r),r}function g(e,t,n=!1){F!==null&&(!et||F.f&di)&&yn()&&F.f&(ge|st|Tr|di)&&!(ke!=null&&ke.includes(e))&&ma();let r=n?Oe(t):t;return on(e,r)}function on(e,t){if(!e.equals(t)){var n=e.v;zt?yt.set(e,t):yt.set(e,n),e.v=t;var r=ht.ensure();r.capture(e,n),e.f&ge&&(e.f&Ce&&Dr(e),be(e,e.f&Ve?we:ut)),e.wv=Vi(),Ci(e,Ce),yn()&&K!==null&&K.f&we&&!(K.f&(lt|At))&&(qe===null?Ja([e]):qe.push(e)),!r.is_fork&&Rr.size>0&&!xi&&Oa()}return t}function Oa(){xi=!1;var e=kt;rr(!0);const t=Array.from(Rr);try{for(const n of t)n.f&we&&be(n,ut),Tn(n)&&Pn(n)}finally{rr(e)}Rr.clear()}function Si(e,t=1){var n=l(e),r=t===1?n++:n--;return g(e,n),r}function xn(e){g(e,e.v+1)}function Ci(e,t){var n=e.reactions;if(n!==null)for(var r=yn(),i=n.length,o=0;o<i;o++){var s=n[o],u=s.f;if(!(!r&&s===K)){var a=(u&Ce)===0;if(a&&be(s,t),u&ge){var d=s;ce==null||ce.delete(d),u&Rt||(u&Ve&&(s.f|=Rt),Ci(d,ut))}else a&&(u&st&&Ge!==null&&Ge.add(s),Bt(s))}}}function Oe(e){if(typeof e!="object"||e===null||Wt in e)return e;const t=li(e);if(t!==na&&t!==ra)return e;var n=new Map,r=yr(e),i=G(0),o=Ot,s=u=>{if(Ot===o)return u();var a=F,d=Ot;Te(null),Hi(o);var v=u();return Te(a),Hi(d),v};return r&&n.set("length",G(e.length)),new Proxy(e,{defineProperty(u,a,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&pa();var v=n.get(a);return v===void 0?v=s(()=>{var p=G(d.value);return n.set(a,p),p}):g(v,d.value,!0),!0},deleteProperty(u,a){var d=n.get(a);if(d===void 0){if(a in u){const v=s(()=>G(me));n.set(a,v),xn(i)}}else g(d,me),xn(i);return!0},get(u,a,d){var c;if(a===Wt)return e;var v=n.get(a),p=a in u;if(v===void 0&&(!p||(c=Qt(u,a))!=null&&c.writable)&&(v=s(()=>{var w=Oe(p?u[a]:me),b=G(w);return b}),n.set(a,v)),v!==void 0){var f=l(v);return f===me?void 0:f}return Reflect.get(u,a,d)},getOwnPropertyDescriptor(u,a){var d=Reflect.getOwnPropertyDescriptor(u,a);if(d&&"value"in d){var v=n.get(a);v&&(d.value=l(v))}else if(d===void 0){var p=n.get(a),f=p==null?void 0:p.v;if(p!==void 0&&f!==me)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return d},has(u,a){var f;if(a===Wt)return!0;var d=n.get(a),v=d!==void 0&&d.v!==me||Reflect.has(u,a);if(d!==void 0||K!==null&&(!v||(f=Qt(u,a))!=null&&f.writable)){d===void 0&&(d=s(()=>{var c=v?Oe(u[a]):me,w=G(c);return w}),n.set(a,d));var p=l(d);if(p===me)return!1}return v},set(u,a,d,v){var q;var p=n.get(a),f=a in u;if(r&&a==="length")for(var c=d;c<p.v;c+=1){var w=n.get(c+"");w!==void 0?g(w,me):c in u&&(w=s(()=>G(me)),n.set(c+"",w))}if(p===void 0)(!f||(q=Qt(u,a))!=null&&q.writable)&&(p=s(()=>G(void 0)),g(p,Oe(d)),n.set(a,p));else{f=p.v!==me;var b=s(()=>Oe(d));g(p,b)}var _=Reflect.getOwnPropertyDescriptor(u,a);if(_!=null&&_.set&&_.set.call(v,d),!f){if(r&&typeof a=="string"){var k=n.get("length"),A=Number(a);Number.isInteger(A)&&A>=k.v&&g(k,A+1)}xn(i)}return!0},ownKeys(u){l(i);var a=Reflect.ownKeys(u).filter(p=>{var f=n.get(p);return f===void 0||f.v!==me});for(var[d,v]of n)v.v!==me&&!(d in u)&&a.push(d);return a},setPrototypeOf(){ga()}})}function Ei(e){try{if(e!==null&&typeof e=="object"&&Wt in e)return e[Wt]}catch{}return e}function ja(e,t){return Object.is(Ei(e),Ei(t))}var Ti,Pi,Ii,Ai;function qa(){if(Ti===void 0){Ti=window,Pi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ii=Qt(t,"firstChild").get,Ai=Qt(t,"nextSibling").get,ui(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ui(n)&&(n.__t=void 0)}}function vt(e=""){return document.createTextNode(e)}function an(e){return Ii.call(e)}function Sn(e){return Ai.call(e)}function T(e,t){return an(e)}function _e(e,t=!1){{var n=an(e);return n instanceof Comment&&n.data===""?Sn(n):n}}function W(e,t=1,n=!1){let r=e;for(;t--;)r=Sn(r);return r}function Fa(e){e.textContent=""}function Di(){return!1}let Ri=!1;function Ua(){Ri||(Ri=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function er(e){var t=F,n=K;Te(null),tt(null);try{return e()}finally{Te(t),tt(n)}}function Ha(e,t,n,r=n){e.addEventListener(t,()=>er(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ua()}function Va(e){K===null&&(F===null&&fa(),da()),zt&&ca()}function Ga(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function pt(e,t,n){var r=K;r!==null&&r.f&Ie&&(e|=Ie);var i={ctx:ue,deps:null,nodes_start:null,nodes_end:null,f:e|Ce|Ve,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Pn(i),i.f|=Cr}catch(u){throw Ee(i),u}else t!==null&&Bt(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&!(o.f&Jt)&&(o=o.first,e&st&&e&Dt&&o!==null&&(o.f|=Dt)),o!==null&&(o.parent=r,r!==null&&Ga(o,r),F!==null&&F.f&ge&&!(e&At))){var s=F;(s.effects??(s.effects=[])).push(o)}return i}function tr(){return F!==null&&!et}function Wr(e){const t=pt(Sr,null,!1);return be(t,we),t.teardown=e,t}function Cn(e){Va();var t=K.f,n=!F&&(t&lt)!==0&&(t&Cr)===0;if(n){var r=ue;(r.e??(r.e=[])).push(e)}else return Wi(e)}function Wi(e){return pt(xr|oa,e,!1)}function Ka(e){ht.ensure();const t=pt(At|Jt,e,!0);return(n={})=>new Promise(r=>{n.outro?sn(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function Ni(e){return pt(xr,e,!1)}function Ya(e){return pt(Tr|Jt,e,!0)}function Nr(e,t=0){return pt(Sr|t,e,!0)}function B(e,t=[],n=[],r=[]){Na(r,t,n,i=>{pt(Sr,()=>e(...i.map(l)),!0)})}function nr(e,t=0){var n=pt(st|t,e,!0);return n}function je(e){return pt(lt|Jt,e,!0)}function Bi(e){var t=e.teardown;if(t!==null){const n=zt,r=F;qi(!0),Te(null);try{t.call(null)}finally{qi(n),Te(r)}}}function Mi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&er(()=>{i.abort(Xt)});var r=n.next;n.f&At?n.parent=null:Ee(n,t),n=r}}function Za(e){for(var t=e.first;t!==null;){var n=t.next;t.f&lt||Ee(t),t=n}}function Ee(e,t=!0){var n=!1;(t||e.f&fi)&&e.nodes_start!==null&&e.nodes_end!==null&&(Qa(e.nodes_start,e.nodes_end),n=!0),Mi(e,t&&!n),ir(e,0),be(e,ct);var r=e.transitions;if(r!==null)for(const o of r)o.stop();Bi(e);var i=e.parent;i!==null&&i.first!==null&&Li(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Qa(e,t){for(;e!==null;){var n=e===t?null:Sn(e);e.remove(),e=n}}function Li(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 sn(e,t,n=!0){var r=[];Br(e,r,!0),zi(r,()=>{n&&Ee(e),t&&t()})}function zi(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Br(e,t,n){if(!(e.f&Ie)){if(e.f^=Ie,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var r=e.first;r!==null;){var i=r.next,o=(r.f&Dt)!==0||(r.f&lt)!==0&&(e.f&st)!==0;Br(r,t,o?n:!1),r=i}}}function Mr(e){Oi(e,!0)}function Oi(e,t){if(e.f&Ie){e.f^=Ie,e.f&we||(be(e,Ce),Bt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Dt)!==0||(n.f&lt)!==0;Oi(n,i?t:!1),n=r}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}function ji(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:Sn(n);t.append(n),n=i}}let kt=!1;function rr(e){kt=e}let zt=!1;function qi(e){zt=e}let F=null,et=!1;function Te(e){F=e}let K=null;function tt(e){K=e}let ke=null;function Fi(e){F!==null&&(ke===null?ke=[e]:ke.push(e))}let xe=null,Ae=0,qe=null;function Ja(e){qe=e}let Ui=1,En=0,Ot=En;function Hi(e){Ot=e}function Vi(){return++Ui}function Tn(e){var t=e.f;if(t&Ce)return!0;if(t&ge&&(e.f&=~Rt),t&ut){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i];if(Tn(o)&&ki(o),o.wv>e.wv)return!0}t&Ve&&ce===null&&be(e,we)}return!1}function Gi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(ke!=null&&ke.includes(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&ge?Gi(o,t,!1):t===o&&(n?be(o,Ce):o.f&we&&be(o,ut),Bt(o))}}function Ki(e){var w;var t=xe,n=Ae,r=qe,i=F,o=ke,s=ue,u=et,a=Ot,d=e.f;xe=null,Ae=0,qe=null,F=d&(lt|At)?null:e,ke=null,en(e.ctx),et=!1,Ot=++En,e.ac!==null&&(er(()=>{e.ac.abort(Xt)}),e.ac=null);try{e.f|=Er;var v=e.fn,p=v(),f=e.deps;if(xe!==null){var c;if(ir(e,Ae),f!==null&&Ae>0)for(f.length=Ae+xe.length,c=0;c<xe.length;c++)f[Ae+c]=xe[c];else e.deps=f=xe;if(kt&&tr()&&e.f&Ve)for(c=Ae;c<f.length;c++)((w=f[c]).reactions??(w.reactions=[])).push(e)}else f!==null&&Ae<f.length&&(ir(e,Ae),f.length=Ae);if(yn()&&qe!==null&&!et&&f!==null&&!(e.f&(ge|ut|Ce)))for(c=0;c<qe.length;c++)Gi(qe[c],e);return i!==null&&i!==e&&(En++,qe!==null&&(r===null?r=qe:r.push(...qe))),e.f&bt&&(e.f^=bt),p}catch(b){return gi(b)}finally{e.f^=Er,xe=t,Ae=n,qe=r,F=i,ke=o,en(s),et=u,Ot=a}}function Xa(e,t){let n=t.reactions;if(n!==null){var r=$o.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&ge&&(xe===null||!xe.includes(t))&&(be(t,ut),t.f&Ve&&(t.f^=Ve,t.f&=~Rt),yi(t),ir(t,0))}function ir(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Xa(e,n[r])}function Pn(e){var t=e.f;if(!(t&ct)){be(e,we);var n=K,r=kt;K=e,kt=!0;try{t&st?Za(e):Mi(e),Bi(e);var i=Ki(e);e.teardown=typeof i=="function"?i:null,e.wv=Ui;var o;br&&ka&&e.f&Ce&&e.deps}finally{kt=r,K=n}}}async function $a(){await Promise.resolve(),Ca()}function l(e){var t=e.f,n=(t&ge)!==0;if(F!==null&&!et){var r=K!==null&&(K.f&ct)!==0;if(!r&&!(ke!=null&&ke.includes(e))){var i=F.deps;if(F.f&Er)e.rv<En&&(e.rv=En,xe===null&&i!==null&&i[Ae]===e?Ae++:xe===null?xe=[e]:xe.includes(e)||xe.push(e));else{(F.deps??(F.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[F]:o.includes(F)||o.push(F)}}}if(zt){if(yt.has(e))return yt.get(e);if(n){var s=e,u=s.v;return(!(s.f&we)&&s.reactions!==null||Zi(s))&&(u=Dr(s)),yt.set(s,u),u}}else n&&!(ce!=null&&ce.has(e))&&(s=e,Tn(s)&&ki(s),kt&&tr()&&!(s.f&Ve)&&Yi(s));if(ce!=null&&ce.has(e))return ce.get(e);if(e.f&bt)throw e.v;return e.v}function Yi(e){if(e.deps!==null){e.f^=Ve;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&ge&&!(t.f&Ve)&&Yi(t)}}function Zi(e){if(e.v===me)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(yt.has(t)||t.f&ge&&Zi(t))return!0;return!1}function In(e){var t=et;try{return et=!0,e()}finally{et=t}}const es=-7169;function be(e,t){e.f=e.f&es|t}const Qi=new Set,Lr=new Set;function ts(e,t,n,r={}){function i(o){if(r.capture||An.call(t,o),!o.cancelBubble)return er(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?tn(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function gt(e,t,n,r,i){var o={capture:r,passive:i},s=ts(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Wr(()=>{t.removeEventListener(e,s,o)})}function or(e){for(var t=0;t<e.length;t++)Qi.add(e[t]);for(var n of Lr)n(e)}let Ji=null;function An(e){var _;var t=this,n=t.ownerDocument,r=e.type,i=((_=e.composedPath)==null?void 0:_.call(e))||[],o=i[0]||e.target;Ji=e;var s=0,u=Ji===e&&e.__root;if(u){var a=i.indexOf(u);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var d=i.indexOf(t);if(d===-1)return;a<=d&&(s=a)}if(o=i[s]||e.target,o!==t){ea(e,"currentTarget",{configurable:!0,get(){return o||n}});var v=F,p=K;Te(null),tt(null);try{for(var f,c=[];o!==null;){var w=o.assignedSlot||o.parentNode||o.host||null;try{var b=o["__"+r];b!=null&&(!o.disabled||e.target===o)&&b.call(o,e)}catch(k){f?c.push(k):f=k}if(e.cancelBubble||w===t||w===null)break;o=w}if(f){for(let k of c)queueMicrotask(()=>{throw k});throw f}}finally{e.__root=t,delete e.currentTarget,Te(v),tt(p)}}}function Xi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Dn(e,t){var n=K;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function M(e,t){var n=(t&Qo)!==0,r=(t&Jo)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Xi(o?e:"<!>"+e),n||(i=an(i)));var s=r||Pi?document.importNode(i,!0):i.cloneNode(!0);if(n){var u=an(s),a=s.lastChild;Dn(u,a)}else Dn(s,s);return s}}function ns(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,o;return()=>{if(!o){var s=Xi(i),u=an(s);o=an(u)}var a=o.cloneNode(!0);return Dn(a,a),a}}function ar(e,t){return ns(e,t,"svg")}function xt(e=""){{var t=vt(e+"");return Dn(t,t),t}}function Ke(){var e=document.createDocumentFragment(),t=document.createComment(""),n=vt();return e.append(t,n),Dn(t,n),e}function x(e,t){e!==null&&e.before(t)}const rs=["touchstart","touchmove"];function is(e){return rs.includes(e)}function O(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function os(e,t){return as(e,t)}const ln=new Map;function as(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0}){qa();var u=new Set,a=p=>{for(var f=0;f<p.length;f++){var c=p[f];if(!u.has(c)){u.add(c);var w=is(c);t.addEventListener(c,An,{passive:w});var b=ln.get(c);b===void 0?(document.addEventListener(c,An,{passive:w}),ln.set(c,1)):ln.set(c,b+1)}}};a(kr(Qi)),Lr.add(a);var d=void 0,v=Ka(()=>{var p=n??t.appendChild(vt());return Ia(p,{pending:()=>{}},f=>{if(o){dt({});var c=ue;c.c=o}i&&(r.$$events=i),d=e(f,r)||{},o&&ft()}),()=>{var w;for(var f of u){t.removeEventListener(f,An);var c=ln.get(f);--c===0?(document.removeEventListener(f,An),ln.delete(f)):ln.set(f,c)}Lr.delete(a),p!==n&&((w=p.parentNode)==null||w.removeChild(p))}});return ss.set(d,v),d}let ss=new WeakMap;class $i{constructor(t,n=!0){at(this,"anchor");j(this,Ye,new Map);j(this,ot,new Map);j(this,Ne,new Map);j(this,Gt,new Set);j(this,Mn,!0);j(this,Ln,()=>{var t=V;if(h(this,Ye).has(t)){var n=h(this,Ye).get(t),r=h(this,ot).get(n);if(r)Mr(r),h(this,Gt).delete(n);else{var i=h(this,Ne).get(n);i&&(h(this,ot).set(n,i.effect),h(this,Ne).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of h(this,Ye)){if(h(this,Ye).delete(o),o===t)break;const u=h(this,Ne).get(s);u&&(Ee(u.effect),h(this,Ne).delete(s))}for(const[o,s]of h(this,ot)){if(o===n||h(this,Gt).has(o))continue;const u=()=>{if(Array.from(h(this,Ye).values()).includes(o)){var d=document.createDocumentFragment();ji(s,d),d.append(vt()),h(this,Ne).set(o,{effect:s,fragment:d})}else Ee(s);h(this,Gt).delete(o),h(this,ot).delete(o)};h(this,Mn)||!r?(h(this,Gt).add(o),sn(s,u,!1)):u()}}});j(this,hr,t=>{h(this,Ye).delete(t);const n=Array.from(h(this,Ye).values());for(const[r,i]of h(this,Ne))n.includes(r)||(Ee(i.effect),h(this,Ne).delete(r))});this.anchor=t,R(this,Mn,n)}ensure(t,n){var r=V,i=Di();if(n&&!h(this,ot).has(t)&&!h(this,Ne).has(t))if(i){var o=document.createDocumentFragment(),s=vt();o.append(s),h(this,Ne).set(t,{effect:je(()=>n(s)),fragment:o})}else h(this,ot).set(t,je(()=>n(this.anchor)));if(h(this,Ye).set(r,t),i){for(const[u,a]of h(this,ot))u===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[u,a]of h(this,Ne))u===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(h(this,Ln)),r.ondiscard(h(this,hr))}else h(this,Ln).call(this)}}Ye=new WeakMap,ot=new WeakMap,Ne=new WeakMap,Gt=new WeakMap,Mn=new WeakMap,Ln=new WeakMap,hr=new WeakMap;function zr(e){ue===null&&la(),$t&&ue.l!==null?ls(ue).m.push(e):Cn(()=>{const t=In(e);if(typeof t=="function")return t})}function ls(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function U(e,t,n=!1){var r=new $i(e),i=n?Dt:0;function o(s,u){r.ensure(s,u)}nr(()=>{var s=!1;t((u,a=!0)=>{s=!0,o(a,u)}),s||o(!1,null)},i)}function eo(e,t,n,r,i){var u;var o=(u=t.$$slots)==null?void 0:u[n],s=!1;o===!0&&(o=t.children,s=!0),o===void 0||o(e,s?()=>r:r)}function to(e,t,n){var r=new $i(e);nr(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Dt)}function mt(e,t){Ni(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function no(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=no(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function us(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=no(e))&&(r&&(r+=" "),r+=t);return r}function un(e){return typeof e=="object"?us(e):e??""}function cs(e,t,n){var r=e==null?"":""+e;return t&&(r=r?r+" "+t:t),r===""?null:r}function St(e,t,n,r,i,o){var s=e.__className;if(s!==n||s===void 0){var u=cs(n,r);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=n}return o}function ro(e,t,n=!1){if(e.multiple){if(t==null)return;if(!yr(t))return _a();for(var r of e.options)r.selected=t.includes(io(r));return}for(r of e.options){var i=io(r);if(ja(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ds(e){var t=new MutationObserver(()=>{ro(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Wr(()=>{t.disconnect()})}function io(e){return"__value"in e?e.__value:e.value}const fs=Symbol("is custom element"),hs=Symbol("is html");function vs(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function de(e,t,n,r){var i=ps(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[sa]=n),n==null?e.removeAttribute(t):typeof n!="string"&&gs(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ps(e){return e.__attributes??(e.__attributes={[fs]:e.nodeName.includes("-"),[hs]:e.namespaceURI===Xo})}var oo=new Map;function gs(e){var t=e.getAttribute("is")||e.nodeName,n=oo.get(t);if(n)return n;oo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=ta(i);for(var s in r)r[s].set&&n.push(s);i=li(i)}return n}function ms(e,t,n=t){var r=new WeakSet;Ha(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=Or(e)?jr(o):o,n(o),V!==null&&r.add(V),await $a(),o!==(o=t())){var s=e.selectionStart,u=e.selectionEnd,a=e.value.length;if(e.value=o??"",u!==null){var d=e.value.length;s===u&&u===a&&d>a?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=s,e.selectionEnd=Math.min(u,d))}}}),In(t)==null&&e.value&&(n(Or(e)?jr(e.value):e.value),V!==null&&r.add(V)),Nr(()=>{var i=t();if(e===document.activeElement){var o=Qn??V;if(r.has(o))return}Or(e)&&i===jr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Or(e){var t=e.type;return t==="number"||t==="range"}function jr(e){return e===""?null:+e}function ao(e,t){return e===t||(e==null?void 0:e[Wt])===t}function ws(e={},t,n,r){return Ni(()=>{var i,o;return Nr(()=>{i=o,o=[],In(()=>{e!==n(...o)&&(t(e,...o),i&&ao(n(...i),e)&&t(null,...i))})}),()=>{tn(()=>{o&&ao(n(...o),e)&&t(null,...o)})}}),e}let sr=!1;function _s(e){var t=sr;try{return sr=!1,[e(),sr]}finally{sr=t}}function De(e,t,n,r){var q;var i=!$t||(n&Go)!==0,o=(n&Yo)!==0,s=(n&Zo)!==0,u=r,a=!0,d=()=>(a&&(a=!1,u=s?In(r):r),u),v;if(o){var p=Wt in e||aa in e;v=((q=Qt(e,t))==null?void 0:q.set)??(p&&t in e?m=>e[t]=m:void 0)}var f,c=!1;o?[f,c]=_s(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=d(),v&&(i&&va(),v(f)));var w;if(i?w=()=>{var m=e[t];return m===void 0?d():(a=!0,m)}:w=()=>{var m=e[t];return m!==void 0&&(u=void 0),m===void 0?u:m},i&&!(n&Ko))return w;if(v){var b=e.$$legacy;return function(m,E){return arguments.length>0?((!i||!E||b||c)&&v(E?w():m),m):w()}}var _=!1,k=(n&Vo?$n:Ar)(()=>(_=!1,w()));o&&l(k);var A=K;return function(m,E){if(arguments.length>0){const P=E?l(k):i&&o?Oe(m):m;return g(k,P),_=!0,u!==void 0&&(u=P),m}return zt&&_||A.f&ct?k.v:l(k)}}const so="wineater_consent",bs=["wineater_uid","uniqueUserID","sessionID"];function ys(){try{const e=window.localStorage.getItem(so);return e==="granted"||e==="denied"?e:null}catch{return null}}let qr=G(Oe(ys())),lr=G(null);function ks(e){g(lr,e,!0)}function lo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:l(lr)===!0}function xs(){return l(lr)!==null&&lo()&&l(qr)===null}function uo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1||l(lr)===null?!1:lo()?l(qr)==="granted":!0}function Ss(){for(const e of bs){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const Fr=new Set;function Cs(e){return Fr.add(e),()=>Fr.delete(e)}function co(e){g(qr,e,!0);try{window.localStorage.setItem(so,e)}catch{}e==="denied"&&Ss();for(const t of Fr)t(e)}function fo(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Ur(e,t,n){let r="";if(n){const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),r="; expires="+i.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/; secure; samesite=strict"}function Hr(e){const t=e+"=",n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function Es(){const e="uniqueUserID";let t=Hr(e);return t||(t=fo(),Ur(e,t,365)),t}function Re(e,t,n={},r={}){const i="https://admin-api.wineater.com/api/widget-events",o=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!uo()){const f={event_type:e,store_id:t,event_time:o,data:n,meta:{...r,anonymous:!0},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0}).catch(c=>{console.debug("[wineater] anonymous event failed:",c==null?void 0:c.message)})}let a=Hr("uniqueUserID");a||(a=Es());const d={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let v=Hr("sessionID");v||(v=fo(),Ur("sessionID",v,1));const p={event_type:e,store_id:t,session_id:v,event_time:o,data:n,meta:{...r,user_id:a},device_info:d,region:s,language:u};return fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then(f=>f.ok?f.json():f.json().then(c=>{throw new Error(c.message||"Failed to track widget event")})).catch(f=>{throw console.error("Widget event tracking error:",f),f})}function Ts(e){return{id:String(e.ID),appellation:e.Appellation||null,country:e.Country||null,grape:e.Grape,image:e.Image,price:Number(e.Price),producer:e.Producer||null,region:e.Region,score:e.Score?Number(e.Score):null,shortDescription:e["Short Description"]||null,store:e.Store,storeId:e.Store_id||null,tags:Array.isArray(e.Tags)?e.Tags.map(String):[],title:e.Title,type:e.Type,url:e.Url||null,vintage:e.Vintage?Number(e.Vintage):null,pairingRecommendation:e.pairing_recommendation||null,total:e.Total?Number(e.Total):null,itemId:e.item_id||null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Vr(e){return{id:String(e.id),title:String(e.title),description:String(e.description),region:String(e.region),price:Number(e.price),grape:String(e.grape),appellation:e.appellation?String(e.appellation):null,url:e.url?String(e.url):null,store:String(e.store),storeId:e.storeId?String(e.storeId):null,image:String(e.image),country:e.country?String(e.country):null,vintage:e.vintage?Number(e.vintage):null,tags:Array.isArray(e.tags)?e.tags.map(String):[],score:e.score?Number(e.score):null,total:e.total?Number(e.total):null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,distance:Number(e.distance),reason:String(e.reason),type:String(e.type),byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Ps(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Vr),hasMore:!!e.has_more}}const Rn="wineater_uid",Is=365;let ur=null;function ho(){const e=globalThis.crypto;if(e!=null&&e.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(e!=null&&e.getRandomValues)e.getRandomValues(t);else for(let r=0;r<16;r++)t[r]=Math.random()*256|0;t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const vo=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function po(e){try{const t=e+"=";for(const n of document.cookie.split(";")){const r=n.trim();if(r.startsWith(t))return decodeURIComponent(r.slice(t.length))}}catch{}return null}function As(e,t){try{const n=new Date(Date.now()+Is*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function go(){return uo()}Cs(e=>{e==="denied"&&(ur=null)});function Gr(){if(!go())return null;if(ur)return ur;let e=null;try{e=window.localStorage.getItem(Rn)}catch{}(!e||!vo.test(e))&&(e=po(Rn)),(!e||!vo.test(e))&&(e=ho());try{window.localStorage.setItem(Rn,e)}catch{}return po(Rn)!==e&&As(Rn,e),ur=e,e}function mo(){return ho()}const Ds=2e3,wo=100;let cr=null,cn=[],Wn=null,_o=!1;function Rs(e){cr=e,!(_o||typeof document>"u")&&(_o=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Nn()}),window.addEventListener("pagehide",()=>void Nn()))}function dn(e){var t;if(!(!go()||!cr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(cn.push(e),cn.length>=wo){Nn();return}Wn||(Wn=setTimeout(()=>void Nn(),Ds))}}async function Nn(){if(Wn&&(clearTimeout(Wn),Wn=null),!cr||cn.length===0)return;const e=Gr();if(!e){cn=[];return}const t=cn.splice(0,wo);try{await cr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}cn.length>0&&Nn()}const Ws="X-Wineater-Uid";class Ns{constructor(t,n="1"){j(this,Ze);j(this,zn,"https://api.wineater.com/");j(this,On);j(this,mn);j(this,wn,!1);R(this,On,t),R(this,mn,n)}async getInstantRecommendations(){try{const t=h(this,mn)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant";return(await Y(this,Ze,Zt).call(this,t,{})).filter(Boolean).map(Ts)}catch(t){throw new Error(`Error in getInstantRecommendations: ${t.message}`)}}async getWineRecommendationsSearch(t,n){try{const r=h(this,mn)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search";return(await Y(this,Ze,Zt).call(this,r,n?{text:t,query_id:n}:{text:t})).filter(Boolean).map(Vr)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async getMoreWineRecommendations(t,n){try{const r=await Y(this,Ze,Zt).call(this,"dish/recommendations/search/v2/more",{text:t,exclude_ids:n});return Ps(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await Y(this,Ze,Zt).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Vr)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await Y(this,Ze,Zt).call(this,"events",t,{keepalive:!0})}async getStoreConfig(){try{return await Y(this,Ze,Zt).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}zn=new WeakMap,On=new WeakMap,mn=new WeakMap,wn=new WeakMap,Ze=new WeakSet,Fo=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${h(this,On)}`};if(!h(this,wn)){const n=Gr();n&&(t[Ws]=n)}return t},Zt=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:Y(this,Ze,Fo).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${h(this,zn)}${t}`,i())}catch(a){if(h(this,wn)||!Gr())throw a;R(this,wn,!0),o=await fetch(`${h(this,zn)}${t}`,i())}const s=await o.text(),u=s?JSON.parse(s):null;if(!o.ok)throw new Error(`API call failed with status ${o.status}: ${(u==null?void 0:u.message)||"No additional error information"}`);return u};const bo=((Do=window==null?void 0:window.wineaterData)==null?void 0:Do.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",Kr=String(((Ro=window==null?void 0:window.wineaterData)==null?void 0:Ro.apiVersion)||"1"),fn=new Ns(bo,Kr);Rs(e=>fn.postEvents(e));function Bs(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}const yo=`${Bs(bo)}:${Kr}`,ko="wineater:v1:";function xo(e,t){try{const n=window.localStorage.getItem(ko+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function So(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(ko+e,JSON.stringify(n))}catch{}}const We={WIDGET_INITIALIZED:"widget_initialized",WIDGET_LOADED:"widget_loaded",SEARCH_PERFORMED:"search_performed",SEARCH_RESULTS_DISPLAYED:"search_results_displayed",NO_RESULTS_FOUND:"no_results_found",WINE_CARD_HOVER:"wine_card_hover",WINE_CARD_CLICK:"wine_card_click",WINE_DETAILS_VIEWED:"wine_details_viewed",WINE_DETAILS_CLOSED:"wine_details_closed",BUY_BUTTON_CLICKED:"buy_button_clicked",SHOW_MORE_CLICKED:"show_more_clicked",SIMILAR_WINES_CLICKED:"similar_wines_clicked",FILTER_APPLIED:"filter_applied",LANGUAGE_CHANGED:"language_changed",ERROR_OCCURRED:"error_occurred",MOBILE_VIEW_ACTIVATED:"mobile_view_activated"},Ms={fr:{lang:"fr",welcomeMessage:"Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",noResultsFound:"Aucun résultat trouvé.",somethingWentWrong:"Désolé, quelque chose a mal tourné.",chatButton1:"Trouvez l'accord parfait",chatButton2:"Associez le vin",chatButton3:"Obtenez des conseils",chatTitle:"Accord Mets & Vins 🍷",chatSubtitle:"Décrivez votre plat et obtenez une recommandation en 30 secondes",inputPlaceholder:"ex., Salade de thon",sendButton:"Accorder",poweredBy:"Propulsé par",price:"Prix",region:"Région",type:"Type",reason:"Suggestion",moreInfo:"Plus d'infos",tryAgain:"Réessayer",similarWines:"Vins similaires",byTheGlass:"Au verre",winePairingIntro:"Pour ce vin, voici quelques suggestions de plats :",askForDinner:"Que voulez-vous manger ce soir?",clearChatButton:"Effacer le chat",widgetTitle:"TROUVEZ VOTRE VIN PARFAIT",widgetSubtitle:"Partagez tout ce que vous avez en tête—votre repas, humeur, budget ou occasion—et notre sommelier IA vous recommandera le vin parfait en quelques secondes",searchPlaceholder:"Entrez un mot-clé ou une description","wineDetails.reason":"Raison","wineDetails.price":"Prix","wineDetails.region":"Région","wineDetails.type":"Type","wineDetails.moreInfo":"Plus d'infos","wineDetails.code":"Code","wineDetails.buy":"Acheter",searchButton:"Rechercher",priceRange:"Gamme de prix",wineColor:"Couleur du vin",intensity:"Intensité",red:"Rouge",white:"Blanc",rose:"Rosé",light:"Léger",medium:"Moyen",full:"Puissant",barTitle:"Sélection du bar",barSubtitle:"Choisissez vos plats ci-dessous et cliquez sur «Envoyer»",barSendButton:"Envoyer",barResetButton:"Réinitialiser",barName:"Nom du bar",barNotesPlaceholder:"Entrez vos souhaits ici...",placeholderSuggestions:["Vin pour les pâtes","Parfait avec du poisson","Recommandé pour une soirée"],headerLine1:"Partagez tout ce qui vous passe par la tête —",headerLine2:"— et obtenez des recommandations de vin parfait en quelques secondes",headerMeal:"repas",headerMood:"humeur",headerBudget:"budget",headerOccasion:"occasion",headerOr:"ou",errorMessage:"Une erreur est survenue. Veuillez réessayer plus tard.",noResultsMessage:"Aucun résultat trouvé pour votre recherche. Veuillez essayer une autre requête.",ai_sommelier:"AI sommelier",consentText:"L'assistant vin enregistre un identifiant anonyme sur cet appareil pour apprendre vos goûts et améliorer ses recommandations. Vous pouvez l'utiliser sans accepter.",consentAccept:"Accepter",consentDecline:"Refuser",consentPrivacy:"Politique de confidentialité"},es:{lang:"es",welcomeMessage:"¿Qué vas a comer? Cuéntame tu plato y te recomendaré el maridaje perfecto.",noResultsFound:"No se encontraron resultados.",somethingWentWrong:"Lo sentimos, algo salió mal.",chatButton1:"Encuentra tu maridaje",chatButton2:"Combina vino ya",chatButton3:"Recibe asesoría ahora",chatTitle:"Maridaje de Vinos 🍷",chatSubtitle:"Describe tu comida y obtén una recomendación en 30 segundos",inputPlaceholder:"ej., Ensalada de atún",sendButton:"Combinar",poweredBy:"Desarrollado por",price:"Precio",region:"Región",type:"Tipo",reason:"Sugerencia",moreInfo:"Más info",tryAgain:"Probar otra vez",similarWines:"Vinos similares",byTheGlass:"Por copa",winePairingIntro:"Para este vino, aquí tienes algunas sugerencias de platos:",askForDinner:"¿Qué te gustaría cenar?",clearChatButton:"Limpiar el chat",widgetTitle:"ENCUENTRA TU VINO PERFECTO",widgetSubtitle:"Comparte cualquier cosa que tengas en mente—tu comida, estado de ánimo, presupuesto o evento—y nuestro sommelier de IA te recomendará el vino perfecto en segundos",searchPlaceholder:"Escribe una palabra clave o descripción","wineDetails.reason":"Razón","wineDetails.price":"Precio","wineDetails.region":"Región","wineDetails.type":"Tipo","wineDetails.code":"Código","wineDetails.moreInfo":"Más información","wineDetails.buy":"Comprar",searchButton:"Buscar",priceRange:"Rango de precios",wineColor:"Color del vino",intensity:"Intensidad",red:"Tinto",white:"Blanco",rose:"Rosado",light:"Ligero",medium:"Medio",full:"Intenso",barTitle:"Platos de Bar",barSubtitle:"Selecciona de la lista y presiona «Enviar»",barSendButton:"Enviar",barResetButton:"Reiniciar",barName:"Nombre del bar",barNotesPlaceholder:"Agrega tus comentarios aquí...",placeholderSuggestions:["Vino para pasta","Perfecto con pescado","Recomendado para una fiesta"],headerLine1:"Comparte cualquier cosa que tengas en mente —",headerLine2:"— y obtén recomendaciones del vino perfecto en cuestión de segundos",headerMeal:"comida",headerMood:"estado de ánimo",headerBudget:"presupuesto",headerOccasion:"ocasión",headerOr:"o",errorMessage:"Algo salió mal. Por favor, inténtalo de nuevo más tarde.",noResultsMessage:"No se encontraron resultados para tu búsqueda. Por favor, intenta con otra consulta.",ai_sommelier:"AI sommelier",consentText:"El asistente de vinos guarda un identificador anónimo en este dispositivo para conocer tus gustos y mejorar las recomendaciones. Puedes usarlo sin aceptar.",consentAccept:"Aceptar",consentDecline:"Rechazar",consentPrivacy:"Política de privacidad"},en:{lang:"en",welcomeMessage:"What are you planning to eat? Share your dish and I'll recommend the perfect wine pairing for your meal.",noResultsFound:"No results found.",somethingWentWrong:"Sorry, something went wrong.",chatButton1:"Find Your Pairing",chatButton2:"Pair Wine Now",chatButton3:"Get Wine Advice",chatTitle:"Wine Pairing Assistant 🍷",chatSubtitle:"Describe your meal and get a recommendation in 30 seconds",inputPlaceholder:"e.g., Tuna salad",sendButton:"Match",poweredBy:"Powered by",price:"Price",region:"Region",type:"Type",reason:"Suggestion",moreInfo:"More info",tryAgain:"Try again",similarWines:"Similar wines",byTheGlass:"By the glass",winePairingIntro:"For this wine, here are some suggested dishes:",askForDinner:"What would you like to have for dinner?",clearChatButton:"Clear Chat",widgetTitle:"FIND YOUR PERFECT WINE",widgetSubtitle:"Share anything on your mind—your meal, mood, budget, or occasion—and our AI sommelier will recommend the perfect wine in seconds",searchPlaceholder:"Enter a keyword or description","wineDetails.price":"Price","wineDetails.region":"Region","wineDetails.type":"Type","wineDetails.moreInfo":"More info","wineDetails.reason":"Reason","wineDetails.code":"Code","wineDetails.buy":"Buy",searchButton:"Search",priceRange:"Price Range",wineColor:"Wine Color",intensity:"Intensity",red:"Red",white:"White",rose:"Rosé",light:"Light",medium:"Medium",full:"Full",barTitle:"Bar Dishes",barSubtitle:"Select dishes below and click 'Send'",barSendButton:"Send",barResetButton:"Reset",barName:"Bar Name",barNotesPlaceholder:"Add your wishes here...",placeholderSuggestions:["Wine for pasta","Perfect with fish","Recommended for a party"],headerLine1:"Share anything on your mind —",headerLine2:"— and get recommendations of the perfect wine in seconds",headerMeal:"meal",headerMood:"mood",headerBudget:"budget",headerOccasion:"occasion",headerOr:"or",errorMessage:"Something went wrong. Please try again later.",noResultsMessage:"No results found for your search. Please try a different query.",ai_sommelier:"AI sommelier",consentText:"The wine assistant stores an anonymous identifier on this device to learn your taste and improve recommendations. You can use it without accepting.",consentAccept:"Accept",consentDecline:"Decline",consentPrivacy:"Privacy policy"},sr:{lang:"sr",welcomeMessage:"Šta planirate da jedete? Podelite svoje jelo i preporučiću vam savršeno vino uz obrok.",noResultsFound:"Nema rezultata.",somethingWentWrong:"Izvinite, nešto je pošlo po zlu.",chatButton1:"Pronađi vino",chatButton2:"Upari vino sada",chatButton3:"Zatraži preporuku",chatTitle:"Asistent za uparivanje vina 🍷",chatSubtitle:"Opišite svoj obrok i dobijte preporuku za 30 sekundi",inputPlaceholder:"npr. Tuna salata",sendButton:"Upari",poweredBy:"Pokreće",price:"Cena",region:"Regija",type:"Tip",reason:"Preporuka",moreInfo:"Više informacija",tryAgain:"Pokušaj ponovo",similarWines:"Slična vina",byTheGlass:"Na čašu",winePairingIntro:"Za ovo vino, preporučuju se sledeća jela:",askForDinner:"Šta biste želeli za večeru?",clearChatButton:"Obriši razgovor",widgetTitle:"PRONAĐITE SAVRŠENO VINO",widgetSubtitle:"Podelite bilo šta — obrok, raspoloženje, budžet ili priliku — i naš AI somelijer će vam za par sekundi preporučiti vino",searchPlaceholder:"Unesite ključnu reč ili opis","wineDetails.price":"Cena","wineDetails.region":"Regija","wineDetails.type":"Tip","wineDetails.moreInfo":"Više informacija","wineDetails.reason":"Razlog","wineDetails.code":"Šifra","wineDetails.buy":"Kupi",searchButton:"Pretraga",priceRange:"Cenovni raspon",wineColor:"Boja vina",intensity:"Intenzitet",red:"Crveno",white:"Belo",rose:"Roze",light:"Lako",medium:"Srednje",full:"Puno",barTitle:"Jela iz bara",barSubtitle:"Izaberite jela ispod i kliknite 'Pošalji'",barSendButton:"Pošalji",barResetButton:"Resetuj",barName:"Naziv bara",barNotesPlaceholder:"Dodajte svoje želje ovde...",placeholderSuggestions:["Vino uz pastu","Savršeno uz ribu","Preporuka za žurku"],headerLine1:"Podelite bilo šta što vam je na umu —",headerLine2:"— i dobijte preporuke za savršeno vino za par sekundi",headerMeal:"obrok",headerMood:"raspoloženje",headerBudget:"budžet",headerOccasion:"prilika",headerOr:"ili",errorMessage:"Nešto je pošlo po zlu. Molimo pokušajte ponovo kasnije.",noResultsMessage:"Nema rezultata za vašu pretragu. Molimo pokušajte sa drugačijim upitom.",ai_sommelier:"AI sommelier",consentText:"Vinski asistent čuva anonimni identifikator na ovom uređaju kako bi upoznao vaš ukus i poboljšao preporuke. Možete ga koristiti i bez prihvatanja.",consentAccept:"Prihvati",consentDecline:"Odbij",consentPrivacy:"Politika privatnosti"},de:{lang:"de",welcomeMessage:"Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",noResultsFound:"Keine Ergebnisse gefunden.",somethingWentWrong:"Entschuldigung, etwas ist schief gelaufen.",chatButton1:"Finde Dein Pairing",chatButton2:"Wein jetzt wählen",chatButton3:"Erhalte Weinberatung",chatTitle:"Wein & Speisen 🍷",chatSubtitle:"Beschreiben Sie Ihr Gericht und erhalten Sie in 30 Sekunden eine Empfehlung",inputPlaceholder:"z.B., Thunfischsalat",sendButton:"Kombinieren",poweredBy:"Unterstützt von",price:"Preis",region:"Region",type:"Typ",reason:"Anregung",moreInfo:"Mehr Info",tryAgain:"Nochmal versuchen",similarWines:"Ähnliche Weine",byTheGlass:"Glasweise",winePairingIntro:"Für diesen Wein gibt es folgende Essensvorschläge:",askForDinner:"Was möchten Sie zum Abendessen essen?",clearChatButton:"Chat löschen",widgetTitle:"FINDEN SIE IHREN PERFEKTEN WEIN",widgetSubtitle:"Teilen Sie alles, was Ihnen in den Sinn kommt—Ihre Mahlzeit, Stimmung, Ihr Budget oder Anlass—und unser KI-Sommelier empfiehlt Ihnen in Sekunden den perfekten Wein",placeholderSuggestions:["Wein für Pasta","Perfekt zu Fisch","Empfohlen für eine Party"],searchPlaceholder:"Geben Sie ein Stichwort oder eine Beschreibung ein","wineDetails.price":"Preis","wineDetails.region":"Region","wineDetails.type":"Typ","wineDetails.moreInfo":"Mehr Info","wineDetails.reason":"Grund","wineDetails.code":"Code","wineDetails.buy":"Kaufen",searchButton:"Suche",priceRange:"Preisspanne",wineColor:"Weinfarbe",intensity:"Intensität",red:"Rot",white:"Weiß",rose:"Rosé",light:"Leicht",medium:"Mittel",full:"Voll",barTitle:"Bar-Auswahl",barSubtitle:"Wählen Sie Ihre Gerichte und klicken Sie auf 'Senden'",barSendButton:"Senden",barResetButton:"Zurücksetzen",barName:"Name der Bar",headerLine1:"Teilen Sie alles, was Ihnen durch den Kopf geht —",headerLine2:"— und erhalten Sie in Sekundenschnelle Empfehlungen für den perfekten Wein",headerMeal:"Mahlzeit",headerMood:"Stimmung",headerBudget:"Budget",headerOccasion:"Anlass",headerOr:"oder",errorMessage:"Etwas ist schief gelaufen. Bitte versuchen Sie es später erneut.",noResultsMessage:"Keine Ergebnisse für Ihre Suche gefunden. Bitte versuchen Sie es mit einer anderen Anfrage.",ai_sommelier:"AI sommelier",consentText:"Der Weinassistent speichert eine anonyme Kennung auf diesem Gerät, um Ihren Geschmack kennenzulernen und Empfehlungen zu verbessern. Sie können ihn auch ohne Zustimmung nutzen.",consentAccept:"Akzeptieren",consentDecline:"Ablehnen",consentPrivacy:"Datenschutzerklärung"},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",tryAgain:"Спробувати ще",similarWines:"Схожі вина",byTheGlass:"На келих",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис","wineDetails.reason":"Причина","wineDetails.price":"Ціна","wineDetails.region":"Регіон","wineDetails.type":"Тип","wineDetails.moreInfo":"Докладніше","wineDetails.code":"Код","wineDetails.buy":"Купити",searchButton:"Пошук",priceRange:"Діапазон цін",wineColor:"Колір вина",intensity:"Інтенсивність",red:"Червоне",white:"Біле",rose:"Рожеве",light:"Легке",medium:"Середнє",full:"Повне",barTitle:"Закуски до вина",barSubtitle:"Виберіть страви нижче та натисніть «Надіслати»",barSendButton:"Надіслати",barResetButton:"Скинути",barName:"Назва бару",barNotesPlaceholder:"Додайте ваші побажання тут...",placeholderSuggestions:["Вино до пасти","Ідеально до риби","Рекомендуємо для вечірки"],headerLine1:"Поділіться будь-якими вашими думками —",headerLine2:"— і отримайте рекомендації щодо ідеального вина за секунди",headerMeal:"страва",headerMood:"настрій",headerBudget:"бюджет",headerOccasion:"подія",headerOr:"або",errorMessage:"Щось пішло не так. Будь ласка, спробуйте пізніше.",noResultsMessage:"За вашим запитом не знайдено результатів. Спробуйте інший запит.",ai_sommelier:"AI sommelier",consentText:"Винний помічник зберігає на цьому пристрої анонімний ідентифікатор, щоб враховувати ваш смак і покращувати рекомендації. Користуватися можна й без згоди.",consentAccept:"Прийняти",consentDecline:"Відхилити",consentPrivacy:"Політика конфіденційності"},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",tryAgain:"Попробовать ещё",similarWines:"Похожие вина",byTheGlass:"По бокалам",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЬ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание","wineDetails.price":"Цена","wineDetails.region":"Регион","wineDetails.type":"Тип","wineDetails.moreInfo":"Подробнее","wineDetails.reason":"Причина","wineDetails.code":"Код","wineDetails.buy":"Купить",searchButton:"Поиск",priceRange:"Диапазон цен",wineColor:"Цвет вина",intensity:"Интенсивность",red:"Красное",white:"Белое",rose:"Розовое",light:"Лёгкое",medium:"Среднее",full:"Полное",barTitle:"Закуски к вину",barSubtitle:"Выберите блюда ниже и нажмите 'Отправить'",barSendButton:"Отправить",barResetButton:"Сбросить",barName:"Название бара",barNotesPlaceholder:"Добавьте ваши пожелания здесь...",placeholderSuggestions:["Вино для пасты","Идеально к рыбе","Рекомендуем для вечеринки"],headerLine1:"Поделитесь любыми вашими мыслями —",headerLine2:"— и получите рекомендации по идеальному вину за считанные секунды",headerMeal:"блюдо",headerMood:"настроение",headerBudget:"бюджет",headerOccasion:"случай",headerOr:"или",errorMessage:"Что-то пошло не так. Пожалуйста, попробуйте позже.",noResultsMessage:"По вашему запросу не найдено результатов. Попробуйте другой запрос.",ai_sommelier:"AI sommelier",consentText:"Винный помощник сохраняет на этом устройстве анонимный идентификатор, чтобы учитывать ваш вкус и улучшать рекомендации. Пользоваться можно и без согласия.",consentAccept:"Принять",consentDecline:"Отклонить",consentPrivacy:"Политика конфиденциальности"},kk:{lang:"kk",welcomeMessage:"Сіз не жегіңіз келеді? Тағамыңызды сипаттаңыз, мен оған керемет шарап ұсынамын.",noResultsFound:"Нәтижелер табылмады.",somethingWentWrong:"Кешіріңіз, бірдеңе дұрыс болмады.",chatButton1:"Сәйкестік табу",chatButton2:"Шарап таңдау",chatButton3:"Кеңес алу",chatTitle:"Шарап таңдаушы көмекші 🍷",chatSubtitle:"Тағамыңызды сипаттаңыз — 30 секундта ұсыныс алыңыз",inputPlaceholder:"мысалы, тунец салатымен",sendButton:"Таңдау",poweredBy:"Powered by",price:"Бағасы",region:"Өңір",type:"Түрі",reason:"Ұсыныс",moreInfo:"Толығырақ",tryAgain:"Қайта көру",similarWines:"Ұқсас шараптар",byTheGlass:"Бокалмен",winePairingIntro:"Бұл шарапқа келесі тағамдар сәйкес келеді:",askForDinner:"Кешкі асқа не қалайсыз?",clearChatButton:"Чатты тазалау",widgetTitle:"КЕРЕМЕТ ШАРАПТЫ ТАБЫҢЫЗ",widgetSubtitle:"Таңдауларыңызды бөлісіңіз — тағам, көңіл-күй, бюджет немесе жағдай — және біздің AI-сомелье сізге бірнеше секундта шарап ұсынады",searchPlaceholder:"Кілт сөзді немесе сипаттаманы енгізіңіз","wineDetails.price":"Бағасы","wineDetails.region":"Өңір","wineDetails.type":"Түрі","wineDetails.moreInfo":"Толығырақ","wineDetails.reason":"Себебі","wineDetails.code":"Код","wineDetails.buy":"Сатып алу",searchButton:"Іздеу",priceRange:"Баға диапазоны",wineColor:"Шарап түсі",intensity:"Қанықтылық",red:"Қызыл",white:"Ақ",rose:"Розалық",light:"Жеңіл",medium:"Орташа",full:"Толық",barTitle:"Шарапқа арналған тіскебасарлар",barSubtitle:"Төмендегі тағамдарды таңдаңыз және 'Жіберу' батырмасын басыңыз",barSendButton:"Жіберу",barResetButton:"Қалпына келтіру",barName:"Бар атауы",barNotesPlaceholder:"Мұнда өз тілектеріңізді жазыңыз...",placeholderSuggestions:["Пастаға арналған шарап","Балыққа тамаша үйлеседі","Кешке ұсынуға болады"],headerLine1:"Ойларыңызбен бөлісіңіз —",headerLine2:"— және бірнеше секундта мінсіз шарап ұсынысын алыңыз",headerMeal:"тағам",headerMood:"көңіл-күй",headerBudget:"бюджет",headerOccasion:"жағдай",headerOr:"немесе",errorMessage:"Бірдеңе дұрыс болмады. Кейінірек қайта көріңіз.",noResultsMessage:"Іздеуіңізге сәйкес нәтиже табылмады. Басқа сұрау қолданып көріңіз.",ai_sommelier:"AI sommelier",consentText:"Шарап көмекшісі сіздің талғамыңызды ескеріп, ұсыныстарды жақсарту үшін осы құрылғыда анонимді идентификатор сақтайды. Келісімсіз де пайдалана аласыз.",consentAccept:"Қабылдау",consentDecline:"Бас тарту",consentPrivacy:"Құпиялылық саясаты"},pt:{lang:"pt",welcomeMessage:"O que você planeja comer? Descreva seu prato e eu recomendarei a harmonização perfeita.",noResultsFound:"Nenhum resultado encontrado.",somethingWentWrong:"Desculpe, algo deu errado.",chatButton1:"Encontre sua harmonização",chatButton2:"Harmonizar vinho agora",chatButton3:"Receber conselho de vinho",chatTitle:"Assistente de Harmonização de Vinhos 🍷",chatSubtitle:"Descreva sua refeição e receba uma recomendação em 30 segundos",inputPlaceholder:"ex., Salada de atum",sendButton:"Harmonizar",poweredBy:"Desenvolvido por",price:"Preço",region:"Região",type:"Tipo",reason:"Sugestão",moreInfo:"Mais informações",tryAgain:"Tentar de novo",similarWines:"Vinhos semelhantes",byTheGlass:"Por taça",winePairingIntro:"Para este vinho, aqui estão algumas sugestões de pratos:",askForDinner:"O que você gostaria de jantar?",clearChatButton:"Limpar chat",widgetTitle:"ENCONTRE SEU VINHO PERFEITO",widgetSubtitle:"Compartilhe o que tiver em mente — sua refeição, humor, orçamento ou ocasião — e nosso sommelier de IA recomendará o vinho perfeito em segundos",searchPlaceholder:"Digite uma palavra-chave ou descrição","wineDetails.reason":"Motivo","wineDetails.price":"Preço","wineDetails.region":"Região","wineDetails.type":"Tipo","wineDetails.moreInfo":"Mais informações","wineDetails.code":"Código","wineDetails.buy":"Comprar",searchButton:"Pesquisar",priceRange:"Faixa de preço",wineColor:"Cor do vinho",intensity:"Intensidade",red:"Tinto",white:"Branco",rose:"Rosé",light:"Leve",medium:"Médio",full:"Encorpado",barTitle:"Pratos do bar",barSubtitle:"Selecione os pratos abaixo e clique em 'Enviar'",barSendButton:"Enviar",barResetButton:"Resetar",barName:"Nome do bar",barNotesPlaceholder:"Adicione seus desejos aqui...",placeholderSuggestions:["Vinho para massa","Perfeito com peixe","Recomendado para uma festa"],headerLine1:"Compartilhe o que tiver em mente —",headerLine2:"— e receba recomendações do vinho perfeito em segundos",headerMeal:"refeição",headerMood:"humor",headerBudget:"orçamento",headerOccasion:"ocasião",headerOr:"ou",errorMessage:"Algo deu errado. Por favor, tente novamente mais tarde.",noResultsMessage:"Nenhum resultado encontrado para sua pesquisa. Por favor, tente uma consulta diferente.",ai_sommelier:"AI sommelier",consentText:"O assistente de vinhos guarda um identificador anónimo neste dispositivo para conhecer o seu gosto e melhorar as recomendações. Pode usá-lo sem aceitar.",consentAccept:"Aceitar",consentDecline:"Recusar",consentPrivacy:"Política de privacidade"}};function Ls(e){return{id:String(e.id),lang:e.lang,available_languages:e.available_languages?e.available_languages:[e.lang],open_ai_key:e.open_ai_key??null,currency:e.currency,title:e.title,requires_cookie_consent:e.requires_cookie_consent===!0}}const zs={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/plou_logo.jpg",brandColor:"#e6c6bb"},25:{logoUrl:null,brandColor:"#000000",wineaterColor:"#000000",buttonUppercase:!0,customCss:`
1
+ (function(Q,J){typeof exports=="object"&&typeof module<"u"?module.exports=J():typeof define=="function"&&define.amd?define(J):(Q=typeof globalThis<"u"?globalThis:Q||self,Q.WineaterChatbot=J())})(this,function(){"use strict";var uu=Object.defineProperty;var Fo=Q=>{throw TypeError(Q)};var cu=(Q,J,ue)=>J in Q?uu(Q,J,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Q[J]=ue;var ut=(Q,J,ue)=>cu(Q,typeof J!="symbol"?J+"":J,ue),li=(Q,J,ue)=>J.has(Q)||Fo("Cannot "+ue);var h=(Q,J,ue)=>(li(Q,J,"read from private field"),ue?ue.call(Q):J.get(Q)),O=(Q,J,ue)=>J.has(Q)?Fo("Cannot add the same private member more than once"):J instanceof WeakSet?J.add(Q):J.set(Q,ue),W=(Q,J,ue,Pn)=>(li(Q,J,"write to private field"),Pn?Pn.call(Q,ue):J.set(Q,ue),ue),V=(Q,J,ue)=>(li(Q,J,"access private method"),ue);var No,gn,mn,Ut,Ht,Un,wn,_n,ve,ui,Xt,ci,Uo,Ho,Ke,Ye,ri,ot,Gt,at,Ze,We,st,yt,Pt,Vt,At,Kt,It,gr,ge,du,fu,di,xr,Sr,fi,$e,lt,je,Yt,Hn,Gn,mr,bn,Vn,Zt,yn,Ne,hi,Tn,vi,Bo,Mo;const Q="5";typeof window<"u"&&((No=window.__svelte??(window.__svelte={})).v??(No.v=new Set)).add(Q);const J=1,ue=2,Pn=4,Go=8,Vo=16,Ko=1,Yo=2,Zo=4,Qo=8,Jo=16,Xo=1,$o=2,be=Symbol(),ea="http://www.w3.org/1999/xhtml",Cr=!1;var Er=Array.isArray,ta=Array.prototype.indexOf,Tr=Array.from,na=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,ra=Object.getOwnPropertyDescriptors,ia=Object.prototype,oa=Array.prototype,pi=Object.getPrototypeOf,gi=Object.isExtensible;function aa(e){for(var t=0;t<e.length;t++)e[t]()}function mi(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const me=2,Pr=4,Ar=8,ct=16,dt=32,Rt=64,Jn=128,Qe=512,ye=1024,Ie=2048,ft=4096,Be=8192,ht=16384,Ir=32768,Wt=65536,wi=1<<17,_i=1<<18,en=1<<19,sa=1<<20,Nt=32768,Dr=1<<21,Rr=1<<22,xt=1<<23,Bt=Symbol("$state"),la=Symbol("legacy props"),ua=Symbol(""),tn=new class extends Error{constructor(){super(...arguments);ut(this,"name","StaleReactionError");ut(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ca(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function da(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ha(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function va(e){throw new Error("https://svelte.dev/e/effect_orphan")}function pa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ga(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ma(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function _a(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ba(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ya(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ka(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function bi(e){return e===this.v}function xa(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function yi(e){return!xa(e,this.v)}let nn=!1,Sa=!1;function Ca(){nn=!0}let ce=null;function rn(e){ce=e}function vt(e,t=!1,n){ce={p:ce,i:!1,c:null,e:null,s:e,x:null,l:nn&&!t?{s:null,u:null,$:[]}:null}}function pt(e){var t=ce,n=t.e;if(n!==null){t.e=null;for(var r of n)ji(r)}return e!==void 0&&(t.x=e),t.i=!0,ce=t.p,e??{}}function An(){return!nn||ce!==null&&ce.l===null}let Mt=[];function ki(){var e=Mt;Mt=[],aa(e)}function on(e){if(Mt.length===0&&!In){var t=Mt;queueMicrotask(()=>{t===Mt&&ki()})}Mt.push(e)}function Ea(){for(;Mt.length>0;)ki()}function xi(e){var t=Z;if(t===null)return q.f|=xt,e;if(t.f&Ir)an(e,t);else{if(!(t.f&Jn))throw e;t.b.error(e)}}function an(e,t){for(;t!==null;){if(t.f&Jn)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Xn=new Set;let K=null,$n=null,de=null,Ue=[],er=null,Wr=!1,In=!1;const pr=class pr{constructor(){O(this,ve);ut(this,"committed",!1);ut(this,"current",new Map);ut(this,"previous",new Map);O(this,gn,new Set);O(this,mn,new Set);O(this,Ut,0);O(this,Ht,0);O(this,Un,null);O(this,wn,[]);O(this,_n,[]);ut(this,"skipped_effects",new Set);ut(this,"is_fork",!1)}is_deferred(){return this.is_fork||h(this,Ht)>0}process(t){var r;Ue=[],$n=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of t)V(this,ve,ui).call(this,i,n);this.is_fork||V(this,ve,Uo).call(this),this.is_deferred()?(V(this,ve,Xt).call(this,n.effects),V(this,ve,Xt).call(this,n.render_effects),V(this,ve,Xt).call(this,n.block_effects)):($n=this,K=null,Ci(n.render_effects),Ci(n.effects),$n=null,(r=h(this,Un))==null||r.resolve()),de=null}capture(t,n){this.previous.has(t)||this.previous.set(t,n),t.f&xt||(this.current.set(t,t.v),de==null||de.set(t,t.v))}activate(){K=this,this.apply()}deactivate(){K===this&&(K=null,de=null)}flush(){if(this.activate(),Ue.length>0){if(Si(),K!==null&&K!==this)return}else h(this,Ut)===0&&this.process([]);this.deactivate()}discard(){for(const t of h(this,mn))t(this);h(this,mn).clear()}increment(t){W(this,Ut,h(this,Ut)+1),t&&W(this,Ht,h(this,Ht)+1)}decrement(t){W(this,Ut,h(this,Ut)-1),t&&W(this,Ht,h(this,Ht)-1),this.revive()}revive(){for(const t of h(this,wn))xe(t,Ie),Lt(t);for(const t of h(this,_n))xe(t,ft),Lt(t);W(this,wn,[]),W(this,_n,[]),this.flush()}oncommit(t){h(this,gn).add(t)}ondiscard(t){h(this,mn).add(t)}settled(){return(h(this,Un)??W(this,Un,mi())).promise}static ensure(){if(K===null){const t=K=new pr;Xn.add(K),In||pr.enqueue(()=>{K===t&&t.flush()})}return K}static enqueue(t){on(t)}apply(){}};gn=new WeakMap,mn=new WeakMap,Ut=new WeakMap,Ht=new WeakMap,Un=new WeakMap,wn=new WeakMap,_n=new WeakMap,ve=new WeakSet,ui=function(t,n){var v;t.f^=ye;for(var r=t.first;r!==null;){var i=r.f,o=(i&(dt|Rt))!==0,s=o&&(i&ye)!==0,u=s||(i&Be)!==0||this.skipped_effects.has(r);if(r.f&Jn&&((v=r.b)!=null&&v.is_pending())&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!u&&r.fn!==null){o?r.f^=ye:i&Pr?n.effects.push(r):Bn(r)&&(r.f&ct&&n.block_effects.push(r),Mn(r));var a=r.first;if(a!==null){r=a;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)c===n.effect&&(V(this,ve,Xt).call(this,n.effects),V(this,ve,Xt).call(this,n.render_effects),V(this,ve,Xt).call(this,n.block_effects),n=n.parent),r=c.next,c=c.parent}},Xt=function(t){for(const n of t)(n.f&Ie?h(this,wn):h(this,_n)).push(n),V(this,ve,ci).call(this,n.deps),xe(n,ye)},ci=function(t){if(t!==null)for(const n of t)!(n.f&me)||!(n.f&Nt)||(n.f^=Nt,V(this,ve,ci).call(this,n.deps))},Uo=function(){if(h(this,Ht)===0){for(const t of h(this,gn))t();h(this,gn).clear()}h(this,Ut)===0&&V(this,ve,Ho).call(this)},Ho=function(){var o;if(Xn.size>1){this.previous.clear();var t=de,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of Xn){if(s===this){n=!1;continue}const u=[];for(const[c,v]of this.current){if(s.current.has(c))if(n&&v!==s.current.get(c))s.current.set(c,v);else continue;u.push(c)}if(u.length===0)continue;const a=[...s.current.keys()].filter(c=>!this.current.has(c));if(a.length>0){var i=Ue;Ue=[];const c=new Set,v=new Map;for(const g of u)Ei(g,a,c,v);if(Ue.length>0){K=s,s.apply();for(const g of Ue)V(o=s,ve,ui).call(o,g,r);s.deactivate()}Ue=i}}K=null,de=t}this.committed=!0,Xn.delete(this)};let gt=pr;function Ta(e){var t=In;In=!0;try{for(var n;;){if(Ea(),Ue.length===0&&(K==null||K.flush(),Ue.length===0))return er=null,n;Si()}}finally{In=t}}function Si(){var e=Ct;Wr=!0;var t=null;try{var n=0;for(ar(!0);Ue.length>0;){var r=gt.ensure();if(n++>1e3){var i,o;Pa()}r.process(Ue),St.clear()}}finally{Wr=!1,ar(e),er=null}}function Pa(){try{pa()}catch(e){an(e,er)}}let Je=null;function Ci(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(ht|Be))&&Bn(r)&&(Je=new Set,Mn(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Hi(r):r.fn=null),(Je==null?void 0:Je.size)>0)){St.clear();for(const i of Je){if(i.f&(ht|Be))continue;const o=[i];let s=i.parent;for(;s!==null;)Je.has(s)&&(Je.delete(s),o.push(s)),s=s.parent;for(let u=o.length-1;u>=0;u--){const a=o[u];a.f&(ht|Be)||Mn(a)}}Je.clear()}}Je=null}}function Ei(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;o&me?Ei(i,t,n,r):o&(Rr|ct)&&!(o&Ie)&&Ti(i,t,r)&&(xe(i,Ie),Lt(i))}}function Ti(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if(i.f&me&&Ti(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Lt(e){for(var t=er=e;t.parent!==null;){t=t.parent;var n=t.f;if(Wr&&t===Z&&n&ct&&!(n&_i))return;if(n&(Rt|dt)){if(!(n&ye))return;t.f^=ye}}Ue.push(t)}function Aa(e){let t=0,n=Ot(0),r;return()=>{ir()&&(l(n),Or(()=>(t===0&&(r=Ln(()=>e(()=>Dn(n)))),t+=1,()=>{on(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Dn(n))})})))}}var Ia=Wt|en|Jn;function Da(e,t,n){new Ra(e,t,n)}class Ra{constructor(t,n,r){O(this,ge);ut(this,"parent");O(this,Ke,!1);O(this,Ye);O(this,ri,null);O(this,ot);O(this,Gt);O(this,at);O(this,Ze,null);O(this,We,null);O(this,st,null);O(this,yt,null);O(this,Pt,null);O(this,Vt,0);O(this,At,0);O(this,Kt,!1);O(this,It,null);O(this,gr,Aa(()=>(W(this,It,Ot(h(this,Vt))),()=>{W(this,It,null)})));W(this,Ye,t),W(this,ot,n),W(this,Gt,r),this.parent=Z.b,W(this,Ke,!!h(this,ot).pending),W(this,at,or(()=>{Z.b=this;{var i=V(this,ge,di).call(this);try{W(this,Ze,Ge(()=>r(i)))}catch(o){this.error(o)}h(this,At)>0?V(this,ge,Sr).call(this):W(this,Ke,!1)}return()=>{var o;(o=h(this,Pt))==null||o.remove()}},Ia))}is_pending(){return h(this,Ke)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!h(this,ot).pending}update_pending_count(t){V(this,ge,fi).call(this,t),W(this,Vt,h(this,Vt)+t),h(this,It)&&ln(h(this,It),h(this,Vt))}get_effect_pending(){return h(this,gr).call(this),l(h(this,It))}error(t){var n=h(this,ot).onerror;let r=h(this,ot).failed;if(h(this,Kt)||!n&&!r)throw t;h(this,Ze)&&(De(h(this,Ze)),W(this,Ze,null)),h(this,We)&&(De(h(this,We)),W(this,We,null)),h(this,st)&&(De(h(this,st)),W(this,st,null));var i=!1,o=!1;const s=()=>{if(i){ka();return}i=!0,o&&ba(),gt.ensure(),W(this,Vt,0),h(this,st)!==null&&cn(h(this,st),()=>{W(this,st,null)}),W(this,Ke,this.has_pending_snippet()),W(this,Ze,V(this,ge,xr).call(this,()=>(W(this,Kt,!1),Ge(()=>h(this,Gt).call(this,h(this,Ye)))))),h(this,At)>0?V(this,ge,Sr).call(this):W(this,Ke,!1)};var u=q;try{Re(null),o=!0,n==null||n(t,s),o=!1}catch(a){an(a,h(this,at)&&h(this,at).parent)}finally{Re(u)}r&&on(()=>{W(this,st,V(this,ge,xr).call(this,()=>{gt.ensure(),W(this,Kt,!0);try{return Ge(()=>{r(h(this,Ye),()=>t,()=>s)})}catch(a){return an(a,h(this,at).parent),null}finally{W(this,Kt,!1)}}))})}}Ke=new WeakMap,Ye=new WeakMap,ri=new WeakMap,ot=new WeakMap,Gt=new WeakMap,at=new WeakMap,Ze=new WeakMap,We=new WeakMap,st=new WeakMap,yt=new WeakMap,Pt=new WeakMap,Vt=new WeakMap,At=new WeakMap,Kt=new WeakMap,It=new WeakMap,gr=new WeakMap,ge=new WeakSet,du=function(){try{W(this,Ze,Ge(()=>h(this,Gt).call(this,h(this,Ye))))}catch(t){this.error(t)}W(this,Ke,!1)},fu=function(){const t=h(this,ot).pending;t&&(W(this,We,Ge(()=>t(h(this,Ye)))),gt.enqueue(()=>{var n=V(this,ge,di).call(this);W(this,Ze,V(this,ge,xr).call(this,()=>(gt.ensure(),Ge(()=>h(this,Gt).call(this,n))))),h(this,At)>0?V(this,ge,Sr).call(this):(cn(h(this,We),()=>{W(this,We,null)}),W(this,Ke,!1))}))},di=function(){var t=h(this,Ye);return h(this,Ke)&&(W(this,Pt,mt()),h(this,Ye).before(h(this,Pt)),t=h(this,Pt)),t},xr=function(t){var n=Z,r=q,i=ce;it(h(this,at)),Re(h(this,at)),rn(h(this,at).ctx);try{return t()}catch(o){return xi(o),null}finally{it(n),Re(r),rn(i)}},Sr=function(){const t=h(this,ot).pending;h(this,Ze)!==null&&(W(this,yt,document.createDocumentFragment()),h(this,yt).append(h(this,Pt)),Ki(h(this,Ze),h(this,yt))),h(this,We)===null&&W(this,We,Ge(()=>t(h(this,Ye))))},fi=function(t){var n;if(!this.has_pending_snippet()){this.parent&&V(n=this.parent,ge,fi).call(n,t);return}W(this,At,h(this,At)+t),h(this,At)===0&&(W(this,Ke,!1),h(this,We)&&cn(h(this,We),()=>{W(this,We,null)}),h(this,yt)&&(h(this,Ye).before(h(this,yt)),W(this,yt,null)))};function sn(e,t){return t}function Wa(e,t,n){for(var r=[],i=t.length,o=0;o<i;o++)jr(t[o].e,r,!0);Gi(r,()=>{var s=r.length===0&&n!==null;if(s){var u=n,a=u.parentNode;Ha(a),a.append(u),e.items.clear(),nt(e,t[0].prev,t[i-1].next)}for(var c=0;c<i;c++){var v=t[c];s||(e.items.delete(v.k),nt(e,v.prev,v.next)),De(v.e,!s)}e.first===t[0]&&(e.first=t[0].prev)})}function zt(e,t,n,r,i,o=null){var s=e,u=new Map,a=null,c=(t&Pn)!==0,v=(t&J)!==0,g=(t&ue)!==0;if(c){var f=e;s=f.appendChild(mt())}var d=null,b=Br(()=>{var _=n();return Er(_)?_:_==null?[]:Tr(_)}),p,m=!0;function k(){Na(j,p,s,t,r),d!==null&&(p.length===0?(d.fragment?(s.before(d.fragment),d.fragment=null):qr(d.effect),A.first=d.effect):cn(d.effect,()=>{d=null}))}var A=or(()=>{p=l(b);for(var _=p.length,T=new Set,P=K,C=null,R=zi(),I=0;I<_;I+=1){var X=p[I],U=r(X,I),G=m?null:u.get(U);G?(v&&ln(G.v,X),g?ln(G.i,I):G.i=I,R&&P.skipped_effects.delete(G.e)):(G=Ba(m?s:null,C,X,U,I,i,t,n),m&&(G.o=!0,C===null?a=G:C.next=G,C=G),u.set(U,G)),T.add(U)}if(_===0&&o&&!d)if(m)d={fragment:null,effect:Ge(()=>o(s))};else{var we=document.createDocumentFragment(),$=mt();we.append($),d={fragment:we,effect:Ge(()=>o($))}}if(!m)if(R){for(const[Ee,_e]of u)T.has(Ee)||P.skipped_effects.add(_e.e);P.oncommit(k),P.ondiscard(()=>{})}else k();l(b)}),j={effect:A,items:u,first:a};m=!1}function Na(e,t,n,r,i){var X,U,G,we;var o=(r&Go)!==0,s=t.length,u=e.items,a=e.first,c,v=null,g,f=[],d=[],b,p,m,k;if(o)for(k=0;k<s;k+=1)b=t[k],p=i(b,k),m=u.get(p),(X=m.a)==null||X.measure(),(g??(g=new Set)).add(m);for(k=0;k<s;k+=1){if(b=t[k],p=i(b,k),m=u.get(p),e.first??(e.first=m),!m.o){m.o=!0;var A=v?v.next:a;nt(e,v,m),nt(e,m,A),Nr(m,A,n),v=m,f=[],d=[],a=v.next;continue}if(m.e.f&Be&&(qr(m.e),o&&((U=m.a)==null||U.unfix(),(g??(g=new Set)).delete(m))),m!==a){if(c!==void 0&&c.has(m)){if(f.length<d.length){var j=d[0],_;v=j.prev;var T=f[0],P=f[f.length-1];for(_=0;_<f.length;_+=1)Nr(f[_],j,n);for(_=0;_<d.length;_+=1)c.delete(d[_]);nt(e,T.prev,P.next),nt(e,v,T),nt(e,P,j),a=j,v=P,k-=1,f=[],d=[]}else c.delete(m),Nr(m,a,n),nt(e,m.prev,m.next),nt(e,m,v===null?e.first:v.next),nt(e,v,m),v=m;continue}for(f=[],d=[];a!==null&&a.k!==p;)a.e.f&Be||(c??(c=new Set)).add(a),d.push(a),a=a.next;if(a===null)continue;m=a}f.push(m),v=m,a=m.next}if(a!==null||c!==void 0){for(var C=c===void 0?[]:Tr(c);a!==null;)a.e.f&Be||C.push(a),a=a.next;var R=C.length;if(R>0){var I=r&Pn&&s===0?n:null;if(o){for(k=0;k<R;k+=1)(G=C[k].a)==null||G.measure();for(k=0;k<R;k+=1)(we=C[k].a)==null||we.fix()}Wa(e,C,I)}}o&&on(()=>{var $;if(g!==void 0)for(m of g)($=m.a)==null||$.apply()})}function Ba(e,t,n,r,i,o,s,u){var a=(s&J)!==0,c=(s&Vo)===0,v=a?c?ja(n,!1,!1):Ot(n):n,g=s&ue?Ot(i):i,f={i:g,v,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var d=document.createDocumentFragment();d.append(e=mt())}return f.e=Ge(()=>o(e,v,g,u)),t!==null&&(t.next=f),f}finally{}}function Nr(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,o=e.e.nodes_start;o!==null&&o!==r;){var s=Rn(o);i.before(o),o=s}}function nt(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Ma(e,t,n,r){const i=An()?nr:Br;if(n.length===0&&e.length===0){r(t.map(i));return}var o=K,s=Z,u=La();function a(){Promise.all(n.map(c=>za(c))).then(c=>{u();try{r([...t.map(i),...c])}catch(v){s.f&ht||an(v,s)}o==null||o.deactivate(),tr()}).catch(c=>{an(c,s)})}e.length>0?Promise.all(e).then(()=>{u();try{return a()}finally{o==null||o.deactivate(),tr()}}):a()}function La(){var e=Z,t=q,n=ce,r=K;return function(o=!0){it(e),Re(t),rn(n),o&&(r==null||r.activate())}}function tr(){it(null),Re(null),rn(null)}function nr(e){var t=me|Ie,n=q!==null&&q.f&me?q:null;return Z!==null&&(Z.f|=en),{ctx:ce,deps:null,effects:null,equals:bi,f:t,fn:e,reactions:null,rv:0,v:be,wv:0,parent:n??Z,ac:null}}function za(e,t){let n=Z;n===null&&da();var r=n.b,i=void 0,o=Ot(be),s=!q,u=new Map;return Qa(()=>{var f;var a=mi();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{c===K&&c.committed&&c.deactivate(),tr()})}catch(d){a.reject(d),tr()}var c=K;if(s){var v=!r.is_pending();r.update_pending_count(1),c.increment(v),(f=u.get(c))==null||f.reject(tn),u.delete(c),u.set(c,a)}const g=(d,b=void 0)=>{if(c.activate(),b)b!==tn&&(o.f|=xt,ln(o,b));else{o.f&xt&&(o.f^=xt),ln(o,d);for(const[p,m]of u){if(u.delete(p),p===c)break;m.reject(tn)}}s&&(r.update_pending_count(-1),c.decrement(v))};a.promise.then(g,d=>g(null,d||"unknown"))}),zr(()=>{for(const a of u.values())a.reject(tn)}),new Promise(a=>{function c(v){function g(){v===i?a(o):c(i)}v.then(g,g)}c(i)})}function ie(e){const t=nr(e);return Zi(t),t}function Br(e){const t=nr(e);return t.equals=yi,t}function Pi(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)De(t[n])}}function Oa(e){for(var t=e.parent;t!==null;){if(!(t.f&me))return t.f&ht?null:t;t=t.parent}return null}function Mr(e){var t,n=Z;it(Oa(e));try{e.f&=~Nt,Pi(e),t=eo(e)}finally{it(n)}return t}function Ai(e){var t=Mr(e);if(e.equals(t)||(K!=null&&K.is_fork||(e.v=t),e.wv=Xi()),!jt)if(de!==null)ir()&&de.set(e,t);else{var n=e.f&Qe?ye:ft;xe(e,n)}}let Lr=new Set;const St=new Map;let Ii=!1;function Ot(e,t){var n={f:0,v:e,reactions:null,equals:bi,rv:0,wv:0};return n}function Y(e,t){const n=Ot(e);return Zi(n),n}function ja(e,t=!1,n=!0){var i;const r=Ot(e);return t||(r.equals=yi),nn&&n&&ce!==null&&ce.l!==null&&((i=ce.l).s??(i.s=[])).push(r),r}function w(e,t,n=!1){q!==null&&(!rt||q.f&wi)&&An()&&q.f&(me|ct|Rr|wi)&&!(Se!=null&&Se.includes(e))&&_a();let r=n?He(t):t;return ln(e,r)}function ln(e,t){if(!e.equals(t)){var n=e.v;jt?St.set(e,t):St.set(e,n),e.v=t;var r=gt.ensure();r.capture(e,n),e.f&me&&(e.f&Ie&&Mr(e),xe(e,e.f&Qe?ye:ft)),e.wv=Xi(),Ri(e,Ie),An()&&Z!==null&&Z.f&ye&&!(Z.f&(dt|Rt))&&(Ve===null?$a([e]):Ve.push(e)),!r.is_fork&&Lr.size>0&&!Ii&&qa()}return t}function qa(){Ii=!1;var e=Ct;ar(!0);const t=Array.from(Lr);try{for(const n of t)n.f&ye&&xe(n,ft),Bn(n)&&Mn(n)}finally{ar(e)}Lr.clear()}function Di(e,t=1){var n=l(e),r=t===1?n++:n--;return w(e,n),r}function Dn(e){w(e,e.v+1)}function Ri(e,t){var n=e.reactions;if(n!==null)for(var r=An(),i=n.length,o=0;o<i;o++){var s=n[o],u=s.f;if(!(!r&&s===Z)){var a=(u&Ie)===0;if(a&&xe(s,t),u&me){var c=s;de==null||de.delete(c),u&Nt||(u&Qe&&(s.f|=Nt),Ri(c,ft))}else a&&(u&ct&&Je!==null&&Je.add(s),Lt(s))}}}function He(e){if(typeof e!="object"||e===null||Bt in e)return e;const t=pi(e);if(t!==ia&&t!==oa)return e;var n=new Map,r=Er(e),i=Y(0),o=qt,s=u=>{if(qt===o)return u();var a=q,c=qt;Re(null),Ji(o);var v=u();return Re(a),Ji(c),v};return r&&n.set("length",Y(e.length)),new Proxy(e,{defineProperty(u,a,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&ma();var v=n.get(a);return v===void 0?v=s(()=>{var g=Y(c.value);return n.set(a,g),g}):w(v,c.value,!0),!0},deleteProperty(u,a){var c=n.get(a);if(c===void 0){if(a in u){const v=s(()=>Y(be));n.set(a,v),Dn(i)}}else w(c,be),Dn(i);return!0},get(u,a,c){var d;if(a===Bt)return e;var v=n.get(a),g=a in u;if(v===void 0&&(!g||(d=$t(u,a))!=null&&d.writable)&&(v=s(()=>{var b=He(g?u[a]:be),p=Y(b);return p}),n.set(a,v)),v!==void 0){var f=l(v);return f===be?void 0:f}return Reflect.get(u,a,c)},getOwnPropertyDescriptor(u,a){var c=Reflect.getOwnPropertyDescriptor(u,a);if(c&&"value"in c){var v=n.get(a);v&&(c.value=l(v))}else if(c===void 0){var g=n.get(a),f=g==null?void 0:g.v;if(g!==void 0&&f!==be)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(u,a){var f;if(a===Bt)return!0;var c=n.get(a),v=c!==void 0&&c.v!==be||Reflect.has(u,a);if(c!==void 0||Z!==null&&(!v||(f=$t(u,a))!=null&&f.writable)){c===void 0&&(c=s(()=>{var d=v?He(u[a]):be,b=Y(d);return b}),n.set(a,c));var g=l(c);if(g===be)return!1}return v},set(u,a,c,v){var j;var g=n.get(a),f=a in u;if(r&&a==="length")for(var d=c;d<g.v;d+=1){var b=n.get(d+"");b!==void 0?w(b,be):d in u&&(b=s(()=>Y(be)),n.set(d+"",b))}if(g===void 0)(!f||(j=$t(u,a))!=null&&j.writable)&&(g=s(()=>Y(void 0)),w(g,He(c)),n.set(a,g));else{f=g.v!==be;var p=s(()=>He(c));w(g,p)}var m=Reflect.getOwnPropertyDescriptor(u,a);if(m!=null&&m.set&&m.set.call(v,c),!f){if(r&&typeof a=="string"){var k=n.get("length"),A=Number(a);Number.isInteger(A)&&A>=k.v&&w(k,A+1)}Dn(i)}return!0},ownKeys(u){l(i);var a=Reflect.ownKeys(u).filter(g=>{var f=n.get(g);return f===void 0||f.v!==be});for(var[c,v]of n)v.v!==be&&!(c in u)&&a.push(c);return a},setPrototypeOf(){wa()}})}function Wi(e){try{if(e!==null&&typeof e=="object"&&Bt in e)return e[Bt]}catch{}return e}function Fa(e,t){return Object.is(Wi(e),Wi(t))}var Ni,Bi,Mi,Li;function Ua(){if(Ni===void 0){Ni=window,Bi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Mi=$t(t,"firstChild").get,Li=$t(t,"nextSibling").get,gi(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),gi(n)&&(n.__t=void 0)}}function mt(e=""){return document.createTextNode(e)}function un(e){return Mi.call(e)}function Rn(e){return Li.call(e)}function E(e,t){return un(e)}function ke(e,t=!1){{var n=un(e);return n instanceof Comment&&n.data===""?Rn(n):n}}function N(e,t=1,n=!1){let r=e;for(;t--;)r=Rn(r);return r}function Ha(e){e.textContent=""}function zi(){return!1}let Oi=!1;function Ga(){Oi||(Oi=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function rr(e){var t=q,n=Z;Re(null),it(null);try{return e()}finally{Re(t),it(n)}}function Va(e,t,n,r=n){e.addEventListener(t,()=>rr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ga()}function Ka(e){Z===null&&(q===null&&va(),ha()),jt&&fa()}function Ya(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function wt(e,t,n){var r=Z;r!==null&&r.f&Be&&(e|=Be);var i={ctx:ce,deps:null,nodes_start:null,nodes_end:null,f:e|Ie|Qe,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Mn(i),i.f|=Ir}catch(u){throw De(i),u}else t!==null&&Lt(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&!(o.f&en)&&(o=o.first,e&ct&&e&Wt&&o!==null&&(o.f|=Wt)),o!==null&&(o.parent=r,r!==null&&Ya(o,r),q!==null&&q.f&me&&!(e&Rt))){var s=q;(s.effects??(s.effects=[])).push(o)}return i}function ir(){return q!==null&&!rt}function zr(e){const t=wt(Ar,null,!1);return xe(t,ye),t.teardown=e,t}function Wn(e){Ka();var t=Z.f,n=!q&&(t&dt)!==0&&(t&Ir)===0;if(n){var r=ce;(r.e??(r.e=[])).push(e)}else return ji(e)}function ji(e){return wt(Pr|sa,e,!1)}function Za(e){gt.ensure();const t=wt(Rt|en,e,!0);return(n={})=>new Promise(r=>{n.outro?cn(t,()=>{De(t),r(void 0)}):(De(t),r(void 0))})}function qi(e){return wt(Pr,e,!1)}function Qa(e){return wt(Rr|en,e,!0)}function Or(e,t=0){return wt(Ar|t,e,!0)}function B(e,t=[],n=[],r=[]){Ma(r,t,n,i=>{wt(Ar,()=>e(...i.map(l)),!0)})}function or(e,t=0){var n=wt(ct|t,e,!0);return n}function Ge(e){return wt(dt|en,e,!0)}function Fi(e){var t=e.teardown;if(t!==null){const n=jt,r=q;Yi(!0),Re(null);try{t.call(null)}finally{Yi(n),Re(r)}}}function Ui(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&rr(()=>{i.abort(tn)});var r=n.next;n.f&Rt?n.parent=null:De(n,t),n=r}}function Ja(e){for(var t=e.first;t!==null;){var n=t.next;t.f&dt||De(t),t=n}}function De(e,t=!0){var n=!1;(t||e.f&_i)&&e.nodes_start!==null&&e.nodes_end!==null&&(Xa(e.nodes_start,e.nodes_end),n=!0),Ui(e,t&&!n),sr(e,0),xe(e,ht);var r=e.transitions;if(r!==null)for(const o of r)o.stop();Fi(e);var i=e.parent;i!==null&&i.first!==null&&Hi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Xa(e,t){for(;e!==null;){var n=e===t?null:Rn(e);e.remove(),e=n}}function Hi(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 cn(e,t,n=!0){var r=[];jr(e,r,!0),Gi(r,()=>{n&&De(e),t&&t()})}function Gi(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function jr(e,t,n){if(!(e.f&Be)){if(e.f^=Be,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var r=e.first;r!==null;){var i=r.next,o=(r.f&Wt)!==0||(r.f&dt)!==0&&(e.f&ct)!==0;jr(r,t,o?n:!1),r=i}}}function qr(e){Vi(e,!0)}function Vi(e,t){if(e.f&Be){e.f^=Be,e.f&ye||(xe(e,Ie),Lt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Wt)!==0||(n.f&dt)!==0;Vi(n,i?t:!1),n=r}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}function Ki(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:Rn(n);t.append(n),n=i}}let Ct=!1;function ar(e){Ct=e}let jt=!1;function Yi(e){jt=e}let q=null,rt=!1;function Re(e){q=e}let Z=null;function it(e){Z=e}let Se=null;function Zi(e){q!==null&&(Se===null?Se=[e]:Se.push(e))}let Ce=null,Me=0,Ve=null;function $a(e){Ve=e}let Qi=1,Nn=0,qt=Nn;function Ji(e){qt=e}function Xi(){return++Qi}function Bn(e){var t=e.f;if(t&Ie)return!0;if(t&me&&(e.f&=~Nt),t&ft){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i];if(Bn(o)&&Ai(o),o.wv>e.wv)return!0}t&Qe&&de===null&&xe(e,ye)}return!1}function $i(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Se!=null&&Se.includes(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&me?$i(o,t,!1):t===o&&(n?xe(o,Ie):o.f&ye&&xe(o,ft),Lt(o))}}function eo(e){var b;var t=Ce,n=Me,r=Ve,i=q,o=Se,s=ce,u=rt,a=qt,c=e.f;Ce=null,Me=0,Ve=null,q=c&(dt|Rt)?null:e,Se=null,rn(e.ctx),rt=!1,qt=++Nn,e.ac!==null&&(rr(()=>{e.ac.abort(tn)}),e.ac=null);try{e.f|=Dr;var v=e.fn,g=v(),f=e.deps;if(Ce!==null){var d;if(sr(e,Me),f!==null&&Me>0)for(f.length=Me+Ce.length,d=0;d<Ce.length;d++)f[Me+d]=Ce[d];else e.deps=f=Ce;if(Ct&&ir()&&e.f&Qe)for(d=Me;d<f.length;d++)((b=f[d]).reactions??(b.reactions=[])).push(e)}else f!==null&&Me<f.length&&(sr(e,Me),f.length=Me);if(An()&&Ve!==null&&!rt&&f!==null&&!(e.f&(me|ft|Ie)))for(d=0;d<Ve.length;d++)$i(Ve[d],e);return i!==null&&i!==e&&(Nn++,Ve!==null&&(r===null?r=Ve:r.push(...Ve))),e.f&xt&&(e.f^=xt),g}catch(p){return xi(p)}finally{e.f^=Dr,Ce=t,Me=n,Ve=r,q=i,Se=o,rn(s),rt=u,qt=a}}function es(e,t){let n=t.reactions;if(n!==null){var r=ta.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&me&&(Ce===null||!Ce.includes(t))&&(xe(t,ft),t.f&Qe&&(t.f^=Qe,t.f&=~Nt),Pi(t),sr(t,0))}function sr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)es(e,n[r])}function Mn(e){var t=e.f;if(!(t&ht)){xe(e,ye);var n=Z,r=Ct;Z=e,Ct=!0;try{t&ct?Ja(e):Ui(e),Fi(e);var i=eo(e);e.teardown=typeof i=="function"?i:null,e.wv=Qi;var o;Cr&&Sa&&e.f&Ie&&e.deps}finally{Ct=r,Z=n}}}async function ts(){await Promise.resolve(),Ta()}function l(e){var t=e.f,n=(t&me)!==0;if(q!==null&&!rt){var r=Z!==null&&(Z.f&ht)!==0;if(!r&&!(Se!=null&&Se.includes(e))){var i=q.deps;if(q.f&Dr)e.rv<Nn&&(e.rv=Nn,Ce===null&&i!==null&&i[Me]===e?Me++:Ce===null?Ce=[e]:Ce.includes(e)||Ce.push(e));else{(q.deps??(q.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[q]:o.includes(q)||o.push(q)}}}if(jt){if(St.has(e))return St.get(e);if(n){var s=e,u=s.v;return(!(s.f&ye)&&s.reactions!==null||no(s))&&(u=Mr(s)),St.set(s,u),u}}else n&&!(de!=null&&de.has(e))&&(s=e,Bn(s)&&Ai(s),Ct&&ir()&&!(s.f&Qe)&&to(s));if(de!=null&&de.has(e))return de.get(e);if(e.f&xt)throw e.v;return e.v}function to(e){if(e.deps!==null){e.f^=Qe;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&me&&!(t.f&Qe)&&to(t)}}function no(e){if(e.v===be)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(St.has(t)||t.f&me&&no(t))return!0;return!1}function Ln(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}const ns=-7169;function xe(e,t){e.f=e.f&ns|t}const ro=new Set,Fr=new Set;function rs(e,t,n,r={}){function i(o){if(r.capture||zn.call(t,o),!o.cancelBubble)return rr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?on(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function _t(e,t,n,r,i){var o={capture:r,passive:i},s=rs(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&zr(()=>{t.removeEventListener(e,s,o)})}function lr(e){for(var t=0;t<e.length;t++)ro.add(e[t]);for(var n of Fr)n(e)}let io=null;function zn(e){var m;var t=this,n=t.ownerDocument,r=e.type,i=((m=e.composedPath)==null?void 0:m.call(e))||[],o=i[0]||e.target;io=e;var s=0,u=io===e&&e.__root;if(u){var a=i.indexOf(u);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var c=i.indexOf(t);if(c===-1)return;a<=c&&(s=a)}if(o=i[s]||e.target,o!==t){na(e,"currentTarget",{configurable:!0,get(){return o||n}});var v=q,g=Z;Re(null),it(null);try{for(var f,d=[];o!==null;){var b=o.assignedSlot||o.parentNode||o.host||null;try{var p=o["__"+r];p!=null&&(!o.disabled||e.target===o)&&p.call(o,e)}catch(k){f?d.push(k):f=k}if(e.cancelBubble||b===t||b===null)break;o=b}if(f){for(let k of d)queueMicrotask(()=>{throw k});throw f}}finally{e.__root=t,delete e.currentTarget,Re(v),it(g)}}}function oo(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function On(e,t){var n=Z;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function M(e,t){var n=(t&Xo)!==0,r=(t&$o)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=oo(o?e:"<!>"+e),n||(i=un(i)));var s=r||Bi?document.importNode(i,!0):i.cloneNode(!0);if(n){var u=un(s),a=s.lastChild;On(u,a)}else On(s,s);return s}}function is(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,o;return()=>{if(!o){var s=oo(i),u=un(s);o=un(u)}var a=o.cloneNode(!0);return On(a,a),a}}function ur(e,t){return is(e,t,"svg")}function Et(e=""){{var t=mt(e+"");return On(t,t),t}}function Xe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=mt();return e.append(t,n),On(t,n),e}function x(e,t){e!==null&&e.before(t)}const os=["touchstart","touchmove"];function as(e){return os.includes(e)}function z(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function ss(e,t){return ls(e,t)}const dn=new Map;function ls(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0}){Ua();var u=new Set,a=g=>{for(var f=0;f<g.length;f++){var d=g[f];if(!u.has(d)){u.add(d);var b=as(d);t.addEventListener(d,zn,{passive:b});var p=dn.get(d);p===void 0?(document.addEventListener(d,zn,{passive:b}),dn.set(d,1)):dn.set(d,p+1)}}};a(Tr(ro)),Fr.add(a);var c=void 0,v=Za(()=>{var g=n??t.appendChild(mt());return Da(g,{pending:()=>{}},f=>{if(o){vt({});var d=ce;d.c=o}i&&(r.$$events=i),c=e(f,r)||{},o&&pt()}),()=>{var b;for(var f of u){t.removeEventListener(f,zn);var d=dn.get(f);--d===0?(document.removeEventListener(f,zn),dn.delete(f)):dn.set(f,d)}Fr.delete(a),g!==n&&((b=g.parentNode)==null||b.removeChild(g))}});return us.set(c,v),c}let us=new WeakMap;class ao{constructor(t,n=!0){ut(this,"anchor");O(this,$e,new Map);O(this,lt,new Map);O(this,je,new Map);O(this,Yt,new Set);O(this,Hn,!0);O(this,Gn,()=>{var t=K;if(h(this,$e).has(t)){var n=h(this,$e).get(t),r=h(this,lt).get(n);if(r)qr(r),h(this,Yt).delete(n);else{var i=h(this,je).get(n);i&&(h(this,lt).set(n,i.effect),h(this,je).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of h(this,$e)){if(h(this,$e).delete(o),o===t)break;const u=h(this,je).get(s);u&&(De(u.effect),h(this,je).delete(s))}for(const[o,s]of h(this,lt)){if(o===n||h(this,Yt).has(o))continue;const u=()=>{if(Array.from(h(this,$e).values()).includes(o)){var c=document.createDocumentFragment();Ki(s,c),c.append(mt()),h(this,je).set(o,{effect:s,fragment:c})}else De(s);h(this,Yt).delete(o),h(this,lt).delete(o)};h(this,Hn)||!r?(h(this,Yt).add(o),cn(s,u,!1)):u()}}});O(this,mr,t=>{h(this,$e).delete(t);const n=Array.from(h(this,$e).values());for(const[r,i]of h(this,je))n.includes(r)||(De(i.effect),h(this,je).delete(r))});this.anchor=t,W(this,Hn,n)}ensure(t,n){var r=K,i=zi();if(n&&!h(this,lt).has(t)&&!h(this,je).has(t))if(i){var o=document.createDocumentFragment(),s=mt();o.append(s),h(this,je).set(t,{effect:Ge(()=>n(s)),fragment:o})}else h(this,lt).set(t,Ge(()=>n(this.anchor)));if(h(this,$e).set(r,t),i){for(const[u,a]of h(this,lt))u===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[u,a]of h(this,je))u===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(h(this,Gn)),r.ondiscard(h(this,mr))}else h(this,Gn).call(this)}}$e=new WeakMap,lt=new WeakMap,je=new WeakMap,Yt=new WeakMap,Hn=new WeakMap,Gn=new WeakMap,mr=new WeakMap;function Ur(e){ce===null&&ca(),nn&&ce.l!==null?cs(ce).m.push(e):Wn(()=>{const t=Ln(e);if(typeof t=="function")return t})}function cs(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function F(e,t,n=!1){var r=new ao(e),i=n?Wt:0;function o(s,u){r.ensure(s,u)}or(()=>{var s=!1;t((u,a=!0)=>{s=!0,o(a,u)}),s||o(!1,null)},i)}function so(e,t,n,r,i){var u;var o=(u=t.$$slots)==null?void 0:u[n],s=!1;o===!0&&(o=t.children,s=!0),o===void 0||o(e,s?()=>r:r)}function lo(e,t,n){var r=new ao(e);or(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Wt)}function bt(e,t){qi(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function uo(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=uo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ds(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uo(e))&&(r&&(r+=" "),r+=t);return r}function fn(e){return typeof e=="object"?ds(e):e??""}function fs(e,t,n){var r=e==null?"":""+e;return t&&(r=r?r+" "+t:t),r===""?null:r}function Tt(e,t,n,r,i,o){var s=e.__className;if(s!==n||s===void 0){var u=fs(n,r);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=n}return o}function co(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Er(t))return ya();for(var r of e.options)r.selected=t.includes(fo(r));return}for(r of e.options){var i=fo(r);if(Fa(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function hs(e){var t=new MutationObserver(()=>{co(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),zr(()=>{t.disconnect()})}function fo(e){return"__value"in e?e.__value:e.value}const vs=Symbol("is custom element"),ps=Symbol("is html");function gs(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function fe(e,t,n,r){var i=ms(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[ua]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ws(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ms(e){return e.__attributes??(e.__attributes={[vs]:e.nodeName.includes("-"),[ps]:e.namespaceURI===ea})}var ho=new Map;function ws(e){var t=e.getAttribute("is")||e.nodeName,n=ho.get(t);if(n)return n;ho.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=ra(i);for(var s in r)r[s].set&&n.push(s);i=pi(i)}return n}function _s(e,t,n=t){var r=new WeakSet;Va(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=Hr(e)?Gr(o):o,n(o),K!==null&&r.add(K),await ts(),o!==(o=t())){var s=e.selectionStart,u=e.selectionEnd,a=e.value.length;if(e.value=o??"",u!==null){var c=e.value.length;s===u&&u===a&&c>a?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=s,e.selectionEnd=Math.min(u,c))}}}),Ln(t)==null&&e.value&&(n(Hr(e)?Gr(e.value):e.value),K!==null&&r.add(K)),Or(()=>{var i=t();if(e===document.activeElement){var o=$n??K;if(r.has(o))return}Hr(e)&&i===Gr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Hr(e){var t=e.type;return t==="number"||t==="range"}function Gr(e){return e===""?null:+e}function vo(e,t){return e===t||(e==null?void 0:e[Bt])===t}function bs(e={},t,n,r){return qi(()=>{var i,o;return Or(()=>{i=o,o=[],Ln(()=>{e!==n(...o)&&(t(e,...o),i&&vo(n(...i),e)&&t(null,...i))})}),()=>{on(()=>{o&&vo(n(...o),e)&&t(null,...o)})}}),e}let cr=!1;function ys(e){var t=cr;try{return cr=!1,[e(),cr]}finally{cr=t}}function Le(e,t,n,r){var j;var i=!nn||(n&Yo)!==0,o=(n&Qo)!==0,s=(n&Jo)!==0,u=r,a=!0,c=()=>(a&&(a=!1,u=s?Ln(r):r),u),v;if(o){var g=Bt in e||la in e;v=((j=$t(e,t))==null?void 0:j.set)??(g&&t in e?_=>e[t]=_:void 0)}var f,d=!1;o?[f,d]=ys(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=c(),v&&(i&&ga(),v(f)));var b;if(i?b=()=>{var _=e[t];return _===void 0?c():(a=!0,_)}:b=()=>{var _=e[t];return _!==void 0&&(u=void 0),_===void 0?u:_},i&&!(n&Zo))return b;if(v){var p=e.$$legacy;return function(_,T){return arguments.length>0?((!i||!T||p||d)&&v(T?b():_),_):b()}}var m=!1,k=(n&Ko?nr:Br)(()=>(m=!1,b()));o&&l(k);var A=Z;return function(_,T){if(arguments.length>0){const P=T?l(k):i&&o?He(_):_;return w(k,P),m=!0,u!==void 0&&(u=P),_}return jt&&m||A.f&ht?k.v:l(k)}}const po="wineater_consent",ks=["wineater_uid","uniqueUserID","sessionID"];function xs(){try{const e=window.localStorage.getItem(po);return e==="granted"||e==="denied"?e:null}catch{return null}}let Vr=Y(He(xs())),dr=Y(null);function Ss(e){w(dr,e,!0)}function go(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:l(dr)===!0}function Cs(){return l(dr)!==null&&go()&&l(Vr)===null}function mo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1||l(dr)===null?!1:go()?l(Vr)==="granted":!0}function Es(){for(const e of ks){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const Kr=new Set;function Ts(e){return Kr.add(e),()=>Kr.delete(e)}function wo(e){w(Vr,e,!0);try{window.localStorage.setItem(po,e)}catch{}e==="denied"&&Es();for(const t of Kr)t(e)}function _o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Yr(e,t,n){let r="";if(n){const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),r="; expires="+i.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/; secure; samesite=strict"}function Zr(e){const t=e+"=",n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function Ps(){const e="uniqueUserID";let t=Zr(e);return t||(t=_o(),Yr(e,t,365)),t}function ze(e,t,n={},r={}){const i="https://admin-api.wineater.com/api/widget-events",o=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!mo()){const f={event_type:e,store_id:t,event_time:o,data:n,meta:{...r,anonymous:!0},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0}).catch(d=>{console.debug("[wineater] anonymous event failed:",d==null?void 0:d.message)})}let a=Zr("uniqueUserID");a||(a=Ps());const c={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let v=Zr("sessionID");v||(v=_o(),Yr("sessionID",v,1));const g={event_type:e,store_id:t,session_id:v,event_time:o,data:n,meta:{...r,user_id:a},device_info:c,region:s,language:u};return fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then(f=>f.ok?f.json():f.json().then(d=>{throw new Error(d.message||"Failed to track widget event")})).catch(f=>{throw console.error("Widget event tracking error:",f),f})}function As(e){return{id:String(e.ID),appellation:e.Appellation||null,country:e.Country||null,grape:e.Grape,image:e.Image,price:Number(e.Price),producer:e.Producer||null,region:e.Region,score:e.Score?Number(e.Score):null,shortDescription:e["Short Description"]||null,store:e.Store,storeId:e.Store_id||null,tags:Array.isArray(e.Tags)?e.Tags.map(String):[],title:e.Title,type:e.Type,url:e.Url||null,vintage:e.Vintage?Number(e.Vintage):null,pairingRecommendation:e.pairing_recommendation||null,total:e.Total?Number(e.Total):null,itemId:e.item_id||null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function fr(e){return{id:String(e.id),title:String(e.title),description:String(e.description),region:String(e.region),price:Number(e.price),grape:String(e.grape),appellation:e.appellation?String(e.appellation):null,url:e.url?String(e.url):null,store:String(e.store),storeId:e.storeId?String(e.storeId):null,image:String(e.image),country:e.country?String(e.country):null,vintage:e.vintage?Number(e.vintage):null,tags:Array.isArray(e.tags)?e.tags.map(String):[],score:e.score?Number(e.score):null,total:e.total?Number(e.total):null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,distance:Number(e.distance),reason:String(e.reason),type:String(e.type),byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Is(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(fr),hasMore:!!e.has_more}}const jn="wineater_uid",Ds=365;let hr=null;function bo(){const e=globalThis.crypto;if(e!=null&&e.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(e!=null&&e.getRandomValues)e.getRandomValues(t);else for(let r=0;r<16;r++)t[r]=Math.random()*256|0;t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const yo=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function ko(e){try{const t=e+"=";for(const n of document.cookie.split(";")){const r=n.trim();if(r.startsWith(t))return decodeURIComponent(r.slice(t.length))}}catch{}return null}function Rs(e,t){try{const n=new Date(Date.now()+Ds*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function xo(){return mo()}Ts(e=>{e==="denied"&&(hr=null)});function Qr(){if(!xo())return null;if(hr)return hr;let e=null;try{e=window.localStorage.getItem(jn)}catch{}(!e||!yo.test(e))&&(e=ko(jn)),(!e||!yo.test(e))&&(e=bo());try{window.localStorage.setItem(jn,e)}catch{}return ko(jn)!==e&&Rs(jn,e),hr=e,e}function So(){return bo()}const Ws=2e3,Co=100;let vr=null,hn=[],qn=null,Eo=!1;function Ns(e){vr=e,!(Eo||typeof document>"u")&&(Eo=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fn()}),window.addEventListener("pagehide",()=>void Fn()))}function vn(e){var t;if(!(!xo()||!vr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(hn.push(e),hn.length>=Co){Fn();return}qn||(qn=setTimeout(()=>void Fn(),Ws))}}async function Fn(){if(qn&&(clearTimeout(qn),qn=null),!vr||hn.length===0)return;const e=Qr();if(!e){hn=[];return}const t=hn.splice(0,Co);try{await vr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}hn.length>0&&Fn()}const Bs="X-Wineater-Uid";class Ms{constructor(t,n="1"){O(this,Ne);O(this,bn,"https://api.wineater.com/");O(this,Vn);O(this,Zt);O(this,yn,!1);W(this,Vn,t),W(this,Zt,n)}async getInstantRecommendations(){try{const t=h(this,Zt)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:n,headers:r}=await V(this,Ne,vi).call(this,t,{});return{wines:n.filter(Boolean).map(As),profileHash:r.get("X-Wineater-Profile")||null}}catch(t){throw new Error(`Error in getInstantRecommendations: ${t.message}`)}}async getWineRecommendationsSearch(t,n){try{const r=h(this,Zt)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search";return(await V(this,Ne,Tn).call(this,r,n?{text:t,query_id:n}:{text:t})).filter(Boolean).map(fr)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(h(this,Zt)!=="2")return i();let o;try{o=await fetch(`${h(this,bn)}dish/recommendations/search/v2/stream`,{method:"POST",headers:V(this,Ne,hi).call(this),body:JSON.stringify(n?{text:t,query_id:n}:{text:t})})}catch{return i()}if(!o.ok||!o.body)return i();const s=o.body.getReader(),u=new TextDecoder;let a="",c=null;const v=g=>(g??[]).filter(Boolean).map(fr);try{for(;;){const{done:g,value:f}=await s.read();f&&(a+=u.decode(f,{stream:!0}));const d=a.split(`
2
+ `);a=g?"":d.pop()??"";for(const b of g?d.filter(Boolean):d){if(!b.trim())continue;const p=JSON.parse(b);if(p.type==="wines")c=v(p.recommendations).map(m=>({...m,reason:""})),r(c);else{if(p.type==="final")return v(p.recommendations);if(p.type==="error")return c||i()}}if(g)break}}catch{return c||i()}return c??i()}async getMoreWineRecommendations(t,n){try{const r=await V(this,Ne,Tn).call(this,"dish/recommendations/search/v2/more",{text:t,exclude_ids:n});return Is(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await V(this,Ne,Tn).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(fr)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await V(this,Ne,Tn).call(this,"events",t,{keepalive:!0})}async getStoreConfig(){try{return await V(this,Ne,Tn).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}bn=new WeakMap,Vn=new WeakMap,Zt=new WeakMap,yn=new WeakMap,Ne=new WeakSet,hi=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${h(this,Vn)}`};if(!h(this,yn)){const n=Qr();n&&(t[Bs]=n)}return t},Tn=async function(t,n,r={}){return(await V(this,Ne,vi).call(this,t,n,r)).data},vi=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:V(this,Ne,hi).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${h(this,bn)}${t}`,i())}catch(a){if(h(this,yn)||!Qr())throw a;W(this,yn,!0),o=await fetch(`${h(this,bn)}${t}`,i())}const s=await o.text(),u=s?JSON.parse(s):null;if(!o.ok)throw new Error(`API call failed with status ${o.status}: ${(u==null?void 0:u.message)||"No additional error information"}`);return{data:u,headers:o.headers}};const To=((Bo=window==null?void 0:window.wineaterData)==null?void 0:Bo.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",Jr=String(((Mo=window==null?void 0:window.wineaterData)==null?void 0:Mo.apiVersion)||"1"),pn=new Ms(To,Jr);Ns(e=>pn.postEvents(e));function Ls(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}const Xr=`${Ls(To)}:${Jr}`,Po="wineater:v1:";function $r(e,t){try{const n=window.localStorage.getItem(Po+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function ei(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(Po+e,JSON.stringify(n))}catch{}}const Oe={WIDGET_INITIALIZED:"widget_initialized",WIDGET_LOADED:"widget_loaded",SEARCH_PERFORMED:"search_performed",SEARCH_RESULTS_DISPLAYED:"search_results_displayed",NO_RESULTS_FOUND:"no_results_found",WINE_CARD_HOVER:"wine_card_hover",WINE_CARD_CLICK:"wine_card_click",WINE_DETAILS_VIEWED:"wine_details_viewed",WINE_DETAILS_CLOSED:"wine_details_closed",BUY_BUTTON_CLICKED:"buy_button_clicked",SHOW_MORE_CLICKED:"show_more_clicked",SIMILAR_WINES_CLICKED:"similar_wines_clicked",FILTER_APPLIED:"filter_applied",LANGUAGE_CHANGED:"language_changed",ERROR_OCCURRED:"error_occurred",MOBILE_VIEW_ACTIVATED:"mobile_view_activated"},zs={fr:{lang:"fr",welcomeMessage:"Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",noResultsFound:"Aucun résultat trouvé.",somethingWentWrong:"Désolé, quelque chose a mal tourné.",chatButton1:"Trouvez l'accord parfait",chatButton2:"Associez le vin",chatButton3:"Obtenez des conseils",chatTitle:"Accord Mets & Vins 🍷",chatSubtitle:"Décrivez votre plat et obtenez une recommandation en 30 secondes",inputPlaceholder:"ex., Salade de thon",sendButton:"Accorder",poweredBy:"Propulsé par",price:"Prix",region:"Région",type:"Type",reason:"Suggestion",moreInfo:"Plus d'infos",tryAgain:"Réessayer",similarWines:"Vins similaires",byTheGlass:"Au verre",winePairingIntro:"Pour ce vin, voici quelques suggestions de plats :",askForDinner:"Que voulez-vous manger ce soir?",clearChatButton:"Effacer le chat",widgetTitle:"TROUVEZ VOTRE VIN PARFAIT",widgetSubtitle:"Partagez tout ce que vous avez en tête—votre repas, humeur, budget ou occasion—et notre sommelier IA vous recommandera le vin parfait en quelques secondes",searchPlaceholder:"Entrez un mot-clé ou une description","wineDetails.reason":"Raison","wineDetails.price":"Prix","wineDetails.region":"Région","wineDetails.type":"Type","wineDetails.moreInfo":"Plus d'infos","wineDetails.code":"Code","wineDetails.buy":"Acheter",searchButton:"Rechercher",priceRange:"Gamme de prix",wineColor:"Couleur du vin",intensity:"Intensité",red:"Rouge",white:"Blanc",rose:"Rosé",light:"Léger",medium:"Moyen",full:"Puissant",barTitle:"Sélection du bar",barSubtitle:"Choisissez vos plats ci-dessous et cliquez sur «Envoyer»",barSendButton:"Envoyer",barResetButton:"Réinitialiser",barName:"Nom du bar",barNotesPlaceholder:"Entrez vos souhaits ici...",placeholderSuggestions:["Vin pour les pâtes","Parfait avec du poisson","Recommandé pour une soirée"],headerLine1:"Partagez tout ce qui vous passe par la tête —",headerLine2:"— et obtenez des recommandations de vin parfait en quelques secondes",headerMeal:"repas",headerMood:"humeur",headerBudget:"budget",headerOccasion:"occasion",headerOr:"ou",errorMessage:"Une erreur est survenue. Veuillez réessayer plus tard.",noResultsMessage:"Aucun résultat trouvé pour votre recherche. Veuillez essayer une autre requête.",ai_sommelier:"AI sommelier",consentText:"L'assistant vin enregistre un identifiant anonyme sur cet appareil pour apprendre vos goûts et améliorer ses recommandations. Vous pouvez l'utiliser sans accepter.",consentAccept:"Accepter",consentDecline:"Refuser",consentPrivacy:"Politique de confidentialité"},es:{lang:"es",welcomeMessage:"¿Qué vas a comer? Cuéntame tu plato y te recomendaré el maridaje perfecto.",noResultsFound:"No se encontraron resultados.",somethingWentWrong:"Lo sentimos, algo salió mal.",chatButton1:"Encuentra tu maridaje",chatButton2:"Combina vino ya",chatButton3:"Recibe asesoría ahora",chatTitle:"Maridaje de Vinos 🍷",chatSubtitle:"Describe tu comida y obtén una recomendación en 30 segundos",inputPlaceholder:"ej., Ensalada de atún",sendButton:"Combinar",poweredBy:"Desarrollado por",price:"Precio",region:"Región",type:"Tipo",reason:"Sugerencia",moreInfo:"Más info",tryAgain:"Probar otra vez",similarWines:"Vinos similares",byTheGlass:"Por copa",winePairingIntro:"Para este vino, aquí tienes algunas sugerencias de platos:",askForDinner:"¿Qué te gustaría cenar?",clearChatButton:"Limpiar el chat",widgetTitle:"ENCUENTRA TU VINO PERFECTO",widgetSubtitle:"Comparte cualquier cosa que tengas en mente—tu comida, estado de ánimo, presupuesto o evento—y nuestro sommelier de IA te recomendará el vino perfecto en segundos",searchPlaceholder:"Escribe una palabra clave o descripción","wineDetails.reason":"Razón","wineDetails.price":"Precio","wineDetails.region":"Región","wineDetails.type":"Tipo","wineDetails.code":"Código","wineDetails.moreInfo":"Más información","wineDetails.buy":"Comprar",searchButton:"Buscar",priceRange:"Rango de precios",wineColor:"Color del vino",intensity:"Intensidad",red:"Tinto",white:"Blanco",rose:"Rosado",light:"Ligero",medium:"Medio",full:"Intenso",barTitle:"Platos de Bar",barSubtitle:"Selecciona de la lista y presiona «Enviar»",barSendButton:"Enviar",barResetButton:"Reiniciar",barName:"Nombre del bar",barNotesPlaceholder:"Agrega tus comentarios aquí...",placeholderSuggestions:["Vino para pasta","Perfecto con pescado","Recomendado para una fiesta"],headerLine1:"Comparte cualquier cosa que tengas en mente —",headerLine2:"— y obtén recomendaciones del vino perfecto en cuestión de segundos",headerMeal:"comida",headerMood:"estado de ánimo",headerBudget:"presupuesto",headerOccasion:"ocasión",headerOr:"o",errorMessage:"Algo salió mal. Por favor, inténtalo de nuevo más tarde.",noResultsMessage:"No se encontraron resultados para tu búsqueda. Por favor, intenta con otra consulta.",ai_sommelier:"AI sommelier",consentText:"El asistente de vinos guarda un identificador anónimo en este dispositivo para conocer tus gustos y mejorar las recomendaciones. Puedes usarlo sin aceptar.",consentAccept:"Aceptar",consentDecline:"Rechazar",consentPrivacy:"Política de privacidad"},en:{lang:"en",welcomeMessage:"What are you planning to eat? Share your dish and I'll recommend the perfect wine pairing for your meal.",noResultsFound:"No results found.",somethingWentWrong:"Sorry, something went wrong.",chatButton1:"Find Your Pairing",chatButton2:"Pair Wine Now",chatButton3:"Get Wine Advice",chatTitle:"Wine Pairing Assistant 🍷",chatSubtitle:"Describe your meal and get a recommendation in 30 seconds",inputPlaceholder:"e.g., Tuna salad",sendButton:"Match",poweredBy:"Powered by",price:"Price",region:"Region",type:"Type",reason:"Suggestion",moreInfo:"More info",tryAgain:"Try again",similarWines:"Similar wines",byTheGlass:"By the glass",winePairingIntro:"For this wine, here are some suggested dishes:",askForDinner:"What would you like to have for dinner?",clearChatButton:"Clear Chat",widgetTitle:"FIND YOUR PERFECT WINE",widgetSubtitle:"Share anything on your mind—your meal, mood, budget, or occasion—and our AI sommelier will recommend the perfect wine in seconds",searchPlaceholder:"Enter a keyword or description","wineDetails.price":"Price","wineDetails.region":"Region","wineDetails.type":"Type","wineDetails.moreInfo":"More info","wineDetails.reason":"Reason","wineDetails.code":"Code","wineDetails.buy":"Buy",searchButton:"Search",priceRange:"Price Range",wineColor:"Wine Color",intensity:"Intensity",red:"Red",white:"White",rose:"Rosé",light:"Light",medium:"Medium",full:"Full",barTitle:"Bar Dishes",barSubtitle:"Select dishes below and click 'Send'",barSendButton:"Send",barResetButton:"Reset",barName:"Bar Name",barNotesPlaceholder:"Add your wishes here...",placeholderSuggestions:["Wine for pasta","Perfect with fish","Recommended for a party"],headerLine1:"Share anything on your mind —",headerLine2:"— and get recommendations of the perfect wine in seconds",headerMeal:"meal",headerMood:"mood",headerBudget:"budget",headerOccasion:"occasion",headerOr:"or",errorMessage:"Something went wrong. Please try again later.",noResultsMessage:"No results found for your search. Please try a different query.",ai_sommelier:"AI sommelier",consentText:"The wine assistant stores an anonymous identifier on this device to learn your taste and improve recommendations. You can use it without accepting.",consentAccept:"Accept",consentDecline:"Decline",consentPrivacy:"Privacy policy"},sr:{lang:"sr",welcomeMessage:"Šta planirate da jedete? Podelite svoje jelo i preporučiću vam savršeno vino uz obrok.",noResultsFound:"Nema rezultata.",somethingWentWrong:"Izvinite, nešto je pošlo po zlu.",chatButton1:"Pronađi vino",chatButton2:"Upari vino sada",chatButton3:"Zatraži preporuku",chatTitle:"Asistent za uparivanje vina 🍷",chatSubtitle:"Opišite svoj obrok i dobijte preporuku za 30 sekundi",inputPlaceholder:"npr. Tuna salata",sendButton:"Upari",poweredBy:"Pokreće",price:"Cena",region:"Regija",type:"Tip",reason:"Preporuka",moreInfo:"Više informacija",tryAgain:"Pokušaj ponovo",similarWines:"Slična vina",byTheGlass:"Na čašu",winePairingIntro:"Za ovo vino, preporučuju se sledeća jela:",askForDinner:"Šta biste želeli za večeru?",clearChatButton:"Obriši razgovor",widgetTitle:"PRONAĐITE SAVRŠENO VINO",widgetSubtitle:"Podelite bilo šta — obrok, raspoloženje, budžet ili priliku — i naš AI somelijer će vam za par sekundi preporučiti vino",searchPlaceholder:"Unesite ključnu reč ili opis","wineDetails.price":"Cena","wineDetails.region":"Regija","wineDetails.type":"Tip","wineDetails.moreInfo":"Više informacija","wineDetails.reason":"Razlog","wineDetails.code":"Šifra","wineDetails.buy":"Kupi",searchButton:"Pretraga",priceRange:"Cenovni raspon",wineColor:"Boja vina",intensity:"Intenzitet",red:"Crveno",white:"Belo",rose:"Roze",light:"Lako",medium:"Srednje",full:"Puno",barTitle:"Jela iz bara",barSubtitle:"Izaberite jela ispod i kliknite 'Pošalji'",barSendButton:"Pošalji",barResetButton:"Resetuj",barName:"Naziv bara",barNotesPlaceholder:"Dodajte svoje želje ovde...",placeholderSuggestions:["Vino uz pastu","Savršeno uz ribu","Preporuka za žurku"],headerLine1:"Podelite bilo šta što vam je na umu —",headerLine2:"— i dobijte preporuke za savršeno vino za par sekundi",headerMeal:"obrok",headerMood:"raspoloženje",headerBudget:"budžet",headerOccasion:"prilika",headerOr:"ili",errorMessage:"Nešto je pošlo po zlu. Molimo pokušajte ponovo kasnije.",noResultsMessage:"Nema rezultata za vašu pretragu. Molimo pokušajte sa drugačijim upitom.",ai_sommelier:"AI sommelier",consentText:"Vinski asistent čuva anonimni identifikator na ovom uređaju kako bi upoznao vaš ukus i poboljšao preporuke. Možete ga koristiti i bez prihvatanja.",consentAccept:"Prihvati",consentDecline:"Odbij",consentPrivacy:"Politika privatnosti"},de:{lang:"de",welcomeMessage:"Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",noResultsFound:"Keine Ergebnisse gefunden.",somethingWentWrong:"Entschuldigung, etwas ist schief gelaufen.",chatButton1:"Finde Dein Pairing",chatButton2:"Wein jetzt wählen",chatButton3:"Erhalte Weinberatung",chatTitle:"Wein & Speisen 🍷",chatSubtitle:"Beschreiben Sie Ihr Gericht und erhalten Sie in 30 Sekunden eine Empfehlung",inputPlaceholder:"z.B., Thunfischsalat",sendButton:"Kombinieren",poweredBy:"Unterstützt von",price:"Preis",region:"Region",type:"Typ",reason:"Anregung",moreInfo:"Mehr Info",tryAgain:"Nochmal versuchen",similarWines:"Ähnliche Weine",byTheGlass:"Glasweise",winePairingIntro:"Für diesen Wein gibt es folgende Essensvorschläge:",askForDinner:"Was möchten Sie zum Abendessen essen?",clearChatButton:"Chat löschen",widgetTitle:"FINDEN SIE IHREN PERFEKTEN WEIN",widgetSubtitle:"Teilen Sie alles, was Ihnen in den Sinn kommt—Ihre Mahlzeit, Stimmung, Ihr Budget oder Anlass—und unser KI-Sommelier empfiehlt Ihnen in Sekunden den perfekten Wein",placeholderSuggestions:["Wein für Pasta","Perfekt zu Fisch","Empfohlen für eine Party"],searchPlaceholder:"Geben Sie ein Stichwort oder eine Beschreibung ein","wineDetails.price":"Preis","wineDetails.region":"Region","wineDetails.type":"Typ","wineDetails.moreInfo":"Mehr Info","wineDetails.reason":"Grund","wineDetails.code":"Code","wineDetails.buy":"Kaufen",searchButton:"Suche",priceRange:"Preisspanne",wineColor:"Weinfarbe",intensity:"Intensität",red:"Rot",white:"Weiß",rose:"Rosé",light:"Leicht",medium:"Mittel",full:"Voll",barTitle:"Bar-Auswahl",barSubtitle:"Wählen Sie Ihre Gerichte und klicken Sie auf 'Senden'",barSendButton:"Senden",barResetButton:"Zurücksetzen",barName:"Name der Bar",headerLine1:"Teilen Sie alles, was Ihnen durch den Kopf geht —",headerLine2:"— und erhalten Sie in Sekundenschnelle Empfehlungen für den perfekten Wein",headerMeal:"Mahlzeit",headerMood:"Stimmung",headerBudget:"Budget",headerOccasion:"Anlass",headerOr:"oder",errorMessage:"Etwas ist schief gelaufen. Bitte versuchen Sie es später erneut.",noResultsMessage:"Keine Ergebnisse für Ihre Suche gefunden. Bitte versuchen Sie es mit einer anderen Anfrage.",ai_sommelier:"AI sommelier",consentText:"Der Weinassistent speichert eine anonyme Kennung auf diesem Gerät, um Ihren Geschmack kennenzulernen und Empfehlungen zu verbessern. Sie können ihn auch ohne Zustimmung nutzen.",consentAccept:"Akzeptieren",consentDecline:"Ablehnen",consentPrivacy:"Datenschutzerklärung"},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",tryAgain:"Спробувати ще",similarWines:"Схожі вина",byTheGlass:"На келих",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис","wineDetails.reason":"Причина","wineDetails.price":"Ціна","wineDetails.region":"Регіон","wineDetails.type":"Тип","wineDetails.moreInfo":"Докладніше","wineDetails.code":"Код","wineDetails.buy":"Купити",searchButton:"Пошук",priceRange:"Діапазон цін",wineColor:"Колір вина",intensity:"Інтенсивність",red:"Червоне",white:"Біле",rose:"Рожеве",light:"Легке",medium:"Середнє",full:"Повне",barTitle:"Закуски до вина",barSubtitle:"Виберіть страви нижче та натисніть «Надіслати»",barSendButton:"Надіслати",barResetButton:"Скинути",barName:"Назва бару",barNotesPlaceholder:"Додайте ваші побажання тут...",placeholderSuggestions:["Вино до пасти","Ідеально до риби","Рекомендуємо для вечірки"],headerLine1:"Поділіться будь-якими вашими думками —",headerLine2:"— і отримайте рекомендації щодо ідеального вина за секунди",headerMeal:"страва",headerMood:"настрій",headerBudget:"бюджет",headerOccasion:"подія",headerOr:"або",errorMessage:"Щось пішло не так. Будь ласка, спробуйте пізніше.",noResultsMessage:"За вашим запитом не знайдено результатів. Спробуйте інший запит.",ai_sommelier:"AI sommelier",consentText:"Винний помічник зберігає на цьому пристрої анонімний ідентифікатор, щоб враховувати ваш смак і покращувати рекомендації. Користуватися можна й без згоди.",consentAccept:"Прийняти",consentDecline:"Відхилити",consentPrivacy:"Політика конфіденційності"},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",tryAgain:"Попробовать ещё",similarWines:"Похожие вина",byTheGlass:"По бокалам",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЬ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание","wineDetails.price":"Цена","wineDetails.region":"Регион","wineDetails.type":"Тип","wineDetails.moreInfo":"Подробнее","wineDetails.reason":"Причина","wineDetails.code":"Код","wineDetails.buy":"Купить",searchButton:"Поиск",priceRange:"Диапазон цен",wineColor:"Цвет вина",intensity:"Интенсивность",red:"Красное",white:"Белое",rose:"Розовое",light:"Лёгкое",medium:"Среднее",full:"Полное",barTitle:"Закуски к вину",barSubtitle:"Выберите блюда ниже и нажмите 'Отправить'",barSendButton:"Отправить",barResetButton:"Сбросить",barName:"Название бара",barNotesPlaceholder:"Добавьте ваши пожелания здесь...",placeholderSuggestions:["Вино для пасты","Идеально к рыбе","Рекомендуем для вечеринки"],headerLine1:"Поделитесь любыми вашими мыслями —",headerLine2:"— и получите рекомендации по идеальному вину за считанные секунды",headerMeal:"блюдо",headerMood:"настроение",headerBudget:"бюджет",headerOccasion:"случай",headerOr:"или",errorMessage:"Что-то пошло не так. Пожалуйста, попробуйте позже.",noResultsMessage:"По вашему запросу не найдено результатов. Попробуйте другой запрос.",ai_sommelier:"AI sommelier",consentText:"Винный помощник сохраняет на этом устройстве анонимный идентификатор, чтобы учитывать ваш вкус и улучшать рекомендации. Пользоваться можно и без согласия.",consentAccept:"Принять",consentDecline:"Отклонить",consentPrivacy:"Политика конфиденциальности"},kk:{lang:"kk",welcomeMessage:"Сіз не жегіңіз келеді? Тағамыңызды сипаттаңыз, мен оған керемет шарап ұсынамын.",noResultsFound:"Нәтижелер табылмады.",somethingWentWrong:"Кешіріңіз, бірдеңе дұрыс болмады.",chatButton1:"Сәйкестік табу",chatButton2:"Шарап таңдау",chatButton3:"Кеңес алу",chatTitle:"Шарап таңдаушы көмекші 🍷",chatSubtitle:"Тағамыңызды сипаттаңыз — 30 секундта ұсыныс алыңыз",inputPlaceholder:"мысалы, тунец салатымен",sendButton:"Таңдау",poweredBy:"Powered by",price:"Бағасы",region:"Өңір",type:"Түрі",reason:"Ұсыныс",moreInfo:"Толығырақ",tryAgain:"Қайта көру",similarWines:"Ұқсас шараптар",byTheGlass:"Бокалмен",winePairingIntro:"Бұл шарапқа келесі тағамдар сәйкес келеді:",askForDinner:"Кешкі асқа не қалайсыз?",clearChatButton:"Чатты тазалау",widgetTitle:"КЕРЕМЕТ ШАРАПТЫ ТАБЫҢЫЗ",widgetSubtitle:"Таңдауларыңызды бөлісіңіз — тағам, көңіл-күй, бюджет немесе жағдай — және біздің AI-сомелье сізге бірнеше секундта шарап ұсынады",searchPlaceholder:"Кілт сөзді немесе сипаттаманы енгізіңіз","wineDetails.price":"Бағасы","wineDetails.region":"Өңір","wineDetails.type":"Түрі","wineDetails.moreInfo":"Толығырақ","wineDetails.reason":"Себебі","wineDetails.code":"Код","wineDetails.buy":"Сатып алу",searchButton:"Іздеу",priceRange:"Баға диапазоны",wineColor:"Шарап түсі",intensity:"Қанықтылық",red:"Қызыл",white:"Ақ",rose:"Розалық",light:"Жеңіл",medium:"Орташа",full:"Толық",barTitle:"Шарапқа арналған тіскебасарлар",barSubtitle:"Төмендегі тағамдарды таңдаңыз және 'Жіберу' батырмасын басыңыз",barSendButton:"Жіберу",barResetButton:"Қалпына келтіру",barName:"Бар атауы",barNotesPlaceholder:"Мұнда өз тілектеріңізді жазыңыз...",placeholderSuggestions:["Пастаға арналған шарап","Балыққа тамаша үйлеседі","Кешке ұсынуға болады"],headerLine1:"Ойларыңызбен бөлісіңіз —",headerLine2:"— және бірнеше секундта мінсіз шарап ұсынысын алыңыз",headerMeal:"тағам",headerMood:"көңіл-күй",headerBudget:"бюджет",headerOccasion:"жағдай",headerOr:"немесе",errorMessage:"Бірдеңе дұрыс болмады. Кейінірек қайта көріңіз.",noResultsMessage:"Іздеуіңізге сәйкес нәтиже табылмады. Басқа сұрау қолданып көріңіз.",ai_sommelier:"AI sommelier",consentText:"Шарап көмекшісі сіздің талғамыңызды ескеріп, ұсыныстарды жақсарту үшін осы құрылғыда анонимді идентификатор сақтайды. Келісімсіз де пайдалана аласыз.",consentAccept:"Қабылдау",consentDecline:"Бас тарту",consentPrivacy:"Құпиялылық саясаты"},pt:{lang:"pt",welcomeMessage:"O que você planeja comer? Descreva seu prato e eu recomendarei a harmonização perfeita.",noResultsFound:"Nenhum resultado encontrado.",somethingWentWrong:"Desculpe, algo deu errado.",chatButton1:"Encontre sua harmonização",chatButton2:"Harmonizar vinho agora",chatButton3:"Receber conselho de vinho",chatTitle:"Assistente de Harmonização de Vinhos 🍷",chatSubtitle:"Descreva sua refeição e receba uma recomendação em 30 segundos",inputPlaceholder:"ex., Salada de atum",sendButton:"Harmonizar",poweredBy:"Desenvolvido por",price:"Preço",region:"Região",type:"Tipo",reason:"Sugestão",moreInfo:"Mais informações",tryAgain:"Tentar de novo",similarWines:"Vinhos semelhantes",byTheGlass:"Por taça",winePairingIntro:"Para este vinho, aqui estão algumas sugestões de pratos:",askForDinner:"O que você gostaria de jantar?",clearChatButton:"Limpar chat",widgetTitle:"ENCONTRE SEU VINHO PERFEITO",widgetSubtitle:"Compartilhe o que tiver em mente — sua refeição, humor, orçamento ou ocasião — e nosso sommelier de IA recomendará o vinho perfeito em segundos",searchPlaceholder:"Digite uma palavra-chave ou descrição","wineDetails.reason":"Motivo","wineDetails.price":"Preço","wineDetails.region":"Região","wineDetails.type":"Tipo","wineDetails.moreInfo":"Mais informações","wineDetails.code":"Código","wineDetails.buy":"Comprar",searchButton:"Pesquisar",priceRange:"Faixa de preço",wineColor:"Cor do vinho",intensity:"Intensidade",red:"Tinto",white:"Branco",rose:"Rosé",light:"Leve",medium:"Médio",full:"Encorpado",barTitle:"Pratos do bar",barSubtitle:"Selecione os pratos abaixo e clique em 'Enviar'",barSendButton:"Enviar",barResetButton:"Resetar",barName:"Nome do bar",barNotesPlaceholder:"Adicione seus desejos aqui...",placeholderSuggestions:["Vinho para massa","Perfeito com peixe","Recomendado para uma festa"],headerLine1:"Compartilhe o que tiver em mente —",headerLine2:"— e receba recomendações do vinho perfeito em segundos",headerMeal:"refeição",headerMood:"humor",headerBudget:"orçamento",headerOccasion:"ocasião",headerOr:"ou",errorMessage:"Algo deu errado. Por favor, tente novamente mais tarde.",noResultsMessage:"Nenhum resultado encontrado para sua pesquisa. Por favor, tente uma consulta diferente.",ai_sommelier:"AI sommelier",consentText:"O assistente de vinhos guarda um identificador anónimo neste dispositivo para conhecer o seu gosto e melhorar as recomendações. Pode usá-lo sem aceitar.",consentAccept:"Aceitar",consentDecline:"Recusar",consentPrivacy:"Política de privacidade"}};function Os(e){return{id:String(e.id),lang:e.lang,available_languages:e.available_languages?e.available_languages:[e.lang],open_ai_key:e.open_ai_key??null,currency:e.currency,title:e.title,requires_cookie_consent:e.requires_cookie_consent===!0}}const js={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/plou_logo.jpg",brandColor:"#e6c6bb"},25:{logoUrl:null,brandColor:"#000000",wineaterColor:"#000000",buttonUppercase:!0,customCss:`
2
3
  @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap');
3
4
  :root { --wineater-font-primary: 'Roboto', sans-serif; }
4
5
  #wr-Custom {
@@ -99,10 +100,10 @@
99
100
  background-color: #8bae98;
100
101
  }
101
102
  }
102
- `}};function Os(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
103
+ `}};function qs(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
103
104
  @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
104
105
  :root { --wineater-font-primary: 'Bricolage Grotesque', serif; }
105
- `},n=zs[e]||{};return{...t,...n}}const js=24*60*60*1e3;let te=Oe({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null});const fe={getLanguageFromURL(){return new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(te==null?void 0:te.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=te.storeConfig)==null?void 0:e.lang)??null},getApiKey(){var e;return((e=te.storeConfig)==null?void 0:e.open_ai_key)??null},getStoreId(){var e;return((e=te.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(te.storeConfig&&te.storeConfig.available_languages.includes(e)){te.currentLanguage=e;const t=new URLSearchParams(window.location.search);t.set("lang",e);const n=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",n)}else throw new Error(`Language ${e} is not available in store configuration.`)},getSupportedLanguages(){var e;return((e=te.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=te.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=te.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){te.storeConfig=Ls(e),te.currentLanguage=te.storeConfig.lang;const t=this.getLanguageFromURL();t&&te.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(te.storeConfig.lang),this.setUiConfig(Os(te.storeConfig.id)),ks(te.storeConfig.requires_cookie_consent),te.isConfigLoaded=!0},async initializeStore(){const e=`${yo}:store-config:v2`,t=async()=>{const n=await fn.getStoreConfig();return So(e,n),n};try{const n=xo(e,js);if(n)try{this.applyStoreConfig(n),t().catch(()=>{});return}catch(r){console.warn("Ignoring invalid cached store config:",r)}this.applyStoreConfig(await t())}catch(n){console.error("Failed to initialize store:",n),te.isConfigLoaded=!1}},isInitialized(){return te.isConfigLoaded},getUiConfig(){return te.uiConfig},setUiConfig(e){te.uiConfig=e}},qs={en:"en-US",de:"de-DE",fr:"fr-FR",es:"es-ES",it:"it-IT",ja:"ja-JP",zh:"zh-CN",ru:"ru-RU",kk:"kk-KZ",pt:"pt-PT"};function Fs(e,t,n="en"){try{return new Intl.NumberFormat(qs[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function oe({key:e,lang:t}){const n=Ms,r=fe.getUiConfig(),i=(r==null?void 0:r.translations)||{};if(i[t]&&i[t][e])return i[t][e];if(n[t]&&n[t][e])return n[t][e];throw new Error(`Translation for key "${e}" not found in language "${t}".`)}async function Us({sourceLang:e,targetLang:t,texts:n,apiKey:r}){var d,v,p,f;if(!r||!e||!t||e===t)return n;const i="https://api.openai.com/v1/chat/completions",o={"Content-Type":"application/json",Authorization:`Bearer ${r}`},s=Object.entries(n).map(([c,w])=>({key:c,text:w})),u=`
106
+ `},n=js[e]||{};return{...t,...n}}const Fs=24*60*60*1e3;let ne=He({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null});const he={getLanguageFromURL(){return new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(ne==null?void 0:ne.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=ne.storeConfig)==null?void 0:e.lang)??null},getApiKey(){var e;return((e=ne.storeConfig)==null?void 0:e.open_ai_key)??null},getStoreId(){var e;return((e=ne.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(ne.storeConfig&&ne.storeConfig.available_languages.includes(e)){ne.currentLanguage=e;const t=new URLSearchParams(window.location.search);t.set("lang",e);const n=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",n)}else throw new Error(`Language ${e} is not available in store configuration.`)},getSupportedLanguages(){var e;return((e=ne.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=ne.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=ne.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){ne.storeConfig=Os(e),ne.currentLanguage=ne.storeConfig.lang;const t=this.getLanguageFromURL();t&&ne.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(ne.storeConfig.lang),this.setUiConfig(qs(ne.storeConfig.id)),Ss(ne.storeConfig.requires_cookie_consent),ne.isConfigLoaded=!0},async initializeStore(){const e=`${Xr}:store-config:v2`,t=async()=>{const n=await pn.getStoreConfig();return ei(e,n),n};try{const n=$r(e,Fs);if(n)try{this.applyStoreConfig(n),t().catch(()=>{});return}catch(r){console.warn("Ignoring invalid cached store config:",r)}this.applyStoreConfig(await t())}catch(n){console.error("Failed to initialize store:",n),ne.isConfigLoaded=!1}},isInitialized(){return ne.isConfigLoaded},getUiConfig(){return ne.uiConfig},setUiConfig(e){ne.uiConfig=e}},Us={en:"en-US",de:"de-DE",fr:"fr-FR",es:"es-ES",it:"it-IT",ja:"ja-JP",zh:"zh-CN",ru:"ru-RU",kk:"kk-KZ",pt:"pt-PT"};function Hs(e,t,n="en"){try{return new Intl.NumberFormat(Us[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function oe({key:e,lang:t}){const n=zs,r=he.getUiConfig(),i=(r==null?void 0:r.translations)||{};if(i[t]&&i[t][e])return i[t][e];if(n[t]&&n[t][e])return n[t][e];throw new Error(`Translation for key "${e}" not found in language "${t}".`)}async function Gs({sourceLang:e,targetLang:t,texts:n,apiKey:r}){var c,v,g,f;if(!r||!e||!t||e===t)return n;const i="https://api.openai.com/v1/chat/completions",o={"Content-Type":"application/json",Authorization:`Bearer ${r}`},s=Object.entries(n).map(([d,b])=>({key:d,text:b})),u=`
106
107
  You are a professional translator.
107
108
 
108
109
  The input texts are written in language with code "${e}". Your task is to translate them strictly to the target language with code "${t}".
@@ -127,18 +128,18 @@ Output:
127
128
 
128
129
  Now translate the following input:
129
130
  ${JSON.stringify(s,null,2)}
130
- `,a=JSON.stringify({model:"gpt-3.5-turbo",messages:[{role:"system",content:"You are a professional translator."},{role:"user",content:u}],temperature:.2,max_tokens:1e3});try{const w=await(await fetch(i,{method:"POST",headers:o,body:a})).json(),b=(f=(p=(v=(d=w==null?void 0:w.choices)==null?void 0:d[0])==null?void 0:v.message)==null?void 0:p.content)==null?void 0:f.trim();if(!b)throw new Error("No response from OpenAI");const _=JSON.parse(b),k={};return _.forEach(A=>{A.key&&A.text!==void 0&&(k[A.key]=A.text)}),{...n,...k}}catch(c){return console.error("Error translating texts:",c),n}}xa();var Hs=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M10.036 4.96326H28.2826L34.3648 14.0865L19.1593 33.8537L3.95381 14.0865L10.036 4.96326Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.6388 4.96326L13.0771 14.0865L19.1593 33.8537L25.2415 14.0865L20.6799 4.96326" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.95381 14.0867H34.3648" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Co(e,t){let n=De(t,"className",8,""),r=De(t,"size",8,20);var i=Hs();B(()=>{St(i,0,un(n())),de(i,"width",r()),de(i,"height",r())}),x(e,i)}var Vs=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M29.533 21.4034C31.7986 19.1834 34.0946 16.5224 34.0946 13.0404C34.0946 10.8224 33.2135 8.69521 31.6451 7.12684C30.0768 5.55847 27.9496 4.67737 25.7316 4.67737C23.0554 4.67737 21.1699 5.43764 18.8891 7.71847C16.6083 5.43764 14.7228 4.67737 12.0467 4.67737C9.82865 4.67737 7.70148 5.55847 6.13311 7.12684C4.56474 8.69521 3.68364 10.8224 3.68364 13.0404C3.68364 16.5376 5.96446 19.1986 8.24528 21.4034L18.8891 32.0472L29.533 21.4034Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.8891 19.8829L17.3686 18.3623L20.4097 15.3212L15.848 10.7596L18.8891 7.71851" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Eo(e,t){let n=De(t,"className",8,""),r=De(t,"size",8,20);var i=Vs();B(()=>{St(i,0,un(n())),de(i,"width",r()),de(i,"height",r())}),x(e,i)}var Gs=ar('<svg viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 17.655a3.801 3.801 0 1 0 0-7.602 3.801 3.801 0 0 0 0 7.602Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 3.97a9.884 9.884 0 0 0-9.458 6.995c-1.673 4.76-1.186 5.93-4.835 9.245a4.562 4.562 0 0 0 2.889 8.09c6.082 0 12.772-2.738 17.334-6.54a9.885 9.885 0 0 0-5.93-17.79Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="m28.693 10.053 3.33 6.842c.316.983.475 2.009.471 3.041a9.867 9.867 0 0 1-3.953 7.907c-4.562 3.801-11.252 6.538-17.334 6.538a4.562 4.562 0 0 1-4.075-2.524l-2.92-5.839"></path></svg>');function Yr(e,t){let n=De(t,"className",8,""),r=De(t,"size",8,20);var i=Gs();B(()=>{St(i,0,un(n())),de(i,"width",r()),de(i,"height",r())}),x(e,i)}var Ks=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" fill="none"><path d="M9.03846 17.0001C10.3456 12.1888 15.9077 8.65686 20.858 8.65686C25.8083 8.65686 29.2846 12.1888 30.5917 17.0001C29.2846 21.8252 25.8083 25.3432 20.858 25.3432C15.9077 25.3432 10.3456 21.8252 9.03846 17.0001Z" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M25.0296 17V17.6953" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2485 25.2457C20.4397 22.8774 19.4599 19.98 19.4599 16.9999C19.4599 14.0198 20.4397 11.1224 22.2485 8.75403" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.73372 15.1506C9.73372 11.4379 7.75916 8.6151 3.79615 7.96155C2.40562 10.0473 2.40562 14.9142 4.11597 17C2.39171 19.0858 2.39171 23.9527 3.79615 26.0385C7.75916 25.3849 9.73372 22.5621 9.73372 18.8494" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.545 10.4089C14.1834 8.48998 12.7512 6.20951 11.1243 4.48525H19.1893C19.8491 4.4828 20.4883 4.71502 20.9927 5.14042C21.497 5.56582 21.8337 6.15668 21.9426 6.80744L22.2624 8.75418" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2624 25.2459L21.9426 27.1926C21.8337 27.8434 21.497 28.4342 20.9927 28.8596C20.4883 29.285 19.8491 29.5172 19.1893 29.5148H13.2101C14.5573 27.9873 15.2948 26.0172 15.2819 23.9805" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function To(e,t){let n=De(t,"className",8,""),r=De(t,"size",8,20);var i=Ks();B(()=>{St(i,0,un(n())),de(i,"width",r()),de(i,"height",r())}),x(e,i)}var Ys=M('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Zs=M('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Qs=M('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Js=M('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),Xs=M('<h1 class="wr-Header-title svelte-oiwvqb"> <span><!></span> <span class="wr-Header-label svelte-oiwvqb"> </span>, <!> <span class="wr-Header-label svelte-oiwvqb"> </span> <br/> <!> <span class="wr-Header-label svelte-oiwvqb"> </span> </h1>'),$s=M('<div class="wr-Header"><!></div>');const el={hash:"svelte-oiwvqb",code:`.wr-Header-title.svelte-oiwvqb {font-weight:600;font-size:24px;margin:0 auto;line-height:1.3;color:#333;text-align:center;
131
+ `,a=JSON.stringify({model:"gpt-3.5-turbo",messages:[{role:"system",content:"You are a professional translator."},{role:"user",content:u}],temperature:.2,max_tokens:1e3});try{const b=await(await fetch(i,{method:"POST",headers:o,body:a})).json(),p=(f=(g=(v=(c=b==null?void 0:b.choices)==null?void 0:c[0])==null?void 0:v.message)==null?void 0:g.content)==null?void 0:f.trim();if(!p)throw new Error("No response from OpenAI");const m=JSON.parse(p),k={};return m.forEach(A=>{A.key&&A.text!==void 0&&(k[A.key]=A.text)}),{...n,...k}}catch(d){return console.error("Error translating texts:",d),n}}Ca();var Vs=ur('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M10.036 4.96326H28.2826L34.3648 14.0865L19.1593 33.8537L3.95381 14.0865L10.036 4.96326Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.6388 4.96326L13.0771 14.0865L19.1593 33.8537L25.2415 14.0865L20.6799 4.96326" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.95381 14.0867H34.3648" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ao(e,t){let n=Le(t,"className",8,""),r=Le(t,"size",8,20);var i=Vs();B(()=>{Tt(i,0,fn(n())),fe(i,"width",r()),fe(i,"height",r())}),x(e,i)}var Ks=ur('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M29.533 21.4034C31.7986 19.1834 34.0946 16.5224 34.0946 13.0404C34.0946 10.8224 33.2135 8.69521 31.6451 7.12684C30.0768 5.55847 27.9496 4.67737 25.7316 4.67737C23.0554 4.67737 21.1699 5.43764 18.8891 7.71847C16.6083 5.43764 14.7228 4.67737 12.0467 4.67737C9.82865 4.67737 7.70148 5.55847 6.13311 7.12684C4.56474 8.69521 3.68364 10.8224 3.68364 13.0404C3.68364 16.5376 5.96446 19.1986 8.24528 21.4034L18.8891 32.0472L29.533 21.4034Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.8891 19.8829L17.3686 18.3623L20.4097 15.3212L15.848 10.7596L18.8891 7.71851" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Io(e,t){let n=Le(t,"className",8,""),r=Le(t,"size",8,20);var i=Ks();B(()=>{Tt(i,0,fn(n())),fe(i,"width",r()),fe(i,"height",r())}),x(e,i)}var Ys=ur('<svg viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 17.655a3.801 3.801 0 1 0 0-7.602 3.801 3.801 0 0 0 0 7.602Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 3.97a9.884 9.884 0 0 0-9.458 6.995c-1.673 4.76-1.186 5.93-4.835 9.245a4.562 4.562 0 0 0 2.889 8.09c6.082 0 12.772-2.738 17.334-6.54a9.885 9.885 0 0 0-5.93-17.79Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="m28.693 10.053 3.33 6.842c.316.983.475 2.009.471 3.041a9.867 9.867 0 0 1-3.953 7.907c-4.562 3.801-11.252 6.538-17.334 6.538a4.562 4.562 0 0 1-4.075-2.524l-2.92-5.839"></path></svg>');function ti(e,t){let n=Le(t,"className",8,""),r=Le(t,"size",8,20);var i=Ys();B(()=>{Tt(i,0,fn(n())),fe(i,"width",r()),fe(i,"height",r())}),x(e,i)}var Zs=ur('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" fill="none"><path d="M9.03846 17.0001C10.3456 12.1888 15.9077 8.65686 20.858 8.65686C25.8083 8.65686 29.2846 12.1888 30.5917 17.0001C29.2846 21.8252 25.8083 25.3432 20.858 25.3432C15.9077 25.3432 10.3456 21.8252 9.03846 17.0001Z" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M25.0296 17V17.6953" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2485 25.2457C20.4397 22.8774 19.4599 19.98 19.4599 16.9999C19.4599 14.0198 20.4397 11.1224 22.2485 8.75403" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.73372 15.1506C9.73372 11.4379 7.75916 8.6151 3.79615 7.96155C2.40562 10.0473 2.40562 14.9142 4.11597 17C2.39171 19.0858 2.39171 23.9527 3.79615 26.0385C7.75916 25.3849 9.73372 22.5621 9.73372 18.8494" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.545 10.4089C14.1834 8.48998 12.7512 6.20951 11.1243 4.48525H19.1893C19.8491 4.4828 20.4883 4.71502 20.9927 5.14042C21.497 5.56582 21.8337 6.15668 21.9426 6.80744L22.2624 8.75418" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2624 25.2459L21.9426 27.1926C21.8337 27.8434 21.497 28.4342 20.9927 28.8596C20.4883 29.285 19.8491 29.5172 19.1893 29.5148H13.2101C14.5573 27.9873 15.2948 26.0172 15.2819 23.9805" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Do(e,t){let n=Le(t,"className",8,""),r=Le(t,"size",8,20);var i=Zs();B(()=>{Tt(i,0,fn(n())),fe(i,"width",r()),fe(i,"height",r())}),x(e,i)}var Qs=M('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Js=M('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Xs=M('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),$s=M('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),el=M('<h1 class="wr-Header-title svelte-oiwvqb"> <span><!></span> <span class="wr-Header-label svelte-oiwvqb"> </span>, <!> <span class="wr-Header-label svelte-oiwvqb"> </span> <br/> <!> <span class="wr-Header-label svelte-oiwvqb"> </span> </h1>'),tl=M('<div class="wr-Header"><!></div>');const nl={hash:"svelte-oiwvqb",code:`.wr-Header-title.svelte-oiwvqb {font-weight:600;font-size:24px;margin:0 auto;line-height:1.3;color:#333;text-align:center;
131
132
 
132
133
  /* TODO: add wineater-color to svg */}.wr-Header-icon {display:inline-block;vertical-align:middle;color:var(--wr-wineater-color);}.wr-Header-label.svelte-oiwvqb {color:var(--wr-wineater-color);font-weight:500;}
133
134
 
134
135
  @media screen and (max-width: 768px) {.wr-Header-title.svelte-oiwvqb {display:none;}
135
- }`};function tl(e,t){dt(t,!0),mt(e,el);let n=re(()=>fe.getAppLanguage()),r=re(()=>fe.getUiConfig()),i=re(()=>{var f,c;return((f=window==null?void 0:window.wineaterData)==null?void 0:f.TITLE_TEXT)||((c=l(r))==null?void 0:c.titleText)||null}),o=G(Oe(Yr));function s(f){return f.split(/(meal|mood|occasion)/gi).map(c=>({keyword:/^(meal|mood|occasion)$/i.test(c)?c.toLowerCase():null,text:c}))}let u=re(()=>l(i)?s(l(i)):null);var a=$s(),d=T(a);{var v=f=>{var c=Js();Mt(c,21,()=>l(u),rn,(w,b)=>{var _=Ke(),k=_e(_);{var A=m=>{var E=Ys(),P=_e(E),C=T(P);to(C,()=>l(o),(X,J)=>{J(X,{className:"wr-Header-icon",size:"28"})});var D=W(P),N=T(D);B(()=>O(N,l(b).text)),gt("mouseenter",P,()=>g(o,To,!0)),gt("mouseleave",P,()=>g(o,Yr,!0)),x(m,E)},q=m=>{var E=Ke(),P=_e(E);{var C=N=>{var X=Zs(),J=_e(X);Eo(J,{className:"wr-Header-icon",size:"28"});var L=W(J),pe=T(L);B(()=>O(pe,l(b).text)),x(N,X)},D=N=>{var X=Ke(),J=_e(X);{var L=ee=>{var ye=Qs(),Qe=_e(ye);Co(Qe,{className:"wr-Header-icon",size:"28"});var jn=W(Qe),qn=T(jn);B(()=>O(qn,l(b).text)),x(ee,ye)},pe=ee=>{var ye=xt();B(()=>O(ye,l(b).text)),x(ee,ye)};U(J,ee=>{l(b).keyword==="occasion"?ee(L):ee(pe,!1)},!0)}x(N,X)};U(P,N=>{l(b).keyword==="mood"?N(C):N(D,!1)},!0)}x(m,E)};U(k,m=>{l(b).keyword==="meal"?m(A):m(q,!1)})}x(w,_)}),x(f,c)},p=f=>{var c=Xs(),w=T(c),b=W(w),_=T(b);to(_,()=>l(o),(J,L)=>{L(J,{className:"wr-Header-icon",size:"28"})});var k=W(b,2),A=T(k),q=W(k,2);Eo(q,{className:"wr-Header-icon",size:"28"});var m=W(q,2),E=T(m),P=W(m,3),C=W(P);Co(C,{className:"wr-Header-icon",size:"28"});var D=W(C,2),N=T(D),X=W(D);B((J,L,pe,ee,ye,Qe)=>{O(w,`${J??""} `),O(A,L),O(E,pe),O(P,` ${ee??""} `),O(N,ye),O(X,` ${Qe??""}`)},[()=>oe({key:"headerLine1",lang:l(n)}),()=>oe({key:"headerMeal",lang:l(n)}),()=>oe({key:"headerMood",lang:l(n)}),()=>oe({key:"headerOr",lang:l(n)}),()=>oe({key:"headerOccasion",lang:l(n)}),()=>oe({key:"headerLine2",lang:l(n)})]),gt("mouseenter",b,()=>g(o,To,!0)),gt("mouseleave",b,()=>g(o,Yr,!0)),x(f,c)};U(d,f=>{l(u)?f(v):f(p,!1)})}x(e,a),ft()}var nl=M('<option class="wr-Footer-lang"> </option>'),rl=M('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),il=M('<footer class="wr-Footer svelte-1sr6y3t"><div class="wr-Footer-center svelte-1sr6y3t"><a href="https://wineater.com" class="wr-Footer-link svelte-1sr6y3t" target="_blank"><span class="wr-Footer-text"> </span> <img class="wr-Footer-logo svelte-1sr6y3t" alt="Wineater Logo" loading="lazy" decoding="async"/> <span class="wr-Footer-text wr-Footer-text--sommelier svelte-1sr6y3t"> </span></a></div> <!></footer>');const ol={hash:"svelte-1sr6y3t",code:`.wr-Footer.svelte-1sr6y3t {position:relative;border-top:2px solid #f6f7fd;font-weight:200;padding:12px 24px;min-height:40px;}.wr-Footer-center.svelte-1sr6y3t {position:absolute;left:50%;transform:translateX(-50%);text-align:center;}.wr-Footer-dropdown.svelte-1sr6y3t {position:absolute;right:0px;top:50%;transform:translateY(-50%);padding:4px;border-radius:6px;border:2px solid var(--wr-brand-color);background-color:white;color:var(--wr-brand-color);font-weight:500;font-size:12px;cursor:pointer;transition:all 0.2s ease;}.wr-Footer-dropdown.svelte-1sr6y3t:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.2);}.wr-Footer-link.svelte-1sr6y3t {text-decoration:none;display:flex;align-items:center;white-space:nowrap;gap:8px;color:#a8a8a8;font-size:12px;line-height:16px;transition:opacity 0.2s ease;}.wr-Footer-link.svelte-1sr6y3t:hover {opacity:0.8;}.wr-Footer-logo.svelte-1sr6y3t {height:16px;width:auto;color:#a8a8a8;}
136
+ }`};function rl(e,t){vt(t,!0),bt(e,nl);let n=ie(()=>he.getAppLanguage()),r=ie(()=>he.getUiConfig()),i=ie(()=>{var f,d;return((f=window==null?void 0:window.wineaterData)==null?void 0:f.TITLE_TEXT)||((d=l(r))==null?void 0:d.titleText)||null}),o=Y(He(ti));function s(f){return f.split(/(meal|mood|occasion)/gi).map(d=>({keyword:/^(meal|mood|occasion)$/i.test(d)?d.toLowerCase():null,text:d}))}let u=ie(()=>l(i)?s(l(i)):null);var a=tl(),c=E(a);{var v=f=>{var d=$s();zt(d,21,()=>l(u),sn,(b,p)=>{var m=Xe(),k=ke(m);{var A=_=>{var T=Qs(),P=ke(T),C=E(P);lo(C,()=>l(o),(X,U)=>{U(X,{className:"wr-Header-icon",size:"28"})});var R=N(P),I=E(R);B(()=>z(I,l(p).text)),_t("mouseenter",P,()=>w(o,Do,!0)),_t("mouseleave",P,()=>w(o,ti,!0)),x(_,T)},j=_=>{var T=Xe(),P=ke(T);{var C=I=>{var X=Js(),U=ke(X);Io(U,{className:"wr-Header-icon",size:"28"});var G=N(U),we=E(G);B(()=>z(we,l(p).text)),x(I,X)},R=I=>{var X=Xe(),U=ke(X);{var G=$=>{var Ee=Xs(),_e=ke(Ee);Ao(_e,{className:"wr-Header-icon",size:"28"});var Qt=N(_e),kn=E(Qt);B(()=>z(kn,l(p).text)),x($,Ee)},we=$=>{var Ee=Et();B(()=>z(Ee,l(p).text)),x($,Ee)};F(U,$=>{l(p).keyword==="occasion"?$(G):$(we,!1)},!0)}x(I,X)};F(P,I=>{l(p).keyword==="mood"?I(C):I(R,!1)},!0)}x(_,T)};F(k,_=>{l(p).keyword==="meal"?_(A):_(j,!1)})}x(b,m)}),x(f,d)},g=f=>{var d=el(),b=E(d),p=N(b),m=E(p);lo(m,()=>l(o),(U,G)=>{G(U,{className:"wr-Header-icon",size:"28"})});var k=N(p,2),A=E(k),j=N(k,2);Io(j,{className:"wr-Header-icon",size:"28"});var _=N(j,2),T=E(_),P=N(_,3),C=N(P);Ao(C,{className:"wr-Header-icon",size:"28"});var R=N(C,2),I=E(R),X=N(R);B((U,G,we,$,Ee,_e)=>{z(b,`${U??""} `),z(A,G),z(T,we),z(P,` ${$??""} `),z(I,Ee),z(X,` ${_e??""}`)},[()=>oe({key:"headerLine1",lang:l(n)}),()=>oe({key:"headerMeal",lang:l(n)}),()=>oe({key:"headerMood",lang:l(n)}),()=>oe({key:"headerOr",lang:l(n)}),()=>oe({key:"headerOccasion",lang:l(n)}),()=>oe({key:"headerLine2",lang:l(n)})]),_t("mouseenter",p,()=>w(o,Do,!0)),_t("mouseleave",p,()=>w(o,ti,!0)),x(f,d)};F(c,f=>{l(u)?f(v):f(g,!1)})}x(e,a),pt()}var il=M('<option class="wr-Footer-lang"> </option>'),ol=M('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),al=M('<footer class="wr-Footer svelte-1sr6y3t"><div class="wr-Footer-center svelte-1sr6y3t"><a href="https://wineater.com" class="wr-Footer-link svelte-1sr6y3t" target="_blank"><span class="wr-Footer-text"> </span> <img class="wr-Footer-logo svelte-1sr6y3t" alt="Wineater Logo" loading="lazy" decoding="async"/> <span class="wr-Footer-text wr-Footer-text--sommelier svelte-1sr6y3t"> </span></a></div> <!></footer>');const sl={hash:"svelte-1sr6y3t",code:`.wr-Footer.svelte-1sr6y3t {position:relative;border-top:2px solid #f6f7fd;font-weight:200;padding:12px 24px;min-height:40px;}.wr-Footer-center.svelte-1sr6y3t {position:absolute;left:50%;transform:translateX(-50%);text-align:center;}.wr-Footer-dropdown.svelte-1sr6y3t {position:absolute;right:0px;top:50%;transform:translateY(-50%);padding:4px;border-radius:6px;border:2px solid var(--wr-brand-color);background-color:white;color:var(--wr-brand-color);font-weight:500;font-size:12px;cursor:pointer;transition:all 0.2s ease;}.wr-Footer-dropdown.svelte-1sr6y3t:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.2);}.wr-Footer-link.svelte-1sr6y3t {text-decoration:none;display:flex;align-items:center;white-space:nowrap;gap:8px;color:#a8a8a8;font-size:12px;line-height:16px;transition:opacity 0.2s ease;}.wr-Footer-link.svelte-1sr6y3t:hover {opacity:0.8;}.wr-Footer-logo.svelte-1sr6y3t {height:16px;width:auto;color:#a8a8a8;}
136
137
 
137
138
  @media screen and (max-width: 768px) {.wr-Footer-text--sommelier.svelte-1sr6y3t {display:none;}
138
- }`};function al(e,t){dt(t,!0),mt(e,ol);let n=De(t,"countryCode",3,null),r=re(()=>fe.getAppLanguage()),i=re(()=>fe.getSupportedLanguages()),o=re(()=>fe.getStoreId());function s(k){const q=k.target.value;Re(We.LANGUAGE_CHANGED,l(o),{from_language:l(r),to_language:q}),fe.setStoreLanguage(q)}var u=il(),a=T(u),d=T(a),v=T(d),p=T(v),f=W(v,2),c=W(f,2),w=T(c),b=W(a,2);{var _=k=>{var A=rl();A.__change=s,Mt(A,21,()=>l(i),rn,(m,E)=>{var P=nl(),C=T(P),D={};B(N=>{vs(P,l(E)===l(r)),O(C,N),D!==(D=l(E))&&(P.value=(P.__value=l(E))??"")},[()=>l(E).toUpperCase()]),x(m,P)});var q;ds(A),B(()=>{q!==(q=l(r))&&(A.value=(A.__value=l(r))??"",ro(A,l(r)))}),x(k,A)};U(b,k=>{l(i).length>1&&k(_)})}B((k,A)=>{O(p,k),de(f,"src",n()==="ru"?"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5":"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"),O(w,A)},[()=>oe({key:"poweredBy",lang:l(r)}),()=>oe({key:"ai_sommelier",lang:l(r)})]),x(e,u),ft()}or(["change"]);var sl=M('<a rel="noopener noreferrer"><!></a>'),ll=M("<button><!></button>");const ul={hash:"svelte-8cxv3l",code:`.wr-Action.svelte-8cxv3l {background:transparent;border:none;font-family:inherit;cursor:pointer;display:block;text-decoration:none;transition:background 0.2s,
139
+ }`};function ll(e,t){vt(t,!0),bt(e,sl);let n=Le(t,"countryCode",3,null),r=ie(()=>he.getAppLanguage()),i=ie(()=>he.getSupportedLanguages()),o=ie(()=>he.getStoreId());function s(k){const j=k.target.value;ze(Oe.LANGUAGE_CHANGED,l(o),{from_language:l(r),to_language:j}),he.setStoreLanguage(j)}var u=al(),a=E(u),c=E(a),v=E(c),g=E(v),f=N(v,2),d=N(f,2),b=E(d),p=N(a,2);{var m=k=>{var A=ol();A.__change=s,zt(A,21,()=>l(i),sn,(_,T)=>{var P=il(),C=E(P),R={};B(I=>{gs(P,l(T)===l(r)),z(C,I),R!==(R=l(T))&&(P.value=(P.__value=l(T))??"")},[()=>l(T).toUpperCase()]),x(_,P)});var j;hs(A),B(()=>{j!==(j=l(r))&&(A.value=(A.__value=l(r))??"",co(A,l(r)))}),x(k,A)};F(p,k=>{l(i).length>1&&k(m)})}B((k,A)=>{z(g,k),fe(f,"src",n()==="ru"?"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5":"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"),z(b,A)},[()=>oe({key:"poweredBy",lang:l(r)}),()=>oe({key:"ai_sommelier",lang:l(r)})]),x(e,u),pt()}lr(["change"]);var ul=M('<a rel="noopener noreferrer"><!></a>'),cl=M("<button><!></button>");const dl={hash:"svelte-8cxv3l",code:`.wr-Action.svelte-8cxv3l {background:transparent;border:none;font-family:inherit;cursor:pointer;display:block;text-decoration:none;transition:background 0.2s,
139
140
  color 0.2s,
140
- box-shadow 0.2s;}.wr-Action.primary.svelte-8cxv3l {background:var(--wr-brand-color);color:#fff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {opacity:0.8;}}.wr-Action.outlined.svelte-8cxv3l {background:transparent;color:var(--wr-brand-color);border:2px solid var(--wr-brand-color);border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.25);background-color:var(--wr-brand-color);color:#fff;}}.wr-Action--uppercase.svelte-8cxv3l {text-transform:uppercase;}`};function jt(e,t){dt(t,!0),mt(e,ul);let n=De(t,"type",3,"button"),r=De(t,"variant",3,"primary"),i=De(t,"target",3,"_self"),o=fe.getUiConfig(),s=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var u=Ke(),a=_e(u);{var d=p=>{var f=sl();f.__click=function(...w){var b;(b=t.handleClick)==null||b.apply(this,w)};var c=T(f);eo(c,t,"default",{}),B(()=>{St(f,1,un(s),"svelte-8cxv3l"),de(f,"href",t.href),de(f,"id",t.id),de(f,"target",i())}),x(p,f)},v=p=>{var f=ll();f.__click=function(...w){var b;(b=t.handleClick)==null||b.apply(this,w)};var c=T(f);eo(c,t,"default",{}),B(()=>{St(f,1,un(s),"svelte-8cxv3l"),de(f,"type",n()),de(f,"id",t.id)}),x(p,f)};U(a,p=>{t.href?p(d):p(v,!1)})}x(e,u),ft()}or(["click"]);var cl=M('<form class="wr-Search svelte-1wah7ro"><span class="wr-Search-icon svelte-1wah7ro"></span> <input class="wr-Search-input svelte-1wah7ro" type="text"/> <!></form>');const dl={hash:"svelte-1wah7ro",code:`.wr-Search.svelte-1wah7ro {position:relative;margin:12px auto;padding:0 6px;display:flex;align-items:center;border:2px solid #d5d9ee;border-radius:10px;}.wr-Search-icon.svelte-1wah7ro {left:12px;width:24px;height:24px;flex:0 0 auto;background-image:url("data:image/svg+xml,%3Csvg%20width=%2224%22%20height=%2225%22%20viewBox=%220%200%2024%2025%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M11%2019.3884C15.4183%2019.3884%2019%2015.8067%2019%2011.3884C19%206.97015%2015.4183%203.38843%2011%203.38843C6.58172%203.38843%203%206.97015%203%2011.3884C3%2015.8067%206.58172%2019.3884%2011%2019.3884Z%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M21%2021.3884L16.7%2017.0884%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;z-index:2;}.wr-Search-input.svelte-1wah7ro {flex:1 1 0%;min-width:0;padding:12px;font-size:16px;border:none;border-radius:10px;outline:none;transition:border 0.2s ease;}.wr-Search-input.svelte-1wah7ro::placeholder {color:var(--wr-wineater-color);opacity:1;transition:color 0.3s ease,
141
- opacity 0.3s ease-in-out;}.wr-Search-input.svelte-1wah7ro:focus {border-color:var(--wr-brand-color);}.wr-Search-input.svelte-1wah7ro:focus::placeholder {opacity:0.5;}`};function fl(e,t){dt(t,!0),mt(e,dl);let n=De(t,"searchQuery",15),r,i=G(!1),o=G(0),s=G(0),u=G(!0),a=G(!1),d=re(()=>fe.getAppLanguage()),v=0;function p(){return r}function f(){const m=++v,E=oe({key:"placeholderSuggestions",lang:l(d)});if(!r||!E.length)return;g(a,!0);const P=()=>{if(m!==v||!r||!l(a)||l(i)||n().length)return;const C=E[l(o)];if(l(u)){if(r.placeholder=C.substring(0,Si(s)),l(s)>C.length){g(u,!1),setTimeout(P,1600);return}setTimeout(P,90)}else{if(r.placeholder=C.substring(0,Si(s,-1)),l(s)<0){g(u,!0),g(o,(l(o)+1)%E.length),setTimeout(P,450);return}setTimeout(P,45)}};P()}function c(){g(a,!1)}function w(){g(i,!0),c(),r&&(r.placeholder="")}function b(){g(i,!1),g(s,0),g(u,!0),g(a,!1)}Cn(()=>{if(!r||n().length>0)return;v++,g(a,!1),g(o,0),g(s,0),g(u,!0);const m=oe({key:"placeholderSuggestions",lang:l(d)});m&&m.length?r.placeholder=m[0]:r.placeholder=oe({key:"searchPlaceholder",lang:l(d)})}),Cn(()=>{r&&t.initialized&&!l(i)&&!n().length&&!l(a)&&f(),n().length>0&&l(a)&&(g(a,!1),v++)}),zr(()=>{});var _={getSearchElement:p},k=cl(),A=W(T(k),2);ws(A,m=>r=m,()=>r);var q=W(A,2);return jt(q,{className:"wr-Search-button",type:"submit",variant:"primary",children:(m,E)=>{var P=xt();B(C=>O(P,C),[()=>oe({key:"searchButton",lang:l(d)})]),x(m,P)},$$slots:{default:!0}}),gt("submit",k,function(...m){var E;(E=t.onSubmit)==null||E.apply(this,m)}),gt("focus",A,w),gt("blur",A,b),ms(A,n),x(e,k),ft(_)}var hl=M('<div class="wr-Skeleton-tile svelte-f6xbvk"><div class="wr-Skeleton-block wr-Skeleton-image svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-price svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title wr-Skeleton-title--short svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-button svelte-f6xbvk"></div></div>'),vl=M('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const pl={hash:"svelte-f6xbvk",code:`.wr-Skeleton.svelte-f6xbvk {display:grid;grid-template-columns:repeat(4, 1fr);}.wr-Skeleton-tile.svelte-f6xbvk {display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 8px;border-right:2px solid #f6f7fd;}.wr-Skeleton-tile.svelte-f6xbvk:last-child {border-right:none;}.wr-Skeleton-block.svelte-f6xbvk {border-radius:6px;background:linear-gradient(90deg, #f1f2f8 25%, #f8f9fc 50%, #f1f2f8 75%);background-size:200% 100%;
141
+ box-shadow 0.2s;}.wr-Action.primary.svelte-8cxv3l {background:var(--wr-brand-color);color:#fff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {opacity:0.8;}}.wr-Action.outlined.svelte-8cxv3l {background:transparent;color:var(--wr-brand-color);border:2px solid var(--wr-brand-color);border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.25);background-color:var(--wr-brand-color);color:#fff;}}.wr-Action--uppercase.svelte-8cxv3l {text-transform:uppercase;}`};function Ft(e,t){vt(t,!0),bt(e,dl);let n=Le(t,"type",3,"button"),r=Le(t,"variant",3,"primary"),i=Le(t,"target",3,"_self"),o=he.getUiConfig(),s=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var u=Xe(),a=ke(u);{var c=g=>{var f=ul();f.__click=function(...b){var p;(p=t.handleClick)==null||p.apply(this,b)};var d=E(f);so(d,t,"default",{}),B(()=>{Tt(f,1,fn(s),"svelte-8cxv3l"),fe(f,"href",t.href),fe(f,"id",t.id),fe(f,"target",i())}),x(g,f)},v=g=>{var f=cl();f.__click=function(...b){var p;(p=t.handleClick)==null||p.apply(this,b)};var d=E(f);so(d,t,"default",{}),B(()=>{Tt(f,1,fn(s),"svelte-8cxv3l"),fe(f,"type",n()),fe(f,"id",t.id)}),x(g,f)};F(a,g=>{t.href?g(c):g(v,!1)})}x(e,u),pt()}lr(["click"]);var fl=M('<form class="wr-Search svelte-1wah7ro"><span class="wr-Search-icon svelte-1wah7ro"></span> <input class="wr-Search-input svelte-1wah7ro" type="text"/> <!></form>');const hl={hash:"svelte-1wah7ro",code:`.wr-Search.svelte-1wah7ro {position:relative;margin:12px auto;padding:0 6px;display:flex;align-items:center;border:2px solid #d5d9ee;border-radius:10px;}.wr-Search-icon.svelte-1wah7ro {left:12px;width:24px;height:24px;flex:0 0 auto;background-image:url("data:image/svg+xml,%3Csvg%20width=%2224%22%20height=%2225%22%20viewBox=%220%200%2024%2025%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M11%2019.3884C15.4183%2019.3884%2019%2015.8067%2019%2011.3884C19%206.97015%2015.4183%203.38843%2011%203.38843C6.58172%203.38843%203%206.97015%203%2011.3884C3%2015.8067%206.58172%2019.3884%2011%2019.3884Z%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M21%2021.3884L16.7%2017.0884%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;z-index:2;}.wr-Search-input.svelte-1wah7ro {flex:1 1 0%;min-width:0;padding:12px;font-size:16px;border:none;border-radius:10px;outline:none;transition:border 0.2s ease;}.wr-Search-input.svelte-1wah7ro::placeholder {color:var(--wr-wineater-color);opacity:1;transition:color 0.3s ease,
142
+ opacity 0.3s ease-in-out;}.wr-Search-input.svelte-1wah7ro:focus {border-color:var(--wr-brand-color);}.wr-Search-input.svelte-1wah7ro:focus::placeholder {opacity:0.5;}`};function vl(e,t){vt(t,!0),bt(e,hl);let n=Le(t,"searchQuery",15),r,i=Y(!1),o=Y(0),s=Y(0),u=Y(!0),a=Y(!1),c=ie(()=>he.getAppLanguage()),v=0;function g(){return r}function f(){const _=++v,T=oe({key:"placeholderSuggestions",lang:l(c)});if(!r||!T.length)return;w(a,!0);const P=()=>{if(_!==v||!r||!l(a)||l(i)||n().length)return;const C=T[l(o)];if(l(u)){if(r.placeholder=C.substring(0,Di(s)),l(s)>C.length){w(u,!1),setTimeout(P,1600);return}setTimeout(P,90)}else{if(r.placeholder=C.substring(0,Di(s,-1)),l(s)<0){w(u,!0),w(o,(l(o)+1)%T.length),setTimeout(P,450);return}setTimeout(P,45)}};P()}function d(){w(a,!1)}function b(){w(i,!0),d(),r&&(r.placeholder="")}function p(){w(i,!1),w(s,0),w(u,!0),w(a,!1)}Wn(()=>{if(!r||n().length>0)return;v++,w(a,!1),w(o,0),w(s,0),w(u,!0);const _=oe({key:"placeholderSuggestions",lang:l(c)});_&&_.length?r.placeholder=_[0]:r.placeholder=oe({key:"searchPlaceholder",lang:l(c)})}),Wn(()=>{r&&t.initialized&&!l(i)&&!n().length&&!l(a)&&f(),n().length>0&&l(a)&&(w(a,!1),v++)}),Ur(()=>{});var m={getSearchElement:g},k=fl(),A=N(E(k),2);bs(A,_=>r=_,()=>r);var j=N(A,2);return Ft(j,{className:"wr-Search-button",type:"submit",variant:"primary",children:(_,T)=>{var P=Et();B(C=>z(P,C),[()=>oe({key:"searchButton",lang:l(c)})]),x(_,P)},$$slots:{default:!0}}),_t("submit",k,function(..._){var T;(T=t.onSubmit)==null||T.apply(this,_)}),_t("focus",A,b),_t("blur",A,p),_s(A,n),x(e,k),pt(m)}var pl=M('<div class="wr-Skeleton-tile svelte-f6xbvk"><div class="wr-Skeleton-block wr-Skeleton-image svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-price svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title wr-Skeleton-title--short svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-button svelte-f6xbvk"></div></div>'),gl=M('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const ml={hash:"svelte-f6xbvk",code:`.wr-Skeleton.svelte-f6xbvk {display:grid;grid-template-columns:repeat(4, 1fr);}.wr-Skeleton-tile.svelte-f6xbvk {display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 8px;border-right:2px solid #f6f7fd;}.wr-Skeleton-tile.svelte-f6xbvk:last-child {border-right:none;}.wr-Skeleton-block.svelte-f6xbvk {border-radius:6px;background:linear-gradient(90deg, #f1f2f8 25%, #f8f9fc 50%, #f1f2f8 75%);background-size:200% 100%;
142
143
  animation: svelte-f6xbvk-wr-shimmer 1.2s linear infinite;}.wr-Skeleton-image.svelte-f6xbvk {width:60%;height:200px;margin-bottom:6px;}.wr-Skeleton-price.svelte-f6xbvk {width:40px;height:16px;}.wr-Skeleton-title.svelte-f6xbvk {width:80%;height:14px;}.wr-Skeleton-title--short.svelte-f6xbvk {width:55%;}.wr-Skeleton-button.svelte-f6xbvk {width:96px;height:36px;margin-top:14px;border-radius:10px;}
143
144
 
144
145
  @keyframes svelte-f6xbvk-wr-shimmer {
@@ -155,7 +156,7 @@ ${JSON.stringify(s,null,2)}
155
156
  }
156
157
 
157
158
  @media screen and (max-width: 768px) {.wr-Skeleton.svelte-f6xbvk {display:flex;gap:8px;overflow:hidden;padding:8px 0;}.wr-Skeleton-tile.svelte-f6xbvk {flex:0 0 240px;}
158
- }`};function Po(e){mt(e,pl);var t=vl();Mt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=hl();x(n,i)}),x(e,t)}var gl=M('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),ml=M('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),wl=M('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),_l=M('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),bl=M('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),yl=M('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">&times;</button></div> <!> <!> <!></div></div></div>'),kl=M('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),xl=M('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Sl=M('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Cl=M('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),El=M('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Tl=M('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">&times;</button></div> <!> <!> <!></div>');const Pl={hash:"svelte-17gehox",code:".wr-WinePopup.svelte-17gehox {position:absolute;width:100%;background-color:white;padding:16px;border-radius:16px;box-shadow:0 6px 30px rgba(0, 0, 0, 0.2);text-align:left;font-size:14px;box-sizing:border-box;display:flex;flex-direction:column;}.wr-WinePopup-text.svelte-17gehox {margin:5px 0;}.wr-WinePopup-header.svelte-17gehox {display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}.wr-WinePopup-title.svelte-17gehox {font-size:16px;font-weight:600;margin:0;flex:1;line-height:1.3;}.wr-WinePopup-close.svelte-17gehox {font-size:20px;font-weight:bold;cursor:pointer;color:#999;border:none;background:transparent;line-height:1;}.wr-WinePopup-close.svelte-17gehox:hover {color:#000;}.wr-WinePopup-desc.svelte-17gehox {margin-top:8px;}.wr-WinePopup-reason.svelte-17gehox {font-size:14px;font-weight:400;color:#333;margin-top:8px;}.wr-WinePopup-pairing.svelte-17gehox {margin-top:8px;}.wr-WinePopup-tags.svelte-17gehox {display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;justify-content:center;}.wr-WinePopup-tag.svelte-17gehox {display:inline-block;padding:4px 8px;border-radius:12px;background-color:#f5f0ff;border:1px solid #ddd;font-size:13px;color:#333;text-transform:capitalize;}.wr-WinePopupMobile.svelte-17gehox {position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;}.wr-WinePopupMobile-overlay.svelte-17gehox {position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.5);}.wr-WinePopupMobile-wrapper.svelte-17gehox {position:absolute;width:100%;height:100%;top:50%;left:50%;transform:translate(-50%, -50%);max-width:90%;max-height:80%;overflow-y:auto;background:transparent;}"};function Io(e,t){dt(t,!0),mt(e,Pl);const n=!!t.isMobile;var r=Ke(),i=_e(r);{var o=u=>{var a=yl(),d=T(a);d.__click=function(...C){var D;(D=t.onClose)==null||D.apply(this,C)};var v=W(d,2),p=T(v),f=T(p),c=T(f),w=T(c),b=W(c,2);b.__click=function(...C){var D;(D=t.onClose)==null||D.apply(this,C)};var _=W(f,2);{var k=C=>{var D=gl(),N=T(D);B(()=>O(N,t.shortDescription)),x(C,D)};U(_,C=>{t.shortDescription&&C(k)})}var A=W(_,2);{var q=C=>{var D=ml(),N=T(D);B(()=>O(N,t.reason)),x(C,D)},m=C=>{var D=Ke(),N=_e(D);{var X=J=>{var L=wl(),pe=T(L);B(()=>O(pe,t.pairing)),x(J,L)};U(N,J=>{t.pairing&&J(X)},!0)}x(C,D)};U(A,C=>{t.reason?C(q):C(m,!1)})}var E=W(A,2);{var P=C=>{var D=bl();Mt(D,21,()=>t.tags,rn,(N,X)=>{var J=_l(),L=T(J);B(()=>O(L,l(X))),x(N,J)}),x(C,D)};U(E,C=>{t.tags&&t.tags.length&&C(P)})}B(()=>O(w,t.title)),x(u,a)},s=u=>{var a=Tl(),d=T(a),v=T(d),p=T(v),f=W(v,2);f.__click=function(...m){var E;(E=t.onClose)==null||E.apply(this,m)};var c=W(d,2);{var w=m=>{var E=kl(),P=T(E);B(()=>O(P,t.shortDescription)),x(m,E)};U(c,m=>{t.shortDescription&&m(w)})}var b=W(c,2);{var _=m=>{var E=xl(),P=T(E);B(()=>O(P,t.reason)),x(m,E)},k=m=>{var E=Ke(),P=_e(E);{var C=D=>{var N=Sl(),X=T(N);B(()=>O(X,t.pairing)),x(D,N)};U(P,D=>{t.pairing&&D(C)},!0)}x(m,E)};U(b,m=>{t.reason?m(_):m(k,!1)})}var A=W(b,2);{var q=m=>{var E=El();Mt(E,21,()=>t.tags,rn,(P,C)=>{var D=Cl(),N=T(D);B(()=>O(N,l(C))),x(P,D)}),x(m,E)};U(A,m=>{t.tags&&t.tags.length&&m(q)})}B(()=>O(p,t.title)),x(u,a)};U(i,u=>{n?u(o):u(s,!1)})}x(e,r),ft()}or(["click"]);var Il=M('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Al=M('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Dl=M('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Rl=M('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Wl=M('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Nl=M('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Bl=M('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),Ml=M("<div><!> <!></div>"),Ll=M('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <h3 class="wr-WineTile-title svelte-yk3emv"> </h3></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const zl={hash:"svelte-yk3emv",code:`.wr-WineTile.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;text-align:center;box-sizing:border-box;padding:16px 8px;border-right:2px solid #f6f7fd;position:relative;transform:translateY(0);opacity:1;transition:transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
159
+ }`};function Ro(e){bt(e,ml);var t=gl();zt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=pl();x(n,i)}),x(e,t)}var wl=M('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),_l=M('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),bl=M('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),yl=M('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),kl=M('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),xl=M('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">&times;</button></div> <!> <!> <!></div></div></div>'),Sl=M('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Cl=M('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),El=M('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Tl=M('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Pl=M('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Al=M('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">&times;</button></div> <!> <!> <!></div>');const Il={hash:"svelte-17gehox",code:".wr-WinePopup.svelte-17gehox {position:absolute;width:100%;background-color:white;padding:16px;border-radius:16px;box-shadow:0 6px 30px rgba(0, 0, 0, 0.2);text-align:left;font-size:14px;box-sizing:border-box;display:flex;flex-direction:column;}.wr-WinePopup-text.svelte-17gehox {margin:5px 0;}.wr-WinePopup-header.svelte-17gehox {display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}.wr-WinePopup-title.svelte-17gehox {font-size:16px;font-weight:600;margin:0;flex:1;line-height:1.3;}.wr-WinePopup-close.svelte-17gehox {font-size:20px;font-weight:bold;cursor:pointer;color:#999;border:none;background:transparent;line-height:1;}.wr-WinePopup-close.svelte-17gehox:hover {color:#000;}.wr-WinePopup-desc.svelte-17gehox {margin-top:8px;}.wr-WinePopup-reason.svelte-17gehox {font-size:14px;font-weight:400;color:#333;margin-top:8px;}.wr-WinePopup-pairing.svelte-17gehox {margin-top:8px;}.wr-WinePopup-tags.svelte-17gehox {display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;justify-content:center;}.wr-WinePopup-tag.svelte-17gehox {display:inline-block;padding:4px 8px;border-radius:12px;background-color:#f5f0ff;border:1px solid #ddd;font-size:13px;color:#333;text-transform:capitalize;}.wr-WinePopupMobile.svelte-17gehox {position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;}.wr-WinePopupMobile-overlay.svelte-17gehox {position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.5);}.wr-WinePopupMobile-wrapper.svelte-17gehox {position:absolute;width:100%;height:100%;top:50%;left:50%;transform:translate(-50%, -50%);max-width:90%;max-height:80%;overflow-y:auto;background:transparent;}"};function Wo(e,t){vt(t,!0),bt(e,Il);const n=!!t.isMobile;var r=Xe(),i=ke(r);{var o=u=>{var a=xl(),c=E(a);c.__click=function(...C){var R;(R=t.onClose)==null||R.apply(this,C)};var v=N(c,2),g=E(v),f=E(g),d=E(f),b=E(d),p=N(d,2);p.__click=function(...C){var R;(R=t.onClose)==null||R.apply(this,C)};var m=N(f,2);{var k=C=>{var R=wl(),I=E(R);B(()=>z(I,t.shortDescription)),x(C,R)};F(m,C=>{t.shortDescription&&C(k)})}var A=N(m,2);{var j=C=>{var R=_l(),I=E(R);B(()=>z(I,t.reason)),x(C,R)},_=C=>{var R=Xe(),I=ke(R);{var X=U=>{var G=bl(),we=E(G);B(()=>z(we,t.pairing)),x(U,G)};F(I,U=>{t.pairing&&U(X)},!0)}x(C,R)};F(A,C=>{t.reason?C(j):C(_,!1)})}var T=N(A,2);{var P=C=>{var R=kl();zt(R,21,()=>t.tags,sn,(I,X)=>{var U=yl(),G=E(U);B(()=>z(G,l(X))),x(I,U)}),x(C,R)};F(T,C=>{t.tags&&t.tags.length&&C(P)})}B(()=>z(b,t.title)),x(u,a)},s=u=>{var a=Al(),c=E(a),v=E(c),g=E(v),f=N(v,2);f.__click=function(..._){var T;(T=t.onClose)==null||T.apply(this,_)};var d=N(c,2);{var b=_=>{var T=Sl(),P=E(T);B(()=>z(P,t.shortDescription)),x(_,T)};F(d,_=>{t.shortDescription&&_(b)})}var p=N(d,2);{var m=_=>{var T=Cl(),P=E(T);B(()=>z(P,t.reason)),x(_,T)},k=_=>{var T=Xe(),P=ke(T);{var C=R=>{var I=El(),X=E(I);B(()=>z(X,t.pairing)),x(R,I)};F(P,R=>{t.pairing&&R(C)},!0)}x(_,T)};F(p,_=>{t.reason?_(m):_(k,!1)})}var A=N(p,2);{var j=_=>{var T=Pl();zt(T,21,()=>t.tags,sn,(P,C)=>{var R=Tl(),I=E(R);B(()=>z(I,l(C))),x(P,R)}),x(_,T)};F(A,_=>{t.tags&&t.tags.length&&_(j)})}B(()=>z(g,t.title)),x(u,a)};F(i,u=>{n?u(o):u(s,!1)})}x(e,r),pt()}lr(["click"]);var Dl=M('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Rl=M('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Wl=M('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Nl=M('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Bl=M('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Ml=M('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Ll=M('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),zl=M("<div><!> <!></div>"),Ol=M('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <h3 class="wr-WineTile-title svelte-yk3emv"> </h3></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const jl={hash:"svelte-yk3emv",code:`.wr-WineTile.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;text-align:center;box-sizing:border-box;padding:16px 8px;border-right:2px solid #f6f7fd;position:relative;transform:translateY(0);opacity:1;transition:transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
159
160
  opacity 180ms cubic-bezier(0.22, 0.61, 0.36, 1);will-change:transform, opacity;}.wr-WineTile.svelte-yk3emv:last-child {border-right:none;}.wr-WineTile.ww-slide-up.svelte-yk3emv {transform:translateY(-28px);opacity:0;}.wr-WineTile-header.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;}.wr-WineTile-image.svelte-yk3emv {height:200px;width:100%;max-width:100%;object-fit:contain;margin:0 auto 16px;display:block;}.wr-WineTile-title.svelte-yk3emv {font-size:15px;font-weight:500;margin:0 0 8px;min-height:3rem;line-height:1.2;text-align:center;color:#000;}.wr-WineTile-params.svelte-yk3emv {font-size:14px;color:#666;white-space:normal;text-align:center;}.wr-WineTile-footer.svelte-yk3emv {margin-top:auto;display:flex;align-items:center;gap:12px;justify-content:center;}.wr-WineTile-price.svelte-yk3emv {font-size:16px;font-weight:400;margin-bottom:8px;color:#333;}.wr-WineTile-glass.svelte-yk3emv {font-size:12px;font-weight:500;color:var(--wr-brand-color, #7b2beb);margin-bottom:8px;}.wr-WineTile-actions.svelte-yk3emv {margin:16px auto 0;display:flex;flex-direction:column;align-items:center;gap:8px;}
160
161
 
161
162
  /* :global обязателен — класс уезжает внутрь <Action>, а скоуп Svelte
@@ -179,9 +180,9 @@ ${JSON.stringify(s,null,2)}
179
180
  }
180
181
 
181
182
  @media screen and (max-width: 768px) {.wr-WineTile.svelte-yk3emv {flex:0 0 auto;scroll-snap-align:center;width:240px;text-align:center;}
182
- }`};function Ol(e,t){dt(t,!0),mt(e,zl);const n=4;let r=re(()=>fe.getAppLanguage());const i=(S,z)=>S[z]||S[z.charAt(0).toUpperCase()+z.slice(1)],o=(S,z)=>z.map($=>i(S,$)).filter(Boolean).join(" • ");function s(S){var z;return Fs(S,((z=fe.getCurrency)==null?void 0:z.call(fe))||"USD",l(r))}function u(S){return t.selectedWineId===S}function a(S){return!!(S.reason||S.shortDescription||S.tags)}function d(S,z){let $=(S==null?void 0:S.tags)||z.tags;return $?(Array.isArray($)&&($=$.join(",")),typeof $!="string"?[]:$.split(",").map(ne=>ne.trim()).filter(Boolean)):[]}let v=G(!1);zr(()=>{const S=()=>{g(v,window.innerWidth<=768)};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}});var p=Ll(),f=_e(p);f.__click=S=>t.onTileClick(S,t.wine);var c=T(f),w=T(c);{var b=S=>{var z=Il();B(()=>{de(z,"src",t.wine.image),de(z,"alt",t.wine.title),de(z,"loading",t.index<n?"eager":"lazy"),de(z,"fetchpriority",t.index<n?"high":"auto")}),x(S,z)};U(w,S=>{t.wine.image&&S(b)})}var _=W(w,2);{var k=S=>{var z=Al(),$=T(z);B(ne=>O($,ne),[()=>s(t.wine.total)]),x(S,z)};U(_,S=>{t.wine.total&&S(k)})}var A=W(_,2);{var q=S=>{var z=Dl(),$=T(z);B((ne,Se)=>O($,`${ne??""}${Se??""}`),[()=>oe({key:"byTheGlass",lang:l(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),x(S,z)};U(A,S=>{t.wine.byTheGlass&&S(q)})}var m=W(A,2),E=T(m),P=W(c,2);{var C=S=>{var z=Rl(),$=T(z);B(ne=>O($,ne),[()=>o(t.wine,["type","country","region","grape"])]),x(S,z)};U(P,S=>{o(t.wine,["type","country","region","grape"])&&S(C)})}var D=W(P,2),N=T(D),X=T(N);{var J=S=>{jt(S,{get href(){return t.wine.url},handleClick:()=>t.onBuyLinkClick(t.wine,t.index),className:"wr-WineTile-action wr-WineTile-action--link js-WineTileAction",target:"_blank",variant:"outlined",children:(z,$)=>{var ne=xt();B(Se=>O(ne,Se),[()=>oe({key:"wineDetails.buy",lang:l(r)})]),x(z,ne)},$$slots:{default:!0}})},L=S=>{jt(S,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(z,$)=>{var ne=xt();B(Se=>O(ne,Se),[()=>oe({key:"moreInfo",lang:l(r)})]),x(z,ne)},$$slots:{default:!0}})};U(X,S=>{t.wine.url?S(J):S(L,!1)})}var pe=W(X,2);{var ee=S=>{jt(S,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(z,$)=>{var ne=xt();B(Se=>O(ne,Se),[()=>oe({key:"similarWines",lang:l(r)})]),x(z,ne)},$$slots:{default:!0}})};U(pe,S=>{t.onSimilarClick&&S(ee)})}var ye=W(D,2);{var Qe=S=>{{let z=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.shortDescription)||t.wine.shortDescription}),$=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.reason)||t.wine.reason}),ne=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.pairingRecommendation)||t.wine.pairingRecommendation}),Se=re(()=>d(t.translatedPopup,t.wine));Io(S,{get title(){return t.wine.title},get shortDescription(){return l(z)},get reason(){return l($)},get pairing(){return l(ne)},get tags(){return l(Se)},get onClose(){return t.onPopupClose},isMobile:!1})}};U(ye,S=>{u(t.wine.id)&&!l(v)&&S(Qe)})}var jn=W(ye,2);{var qn=S=>{var z=Ml(),$=T(z);{var ne=_t=>{var Be=Wl(),Je=T(Be);B(()=>{var Kt,Pt;return O(Je,((Kt=t.translatedPopup)==null?void 0:Kt.reason)||((Pt=t.translatedPopup)==null?void 0:Pt.shortDescription)||t.wine.reason||t.wine.shortDescription)}),x(_t,Be)};U($,_t=>{var Be,Je;((Be=t.translatedPopup)!=null&&Be.reason||(Je=t.translatedPopup)!=null&&Je.shortDescription||t.wine.reason||t.wine.shortDescription)&&_t(ne)})}var Se=W($,2);{var ae=_t=>{var Be=Bl();Mt(Be,21,()=>d(t.translatedPopup,t.wine),rn,(Je,Kt)=>{var Pt=Nl(),Xr=T(Pt);B(()=>O(Xr,l(Kt))),x(Je,Pt)}),x(_t,Be)};U(Se,_t=>{var Be,Je;((Be=t.translatedPopup)!=null&&Be.tags||(Je=t.translatedPopup)!=null&&Je.Tags||t.wine.tags)&&_t(ae)})}B(()=>St(z,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),x(S,z)};U(jn,S=>{a(t.wine)&&S(qn)})}var Fn=W(f,2);{var Jr=S=>{{let z=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.shortDescription)||t.wine.shortDescription}),$=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.reason)||t.wine.reason}),ne=re(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.pairingRecommendation)||t.wine.pairingRecommendation}),Se=re(()=>d(t.translatedPopup,t.wine));Io(S,{get title(){return t.wine.title},get shortDescription(){return l(z)},get reason(){return l($)},get pairing(){return l(ne)},get tags(){return l(Se)},get onClose(){return t.onPopupClose},isMobile:!0})}};U(Fn,S=>{u(t.wine.id)&&l(v)&&S(Jr)})}B(()=>{St(f,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv"),O(E,t.wine.title)}),gt("mouseenter",f,()=>t.onTileEnter(t.wine)),gt("mouseleave",f,()=>t.onTileLeave(t.wine)),x(e,p),ft()}or(["click"]);var jl=M('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),ql=M('<div class="wr-Consent svelte-dqnzo8" role="region" aria-label="Cookies"><p class="wr-Consent-text svelte-dqnzo8"> <!></p> <div class="wr-Consent-actions svelte-dqnzo8"><!> <!></div></div>');const Fl={hash:"svelte-dqnzo8",code:`.wr-Consent.svelte-dqnzo8 {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 0;padding:12px 16px;border-radius:12px;background:#f6f4f2;font-size:13px;line-height:1.4;color:#333;}.wr-Consent-text.svelte-dqnzo8 {margin:0;flex:1;}.wr-Consent-link.svelte-dqnzo8 {color:inherit;text-decoration:underline;margin-left:4px;}.wr-Consent-actions.svelte-dqnzo8 {display:flex;gap:8px;flex-shrink:0;}
183
+ }`};function ql(e,t){vt(t,!0),bt(e,jl);const n=4;let r=ie(()=>he.getAppLanguage());const i=(S,L)=>S[L]||S[L.charAt(0).toUpperCase()+L.slice(1)],o=(S,L)=>L.map(te=>i(S,te)).filter(Boolean).join(" • ");function s(S){var L;return Hs(S,((L=he.getCurrency)==null?void 0:L.call(he))||"USD",l(r))}function u(S){return t.selectedWineId===S}function a(S){return!!(S.reason||S.shortDescription||S.tags)}function c(S,L){let te=(S==null?void 0:S.tags)||L.tags;return te?(Array.isArray(te)&&(te=te.join(",")),typeof te!="string"?[]:te.split(",").map(re=>re.trim()).filter(Boolean)):[]}let v=Y(!1);Ur(()=>{const S=()=>{w(v,window.innerWidth<=768)};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}});var g=Ol(),f=ke(g);f.__click=S=>t.onTileClick(S,t.wine);var d=E(f),b=E(d);{var p=S=>{var L=Dl();B(()=>{fe(L,"src",t.wine.image),fe(L,"alt",t.wine.title),fe(L,"loading",t.index<n?"eager":"lazy"),fe(L,"fetchpriority",t.index<n?"high":"auto")}),x(S,L)};F(b,S=>{t.wine.image&&S(p)})}var m=N(b,2);{var k=S=>{var L=Rl(),te=E(L);B(re=>z(te,re),[()=>s(t.wine.total)]),x(S,L)};F(m,S=>{t.wine.total&&S(k)})}var A=N(m,2);{var j=S=>{var L=Wl(),te=E(L);B((re,Te)=>z(te,`${re??""}${Te??""}`),[()=>oe({key:"byTheGlass",lang:l(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),x(S,L)};F(A,S=>{t.wine.byTheGlass&&S(j)})}var _=N(A,2),T=E(_),P=N(d,2);{var C=S=>{var L=Nl(),te=E(L);B(re=>z(te,re),[()=>o(t.wine,["type","country","region","grape"])]),x(S,L)};F(P,S=>{o(t.wine,["type","country","region","grape"])&&S(C)})}var R=N(P,2),I=E(R),X=E(I);{var U=S=>{Ft(S,{get href(){return t.wine.url},handleClick:()=>t.onBuyLinkClick(t.wine,t.index),className:"wr-WineTile-action wr-WineTile-action--link js-WineTileAction",target:"_blank",variant:"outlined",children:(L,te)=>{var re=Et();B(Te=>z(re,Te),[()=>oe({key:"wineDetails.buy",lang:l(r)})]),x(L,re)},$$slots:{default:!0}})},G=S=>{Ft(S,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(L,te)=>{var re=Et();B(Te=>z(re,Te),[()=>oe({key:"moreInfo",lang:l(r)})]),x(L,re)},$$slots:{default:!0}})};F(X,S=>{t.wine.url?S(U):S(G,!1)})}var we=N(X,2);{var $=S=>{Ft(S,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(L,te)=>{var re=Et();B(Te=>z(re,Te),[()=>oe({key:"similarWines",lang:l(r)})]),x(L,re)},$$slots:{default:!0}})};F(we,S=>{t.onSimilarClick&&S($)})}var Ee=N(R,2);{var _e=S=>{{let L=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.shortDescription)||t.wine.shortDescription}),te=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.reason)||t.wine.reason}),re=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.pairingRecommendation)||t.wine.pairingRecommendation}),Te=ie(()=>c(t.translatedPopup,t.wine));Wo(S,{get title(){return t.wine.title},get shortDescription(){return l(L)},get reason(){return l(te)},get pairing(){return l(re)},get tags(){return l(Te)},get onClose(){return t.onPopupClose},isMobile:!1})}};F(Ee,S=>{u(t.wine.id)&&!l(v)&&S(_e)})}var Qt=N(Ee,2);{var kn=S=>{var L=zl(),te=E(L);{var re=kt=>{var qe=Bl(),et=E(qe);B(()=>{var xn,Jt;return z(et,((xn=t.translatedPopup)==null?void 0:xn.reason)||((Jt=t.translatedPopup)==null?void 0:Jt.shortDescription)||t.wine.reason||t.wine.shortDescription)}),x(kt,qe)};F(te,kt=>{var qe,et;((qe=t.translatedPopup)!=null&&qe.reason||(et=t.translatedPopup)!=null&&et.shortDescription||t.wine.reason||t.wine.shortDescription)&&kt(re)})}var Te=N(te,2);{var ae=kt=>{var qe=Ll();zt(qe,21,()=>c(t.translatedPopup,t.wine),sn,(et,xn)=>{var Jt=Ml(),wr=E(Jt);B(()=>z(wr,l(xn))),x(et,Jt)}),x(kt,qe)};F(Te,kt=>{var qe,et;((qe=t.translatedPopup)!=null&&qe.tags||(et=t.translatedPopup)!=null&&et.Tags||t.wine.tags)&&kt(ae)})}B(()=>Tt(L,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),x(S,L)};F(Qt,S=>{a(t.wine)&&S(kn)})}var ii=N(f,2);{var oi=S=>{{let L=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.shortDescription)||t.wine.shortDescription}),te=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.reason)||t.wine.reason}),re=ie(()=>{var ae;return((ae=t.translatedPopup)==null?void 0:ae.pairingRecommendation)||t.wine.pairingRecommendation}),Te=ie(()=>c(t.translatedPopup,t.wine));Wo(S,{get title(){return t.wine.title},get shortDescription(){return l(L)},get reason(){return l(te)},get pairing(){return l(re)},get tags(){return l(Te)},get onClose(){return t.onPopupClose},isMobile:!0})}};F(ii,S=>{u(t.wine.id)&&l(v)&&S(oi)})}B(()=>{Tt(f,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv"),z(T,t.wine.title)}),_t("mouseenter",f,()=>t.onTileEnter(t.wine)),_t("mouseleave",f,()=>t.onTileLeave(t.wine)),x(e,g),pt()}lr(["click"]);var Fl=M('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),Ul=M('<div class="wr-Consent svelte-dqnzo8" role="region" aria-label="Cookies"><p class="wr-Consent-text svelte-dqnzo8"> <!></p> <div class="wr-Consent-actions svelte-dqnzo8"><!> <!></div></div>');const Hl={hash:"svelte-dqnzo8",code:`.wr-Consent.svelte-dqnzo8 {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 0;padding:12px 16px;border-radius:12px;background:#f6f4f2;font-size:13px;line-height:1.4;color:#333;}.wr-Consent-text.svelte-dqnzo8 {margin:0;flex:1;}.wr-Consent-link.svelte-dqnzo8 {color:inherit;text-decoration:underline;margin-left:4px;}.wr-Consent-actions.svelte-dqnzo8 {display:flex;gap:8px;flex-shrink:0;}
183
184
  @media (max-width: 640px) {.wr-Consent.svelte-dqnzo8 {flex-direction:column;align-items:stretch;}.wr-Consent-actions.svelte-dqnzo8 {justify-content:flex-end;}
184
- }`};function Ul(e,t){var f;dt(t,!0),mt(e,Fl);const n=(f=window==null?void 0:window.wineaterData)==null?void 0:f.PRIVACY_URL,r=c=>oe({key:c,lang:t.lang});var i=ql(),o=T(i),s=T(o),u=W(s);{var a=c=>{var w=jl(),b=T(w);B(_=>{de(w,"href",n),O(b,_)},[()=>r("consentPrivacy")]),x(c,w)};U(u,c=>{n&&c(a)})}var d=W(o,2),v=T(d);jt(v,{variant:"outlined",handleClick:()=>co("denied"),children:(c,w)=>{var b=xt();B(_=>O(b,_),[()=>r("consentDecline")]),x(c,b)},$$slots:{default:!0}});var p=W(v,2);jt(p,{variant:"primary",handleClick:()=>co("granted"),children:(c,w)=>{var b=xt();B(_=>O(b,_),[()=>r("consentAccept")]),x(c,b)},$$slots:{default:!0}}),B(c=>O(s,`${c??""} `),[()=>r("consentText")]),x(e,i),ft()}const Hl=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function Zr(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function Vl(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(Zr("preconnect","https://fonts.googleapis.com"),Zr("preconnect","https://fonts.gstatic.com",!0))}function Gl(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(Hl,(i,o)=>(Zr("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}var Kl=M('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Yl=M('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Zl=M('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),Ql=M('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),Jl=M('<div id="wr-Custom" class="wr-App svelte-1n46o8q"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!></div> <!> <!></div>'),Xl=M('<div class="wr-App wr-App--loading svelte-1n46o8q" aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const $l={hash:"svelte-1n46o8q",code:`
185
+ }`};function Gl(e,t){var f;vt(t,!0),bt(e,Hl);const n=(f=window==null?void 0:window.wineaterData)==null?void 0:f.PRIVACY_URL,r=d=>oe({key:d,lang:t.lang});var i=Ul(),o=E(i),s=E(o),u=N(s);{var a=d=>{var b=Fl(),p=E(b);B(m=>{fe(b,"href",n),z(p,m)},[()=>r("consentPrivacy")]),x(d,b)};F(u,d=>{n&&d(a)})}var c=N(o,2),v=E(c);Ft(v,{variant:"outlined",handleClick:()=>wo("denied"),children:(d,b)=>{var p=Et();B(m=>z(p,m),[()=>r("consentDecline")]),x(d,p)},$$slots:{default:!0}});var g=N(v,2);Ft(g,{variant:"primary",handleClick:()=>wo("granted"),children:(d,b)=>{var p=Et();B(m=>z(p,m),[()=>r("consentAccept")]),x(d,p)},$$slots:{default:!0}}),B(d=>z(s,`${d??""} `),[()=>r("consentText")]),x(e,i),pt()}const Vl=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function ni(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function Kl(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(ni("preconnect","https://fonts.googleapis.com"),ni("preconnect","https://fonts.gstatic.com",!0))}function Yl(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(Vl,(i,o)=>(ni("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}var Zl=M('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Ql=M('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Jl=M('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),Xl=M('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),$l=M('<div id="wr-Custom" class="wr-App svelte-1n46o8q"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!></div> <!> <!></div>'),eu=M('<div class="wr-App wr-App--loading svelte-1n46o8q" aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const tu={hash:"svelte-1n46o8q",code:`
185
186
  /* ===================== 1) CSS Variables ===================== */:root {--wineater-corp-color: #0044ff;
186
187
  /* --wr-brand-color is set dynamically from uiConfig.brandColor */--wr-brand-color: #7b2beb; /* fallback value */}
187
188
 
@@ -194,4 +195,4 @@ ${JSON.stringify(s,null,2)}
194
195
 
195
196
  /* ===================== 13) Mobile Styles ===================== */
196
197
  @media screen and (max-width: 768px) {.wr-App.svelte-1n46o8q {flex-direction:column;padding:0px 16px;min-width:100vw;}.wr-App-placeholder.svelte-1n46o8q {display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;padding:8px 0;width:calc(100vw - 32px);min-width:calc(100vw - 32px);}
197
- }`};function eu(e,t){var Wo,No,Bo;dt(t,!0),mt(e,$l);function n(){var y;Ur("chatbotToken",((y=window.wineaterData)==null?void 0:y.CLIENT_TOKEN)||r,365)}const r="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n(),Vl();const i=6*60*60*1e3,o=`${yo}:instant`,s=((Wo=window==null?void 0:window.wineaterData)==null?void 0:Wo.WIDGET_TYPE)||"store",u=((No=window==null?void 0:window.wineaterData)==null?void 0:No.COUNTRY_CODE)||null;(Bo=window==null?void 0:window.wineaterData)!=null&&Bo.WIDGET_WRAPPER;let a=G(!1),d=G(!1),v=!1,p=G(!1),f=G(!1),c=G(Oe([])),w=G(null),b=G(""),_=G(null),k=G(!1),A=G(null),q=G(Oe([])),m=G(""),E=G(!1),P=G(Oe([])),C=null;function D(y,I){y!=null&&y.length&&dn({type:"shown",query_id:C??void 0,sku_ids:y.map(H=>H.id),text:I||void 0})}let N=re(()=>fe.getAppLanguage()),X=re(()=>fe.getStoreLanguage()),J=re(()=>fe.getApiKey()),L=re(()=>fe.getStoreId()),pe=re(()=>fe.isInitialized()),ee=re(()=>fe.getUiConfig());function ye(){g(_,oe({key:"errorMessage",lang:l(N)}),!0)}const Qe=()=>g(_,null);async function jn(y){if(l(N)===l(X)||s!=="bar")return y.map(()=>({}));const I=["shortDescription","reason","pairingRecommendation","tags"],H=y[0];if(!H)return y.map(()=>({}));const se=I.filter(Xe=>Xe in H),Me=4,It=[];for(let Xe=0;Xe<y.length;Xe+=Me){const $r=y.slice(Xe,Xe+Me).map(async Un=>{const vr=se.map(ie=>{const Le=Un[ie]||Un[ie.toLowerCase()];return Le?{key:ie,text:Array.isArray(Le)?Le.join(", "):Le}:null}).filter(Boolean);return vr.length===0?{}:await Us({sourceLang:l(X),targetLang:l(N),texts:Object.fromEntries(vr.map(ie=>[ie.key,ie.text])),apiKey:l(J)})}),ei=await Promise.all($r);It.push(...ei)}return It}async function qn(y){const I=xo(o,i),H=!!(I!=null&&I.length);H?g(c,I,!0):g(p,!0);try{const se=await fn.getInstantRecommendations();se.length>0&&So(o,se),!H&&!v&&g(c,se,!0)}catch(se){console.error("[wineater] instant recommendations error:",se),!H&&!v&&(await y,ye())}finally{v||g(p,!1)}}function Fn(y=220){return!l(c)||l(c).length===0?Promise.resolve():(g(k,!0),new Promise(I=>{setTimeout(()=>{I()},y)}))}async function Jr(y){y.preventDefault(),v=!0;let I="";try{g(p,!0),Qe(),I=l(b).trim()+";",g(m,I,!0),C=mo();try{Re(We.SEARCH_PERFORMED,l(L),{query:I})}catch(Me){console.error("Error tracking search event:",Me)}const H=fn.getWineRecommendationsSearch(I,C);H.catch(()=>{}),await Fn(220),g(c,[],!0),g(k,!1),g(E,!1),g(P,[],!0);const se=await H;!se||se.length===0?(g(c,[],!0),g(q,[],!0),g(_,oe({key:"noResultsMessage",lang:l(N)}),!0),Re(We.NO_RESULTS_FOUND,l(L),{query:I})):(g(c,se,!0),g(E,Kr==="2"&&se.length>=4,!0),D(se,I),Re(We.SEARCH_RESULTS_DISPLAYED,l(L),{results_count:se.length,results:se,query:I}))}catch(H){g(c,[],!0),console.error("[wineater] search error:",H),Re(We.ERROR_OCCURRED,l(L),{error_message:H==null?void 0:H.message,query:I}),ye()}finally{g(p,!1)}}async function S(){if(l(f)||!l(E))return;v=!0;const y=l(c);try{g(f,!0),g(p,!0),g(P,[...new Set([...l(P),...l(c).map(Me=>Me.id)])],!0);const I=fn.getMoreWineRecommendations(l(m),l(P));I.catch(()=>{}),await Fn(220),g(c,[],!0),g(k,!1);const{recommendations:H,hasMore:se}=await I;dn({type:"more",query_id:C??void 0,text:l(m)||void 0}),D(H,l(m)),Re(We.SHOW_MORE_CLICKED,l(L),{query:l(m),results_count:H.length}),g(c,H.length>0?H:y,!0),g(E,se,!0)}catch(I){console.error("[wineater] try again error:",I),g(c,y,!0),g(E,!1)}finally{g(f,!1),g(p,!1)}}async function z(y){v=!0;try{g(p,!0),Qe(),Re(We.SIMILAR_WINES_CLICKED,l(L),{wine_id:y.id,wine_title:y.title}),dn({type:"similar",query_id:C??void 0,sku_ids:[y.id]}),C=mo();const I=fn.getSimilarWines(y.id);I.catch(()=>{}),await Fn(220),g(c,[],!0),g(k,!1),g(E,!1),g(w,null);const H=await I;g(b,y.title,!0),g(m,""),!H||H.length===0?(g(c,[],!0),g(q,[],!0),g(_,oe({key:"noResultsMessage",lang:l(N)}),!0)):(g(c,H,!0),D(H,""))}catch(I){g(c,[],!0),console.error("[wineater] similar wines error:",I),ye()}finally{g(p,!1)}}Cn(async()=>{if(!l(c)||l(c).length===0){g(q,[],!0);return}try{const y=await jn(l(c));l(c)&&l(c).length>0&&g(q,y,!0)}catch(y){console.error("translatePopupContent failed",y)}});function $(y,I){l(w)&&l(w)!==y.id&&g(w,null),g(w,y.id,!0),dn({type:"click",query_id:C??void 0,sku_ids:[y.id],position:I}),Re(We.WINE_DETAILS_VIEWED,l(L),{wine_id:y.id,wine_title:y.title,is_mobile:window.innerWidth<=768})}function ne(y,I){dn({type:"buy_click",query_id:C??void 0,sku_ids:[y.id],position:I}),Re(We.BUY_BUTTON_CLICKED,l(L),{wine_id:y.id,wine_title:y.title,wine_url:y.url,is_mobile:window.innerWidth<=768})}function Se(){const y=l(c).find(I=>I.id===l(w));Re(We.WINE_DETAILS_CLOSED,l(L),{wine_id:l(w),wine_title:y.title}),g(w,null)}function ae(y){return!!(y.reason||y.shortDescription||y.tags)}function _t(y){s==="store"&&ae(y)&&(g(A,y.id,!0),Re(We.WINE_CARD_HOVER,l(L),{wine_id:y.id,wine_title:y.title}))}function Be(y){s==="store"&&l(A)===y.id&&g(A,null)}function Je(y,I){y.target.closest(".js-WineTileAction")||y.target.closest(".js-WinePopupClose")||(dn({type:"click",query_id:C??void 0,sku_ids:[I.id],position:l(c).findIndex(H=>H.id===I.id)}),Re(We.WINE_CARD_CLICK,l(L),{wine_id:I.id,wine_title:I.title}))}function Kt(y){const I=y.target;I.closest(".js-WinePopup")||I.closest(".js-WineTileAction")||g(w,null)}Cn(()=>{var y,I;(y=l(ee))!=null&&y.brandColor&&document.documentElement.style.setProperty("--wr-brand-color",l(ee).brandColor),(I=l(ee))!=null&&I.wineaterColor&&document.documentElement.style.setProperty("--wr-wineater-color",l(ee).wineaterColor)}),zr(()=>(document.addEventListener("click",Kt),(async()=>{const y=fe.initializeStore();if(qn(y),await y,!l(pe)){g(d,!0);return}l(ee).customCss&&Gl(l(ee).customCss),g(a,!0),Re(We.WIDGET_INITIALIZED,l(L))})(),()=>{document.removeEventListener("click",Kt)}));var Pt=Ke(),Xr=_e(Pt);{var tu=y=>{var I=Jl(),H=T(I);{var se=ie=>{var Le=Kl(),Hn=T(Le);B(()=>de(Hn,"src",l(ee).logoUrl)),x(ie,Le)};U(H,ie=>{l(ee).logoUrl&&ie(se)})}var Me=W(H,2);tl(Me,{});var It=W(Me,2);fl(It,{onSubmit:Jr,get initialized(){return l(a)},get searchQuery(){return l(b)},set searchQuery(ie){g(b,ie,!0)}});var Xe=W(It,2),Mo=T(Xe);{var $r=ie=>{var Le=Yl(),Hn=T(Le),ti=T(Hn);B(()=>O(ti,l(_))),x(ie,Le)},ei=ie=>{var Le=Ke(),Hn=_e(Le);{var ti=_n=>{var Vn=Ql(),pr=_e(Vn);Mt(pr,21,()=>l(c),rn,(Kn,gr,mr)=>{Ol(Kn,{get wine(){return l(gr)},index:mr,get hoveredWineId(){return l(A)},get selectedWineId(){return l(w)},get isAnimating(){return l(k)},get translatedPopup(){return l(q)[mr]},onBuyClick:$,onBuyLinkClick:ne,onPopupClose:Se,onSimilarClick:z,onTileEnter:_t,onTileLeave:Be,onTileClick:Je})});var ni=W(pr,2);{var Gn=Kn=>{var gr=Zl(),mr=T(gr);jt(mr,{handleClick:S,variant:"outlined",children:(iu,yu)=>{var zo=xt();B(ou=>O(zo,ou),[()=>oe({key:"tryAgain",lang:l(N)})]),x(iu,zo)},$$slots:{default:!0}}),x(Kn,gr)};U(ni,Kn=>{l(E)&&Kn(Gn)})}x(_n,Vn)},ru=_n=>{var Vn=Ke(),pr=_e(Vn);{var ni=Gn=>{Po(Gn)};U(pr,Gn=>{l(p)&&Gn(ni)},!0)}x(_n,Vn)};U(Hn,_n=>{l(c)&&l(c).length>0?_n(ti):_n(ru,!1)},!0)}x(ie,Le)};U(Mo,ie=>{l(_)?ie($r):ie(ei,!1)})}var Un=W(Xe,2);{var vr=ie=>{Ul(ie,{get lang(){return l(N)}})};U(Un,ie=>{xs()&&ie(vr)})}var Lo=W(Un,2);al(Lo,{get countryCode(){return u}}),x(y,I)},nu=y=>{var I=Ke(),H=_e(I);{var se=Me=>{var It=Xl(),Xe=W(T(It),2);Po(Xe),x(Me,It)};U(H,Me=>{l(d)||Me(se)},!0)}x(y,I)};U(Xr,y=>{l(pe)?y(tu):y(nu,!1)})}x(e,Pt),ft()}return os(eu,{target:document.getElementById("wineater-widget-conteiner")})});
198
+ }`};function nu(e,t){var zo,Oo,jo;vt(t,!0),bt(e,tu);function n(){var y;Yr("chatbotToken",((y=window.wineaterData)==null?void 0:y.CLIENT_TOKEN)||r,365)}const r="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n(),Kl();const i=6*60*60*1e3,o=60*60*1e3,s=`${Xr}:instant-profile`,u=y=>`${Xr}:instant${y?`:${y}`:""}`,a=((zo=window==null?void 0:window.wineaterData)==null?void 0:zo.WIDGET_TYPE)||"store",c=((Oo=window==null?void 0:window.wineaterData)==null?void 0:Oo.COUNTRY_CODE)||null;(jo=window==null?void 0:window.wineaterData)!=null&&jo.WIDGET_WRAPPER;let v=Y(!1),g=Y(!1),f=!1,d=Y(!1),b=Y(!1),p=Y(He([])),m=Y(null),k=Y(""),A=Y(null),j=Y(!1),_=Y(null),T=Y(He([])),P=Y(""),C=Y(!1),R=Y(He([])),I=null;function X(y,D){y!=null&&y.length&&vn({type:"shown",query_id:I??void 0,sku_ids:y.map(H=>H.id),text:D||void 0})}let U=ie(()=>he.getAppLanguage()),G=ie(()=>he.getStoreLanguage()),we=ie(()=>he.getApiKey()),$=ie(()=>he.getStoreId()),Ee=ie(()=>he.isInitialized()),_e=ie(()=>he.getUiConfig());function Qt(){w(A,oe({key:"errorMessage",lang:l(U)}),!0)}const kn=()=>w(A,null);async function ii(y){if(l(U)===l(G)||a!=="bar")return y.map(()=>({}));const D=["shortDescription","reason","pairingRecommendation","tags"],H=y[0];if(!H)return y.map(()=>({}));const pe=D.filter(Ae=>Ae in H),se=4,Pe=[];for(let Ae=0;Ae<y.length;Ae+=se){const Sn=y.slice(Ae,Ae+se).map(async Cn=>{const le=pe.map(ee=>{const Fe=Cn[ee]||Cn[ee.toLowerCase()];return Fe?{key:ee,text:Array.isArray(Fe)?Fe.join(", "):Fe}:null}).filter(Boolean);return le.length===0?{}:await Gs({sourceLang:l(G),targetLang:l(U),texts:Object.fromEntries(le.map(ee=>[ee.key,ee.text])),apiKey:l(we)})}),Dt=await Promise.all(Sn);Pe.push(...Dt)}return Pe}async function oi(y){const D=$r(s,2592e6),H=$r(u(D),D?o:i),pe=!!(H!=null&&H.length);pe?w(p,H,!0):w(d,!0);try{const{wines:se,profileHash:Pe}=await pn.getInstantRecommendations();se.length>0&&(ei(u(Pe),se),ei(s,Pe)),!pe&&!f&&w(p,se,!0)}catch(se){console.error("[wineater] instant recommendations error:",se),!pe&&!f&&(await y,Qt())}finally{f||w(d,!1)}}function S(y=220){return!l(p)||l(p).length===0?Promise.resolve():(w(j,!0),new Promise(D=>{setTimeout(()=>{D()},y)}))}async function L(y){y.preventDefault(),f=!0;let D="",H;try{w(d,!0),kn(),D=l(k).trim()+";",w(P,D,!0),I=So(),H=I;try{ze(Oe.SEARCH_PERFORMED,l($),{query:D})}catch(le){console.error("Error tracking search event:",le)}let pe=!1,se=!1,Pe=null;const Ae=le=>{if(!le||le.length===0){w(p,[],!0),w(T,[],!0),w(A,oe({key:"noResultsMessage",lang:l(U)}),!0),ze(Oe.NO_RESULTS_FOUND,l($),{query:D});return}w(p,le,!0),w(d,!1),!se&&(se=!0,w(C,Jr==="2"&&le.length>=4,!0),X(le,D),ze(Oe.SEARCH_RESULTS_DISPLAYED,l($),{results_count:le.length,results:le,query:D}))},_r=le=>{H===I&&(pe?Ae(le):Pe=le)},Sn=pn.searchStream(D,I,_r);Sn.catch(()=>{}),await S(220),w(p,[],!0),w(j,!1),w(C,!1),w(R,[],!0),pe=!0,Pe&&Ae(Pe);const Dt=await Sn;if(H!==I)return;if(se&&Dt.length===l(p).length&&Dt.every((le,tt)=>{var ee;return le.id===((ee=l(p)[tt])==null?void 0:ee.id)})){const le=new Map(Dt.map(tt=>[tt.id,tt]));w(p,l(p).map(tt=>{var ee;return{...tt,reason:((ee=le.get(tt.id))==null?void 0:ee.reason)??tt.reason}}),!0)}else Ae(Dt)}catch(pe){if(H!==I)return;w(p,[],!0),console.error("[wineater] search error:",pe),ze(Oe.ERROR_OCCURRED,l($),{error_message:pe==null?void 0:pe.message,query:D}),Qt()}finally{H===I&&w(d,!1)}}async function te(){if(l(b)||!l(C))return;f=!0;const y=l(p);try{w(b,!0),w(d,!0),w(R,[...new Set([...l(R),...l(p).map(se=>se.id)])],!0);const D=pn.getMoreWineRecommendations(l(P),l(R));D.catch(()=>{}),await S(220),w(p,[],!0),w(j,!1);const{recommendations:H,hasMore:pe}=await D;vn({type:"more",query_id:I??void 0,text:l(P)||void 0}),X(H,l(P)),ze(Oe.SHOW_MORE_CLICKED,l($),{query:l(P),results_count:H.length}),w(p,H.length>0?H:y,!0),w(C,pe,!0)}catch(D){console.error("[wineater] try again error:",D),w(p,y,!0),w(C,!1)}finally{w(b,!1),w(d,!1)}}async function re(y){f=!0;try{w(d,!0),kn(),ze(Oe.SIMILAR_WINES_CLICKED,l($),{wine_id:y.id,wine_title:y.title}),vn({type:"similar",query_id:I??void 0,sku_ids:[y.id]}),I=So();const D=pn.getSimilarWines(y.id);D.catch(()=>{}),await S(220),w(p,[],!0),w(j,!1),w(C,!1),w(m,null);const H=await D;w(k,y.title,!0),w(P,""),!H||H.length===0?(w(p,[],!0),w(T,[],!0),w(A,oe({key:"noResultsMessage",lang:l(U)}),!0)):(w(p,H,!0),X(H,""))}catch(D){w(p,[],!0),console.error("[wineater] similar wines error:",D),Qt()}finally{w(d,!1)}}Wn(async()=>{if(!l(p)||l(p).length===0){w(T,[],!0);return}try{const y=await ii(l(p));l(p)&&l(p).length>0&&w(T,y,!0)}catch(y){console.error("translatePopupContent failed",y)}});function Te(y,D){l(m)&&l(m)!==y.id&&w(m,null),w(m,y.id,!0),vn({type:"click",query_id:I??void 0,sku_ids:[y.id],position:D}),ze(Oe.WINE_DETAILS_VIEWED,l($),{wine_id:y.id,wine_title:y.title,is_mobile:window.innerWidth<=768})}function ae(y,D){vn({type:"buy_click",query_id:I??void 0,sku_ids:[y.id],position:D}),ze(Oe.BUY_BUTTON_CLICKED,l($),{wine_id:y.id,wine_title:y.title,wine_url:y.url,is_mobile:window.innerWidth<=768})}function kt(){const y=l(p).find(D=>D.id===l(m));ze(Oe.WINE_DETAILS_CLOSED,l($),{wine_id:l(m),wine_title:y.title}),w(m,null)}function qe(y){return!!(y.reason||y.shortDescription||y.tags)}function et(y){a==="store"&&qe(y)&&(w(_,y.id,!0),ze(Oe.WINE_CARD_HOVER,l($),{wine_id:y.id,wine_title:y.title}))}function xn(y){a==="store"&&l(_)===y.id&&w(_,null)}function Jt(y,D){y.target.closest(".js-WineTileAction")||y.target.closest(".js-WinePopupClose")||(vn({type:"click",query_id:I??void 0,sku_ids:[D.id],position:l(p).findIndex(H=>H.id===D.id)}),ze(Oe.WINE_CARD_CLICK,l($),{wine_id:D.id,wine_title:D.title}))}function wr(y){const D=y.target;D.closest(".js-WinePopup")||D.closest(".js-WineTileAction")||w(m,null)}Wn(()=>{var y,D;(y=l(_e))!=null&&y.brandColor&&document.documentElement.style.setProperty("--wr-brand-color",l(_e).brandColor),(D=l(_e))!=null&&D.wineaterColor&&document.documentElement.style.setProperty("--wr-wineater-color",l(_e).wineaterColor)}),Ur(()=>(document.addEventListener("click",wr),(async()=>{const y=he.initializeStore();if(oi(y),await y,!l(Ee)){w(g,!0);return}l(_e).customCss&&Yl(l(_e).customCss),w(v,!0),ze(Oe.WIDGET_INITIALIZED,l($))})(),()=>{document.removeEventListener("click",wr)}));var Lo=Xe(),ru=ke(Lo);{var iu=y=>{var D=$l(),H=E(D);{var pe=ee=>{var Fe=Zl(),Kn=E(Fe);B(()=>fe(Kn,"src",l(_e).logoUrl)),x(ee,Fe)};F(H,ee=>{l(_e).logoUrl&&ee(pe)})}var se=N(H,2);rl(se,{});var Pe=N(se,2);vl(Pe,{onSubmit:L,get initialized(){return l(v)},get searchQuery(){return l(k)},set searchQuery(ee){w(k,ee,!0)}});var Ae=N(Pe,2),_r=E(Ae);{var Sn=ee=>{var Fe=Ql(),Kn=E(Fe),ai=E(Kn);B(()=>z(ai,l(A))),x(ee,Fe)},Dt=ee=>{var Fe=Xe(),Kn=ke(Fe);{var ai=En=>{var Yn=Xl(),br=ke(Yn);zt(br,21,()=>l(p),sn,(Qn,yr,kr)=>{ql(Qn,{get wine(){return l(yr)},index:kr,get hoveredWineId(){return l(_)},get selectedWineId(){return l(m)},get isAnimating(){return l(j)},get translatedPopup(){return l(T)[kr]},onBuyClick:Te,onBuyLinkClick:ae,onPopupClose:kt,onSimilarClick:re,onTileEnter:et,onTileLeave:xn,onTileClick:Jt})});var si=N(br,2);{var Zn=Qn=>{var yr=Jl(),kr=E(yr);Ft(kr,{handleClick:te,variant:"outlined",children:(su,Su)=>{var qo=Et();B(lu=>z(qo,lu),[()=>oe({key:"tryAgain",lang:l(U)})]),x(su,qo)},$$slots:{default:!0}}),x(Qn,yr)};F(si,Qn=>{l(C)&&Qn(Zn)})}x(En,Yn)},au=En=>{var Yn=Xe(),br=ke(Yn);{var si=Zn=>{Ro(Zn)};F(br,Zn=>{l(d)&&Zn(si)},!0)}x(En,Yn)};F(Kn,En=>{l(p)&&l(p).length>0?En(ai):En(au,!1)},!0)}x(ee,Fe)};F(_r,ee=>{l(A)?ee(Sn):ee(Dt,!1)})}var Cn=N(Ae,2);{var le=ee=>{Gl(ee,{get lang(){return l(U)}})};F(Cn,ee=>{Cs()&&ee(le)})}var tt=N(Cn,2);ll(tt,{get countryCode(){return c}}),x(y,D)},ou=y=>{var D=Xe(),H=ke(D);{var pe=se=>{var Pe=eu(),Ae=N(E(Pe),2);Ro(Ae),x(se,Pe)};F(H,se=>{l(g)||se(pe)},!0)}x(y,D)};F(ru,y=>{l(Ee)?y(iu):y(ou,!1)})}x(e,Lo),pt()}return ss(nu,{target:document.getElementById("wineater-widget-conteiner")})});