@ozdao/prometheus-framework 0.2.229 → 0.2.230

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,61 +2,81 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const index = require("../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs");
5
- const Popup = require("../../../../components/Popup/Popup.vue.cjs");
6
5
  const Button = require("../../../../components/Button/Button.vue2.cjs");
7
6
  const tickets = require("../../store/tickets.cjs");
8
7
  ;/* empty css */
9
8
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
10
- const _withScopeId = (n) => (vue.pushScopeId("data-v-8234029e"), n = n(), vue.popScopeId(), n);
11
- const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("h3", { class: "mn-b-small" }, "Scan QR Code", -1));
12
- const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "h-max" }, null, -1));
9
+ const _hoisted_1 = {
10
+ key: 0,
11
+ class: "barcode-scanner-modal"
12
+ };
13
13
  const _sfc_main = {
14
14
  __name: "ButtonCheck",
15
15
  emits: ["qrcodecheck"],
16
16
  setup(__props, { emit: __emit }) {
17
17
  const emits = __emit;
18
- const isPublicationPopup = vue.ref(false);
19
18
  const error = vue.ref("");
20
- function openPublicationPopup() {
21
- isPublicationPopup.value = true;
22
- }
23
- function closePublicationPopup() {
24
- isPublicationPopup.value = false;
25
- }
19
+ const isScanning = vue.ref(false);
20
+ vue.onMounted(async () => {
21
+ const { supported } = await index.BarcodeScanner.isSupported();
22
+ if (!supported) {
23
+ error.value = "Barcode scanning is not supported on this device";
24
+ }
25
+ });
26
+ vue.onUnmounted(async () => {
27
+ await index.BarcodeScanner.removeAllListeners();
28
+ });
26
29
  async function startScan() {
27
- openPublicationPopup();
30
+ var _a;
28
31
  try {
29
- await index.BarcodeScanner.isSupported();
30
- const { barcodes } = await index.BarcodeScanner.scan();
31
- if (barcodes.length > 0) {
32
- await processBarcode(barcodes[0].rawValue);
33
- } else {
34
- throw new Error("No barcode detected");
32
+ const { camera } = await index.BarcodeScanner.checkPermissions();
33
+ if (camera !== "granted") {
34
+ const { camera: newStatus } = await index.BarcodeScanner.requestPermissions();
35
+ if (newStatus !== "granted") {
36
+ throw new Error("Camera permission is required to scan barcodes");
37
+ }
35
38
  }
39
+ (_a = document.querySelector("body")) == null ? void 0 : _a.classList.add("barcode-scanner-active");
40
+ isScanning.value = true;
41
+ await index.BarcodeScanner.addListener("barcodeScanned", async (result) => {
42
+ await processBarcode(result.barcode);
43
+ });
44
+ await index.BarcodeScanner.startScan();
36
45
  } catch (e) {
37
46
  error.value = e.message;
38
47
  alert(`Error: ${error.value}`);
39
- } finally {
40
- closePublicationPopup();
41
48
  }
42
49
  }
43
- async function processBarcode(qrcode) {
50
+ async function stopScan() {
51
+ var _a;
52
+ try {
53
+ (_a = document.querySelector("body")) == null ? void 0 : _a.classList.remove("barcode-scanner-active");
54
+ isScanning.value = false;
55
+ await index.BarcodeScanner.stopScan();
56
+ await index.BarcodeScanner.removeAllListeners();
57
+ } catch (e) {
58
+ error.value = e.message;
59
+ alert(`Error stopping scan: ${error.value}`);
60
+ }
61
+ }
62
+ async function processBarcode(barcode) {
44
63
  try {
45
- if (!qrcode) {
46
- throw new Error("Troubles with qrcode reading");
64
+ if (!barcode) {
65
+ throw new Error("Troubles with barcode reading");
47
66
  }
48
- const response = await tickets.actions.update({ _id: qrcode, status: "used", check: true });
67
+ const response = await tickets.actions.update({ _id: barcode, status: "used", check: true });
49
68
  alert("Ticket checked. And it's all right!");
50
69
  } catch (e) {
51
70
  alert(`Ticket is not found, already used or deactivated!`);
52
71
  } finally {
53
72
  emits("qrcodecheck");
73
+ await stopScan();
54
74
  }
55
75
  }
56
76
  return (_ctx, _cache) => {
57
77
  return vue.openBlock(), vue.createElementBlock("div", null, [
58
78
  vue.createVNode(Button.default, {
59
- submit: startScan,
79
+ onClick: startScan,
60
80
  class: "bg-main button-small radius-extra button"
61
81
  }, {
62
82
  default: vue.withCtx(() => [
@@ -64,22 +84,21 @@ const _sfc_main = {
64
84
  ]),
65
85
  _: 1
66
86
  }),
67
- vue.createVNode(Popup.default, {
68
- title: "Scan QR Code",
69
- onClosePopup: closePublicationPopup,
70
- isPopupOpen: isPublicationPopup.value,
71
- class: "w-max-30r h-max-30r t-left pd-big bg-white radius-big"
72
- }, {
73
- default: vue.withCtx(() => [
74
- _hoisted_1,
75
- _hoisted_2
76
- ]),
77
- _: 1
78
- }, 8, ["isPopupOpen"])
87
+ isScanning.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
88
+ vue.createVNode(Button.default, {
89
+ onClick: stopScan,
90
+ class: "stop-scan-button"
91
+ }, {
92
+ default: vue.withCtx(() => [
93
+ vue.createTextVNode("Stop Scan")
94
+ ]),
95
+ _: 1
96
+ })
97
+ ])) : vue.createCommentVNode("", true)
79
98
  ]);
80
99
  };
81
100
  }
82
101
  };
83
- const ButtonCheck = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8234029e"]]);
102
+ const ButtonCheck = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-25007b46"]]);
84
103
  exports.default = ButtonCheck;
85
104
  //# sourceMappingURL=ButtonCheck.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonCheck.vue.cjs","sources":["../../../../../../../src/modules/events/components/elements/ButtonCheck.vue"],"sourcesContent":["<template>\n <div>\n <Button :submit=\"startScan\" class=\"bg-main button-small radius-extra button\">\n Check Tickets\n </Button>\n <Popup\n title=\"Scan QR Code\"\n @close-popup=\"closePublicationPopup\"\n :isPopupOpen=\"isPublicationPopup\"\n class=\"w-max-30r h-max-30r t-left pd-big bg-white radius-big\"\n >\n <h3 class=\"mn-b-small\">Scan QR Code</h3>\n <div class=\"h-max\">\n <!-- Scanning will be handled by Capacitor, so we don't need a visual component here -->\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { BarcodeScanner } from '@capacitor-mlkit/barcode-scanning'\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport * as tickets from '@pf/src/modules/events/store/tickets'\n\nconst emits = defineEmits(['qrcodecheck'])\nconst isPublicationPopup = ref(false)\nconst error = ref('')\n\nfunction openPublicationPopup() {\n isPublicationPopup.value = true\n}\n\nfunction closePublicationPopup() {\n isPublicationPopup.value = false\n}\n\nasync function startScan() {\n openPublicationPopup()\n \n try {\n await BarcodeScanner.isSupported()\n const { barcodes } = await BarcodeScanner.scan()\n \n if (barcodes.length > 0) {\n await processBarcode(barcodes[0].rawValue)\n } else {\n throw new Error('No barcode detected')\n }\n } catch (e) {\n error.value = e.message\n alert(`Error: ${error.value}`)\n } finally {\n closePublicationPopup()\n }\n}\n\nasync function processBarcode(qrcode) {\n try {\n if (!qrcode) {\n throw new Error('Troubles with qrcode reading')\n }\n const response = await tickets.actions.update({ _id: qrcode, status: 'used', check: true })\n alert(\"Ticket checked. And it's all right!\")\n } catch (e) {\n alert(`Ticket is not found, already used or deactivated!`)\n } finally {\n emits('qrcodecheck')\n }\n}\n</script>\n\n<style scoped>\n/* Existing styles can stay unchanged */\n</style>"],"names":["ref","BarcodeScanner","tickets.actions"],"mappings":";;;;;;;;;;;;;;;;AA0BA,UAAM,QAAQ;AACd,UAAM,qBAAqBA,IAAG,IAAC,KAAK;AACpC,UAAM,QAAQA,IAAG,IAAC,EAAE;AAEpB,aAAS,uBAAuB;AAC9B,yBAAmB,QAAQ;AAAA,IAC7B;AAEA,aAAS,wBAAwB;AAC/B,yBAAmB,QAAQ;AAAA,IAC7B;AAEA,mBAAe,YAAY;AACzB,2BAAsB;AAEtB,UAAI;AACF,cAAMC,MAAAA,eAAe,YAAa;AAClC,cAAM,EAAE,SAAQ,IAAK,MAAMA,MAAAA,eAAe,KAAM;AAEhD,YAAI,SAAS,SAAS,GAAG;AACvB,gBAAM,eAAe,SAAS,CAAC,EAAE,QAAQ;AAAA,QAC/C,OAAW;AACL,gBAAM,IAAI,MAAM,qBAAqB;AAAA,QACtC;AAAA,MACF,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,UAAU,MAAM,KAAK,EAAE;AAAA,MACjC,UAAY;AACR,8BAAuB;AAAA,MACxB;AAAA,IACH;AAEA,mBAAe,eAAe,QAAQ;AACpC,UAAI;AACF,YAAI,CAAC,QAAQ;AACX,gBAAM,IAAI,MAAM,8BAA8B;AAAA,QAC/C;AACD,cAAM,WAAW,MAAMC,gBAAgB,OAAO,EAAE,KAAK,QAAQ,QAAQ,QAAQ,OAAO,KAAI,CAAE;AAC1F,cAAM,qCAAqC;AAAA,MAC5C,SAAQ,GAAG;AACV,cAAM,mDAAmD;AAAA,MAC7D,UAAY;AACR,cAAM,aAAa;AAAA,MACpB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ButtonCheck.vue.cjs","sources":["../../../../../../../src/modules/events/components/elements/ButtonCheck.vue"],"sourcesContent":["<template>\n <div>\n <Button @click=\"startScan\" class=\"bg-main button-small radius-extra button\">\n Check Tickets\n </Button>\n <div v-if=\"isScanning\" class=\"barcode-scanner-modal\">\n <!-- Add any UI elements for the scanner here -->\n <Button @click=\"stopScan\" class=\"stop-scan-button\">Stop Scan</Button>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, onUnmounted } from 'vue'\nimport { BarcodeScanner } from '@capacitor-mlkit/barcode-scanning'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport * as tickets from '@pf/src/modules/events/store/tickets'\n\nconst emits = defineEmits(['qrcodecheck'])\nconst error = ref('')\nconst isScanning = ref(false)\n\nonMounted(async () => {\n const { supported } = await BarcodeScanner.isSupported()\n if (!supported) {\n error.value = 'Barcode scanning is not supported on this device'\n }\n})\n\nonUnmounted(async () => {\n await BarcodeScanner.removeAllListeners()\n})\n\nasync function startScan() {\n try {\n const { camera } = await BarcodeScanner.checkPermissions()\n if (camera !== 'granted') {\n const { camera: newStatus } = await BarcodeScanner.requestPermissions()\n if (newStatus !== 'granted') {\n throw new Error('Camera permission is required to scan barcodes')\n }\n }\n\n document.querySelector('body')?.classList.add('barcode-scanner-active')\n isScanning.value = true\n\n await BarcodeScanner.addListener('barcodeScanned', async (result) => {\n await processBarcode(result.barcode)\n })\n\n await BarcodeScanner.startScan()\n } catch (e) {\n error.value = e.message\n alert(`Error: ${error.value}`)\n }\n}\n\nasync function stopScan() {\n try {\n document.querySelector('body')?.classList.remove('barcode-scanner-active')\n isScanning.value = false\n await BarcodeScanner.stopScan()\n await BarcodeScanner.removeAllListeners()\n } catch (e) {\n error.value = e.message\n alert(`Error stopping scan: ${error.value}`)\n }\n}\n\nasync function processBarcode(barcode) {\n try {\n if (!barcode) {\n throw new Error('Troubles with barcode reading')\n }\n const response = await tickets.actions.update({ _id: barcode, status: 'used', check: true })\n alert(\"Ticket checked. And it's all right!\")\n } catch (e) {\n alert(`Ticket is not found, already used or deactivated!`)\n } finally {\n emits('qrcodecheck')\n await stopScan()\n }\n}\n</script>\n\n<style scoped>\n.barcode-scanner-modal {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.stop-scan-button {\n position: absolute;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n/* Existing styles can stay unchanged */\n</style>"],"names":["ref","onMounted","BarcodeScanner","onUnmounted","tickets.actions"],"mappings":";;;;;;;;;;;;;;;;AAkBA,UAAM,QAAQ;AACd,UAAM,QAAQA,IAAG,IAAC,EAAE;AACpB,UAAM,aAAaA,IAAG,IAAC,KAAK;AAE5BC,QAAAA,UAAU,YAAY;AACpB,YAAM,EAAE,UAAS,IAAK,MAAMC,MAAAA,eAAe,YAAa;AACxD,UAAI,CAAC,WAAW;AACd,cAAM,QAAQ;AAAA,MACf;AAAA,IACH,CAAC;AAEDC,QAAAA,YAAY,YAAY;AACtB,YAAMD,MAAAA,eAAe,mBAAoB;AAAA,IAC3C,CAAC;AAED,mBAAe,YAAY;;AACzB,UAAI;AACF,cAAM,EAAE,OAAM,IAAK,MAAMA,MAAAA,eAAe,iBAAkB;AAC1D,YAAI,WAAW,WAAW;AACxB,gBAAM,EAAE,QAAQ,UAAW,IAAG,MAAMA,MAAAA,eAAe,mBAAoB;AACvE,cAAI,cAAc,WAAW;AAC3B,kBAAM,IAAI,MAAM,gDAAgD;AAAA,UACjE;AAAA,QACF;AAED,uBAAS,cAAc,MAAM,MAA7B,mBAAgC,UAAU,IAAI;AAC9C,mBAAW,QAAQ;AAEnB,cAAMA,qBAAe,YAAY,kBAAkB,OAAO,WAAW;AACnE,gBAAM,eAAe,OAAO,OAAO;AAAA,QACzC,CAAK;AAED,cAAMA,MAAAA,eAAe,UAAW;AAAA,MACjC,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,UAAU,MAAM,KAAK,EAAE;AAAA,MAC9B;AAAA,IACH;AAEA,mBAAe,WAAW;;AACxB,UAAI;AACF,uBAAS,cAAc,MAAM,MAA7B,mBAAgC,UAAU,OAAO;AACjD,mBAAW,QAAQ;AACnB,cAAMA,MAAAA,eAAe,SAAU;AAC/B,cAAMA,MAAAA,eAAe,mBAAoB;AAAA,MAC1C,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,wBAAwB,MAAM,KAAK,EAAE;AAAA,MAC5C;AAAA,IACH;AAEA,mBAAe,eAAe,SAAS;AACrC,UAAI;AACF,YAAI,CAAC,SAAS;AACZ,gBAAM,IAAI,MAAM,+BAA+B;AAAA,QAChD;AACD,cAAM,WAAW,MAAME,gBAAgB,OAAO,EAAE,KAAK,SAAS,QAAQ,QAAQ,OAAO,KAAI,CAAE;AAC3F,cAAM,qCAAqC;AAAA,MAC5C,SAAQ,GAAG;AACV,cAAM,mDAAmD;AAAA,MAC7D,UAAY;AACR,cAAM,aAAa;AACnB,cAAM,SAAU;AAAA,MACjB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,60 +1,80 @@
1
- import { ref, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
1
+ import { ref, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, createCommentVNode } from "vue";
2
2
  import { BarcodeScanner } from "../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js";
3
- import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
4
3
  import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
5
4
  import { actions } from "../../store/tickets.js";
6
5
  /* empty css */
7
6
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
8
- const _withScopeId = (n) => (pushScopeId("data-v-8234029e"), n = n(), popScopeId(), n);
9
- const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("h3", { class: "mn-b-small" }, "Scan QR Code", -1));
10
- const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "h-max" }, null, -1));
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ class: "barcode-scanner-modal"
10
+ };
11
11
  const _sfc_main = {
12
12
  __name: "ButtonCheck",
13
13
  emits: ["qrcodecheck"],
14
14
  setup(__props, { emit: __emit }) {
15
15
  const emits = __emit;
16
- const isPublicationPopup = ref(false);
17
16
  const error = ref("");
18
- function openPublicationPopup() {
19
- isPublicationPopup.value = true;
20
- }
21
- function closePublicationPopup() {
22
- isPublicationPopup.value = false;
23
- }
17
+ const isScanning = ref(false);
18
+ onMounted(async () => {
19
+ const { supported } = await BarcodeScanner.isSupported();
20
+ if (!supported) {
21
+ error.value = "Barcode scanning is not supported on this device";
22
+ }
23
+ });
24
+ onUnmounted(async () => {
25
+ await BarcodeScanner.removeAllListeners();
26
+ });
24
27
  async function startScan() {
25
- openPublicationPopup();
28
+ var _a;
26
29
  try {
27
- await BarcodeScanner.isSupported();
28
- const { barcodes } = await BarcodeScanner.scan();
29
- if (barcodes.length > 0) {
30
- await processBarcode(barcodes[0].rawValue);
31
- } else {
32
- throw new Error("No barcode detected");
30
+ const { camera } = await BarcodeScanner.checkPermissions();
31
+ if (camera !== "granted") {
32
+ const { camera: newStatus } = await BarcodeScanner.requestPermissions();
33
+ if (newStatus !== "granted") {
34
+ throw new Error("Camera permission is required to scan barcodes");
35
+ }
33
36
  }
37
+ (_a = document.querySelector("body")) == null ? void 0 : _a.classList.add("barcode-scanner-active");
38
+ isScanning.value = true;
39
+ await BarcodeScanner.addListener("barcodeScanned", async (result) => {
40
+ await processBarcode(result.barcode);
41
+ });
42
+ await BarcodeScanner.startScan();
34
43
  } catch (e) {
35
44
  error.value = e.message;
36
45
  alert(`Error: ${error.value}`);
37
- } finally {
38
- closePublicationPopup();
39
46
  }
40
47
  }
41
- async function processBarcode(qrcode) {
48
+ async function stopScan() {
49
+ var _a;
50
+ try {
51
+ (_a = document.querySelector("body")) == null ? void 0 : _a.classList.remove("barcode-scanner-active");
52
+ isScanning.value = false;
53
+ await BarcodeScanner.stopScan();
54
+ await BarcodeScanner.removeAllListeners();
55
+ } catch (e) {
56
+ error.value = e.message;
57
+ alert(`Error stopping scan: ${error.value}`);
58
+ }
59
+ }
60
+ async function processBarcode(barcode) {
42
61
  try {
43
- if (!qrcode) {
44
- throw new Error("Troubles with qrcode reading");
62
+ if (!barcode) {
63
+ throw new Error("Troubles with barcode reading");
45
64
  }
46
- const response = await actions.update({ _id: qrcode, status: "used", check: true });
65
+ const response = await actions.update({ _id: barcode, status: "used", check: true });
47
66
  alert("Ticket checked. And it's all right!");
48
67
  } catch (e) {
49
68
  alert(`Ticket is not found, already used or deactivated!`);
50
69
  } finally {
51
70
  emits("qrcodecheck");
71
+ await stopScan();
52
72
  }
53
73
  }
54
74
  return (_ctx, _cache) => {
55
75
  return openBlock(), createElementBlock("div", null, [
56
76
  createVNode(_sfc_main$1, {
57
- submit: startScan,
77
+ onClick: startScan,
58
78
  class: "bg-main button-small radius-extra button"
59
79
  }, {
60
80
  default: withCtx(() => [
@@ -62,23 +82,22 @@ const _sfc_main = {
62
82
  ]),
63
83
  _: 1
64
84
  }),
65
- createVNode(_sfc_main$2, {
66
- title: "Scan QR Code",
67
- onClosePopup: closePublicationPopup,
68
- isPopupOpen: isPublicationPopup.value,
69
- class: "w-max-30r h-max-30r t-left pd-big bg-white radius-big"
70
- }, {
71
- default: withCtx(() => [
72
- _hoisted_1,
73
- _hoisted_2
74
- ]),
75
- _: 1
76
- }, 8, ["isPopupOpen"])
85
+ isScanning.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
86
+ createVNode(_sfc_main$1, {
87
+ onClick: stopScan,
88
+ class: "stop-scan-button"
89
+ }, {
90
+ default: withCtx(() => [
91
+ createTextVNode("Stop Scan")
92
+ ]),
93
+ _: 1
94
+ })
95
+ ])) : createCommentVNode("", true)
77
96
  ]);
78
97
  };
79
98
  }
80
99
  };
81
- const ButtonCheck = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8234029e"]]);
100
+ const ButtonCheck = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25007b46"]]);
82
101
  export {
83
102
  ButtonCheck as default
84
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonCheck.vue.js","sources":["../../../../../../../src/modules/events/components/elements/ButtonCheck.vue"],"sourcesContent":["<template>\n <div>\n <Button :submit=\"startScan\" class=\"bg-main button-small radius-extra button\">\n Check Tickets\n </Button>\n <Popup\n title=\"Scan QR Code\"\n @close-popup=\"closePublicationPopup\"\n :isPopupOpen=\"isPublicationPopup\"\n class=\"w-max-30r h-max-30r t-left pd-big bg-white radius-big\"\n >\n <h3 class=\"mn-b-small\">Scan QR Code</h3>\n <div class=\"h-max\">\n <!-- Scanning will be handled by Capacitor, so we don't need a visual component here -->\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { BarcodeScanner } from '@capacitor-mlkit/barcode-scanning'\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport * as tickets from '@pf/src/modules/events/store/tickets'\n\nconst emits = defineEmits(['qrcodecheck'])\nconst isPublicationPopup = ref(false)\nconst error = ref('')\n\nfunction openPublicationPopup() {\n isPublicationPopup.value = true\n}\n\nfunction closePublicationPopup() {\n isPublicationPopup.value = false\n}\n\nasync function startScan() {\n openPublicationPopup()\n \n try {\n await BarcodeScanner.isSupported()\n const { barcodes } = await BarcodeScanner.scan()\n \n if (barcodes.length > 0) {\n await processBarcode(barcodes[0].rawValue)\n } else {\n throw new Error('No barcode detected')\n }\n } catch (e) {\n error.value = e.message\n alert(`Error: ${error.value}`)\n } finally {\n closePublicationPopup()\n }\n}\n\nasync function processBarcode(qrcode) {\n try {\n if (!qrcode) {\n throw new Error('Troubles with qrcode reading')\n }\n const response = await tickets.actions.update({ _id: qrcode, status: 'used', check: true })\n alert(\"Ticket checked. And it's all right!\")\n } catch (e) {\n alert(`Ticket is not found, already used or deactivated!`)\n } finally {\n emits('qrcodecheck')\n }\n}\n</script>\n\n<style scoped>\n/* Existing styles can stay unchanged */\n</style>"],"names":["tickets.actions"],"mappings":";;;;;;;;;;;;;;AA0BA,UAAM,QAAQ;AACd,UAAM,qBAAqB,IAAI,KAAK;AACpC,UAAM,QAAQ,IAAI,EAAE;AAEpB,aAAS,uBAAuB;AAC9B,yBAAmB,QAAQ;AAAA,IAC7B;AAEA,aAAS,wBAAwB;AAC/B,yBAAmB,QAAQ;AAAA,IAC7B;AAEA,mBAAe,YAAY;AACzB,2BAAsB;AAEtB,UAAI;AACF,cAAM,eAAe,YAAa;AAClC,cAAM,EAAE,SAAQ,IAAK,MAAM,eAAe,KAAM;AAEhD,YAAI,SAAS,SAAS,GAAG;AACvB,gBAAM,eAAe,SAAS,CAAC,EAAE,QAAQ;AAAA,QAC/C,OAAW;AACL,gBAAM,IAAI,MAAM,qBAAqB;AAAA,QACtC;AAAA,MACF,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,UAAU,MAAM,KAAK,EAAE;AAAA,MACjC,UAAY;AACR,8BAAuB;AAAA,MACxB;AAAA,IACH;AAEA,mBAAe,eAAe,QAAQ;AACpC,UAAI;AACF,YAAI,CAAC,QAAQ;AACX,gBAAM,IAAI,MAAM,8BAA8B;AAAA,QAC/C;AACD,cAAM,WAAW,MAAMA,QAAgB,OAAO,EAAE,KAAK,QAAQ,QAAQ,QAAQ,OAAO,KAAI,CAAE;AAC1F,cAAM,qCAAqC;AAAA,MAC5C,SAAQ,GAAG;AACV,cAAM,mDAAmD;AAAA,MAC7D,UAAY;AACR,cAAM,aAAa;AAAA,MACpB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ButtonCheck.vue.js","sources":["../../../../../../../src/modules/events/components/elements/ButtonCheck.vue"],"sourcesContent":["<template>\n <div>\n <Button @click=\"startScan\" class=\"bg-main button-small radius-extra button\">\n Check Tickets\n </Button>\n <div v-if=\"isScanning\" class=\"barcode-scanner-modal\">\n <!-- Add any UI elements for the scanner here -->\n <Button @click=\"stopScan\" class=\"stop-scan-button\">Stop Scan</Button>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, onUnmounted } from 'vue'\nimport { BarcodeScanner } from '@capacitor-mlkit/barcode-scanning'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport * as tickets from '@pf/src/modules/events/store/tickets'\n\nconst emits = defineEmits(['qrcodecheck'])\nconst error = ref('')\nconst isScanning = ref(false)\n\nonMounted(async () => {\n const { supported } = await BarcodeScanner.isSupported()\n if (!supported) {\n error.value = 'Barcode scanning is not supported on this device'\n }\n})\n\nonUnmounted(async () => {\n await BarcodeScanner.removeAllListeners()\n})\n\nasync function startScan() {\n try {\n const { camera } = await BarcodeScanner.checkPermissions()\n if (camera !== 'granted') {\n const { camera: newStatus } = await BarcodeScanner.requestPermissions()\n if (newStatus !== 'granted') {\n throw new Error('Camera permission is required to scan barcodes')\n }\n }\n\n document.querySelector('body')?.classList.add('barcode-scanner-active')\n isScanning.value = true\n\n await BarcodeScanner.addListener('barcodeScanned', async (result) => {\n await processBarcode(result.barcode)\n })\n\n await BarcodeScanner.startScan()\n } catch (e) {\n error.value = e.message\n alert(`Error: ${error.value}`)\n }\n}\n\nasync function stopScan() {\n try {\n document.querySelector('body')?.classList.remove('barcode-scanner-active')\n isScanning.value = false\n await BarcodeScanner.stopScan()\n await BarcodeScanner.removeAllListeners()\n } catch (e) {\n error.value = e.message\n alert(`Error stopping scan: ${error.value}`)\n }\n}\n\nasync function processBarcode(barcode) {\n try {\n if (!barcode) {\n throw new Error('Troubles with barcode reading')\n }\n const response = await tickets.actions.update({ _id: barcode, status: 'used', check: true })\n alert(\"Ticket checked. And it's all right!\")\n } catch (e) {\n alert(`Ticket is not found, already used or deactivated!`)\n } finally {\n emits('qrcodecheck')\n await stopScan()\n }\n}\n</script>\n\n<style scoped>\n.barcode-scanner-modal {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.stop-scan-button {\n position: absolute;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n/* Existing styles can stay unchanged */\n</style>"],"names":["tickets.actions"],"mappings":";;;;;;;;;;;;;;AAkBA,UAAM,QAAQ;AACd,UAAM,QAAQ,IAAI,EAAE;AACpB,UAAM,aAAa,IAAI,KAAK;AAE5B,cAAU,YAAY;AACpB,YAAM,EAAE,UAAS,IAAK,MAAM,eAAe,YAAa;AACxD,UAAI,CAAC,WAAW;AACd,cAAM,QAAQ;AAAA,MACf;AAAA,IACH,CAAC;AAED,gBAAY,YAAY;AACtB,YAAM,eAAe,mBAAoB;AAAA,IAC3C,CAAC;AAED,mBAAe,YAAY;;AACzB,UAAI;AACF,cAAM,EAAE,OAAM,IAAK,MAAM,eAAe,iBAAkB;AAC1D,YAAI,WAAW,WAAW;AACxB,gBAAM,EAAE,QAAQ,UAAW,IAAG,MAAM,eAAe,mBAAoB;AACvE,cAAI,cAAc,WAAW;AAC3B,kBAAM,IAAI,MAAM,gDAAgD;AAAA,UACjE;AAAA,QACF;AAED,uBAAS,cAAc,MAAM,MAA7B,mBAAgC,UAAU,IAAI;AAC9C,mBAAW,QAAQ;AAEnB,cAAM,eAAe,YAAY,kBAAkB,OAAO,WAAW;AACnE,gBAAM,eAAe,OAAO,OAAO;AAAA,QACzC,CAAK;AAED,cAAM,eAAe,UAAW;AAAA,MACjC,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,UAAU,MAAM,KAAK,EAAE;AAAA,MAC9B;AAAA,IACH;AAEA,mBAAe,WAAW;;AACxB,UAAI;AACF,uBAAS,cAAc,MAAM,MAA7B,mBAAgC,UAAU,OAAO;AACjD,mBAAW,QAAQ;AACnB,cAAM,eAAe,SAAU;AAC/B,cAAM,eAAe,mBAAoB;AAAA,MAC1C,SAAQ,GAAG;AACV,cAAM,QAAQ,EAAE;AAChB,cAAM,wBAAwB,MAAM,KAAK,EAAE;AAAA,MAC5C;AAAA,IACH;AAEA,mBAAe,eAAe,SAAS;AACrC,UAAI;AACF,YAAI,CAAC,SAAS;AACZ,gBAAM,IAAI,MAAM,+BAA+B;AAAA,QAChD;AACD,cAAM,WAAW,MAAMA,QAAgB,OAAO,EAAE,KAAK,SAAS,QAAQ,QAAQ,OAAO,KAAI,CAAE;AAC3F,cAAM,qCAAqC;AAAA,MAC5C,SAAQ,GAAG;AACV,cAAM,mDAAmD;AAAA,MAC7D,UAAY;AACR,cAAM,aAAa;AACnB,cAAM,SAAU;AAAA,MACjB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationBar.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/NavigationBar.vue"],"sourcesContent":["<template>\n\t<header \n\t\tclass=\"pos-sticky w-100 z-index-4 br-b br-solid br-black-transp flex-center flex t-center pd-medium bg-white\"\n\t>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<Button\n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t:submit=\"a => shopcart.actions.toggleShopcart()\" \n\t\t\t\t:counter=\"shopcart.getters.cartTotalAmount\" \n\t\t\t\t:showSucces=\"false\"\n\t\t\t\t:showLoader=\"false\"\n\t\t\t\tclass=\"header-shopcart pd-zero mn-l-auto\"\n\t\t\t\t> \n\t\t\t\t<IconShopcart class=\"i-semi\" fill=\"rgb(var(--main))\" />\n\t\t\t</Button>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\n\t\t\t<IconProfile \n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t@click=\"handleToggle()\" \n\t\t\t\tclass=\"header-profile i-semi\"\n\t\t\t\tfill=\"rgb(var(--main))\" \n\t\t\t/>\n\n\t\t\t<svg \n\t\t\t\tv-else \n\t\t\t\t@click=\"handleBackNavigation()\" \n\t\t\t\tclass=\"i-semi header-arrow\"\n\t\t\t\twidth=\"12\"\n\t\t\t\theight=\"22\"\n\t\t\t\tviewBox=\"0 0 12 22\"\n\t\t\t\tfill=\"none\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t>\n\t\t\t\t<path fill=\"rgb(var(--main))\" d=\"M9.70312 20.7969C10.125 21.2188 10.8281 21.2188 11.2969 20.7969C11.7188 20.375 11.7188 19.6719 11.2969 19.2031L3.42188 11L11.2969 2.79688C11.7188 2.32813 11.7188 1.625 11.2969 1.20313C10.8281 0.734377 10.125 0.781252 9.70312 1.20313L1.07812 10.2031C0.84375 10.4375 0.75 10.7188 0.75 11C0.75 11.2813 0.84375 11.5625 1.07812 11.7969L9.70312 20.7969Z\" />\n\t\t\t</svg>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<div :key=\"route.meta.title_hide\" class=\"header-title\">\n\t\t\t\t<component\n\t\t\t\t\tv-if=\"props.logotype && route.meta.title_hide\"\n\t\t\t\t :is=\"props.logotype\"\n\t\t\t\t :theme=\"theme\"\n\t\t\t\t/>\n\n\t\t\t\t<p v-else class=\"t-semi h-2r h4 d-block\" >\n\t\t\t\t\t{{route.meta.title[locale.toLowerCase()]}}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</transition>\n\t</header>\n</template>\n\n<script setup>\n\timport { ref, onMounted, onUnmounted } from 'vue' \n\timport { useRoute, useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\t\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n\timport IconProfile from '@pf/src/modules/icons/entities/IconProfile.vue'\n\n\timport Button \t\t\t\tfrom '@pf/src/components/Button/Button.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\timport * as shopcart from '@pf/src/modules/orders/store/shopcart'\n\timport * as auth from '@pf/src/modules/auth/views/store/auth'\n\n\t\t// Props\n\tconst props = defineProps({\n theme: {\n \ttype: String,\n\t default: \"light\"\n },\n logotype: {\n\t type: Object\n\t }\n });\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst { t, mergeLocaleMessage, locale } = useI18n();\n\n\tfunction handleBackNavigation() {\n\t if (route.query?.afterAuth) { \n\t \trouter.push({name: 'Home'}) \n\t } else {\n\t \trouter.back();\n\t }\n\t}\n\n\tfunction handleToggle() {\n\t\tif (auth.state.access.status === false) {\n\t\t\trouter.push({name: 'Sign In'}) \n\t\t} else {\n\t\t\trouter.push({ name: 'User Profile', params: { _id: auth.state.user._id }})\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.header-arrow {\n\t\tposition: absolute;\n\t\tleft: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-profile {\n\t\tposition: absolute;\n\t\tright: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-shopcart {\n\t\tposition: absolute;\n\t\tright: 4.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-title {\n\t\tpointer-events: none;\n\t}\n\n\t.slideIn-enter-active,\n\t.slideIn-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideIn-enter-from,\n\t.slideIn-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateX(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n\n\t.slideY-enter-active,\n\t.slideY-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideY-enter-from,\n\t.slideY-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateY(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n</style>"],"names":["useRouter","useRoute","useI18n","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEC,UAAM,QAAQ;AAUd,UAAM,SAASA,UAAAA,UAAW;AAC1B,UAAM,QAAQC,UAAAA,SAAU;AAExB,UAAM,EAAE,GAAG,oBAAoB,OAAQ,IAAGC,QAAO,QAAA;AAEjD,aAAS,uBAAuB;;AAC5B,WAAI,WAAM,UAAN,mBAAa,WAAY;AAC5B,eAAO,KAAK,EAAC,MAAM,OAAM,CAAC;AAAA,MAChC,OAAY;AACN,eAAO,KAAI;AAAA,MACX;AAAA,IACJ;AAED,aAAS,eAAe;AACvB,UAAIC,WAAW,OAAO,WAAW,OAAO;AACvC,eAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AAAA,MAChC,OAAS;AACN,eAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAKA,KAAU,MAAC,KAAK,IAAK,EAAA,CAAC;AAAA,MACzE;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NavigationBar.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/NavigationBar.vue"],"sourcesContent":["<template>\n\t<header \n\t\tclass=\"pos-sticky w-100 z-index-4 br-b br-solid br-black-transp flex-center flex t-center pd-medium bg-white\"\n\t>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<Button\n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t:submit=\"a => shopcart.actions.toggleShopcart()\" \n\t\t\t\t:counter=\"shopcart.getters.cartTotalAmount\" \n\t\t\t\t:showSucces=\"false\"\n\t\t\t\t:showLoader=\"false\"\n\t\t\t\tclass=\"header-shopcart pd-zero mn-l-auto\"\n\t\t\t\t> \n\t\t\t\t<IconShopcart class=\"i-semi\" fill=\"rgb(var(--main))\" />\n\t\t\t</Button>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\n\t\t\t<IconProfile \n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t@click=\"handleToggle()\" \n\t\t\t\tclass=\"header-profile i-semi\"\n\t\t\t\tfill=\"rgb(var(--main))\" \n\t\t\t/>\n\n\t\t\t<svg \n\t\t\t\tv-else \n\t\t\t\t@click=\"handleBackNavigation()\" \n\t\t\t\tclass=\"i-semi header-arrow\"\n\t\t\t\twidth=\"12\"\n\t\t\t\theight=\"22\"\n\t\t\t\tviewBox=\"0 0 12 22\"\n\t\t\t\tfill=\"none\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t>\n\t\t\t\t<path fill=\"rgb(var(--main))\" d=\"M9.70312 20.7969C10.125 21.2188 10.8281 21.2188 11.2969 20.7969C11.7188 20.375 11.7188 19.6719 11.2969 19.2031L3.42188 11L11.2969 2.79688C11.7188 2.32813 11.7188 1.625 11.2969 1.20313C10.8281 0.734377 10.125 0.781252 9.70312 1.20313L1.07812 10.2031C0.84375 10.4375 0.75 10.7188 0.75 11C0.75 11.2813 0.84375 11.5625 1.07812 11.7969L9.70312 20.7969Z\" />\n\t\t\t</svg>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<div :key=\"route.meta.title_hide\" class=\"header-title\">\n\t\t\t\t<component\n\t\t\t\t\tv-if=\"props.logotype && route.meta.title_hide\"\n\t\t\t\t :is=\"props.logotype\"\n\t\t\t\t :theme=\"theme\"\n\t\t\t\t/>\n\n\t\t\t\t<p v-else class=\"t-semi h-2r h4 d-block\" >\n\t\t\t\t\t{{route.meta.title[locale.toLowerCase()]}}\n\n\t\t\t\t\t<!-- if (route.meta.title) { \n\t\t\t\t\t\t\troute.meta.title[locale.toLowerCase()]\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\troute.name\n\t\t\t\t\t\t} -->\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</transition>\n\t</header>\n</template>\n\n<script setup>\n\timport { ref, onMounted, onUnmounted } from 'vue' \n\timport { useRoute, useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\t\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n\timport IconProfile from '@pf/src/modules/icons/entities/IconProfile.vue'\n\n\timport Button \t\t\t\tfrom '@pf/src/components/Button/Button.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\timport * as shopcart from '@pf/src/modules/orders/store/shopcart'\n\timport * as auth from '@pf/src/modules/auth/views/store/auth'\n\n\t\t// Props\n\tconst props = defineProps({\n theme: {\n \ttype: String,\n\t default: \"light\"\n },\n logotype: {\n\t type: Object\n\t }\n });\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst { t, mergeLocaleMessage, locale } = useI18n();\n\n\tfunction handleBackNavigation() {\n\t if (route.query?.afterAuth) { \n\t \trouter.push({name: 'Home'}) \n\t } else {\n\t \trouter.back();\n\t }\n\t}\n\n\tfunction handleToggle() {\n\t\tif (auth.state.access.status === false) {\n\t\t\trouter.push({name: 'Sign In'}) \n\t\t} else {\n\t\t\trouter.push({ name: 'User Profile', params: { _id: auth.state.user._id }})\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.header-arrow {\n\t\tposition: absolute;\n\t\tleft: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-profile {\n\t\tposition: absolute;\n\t\tright: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-shopcart {\n\t\tposition: absolute;\n\t\tright: 4.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-title {\n\t\tpointer-events: none;\n\t}\n\n\t.slideIn-enter-active,\n\t.slideIn-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideIn-enter-from,\n\t.slideIn-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateX(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n\n\t.slideY-enter-active,\n\t.slideY-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideY-enter-from,\n\t.slideY-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateY(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n</style>"],"names":["useRouter","useRoute","useI18n","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EC,UAAM,QAAQ;AAUd,UAAM,SAASA,UAAAA,UAAW;AAC1B,UAAM,QAAQC,UAAAA,SAAU;AAExB,UAAM,EAAE,GAAG,oBAAoB,OAAQ,IAAGC,QAAO,QAAA;AAEjD,aAAS,uBAAuB;;AAC5B,WAAI,WAAM,UAAN,mBAAa,WAAY;AAC5B,eAAO,KAAK,EAAC,MAAM,OAAM,CAAC;AAAA,MAChC,OAAY;AACN,eAAO,KAAI;AAAA,MACX;AAAA,IACJ;AAED,aAAS,eAAe;AACvB,UAAIC,WAAW,OAAO,WAAW,OAAO;AACvC,eAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AAAA,MAChC,OAAS;AACN,eAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAKA,KAAU,MAAC,KAAK,IAAK,EAAA,CAAC;AAAA,MACzE;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationBar.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/NavigationBar.vue"],"sourcesContent":["<template>\n\t<header \n\t\tclass=\"pos-sticky w-100 z-index-4 br-b br-solid br-black-transp flex-center flex t-center pd-medium bg-white\"\n\t>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<Button\n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t:submit=\"a => shopcart.actions.toggleShopcart()\" \n\t\t\t\t:counter=\"shopcart.getters.cartTotalAmount\" \n\t\t\t\t:showSucces=\"false\"\n\t\t\t\t:showLoader=\"false\"\n\t\t\t\tclass=\"header-shopcart pd-zero mn-l-auto\"\n\t\t\t\t> \n\t\t\t\t<IconShopcart class=\"i-semi\" fill=\"rgb(var(--main))\" />\n\t\t\t</Button>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\n\t\t\t<IconProfile \n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t@click=\"handleToggle()\" \n\t\t\t\tclass=\"header-profile i-semi\"\n\t\t\t\tfill=\"rgb(var(--main))\" \n\t\t\t/>\n\n\t\t\t<svg \n\t\t\t\tv-else \n\t\t\t\t@click=\"handleBackNavigation()\" \n\t\t\t\tclass=\"i-semi header-arrow\"\n\t\t\t\twidth=\"12\"\n\t\t\t\theight=\"22\"\n\t\t\t\tviewBox=\"0 0 12 22\"\n\t\t\t\tfill=\"none\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t>\n\t\t\t\t<path fill=\"rgb(var(--main))\" d=\"M9.70312 20.7969C10.125 21.2188 10.8281 21.2188 11.2969 20.7969C11.7188 20.375 11.7188 19.6719 11.2969 19.2031L3.42188 11L11.2969 2.79688C11.7188 2.32813 11.7188 1.625 11.2969 1.20313C10.8281 0.734377 10.125 0.781252 9.70312 1.20313L1.07812 10.2031C0.84375 10.4375 0.75 10.7188 0.75 11C0.75 11.2813 0.84375 11.5625 1.07812 11.7969L9.70312 20.7969Z\" />\n\t\t\t</svg>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<div :key=\"route.meta.title_hide\" class=\"header-title\">\n\t\t\t\t<component\n\t\t\t\t\tv-if=\"props.logotype && route.meta.title_hide\"\n\t\t\t\t :is=\"props.logotype\"\n\t\t\t\t :theme=\"theme\"\n\t\t\t\t/>\n\n\t\t\t\t<p v-else class=\"t-semi h-2r h4 d-block\" >\n\t\t\t\t\t{{route.meta.title[locale.toLowerCase()]}}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</transition>\n\t</header>\n</template>\n\n<script setup>\n\timport { ref, onMounted, onUnmounted } from 'vue' \n\timport { useRoute, useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\t\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n\timport IconProfile from '@pf/src/modules/icons/entities/IconProfile.vue'\n\n\timport Button \t\t\t\tfrom '@pf/src/components/Button/Button.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\timport * as shopcart from '@pf/src/modules/orders/store/shopcart'\n\timport * as auth from '@pf/src/modules/auth/views/store/auth'\n\n\t\t// Props\n\tconst props = defineProps({\n theme: {\n \ttype: String,\n\t default: \"light\"\n },\n logotype: {\n\t type: Object\n\t }\n });\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst { t, mergeLocaleMessage, locale } = useI18n();\n\n\tfunction handleBackNavigation() {\n\t if (route.query?.afterAuth) { \n\t \trouter.push({name: 'Home'}) \n\t } else {\n\t \trouter.back();\n\t }\n\t}\n\n\tfunction handleToggle() {\n\t\tif (auth.state.access.status === false) {\n\t\t\trouter.push({name: 'Sign In'}) \n\t\t} else {\n\t\t\trouter.push({ name: 'User Profile', params: { _id: auth.state.user._id }})\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.header-arrow {\n\t\tposition: absolute;\n\t\tleft: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-profile {\n\t\tposition: absolute;\n\t\tright: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-shopcart {\n\t\tposition: absolute;\n\t\tright: 4.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-title {\n\t\tpointer-events: none;\n\t}\n\n\t.slideIn-enter-active,\n\t.slideIn-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideIn-enter-from,\n\t.slideIn-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateX(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n\n\t.slideY-enter-active,\n\t.slideY-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideY-enter-from,\n\t.slideY-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateY(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEC,UAAM,QAAQ;AAUd,UAAM,SAAS,UAAW;AAC1B,UAAM,QAAQ,SAAU;AAExB,UAAM,EAAE,GAAG,oBAAoB,OAAQ,IAAG,QAAO;AAEjD,aAAS,uBAAuB;;AAC5B,WAAI,WAAM,UAAN,mBAAa,WAAY;AAC5B,eAAO,KAAK,EAAC,MAAM,OAAM,CAAC;AAAA,MAChC,OAAY;AACN,eAAO,KAAI;AAAA,MACX;AAAA,IACJ;AAED,aAAS,eAAe;AACvB,UAAIA,MAAW,OAAO,WAAW,OAAO;AACvC,eAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AAAA,MAChC,OAAS;AACN,eAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAKA,MAAW,KAAK,IAAK,EAAA,CAAC;AAAA,MACzE;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NavigationBar.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/NavigationBar.vue"],"sourcesContent":["<template>\n\t<header \n\t\tclass=\"pos-sticky w-100 z-index-4 br-b br-solid br-black-transp flex-center flex t-center pd-medium bg-white\"\n\t>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<Button\n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t:submit=\"a => shopcart.actions.toggleShopcart()\" \n\t\t\t\t:counter=\"shopcart.getters.cartTotalAmount\" \n\t\t\t\t:showSucces=\"false\"\n\t\t\t\t:showLoader=\"false\"\n\t\t\t\tclass=\"header-shopcart pd-zero mn-l-auto\"\n\t\t\t\t> \n\t\t\t\t<IconShopcart class=\"i-semi\" fill=\"rgb(var(--main))\" />\n\t\t\t</Button>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\n\t\t\t<IconProfile \n\t\t\t\tv-if=\"route.meta.title_hide\"\n\t\t\t\t@click=\"handleToggle()\" \n\t\t\t\tclass=\"header-profile i-semi\"\n\t\t\t\tfill=\"rgb(var(--main))\" \n\t\t\t/>\n\n\t\t\t<svg \n\t\t\t\tv-else \n\t\t\t\t@click=\"handleBackNavigation()\" \n\t\t\t\tclass=\"i-semi header-arrow\"\n\t\t\t\twidth=\"12\"\n\t\t\t\theight=\"22\"\n\t\t\t\tviewBox=\"0 0 12 22\"\n\t\t\t\tfill=\"none\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t>\n\t\t\t\t<path fill=\"rgb(var(--main))\" d=\"M9.70312 20.7969C10.125 21.2188 10.8281 21.2188 11.2969 20.7969C11.7188 20.375 11.7188 19.6719 11.2969 19.2031L3.42188 11L11.2969 2.79688C11.7188 2.32813 11.7188 1.625 11.2969 1.20313C10.8281 0.734377 10.125 0.781252 9.70312 1.20313L1.07812 10.2031C0.84375 10.4375 0.75 10.7188 0.75 11C0.75 11.2813 0.84375 11.5625 1.07812 11.7969L9.70312 20.7969Z\" />\n\t\t\t</svg>\n\t\t</transition>\n\n\t\t<transition name=\"slideIn\" mode=\"out-in\">\n\t\t\t<div :key=\"route.meta.title_hide\" class=\"header-title\">\n\t\t\t\t<component\n\t\t\t\t\tv-if=\"props.logotype && route.meta.title_hide\"\n\t\t\t\t :is=\"props.logotype\"\n\t\t\t\t :theme=\"theme\"\n\t\t\t\t/>\n\n\t\t\t\t<p v-else class=\"t-semi h-2r h4 d-block\" >\n\t\t\t\t\t{{route.meta.title[locale.toLowerCase()]}}\n\n\t\t\t\t\t<!-- if (route.meta.title) { \n\t\t\t\t\t\t\troute.meta.title[locale.toLowerCase()]\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\troute.name\n\t\t\t\t\t\t} -->\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</transition>\n\t</header>\n</template>\n\n<script setup>\n\timport { ref, onMounted, onUnmounted } from 'vue' \n\timport { useRoute, useRouter } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\t\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n\timport IconProfile from '@pf/src/modules/icons/entities/IconProfile.vue'\n\n\timport Button \t\t\t\tfrom '@pf/src/components/Button/Button.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\timport * as shopcart from '@pf/src/modules/orders/store/shopcart'\n\timport * as auth from '@pf/src/modules/auth/views/store/auth'\n\n\t\t// Props\n\tconst props = defineProps({\n theme: {\n \ttype: String,\n\t default: \"light\"\n },\n logotype: {\n\t type: Object\n\t }\n });\n\n\tconst router = useRouter()\n\tconst route = useRoute()\n\n\tconst { t, mergeLocaleMessage, locale } = useI18n();\n\n\tfunction handleBackNavigation() {\n\t if (route.query?.afterAuth) { \n\t \trouter.push({name: 'Home'}) \n\t } else {\n\t \trouter.back();\n\t }\n\t}\n\n\tfunction handleToggle() {\n\t\tif (auth.state.access.status === false) {\n\t\t\trouter.push({name: 'Sign In'}) \n\t\t} else {\n\t\t\trouter.push({ name: 'User Profile', params: { _id: auth.state.user._id }})\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.header-arrow {\n\t\tposition: absolute;\n\t\tleft: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-profile {\n\t\tposition: absolute;\n\t\tright: 1.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-shopcart {\n\t\tposition: absolute;\n\t\tright: 4.25rem;\n\t\theight: 2rem;\n\t}\n\n\t.header-title {\n\t\tpointer-events: none;\n\t}\n\n\t.slideIn-enter-active,\n\t.slideIn-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideIn-enter-from,\n\t.slideIn-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateX(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n\n\t.slideY-enter-active,\n\t.slideY-leave-active {\n\t\ttransition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slideY-enter-from,\n\t.slideY-leave-to {\n\t\topacity: 0;\n\t\ttransform: translateY(50px);\n\n\t\tspan {\tposition: absolute; } \n\t}\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EC,UAAM,QAAQ;AAUd,UAAM,SAAS,UAAW;AAC1B,UAAM,QAAQ,SAAU;AAExB,UAAM,EAAE,GAAG,oBAAoB,OAAQ,IAAG,QAAO;AAEjD,aAAS,uBAAuB;;AAC5B,WAAI,WAAM,UAAN,mBAAa,WAAY;AAC5B,eAAO,KAAK,EAAC,MAAM,OAAM,CAAC;AAAA,MAChC,OAAY;AACN,eAAO,KAAI;AAAA,MACX;AAAA,IACJ;AAED,aAAS,eAAe;AACvB,UAAIA,MAAW,OAAO,WAAW,OAAO;AACvC,eAAO,KAAK,EAAC,MAAM,UAAS,CAAC;AAAA,MAChC,OAAS;AACN,eAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAKA,MAAW,KAAK,IAAK,EAAA,CAAC;AAAA,MACzE;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}