@ozdao/prometheus-framework 0.2.33 → 0.2.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. package/dist/events.server.js +32 -0
  2. package/dist/events.server.mjs +32 -0
  3. package/dist/files.server.js +99 -78
  4. package/dist/files.server.mjs +99 -78
  5. package/dist/globals.server.js +0 -1
  6. package/dist/globals.server.mjs +0 -1
  7. package/dist/main.css +1 -1
  8. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.cjs +1 -0
  9. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.js +6 -0
  10. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
  11. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  12. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.cjs +1 -0
  13. package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.js +4 -0
  14. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.cjs +7 -0
  15. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.js +97 -0
  16. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -0
  17. package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.js +173 -0
  18. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -0
  19. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +337 -0
  20. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.cjs +1 -0
  21. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.js +7 -0
  22. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.cjs +1 -0
  23. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.js +54 -0
  24. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
  25. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
  26. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -0
  27. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +109 -0
  28. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -0
  29. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.js +47 -0
  30. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -0
  31. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +73 -0
  32. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -0
  33. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +11 -0
  34. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -0
  35. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +6 -0
  36. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -0
  37. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +117 -0
  38. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -0
  39. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +54 -0
  40. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
  41. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
  42. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -0
  43. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +59 -0
  44. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -0
  45. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +8 -0
  46. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -0
  47. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +31 -0
  48. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -0
  49. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +72 -0
  50. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -0
  51. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +14 -0
  52. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -0
  53. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +13 -0
  54. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -0
  55. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +88 -0
  56. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -0
  57. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +8 -0
  58. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -0
  59. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.js +4 -0
  60. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
  61. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
  62. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
  63. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
  64. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -0
  65. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +8 -0
  66. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -0
  67. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +19 -0
  68. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -0
  69. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  70. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -0
  71. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +32 -0
  72. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
  73. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
  74. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -0
  75. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  76. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -0
  77. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  78. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -0
  79. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +37 -0
  80. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -0
  81. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +4 -0
  82. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -0
  83. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
  84. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -0
  85. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  86. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
  87. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
  88. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -0
  89. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +8 -0
  90. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -0
  91. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +84 -0
  92. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
  93. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
  94. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -0
  95. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +51 -0
  96. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
  97. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  98. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
  99. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  100. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
  101. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  102. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
  103. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
  104. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
  105. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
  106. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
  107. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
  108. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -0
  109. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.js +224 -0
  110. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -0
  111. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.js +44 -0
  112. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -0
  113. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.js +19 -0
  114. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -0
  115. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.js +38 -0
  116. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -0
  117. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.js +16 -0
  118. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -0
  119. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.js +42 -0
  120. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -0
  121. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +22 -0
  122. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -0
  123. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.js +59 -0
  124. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -0
  125. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +28 -0
  126. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.cjs +1 -0
  127. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.js +21 -0
  128. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.cjs +1 -0
  129. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.js +21 -0
  130. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -0
  131. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.js +21 -0
  132. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -0
  133. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.js +23 -0
  134. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -0
  135. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.js +21 -0
  136. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -0
  137. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +29 -0
  138. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -0
  139. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +21 -0
  140. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -0
  141. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +3 -0
  142. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -0
  143. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +35 -0
  144. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +1 -0
  145. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.js +60 -0
  146. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -0
  147. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +80 -0
  148. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -0
  149. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.js +34 -0
  150. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -0
  151. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.js +17 -0
  152. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -0
  153. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.js +16 -0
  154. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -0
  155. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.js +42 -0
  156. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -0
  157. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.js +20 -0
  158. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -0
  159. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.js +28 -0
  160. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -0
  161. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.js +28 -0
  162. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -0
  163. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.js +34 -0
  164. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +2 -61
  166. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  167. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +61 -2
  168. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.cjs +1 -0
  169. package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.js +62 -0
  170. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  172. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  173. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  174. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +42 -34
  176. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  178. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  179. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
  180. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -93
  182. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  183. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +93 -2
  184. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +99 -2
  186. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
  187. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +2 -73
  188. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +30 -28
  190. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +25 -24
  192. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  196. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  198. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +1 -1
  200. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  201. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  202. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  203. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
  204. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +1 -1
  206. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
  208. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  210. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +381 -140
  214. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +4 -1
  215. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +122 -48
  216. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  218. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -0
  219. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +116 -0
  220. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.cjs +1 -0
  221. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.js +4 -0
  222. package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.cjs +1 -0
  223. package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.js +29 -0
  224. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +3 -0
  225. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +117 -0
  226. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.cjs +1 -0
  227. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.js +4 -0
  228. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -0
  229. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +108 -0
  230. package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.cjs +1 -0
  231. package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.js +70 -0
  232. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/events/store/events.js +20 -16
  234. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  236. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  238. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  239. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  240. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  241. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  242. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  243. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  244. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  246. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  247. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  248. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +14 -14
  250. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  254. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  256. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  257. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  258. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  259. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  260. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  264. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  265. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  266. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  267. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  268. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  269. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  270. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  271. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  272. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  273. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  274. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  276. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  277. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  278. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  279. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  280. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  281. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  282. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  283. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +58 -55
  284. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  285. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
  286. package/dist/prometheus-framework.cjs.js +19 -19
  287. package/dist/prometheus-framework.es.js +390 -376
  288. package/dist/style.css +1 -1
  289. package/package.json +1 -1
  290. package/src/modules/events/components/pages/EditEvent.vue +20 -5
  291. package/src/modules/events/components/pages/Event.vue +5 -2
  292. package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
  293. package/src/modules/events/models/event.model.js +2 -1
  294. package/src/modules/marketplace/components/pages/Catalog.vue +1 -0
  295. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  296. package/src/modules/users/components/pages/Profile.vue +1 -1
@@ -163,6 +163,8 @@ function getProjectStage() {
163
163
  date: 1,
164
164
  numberOfTickets: 1,
165
165
  participantsPhotos: 1,
166
+ special: 1,
167
+ specialData: 1,
166
168
  hasTicket: 1,
167
169
  tickets: 1,
168
170
  createdAt: 1
@@ -290,6 +292,7 @@ const middlewareFactory = (db) => {
290
292
  }
291
293
  };
292
294
  const update = async (req, res) => {
295
+ console.log(req.body);
293
296
  try {
294
297
  const event = await Event.findOneAndUpdate({ url: req.body.url }, { $set: req.body }, { new: true }).exec();
295
298
  if (!event) {
@@ -555,6 +558,35 @@ var event_model = (db) => {
555
558
  end: {
556
559
  type: Date
557
560
  }
561
+ },
562
+ specialData: {
563
+ type: Object,
564
+ default: () => ({
565
+ subtitle: "NMS Presents",
566
+ ticketPrice: "499",
567
+ ticketImage: null,
568
+ ticketLinkStripe: null,
569
+ video: null,
570
+ guests: [],
571
+ guestVideo: null,
572
+ guestTitle: null,
573
+ guestDescription: null,
574
+ guestFacebook: null,
575
+ guestInstagram: null,
576
+ guestTelegram: null,
577
+ guestTwitter: null,
578
+ guestSoundcloud: null,
579
+ guestSpotify: null,
580
+ logos: [],
581
+ lineup: [],
582
+ lineupBackground: null,
583
+ previousVideo: null
584
+ })
585
+ },
586
+ // Adding special boolean property
587
+ special: {
588
+ type: Boolean,
589
+ default: false
558
590
  }
559
591
  }, {
560
592
  timestamps: {
@@ -161,6 +161,8 @@ function getProjectStage() {
161
161
  date: 1,
162
162
  numberOfTickets: 1,
163
163
  participantsPhotos: 1,
164
+ special: 1,
165
+ specialData: 1,
164
166
  hasTicket: 1,
165
167
  tickets: 1,
166
168
  createdAt: 1
@@ -288,6 +290,7 @@ const middlewareFactory = (db) => {
288
290
  }
289
291
  };
290
292
  const update = async (req, res) => {
293
+ console.log(req.body);
291
294
  try {
292
295
  const event = await Event.findOneAndUpdate({ url: req.body.url }, { $set: req.body }, { new: true }).exec();
293
296
  if (!event) {
@@ -553,6 +556,35 @@ var event_model = (db) => {
553
556
  end: {
554
557
  type: Date
555
558
  }
559
+ },
560
+ specialData: {
561
+ type: Object,
562
+ default: () => ({
563
+ subtitle: "NMS Presents",
564
+ ticketPrice: "499",
565
+ ticketImage: null,
566
+ ticketLinkStripe: null,
567
+ video: null,
568
+ guests: [],
569
+ guestVideo: null,
570
+ guestTitle: null,
571
+ guestDescription: null,
572
+ guestFacebook: null,
573
+ guestInstagram: null,
574
+ guestTelegram: null,
575
+ guestTwitter: null,
576
+ guestSoundcloud: null,
577
+ guestSpotify: null,
578
+ logos: [],
579
+ lineup: [],
580
+ lineupBackground: null,
581
+ previousVideo: null
582
+ })
583
+ },
584
+ // Adding special boolean property
585
+ special: {
586
+ type: Boolean,
587
+ default: false
556
588
  }
557
589
  }, {
558
590
  timestamps: {
@@ -5,13 +5,14 @@ const index = require("./index-a8dffc0c.js");
5
5
  const require$$0$1 = require("sharp");
6
6
  const require$$1 = require("fs");
7
7
  const require$$2 = require("fs/promises");
8
- require("os");
9
- const require$$5 = require("busboy");
8
+ const require$$4 = require("busboy");
10
9
  require("jsonwebtoken");
11
10
  require("mongodb");
12
11
  const path = require$$0;
13
12
  const controllerFactory$1 = (db, publicPath) => {
14
13
  const uploadMultipleFileController = async (req, res, next) => {
14
+ console.log("uploadMultipleFileController called");
15
+ console.log("Files received:", req.files ? req.files.length : 0);
15
16
  if (!req.files || req.files.length === 0) {
16
17
  return res.status(400).send({ message: "No files uploaded." });
17
18
  }
@@ -45,98 +46,119 @@ function requireMiddlewareBusboy() {
45
46
  const fs = require$$1;
46
47
  const fsp = require$$2;
47
48
  const path2 = require$$0;
48
- const busboy = require$$5;
49
+ const busboy = require$$4;
49
50
  const createThumbnail = async (originalPath) => {
50
51
  const thumbnailPath = path2.join(
51
52
  path2.dirname(originalPath),
52
53
  "thumbnail_" + path2.basename(originalPath)
53
54
  );
54
55
  try {
55
- await sharp(originalPath).rotate().resize({ width: 800 }).toFile(thumbnailPath);
56
+ const metadata = await sharp(originalPath).metadata();
57
+ const resizeOptions = {};
58
+ if (metadata.width > 800) {
59
+ resizeOptions.width = 800;
60
+ }
61
+ await sharp(originalPath).rotate().resize(resizeOptions).toFile(thumbnailPath);
56
62
  } catch (error) {
57
63
  console.error("Error creating thumbnail:", error);
64
+ throw error;
58
65
  }
59
66
  };
67
+ const handleFileUpload = (req, res, next, publicPath, { folderNameDefault = "unsorted", maxSize = 10 * 1024 * 1024, allowedTypes = null }) => {
68
+ console.log("handleFileUpload middleware called");
69
+ console.log("Options:" + folderNameDefault + maxSize + allowedTypes);
70
+ let folderName = req.query.folderName || folderNameDefault;
71
+ folderName = decodeURIComponent(folderName);
72
+ folderName = folderName.startsWith("/") ? folderName : "/" + folderName;
73
+ const filePath = path2.join(publicPath, folderName);
74
+ let files = [];
75
+ let filesWrongSize = [];
76
+ let filesWrongType = [];
77
+ let fileProcessingPromises = [];
78
+ const bb = busboy({
79
+ headers: req.headers,
80
+ limits: { fileSize: maxSize }
81
+ });
82
+ bb.on("file", (name, file, info) => {
83
+ console.log(`Received file: ${info.filename}, Type: ${info.mimeType}`);
84
+ const isValidType = !allowedTypes || allowedTypes.includes(info.mimeType);
85
+ if (!isValidType) {
86
+ console.log(`File of wrong type: ${info.filename}`);
87
+ filesWrongType.push(info.filename);
88
+ file.resume();
89
+ return;
90
+ }
91
+ const fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
92
+ const fileFullPath = path2.join(filePath, fileName);
93
+ const fileProcess = fsp.mkdir(path2.dirname(fileFullPath), { recursive: true }).then(() => new Promise((resolve, reject) => {
94
+ const stream = file.pipe(fs.createWriteStream(fileFullPath));
95
+ stream.on("finish", () => {
96
+ files.push(path2.relative(publicPath, fileFullPath));
97
+ resolve();
98
+ });
99
+ stream.on("error", reject);
100
+ }));
101
+ fileProcessingPromises.push(fileProcess);
102
+ file.on("limit", () => {
103
+ filesWrongSize.push(info.filename);
104
+ fsp.unlink(fileFullPath).catch((err) => console.error(`Error deleting oversized file: ${err.message}`));
105
+ });
106
+ });
107
+ bb.on("finish", () => {
108
+ Promise.all(fileProcessingPromises).then(() => {
109
+ console.log(`Upload finished. Files: ${files.length}, Wrong Size: ${filesWrongSize.length}, Wrong Type: ${filesWrongType.length}`);
110
+ req.files = files;
111
+ if (files.length === 0 && (filesWrongSize.length > 0 || filesWrongType.length > 0)) {
112
+ let errorMessage = "No files uploaded.";
113
+ if (filesWrongSize.length > 0) {
114
+ errorMessage += " Some files were too large.";
115
+ }
116
+ if (filesWrongType.length > 0) {
117
+ errorMessage += " Some files were of an unsupported type.";
118
+ }
119
+ return res.status(400).json({ message: errorMessage });
120
+ }
121
+ next();
122
+ }).catch((error) => {
123
+ console.error("Failed processing one or more files", error);
124
+ res.status(500).json({ message: "Error processing files" });
125
+ });
126
+ });
127
+ req.pipe(bb);
128
+ };
60
129
  const middlewareFactory = (db, publicPath) => {
61
130
  const generatePreviewMiddleware = async (req, res, next) => {
62
- const files = req.file ? [req.file] : req.files;
131
+ const files = req.files;
63
132
  try {
64
- await Promise.all(files.map((file) => createThumbnail(file)));
133
+ await Promise.all(files.map((file) => createThumbnail(path2.join(publicPath, file))));
65
134
  } catch (error) {
66
135
  console.error("Error generating previews:", error);
136
+ return res.status(500).json({ message: "Internal server error while generating previews." });
67
137
  }
68
138
  next();
69
139
  };
70
- const uploadMultipleFilesMiddleware = (req, res, next) => {
71
- let folderName = req.query.folderName || "unsorted";
72
- if (!folderName.startsWith("/")) {
73
- folderName = "/" + folderName;
74
- }
75
- let files = [];
76
- let filesWrongSize = [];
77
- let filesWrongType = [];
78
- let filePath = path2.join(publicPath, folderName);
79
- let filePromise;
80
- try {
81
- const bb = busboy({
82
- headers: req.headers,
83
- limits: {
84
- fileSize: 10 * 1024 * 1024
85
- }
86
- });
87
- bb.on("error", (err) => {
88
- next(err);
89
- });
90
- let fileFullPath;
91
- bb.on("file", (name2, file, info) => {
92
- if (info.filename.length > 0) {
93
- file.resume();
94
- }
95
- if (info.mimeType != "image/png" && info.mimeType != "image/jpeg" && info.mimeType != "image/gif") {
96
- filesWrongType.push(info.filename);
97
- file.resume();
98
- }
99
- let fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
100
- fileFullPath = path2.join(filePath, fileName);
101
- fileRelativePath = path2.join(folderName, fileName);
102
- filePromise = new Promise((resolve, reject) => {
103
- const writeStream = fs.createWriteStream(fileFullPath).on("error", reject).on("finish", resolve);
104
- file.on("error", reject);
105
- file.pipe(writeStream);
106
- });
107
- files.push(fileFullPath);
108
- file.on("limit", () => {
109
- filesWrongSize.push(info.filename);
110
- fsp.unlink(fileFullPath);
111
- const index2 = files.indexOf(fileFullPath);
112
- if (index2 !== -1) {
113
- files.splice(index2, 1);
114
- }
115
- file.resume();
116
- });
117
- });
118
- bb.on("close", async () => {
119
- try {
120
- if (!filePromise) {
121
- res.status(400).json({ message: `Uploaded file '${name}' is missing` });
122
- return;
123
- }
124
- await filePromise;
125
- req.files = files;
126
- next();
127
- } catch (err) {
128
- next(err);
129
- } finally {
130
- bb.removeAllListeners();
131
- }
132
- });
133
- req.pipe(bb);
134
- } catch (err) {
135
- res.status(400).json({ message: `Could not retrieve file from request - ${err.message}` });
136
- }
140
+ const uploadFilesMiddleware = (req, res, next) => {
141
+ const allowedTypes = [
142
+ "image/png",
143
+ "image/jpeg",
144
+ "image/jpg",
145
+ "image/gif",
146
+ "application/pdf",
147
+ "image/svg+xml",
148
+ "video/mp4",
149
+ "video/quicktime",
150
+ // MOV
151
+ "video/webm"
152
+ ];
153
+ handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
154
+ };
155
+ const uploadImagesMiddleware = (req, res, next) => {
156
+ const allowedTypes = ["image/png", "image/jpeg", "image/jpg", "image/gif"];
157
+ handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
137
158
  };
138
159
  return {
139
- uploadMultipleFilesMiddleware,
160
+ uploadImagesMiddleware,
161
+ uploadFilesMiddleware,
140
162
  generatePreviewMiddleware
141
163
  };
142
164
  };
@@ -169,7 +191,7 @@ var files_routes = function(app, db, origins, publicPath) {
169
191
  app.post(
170
192
  "/api/upload/image",
171
193
  [
172
- middlewareBusboy2.uploadMultipleFilesMiddleware,
194
+ middlewareBusboy2.uploadImagesMiddleware,
173
195
  middlewareBusboy2.generatePreviewMiddleware
174
196
  ],
175
197
  controller.uploadMultipleFileController
@@ -177,15 +199,14 @@ var files_routes = function(app, db, origins, publicPath) {
177
199
  app.post(
178
200
  "/api/upload/file",
179
201
  [
180
- middlewareBusboy2.uploadMultipleFilesMiddleware,
181
- middlewareBusboy2.generatePreviewMiddleware
202
+ middlewareBusboy2.uploadFilesMiddleware
182
203
  ],
183
204
  controller.uploadMultipleFileController
184
205
  );
185
206
  app.post(
186
207
  "/api/upload/multiple",
187
208
  [
188
- middlewareBusboy2.uploadMultipleFilesMiddleware,
209
+ middlewareBusboy2.uploadImagesMiddleware,
189
210
  middlewareBusboy2.generatePreviewMiddleware
190
211
  ],
191
212
  controller.uploadMultipleFileController
@@ -4,13 +4,14 @@ import { s as server$1 } from "./index-d769324d.mjs";
4
4
  import require$$0$1 from "sharp";
5
5
  import require$$1 from "fs";
6
6
  import require$$2 from "fs/promises";
7
- import "os";
8
- import require$$5 from "busboy";
7
+ import require$$4 from "busboy";
9
8
  import "jsonwebtoken";
10
9
  import "mongodb";
11
10
  const path = require$$0;
12
11
  const controllerFactory$1 = (db, publicPath) => {
13
12
  const uploadMultipleFileController = async (req, res, next) => {
13
+ console.log("uploadMultipleFileController called");
14
+ console.log("Files received:", req.files ? req.files.length : 0);
14
15
  if (!req.files || req.files.length === 0) {
15
16
  return res.status(400).send({ message: "No files uploaded." });
16
17
  }
@@ -44,98 +45,119 @@ function requireMiddlewareBusboy() {
44
45
  const fs = require$$1;
45
46
  const fsp = require$$2;
46
47
  const path2 = require$$0;
47
- const busboy = require$$5;
48
+ const busboy = require$$4;
48
49
  const createThumbnail = async (originalPath) => {
49
50
  const thumbnailPath = path2.join(
50
51
  path2.dirname(originalPath),
51
52
  "thumbnail_" + path2.basename(originalPath)
52
53
  );
53
54
  try {
54
- await sharp(originalPath).rotate().resize({ width: 800 }).toFile(thumbnailPath);
55
+ const metadata = await sharp(originalPath).metadata();
56
+ const resizeOptions = {};
57
+ if (metadata.width > 800) {
58
+ resizeOptions.width = 800;
59
+ }
60
+ await sharp(originalPath).rotate().resize(resizeOptions).toFile(thumbnailPath);
55
61
  } catch (error) {
56
62
  console.error("Error creating thumbnail:", error);
63
+ throw error;
57
64
  }
58
65
  };
66
+ const handleFileUpload = (req, res, next, publicPath, { folderNameDefault = "unsorted", maxSize = 10 * 1024 * 1024, allowedTypes = null }) => {
67
+ console.log("handleFileUpload middleware called");
68
+ console.log("Options:" + folderNameDefault + maxSize + allowedTypes);
69
+ let folderName = req.query.folderName || folderNameDefault;
70
+ folderName = decodeURIComponent(folderName);
71
+ folderName = folderName.startsWith("/") ? folderName : "/" + folderName;
72
+ const filePath = path2.join(publicPath, folderName);
73
+ let files = [];
74
+ let filesWrongSize = [];
75
+ let filesWrongType = [];
76
+ let fileProcessingPromises = [];
77
+ const bb = busboy({
78
+ headers: req.headers,
79
+ limits: { fileSize: maxSize }
80
+ });
81
+ bb.on("file", (name, file, info) => {
82
+ console.log(`Received file: ${info.filename}, Type: ${info.mimeType}`);
83
+ const isValidType = !allowedTypes || allowedTypes.includes(info.mimeType);
84
+ if (!isValidType) {
85
+ console.log(`File of wrong type: ${info.filename}`);
86
+ filesWrongType.push(info.filename);
87
+ file.resume();
88
+ return;
89
+ }
90
+ const fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
91
+ const fileFullPath = path2.join(filePath, fileName);
92
+ const fileProcess = fsp.mkdir(path2.dirname(fileFullPath), { recursive: true }).then(() => new Promise((resolve, reject) => {
93
+ const stream = file.pipe(fs.createWriteStream(fileFullPath));
94
+ stream.on("finish", () => {
95
+ files.push(path2.relative(publicPath, fileFullPath));
96
+ resolve();
97
+ });
98
+ stream.on("error", reject);
99
+ }));
100
+ fileProcessingPromises.push(fileProcess);
101
+ file.on("limit", () => {
102
+ filesWrongSize.push(info.filename);
103
+ fsp.unlink(fileFullPath).catch((err) => console.error(`Error deleting oversized file: ${err.message}`));
104
+ });
105
+ });
106
+ bb.on("finish", () => {
107
+ Promise.all(fileProcessingPromises).then(() => {
108
+ console.log(`Upload finished. Files: ${files.length}, Wrong Size: ${filesWrongSize.length}, Wrong Type: ${filesWrongType.length}`);
109
+ req.files = files;
110
+ if (files.length === 0 && (filesWrongSize.length > 0 || filesWrongType.length > 0)) {
111
+ let errorMessage = "No files uploaded.";
112
+ if (filesWrongSize.length > 0) {
113
+ errorMessage += " Some files were too large.";
114
+ }
115
+ if (filesWrongType.length > 0) {
116
+ errorMessage += " Some files were of an unsupported type.";
117
+ }
118
+ return res.status(400).json({ message: errorMessage });
119
+ }
120
+ next();
121
+ }).catch((error) => {
122
+ console.error("Failed processing one or more files", error);
123
+ res.status(500).json({ message: "Error processing files" });
124
+ });
125
+ });
126
+ req.pipe(bb);
127
+ };
59
128
  const middlewareFactory = (db, publicPath) => {
60
129
  const generatePreviewMiddleware = async (req, res, next) => {
61
- const files = req.file ? [req.file] : req.files;
130
+ const files = req.files;
62
131
  try {
63
- await Promise.all(files.map((file) => createThumbnail(file)));
132
+ await Promise.all(files.map((file) => createThumbnail(path2.join(publicPath, file))));
64
133
  } catch (error) {
65
134
  console.error("Error generating previews:", error);
135
+ return res.status(500).json({ message: "Internal server error while generating previews." });
66
136
  }
67
137
  next();
68
138
  };
69
- const uploadMultipleFilesMiddleware = (req, res, next) => {
70
- let folderName = req.query.folderName || "unsorted";
71
- if (!folderName.startsWith("/")) {
72
- folderName = "/" + folderName;
73
- }
74
- let files = [];
75
- let filesWrongSize = [];
76
- let filesWrongType = [];
77
- let filePath = path2.join(publicPath, folderName);
78
- let filePromise;
79
- try {
80
- const bb = busboy({
81
- headers: req.headers,
82
- limits: {
83
- fileSize: 10 * 1024 * 1024
84
- }
85
- });
86
- bb.on("error", (err) => {
87
- next(err);
88
- });
89
- let fileFullPath;
90
- bb.on("file", (name2, file, info) => {
91
- if (info.filename.length > 0) {
92
- file.resume();
93
- }
94
- if (info.mimeType != "image/png" && info.mimeType != "image/jpeg" && info.mimeType != "image/gif") {
95
- filesWrongType.push(info.filename);
96
- file.resume();
97
- }
98
- let fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
99
- fileFullPath = path2.join(filePath, fileName);
100
- fileRelativePath = path2.join(folderName, fileName);
101
- filePromise = new Promise((resolve, reject) => {
102
- const writeStream = fs.createWriteStream(fileFullPath).on("error", reject).on("finish", resolve);
103
- file.on("error", reject);
104
- file.pipe(writeStream);
105
- });
106
- files.push(fileFullPath);
107
- file.on("limit", () => {
108
- filesWrongSize.push(info.filename);
109
- fsp.unlink(fileFullPath);
110
- const index = files.indexOf(fileFullPath);
111
- if (index !== -1) {
112
- files.splice(index, 1);
113
- }
114
- file.resume();
115
- });
116
- });
117
- bb.on("close", async () => {
118
- try {
119
- if (!filePromise) {
120
- res.status(400).json({ message: `Uploaded file '${name}' is missing` });
121
- return;
122
- }
123
- await filePromise;
124
- req.files = files;
125
- next();
126
- } catch (err) {
127
- next(err);
128
- } finally {
129
- bb.removeAllListeners();
130
- }
131
- });
132
- req.pipe(bb);
133
- } catch (err) {
134
- res.status(400).json({ message: `Could not retrieve file from request - ${err.message}` });
135
- }
139
+ const uploadFilesMiddleware = (req, res, next) => {
140
+ const allowedTypes = [
141
+ "image/png",
142
+ "image/jpeg",
143
+ "image/jpg",
144
+ "image/gif",
145
+ "application/pdf",
146
+ "image/svg+xml",
147
+ "video/mp4",
148
+ "video/quicktime",
149
+ // MOV
150
+ "video/webm"
151
+ ];
152
+ handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
153
+ };
154
+ const uploadImagesMiddleware = (req, res, next) => {
155
+ const allowedTypes = ["image/png", "image/jpeg", "image/jpg", "image/gif"];
156
+ handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
136
157
  };
137
158
  return {
138
- uploadMultipleFilesMiddleware,
159
+ uploadImagesMiddleware,
160
+ uploadFilesMiddleware,
139
161
  generatePreviewMiddleware
140
162
  };
141
163
  };
@@ -168,7 +190,7 @@ var files_routes = function(app, db, origins, publicPath) {
168
190
  app.post(
169
191
  "/api/upload/image",
170
192
  [
171
- middlewareBusboy2.uploadMultipleFilesMiddleware,
193
+ middlewareBusboy2.uploadImagesMiddleware,
172
194
  middlewareBusboy2.generatePreviewMiddleware
173
195
  ],
174
196
  controller.uploadMultipleFileController
@@ -176,15 +198,14 @@ var files_routes = function(app, db, origins, publicPath) {
176
198
  app.post(
177
199
  "/api/upload/file",
178
200
  [
179
- middlewareBusboy2.uploadMultipleFilesMiddleware,
180
- middlewareBusboy2.generatePreviewMiddleware
201
+ middlewareBusboy2.uploadFilesMiddleware
181
202
  ],
182
203
  controller.uploadMultipleFileController
183
204
  );
184
205
  app.post(
185
206
  "/api/upload/multiple",
186
207
  [
187
- middlewareBusboy2.uploadMultipleFilesMiddleware,
208
+ middlewareBusboy2.uploadImagesMiddleware,
188
209
  middlewareBusboy2.generatePreviewMiddleware
189
210
  ],
190
211
  controller.uploadMultipleFileController
@@ -47,7 +47,6 @@ const sitemap = sitemap$1;
47
47
  const mailing = mailing$1.mailing;
48
48
  const parseCookie = parseCookie_1;
49
49
  var globals_server = {
50
- middlewareFactory,
51
50
  sitemap,
52
51
  mailing,
53
52
  parseCookie
@@ -46,7 +46,6 @@ const sitemap = sitemap$1;
46
46
  const mailing = mailing$1;
47
47
  const parseCookie = parseCookie_1;
48
48
  var globals_server = {
49
- middlewareFactory,
50
49
  sitemap,
51
50
  mailing,
52
51
  parseCookie