wineater-bot 3.1.8 → 3.1.10

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.
@@ -6891,6 +6891,10 @@ body {
6891
6891
  box-sizing: border-box;
6892
6892
  }
6893
6893
 
6894
+ #wine-widget-container [class^=icon-], [class*=" icon-"] {
6895
+ font-family: 'Bricolage Grotesque', sans-serif !important;
6896
+ }
6897
+
6894
6898
  #wine-widget-container .wine-widget-wrapper {
6895
6899
  width: 100%;
6896
6900
  }
@@ -7408,6 +7412,9 @@ margin-top: auto; /* прижимает .bottom-row к низу
7408
7412
  padding: 16px;
7409
7413
  min-width: 100vw;
7410
7414
  }
7415
+ #wine-widget-header h1 {
7416
+ display: none;
7417
+ }
7411
7418
  #wine-placeholder {
7412
7419
  display: flex;
7413
7420
  gap: 8px;
@@ -8001,20 +8008,14 @@ const $ = new Ma(), fn = {
8001
8008
  class Pa {
8002
8009
  constructor() {
8003
8010
  var e, n, i, s;
8004
- this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.widgetWrapper = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.WIDGET_WRAPPER) || "wineater-widget-conteiner", this.titleText = (i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.TITLE_TEXT, this.subtitleText = (s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.SUBTITLE_TEXT, this.api = new At(), this.selectedFilters = {
8011
+ this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.widgetWrapper = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.WIDGET_WRAPPER) || "wineater-widget-conteiner", this.titleText = (i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.TITLE_TEXT, this.subtitleText = (s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.SUBTITLE_TEXT, this.api = new At(), console.log(this.titleText), this.selectedFilters = {
8005
8012
  price: null,
8006
8013
  color: null,
8007
8014
  intensity: null
8008
8015
  }, this.widgetType === "bar" ? (this.barName = fn.barName, this.barDishes = fn.dishes) : (this.barName = "", this.barDishes = []), this.initializeWidget(), this.initializeSearchAnimation(), this.widgetType === "store" && this.loadInstantRecommendations();
8009
8016
  }
8010
- initializeWidget() {
8011
- const e = document.getElementById(this.widgetWrapper);
8012
- if (this.widgetType === "store") {
8013
- const n = `
8014
- <div id="wine-widget-container">
8015
- <div class="wine-widget-wrapper">
8016
- <div id="wine-widget-header">
8017
- <h1 class="wine-widget-big-title">
8017
+ getTitle(e) {
8018
+ return e ? `<h1 class="wine-widget-big-title">${e}</h1>` : `<h1 class="wine-widget-big-title">
8018
8019
  ${$.translate("headerLine1")}
8019
8020
  <span class="icon icon-meal"></span>
8020
8021
  <span class="icon-label">${$.translate("headerMeal")}</span>,
@@ -8027,7 +8028,16 @@ class Pa {
8027
8028
  <span class="icon icon-occasion"></span>
8028
8029
  <span class="icon-label">${$.translate("headerOccasion")}</span>
8029
8030
  ${$.translate("headerLine2")}
8030
- </h1>
8031
+ </h1>`;
8032
+ }
8033
+ initializeWidget() {
8034
+ const e = document.getElementById(this.widgetWrapper);
8035
+ if (this.widgetType === "store") {
8036
+ const n = `
8037
+ <div id="wine-widget-container">
8038
+ <div class="wine-widget-wrapper">
8039
+ <div id="wine-widget-header">
8040
+ ${this.getTitle(this.titleText)}
8031
8041
  </div>
8032
8042
 
8033
8043
  <div id="wine-widget-search">
@@ -703,6 +703,10 @@ body {
703
703
  box-sizing: border-box;
704
704
  }
705
705
 
706
+ #wine-widget-container [class^=icon-], [class*=" icon-"] {
707
+ font-family: 'Bricolage Grotesque', sans-serif !important;
708
+ }
709
+
706
710
  #wine-widget-container .wine-widget-wrapper {
707
711
  width: 100%;
708
712
  }
@@ -1220,6 +1224,9 @@ margin-top: auto; /* прижимает .bottom-row к низу
1220
1224
  padding: 16px;
1221
1225
  min-width: 100vw;
1222
1226
  }
1227
+ #wine-widget-header h1 {
1228
+ display: none;
1229
+ }
1223
1230
  #wine-placeholder {
1224
1231
  display: flex;
1225
1232
  gap: 8px;
@@ -1244,11 +1251,7 @@ margin-top: auto; /* прижимает .bottom-row к низу
1244
1251
  }
1245
1252
 
1246
1253
  /* Пример более узких экранов (i.e. <480px) можно добавить при необходимости */
1247
- `,kn=document.createElement("link");kn.rel="stylesheet",kn.href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap",document.head.appendChild(kn);const gs=document.createElement("style");document.documentElement.style.setProperty("--wineater-color",((ys=window==null?void 0:window.wineaterData)==null?void 0:ys.COLOR)||"#7B2BEB"),gs.textContent=Da,document.head.appendChild(gs);const La=["climats","telckel","biobio","weinpoint","vinigrandi","ampely","test"],Fa="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";class Rt{constructor(e){var n;this.baseURL="https://wineater-backend.vercel.app/",this.store=La.find(i=>window.location.href.includes(i)),this.token=((n=window==null?void 0:window.wineaterData)==null?void 0:n.CLIENT_TOKEN)||Fa}async getStoreConfig(e){console.log(e);try{const n=await fetch(`${this.baseURL}stores/store`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({store:e})});if(console.log(n),!n.ok)throw new Error(`HTTP error! Status: ${n.status}`);return await n.json()}catch(n){throw console.error("Error fetching store configuration:",n),n}}async getWineRecommendations(e){console.log(window.location.href);try{const n=await fetch(`${this.baseURL}dish/recommendations`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({text:e,store:this.store?this.store.toString().charAt(0).toUpperCase()+this.store.slice(1):void 0})}),i=await n.json();if(!n.ok)throw new Error(`API call failed with status ${n.status}: ${i.message||"No additional error information"}`);return i}catch(n){throw console.error("Fetching wine recommendations failed:",n.message),new Error(`Error in getWineRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(e){console.log(window.location.href);try{const n=await fetch(`${this.baseURL}dish/recommendations/search`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({text:e,store:this.store?this.store.toString().charAt(0).toUpperCase()+this.store.slice(1):void 0})}),i=await n.json();if(!n.ok)throw new Error(`API call failed with status ${n.status}: ${i.message||"No additional error information"}`);return i}catch(n){throw console.error("Fetching wine recommendations failed:",n.message),new Error(`Error in getWineRecommendations: ${n.message}`)}}async getPossibleDishesWithMeta(e,n){try{const i=await fetch(`${this.baseURL}dish/possible_dishes`,{method:"POST",headers:{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"},body:JSON.stringify({title:e,description:n})}),s=await i.json();if(console.log(s),!i.ok)throw new Error(`API call failed with status ${i.status}: ${s.message||"No additional error information"}`);return s}catch(i){throw console.error("Error fetching possible dishes:",i),i}}async getInstantRecommendations(){console.log("Fetching instant recommendations...");try{const e=await fetch(`${this.baseURL}dish/recommendations/instant`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({store:this.store})}),n=await e.json();if(!e.ok)throw new Error(`API call failed with status ${e.status}: ${n.message||"No additional error information"}`);return console.log("Instant recommendations:",n),n}catch(e){throw console.error("Fetching instant recommendations failed:",e.message),new Error(`Error in getInstantRecommendations: ${e.message}`)}}}class Ma{constructor(){this.api=new Rt,this.language="en",this.translations={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",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",price:"Prix",region:"Région",type:"Type",moreInfo:"Plus d'infos",sommSelection:"Sélection Somm",code:"Code",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"},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",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",price:"Precio",region:"Región",type:"Tipo",code:"Código",moreInfo:"Más información",sommSelection:"Selección Somm",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"},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",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",region:"Region",type:"Type",moreInfo:"More info",reason:"Reason",sommSelection:"Somm Selection",code:"Code",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"},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",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",region:"Region",type:"Typ",moreInfo:"Mehr Infos",sommSelection:"Somm-Auswahl",reason:"Grund",code:"Code",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"},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис",wineDetails:{reason:"Причина",price:"Ціна",region:"Регіон",type:"Тип",moreInfo:"Докладніше",sommSelection:"Вибір сомельє",code:"Код",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:"або"},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЕ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание",wineDetails:{price:"Цена",region:"Регион",type:"Тип",moreInfo:"Подробнее",reason:"Причина",sommSelection:"Выбор сомелье",code:"Код",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:"или"}}}async fetchConfig(e){try{const n=await this.api.getStoreConfig(e);this.language=n.lang}catch{this.language="en"}}translate(e){const n=e.split(".");let i=this.translations[this.language];for(const s of n)if(i&&typeof i=="object"&&s in i)i=i[s];else return e;return i}}const H=new Ma,Tn={barName:"LENEZ",dishGroups:[{groupTitle:"Entradas",dishes:["Pimientos rojo asado y aceite de oliva con ajo confitado","Ensalada de arúgula y parmesano","Tomate hierloom aliñado","Aceitunas LENEZ","Papatinaz","Croquetas | hongos de temporada | jamón serrano","Carpaccio Cesar","Torreznos","Calamares fritos"]},{groupTitle:"Bocadillos",dishes:["Brioche de pollo frito, col y salsa macha","Baguette de calamares rebozados en salsa brava","Hogaza de cola de res en recado negro y cebollas encurtidas"]},{groupTitle:"Embutidos",dishes:["Jamón Ibérico de bellota","Lomo ibérico","Chorizo ibérico","Plato mixto iberico"]},{groupTitle:"Quesos",dishes:["Selección de quesos (D’Affinois, Brie Ermitage, Manchego semi curado, Roquefort)"]},{groupTitle:"Postres",dishes:["Ate con queso manchego semi curado","Gelato de nata con balsámico","Gelato de ron con pasas y “El candado”, Valdespino PX","Gelato Dua Lipa","Créme Brûlée al Orange"]}]};class Pa{constructor(){var e,n,i,s;this.widgetType=((e=window==null?void 0:window.wineaterData)==null?void 0:e.WIDGET_TYPE)||"store",this.widgetWrapper=((n=window==null?void 0:window.wineaterData)==null?void 0:n.WIDGET_WRAPPER)||"wineater-widget-conteiner",this.titleText=(i=window==null?void 0:window.wineaterData)==null?void 0:i.TITLE_TEXT,this.subtitleText=(s=window==null?void 0:window.wineaterData)==null?void 0:s.SUBTITLE_TEXT,this.api=new Rt,this.selectedFilters={price:null,color:null,intensity:null},this.widgetType==="bar"?(this.barName=Tn.barName,this.barDishes=Tn.dishes):(this.barName="",this.barDishes=[]),this.initializeWidget(),this.initializeSearchAnimation(),this.widgetType==="store"&&this.loadInstantRecommendations()}initializeWidget(){const e=document.getElementById(this.widgetWrapper);if(this.widgetType==="store"){const n=`
1248
- <div id="wine-widget-container">
1249
- <div class="wine-widget-wrapper">
1250
- <div id="wine-widget-header">
1251
- <h1 class="wine-widget-big-title">
1254
+ `,kn=document.createElement("link");kn.rel="stylesheet",kn.href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap",document.head.appendChild(kn);const gs=document.createElement("style");document.documentElement.style.setProperty("--wineater-color",((ys=window==null?void 0:window.wineaterData)==null?void 0:ys.COLOR)||"#7B2BEB"),gs.textContent=Da,document.head.appendChild(gs);const La=["climats","telckel","biobio","weinpoint","vinigrandi","ampely","test"],Fa="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";class Rt{constructor(e){var n;this.baseURL="https://wineater-backend.vercel.app/",this.store=La.find(i=>window.location.href.includes(i)),this.token=((n=window==null?void 0:window.wineaterData)==null?void 0:n.CLIENT_TOKEN)||Fa}async getStoreConfig(e){console.log(e);try{const n=await fetch(`${this.baseURL}stores/store`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({store:e})});if(console.log(n),!n.ok)throw new Error(`HTTP error! Status: ${n.status}`);return await n.json()}catch(n){throw console.error("Error fetching store configuration:",n),n}}async getWineRecommendations(e){console.log(window.location.href);try{const n=await fetch(`${this.baseURL}dish/recommendations`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({text:e,store:this.store?this.store.toString().charAt(0).toUpperCase()+this.store.slice(1):void 0})}),i=await n.json();if(!n.ok)throw new Error(`API call failed with status ${n.status}: ${i.message||"No additional error information"}`);return i}catch(n){throw console.error("Fetching wine recommendations failed:",n.message),new Error(`Error in getWineRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(e){console.log(window.location.href);try{const n=await fetch(`${this.baseURL}dish/recommendations/search`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({text:e,store:this.store?this.store.toString().charAt(0).toUpperCase()+this.store.slice(1):void 0})}),i=await n.json();if(!n.ok)throw new Error(`API call failed with status ${n.status}: ${i.message||"No additional error information"}`);return i}catch(n){throw console.error("Fetching wine recommendations failed:",n.message),new Error(`Error in getWineRecommendations: ${n.message}`)}}async getPossibleDishesWithMeta(e,n){try{const i=await fetch(`${this.baseURL}dish/possible_dishes`,{method:"POST",headers:{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"},body:JSON.stringify({title:e,description:n})}),s=await i.json();if(console.log(s),!i.ok)throw new Error(`API call failed with status ${i.status}: ${s.message||"No additional error information"}`);return s}catch(i){throw console.error("Error fetching possible dishes:",i),i}}async getInstantRecommendations(){console.log("Fetching instant recommendations...");try{const e=await fetch(`${this.baseURL}dish/recommendations/instant`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},body:JSON.stringify({store:this.store})}),n=await e.json();if(!e.ok)throw new Error(`API call failed with status ${e.status}: ${n.message||"No additional error information"}`);return console.log("Instant recommendations:",n),n}catch(e){throw console.error("Fetching instant recommendations failed:",e.message),new Error(`Error in getInstantRecommendations: ${e.message}`)}}}class Ma{constructor(){this.api=new Rt,this.language="en",this.translations={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",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",price:"Prix",region:"Région",type:"Type",moreInfo:"Plus d'infos",sommSelection:"Sélection Somm",code:"Code",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"},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",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",price:"Precio",region:"Región",type:"Tipo",code:"Código",moreInfo:"Más información",sommSelection:"Selección Somm",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"},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",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",region:"Region",type:"Type",moreInfo:"More info",reason:"Reason",sommSelection:"Somm Selection",code:"Code",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"},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",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",region:"Region",type:"Typ",moreInfo:"Mehr Infos",sommSelection:"Somm-Auswahl",reason:"Grund",code:"Code",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"},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис",wineDetails:{reason:"Причина",price:"Ціна",region:"Регіон",type:"Тип",moreInfo:"Докладніше",sommSelection:"Вибір сомельє",code:"Код",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:"або"},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЕ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание",wineDetails:{price:"Цена",region:"Регион",type:"Тип",moreInfo:"Подробнее",reason:"Причина",sommSelection:"Выбор сомелье",code:"Код",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:"или"}}}async fetchConfig(e){try{const n=await this.api.getStoreConfig(e);this.language=n.lang}catch{this.language="en"}}translate(e){const n=e.split(".");let i=this.translations[this.language];for(const s of n)if(i&&typeof i=="object"&&s in i)i=i[s];else return e;return i}}const H=new Ma,Tn={barName:"LENEZ",dishGroups:[{groupTitle:"Entradas",dishes:["Pimientos rojo asado y aceite de oliva con ajo confitado","Ensalada de arúgula y parmesano","Tomate hierloom aliñado","Aceitunas LENEZ","Papatinaz","Croquetas | hongos de temporada | jamón serrano","Carpaccio Cesar","Torreznos","Calamares fritos"]},{groupTitle:"Bocadillos",dishes:["Brioche de pollo frito, col y salsa macha","Baguette de calamares rebozados en salsa brava","Hogaza de cola de res en recado negro y cebollas encurtidas"]},{groupTitle:"Embutidos",dishes:["Jamón Ibérico de bellota","Lomo ibérico","Chorizo ibérico","Plato mixto iberico"]},{groupTitle:"Quesos",dishes:["Selección de quesos (D’Affinois, Brie Ermitage, Manchego semi curado, Roquefort)"]},{groupTitle:"Postres",dishes:["Ate con queso manchego semi curado","Gelato de nata con balsámico","Gelato de ron con pasas y “El candado”, Valdespino PX","Gelato Dua Lipa","Créme Brûlée al Orange"]}]};class Pa{constructor(){var e,n,i,s;this.widgetType=((e=window==null?void 0:window.wineaterData)==null?void 0:e.WIDGET_TYPE)||"store",this.widgetWrapper=((n=window==null?void 0:window.wineaterData)==null?void 0:n.WIDGET_WRAPPER)||"wineater-widget-conteiner",this.titleText=(i=window==null?void 0:window.wineaterData)==null?void 0:i.TITLE_TEXT,this.subtitleText=(s=window==null?void 0:window.wineaterData)==null?void 0:s.SUBTITLE_TEXT,this.api=new Rt,console.log(this.titleText),this.selectedFilters={price:null,color:null,intensity:null},this.widgetType==="bar"?(this.barName=Tn.barName,this.barDishes=Tn.dishes):(this.barName="",this.barDishes=[]),this.initializeWidget(),this.initializeSearchAnimation(),this.widgetType==="store"&&this.loadInstantRecommendations()}getTitle(e){return e?`<h1 class="wine-widget-big-title">${e}</h1>`:`<h1 class="wine-widget-big-title">
1252
1255
  ${H.translate("headerLine1")}
1253
1256
  <span class="icon icon-meal"></span>
1254
1257
  <span class="icon-label">${H.translate("headerMeal")}</span>,
@@ -1261,7 +1264,11 @@ margin-top: auto; /* прижимает .bottom-row к низу
1261
1264
  <span class="icon icon-occasion"></span>
1262
1265
  <span class="icon-label">${H.translate("headerOccasion")}</span>
1263
1266
  ${H.translate("headerLine2")}
1264
- </h1>
1267
+ </h1>`}initializeWidget(){const e=document.getElementById(this.widgetWrapper);if(this.widgetType==="store"){const n=`
1268
+ <div id="wine-widget-container">
1269
+ <div class="wine-widget-wrapper">
1270
+ <div id="wine-widget-header">
1271
+ ${this.getTitle(this.titleText)}
1265
1272
  </div>
1266
1273
 
1267
1274
  <div id="wine-widget-search">
package/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Chatbot</title>
7
- <script>window.wineaterData = {CLIENT_TOKEN: 'MiRfsL8z0DBrQ70lHTZqGvveYYZwbC2lyteMShxwHEvhOPBjYWZHy7zsRbfcUqzf', TYPE: 'widget', WIDGET_TYPE: 'store', WIDGET_WRAPPER: 'wineater-widget-conteiner'};</script>
7
+ <script>window.wineaterData = {CLIENT_TOKEN: 'MiRfsL8z0DBrQ70lHTZqGvveYYZwbC2lyteMShxwHEvhOPBjYWZHy7zsRbfcUqzf', TYPE: 'widget', WIDGET_TYPE: 'store', WIDGET_WRAPPER: 'wineater-widget-conteiner', TITLE_TEXT: 'ghbdtn'};</script>
8
8
  <!-- <script type="module" src="./dist/wineater-chatbot.umd.js"></script> -->
9
9
  <script type="module" src="./src/index.js"></script>
10
10
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wineater-bot",
3
- "version": "3.1.8",
3
+ "version": "3.1.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
@@ -37,6 +37,10 @@ body {
37
37
  box-sizing: border-box;
38
38
  }
39
39
 
40
+ #wine-widget-container [class^=icon-], [class*=" icon-"] {
41
+ font-family: 'Bricolage Grotesque', sans-serif !important;
42
+ }
43
+
40
44
  #wine-widget-container .wine-widget-wrapper {
41
45
  width: 100%;
42
46
  }
@@ -554,6 +558,9 @@ margin-top: auto; /* прижимает .bottom-row к низу
554
558
  padding: 16px;
555
559
  min-width: 100vw;
556
560
  }
561
+ #wine-widget-header h1 {
562
+ display: none;
563
+ }
557
564
  #wine-placeholder {
558
565
  display: flex;
559
566
  gap: 8px;
package/src/js/widget.js CHANGED
@@ -12,6 +12,7 @@ export class WineWidget {
12
12
  this.titleText = window?.wineaterData?.TITLE_TEXT;
13
13
  this.subtitleText = window?.wineaterData?.SUBTITLE_TEXT;
14
14
  this.api = new Api();
15
+ console.log(this.titleText);
15
16
 
16
17
  // Фильтры для store
17
18
  this.selectedFilters = {
@@ -39,14 +40,8 @@ export class WineWidget {
39
40
  }
40
41
  }
41
42
 
42
- initializeWidget() {
43
- const widgetContainer = document.getElementById(this.widgetWrapper);
44
- if (this.widgetType === 'store') {
45
- const widgetHTML = `
46
- <div id="wine-widget-container">
47
- <div class="wine-widget-wrapper">
48
- <div id="wine-widget-header">
49
- <h1 class="wine-widget-big-title">
43
+ getTitle(title) {
44
+ return !!title ? `<h1 class="wine-widget-big-title">${title}</h1>` :`<h1 class="wine-widget-big-title">
50
45
  ${translator.translate('headerLine1')}
51
46
  <span class="icon icon-meal"></span>
52
47
  <span class="icon-label">${translator.translate('headerMeal')}</span>,
@@ -59,7 +54,17 @@ export class WineWidget {
59
54
  <span class="icon icon-occasion"></span>
60
55
  <span class="icon-label">${translator.translate('headerOccasion')}</span>
61
56
  ${translator.translate('headerLine2')}
62
- </h1>
57
+ </h1>`
58
+ }
59
+
60
+ initializeWidget() {
61
+ const widgetContainer = document.getElementById(this.widgetWrapper);
62
+ if (this.widgetType === 'store') {
63
+ const widgetHTML = `
64
+ <div id="wine-widget-container">
65
+ <div class="wine-widget-wrapper">
66
+ <div id="wine-widget-header">
67
+ ${this.getTitle(this.titleText)}
63
68
  </div>
64
69
 
65
70
  <div id="wine-widget-search">