@ozdao/prometheus-framework 0.2.132 → 0.2.134

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) 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/Chips/Chips.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
  124. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
  126. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
  128. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +4 -4
  129. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
  130. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
  131. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
  132. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +15 -15
  133. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
  134. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
  135. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
  136. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +22 -22
  143. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
  144. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +9 -9
  145. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
  146. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
  147. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
  149. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  151. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +3 -3
  152. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
  153. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  160. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +9 -9
  161. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +13 -13
  162. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +17 -17
  163. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
  164. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +10 -10
  165. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
  166. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
  167. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
  168. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  169. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  171. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +7 -7
  172. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +1 -1
  174. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  177. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
  178. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
  179. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
  180. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
  181. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
  182. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
  183. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
  184. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
  185. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
  186. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
  187. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
  188. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +137 -122
  190. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
  191. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
  192. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
  194. package/dist/prometheus-framework.cjs.js +1 -1
  195. package/dist/prometheus-framework.es.js +1 -1
  196. package/dist/reports.server.js +1 -1
  197. package/dist/reports.server.mjs +1 -1
  198. package/dist/style.css +1 -1
  199. package/dist/wallet.server.js +103 -13
  200. package/dist/wallet.server.mjs +103 -13
  201. package/dist/web-5eyiz9L7.mjs +54 -0
  202. package/dist/web-C04IcLk4.js +1 -0
  203. package/package.json +1 -1
  204. package/src/components/Field/Field.vue +1 -1
  205. package/src/modules/community/components/pages/Blog.vue +1 -1
  206. package/src/modules/globals/components/partials/Header.vue +2 -2
  207. package/src/modules/globals/localization/vue-i18n.js +5 -5
  208. package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
  209. package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
  210. package/src/modules/middlewares/server/authSecret.js +22 -0
  211. package/src/modules/middlewares/server/index.js +7 -5
  212. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
  213. package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
  214. package/src/modules/wallet/models/wallet.model.js +5 -5
  215. package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
  216. package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
  217. package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
  218. package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
  219. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
  220. package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
  221. package/src/modules/wallet/views/localization/wallet.json +37 -0
  222. package/src/modules/wallet/views/store/wallet.store.js +145 -28
  223. package/src/modules/wallet/wallet.server.js +2 -2
  224. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
  225. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
  226. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
  227. package/src/modules/wallet/localization/Wallet.json +0 -22
  228. /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var t = {};
2
+ export {
3
+ t as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var a = {};
2
+ export {
3
+ a as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
@@ -0,0 +1,4 @@
1
+ var r = { exports: {} };
2
+ export {
3
+ r as __module
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var a = {};
2
+ export {
3
+ a as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var a = {};
2
+ export {
3
+ a as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var a = {};
2
+ export {
3
+ a as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -5,7 +5,7 @@ const require$$1$1 = require("bcryptjs");
5
5
  const require$$0$1 = require("mongoose");
6
6
  const require$$1 = require("jwk-to-pem");
7
7
  const mailing = require("./mailing-BX0q8DIs.js");
8
- const index = require("./index-BshfsiQG.js");
8
+ const index = require("./index-CDbtWkBj.js");
9
9
  const jwt$1 = require$$0;
10
10
  const jwkToPem = require$$1;
11
11
  async function verifyAppleIdToken$1(id_token) {
@@ -4,7 +4,7 @@ import require$$1$1 from "bcryptjs";
4
4
  import require$$0$1 from "mongoose";
5
5
  import require$$1 from "jwk-to-pem";
6
6
  import { m as mailing } from "./mailing-Cdp8NXhP.mjs";
7
- import { s as server } from "./index-DKtnWDNC.mjs";
7
+ import { s as server } from "./index-C-8xOJnM.mjs";
8
8
  const jwt$1 = require$$0;
9
9
  const jwkToPem = require$$1;
10
10
  async function verifyAppleIdToken$1(id_token) {
@@ -4,7 +4,7 @@ const require$$0 = require("mongoose");
4
4
  const queryProcessor$3 = require("./queryProcessor-iewDZq_f.js");
5
5
  require("util");
6
6
  require("uuid");
7
- const index = require("./index-BshfsiQG.js");
7
+ const index = require("./index-CDbtWkBj.js");
8
8
  const common_schema = require("./common.schema-BFhpUXUt.js");
9
9
  const engagement_schema = require("./engagement.schema-D-9md46B.js");
10
10
  const ownership_schema = require("./ownership.schema-DN0SlQL6.js");
@@ -3,7 +3,7 @@ import require$$0 from "mongoose";
3
3
  import { q as queryProcessor$3 } from "./queryProcessor-DQSFR9YA.mjs";
4
4
  import "util";
5
5
  import "uuid";
6
- import { s as server$1 } from "./index-DKtnWDNC.mjs";
6
+ import { s as server$1 } from "./index-C-8xOJnM.mjs";
7
7
  import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
8
8
  import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
9
9
  import { o as ownership_schema } from "./ownership.schema-oyx6eNkZ.mjs";
@@ -5,7 +5,7 @@ const require$$0 = require("mongoose");
5
5
  const queryProcessor$2 = require("./queryProcessor-iewDZq_f.js");
6
6
  const metadata_schema = require("./metadata.schema-6slGhpQS.js");
7
7
  const require$$1 = require("stripe");
8
- const index = require("./index-BshfsiQG.js");
8
+ const index = require("./index-CDbtWkBj.js");
9
9
  const tickets_controller = require("./tickets.controller-WaQ4qMpv.js");
10
10
  const common_schema = require("./common.schema-BFhpUXUt.js");
11
11
  const engagement_schema = require("./engagement.schema-D-9md46B.js");
@@ -3,7 +3,7 @@ import require$$0 from "mongoose";
3
3
  import { q as queryProcessor$2 } from "./queryProcessor-DQSFR9YA.mjs";
4
4
  import { s as seoFriendlyUrl, m as metadata_schema } from "./metadata.schema-CK5e2O3f.mjs";
5
5
  import require$$1 from "stripe";
6
- import { s as server$1 } from "./index-DKtnWDNC.mjs";
6
+ import { s as server$1 } from "./index-C-8xOJnM.mjs";
7
7
  import { t as tickets_controller } from "./tickets.controller-ByZ33N6_.mjs";
8
8
  import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
9
9
  import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
3
3
  const require$$0 = require("path");
4
- const index = require("./index-BshfsiQG.js");
4
+ const index = require("./index-CDbtWkBj.js");
5
5
  const require$$0$1 = require("sharp");
6
6
  const require$$1 = require("fs");
7
7
  const require$$2 = require("fs/promises");
@@ -1,6 +1,6 @@
1
1
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
2
2
  import require$$0 from "path";
3
- import { s as server$1 } from "./index-DKtnWDNC.mjs";
3
+ import { s as server$1 } from "./index-C-8xOJnM.mjs";
4
4
  import require$$0$1 from "sharp";
5
5
  import require$$1 from "fs";
6
6
  import require$$2 from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
3
3
  const require$$0 = require("path");
4
4
  const queryProcessor = require("./queryProcessor-iewDZq_f.js");
5
- const index = require("./index-BshfsiQG.js");
5
+ const index = require("./index-CDbtWkBj.js");
6
6
  const common_schema = require("./common.schema-BFhpUXUt.js");
7
7
  const engagement_schema = require("./engagement.schema-D-9md46B.js");
8
8
  const ownership_schema = require("./ownership.schema-DN0SlQL6.js");
@@ -1,7 +1,7 @@
1
1
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
2
2
  import require$$0 from "path";
3
3
  import { q as queryProcessor } from "./queryProcessor-DQSFR9YA.mjs";
4
- import { s as server } from "./index-DKtnWDNC.mjs";
4
+ import { s as server } from "./index-C-8xOJnM.mjs";
5
5
  import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
6
6
  import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
7
7
  import { o as ownership_schema } from "./ownership.schema-oyx6eNkZ.mjs";
@@ -0,0 +1,244 @@
1
+ import require$$0 from "jsonwebtoken";
2
+ import require$$0$1 from "crypto";
3
+ import require$$0$2 from "mongodb";
4
+ const jwt = require$$0;
5
+ const middlewareFactory$4 = (db) => {
6
+ const User = db.user;
7
+ const Role = db.role;
8
+ const verifyToken = async (req, res, next) => {
9
+ try {
10
+ if (!req.cookies.user) {
11
+ req.userId = null;
12
+ return next();
13
+ }
14
+ let user = JSON.parse(req.cookies.user);
15
+ let token = req.headers["x-access-token"] || user.accessToken;
16
+ if (!token) {
17
+ req.userId = null;
18
+ return next();
19
+ }
20
+ const decoded = jwt.verify(token, process.env.SECRET_KEY);
21
+ req.userId = decoded._id;
22
+ next();
23
+ } catch (err) {
24
+ console.log(err);
25
+ req.userId = null;
26
+ next();
27
+ }
28
+ };
29
+ const checkRole = (roleToCheck) => async (req, res, next) => {
30
+ try {
31
+ const user = await User.findById(req.userId).exec();
32
+ if (!user) {
33
+ return res.status(404).send({ message: "User Not found." });
34
+ }
35
+ const roles = await Role.find({ _id: { $in: user.roles } }).exec();
36
+ for (let role of roles) {
37
+ if (role.name === roleToCheck) {
38
+ next();
39
+ return;
40
+ }
41
+ }
42
+ res.status(403).send({ message: `Require ${roleToCheck} Role!` });
43
+ } catch (err) {
44
+ res.status(500).send({ message: err.message });
45
+ }
46
+ };
47
+ const isAdmin = checkRole("admin");
48
+ const isModerator = checkRole("moderator");
49
+ return {
50
+ verifyToken,
51
+ isAdmin,
52
+ isModerator
53
+ };
54
+ };
55
+ var authJwt = middlewareFactory$4;
56
+ var authSecret;
57
+ var hasRequiredAuthSecret;
58
+ function requireAuthSecret() {
59
+ if (hasRequiredAuthSecret) return authSecret;
60
+ hasRequiredAuthSecret = 1;
61
+ const crypto = require$$0$1;
62
+ const middlewareFactory2 = () => {
63
+ const verifySecret = (method, endpoint, secret) => async (req, res, next) => {
64
+ const requestSignature = req.headers.signature;
65
+ const signature = crypto.createHmac("sha256", secret).update(method + endpoint).digest("hex");
66
+ if (signature === requestSignature) {
67
+ return next();
68
+ }
69
+ res.status(403).send("Forbidden");
70
+ };
71
+ return { verifySecret };
72
+ };
73
+ authSecret = middlewareFactory2;
74
+ return authSecret;
75
+ }
76
+ const middlewareFactory$3 = (db) => {
77
+ const User = db.user;
78
+ db.role;
79
+ const checkDuplicateUsernameOrEmail = async (req, res, next) => {
80
+ const { type, email, phone } = req.body;
81
+ console.log(req.body);
82
+ let query;
83
+ if (type === "phone" && phone) {
84
+ query = { phone };
85
+ }
86
+ if (type === "email" && email) {
87
+ query = { email };
88
+ }
89
+ try {
90
+ const user = await User.findOne(query).exec();
91
+ if (user) {
92
+ console.log(`USER_ALREADY_REGISTERED`);
93
+ res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
94
+ return;
95
+ }
96
+ next();
97
+ } catch (err) {
98
+ console.log(err);
99
+ res.status(500).send({ message: err.message });
100
+ }
101
+ };
102
+ const checkRolesExisted = (req, res, next) => {
103
+ if (req.body.roles) {
104
+ for (let i = 0; i < req.body.roles.length; i++) {
105
+ if (!ROLES.includes(req.body.roles[i])) {
106
+ console.log(`Failed! Role ${req.body.roles[i]} does not exist!`);
107
+ res.status(400).send({
108
+ message: `Failed! Role ${req.body.roles[i]} does not exist!`
109
+ });
110
+ return;
111
+ }
112
+ }
113
+ }
114
+ next();
115
+ };
116
+ return {
117
+ checkDuplicateUsernameOrEmail,
118
+ checkRolesExisted
119
+ };
120
+ };
121
+ var verifySignUp = middlewareFactory$3;
122
+ const middlewareFactory$2 = (db) => {
123
+ const User = db.user;
124
+ db.role;
125
+ const checkUserExist = async (req, res, next) => {
126
+ const { type, email, phone } = req.body;
127
+ let query;
128
+ if (type === "phone" && phone) {
129
+ query = { phone };
130
+ }
131
+ if (type === "email" && email) {
132
+ query = { email };
133
+ }
134
+ try {
135
+ const user = await User.findOne(query).exec();
136
+ if (!user) {
137
+ console.log(query);
138
+ res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
139
+ return;
140
+ }
141
+ next();
142
+ } catch (err) {
143
+ res.status(500).send({ message: err.message });
144
+ }
145
+ };
146
+ return {
147
+ checkUserExist
148
+ };
149
+ };
150
+ var verifyUser = middlewareFactory$2;
151
+ const { ObjectId } = require$$0$2;
152
+ const middlewareFactory$1 = (db) => {
153
+ const User = db.user;
154
+ const Invite = db.invite;
155
+ const Membership = db.membership;
156
+ const checkInviteExist = async (req, res, next) => {
157
+ for (let invite of req.body.invites) {
158
+ let query;
159
+ if (invite.contact.includes("@")) {
160
+ query = { invitedEmail: invite.contact };
161
+ } else {
162
+ query = { invitedPhone: invite.contact };
163
+ }
164
+ query["owner.target"] = req.body.owner.target;
165
+ const userInvite = await Invite.findOne(query).exec();
166
+ if (userInvite) {
167
+ console.log(userInvite);
168
+ res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
169
+ return;
170
+ }
171
+ }
172
+ next();
173
+ };
174
+ const checkUsersExist = async (req, res, next) => {
175
+ for (let invite of req.body.invites) {
176
+ let query;
177
+ if (invite.contact.includes("@")) {
178
+ query = { email: invite.contact };
179
+ } else {
180
+ query = { phone: invite.contact };
181
+ }
182
+ const user = await User.findOne(query).exec();
183
+ console.log(req.params);
184
+ if (user) {
185
+ const membership = await Membership.findOne({ user: new ObjectId(user._id), "owner.target": req.body.owner.target }).exec();
186
+ if (membership) {
187
+ console.log(membership);
188
+ res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
189
+ return;
190
+ }
191
+ }
192
+ }
193
+ next();
194
+ };
195
+ return {
196
+ checkInviteExist,
197
+ checkUsersExist
198
+ };
199
+ };
200
+ var verifyInvites = middlewareFactory$1;
201
+ const middlewareFactory = (db) => {
202
+ const Category = db.category;
203
+ const checkCategoryExistOrNot = async (req, res, next) => {
204
+ try {
205
+ const category = await Category.findOne({ url: req.body.url });
206
+ if (category) {
207
+ res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
208
+ return;
209
+ }
210
+ next();
211
+ } catch (err) {
212
+ res.status(500).send({ message: err });
213
+ }
214
+ };
215
+ return {
216
+ checkCategoryExistOrNot
217
+ };
218
+ };
219
+ var verifyCategory = middlewareFactory;
220
+ const middlewareIndexFactory = (db) => {
221
+ const authJwt$1 = authJwt(db);
222
+ const authSecret2 = requireAuthSecret()();
223
+ const verifySignUp$1 = verifySignUp(db);
224
+ const verifyUser$1 = verifyUser(db);
225
+ const verifyInvites$1 = verifyInvites(db);
226
+ const verifyCategory$1 = verifyCategory(db);
227
+ return {
228
+ authJwt: authJwt$1,
229
+ authSecret: authSecret2,
230
+ verifySignUp: verifySignUp$1,
231
+ verifyUser: verifyUser$1,
232
+ verifyInvites: verifyInvites$1,
233
+ verifyCategory: verifyCategory$1
234
+ };
235
+ };
236
+ var server = middlewareIndexFactory;
237
+ export {
238
+ verifyInvites as a,
239
+ authJwt as b,
240
+ verifySignUp as c,
241
+ verifyCategory as d,
242
+ server as s,
243
+ verifyUser as v
244
+ };