@ozdao/prometheus-framework 0.2.133 → 0.2.134

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. package/dist/_virtual/alignment-pattern.cjs +1 -0
  2. package/dist/_virtual/alignment-pattern.js +4 -0
  3. package/dist/_virtual/browser.cjs +1 -0
  4. package/dist/_virtual/browser.js +4 -0
  5. package/dist/_virtual/canvas.cjs +1 -0
  6. package/dist/_virtual/canvas.js +4 -0
  7. package/dist/_virtual/dijkstra.cjs +1 -0
  8. package/dist/_virtual/dijkstra.js +4 -0
  9. package/dist/_virtual/error-correction-code.cjs +1 -0
  10. package/dist/_virtual/error-correction-code.js +4 -0
  11. package/dist/_virtual/error-correction-level.cjs +1 -0
  12. package/dist/_virtual/error-correction-level.js +4 -0
  13. package/dist/_virtual/finder-pattern.cjs +1 -0
  14. package/dist/_virtual/finder-pattern.js +4 -0
  15. package/dist/_virtual/format-info.cjs +1 -0
  16. package/dist/_virtual/format-info.js +4 -0
  17. package/dist/_virtual/galois-field.cjs +1 -0
  18. package/dist/_virtual/galois-field.js +4 -0
  19. package/dist/_virtual/mask-pattern.cjs +1 -0
  20. package/dist/_virtual/mask-pattern.js +4 -0
  21. package/dist/_virtual/mode.cjs +1 -0
  22. package/dist/_virtual/mode.js +4 -0
  23. package/dist/_virtual/polynomial.cjs +1 -0
  24. package/dist/_virtual/polynomial.js +4 -0
  25. package/dist/_virtual/qrcode.cjs +1 -0
  26. package/dist/_virtual/qrcode.js +4 -0
  27. package/dist/_virtual/regex.cjs +1 -0
  28. package/dist/_virtual/regex.js +4 -0
  29. package/dist/_virtual/segments.cjs +1 -0
  30. package/dist/_virtual/segments.js +4 -0
  31. package/dist/_virtual/svg-tag.cjs +1 -0
  32. package/dist/_virtual/svg-tag.js +4 -0
  33. package/dist/_virtual/utils.cjs +1 -0
  34. package/dist/_virtual/utils.js +4 -0
  35. package/dist/_virtual/utils2.cjs +1 -0
  36. package/dist/_virtual/utils2.js +4 -0
  37. package/dist/_virtual/version-check.cjs +1 -0
  38. package/dist/_virtual/version-check.js +4 -0
  39. package/dist/_virtual/version.cjs +1 -0
  40. package/dist/_virtual/version.js +4 -0
  41. package/dist/auth.server.js +1 -1
  42. package/dist/auth.server.mjs +1 -1
  43. package/dist/community.server.js +1 -1
  44. package/dist/community.server.mjs +1 -1
  45. package/dist/events.server.js +1 -1
  46. package/dist/events.server.mjs +1 -1
  47. package/dist/files.server.js +1 -1
  48. package/dist/files.server.mjs +1 -1
  49. package/dist/gallery.server.js +1 -1
  50. package/dist/gallery.server.mjs +1 -1
  51. package/dist/index-C-8xOJnM.mjs +244 -0
  52. package/dist/index-CDbtWkBj.js +243 -0
  53. package/dist/main-5IrI2IOV.js +92 -0
  54. package/dist/main-BY2OvGB9.mjs +14509 -0
  55. package/dist/main.css +1 -1
  56. package/dist/middlewares.server.js +1 -1
  57. package/dist/middlewares.server.mjs +1 -1
  58. package/dist/node_modules/dijkstrajs/dijkstra.cjs +1 -0
  59. package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
  60. package/dist/node_modules/encode-utf8/index.cjs +1 -0
  61. package/dist/node_modules/encode-utf8/index.js +30 -0
  62. package/dist/node_modules/qrcode/lib/browser.cjs +1 -0
  63. package/dist/node_modules/qrcode/lib/browser.js +45 -0
  64. package/dist/node_modules/qrcode/lib/can-promise.cjs +1 -0
  65. package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
  66. package/dist/node_modules/qrcode/lib/core/alignment-pattern.cjs +1 -0
  67. package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
  68. package/dist/node_modules/qrcode/lib/core/alphanumeric-data.cjs +1 -0
  69. package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
  70. package/dist/node_modules/qrcode/lib/core/bit-buffer.cjs +1 -0
  71. package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
  72. package/dist/node_modules/qrcode/lib/core/bit-matrix.cjs +1 -0
  73. package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
  74. package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -0
  75. package/dist/node_modules/qrcode/lib/core/byte-data.js +24 -0
  76. package/dist/node_modules/qrcode/lib/core/error-correction-code.cjs +1 -0
  77. package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
  78. package/dist/node_modules/qrcode/lib/core/error-correction-level.cjs +1 -0
  79. package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
  80. package/dist/node_modules/qrcode/lib/core/finder-pattern.cjs +1 -0
  81. package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
  82. package/dist/node_modules/qrcode/lib/core/format-info.cjs +1 -0
  83. package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
  84. package/dist/node_modules/qrcode/lib/core/galois-field.cjs +1 -0
  85. package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
  86. package/dist/node_modules/qrcode/lib/core/kanji-data.cjs +2 -0
  87. package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
  88. package/dist/node_modules/qrcode/lib/core/mask-pattern.cjs +1 -0
  89. package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
  90. package/dist/node_modules/qrcode/lib/core/mode.cjs +1 -0
  91. package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
  92. package/dist/node_modules/qrcode/lib/core/numeric-data.cjs +1 -0
  93. package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
  94. package/dist/node_modules/qrcode/lib/core/polynomial.cjs +1 -0
  95. package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
  96. package/dist/node_modules/qrcode/lib/core/qrcode.cjs +4 -0
  97. package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
  98. package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +1 -0
  99. package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
  100. package/dist/node_modules/qrcode/lib/core/regex.cjs +2 -0
  101. package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
  102. package/dist/node_modules/qrcode/lib/core/segments.cjs +2 -0
  103. package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
  104. package/dist/node_modules/qrcode/lib/core/utils.cjs +1 -0
  105. package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
  106. package/dist/node_modules/qrcode/lib/core/version-check.cjs +1 -0
  107. package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
  108. package/dist/node_modules/qrcode/lib/core/version.cjs +1 -0
  109. package/dist/node_modules/qrcode/lib/core/version.js +74 -0
  110. package/dist/node_modules/qrcode/lib/renderer/canvas.cjs +1 -0
  111. package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
  112. package/dist/node_modules/qrcode/lib/renderer/svg-tag.cjs +2 -0
  113. package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
  114. package/dist/node_modules/qrcode/lib/renderer/utils.cjs +1 -0
  115. package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
  116. package/dist/orders.server.js +1 -1
  117. package/dist/orders.server.mjs +1 -1
  118. package/dist/organizations.server.js +1 -1
  119. package/dist/organizations.server.mjs +1 -1
  120. package/dist/products.server.js +1 -1
  121. package/dist/products.server.mjs +1 -1
  122. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  124. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
  126. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
  128. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  130. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +16 -16
  134. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +16 -16
  136. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +13 -13
  138. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +36 -36
  140. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +29 -29
  142. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  150. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +23 -23
  152. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  154. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +14 -14
  156. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  160. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +12 -12
  164. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +21 -21
  166. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  170. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
  172. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  174. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
  176. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  178. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  180. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  182. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  184. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
  186. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
  188. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  190. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  192. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  196. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  198. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +8 -8
  200. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  202. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +12 -12
  204. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +16 -16
  206. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  208. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +19 -19
  210. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +7 -7
  214. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  215. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  216. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  218. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  219. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
  220. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  221. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +18 -18
  222. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  223. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +32 -32
  224. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  225. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +10 -10
  226. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  227. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +5 -5
  228. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  229. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  230. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  231. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  232. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  234. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  236. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +9 -9
  238. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  239. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
  240. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
  241. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
  242. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
  243. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
  244. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
  245. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
  246. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
  247. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
  248. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
  249. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
  250. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +140 -125
  252. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
  253. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
  254. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
  256. package/dist/prometheus-framework.cjs.js +1 -1
  257. package/dist/prometheus-framework.es.js +1 -1
  258. package/dist/reports.server.js +1 -1
  259. package/dist/reports.server.mjs +1 -1
  260. package/dist/style.css +1 -1
  261. package/dist/wallet.server.js +103 -13
  262. package/dist/wallet.server.mjs +103 -13
  263. package/dist/web-5eyiz9L7.mjs +54 -0
  264. package/dist/web-C04IcLk4.js +1 -0
  265. package/package.json +1 -1
  266. package/src/components/Field/Field.vue +1 -1
  267. package/src/modules/community/components/pages/Blog.vue +1 -1
  268. package/src/modules/globals/components/partials/Header.vue +2 -2
  269. package/src/modules/globals/localization/vue-i18n.js +5 -5
  270. package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
  271. package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
  272. package/src/modules/middlewares/server/authSecret.js +22 -0
  273. package/src/modules/middlewares/server/index.js +7 -5
  274. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
  275. package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
  276. package/src/modules/wallet/models/wallet.model.js +5 -5
  277. package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
  278. package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
  279. package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
  280. package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
  281. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
  282. package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
  283. package/src/modules/wallet/views/localization/wallet.json +37 -0
  284. package/src/modules/wallet/views/store/wallet.store.js +145 -28
  285. package/src/modules/wallet/wallet.server.js +2 -2
  286. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
  287. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
  288. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
  289. package/src/modules/wallet/localization/Wallet.json +0 -22
  290. /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -1,182 +1,197 @@
1
- import { onMounted as g, ref as f, openBlock as n, createElementBlock as a, Fragment as h, createElementVNode as t, unref as s, toDisplayString as r, createCommentVNode as i, renderList as k, createVNode as x, withCtx as v, createBlock as p } from "vue";
2
- import { state as l, actions as d } from "../../store/wallet.store.js";
3
- import y from "web3";
1
+ import { onMounted as y, ref as w, openBlock as n, createElementBlock as i, createElementVNode as t, toDisplayString as r, unref as e, createVNode as _, withCtx as k, createTextVNode as C, createCommentVNode as a, Fragment as g, renderList as x, createBlock as u } from "vue";
2
+ import { useI18n as M } from "vue-i18n";
3
+ import W from "web3";
4
+ import { state as l, actions as m } from "../../store/wallet.store.js";
5
+ import $ from "../../localization/wallet.json.js";
6
+ import S from "../../../../../components/Popup/Popup.vue.js";
7
+ import P from "../../../../../components/Button/Button.vue.js";
4
8
  import "vue-router";
5
- import C from "../../../../../components/Popup/Popup.vue2.js";
6
- /* empty css */
7
- /* empty css */
8
- /* empty css */
9
+ /* empty css */
9
10
  import "../../../../reports/store/reports.js";
10
11
  /* empty css */
11
- /* empty css */
12
+ /* empty css */
12
13
  import "../../../../auth/store/auth.js";
13
14
  import "../../../../organizations/store/memberships.js";
14
15
  import "../../../../community/store/reactions.js";
15
- /* empty css */
16
- import W from "../../../components/blocks/CashDeposite.vue.js";
17
- import M from "../../../components/blocks/CardDeposite.vue.js";
18
- import $ from "../../../components/blocks/CryptoDeposite.vue.js";
19
- import R from "../../../components/blocks/CardBalanceReplenished.vue.js";
20
- const P = { class: "pd-thin" }, B = { class: "bg-black t-white mn-b-thin radius-big pd-big" }, S = /* @__PURE__ */ t("h1", { class: "mn-b-medium" }, "Your Wallet", -1), D = /* @__PURE__ */ t("p", { class: "mn-b-semi t-transp p-big" }, " Earn Weeder Tokens by purchasing our weed or contributing to the community. ", -1), T = {
16
+ /* empty css */
17
+ import B from "../elements/ConnectMetamask.vue.js";
18
+ import R from "../blocks/CashDeposit.vue.js";
19
+ import D from "../blocks/CardDeposit.vue.js";
20
+ import T from "../blocks/CryptoDeposit.vue.js";
21
+ import G from "../blocks/CardBalanceReplenished.vue.js";
22
+ import N from "../blocks/CryptoDepositProcessing.vue.js";
23
+ const V = { class: "pd-thin" }, A = { class: "bg-black t-white mn-b-thin radius-big pd-big" }, E = { class: "mn-b-medium" }, O = { class: "mn-b-semi t-transp p-big" }, L = {
21
24
  key: 0,
22
25
  class: "gap-thin mn-b-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"
23
- }, G = { class: "flex-v-center flex-nowrap flex mn-r-auto" }, E = {
26
+ }, Y = { class: "flex-v-center flex-nowrap flex mn-r-auto" }, F = {
24
27
  key: 1,
25
28
  class: "w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"
26
- }, A = /* @__PURE__ */ t("p", { class: "t-transp t-medium mn-b-thin" }, "You own:", -1), N = { class: "h1 mn-b-small" }, O = /* @__PURE__ */ t("p", { class: "t-white p-big t-medium mn-b-semi" }, "of all shares", -1), V = { class: "flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra" }, Y = {
29
+ }, H = /* @__PURE__ */ t("p", { class: "t-transp t-medium mn-b-thin" }, "You own:", -1), I = { class: "h1 mn-b-small" }, j = /* @__PURE__ */ t("p", { class: "t-white p-big t-medium mn-b-semi" }, "of all shares", -1), q = { class: "flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra" }, z = {
27
30
  key: 0,
28
31
  class: "t-transp t-medium"
29
- }, L = /* @__PURE__ */ t("span", { class: "uppercase p-small t-medium t-transp" }, "Connected Metamask", -1), F = /* @__PURE__ */ t("br", null, null, -1), H = {
32
+ }, J = /* @__PURE__ */ t("span", { class: "uppercase p-small t-medium t-transp" }, "Connected Metamask", -1), K = /* @__PURE__ */ t("br", null, null, -1), Q = {
30
33
  key: 0,
31
34
  class: "mn-b-semi cols-2 gap-thin"
32
- }, j = /* @__PURE__ */ t("div", { class: "w-100 pd-medium radius-medium t-center bg-light" }, [
35
+ }, U = /* @__PURE__ */ t("div", { class: "w-100 pd-medium radius-medium t-center bg-light" }, [
33
36
  /* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Make first order and start earning Weeder Token"),
34
37
  /* @__PURE__ */ t("button", { class: "mn-l-auto mn-r-auto bg-main button" }, "Explore marketplace")
35
- ], -1), q = { class: "w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light" }, z = {
38
+ ], -1), X = { class: "w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light" }, Z = {
36
39
  key: 0,
37
40
  class: "mn-b-small"
38
- }, I = {
41
+ }, tt = {
39
42
  key: 1,
40
43
  class: "mn-b-small"
41
- }, J = { class: "cols-3 gap-thin" }, K = { class: "radius-medium bg-light" }, Q = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, U = { class: "t-semi mn-r-auto" }, X = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, Z = { class: "pd-medium" }, tt = { class: "t-regular mn-b-thin" }, et = {
44
+ }, et = { class: "cols-3 gap-thin" }, st = { class: "radius-medium bg-light" }, nt = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, ot = { class: "t-semi mn-r-auto" }, lt = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, it = { class: "pd-medium" }, at = { class: "t-regular mn-b-thin" }, rt = {
42
45
  key: 2,
43
46
  class: "mn-b-small"
44
- }, st = { class: "cols-3 gap-thin" }, nt = { class: "radius-medium bg-grey" }, ot = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, lt = { class: "t-semi mn-r-auto" }, at = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, it = { class: "pd-medium" }, rt = { class: "t-regular mn-b-thin" }, ct = { key: 0 }, dt = /* @__PURE__ */ t("h2", { class: "mn-b-small t-center t-bold" }, "Choose the way of deposit", -1), St = {
47
+ }, ct = { class: "cols-3 gap-thin" }, mt = { class: "radius-medium bg-grey" }, dt = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, ut = { class: "t-semi mn-r-auto" }, pt = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, bt = { class: "pd-medium" }, ht = { class: "t-regular mn-b-thin" }, _t = { key: 0 }, ft = /* @__PURE__ */ t("h2", { class: "mn-b-small t-center t-bold" }, "Choose the way of deposit", -1), Yt = {
45
48
  __name: "Wallet",
46
- setup(mt) {
47
- window.ethereum.on("accountsChanged", (u) => {
48
- u.length < 1 && (l.account = null);
49
- }), l.web3 = new y(window.ethereum || "http://localhost:8080"), g(() => {
50
- d.listRewards(), d.tryReconnectWallet();
49
+ setup(wt) {
50
+ const { t: b } = M({
51
+ useScope: "global",
52
+ ...$
51
53
  });
52
- const b = f(!1), m = f(0);
53
- function c(u) {
54
- m.value = u;
54
+ window.ethereum.on("accountsChanged", (p) => {
55
+ p.length < 1 && (l.account = null);
56
+ }), l.web3 = new W(window.ethereum || "http://localhost:8080"), y(() => {
57
+ m.listRewards(), m.tryReconnectWallet();
58
+ });
59
+ const h = w(!1), d = w(0);
60
+ function c(p) {
61
+ d.value = p;
55
62
  }
56
- function w() {
57
- b.value = !0;
63
+ function v() {
64
+ h.value = !0;
58
65
  }
59
- function _() {
60
- b.value = !1, m.value = 0;
66
+ function f() {
67
+ h.value = !1, d.value = 0, m.stopTimer(), m.disconnectWebSocket();
61
68
  }
62
- return (u, o) => (n(), a(h, null, [
63
- t("section", P, [
64
- t("section", B, [
65
- S,
66
- D,
67
- s(l).account ? (n(), a("div", T, [
68
- t("div", G, [
69
- t("h2", null, r(s(l).tokenBalance) + " WDT", 1)
69
+ return (p, o) => (n(), i("div", V, [
70
+ t("section", A, [
71
+ t("h1", E, r(e(b)("wallet.title")), 1),
72
+ t("p", O, r(e(b)("wallet.subtitle")), 1),
73
+ e(l).account ? (n(), i("div", L, [
74
+ t("div", Y, [
75
+ t("h2", null, r(e(l).tokenBalance) + " " + r(e(b)("wallet.token")), 1)
76
+ ]),
77
+ t("button", {
78
+ onClick: v,
79
+ class: "t-nowrap w-max bg-main t-medium button"
80
+ }, "Get More"),
81
+ _(P, {
82
+ submit: e(m).collectRewards,
83
+ class: "w-max bg-white t-black t-medium button"
84
+ }, {
85
+ default: k(() => [
86
+ C(" Withdraw ")
70
87
  ]),
71
- t("button", {
72
- onClick: w,
73
- class: "w-max bg-main t-medium button"
74
- }, "Get More"),
75
- t("button", {
76
- class: "w-max bg-white t-black t-medium button",
77
- onClick: o[0] || (o[0] = (...e) => s(d).collectRewards && s(d).collectRewards(...e))
78
- }, "Withdraw")
79
- ])) : i("", !0),
80
- s(l).account ? (n(), a("div", E, [
81
- A,
82
- t("p", N, r(s(l).share) + "%", 1),
83
- O,
84
- t("div", V, [
85
- s(l).account ? (n(), a("p", Y, [
86
- L,
87
- F,
88
- t("span", null, r(s(l).account), 1)
89
- ])) : i("", !0),
90
- s(l).account ? (n(), a("button", {
91
- key: 1,
92
- onClick: o[1] || (o[1] = (...e) => s(d).disconnectWallet && s(d).disconnectWallet(...e)),
93
- class: "mn-l-auto bg-red button"
94
- }, " Disconnect Wallet ")) : i("", !0)
95
- ])
96
- ])) : i("", !0)
97
- ]),
98
- s(l).account ? i("", !0) : (n(), a("div", H, [
88
+ _: 1
89
+ }, 8, ["submit"])
90
+ ])) : a("", !0),
91
+ _(B, { class: "mn-b-thin radius-extra br-solid br-white-transp-10 br-1px w-100" }),
92
+ e(l).account ? (n(), i("div", F, [
93
+ H,
94
+ t("p", I, r(e(l).share) + "%", 1),
99
95
  j,
100
96
  t("div", q, [
101
- s(l).account ? i("", !0) : (n(), a("h3", z, " Connect Metamask to withdrawal your earnings. ")),
102
- s(l).account ? i("", !0) : (n(), a("button", {
97
+ e(l).account ? (n(), i("p", z, [
98
+ J,
99
+ K,
100
+ t("span", null, r(e(l).account), 1)
101
+ ])) : a("", !0),
102
+ e(l).account ? (n(), i("button", {
103
103
  key: 1,
104
- onClick: o[2] || (o[2] = (...e) => s(d).connectWallet && s(d).connectWallet(...e)),
105
- class: "br-solid br-2px br-black-transp-10 t-black button"
106
- }, " Connect Wallet "))
104
+ onClick: o[0] || (o[0] = (...s) => e(m).disconnectWallet && e(m).disconnectWallet(...s)),
105
+ class: "mn-l-auto bg-red button"
106
+ }, " Disconnect Wallet ")) : a("", !0)
107
107
  ])
108
- ])),
109
- s(l).rewards.length > 0 ? (n(), a("h2", I, "Latest Rewards ")) : i("", !0),
110
- t("section", J, [
111
- (n(!0), a(h, null, k(s(l).rewards, (e) => (n(), a("div", K, [
112
- t("div", Q, [
113
- t("p", U, r(e.amount) + " WDT", 1),
114
- t("span", X, r(e.type === "blogpost" ? "Community Reward" : e.type), 1)
115
- ]),
116
- t("div", Z, [
117
- t("h4", tt, r(e.name), 1)
118
- ])
119
- ]))), 256))
120
- ]),
121
- s(l).rewards.length > 0 ? (n(), a("h2", et, "Activity")) : i("", !0),
122
- t("section", st, [
123
- (n(!0), a(h, null, k(s(l).rewards, (e) => (n(), a("div", nt, [
124
- t("div", ot, [
125
- t("p", lt, r(e.amount) + " WDT", 1),
126
- t("span", at, r(e.type === "blogpost" ? "Community Reward" : e.type), 1)
127
- ]),
128
- t("div", it, [
129
- t("h4", rt, r(e.name), 1)
130
- ])
131
- ]))), 256))
108
+ ])) : a("", !0)
109
+ ]),
110
+ e(l).account ? a("", !0) : (n(), i("div", Q, [
111
+ U,
112
+ t("div", X, [
113
+ e(l).account ? a("", !0) : (n(), i("h3", Z, " Connect Metamask to withdrawal your earnings. ")),
114
+ e(l).account ? a("", !0) : (n(), i("button", {
115
+ key: 1,
116
+ onClick: o[1] || (o[1] = (...s) => e(m).connectWallet && e(m).connectWallet(...s)),
117
+ class: "br-solid br-2px br-black-transp-10 t-black button"
118
+ }, " Connect Wallet "))
132
119
  ])
120
+ ])),
121
+ e(l).rewards.length > 0 ? (n(), i("h2", tt, "Latest Rewards ")) : a("", !0),
122
+ t("section", et, [
123
+ (n(!0), i(g, null, x(e(l).rewards, (s) => (n(), i("div", st, [
124
+ t("div", nt, [
125
+ t("p", ot, r(s.amount) + " WDT", 1),
126
+ t("span", lt, r(s.type === "blogpost" ? "Community Reward" : s.type), 1)
127
+ ]),
128
+ t("div", it, [
129
+ t("h4", at, r(s.name), 1)
130
+ ])
131
+ ]))), 256))
133
132
  ]),
134
- x(C, {
135
- title: "Добавить участника",
136
- onClosePopup: _,
137
- isPopupOpen: b.value,
138
- class: "w-m-33r t-left pd-big bg-white radius-big"
133
+ e(l).rewards.length > 0 ? (n(), i("h2", rt, "Activity")) : a("", !0),
134
+ t("section", ct, [
135
+ (n(!0), i(g, null, x(e(l).rewards, (s) => (n(), i("div", mt, [
136
+ t("div", dt, [
137
+ t("p", ut, r(s.amount) + " WDT", 1),
138
+ t("span", pt, r(s.type === "blogpost" ? "Community Reward" : s.type), 1)
139
+ ]),
140
+ t("div", bt, [
141
+ t("h4", ht, r(s.name), 1)
142
+ ])
143
+ ]))), 256))
144
+ ]),
145
+ _(S, {
146
+ onClosePopup: f,
147
+ isPopupOpen: h.value,
148
+ class: "w-m-50r t-left pd-big bg-white radius-big"
139
149
  }, {
140
- default: v(() => [
141
- m.value === 0 ? (n(), a("div", ct, [
142
- dt,
150
+ default: k(() => [
151
+ d.value === 0 ? (n(), i("div", _t, [
152
+ ft,
143
153
  t("button", {
144
154
  class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
145
- onClick: o[3] || (o[3] = (e) => c(1))
155
+ onClick: o[2] || (o[2] = (s) => c(1))
146
156
  }, " CASH "),
147
157
  t("button", {
148
158
  class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
149
- onClick: o[4] || (o[4] = (e) => c(2))
159
+ onClick: o[3] || (o[3] = (s) => c(2))
150
160
  }, " CARD "),
151
161
  t("button", {
152
162
  class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
153
- onClick: o[5] || (o[5] = (e) => c(4))
163
+ onClick: o[4] || (o[4] = (s) => c(4))
154
164
  }, " CRYPTO ")
155
- ])) : i("", !0),
156
- m.value === 1 ? (n(), p(W, {
165
+ ])) : a("", !0),
166
+ d.value === 1 ? (n(), u(R, {
157
167
  key: 1,
158
- onBackSelection: o[6] || (o[6] = (e) => c(0))
159
- })) : i("", !0),
160
- m.value === 2 ? (n(), p(M, {
168
+ onBackSelection: o[5] || (o[5] = (s) => c(0))
169
+ })) : a("", !0),
170
+ d.value === 2 ? (n(), u(D, {
161
171
  key: 2,
162
- onBackSelection: o[7] || (o[7] = (e) => c(0)),
172
+ onBackSelection: o[6] || (o[6] = (s) => c(0)),
163
173
  onSwitchMenu: c
164
- })) : i("", !0),
165
- m.value === 3 ? (n(), p(R, {
174
+ })) : a("", !0),
175
+ d.value === 3 ? (n(), u(G, {
166
176
  key: 3,
167
- onClose: _
168
- })) : i("", !0),
169
- m.value === 4 ? (n(), p($, {
177
+ onClose: f
178
+ })) : a("", !0),
179
+ d.value === 4 ? (n(), u(T, {
170
180
  key: 4,
171
- onBackSelection: o[8] || (o[8] = (e) => c(0)),
181
+ onBackSelection: o[7] || (o[7] = (s) => c(0)),
182
+ onSwitchMenu: c
183
+ })) : a("", !0),
184
+ d.value === 5 ? (n(), u(N, {
185
+ key: 5,
186
+ onBackSelection: o[8] || (o[8] = (s) => c(0)),
172
187
  onSwitchMenu: c
173
- })) : i("", !0)
188
+ })) : a("", !0)
174
189
  ]),
175
190
  _: 1
176
191
  }, 8, ["isPopupOpen"])
177
- ], 64));
192
+ ]));
178
193
  }
179
194
  };
180
195
  export {
181
- St as default
196
+ Yt as default
182
197
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"en-default":{wallet:{title:"Your Wallet",subtitle:"Earn WDT by purchasing our weed or contributing to the community.",token:"WDT",connectMetaMask:"Connect MetaMask",switchToPolygon:"Switch to Polygon",addToken:"Add WDT to MetaMask",pay:"pay",youReceived:"you received",enterAmount:"enter amount to top up",backToWallet:"back to wallet",backToSelection:"back to selection",balanceReplenished:"balance replenished",depositWithCrypto:"deposit with crypto"}},"ru-default":{wallet:{title:"Ваш Кошелек",subtitle:"Зарабатывайте WDT, покупая товары или внося вклад в сообщество.",connectMetaMask:"Подключить MetaMask",switchToPolygon:"Переподключиться на Polygon",addToken:"Добавить WDT в Metamask",pay:"купить",youReceived:"вы пополнили на сумму",enterAmount:"введите сумму для пополнения",backToWallet:"назад к кошельку",backToSelection:"назад к списку",balanceReplenished:"баланс пополнен",depositWithCrypto:"пополнение криптовалютой"}}},t={messages:e};exports.default=t;exports.messages=e;
@@ -0,0 +1,41 @@
1
+ const e = {
2
+ "en-default": {
3
+ wallet: {
4
+ title: "Your Wallet",
5
+ subtitle: "Earn WDT by purchasing our weed or contributing to the community.",
6
+ token: "WDT",
7
+ connectMetaMask: "Connect MetaMask",
8
+ switchToPolygon: "Switch to Polygon",
9
+ addToken: "Add WDT to MetaMask",
10
+ pay: "pay",
11
+ youReceived: "you received",
12
+ enterAmount: "enter amount to top up",
13
+ backToWallet: "back to wallet",
14
+ backToSelection: "back to selection",
15
+ balanceReplenished: "balance replenished",
16
+ depositWithCrypto: "deposit with crypto"
17
+ }
18
+ },
19
+ "ru-default": {
20
+ wallet: {
21
+ title: "Ваш Кошелек",
22
+ subtitle: "Зарабатывайте WDT, покупая товары или внося вклад в сообщество.",
23
+ connectMetaMask: "Подключить MetaMask",
24
+ switchToPolygon: "Переподключиться на Polygon",
25
+ addToken: "Добавить WDT в Metamask",
26
+ pay: "купить",
27
+ youReceived: "вы пополнили на сумму",
28
+ enterAmount: "введите сумму для пополнения",
29
+ backToWallet: "назад к кошельку",
30
+ backToSelection: "назад к списку",
31
+ balanceReplenished: "баланс пополнен",
32
+ depositWithCrypto: "пополнение криптовалютой"
33
+ }
34
+ }
35
+ }, t = {
36
+ messages: e
37
+ };
38
+ export {
39
+ t as default,
40
+ e as messages
41
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),i=require("vue"),n=require("../../../../../node_modules/bignumber.js/bignumber.cjs"),o="/api/crypto",u=2e7,r=l.create({baseURL:process.env.API_URL,withCredentials:!0}),t=i.reactive({rewards:[],tokenBalance:"0",share:"0",account:null,web3:null}),c={listRewards:()=>r.get(`${o}/rewards`).then(e=>{t.rewards=e.data,t.tokenBalance=e.data.reduce((a,s)=>a.plus(s.amount),new n.BigNumber("0")).toString(),t.share=new n.BigNumber(t.tokenBalance).div(u).multipliedBy(100).toFormat(6)}).catch(e=>console.error(e)),collectRewards:()=>r.post(`${o}/collect`,{recipient:t.account}).then(()=>c.listRewards()).catch(e=>console.error(e)),disconnectWallet:()=>window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}).then(()=>{t.account=null}).catch(e=>console.error(e)),connectWallet:()=>t.web3.eth.requestAccounts().then(e=>{t.account=e[0]}).catch(e=>console.error(e)),tryReconnectWallet:()=>t.web3.eth.getAccounts().then(e=>{if(e.length>0)return c.connectWallet()}).catch(e=>console.error(e))};exports.actions=c;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../../../../node_modules/bignumber.js/bignumber.cjs");require("../../../globals/store/globals.cjs");const a="/api/crypto",w=2e7,s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),e=l.reactive({rewards:[],tokenBalance:"0",share:"0",account:null,web3:null,depositInfo:null,depositRequestIsActive:!1,websocket:null,config:null,chosenNetwork:null}),n=l.reactive({remaining:0,interval:null}),c={loadConfig:async()=>{await s.get(`${a}/deposit/config`).then(t=>{e.config=t.data,e.chosenNetwork={name:"polygon-WDT",value:{token:e.config.polygon.tokens.WDT,network:"polygon"}}}).catch(t=>console.error(t))},connectWebSocket:()=>{e.websocket=new WebSocket(process.env.WSS_URL),e.websocket.onmessage=t=>{const o=JSON.parse(t.data);if(o.id===e.depositInfo.id){const r=e.depositInfo.confirmations;e.depositInfo=o,e.depositInfo.confirmations=r}o.hash===e.depositInfo.tx.hash&&(e.depositInfo.confirmations=o.confirmations)},e.websocket.onerror=t=>console.error(t)},disconnectWebSocket:()=>{e.websocket&&(e.websocket.close(),e.websocket=null)},listRewards:async()=>{try{const t=await s.get(`${a}/rewards`);e.rewards=t.data,e.tokenBalance=t.data.reduce((o,r)=>o.plus(r.amount),new i.BigNumber("0")).toString(),e.share=new i.BigNumber(e.tokenBalance).div(w).multipliedBy(100).toFormat(6)}catch(t){console.error(t)}},collectRewards:async()=>{try{await s.post(`${a}/collect`,{recipient:e.account}),await c.listRewards()}catch(t){console.error(t)}},disconnectWallet:async()=>{try{await window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),e.account=null}catch(t){console.error(t)}},connectWallet:async()=>{try{const t=await e.web3.eth.requestAccounts();e.account=t[0]}catch(t){console.error(t)}},tryReconnectWallet:async()=>{try{(await e.web3.eth.getAccounts()).length>0&&await c.connectWallet()}catch(t){console.error(t)}},requestCryptoDeposit:async t=>{e.depositRequestIsActive=!0,await s.post(`${a}/deposit`,{network:e.chosenNetwork.value.network,amount:new i.BigNumber(t).shiftedBy(8).toString(),token:e.chosenNetwork.value.token}).then(o=>{e.depositInfo=o.data;const d=new Date(o.data.createdAt).getTime()+e.config[e.chosenNetwork.value.network].waitingTime;n.remaining=Math.floor((d-Date.now())/1e3),n.interval=setInterval(()=>{n.remaining-=1,n.remaining===0&&clearInterval(n.interval)},1e3)}).catch(o=>console.error(o)),e.depositRequestIsActive=!1,c.connectWebSocket()},stopTimer:()=>{clearInterval(n.interval)},cancelDeposit:async()=>{await s.post(`${a}/deposit/cancel`,{id:e.depositInfo.id}).then(()=>c.stopTimer()).then(()=>c.disconnectWebSocket()).catch(t=>console.error(t))}};exports.actions=c;exports.state=e;exports.timer=n;
@@ -1,29 +1,105 @@
1
- import l from "axios";
2
- import { reactive as i } from "vue";
3
- import { BigNumber as o } from "../../../../../node_modules/bignumber.js/bignumber.js";
4
- const c = "/api/crypto", u = 2e7, r = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), t = i({
1
+ import d from "axios";
2
+ import { reactive as l } from "vue";
3
+ import { BigNumber as i } from "../../../../../node_modules/bignumber.js/bignumber.js";
4
+ import "../../../globals/store/globals.js";
5
+ const c = "/api/crypto", p = 2e7, a = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = l({
5
6
  rewards: [],
6
7
  tokenBalance: "0",
7
8
  share: "0",
8
9
  account: null,
9
- web3: null
10
- }), n = {
11
- listRewards: () => r.get(`${c}/rewards`).then((e) => {
12
- t.rewards = e.data, t.tokenBalance = e.data.reduce((a, s) => a.plus(s.amount), new o("0")).toString(), t.share = new o(t.tokenBalance).div(u).multipliedBy(100).toFormat(6);
13
- }).catch((e) => console.error(e)),
14
- collectRewards: () => r.post(`${c}/collect`, { recipient: t.account }).then(() => n.listRewards()).catch((e) => console.error(e)),
15
- disconnectWallet: () => window.ethereum.request({ method: "wallet_revokePermissions", params: [{ eth_accounts: {} }] }).then(() => {
16
- t.account = null;
17
- }).catch((e) => console.error(e)),
18
- connectWallet: () => t.web3.eth.requestAccounts().then((e) => {
19
- t.account = e[0];
20
- }).catch((e) => console.error(e)),
21
- tryReconnectWallet: () => t.web3.eth.getAccounts().then((e) => {
22
- if (e.length > 0)
23
- return n.connectWallet();
24
- }).catch((e) => console.error(e))
10
+ web3: null,
11
+ depositInfo: null,
12
+ depositRequestIsActive: !1,
13
+ websocket: null,
14
+ config: null,
15
+ chosenNetwork: null
16
+ }), n = l({ remaining: 0, interval: null }), s = {
17
+ loadConfig: async () => {
18
+ await a.get(`${c}/deposit/config`).then((t) => {
19
+ e.config = t.data, e.chosenNetwork = {
20
+ name: "polygon-WDT",
21
+ value: {
22
+ token: e.config.polygon.tokens.WDT,
23
+ network: "polygon"
24
+ }
25
+ };
26
+ }).catch((t) => console.error(t));
27
+ },
28
+ connectWebSocket: () => {
29
+ e.websocket = new WebSocket(process.env.WSS_URL), e.websocket.onmessage = (t) => {
30
+ const o = JSON.parse(t.data);
31
+ if (o.id === e.depositInfo.id) {
32
+ const r = e.depositInfo.confirmations;
33
+ e.depositInfo = o, e.depositInfo.confirmations = r;
34
+ }
35
+ o.hash === e.depositInfo.tx.hash && (e.depositInfo.confirmations = o.confirmations);
36
+ }, e.websocket.onerror = (t) => console.error(t);
37
+ },
38
+ disconnectWebSocket: () => {
39
+ e.websocket && (e.websocket.close(), e.websocket = null);
40
+ },
41
+ listRewards: async () => {
42
+ try {
43
+ const t = await a.get(`${c}/rewards`);
44
+ e.rewards = t.data, e.tokenBalance = t.data.reduce((o, r) => o.plus(r.amount), new i("0")).toString(), e.share = new i(e.tokenBalance).div(p).multipliedBy(100).toFormat(6);
45
+ } catch (t) {
46
+ console.error(t);
47
+ }
48
+ },
49
+ collectRewards: async () => {
50
+ try {
51
+ await a.post(`${c}/collect`, { recipient: e.account }), await s.listRewards();
52
+ } catch (t) {
53
+ console.error(t);
54
+ }
55
+ },
56
+ disconnectWallet: async () => {
57
+ try {
58
+ await window.ethereum.request({ method: "wallet_revokePermissions", params: [{ eth_accounts: {} }] }), e.account = null;
59
+ } catch (t) {
60
+ console.error(t);
61
+ }
62
+ },
63
+ connectWallet: async () => {
64
+ try {
65
+ const t = await e.web3.eth.requestAccounts();
66
+ e.account = t[0];
67
+ } catch (t) {
68
+ console.error(t);
69
+ }
70
+ },
71
+ tryReconnectWallet: async () => {
72
+ try {
73
+ (await e.web3.eth.getAccounts()).length > 0 && await s.connectWallet();
74
+ } catch (t) {
75
+ console.error(t);
76
+ }
77
+ },
78
+ requestCryptoDeposit: async (t) => {
79
+ e.depositRequestIsActive = !0, await a.post(`${c}/deposit`, {
80
+ network: e.chosenNetwork.value.network,
81
+ amount: new i(t).shiftedBy(8).toString(),
82
+ token: e.chosenNetwork.value.token
83
+ }).then((o) => {
84
+ e.depositInfo = o.data;
85
+ const w = new Date(o.data.createdAt).getTime() + e.config[e.chosenNetwork.value.network].waitingTime;
86
+ n.remaining = Math.floor((w - Date.now()) / 1e3), n.interval = setInterval(
87
+ () => {
88
+ n.remaining -= 1, n.remaining === 0 && clearInterval(n.interval);
89
+ },
90
+ 1e3
91
+ );
92
+ }).catch((o) => console.error(o)), e.depositRequestIsActive = !1, s.connectWebSocket();
93
+ },
94
+ stopTimer: () => {
95
+ clearInterval(n.interval);
96
+ },
97
+ cancelDeposit: async () => {
98
+ await a.post(`${c}/deposit/cancel`, { id: e.depositInfo.id }).then(() => s.stopTimer()).then(() => s.disconnectWebSocket()).catch((t) => console.error(t));
99
+ }
25
100
  };
26
101
  export {
27
- n as actions,
28
- t as state
102
+ s as actions,
103
+ e as state,
104
+ n as timer
29
105
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./main-CI9l9xMs.js");exports.Address=a._sfc_main;exports.Breadcrumbs=a._sfc_main$15;exports.Button=a._sfc_main$1;exports.Checkbox=a._sfc_main$2;exports.Chips=a._sfc_main$16;exports.Countdown=a._sfc_main$17;exports.DatePicker=a._sfc_main$18;exports.Dropdown=a._sfc_main$3;exports.EmptyState=a._sfc_main$19;exports.Error=a._sfc_main$4;exports.Feed=a._sfc_main$20;exports.Field=a.Field;exports.FieldBig=a._sfc_main$21;exports.FieldPhone=a._sfc_main$5;exports.FieldTags=a.FieldTags;exports.Loader=a.Loader;exports.LocationMarker=a._sfc_main$6;exports.Map=a.Map;exports.Marquee=a._sfc_main$26;exports.Popup=a._sfc_main$7;exports.Radio=a._sfc_main$8;exports.Select=a.Select;exports.SelectMulti=a.SelectMulti;exports.Shader=a._sfc_main$22;exports.Sidebar=a._sfc_main$23;exports.Slider=a._sfc_main$24;exports.Spoiler=a._sfc_main$9;exports.Status=a._sfc_main$25;exports.Tab=a._sfc_main$10;exports.Text=a._sfc_main$12;exports.Tooltip=a._sfc_main$11;exports.Upload=a.Upload;exports.UploadImage=a._sfc_main$13;exports.UploadImageMultiple=a._sfc_main$14;exports.default=a.main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("./main-5IrI2IOV.js");exports.Address=_._sfc_main;exports.Breadcrumbs=_._sfc_main$16;exports.Button=_._sfc_main$1;exports.Checkbox=_._sfc_main$2;exports.Chips=_._sfc_main$17;exports.Countdown=_._sfc_main$18;exports.DatePicker=_._sfc_main$19;exports.Dropdown=_._sfc_main$3;exports.EmptyState=_._sfc_main$20;exports.Error=_._sfc_main$4;exports.Feed=_._sfc_main$21;exports.Field=_._sfc_main$5;exports.FieldBig=_._sfc_main$22;exports.FieldPhone=_._sfc_main$6;exports.FieldTags=_.FieldTags;exports.Loader=_.Loader;exports.LocationMarker=_._sfc_main$7;exports.Map=_.Map;exports.Marquee=_._sfc_main$27;exports.Popup=_._sfc_main$8;exports.Radio=_._sfc_main$9;exports.Select=_.Select;exports.SelectMulti=_.SelectMulti;exports.Shader=_._sfc_main$23;exports.Sidebar=_._sfc_main$24;exports.Slider=_._sfc_main$25;exports.Spoiler=_._sfc_main$10;exports.Status=_._sfc_main$26;exports.Tab=_._sfc_main$11;exports.Text=_._sfc_main$13;exports.Tooltip=_._sfc_main$12;exports.Upload=_.Upload;exports.UploadImage=_._sfc_main$14;exports.UploadImageMultiple=_._sfc_main$15;exports.default=_.main;
@@ -1,4 +1,4 @@
1
- import { _ as e, q as o, a as d, b as r, r as t, s as l, t as i, c as p, u, d as S, v as c, F as n, w as m, e as F, x as M, L as b, f as g, M as h, C as k, g as x, h as B, S as C, i as T, y as U, z as f, A as w, j as L, B as P, k as q, n as y, l as A, U as D, o as E, p as I, m as j } from "./main-DPg58GOU.mjs";
1
+ import { _ as e, r as o, a as d, b as r, s as t, t as l, u as i, c as p, v as u, d as S, w as c, e as n, x as m, f as F, F as M, L as b, g, M as h, C as k, h as x, i as B, S as C, j as T, y as U, z as f, A as w, k as L, B as P, l as q, o as y, n as A, U as D, p as E, q as I, m as j } from "./main-BY2OvGB9.mjs";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
3
- const index = require("./index-BshfsiQG.js");
3
+ const index = require("./index-CDbtWkBj.js");
4
4
  const controllerFactory$1 = (db) => {
5
5
  const Report = db.report;
6
6
  const read = async (req, res) => {
@@ -1,5 +1,5 @@
1
1
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
2
- import { s as server } from "./index-DKtnWDNC.mjs";
2
+ import { s as server } from "./index-C-8xOJnM.mjs";
3
3
  const controllerFactory$1 = (db) => {
4
4
  const Report = db.report;
5
5
  const read = async (req, res) => {