@ozdao/martyrs 0.2.469 → 0.2.471
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Media-DwVcRIAX.mjs → Media-C4Ges_Sd.mjs} +1 -1
- package/dist/{Media-DCGbUujy.js → Media-CR0V1zvB.js} +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/chats.server.js +15 -14
- package/dist/chats.server.mjs +15 -14
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/globals.server.js +20 -12
- package/dist/globals.server.mjs +20 -12
- package/dist/{index-DICZTQ-1.mjs → index-CgMJYdNI.mjs} +3 -0
- package/dist/{index-DQqZReAr.js → index-DxIIUtHr.js} +3 -0
- package/dist/{main-DEHjtgLs.mjs → main-CTcal9qN.mjs} +900 -884
- package/dist/{main-UVdexuMN.js → main-CsZAG5Wz.js} +5 -5
- package/dist/martyrs/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
- package/dist/martyrs/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/martyrs/node_modules/{.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/preferences/dist/esm/index.cjs +1 -1
- package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/index.cjs.map +1 -0
- package/dist/martyrs/node_modules/{.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/preferences/dist/esm/index.js +1 -1
- package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/index.js.map +1 -0
- package/dist/martyrs/node_modules/{.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/preferences/dist/esm/web.cjs +1 -1
- package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/web.cjs.map +1 -0
- package/dist/martyrs/node_modules/{.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/preferences/dist/esm/web.js +1 -1
- package/dist/martyrs/node_modules/@capacitor/preferences/dist/esm/web.js.map +1 -0
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/{node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_ → martyrs}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/ParseError.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/constants.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/constants.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/format.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/format.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/isPossible.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/isValid.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/isValid.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/metadata.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/metadata.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parse.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parse.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/metadata.min.json.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/min/exports/withMetadataArgument.cjs.map +1 -0
- package/dist/martyrs/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/{node_modules/.pnpm/uuid@11.1.0 → martyrs}/node_modules/uuid/dist/esm-browser/rng.cjs +4 -4
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +15 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +17 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +13 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs.map +1 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue2.cjs → Popup.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js.map → Popup.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js → Popup.vue.js} +2 -2
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs +47 -16
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js +47 -16
- package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +6 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +6 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +4 -4
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs +10 -10
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +10 -10
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/globals.client.cjs +0 -9
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +0 -9
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +107 -21
- package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +40 -97
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +40 -97
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/plugins/AlertDialog.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +1 -1
- package/dist/martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/icons/skeletons/SkeletonBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs +36 -10
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +36 -10
- package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.js +69 -13
- package/dist/notifications.server.mjs +69 -13
- package/dist/orders.server.js +4 -3
- package/dist/orders.server.mjs +4 -3
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/rents.server.js +1 -1
- package/dist/rents.server.mjs +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/package.json +1 -1
- package/src/components/Shader/Shader.vue +44 -25
- package/src/modules/auth/controllers/middlewares/authJwt.js +4 -0
- package/src/modules/chats/routes/chats.routes.js +21 -17
- package/src/modules/chats/store/chat.store.js +55 -28
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/community/components/pages/BlogPost.vue +1 -0
- package/src/modules/community/components/pages/CreateBlogPost.vue +3 -3
- package/src/modules/constructor/components/elements/VideoPlayer.vue +1 -1
- package/src/modules/constructor/components/sections/Constructor.vue +9 -9
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/globals/controllers/classes/globals.crud.js +2 -2
- package/src/modules/globals/controllers/classes/globals.websocket.js +29 -21
- package/src/modules/globals/globals.client.js +0 -12
- package/src/modules/globals/views/classes/globals.store.js +119 -31
- package/src/modules/globals/views/classes/globals.websocket.js +46 -146
- package/src/modules/icons/entities/IconMusic.vue +14 -0
- package/src/modules/icons/navigation/IconCheck.vue +31 -0
- package/src/modules/icons/navigation/IconHeart.vue +26 -0
- package/src/modules/icons/navigation/IconPause.vue +31 -0
- package/src/modules/icons/navigation/IconPlay.vue +17 -0
- package/src/modules/icons/navigation/IconRefresh.vue +31 -0
- package/src/modules/icons/navigation/IconShuffle.vue +31 -0
- package/src/modules/icons/navigation/IconVolume.vue +31 -0
- package/src/modules/icons/skeletons/SkeletonBlogpost.vue +2 -2
- package/src/modules/music/components/SidebarMusic.vue +156 -0
- package/src/modules/music/components/cards/AlbumCard.vue +107 -0
- package/src/modules/music/components/cards/ArtistCard.vue +37 -0
- package/src/modules/music/components/cards/PlaylistCard.vue +100 -0
- package/src/modules/music/components/cards/TrackCard.vue +86 -0
- package/src/modules/music/components/forms/PlaylistForm.vue +156 -0
- package/src/modules/music/components/forms/SearchForm.vue +82 -0
- package/src/modules/music/components/forms/UploadForm.vue +313 -0
- package/src/modules/music/components/layouts/MusicLayout.vue +137 -0
- package/src/modules/music/components/lists/AlbumList.vue +25 -0
- package/src/modules/music/components/lists/ArtistList.vue +25 -0
- package/src/modules/music/components/lists/PlaylistList.vue +25 -0
- package/src/modules/music/components/lists/TrackList.vue +175 -0
- package/src/modules/music/components/pages/AlbumDetail.vue +265 -0
- package/src/modules/music/components/pages/ArtistDetail.vue +247 -0
- package/src/modules/music/components/pages/MusicHome.vue +177 -0
- package/src/modules/music/components/pages/MusicLibrary.vue +192 -0
- package/src/modules/music/components/pages/MusicUpload.vue +44 -0
- package/src/modules/music/components/pages/PlaylistDetail.vue +504 -0
- package/src/modules/music/components/pages/SearchResults.vue +397 -0
- package/src/modules/music/components/pages/TrackDetail.vue +143 -0
- package/src/modules/music/components/player/MusicPlayer.vue +202 -0
- package/src/modules/music/components/player/TrackProgress.vue +110 -0
- package/src/modules/music/components/player/VolumeControl.vue +98 -0
- package/src/modules/music/controllers/album.controller.js +98 -0
- package/src/modules/music/controllers/artist.controller.js +111 -0
- package/src/modules/music/controllers/genre.controller.js +71 -0
- package/src/modules/music/controllers/music.controller.js +174 -0
- package/src/modules/music/controllers/playlist.controller.js +182 -0
- package/src/modules/music/controllers/search.controller.js +103 -0
- package/src/modules/music/controllers/stream.controller.js +106 -0
- package/src/modules/music/models/album.model.js +61 -0
- package/src/modules/music/models/artist.model.js +67 -0
- package/src/modules/music/models/genre.model.js +42 -0
- package/src/modules/music/models/play-history.model.js +51 -0
- package/src/modules/music/models/playlist.model.js +69 -0
- package/src/modules/music/models/track.model.js +94 -0
- package/src/modules/music/music.client.js +186 -0
- package/src/modules/music/music.server.js +114 -0
- package/src/modules/music/policies/music.policies.js +84 -0
- package/src/modules/music/router/music.js +77 -0
- package/src/modules/music/routes/album.routes.js +62 -0
- package/src/modules/music/routes/artist.routes.js +67 -0
- package/src/modules/music/routes/genre.routes.js +60 -0
- package/src/modules/music/routes/music.routes.js +145 -0
- package/src/modules/music/routes/playlist.routes.js +99 -0
- package/src/modules/music/routes/search.routes.js +10 -0
- package/src/modules/music/routes/stream.routes.js +38 -0
- package/src/modules/music/store/albums.js +200 -0
- package/src/modules/music/store/artists.js +180 -0
- package/src/modules/music/store/player.js +397 -0
- package/src/modules/music/store/playlists.js +211 -0
- package/src/modules/music/store/search.js +126 -0
- package/src/modules/music/store/tracks.js +230 -0
- package/src/modules/music/websocket/streaming.handler.js +151 -0
- package/src/modules/notifications/controllers/notifications.controller.js +2 -2
- package/src/modules/notifications/notifications.client.js +57 -19
- package/src/modules/notifications/notifications.server.js +3 -1
- package/src/modules/notifications/routes/notifications.routes.js +2 -2
- package/src/modules/notifications/services/notification.service.js +34 -15
- package/src/modules/notifications/services/web-push.service.js +7 -6
- package/src/modules/orders/controllers/orders.controller.js +2 -0
- package/dist/martyrs/node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor/core/dist/index.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/web.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/web.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/ParseError.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/ParseError.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/constants.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/constants.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/format.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/format.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isPossible.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isPossible.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isValid.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/isValid.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/metadata.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/metadata.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parse.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parse.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/metadata.min.json.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/metadata.min.json.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/withMetadataArgument.cjs.map +0 -1
- package/dist/martyrs/node_modules/.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +0 -1
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +0 -6
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +0 -15
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +0 -11
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +0 -21
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
- package/src/modules/notifications/notifications2.client.js +0 -256
- package/src/modules/notifications/services/websocket.service.js +0 -100
- /package/dist/martyrs/node_modules/{.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/core/dist/index.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/@capacitor_core@7.2.0/node_modules/@capacitor → @capacitor}/core/dist/index.js +0 -0
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -0
- /package/dist/{node_modules/.pnpm/@vue_shared@3.5.13 → martyrs}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.cjs.map +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js +0 -0
- /package/dist/{node_modules → martyrs/node_modules}/fast-deep-equal/index.js.map +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/ParseError.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/ParseError.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/PhoneNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/PhoneNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/constants.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/constants.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/format.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/format.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/RFC3966.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/RFC3966.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/applyInternationalSeparatorStyle.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/checkNumberLength.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/checkNumberLength.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extension/createExtensionPattern.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extension/extractExtension.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractCountryCallingCode.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractNationalNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractNationalNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractPhoneContext.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/formatNationalNumberUsingFormat.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getCountryByCallingCode.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getCountryByNationalNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getIddPrefix.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getNumberType.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getNumberType.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getPossibleCountriesForNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/isObject.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/isObject.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/isViablePhoneNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/matchesEntirely.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/parseDigits.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/parseDigits.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/stripIddPrefix.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/isPossible.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/isPossible.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/isValid.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/isValid.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/metadata.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/metadata.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/normalizeArguments.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/normalizeArguments.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parse.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parse.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parseIncompletePhoneNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parseIncompletePhoneNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumberWithError_.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumber_.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/parsePhoneNumber_.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/tools/semver-compare.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/es6/tools/semver-compare.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/metadata.min.json.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/metadata.min.json.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/min/exports/parsePhoneNumber.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/min/exports/withMetadataArgument.cjs +0 -0
- /package/dist/martyrs/node_modules/{.pnpm/libphonenumber-js@1.12.6/node_modules/libphonenumber-js → libphonenumber-js}/min/exports/withMetadataArgument.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index$1 = require("../../../../../../node_modules
|
|
4
|
+
const index$1 = require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
|
|
5
5
|
const index = require("../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.cjs");
|
|
6
6
|
const vue_SixQ7xP = require("../../../../../../../node_modules/.pnpm/@unhead_vue@1.11.20_vue@3.5.13_typescript@5.8.3_/node_modules/@unhead/vue/dist/shared/vue.-sixQ7xP.cjs");
|
|
7
7
|
const vueI18n = require("vue-i18n");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed, onBeforeMount, resolveComponent, createBlock, openBlock, withCtx, resolveDynamicComponent } from "vue";
|
|
2
|
-
import { Preferences } from "../../../../../../node_modules
|
|
2
|
+
import { Preferences } from "../../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
|
3
3
|
import { Keyboard } from "../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.js";
|
|
4
4
|
import { u as useHead } from "../../../../../../../node_modules/.pnpm/@unhead_vue@1.11.20_vue@3.5.13_typescript@5.8.3_/node_modules/@unhead/vue/dist/shared/vue.-sixQ7xP.js";
|
|
5
5
|
import { useI18n } from "vue-i18n";
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const globals = require("../../store/globals.cjs");
|
|
6
6
|
const Status = require("../../../../../components/Status/Status.vue.cjs");
|
|
7
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
|
7
|
+
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
|
8
8
|
const Loader = require("../../../../../components/Loader/Loader.vue2.cjs");
|
|
9
9
|
require("vue-i18n");
|
|
10
10
|
;/* empty css */
|
|
@@ -13,7 +13,7 @@ require("../../../../auth/views/store/auth.cjs");
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
const LocationSelection = require("../partials/LocationSelection.vue.cjs");
|
|
15
15
|
const ShopCart = require("../../../../orders/components/partials/ShopCart.vue.cjs");
|
|
16
|
-
const index = require("../../../../../../node_modules
|
|
16
|
+
const index = require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
|
|
17
17
|
;/* empty css */
|
|
18
18
|
const _hoisted_1 = {
|
|
19
19
|
key: 0,
|
|
@@ -2,7 +2,7 @@ import { ref, computed, onMounted, resolveComponent, createElementBlock, openBlo
|
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
3
|
import { state } from "../../store/globals.js";
|
|
4
4
|
import _sfc_main$4 from "../../../../../components/Status/Status.vue.js";
|
|
5
|
-
import _sfc_main$1 from "../../../../../components/Popup/Popup.
|
|
5
|
+
import _sfc_main$1 from "../../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import Loader from "../../../../../components/Loader/Loader.vue2.js";
|
|
7
7
|
import "vue-i18n";
|
|
8
8
|
/* empty css */
|
|
@@ -11,7 +11,7 @@ import "../../../../auth/views/store/auth.js";
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
import _sfc_main$2 from "../partials/LocationSelection.vue.js";
|
|
13
13
|
import _sfc_main$3 from "../../../../orders/components/partials/ShopCart.vue.js";
|
|
14
|
-
import { Preferences } from "../../../../../../node_modules
|
|
14
|
+
import { Preferences } from "../../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
const _hoisted_1 = {
|
|
17
17
|
key: 0,
|
|
@@ -5,7 +5,7 @@ const vueRouter = require("vue-router");
|
|
|
5
5
|
const IconChevronBottom = require("../../../../icons/navigation/IconChevronBottom.vue.cjs");
|
|
6
6
|
const globals = require("../../store/globals.cjs");
|
|
7
7
|
const auth = require("../../../../auth/views/store/auth.cjs");
|
|
8
|
-
;/* empty css
|
|
8
|
+
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const _pluginVue_exportHelper = require("../../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
11
11
|
const _hoisted_1 = ["onClick"];
|
|
@@ -3,7 +3,7 @@ import { useRouter } from "vue-router";
|
|
|
3
3
|
import IconChevronBottom from "../../../../icons/navigation/IconChevronBottom.vue.js";
|
|
4
4
|
import { state } from "../../store/globals.js";
|
|
5
5
|
import { state as state$1 } from "../../../../auth/views/store/auth.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import _export_sfc from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
9
|
const _hoisted_1 = ["onClick"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Popup = require("../../../../components/Popup/Popup.
|
|
4
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
5
5
|
const _hoisted_1 = { class: "mn-b-medium" };
|
|
6
6
|
const _hoisted_2 = { class: "flex-nowrap flex-justify-end flex gap-thin" };
|
|
7
7
|
const _hoisted_3 = ["onClick"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRefs, createBlock, openBlock, unref, withCtx, createElementVNode, toDisplayString, createElementBlock, Fragment, renderList } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../../../components/Popup/Popup.
|
|
2
|
+
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
3
3
|
const _hoisted_1 = { class: "mn-b-medium" };
|
|
4
4
|
const _hoisted_2 = { class: "flex-nowrap flex-justify-end flex gap-thin" };
|
|
5
5
|
const _hoisted_3 = ["onClick"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const index = require("../../../../../node_modules
|
|
4
|
+
const index = require("../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
|
|
5
5
|
const state = vue.reactive({
|
|
6
6
|
loading: false,
|
|
7
7
|
isOpenLocationPopup: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive } from "vue";
|
|
2
|
-
import { Preferences } from "../../../../../node_modules
|
|
2
|
+
import { Preferences } from "../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
|
3
3
|
const state = reactive({
|
|
4
4
|
loading: false,
|
|
5
5
|
isOpenLocationPopup: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const serverRenderer_esmBundler = require("
|
|
3
|
+
const serverRenderer_esmBundler = require("../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs");
|
|
4
4
|
const index = require("../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.cjs");
|
|
5
5
|
const axiosInstance = require("./axios-instance.cjs");
|
|
6
6
|
function renderAndMountApp({ createApp }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderToString } from "
|
|
1
|
+
import { renderToString } from "../../../../../node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js";
|
|
2
2
|
import { renderSSRHead } from "../../../../../../node_modules/.pnpm/@unhead_ssr@1.11.20/node_modules/@unhead/ssr/dist/index.js";
|
|
3
3
|
import { setAuthToken } from "./axios-instance.js";
|
|
4
4
|
function renderAndMountApp({ createApp }) {
|
|
@@ -10,7 +10,7 @@ const _hoisted_1 = {
|
|
|
10
10
|
};
|
|
11
11
|
function _sfc_render(_ctx, _cache) {
|
|
12
12
|
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
13
|
-
vue.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--
|
|
13
|
+
vue.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--light))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="rgb(var(--light))" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6)
|
|
14
14
|
]));
|
|
15
15
|
}
|
|
16
16
|
const SkeletonBlogpost = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonBlogpost.vue.cjs","sources":["../../../../../../src/modules/icons/skeletons/SkeletonBlogpost.vue"],"sourcesContent":["<template>\n <svg width=\"100%\" height=\"20rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Фоновый прямоугольник для всей карточки -->\n <rect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"100%\" height=\"100%\" fill=\"rgb(var(--
|
|
1
|
+
{"version":3,"file":"SkeletonBlogpost.vue.cjs","sources":["../../../../../../src/modules/icons/skeletons/SkeletonBlogpost.vue"],"sourcesContent":["<template>\n <svg width=\"100%\" height=\"20rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Фоновый прямоугольник для всей карточки -->\n <rect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"100%\" height=\"100%\" fill=\"rgb(var(--light))\"/>\n \n <!-- Имитация шапки карточки -->\n <rect x=\"15\" y=\"15\" rx=\"4\" ry=\"4\" width=\"40%\" height=\"20\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Имитация изображения -->\n <rect x=\"15\" y=\"45\" rx=\"5\" ry=\"5\" width=\"70%\" height=\"50\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Имитация текста под изображением -->\n <rect x=\"15\" y=\"110\" rx=\"3\" ry=\"3\" width=\"90%\" height=\"6\" fill=\"rgba(var(--black),0.05)\"></rect>\n <rect x=\"15\" y=\"130\" rx=\"3\" ry=\"3\" width=\"70%\" height=\"6\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Блик с анимацией движения -->\n <rect x=\"-25%\" y=\"0\" width=\"25%\" height=\"100%\" fill=\"rgb(var(--light))\" mask=\"url(#myMask)\" opacity=\"0.3\">\n <animate attributeName=\"x\" from=\"-25%\" to=\"100%\" dur=\"2s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </svg>\n</template>"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;AACO,MAAA,aAAY;AAAA,EAAC;EAAe,QAAkC;AAAA;;AAAnE,SAAA,YAAA,MAAA,QAAA;AADF,SAAAA,IAAA,UAAA,GAAAC,IAAA,mBAAA,OAAA,YAAA,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA;AAAA;;;;;"}
|
|
@@ -8,7 +8,7 @@ const _hoisted_1 = {
|
|
|
8
8
|
};
|
|
9
9
|
function _sfc_render(_ctx, _cache) {
|
|
10
10
|
return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
11
|
-
createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--
|
|
11
|
+
createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--light))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="rgb(var(--light))" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6)
|
|
12
12
|
]));
|
|
13
13
|
}
|
|
14
14
|
const SkeletonBlogpost = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonBlogpost.vue.js","sources":["../../../../../../src/modules/icons/skeletons/SkeletonBlogpost.vue"],"sourcesContent":["<template>\n <svg width=\"100%\" height=\"20rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Фоновый прямоугольник для всей карточки -->\n <rect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"100%\" height=\"100%\" fill=\"rgb(var(--
|
|
1
|
+
{"version":3,"file":"SkeletonBlogpost.vue.js","sources":["../../../../../../src/modules/icons/skeletons/SkeletonBlogpost.vue"],"sourcesContent":["<template>\n <svg width=\"100%\" height=\"20rem\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Фоновый прямоугольник для всей карточки -->\n <rect x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" width=\"100%\" height=\"100%\" fill=\"rgb(var(--light))\"/>\n \n <!-- Имитация шапки карточки -->\n <rect x=\"15\" y=\"15\" rx=\"4\" ry=\"4\" width=\"40%\" height=\"20\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Имитация изображения -->\n <rect x=\"15\" y=\"45\" rx=\"5\" ry=\"5\" width=\"70%\" height=\"50\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Имитация текста под изображением -->\n <rect x=\"15\" y=\"110\" rx=\"3\" ry=\"3\" width=\"90%\" height=\"6\" fill=\"rgba(var(--black),0.05)\"></rect>\n <rect x=\"15\" y=\"130\" rx=\"3\" ry=\"3\" width=\"70%\" height=\"6\" fill=\"rgba(var(--black),0.05)\"></rect>\n \n <!-- Блик с анимацией движения -->\n <rect x=\"-25%\" y=\"0\" width=\"25%\" height=\"100%\" fill=\"rgb(var(--light))\" mask=\"url(#myMask)\" opacity=\"0.3\">\n <animate attributeName=\"x\" from=\"-25%\" to=\"100%\" dur=\"2s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </svg>\n</template>"],"names":["_openBlock","_createElementBlock"],"mappings":";;;AACO,MAAA,aAAY;AAAA,EAAC;EAAe,QAAkC;AAAA;;AAAnE,SAAA,YAAA,MAAA,QAAA;AADF,SAAAA,UAAA,GAAAC,mBAAA,OAAA,YAAA,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA;AAAA;;;;"}
|
|
@@ -26,7 +26,7 @@ class CapacitorPushHandler {
|
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
28
|
try {
|
|
29
|
-
const { Capacitor } = await Promise.resolve().then(() => require("../../../node_modules
|
|
29
|
+
const { Capacitor } = await Promise.resolve().then(() => require("../../../node_modules/@capacitor/core/dist/index.cjs"));
|
|
30
30
|
const { PushNotifications } = await Promise.resolve().then(() => require("../../../../node_modules/.pnpm/@capacitor_push-notifications@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/push-notifications/dist/esm/index.cjs"));
|
|
31
31
|
const { Device } = await Promise.resolve().then(() => require("../../../../node_modules/.pnpm/@capacitor_device@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/device/dist/esm/index.cjs"));
|
|
32
32
|
this.capacitor = Capacitor;
|
|
@@ -141,9 +141,27 @@ class NotificationManager {
|
|
|
141
141
|
this.initialized = false;
|
|
142
142
|
this.isServer = typeof window === "undefined";
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
async registerWebPush(store) {
|
|
145
|
+
if (!("Notification" in window) || !("serviceWorker" in navigator) || !("PushManager" in window)) {
|
|
146
|
+
console.warn("Web Push не поддерживается в браузере");
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const permission = await Notification.requestPermission();
|
|
150
|
+
if (permission !== "granted") {
|
|
151
|
+
console.warn("Разрешение на уведомления не получено");
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const registration = await navigator.serviceWorker.register("/sw.js");
|
|
155
|
+
const subscription = await registration.pushManager.subscribe({
|
|
156
|
+
userVisibleOnly: true,
|
|
157
|
+
applicationServerKey: "BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg"
|
|
158
|
+
});
|
|
159
|
+
console.log("New subscription:", JSON.stringify(subscription));
|
|
160
|
+
await store.notifications.actions.registerDevice({
|
|
161
|
+
deviceToken: JSON.stringify(subscription),
|
|
162
|
+
deviceType: "web"
|
|
163
|
+
});
|
|
164
|
+
}
|
|
147
165
|
async initialize() {
|
|
148
166
|
var _a;
|
|
149
167
|
if (this.initialized || this.isServer) return;
|
|
@@ -152,19 +170,27 @@ class NotificationManager {
|
|
|
152
170
|
console.warn("Cannot initialize notifications: No user ID found in auth store");
|
|
153
171
|
return;
|
|
154
172
|
}
|
|
173
|
+
console.log("Connecting to websockets via notifications");
|
|
155
174
|
await globals_websocket.default.connect(userId);
|
|
175
|
+
globals_websocket.default.removeModuleListeners("notification");
|
|
176
|
+
await globals_websocket.default.subscribeModule("notification");
|
|
177
|
+
globals_websocket.default.addEventListener(
|
|
178
|
+
"notification",
|
|
179
|
+
(data) => {
|
|
180
|
+
this.store.notifications.actions.addLocalNotification(data.data);
|
|
181
|
+
},
|
|
182
|
+
{ module: "notification" }
|
|
183
|
+
);
|
|
156
184
|
if (this.options.enablePush !== false) {
|
|
157
185
|
await this.pushHandler.requestPermissions();
|
|
186
|
+
await this.registerWebPush(this.store);
|
|
158
187
|
}
|
|
159
188
|
this.initialized = true;
|
|
160
189
|
await this.store.notifications.actions.getNotifications(userId);
|
|
161
190
|
}
|
|
162
|
-
/**
|
|
163
|
-
* Disconnect and clean up
|
|
164
|
-
*/
|
|
165
191
|
disconnect() {
|
|
166
192
|
if (this.isServer) return;
|
|
167
|
-
globals_websocket.default.removeModuleListeners("
|
|
193
|
+
globals_websocket.default.removeModuleListeners("notification");
|
|
168
194
|
this.pushHandler.removeListeners();
|
|
169
195
|
this.initialized = false;
|
|
170
196
|
}
|
|
@@ -205,12 +231,12 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
205
231
|
const isServer = typeof window === "undefined";
|
|
206
232
|
const autoInit = !isServer && options.autoInit !== false;
|
|
207
233
|
if (autoInit) {
|
|
208
|
-
const isAuthenticated = store.auth.state.
|
|
234
|
+
const isAuthenticated = store.auth.state.access.status;
|
|
209
235
|
const userId = (_a = store.auth.state.user) == null ? void 0 : _a._id;
|
|
210
236
|
if (isAuthenticated && userId) {
|
|
211
237
|
notificationManager.initialize();
|
|
212
238
|
}
|
|
213
|
-
vue.watch(() => store.auth.state.
|
|
239
|
+
vue.watch(() => store.auth.state.access.status, (isAuthenticated2) => {
|
|
214
240
|
if (isAuthenticated2) {
|
|
215
241
|
notificationManager.initialize();
|
|
216
242
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAC;AACrD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAC;AAC3E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAC;AAEpD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACf;AAEM,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACR,SAAQ,OAAO;AACd,cAAQ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AIA,kBAAiB;AACnB,4BAAoB,WAAY;AAAA,MACxC,OAAa;AACL,4BAAoB,WAAY;AAChC,cAAM,cAAc,UAAU,mBAAoB;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL;AAGE,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACD;AAAA,EACL,CAAG;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACND,qBAAAA,qBAAAA;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAiB;AAAA;AAAA,MAEvB,kBAAMC,iBAAgB;AAAA;AAAA,MAEtB,mBAAMC,kBAAiB;AAAA,MACvB,yBAAMC,wBAAuB;AAAA;AAAA,MAE7B,eAAMC,cAAa;AAAA;AAAA,MAEbC,qBAAAA,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.register('/sw.js');\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg'\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web'\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n console.log('Connecting to websockets via notifications')\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n (data) => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store)\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.access.status, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AA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 +24,7 @@ class CapacitorPushHandler {
|
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
26
|
try {
|
|
27
|
-
const { Capacitor } = await import("../../../node_modules
|
|
27
|
+
const { Capacitor } = await import("../../../node_modules/@capacitor/core/dist/index.js");
|
|
28
28
|
const { PushNotifications } = await import("../../../../node_modules/.pnpm/@capacitor_push-notifications@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/push-notifications/dist/esm/index.js");
|
|
29
29
|
const { Device } = await import("../../../../node_modules/.pnpm/@capacitor_device@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/device/dist/esm/index.js");
|
|
30
30
|
this.capacitor = Capacitor;
|
|
@@ -139,9 +139,27 @@ class NotificationManager {
|
|
|
139
139
|
this.initialized = false;
|
|
140
140
|
this.isServer = typeof window === "undefined";
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
async registerWebPush(store) {
|
|
143
|
+
if (!("Notification" in window) || !("serviceWorker" in navigator) || !("PushManager" in window)) {
|
|
144
|
+
console.warn("Web Push не поддерживается в браузере");
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const permission = await Notification.requestPermission();
|
|
148
|
+
if (permission !== "granted") {
|
|
149
|
+
console.warn("Разрешение на уведомления не получено");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const registration = await navigator.serviceWorker.register("/sw.js");
|
|
153
|
+
const subscription = await registration.pushManager.subscribe({
|
|
154
|
+
userVisibleOnly: true,
|
|
155
|
+
applicationServerKey: "BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg"
|
|
156
|
+
});
|
|
157
|
+
console.log("New subscription:", JSON.stringify(subscription));
|
|
158
|
+
await store.notifications.actions.registerDevice({
|
|
159
|
+
deviceToken: JSON.stringify(subscription),
|
|
160
|
+
deviceType: "web"
|
|
161
|
+
});
|
|
162
|
+
}
|
|
145
163
|
async initialize() {
|
|
146
164
|
var _a;
|
|
147
165
|
if (this.initialized || this.isServer) return;
|
|
@@ -150,19 +168,27 @@ class NotificationManager {
|
|
|
150
168
|
console.warn("Cannot initialize notifications: No user ID found in auth store");
|
|
151
169
|
return;
|
|
152
170
|
}
|
|
171
|
+
console.log("Connecting to websockets via notifications");
|
|
153
172
|
await globalWebSocket.connect(userId);
|
|
173
|
+
globalWebSocket.removeModuleListeners("notification");
|
|
174
|
+
await globalWebSocket.subscribeModule("notification");
|
|
175
|
+
globalWebSocket.addEventListener(
|
|
176
|
+
"notification",
|
|
177
|
+
(data) => {
|
|
178
|
+
this.store.notifications.actions.addLocalNotification(data.data);
|
|
179
|
+
},
|
|
180
|
+
{ module: "notification" }
|
|
181
|
+
);
|
|
154
182
|
if (this.options.enablePush !== false) {
|
|
155
183
|
await this.pushHandler.requestPermissions();
|
|
184
|
+
await this.registerWebPush(this.store);
|
|
156
185
|
}
|
|
157
186
|
this.initialized = true;
|
|
158
187
|
await this.store.notifications.actions.getNotifications(userId);
|
|
159
188
|
}
|
|
160
|
-
/**
|
|
161
|
-
* Disconnect and clean up
|
|
162
|
-
*/
|
|
163
189
|
disconnect() {
|
|
164
190
|
if (this.isServer) return;
|
|
165
|
-
globalWebSocket.removeModuleListeners("
|
|
191
|
+
globalWebSocket.removeModuleListeners("notification");
|
|
166
192
|
this.pushHandler.removeListeners();
|
|
167
193
|
this.initialized = false;
|
|
168
194
|
}
|
|
@@ -203,12 +229,12 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
203
229
|
const isServer = typeof window === "undefined";
|
|
204
230
|
const autoInit = !isServer && options.autoInit !== false;
|
|
205
231
|
if (autoInit) {
|
|
206
|
-
const isAuthenticated = store.auth.state.
|
|
232
|
+
const isAuthenticated = store.auth.state.access.status;
|
|
207
233
|
const userId = (_a = store.auth.state.user) == null ? void 0 : _a._id;
|
|
208
234
|
if (isAuthenticated && userId) {
|
|
209
235
|
notificationManager.initialize();
|
|
210
236
|
}
|
|
211
|
-
watch(() => store.auth.state.
|
|
237
|
+
watch(() => store.auth.state.access.status, (isAuthenticated2) => {
|
|
212
238
|
if (isAuthenticated2) {
|
|
213
239
|
notificationManager.initialize();
|
|
214
240
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n /**\n * Initialize notifications\n */\n async initialize() {\n if (this.initialized || this.isServer) return;\n \n // Get current user ID from auth store instead of localStorage\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n \n // Initialize WebSocket for realtime notifications\n await globalWebSocket.connect(userId);\n \n // Initialize push notifications for mobile if enabled\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n }\n \n this.initialized = true;\n \n // Fetch existing notifications\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n /**\n * Disconnect and clean up\n */\n disconnect() {\n if (this.isServer) return;\n \n globalWebSocket.removeModuleListeners('notifications');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.isAuthenticated;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.isAuthenticated, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated"],"mappings":";;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;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ifications.client.js"],"sourcesContent":["import { watch, toRefs } from \"vue\";\n// Router import \nimport routerNotifications from './router/notifications.router.js'; \n// Store \nimport * as storeNotifications from './store/notifications.store.js'; \n// Auth store import\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth';\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts \nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue'; \n// Sections \nimport NotificationsList from './components/sections/NotificationsList.vue'; \nimport NotificationPreferences from './components/sections/NotificationPreferences.vue'; \n// Pages \nimport Notifications from './components/pages/Notifications.vue'; \n// Components \nimport NotificationBadge from './components/elements/NotificationBadge.vue'; \nimport NotificationItem from './components/blocks/NotificationItem.vue'; \n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n \n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n \n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n \n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n \n // Set up event listeners\n this._setupListeners();\n \n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', \n this._handleRegistration.bind(this)\n );\n \n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived',\n this._handleNotificationReceived.bind(this)\n );\n \n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed',\n this._handleNotificationAction.bind(this)\n );\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n \n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value\n };\n \n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {}\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(\n actionData.notification.data\n );\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n \n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.register('/sw.js');\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg'\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web'\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n console.log('Connecting to websockets via notifications')\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n (data) => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store)\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n }\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: options.wsUrl });\n }\n \n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000\n });\n \n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n \n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n \n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n \n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n \n // Watch for user login/logout using auth store\n watch(() => store.auth.state.access.status, (isAuthenticated) => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n });\n }\n \n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer\n };\n });\n \n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout\n }\n }\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // SSR Utilities\n SSRUtils\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated"],"mappings":";;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,qDAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACf;AAEM,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACR,SAAQ,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AACzD,aAAO;AAAA,IACb;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAKE,MAAM,qBAAqB;AAEzB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACb;AAEI,QAAI,CAAC,KAAK,eAAe;AACvB,YAAM,cAAc,MAAM,KAAK,WAAY;AAC3C,UAAI,CAAC,YAAa,QAAO;AAAA,IAC/B;AAEI,QAAI;AAEF,YAAM,mBAAmB,MAAM,KAAK,kBAAkB,mBAAoB;AAC1E,UAAI,iBAAiB,YAAY,WAAW;AAC1C,gBAAQ,IAAI,qCAAqC;AACjD,eAAO;AAAA,MACf;AAGM,WAAK,gBAAiB;AAGtB,YAAM,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ol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Tooltip = require("../../../../components/Tooltip/Tooltip.
|
|
4
|
+
const Tooltip = require("../../../../components/Tooltip/Tooltip.vue.cjs");
|
|
5
5
|
const IconStatusCreated = require("../icons/IconStatusCreated.vue.cjs");
|
|
6
6
|
const IconStatusConfirmed = require("../icons/IconStatusConfirmed.vue.cjs");
|
|
7
7
|
const IconStatusInUse = require("../icons/IconStatusInUse.vue.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent } from "vue";
|
|
2
|
-
import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.
|
|
2
|
+
import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue.js";
|
|
3
3
|
import _sfc_main$6 from "../icons/IconStatusCreated.vue.js";
|
|
4
4
|
import _sfc_main$5 from "../icons/IconStatusConfirmed.vue.js";
|
|
5
5
|
import _sfc_main$2 from "../icons/IconStatusInUse.vue.js";
|
|
@@ -4,13 +4,13 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
6
6
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
7
|
-
const Popup = require("../../../../components/Popup/Popup.
|
|
7
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
8
8
|
const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
|
|
9
9
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
|
10
10
|
const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
|
|
11
11
|
const ChatPage = require("../../../chats/components/pages/ChatPage.vue.cjs");
|
|
12
12
|
const PriceTotal = require("../elements/PriceTotal.vue.cjs");
|
|
13
|
-
;/* empty css
|
|
13
|
+
;/* empty css */
|
|
14
14
|
const globals = require("../../../globals/views/store/globals.cjs");
|
|
15
15
|
const auth = require("../../../auth/views/store/auth.cjs");
|
|
16
16
|
const orders = require("../../store/orders.cjs");
|
|
@@ -2,13 +2,13 @@ import { ref, onMounted, computed, createElementBlock, createCommentVNode, openB
|
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
|
4
4
|
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
|
-
import _sfc_main$1 from "../../../../components/Popup/Popup.
|
|
5
|
+
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import IconTime from "../../../icons/entities/IconTime.vue.js";
|
|
7
7
|
import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
|
|
8
8
|
import _sfc_main$5 from "../../../organizations/components/blocks/CardOrganization.vue.js";
|
|
9
9
|
import _sfc_main$6 from "../../../chats/components/pages/ChatPage.vue.js";
|
|
10
10
|
import _sfc_main$4 from "../elements/PriceTotal.vue.js";
|
|
11
|
-
/* empty css
|
|
11
|
+
/* empty css */
|
|
12
12
|
import { state } from "../../../globals/views/store/globals.js";
|
|
13
13
|
import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
14
14
|
import { actions, state as state$2, getters, mutations } from "../../store/orders.js";
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
6
6
|
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
|
7
|
-
const Popup = require("../../../../components/Popup/Popup.
|
|
7
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
8
8
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
9
9
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
10
10
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|