@ozdao/prometheus-framework 0.1.62 → 0.1.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. package/dist/BackofficeGallery-30022293.js +1 -0
  2. package/dist/BackofficeGallery-f64daa0d.mjs +264 -0
  3. package/dist/BackofficeReports-cb4b180d.mjs +44 -0
  4. package/dist/BackofficeReports-d021871f.js +1 -0
  5. package/dist/BlockTags-8cddaef7.js +1 -0
  6. package/dist/BlockTags-ee310572.mjs +853 -0
  7. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  8. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  9. package/dist/Button-7643c9aa.js +1 -0
  10. package/dist/Button-9e1a9284.mjs +226 -0
  11. package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  12. package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  13. package/dist/ButtonToggleMembership-7ee4dc8e.mjs +90 -0
  14. package/dist/ButtonToggleMembership-b9352cec.js +1 -0
  15. package/dist/CardBlogpost-3c92fbc9.mjs +246 -0
  16. package/dist/CardBlogpost-c7364b1e.js +1 -0
  17. package/dist/CardOrganization-647cb571.js +1 -0
  18. package/dist/CardOrganization-facb77f7.mjs +234 -0
  19. package/dist/CardProduct-92affca1.js +1 -0
  20. package/dist/CardProduct-fca53299.mjs +193 -0
  21. package/dist/Checkbox-5dbe7b23.mjs +62 -0
  22. package/dist/Checkbox-76f09248.js +1 -0
  23. package/dist/Chips-0fdb31c9.js +1 -0
  24. package/dist/Chips-f1a0d085.mjs +214 -0
  25. package/dist/Community-534d473c.mjs +132 -0
  26. package/dist/Community-e9aff969.js +1 -0
  27. package/dist/Dashboard-91d73bc5.js +1 -0
  28. package/dist/Dashboard-ea9035bc.mjs +152 -0
  29. package/dist/Dropdown-31115457.js +1 -0
  30. package/dist/Dropdown-cab3605b.mjs +146 -0
  31. package/dist/EULA-aba6a807.js +1 -0
  32. package/dist/EULA-e05236af.mjs +4210 -0
  33. package/dist/EditOrder-94bbebff.mjs +221 -0
  34. package/dist/EditOrder-c070d474.js +1 -0
  35. package/dist/EmptyState-d65bab5b.js +1 -0
  36. package/dist/EmptyState-e404b05d.mjs +36 -0
  37. package/dist/Events-46ae8fc6.mjs +123 -0
  38. package/dist/Events-813c8c7b.js +1 -0
  39. package/dist/Feed-2d443ad2.mjs +146 -0
  40. package/dist/Feed-3a4e7a9c.js +1 -0
  41. package/dist/Feed-8b554fc1.js +1 -0
  42. package/dist/Feed-98b47c6f.js +1 -0
  43. package/dist/Feed-a21d6007.mjs +124 -0
  44. package/dist/Feed-b39138c8.js +1 -0
  45. package/dist/Feed-c41ef736.mjs +361 -0
  46. package/dist/Feed-d114330c.mjs +112 -0
  47. package/dist/Field-e2a43424.js +1 -0
  48. package/dist/Field-e5ad88d3.mjs +75 -0
  49. package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
  50. package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
  51. package/dist/Gallery-46b5f939.js +1 -0
  52. package/dist/Gallery-762a9c2d.mjs +241 -0
  53. package/dist/IconChevronRight-a55f838e.js +1 -0
  54. package/dist/IconChevronRight-fae9d012.mjs +28 -0
  55. package/dist/IconCommunity-468dc457.mjs +65 -0
  56. package/dist/IconCommunity-b339e806.js +1 -0
  57. package/dist/IconCross-5bf93179.js +1 -0
  58. package/dist/IconCross-84cb1292.mjs +28 -0
  59. package/dist/IconEdit-9edfd74d.mjs +21 -0
  60. package/dist/IconEdit-c0469b45.js +1 -0
  61. package/dist/Image-4dcfddb8.js +9 -0
  62. package/dist/Image-e0da17ac.mjs +571 -0
  63. package/dist/LabelGooglePlay-24feb437.mjs +31 -0
  64. package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
  65. package/dist/LeftoverAdd-5a8988d9.js +1 -0
  66. package/dist/LeftoverAdd-c4f37f47.mjs +227 -0
  67. package/dist/Leftovers-470a1689.js +1 -0
  68. package/dist/Leftovers-69c7dcd9.mjs +136 -0
  69. package/dist/Loader-21f016da.js +1 -0
  70. package/dist/Loader-cd422786.mjs +41 -0
  71. package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  72. package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  73. package/dist/Members-04273cd4.mjs +114 -0
  74. package/dist/Members-0685a15f.js +1 -0
  75. package/dist/Menu-b5d6a0c7.js +1 -0
  76. package/dist/Menu-dd7645c1.mjs +13 -0
  77. package/dist/MenuItem-56ae7f94.js +1 -0
  78. package/dist/MenuItem-6296d02f.mjs +63 -0
  79. package/dist/Orders-b64e8cb9.js +1 -0
  80. package/dist/Orders-ff30db05.mjs +75 -0
  81. package/dist/Organizations-46aab2c8.mjs +73 -0
  82. package/dist/Organizations-a8627bc5.js +1 -0
  83. package/dist/Payments-53e5fecf.js +1 -0
  84. package/dist/Payments-82e545e1.mjs +87 -0
  85. package/dist/PlaceholderUserpic-14c6ea7e.mjs +28 -0
  86. package/dist/PlaceholderUserpic-47f6f319.js +1 -0
  87. package/dist/Popup-0915427c.mjs +74 -0
  88. package/dist/Popup-795f5c88.js +1 -0
  89. package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  90. package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  91. package/dist/Product-7e001b81.js +7 -0
  92. package/dist/Product-f3f42158.mjs +653 -0
  93. package/dist/ProductEdit-959b3cd3.mjs +295 -0
  94. package/dist/ProductEdit-bae5e898.js +1 -0
  95. package/dist/ProductsBackoffice-0716123f.js +1 -0
  96. package/dist/ProductsBackoffice-a36ecbc6.mjs +85 -0
  97. package/dist/ProfileBlogposts-c790d1b2.js +1 -0
  98. package/dist/ProfileBlogposts-f43cf32e.mjs +79 -0
  99. package/dist/ProfileEvents-12f80fff.mjs +70 -0
  100. package/dist/ProfileEvents-585570a3.js +1 -0
  101. package/dist/ProfileOrganizations-bbc2cf40.mjs +73 -0
  102. package/dist/ProfileOrganizations-d7103514.js +1 -0
  103. package/dist/Publics-094f3c2c.mjs +45 -0
  104. package/dist/Publics-1032c0f4.js +1 -0
  105. package/dist/Select-11ddabf5.mjs +79 -0
  106. package/dist/Select-3ca5ab39.js +1 -0
  107. package/dist/SelectMulti-58704d69.mjs +1038 -0
  108. package/dist/SelectMulti-c25765cf.js +1 -0
  109. package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
  110. package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
  111. package/dist/SkeletonEvent-8690422d.mjs +16 -0
  112. package/dist/SkeletonEvent-eb284de8.js +1 -0
  113. package/dist/SkeletonEventShort-6c9e3940.js +1 -0
  114. package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
  115. package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
  116. package/dist/SkeletonOrganization-8690422d.mjs +16 -0
  117. package/dist/Socials-31c06635.mjs +74 -0
  118. package/dist/Socials-cceaeaf2.js +1 -0
  119. package/dist/Tab-054b61f7.mjs +46 -0
  120. package/dist/Tab-2c1e4224.js +1 -0
  121. package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  122. package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  123. package/dist/Upload-06d93178.js +1 -0
  124. package/dist/Upload-23212d9d.mjs +74 -0
  125. package/dist/UploadImage-0f488170.js +1 -0
  126. package/dist/UploadImage-3c627d89.mjs +83 -0
  127. package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
  128. package/dist/UploadImageMultiple-eddaac87.js +1 -0
  129. package/dist/Wallet-2043b611.mjs +24682 -0
  130. package/dist/Wallet-8fa7386a.js +55 -0
  131. package/dist/_plugin-vue_export-helper-dad06003.mjs +9 -0
  132. package/dist/_plugin-vue_export-helper-f246444f.js +1 -0
  133. package/dist/auth-56dc2ba7.mjs +607 -0
  134. package/dist/auth-f018f5b3.js +7 -0
  135. package/dist/auth.client.cjs +7 -0
  136. package/dist/auth.client.js +3874 -0
  137. package/dist/auth.validation-c31a60e7.mjs +24 -0
  138. package/dist/auth.validation-d049b341.js +1 -0
  139. package/dist/backoffice.client.cjs +1 -0
  140. package/dist/backoffice.client.js +265 -0
  141. package/dist/carousel.es-44c501bc.mjs +383 -0
  142. package/dist/carousel.es-cdfb392c.js +5 -0
  143. package/dist/categories-5b08da53.mjs +121 -0
  144. package/dist/categories-7ccd6be9.js +1 -0
  145. package/dist/click-outside-0b0727d1.js +2 -0
  146. package/dist/click-outside-6101836c.mjs +19 -0
  147. package/dist/community.client.cjs +1 -0
  148. package/dist/community.client.js +692 -0
  149. package/dist/dribbble-8e8e169b.js +1 -0
  150. package/dist/dribbble-ae37c2ac.mjs +127 -0
  151. package/dist/events.client.cjs +2 -0
  152. package/dist/events.client.js +8885 -0
  153. package/dist/files.client.cjs +1 -0
  154. package/dist/files.client.js +1 -0
  155. package/dist/gallery-d4297191.mjs +54 -0
  156. package/dist/gallery-f92912df.js +1 -0
  157. package/dist/gallery.client.cjs +1 -0
  158. package/dist/gallery.client.js +18 -0
  159. package/dist/globals-928eb13c.js +1 -0
  160. package/dist/globals-96ba60e4.mjs +91 -0
  161. package/dist/globals.client.cjs +1 -0
  162. package/dist/globals.client.js +12 -0
  163. package/dist/icons.client.cjs +1 -0
  164. package/dist/icons.client.js +84 -0
  165. package/dist/index-a661083c.mjs +934 -0
  166. package/dist/index-b41aac19.js +2 -0
  167. package/dist/inputs.validation-d7cef32b.js +1 -0
  168. package/dist/inputs.validation-db65277a.mjs +83 -0
  169. package/dist/landing.client.cjs +1 -0
  170. package/dist/landing.client.js +111 -0
  171. package/dist/leftovers-5d1ff88b.mjs +67 -0
  172. package/dist/leftovers-b60180cf.js +1 -0
  173. package/dist/legal.client.cjs +1 -0
  174. package/dist/legal.client.js +8512 -0
  175. package/dist/memberships-12210953.mjs +68 -0
  176. package/dist/memberships-393765d8.js +1 -0
  177. package/dist/middlewares.client.cjs +1 -0
  178. package/dist/middlewares.client.js +1 -0
  179. package/dist/orders-13c10d49.mjs +85 -0
  180. package/dist/orders-37f041aa.js +1 -0
  181. package/dist/organizations-587d5a4d.mjs +122 -0
  182. package/dist/organizations-b4d902a2.js +1 -0
  183. package/dist/organizations.client-35b74e44.mjs +2997 -0
  184. package/dist/organizations.client-f982f55a.js +3 -0
  185. package/dist/organizations.client.cjs +1 -0
  186. package/dist/organizations.client.js +86 -0
  187. package/dist/products-3c43eb18.js +1 -0
  188. package/dist/products-943fb95e.mjs +107 -0
  189. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
  191. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  192. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  193. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -67
  195. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  197. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  199. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  200. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
  201. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  202. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
  203. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  205. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  207. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  209. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  211. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  213. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  215. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  219. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  221. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  222. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  223. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  225. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  227. package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
  229. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  231. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  232. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  233. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  234. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  235. package/dist/reports-270f69df.js +1 -0
  236. package/dist/reports-79cd9459.mjs +91 -0
  237. package/dist/reports.client.cjs +1 -0
  238. package/dist/reports.client.js +8 -0
  239. package/dist/states.validation-3b70f83a.js +1 -0
  240. package/dist/states.validation-944e334c.mjs +13 -0
  241. package/dist/style.css +1 -1
  242. package/dist/users.client.cjs +1 -0
  243. package/dist/users.client.js +632 -0
  244. package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
  245. package/dist/vue-draggable-next.esm-bundler-ff6e3f52.mjs +1557 -0
  246. package/dist/vuex.esm-bundler-57d8b6ba.mjs +750 -0
  247. package/dist/vuex.esm-bundler-685cf29f.js +5 -0
  248. package/package.json +1 -1
  249. package/src/modules/auth/components/pages/SignIn.vue +2 -2
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=(t,o)=>{const c=t.__vccOpts||t;for(const[r,s]of o)c[r]=s;return c};exports._export_sfc=e;
@@ -0,0 +1,607 @@
1
+ import { g as de, a as V } from "./index-a661083c.mjs";
2
+ import { reactive as z, watch as N } from "vue";
3
+ import { s as E } from "./globals-96ba60e4.mjs";
4
+ var Z = { exports: {} };
5
+ /*!
6
+ * JavaScript Cookie v2.2.1
7
+ * https://github.com/js-cookie/js-cookie
8
+ *
9
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
10
+ * Released under the MIT license
11
+ */
12
+ (function(r, e) {
13
+ (function(t) {
14
+ var o;
15
+ if (r.exports = t(), o = !0, !o) {
16
+ var n = window.Cookies, s = window.Cookies = t();
17
+ s.noConflict = function() {
18
+ return window.Cookies = n, s;
19
+ };
20
+ }
21
+ })(function() {
22
+ function t() {
23
+ for (var s = 0, i = {}; s < arguments.length; s++) {
24
+ var a = arguments[s];
25
+ for (var l in a)
26
+ i[l] = a[l];
27
+ }
28
+ return i;
29
+ }
30
+ function o(s) {
31
+ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
32
+ }
33
+ function n(s) {
34
+ function i() {
35
+ }
36
+ function a(c, p, d) {
37
+ if (!(typeof document > "u")) {
38
+ d = t({
39
+ path: "/"
40
+ }, i.defaults, d), typeof d.expires == "number" && (d.expires = new Date(/* @__PURE__ */ new Date() * 1 + d.expires * 864e5)), d.expires = d.expires ? d.expires.toUTCString() : "";
41
+ try {
42
+ var b = JSON.stringify(p);
43
+ /^[\{\[]/.test(b) && (p = b);
44
+ } catch {
45
+ }
46
+ p = s.write ? s.write(p, c) : encodeURIComponent(String(p)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), c = encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
47
+ var y = "";
48
+ for (var C in d)
49
+ d[C] && (y += "; " + C, d[C] !== !0 && (y += "=" + d[C].split(";")[0]));
50
+ return document.cookie = c + "=" + p + y;
51
+ }
52
+ }
53
+ function l(c, p) {
54
+ if (!(typeof document > "u")) {
55
+ for (var d = {}, b = document.cookie ? document.cookie.split("; ") : [], y = 0; y < b.length; y++) {
56
+ var C = b[y].split("="), h = C.slice(1).join("=");
57
+ !p && h.charAt(0) === '"' && (h = h.slice(1, -1));
58
+ try {
59
+ var U = o(C[0]);
60
+ if (h = (s.read || s)(h, U) || o(h), p)
61
+ try {
62
+ h = JSON.parse(h);
63
+ } catch {
64
+ }
65
+ if (d[U] = h, c === U)
66
+ break;
67
+ } catch {
68
+ }
69
+ }
70
+ return c ? d[c] : d;
71
+ }
72
+ }
73
+ return i.set = a, i.get = function(c) {
74
+ return l(
75
+ c,
76
+ !1
77
+ /* read as raw */
78
+ );
79
+ }, i.getJSON = function(c) {
80
+ return l(
81
+ c,
82
+ !0
83
+ /* read as json */
84
+ );
85
+ }, i.remove = function(c, p) {
86
+ a(c, "", t(p, {
87
+ expires: -1
88
+ }));
89
+ }, i.defaults = {}, i.withConverter = n, i;
90
+ }
91
+ return n(function() {
92
+ });
93
+ });
94
+ })(Z);
95
+ var le = Z.exports;
96
+ const Q = /* @__PURE__ */ de(le);
97
+ /*! Capacitor: https://capacitorjs.com/ - MIT License */
98
+ const ue = (r) => {
99
+ const e = /* @__PURE__ */ new Map();
100
+ e.set("web", { name: "web" });
101
+ const t = r.CapacitorPlatforms || {
102
+ currentPlatform: { name: "web" },
103
+ platforms: e
104
+ }, o = (s, i) => {
105
+ t.platforms.set(s, i);
106
+ }, n = (s) => {
107
+ t.platforms.has(s) && (t.currentPlatform = t.platforms.get(s));
108
+ };
109
+ return t.addPlatform = o, t.setPlatform = n, t;
110
+ }, fe = (r) => r.CapacitorPlatforms = ue(r), X = /* @__PURE__ */ fe(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
111
+ X.addPlatform;
112
+ X.setPlatform;
113
+ var _;
114
+ (function(r) {
115
+ r.Unimplemented = "UNIMPLEMENTED", r.Unavailable = "UNAVAILABLE";
116
+ })(_ || (_ = {}));
117
+ class W extends Error {
118
+ constructor(e, t, o) {
119
+ super(e), this.message = e, this.code = t, this.data = o;
120
+ }
121
+ }
122
+ const pe = (r) => {
123
+ var e, t;
124
+ return r != null && r.androidBridge ? "android" : !((t = (e = r == null ? void 0 : r.webkit) === null || e === void 0 ? void 0 : e.messageHandlers) === null || t === void 0) && t.bridge ? "ios" : "web";
125
+ }, me = (r) => {
126
+ var e, t, o, n, s;
127
+ const i = r.CapacitorCustomPlatform || null, a = r.Capacitor || {}, l = a.Plugins = a.Plugins || {}, c = r.CapacitorPlatforms, p = () => i !== null ? i.name : pe(r), d = ((e = c == null ? void 0 : c.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || p, b = () => d() !== "web", y = ((t = c == null ? void 0 : c.currentPlatform) === null || t === void 0 ? void 0 : t.isNativePlatform) || b, C = (u) => {
128
+ const f = M.get(u);
129
+ return !!(f != null && f.platforms.has(d()) || $(u));
130
+ }, h = ((o = c == null ? void 0 : c.currentPlatform) === null || o === void 0 ? void 0 : o.isPluginAvailable) || C, U = (u) => {
131
+ var f;
132
+ return (f = a.PluginHeaders) === null || f === void 0 ? void 0 : f.find((x) => x.name === u);
133
+ }, $ = ((n = c == null ? void 0 : c.currentPlatform) === null || n === void 0 ? void 0 : n.getPluginHeader) || U, re = (u) => r.console.error(u), se = (u, f, x) => Promise.reject(`${x} does not have an implementation of "${f}".`), M = /* @__PURE__ */ new Map(), ne = (u, f = {}) => {
134
+ const x = M.get(u);
135
+ if (x)
136
+ return console.warn(`Capacitor plugin "${u}" already registered. Cannot register plugins twice.`), x.proxy;
137
+ const k = d(), S = $(u);
138
+ let O;
139
+ const ae = async () => (!O && k in f ? O = typeof f[k] == "function" ? O = await f[k]() : O = f[k] : i !== null && !O && "web" in f && (O = typeof f.web == "function" ? O = await f.web() : O = f.web), O), ie = (m, g) => {
140
+ var P, L;
141
+ if (S) {
142
+ const j = S == null ? void 0 : S.methods.find((v) => g === v.name);
143
+ if (j)
144
+ return j.rtype === "promise" ? (v) => a.nativePromise(u, g.toString(), v) : (v, R) => a.nativeCallback(u, g.toString(), v, R);
145
+ if (m)
146
+ return (P = m[g]) === null || P === void 0 ? void 0 : P.bind(m);
147
+ } else {
148
+ if (m)
149
+ return (L = m[g]) === null || L === void 0 ? void 0 : L.bind(m);
150
+ throw new W(`"${u}" plugin is not implemented on ${k}`, _.Unimplemented);
151
+ }
152
+ }, H = (m) => {
153
+ let g;
154
+ const P = (...L) => {
155
+ const j = ae().then((v) => {
156
+ const R = ie(v, m);
157
+ if (R) {
158
+ const T = R(...L);
159
+ return g = T == null ? void 0 : T.remove, T;
160
+ } else
161
+ throw new W(`"${u}.${m}()" is not implemented on ${k}`, _.Unimplemented);
162
+ });
163
+ return m === "addListener" && (j.remove = async () => g()), j;
164
+ };
165
+ return P.toString = () => `${m.toString()}() { [capacitor code] }`, Object.defineProperty(P, "name", {
166
+ value: m,
167
+ writable: !1,
168
+ configurable: !1
169
+ }), P;
170
+ }, q = H("addListener"), G = H("removeListener"), ce = (m, g) => {
171
+ const P = q({ eventName: m }, g), L = async () => {
172
+ const v = await P;
173
+ G({
174
+ eventName: m,
175
+ callbackId: v
176
+ }, g);
177
+ }, j = new Promise((v) => P.then(() => v({ remove: L })));
178
+ return j.remove = async () => {
179
+ console.warn("Using addListener() without 'await' is deprecated."), await L();
180
+ }, j;
181
+ }, B = new Proxy({}, {
182
+ get(m, g) {
183
+ switch (g) {
184
+ case "$$typeof":
185
+ return;
186
+ case "toJSON":
187
+ return () => ({});
188
+ case "addListener":
189
+ return S ? ce : q;
190
+ case "removeListener":
191
+ return G;
192
+ default:
193
+ return H(g);
194
+ }
195
+ }
196
+ });
197
+ return l[u] = B, M.set(u, {
198
+ name: u,
199
+ proxy: B,
200
+ platforms: /* @__PURE__ */ new Set([
201
+ ...Object.keys(f),
202
+ ...S ? [k] : []
203
+ ])
204
+ }), B;
205
+ }, oe = ((s = c == null ? void 0 : c.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || ne;
206
+ return a.convertFileSrc || (a.convertFileSrc = (u) => u), a.getPlatform = d, a.handleError = re, a.isNativePlatform = y, a.isPluginAvailable = h, a.pluginMethodNoop = se, a.registerPlugin = oe, a.Exception = W, a.DEBUG = !!a.DEBUG, a.isLoggingEnabled = !!a.isLoggingEnabled, a.platform = a.getPlatform(), a.isNative = a.isNativePlatform(), a;
207
+ }, ge = (r) => r.Capacitor = me(r), D = /* @__PURE__ */ ge(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}), Y = D.registerPlugin;
208
+ D.Plugins;
209
+ class ee {
210
+ constructor(e) {
211
+ this.listeners = {}, this.windowListeners = {}, e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), this.config = e);
212
+ }
213
+ addListener(e, t) {
214
+ this.listeners[e] || (this.listeners[e] = []), this.listeners[e].push(t);
215
+ const n = this.windowListeners[e];
216
+ n && !n.registered && this.addWindowListener(n);
217
+ const s = async () => this.removeListener(e, t), i = Promise.resolve({ remove: s });
218
+ return Object.defineProperty(i, "remove", {
219
+ value: async () => {
220
+ console.warn("Using addListener() without 'await' is deprecated."), await s();
221
+ }
222
+ }), i;
223
+ }
224
+ async removeAllListeners() {
225
+ this.listeners = {};
226
+ for (const e in this.windowListeners)
227
+ this.removeWindowListener(this.windowListeners[e]);
228
+ this.windowListeners = {};
229
+ }
230
+ notifyListeners(e, t) {
231
+ const o = this.listeners[e];
232
+ o && o.forEach((n) => n(t));
233
+ }
234
+ hasListeners(e) {
235
+ return !!this.listeners[e].length;
236
+ }
237
+ registerWindowListener(e, t) {
238
+ this.windowListeners[t] = {
239
+ registered: !1,
240
+ windowEventName: e,
241
+ pluginEventName: t,
242
+ handler: (o) => {
243
+ this.notifyListeners(t, o);
244
+ }
245
+ };
246
+ }
247
+ unimplemented(e = "not implemented") {
248
+ return new D.Exception(e, _.Unimplemented);
249
+ }
250
+ unavailable(e = "not available") {
251
+ return new D.Exception(e, _.Unavailable);
252
+ }
253
+ async removeListener(e, t) {
254
+ const o = this.listeners[e];
255
+ if (!o)
256
+ return;
257
+ const n = o.indexOf(t);
258
+ this.listeners[e].splice(n, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
259
+ }
260
+ addWindowListener(e) {
261
+ window.addEventListener(e.windowEventName, e.handler), e.registered = !0;
262
+ }
263
+ removeWindowListener(e) {
264
+ e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
265
+ }
266
+ }
267
+ const J = (r) => encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), K = (r) => r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
268
+ class we extends ee {
269
+ async getCookies() {
270
+ const e = document.cookie, t = {};
271
+ return e.split(";").forEach((o) => {
272
+ if (o.length <= 0)
273
+ return;
274
+ let [n, s] = o.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
275
+ n = K(n).trim(), s = K(s).trim(), t[n] = s;
276
+ }), t;
277
+ }
278
+ async setCookie(e) {
279
+ try {
280
+ const t = J(e.key), o = J(e.value), n = `; expires=${(e.expires || "").replace("expires=", "")}`, s = (e.path || "/").replace("path=", ""), i = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
281
+ document.cookie = `${t}=${o || ""}${n}; path=${s}; ${i};`;
282
+ } catch (t) {
283
+ return Promise.reject(t);
284
+ }
285
+ }
286
+ async deleteCookie(e) {
287
+ try {
288
+ document.cookie = `${e.key}=; Max-Age=0`;
289
+ } catch (t) {
290
+ return Promise.reject(t);
291
+ }
292
+ }
293
+ async clearCookies() {
294
+ try {
295
+ const e = document.cookie.split(";") || [];
296
+ for (const t of e)
297
+ document.cookie = t.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`);
298
+ } catch (e) {
299
+ return Promise.reject(e);
300
+ }
301
+ }
302
+ async clearAllCookies() {
303
+ try {
304
+ await this.clearCookies();
305
+ } catch (e) {
306
+ return Promise.reject(e);
307
+ }
308
+ }
309
+ }
310
+ const te = Y("CapacitorCookies", {
311
+ web: () => new we()
312
+ }), he = async (r) => new Promise((e, t) => {
313
+ const o = new FileReader();
314
+ o.onload = () => {
315
+ const n = o.result;
316
+ e(n.indexOf(",") >= 0 ? n.split(",")[1] : n);
317
+ }, o.onerror = (n) => t(n), o.readAsDataURL(r);
318
+ }), ve = (r = {}) => {
319
+ const e = Object.keys(r);
320
+ return Object.keys(r).map((n) => n.toLocaleLowerCase()).reduce((n, s, i) => (n[s] = r[e[i]], n), {});
321
+ }, Pe = (r, e = !0) => r ? Object.entries(r).reduce((o, n) => {
322
+ const [s, i] = n;
323
+ let a, l;
324
+ return Array.isArray(i) ? (l = "", i.forEach((c) => {
325
+ a = e ? encodeURIComponent(c) : c, l += `${s}=${a}&`;
326
+ }), l.slice(0, -1)) : (a = e ? encodeURIComponent(i) : i, l = `${s}=${a}`), `${o}&${l}`;
327
+ }, "").substr(1) : null, be = (r, e = {}) => {
328
+ const t = Object.assign({ method: r.method || "GET", headers: r.headers }, e), n = ve(r.headers)["content-type"] || "";
329
+ if (typeof r.data == "string")
330
+ t.body = r.data;
331
+ else if (n.includes("application/x-www-form-urlencoded")) {
332
+ const s = new URLSearchParams();
333
+ for (const [i, a] of Object.entries(r.data || {}))
334
+ s.set(i, a);
335
+ t.body = s.toString();
336
+ } else if (n.includes("multipart/form-data")) {
337
+ const s = new FormData();
338
+ if (r.data instanceof FormData)
339
+ r.data.forEach((a, l) => {
340
+ s.append(l, a);
341
+ });
342
+ else
343
+ for (const a of Object.keys(r.data))
344
+ s.append(a, r.data[a]);
345
+ t.body = s;
346
+ const i = new Headers(t.headers);
347
+ i.delete("content-type"), t.headers = i;
348
+ } else
349
+ (n.includes("application/json") || typeof r.data == "object") && (t.body = JSON.stringify(r.data));
350
+ return t;
351
+ };
352
+ class ye extends ee {
353
+ /**
354
+ * Perform an Http request given a set of options
355
+ * @param options Options to build the HTTP request
356
+ */
357
+ async request(e) {
358
+ const t = be(e, e.webFetchExtra), o = Pe(e.params, e.shouldEncodeUrlParams), n = o ? `${e.url}?${o}` : e.url, s = await fetch(n, t), i = s.headers.get("content-type") || "";
359
+ let { responseType: a = "text" } = s.ok ? e : {};
360
+ i.includes("application/json") && (a = "json");
361
+ let l, c;
362
+ switch (a) {
363
+ case "arraybuffer":
364
+ case "blob":
365
+ c = await s.blob(), l = await he(c);
366
+ break;
367
+ case "json":
368
+ l = await s.json();
369
+ break;
370
+ case "document":
371
+ case "text":
372
+ default:
373
+ l = await s.text();
374
+ }
375
+ const p = {};
376
+ return s.headers.forEach((d, b) => {
377
+ p[b] = d;
378
+ }), {
379
+ data: l,
380
+ headers: p,
381
+ status: s.status,
382
+ url: s.url
383
+ };
384
+ }
385
+ /**
386
+ * Perform an Http GET request given a set of options
387
+ * @param options Options to build the HTTP request
388
+ */
389
+ async get(e) {
390
+ return this.request(Object.assign(Object.assign({}, e), { method: "GET" }));
391
+ }
392
+ /**
393
+ * Perform an Http POST request given a set of options
394
+ * @param options Options to build the HTTP request
395
+ */
396
+ async post(e) {
397
+ return this.request(Object.assign(Object.assign({}, e), { method: "POST" }));
398
+ }
399
+ /**
400
+ * Perform an Http PUT request given a set of options
401
+ * @param options Options to build the HTTP request
402
+ */
403
+ async put(e) {
404
+ return this.request(Object.assign(Object.assign({}, e), { method: "PUT" }));
405
+ }
406
+ /**
407
+ * Perform an Http PATCH request given a set of options
408
+ * @param options Options to build the HTTP request
409
+ */
410
+ async patch(e) {
411
+ return this.request(Object.assign(Object.assign({}, e), { method: "PATCH" }));
412
+ }
413
+ /**
414
+ * Perform an Http DELETE request given a set of options
415
+ * @param options Options to build the HTTP request
416
+ */
417
+ async delete(e) {
418
+ return this.request(Object.assign(Object.assign({}, e), { method: "DELETE" }));
419
+ }
420
+ }
421
+ Y("CapacitorHttp", {
422
+ web: () => new ye()
423
+ });
424
+ const Ce = V.create({ baseURL: process.env.API_URL, withCredentials: !0 }), A = z({
425
+ code: {
426
+ value: "",
427
+ type: "",
428
+ method: "",
429
+ isSended: !1,
430
+ isValid: !1
431
+ }
432
+ });
433
+ async function Oe(r, e, t) {
434
+ return await Ce.post("/api/twofa/sendcode", {
435
+ phone: r.phone.number,
436
+ email: r.email,
437
+ method: e,
438
+ type: t
439
+ }).then(
440
+ (o) => (A.code = o.data, A.code.isSended = !0, Promise.resolve(o.data)),
441
+ (o) => (console.log(o), E(o), Promise.reject(o))
442
+ );
443
+ }
444
+ N(A, (r, e) => {
445
+ });
446
+ const _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
447
+ __proto__: null,
448
+ sendCode: Oe,
449
+ state: A
450
+ }, Symbol.toStringTag, { value: "Module" })), I = V.create({ baseURL: process.env.API_URL, withCredentials: !0 }), w = z({
451
+ user: {
452
+ _id: void 0,
453
+ username: "",
454
+ email: "",
455
+ phone: "",
456
+ password: "",
457
+ passwordRepeat: ""
458
+ },
459
+ access: {
460
+ roles: null,
461
+ token: null,
462
+ status: !1
463
+ }
464
+ }), Le = {
465
+ async login(r, e) {
466
+ try {
467
+ const t = await I.post("/api/auth/signin", {
468
+ ...r,
469
+ type: e
470
+ });
471
+ return F("user", t.data), Object.assign(w.user, {
472
+ ...t.data
473
+ }), Object.assign(w.access, {
474
+ token: t.data.accessToken,
475
+ status: !0,
476
+ roles: t.data.roles
477
+ }), t.data;
478
+ } catch (t) {
479
+ return Object.assign(w.access, {
480
+ token: null,
481
+ status: !1,
482
+ roles: null
483
+ }), E(t), Promise.reject(t);
484
+ }
485
+ },
486
+ async signup(r, e, t) {
487
+ const { password: o, passwordRepeat: n } = w.user;
488
+ if (o !== n) {
489
+ const s = {
490
+ response: {
491
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
492
+ }
493
+ };
494
+ throw E(s), new Error(s.response.status);
495
+ }
496
+ try {
497
+ r.phone = r.phone.number;
498
+ const s = await I.post("/api/auth/signup", {
499
+ ...r,
500
+ type: e,
501
+ inviteCode: t
502
+ });
503
+ return s.data.accessToken && F("user", s.data), Object.assign(w.user, {
504
+ ...s.data
505
+ }), Object.assign(w.access, {
506
+ token: s.data.accessToken,
507
+ status: !0,
508
+ roles: s.data.roles
509
+ }), s.data;
510
+ } catch (s) {
511
+ throw E(s), console.log("Sign up falied"), s;
512
+ }
513
+ },
514
+ logout() {
515
+ ke("user"), Object.assign(w.user, {
516
+ email: "",
517
+ phone: "",
518
+ password: "",
519
+ passwordRepeat: ""
520
+ }), Object.assign(w.access, {
521
+ token: null,
522
+ status: !1
523
+ });
524
+ },
525
+ async resetPassword(r, e) {
526
+ try {
527
+ const t = await I.post("/api/auth/reset-password", {
528
+ email: r.email,
529
+ phone: r.phone.number,
530
+ type: e
531
+ });
532
+ return Object.assign(A.code, {
533
+ ...t.data,
534
+ isSended: !0
535
+ }), t.data;
536
+ } catch (t) {
537
+ return E(t), Promise.reject(t);
538
+ }
539
+ },
540
+ async updatePassword(r, e) {
541
+ const { password: t, passwordRepeat: o } = w.user;
542
+ if (t !== o) {
543
+ const n = {
544
+ response: {
545
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
546
+ }
547
+ };
548
+ throw E(n), new Error(n.response.status);
549
+ }
550
+ try {
551
+ const n = await I.post("/api/auth/update-password", {
552
+ email: r.email,
553
+ phone: r.phone.number,
554
+ password: r.password,
555
+ passwordRepeat: r.passwordRepeat,
556
+ type: e
557
+ });
558
+ return n.data.accessToken && F("user", n.data), Object.assign(w.user, {
559
+ ...n.data
560
+ }), Object.assign(w.access, {
561
+ token: n.data.accessToken,
562
+ status: !0
563
+ }), n.data;
564
+ } catch (n) {
565
+ return E(n), Promise.reject(n);
566
+ }
567
+ }
568
+ }, je = {
569
+ development: { secure: !1, expires: 1 },
570
+ production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
571
+ };
572
+ function F(r, e, t = process.env.NODE_ENV) {
573
+ process.env.MOBILE_APP ? te.setCookie({
574
+ url: process.env.API_URL,
575
+ // используйте ваш API_URL
576
+ key: r,
577
+ value: JSON.stringify(e)
578
+ }) : Q.set(r, JSON.stringify(e), je[t]);
579
+ }
580
+ function ke(r, e = process.env.NODE_ENV) {
581
+ if (process.env.MOBILE_APP)
582
+ te.deleteCookie({
583
+ url: process.env.API_URL,
584
+ // используйте ваш API_URL
585
+ key: r
586
+ });
587
+ else {
588
+ const t = e === "production" ? { domain: process.env.API_URL } : {};
589
+ Q.remove(r, t);
590
+ }
591
+ }
592
+ N(w, (r, e) => {
593
+ });
594
+ const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
595
+ __proto__: null,
596
+ actions: Le,
597
+ state: w
598
+ }, Symbol.toStringTag, { value: "Module" }));
599
+ export {
600
+ Q as C,
601
+ Le as a,
602
+ A as b,
603
+ Oe as c,
604
+ Ue as d,
605
+ w as s,
606
+ _e as t
607
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";const G=require("./index-b41aac19.js"),M=require("vue"),j=require("./globals-928eb13c.js");var Z={exports:{}};/*!
2
+ * JavaScript Cookie v2.2.1
3
+ * https://github.com/js-cookie/js-cookie
4
+ *
5
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
6
+ * Released under the MIT license
7
+ */(function(r,e){(function(t){var o;if(r.exports=t(),o=!0,!o){var n=window.Cookies,s=window.Cookies=t();s.noConflict=function(){return window.Cookies=n,s}}})(function(){function t(){for(var s=0,i={};s<arguments.length;s++){var a=arguments[s];for(var l in a)i[l]=a[l]}return i}function o(s){return s.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(s){function i(){}function a(c,p,d){if(!(typeof document>"u")){d=t({path:"/"},i.defaults,d),typeof d.expires=="number"&&(d.expires=new Date(new Date*1+d.expires*864e5)),d.expires=d.expires?d.expires.toUTCString():"";try{var b=JSON.stringify(p);/^[\{\[]/.test(b)&&(p=b)}catch{}p=s.write?s.write(p,c):encodeURIComponent(String(p)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var y="";for(var C in d)d[C]&&(y+="; "+C,d[C]!==!0&&(y+="="+d[C].split(";")[0]));return document.cookie=c+"="+p+y}}function l(c,p){if(!(typeof document>"u")){for(var d={},b=document.cookie?document.cookie.split("; "):[],y=0;y<b.length;y++){var C=b[y].split("="),h=C.slice(1).join("=");!p&&h.charAt(0)==='"'&&(h=h.slice(1,-1));try{var $=o(C[0]);if(h=(s.read||s)(h,$)||o(h),p)try{h=JSON.parse(h)}catch{}if(d[$]=h,c===$)break}catch{}}return c?d[c]:d}}return i.set=a,i.get=function(c){return l(c,!1)},i.getJSON=function(c){return l(c,!0)},i.remove=function(c,p){a(c,"",t(p,{expires:-1}))},i.defaults={},i.withConverter=n,i}return n(function(){})})})(Z);var le=Z.exports;const J=G.getDefaultExportFromCjs(le);/*! Capacitor: https://capacitorjs.com/ - MIT License */const ue=r=>{const e=new Map;e.set("web",{name:"web"});const t=r.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},o=(s,i)=>{t.platforms.set(s,i)},n=s=>{t.platforms.has(s)&&(t.currentPlatform=t.platforms.get(s))};return t.addPlatform=o,t.setPlatform=n,t},fe=r=>r.CapacitorPlatforms=ue(r),Q=fe(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Q.addPlatform;Q.setPlatform;var _;(function(r){r.Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE"})(_||(_={}));class q extends Error{constructor(e,t,o){super(e),this.message=e,this.code=t,this.data=o}}const pe=r=>{var e,t;return r!=null&&r.androidBridge?"android":!((t=(e=r==null?void 0:r.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||t===void 0)&&t.bridge?"ios":"web"},ge=r=>{var e,t,o,n,s;const i=r.CapacitorCustomPlatform||null,a=r.Capacitor||{},l=a.Plugins=a.Plugins||{},c=r.CapacitorPlatforms,p=()=>i!==null?i.name:pe(r),d=((e=c==null?void 0:c.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||p,b=()=>d()!=="web",y=((t=c==null?void 0:c.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||b,C=u=>{const f=H.get(u);return!!(f!=null&&f.platforms.has(d())||A(u))},h=((o=c==null?void 0:c.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||C,$=u=>{var f;return(f=a.PluginHeaders)===null||f===void 0?void 0:f.find(x=>x.name===u)},A=((n=c==null?void 0:c.currentPlatform)===null||n===void 0?void 0:n.getPluginHeader)||$,se=u=>r.console.error(u),ne=(u,f,x)=>Promise.reject(`${x} does not have an implementation of "${f}".`),H=new Map,oe=(u,f={})=>{const x=H.get(u);if(x)return console.warn(`Capacitor plugin "${u}" already registered. Cannot register plugins twice.`),x.proxy;const k=d(),S=A(u);let O;const ie=async()=>(!O&&k in f?O=typeof f[k]=="function"?O=await f[k]():O=f[k]:i!==null&&!O&&"web"in f&&(O=typeof f.web=="function"?O=await f.web():O=f.web),O),ce=(g,m)=>{var P,L;if(S){const E=S==null?void 0:S.methods.find(v=>m===v.name);if(E)return E.rtype==="promise"?v=>a.nativePromise(u,m.toString(),v):(v,R)=>a.nativeCallback(u,m.toString(),v,R);if(g)return(P=g[m])===null||P===void 0?void 0:P.bind(g)}else{if(g)return(L=g[m])===null||L===void 0?void 0:L.bind(g);throw new q(`"${u}" plugin is not implemented on ${k}`,_.Unimplemented)}},B=g=>{let m;const P=(...L)=>{const E=ie().then(v=>{const R=ce(v,g);if(R){const T=R(...L);return m=T==null?void 0:T.remove,T}else throw new q(`"${u}.${g}()" is not implemented on ${k}`,_.Unimplemented)});return g==="addListener"&&(E.remove=async()=>m()),E};return P.toString=()=>`${g.toString()}() { [capacitor code] }`,Object.defineProperty(P,"name",{value:g,writable:!1,configurable:!1}),P},K=B("addListener"),V=B("removeListener"),de=(g,m)=>{const P=K({eventName:g},m),L=async()=>{const v=await P;V({eventName:g,callbackId:v},m)},E=new Promise(v=>P.then(()=>v({remove:L})));return E.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await L()},E},W=new Proxy({},{get(g,m){switch(m){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return S?de:K;case"removeListener":return V;default:return B(m)}}});return l[u]=W,H.set(u,{name:u,proxy:W,platforms:new Set([...Object.keys(f),...S?[k]:[]])}),W},ae=((s=c==null?void 0:c.currentPlatform)===null||s===void 0?void 0:s.registerPlugin)||oe;return a.convertFileSrc||(a.convertFileSrc=u=>u),a.getPlatform=d,a.handleError=se,a.isNativePlatform=y,a.isPluginAvailable=h,a.pluginMethodNoop=ne,a.registerPlugin=ae,a.Exception=q,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a.platform=a.getPlatform(),a.isNative=a.isNativePlatform(),a},me=r=>r.Capacitor=ge(r),D=me(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),X=D.registerPlugin;D.Plugins;class Y{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const s=async()=>this.removeListener(e,t),i=Promise.resolve({remove:s});return Object.defineProperty(i,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await s()}}),i}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const o=this.listeners[e];o&&o.forEach(n=>n(t))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:o=>{this.notifyListeners(t,o)}}}unimplemented(e="not implemented"){return new D.Exception(e,_.Unimplemented)}unavailable(e="not available"){return new D.Exception(e,_.Unavailable)}async removeListener(e,t){const o=this.listeners[e];if(!o)return;const n=o.indexOf(t);this.listeners[e].splice(n,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const z=r=>encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),N=r=>r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class we extends Y{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach(o=>{if(o.length<=0)return;let[n,s]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=N(n).trim(),s=N(s).trim(),t[n]=s}),t}async setCookie(e){try{const t=z(e.key),o=z(e.value),n=`; expires=${(e.expires||"").replace("expires=","")}`,s=(e.path||"/").replace("path=",""),i=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${o||""}${n}; path=${s}; ${i};`}catch(t){return Promise.reject(t)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}const ee=X("CapacitorCookies",{web:()=>new we}),he=async r=>new Promise((e,t)=>{const o=new FileReader;o.onload=()=>{const n=o.result;e(n.indexOf(",")>=0?n.split(",")[1]:n)},o.onerror=n=>t(n),o.readAsDataURL(r)}),ve=(r={})=>{const e=Object.keys(r);return Object.keys(r).map(n=>n.toLocaleLowerCase()).reduce((n,s,i)=>(n[s]=r[e[i]],n),{})},Pe=(r,e=!0)=>r?Object.entries(r).reduce((o,n)=>{const[s,i]=n;let a,l;return Array.isArray(i)?(l="",i.forEach(c=>{a=e?encodeURIComponent(c):c,l+=`${s}=${a}&`}),l.slice(0,-1)):(a=e?encodeURIComponent(i):i,l=`${s}=${a}`),`${o}&${l}`},"").substr(1):null,be=(r,e={})=>{const t=Object.assign({method:r.method||"GET",headers:r.headers},e),n=ve(r.headers)["content-type"]||"";if(typeof r.data=="string")t.body=r.data;else if(n.includes("application/x-www-form-urlencoded")){const s=new URLSearchParams;for(const[i,a]of Object.entries(r.data||{}))s.set(i,a);t.body=s.toString()}else if(n.includes("multipart/form-data")){const s=new FormData;if(r.data instanceof FormData)r.data.forEach((a,l)=>{s.append(l,a)});else for(const a of Object.keys(r.data))s.append(a,r.data[a]);t.body=s;const i=new Headers(t.headers);i.delete("content-type"),t.headers=i}else(n.includes("application/json")||typeof r.data=="object")&&(t.body=JSON.stringify(r.data));return t};class ye extends Y{async request(e){const t=be(e,e.webFetchExtra),o=Pe(e.params,e.shouldEncodeUrlParams),n=o?`${e.url}?${o}`:e.url,s=await fetch(n,t),i=s.headers.get("content-type")||"";let{responseType:a="text"}=s.ok?e:{};i.includes("application/json")&&(a="json");let l,c;switch(a){case"arraybuffer":case"blob":c=await s.blob(),l=await he(c);break;case"json":l=await s.json();break;case"document":case"text":default:l=await s.text()}const p={};return s.headers.forEach((d,b)=>{p[b]=d}),{data:l,headers:p,status:s.status,url:s.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}X("CapacitorHttp",{web:()=>new ye});const Ce=G.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),U=M.reactive({code:{value:"",type:"",method:"",isSended:!1,isValid:!1}});async function te(r,e,t){return await Ce.post("/api/twofa/sendcode",{phone:r.phone.number,email:r.email,method:e,type:t}).then(o=>(U.code=o.data,U.code.isSended=!0,Promise.resolve(o.data)),o=>(console.log(o),j.setError(o),Promise.reject(o)))}M.watch(U,(r,e)=>{});const Oe=Object.freeze(Object.defineProperty({__proto__:null,sendCode:te,state:U},Symbol.toStringTag,{value:"Module"})),I=G.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),w=M.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}}),re={async login(r,e){try{const t=await I.post("/api/auth/signin",{...r,type:e});return F("user",t.data),Object.assign(w.user,{...t.data}),Object.assign(w.access,{token:t.data.accessToken,status:!0,roles:t.data.roles}),t.data}catch(t){return Object.assign(w.access,{token:null,status:!1,roles:null}),j.setError(t),Promise.reject(t)}},async signup(r,e,t){const{password:o,passwordRepeat:n}=w.user;if(o!==n){const s={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw j.setError(s),new Error(s.response.status)}try{r.phone=r.phone.number;const s=await I.post("/api/auth/signup",{...r,type:e,inviteCode:t});return s.data.accessToken&&F("user",s.data),Object.assign(w.user,{...s.data}),Object.assign(w.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){throw j.setError(s),console.log("Sign up falied"),s}},logout(){Ee("user"),Object.assign(w.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(w.access,{token:null,status:!1})},async resetPassword(r,e){try{const t=await I.post("/api/auth/reset-password",{email:r.email,phone:r.phone.number,type:e});return Object.assign(U.code,{...t.data,isSended:!0}),t.data}catch(t){return j.setError(t),Promise.reject(t)}},async updatePassword(r,e){const{password:t,passwordRepeat:o}=w.user;if(t!==o){const n={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw j.setError(n),new Error(n.response.status)}try{const n=await I.post("/api/auth/update-password",{email:r.email,phone:r.phone.number,password:r.password,passwordRepeat:r.passwordRepeat,type:e});return n.data.accessToken&&F("user",n.data),Object.assign(w.user,{...n.data}),Object.assign(w.access,{token:n.data.accessToken,status:!0}),n.data}catch(n){return j.setError(n),Promise.reject(n)}}},Le={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function F(r,e,t=process.env.NODE_ENV){process.env.MOBILE_APP?ee.setCookie({url:process.env.API_URL,key:r,value:JSON.stringify(e)}):J.set(r,JSON.stringify(e),Le[t])}function Ee(r,e=process.env.NODE_ENV){if(process.env.MOBILE_APP)ee.deleteCookie({url:process.env.API_URL,key:r});else{const t=e==="production"?{domain:process.env.API_URL}:{};J.remove(r,t)}}M.watch(w,(r,e)=>{});const ke=Object.freeze(Object.defineProperty({__proto__:null,actions:re,state:w},Symbol.toStringTag,{value:"Module"}));exports.Cookies=J;exports.actions=re;exports.auth=ke;exports.sendCode=te;exports.state=w;exports.state$1=U;exports.twofa=Oe;