wineater-bot 4.24.2 → 4.24.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- (function(te,ne){typeof exports=="object"&&typeof module<"u"?module.exports=ne():typeof define=="function"&&define.amd?define(ne):(te=typeof globalThis<"u"?globalThis:te||self,te.WineaterChatbot=ne())})(this,function(){"use strict";var gu=Object.defineProperty;var ya=te=>{throw TypeError(te)};var mu=(te,ne,he)=>ne in te?gu(te,ne,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ne]=he;var et=(te,ne,he)=>mu(te,typeof ne!="symbol"?ne+"":ne,he),Ci=(te,ne,he)=>ne.has(te)||ya("Cannot "+he);var h=(te,ne,he)=>(Ci(te,ne,"read from private field"),he?he.call(te):ne.get(te)),U=(te,ne,he)=>ne.has(te)?ya("Cannot add the same private member more than once"):ne instanceof WeakSet?ne.add(te):ne.set(te,he),N=(te,ne,he,Nn)=>(Ci(te,ne,"write to private field"),Nn?Nn.call(te,he):ne.set(te,he),he),G=(te,ne,he)=>(Ci(te,ne,"access private method"),he);var la,Tn,En,en,tn,Zn,Pn,An,we,Ti,dn,Ei,ba,xa,Ze,Xe,mi,pt,nn,gt,$e,qe,mt,Dt,zt,rn,Ot,on,jt,Pr,_e,wu,_u,Pi,Br,Nr,Ai,it,wt,Ve,an,Xn,$n,Ar,In,er,sn,Dn,Rn,de,Ii,Ut,Di,Ri,ka,ca,ua,da;const te="5";typeof window<"u"&&((la=window.__svelte??(window.__svelte={})).v??(la.v=new Set)).add(te);const ne=1,he=2,Nn=4,Sa=8,Ca=16,Ta=1,Ea=2,Pa=4,Aa=8,Ia=16,Wi=1,Da=2,Se=Symbol(),Ra="http://www.w3.org/1999/xhtml",Lr=!1;var zr=Array.isArray,Wa=Array.prototype.indexOf,Or=Array.from,Ma=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Ba=Object.getOwnPropertyDescriptors,Na=Object.prototype,La=Array.prototype,Mi=Object.getPrototypeOf,Bi=Object.isExtensible;function za(e){for(var t=0;t<e.length;t++)e[t]()}function Ni(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function Oa(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const be=2,jr=4,qr=8,bt=16,xt=32,Ht=64,ur=128,tt=512,Ce=1024,Be=2048,kt=4096,Fe=8192,St=16384,Fr=32768,Vt=65536,Li=1<<17,zi=1<<18,hn=1<<19,ja=1<<20,Gt=32768,Ur=1<<21,Hr=1<<22,Rt=1<<23,Kt=Symbol("$state"),qa=Symbol("legacy props"),Fa=Symbol(""),vn=new class extends Error{constructor(){super(...arguments);et(this,"name","StaleReactionError");et(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ua(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ha(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Va(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ga(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ka(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ya(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Qa(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ja(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Za(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xa(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $a(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function es(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ts(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Oi(e){return e===this.v}function ns(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ji(e){return!ns(e,this.v)}let pn=!1,rs=!1;function is(){pn=!0}let ve=null;function gn(e){ve=e}function st(e,t=!1,n){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,l:pn&&!t?{s:null,u:null,$:[]}:null}}function lt(e){var t=ve,n=t.e;if(n!==null){t.e=null;for(var r of n)oo(r)}return e!==void 0&&(t.x=e),t.i=!0,ve=t.p,e??{}}function Ln(){return!pn||ve!==null&&ve.l===null}let Yt=[];function qi(){var e=Yt;Yt=[],za(e)}function mn(e){if(Yt.length===0&&!zn){var t=Yt;queueMicrotask(()=>{t===Yt&&qi()})}Yt.push(e)}function os(){for(;Yt.length>0;)qi()}function Fi(e){var t=$;if(t===null)return Y.f|=Rt,e;if(t.f&Fr)wn(e,t);else{if(!(t.f&ur))throw e;t.b.error(e)}}function wn(e,t){for(;t!==null;){if(t.f&ur)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const dr=new Set;let X=null,fr=null,pe=null,Ke=[],hr=null,Vr=!1,zn=!1;const Er=class Er{constructor(){U(this,we);et(this,"committed",!1);et(this,"current",new Map);et(this,"previous",new Map);U(this,Tn,new Set);U(this,En,new Set);U(this,en,0);U(this,tn,0);U(this,Zn,null);U(this,Pn,[]);U(this,An,[]);et(this,"skipped_effects",new Set);et(this,"is_fork",!1)}is_deferred(){return this.is_fork||h(this,tn)>0}process(t){var r;Ke=[],fr=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of t)G(this,we,Ti).call(this,i,n);this.is_fork||G(this,we,ba).call(this),this.is_deferred()?(G(this,we,dn).call(this,n.effects),G(this,we,dn).call(this,n.render_effects),G(this,we,dn).call(this,n.block_effects)):(fr=this,X=null,Hi(n.render_effects),Hi(n.effects),fr=null,(r=h(this,Zn))==null||r.resolve()),pe=null}capture(t,n){this.previous.has(t)||this.previous.set(t,n),t.f&Rt||(this.current.set(t,t.v),pe==null||pe.set(t,t.v))}activate(){X=this,this.apply()}deactivate(){X===this&&(X=null,pe=null)}flush(){if(this.activate(),Ke.length>0){if(Ui(),X!==null&&X!==this)return}else h(this,en)===0&&this.process([]);this.deactivate()}discard(){for(const t of h(this,En))t(this);h(this,En).clear()}increment(t){N(this,en,h(this,en)+1),t&&N(this,tn,h(this,tn)+1)}decrement(t){N(this,en,h(this,en)-1),t&&N(this,tn,h(this,tn)-1),this.revive()}revive(){for(const t of h(this,Pn))Te(t,Be),Qt(t);for(const t of h(this,An))Te(t,kt),Qt(t);N(this,Pn,[]),N(this,An,[]),this.flush()}oncommit(t){h(this,Tn).add(t)}ondiscard(t){h(this,En).add(t)}settled(){return(h(this,Zn)??N(this,Zn,Ni())).promise}static ensure(){if(X===null){const t=X=new Er;dr.add(X),zn||Er.enqueue(()=>{X===t&&t.flush()})}return X}static enqueue(t){mn(t)}apply(){}};Tn=new WeakMap,En=new WeakMap,en=new WeakMap,tn=new WeakMap,Zn=new WeakMap,Pn=new WeakMap,An=new WeakMap,we=new WeakSet,Ti=function(t,n){var p;t.f^=Ce;for(var r=t.first;r!==null;){var i=r.f,o=(i&(xt|Ht))!==0,l=o&&(i&Ce)!==0,c=l||(i&Fe)!==0||this.skipped_effects.has(r);if(r.f&ur&&((p=r.b)!=null&&p.is_pending())&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!c&&r.fn!==null){o?r.f^=Ce:i&jr?n.effects.push(r):Un(r)&&(r.f&bt&&n.block_effects.push(r),Hn(r));var s=r.first;if(s!==null){r=s;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)u===n.effect&&(G(this,we,dn).call(this,n.effects),G(this,we,dn).call(this,n.render_effects),G(this,we,dn).call(this,n.block_effects),n=n.parent),r=u.next,u=u.parent}},dn=function(t){for(const n of t)(n.f&Be?h(this,Pn):h(this,An)).push(n),G(this,we,Ei).call(this,n.deps),Te(n,Ce)},Ei=function(t){if(t!==null)for(const n of t)!(n.f&be)||!(n.f&Gt)||(n.f^=Gt,G(this,we,Ei).call(this,n.deps))},ba=function(){if(h(this,tn)===0){for(const t of h(this,Tn))t();h(this,Tn).clear()}h(this,en)===0&&G(this,we,xa).call(this)},xa=function(){var o;if(dr.size>1){this.previous.clear();var t=pe,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const l of dr){if(l===this){n=!1;continue}const c=[];for(const[u,p]of this.current){if(l.current.has(u))if(n&&p!==l.current.get(u))l.current.set(u,p);else continue;c.push(u)}if(c.length===0)continue;const s=[...l.current.keys()].filter(u=>!this.current.has(u));if(s.length>0){var i=Ke;Ke=[];const u=new Set,p=new Map;for(const m of c)Vi(m,s,u,p);if(Ke.length>0){X=l,l.apply();for(const m of Ke)G(o=l,we,Ti).call(o,m,r);l.deactivate()}Ke=i}}X=null,pe=t}this.committed=!0,dr.delete(this)};let Ct=Er;function as(e){var t=zn;zn=!0;try{for(var n;;){if(os(),Ke.length===0&&(X==null||X.flush(),Ke.length===0))return hr=null,n;Ui()}}finally{zn=t}}function Ui(){var e=Bt;Vr=!0;var t=null;try{var n=0;for(_r(!0);Ke.length>0;){var r=Ct.ensure();if(n++>1e3){var i,o;ss()}r.process(Ke),Mt.clear()}}finally{Vr=!1,_r(e),hr=null}}function ss(){try{Ya()}catch(e){wn(e,hr)}}let nt=null;function Hi(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(St|Fe))&&Un(r)&&(nt=new Set,Hn(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?co(r):r.fn=null),(nt==null?void 0:nt.size)>0)){Mt.clear();for(const i of nt){if(i.f&(St|Fe))continue;const o=[i];let l=i.parent;for(;l!==null;)nt.has(l)&&(nt.delete(l),o.push(l)),l=l.parent;for(let c=o.length-1;c>=0;c--){const s=o[c];s.f&(St|Fe)||Hn(s)}}nt.clear()}}nt=null}}function Vi(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&be?Vi(i,t,n,r):o&(Hr|bt)&&!(o&Be)&&Gi(i,t,r)&&(Te(i,Be),Qt(i))}}function Gi(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&be&&Gi(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Qt(e){for(var t=hr=e;t.parent!==null;){t=t.parent;var n=t.f;if(Vr&&t===$&&n&bt&&!(n&zi))return;if(n&(Ht|xt)){if(!(n&Ce))return;t.f^=Ce}}Ke.push(t)}function ls(e){let t=0,n=Jt(0),r;return()=>{mr()&&(a(n),Zr(()=>(t===0&&(r=Vn(()=>e(()=>On(n)))),t+=1,()=>{mn(()=>{t-=1,t===0&&(r==null||r(),r=void 0,On(n))})})))}}var cs=Vt|hn|ur;function us(e,t,n){new ds(e,t,n)}class ds{constructor(t,n,r){U(this,_e);et(this,"parent");U(this,Ze,!1);U(this,Xe);U(this,mi,null);U(this,pt);U(this,nn);U(this,gt);U(this,$e,null);U(this,qe,null);U(this,mt,null);U(this,Dt,null);U(this,zt,null);U(this,rn,0);U(this,Ot,0);U(this,on,!1);U(this,jt,null);U(this,Pr,ls(()=>(N(this,jt,Jt(h(this,rn))),()=>{N(this,jt,null)})));N(this,Xe,t),N(this,pt,n),N(this,nn,r),this.parent=$.b,N(this,Ze,!!h(this,pt).pending),N(this,gt,wr(()=>{$.b=this;{var i=G(this,_e,Pi).call(this);try{N(this,$e,Ye(()=>r(i)))}catch(o){this.error(o)}h(this,Ot)>0?G(this,_e,Nr).call(this):N(this,Ze,!1)}return()=>{var o;(o=h(this,zt))==null||o.remove()}},cs))}is_pending(){return h(this,Ze)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!h(this,pt).pending}update_pending_count(t){G(this,_e,Ai).call(this,t),N(this,rn,h(this,rn)+t),h(this,jt)&&yn(h(this,jt),h(this,rn))}get_effect_pending(){return h(this,Pr).call(this),a(h(this,jt))}error(t){var n=h(this,pt).onerror;let r=h(this,pt).failed;if(h(this,on)||!n&&!r)throw t;h(this,$e)&&(Ne(h(this,$e)),N(this,$e,null)),h(this,qe)&&(Ne(h(this,qe)),N(this,qe,null)),h(this,mt)&&(Ne(h(this,mt)),N(this,mt,null));var i=!1,o=!1;const l=()=>{if(i){ts();return}i=!0,o&&$a(),Ct.ensure(),N(this,rn,0),h(this,mt)!==null&&bn(h(this,mt),()=>{N(this,mt,null)}),N(this,Ze,this.has_pending_snippet()),N(this,$e,G(this,_e,Br).call(this,()=>(N(this,on,!1),Ye(()=>h(this,nn).call(this,h(this,Xe)))))),h(this,Ot)>0?G(this,_e,Nr).call(this):N(this,Ze,!1)};var c=Y;try{Le(null),o=!0,n==null||n(t,l),o=!1}catch(s){wn(s,h(this,gt)&&h(this,gt).parent)}finally{Le(c)}r&&mn(()=>{N(this,mt,G(this,_e,Br).call(this,()=>{Ct.ensure(),N(this,on,!0);try{return Ye(()=>{r(h(this,Xe),()=>t,()=>l)})}catch(s){return wn(s,h(this,gt).parent),null}finally{N(this,on,!1)}}))})}}Ze=new WeakMap,Xe=new WeakMap,mi=new WeakMap,pt=new WeakMap,nn=new WeakMap,gt=new WeakMap,$e=new WeakMap,qe=new WeakMap,mt=new WeakMap,Dt=new WeakMap,zt=new WeakMap,rn=new WeakMap,Ot=new WeakMap,on=new WeakMap,jt=new WeakMap,Pr=new WeakMap,_e=new WeakSet,wu=function(){try{N(this,$e,Ye(()=>h(this,nn).call(this,h(this,Xe))))}catch(t){this.error(t)}N(this,Ze,!1)},_u=function(){const t=h(this,pt).pending;t&&(N(this,qe,Ye(()=>t(h(this,Xe)))),Ct.enqueue(()=>{var n=G(this,_e,Pi).call(this);N(this,$e,G(this,_e,Br).call(this,()=>(Ct.ensure(),Ye(()=>h(this,nn).call(this,n))))),h(this,Ot)>0?G(this,_e,Nr).call(this):(bn(h(this,qe),()=>{N(this,qe,null)}),N(this,Ze,!1))}))},Pi=function(){var t=h(this,Xe);return h(this,Ze)&&(N(this,zt,Tt()),h(this,Xe).before(h(this,zt)),t=h(this,zt)),t},Br=function(t){var n=$,r=Y,i=ve;dt(h(this,gt)),Le(h(this,gt)),gn(h(this,gt).ctx);try{return t()}catch(o){return Fi(o),null}finally{dt(n),Le(r),gn(i)}},Nr=function(){const t=h(this,pt).pending;h(this,$e)!==null&&(N(this,Dt,document.createDocumentFragment()),h(this,Dt).append(h(this,zt)),ho(h(this,$e),h(this,Dt))),h(this,qe)===null&&N(this,qe,Ye(()=>t(h(this,Xe))))},Ai=function(t){var n;if(!this.has_pending_snippet()){this.parent&&G(n=this.parent,_e,Ai).call(n,t);return}N(this,Ot,h(this,Ot)+t),h(this,Ot)===0&&(N(this,Ze,!1),h(this,qe)&&bn(h(this,qe),()=>{N(this,qe,null)}),h(this,Dt)&&(h(this,Xe).before(h(this,Dt)),N(this,Dt,null)))};function _n(e,t){return t}function fs(e,t,n){for(var r=[],i=t.length,o=0;o<i;o++)Xr(t[o].e,r,!0);uo(r,()=>{var l=r.length===0&&n!==null;if(l){var c=n,s=c.parentNode;ks(s),s.append(c),e.items.clear(),ct(e,t[0].prev,t[i-1].next)}for(var u=0;u<i;u++){var p=t[u];l||(e.items.delete(p.k),ct(e,p.prev,p.next)),Ne(p.e,!l)}e.first===t[0]&&(e.first=t[0].prev)})}function Wt(e,t,n,r,i,o=null){var l=e,c=new Map,s=null,u=(t&Nn)!==0,p=(t&ne)!==0,m=(t&he)!==0;if(u){var f=e;l=f.appendChild(Tt())}var d=null,w=Kr(()=>{var b=n();return zr(b)?b:b==null?[]:Or(b)}),y,v=!0;function x(){hs(z,y,l,t,r),d!==null&&(y.length===0?(d.fragment?(l.before(d.fragment),d.fragment=null):$r(d.effect),R.first=d.effect):bn(d.effect,()=>{d=null}))}var R=wr(()=>{y=a(w);for(var b=y.length,E=new Set,P=X,C=null,A=ro(),O=0;O<b;O+=1){var j=y[O],Q=r(j,O),H=v?null:c.get(Q);H?(p&&yn(H.v,j),m?yn(H.i,O):H.i=O,A&&P.skipped_effects.delete(H.e)):(H=vs(v?l:null,C,j,Q,O,i,t,n),v&&(H.o=!0,C===null?s=H:C.next=H,C=H),c.set(Q,H)),E.add(Q)}if(b===0&&o&&!d)if(v)d={fragment:null,effect:Ye(()=>o(l))};else{var ue=document.createDocumentFragment(),ie=Tt();ue.append(ie),d={fragment:ue,effect:Ye(()=>o(ie))}}if(!v)if(A){for(const[xe,Re]of c)E.has(xe)||P.skipped_effects.add(Re.e);P.oncommit(x),P.ondiscard(()=>{})}else x();a(w)}),z={effect:R,items:c,first:s};v=!1}function hs(e,t,n,r,i){var j,Q,H,ue;var o=(r&Sa)!==0,l=t.length,c=e.items,s=e.first,u,p=null,m,f=[],d=[],w,y,v,x;if(o)for(x=0;x<l;x+=1)w=t[x],y=i(w,x),v=c.get(y),(j=v.a)==null||j.measure(),(m??(m=new Set)).add(v);for(x=0;x<l;x+=1){if(w=t[x],y=i(w,x),v=c.get(y),e.first??(e.first=v),!v.o){v.o=!0;var R=p?p.next:s;ct(e,p,v),ct(e,v,R),Gr(v,R,n),p=v,f=[],d=[],s=p.next;continue}if(v.e.f&Fe&&($r(v.e),o&&((Q=v.a)==null||Q.unfix(),(m??(m=new Set)).delete(v))),v!==s){if(u!==void 0&&u.has(v)){if(f.length<d.length){var z=d[0],b;p=z.prev;var E=f[0],P=f[f.length-1];for(b=0;b<f.length;b+=1)Gr(f[b],z,n);for(b=0;b<d.length;b+=1)u.delete(d[b]);ct(e,E.prev,P.next),ct(e,p,E),ct(e,P,z),s=z,p=P,x-=1,f=[],d=[]}else u.delete(v),Gr(v,s,n),ct(e,v.prev,v.next),ct(e,v,p===null?e.first:p.next),ct(e,p,v),p=v;continue}for(f=[],d=[];s!==null&&s.k!==y;)s.e.f&Fe||(u??(u=new Set)).add(s),d.push(s),s=s.next;if(s===null)continue;v=s}f.push(v),p=v,s=v.next}if(s!==null||u!==void 0){for(var C=u===void 0?[]:Or(u);s!==null;)s.e.f&Fe||C.push(s),s=s.next;var A=C.length;if(A>0){var O=r&Nn&&l===0?n:null;if(o){for(x=0;x<A;x+=1)(H=C[x].a)==null||H.measure();for(x=0;x<A;x+=1)(ue=C[x].a)==null||ue.fix()}fs(e,C,O)}}o&&mn(()=>{var ie;if(m!==void 0)for(v of m)(ie=v.a)==null||ie.apply()})}function vs(e,t,n,r,i,o,l,c){var s=(l&ne)!==0,u=(l&Ca)===0,p=s?u?_s(n,!1,!1):Jt(n):n,m=l&he?Jt(i):i,f={i:m,v:p,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var d=document.createDocumentFragment();d.append(e=Tt())}return f.e=Ye(()=>o(e,p,m,c)),t!==null&&(t.next=f),f}finally{}}function Gr(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 l=jn(o);i.before(o),o=l}}function ct(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 ps(e,t,n,r){const i=Ln()?pr:Kr;if(n.length===0&&e.length===0){r(t.map(i));return}var o=X,l=$,c=gs();function s(){Promise.all(n.map(u=>ms(u))).then(u=>{c();try{r([...t.map(i),...u])}catch(p){l.f&St||wn(p,l)}o==null||o.deactivate(),vr()}).catch(u=>{wn(u,l)})}e.length>0?Promise.all(e).then(()=>{c();try{return s()}finally{o==null||o.deactivate(),vr()}}):s()}function gs(){var e=$,t=Y,n=ve,r=X;return function(o=!0){dt(e),Le(t),gn(n),o&&(r==null||r.activate())}}function vr(){dt(null),Le(null),gn(null)}function pr(e){var t=be|Be,n=Y!==null&&Y.f&be?Y:null;return $!==null&&($.f|=hn),{ctx:ve,deps:null,effects:null,equals:Oi,f:t,fn:e,reactions:null,rv:0,v:Se,wv:0,parent:n??$,ac:null}}function ms(e,t){let n=$;n===null&&Ha();var r=n.b,i=void 0,o=Jt(Se),l=!Y,c=new Map;return As(()=>{var f;var s=Ni();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).then(()=>{u===X&&u.committed&&u.deactivate(),vr()})}catch(d){s.reject(d),vr()}var u=X;if(l){var p=!r.is_pending();r.update_pending_count(1),u.increment(p),(f=c.get(u))==null||f.reject(vn),c.delete(u),c.set(u,s)}const m=(d,w=void 0)=>{if(u.activate(),w)w!==vn&&(o.f|=Rt,yn(o,w));else{o.f&Rt&&(o.f^=Rt),yn(o,d);for(const[y,v]of c){if(c.delete(y),y===u)break;v.reject(vn)}}l&&(r.update_pending_count(-1),u.decrement(p))};s.promise.then(m,d=>m(null,d||"unknown"))}),Jr(()=>{for(const s of c.values())s.reject(vn)}),new Promise(s=>{function u(p){function m(){p===i?s(o):u(i)}p.then(m,m)}u(i)})}function Z(e){const t=pr(e);return po(t),t}function Kr(e){const t=pr(e);return t.equals=ji,t}function Ki(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ne(t[n])}}function ws(e){for(var t=e.parent;t!==null;){if(!(t.f&be))return t.f&St?null:t;t=t.parent}return null}function Yr(e){var t,n=$;dt(ws(e));try{e.f&=~Gt,Ki(e),t=yo(e)}finally{dt(n)}return t}function Yi(e){var t=Yr(e);if(e.equals(t)||(X!=null&&X.is_fork||(e.v=t),e.wv=wo()),!Zt)if(pe!==null)mr()&&pe.set(e,t);else{var n=e.f&tt?Ce:kt;Te(e,n)}}let Qr=new Set;const Mt=new Map;let Qi=!1;function Jt(e,t){var n={f:0,v:e,reactions:null,equals:Oi,rv:0,wv:0};return n}function K(e,t){const n=Jt(e);return po(n),n}function _s(e,t=!1,n=!0){var i;const r=Jt(e);return t||(r.equals=ji),pn&&n&&ve!==null&&ve.l!==null&&((i=ve.l).s??(i.s=[])).push(r),r}function g(e,t,n=!1){Y!==null&&(!ut||Y.f&Li)&&Ln()&&Y.f&(be|bt|Hr|Li)&&!(Ie!=null&&Ie.includes(e))&&Xa();let r=n?Ue(t):t;return yn(e,r)}function yn(e,t){if(!e.equals(t)){var n=e.v;Zt?Mt.set(e,t):Mt.set(e,n),e.v=t;var r=Ct.ensure();r.capture(e,n),e.f&be&&(e.f&Be&&Yr(e),Te(e,e.f&tt?Ce:kt)),e.wv=wo(),Zi(e,Be),Ln()&&$!==null&&$.f&Ce&&!($.f&(xt|Ht))&&(Qe===null?Rs([e]):Qe.push(e)),!r.is_fork&&Qr.size>0&&!Qi&&ys()}return t}function ys(){Qi=!1;var e=Bt;_r(!0);const t=Array.from(Qr);try{for(const n of t)n.f&Ce&&Te(n,kt),Un(n)&&Hn(n)}finally{_r(e)}Qr.clear()}function Ji(e,t=1){var n=a(e),r=t===1?n++:n--;return g(e,n),r}function On(e){g(e,e.v+1)}function Zi(e,t){var n=e.reactions;if(n!==null)for(var r=Ln(),i=n.length,o=0;o<i;o++){var l=n[o],c=l.f;if(!(!r&&l===$)){var s=(c&Be)===0;if(s&&Te(l,t),c&be){var u=l;pe==null||pe.delete(u),c&Gt||(c&tt&&(l.f|=Gt),Zi(u,kt))}else s&&(c&bt&&nt!==null&&nt.add(l),Qt(l))}}}function Ue(e){if(typeof e!="object"||e===null||Kt in e)return e;const t=Mi(e);if(t!==Na&&t!==La)return e;var n=new Map,r=zr(e),i=K(0),o=Xt,l=c=>{if(Xt===o)return c();var s=Y,u=Xt;Le(null),mo(o);var p=c();return Le(s),mo(u),p};return r&&n.set("length",K(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ja();var p=n.get(s);return p===void 0?p=l(()=>{var m=K(u.value);return n.set(s,m),m}):g(p,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const p=l(()=>K(Se));n.set(s,p),On(i)}}else g(u,Se),On(i);return!0},get(c,s,u){var d;if(s===Kt)return e;var p=n.get(s),m=s in c;if(p===void 0&&(!m||(d=fn(c,s))!=null&&d.writable)&&(p=l(()=>{var w=Ue(m?c[s]:Se),y=K(w);return y}),n.set(s,p)),p!==void 0){var f=a(p);return f===Se?void 0:f}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var p=n.get(s);p&&(u.value=a(p))}else if(u===void 0){var m=n.get(s),f=m==null?void 0:m.v;if(m!==void 0&&f!==Se)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(c,s){var f;if(s===Kt)return!0;var u=n.get(s),p=u!==void 0&&u.v!==Se||Reflect.has(c,s);if(u!==void 0||$!==null&&(!p||(f=fn(c,s))!=null&&f.writable)){u===void 0&&(u=l(()=>{var d=p?Ue(c[s]):Se,w=K(d);return w}),n.set(s,u));var m=a(u);if(m===Se)return!1}return p},set(c,s,u,p){var z;var m=n.get(s),f=s in c;if(r&&s==="length")for(var d=u;d<m.v;d+=1){var w=n.get(d+"");w!==void 0?g(w,Se):d in c&&(w=l(()=>K(Se)),n.set(d+"",w))}if(m===void 0)(!f||(z=fn(c,s))!=null&&z.writable)&&(m=l(()=>K(void 0)),g(m,Ue(u)),n.set(s,m));else{f=m.v!==Se;var y=l(()=>Ue(u));g(m,y)}var v=Reflect.getOwnPropertyDescriptor(c,s);if(v!=null&&v.set&&v.set.call(p,u),!f){if(r&&typeof s=="string"){var x=n.get("length"),R=Number(s);Number.isInteger(R)&&R>=x.v&&g(x,R+1)}On(i)}return!0},ownKeys(c){a(i);var s=Reflect.ownKeys(c).filter(m=>{var f=n.get(m);return f===void 0||f.v!==Se});for(var[u,p]of n)p.v!==Se&&!(u in c)&&s.push(u);return s},setPrototypeOf(){Za()}})}function Xi(e){try{if(e!==null&&typeof e=="object"&&Kt in e)return e[Kt]}catch{}return e}function bs(e,t){return Object.is(Xi(e),Xi(t))}var $i,eo,to,no;function xs(){if($i===void 0){$i=window,eo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;to=fn(t,"firstChild").get,no=fn(t,"nextSibling").get,Bi(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Bi(n)&&(n.__t=void 0)}}function Tt(e=""){return document.createTextNode(e)}function Et(e){return to.call(e)}function jn(e){return no.call(e)}function T(e,t){return Et(e)}function me(e,t=!1){{var n=Et(e);return n instanceof Comment&&n.data===""?jn(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=jn(r);return r}function ks(e){e.textContent=""}function ro(){return!1}let io=!1;function Ss(){io||(io=!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 gr(e){var t=Y,n=$;Le(null),dt(null);try{return e()}finally{Le(t),dt(n)}}function Cs(e,t,n,r=n){e.addEventListener(t,()=>gr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ss()}function Ts(e){$===null&&(Y===null&&Ka(),Ga()),Zt&&Va()}function Es(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=$;r!==null&&r.f&Fe&&(e|=Fe);var i={ctx:ve,deps:null,nodes_start:null,nodes_end:null,f:e|Be|tt,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{Hn(i),i.f|=Fr}catch(c){throw Ne(i),c}else t!==null&&Qt(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&!(o.f&hn)&&(o=o.first,e&bt&&e&Vt&&o!==null&&(o.f|=Vt)),o!==null&&(o.parent=r,r!==null&&Es(o,r),Y!==null&&Y.f&be&&!(e&Ht))){var l=Y;(l.effects??(l.effects=[])).push(o)}return i}function mr(){return Y!==null&&!ut}function Jr(e){const t=Pt(qr,null,!1);return Te(t,Ce),t.teardown=e,t}function qn(e){Ts();var t=$.f,n=!Y&&(t&xt)!==0&&(t&Fr)===0;if(n){var r=ve;(r.e??(r.e=[])).push(e)}else return oo(e)}function oo(e){return Pt(jr|ja,e,!1)}function Ps(e){Ct.ensure();const t=Pt(Ht|hn,e,!0);return(n={})=>new Promise(r=>{n.outro?bn(t,()=>{Ne(t),r(void 0)}):(Ne(t),r(void 0))})}function ao(e){return Pt(jr,e,!1)}function As(e){return Pt(Hr|hn,e,!0)}function Zr(e,t=0){return Pt(qr|t,e,!0)}function M(e,t=[],n=[],r=[]){ps(r,t,n,i=>{Pt(qr,()=>e(...i.map(a)),!0)})}function wr(e,t=0){var n=Pt(bt|t,e,!0);return n}function Ye(e){return Pt(xt|hn,e,!0)}function so(e){var t=e.teardown;if(t!==null){const n=Zt,r=Y;vo(!0),Le(null);try{t.call(null)}finally{vo(n),Le(r)}}}function lo(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&gr(()=>{i.abort(vn)});var r=n.next;n.f&Ht?n.parent=null:Ne(n,t),n=r}}function Is(e){for(var t=e.first;t!==null;){var n=t.next;t.f&xt||Ne(t),t=n}}function Ne(e,t=!0){var n=!1;(t||e.f&zi)&&e.nodes_start!==null&&e.nodes_end!==null&&(Ds(e.nodes_start,e.nodes_end),n=!0),lo(e,t&&!n),yr(e,0),Te(e,St);var r=e.transitions;if(r!==null)for(const o of r)o.stop();so(e);var i=e.parent;i!==null&&i.first!==null&&co(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Ds(e,t){for(;e!==null;){var n=e===t?null:jn(e);e.remove(),e=n}}function co(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 bn(e,t,n=!0){var r=[];Xr(e,r,!0),uo(r,()=>{n&&Ne(e),t&&t()})}function uo(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Xr(e,t,n){if(!(e.f&Fe)){if(e.f^=Fe,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var i=r.next,o=(r.f&Vt)!==0||(r.f&xt)!==0&&(e.f&bt)!==0;Xr(r,t,o?n:!1),r=i}}}function $r(e){fo(e,!0)}function fo(e,t){if(e.f&Fe){e.f^=Fe,e.f&Ce||(Te(e,Be),Qt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Vt)!==0||(n.f&xt)!==0;fo(n,i?t:!1),n=r}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}function ho(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var i=n===r?null:jn(n);t.append(n),n=i}}let Bt=!1;function _r(e){Bt=e}let Zt=!1;function vo(e){Zt=e}let Y=null,ut=!1;function Le(e){Y=e}let $=null;function dt(e){$=e}let Ie=null;function po(e){Y!==null&&(Ie===null?Ie=[e]:Ie.push(e))}let De=null,He=0,Qe=null;function Rs(e){Qe=e}let go=1,Fn=0,Xt=Fn;function mo(e){Xt=e}function wo(){return++go}function Un(e){var t=e.f;if(t&Be)return!0;if(t&be&&(e.f&=~Gt),t&kt){var n=e.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i];if(Un(o)&&Yi(o),o.wv>e.wv)return!0}t&tt&&pe===null&&Te(e,Ce)}return!1}function _o(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ie!=null&&Ie.includes(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&be?_o(o,t,!1):t===o&&(n?Te(o,Be):o.f&Ce&&Te(o,kt),Qt(o))}}function yo(e){var w;var t=De,n=He,r=Qe,i=Y,o=Ie,l=ve,c=ut,s=Xt,u=e.f;De=null,He=0,Qe=null,Y=u&(xt|Ht)?null:e,Ie=null,gn(e.ctx),ut=!1,Xt=++Fn,e.ac!==null&&(gr(()=>{e.ac.abort(vn)}),e.ac=null);try{e.f|=Ur;var p=e.fn,m=p(),f=e.deps;if(De!==null){var d;if(yr(e,He),f!==null&&He>0)for(f.length=He+De.length,d=0;d<De.length;d++)f[He+d]=De[d];else e.deps=f=De;if(Bt&&mr()&&e.f&tt)for(d=He;d<f.length;d++)((w=f[d]).reactions??(w.reactions=[])).push(e)}else f!==null&&He<f.length&&(yr(e,He),f.length=He);if(Ln()&&Qe!==null&&!ut&&f!==null&&!(e.f&(be|kt|Be)))for(d=0;d<Qe.length;d++)_o(Qe[d],e);return i!==null&&i!==e&&(Fn++,Qe!==null&&(r===null?r=Qe:r.push(...Qe))),e.f&Rt&&(e.f^=Rt),m}catch(y){return Fi(y)}finally{e.f^=Ur,De=t,He=n,Qe=r,Y=i,Ie=o,gn(l),ut=c,Xt=s}}function Ws(e,t){let n=t.reactions;if(n!==null){var r=Wa.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&be&&(De===null||!De.includes(t))&&(Te(t,kt),t.f&tt&&(t.f^=tt,t.f&=~Gt),Ki(t),yr(t,0))}function yr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ws(e,n[r])}function Hn(e){var t=e.f;if(!(t&St)){Te(e,Ce);var n=$,r=Bt;$=e,Bt=!0;try{t&bt?Is(e):lo(e),so(e);var i=yo(e);e.teardown=typeof i=="function"?i:null,e.wv=go;var o;Lr&&rs&&e.f&Be&&e.deps}finally{Bt=r,$=n}}}async function Ms(){await Promise.resolve(),as()}function a(e){var t=e.f,n=(t&be)!==0;if(Y!==null&&!ut){var r=$!==null&&($.f&St)!==0;if(!r&&!(Ie!=null&&Ie.includes(e))){var i=Y.deps;if(Y.f&Ur)e.rv<Fn&&(e.rv=Fn,De===null&&i!==null&&i[He]===e?He++:De===null?De=[e]:De.includes(e)||De.push(e));else{(Y.deps??(Y.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[Y]:o.includes(Y)||o.push(Y)}}}if(Zt){if(Mt.has(e))return Mt.get(e);if(n){var l=e,c=l.v;return(!(l.f&Ce)&&l.reactions!==null||xo(l))&&(c=Yr(l)),Mt.set(l,c),c}}else n&&!(pe!=null&&pe.has(e))&&(l=e,Un(l)&&Yi(l),Bt&&mr()&&!(l.f&tt)&&bo(l));if(pe!=null&&pe.has(e))return pe.get(e);if(e.f&Rt)throw e.v;return e.v}function bo(e){if(e.deps!==null){e.f^=tt;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&be&&!(t.f&tt)&&bo(t)}}function xo(e){if(e.v===Se)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Mt.has(t)||t.f&be&&xo(t))return!0;return!1}function Vn(e){var t=ut;try{return ut=!0,e()}finally{ut=t}}const Bs=-7169;function Te(e,t){e.f=e.f&Bs|t}const ko=new Set,ei=new Set;function Ns(e,t,n,r={}){function i(o){if(r.capture||Gn.call(t,o),!o.cancelBubble)return gr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?mn(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ft(e,t,n,r,i){var o={capture:r,passive:i},l=Ns(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Jr(()=>{t.removeEventListener(e,l,o)})}function br(e){for(var t=0;t<e.length;t++)ko.add(e[t]);for(var n of ei)n(e)}let So=null;function Gn(e){var v;var t=this,n=t.ownerDocument,r=e.type,i=((v=e.composedPath)==null?void 0:v.call(e))||[],o=i[0]||e.target;So=e;var l=0,c=So===e&&e.__root;if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(l=s)}if(o=i[l]||e.target,o!==t){Ma(e,"currentTarget",{configurable:!0,get(){return o||n}});var p=Y,m=$;Le(null),dt(null);try{for(var f,d=[];o!==null;){var w=o.assignedSlot||o.parentNode||o.host||null;try{var y=o["__"+r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(x){f?d.push(x):f=x}if(e.cancelBubble||w===t||w===null)break;o=w}if(f){for(let x of d)queueMicrotask(()=>{throw x});throw f}}finally{e.__root=t,delete e.currentTarget,Le(p),dt(m)}}}function Co(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function xn(e,t){var n=$;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function L(e,t){var n=(t&Wi)!==0,r=(t&Da)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Co(o?e:"<!>"+e),n||(i=Et(i)));var l=r||eo?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=Et(l),s=l.lastChild;xn(c,s)}else xn(l,l);return l}}function Ls(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Wi)!==0,o=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=Co(o),s=Et(c);if(i)for(l=document.createDocumentFragment();Et(s);)l.appendChild(Et(s));else l=Et(s)}var u=l.cloneNode(!0);if(i){var p=Et(u),m=u.lastChild;xn(p,m)}else xn(u,u);return u}}function Nt(e,t){return Ls(e,t,"svg")}function At(e=""){{var t=Tt(e+"");return xn(t,t),t}}function Je(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Tt();return e.append(t,n),xn(t,n),e}function k(e,t){e!==null&&e.before(t)}const zs=["touchstart","touchmove"];function Os(e){return zs.includes(e)}function q(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 js(e,t){return qs(e,t)}const kn=new Map;function qs(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:l=!0}){xs();var c=new Set,s=m=>{for(var f=0;f<m.length;f++){var d=m[f];if(!c.has(d)){c.add(d);var w=Os(d);t.addEventListener(d,Gn,{passive:w});var y=kn.get(d);y===void 0?(document.addEventListener(d,Gn,{passive:w}),kn.set(d,1)):kn.set(d,y+1)}}};s(Or(ko)),ei.add(s);var u=void 0,p=Ps(()=>{var m=n??t.appendChild(Tt());return us(m,{pending:()=>{}},f=>{if(o){st({});var d=ve;d.c=o}i&&(r.$$events=i),u=e(f,r)||{},o&&lt()}),()=>{var w;for(var f of c){t.removeEventListener(f,Gn);var d=kn.get(f);--d===0?(document.removeEventListener(f,Gn),kn.delete(f)):kn.set(f,d)}ei.delete(s),m!==n&&((w=m.parentNode)==null||w.removeChild(m))}});return Fs.set(u,p),u}let Fs=new WeakMap;class To{constructor(t,n=!0){et(this,"anchor");U(this,it,new Map);U(this,wt,new Map);U(this,Ve,new Map);U(this,an,new Set);U(this,Xn,!0);U(this,$n,()=>{var t=X;if(h(this,it).has(t)){var n=h(this,it).get(t),r=h(this,wt).get(n);if(r)$r(r),h(this,an).delete(n);else{var i=h(this,Ve).get(n);i&&(h(this,wt).set(n,i.effect),h(this,Ve).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,l]of h(this,it)){if(h(this,it).delete(o),o===t)break;const c=h(this,Ve).get(l);c&&(Ne(c.effect),h(this,Ve).delete(l))}for(const[o,l]of h(this,wt)){if(o===n||h(this,an).has(o))continue;const c=()=>{if(Array.from(h(this,it).values()).includes(o)){var u=document.createDocumentFragment();ho(l,u),u.append(Tt()),h(this,Ve).set(o,{effect:l,fragment:u})}else Ne(l);h(this,an).delete(o),h(this,wt).delete(o)};h(this,Xn)||!r?(h(this,an).add(o),bn(l,c,!1)):c()}}});U(this,Ar,t=>{h(this,it).delete(t);const n=Array.from(h(this,it).values());for(const[r,i]of h(this,Ve))n.includes(r)||(Ne(i.effect),h(this,Ve).delete(r))});this.anchor=t,N(this,Xn,n)}ensure(t,n){var r=X,i=ro();if(n&&!h(this,wt).has(t)&&!h(this,Ve).has(t))if(i){var o=document.createDocumentFragment(),l=Tt();o.append(l),h(this,Ve).set(t,{effect:Ye(()=>n(l)),fragment:o})}else h(this,wt).set(t,Ye(()=>n(this.anchor)));if(h(this,it).set(r,t),i){for(const[c,s]of h(this,wt))c===t?r.skipped_effects.delete(s):r.skipped_effects.add(s);for(const[c,s]of h(this,Ve))c===t?r.skipped_effects.delete(s.effect):r.skipped_effects.add(s.effect);r.oncommit(h(this,$n)),r.ondiscard(h(this,Ar))}else h(this,$n).call(this)}}it=new WeakMap,wt=new WeakMap,Ve=new WeakMap,an=new WeakMap,Xn=new WeakMap,$n=new WeakMap,Ar=new WeakMap;function ti(e){ve===null&&Ua(),pn&&ve.l!==null?Us(ve).m.push(e):qn(()=>{const t=Vn(e);if(typeof t=="function")return t})}function Us(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function F(e,t,n=!1){var r=new To(e),i=n?Vt:0;function o(l,c){r.ensure(l,c)}wr(()=>{var l=!1;t((c,s=!0)=>{l=!0,o(s,c)}),l||o(!1,null)},i)}function Eo(e,t,n,r,i){var c;var o=(c=t.$$slots)==null?void 0:c[n],l=!1;o===!0&&(o=t.children,l=!0),o===void 0||o(e,l?()=>r:r)}function Po(e,t,n){var r=new To(e);wr(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Vt)}function ht(e,t){ao(()=>{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 Ao(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=Ao(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Hs(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ao(e))&&(r&&(r+=" "),r+=t);return r}function Sn(e){return typeof e=="object"?Hs(e):e??""}const Io=[...`
2
- \r\f \v\uFEFF`];function Vs(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+o;(l===0||Io.includes(r[l-1]))&&(c===r.length||Io.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function vt(e,t,n,r,i,o){var l=e.__className;if(l!==n||l===void 0){var c=Vs(n,r,o);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(o&&i!==o)for(var s in o){var u=!!o[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return o}function Do(e,t,n=!1){if(e.multiple){if(t==null)return;if(!zr(t))return es();for(var r of e.options)r.selected=t.includes(Ro(r));return}for(r of e.options){var i=Ro(r);if(bs(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Gs(e){var t=new MutationObserver(()=>{Do(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Jr(()=>{t.disconnect()})}function Ro(e){return"__value"in e?e.__value:e.value}const Ks=Symbol("is custom element"),Ys=Symbol("is html");function Qs(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function D(e,t,n,r){var i=Js(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Fa]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Zs(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Js(e){return e.__attributes??(e.__attributes={[Ks]:e.nodeName.includes("-"),[Ys]:e.namespaceURI===Ra})}var Wo=new Map;function Zs(e){var t=e.getAttribute("is")||e.nodeName,n=Wo.get(t);if(n)return n;Wo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=Ba(i);for(var l in r)r[l].set&&n.push(l);i=Mi(i)}return n}function Xs(e,t,n=t){var r=new WeakSet;Cs(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=ni(e)?ri(o):o,n(o),X!==null&&r.add(X),await Ms(),o!==(o=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=o??"",c!==null){var u=e.value.length;l===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(c,u))}}}),Vn(t)==null&&e.value&&(n(ni(e)?ri(e.value):e.value),X!==null&&r.add(X)),Zr(()=>{var i=t();if(e===document.activeElement){var o=fr??X;if(r.has(o))return}ni(e)&&i===ri(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ni(e){var t=e.type;return t==="number"||t==="range"}function ri(e){return e===""?null:+e}function Mo(e,t){return e===t||(e==null?void 0:e[Kt])===t}function $s(e={},t,n,r){return ao(()=>{var i,o;return Zr(()=>{i=o,o=[],Vn(()=>{e!==n(...o)&&(t(e,...o),i&&Mo(n(...i),e)&&t(null,...i))})}),()=>{mn(()=>{o&&Mo(n(...o),e)&&t(null,...o)})}}),e}let xr=!1;function el(e){var t=xr;try{return xr=!1,[e(),xr]}finally{xr=t}}function ze(e,t,n,r){var z;var i=!pn||(n&Ea)!==0,o=(n&Aa)!==0,l=(n&Ia)!==0,c=r,s=!0,u=()=>(s&&(s=!1,c=l?Vn(r):r),c),p;if(o){var m=Kt in e||qa in e;p=((z=fn(e,t))==null?void 0:z.set)??(m&&t in e?b=>e[t]=b:void 0)}var f,d=!1;o?[f,d]=el(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=u(),p&&(i&&Qa(),p(f)));var w;if(i?w=()=>{var b=e[t];return b===void 0?u():(s=!0,b)}:w=()=>{var b=e[t];return b!==void 0&&(c=void 0),b===void 0?c:b},i&&!(n&Pa))return w;if(p){var y=e.$$legacy;return function(b,E){return arguments.length>0?((!i||!E||y||d)&&p(E?w():b),b):w()}}var v=!1,x=(n&Ta?pr:Kr)(()=>(v=!1,w()));o&&a(x);var R=$;return function(b,E){if(arguments.length>0){const P=E?a(x):i&&o?Ue(b):b;return g(x,P),v=!0,c!==void 0&&(c=P),b}return Zt&&v||R.f&St?x.v:a(x)}}const Bo="wineater_consent",tl=["wineater_uid","uniqueUserID","sessionID"];function nl(){try{const e=window.localStorage.getItem(Bo);return e==="granted"||e==="denied"?e:null}catch{return null}}let ii=K(Ue(nl())),kr=K(null),Sr=null;function rl(e){Sr=e}function il(e){g(kr,e,!0)}function No(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:a(kr)===!0}function ol(){return Sr?!1:a(kr)!==null&&No()&&a(ii)===null}function Lo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:Sr?Sr():a(kr)===null?!1:No()?a(ii)==="granted":!0}function al(){for(const e of tl){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const oi=new Set;function sl(e){return oi.add(e),()=>oi.delete(e)}function zo(e){g(ii,e,!0);try{window.localStorage.setItem(Bo,e)}catch{}e==="denied"&&al();for(const t of oi)t(e)}const ll=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function cl(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!ll.test(n))return null;const r=typeof t.root=="string"&&t.root.startsWith("/")?t.root:"/";return{shop:n,locale:typeof t.locale=="string"&&t.locale?t.locale:null,currency:typeof t.currency=="string"&&t.currency?t.currency:null,root:r.endsWith("/")?r:`${r}/`,config:t.config&&typeof t.config=="object"?t.config:null,color:typeof t.color=="string"&&/^#[0-9a-f]{3,8}$/i.test(t.color)?t.color:null}}let ai;function rt(){var e;return ai===void 0&&(ai=typeof window>"u"?null:cl((e=window.wineaterData)==null?void 0:e.shopify)),ai}function Oo(e){var r;const t=(r=/[?&]variant=(\d+)/.exec(e.url??""))==null?void 0:r[1];if(t)return t;const n=String(e.itemId??"").trim();return/^\d+$/.test(n)?n:null}function ul(e,t,n){const r=i=>(i??"").toLowerCase().split("-")[0];for(const i of[r(e),r(t)])if(i&&n.includes(i))return i;return"en"}function dl(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class jo extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let si=null;function qo(){var t,n;if(si)return si;let e=null;try{e=window.sessionStorage.getItem("wineater_sf_session")}catch{}if(!e){e=((n=(t=globalThis.crypto)==null?void 0:t.randomUUID)==null?void 0:n.call(t))??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;try{window.sessionStorage.setItem("wineater_sf_session",e)}catch{}}return si=e,e}function fl(){var e;try{const t=(e=window.Shopify)==null?void 0:e.customerPrivacy;if(t&&typeof t.analyticsProcessingAllowed=="function")return t.analyticsProcessingAllowed()===!0}catch{}return!1}function hl(){try{const e=window.Shopify;if(e!=null&&e.customerPrivacy||typeof(e==null?void 0:e.loadFeatures)!="function")return;e.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],()=>{})}catch{}}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 li(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 ci(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 vl(){const e="uniqueUserID";let t=ci(e);return t||(t=Fo(),li(e,t,365)),t}function Oe(e,t,n={},r={}){var w;const i=(w=rt())==null?void 0:w.shop,o=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!Lo()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),keepalive:!0}).catch(v=>{console.debug("[wineater] anonymous event failed:",v==null?void 0:v.message)})}let p=ci("uniqueUserID");p||(p=vl());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let f=ci("sessionID");f||(f=Fo(),li("sessionID",f,1));const d={...l,event_type:e,store_id:t,session_id:f,event_time:c,data:n,meta:{...r,user_id:p},device_info:m,region:s,language:u};return fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d),keepalive:!!i}).then(y=>y.ok?y.json():y.json().then(v=>{throw new Error(v.message||"Failed to track widget event")})).catch(y=>{throw console.error("Widget event tracking error:",y),y})}function pl(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 Kn(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 gl(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Kn),hasMore:!!e.has_more}}const Yn="wineater_uid",ml=365;let Cr=null;function Uo(){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 Ho=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Vo(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 wl(e,t){try{const n=new Date(Date.now()+ml*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function Go(){return Lo()}sl(e=>{e==="denied"&&(Cr=null)});function ui(){if(!Go())return null;if(Cr)return Cr;let e=null;try{e=window.localStorage.getItem(Yn)}catch{}(!e||!Ho.test(e))&&(e=Vo(Yn)),(!e||!Ho.test(e))&&(e=Uo());try{window.localStorage.setItem(Yn,e)}catch{}return Vo(Yn)!==e&&wl(Yn,e),Cr=e,e}function Ko(){return Uo()}const _l=2e3,Yo=100;let Tr=null,Cn=[],Qn=null,Qo=!1;function yl(e){Tr=e,!(Qo||typeof document>"u")&&(Qo=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Jn()}),window.addEventListener("pagehide",()=>void Jn()))}function $t(e){var t;if(!(!Go()||!Tr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(Cn.push(e),Cn.length>=Yo){Jn();return}Qn||(Qn=setTimeout(()=>void Jn(),_l))}}async function Jn(){if(Qn&&(clearTimeout(Qn),Qn=null),!Tr||Cn.length===0)return;const e=ui();if(!e){Cn=[];return}const t=Cn.splice(0,Yo);try{await Tr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}Cn.length>0&&Jn()}const bl="X-Wineater-Uid";class Jo extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);et(this,"status");et(this,"data");this.status=n,this.data=r}}class xl{constructor(t,n="1"){U(this,de);U(this,In,"https://api.wineater.com/");U(this,er);U(this,sn);U(this,Dn,!1);U(this,Rn,null);N(this,er,t),N(this,sn,n)}async getInstantRecommendations(){var t;try{const n=(t=rt())==null?void 0:t.shop,r=n?"shopify/storefront/instant":h(this,sn)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:o}=await G(this,de,Di).call(this,r,n?G(this,de,Ri).call(this,{}):{});return{wines:i.filter(Boolean).map(pl),profileHash:o.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(rt())return G(this,de,ka).call(this,t,n);try{const r=h(this,sn)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search";return(await G(this,de,Ut).call(this,r,n?{text:t,query_id:n}:{text:t})).filter(Boolean).map(Kn)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(h(this,sn)!=="2"||rt())return i();let o;try{o=await fetch(`${h(this,In)}dish/recommendations/search/v2/stream`,{method:"POST",headers:G(this,de,Ii).call(this),body:JSON.stringify(n?{text:t,query_id:n}:{text:t})})}catch{return i()}if(!o.ok||!o.body)return i();const l=o.body.getReader(),c=new TextDecoder;let s="",u=null;const p=m=>(m??[]).filter(Boolean).map(Kn);try{for(;;){const{done:m,value:f}=await l.read();f&&(s+=c.decode(f,{stream:!0}));const d=s.split(`
3
- `);s=m?"":d.pop()??"";for(const w of m?d.filter(Boolean):d){if(!w.trim())continue;const y=JSON.parse(w);if(y.type==="wines")u=p(y.recommendations).map(v=>({...v,reason:""})),r(u);else{if(y.type==="final")return p(y.recommendations);if(y.type==="error")return u||i()}}if(m)break}}catch{return u||i()}return u??i()}async getMoreWineRecommendations(t,n){try{const r=await G(this,de,Ut).call(this,"dish/recommendations/search/v2/more",{text:t,exclude_ids:n});return gl(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await G(this,de,Ut).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Kn)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await G(this,de,Ut).call(this,"events",t,{keepalive:!0})}setLanguage(t){N(this,Rn,t)}async getShopifyConfig(){const t=rt().shop;return G(this,de,Ut).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await G(this,de,Ut).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}In=new WeakMap,er=new WeakMap,sn=new WeakMap,Dn=new WeakMap,Rn=new WeakMap,de=new WeakSet,Ii=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${h(this,er)}`};if(!h(this,Dn)){const n=ui();n&&(t[bl]=n)}return t},Ut=async function(t,n,r={}){return(await G(this,de,Di).call(this,t,n,r)).data},Di=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:G(this,de,Ii).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${h(this,In)}${t}`,i())}catch(s){if(h(this,Dn)||!ui())throw s;N(this,Dn,!0),o=await fetch(`${h(this,In)}${t}`,i())}const l=await o.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(o.ok)throw new Error("API returned invalid JSON")}if(!o.ok)throw new Jo(o.status,c);return{data:c,headers:o.headers}},Ri=function(t){const n=rt().shop;return h(this,Rn)?{...t,shop:n,language:h(this,Rn)}:{...t,shop:n}},ka=async function(t,n){try{const r=G(this,de,Ri).call(this,{text:t,session_id:qo(),...n?{query_id:n}:{}});return(await G(this,de,Ut).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Kn)}catch(r){throw r instanceof Jo&&dl(r.status,r.data)?new jo:new Error(`Error in getWineRecommendations: ${r.message}`)}};const Zo=((ca=window==null?void 0:window.wineaterData)==null?void 0:ca.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",di=String(((ua=window==null?void 0:window.wineaterData)==null?void 0:ua.apiVersion)||"1"),It=new xl(Zo,di);yl(e=>It.postEvents(e));function kl(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 fi=`${kl(Zo)}:${di}`,Xo="wineater:v1:";function hi(e,t){try{const n=window.localStorage.getItem(Xo+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function vi(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(Xo+e,JSON.stringify(n))}catch{}}const je={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"},$o={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é",addToCart:"Ajouter au panier",addedToCart:"Ajouté",sommelierResting:"Notre sommelier se repose. Découvrez notre sélection ci-dessous."},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",addToCart:"Añadir al carrito",addedToCart:"Añadido",sommelierResting:"Nuestro sumiller está descansando. Descubre nuestra selección."},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",addToCart:"Add to cart",addedToCart:"Added",sommelierResting:"Our sommelier is resting. Browse our picks below."},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",addToCart:"Dodaj u korpu",addedToCart:"Dodato",sommelierResting:"Naš somelijer se odmara. Pogledajte naš izbor ispod."},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",addToCart:"In den Warenkorb",addedToCart:"Hinzugefügt",sommelierResting:"Unser Sommelier macht gerade Pause. Entdecken Sie unsere Auswahl."},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:"Політика конфіденційності",addToCart:"Додати в кошик",addedToCart:"Додано",sommelierResting:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче."},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:"Политика конфиденциальности",addToCart:"В корзину",addedToCart:"Добавлено",sommelierResting:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже."},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:"Құпиялылық саясаты",addToCart:"Себетке қосу",addedToCart:"Қосылды",sommelierResting:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз."},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",addToCart:"Adicionar ao carrinho",addedToCart:"Adicionado",sommelierResting:"Nosso sommelier está descansando. Veja nossas sugestões abaixo."}};function Sl(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 Cl={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(X,ee){typeof exports=="object"&&typeof module<"u"?module.exports=ee():typeof define=="function"&&define.amd?define(ee):(X=typeof globalThis<"u"?globalThis:X||self,X.WineaterChatbot=ee())})(this,function(){"use strict";var Mu=Object.defineProperty;var Wa=X=>{throw TypeError(X)};var Nu=(X,ee,pe)=>ee in X?Mu(X,ee,{enumerable:!0,configurable:!0,writable:!0,value:pe}):X[ee]=pe;var Je=(X,ee,pe)=>Nu(X,typeof ee!="symbol"?ee+"":ee,pe),Mi=(X,ee,pe)=>ee.has(X)||Wa("Cannot "+pe);var f=(X,ee,pe)=>(Mi(X,ee,"read from private field"),pe?pe.call(X):ee.get(X)),j=(X,ee,pe)=>ee.has(X)?Wa("Cannot add the same private member more than once"):ee instanceof WeakSet?ee.add(X):ee.set(X,pe),O=(X,ee,pe,jn)=>(Mi(X,ee,"write to private field"),jn?jn.call(X,pe):ee.set(X,pe),pe),Z=(X,ee,pe)=>(Mi(X,ee,"access private method"),pe);var ka,En,Pn,ln,An,nr,In,qt,gt,Dn,ze,Ni,Bi,zi,Ma,Ye,ki,mt,cn,De,wt,Le,it,It,un,Ft,Rn,Wn,Mn,Dt,Ar,ve,Bu,zu,Lu,Li,zr,Lr,Oi,Sa,ot,_t,Oe,dn,rr,ir,Ir,Nn,or,fn,Bn,zn,le,ji,Gt,qi,Fi,Na,Ca,Ta,Ea;const X="5";typeof window<"u"&&((ka=window.__svelte??(window.__svelte={})).v??(ka.v=new Set)).add(X);const ee=1,pe=2,jn=4,Ba=8,za=16,La=1,Oa=2,ja=4,qa=8,Fa=16,Ui=1,Ua=2,ye=Symbol(),Hi="http://www.w3.org/1999/xhtml",Or=!1;var jr=Array.isArray,Ha=Array.prototype.indexOf,gn=Array.prototype.includes,hr=Array.from,Va=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,Ga=Object.getOwnPropertyDescriptors,Ka=Object.prototype,Ya=Array.prototype,Vi=Object.getPrototypeOf,Gi=Object.isExtensible;const Qa=()=>{};function Ja(e){for(var t=0;t<e.length;t++)e[t]()}function Ki(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function Za(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const be=2,qn=4,pr=8,Yi=1<<24,bt=16,Ze=32,Kt=64,qr=128,Ue=512,we=1024,xe=2048,Xe=4096,Me=8192,xt=16384,Yt=32768,Qt=65536,Qi=1<<17,Ji=1<<18,wn=1<<19,Xa=1<<20,kt=1<<25,Jt=65536,Fr=1<<21,Ur=1<<22,Rt=1<<23,Zt=Symbol("$state"),$a=Symbol("legacy props"),es=Symbol(""),Xt=new class extends Error{constructor(){super(...arguments);Je(this,"name","StaleReactionError");Je(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ts(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ns(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function rs(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function is(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function os(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function as(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ss(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ls(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function cs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function us(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ds(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function hs(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ps(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Zi(e){return e===this.v}function vs(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Xi(e){return!vs(e,this.v)}let _n=!1,gs=!1;function ms(){_n=!0}let he=null;function yn(e){he=e}function ut(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,l:_n&&!t?{s:null,u:null,$:[]}:null}}function dt(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)xo(r)}return e!==void 0&&(t.x=e),t.i=!0,he=t.p,e??{}}function Fn(){return!_n||he!==null&&he.l===null}let $t=[];function $i(){var e=$t;$t=[],Ja(e)}function St(e){if($t.length===0&&!Un){var t=$t;queueMicrotask(()=>{t===$t&&$i()})}$t.push(e)}function ws(){for(;$t.length>0;)$i()}function eo(e){var t=Q;if(t===null)return H.f|=Rt,e;if(!(t.f&Yt)&&!(t.f&qn))throw e;Wt(e,t)}function Wt(e,t){for(;t!==null;){if(t.f&qr){if(!(t.f&Yt))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const _s=-7169;function se(e,t){e.f=e.f&_s|t}function Hr(e){e.f&Ue||e.deps===null?se(e,we):se(e,Xe)}function to(e){if(e!==null)for(const t of e)!(t.f&be)||!(t.f&Jt)||(t.f^=Jt,to(t.deps))}function no(e,t,n){e.f&xe?t.add(e):e.f&Xe&&n.add(e),to(e.deps),se(e,we)}const vr=new Set;let q=null,Vr=null,ke=null,Ce=[],gr=null,Gr=!1,Un=!1;const xi=class xi{constructor(){j(this,ze);Je(this,"current",new Map);Je(this,"previous",new Map);j(this,En,new Set);j(this,Pn,new Set);j(this,ln,0);j(this,An,0);j(this,nr,null);j(this,In,new Set);j(this,qt,new Set);j(this,gt,new Map);Je(this,"is_fork",!1);j(this,Dn,!1)}skip_effect(t){f(this,gt).has(t)||f(this,gt).set(t,{d:[],m:[]})}unskip_effect(t){var n=f(this,gt).get(t);if(n){f(this,gt).delete(t);for(var r of n.d)se(r,xe),et(r);for(r of n.m)se(r,Xe),et(r)}}process(t){var i;Ce=[],this.apply();var n=[],r=[];for(const o of t)Z(this,ze,Bi).call(this,o,n,r);if(Z(this,ze,Ni).call(this)){Z(this,ze,zi).call(this,r),Z(this,ze,zi).call(this,n);for(const[o,l]of f(this,gt))so(o,l)}else{for(const o of f(this,En))o();f(this,En).clear(),f(this,ln)===0&&Z(this,ze,Ma).call(this),Vr=this,q=null,io(r),io(n),f(this,In).clear(),f(this,qt).clear(),Vr=null,(i=f(this,nr))==null||i.resolve()}ke=null}capture(t,n){n!==ye&&!this.previous.has(t)&&this.previous.set(t,n),t.f&Rt||(this.current.set(t,t.v),ke==null||ke.set(t,t.v))}activate(){q=this,this.apply()}deactivate(){q===this&&(q=null,ke=null)}flush(){if(this.activate(),Ce.length>0){if(ro(),q!==null&&q!==this)return}else f(this,ln)===0&&this.process([]);this.deactivate()}discard(){for(const t of f(this,Pn))t(this);f(this,Pn).clear()}increment(t){O(this,ln,f(this,ln)+1),t&&O(this,An,f(this,An)+1)}decrement(t){O(this,ln,f(this,ln)-1),t&&O(this,An,f(this,An)-1),!f(this,Dn)&&(O(this,Dn,!0),St(()=>{O(this,Dn,!1),Z(this,ze,Ni).call(this)?Ce.length>0&&this.flush():this.revive()}))}revive(){for(const t of f(this,In))f(this,qt).delete(t),se(t,xe),et(t);for(const t of f(this,qt))se(t,Xe),et(t);this.flush()}oncommit(t){f(this,En).add(t)}ondiscard(t){f(this,Pn).add(t)}settled(){return(f(this,nr)??O(this,nr,Ki())).promise}static ensure(){if(q===null){const t=q=new xi;vr.add(q),Un||St(()=>{q===t&&t.flush()})}return q}apply(){}};En=new WeakMap,Pn=new WeakMap,ln=new WeakMap,An=new WeakMap,nr=new WeakMap,In=new WeakMap,qt=new WeakMap,gt=new WeakMap,Dn=new WeakMap,ze=new WeakSet,Ni=function(){return this.is_fork||f(this,An)>0},Bi=function(t,n,r){t.f^=we;for(var i=t.first;i!==null;){var o=i.f,l=(o&(Ze|Kt))!==0,c=l&&(o&we)!==0,s=c||(o&Me)!==0||f(this,gt).has(i);if(!s&&i.fn!==null){l?i.f^=we:o&qn?n.push(i):Kn(i)&&(o&bt&&f(this,qt).add(i),xn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var p=i.next;if(p!==null){i=p;break}i=i.parent}}},zi=function(t){for(var n=0;n<t.length;n+=1)no(t[n],f(this,In),f(this,qt))},Ma=function(){var i;if(vr.size>1){this.previous.clear();var t=ke,n=!0;for(const o of vr){if(o===this){n=!1;continue}const l=[];for(const[s,u]of this.current){if(o.current.has(s))if(n&&u!==o.current.get(s))o.current.set(s,u);else continue;l.push(s)}if(l.length===0)continue;const c=[...o.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=Ce;Ce=[];const s=new Set,u=new Map;for(const p of l)oo(p,c,s,u);if(Ce.length>0){q=o,o.apply();for(const p of Ce)Z(i=o,ze,Bi).call(i,p,[],[]);o.deactivate()}Ce=r}}q=null,ke=t}f(this,gt).clear(),vr.delete(this)};let Mt=xi;function ys(e){var t=Un;Un=!0;try{for(var n;;){if(ws(),Ce.length===0&&(q==null||q.flush(),Ce.length===0))return gr=null,n;ro()}}finally{Un=t}}function ro(){Gr=!0;var e=null;try{for(var t=0;Ce.length>0;){var n=Mt.ensure();if(t++>1e3){var r,i;bs()}n.process(Ce),Nt.clear()}}finally{Ce=[],Gr=!1,gr=null}}function bs(){try{ss()}catch(e){Wt(e,gr)}}let $e=null;function io(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(xt|Me))&&Kn(r)&&($e=new Set,xn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Co(r),($e==null?void 0:$e.size)>0)){Nt.clear();for(const i of $e){if(i.f&(xt|Me))continue;const o=[i];let l=i.parent;for(;l!==null;)$e.has(l)&&($e.delete(l),o.push(l)),l=l.parent;for(let c=o.length-1;c>=0;c--){const s=o[c];s.f&(xt|Me)||xn(s)}}$e.clear()}}$e=null}}function oo(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&be?oo(i,t,n,r):o&(Ur|bt)&&!(o&xe)&&ao(i,t,r)&&(se(i,xe),et(i))}}function ao(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(gn.call(t,i))return!0;if(i.f&be&&ao(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function et(e){var t=gr=e,n=t.b;if(n!=null&&n.is_pending&&e.f&(qn|pr|Yi)&&!(e.f&Yt)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Gr&&t===Q&&r&bt&&!(r&Ji)&&r&Yt)return;if(r&(Kt|Ze)){if(!(r&we))return;t.f^=we}}Ce.push(t)}function so(e,t){if(!(e.f&Ze&&e.f&we)){e.f&xe?t.d.push(e):e.f&Xe&&t.m.push(e),se(e,we);for(var n=e.first;n!==null;)so(n,t),n=n.next}}function xs(e){let t=0,n=en(0),r;return()=>{Zr()&&(a(n),$r(()=>(t===0&&(r=Qn(()=>e(()=>Hn(n)))),t+=1,()=>{St(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Hn(n))})})))}}var ks=Qt|wn;function Ss(e,t,n,r){new Cs(e,t,n,r)}class Cs{constructor(t,n,r,i){j(this,ve);Je(this,"parent");Je(this,"is_pending",!1);Je(this,"transform_error");j(this,Ye);j(this,ki,null);j(this,mt);j(this,cn);j(this,De);j(this,wt,null);j(this,Le,null);j(this,it,null);j(this,It,null);j(this,un,0);j(this,Ft,0);j(this,Rn,!1);j(this,Wn,new Set);j(this,Mn,new Set);j(this,Dt,null);j(this,Ar,xs(()=>(O(this,Dt,en(f(this,un))),()=>{O(this,Dt,null)})));var o;O(this,Ye,t),O(this,mt,n),O(this,cn,l=>{var c=Q;c.b=this,c.f|=qr,r(l)}),this.parent=Q.b,this.transform_error=i??((o=this.parent)==null?void 0:o.transform_error)??(l=>l),O(this,De,_r(()=>{Z(this,ve,Li).call(this)},ks))}defer_effect(t){no(t,f(this,Wn),f(this,Mn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,mt).pending}update_pending_count(t){Z(this,ve,Oi).call(this,t),O(this,un,f(this,un)+t),!(!f(this,Dt)||f(this,Rn))&&(O(this,Rn,!0),St(()=>{O(this,Rn,!1),f(this,Dt)&&bn(f(this,Dt),f(this,un))}))}get_effect_pending(){return f(this,Ar).call(this),a(f(this,Dt))}error(t){var n=f(this,mt).onerror;let r=f(this,mt).failed;if(!n&&!r)throw t;f(this,wt)&&(Te(f(this,wt)),O(this,wt,null)),f(this,Le)&&(Te(f(this,Le)),O(this,Le,null)),f(this,it)&&(Te(f(this,it)),O(this,it,null));var i=!1,o=!1;const l=()=>{if(i){ps();return}i=!0,o&&fs(),f(this,it)!==null&&tn(f(this,it),()=>{O(this,it,null)}),Z(this,ve,Lr).call(this,()=>{Mt.ensure(),Z(this,ve,Li).call(this)})},c=s=>{try{o=!0,n==null||n(s,l),o=!1}catch(u){Wt(u,f(this,De)&&f(this,De).parent)}r&&O(this,it,Z(this,ve,Lr).call(this,()=>{Mt.ensure();try{return He(()=>{var u=Q;u.b=this,u.f|=qr,r(f(this,Ye),()=>s,()=>l)})}catch(u){return Wt(u,f(this,De).parent),null}}))};St(()=>{var s;try{s=this.transform_error(t)}catch(u){Wt(u,f(this,De)&&f(this,De).parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(c,u=>Wt(u,f(this,De)&&f(this,De).parent)):c(s)})}}Ye=new WeakMap,ki=new WeakMap,mt=new WeakMap,cn=new WeakMap,De=new WeakMap,wt=new WeakMap,Le=new WeakMap,it=new WeakMap,It=new WeakMap,un=new WeakMap,Ft=new WeakMap,Rn=new WeakMap,Wn=new WeakMap,Mn=new WeakMap,Dt=new WeakMap,Ar=new WeakMap,ve=new WeakSet,Bu=function(){try{O(this,wt,He(()=>f(this,cn).call(this,f(this,Ye))))}catch(t){this.error(t)}},zu=function(t){const n=f(this,mt).failed;n&&O(this,it,He(()=>{n(f(this,Ye),()=>t,()=>()=>{})}))},Lu=function(){const t=f(this,mt).pending;t&&(this.is_pending=!0,O(this,Le,He(()=>t(f(this,Ye)))),St(()=>{var n=O(this,It,document.createDocumentFragment()),r=Ct();n.append(r),O(this,wt,Z(this,ve,Lr).call(this,()=>(Mt.ensure(),He(()=>f(this,cn).call(this,r))))),f(this,Ft)===0&&(f(this,Ye).before(n),O(this,It,null),tn(f(this,Le),()=>{O(this,Le,null)}),Z(this,ve,zr).call(this))}))},Li=function(){try{if(this.is_pending=this.has_pending_snippet(),O(this,Ft,0),O(this,un,0),O(this,wt,He(()=>{f(this,cn).call(this,f(this,Ye))})),f(this,Ft)>0){var t=O(this,It,document.createDocumentFragment());Po(f(this,wt),t);const n=f(this,mt).pending;O(this,Le,He(()=>n(f(this,Ye))))}else Z(this,ve,zr).call(this)}catch(n){this.error(n)}},zr=function(){this.is_pending=!1;for(const t of f(this,Wn))se(t,xe),et(t);for(const t of f(this,Mn))se(t,Xe),et(t);f(this,Wn).clear(),f(this,Mn).clear()},Lr=function(t){var n=Q,r=H,i=he;ft(f(this,De)),Ve(f(this,De)),yn(f(this,De).ctx);try{return t()}catch(o){return eo(o),null}finally{ft(n),Ve(r),yn(i)}},Oi=function(t){var n;if(!this.has_pending_snippet()){this.parent&&Z(n=this.parent,ve,Oi).call(n,t);return}O(this,Ft,f(this,Ft)+t),f(this,Ft)===0&&(Z(this,ve,zr).call(this),f(this,Le)&&tn(f(this,Le),()=>{O(this,Le,null)}),f(this,It)&&(f(this,Ye).before(f(this,It)),O(this,It,null)))};function Ts(e,t,n,r){const i=Fn()?mr:Yr;var o=e.filter(m=>!m.settled);if(n.length===0&&o.length===0){r(t.map(i));return}var l=Q,c=Es(),s=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(m=>m.promise)):null;function u(m){c();try{r(m)}catch(h){l.f&xt||Wt(h,l)}Kr()}if(n.length===0){s.then(()=>u(t.map(i)));return}function p(){c(),Promise.all(n.map(m=>As(m))).then(m=>u([...t.map(i),...m])).catch(m=>Wt(m,l))}s?s.then(p):p()}function Es(){var e=Q,t=H,n=he,r=q;return function(o=!0){ft(e),Ve(t),yn(n),o&&(r==null||r.activate())}}function Kr(e=!0){ft(null),Ve(null),yn(null),e&&(q==null||q.deactivate())}function Ps(){var e=Q.b,t=q,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function mr(e){var t=be|xe,n=H!==null&&H.f&be?H:null;return Q!==null&&(Q.f|=wn),{ctx:he,deps:null,effects:null,equals:Zi,f:t,fn:e,reactions:null,rv:0,v:ye,wv:0,parent:n??Q,ac:null}}function As(e,t,n){Q===null&&ns();var i=void 0,o=en(ye),l=!H,c=new Map;return Us(()=>{var h;var s=Ki();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).finally(Kr)}catch(v){s.reject(v),Kr()}var u=q;if(l){var p=Ps();(h=c.get(u))==null||h.reject(Xt),c.delete(u),c.set(u,s)}const m=(v,g=void 0)=>{if(u.activate(),g)g!==Xt&&(o.f|=Rt,bn(o,g));else{o.f&Rt&&(o.f^=Rt),bn(o,v);for(const[y,d]of c){if(c.delete(y),y===u)break;d.reject(Xt)}}p&&p()};s.promise.then(m,v=>m(null,v||"unknown"))}),Xr(()=>{for(const s of c.values())s.reject(Xt)}),new Promise(s=>{function u(p){function m(){p===i?s(o):u(i)}p.then(m,m)}u(i)})}function F(e){const t=mr(e);return Io(t),t}function Yr(e){const t=mr(e);return t.equals=Xi,t}function Is(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Te(t[n])}}function Ds(e){for(var t=e.parent;t!==null;){if(!(t.f&be))return t.f&xt?null:t;t=t.parent}return null}function Qr(e){var t,n=Q;ft(Ds(e));try{e.f&=~Jt,Is(e),t=No(e)}finally{ft(n)}return t}function lo(e){var t=Qr(e);if(!e.equals(t)&&(e.wv=Wo(),(!(q!=null&&q.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){se(e,we);return}Bt||(ke!==null?(Zr()||q!=null&&q.is_fork)&&ke.set(e,t):Hr(e))}function Rs(e){var t,n;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(n=r.ac)==null||n.abort(Xt),r.teardown=Qa,r.ac=null,Yn(r,0),ei(r))}function co(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&xn(t)}let Jr=new Set;const Nt=new Map;let uo=!1;function en(e,t){var n={f:0,v:e,reactions:null,equals:Zi,rv:0,wv:0};return n}function G(e,t){const n=en(e);return Io(n),n}function Ws(e,t=!1,n=!0){var i;const r=en(e);return t||(r.equals=Xi),_n&&n&&he!==null&&he.l!==null&&((i=he.l).s??(i.s=[])).push(r),r}function _(e,t,n=!1){H!==null&&(!nt||H.f&Qi)&&Fn()&&H.f&(be|bt|Ur|Qi)&&(Ge===null||!gn.call(Ge,e))&&ds();let r=n?Ne(t):t;return bn(e,r)}function bn(e,t){if(!e.equals(t)){var n=e.v;Bt?Nt.set(e,t):Nt.set(e,n),e.v=t;var r=Mt.ensure();if(r.capture(e,n),e.f&be){const i=e;e.f&xe&&Qr(i),Hr(i)}e.wv=Wo(),ho(e,xe),Fn()&&Q!==null&&Q.f&we&&!(Q.f&(Ze|Kt))&&(Ke===null?Gs([e]):Ke.push(e)),!r.is_fork&&Jr.size>0&&!uo&&Ms()}return t}function Ms(){uo=!1;for(const e of Jr)e.f&we&&se(e,Xe),Kn(e)&&xn(e);Jr.clear()}function fo(e,t=1){var n=a(e),r=t===1?n++:n--;return _(e,n),r}function Hn(e){_(e,e.v+1)}function ho(e,t){var n=e.reactions;if(n!==null)for(var r=Fn(),i=n.length,o=0;o<i;o++){var l=n[o],c=l.f;if(!(!r&&l===Q)){var s=(c&xe)===0;if(s&&se(l,t),c&be){var u=l;ke==null||ke.delete(u),c&Jt||(c&Ue&&(l.f|=Jt),ho(u,Xe))}else s&&(c&bt&&$e!==null&&$e.add(l),et(l))}}}function Ne(e){if(typeof e!="object"||e===null||Zt in e)return e;const t=Vi(e);if(t!==Ka&&t!==Ya)return e;var n=new Map,r=jr(e),i=G(0),o=rn,l=c=>{if(rn===o)return c();var s=H,u=rn;Ve(null),Ro(o);var p=c();return Ve(s),Ro(u),p};return r&&n.set("length",G(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&cs();var p=n.get(s);return p===void 0?l(()=>{var m=G(u.value);return n.set(s,m),m}):_(p,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const p=l(()=>G(ye));n.set(s,p),Hn(i)}}else _(u,ye),Hn(i);return!0},get(c,s,u){var v;if(s===Zt)return e;var p=n.get(s),m=s in c;if(p===void 0&&(!m||(v=mn(c,s))!=null&&v.writable)&&(p=l(()=>{var g=Ne(m?c[s]:ye),y=G(g);return y}),n.set(s,p)),p!==void 0){var h=a(p);return h===ye?void 0:h}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var p=n.get(s);p&&(u.value=a(p))}else if(u===void 0){var m=n.get(s),h=m==null?void 0:m.v;if(m!==void 0&&h!==ye)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(c,s){var h;if(s===Zt)return!0;var u=n.get(s),p=u!==void 0&&u.v!==ye||Reflect.has(c,s);if(u!==void 0||Q!==null&&(!p||(h=mn(c,s))!=null&&h.writable)){u===void 0&&(u=l(()=>{var v=p?Ne(c[s]):ye,g=G(v);return g}),n.set(s,u));var m=a(u);if(m===ye)return!1}return p},set(c,s,u,p){var N;var m=n.get(s),h=s in c;if(r&&s==="length")for(var v=u;v<m.v;v+=1){var g=n.get(v+"");g!==void 0?_(g,ye):v in c&&(g=l(()=>G(ye)),n.set(v+"",g))}if(m===void 0)(!h||(N=mn(c,s))!=null&&N.writable)&&(m=l(()=>G(void 0)),_(m,Ne(u)),n.set(s,m));else{h=m.v!==ye;var y=l(()=>Ne(u));_(m,y)}var d=Reflect.getOwnPropertyDescriptor(c,s);if(d!=null&&d.set&&d.set.call(p,u),!h){if(r&&typeof s=="string"){var w=n.get("length"),P=Number(s);Number.isInteger(P)&&P>=w.v&&_(w,P+1)}Hn(i)}return!0},ownKeys(c){a(i);var s=Reflect.ownKeys(c).filter(m=>{var h=n.get(m);return h===void 0||h.v!==ye});for(var[u,p]of n)p.v!==ye&&!(u in c)&&s.push(u);return s},setPrototypeOf(){us()}})}function po(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function Ns(e,t){return Object.is(po(e),po(t))}var vo,go,mo,wo;function Bs(){if(vo===void 0){vo=window,go=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mo=mn(t,"firstChild").get,wo=mn(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 Ct(e=""){return document.createTextNode(e)}function Tt(e){return mo.call(e)}function Vn(e){return wo.call(e)}function A(e,t){return Tt(e)}function tt(e,t=!1){{var n=Tt(e);return n instanceof Comment&&n.data===""?Vn(n):n}}function D(e,t=1,n=!1){let r=e;for(;t--;)r=Vn(r);return r}function zs(e){e.textContent=""}function _o(){return!1}function yo(e,t,n){return document.createElementNS(Hi,e,void 0)}let bo=!1;function Ls(){bo||(bo=!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 wr(e){var t=H,n=Q;Ve(null),ft(null);try{return e()}finally{Ve(t),ft(n)}}function Os(e,t,n,r=n){e.addEventListener(t,()=>wr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ls()}function js(e){Q===null&&(H===null&&as(),os()),Bt&&is()}function qs(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Et(e,t,n){var r=Q;r!==null&&r.f&Me&&(e|=Me);var i={ctx:he,deps:null,nodes:null,f:e|xe|Ue,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{xn(i)}catch(c){throw Te(i),c}else t!==null&&et(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&!(o.f&wn)&&(o=o.first,e&bt&&e&Qt&&o!==null&&(o.f|=Qt)),o!==null&&(o.parent=r,r!==null&&qs(o,r),H!==null&&H.f&be&&!(e&Kt))){var l=H;(l.effects??(l.effects=[])).push(o)}return i}function Zr(){return H!==null&&!nt}function Xr(e){const t=Et(pr,null,!1);return se(t,we),t.teardown=e,t}function Gn(e){js();var t=Q.f,n=!H&&(t&Ze)!==0&&(t&Yt)===0;if(n){var r=he;(r.e??(r.e=[])).push(e)}else return xo(e)}function xo(e){return Et(qn|Xa,e,!1)}function Fs(e){Mt.ensure();const t=Et(Kt|wn,e,!0);return(n={})=>new Promise(r=>{n.outro?tn(t,()=>{Te(t),r(void 0)}):(Te(t),r(void 0))})}function ko(e){return Et(qn,e,!1)}function Us(e){return Et(Ur|wn,e,!0)}function $r(e,t=0){return Et(pr|t,e,!0)}function M(e,t=[],n=[],r=[]){Ts(r,t,n,i=>{Et(pr,()=>e(...i.map(a)),!0)})}function _r(e,t=0){var n=Et(bt|t,e,!0);return n}function He(e){return Et(Ze|wn,e,!0)}function So(e){var t=e.teardown;if(t!==null){const n=Bt,r=H;Ao(!0),Ve(null);try{t.call(null)}finally{Ao(n),Ve(r)}}}function ei(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&wr(()=>{i.abort(Xt)});var r=n.next;n.f&Kt?n.parent=null:Te(n,t),n=r}}function Hs(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ze||Te(t),t=n}}function Te(e,t=!0){var n=!1;(t||e.f&Ji)&&e.nodes!==null&&e.nodes.end!==null&&(Vs(e.nodes.start,e.nodes.end),n=!0),ei(e,t&&!n),Yn(e,0),se(e,xt);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();So(e);var i=e.parent;i!==null&&i.first!==null&&Co(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Vs(e,t){for(;e!==null;){var n=e===t?null:Vn(e);e.remove(),e=n}}function Co(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 tn(e,t,n=!0){var r=[];To(e,r,!0);var i=()=>{n&&Te(e),t&&t()},o=r.length;if(o>0){var l=()=>--o||i();for(var c of r)c.out(l)}else i()}function To(e,t,n){if(!(e.f&Me)){e.f^=Me;var r=e.nodes&&e.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&t.push(c);for(var i=e.first;i!==null;){var o=i.next,l=(i.f&Qt)!==0||(i.f&Ze)!==0&&(e.f&bt)!==0;To(i,t,l?n:!1),i=o}}}function ti(e){Eo(e,!0)}function Eo(e,t){if(e.f&Me){e.f^=Me,e.f&we||(se(e,xe),et(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Qt)!==0||(n.f&Ze)!==0;Eo(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const l of o)(l.is_global||t)&&l.in()}}function Po(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Vn(n);t.append(n),n=i}}let yr=!1,Bt=!1;function Ao(e){Bt=e}let H=null,nt=!1;function Ve(e){H=e}let Q=null;function ft(e){Q=e}let Ge=null;function Io(e){H!==null&&(Ge===null?Ge=[e]:Ge.push(e))}let Ee=null,Be=0,Ke=null;function Gs(e){Ke=e}let Do=1,nn=0,rn=nn;function Ro(e){rn=e}function Wo(){return++Do}function Kn(e){var t=e.f;if(t&xe)return!0;if(t&be&&(e.f&=~Jt),t&Xe){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Kn(o)&&lo(o),o.wv>e.wv)return!0}t&Ue&&ke===null&&se(e,we)}return!1}function Mo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ge!==null&&gn.call(Ge,e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&be?Mo(o,t,!1):t===o&&(n?se(o,xe):o.f&we&&se(o,Xe),et(o))}}function No(e){var y;var t=Ee,n=Be,r=Ke,i=H,o=Ge,l=he,c=nt,s=rn,u=e.f;Ee=null,Be=0,Ke=null,H=u&(Ze|Kt)?null:e,Ge=null,yn(e.ctx),nt=!1,rn=++nn,e.ac!==null&&(wr(()=>{e.ac.abort(Xt)}),e.ac=null);try{e.f|=Fr;var p=e.fn,m=p();e.f|=Yt;var h=e.deps,v=q==null?void 0:q.is_fork;if(Ee!==null){var g;if(v||Yn(e,Be),h!==null&&Be>0)for(h.length=Be+Ee.length,g=0;g<Ee.length;g++)h[Be+g]=Ee[g];else e.deps=h=Ee;if(Zr()&&e.f&Ue)for(g=Be;g<h.length;g++)((y=h[g]).reactions??(y.reactions=[])).push(e)}else!v&&h!==null&&Be<h.length&&(Yn(e,Be),h.length=Be);if(Fn()&&Ke!==null&&!nt&&h!==null&&!(e.f&(be|Xe|xe)))for(g=0;g<Ke.length;g++)Mo(Ke[g],e);if(i!==null&&i!==e){if(nn++,i.deps!==null)for(let d=0;d<n;d+=1)i.deps[d].rv=nn;if(t!==null)for(const d of t)d.rv=nn;Ke!==null&&(r===null?r=Ke:r.push(...Ke))}return e.f&Rt&&(e.f^=Rt),m}catch(d){return eo(d)}finally{e.f^=Fr,Ee=t,Be=n,Ke=r,H=i,Ge=o,yn(l),nt=c,rn=s}}function Ks(e,t){let n=t.reactions;if(n!==null){var r=Ha.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&be&&(Ee===null||!gn.call(Ee,t))){var o=t;o.f&Ue&&(o.f^=Ue,o.f&=~Jt),Hr(o),Rs(o),Yn(o,0)}}function Yn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ks(e,n[r])}function xn(e){var t=e.f;if(!(t&xt)){se(e,we);var n=Q,r=yr;Q=e,yr=!0;try{t&(bt|Yi)?Hs(e):ei(e),So(e);var i=No(e);e.teardown=typeof i=="function"?i:null,e.wv=Do;var o;Or&&gs&&e.f&xe&&e.deps}finally{yr=r,Q=n}}}async function Ys(){await Promise.resolve(),ys()}function a(e){var t=e.f,n=(t&be)!==0;if(H!==null&&!nt){var r=Q!==null&&(Q.f&xt)!==0;if(!r&&(Ge===null||!gn.call(Ge,e))){var i=H.deps;if(H.f&Fr)e.rv<nn&&(e.rv=nn,Ee===null&&i!==null&&i[Be]===e?Be++:Ee===null?Ee=[e]:Ee.push(e));else{(H.deps??(H.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[H]:gn.call(o,H)||o.push(H)}}}if(Bt&&Nt.has(e))return Nt.get(e);if(n){var l=e;if(Bt){var c=l.v;return(!(l.f&we)&&l.reactions!==null||zo(l))&&(c=Qr(l)),Nt.set(l,c),c}var s=(l.f&Ue)===0&&!nt&&H!==null&&(yr||(H.f&Ue)!==0),u=(l.f&Yt)===0;Kn(l)&&(s&&(l.f|=Ue),lo(l)),s&&!u&&(co(l),Bo(l))}if(ke!=null&&ke.has(e))return ke.get(e);if(e.f&Rt)throw e.v;return e.v}function Bo(e){if(e.f|=Ue,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&be&&!(t.f&Ue)&&(co(t),Bo(t))}function zo(e){if(e.v===ye)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Nt.has(t)||t.f&be&&zo(t))return!0;return!1}function Qn(e){var t=nt;try{return nt=!0,e()}finally{nt=t}}const on=Symbol("events"),Lo=new Set,ni=new Set;function Qs(e,t,n,r={}){function i(o){if(r.capture||ri.call(t,o),!o.cancelBubble)return wr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?St(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ht(e,t,n,r,i){var o={capture:r,passive:i},l=Qs(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Xr(()=>{t.removeEventListener(e,l,o)})}function an(e,t,n){(t[on]??(t[on]={}))[e]=n}function br(e){for(var t=0;t<e.length;t++)Lo.add(e[t]);for(var n of ni)n(e)}let Oo=null;function ri(e){var d,w;var t=this,n=t.ownerDocument,r=e.type,i=((d=e.composedPath)==null?void 0:d.call(e))||[],o=i[0]||e.target;Oo=e;var l=0,c=Oo===e&&e[on];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[on]=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(l=s)}if(o=i[l]||e.target,o!==t){Va(e,"currentTarget",{configurable:!0,get(){return o||n}});var p=H,m=Q;Ve(null),ft(null);try{for(var h,v=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var y=(w=o[on])==null?void 0:w[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(P){h?v.push(P):h=P}if(e.cancelBubble||g===t||g===null)break;o=g}if(h){for(let P of v)queueMicrotask(()=>{throw P});throw h}}finally{e[on]=t,delete e.currentTarget,Ve(p),ft(m)}}}const ii=((Sa=globalThis==null?void 0:globalThis.window)==null?void 0:Sa.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Js(e){return(ii==null?void 0:ii.createHTML(e))??e}function jo(e){var t=yo("template");return t.innerHTML=Js(e.replaceAll("<!>","<!---->")),t.content}function kn(e,t){var n=Q;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function z(e,t){var n=(t&Ui)!==0,r=(t&Ua)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=jo(o?e:"<!>"+e),n||(i=Tt(i)));var l=r||go?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=Tt(l),s=l.lastChild;kn(c,s)}else kn(l,l);return l}}function Zs(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Ui)!==0,o=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=jo(o),s=Tt(c);if(i)for(l=document.createDocumentFragment();Tt(s);)l.appendChild(Tt(s));else l=Tt(s)}var u=l.cloneNode(!0);if(i){var p=Tt(u),m=u.lastChild;kn(p,m)}else kn(u,u);return u}}function zt(e,t){return Zs(e,t,"svg")}function Pt(e=""){{var t=Ct(e+"");return kn(t,t),t}}function xr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ct();return e.append(t,n),kn(t,n),e}function T(e,t){e!==null&&e.before(t)}const Xs=["touchstart","touchmove"];function $s(e){return Xs.includes(e)}function L(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 el(e,t){return tl(e,t)}const kr=new Map;function tl(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:l=!0,transformError:c}){Bs();var s=void 0,u=Fs(()=>{var p=n??t.appendChild(Ct());Ss(p,{pending:()=>{}},v=>{ut({});var g=he;o&&(g.c=o),i&&(r.$$events=i),s=e(v,r)||{},dt()},c);var m=new Set,h=v=>{for(var g=0;g<v.length;g++){var y=v[g];if(!m.has(y)){m.add(y);var d=$s(y);for(const N of[t,document]){var w=kr.get(N);w===void 0&&(w=new Map,kr.set(N,w));var P=w.get(y);P===void 0?(N.addEventListener(y,ri,{passive:d}),w.set(y,1)):w.set(y,P+1)}}}};return h(hr(Lo)),ni.add(h),()=>{var d;for(var v of m)for(const w of[t,document]){var g=kr.get(w),y=g.get(v);--y==0?(w.removeEventListener(v,ri),g.delete(v),g.size===0&&kr.delete(w)):g.set(v,y)}ni.delete(h),p!==n&&((d=p.parentNode)==null||d.removeChild(p))}});return nl.set(s,u),s}let nl=new WeakMap;class qo{constructor(t,n=!0){Je(this,"anchor");j(this,ot,new Map);j(this,_t,new Map);j(this,Oe,new Map);j(this,dn,new Set);j(this,rr,!0);j(this,ir,()=>{var t=q;if(f(this,ot).has(t)){var n=f(this,ot).get(t),r=f(this,_t).get(n);if(r)ti(r),f(this,dn).delete(n);else{var i=f(this,Oe).get(n);i&&(f(this,_t).set(n,i.effect),f(this,Oe).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,l]of f(this,ot)){if(f(this,ot).delete(o),o===t)break;const c=f(this,Oe).get(l);c&&(Te(c.effect),f(this,Oe).delete(l))}for(const[o,l]of f(this,_t)){if(o===n||f(this,dn).has(o))continue;const c=()=>{if(Array.from(f(this,ot).values()).includes(o)){var u=document.createDocumentFragment();Po(l,u),u.append(Ct()),f(this,Oe).set(o,{effect:l,fragment:u})}else Te(l);f(this,dn).delete(o),f(this,_t).delete(o)};f(this,rr)||!r?(f(this,dn).add(o),tn(l,c,!1)):c()}}});j(this,Ir,t=>{f(this,ot).delete(t);const n=Array.from(f(this,ot).values());for(const[r,i]of f(this,Oe))n.includes(r)||(Te(i.effect),f(this,Oe).delete(r))});this.anchor=t,O(this,rr,n)}ensure(t,n){var r=q,i=_o();if(n&&!f(this,_t).has(t)&&!f(this,Oe).has(t))if(i){var o=document.createDocumentFragment(),l=Ct();o.append(l),f(this,Oe).set(t,{effect:He(()=>n(l)),fragment:o})}else f(this,_t).set(t,He(()=>n(this.anchor)));if(f(this,ot).set(r,t),i){for(const[c,s]of f(this,_t))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of f(this,Oe))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(f(this,ir)),r.ondiscard(f(this,Ir))}else f(this,ir).call(this)}}ot=new WeakMap,_t=new WeakMap,Oe=new WeakMap,dn=new WeakMap,rr=new WeakMap,ir=new WeakMap,Ir=new WeakMap;function oi(e){he===null&&ts(),_n&&he.l!==null?rl(he).m.push(e):Gn(()=>{const t=Qn(e);if(typeof t=="function")return t})}function rl(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function J(e,t,n=!1){var r=new qo(e),i=n?Qt:0;function o(l,c){r.ensure(l,c)}_r(()=>{var l=!1;t((c,s=0)=>{l=!0,o(s,c)}),l||o(!1,null)},i)}function Sn(e,t){return t}function il(e,t,n){for(var r=[],i=t.length,o,l=t.length,c=0;c<i;c++){let m=t[c];tn(m,()=>{if(o){if(o.pending.delete(m),o.done.add(m),o.pending.size===0){var h=e.outrogroups;ai(hr(o.done)),h.delete(o),h.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var s=r.length===0&&n!==null;if(s){var u=n,p=u.parentNode;zs(p),p.append(u),e.items.clear()}ai(t,!s)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function ai(e,t=!0){for(var n=0;n<e.length;n++)Te(e[n],t)}var Fo;function Lt(e,t,n,r,i,o=null){var l=e,c=new Map,s=(t&jn)!==0;if(s){var u=e;l=u.appendChild(Ct())}var p=null,m=Yr(()=>{var w=n();return jr(w)?w:w==null?[]:hr(w)}),h,v=!0;function g(){d.fallback=p,ol(d,h,l,t,r),p!==null&&(h.length===0?p.f&kt?(p.f^=kt,Zn(p,null,l)):ti(p):tn(p,()=>{p=null}))}var y=_r(()=>{h=a(m);for(var w=h.length,P=new Set,N=q,S=_o(),I=0;I<w;I+=1){var E=h[I],k=r(E,I),C=v?null:c.get(k);C?(C.v&&bn(C.v,E),C.i&&bn(C.i,I),S&&N.unskip_effect(C.e)):(C=al(c,v?l:Fo??(Fo=Ct()),E,k,I,i,t,n),v||(C.e.f|=kt),c.set(k,C)),P.add(k)}if(w===0&&o&&!p&&(v?p=He(()=>o(l)):(p=He(()=>o(Fo??(Fo=Ct()))),p.f|=kt)),w>P.size&&rs(),!v)if(S){for(const[Y,V]of c)P.has(Y)||N.skip_effect(V.e);N.oncommit(g),N.ondiscard(()=>{})}else g();a(m)}),d={effect:y,items:c,outrogroups:null,fallback:p};v=!1}function Jn(e){for(;e!==null&&!(e.f&Ze);)e=e.next;return e}function ol(e,t,n,r,i){var V,ce,ue,Re,_e,at,je,ge,hn;var o=(r&Ba)!==0,l=t.length,c=e.items,s=Jn(e.effect.first),u,p=null,m,h=[],v=[],g,y,d,w;if(o)for(w=0;w<l;w+=1)g=t[w],y=i(g,w),d=c.get(y).e,d.f&kt||((ce=(V=d.nodes)==null?void 0:V.a)==null||ce.measure(),(m??(m=new Set)).add(d));for(w=0;w<l;w+=1){if(g=t[w],y=i(g,w),d=c.get(y).e,e.outrogroups!==null)for(const de of e.outrogroups)de.pending.delete(d),de.done.delete(d);if(d.f&kt)if(d.f^=kt,d===s)Zn(d,null,n);else{var P=p?p.next:s;d===e.effect.last&&(e.effect.last=d.prev),d.prev&&(d.prev.next=d.next),d.next&&(d.next.prev=d.prev),Ot(e,p,d),Ot(e,d,P),Zn(d,P,n),p=d,h=[],v=[],s=Jn(p.next);continue}if(d.f&Me&&(ti(d),o&&((Re=(ue=d.nodes)==null?void 0:ue.a)==null||Re.unfix(),(m??(m=new Set)).delete(d))),d!==s){if(u!==void 0&&u.has(d)){if(h.length<v.length){var N=v[0],S;p=N.prev;var I=h[0],E=h[h.length-1];for(S=0;S<h.length;S+=1)Zn(h[S],N,n);for(S=0;S<v.length;S+=1)u.delete(v[S]);Ot(e,I.prev,E.next),Ot(e,p,I),Ot(e,E,N),s=N,p=E,w-=1,h=[],v=[]}else u.delete(d),Zn(d,s,n),Ot(e,d.prev,d.next),Ot(e,d,p===null?e.effect.first:p.next),Ot(e,p,d),p=d;continue}for(h=[],v=[];s!==null&&s!==d;)(u??(u=new Set)).add(s),v.push(s),s=Jn(s.next);if(s===null)continue}d.f&kt||h.push(d),p=d,s=Jn(d.next)}if(e.outrogroups!==null){for(const de of e.outrogroups)de.pending.size===0&&(ai(hr(de.done)),(_e=e.outrogroups)==null||_e.delete(de));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||u!==void 0){var k=[];if(u!==void 0)for(d of u)d.f&Me||k.push(d);for(;s!==null;)!(s.f&Me)&&s!==e.fallback&&k.push(s),s=Jn(s.next);var C=k.length;if(C>0){var Y=r&jn&&l===0?n:null;if(o){for(w=0;w<C;w+=1)(je=(at=k[w].nodes)==null?void 0:at.a)==null||je.measure();for(w=0;w<C;w+=1)(hn=(ge=k[w].nodes)==null?void 0:ge.a)==null||hn.fix()}il(e,k,Y)}}o&&St(()=>{var de,Ln;if(m!==void 0)for(d of m)(Ln=(de=d.nodes)==null?void 0:de.a)==null||Ln.apply()})}function al(e,t,n,r,i,o,l,c){var s=l&ee?l&za?en(n):Ws(n,!1,!1):null,u=l&pe?en(i):null;return{v:s,i:u,e:He(()=>(o(t,s??n,u??i,c),()=>{e.delete(r)}))}}function Zn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&!(t.f&kt)?t.nodes.start:n;r!==null;){var l=Vn(r);if(o.before(r),r===i)return;r=l}}function Ot(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Uo(e,t,n,r,i){var c;var o=(c=t.$$slots)==null?void 0:c[n],l=!1;o===!0&&(o=t.children,l=!0),o===void 0||o(e,l?()=>r:r)}function Ho(e,t,n){var r=new qo(e);_r(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Qt)}function pt(e,t){ko(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=yo("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Vo(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=Vo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vo(e))&&(r&&(r+=" "),r+=t);return r}function Cn(e){return typeof e=="object"?sl(e):e??""}const Go=[...`
2
+ \r\f \v\uFEFF`];function ll(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+o;(l===0||Go.includes(r[l-1]))&&(c===r.length||Go.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function vt(e,t,n,r,i,o){var l=e.__className;if(l!==n||l===void 0){var c=ll(n,r,o);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(o&&i!==o)for(var s in o){var u=!!o[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return o}function Ko(e,t,n=!1){if(e.multiple){if(t==null)return;if(!jr(t))return hs();for(var r of e.options)r.selected=t.includes(Yo(r));return}for(r of e.options){var i=Yo(r);if(Ns(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function cl(e){var t=new MutationObserver(()=>{Ko(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Xr(()=>{t.disconnect()})}function Yo(e){return"__value"in e?e.__value:e.value}const ul=Symbol("is custom element"),dl=Symbol("is html");function fl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function R(e,t,n,r){var i=hl(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[es]=n),n==null?e.removeAttribute(t):typeof n!="string"&&pl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function hl(e){return e.__attributes??(e.__attributes={[ul]:e.nodeName.includes("-"),[dl]:e.namespaceURI===Hi})}var Qo=new Map;function pl(e){var t=e.getAttribute("is")||e.nodeName,n=Qo.get(t);if(n)return n;Qo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=Ga(i);for(var l in r)r[l].set&&n.push(l);i=Vi(i)}return n}function vl(e,t,n=t){var r=new WeakSet;Os(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=si(e)?li(o):o,n(o),q!==null&&r.add(q),await Ys(),o!==(o=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=o??"",c!==null){var u=e.value.length;l===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(c,u))}}}),Qn(t)==null&&e.value&&(n(si(e)?li(e.value):e.value),q!==null&&r.add(q)),$r(()=>{var i=t();if(e===document.activeElement){var o=Vr??q;if(r.has(o))return}si(e)&&i===li(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function si(e){var t=e.type;return t==="number"||t==="range"}function li(e){return e===""?null:+e}function Jo(e,t){return e===t||(e==null?void 0:e[Zt])===t}function gl(e={},t,n,r){return ko(()=>{var i,o;return $r(()=>{i=o,o=[],Qn(()=>{e!==n(...o)&&(t(e,...o),i&&Jo(n(...i),e)&&t(null,...i))})}),()=>{St(()=>{o&&Jo(n(...o),e)&&t(null,...o)})}}),e}let Sr=!1;function ml(e){var t=Sr;try{return Sr=!1,[e(),Sr]}finally{Sr=t}}function Pe(e,t,n,r){var N;var i=!_n||(n&Oa)!==0,o=(n&qa)!==0,l=(n&Fa)!==0,c=r,s=!0,u=()=>(s&&(s=!1,c=l?Qn(r):r),c),p;if(o){var m=Zt in e||$a in e;p=((N=mn(e,t))==null?void 0:N.set)??(m&&t in e?S=>e[t]=S:void 0)}var h,v=!1;o?[h,v]=ml(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=u(),p&&(i&&ls(),p(h)));var g;if(i?g=()=>{var S=e[t];return S===void 0?u():(s=!0,S)}:g=()=>{var S=e[t];return S!==void 0&&(c=void 0),S===void 0?c:S},i&&!(n&ja))return g;if(p){var y=e.$$legacy;return function(S,I){return arguments.length>0?((!i||!I||y||v)&&p(I?g():S),S):g()}}var d=!1,w=(n&La?mr:Yr)(()=>(d=!1,g()));o&&a(w);var P=Q;return function(S,I){if(arguments.length>0){const E=I?a(w):i&&o?Ne(S):S;return _(w,E),d=!0,c!==void 0&&(c=E),S}return Bt&&d||P.f&xt?w.v:a(w)}}const Zo="wineater_consent",wl=["wineater_uid","uniqueUserID","sessionID"];function _l(){try{const e=window.localStorage.getItem(Zo);return e==="granted"||e==="denied"?e:null}catch{return null}}let ci=G(Ne(_l())),Cr=G(null),Tr=null;function yl(e){Tr=e}function bl(e){_(Cr,e,!0)}function Xo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:a(Cr)===!0}function xl(){return Tr?!1:a(Cr)!==null&&Xo()&&a(ci)===null}function $o(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:Tr?Tr():a(Cr)===null?!1:Xo()?a(ci)==="granted":!0}function kl(){for(const e of wl){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const ui=new Set;function Sl(e){return ui.add(e),()=>ui.delete(e)}function ea(e){_(ci,e,!0);try{window.localStorage.setItem(Zo,e)}catch{}e==="denied"&&kl();for(const t of ui)t(e)}const Cl=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function Tl(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!Cl.test(n))return null;const r=typeof t.root=="string"&&t.root.startsWith("/")?t.root:"/";return{shop:n,locale:typeof t.locale=="string"&&t.locale?t.locale:null,currency:typeof t.currency=="string"&&t.currency?t.currency:null,root:r.endsWith("/")?r:`${r}/`,config:t.config&&typeof t.config=="object"?t.config:null,color:typeof t.color=="string"&&/^#[0-9a-f]{3,8}$/i.test(t.color)?t.color:null}}let di;function rt(){var e;return di===void 0&&(di=typeof window>"u"?null:Tl((e=window.wineaterData)==null?void 0:e.shopify)),di}function ta(e){var r;const t=(r=/[?&]variant=(\d+)/.exec(e.url??""))==null?void 0:r[1];if(t)return t;const n=String(e.itemId??"").trim();return/^\d+$/.test(n)?n:null}function El(e,t,n){const r=i=>(i??"").toLowerCase().split("-")[0];for(const i of[r(e),r(t)])if(i&&n.includes(i))return i;return"en"}function Pl(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class na extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let fi=null;function ra(){var t,n;if(fi)return fi;let e=null;try{e=window.sessionStorage.getItem("wineater_sf_session")}catch{}if(!e){e=((n=(t=globalThis.crypto)==null?void 0:t.randomUUID)==null?void 0:n.call(t))??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;try{window.sessionStorage.setItem("wineater_sf_session",e)}catch{}}return fi=e,e}function Al(){var e;try{const t=(e=window.Shopify)==null?void 0:e.customerPrivacy;if(t&&typeof t.analyticsProcessingAllowed=="function")return t.analyticsProcessingAllowed()===!0}catch{}return!1}function Il(){try{const e=window.Shopify;if(e!=null&&e.customerPrivacy||typeof(e==null?void 0:e.loadFeatures)!="function")return;e.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],()=>{})}catch{}}function ia(){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 hi(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 pi(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 Dl(){const e="uniqueUserID";let t=pi(e);return t||(t=ia(),hi(e,t,365)),t}function Ae(e,t,n={},r={}){var g;const i=(g=rt())==null?void 0:g.shop,o=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!$o()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),keepalive:!0}).catch(d=>{console.debug("[wineater] anonymous event failed:",d==null?void 0:d.message)})}let p=pi("uniqueUserID");p||(p=Dl());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let h=pi("sessionID");h||(h=ia(),hi("sessionID",h,1));const v={...l,event_type:e,store_id:t,session_id:h,event_time:c,data:n,meta:{...r,user_id:p},device_info:m,region:s,language:u};return fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v),keepalive:!!i}).then(y=>y.ok?y.json():y.json().then(d=>{throw new Error(d.message||"Failed to track widget event")})).catch(y=>{throw console.error("Widget event tracking error:",y),y})}function Rl(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 Xn(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 Wl(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Xn),hasMore:!!e.has_more}}const $n="wineater_uid",Ml=365;let Er=null;function oa(){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 aa=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function sa(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 Nl(e,t){try{const n=new Date(Date.now()+Ml*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function la(){return $o()}Sl(e=>{e==="denied"&&(Er=null)});function vi(){if(!la())return null;if(Er)return Er;let e=null;try{e=window.localStorage.getItem($n)}catch{}(!e||!aa.test(e))&&(e=sa($n)),(!e||!aa.test(e))&&(e=oa());try{window.localStorage.setItem($n,e)}catch{}return sa($n)!==e&&Nl($n,e),Er=e,e}function ca(){return oa()}const Bl=2e3,ua=100;let Pr=null,Tn=[],er=null,da=!1;function zl(e){Pr=e,!(da||typeof document>"u")&&(da=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&tr()}),window.addEventListener("pagehide",()=>void tr()))}function sn(e){var t;if(!(!la()||!Pr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(Tn.push(e),Tn.length>=ua){tr();return}er||(er=setTimeout(()=>void tr(),Bl))}}async function tr(){if(er&&(clearTimeout(er),er=null),!Pr||Tn.length===0)return;const e=vi();if(!e){Tn=[];return}const t=Tn.splice(0,ua);try{await Pr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}Tn.length>0&&tr()}const Ll="X-Wineater-Uid";class fa extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);Je(this,"status");Je(this,"data");this.status=n,this.data=r}}class Ol{constructor(t,n="1"){j(this,le);j(this,Nn,"https://api.wineater.com/");j(this,or);j(this,fn);j(this,Bn,!1);j(this,zn,null);O(this,or,t),O(this,fn,n)}async getInstantRecommendations(){var t;try{const n=(t=rt())==null?void 0:t.shop,r=n?"shopify/storefront/instant":f(this,fn)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:o}=await Z(this,le,qi).call(this,r,n?Z(this,le,Fi).call(this,{}):{});return{wines:i.filter(Boolean).map(Rl),profileHash:o.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(rt())return Z(this,le,Na).call(this,t,n);try{const r=f(this,fn)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search";return(await Z(this,le,Gt).call(this,r,n?{text:t,query_id:n}:{text:t})).filter(Boolean).map(Xn)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(f(this,fn)!=="2"||rt())return i();let o;try{o=await fetch(`${f(this,Nn)}dish/recommendations/search/v2/stream`,{method:"POST",headers:Z(this,le,ji).call(this),body:JSON.stringify(n?{text:t,query_id:n}:{text:t})})}catch{return i()}if(!o.ok||!o.body)return i();const l=o.body.getReader(),c=new TextDecoder;let s="",u=null;const p=m=>(m??[]).filter(Boolean).map(Xn);try{for(;;){const{done:m,value:h}=await l.read();h&&(s+=c.decode(h,{stream:!0}));const v=s.split(`
3
+ `);s=m?"":v.pop()??"";for(const g of m?v.filter(Boolean):v){if(!g.trim())continue;const y=JSON.parse(g);if(y.type==="wines")u=p(y.recommendations).map(d=>({...d,reason:""})),r(u);else{if(y.type==="final")return p(y.recommendations);if(y.type==="error")return u||i()}}if(m)break}}catch{return u||i()}return u??i()}async getMoreWineRecommendations(t,n){try{const r=await Z(this,le,Gt).call(this,"dish/recommendations/search/v2/more",{text:t,exclude_ids:n});return Wl(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await Z(this,le,Gt).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Xn)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await Z(this,le,Gt).call(this,"events",t,{keepalive:!0})}setLanguage(t){O(this,zn,t)}async getShopifyConfig(){const t=rt().shop;return Z(this,le,Gt).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await Z(this,le,Gt).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}Nn=new WeakMap,or=new WeakMap,fn=new WeakMap,Bn=new WeakMap,zn=new WeakMap,le=new WeakSet,ji=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${f(this,or)}`};if(!f(this,Bn)){const n=vi();n&&(t[Ll]=n)}return t},Gt=async function(t,n,r={}){return(await Z(this,le,qi).call(this,t,n,r)).data},qi=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:Z(this,le,ji).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${f(this,Nn)}${t}`,i())}catch(s){if(f(this,Bn)||!vi())throw s;O(this,Bn,!0),o=await fetch(`${f(this,Nn)}${t}`,i())}const l=await o.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(o.ok)throw new Error("API returned invalid JSON")}if(!o.ok)throw new fa(o.status,c);return{data:c,headers:o.headers}},Fi=function(t){const n=rt().shop;return f(this,zn)?{...t,shop:n,language:f(this,zn)}:{...t,shop:n}},Na=async function(t,n){try{const r=Z(this,le,Fi).call(this,{text:t,session_id:ra(),...n?{query_id:n}:{}});return(await Z(this,le,Gt).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Xn)}catch(r){throw r instanceof fa&&Pl(r.status,r.data)?new na:new Error(`Error in getWineRecommendations: ${r.message}`)}};const ha=((Ca=window==null?void 0:window.wineaterData)==null?void 0:Ca.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",gi=String(((Ta=window==null?void 0:window.wineaterData)==null?void 0:Ta.apiVersion)||"1"),At=new Ol(ha,gi);zl(e=>At.postEvents(e));function jl(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 mi=`${jl(ha)}:${gi}`,pa="wineater:v1:";function wi(e,t){try{const n=window.localStorage.getItem(pa+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function _i(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(pa+e,JSON.stringify(n))}catch{}}const Ie={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"},va={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é",addToCart:"Ajouter au panier",addedToCart:"Ajouté",sommelierResting:"Notre sommelier se repose. Découvrez notre sélection ci-dessous."},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",addToCart:"Añadir al carrito",addedToCart:"Añadido",sommelierResting:"Nuestro sumiller está descansando. Descubre nuestra selección."},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",addToCart:"Add to cart",addedToCart:"Added",sommelierResting:"Our sommelier is resting. Browse our picks below."},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",addToCart:"Dodaj u korpu",addedToCart:"Dodato",sommelierResting:"Naš somelijer se odmara. Pogledajte naš izbor ispod."},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",addToCart:"In den Warenkorb",addedToCart:"Hinzugefügt",sommelierResting:"Unser Sommelier macht gerade Pause. Entdecken Sie unsere Auswahl."},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:"Політика конфіденційності",addToCart:"Додати в кошик",addedToCart:"Додано",sommelierResting:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче."},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:"Политика конфиденциальности",addToCart:"В корзину",addedToCart:"Добавлено",sommelierResting:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже."},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:"Құпиялылық саясаты",addToCart:"Себетке қосу",addedToCart:"Қосылды",sommelierResting:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз."},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",addToCart:"Adicionar ao carrinho",addedToCart:"Adicionado",sommelierResting:"Nosso sommelier está descansando. Veja nossas sugestões abaixo."}};function ql(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 Fl={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:`
4
4
  @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap');
5
5
  :root { --wineater-font-primary: 'Roboto', sans-serif; }
6
6
  #wr-Custom {
@@ -101,10 +101,10 @@
101
101
  background-color: #8bae98;
102
102
  }
103
103
  }
104
- `}};function ea(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
104
+ `}};function ga(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
105
105
  @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
106
106
  :root { --wineater-font-primary: 'Bricolage Grotesque', serif; }
107
- `},n=Cl[e]||{};return{...t,...n}}function Tl(e){const t=e.color||"#7B2BEB";return{...ea(""),brandColor:t,wineaterColor:t,customCss:""}}const El=24*60*60*1e3;let re=Ue({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0});const ce={getLanguageFromURL(){return rt()?null:new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(re==null?void 0:re.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=re.storeConfig)==null?void 0:e.lang)??null},getApiKey(){var e;return((e=re.storeConfig)==null?void 0:e.open_ai_key)??null},getStoreId(){var e;return((e=re.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(re.storeConfig&&re.storeConfig.available_languages.includes(e)){if(re.currentLanguage=e,rt()){It.setLanguage(e);return}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=re.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=re.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=re.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){re.storeConfig=Sl(e),re.currentLanguage=re.storeConfig.lang;const t=this.getLanguageFromURL();t&&re.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(re.storeConfig.lang);const n=rt();this.setUiConfig(n?{...Tl(n),titleText:re.storeConfig.title||null}:ea(re.storeConfig.id)),il(re.storeConfig.requires_cookie_consent),re.isConfigLoaded=!0},async initializeStore(){const e=rt();if(e)return this.initializeShopify(e);const t=`${fi}:store-config:v2`,n=async()=>{const r=await It.getStoreConfig();return vi(t,r),r};try{const r=hi(t,El);if(r)try{this.applyStoreConfig(r),n().catch(()=>{});return}catch(i){console.warn("Ignoring invalid cached store config:",i)}this.applyStoreConfig(await n())}catch(r){console.error("Failed to initialize store:",r),re.isConfigLoaded=!1}},async initializeShopify(e){var t;rl(fl),hl();try{const n=(t=e.config)!=null&&t.lang?e.config:await It.getShopifyConfig(),r=Object.keys($o),i=ul(e.locale,n==null?void 0:n.lang,r);this.applyStoreConfig({id:`shopify:${e.shop}`,type:(n==null?void 0:n.widget_type)??"store",lang:i,available_languages:[i],open_ai_key:null,currency:e.currency||(n==null?void 0:n.currency)||"USD",title:(n==null?void 0:n.title)??"",requires_cookie_consent:!0}),re.searchAvailable=(n==null?void 0:n.search_available)!==!1}catch(n){console.error("Failed to initialize store:",n),re.isConfigLoaded=!1}},isSearchAvailable(){return re.searchAvailable},setSearchAvailable(e){re.searchAvailable=e},isInitialized(){return re.isConfigLoaded},getUiConfig(){return re.uiConfig},setUiConfig(e){re.uiConfig=e}},Pl={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 Al(e,t,n="en"){try{return new Intl.NumberFormat(Pl[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function se({key:e,lang:t}){const n=$o,r=ce.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 Il({sourceLang:e,targetLang:t,texts:n,apiKey:r}){var u,p,m,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}`},l=Object.entries(n).map(([d,w])=>({key:d,text:w})),c=`
107
+ `},n=Fl[e]||{};return{...t,...n}}function Ul(e){const t=e.color||"#7B2BEB";return{...ga(""),brandColor:t,wineaterColor:t,customCss:""}}const Hl=24*60*60*1e3;let $=Ne({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0});const ae={getLanguageFromURL(){return rt()?null:new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return($==null?void 0:$.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=$.storeConfig)==null?void 0:e.lang)??null},getApiKey(){var e;return((e=$.storeConfig)==null?void 0:e.open_ai_key)??null},getStoreId(){var e;return((e=$.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if($.storeConfig&&$.storeConfig.available_languages.includes(e)){if($.currentLanguage=e,rt()){At.setLanguage(e);return}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=$.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=$.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=$.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){$.storeConfig=ql(e),$.currentLanguage=$.storeConfig.lang;const t=this.getLanguageFromURL();t&&$.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage($.storeConfig.lang);const n=rt();this.setUiConfig(n?{...Ul(n),titleText:$.storeConfig.title||null}:ga($.storeConfig.id)),bl($.storeConfig.requires_cookie_consent),$.isConfigLoaded=!0},async initializeStore(){const e=rt();if(e)return this.initializeShopify(e);const t=`${mi}:store-config:v2`,n=async()=>{const r=await At.getStoreConfig();return _i(t,r),r};try{const r=wi(t,Hl);if(r)try{this.applyStoreConfig(r),n().catch(()=>{});return}catch(i){console.warn("Ignoring invalid cached store config:",i)}this.applyStoreConfig(await n())}catch(r){console.error("Failed to initialize store:",r),$.isConfigLoaded=!1}},async initializeShopify(e){var t;yl(Al),Il();try{const n=(t=e.config)!=null&&t.lang?e.config:await At.getShopifyConfig(),r=Object.keys(va),i=El(e.locale,n==null?void 0:n.lang,r);this.applyStoreConfig({id:`shopify:${e.shop}`,type:(n==null?void 0:n.widget_type)??"store",lang:i,available_languages:[i],open_ai_key:null,currency:e.currency||(n==null?void 0:n.currency)||"USD",title:(n==null?void 0:n.title)??"",requires_cookie_consent:!0}),$.searchAvailable=(n==null?void 0:n.search_available)!==!1}catch(n){console.error("Failed to initialize store:",n),$.isConfigLoaded=!1}},isSearchAvailable(){return $.searchAvailable},setSearchAvailable(e){$.searchAvailable=e},isInitialized(){return $.isConfigLoaded},getUiConfig(){return $.uiConfig},setUiConfig(e){$.uiConfig=e}},Vl={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 Gl(e,t,n="en"){try{return new Intl.NumberFormat(Vl[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function oe({key:e,lang:t}){const n=va,r=ae.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 Kl({sourceLang:e,targetLang:t,texts:n,apiKey:r}){var u,p,m,h;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}`},l=Object.entries(n).map(([v,g])=>({key:v,text:g})),c=`
108
108
  You are a professional translator.
109
109
 
110
110
  The input texts are written in language with code "${e}". Your task is to translate them strictly to the target language with code "${t}".
@@ -129,18 +129,18 @@ Output:
129
129
 
130
130
  Now translate the following input:
131
131
  ${JSON.stringify(l,null,2)}
132
- `,s=JSON.stringify({model:"gpt-3.5-turbo",messages:[{role:"system",content:"You are a professional translator."},{role:"user",content:c}],temperature:.2,max_tokens:1e3});try{const w=await(await fetch(i,{method:"POST",headers:o,body:s})).json(),y=(f=(m=(p=(u=w==null?void 0:w.choices)==null?void 0:u[0])==null?void 0:p.message)==null?void 0:m.content)==null?void 0:f.trim();if(!y)throw new Error("No response from OpenAI");const v=JSON.parse(y),x={};return v.forEach(R=>{R.key&&R.text!==void 0&&(x[R.key]=R.text)}),{...n,...x}}catch(d){return console.error("Error translating texts:",d),n}}is();var Dl=Nt('<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 ta(e,t){let n=ze(t,"className",8,""),r=ze(t,"size",8,20);var i=Dl();M(()=>{vt(i,0,Sn(n())),D(i,"width",r()),D(i,"height",r())}),k(e,i)}var Rl=Nt('<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 na(e,t){let n=ze(t,"className",8,""),r=ze(t,"size",8,20);var i=Rl();M(()=>{vt(i,0,Sn(n())),D(i,"width",r()),D(i,"height",r())}),k(e,i)}var Wl=Nt('<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 pi(e,t){let n=ze(t,"className",8,""),r=ze(t,"size",8,20);var i=Wl();M(()=>{vt(i,0,Sn(n())),D(i,"width",r()),D(i,"height",r())}),k(e,i)}var Ml=Nt('<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 ra(e,t){let n=ze(t,"className",8,""),r=ze(t,"size",8,20);var i=Ml();M(()=>{vt(i,0,Sn(n())),D(i,"width",r()),D(i,"height",r())}),k(e,i)}var Bl=L('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Nl=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Ll=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),zl=L('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),Ol=L('<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>'),jl=L('<div class="wr-Header"><!></div>');const ql={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;
132
+ `,s=JSON.stringify({model:"gpt-3.5-turbo",messages:[{role:"system",content:"You are a professional translator."},{role:"user",content:c}],temperature:.2,max_tokens:1e3});try{const g=await(await fetch(i,{method:"POST",headers:o,body:s})).json(),y=(h=(m=(p=(u=g==null?void 0:g.choices)==null?void 0:u[0])==null?void 0:p.message)==null?void 0:m.content)==null?void 0:h.trim();if(!y)throw new Error("No response from OpenAI");const d=JSON.parse(y),w={};return d.forEach(P=>{P.key&&P.text!==void 0&&(w[P.key]=P.text)}),{...n,...w}}catch(v){return console.error("Error translating texts:",v),n}}ms();var Yl=zt('<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 ma(e,t){let n=Pe(t,"className",8,""),r=Pe(t,"size",8,20);var i=Yl();M(()=>{vt(i,0,Cn(n())),R(i,"width",r()),R(i,"height",r())}),T(e,i)}var Ql=zt('<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 wa(e,t){let n=Pe(t,"className",8,""),r=Pe(t,"size",8,20);var i=Ql();M(()=>{vt(i,0,Cn(n())),R(i,"width",r()),R(i,"height",r())}),T(e,i)}var Jl=zt('<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 yi(e,t){let n=Pe(t,"className",8,""),r=Pe(t,"size",8,20);var i=Jl();M(()=>{vt(i,0,Cn(n())),R(i,"width",r()),R(i,"height",r())}),T(e,i)}var Zl=zt('<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 _a(e,t){let n=Pe(t,"className",8,""),r=Pe(t,"size",8,20);var i=Zl();M(()=>{vt(i,0,Cn(n())),R(i,"width",r()),R(i,"height",r())}),T(e,i)}var Xl=z('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),$l=z('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),ec=z('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),tc=z('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),nc=z('<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>'),rc=z('<div class="wr-Header"><!></div>');const ic={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;
133
133
 
134
134
  /* 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;}
135
135
 
136
136
  @media screen and (max-width: 768px) {.wr-Header-title.svelte-oiwvqb {display:none;}
137
- }`};function Fl(e,t){st(t,!0),ht(e,ql);let n=Z(()=>ce.getAppLanguage()),r=Z(()=>ce.getUiConfig()),i=Z(()=>{var f,d;return((f=window==null?void 0:window.wineaterData)==null?void 0:f.TITLE_TEXT)||((d=a(r))==null?void 0:d.titleText)||null}),o=K(Ue(pi));function l(f){return f.split(/(meal|mood|occasion)/gi).map(d=>({keyword:/^(meal|mood|occasion)$/i.test(d)?d.toLowerCase():null,text:d}))}let c=Z(()=>a(i)?l(a(i)):null);var s=jl(),u=T(s);{var p=f=>{var d=zl();Wt(d,21,()=>a(c),_n,(w,y)=>{var v=Je(),x=me(v);{var R=b=>{var E=Bl(),P=me(E),C=T(P);Po(C,()=>a(o),(j,Q)=>{Q(j,{className:"wr-Header-icon",size:"28"})});var A=I(P),O=T(A);M(()=>q(O,a(y).text)),ft("mouseenter",P,()=>g(o,ra,!0)),ft("mouseleave",P,()=>g(o,pi,!0)),k(b,E)},z=b=>{var E=Je(),P=me(E);{var C=O=>{var j=Nl(),Q=me(j);na(Q,{className:"wr-Header-icon",size:"28"});var H=I(Q),ue=T(H);M(()=>q(ue,a(y).text)),k(O,j)},A=O=>{var j=Je(),Q=me(j);{var H=ie=>{var xe=Ll(),Re=me(xe);ta(Re,{className:"wr-Header-icon",size:"28"});var ye=I(Re),Wn=T(ye);M(()=>q(Wn,a(y).text)),k(ie,xe)},ue=ie=>{var xe=At();M(()=>q(xe,a(y).text)),k(ie,xe)};F(Q,ie=>{a(y).keyword==="occasion"?ie(H):ie(ue,!1)},!0)}k(O,j)};F(P,O=>{a(y).keyword==="mood"?O(C):O(A,!1)},!0)}k(b,E)};F(x,b=>{a(y).keyword==="meal"?b(R):b(z,!1)})}k(w,v)}),k(f,d)},m=f=>{var d=Ol(),w=T(d),y=I(w),v=T(y);Po(v,()=>a(o),(Q,H)=>{H(Q,{className:"wr-Header-icon",size:"28"})});var x=I(y,2),R=T(x),z=I(x,2);na(z,{className:"wr-Header-icon",size:"28"});var b=I(z,2),E=T(b),P=I(b,3),C=I(P);ta(C,{className:"wr-Header-icon",size:"28"});var A=I(C,2),O=T(A),j=I(A);M((Q,H,ue,ie,xe,Re)=>{q(w,`${Q??""} `),q(R,H),q(E,ue),q(P,` ${ie??""} `),q(O,xe),q(j,` ${Re??""}`)},[()=>se({key:"headerLine1",lang:a(n)}),()=>se({key:"headerMeal",lang:a(n)}),()=>se({key:"headerMood",lang:a(n)}),()=>se({key:"headerOr",lang:a(n)}),()=>se({key:"headerOccasion",lang:a(n)}),()=>se({key:"headerLine2",lang:a(n)})]),ft("mouseenter",y,()=>g(o,ra,!0)),ft("mouseleave",y,()=>g(o,pi,!0)),k(f,d)};F(u,f=>{a(c)?f(p):f(m,!1)})}k(e,s),lt()}var Ul=L('<option class="wr-Footer-lang"> </option>'),Hl=L('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),Vl=L('<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 Gl={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;}
137
+ }`};function oc(e,t){ut(t,!0),pt(e,ic);let n=F(()=>ae.getAppLanguage()),r=F(()=>ae.getUiConfig()),i=F(()=>{var h,v;return((h=window==null?void 0:window.wineaterData)==null?void 0:h.TITLE_TEXT)||((v=a(r))==null?void 0:v.titleText)||null}),o=G(Ne(yi));function l(h){return h.split(/(meal|mood|occasion)/gi).map(v=>({keyword:/^(meal|mood|occasion)$/i.test(v)?v.toLowerCase():null,text:v}))}let c=F(()=>a(i)?l(a(i)):null);var s=rc(),u=A(s);{var p=h=>{var v=tc();Lt(v,21,()=>a(c),Sn,(g,y)=>{var d=xr(),w=tt(d);{var P=E=>{var k=Xl(),C=tt(k),Y=A(C);Ho(Y,()=>a(o),(ue,Re)=>{Re(ue,{className:"wr-Header-icon",size:"28"})});var V=D(C),ce=A(V);M(()=>L(ce,a(y).text)),ht("mouseenter",C,()=>_(o,_a,!0)),ht("mouseleave",C,()=>_(o,yi,!0)),T(E,k)},N=E=>{var k=$l(),C=tt(k);wa(C,{className:"wr-Header-icon",size:"28"});var Y=D(C),V=A(Y);M(()=>L(V,a(y).text)),T(E,k)},S=E=>{var k=ec(),C=tt(k);ma(C,{className:"wr-Header-icon",size:"28"});var Y=D(C),V=A(Y);M(()=>L(V,a(y).text)),T(E,k)},I=E=>{var k=Pt();M(()=>L(k,a(y).text)),T(E,k)};J(w,E=>{a(y).keyword==="meal"?E(P):a(y).keyword==="mood"?E(N,1):a(y).keyword==="occasion"?E(S,2):E(I,!1)})}T(g,d)}),T(h,v)},m=h=>{var v=nc(),g=A(v),y=D(g),d=A(y);Ho(d,()=>a(o),(ce,ue)=>{ue(ce,{className:"wr-Header-icon",size:"28"})});var w=D(y,2),P=A(w),N=D(w,2);wa(N,{className:"wr-Header-icon",size:"28"});var S=D(N,2),I=A(S),E=D(S,3),k=D(E);ma(k,{className:"wr-Header-icon",size:"28"});var C=D(k,2),Y=A(C),V=D(C);M((ce,ue,Re,_e,at,je)=>{L(g,`${ce??""} `),L(P,ue),L(I,Re),L(E,` ${_e??""} `),L(Y,at),L(V,` ${je??""}`)},[()=>oe({key:"headerLine1",lang:a(n)}),()=>oe({key:"headerMeal",lang:a(n)}),()=>oe({key:"headerMood",lang:a(n)}),()=>oe({key:"headerOr",lang:a(n)}),()=>oe({key:"headerOccasion",lang:a(n)}),()=>oe({key:"headerLine2",lang:a(n)})]),ht("mouseenter",y,()=>_(o,_a,!0)),ht("mouseleave",y,()=>_(o,yi,!0)),T(h,v)};J(u,h=>{a(c)?h(p):h(m,!1)})}T(e,s),dt()}var ac=z('<option class="wr-Footer-lang"> </option>'),sc=z('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),lc=z('<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 cc={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;}
138
138
 
139
139
  @media screen and (max-width: 768px) {.wr-Footer-text--sommelier.svelte-1sr6y3t {display:none;}
140
- }`};function Kl(e,t){st(t,!0),ht(e,Gl);let n=ze(t,"countryCode",3,null),r=Z(()=>ce.getAppLanguage()),i=Z(()=>ce.getSupportedLanguages()),o=Z(()=>ce.getStoreId());function l(x){const z=x.target.value;Oe(je.LANGUAGE_CHANGED,a(o),{from_language:a(r),to_language:z}),ce.setStoreLanguage(z)}var c=Vl(),s=T(c),u=T(s),p=T(u),m=T(p),f=I(p,2),d=I(f,2),w=T(d),y=I(s,2);{var v=x=>{var R=Hl();R.__change=l,Wt(R,21,()=>a(i),_n,(b,E)=>{var P=Ul(),C=T(P),A={};M(O=>{Qs(P,a(E)===a(r)),q(C,O),A!==(A=a(E))&&(P.value=(P.__value=a(E))??"")},[()=>a(E).toUpperCase()]),k(b,P)});var z;Gs(R),M(()=>{z!==(z=a(r))&&(R.value=(R.__value=a(r))??"",Do(R,a(r)))}),k(x,R)};F(y,x=>{a(i).length>1&&x(v)})}M((x,R)=>{q(m,x),D(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"),q(w,R)},[()=>se({key:"poweredBy",lang:a(r)}),()=>se({key:"ai_sommelier",lang:a(r)})]),k(e,c),lt()}br(["change"]);var Yl=L('<a rel="noopener noreferrer"><!></a>'),Ql=L("<button><!></button>");const Jl={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,
140
+ }`};function uc(e,t){ut(t,!0),pt(e,cc);let n=Pe(t,"countryCode",3,null),r=F(()=>ae.getAppLanguage()),i=F(()=>ae.getSupportedLanguages()),o=F(()=>ae.getStoreId());function l(w){const N=w.target.value;Ae(Ie.LANGUAGE_CHANGED,a(o),{from_language:a(r),to_language:N}),ae.setStoreLanguage(N)}var c=lc(),s=A(c),u=A(s),p=A(u),m=A(p),h=D(p,2),v=D(h,2),g=A(v),y=D(s,2);{var d=w=>{var P=sc();Lt(P,21,()=>a(i),Sn,(S,I)=>{var E=ac(),k=A(E),C={};M(Y=>{fl(E,a(I)===a(r)),L(k,Y),C!==(C=a(I))&&(E.value=(E.__value=a(I))??"")},[()=>a(I).toUpperCase()]),T(S,E)});var N;cl(P),M(()=>{N!==(N=a(r))&&(P.value=(P.__value=a(r))??"",Ko(P,a(r)))}),an("change",P,l),T(w,P)};J(y,w=>{a(i).length>1&&w(d)})}M((w,P)=>{L(m,w),R(h,"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"),L(g,P)},[()=>oe({key:"poweredBy",lang:a(r)}),()=>oe({key:"ai_sommelier",lang:a(r)})]),T(e,c),dt()}br(["change"]);var dc=z('<a rel="noopener noreferrer"><!></a>'),fc=z("<button><!></button>");const hc={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,
141
141
  color 0.2s,
142
- 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 Lt(e,t){st(t,!0),ht(e,Jl);let n=ze(t,"type",3,"button"),r=ze(t,"variant",3,"primary"),i=ze(t,"target",3,"_self"),o=ce.getUiConfig(),l=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var c=Je(),s=me(c);{var u=m=>{var f=Yl();f.__click=function(...w){var y;(y=t.handleClick)==null||y.apply(this,w)};var d=T(f);Eo(d,t,"default",{}),M(()=>{vt(f,1,Sn(l),"svelte-8cxv3l"),D(f,"href",t.href),D(f,"id",t.id),D(f,"target",i())}),k(m,f)},p=m=>{var f=Ql();f.__click=function(...w){var y;(y=t.handleClick)==null||y.apply(this,w)};var d=T(f);Eo(d,t,"default",{}),M(()=>{vt(f,1,Sn(l),"svelte-8cxv3l"),D(f,"type",n()),D(f,"id",t.id)}),k(m,f)};F(s,m=>{t.href?m(u):m(p,!1)})}k(e,c),lt()}br(["click"]);var Zl=L('<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 Xl={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,
143
- 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 $l(e,t){st(t,!0),ht(e,Xl);let n=ze(t,"searchQuery",15),r,i=K(!1),o=K(0),l=K(0),c=K(!0),s=K(!1),u=Z(()=>ce.getAppLanguage()),p=0;function m(){return r}function f(){const b=++p,E=se({key:"placeholderSuggestions",lang:a(u)});if(!r||!E.length)return;g(s,!0);const P=()=>{if(b!==p||!r||!a(s)||a(i)||n().length)return;const C=E[a(o)];if(a(c)){if(r.placeholder=C.substring(0,Ji(l)),a(l)>C.length){g(c,!1),setTimeout(P,1600);return}setTimeout(P,90)}else{if(r.placeholder=C.substring(0,Ji(l,-1)),a(l)<0){g(c,!0),g(o,(a(o)+1)%E.length),setTimeout(P,450);return}setTimeout(P,45)}};P()}function d(){g(s,!1)}function w(){g(i,!0),d(),r&&(r.placeholder="")}function y(){g(i,!1),g(l,0),g(c,!0),g(s,!1)}qn(()=>{if(!r||n().length>0)return;p++,g(s,!1),g(o,0),g(l,0),g(c,!0);const b=se({key:"placeholderSuggestions",lang:a(u)});b&&b.length?r.placeholder=b[0]:r.placeholder=se({key:"searchPlaceholder",lang:a(u)})}),qn(()=>{r&&t.initialized&&!a(i)&&!n().length&&!a(s)&&f(),n().length>0&&a(s)&&(g(s,!1),p++)}),ti(()=>{});var v={getSearchElement:m},x=Zl(),R=I(T(x),2);$s(R,b=>r=b,()=>r);var z=I(R,2);return Lt(z,{className:"wr-Search-button",type:"submit",variant:"primary",children:(b,E)=>{var P=At();M(C=>q(P,C),[()=>se({key:"searchButton",lang:a(u)})]),k(b,P)},$$slots:{default:!0}}),ft("submit",x,function(...b){var E;(E=t.onSubmit)==null||E.apply(this,b)}),ft("focus",R,w),ft("blur",R,y),Xs(R,n),k(e,x),lt(v)}var ec=L('<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>'),tc=L('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const nc={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
+ 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){ut(t,!0),pt(e,hc);let n=Pe(t,"type",3,"button"),r=Pe(t,"variant",3,"primary"),i=Pe(t,"target",3,"_self"),o=ae.getUiConfig(),l=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var c=xr(),s=tt(c);{var u=m=>{var h=dc(),v=A(h);Uo(v,t,"default",{}),M(()=>{vt(h,1,Cn(l),"svelte-8cxv3l"),R(h,"href",t.href),R(h,"id",t.id),R(h,"target",i())}),an("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)},p=m=>{var h=fc(),v=A(h);Uo(v,t,"default",{}),M(()=>{vt(h,1,Cn(l),"svelte-8cxv3l"),R(h,"type",n()),R(h,"id",t.id)}),an("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)};J(s,m=>{t.href?m(u):m(p,!1)})}T(e,c),dt()}br(["click"]);var pc=z('<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 vc={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,
143
+ 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 gc(e,t){ut(t,!0),pt(e,vc);let n=Pe(t,"searchQuery",15),r,i=G(!1),o=G(0),l=G(0),c=G(!0),s=G(!1),u=F(()=>ae.getAppLanguage()),p=0;function m(){return r}function h(){const S=++p,I=oe({key:"placeholderSuggestions",lang:a(u)});if(!r||!I.length)return;_(s,!0);const E=()=>{if(S!==p||!r||!a(s)||a(i)||n().length)return;const k=I[a(o)];if(a(c)){if(r.placeholder=k.substring(0,fo(l)),a(l)>k.length){_(c,!1),setTimeout(E,1600);return}setTimeout(E,90)}else{if(r.placeholder=k.substring(0,fo(l,-1)),a(l)<0){_(c,!0),_(o,(a(o)+1)%I.length),setTimeout(E,450);return}setTimeout(E,45)}};E()}function v(){_(s,!1)}function g(){_(i,!0),v(),r&&(r.placeholder="")}function y(){_(i,!1),_(l,0),_(c,!0),_(s,!1)}Gn(()=>{if(!r||n().length>0)return;p++,_(s,!1),_(o,0),_(l,0),_(c,!0);const S=oe({key:"placeholderSuggestions",lang:a(u)});S&&S.length?r.placeholder=S[0]:r.placeholder=oe({key:"searchPlaceholder",lang:a(u)})}),Gn(()=>{r&&t.initialized&&!a(i)&&!n().length&&!a(s)&&h(),n().length>0&&a(s)&&(_(s,!1),p++)}),oi(()=>{});var d={getSearchElement:m},w=pc(),P=D(A(w),2);gl(P,S=>r=S,()=>r);var N=D(P,2);return jt(N,{className:"wr-Search-button",type:"submit",variant:"primary",children:(S,I)=>{var E=Pt();M(k=>L(E,k),[()=>oe({key:"searchButton",lang:a(u)})]),T(S,E)},$$slots:{default:!0}}),ht("submit",w,function(...S){var I;(I=t.onSubmit)==null||I.apply(this,S)}),ht("focus",P,g),ht("blur",P,y),vl(P,n),T(e,w),dt(d)}var mc=z('<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>'),wc=z('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const _c={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%;
144
144
  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;}
145
145
 
146
146
  @keyframes svelte-f6xbvk-wr-shimmer {
@@ -157,7 +157,7 @@ ${JSON.stringify(l,null,2)}
157
157
  }
158
158
 
159
159
  @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;}
160
- }`};function ia(e){ht(e,nc);var t=tc();Wt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=ec();k(n,i)}),k(e,t)}var rc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),ic=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),oc=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),ac=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),sc=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),lc=L('<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>'),cc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),uc=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),dc=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),fc=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),hc=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),vc=L('<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 pc={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 oa(e,t){st(t,!0),ht(e,pc);const n=!!t.isMobile;var r=Je(),i=me(r);{var o=c=>{var s=lc(),u=T(s);u.__click=function(...C){var A;(A=t.onClose)==null||A.apply(this,C)};var p=I(u,2),m=T(p),f=T(m),d=T(f),w=T(d),y=I(d,2);y.__click=function(...C){var A;(A=t.onClose)==null||A.apply(this,C)};var v=I(f,2);{var x=C=>{var A=rc(),O=T(A);M(()=>q(O,t.shortDescription)),k(C,A)};F(v,C=>{t.shortDescription&&C(x)})}var R=I(v,2);{var z=C=>{var A=ic(),O=T(A);M(()=>q(O,t.reason)),k(C,A)},b=C=>{var A=Je(),O=me(A);{var j=Q=>{var H=oc(),ue=T(H);M(()=>q(ue,t.pairing)),k(Q,H)};F(O,Q=>{t.pairing&&Q(j)},!0)}k(C,A)};F(R,C=>{t.reason?C(z):C(b,!1)})}var E=I(R,2);{var P=C=>{var A=sc();Wt(A,21,()=>t.tags,_n,(O,j)=>{var Q=ac(),H=T(Q);M(()=>q(H,a(j))),k(O,Q)}),k(C,A)};F(E,C=>{t.tags&&t.tags.length&&C(P)})}M(()=>q(w,t.title)),k(c,s)},l=c=>{var s=vc(),u=T(s),p=T(u),m=T(p),f=I(p,2);f.__click=function(...b){var E;(E=t.onClose)==null||E.apply(this,b)};var d=I(u,2);{var w=b=>{var E=cc(),P=T(E);M(()=>q(P,t.shortDescription)),k(b,E)};F(d,b=>{t.shortDescription&&b(w)})}var y=I(d,2);{var v=b=>{var E=uc(),P=T(E);M(()=>q(P,t.reason)),k(b,E)},x=b=>{var E=Je(),P=me(E);{var C=A=>{var O=dc(),j=T(O);M(()=>q(j,t.pairing)),k(A,O)};F(P,A=>{t.pairing&&A(C)},!0)}k(b,E)};F(y,b=>{t.reason?b(v):b(x,!1)})}var R=I(y,2);{var z=b=>{var E=hc();Wt(E,21,()=>t.tags,_n,(P,C)=>{var A=fc(),O=T(A);M(()=>q(O,a(C))),k(P,A)}),k(b,E)};F(R,b=>{t.tags&&t.tags.length&&b(z)})}M(()=>q(m,t.title)),k(c,s)};F(i,c=>{n?c(o):c(l,!1)})}k(e,r),lt()}br(["click"]);const gc={red:{glass:"#3b1230",foil:"#7a1f3d",accent:"#7a1f3d",shoulder:"bordeaux"},white:{glass:"#a9b568",foil:"#c9b458",accent:"#8a8f3c",shoulder:"flute"},rose:{glass:"#d98a9d",foil:"#e8a3b4",accent:"#b8566f",shoulder:"burgundy"},sparkling:{glass:"#5f6b3a",foil:"#d9c26a",accent:"#b89b2e",shoulder:"champagne"},sweet:{glass:"#b8862e",foil:"#d9a441",accent:"#9a6a1c",shoulder:"flute"},fortified:{glass:"#4a2a1a",foil:"#8a5a2b",accent:"#8a5a2b",shoulder:"port"}},mc={flute:{body:"M17 4h10v34c0 6 8 10 8 24v56c0 3-2 5-5 5H14c-3 0-5-2-5-5V62c0-14 8-18 8-24z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 66c0 18 0 40 0 52"},burgundy:{body:"M17 4h10v30c0 10 11 14 11 30v54c0 3-2 5-5 5H11c-3 0-5-2-5-5V64c0-16 11-20 11-30z",cap:{x:16,y:2,w:12,h:20},label:{x:8,y:72,w:28,h:34},shine:"M11 68c0 18 0 38 0 50"},bordeaux:{body:"M17 4h10v32c0 4 1 6 4 9 4 4 6 7 6 14v59c0 3-2 5-5 5H12c-3 0-5-2-5-5V59c0-7 2-10 6-14 3-3 4-5 4-9z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 64c0 18 0 40 0 54"},champagne:{body:"M17 4h10v34c0 12 15 18 15 42v35c0 5-3 8-7 8H9c-4 0-7-3-7-8V80c0-24 15-30 15-42z",cap:{x:15,y:2,w:14,h:34},label:{x:6,y:78,w:32,h:36},shine:"M8 82c0 14 0 28 0 36"},port:{body:"M16 4h12v16c0 3-2 4-2 7s3 4 3 8c0 6 9 6 9 18v65c0 3-2 5-5 5H11c-3 0-5-2-5-5V53c0-12 9-12 9-18 0-4 3-5 3-8s-2-4-2-7z",cap:{x:15,y:2,w:14,h:15},label:{x:8,y:66,w:28,h:42},shine:"M11 60c0 20 0 40 0 56"}},wc=[[20,58,1.5],[26,50,1.1],[23,44,.8],[14,66,1.2],[30,63,1.7],[9,86,1.1],[34,92,1.3],[8,106,1.6],[35,112,1],[25,70,.9],[17,73,.7]];function _c(e){const t=(e??"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");return/(spark|champ|cava|prosecco|cremant|brut|pet.?nat|espum|petillant)/.test(t)?"sparkling":/(rose|pink|rosado)/.test(t)?"rose":/(fortif|port|sherry|madeira|marsala)/.test(t)?"fortified":/(sweet|dessert|late|sauternes|ice|moelleux|dulce)/.test(t)?"sweet":/(red|rouge|tinto|rosso|krasn)/.test(t)?"red":"white"}function yc(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var bc=Nt("<circle></circle>"),xc=Nt('<path d="M16.5 10h11l1.5 26h-14z"></path><rect x="14" y="2" width="16" height="9" rx="3.5"></rect><rect x="14" y="8" width="16" height="2.4" fill="#000" opacity="0.12"></rect><path d="M16 15h12M15.6 20h12.8M15.2 25h13.6M14.8 30h14.4M22 11v21" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9" fill="none"></path><circle cx="22" cy="33" r="1.6" fill="none" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9"></circle><g fill="#fff" opacity="0.4"></g>',1),kc=Nt('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),Sc=Nt('<svg class="wr-WineBottle svelte-1duzdpv" viewBox="0 0 44 130" aria-hidden="true" focusable="false"><defs><linearGradient x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-opacity="0.78"></stop><stop offset="0.45"></stop><stop offset="1" stop-opacity="0.88"></stop></linearGradient></defs><path></path><!><rect rx="2.5" fill="#fffdf8" opacity="0.94"></rect><rect height="2.4" rx="1.2"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><path stroke="#fff" stroke-opacity="0.22" stroke-width="2.2" stroke-linecap="round" fill="none"></path></svg>');const Cc={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function Tc(e,t){st(t,!0),ht(e,Cc);const n=Z(()=>_c(t.type)),r=Z(()=>gc[a(n)]),i=Z(()=>mc[a(r).shoulder]),o=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=Sc(),c=T(l),s=T(c),u=T(s),p=I(u),m=I(p),f=I(c),d=I(f);{var w=E=>{var P=xc(),C=me(P),A=I(C),O=I(A,4);Wt(O,21,()=>wc,([j,Q,H])=>`${j}-${Q}`,(j,Q)=>{var H=Z(()=>Oa(a(Q),3));let ue=()=>a(H)[0],ie=()=>a(H)[1],xe=()=>a(H)[2];var Re=bc();M(()=>{D(Re,"cx",ue()),D(Re,"cy",ie()),D(Re,"r",xe())}),k(j,Re)}),M(()=>{D(C,"fill",a(r).foil),D(A,"fill",a(r).foil)}),k(E,P)},y=E=>{var P=kc(),C=me(P),A=I(C);M(()=>{D(C,"x",a(i).cap.x),D(C,"y",a(i).cap.y),D(C,"width",a(i).cap.w),D(C,"height",a(i).cap.h),D(C,"fill",a(r).foil),D(A,"x",a(i).cap.x),D(A,"y",a(i).cap.y+a(i).cap.h-3),D(A,"width",a(i).cap.w)}),k(E,P)};F(d,E=>{a(n)==="sparkling"?E(w):E(y,!1)})}var v=I(d),x=I(v),R=I(x),z=I(R),b=I(z);M(()=>{D(s,"id",o),D(u,"stop-color",a(r).glass),D(p,"stop-color",a(r).glass),D(m,"stop-color",a(r).glass),D(f,"d",a(i).body),D(f,"fill",`url(#${o})`),D(v,"x",a(i).label.x),D(v,"y",a(i).label.y),D(v,"width",a(i).label.w),D(v,"height",a(i).label.h),D(x,"x",a(i).label.x+a(i).label.w*.2),D(x,"y",a(i).label.y+8),D(x,"width",a(i).label.w*.6),D(x,"fill",a(r).accent),D(R,"x",a(i).label.x+a(i).label.w*.3),D(R,"y",a(i).label.y+14),D(R,"width",a(i).label.w*.4),D(R,"fill",a(r).accent),D(z,"x",a(i).label.x+a(i).label.w*.3),D(z,"y",a(i).label.y+19),D(z,"width",a(i).label.w*.4),D(z,"fill",a(r).accent),D(b,"d",a(i).shine)}),k(e,l),lt()}var Ec=L('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Pc=L('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),Ac=L('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Ic=L('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Dc=L('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),Rc=L('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),Wc=L('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Mc=L('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Bc=L('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Nc=L('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),Lc=L("<div><!> <!></div>"),zc=L('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const Oc={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),
160
+ }`};function ya(e){pt(e,_c);var t=wc();Lt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=mc();T(n,i)}),T(e,t)}var yc=z('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),bc=z('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),xc=z('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),kc=z('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Sc=z('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Cc=z('<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>'),Tc=z('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Ec=z('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Pc=z('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Ac=z('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Ic=z('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Dc=z('<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 Rc={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 ba(e,t){ut(t,!0),pt(e,Rc);const n=!!t.isMobile;var r=xr(),i=tt(r);{var o=c=>{var s=Cc(),u=A(s),p=D(u,2),m=A(p),h=A(m),v=A(h),g=A(v),y=D(v,2),d=D(h,2);{var w=k=>{var C=yc(),Y=A(C);M(()=>L(Y,t.shortDescription)),T(k,C)};J(d,k=>{t.shortDescription&&k(w)})}var P=D(d,2);{var N=k=>{var C=bc(),Y=A(C);M(()=>L(Y,t.reason)),T(k,C)},S=k=>{var C=xc(),Y=A(C);M(()=>L(Y,t.pairing)),T(k,C)};J(P,k=>{t.reason?k(N):t.pairing&&k(S,1)})}var I=D(P,2);{var E=k=>{var C=Sc();Lt(C,21,()=>t.tags,Sn,(Y,V)=>{var ce=kc(),ue=A(ce);M(()=>L(ue,a(V))),T(Y,ce)}),T(k,C)};J(I,k=>{t.tags&&t.tags.length&&k(E)})}M(()=>L(g,t.title)),an("click",u,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),an("click",y,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),T(c,s)},l=c=>{var s=Dc(),u=A(s),p=A(u),m=A(p),h=D(p,2),v=D(u,2);{var g=S=>{var I=Tc(),E=A(I);M(()=>L(E,t.shortDescription)),T(S,I)};J(v,S=>{t.shortDescription&&S(g)})}var y=D(v,2);{var d=S=>{var I=Ec(),E=A(I);M(()=>L(E,t.reason)),T(S,I)},w=S=>{var I=Pc(),E=A(I);M(()=>L(E,t.pairing)),T(S,I)};J(y,S=>{t.reason?S(d):t.pairing&&S(w,1)})}var P=D(y,2);{var N=S=>{var I=Ic();Lt(I,21,()=>t.tags,Sn,(E,k)=>{var C=Ac(),Y=A(C);M(()=>L(Y,a(k))),T(E,C)}),T(S,I)};J(P,S=>{t.tags&&t.tags.length&&S(N)})}M(()=>L(m,t.title)),an("click",h,function(...S){var I;(I=t.onClose)==null||I.apply(this,S)}),T(c,s)};J(i,c=>{n?c(o):c(l,!1)})}T(e,r),dt()}br(["click"]);const Wc={red:{glass:"#3b1230",foil:"#7a1f3d",accent:"#7a1f3d",shoulder:"bordeaux"},white:{glass:"#a9b568",foil:"#c9b458",accent:"#8a8f3c",shoulder:"flute"},rose:{glass:"#d98a9d",foil:"#e8a3b4",accent:"#b8566f",shoulder:"burgundy"},sparkling:{glass:"#5f6b3a",foil:"#d9c26a",accent:"#b89b2e",shoulder:"champagne"},sweet:{glass:"#b8862e",foil:"#d9a441",accent:"#9a6a1c",shoulder:"flute"},fortified:{glass:"#4a2a1a",foil:"#8a5a2b",accent:"#8a5a2b",shoulder:"port"}},Mc={flute:{body:"M17 4h10v34c0 6 8 10 8 24v56c0 3-2 5-5 5H14c-3 0-5-2-5-5V62c0-14 8-18 8-24z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 66c0 18 0 40 0 52"},burgundy:{body:"M17 4h10v30c0 10 11 14 11 30v54c0 3-2 5-5 5H11c-3 0-5-2-5-5V64c0-16 11-20 11-30z",cap:{x:16,y:2,w:12,h:20},label:{x:8,y:72,w:28,h:34},shine:"M11 68c0 18 0 38 0 50"},bordeaux:{body:"M17 4h10v32c0 4 1 6 4 9 4 4 6 7 6 14v59c0 3-2 5-5 5H12c-3 0-5-2-5-5V59c0-7 2-10 6-14 3-3 4-5 4-9z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 64c0 18 0 40 0 54"},champagne:{body:"M17 4h10v34c0 12 15 18 15 42v35c0 5-3 8-7 8H9c-4 0-7-3-7-8V80c0-24 15-30 15-42z",cap:{x:15,y:2,w:14,h:34},label:{x:6,y:78,w:32,h:36},shine:"M8 82c0 14 0 28 0 36"},port:{body:"M16 4h12v16c0 3-2 4-2 7s3 4 3 8c0 6 9 6 9 18v65c0 3-2 5-5 5H11c-3 0-5-2-5-5V53c0-12 9-12 9-18 0-4 3-5 3-8s-2-4-2-7z",cap:{x:15,y:2,w:14,h:15},label:{x:8,y:66,w:28,h:42},shine:"M11 60c0 20 0 40 0 56"}},Nc=[[20,58,1.5],[26,50,1.1],[23,44,.8],[14,66,1.2],[30,63,1.7],[9,86,1.1],[34,92,1.3],[8,106,1.6],[35,112,1],[25,70,.9],[17,73,.7]];function Bc(e){const t=(e??"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");return/(spark|champ|cava|prosecco|cremant|brut|pet.?nat|espum|petillant)/.test(t)?"sparkling":/(rose|pink|rosado)/.test(t)?"rose":/(fortif|port|sherry|madeira|marsala)/.test(t)?"fortified":/(sweet|dessert|late|sauternes|ice|moelleux|dulce)/.test(t)?"sweet":/(red|rouge|tinto|rosso|krasn)/.test(t)?"red":"white"}function zc(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var Lc=zt("<circle></circle>"),Oc=zt('<path d="M16.5 10h11l1.5 26h-14z"></path><rect x="14" y="2" width="16" height="9" rx="3.5"></rect><rect x="14" y="8" width="16" height="2.4" fill="#000" opacity="0.12"></rect><path d="M16 15h12M15.6 20h12.8M15.2 25h13.6M14.8 30h14.4M22 11v21" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9" fill="none"></path><circle cx="22" cy="33" r="1.6" fill="none" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9"></circle><g fill="#fff" opacity="0.4"></g>',1),jc=zt('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),qc=zt('<svg class="wr-WineBottle svelte-1duzdpv" viewBox="0 0 44 130" aria-hidden="true" focusable="false"><defs><linearGradient x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-opacity="0.78"></stop><stop offset="0.45"></stop><stop offset="1" stop-opacity="0.88"></stop></linearGradient></defs><path></path><!><rect rx="2.5" fill="#fffdf8" opacity="0.94"></rect><rect height="2.4" rx="1.2"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><path stroke="#fff" stroke-opacity="0.22" stroke-width="2.2" stroke-linecap="round" fill="none"></path></svg>');const Fc={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function Uc(e,t){ut(t,!0),pt(e,Fc);const n=F(()=>Bc(t.type)),r=F(()=>Wc[a(n)]),i=F(()=>Mc[a(r).shoulder]),o=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=qc(),c=A(l),s=A(c),u=A(s),p=D(u),m=D(p),h=D(c),v=D(h);{var g=I=>{var E=Oc(),k=tt(E),C=D(k),Y=D(C,4);Lt(Y,21,()=>Nc,([V,ce,ue])=>`${V}-${ce}`,(V,ce)=>{var ue=F(()=>Za(a(ce),3));let Re=()=>a(ue)[0],_e=()=>a(ue)[1],at=()=>a(ue)[2];var je=Lc();M(()=>{R(je,"cx",Re()),R(je,"cy",_e()),R(je,"r",at())}),T(V,je)}),M(()=>{R(k,"fill",a(r).foil),R(C,"fill",a(r).foil)}),T(I,E)},y=I=>{var E=jc(),k=tt(E),C=D(k);M(()=>{R(k,"x",a(i).cap.x),R(k,"y",a(i).cap.y),R(k,"width",a(i).cap.w),R(k,"height",a(i).cap.h),R(k,"fill",a(r).foil),R(C,"x",a(i).cap.x),R(C,"y",a(i).cap.y+a(i).cap.h-3),R(C,"width",a(i).cap.w)}),T(I,E)};J(v,I=>{a(n)==="sparkling"?I(g):I(y,!1)})}var d=D(v),w=D(d),P=D(w),N=D(P),S=D(N);M(()=>{R(s,"id",o),R(u,"stop-color",a(r).glass),R(p,"stop-color",a(r).glass),R(m,"stop-color",a(r).glass),R(h,"d",a(i).body),R(h,"fill",`url(#${o})`),R(d,"x",a(i).label.x),R(d,"y",a(i).label.y),R(d,"width",a(i).label.w),R(d,"height",a(i).label.h),R(w,"x",a(i).label.x+a(i).label.w*.2),R(w,"y",a(i).label.y+8),R(w,"width",a(i).label.w*.6),R(w,"fill",a(r).accent),R(P,"x",a(i).label.x+a(i).label.w*.3),R(P,"y",a(i).label.y+14),R(P,"width",a(i).label.w*.4),R(P,"fill",a(r).accent),R(N,"x",a(i).label.x+a(i).label.w*.3),R(N,"y",a(i).label.y+19),R(N,"width",a(i).label.w*.4),R(N,"fill",a(r).accent),R(S,"d",a(i).shine)}),T(e,l),dt()}var Hc=z('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Vc=z('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),Gc=z('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Kc=z('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Yc=z('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),Qc=z('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),Jc=z('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Zc=z('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Xc=z('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),$c=z('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),eu=z("<div><!> <!></div>"),tu=z('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const nu={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),
161
161
  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-bottle.svelte-yk3emv {padding:4px 0;box-sizing:border-box;}.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-titleLink.svelte-yk3emv {color:inherit;text-decoration:none;}.wr-WineTile-titleLink.svelte-yk3emv:hover {text-decoration:underline;}.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;}
162
162
 
163
163
  /* :global обязателен — класс уезжает внутрь <Action>, а скоуп Svelte
@@ -181,9 +181,9 @@ ${JSON.stringify(l,null,2)}
181
181
  }
182
182
 
183
183
  @media screen and (max-width: 768px) {.wr-WineTile.svelte-yk3emv {flex:0 0 auto;scroll-snap-align:center;width:240px;text-align:center;}
184
- }`};function jc(e,t){st(t,!0),ht(e,Oc);const n=4;let r=Z(()=>ce.getAppLanguage()),i=K(!1),o=ze(t,"addedToCart",3,!1);const l=(S,B)=>S[B]||S[B.charAt(0).toUpperCase()+B.slice(1)],c=(S,B)=>B.map(J=>l(S,J)).filter(Boolean).join(" • ");function s(S){var B;return Al(S,((B=ce.getCurrency)==null?void 0:B.call(ce))||"USD",a(r))}function u(S){return t.selectedWineId===S}function p(S){return!!(S.reason||S.shortDescription||S.tags)}function m(S,B){let J=(S==null?void 0:S.tags)||B.tags;return J?(Array.isArray(J)&&(J=J.join(",")),typeof J!="string"?[]:J.split(",").map(le=>le.trim()).filter(Boolean)):[]}let f=K(!1),d=Z(()=>!!t.onAddToCart&&!!Oo(t.wine)),w=K(!1);async function y(){var S;if(!(a(w)||o())){g(w,!0);try{await((S=t.onAddToCart)==null?void 0:S.call(t,t.wine,t.index))}finally{g(w,!1)}}}ti(()=>{const S=()=>{g(f,window.innerWidth<=768)};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}});var v=zc(),x=me(v);x.__click=S=>t.onTileClick(S,t.wine);var R=T(x),z=T(R);{var b=S=>{var B=Ec();M(()=>{D(B,"src",t.wine.image),D(B,"alt",t.wine.title),D(B,"loading",t.index<n?"eager":"lazy"),D(B,"fetchpriority",t.index<n?"high":"auto")}),ft("error",B,()=>g(i,!0)),k(S,B)},E=S=>{var B=Pc(),J=T(B);Tc(J,{get type(){return t.wine.type}}),k(S,B)};F(z,S=>{yc(t.wine.image)&&!a(i)?S(b):S(E,!1)})}var P=I(z,2);{var C=S=>{var B=Ac(),J=T(B);M(le=>q(J,le),[()=>s(t.wine.total)]),k(S,B)};F(P,S=>{t.wine.total&&S(C)})}var A=I(P,2);{var O=S=>{var B=Ic(),J=T(B);M((le,Ee)=>q(J,`${le??""}${Ee??""}`),[()=>se({key:"byTheGlass",lang:a(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),k(S,B)};F(A,S=>{t.wine.byTheGlass&&S(O)})}var j=I(A,2);{var Q=S=>{var B=Dc(),J=T(B),le=T(J);M(()=>{D(J,"href",t.wine.url),q(le,t.wine.title)}),k(S,B)},H=S=>{var B=Rc(),J=T(B);M(()=>q(J,t.wine.title)),k(S,B)};F(j,S=>{a(d)&&t.wine.url?S(Q):S(H,!1)})}var ue=I(R,2);{var ie=S=>{var B=Wc(),J=T(B);M(le=>q(J,le),[()=>c(t.wine,["type","country","region","grape"])]),k(S,B)};F(ue,S=>{c(t.wine,["type","country","region","grape"])&&S(ie)})}var xe=I(ue,2),Re=T(xe),ye=T(Re);{var Wn=S=>{{let B=Z(()=>o()?"outlined":"primary");Lt(S,{handleClick:y,get variant(){return a(B)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(J,le)=>{var Ee=At();M(ee=>q(Ee,ee),[()=>se({key:o()?"addedToCart":"addToCart",lang:a(r)})]),k(J,Ee)},$$slots:{default:!0}})}},_t=S=>{var B=Je(),J=me(B);{var le=ee=>{Lt(ee,{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:(Ge,We)=>{var ke=At();M(yt=>q(ke,yt),[()=>se({key:"wineDetails.buy",lang:a(r)})]),k(Ge,ke)},$$slots:{default:!0}})},Ee=ee=>{Lt(ee,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(Ge,We)=>{var ke=At();M(yt=>q(ke,yt),[()=>se({key:"moreInfo",lang:a(r)})]),k(Ge,ke)},$$slots:{default:!0}})};F(J,ee=>{t.wine.url?ee(le):ee(Ee,!1)},!0)}k(S,B)};F(ye,S=>{a(d)?S(Wn):S(_t,!1)})}var wi=I(ye,2);{var tr=S=>{Lt(S,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(B,J)=>{var le=At();M(Ee=>q(le,Ee),[()=>se({key:"similarWines",lang:a(r)})]),k(B,le)},$$slots:{default:!0}})};F(wi,S=>{t.onSimilarClick&&S(tr)})}var nr=I(xe,2);{var _i=S=>{{let B=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.shortDescription)||t.wine.shortDescription}),J=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.reason)||t.wine.reason}),le=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.pairingRecommendation)||t.wine.pairingRecommendation}),Ee=Z(()=>m(t.translatedPopup,t.wine));oa(S,{get title(){return t.wine.title},get shortDescription(){return a(B)},get reason(){return a(J)},get pairing(){return a(le)},get tags(){return a(Ee)},get onClose(){return t.onPopupClose},isMobile:!1})}};F(nr,S=>{u(t.wine.id)&&!a(f)&&S(_i)})}var yi=I(nr,2);{var bi=S=>{var B=Lc(),J=T(B);{var le=Ge=>{var We=Mc(),ke=T(We);M(()=>{var yt,qt;return q(ke,((yt=t.translatedPopup)==null?void 0:yt.reason)||((qt=t.translatedPopup)==null?void 0:qt.shortDescription)||t.wine.reason||t.wine.shortDescription)}),k(Ge,We)};F(J,Ge=>{var We,ke;((We=t.translatedPopup)!=null&&We.reason||(ke=t.translatedPopup)!=null&&ke.shortDescription||t.wine.reason||t.wine.shortDescription)&&Ge(le)})}var Ee=I(J,2);{var ee=Ge=>{var We=Nc();Wt(We,21,()=>m(t.translatedPopup,t.wine),_n,(ke,yt)=>{var qt=Bc(),Ir=T(qt);M(()=>q(Ir,a(yt))),k(ke,qt)}),k(Ge,We)};F(Ee,Ge=>{var We,ke;((We=t.translatedPopup)!=null&&We.tags||(ke=t.translatedPopup)!=null&&ke.Tags||t.wine.tags)&&Ge(ee)})}M(()=>vt(B,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),k(S,B)};F(yi,S=>{p(t.wine)&&S(bi)})}var rr=I(x,2);{var xi=S=>{{let B=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.shortDescription)||t.wine.shortDescription}),J=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.reason)||t.wine.reason}),le=Z(()=>{var ee;return((ee=t.translatedPopup)==null?void 0:ee.pairingRecommendation)||t.wine.pairingRecommendation}),Ee=Z(()=>m(t.translatedPopup,t.wine));oa(S,{get title(){return t.wine.title},get shortDescription(){return a(B)},get reason(){return a(J)},get pairing(){return a(le)},get tags(){return a(Ee)},get onClose(){return t.onPopupClose},isMobile:!0})}};F(rr,S=>{u(t.wine.id)&&a(f)&&S(xi)})}M(()=>vt(x,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv")),ft("mouseenter",x,()=>t.onTileEnter(t.wine)),ft("mouseleave",x,()=>t.onTileLeave(t.wine)),k(e,v),lt()}br(["click"]);var qc=L('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),Fc=L('<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 Uc={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;}
184
+ }`};function ru(e,t){ut(t,!0),pt(e,nu);const n=4;let r=F(()=>ae.getAppLanguage()),i=G(!1),o=Pe(t,"addedToCart",3,!1);const l=(x,B)=>x[B]||x[B.charAt(0).toUpperCase()+B.slice(1)],c=(x,B)=>B.map(K=>l(x,K)).filter(Boolean).join(" • ");function s(x){var B;return Gl(x,((B=ae.getCurrency)==null?void 0:B.call(ae))||"USD",a(r))}function u(x){return t.selectedWineId===x}function p(x){return!!(x.reason||x.shortDescription||x.tags)}function m(x,B){let K=(x==null?void 0:x.tags)||B.tags;return K?(Array.isArray(K)&&(K=K.join(",")),typeof K!="string"?[]:K.split(",").map(te=>te.trim()).filter(Boolean)):[]}let h=G(!1),v=F(()=>!!t.onAddToCart&&!!ta(t.wine)),g=G(!1);async function y(){var x;if(!(a(g)||o())){_(g,!0);try{await((x=t.onAddToCart)==null?void 0:x.call(t,t.wine,t.index))}finally{_(g,!1)}}}oi(()=>{const x=()=>{_(h,window.innerWidth<=768)};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}});var d=tu(),w=tt(d),P=A(w),N=A(P);{var S=x=>{var B=Hc();M(()=>{R(B,"src",t.wine.image),R(B,"alt",t.wine.title),R(B,"loading",t.index<n?"eager":"lazy"),R(B,"fetchpriority",t.index<n?"high":"auto")}),ht("error",B,()=>_(i,!0)),T(x,B)},I=F(()=>zc(t.wine.image)&&!a(i)),E=x=>{var B=Vc(),K=A(B);Uc(K,{get type(){return t.wine.type}}),T(x,B)};J(N,x=>{a(I)?x(S):x(E,!1)})}var k=D(N,2);{var C=x=>{var B=Gc(),K=A(B);M(te=>L(K,te),[()=>s(t.wine.total)]),T(x,B)};J(k,x=>{t.wine.total&&x(C)})}var Y=D(k,2);{var V=x=>{var B=Kc(),K=A(B);M((te,me)=>L(K,`${te??""}${me??""}`),[()=>oe({key:"byTheGlass",lang:a(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),T(x,B)};J(Y,x=>{t.wine.byTheGlass&&x(V)})}var ce=D(Y,2);{var ue=x=>{var B=Yc(),K=A(B),te=A(K);M(()=>{R(K,"href",t.wine.url),L(te,t.wine.title)}),T(x,B)},Re=x=>{var B=Qc(),K=A(B);M(()=>L(K,t.wine.title)),T(x,B)};J(ce,x=>{a(v)&&t.wine.url?x(ue):x(Re,!1)})}var _e=D(P,2);{var at=x=>{var B=Jc(),K=A(B);M(te=>L(K,te),[()=>c(t.wine,["type","country","region","grape"])]),T(x,B)},je=F(()=>c(t.wine,["type","country","region","grape"]));J(_e,x=>{a(je)&&x(at)})}var ge=D(_e,2),hn=A(ge),de=A(hn);{var Ln=x=>{{let B=F(()=>o()?"outlined":"primary");jt(x,{handleClick:y,get variant(){return a(B)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(K,te)=>{var me=Pt();M(ie=>L(me,ie),[()=>oe({key:o()?"addedToCart":"addToCart",lang:a(r)})]),T(K,me)},$$slots:{default:!0}})}},ar=x=>{jt(x,{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:(B,K)=>{var te=Pt();M(me=>L(te,me),[()=>oe({key:"wineDetails.buy",lang:a(r)})]),T(B,te)},$$slots:{default:!0}})},Dr=x=>{jt(x,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(B,K)=>{var te=Pt();M(me=>L(te,me),[()=>oe({key:"moreInfo",lang:a(r)})]),T(B,te)},$$slots:{default:!0}})};J(de,x=>{a(v)?x(Ln):t.wine.url?x(ar,1):x(Dr,!1)})}var Si=D(de,2);{var Ci=x=>{jt(x,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(B,K)=>{var te=Pt();M(me=>L(te,me),[()=>oe({key:"similarWines",lang:a(r)})]),T(B,te)},$$slots:{default:!0}})};J(Si,x=>{t.onSimilarClick&&x(Ci)})}var Rr=D(ge,2);{var sr=x=>{{let B=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.shortDescription)||t.wine.shortDescription}),K=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.reason)||t.wine.reason}),te=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.pairingRecommendation)||t.wine.pairingRecommendation}),me=F(()=>m(t.translatedPopup,t.wine));ba(x,{get title(){return t.wine.title},get shortDescription(){return a(B)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(me)},get onClose(){return t.onPopupClose},isMobile:!1})}},Ti=F(()=>u(t.wine.id)&&!a(h));J(Rr,x=>{a(Ti)&&x(sr)})}var Ei=D(Rr,2);{var Pi=x=>{var B=eu(),K=A(B);{var te=yt=>{var qe=Zc(),st=A(qe);M(()=>{var On,Ut;return L(st,((On=t.translatedPopup)==null?void 0:On.reason)||((Ut=t.translatedPopup)==null?void 0:Ut.shortDescription)||t.wine.reason||t.wine.shortDescription)}),T(yt,qe)};J(K,yt=>{var qe,st;((qe=t.translatedPopup)!=null&&qe.reason||(st=t.translatedPopup)!=null&&st.shortDescription||t.wine.reason||t.wine.shortDescription)&&yt(te)})}var me=D(K,2);{var ie=yt=>{var qe=$c();Lt(qe,21,()=>m(t.translatedPopup,t.wine),Sn,(st,On)=>{var Ut=Xc(),Wr=A(Ut);M(()=>L(Wr,a(On))),T(st,Ut)}),T(yt,qe)};J(me,yt=>{var qe,st;((qe=t.translatedPopup)!=null&&qe.tags||(st=t.translatedPopup)!=null&&st.Tags||t.wine.tags)&&yt(ie)})}M(()=>vt(B,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),T(x,B)},Ai=F(()=>p(t.wine));J(Ei,x=>{a(Ai)&&x(Pi)})}var Ii=D(w,2);{var Di=x=>{{let B=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.shortDescription)||t.wine.shortDescription}),K=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.reason)||t.wine.reason}),te=F(()=>{var ie;return((ie=t.translatedPopup)==null?void 0:ie.pairingRecommendation)||t.wine.pairingRecommendation}),me=F(()=>m(t.translatedPopup,t.wine));ba(x,{get title(){return t.wine.title},get shortDescription(){return a(B)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(me)},get onClose(){return t.onPopupClose},isMobile:!0})}},Ri=F(()=>u(t.wine.id)&&a(h));J(Ii,x=>{a(Ri)&&x(Di)})}M(()=>vt(w,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv")),ht("mouseenter",w,()=>t.onTileEnter(t.wine)),ht("mouseleave",w,()=>t.onTileLeave(t.wine)),an("click",w,x=>t.onTileClick(x,t.wine)),T(e,d),dt()}br(["click"]);var iu=z('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),ou=z('<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 au={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;}
185
185
  @media (max-width: 640px) {.wr-Consent.svelte-dqnzo8 {flex-direction:column;align-items:stretch;}.wr-Consent-actions.svelte-dqnzo8 {justify-content:flex-end;}
186
- }`};function Hc(e,t){var f;st(t,!0),ht(e,Uc);const n=(f=window==null?void 0:window.wineaterData)==null?void 0:f.PRIVACY_URL,r=d=>se({key:d,lang:t.lang});var i=Fc(),o=T(i),l=T(o),c=I(l);{var s=d=>{var w=qc(),y=T(w);M(v=>{D(w,"href",n),q(y,v)},[()=>r("consentPrivacy")]),k(d,w)};F(c,d=>{n&&d(s)})}var u=I(o,2),p=T(u);Lt(p,{variant:"outlined",handleClick:()=>zo("denied"),children:(d,w)=>{var y=At();M(v=>q(y,v),[()=>r("consentDecline")]),k(d,y)},$$slots:{default:!0}});var m=I(p,2);Lt(m,{variant:"primary",handleClick:()=>zo("granted"),children:(d,w)=>{var y=At();M(v=>q(y,v),[()=>r("consentAccept")]),k(d,y)},$$slots:{default:!0}}),M(d=>q(l,`${d??""} `),[()=>r("consentText")]),k(e,i),lt()}const Vc=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function gi(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function Gc(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(gi("preconnect","https://fonts.googleapis.com"),gi("preconnect","https://fonts.gstatic.com",!0))}function Kc(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(Vc,(i,o)=>(gi("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const aa="_wineater_session";function sa(e,t){fetch(`${e}cart/update.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:{[aa]:t}}),keepalive:!0}).catch(()=>{})}function Yc(){return["cart-drawer","cart-icon-bubble","cart-notification-product","cart-notification-button","cart-live-region-text"].filter(t=>t==="cart-drawer"||t==="cart-icon-bubble"||document.getElementById(t))}function Qc(e){var i;const t=document.querySelector("cart-drawer");if(t&&typeof t.renderContents=="function"){t.classList.remove("is-empty"),t.renderContents(e);return}const n=document.querySelector("cart-notification");if(n&&typeof n.renderContents=="function"){n.renderContents(e);return}const r=document.getElementById("cart-icon-bubble");if(r&&((i=e==null?void 0:e.sections)!=null&&i["cart-icon-bubble"])){const o=new DOMParser().parseFromString(e.sections["cart-icon-bubble"],"text/html");r.innerHTML=(o.querySelector(".shopify-section")||o.body).innerHTML}document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}async function Jc(e){var r,i,o;const t=(r=window.Shopify)==null?void 0:r.actions;if(!t||typeof t.updateCart!="function")return!1;const n=await t.updateCart({lines:[{merchandiseId:`gid://shopify/ProductVariant/${e}`,quantity:1}]});if((i=n==null?void 0:n.userErrors)!=null&&i.length)throw new Error(((o=n.userErrors[0])==null?void 0:o.message)||"cart rejected the line");if(typeof t.openCart=="function")try{await t.openCart()}catch{}return!0}async function Zc(e,t){const n=await fetch(`${t}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(e),quantity:1}],sections:Yc(),sections_url:window.location.pathname})});return n.ok?(Qc(await n.json().catch(()=>null)),!0):!1}async function Xc(e,t){try{if(await Jc(e))return sa(t.root,t.sessionId),{ok:!0,via:"actions"}}catch(n){console.debug("[wineater] cart actions failed, trying ajax:",n==null?void 0:n.message)}try{if(await Zc(e,t.root))return sa(t.root,t.sessionId),{ok:!0,via:"ajax"}}catch(n){console.debug("[wineater] cart ajax failed, using the cart link:",n==null?void 0:n.message)}return window.location.href=`${t.root}cart/${e}:1?storefront=true&attributes[${aa}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}var $c=L('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),eu=L('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),tu=L('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),nu=L('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),ru=L('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),iu=L('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),ou=L('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const au={hash:"svelte-1n46o8q",code:`
186
+ }`};function su(e,t){var h;ut(t,!0),pt(e,au);const n=(h=window==null?void 0:window.wineaterData)==null?void 0:h.PRIVACY_URL,r=v=>oe({key:v,lang:t.lang});var i=ou(),o=A(i),l=A(o),c=D(l);{var s=v=>{var g=iu(),y=A(g);M(d=>{R(g,"href",n),L(y,d)},[()=>r("consentPrivacy")]),T(v,g)};J(c,v=>{n&&v(s)})}var u=D(o,2),p=A(u);jt(p,{variant:"outlined",handleClick:()=>ea("denied"),children:(v,g)=>{var y=Pt();M(d=>L(y,d),[()=>r("consentDecline")]),T(v,y)},$$slots:{default:!0}});var m=D(p,2);jt(m,{variant:"primary",handleClick:()=>ea("granted"),children:(v,g)=>{var y=Pt();M(d=>L(y,d),[()=>r("consentAccept")]),T(v,y)},$$slots:{default:!0}}),M(v=>L(l,`${v??""} `),[()=>r("consentText")]),T(e,i),dt()}const lu=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function bi(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function cu(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(bi("preconnect","https://fonts.googleapis.com"),bi("preconnect","https://fonts.gstatic.com",!0))}function uu(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(lu,(i,o)=>(bi("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const xa="_wineater_session";function du(e,t){fetch(`${e}cart/update.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:{[xa]:t}}),keepalive:!0}).catch(()=>{})}function fu(){return["cart-drawer","cart-icon-bubble","cart-notification-product","cart-notification-button","cart-live-region-text"].filter(t=>t==="cart-drawer"||t==="cart-icon-bubble"||document.getElementById(t))}function hu(e){var i;const t=document.querySelector("cart-drawer");if(t&&typeof t.renderContents=="function"){t.classList.remove("is-empty"),t.renderContents(e);return}const n=document.querySelector("cart-notification");if(n&&typeof n.renderContents=="function"){n.renderContents(e);return}const r=document.getElementById("cart-icon-bubble");if(r&&((i=e==null?void 0:e.sections)!=null&&i["cart-icon-bubble"])){const o=new DOMParser().parseFromString(e.sections["cart-icon-bubble"],"text/html");r.innerHTML=(o.querySelector(".shopify-section")||o.body).innerHTML}document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}async function pu(e){var r,i,o;const t=(r=window.Shopify)==null?void 0:r.actions;if(!t||typeof t.updateCart!="function")return!1;const n=await t.updateCart({lines:[{merchandiseId:`gid://shopify/ProductVariant/${e}`,quantity:1}]});if((i=n==null?void 0:n.userErrors)!=null&&i.length)throw new Error(((o=n.userErrors[0])==null?void 0:o.message)||"cart rejected the line");if(typeof t.openCart=="function")try{await t.openCart()}catch{}return!0}async function vu(e,t){const n=await fetch(`${t}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(e),quantity:1}],sections:fu(),sections_url:window.location.pathname})});return n.ok?(hu(await n.json().catch(()=>null)),!0):!1}function gu(){const e=document.querySelector("cart-drawer, cart-notification");return!!e&&typeof e.renderContents=="function"}async function mu(e,t){const n=[["actions",()=>pu(e)],["ajax",()=>vu(e,t.root)]];gu()&&n.reverse();for(const[r,i]of n)try{if(await i())return du(t.root,t.sessionId),{ok:!0,via:r}}catch(o){console.debug(`[wineater] cart ${r} failed:`,o==null?void 0:o.message)}return window.location.href=`${t.root}cart/${e}:1?storefront=true&attributes[${xa}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}var wu=z('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),_u=z('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),yu=z('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),bu=z('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),xu=z('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),ku=z('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),Su=z('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const Cu={hash:"svelte-1n46o8q",code:`
187
187
  /* ===================== 1) CSS Variables ===================== */:root {--wineater-corp-color: #0044ff;
188
188
  /* --wr-brand-color is set dynamically from uiConfig.brandColor */--wr-brand-color: #7b2beb; /* fallback value */}
189
189
 
@@ -198,4 +198,4 @@ ${JSON.stringify(l,null,2)}
198
198
 
199
199
  /* ===================== 13) Mobile Styles ===================== */
200
200
  @media screen and (max-width: 768px) {.wr-App.svelte-1n46o8q {flex-direction:column;padding:0px 16px;min-width:100vw;}.wr-App.wr-App--embedded.svelte-1n46o8q {min-width:0;padding:0 12px 12px;}.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);}
201
- }`};function su(e,t){var ha,va,pa,ga,Dr,ma,wa;st(t,!0),ht(e,au);const n=rt();function r(){var _;li("chatbotToken",((_=window.wineaterData)==null?void 0:_.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),Gc());const o=6*60*60*1e3,l=60*60*1e3,c=`${fi}:instant-profile`,s=_=>`${fi}:instant${_?`:${_}`:""}`,u=((ha=window==null?void 0:window.wineaterData)==null?void 0:ha.WIDGET_TYPE)||"store",p=((va=window==null?void 0:window.wineaterData)==null?void 0:va.COUNTRY_CODE)||null;(pa=window==null?void 0:window.wineaterData)!=null&&pa.WIDGET_WRAPPER;let m=K(!1),f=K(!1),d=!1,w=K(!1),y=K(!1),v=K(Ue([])),x=K(null),R=K(""),z=K(null),b=K(!1),E=K(null),P=K(Ue([])),C=K(""),A=K(!1),O=K(Ue([])),j=null,Q=K(Ue([])),H=K(!1);function ue(_,W){_!=null&&_.length&&$t({type:"shown",query_id:j??void 0,sku_ids:_.map(V=>V.id),text:W||void 0})}let ie=Z(()=>ce.getAppLanguage()),xe=Z(()=>ce.getStoreLanguage()),Re=Z(()=>ce.getApiKey()),ye=Z(()=>ce.getStoreId()),Wn=Z(()=>ce.isInitialized()),_t=Z(()=>ce.getUiConfig()),wi=Z(()=>ce.isSearchAvailable());function tr(){g(z,se({key:"errorMessage",lang:a(ie)}),!0)}const nr=()=>g(z,null);async function _i(_){if(a(ie)===a(xe)||u!=="bar")return _.map(()=>({}));const W=["shortDescription","reason","pairingRecommendation","tags"],V=_[0];if(!V)return _.map(()=>({}));const oe=W.filter(Ae=>Ae in V),ge=4,Pe=[];for(let Ae=0;Ae<_.length;Ae+=ge){const cn=_.slice(Ae,Ae+ge).map(async ir=>{const fe=oe.map(Me=>{const Mn=ir[Me]||ir[Me.toLowerCase()];return Mn?{key:Me,text:Array.isArray(Mn)?Mn.join(", "):Mn}:null}).filter(Boolean);return fe.length===0?{}:await Il({sourceLang:a(xe),targetLang:a(ie),texts:Object.fromEntries(fe.map(Me=>[Me.key,Me.text])),apiKey:a(Re)})}),Ft=await Promise.all(cn);Pe.push(...Ft)}return Pe}async function yi(_){const W=hi(c,2592e6),V=hi(s(W),W?l:o),oe=!!(V!=null&&V.length);oe?g(v,V,!0):g(w,!0);try{const{wines:ge,profileHash:Pe}=await It.getInstantRecommendations();ge.length>0&&(vi(s(Pe),ge),vi(c,Pe)),!oe&&!d&&g(v,ge,!0)}catch(ge){console.error("[wineater] instant recommendations error:",ge),!oe&&!d&&(await _,tr())}finally{d||g(w,!1)}}async function bi(){g(H,!0),ce.setSearchAvailable(!1);try{const{wines:_}=await It.getInstantRecommendations();g(v,_,!0),g(P,[],!0),g(A,!1)}catch(_){console.error("[wineater] instant recommendations error:",_),g(v,[],!0)}}function rr(_=220){return!a(v)||a(v).length===0?Promise.resolve():(g(b,!0),new Promise(W=>{setTimeout(()=>{W()},_)}))}async function xi(_){_.preventDefault(),d=!0;let W="",V;try{g(w,!0),nr(),W=a(R).trim()+";",g(C,W,!0),j=Ko(),V=j;try{Oe(je.SEARCH_PERFORMED,a(ye),{query:W})}catch(fe){console.error("Error tracking search event:",fe)}let oe=!1,ge=!1,Pe=null;const Ae=fe=>{if(!fe||fe.length===0){g(v,[],!0),g(P,[],!0),g(z,se({key:"noResultsMessage",lang:a(ie)}),!0),Oe(je.NO_RESULTS_FOUND,a(ye),{query:W});return}g(v,fe,!0),g(w,!1),!ge&&(ge=!0,g(A,di==="2"&&!n&&fe.length>=4,!0),ue(fe,W),Oe(je.SEARCH_RESULTS_DISPLAYED,a(ye),{results_count:fe.length,results:fe,query:W}))},ln=fe=>{V===j&&(oe?Ae(fe):Pe=fe)},cn=It.searchStream(W,j,ln);cn.catch(()=>{}),await rr(220),g(v,[],!0),g(b,!1),g(A,!1),g(O,[],!0),oe=!0,Pe&&Ae(Pe);const Ft=await cn;if(V!==j)return;if(ge&&Ft.length===a(v).length&&Ft.every((fe,ot)=>{var Me;return fe.id===((Me=a(v)[ot])==null?void 0:Me.id)})){const fe=new Map(Ft.map(ot=>[ot.id,ot]));g(v,a(v).map(ot=>{var Me;return{...ot,reason:((Me=fe.get(ot.id))==null?void 0:Me.reason)??ot.reason}}),!0)}else Ae(Ft)}catch(oe){if(V!==j)return;if(oe instanceof jo){await bi();return}g(v,[],!0),console.error("[wineater] search error:",oe),Oe(je.ERROR_OCCURRED,a(ye),{error_message:oe==null?void 0:oe.message,query:W}),tr()}finally{V===j&&g(w,!1)}}async function S(){if(a(y)||!a(A))return;d=!0;const _=a(v);try{g(y,!0),g(w,!0),g(O,[...new Set([...a(O),...a(v).map(ge=>ge.id)])],!0);const W=It.getMoreWineRecommendations(a(C),a(O));W.catch(()=>{}),await rr(220),g(v,[],!0),g(b,!1);const{recommendations:V,hasMore:oe}=await W;$t({type:"more",query_id:j??void 0,text:a(C)||void 0}),ue(V,a(C)),Oe(je.SHOW_MORE_CLICKED,a(ye),{query:a(C),results_count:V.length}),g(v,V.length>0?V:_,!0),g(A,oe,!0)}catch(W){console.error("[wineater] try again error:",W),g(v,_,!0),g(A,!1)}finally{g(y,!1),g(w,!1)}}async function B(_){d=!0;try{g(w,!0),nr(),Oe(je.SIMILAR_WINES_CLICKED,a(ye),{wine_id:_.id,wine_title:_.title}),$t({type:"similar",query_id:j??void 0,sku_ids:[_.id]}),j=Ko();const W=It.getSimilarWines(_.id);W.catch(()=>{}),await rr(220),g(v,[],!0),g(b,!1),g(A,!1),g(x,null);const V=await W;g(R,_.title,!0),g(C,""),!V||V.length===0?(g(v,[],!0),g(P,[],!0),g(z,se({key:"noResultsMessage",lang:a(ie)}),!0)):(g(v,V,!0),ue(V,""))}catch(W){g(v,[],!0),console.error("[wineater] similar wines error:",W),tr()}finally{g(w,!1)}}qn(async()=>{if(!a(v)||a(v).length===0){g(P,[],!0);return}try{const _=await _i(a(v));a(v)&&a(v).length>0&&g(P,_,!0)}catch(_){console.error("translatePopupContent failed",_)}});function J(_,W){a(x)&&a(x)!==_.id&&g(x,null),g(x,_.id,!0),$t({type:"click",query_id:j??void 0,sku_ids:[_.id],position:W}),Oe(je.WINE_DETAILS_VIEWED,a(ye),{wine_id:_.id,wine_title:_.title,is_mobile:window.innerWidth<=768})}function le(_,W){$t({type:"buy_click",query_id:j??void 0,sku_ids:[_.id],position:W}),Oe(je.BUY_BUTTON_CLICKED,a(ye),{wine_id:_.id,wine_title:_.title,wine_url:_.url,is_mobile:window.innerWidth<=768})}async function Ee(_,W){const V=Oo(_);if(!n||!V)return;$t({type:"add_to_cart",query_id:j??void 0,sku_ids:[_.id],position:W}),Oe(je.BUY_BUTTON_CLICKED,a(ye),{action:"add_to_cart",wine_id:_.id,wine_title:_.title,wine_url:_.url,variant_id:V,query:a(C)||void 0,is_mobile:window.innerWidth<=768});const oe=await Xc(V,{root:n.root,sessionId:qo()});oe.ok&&(g(Q,[...a(Q),_.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:V,via:oe.via}})))}function ee(){const _=a(v).find(W=>W.id===a(x));Oe(je.WINE_DETAILS_CLOSED,a(ye),{wine_id:a(x),wine_title:_.title}),g(x,null)}function Ge(_){return!!(_.reason||_.shortDescription||_.tags)}function We(_){u==="store"&&Ge(_)&&(g(E,_.id,!0),Oe(je.WINE_CARD_HOVER,a(ye),{wine_id:_.id,wine_title:_.title}))}function ke(_){u==="store"&&a(E)===_.id&&g(E,null)}function yt(_,W){_.target.closest(".js-WineTileAction")||_.target.closest(".js-WinePopupClose")||($t({type:"click",query_id:j??void 0,sku_ids:[W.id],position:a(v).findIndex(V=>V.id===W.id)}),Oe(je.WINE_CARD_CLICK,a(ye),{wine_id:W.id,wine_title:W.title}))}function qt(_){var oe;const W=((oe=_.composedPath)==null?void 0:oe.call(_)[0])??_.target;if(!(W!=null&&W.closest))return;W.closest(".js-WinePopup")||W.closest(".js-WineTileAction")||g(x,null)}const Ir=((wa=(ma=(Dr=(ga=window==null?void 0:window.wineaterData)==null?void 0:ga.mountTarget)==null?void 0:Dr.getRootNode)==null?void 0:ma.call(Dr))==null?void 0:wa.host)||document.documentElement;qn(()=>{var _,W;(_=a(_t))!=null&&_.brandColor&&Ir.style.setProperty("--wr-brand-color",a(_t).brandColor),(W=a(_t))!=null&&W.wineaterColor&&Ir.style.setProperty("--wr-wineater-color",a(_t).wineaterColor)}),ti(()=>(document.addEventListener("click",qt),(async()=>{const _=ce.initializeStore();if(yi(_),await _,!a(Wn)){g(f,!0);return}a(_t).customCss&&Kc(a(_t).customCss),g(m,!0),n&&!a(wi)&&g(H,!0),Oe(je.WIDGET_INITIALIZED,a(ye))})(),()=>{document.removeEventListener("click",qt)}));var fa=Je(),cu=me(fa);{var uu=_=>{var W=iu();let V;var oe=T(W);{var ge=ae=>{var at=$c(),un=T(at);M(()=>D(un,"src",a(_t).logoUrl)),k(ae,at)};F(oe,ae=>{a(_t).logoUrl&&ae(ge)})}var Pe=I(oe,2);Fl(Pe,{});var Ae=I(Pe,2);$l(Ae,{onSubmit:xi,get initialized(){return a(m)},get searchQuery(){return a(R)},set searchQuery(ae){g(R,ae,!0)}});var ln=I(Ae,2),cn=T(ln);{var Ft=ae=>{var at=eu(),un=T(at);M(or=>q(un,or),[()=>se({key:"sommelierResting",lang:a(ie)})]),k(ae,at)};F(cn,ae=>{a(H)&&!a(z)&&ae(Ft)})}var ir=I(cn,2);{var fe=ae=>{var at=tu(),un=T(at),or=T(un);M(()=>q(or,a(z))),k(ae,at)},ot=ae=>{var at=Je(),un=me(at);{var or=Bn=>{var ar=ru(),Rr=me(ar);Wt(Rr,21,()=>a(v),_n,(lr,cr,Wr)=>{{let Si=Z(()=>n?Ee:void 0),_a=Z(()=>a(Q).includes(a(cr).id)),Mr=Z(()=>n?void 0:B);jc(lr,{get wine(){return a(cr)},index:Wr,get hoveredWineId(){return a(E)},get selectedWineId(){return a(x)},get isAnimating(){return a(b)},get translatedPopup(){return a(P)[Wr]},onBuyClick:J,onBuyLinkClick:le,get onAddToCart(){return a(Si)},get addedToCart(){return a(_a)},onPopupClose:ee,get onSimilarClick(){return a(Mr)},onTileEnter:We,onTileLeave:ke,onTileClick:yt})}});var ki=I(Rr,2);{var sr=lr=>{var cr=nu(),Wr=T(cr);Lt(Wr,{handleClick:S,variant:"outlined",children:(Si,_a)=>{var Mr=At();M(pu=>q(Mr,pu),[()=>se({key:"tryAgain",lang:a(ie)})]),k(Si,Mr)},$$slots:{default:!0}}),k(lr,cr)};F(ki,lr=>{a(A)&&lr(sr)})}k(Bn,ar)},vu=Bn=>{var ar=Je(),Rr=me(ar);{var ki=sr=>{ia(sr)};F(Rr,sr=>{a(w)&&sr(ki)},!0)}k(Bn,ar)};F(un,Bn=>{a(v)&&a(v).length>0?Bn(or):Bn(vu,!1)},!0)}k(ae,at)};F(ir,ae=>{a(z)?ae(fe):ae(ot,!1)})}var Me=I(ln,2);{var Mn=ae=>{Hc(ae,{get lang(){return a(ie)}})};F(Me,ae=>{ol()&&ae(Mn)})}var fu=I(Me,2);{var hu=ae=>{Kl(ae,{get countryCode(){return p}})};F(fu,ae=>{n||ae(hu)})}M(()=>V=vt(W,1,"wr-App svelte-1n46o8q",null,V,{"wr-App--embedded":!!n})),k(_,W)},du=_=>{var W=Je(),V=me(W);{var oe=ge=>{var Pe=ou();let Ae;var ln=I(T(Pe),2);ia(ln),M(()=>Ae=vt(Pe,1,"wr-App wr-App--loading svelte-1n46o8q",null,Ae,{"wr-App--embedded":!!n})),k(ge,Pe)};F(V,ge=>{a(f)||ge(oe)},!0)}k(_,W)};F(cu,_=>{a(Wn)?_(uu):_(du,!1)})}k(e,fa),lt()}const lu=((da=window.wineaterData)==null?void 0:da.mountTarget)||document.getElementById("wineater-widget-conteiner");return js(su,{target:lu})});
201
+ }`};function Tu(e,t){var Ut,Wr,Pa,Aa,Mr,Ia,Da;ut(t,!0),pt(e,Cu);const n=rt();function r(){var b;hi("chatbotToken",((b=window.wineaterData)==null?void 0:b.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),cu());const o=6*60*60*1e3,l=60*60*1e3,c=`${mi}:instant-profile`,s=b=>`${mi}:instant${b?`:${b}`:""}`,u=((Ut=window==null?void 0:window.wineaterData)==null?void 0:Ut.WIDGET_TYPE)||"store",p=((Wr=window==null?void 0:window.wineaterData)==null?void 0:Wr.COUNTRY_CODE)||null;(Pa=window==null?void 0:window.wineaterData)!=null&&Pa.WIDGET_WRAPPER;let m=G(!1),h=G(!1),v=!1,g=G(!1),y=G(!1),d=G(Ne([])),w=G(null),P=G(""),N=G(null),S=G(!1),I=G(null),E=G(Ne([])),k=G(""),C=G(!1),Y=G(Ne([])),V=null,ce=G(Ne([])),ue=G(!1);function Re(b,W){b!=null&&b.length&&sn({type:"shown",query_id:V??void 0,sku_ids:b.map(U=>U.id),text:W||void 0})}let _e=F(()=>ae.getAppLanguage()),at=F(()=>ae.getStoreLanguage()),je=F(()=>ae.getApiKey()),ge=F(()=>ae.getStoreId()),hn=F(()=>ae.isInitialized()),de=F(()=>ae.getUiConfig()),Ln=F(()=>ae.isSearchAvailable());function ar(){_(N,oe({key:"errorMessage",lang:a(_e)}),!0)}const Dr=()=>_(N,null);async function Si(b){if(a(_e)===a(at)||u!=="bar")return b.map(()=>({}));const W=["shortDescription","reason","pairingRecommendation","tags"],U=b[0];if(!U)return b.map(()=>({}));const ne=W.filter(Fe=>Fe in U),Se=4,Qe=[];for(let Fe=0;Fe<b.length;Fe+=Se){const pn=b.slice(Fe,Fe+Se).map(async cr=>{const fe=ne.map(We=>{const vn=cr[We]||cr[We.toLowerCase()];return vn?{key:We,text:Array.isArray(vn)?vn.join(", "):vn}:null}).filter(Boolean);return fe.length===0?{}:await Kl({sourceLang:a(at),targetLang:a(_e),texts:Object.fromEntries(fe.map(We=>[We.key,We.text])),apiKey:a(je)})}),Ht=await Promise.all(pn);Qe.push(...Ht)}return Qe}async function Ci(b){const W=wi(c,2592e6),U=wi(s(W),W?l:o),ne=!!(U!=null&&U.length);ne?_(d,U,!0):_(g,!0);try{const{wines:Se,profileHash:Qe}=await At.getInstantRecommendations();Se.length>0&&(_i(s(Qe),Se),_i(c,Qe)),!ne&&!v&&_(d,Se,!0)}catch(Se){console.error("[wineater] instant recommendations error:",Se),!ne&&!v&&(await b,ar())}finally{v||_(g,!1)}}async function Rr(){_(ue,!0),ae.setSearchAvailable(!1);try{const{wines:b}=await At.getInstantRecommendations();_(d,b,!0),_(E,[],!0),_(C,!1)}catch(b){console.error("[wineater] instant recommendations error:",b),_(d,[],!0)}}function sr(b=220){return!a(d)||a(d).length===0?Promise.resolve():(_(S,!0),new Promise(W=>{setTimeout(()=>{W()},b)}))}async function Ti(b){b.preventDefault(),v=!0;let W="",U;try{_(g,!0),Dr(),W=a(P).trim()+";",_(k,W,!0),V=ca(),U=V;try{Ae(Ie.SEARCH_PERFORMED,a(ge),{query:W})}catch(fe){console.error("Error tracking search event:",fe)}let ne=!1,Se=!1,Qe=null;const Fe=fe=>{if(!fe||fe.length===0){_(d,[],!0),_(E,[],!0),_(N,oe({key:"noResultsMessage",lang:a(_e)}),!0),Ae(Ie.NO_RESULTS_FOUND,a(ge),{query:W});return}_(d,fe,!0),_(g,!1),!Se&&(Se=!0,_(C,gi==="2"&&!n&&fe.length>=4,!0),Re(fe,W),Ae(Ie.SEARCH_RESULTS_DISPLAYED,a(ge),{results_count:fe.length,results:fe,query:W}))},lr=fe=>{U===V&&(ne?Fe(fe):Qe=fe)},pn=At.searchStream(W,V,lr);pn.catch(()=>{}),await sr(220),_(d,[],!0),_(S,!1),_(C,!1),_(Y,[],!0),ne=!0,Qe&&Fe(Qe);const Ht=await pn;if(U!==V)return;if(Se&&Ht.length===a(d).length&&Ht.every((fe,lt)=>{var We;return fe.id===((We=a(d)[lt])==null?void 0:We.id)})){const fe=new Map(Ht.map(lt=>[lt.id,lt]));_(d,a(d).map(lt=>{var We;return{...lt,reason:((We=fe.get(lt.id))==null?void 0:We.reason)??lt.reason}}),!0)}else Fe(Ht)}catch(ne){if(U!==V)return;if(ne instanceof na){await Rr();return}_(d,[],!0),console.error("[wineater] search error:",ne),Ae(Ie.ERROR_OCCURRED,a(ge),{error_message:ne==null?void 0:ne.message,query:W}),ar()}finally{U===V&&_(g,!1)}}async function Ei(){if(a(y)||!a(C))return;v=!0;const b=a(d);try{_(y,!0),_(g,!0),_(Y,[...new Set([...a(Y),...a(d).map(Se=>Se.id)])],!0);const W=At.getMoreWineRecommendations(a(k),a(Y));W.catch(()=>{}),await sr(220),_(d,[],!0),_(S,!1);const{recommendations:U,hasMore:ne}=await W;sn({type:"more",query_id:V??void 0,text:a(k)||void 0}),Re(U,a(k)),Ae(Ie.SHOW_MORE_CLICKED,a(ge),{query:a(k),results_count:U.length}),_(d,U.length>0?U:b,!0),_(C,ne,!0)}catch(W){console.error("[wineater] try again error:",W),_(d,b,!0),_(C,!1)}finally{_(y,!1),_(g,!1)}}async function Pi(b){v=!0;try{_(g,!0),Dr(),Ae(Ie.SIMILAR_WINES_CLICKED,a(ge),{wine_id:b.id,wine_title:b.title}),sn({type:"similar",query_id:V??void 0,sku_ids:[b.id]}),V=ca();const W=At.getSimilarWines(b.id);W.catch(()=>{}),await sr(220),_(d,[],!0),_(S,!1),_(C,!1),_(w,null);const U=await W;_(P,b.title,!0),_(k,""),!U||U.length===0?(_(d,[],!0),_(E,[],!0),_(N,oe({key:"noResultsMessage",lang:a(_e)}),!0)):(_(d,U,!0),Re(U,""))}catch(W){_(d,[],!0),console.error("[wineater] similar wines error:",W),ar()}finally{_(g,!1)}}Gn(async()=>{if(!a(d)||a(d).length===0){_(E,[],!0);return}try{const b=await Si(a(d));a(d)&&a(d).length>0&&_(E,b,!0)}catch(b){console.error("translatePopupContent failed",b)}});function Ai(b,W){a(w)&&a(w)!==b.id&&_(w,null),_(w,b.id,!0),sn({type:"click",query_id:V??void 0,sku_ids:[b.id],position:W}),Ae(Ie.WINE_DETAILS_VIEWED,a(ge),{wine_id:b.id,wine_title:b.title,is_mobile:window.innerWidth<=768})}function Ii(b,W){sn({type:"buy_click",query_id:V??void 0,sku_ids:[b.id],position:W}),Ae(Ie.BUY_BUTTON_CLICKED,a(ge),{wine_id:b.id,wine_title:b.title,wine_url:b.url,is_mobile:window.innerWidth<=768})}async function Di(b,W){const U=ta(b);if(!n||!U)return;sn({type:"add_to_cart",query_id:V??void 0,sku_ids:[b.id],position:W}),Ae(Ie.BUY_BUTTON_CLICKED,a(ge),{action:"add_to_cart",wine_id:b.id,wine_title:b.title,wine_url:b.url,variant_id:U,query:a(k)||void 0,is_mobile:window.innerWidth<=768});const ne=await mu(U,{root:n.root,sessionId:ra()});ne.ok&&(_(ce,[...a(ce),b.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:U,via:ne.via}})))}function Ri(){const b=a(d).find(W=>W.id===a(w));Ae(Ie.WINE_DETAILS_CLOSED,a(ge),{wine_id:a(w),wine_title:b.title}),_(w,null)}function x(b){return!!(b.reason||b.shortDescription||b.tags)}function B(b){u==="store"&&x(b)&&(_(I,b.id,!0),Ae(Ie.WINE_CARD_HOVER,a(ge),{wine_id:b.id,wine_title:b.title}))}function K(b){u==="store"&&a(I)===b.id&&_(I,null)}function te(b,W){b.target.closest(".js-WineTileAction")||b.target.closest(".js-WinePopupClose")||(sn({type:"click",query_id:V??void 0,sku_ids:[W.id],position:a(d).findIndex(U=>U.id===W.id)}),Ae(Ie.WINE_CARD_CLICK,a(ge),{wine_id:W.id,wine_title:W.title}))}function me(b){var ne;const W=((ne=b.composedPath)==null?void 0:ne.call(b)[0])??b.target;if(!(W!=null&&W.closest))return;W.closest(".js-WinePopup")||W.closest(".js-WineTileAction")||_(w,null)}const ie=((Da=(Ia=(Mr=(Aa=window==null?void 0:window.wineaterData)==null?void 0:Aa.mountTarget)==null?void 0:Mr.getRootNode)==null?void 0:Ia.call(Mr))==null?void 0:Da.host)||document.documentElement;Gn(()=>{var b,W;(b=a(de))!=null&&b.brandColor&&ie.style.setProperty("--wr-brand-color",a(de).brandColor),(W=a(de))!=null&&W.wineaterColor&&ie.style.setProperty("--wr-wineater-color",a(de).wineaterColor)}),oi(()=>(document.addEventListener("click",me),(async()=>{const b=ae.initializeStore();if(Ci(b),await b,!a(hn)){_(h,!0);return}a(de).customCss&&uu(a(de).customCss),_(m,!0),n&&!a(Ln)&&_(ue,!0),Ae(Ie.WIDGET_INITIALIZED,a(ge))})(),()=>{document.removeEventListener("click",me)}));var yt=xr(),qe=tt(yt);{var st=b=>{var W=ku();let U;var ne=A(W);{var Se=re=>{var ct=wu(),Vt=A(ct);M(()=>R(Vt,"src",a(de).logoUrl)),T(re,ct)};J(ne,re=>{a(de).logoUrl&&re(Se)})}var Qe=D(ne,2);oc(Qe,{});var Fe=D(Qe,2);gc(Fe,{onSubmit:Ti,get initialized(){return a(m)},get searchQuery(){return a(P)},set searchQuery(re){_(P,re,!0)}});var lr=D(Fe,2),pn=A(lr);{var Ht=re=>{var ct=_u(),Vt=A(ct);M(ur=>L(Vt,ur),[()=>oe({key:"sommelierResting",lang:a(_e)})]),T(re,ct)};J(pn,re=>{a(ue)&&!a(N)&&re(Ht)})}var cr=D(pn,2);{var fe=re=>{var ct=yu(),Vt=A(ct),ur=A(Vt);M(()=>L(ur,a(N))),T(re,ct)},lt=re=>{var ct=xu(),Vt=tt(ct);Lt(Vt,21,()=>a(d),Sn,(dr,fr,Nr)=>{{let Wi=F(()=>n?Di:void 0),Ra=F(()=>a(ce).includes(a(fr).id)),Br=F(()=>n?void 0:Pi);ru(dr,{get wine(){return a(fr)},index:Nr,get hoveredWineId(){return a(I)},get selectedWineId(){return a(w)},get isAnimating(){return a(S)},get translatedPopup(){return a(E)[Nr]},onBuyClick:Ai,onBuyLinkClick:Ii,get onAddToCart(){return a(Wi)},get addedToCart(){return a(Ra)},onPopupClose:Ri,get onSimilarClick(){return a(Br)},onTileEnter:B,onTileLeave:K,onTileClick:te})}});var ur=D(Vt,2);{var Ru=dr=>{var fr=bu(),Nr=A(fr);jt(Nr,{handleClick:Ei,variant:"outlined",children:(Wi,Ra)=>{var Br=Pt();M(Wu=>L(Br,Wu),[()=>oe({key:"tryAgain",lang:a(_e)})]),T(Wi,Br)},$$slots:{default:!0}}),T(dr,fr)};J(ur,dr=>{a(C)&&dr(Ru)})}T(re,ct)},We=re=>{ya(re)};J(cr,re=>{a(N)?re(fe):a(d)&&a(d).length>0?re(lt,1):a(g)&&re(We,2)})}var vn=D(lr,2);{var Pu=re=>{su(re,{get lang(){return a(_e)}})},Au=F(()=>xl());J(vn,re=>{a(Au)&&re(Pu)})}var Iu=D(vn,2);{var Du=re=>{uc(re,{get countryCode(){return p}})};J(Iu,re=>{n||re(Du)})}M(()=>U=vt(W,1,"wr-App svelte-1n46o8q",null,U,{"wr-App--embedded":!!n})),T(b,W)},On=b=>{var W=Su();let U;var ne=D(A(W),2);ya(ne),M(()=>U=vt(W,1,"wr-App wr-App--loading svelte-1n46o8q",null,U,{"wr-App--embedded":!!n})),T(b,W)};J(qe,b=>{a(hn)?b(st):a(h)||b(On,1)})}T(e,yt),dt()}const Eu=((Ea=window.wineaterData)==null?void 0:Ea.mountTarget)||document.getElementById("wineater-widget-conteiner");return el(Tu,{target:Eu})});