@ozdao/prometheus-framework 0.2.320 → 0.2.322

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +34 -5
  3. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs.map +1 -1
  4. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +35 -6
  5. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js.map +1 -1
  6. package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs.map +1 -1
  7. package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
  8. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +56 -55
  9. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
  10. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +57 -56
  11. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
  12. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +0 -1
  13. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs.map +1 -1
  14. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +0 -1
  15. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js.map +1 -1
  16. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
  18. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  19. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  20. package/dist/prometheus-framework/src/modules/icons/entities/IconEarn.vue.cjs +62 -0
  21. package/dist/prometheus-framework/src/modules/icons/entities/IconEarn.vue.cjs.map +1 -0
  22. package/dist/prometheus-framework/src/modules/icons/entities/IconEarn.vue.js +62 -0
  23. package/dist/prometheus-framework/src/modules/icons/entities/IconEarn.vue.js.map +1 -0
  24. package/dist/prometheus-framework/src/modules/icons/entities/IconInfo.vue.cjs +43 -0
  25. package/dist/prometheus-framework/src/modules/icons/entities/IconInfo.vue.cjs.map +1 -0
  26. package/dist/prometheus-framework/src/modules/icons/entities/IconInfo.vue.js +43 -0
  27. package/dist/prometheus-framework/src/modules/icons/entities/IconInfo.vue.js.map +1 -0
  28. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionEarn.vue.cjs +132 -0
  29. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionEarn.vue.cjs.map +1 -0
  30. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionEarn.vue.js +132 -0
  31. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -0
  32. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs.map +1 -1
  34. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
  36. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +2 -0
  37. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs.map +1 -1
  38. package/dist/prometheus-framework/src/modules/landing/landing.client.js +12 -10
  39. package/dist/prometheus-framework/src/modules/landing/landing.client.js.map +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +492 -474
  45. package/dist/prometheus-framework/src/modules/pages/pages.client.js +492 -474
  46. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs.map +1 -1
  55. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js.map +1 -1
  56. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +81 -35
  61. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs.map +1 -1
  62. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +81 -35
  63. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js.map +1 -1
  64. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +0 -6
  65. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs.map +1 -1
  66. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +0 -6
  67. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/modules/auth/views/components/sections/SliderFeatures.vue +1 -7
  70. package/src/modules/community/components/sections/HotPosts.vue +68 -65
  71. package/src/modules/events/components/sections/List.vue +0 -18
  72. package/src/modules/globals/views/components/layouts/Client.vue +28 -1
  73. package/src/modules/icons/entities/IconInfo.vue +15 -0
  74. package/src/modules/landing/components/sections/SectionEarn.vue +56 -54
  75. package/src/modules/landing/components/sections/SectionGuide.vue +4 -3
  76. package/src/modules/landing/landing.client.js +2 -0
  77. package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
  78. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +74 -44
  79. package/src/modules/wallet/views/localization/wallet.json +0 -6
  80. package/src/styles/base/all.scss +5 -4
  81. package/src/styles/typography.scss +5 -5
@@ -11,7 +11,7 @@ const Block = require("../../../../components/Block/Block.vue.cjs");
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
13
  ;/* empty css */
14
- ;/* empty css */
14
+ ;/* empty css */
15
15
  ;/* empty css */
16
16
  ;/* empty css */
17
17
  const CategoriesTree = require("../sections/CategoriesTree.vue.cjs");
@@ -9,7 +9,7 @@ import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
- /* empty css */
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  import _sfc_main$4 from "../sections/CategoriesTree.vue.js";
@@ -10,7 +10,7 @@ const Field = require("../../../../components/Field/Field.vue2.cjs");
10
10
  ;/* empty css */
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  ;/* empty css */
15
15
  const Block = require("../../../../components/Block/Block.vue.cjs");
16
16
  const IconCheckmark = require("../../../icons/navigation/IconCheckmark.vue.cjs");
@@ -8,7 +8,7 @@ import Field from "../../../../components/Field/Field.vue2.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
14
14
  import _sfc_main$1 from "../../../icons/navigation/IconCheckmark.vue.js";
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const Tab = require("../../../../components/Tab/Tab.vue2.cjs");
6
6
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
7
- ;/* empty css */
7
+ ;/* empty css */
8
8
  require("vue-i18n");
9
9
  const categories = require("../../store/categories.cjs");
10
10
  const marketplace = require("../../../marketplace/views/store/marketplace.cjs");
@@ -2,7 +2,7 @@ import { ref, watch, onMounted, onUnmounted, resolveComponent, openBlock, create
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import _sfc_main$2 from "../../../../components/Tab/Tab.vue2.js";
4
4
  import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
5
- /* empty css */
5
+ /* empty css */
6
6
  import "vue-i18n";
7
7
  import { actions } from "../../store/categories.js";
8
8
  import { state } from "../../../marketplace/views/store/marketplace.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Spoiler = require("../../../../components/Spoiler/Spoiler.vue.cjs");
4
+ const Spoiler = require("../../../../components/Spoiler/Spoiler.vue2.cjs");
5
5
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
6
6
  const vueI18n = require("vue-i18n");
7
7
  const vueRouter = require("vue-router");
@@ -1,5 +1,5 @@
1
1
  import { ref, watch, onMounted, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock } from "vue";
2
- import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue2.js";
3
3
  import _sfc_main$2 from "../../../../components/Checkbox/Checkbox.vue.js";
4
4
  import { useI18n } from "vue-i18n";
5
5
  import { useRoute, useRouter } from "vue-router";
@@ -1 +1 @@
1
- {"version":3,"file":"HeroRecommendation.vue.cjs","sources":["../../../../../../../src/modules/products/components/sections/HeroRecommendation.vue"],"sourcesContent":["<script setup>\n\timport { ref, onMounted } from 'vue'\n\n\timport FieldBig from \"@pf/src/components/FieldBig/FieldBig.vue\";\n\timport Shader from \"@pf/src/components/Shader/Shader.vue\";\n\n\timport { useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport * as products from '@pf/src/modules/products/store/products';\n\n\tconst router = useRouter()\n\n\tconst text = {\n messages: {\n \"en\": {\n\t\t \"title\": \"Increase Your High <br><b class='t-main'>Boosted by AI Budtender</b>\",\n\t\t \"description\": \"Just tell us what you're want, and Weeder will find your ideal match.\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Lowest THC, please!',\n\t\t \t'Something with banana flavors?',\n\t\t \t\"I'm in the mood for trippy vibes.\"\n\t\t ],\n\t\t \"subdescription\": \"AI Curated Recommendations for Your Mood:\",\n\t\t \"presets\": {\n\t\t \"sleep\": \"sleep\",\n\t\t \"creative\": \"creative\",\n\t\t \"giggly\": \"giggly\",\n\t\t \"libido\": \"libido\",\n\t\t \"trippy\": \"trippy\",\n\t\t \"euphoric\": \"euphoric\"\n\t\t },\n\t\t \"placeholder\": \"Tell us what you're after...\",\n\t\t \"action\": \"Transmit\"\n\t\t },\n\t\t \"ru\": {\n\t\t \"title\": \"Персональный Накур,<br><b class='t-main'>Напрямую от AI</b>\",\n\t\t \"description\": \"AI на страже твоего релакса, бро. Мы подбираем самые космические товары с учетом твоего желаемого настроения:\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Я хочу самый низкий THC',\n\t\t \t'Я хочу чего-нибудь бананового',\n\t\t \t'Я хочу курнуть хейза'\n\t\t ],\n\t\t \t \"presets\": {\n\t\t \"sleep\": \"сон\",\n\t\t \"creative\": \"креатив\",\n\t\t \"giggly\": \"смех\",\n\t\t \"libido\": \"либидо\",\n\t\t \"trippy\": \"трип\",\n\t\t \"euphoric\": \"кайф\"\n\t\t },\n\t\t \"subdescription\": \"Или выберите тег, и наш AI направит тебя к самым крутым вариантам:\",\n\t\t \"placeholder\": \"Опиши свой желаемый хай, bro...\",\n\t\t \"action\": \"Передать\"\n\t\t }\n\t\t}\t\n\t}\n\n\tconst { t, rt } = useI18n(text)\n\n\tlet mood = ref('')\n\n\tconst presets = ['sleep','creative','giggly','libido','trippy','euphoric'];\n\n\tasync function submitMood(presetMood = null) {\n\t\tconst moodToSend = presetMood || mood.value;\n\t\tawait products.actions.submitMood(moodToSend);\n\t}\n\n\t\n</script>\n\n<template>\n\t<div \n\t\tclass=\"pd-big bg-black t-white pos-relative o-hidden \"\n\t>\n\t\t<div class=\"flex-column flex-center flex t-center pos-relative z-index-1\">\n\t\t\t\n\t\t\t<h1 \n\t\t\t\tclass=\"mn-b-semi\" \n\t\t\t\tv-html=\"t('title')\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"mn-b-big p-big t-transp\" \n\t\t\t\tv-html=\"t('description')\"\n\t\t\t/>\n\t\t\t\n\t\t\t<FieldBig \n\t\t\t\t:input=\"mood\" \n\t\t :typingSpeed=\"100\"\n\t\t :loopTyping=\"true\"\n\t\t :enableTyping=\"true\"\n\t\t :placeholder=\"t('placeholder')\"\n\t\t :action=\"t('action')\"\n\t\t @update:input=\"mood = $event\"\n\t\t @action=\"router.push({name: 'Product Recommmendation', query: {mood: mood}})\"\n\t\t\t\tclass=\"mn-b-big pd-big bg-dark-transp-50 bg-blur-thin w-100 w-max-40r\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"w-m-60r t-transp mn-b-semi p-medium\" \n\t\t\t\tv-html=\"t('subdescription')\"\n\t\t\t/>\n\n\t\t\t<div style=\"max-width: 50rem;\" class=\"w-100 h-max gap-thin cols-6\">\n\n\t\t\t\t<button \n\t\t\t\t\tv-for=\"(preset,index) in presets\" \n\t\t\t\t\t:key=\"preset\" \n\t\t\t\t\t@click.stop=\"router.push({name: 'ProductRecommmendation', query: {mood: preset}})\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tuppercase \n\t\t\t\t\t\tpd-thin\n\t\t\t\t\t\tt-medium\n\t\t\t\t\t\tflex-center\n\t\t\t\t\t\tflex-column\n\t\t\t\t\t\tflex-nowrap\n\t\t\t\t\t\tflex\n\t\t\t\t\t\tbg-dark-transp-50 \n\t\t\t\t\t\tbg-blur-thin\n\t\t\t\t\t\tradius-semi\n\t\t\t\t\t\tcursor-pointer\n\t\t\t\t\t\ttransition-elastic\n\t\t\t\t\t\thover-easeInOut-1 \n\t\t\t\t\t\"\n\t\t\t\t>\n\t\t\t\t\t<img loading=\"lazy\" \n\t\t\t\t\t\t:src=\"(FILE_SERVER_URL || '') + '/icons/moods/' + preset + '.svg'\" \n\t\t\t\t\t\tclass=\"w-100\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<span class=\"t-white\"> \n\t\t\t\t\t\t{{ t(`presets.` + preset) }}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<!-- <Shader class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\"/> -->\n\n <!-- <div class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\">\n \t <div style=\"background-image: url(/spiral.jpg)\" class=\"spiral\"></div>\n </div> -->\n\n\t</div>\n</template>\n\n<style>\n.spiral {\n\t\n background-size: cover;\n width: 100rem;\n height: 100rem;\n position: absolute;\n top: 50%;\n left: 50%;\n opacity: 0.066;\n transform: translate(-50%, -50%) rotate(0deg);\n transform-origin: center center;\n animation: spin 5s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n</style>"],"names":["useRouter","useI18n","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAWC,UAAM,SAASA,UAAAA,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,UACN,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACD,kBAAkB;AAAA,UAClB,WAAW;AAAA,YACT,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,QACD,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACA,WAAW;AAAA,YACV,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,kBAAkB;AAAA,UAClB,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,MACF;AAAA,IACD;AAED,UAAM,EAAE,GAAG,OAAOC,QAAAA,QAAQ,IAAI;AAE9B,QAAI,OAAOC,IAAG,IAAC,EAAE;AAEjB,UAAM,UAAU,CAAC,SAAQ,YAAW,UAAS,UAAS,UAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"HeroRecommendation.vue.cjs","sources":["../../../../../../../src/modules/products/components/sections/HeroRecommendation.vue"],"sourcesContent":["<script setup>\n\timport { ref, onMounted } from 'vue'\n\n\timport FieldBig from \"@pf/src/components/FieldBig/FieldBig.vue\";\n\timport Shader from \"@pf/src/components/Shader/Shader.vue\";\n\n\timport { useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport * as products from '@pf/src/modules/products/store/products';\n\n\tconst router = useRouter()\n\n\tconst text = {\n messages: {\n \"en\": {\n\t\t \"title\": \"Increase Your High <br><b class='t-main'>Boosted by AI Budtender</b>\",\n\t\t \"description\": \"Just tell us what you're want, and Weeder will find your ideal match.\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Lowest THC, please!',\n\t\t \t'Something with banana flavors?',\n\t\t \t\"I'm in the mood for trippy vibes.\"\n\t\t ],\n\t\t \"subdescription\": \"AI Curated Recommendations for Your Mood:\",\n\t\t \"presets\": {\n\t\t \"sleep\": \"sleep\",\n\t\t \"creative\": \"creative\",\n\t\t \"giggly\": \"giggly\",\n\t\t \"libido\": \"libido\",\n\t\t \"trippy\": \"trippy\",\n\t\t \"euphoric\": \"euphoric\"\n\t\t },\n\t\t \"placeholder\": \"Tell us what you're after...\",\n\t\t \"action\": \"Transmit\"\n\t\t },\n\t\t \"ru\": {\n\t\t \"title\": \"Персональный Накур,<br><b class='t-main'>Напрямую от AI</b>\",\n\t\t \"description\": \"AI на страже твоего релакса, бро. Мы подбираем самые космические товары с учетом твоего желаемого настроения:\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Я хочу самый низкий THC',\n\t\t \t'Я хочу чего-нибудь бананового',\n\t\t \t'Я хочу курнуть хейза'\n\t\t ],\n\t\t \t \"presets\": {\n\t\t \"sleep\": \"сон\",\n\t\t \"creative\": \"креатив\",\n\t\t \"giggly\": \"смех\",\n\t\t \"libido\": \"либидо\",\n\t\t \"trippy\": \"трип\",\n\t\t \"euphoric\": \"кайф\"\n\t\t },\n\t\t \"subdescription\": \"Или выберите тег, и наш AI направит тебя к самым крутым вариантам:\",\n\t\t \"placeholder\": \"Опиши свой желаемый хай, bro...\",\n\t\t \"action\": \"Передать\"\n\t\t }\n\t\t}\t\n\t}\n\n\tconst { t, rt } = useI18n(text)\n\n\tlet mood = ref('')\n\n\tconst presets = ['sleep','creative','giggly','libido','trippy','euphoric'];\n\n\tasync function submitMood(presetMood = null) {\n\t\tconst moodToSend = presetMood || mood.value;\n\t\tawait products.actions.submitMood(moodToSend);\n\t}\n\n\t\n</script>\n\n<template>\n\t<div \n\t\tclass=\"pd-big bg-black t-white pos-relative o-hidden \"\n\t>\n\t\t<div class=\"flex-column flex-center flex t-center pos-relative z-index-1\">\n\t\t\t\n\t\t\t<h1 \n\t\t\t\tclass=\"mn-b-semi\" \n\t\t\t\tv-html=\"t('title')\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"mn-b-big p-big t-transp\" \n\t\t\t\tv-html=\"t('description')\"\n\t\t\t/>\n\t\t\t\n\t\t\t<FieldBig \n\t\t\t\t:input=\"mood\" \n\t\t :typingSpeed=\"100\"\n\t\t :loopTyping=\"true\"\n\t\t :enableTyping=\"true\"\n\t\t :placeholder=\"t('placeholder')\"\n\t\t :action=\"t('action')\"\n\t\t @update:input=\"mood = $event\"\n\t\t @action=\"router.push({name: 'Product Recommmendation', query: {mood: mood}})\"\n\t\t\t\tclass=\"mn-b-big pd-big bg-dark-transp-50 bg-blur-thin w-100 w-max-40r\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"w-m-60r t-transp mn-b-semi p-medium\" \n\t\t\t\tv-html=\"t('subdescription')\"\n\t\t\t/>\n\n\t\t\t<div style=\"max-width: 50rem;\" class=\"w-100 h-max gap-thin cols-6\">\n\n\t\t\t\t<button \n\t\t\t\t\tv-for=\"(preset,index) in presets\" \n\t\t\t\t\t:key=\"preset\" \n\t\t\t\t\t@click.stop=\"router.push({name: 'ProductRecommmendation', query: {mood: preset}})\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tuppercase \n\t\t\t\t\t\tpd-thin\n\t\t\t\t\t\tt-medium\n\t\t\t\t\t\tflex-center\n\t\t\t\t\t\tflex-column\n\t\t\t\t\t\tflex-nowrap\n\t\t\t\t\t\tflex\n\t\t\t\t\t\tbg-dark-transp-50 \n\t\t\t\t\t\tbg-blur-thin\n\t\t\t\t\t\tradius-semi\n\t\t\t\t\t\tcursor-pointer\n\t\t\t\t\t\ttransition-elastic\n\t\t\t\t\t\thover-easeInOut-1 \n\t\t\t\t\t\"\n\t\t\t\t>\n\t\t\t\t\t<img loading=\"lazy\" \n\t\t\t\t\t\t:src=\"(FILE_SERVER_URL || '') + '/icons/moods/' + preset + '.svg'\" \n\t\t\t\t\t\tclass=\"w-100\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<span class=\"t-white\"> \n\t\t\t\t\t\t{{ t(`presets.` + preset) }}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<!-- <Shader class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\"/> -->\n\n <!-- <div class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\">\n \t <div style=\"background-image: url(/spiral.jpg)\" class=\"spiral\"></div>\n </div> -->\n\n\t</div>\n</template>\n\n<style style=\"scoped\">\n.spiral {\n\t\n background-size: cover;\n width: 100rem;\n height: 100rem;\n position: absolute;\n top: 50%;\n left: 50%;\n opacity: 0.066;\n transform: translate(-50%, -50%) rotate(0deg);\n transform-origin: center center;\n animation: spin 5s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n</style>"],"names":["useRouter","useI18n","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAWC,UAAM,SAASA,UAAAA,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,UACN,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACD,kBAAkB;AAAA,UAClB,WAAW;AAAA,YACT,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,QACD,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACA,WAAW;AAAA,YACV,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,kBAAkB;AAAA,UAClB,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,MACF;AAAA,IACD;AAED,UAAM,EAAE,GAAG,OAAOC,QAAAA,QAAQ,IAAI;AAE9B,QAAI,OAAOC,IAAG,IAAC,EAAE;AAEjB,UAAM,UAAU,CAAC,SAAQ,YAAW,UAAS,UAAS,UAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeroRecommendation.vue.js","sources":["../../../../../../../src/modules/products/components/sections/HeroRecommendation.vue"],"sourcesContent":["<script setup>\n\timport { ref, onMounted } from 'vue'\n\n\timport FieldBig from \"@pf/src/components/FieldBig/FieldBig.vue\";\n\timport Shader from \"@pf/src/components/Shader/Shader.vue\";\n\n\timport { useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport * as products from '@pf/src/modules/products/store/products';\n\n\tconst router = useRouter()\n\n\tconst text = {\n messages: {\n \"en\": {\n\t\t \"title\": \"Increase Your High <br><b class='t-main'>Boosted by AI Budtender</b>\",\n\t\t \"description\": \"Just tell us what you're want, and Weeder will find your ideal match.\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Lowest THC, please!',\n\t\t \t'Something with banana flavors?',\n\t\t \t\"I'm in the mood for trippy vibes.\"\n\t\t ],\n\t\t \"subdescription\": \"AI Curated Recommendations for Your Mood:\",\n\t\t \"presets\": {\n\t\t \"sleep\": \"sleep\",\n\t\t \"creative\": \"creative\",\n\t\t \"giggly\": \"giggly\",\n\t\t \"libido\": \"libido\",\n\t\t \"trippy\": \"trippy\",\n\t\t \"euphoric\": \"euphoric\"\n\t\t },\n\t\t \"placeholder\": \"Tell us what you're after...\",\n\t\t \"action\": \"Transmit\"\n\t\t },\n\t\t \"ru\": {\n\t\t \"title\": \"Персональный Накур,<br><b class='t-main'>Напрямую от AI</b>\",\n\t\t \"description\": \"AI на страже твоего релакса, бро. Мы подбираем самые космические товары с учетом твоего желаемого настроения:\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Я хочу самый низкий THC',\n\t\t \t'Я хочу чего-нибудь бананового',\n\t\t \t'Я хочу курнуть хейза'\n\t\t ],\n\t\t \t \"presets\": {\n\t\t \"sleep\": \"сон\",\n\t\t \"creative\": \"креатив\",\n\t\t \"giggly\": \"смех\",\n\t\t \"libido\": \"либидо\",\n\t\t \"trippy\": \"трип\",\n\t\t \"euphoric\": \"кайф\"\n\t\t },\n\t\t \"subdescription\": \"Или выберите тег, и наш AI направит тебя к самым крутым вариантам:\",\n\t\t \"placeholder\": \"Опиши свой желаемый хай, bro...\",\n\t\t \"action\": \"Передать\"\n\t\t }\n\t\t}\t\n\t}\n\n\tconst { t, rt } = useI18n(text)\n\n\tlet mood = ref('')\n\n\tconst presets = ['sleep','creative','giggly','libido','trippy','euphoric'];\n\n\tasync function submitMood(presetMood = null) {\n\t\tconst moodToSend = presetMood || mood.value;\n\t\tawait products.actions.submitMood(moodToSend);\n\t}\n\n\t\n</script>\n\n<template>\n\t<div \n\t\tclass=\"pd-big bg-black t-white pos-relative o-hidden \"\n\t>\n\t\t<div class=\"flex-column flex-center flex t-center pos-relative z-index-1\">\n\t\t\t\n\t\t\t<h1 \n\t\t\t\tclass=\"mn-b-semi\" \n\t\t\t\tv-html=\"t('title')\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"mn-b-big p-big t-transp\" \n\t\t\t\tv-html=\"t('description')\"\n\t\t\t/>\n\t\t\t\n\t\t\t<FieldBig \n\t\t\t\t:input=\"mood\" \n\t\t :typingSpeed=\"100\"\n\t\t :loopTyping=\"true\"\n\t\t :enableTyping=\"true\"\n\t\t :placeholder=\"t('placeholder')\"\n\t\t :action=\"t('action')\"\n\t\t @update:input=\"mood = $event\"\n\t\t @action=\"router.push({name: 'Product Recommmendation', query: {mood: mood}})\"\n\t\t\t\tclass=\"mn-b-big pd-big bg-dark-transp-50 bg-blur-thin w-100 w-max-40r\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"w-m-60r t-transp mn-b-semi p-medium\" \n\t\t\t\tv-html=\"t('subdescription')\"\n\t\t\t/>\n\n\t\t\t<div style=\"max-width: 50rem;\" class=\"w-100 h-max gap-thin cols-6\">\n\n\t\t\t\t<button \n\t\t\t\t\tv-for=\"(preset,index) in presets\" \n\t\t\t\t\t:key=\"preset\" \n\t\t\t\t\t@click.stop=\"router.push({name: 'ProductRecommmendation', query: {mood: preset}})\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tuppercase \n\t\t\t\t\t\tpd-thin\n\t\t\t\t\t\tt-medium\n\t\t\t\t\t\tflex-center\n\t\t\t\t\t\tflex-column\n\t\t\t\t\t\tflex-nowrap\n\t\t\t\t\t\tflex\n\t\t\t\t\t\tbg-dark-transp-50 \n\t\t\t\t\t\tbg-blur-thin\n\t\t\t\t\t\tradius-semi\n\t\t\t\t\t\tcursor-pointer\n\t\t\t\t\t\ttransition-elastic\n\t\t\t\t\t\thover-easeInOut-1 \n\t\t\t\t\t\"\n\t\t\t\t>\n\t\t\t\t\t<img loading=\"lazy\" \n\t\t\t\t\t\t:src=\"(FILE_SERVER_URL || '') + '/icons/moods/' + preset + '.svg'\" \n\t\t\t\t\t\tclass=\"w-100\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<span class=\"t-white\"> \n\t\t\t\t\t\t{{ t(`presets.` + preset) }}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<!-- <Shader class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\"/> -->\n\n <!-- <div class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\">\n \t <div style=\"background-image: url(/spiral.jpg)\" class=\"spiral\"></div>\n </div> -->\n\n\t</div>\n</template>\n\n<style>\n.spiral {\n\t\n background-size: cover;\n width: 100rem;\n height: 100rem;\n position: absolute;\n top: 50%;\n left: 50%;\n opacity: 0.066;\n transform: translate(-50%, -50%) rotate(0deg);\n transform-origin: center center;\n animation: spin 5s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWC,UAAM,SAAS,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,UACN,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACD,kBAAkB;AAAA,UAClB,WAAW;AAAA,YACT,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,QACD,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACA,WAAW;AAAA,YACV,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,kBAAkB;AAAA,UAClB,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,MACF;AAAA,IACD;AAED,UAAM,EAAE,GAAG,OAAO,QAAQ,IAAI;AAE9B,QAAI,OAAO,IAAI,EAAE;AAEjB,UAAM,UAAU,CAAC,SAAQ,YAAW,UAAS,UAAS,UAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"HeroRecommendation.vue.js","sources":["../../../../../../../src/modules/products/components/sections/HeroRecommendation.vue"],"sourcesContent":["<script setup>\n\timport { ref, onMounted } from 'vue'\n\n\timport FieldBig from \"@pf/src/components/FieldBig/FieldBig.vue\";\n\timport Shader from \"@pf/src/components/Shader/Shader.vue\";\n\n\timport { useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport * as products from '@pf/src/modules/products/store/products';\n\n\tconst router = useRouter()\n\n\tconst text = {\n messages: {\n \"en\": {\n\t\t \"title\": \"Increase Your High <br><b class='t-main'>Boosted by AI Budtender</b>\",\n\t\t \"description\": \"Just tell us what you're want, and Weeder will find your ideal match.\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Lowest THC, please!',\n\t\t \t'Something with banana flavors?',\n\t\t \t\"I'm in the mood for trippy vibes.\"\n\t\t ],\n\t\t \"subdescription\": \"AI Curated Recommendations for Your Mood:\",\n\t\t \"presets\": {\n\t\t \"sleep\": \"sleep\",\n\t\t \"creative\": \"creative\",\n\t\t \"giggly\": \"giggly\",\n\t\t \"libido\": \"libido\",\n\t\t \"trippy\": \"trippy\",\n\t\t \"euphoric\": \"euphoric\"\n\t\t },\n\t\t \"placeholder\": \"Tell us what you're after...\",\n\t\t \"action\": \"Transmit\"\n\t\t },\n\t\t \"ru\": {\n\t\t \"title\": \"Персональный Накур,<br><b class='t-main'>Напрямую от AI</b>\",\n\t\t \"description\": \"AI на страже твоего релакса, бро. Мы подбираем самые космические товары с учетом твоего желаемого настроения:\",\n\t\t \"placeholderTexts\": [\n\t\t \t'Я хочу самый низкий THC',\n\t\t \t'Я хочу чего-нибудь бананового',\n\t\t \t'Я хочу курнуть хейза'\n\t\t ],\n\t\t \t \"presets\": {\n\t\t \"sleep\": \"сон\",\n\t\t \"creative\": \"креатив\",\n\t\t \"giggly\": \"смех\",\n\t\t \"libido\": \"либидо\",\n\t\t \"trippy\": \"трип\",\n\t\t \"euphoric\": \"кайф\"\n\t\t },\n\t\t \"subdescription\": \"Или выберите тег, и наш AI направит тебя к самым крутым вариантам:\",\n\t\t \"placeholder\": \"Опиши свой желаемый хай, bro...\",\n\t\t \"action\": \"Передать\"\n\t\t }\n\t\t}\t\n\t}\n\n\tconst { t, rt } = useI18n(text)\n\n\tlet mood = ref('')\n\n\tconst presets = ['sleep','creative','giggly','libido','trippy','euphoric'];\n\n\tasync function submitMood(presetMood = null) {\n\t\tconst moodToSend = presetMood || mood.value;\n\t\tawait products.actions.submitMood(moodToSend);\n\t}\n\n\t\n</script>\n\n<template>\n\t<div \n\t\tclass=\"pd-big bg-black t-white pos-relative o-hidden \"\n\t>\n\t\t<div class=\"flex-column flex-center flex t-center pos-relative z-index-1\">\n\t\t\t\n\t\t\t<h1 \n\t\t\t\tclass=\"mn-b-semi\" \n\t\t\t\tv-html=\"t('title')\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"mn-b-big p-big t-transp\" \n\t\t\t\tv-html=\"t('description')\"\n\t\t\t/>\n\t\t\t\n\t\t\t<FieldBig \n\t\t\t\t:input=\"mood\" \n\t\t :typingSpeed=\"100\"\n\t\t :loopTyping=\"true\"\n\t\t :enableTyping=\"true\"\n\t\t :placeholder=\"t('placeholder')\"\n\t\t :action=\"t('action')\"\n\t\t @update:input=\"mood = $event\"\n\t\t @action=\"router.push({name: 'Product Recommmendation', query: {mood: mood}})\"\n\t\t\t\tclass=\"mn-b-big pd-big bg-dark-transp-50 bg-blur-thin w-100 w-max-40r\"\n\t\t\t/>\n\n\t\t\t<p \n\t\t\t\tclass=\"w-m-60r t-transp mn-b-semi p-medium\" \n\t\t\t\tv-html=\"t('subdescription')\"\n\t\t\t/>\n\n\t\t\t<div style=\"max-width: 50rem;\" class=\"w-100 h-max gap-thin cols-6\">\n\n\t\t\t\t<button \n\t\t\t\t\tv-for=\"(preset,index) in presets\" \n\t\t\t\t\t:key=\"preset\" \n\t\t\t\t\t@click.stop=\"router.push({name: 'ProductRecommmendation', query: {mood: preset}})\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tuppercase \n\t\t\t\t\t\tpd-thin\n\t\t\t\t\t\tt-medium\n\t\t\t\t\t\tflex-center\n\t\t\t\t\t\tflex-column\n\t\t\t\t\t\tflex-nowrap\n\t\t\t\t\t\tflex\n\t\t\t\t\t\tbg-dark-transp-50 \n\t\t\t\t\t\tbg-blur-thin\n\t\t\t\t\t\tradius-semi\n\t\t\t\t\t\tcursor-pointer\n\t\t\t\t\t\ttransition-elastic\n\t\t\t\t\t\thover-easeInOut-1 \n\t\t\t\t\t\"\n\t\t\t\t>\n\t\t\t\t\t<img loading=\"lazy\" \n\t\t\t\t\t\t:src=\"(FILE_SERVER_URL || '') + '/icons/moods/' + preset + '.svg'\" \n\t\t\t\t\t\tclass=\"w-100\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<span class=\"t-white\"> \n\t\t\t\t\t\t{{ t(`presets.` + preset) }}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<!-- <Shader class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\"/> -->\n\n <!-- <div class=\"w-100 h-100 flex flex-center pos-absolute pos-t-0 pos-r-0 z-index-0\">\n \t <div style=\"background-image: url(/spiral.jpg)\" class=\"spiral\"></div>\n </div> -->\n\n\t</div>\n</template>\n\n<style style=\"scoped\">\n.spiral {\n\t\n background-size: cover;\n width: 100rem;\n height: 100rem;\n position: absolute;\n top: 50%;\n left: 50%;\n opacity: 0.066;\n transform: translate(-50%, -50%) rotate(0deg);\n transform-origin: center center;\n animation: spin 5s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWC,UAAM,SAAS,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,MAAM;AAAA,UACN,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACD,kBAAkB;AAAA,UAClB,WAAW;AAAA,YACT,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,QACD,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,eAAe;AAAA,UACf,oBAAoB;AAAA,YACnB;AAAA,YACA;AAAA,YACA;AAAA,UACA;AAAA,UACA,WAAW;AAAA,YACV,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,UAAU;AAAA,YACV,UAAU;AAAA,YACV,YAAY;AAAA,UACb;AAAA,UACD,kBAAkB;AAAA,UAClB,eAAe;AAAA,UACf,UAAU;AAAA,QACX;AAAA,MACF;AAAA,IACD;AAED,UAAM,EAAE,GAAG,OAAO,QAAQ,IAAI;AAE9B,QAAI,OAAO,IAAI,EAAE;AAEjB,UAAM,UAAU,CAAC,SAAQ,YAAW,UAAS,UAAS,UAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const vueI18n = require("vue-i18n");
6
- ;/* empty css */
6
+ ;/* empty css */
7
7
  ;/* empty css */
8
8
  ;/* empty css */
9
9
  ;/* empty css */
@@ -1,7 +1,7 @@
1
1
  import { ref, onMounted, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createVNode, withCtx, Transition, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import { useI18n } from "vue-i18n";
4
- /* empty css */
4
+ /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Spoiler = require("../../../../components/Spoiler/Spoiler.vue.cjs");
4
+ const Spoiler = require("../../../../components/Spoiler/Spoiler.vue2.cjs");
5
5
  const Map = require("../../../../components/Map/Map.vue.cjs");
6
6
  const SpotSub = require("../blocks/SpotSub.vue.cjs");
7
7
  const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { openBlock, createElementBlock, createVNode, createElementVNode, withCtx, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from "vue";
2
- import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue2.js";
3
3
  import Map from "../../../../components/Map/Map.vue.js";
4
4
  import SpotSub from "../blocks/SpotSub.vue.js";
5
5
  import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
@@ -2,18 +2,61 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueI18n = require("vue-i18n");
5
- const wallet = require("../../localization/wallet.json.cjs");
6
5
  const IconAdd = require("../../../../icons/navigation/IconAdd.vue.cjs");
7
- const _hoisted_1 = { class: "h4 uppercase w-100" };
6
+ const _hoisted_1 = ["src"];
8
7
  const _hoisted_2 = { class: "h4 uppercase w-100" };
9
- const _hoisted_3 = { class: "h4 uppercase w-100" };
10
- const tokenAddress = "0xE11702CF04621D395E75680C29d3dbF81484e875";
11
- const tokenSymbol = "WDT";
12
- const tokenDecimals = 8;
13
- const tokenImage = "https://weeder.delivery/logo-token.png";
8
+ const _hoisted_3 = ["src"];
9
+ const _hoisted_4 = { class: "h4 uppercase w-100" };
10
+ const _hoisted_5 = ["src"];
11
+ const _hoisted_6 = { class: "h4 uppercase w-100" };
12
+ const _hoisted_7 = {
13
+ key: 2,
14
+ class: "mn-t-small"
15
+ };
14
16
  const _sfc_main = {
15
17
  __name: "ConnectMetamask",
18
+ props: {
19
+ // Token configuration
20
+ tokenAddress: {
21
+ type: String,
22
+ required: true
23
+ },
24
+ tokenSymbol: {
25
+ type: String,
26
+ required: true
27
+ },
28
+ tokenImage: {
29
+ type: String,
30
+ required: true
31
+ },
32
+ tokenDecimals: {
33
+ type: Number,
34
+ default: 18
35
+ },
36
+ // Chain configuration
37
+ targetChainId: {
38
+ type: String,
39
+ default: "0x89"
40
+ // Polygon Mainnet by default
41
+ },
42
+ // UI configuration
43
+ metamaskIcon: {
44
+ type: String,
45
+ default: "/icons/metamask.svg"
46
+ },
47
+ content: {
48
+ type: Object,
49
+ default: () => ({
50
+ en: {
51
+ "connectMetaMask": "Connect MetaMask",
52
+ "switchToPolygon": "Switch to Polygon",
53
+ "addToken": `Add token to MetaMask`
54
+ }
55
+ })
56
+ }
57
+ },
16
58
  setup(__props) {
59
+ const props = __props;
17
60
  const isMetaMaskInstalled = vue.ref(false);
18
61
  const isPolygon = vue.ref(false);
19
62
  const loading = vue.ref(false);
@@ -24,8 +67,9 @@ const _sfc_main = {
24
67
  try {
25
68
  await window.ethereum.request({ method: "eth_requestAccounts" });
26
69
  checkMetaMask();
27
- } catch (error2) {
28
- console.error("Ошибка при подключении MetaMask:", error2);
70
+ } catch (err) {
71
+ error.value = err.message;
72
+ console.error("Error connecting to MetaMask:", err);
29
73
  }
30
74
  } else {
31
75
  window.open("https://metamask.io/", "_blank");
@@ -35,7 +79,7 @@ const _sfc_main = {
35
79
  if (typeof window.ethereum !== "undefined") {
36
80
  isMetaMaskInstalled.value = true;
37
81
  const chainId = await window.ethereum.request({ method: "eth_chainId" });
38
- isPolygon.value = chainId === "0x89" || chainId === "0x13881";
82
+ isPolygon.value = chainId === props.targetChainId;
39
83
  } else {
40
84
  isMetaMaskInstalled.value = false;
41
85
  }
@@ -44,14 +88,15 @@ const _sfc_main = {
44
88
  try {
45
89
  await window.ethereum.request({
46
90
  method: "wallet_switchEthereumChain",
47
- params: [{ chainId: "0x89" }]
91
+ params: [{ chainId: props.targetChainId }]
48
92
  });
49
93
  checkMetaMask();
50
- } catch (error2) {
51
- console.error("Ошибка при переключении на Polygon:", error2);
94
+ } catch (err) {
95
+ error.value = err.message;
96
+ console.error("Error switching to Polygon:", err);
52
97
  }
53
98
  };
54
- const addWDT = async () => {
99
+ const addToken = async () => {
55
100
  buttonStyle.value["pointer-events"] = "none";
56
101
  error.value = null;
57
102
  loading.value = true;
@@ -61,22 +106,22 @@ const _sfc_main = {
61
106
  params: {
62
107
  type: "ERC20",
63
108
  options: {
64
- address: tokenAddress,
65
- symbol: tokenSymbol,
66
- decimals: tokenDecimals,
67
- image: tokenImage
109
+ address: props.tokenAddress,
110
+ symbol: props.tokenSymbol,
111
+ decimals: props.tokenDecimals,
112
+ image: props.tokenImage
68
113
  }
69
114
  }
70
115
  });
71
116
  buttonStyle.value["background-color"] = "#009911";
72
117
  loading.value = false;
73
118
  } catch (err) {
74
- error.value = err.toString();
119
+ error.value = err.message;
120
+ loading.value = false;
75
121
  }
76
122
  };
77
123
  const { t } = vueI18n.useI18n({
78
- useScope: "global",
79
- ...wallet.default
124
+ messages: props.content
80
125
  });
81
126
  vue.onMounted(() => {
82
127
  checkMetaMask();
@@ -88,12 +133,12 @@ const _sfc_main = {
88
133
  onClick: connectMetaMask,
89
134
  class: "transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
90
135
  }, [
91
- _cache[0] || (_cache[0] = vue.createElementVNode("img", {
136
+ vue.createElementVNode("img", {
92
137
  loading: "lazy",
93
- src: "/icons/metamask.svg",
138
+ src: __props.metamaskIcon,
94
139
  class: "mn-r-small i-big"
95
- }, null, -1)),
96
- vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(vue.unref(t)("wallet.connectMetaMask")), 1),
140
+ }, null, 8, _hoisted_1),
141
+ vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(vue.unref(t)("connectMetaMask")), 1),
97
142
  vue.createVNode(IconAdd.default, {
98
143
  class: "t-transp",
99
144
  fill: "rgb(var(--white))"
@@ -104,12 +149,12 @@ const _sfc_main = {
104
149
  onClick: switchToPolygon,
105
150
  class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small"
106
151
  }, [
107
- _cache[1] || (_cache[1] = vue.createElementVNode("img", {
152
+ vue.createElementVNode("img", {
108
153
  loading: "lazy",
109
- src: "/icons/metamask.svg",
154
+ src: __props.metamaskIcon,
110
155
  class: "mn-r-small i-big"
111
- }, null, -1)),
112
- vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(vue.unref(t)("wallet.switchToPolygon")), 1),
156
+ }, null, 8, _hoisted_3),
157
+ vue.createElementVNode("span", _hoisted_4, vue.toDisplayString(vue.unref(t)("switchToPolygon")), 1),
113
158
  vue.createVNode(IconAdd.default, {
114
159
  class: "t-transp",
115
160
  fill: "rgb(var(--white))"
@@ -117,18 +162,19 @@ const _sfc_main = {
117
162
  ])) : vue.createCommentVNode("", true),
118
163
  isPolygon.value ? (vue.openBlock(), vue.createElementBlock("button", {
119
164
  key: 1,
120
- onClick: addWDT,
165
+ onClick: addToken,
121
166
  class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
122
167
  }, [
123
- _cache[2] || (_cache[2] = vue.createElementVNode("img", {
168
+ vue.createElementVNode("img", {
124
169
  loading: "lazy",
125
- src: "/icons/metamask.svg",
170
+ src: __props.metamaskIcon,
126
171
  class: "mn-r-small i-big"
127
- }, null, -1)),
128
- vue.createElementVNode("span", _hoisted_3, vue.toDisplayString(vue.unref(t)("wallet.addToken")), 1),
172
+ }, null, 8, _hoisted_5),
173
+ vue.createElementVNode("span", _hoisted_6, vue.toDisplayString(vue.unref(t)("addToken")), 1),
129
174
  vue.createVNode(IconAdd.default, { class: "hover-fill-black fill-white t-transp" })
130
175
  ])) : vue.createCommentVNode("", true)
131
- ], 64))
176
+ ], 64)),
177
+ error.value ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7, vue.toDisplayString(error.value), 1)) : vue.createCommentVNode("", true)
132
178
  ]);
133
179
  };
134
180
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectMetamask.vue.cjs","sources":["../../../../../../../../src/modules/wallet/views/components/elements/ConnectMetamask.vue"],"sourcesContent":["<template>\n <div>\n <!-- Connect Metamask -->\n <button \n v-if=\"!isMetaMaskInstalled\"\n @click=\"connectMetaMask\" \n class=\"transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white\"\n >\n <img loading=\"lazy\" :src=\"'/icons/metamask.svg'\" class=\"mn-r-small i-big\" >\n <span class=\"h4 uppercase w-100\">{{ t('wallet.connectMetaMask') }}</span>\n <IconAdd class=\"t-transp\" fill=\"rgb(var(--white))\"/>\n </button>\n\n <template v-else>\n <!-- Switch to Polygon -->\n <button \n v-if=\"!isPolygon\"\n @click=\"switchToPolygon\" \n class=\"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small \"\n >\n <img loading=\"lazy\" :src=\"'/icons/metamask.svg'\" class=\"mn-r-small i-big\" >\n <span class=\"h4 uppercase w-100\">{{ t('wallet.switchToPolygon') }}</span>\n <IconAdd class=\"t-transp\" fill=\"rgb(var(--white))\" />\n </button>\n <!-- Add WDT to metamask -->\n <button \n v-if=\"isPolygon\"\n @click=\"addWDT\" \n class=\"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white\"\n >\n <img loading=\"lazy\" :src=\"'/icons/metamask.svg'\" class=\"mn-r-small i-big\" >\n <span class=\"h4 uppercase w-100\">{{ t('wallet.addToken') }}</span>\n <IconAdd class=\"hover-fill-black fill-white t-transp\"/>\n </button>\n </template>\n\n <!-- <p class=\"mn-t-small\" v-if=\"error\">{{ error }}</p> -->\n\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\n\nimport text from '@pf/src/modules/wallet/views/localization/wallet.json'\n\nimport IconAdd from '@pf/src/modules/icons/navigation/IconAdd.vue'\n\nconst isMetaMaskInstalled = ref(false);\nconst isPolygon = ref(false);\nconst loading = ref(false);\nconst error = ref(null);\nconst buttonStyle = ref({});\n\nconst tokenAddress = '0xE11702CF04621D395E75680C29d3dbF81484e875'; \nconst tokenSymbol = 'WDT';\nconst tokenDecimals = 8;\nconst tokenImage = 'https://weeder.delivery/logo-token.png';\n\nconst connectMetaMask = async () => {\n if (typeof window.ethereum !== 'undefined') {\n try {\n await window.ethereum.request({ method: 'eth_requestAccounts' });\n checkMetaMask();\n } catch (error) {\n console.error('Ошибка при подключении MetaMask:', error);\n }\n } else {\n window.open('https://metamask.io/', '_blank');\n }\n};\n\nconst checkMetaMask = async () => {\n if (typeof window.ethereum !== 'undefined') {\n isMetaMaskInstalled.value = true;\n const chainId = await window.ethereum.request({ method: 'eth_chainId' });\n isPolygon.value = chainId === '0x89' || chainId === '0x13881';\n } else {\n isMetaMaskInstalled.value = false;\n }\n};\n\nconst switchToPolygon = async () => {\n try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x89' }],\n });\n checkMetaMask();\n } catch (error) {\n console.error('Ошибка при переключении на Polygon:', error);\n }\n};\n\nconst addWDT = async () => {\n buttonStyle.value['pointer-events'] = 'none';\n error.value = null;\n loading.value = true;\n\n try {\n await ethereum.request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: tokenAddress,\n symbol: tokenSymbol,\n decimals: tokenDecimals,\n image: tokenImage,\n },\n },\n });\n\n buttonStyle.value['background-color'] = '#009911';\n loading.value = false;\n } catch (err) {\n error.value = err.toString();\n }\n};\n\nconst { t } = useI18n({\n useScope: 'global', \n ...text\n})\n\nonMounted(() => {\n checkMetaMask();\n});\n\n</script>"],"names":["ref","error","useI18n","text","onMounted"],"mappings":";;;;;;;;;AAuDA,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,gBAAgB;AACtB,MAAM,aAAa;;;;AATnB,UAAM,sBAAsBA,IAAAA,IAAI,KAAK;AACrC,UAAM,YAAYA,IAAAA,IAAI,KAAK;AAC3B,UAAM,UAAUA,IAAAA,IAAI,KAAK;AACzB,UAAM,QAAQA,IAAAA,IAAI,IAAI;AACtB,UAAM,cAAcA,IAAAA,IAAI,CAAA,CAAE;AAO1B,UAAM,kBAAkB,YAAY;AAClC,UAAI,OAAO,OAAO,aAAa,aAAa;AAC1C,YAAI;AACF,gBAAM,OAAO,SAAS,QAAQ,EAAE,QAAQ,sBAAqB,CAAE;AAC/D;QACD,SAAQC,QAAO;AACd,kBAAQ,MAAM,oCAAoCA,MAAK;AAAA,QACxD;AAAA,MACL,OAAS;AACL,eAAO,KAAK,wBAAwB,QAAQ;AAAA,MAC7C;AAAA,IACH;AAEA,UAAM,gBAAgB,YAAY;AAChC,UAAI,OAAO,OAAO,aAAa,aAAa;AAC1C,4BAAoB,QAAQ;AAC5B,cAAM,UAAU,MAAM,OAAO,SAAS,QAAQ,EAAE,QAAQ,cAAa,CAAE;AACvE,kBAAU,QAAQ,YAAY,UAAU,YAAY;AAAA,MACxD,OAAS;AACL,4BAAoB,QAAQ;AAAA,MAC7B;AAAA,IACH;AAEA,UAAM,kBAAkB,YAAY;AAClC,UAAI;AACF,cAAM,OAAO,SAAS,QAAQ;AAAA,UAC5B,QAAQ;AAAA,UACR,QAAQ,CAAC,EAAE,SAAS,QAAQ;AAAA,QAClC,CAAK;AACD;MACD,SAAQA,QAAO;AACd,gBAAQ,MAAM,uCAAuCA,MAAK;AAAA,MAC3D;AAAA,IACH;AAEA,UAAM,SAAS,YAAY;AACzB,kBAAY,MAAM,gBAAgB,IAAI;AACtC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAEhB,UAAI;AACF,cAAM,SAAS,QAAQ;AAAA,UACrB,QAAQ;AAAA,UACR,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,cACP,SAAS;AAAA,cACT,QAAQ;AAAA,cACR,UAAU;AAAA,cACV,OAAO;AAAA,YACR;AAAA,UACF;AAAA,QACP,CAAK;AAED,oBAAY,MAAM,kBAAkB,IAAI;AACxC,gBAAQ,QAAQ;AAAA,MACjB,SAAQ,KAAK;AACZ,cAAM,QAAQ,IAAI;MACnB;AAAA,IACH;AAEA,UAAM,EAAE,EAAG,IAAGC,gBAAQ;AAAA,MACpB,UAAU;AAAA,MACV,GAAGC,OAAI;AAAA,IACT,CAAC;AAEDC,QAAAA,UAAU,MAAM;AACd;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ConnectMetamask.vue.cjs","sources":["../../../../../../../../src/modules/wallet/views/components/elements/ConnectMetamask.vue"],"sourcesContent":["<template>\n <div>\n <!-- Connect Metamask -->\n <button \n v-if=\"!isMetaMaskInstalled\"\n @click=\"connectMetaMask\" \n class=\"transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white\"\n >\n <img loading=\"lazy\" :src=\"metamaskIcon\" class=\"mn-r-small i-big\">\n <span class=\"h4 uppercase w-100\">{{ t('connectMetaMask') }}</span>\n <IconAdd class=\"t-transp\" fill=\"rgb(var(--white))\"/>\n </button>\n <template v-else>\n <!-- Switch to Polygon -->\n <button \n v-if=\"!isPolygon\"\n @click=\"switchToPolygon\" \n class=\"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small\"\n >\n <img loading=\"lazy\" :src=\"metamaskIcon\" class=\"mn-r-small i-big\">\n <span class=\"h4 uppercase w-100\">{{ t('switchToPolygon') }}</span>\n <IconAdd class=\"t-transp\" fill=\"rgb(var(--white))\"/>\n </button>\n <!-- Add Token to metamask -->\n <button \n v-if=\"isPolygon\"\n @click=\"addToken\" \n class=\"transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white\"\n >\n <img loading=\"lazy\" :src=\"metamaskIcon\" class=\"mn-r-small i-big\">\n <span class=\"h4 uppercase w-100\">{{ t('addToken') }}</span>\n <IconAdd class=\"hover-fill-black fill-white t-transp\"/>\n </button>\n </template>\n <p class=\"mn-t-small\" v-if=\"error\">{{ error }}</p>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\n\nimport IconAdd from '@pf/src/modules/icons/navigation/IconAdd.vue';\n\nconst props = defineProps({\n // Token configuration\n tokenAddress: {\n type: String,\n required: true\n },\n tokenSymbol: {\n type: String,\n required: true\n },\n tokenImage: {\n type: String,\n required: true\n },\n tokenDecimals: {\n type: Number,\n default: 18\n },\n // Chain configuration\n targetChainId: {\n type: String,\n default: '0x89' // Polygon Mainnet by default\n },\n // UI configuration\n metamaskIcon: {\n type: String,\n default: '/icons/metamask.svg'\n },\n content: {\n type: Object,\n default: () => ({\n en: {\n \"connectMetaMask\": \"Connect MetaMask\",\n \"switchToPolygon\": \"Switch to Polygon\",\n \"addToken\": `Add token to MetaMask`,\n }\n })\n }\n});\n\nconst isMetaMaskInstalled = ref(false);\nconst isPolygon = ref(false);\nconst loading = ref(false);\nconst error = ref(null);\nconst buttonStyle = ref({});\n\nconst connectMetaMask = async () => {\n if (typeof window.ethereum !== 'undefined') {\n try {\n await window.ethereum.request({ method: 'eth_requestAccounts' });\n checkMetaMask();\n } catch (err) {\n error.value = err.message;\n console.error('Error connecting to MetaMask:', err);\n }\n } else {\n window.open('https://metamask.io/', '_blank');\n }\n};\n\nconst checkMetaMask = async () => {\n if (typeof window.ethereum !== 'undefined') {\n isMetaMaskInstalled.value = true;\n const chainId = await window.ethereum.request({ method: 'eth_chainId' });\n isPolygon.value = chainId === props.targetChainId;\n } else {\n isMetaMaskInstalled.value = false;\n }\n};\n\nconst switchToPolygon = async () => {\n try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: props.targetChainId }],\n });\n checkMetaMask();\n } catch (err) {\n error.value = err.message;\n console.error('Error switching to Polygon:', err);\n }\n};\n\nconst addToken = async () => {\n buttonStyle.value['pointer-events'] = 'none';\n error.value = null;\n loading.value = true;\n \n try {\n await ethereum.request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: props.tokenAddress,\n symbol: props.tokenSymbol,\n decimals: props.tokenDecimals,\n image: props.tokenImage,\n },\n },\n });\n buttonStyle.value['background-color'] = '#009911';\n loading.value = false;\n } catch (err) {\n error.value = err.message;\n loading.value = false;\n }\n};\n\nconst { t } = useI18n({\n messages: props.content\n});\n\nonMounted(() => {\n checkMetaMask();\n});\n</script>"],"names":["ref","useI18n","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,UAAM,QAAQ;AAwCd,UAAM,sBAAsBA,IAAAA,IAAI,KAAK;AACrC,UAAM,YAAYA,IAAAA,IAAI,KAAK;AAC3B,UAAM,UAAUA,IAAAA,IAAI,KAAK;AACzB,UAAM,QAAQA,IAAAA,IAAI,IAAI;AACtB,UAAM,cAAcA,IAAAA,IAAI,CAAA,CAAE;AAE1B,UAAM,kBAAkB,YAAY;AAClC,UAAI,OAAO,OAAO,aAAa,aAAa;AAC1C,YAAI;AACF,gBAAM,OAAO,SAAS,QAAQ,EAAE,QAAQ,sBAAqB,CAAE;AAC/D;QACD,SAAQ,KAAK;AACZ,gBAAM,QAAQ,IAAI;AAClB,kBAAQ,MAAM,iCAAiC,GAAG;AAAA,QACnD;AAAA,MACL,OAAS;AACL,eAAO,KAAK,wBAAwB,QAAQ;AAAA,MAC7C;AAAA,IACH;AAEA,UAAM,gBAAgB,YAAY;AAChC,UAAI,OAAO,OAAO,aAAa,aAAa;AAC1C,4BAAoB,QAAQ;AAC5B,cAAM,UAAU,MAAM,OAAO,SAAS,QAAQ,EAAE,QAAQ,cAAa,CAAE;AACvE,kBAAU,QAAQ,YAAY,MAAM;AAAA,MACxC,OAAS;AACL,4BAAoB,QAAQ;AAAA,MAC7B;AAAA,IACH;AAEA,UAAM,kBAAkB,YAAY;AAClC,UAAI;AACF,cAAM,OAAO,SAAS,QAAQ;AAAA,UAC5B,QAAQ;AAAA,UACR,QAAQ,CAAC,EAAE,SAAS,MAAM,cAAa,CAAE;AAAA,QAC/C,CAAK;AACD;MACD,SAAQ,KAAK;AACZ,cAAM,QAAQ,IAAI;AAClB,gBAAQ,MAAM,+BAA+B,GAAG;AAAA,MACjD;AAAA,IACH;AAEA,UAAM,WAAW,YAAY;AAC3B,kBAAY,MAAM,gBAAgB,IAAI;AACtC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAEhB,UAAI;AACF,cAAM,SAAS,QAAQ;AAAA,UACrB,QAAQ;AAAA,UACR,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,cACP,SAAS,MAAM;AAAA,cACf,QAAQ,MAAM;AAAA,cACd,UAAU,MAAM;AAAA,cAChB,OAAO,MAAM;AAAA,YACd;AAAA,UACF;AAAA,QACP,CAAK;AACD,oBAAY,MAAM,kBAAkB,IAAI;AACxC,gBAAQ,QAAQ;AAAA,MACjB,SAAQ,KAAK;AACZ,cAAM,QAAQ,IAAI;AAClB,gBAAQ,QAAQ;AAAA,MACjB;AAAA,IACH;AAEA,UAAM,EAAE,EAAG,IAAGC,gBAAQ;AAAA,MACpB,UAAU,MAAM;AAAA,IAClB,CAAC;AAEDC,QAAAA,UAAU,MAAM;AACd;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,60 @@
1
1
  import { ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Fragment, createCommentVNode } from "vue";
2
2
  import { useI18n } from "vue-i18n";
3
- import text from "../../localization/wallet.json.js";
4
3
  import _sfc_main$1 from "../../../../icons/navigation/IconAdd.vue.js";
5
- const _hoisted_1 = { class: "h4 uppercase w-100" };
4
+ const _hoisted_1 = ["src"];
6
5
  const _hoisted_2 = { class: "h4 uppercase w-100" };
7
- const _hoisted_3 = { class: "h4 uppercase w-100" };
8
- const tokenAddress = "0xE11702CF04621D395E75680C29d3dbF81484e875";
9
- const tokenSymbol = "WDT";
10
- const tokenDecimals = 8;
11
- const tokenImage = "https://weeder.delivery/logo-token.png";
6
+ const _hoisted_3 = ["src"];
7
+ const _hoisted_4 = { class: "h4 uppercase w-100" };
8
+ const _hoisted_5 = ["src"];
9
+ const _hoisted_6 = { class: "h4 uppercase w-100" };
10
+ const _hoisted_7 = {
11
+ key: 2,
12
+ class: "mn-t-small"
13
+ };
12
14
  const _sfc_main = {
13
15
  __name: "ConnectMetamask",
16
+ props: {
17
+ // Token configuration
18
+ tokenAddress: {
19
+ type: String,
20
+ required: true
21
+ },
22
+ tokenSymbol: {
23
+ type: String,
24
+ required: true
25
+ },
26
+ tokenImage: {
27
+ type: String,
28
+ required: true
29
+ },
30
+ tokenDecimals: {
31
+ type: Number,
32
+ default: 18
33
+ },
34
+ // Chain configuration
35
+ targetChainId: {
36
+ type: String,
37
+ default: "0x89"
38
+ // Polygon Mainnet by default
39
+ },
40
+ // UI configuration
41
+ metamaskIcon: {
42
+ type: String,
43
+ default: "/icons/metamask.svg"
44
+ },
45
+ content: {
46
+ type: Object,
47
+ default: () => ({
48
+ en: {
49
+ "connectMetaMask": "Connect MetaMask",
50
+ "switchToPolygon": "Switch to Polygon",
51
+ "addToken": `Add token to MetaMask`
52
+ }
53
+ })
54
+ }
55
+ },
14
56
  setup(__props) {
57
+ const props = __props;
15
58
  const isMetaMaskInstalled = ref(false);
16
59
  const isPolygon = ref(false);
17
60
  const loading = ref(false);
@@ -22,8 +65,9 @@ const _sfc_main = {
22
65
  try {
23
66
  await window.ethereum.request({ method: "eth_requestAccounts" });
24
67
  checkMetaMask();
25
- } catch (error2) {
26
- console.error("Ошибка при подключении MetaMask:", error2);
68
+ } catch (err) {
69
+ error.value = err.message;
70
+ console.error("Error connecting to MetaMask:", err);
27
71
  }
28
72
  } else {
29
73
  window.open("https://metamask.io/", "_blank");
@@ -33,7 +77,7 @@ const _sfc_main = {
33
77
  if (typeof window.ethereum !== "undefined") {
34
78
  isMetaMaskInstalled.value = true;
35
79
  const chainId = await window.ethereum.request({ method: "eth_chainId" });
36
- isPolygon.value = chainId === "0x89" || chainId === "0x13881";
80
+ isPolygon.value = chainId === props.targetChainId;
37
81
  } else {
38
82
  isMetaMaskInstalled.value = false;
39
83
  }
@@ -42,14 +86,15 @@ const _sfc_main = {
42
86
  try {
43
87
  await window.ethereum.request({
44
88
  method: "wallet_switchEthereumChain",
45
- params: [{ chainId: "0x89" }]
89
+ params: [{ chainId: props.targetChainId }]
46
90
  });
47
91
  checkMetaMask();
48
- } catch (error2) {
49
- console.error("Ошибка при переключении на Polygon:", error2);
92
+ } catch (err) {
93
+ error.value = err.message;
94
+ console.error("Error switching to Polygon:", err);
50
95
  }
51
96
  };
52
- const addWDT = async () => {
97
+ const addToken = async () => {
53
98
  buttonStyle.value["pointer-events"] = "none";
54
99
  error.value = null;
55
100
  loading.value = true;
@@ -59,22 +104,22 @@ const _sfc_main = {
59
104
  params: {
60
105
  type: "ERC20",
61
106
  options: {
62
- address: tokenAddress,
63
- symbol: tokenSymbol,
64
- decimals: tokenDecimals,
65
- image: tokenImage
107
+ address: props.tokenAddress,
108
+ symbol: props.tokenSymbol,
109
+ decimals: props.tokenDecimals,
110
+ image: props.tokenImage
66
111
  }
67
112
  }
68
113
  });
69
114
  buttonStyle.value["background-color"] = "#009911";
70
115
  loading.value = false;
71
116
  } catch (err) {
72
- error.value = err.toString();
117
+ error.value = err.message;
118
+ loading.value = false;
73
119
  }
74
120
  };
75
121
  const { t } = useI18n({
76
- useScope: "global",
77
- ...text
122
+ messages: props.content
78
123
  });
79
124
  onMounted(() => {
80
125
  checkMetaMask();
@@ -86,12 +131,12 @@ const _sfc_main = {
86
131
  onClick: connectMetaMask,
87
132
  class: "transition-ease-in-out cursor-pointer bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
88
133
  }, [
89
- _cache[0] || (_cache[0] = createElementVNode("img", {
134
+ createElementVNode("img", {
90
135
  loading: "lazy",
91
- src: "/icons/metamask.svg",
136
+ src: __props.metamaskIcon,
92
137
  class: "mn-r-small i-big"
93
- }, null, -1)),
94
- createElementVNode("span", _hoisted_1, toDisplayString(unref(t)("wallet.connectMetaMask")), 1),
138
+ }, null, 8, _hoisted_1),
139
+ createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("connectMetaMask")), 1),
95
140
  createVNode(_sfc_main$1, {
96
141
  class: "t-transp",
97
142
  fill: "rgb(var(--white))"
@@ -102,12 +147,12 @@ const _sfc_main = {
102
147
  onClick: switchToPolygon,
103
148
  class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black t-white radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small"
104
149
  }, [
105
- _cache[1] || (_cache[1] = createElementVNode("img", {
150
+ createElementVNode("img", {
106
151
  loading: "lazy",
107
- src: "/icons/metamask.svg",
152
+ src: __props.metamaskIcon,
108
153
  class: "mn-r-small i-big"
109
- }, null, -1)),
110
- createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("wallet.switchToPolygon")), 1),
154
+ }, null, 8, _hoisted_3),
155
+ createElementVNode("span", _hoisted_4, toDisplayString(unref(t)("switchToPolygon")), 1),
111
156
  createVNode(_sfc_main$1, {
112
157
  class: "t-transp",
113
158
  fill: "rgb(var(--white))"
@@ -115,18 +160,19 @@ const _sfc_main = {
115
160
  ])) : createCommentVNode("", true),
116
161
  isPolygon.value ? (openBlock(), createElementBlock("button", {
117
162
  key: 1,
118
- onClick: addWDT,
163
+ onClick: addToken,
119
164
  class: "transition-ease-in-out cursor-pointer hover-bg-white hover-t-black bg-black radius-big flex-v-center flex-nowrap flex t-left uppercase w-100 pd-small t-white"
120
165
  }, [
121
- _cache[2] || (_cache[2] = createElementVNode("img", {
166
+ createElementVNode("img", {
122
167
  loading: "lazy",
123
- src: "/icons/metamask.svg",
168
+ src: __props.metamaskIcon,
124
169
  class: "mn-r-small i-big"
125
- }, null, -1)),
126
- createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("wallet.addToken")), 1),
170
+ }, null, 8, _hoisted_5),
171
+ createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("addToken")), 1),
127
172
  createVNode(_sfc_main$1, { class: "hover-fill-black fill-white t-transp" })
128
173
  ])) : createCommentVNode("", true)
129
- ], 64))
174
+ ], 64)),
175
+ error.value ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(error.value), 1)) : createCommentVNode("", true)
130
176
  ]);
131
177
  };
132
178
  }