@ozdao/prometheus-framework 0.1.82 → 0.1.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
  2. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
  3. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  4. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
  5. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
  6. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
  7. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  8. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
  9. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
  10. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  11. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  12. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
  15. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  16. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  17. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
  19. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
  21. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
  23. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
  25. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
  27. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
  29. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  31. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  33. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
  35. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  37. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
  39. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
  41. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  42. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
  44. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +33 -33
  46. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
  48. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
  50. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
  52. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  54. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  56. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  58. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
  60. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
  62. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
  64. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
  66. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +44 -43
  78. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/store/auth.js +55 -65
  82. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
  84. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
  90. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
  91. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
  92. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
  100. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  101. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  102. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  103. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  104. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
  106. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
  108. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
  110. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  112. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +14 -14
  114. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +4 -4
  116. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
  118. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
  120. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  122. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +25 -25
  128. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
  130. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
  132. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  136. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -4
  138. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  140. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +19 -19
  148. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  150. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  154. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
  156. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  158. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +21 -21
  160. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  166. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  170. package/dist/prometheus-framework.cjs.js +27 -27
  171. package/dist/prometheus-framework.es.js +1949 -1937
  172. package/dist/style.css +1 -1
  173. package/package.json +2 -4
  174. package/src/modules/auth/components/pages/SignIn.vue +1 -0
  175. package/src/modules/auth/store/auth.js +2 -11
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../node_modules/axios/lib/axios.cjs"),h=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),v={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(i,{emit:p}){const u=i,n=e.ref([]),a=e.ref(null);function c(){a.value.click()}async function r(o){let l=o.target.files,s=new FormData;for(let t=0;t<l.length;t++)s.append("file",l[t]);try{(await m.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(u.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(d=>{n.value.push(d.filepath)}),p("update:images",n.value)}catch(t){console.error(t)}}function f(o){o.preventDefault(),r({target:{files:o.dataTransfer.files}})}return(o,l)=>(e.openBlock(),e.createElementBlock("div",{onClick:c,onDrop:f,onDragover:l[0]||(l[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[h,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:a,onChange:r,multiple:"",style:{display:"none"}},null,544)],32))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../node_modules/axios/lib/axios.cjs"),v=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),g={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(i,{emit:p}){const l=e.ref([]),a=e.ref(null),u=i,c=p;function f(){a.value.click()}async function r(o){let n=o.target.files,s=new FormData;for(let t=0;t<n.length;t++)s.append("file",n[t]);try{(await h.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(u.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(m=>{l.value.push(m.filepath)}),c("update:images",l.value)}catch(t){console.error(t)}}function d(o){o.preventDefault(),r({target:{files:o.dataTransfer.files}})}return(o,n)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:d,onDragover:n[0]||(n[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[v,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:a,onChange:r,multiple:"",style:{display:"none"}},null,544)],32))}};exports.default=g;
@@ -1,28 +1,28 @@
1
- import { ref as s, openBlock as h, createElementBlock as v, withModifiers as x, createElementVNode as i } from "vue";
2
- import g from "../../../node_modules/axios/lib/axios.js";
3
- const C = /* @__PURE__ */ i("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), D = {
1
+ import { ref as i, openBlock as v, createElementBlock as x, withModifiers as g, createElementVNode as s } from "vue";
2
+ import C from "../../../node_modules/axios/lib/axios.js";
3
+ const _ = /* @__PURE__ */ s("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), w = {
4
4
  __name: "UploadImageMultiple",
5
5
  props: [
6
6
  "uploadPath"
7
7
  ],
8
8
  emits: ["update:images"],
9
9
  setup(p, { emit: f }) {
10
- const c = p, a = s([]), n = s(null);
11
- function u() {
12
- n.value.click();
10
+ const n = i([]), a = i(null), c = p, u = f;
11
+ function m() {
12
+ a.value.click();
13
13
  }
14
14
  async function l(t) {
15
15
  let o = t.target.files, r = new FormData();
16
16
  for (let e = 0; e < o.length; e++)
17
17
  r.append("file", o[e]);
18
18
  try {
19
- (await g.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`, r, {
19
+ (await C.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`, r, {
20
20
  headers: {
21
21
  "Content-Type": "multipart/form-data"
22
22
  }
23
- })).data.forEach((m) => {
24
- a.value.push(m.filepath);
25
- }), f("update:images", a.value);
23
+ })).data.forEach((h) => {
24
+ n.value.push(h.filepath);
25
+ }), u("update:images", n.value);
26
26
  } catch (e) {
27
27
  console.error(e);
28
28
  }
@@ -34,18 +34,18 @@ const C = /* @__PURE__ */ i("div", { class: "flex-v-center flex-h-center flex w-
34
34
  }
35
35
  });
36
36
  }
37
- return (t, o) => (h(), v("div", {
38
- onClick: u,
37
+ return (t, o) => (v(), x("div", {
38
+ onClick: m,
39
39
  onDrop: d,
40
- onDragover: o[0] || (o[0] = x(() => {
40
+ onDragover: o[0] || (o[0] = g(() => {
41
41
  }, ["prevent"])),
42
42
  class: "flex-v-center flex-h-center flex"
43
43
  }, [
44
- C,
45
- i("input", {
44
+ _,
45
+ s("input", {
46
46
  type: "file",
47
47
  ref_key: "fileInput",
48
- ref: n,
48
+ ref: a,
49
49
  onChange: l,
50
50
  multiple: "",
51
51
  style: { display: "none" }
@@ -54,5 +54,5 @@ const C = /* @__PURE__ */ i("div", { class: "flex-v-center flex-h-center flex w-
54
54
  }
55
55
  };
56
56
  export {
57
- D as default
57
+ w as default
58
58
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
@@ -1,7 +1,7 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
3
- import "../../../../components/Field/Field.vue2.js";
4
- import "../../../../components/Button/Button.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
+ import "../../../../components/Field/Field.vue.js";
4
+ import "../../../../components/Button/Button.vue.js";
5
5
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.css.js";
6
6
  import "vue-i18n";
7
7
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.es.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue2.cjs");const f=require("vue-router"),S=require("vue-i18n"),c=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),b=require("../../localization/EnterCode.json.cjs"),D={class:"t-center pd-medium"},I={class:"mn-medium"},q={class:"mn-big t-transp"},k={class:"w-100 mn-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(P){const m=f.useRoute(),v=f.useRouter(),{t:d}=S.useI18n(b.default),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(console.log(String(s)),console.log(String(s).length),s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const p=n.ref(null),i=n.ref(0);async function E(){try{await g.sendCode(c.state.user,m.query.type,c.state.user.phone?"phone":"email"),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():p.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),w=g.state.code.code.toString();r===w?(g.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:g.state.code.type,method:m.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),p.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",D,[n.createElementVNode("h3",I,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",q,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:p,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:E,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue.cjs");const f=require("vue-router"),S=require("vue-i18n"),c=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),b=require("../../localization/EnterCode.json.cjs"),D={class:"t-center pd-medium"},I={class:"mn-medium"},q={class:"mn-big t-transp"},k={class:"w-100 mn-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(P){const m=f.useRoute(),v=f.useRouter(),{t:d}=S.useI18n(b.default),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(console.log(String(s)),console.log(String(s).length),s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const p=n.ref(null),i=n.ref(0);async function E(){try{await g.sendCode(c.state.user,m.query.type,c.state.user.phone?"phone":"email"),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():p.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),w=g.state.code.code.toString();r===w?(g.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:g.state.code.type,method:m.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),p.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",D,[n.createElementVNode("h3",I,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",q,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:p,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:E,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
@@ -1,5 +1,5 @@
1
1
  import { reactive as D, watch as $, ref as b, openBlock as v, createElementBlock as c, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
2
- import "../../../../components/Field/Field.vue2.js";
2
+ import "../../../../components/Field/Field.vue.js";
3
3
  import { useRoute as q, useRouter as K } from "vue-router";
4
4
  import { useI18n as N } from "vue-i18n";
5
5
  import { state as C } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-small"},g={key:0,class:"mn-semi t-transp"},k={key:1,class:"mn-semi t-transp"},q={class:"mn-semi radius-small o-hidden"},B={key:2,class:"p-medium t-semi mn-semi"},E=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),P={key:0},v={key:1},b={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",B,[e.createTextVNode(" By registering, you agree to our "),E])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-small"},g={key:0,class:"mn-semi t-transp"},k={key:1,class:"mn-semi t-transp"},q={class:"mn-semi radius-small o-hidden"},B={key:2,class:"p-medium t-semi mn-semi"},E=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),P={key:0},v={key:1},b={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",B,[e.createTextVNode(" By registering, you agree to our "),E])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=b;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as d, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as P, withCtx as k } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
3
- import c from "../../../../components/Field/Field.vue.js";
4
- import q from "../../../../components/Button/Button.vue.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
+ import c from "../../../../components/Field/Field.vue2.js";
4
+ import q from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as b, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { ref as w, withAsyncContext as h, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as y, unref as b } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
3
- import p from "../../../../components/Field/Field.vue.js";
4
- import v from "../../../../components/Button/Button.vue.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
+ import p from "../../../../components/Field/Field.vue2.js";
4
+ import v from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as k, useRouter as g } from "vue-router";
6
6
  import { state as e, actions as q } from "../../store/auth.js";
7
7
  import { actions as x, state as C } from "../../store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),w=require("vue-i18n"),V=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const g={class:"t-left pd-medium"},y={class:"mn-small"},N={class:"mn-small t-transp"},b={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-semi radius-small o-hidden"},k={class:"mn-small t-transp"},C={key:0,class:"mn-semi radius-small o-hidden"},P={class:"mn-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=w.useI18n(V.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",b,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),w=require("vue-i18n"),V=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const g={class:"t-left pd-medium"},y={class:"mn-small"},N={class:"mn-small t-transp"},b={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-semi radius-small o-hidden"},k={class:"mn-small t-transp"},C={key:0,class:"mn-semi radius-small o-hidden"},P={class:"mn-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=w.useI18n(V.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",b,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
@@ -1,8 +1,8 @@
1
1
  import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as l, toDisplayString as r, unref as t, createVNode as i, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as V } from "vue";
2
- import P from "../../../../components/Tab/Tab.vue.js";
3
- import C from "../../../../components/Field/Field.vue.js";
2
+ import P from "../../../../components/Tab/Tab.vue2.js";
3
+ import C from "../../../../components/Field/Field.vue2.js";
4
4
  import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import I from "../../../../components/Button/Button.vue.js";
5
+ import I from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import T from "../../localization/ResetPassword.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue.cjs"),c=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue.cjs"),p=require("vue-router"),N=require("vue-i18n"),b=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-big"},D={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},P={class:"pos-relative"},T={class:"mn-thin radius-small"},I={class:"mn-thin radius-small o-hidden"},U={class:"w-100 mn-big"},k={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:l}=N.useI18n(b.default),n=e.ref("phone"),f=o=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(g.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",P,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(V.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(w.default,{submit:v,callback:_,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),V=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),p=require("vue-router"),N=require("vue-i18n"),b=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-big"},D={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},T={class:"pos-relative"},P={class:"mn-thin radius-small"},I={class:"mn-thin radius-small o-hidden"},k={class:"w-100 mn-big"},U={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:o}=N.useI18n(b.default),l=e.ref("phone"),f=n=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=n,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{l.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),l.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const n={...a.state.user};n.phone=a.state.user.phone.number,await a.actions.login(n,l.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(n,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createTextVNode(e.toDisplayString(n.document.cookie)+" ",1),e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(o)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(o)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(g.default,{selected:l.value,"onUpdate:selected":s[0]||(s[0]=t=>l.value=t),tabs:[{name:e.unref(o)("phone"),value:"phone"},{name:e.unref(o)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",P,[e.createVNode(V.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(o)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,l.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(o)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,l.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(o)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("forgotPassword")),1)]),_:1})]),e.createVNode(w.default,{submit:v,callback:_,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("signin")),1)]),_:1})])}}};exports.default=U;
@@ -1,73 +1,74 @@
1
- import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, createElementBlock as E, createElementVNode as l, createTextVNode as c, toDisplayString as d, unref as o, createVNode as i, withCtx as u, Transition as f, withDirectives as v, vShow as g } from "vue";
2
- import I from "../../../../components/Tab/Tab.vue.js";
3
- import w from "../../../../components/Field/Field.vue.js";
1
+ import { ref as c, onMounted as x, resolveComponent as U, openBlock as C, createElementBlock as E, createTextVNode as u, toDisplayString as d, createElementVNode as l, unref as a, createVNode as i, withCtx as m, Transition as f, withDirectives as v, vShow as g } from "vue";
2
+ import I from "../../../../components/Tab/Tab.vue2.js";
3
+ import w from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import j from "../../../../components/Button/Button.vue.js";
5
+ import j from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as F, useRouter as N } from "vue-router";
7
7
  import { useI18n as O } from "vue-i18n";
8
8
  import T from "../../localization/SignIn.json.js";
9
- import { state as s, actions as q } from "../../store/auth.js";
9
+ import { state as o, actions as q } from "../../store/auth.js";
10
10
  import { validateInputs as b, validatePhone as A, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
11
11
  import "./SignIn.vue2.js";
12
12
  const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE__ */ l("br", null, null, -1), z = { class: "t-semi" }, G = { class: "mn-big" }, H = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, J = { class: "pos-relative" }, K = { class: "mn-thin radius-small" }, Q = { class: "mn-thin radius-small o-hidden" }, W = { class: "w-100 mn-big" }, de = {
13
13
  __name: "SignIn",
14
14
  setup(X) {
15
- const h = p(null), y = p(null), _ = p(null);
15
+ const h = c(null), y = c(null), _ = c(null);
16
16
  F();
17
- const V = N(), { t: a } = O(T), n = p("phone"), x = (r) => new Promise((t, m) => {
17
+ const V = N(), { t: s } = O(T), n = c("phone"), P = (r) => new Promise((t, p) => {
18
18
  const e = document.createElement("script");
19
- e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = m, document.head.appendChild(e);
19
+ e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = p, document.head.appendChild(e);
20
20
  });
21
- U(async () => {
22
- await x("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
21
+ x(async () => {
22
+ await P("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
23
23
  });
24
- async function P() {
24
+ async function S() {
25
25
  try {
26
26
  n.value === "phone" && await b(
27
27
  h,
28
28
  A,
29
- s.user.phone,
29
+ o.user.phone,
30
30
  "Некорректный телефон"
31
31
  ), n.value === "email" && await b(
32
32
  _,
33
33
  B,
34
- s.user.email,
34
+ o.user.email,
35
35
  "Некорректный email"
36
36
  );
37
37
  } catch {
38
38
  throw new Error();
39
39
  }
40
- const r = { ...s.user };
41
- r.phone = s.user.phone.number, await q.login(r, n.value);
40
+ const r = { ...o.user };
41
+ r.phone = o.user.phone.number, await q.login(r, n.value);
42
42
  }
43
- function S() {
43
+ function k() {
44
44
  V.push({
45
45
  name: "User Profile",
46
46
  params: {
47
- _id: s.user._id
47
+ _id: o.user._id
48
48
  },
49
49
  query: { afterAuth: "true" }
50
50
  });
51
51
  }
52
52
  return (r, t) => {
53
- const m = k("router-link");
53
+ const p = U("router-link");
54
54
  return C(), E("section", R, [
55
+ u(d(r.document.cookie) + " ", 1),
55
56
  l("img", {
56
57
  src: "/logo/logo_square.svg",
57
58
  class: "i-extra radius-small mn-small"
58
59
  }, null, 8, $),
59
60
  l("h3", L, [
60
- c(d(o(a)("title")) + " ", 1),
61
+ u(d(a(s)("title")) + " ", 1),
61
62
  M,
62
- l("span", z, d(o(a)("subtitle")), 1)
63
+ l("span", z, d(a(s)("subtitle")), 1)
63
64
  ]),
64
65
  l("p", G, [
65
- i(m, {
66
+ i(p, {
66
67
  to: { name: "Sign Up" },
67
68
  class: "underline t-second"
68
69
  }, {
69
- default: u(() => [
70
- c(d(o(a)("signup")), 1)
70
+ default: m(() => [
71
+ u(d(a(s)("signup")), 1)
71
72
  ]),
72
73
  _: 1
73
74
  })
@@ -77,18 +78,18 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
77
78
  selected: n.value,
78
79
  "onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
79
80
  tabs: [
80
- { name: o(a)("phone"), value: "phone" },
81
- { name: o(a)("email"), value: "email" }
81
+ { name: a(s)("phone"), value: "phone" },
82
+ { name: a(s)("email"), value: "email" }
82
83
  ]
83
84
  }, null, 8, ["selected", "tabs"])
84
85
  ]),
85
86
  l("div", J, [
86
87
  i(f, { name: "slide-fade" }, {
87
- default: u(() => [
88
+ default: m(() => [
88
89
  v(l("div", K, [
89
90
  i(D, {
90
- modelValue: s.user.phone,
91
- "onUpdate:modelValue": t[1] || (t[1] = (e) => s.user.phone = e),
91
+ modelValue: o.user.phone,
92
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => o.user.phone = e),
92
93
  dropdownOptions: {
93
94
  showDialCodeInSelection: !0,
94
95
  showFlags: !0,
@@ -96,7 +97,7 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
96
97
  },
97
98
  validation: h.value,
98
99
  mode: "national",
99
- inputOptions: { placeholder: o(a)("phonePlaceholder") },
100
+ inputOptions: { placeholder: a(s)("phonePlaceholder") },
100
101
  class: "bg-grey pd-small radius-small mn-thin"
101
102
  }, null, 8, ["modelValue", "validation", "inputOptions"])
102
103
  ], 512), [
@@ -106,12 +107,12 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
106
107
  _: 1
107
108
  }),
108
109
  i(f, { name: "slide-fade" }, {
109
- default: u(() => [
110
+ default: m(() => [
110
111
  v(l("div", Q, [
111
112
  i(w, {
112
- field: s.user.email,
113
- "onUpdate:field": t[2] || (t[2] = (e) => s.user.email = e),
114
- placeholder: o(a)("emailPlaceholder"),
113
+ field: o.user.email,
114
+ "onUpdate:field": t[2] || (t[2] = (e) => o.user.email = e),
115
+ placeholder: a(s)("emailPlaceholder"),
115
116
  validation: _.value,
116
117
  class: "bg-grey pd-medium radius-small"
117
118
  }, null, 8, ["field", "placeholder", "validation"])
@@ -123,31 +124,31 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
123
124
  })
124
125
  ]),
125
126
  i(w, {
126
- field: s.user.password,
127
- "onUpdate:field": t[3] || (t[3] = (e) => s.user.password = e),
127
+ field: o.user.password,
128
+ "onUpdate:field": t[3] || (t[3] = (e) => o.user.password = e),
128
129
  type: "password",
129
130
  validation: y.value,
130
- placeholder: o(a)("passwordPlaceholder"),
131
+ placeholder: a(s)("passwordPlaceholder"),
131
132
  class: "bg-grey pd-medium radius-small mn-semi"
132
133
  }, null, 8, ["field", "validation", "placeholder"]),
133
134
  l("div", W, [
134
- i(m, {
135
+ i(p, {
135
136
  to: "/auth/reset-password",
136
137
  class: "underline d-block t-blue"
137
138
  }, {
138
- default: u(() => [
139
- c(d(o(a)("forgotPassword")), 1)
139
+ default: m(() => [
140
+ u(d(a(s)("forgotPassword")), 1)
140
141
  ]),
141
142
  _: 1
142
143
  })
143
144
  ]),
144
145
  i(j, {
145
- submit: P,
146
- callback: S,
146
+ submit: S,
147
+ callback: k,
147
148
  class: "mn-thin"
148
149
  }, {
149
- default: u(() => [
150
- c(d(o(a)("signin")), 1)
150
+ default: m(() => [
151
+ u(d(a(s)("signin")), 1)
151
152
  ]),
152
153
  _: 1
153
154
  })
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
- import x from "../../../../components/Tab/Tab.vue.js";
3
- import N from "../../../../components/Field/Field.vue.js";
2
+ import x from "../../../../components/Tab/Tab.vue2.js";
3
+ import N from "../../../../components/Field/Field.vue2.js";
4
4
  import S from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue.js";
5
+ import D from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as I, useRouter as P } from "vue-router";
7
7
  import { useI18n as U } from "vue-i18n";
8
8
  import F from "../../localization/SignUp.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),i=f.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const s=await m("user");if(s){const{_id:t,email:e,phone:n,roles:o,accessToken:r}=s;Object.assign(a.user,{_id:t,email:e,phone:n}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}O();const g={async login(s,t){try{const e=await i.post("/api/auth/signin",{...s,type:t});return p("user",e.data),Object.assign(a.user,{...e.data}),Object.assign(a.access,{token:e.data.accessToken,status:!0,roles:e.data.roles}),e.data}catch(e){return Object.assign(a.access,{token:null,status:!1,roles:null}),c.setError(e),Promise.reject(e)}},async signup(s,t,e){const{password:n,passwordRepeat:o}=a.user;if(n!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{s.phone=s.phone.number;const r=await i.post("/api/auth/signup",{...s,type:t,inviteCode:e});return r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw c.setError(r),console.log("Sign up falied"),r}},logout(){b("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(s,t){try{const e=await i.post("/api/auth/reset-password",{email:s.email,phone:s.phone.number,type:t});return Object.assign(k.state.code,{...e.data,isSended:!0}),e.data}catch(e){return c.setError(e),Promise.reject(e)}},async updatePassword(s,t){const{password:e,passwordRepeat:n}=a.user;if(e!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:s.email,phone:s.phone.number,password:s.password,passwordRepeat:s.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function m(s){if(process.env.MOBILE_APP)Object.fromEntries(document.cookie.split("/; *").map(t=>{const[e,...n]=t.split("=");return[{key:e,value:n.join("=")}]}));else{const t=d.default.get(s);return t?JSON.parse(t):null}}function p(s,t,e=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:s,value:JSON.stringify(t)}):d.default.set(s,JSON.stringify(t),h[e])}function b(s,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:s});else{const e=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(s,e)}}w.watch(a,(s,t)=>{});exports.actions=g;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),n=require("../../globals/store/globals.cjs"),f=require("./twofa.cjs"),i=k.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await m("user");if(e){const{_id:t,email:s,phone:c,roles:o,accessToken:r}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}O();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:o}=a.user;if(c!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{e.phone=e.phone.number;const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw n.setError(r),console.log("Sign up falied"),r}},logout(){P("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(f.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return n.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function m(e){if(process.env.MOBILE_APP)return l.CapacitorCookies.getCookies();{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),h[s])}function P(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;