@ozdao/prometheus-framework 0.2.222 → 0.2.223
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +4 -4
- package/dist/auth.server.mjs +4 -4
- package/dist/builder.js +65 -56
- package/dist/builder.mjs +65 -56
- package/dist/community.server.js +8 -3
- package/dist/community.server.mjs +8 -3
- package/dist/events.server.js +14 -24
- package/dist/events.server.mjs +14 -24
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +42 -76
- package/dist/gallery.server.mjs +41 -75
- package/dist/index-CsS7qx1d.js +243 -0
- package/dist/index-UIHE6Rk3.mjs +244 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
- package/dist/orders.server.js +2 -2
- package/dist/orders.server.mjs +2 -2
- package/dist/organizations.server.js +149 -107
- package/dist/organizations.server.mjs +149 -107
- package/dist/pages.server.js +1 -1
- package/dist/pages.server.mjs +1 -1
- package/dist/products.server.js +119 -266
- package/dist/products.server.mjs +119 -266
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +26 -41
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +11 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +11 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +6 -3
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +6 -3
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +50 -35
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +55 -40
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +46 -49
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +46 -49
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
- package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +29 -54
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +30 -55
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +162 -133
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +164 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
- package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
- package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +19 -10
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +19 -10
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +852 -846
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +852 -846
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
- package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
- package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
- package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
- package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
- package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +17 -17
- package/dist/prometheus-framework.es.js +1790 -1790
- package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
- package/dist/queryProcessor-CcsJEUBr.js +196 -0
- package/dist/spots.server.js +1 -1
- package/dist/spots.server.mjs +1 -1
- package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
- package/dist/verifyAccesses-BvLnOtBN.js +89 -0
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +2 -2
- package/src/builder/modes/ssr.prod.js +4 -4
- package/src/builder/ssr/ssr-render-html.js +11 -13
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/page.js +4 -0
- package/src/builder/webpack/webpack.config.client.js +2 -2
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/components/Button/Button.vue +0 -1
- package/src/components/Feed/Feed.vue +34 -55
- package/src/components/FieldTags/BlockTags.vue +0 -1
- package/src/components/UploadImage/UploadImage.vue +2 -1
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
- package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
- package/src/modules/auth/controllers/services/auth.service.js +1 -0
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
- package/src/modules/auth/views/middlewares/ownership.validation.js +16 -1
- package/src/modules/auth/views/store/auth.js +43 -39
- package/src/modules/auth/views/store/twofa.js +2 -5
- package/src/modules/auth/views/validations/inputs.validation.js +12 -6
- package/src/modules/community/components/layouts/Community.vue +3 -3
- package/src/modules/community/components/pages/BlogPost.vue +122 -120
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/Comments.vue +5 -5
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/router/blogposts.js +37 -38
- package/src/modules/community/routes/blog.routes.js +4 -0
- package/src/modules/community/store/blogposts.js +11 -19
- package/src/modules/community/store/reactions.js +1 -7
- package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
- package/src/modules/events/components/pages/EditEvent.vue +76 -59
- package/src/modules/events/components/pages/Event.vue +2 -15
- package/src/modules/events/components/pages/Events.vue +2 -1
- package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
- package/src/modules/events/components/sections/HeroEvent.vue +15 -17
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
- package/src/modules/events/router/events.js +11 -4
- package/src/modules/events/store/events.js +2 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
- package/src/modules/gallery/controllers/gallery.controller.js +30 -31
- package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
- package/src/modules/gallery/routes/gallery.routes.js +22 -4
- package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
- package/src/modules/globals/globals.client.js +2 -0
- package/src/modules/globals/views/classes/globals.store.js +4 -3
- package/src/modules/globals/views/components/blocks/Card.vue +56 -0
- package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
- package/src/modules/globals/views/components/layouts/App.vue +1 -0
- package/src/modules/globals/views/components/layouts/Client.vue +0 -30
- package/src/modules/globals/views/store/globals.js +4 -2
- package/src/modules/globals/views/utils/axios-instance.js +18 -0
- package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
- package/src/modules/landing/components/pages/Governance.vue +4 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
- package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
- package/src/modules/landing/router/landing.js +2 -1
- package/src/modules/orders/store/orders.js +1 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
- package/src/modules/organizations/controllers/organizations.controller.js +2 -1
- package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
- package/src/modules/organizations/models/department.model.js +3 -100
- package/src/modules/organizations/models/organization.model.js +6 -4
- package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
- package/src/modules/organizations/router/organizations.js +2 -0
- package/src/modules/organizations/store/departments.js +6 -6
- package/src/modules/organizations/store/organizations.js +2 -16
- package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
- package/src/modules/products/components/blocks/CardProduct.vue +2 -0
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/sections/MenuSection.vue +2 -2
- package/src/modules/products/controllers/products.controller.js +201 -367
- package/src/modules/products/routes/products.routes.js +0 -5
- package/src/modules/products/store/categories.js +1 -2
- package/src/modules/products/store/leftovers.js +1 -2
- package/src/modules/products/store/products.js +1 -13
- package/src/modules/reports/components/sections/FormReport.vue +20 -20
- package/src/modules/spots/store/spots.js +1 -6
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/router/users.js +2 -2
- package/src/modules/users/store/users.js +1 -3
- package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
- package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definitions.cjs","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var BarcodeFormat;\n(function (BarcodeFormat) {\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Aztec\"] = \"AZTEC\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Codabar\"] = \"CODABAR\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code39\"] = \"CODE_39\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code93\"] = \"CODE_93\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code128\"] = \"CODE_128\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"DataMatrix\"] = \"DATA_MATRIX\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Ean8\"] = \"EAN_8\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Ean13\"] = \"EAN_13\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Itf\"] = \"ITF\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Pdf417\"] = \"PDF_417\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"QrCode\"] = \"QR_CODE\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"UpcA\"] = \"UPC_A\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"UpcE\"] = \"UPC_E\";\n})(BarcodeFormat || (BarcodeFormat = {}));\n/**\n * @since 0.0.1\n */\nexport var BarcodeValueType;\n(function (BarcodeValueType) {\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"CalendarEvent\"] = \"CALENDAR_EVENT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"ContactInfo\"] = \"CONTACT_INFO\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"DriversLicense\"] = \"DRIVERS_LICENSE\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Email\"] = \"EMAIL\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Geo\"] = \"GEO\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Isbn\"] = \"ISBN\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Phone\"] = \"PHONE\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Product\"] = \"PRODUCT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Sms\"] = \"SMS\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Text\"] = \"TEXT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Url\"] = \"URL\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Wifi\"] = \"WIFI\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Unknown\"] = \"UNKNOWN\";\n})(BarcodeValueType || (BarcodeValueType = {}));\n/**\n * @since 0.0.1\n */\nexport var LensFacing;\n(function (LensFacing) {\n /**\n * @since 0.0.1\n */\n LensFacing[\"Front\"] = \"FRONT\";\n /**\n * @since 0.0.1\n */\n LensFacing[\"Back\"] = \"BACK\";\n})(LensFacing || (LensFacing = {}));\n/**\n * @since 5.1.0\n */\nexport var GoogleBarcodeScannerModuleInstallState;\n(function (GoogleBarcodeScannerModuleInstallState) {\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"CANCELED\"] = 3] = \"CANCELED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"COMPLETED\"] = 4] = \"COMPLETED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"INSTALLING\"] = 6] = \"INSTALLING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"DOWNLOAD_PAUSED\"] = 7] = \"DOWNLOAD_PAUSED\";\n})(GoogleBarcodeScannerModuleInstallState || (GoogleBarcodeScannerModuleInstallState = {}));\n//# sourceMappingURL=definitions.js.map"],"names":["BarcodeFormat","BarcodeValueType","LensFacing","GoogleBarcodeScannerModuleInstallState"],"mappings":";;AAGWA,QAAc,gBAAA;AAAA,CACxB,SAAU,eAAe;AAMtB,gBAAc,OAAO,IAAI;AAMzB,gBAAc,SAAS,IAAI;AAM3B,gBAAc,QAAQ,IAAI;AAM1B,gBAAc,QAAQ,IAAI;AAM1B,gBAAc,SAAS,IAAI;AAM3B,gBAAc,YAAY,IAAI;AAM9B,gBAAc,MAAM,IAAI;AAMxB,gBAAc,OAAO,IAAI;AAMzB,gBAAc,KAAK,IAAI;AAMvB,gBAAc,QAAQ,IAAI;AAM1B,gBAAc,QAAQ,IAAI;AAM1B,gBAAc,MAAM,IAAI;AAMxB,gBAAc,MAAM,IAAI;AAC5B,GAAGA,0BAAkBA,QAAAA,gBAAgB,CAAE,EAAC;AAI7BC,QAAiB,mBAAA;AAAA,CAC3B,SAAU,kBAAkB;AAIzB,mBAAiB,eAAe,IAAI;AAIpC,mBAAiB,aAAa,IAAI;AAIlC,mBAAiB,gBAAgB,IAAI;AAIrC,mBAAiB,OAAO,IAAI;AAI5B,mBAAiB,KAAK,IAAI;AAI1B,mBAAiB,MAAM,IAAI;AAI3B,mBAAiB,OAAO,IAAI;AAI5B,mBAAiB,SAAS,IAAI;AAI9B,mBAAiB,KAAK,IAAI;AAI1B,mBAAiB,MAAM,IAAI;AAI3B,mBAAiB,KAAK,IAAI;AAI1B,mBAAiB,MAAM,IAAI;AAI3B,mBAAiB,SAAS,IAAI;AAClC,GAAGA,6BAAqBA,QAAAA,mBAAmB,CAAE,EAAC;AAInCC,QAAW,aAAA;AAAA,CACrB,SAAU,YAAY;AAInB,aAAW,OAAO,IAAI;AAItB,aAAW,MAAM,IAAI;AACzB,GAAGA,uBAAeA,QAAAA,aAAa,CAAE,EAAC;AAIvBC,QAAuC,yCAAA;AAAA,CACjD,SAAU,wCAAwC;AAI/C,yCAAuC,uCAAuC,SAAS,IAAI,CAAC,IAAI;AAIhG,yCAAuC,uCAAuC,SAAS,IAAI,CAAC,IAAI;AAIhG,yCAAuC,uCAAuC,aAAa,IAAI,CAAC,IAAI;AAIpG,yCAAuC,uCAAuC,UAAU,IAAI,CAAC,IAAI;AAIjG,yCAAuC,uCAAuC,WAAW,IAAI,CAAC,IAAI;AAIlG,yCAAuC,uCAAuC,QAAQ,IAAI,CAAC,IAAI;AAI/F,yCAAuC,uCAAuC,YAAY,IAAI,CAAC,IAAI;AAInG,yCAAuC,uCAAuC,iBAAiB,IAAI,CAAC,IAAI;AAC5G,GAAGA,QAAsC,2CAAKA,iDAAyC,CAAA,EAAG;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
var BarcodeFormat;
|
2
|
+
(function(BarcodeFormat2) {
|
3
|
+
BarcodeFormat2["Aztec"] = "AZTEC";
|
4
|
+
BarcodeFormat2["Codabar"] = "CODABAR";
|
5
|
+
BarcodeFormat2["Code39"] = "CODE_39";
|
6
|
+
BarcodeFormat2["Code93"] = "CODE_93";
|
7
|
+
BarcodeFormat2["Code128"] = "CODE_128";
|
8
|
+
BarcodeFormat2["DataMatrix"] = "DATA_MATRIX";
|
9
|
+
BarcodeFormat2["Ean8"] = "EAN_8";
|
10
|
+
BarcodeFormat2["Ean13"] = "EAN_13";
|
11
|
+
BarcodeFormat2["Itf"] = "ITF";
|
12
|
+
BarcodeFormat2["Pdf417"] = "PDF_417";
|
13
|
+
BarcodeFormat2["QrCode"] = "QR_CODE";
|
14
|
+
BarcodeFormat2["UpcA"] = "UPC_A";
|
15
|
+
BarcodeFormat2["UpcE"] = "UPC_E";
|
16
|
+
})(BarcodeFormat || (BarcodeFormat = {}));
|
17
|
+
var BarcodeValueType;
|
18
|
+
(function(BarcodeValueType2) {
|
19
|
+
BarcodeValueType2["CalendarEvent"] = "CALENDAR_EVENT";
|
20
|
+
BarcodeValueType2["ContactInfo"] = "CONTACT_INFO";
|
21
|
+
BarcodeValueType2["DriversLicense"] = "DRIVERS_LICENSE";
|
22
|
+
BarcodeValueType2["Email"] = "EMAIL";
|
23
|
+
BarcodeValueType2["Geo"] = "GEO";
|
24
|
+
BarcodeValueType2["Isbn"] = "ISBN";
|
25
|
+
BarcodeValueType2["Phone"] = "PHONE";
|
26
|
+
BarcodeValueType2["Product"] = "PRODUCT";
|
27
|
+
BarcodeValueType2["Sms"] = "SMS";
|
28
|
+
BarcodeValueType2["Text"] = "TEXT";
|
29
|
+
BarcodeValueType2["Url"] = "URL";
|
30
|
+
BarcodeValueType2["Wifi"] = "WIFI";
|
31
|
+
BarcodeValueType2["Unknown"] = "UNKNOWN";
|
32
|
+
})(BarcodeValueType || (BarcodeValueType = {}));
|
33
|
+
var LensFacing;
|
34
|
+
(function(LensFacing2) {
|
35
|
+
LensFacing2["Front"] = "FRONT";
|
36
|
+
LensFacing2["Back"] = "BACK";
|
37
|
+
})(LensFacing || (LensFacing = {}));
|
38
|
+
var GoogleBarcodeScannerModuleInstallState;
|
39
|
+
(function(GoogleBarcodeScannerModuleInstallState2) {
|
40
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["UNKNOWN"] = 0] = "UNKNOWN";
|
41
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["PENDING"] = 1] = "PENDING";
|
42
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["DOWNLOADING"] = 2] = "DOWNLOADING";
|
43
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["CANCELED"] = 3] = "CANCELED";
|
44
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["COMPLETED"] = 4] = "COMPLETED";
|
45
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["FAILED"] = 5] = "FAILED";
|
46
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["INSTALLING"] = 6] = "INSTALLING";
|
47
|
+
GoogleBarcodeScannerModuleInstallState2[GoogleBarcodeScannerModuleInstallState2["DOWNLOAD_PAUSED"] = 7] = "DOWNLOAD_PAUSED";
|
48
|
+
})(GoogleBarcodeScannerModuleInstallState || (GoogleBarcodeScannerModuleInstallState = {}));
|
49
|
+
export {
|
50
|
+
BarcodeFormat,
|
51
|
+
BarcodeValueType,
|
52
|
+
GoogleBarcodeScannerModuleInstallState,
|
53
|
+
LensFacing
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=definitions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definitions.js","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var BarcodeFormat;\n(function (BarcodeFormat) {\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Aztec\"] = \"AZTEC\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Codabar\"] = \"CODABAR\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code39\"] = \"CODE_39\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code93\"] = \"CODE_93\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Code128\"] = \"CODE_128\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"DataMatrix\"] = \"DATA_MATRIX\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Ean8\"] = \"EAN_8\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Ean13\"] = \"EAN_13\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Itf\"] = \"ITF\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"Pdf417\"] = \"PDF_417\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"QrCode\"] = \"QR_CODE\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"UpcA\"] = \"UPC_A\";\n /**\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n BarcodeFormat[\"UpcE\"] = \"UPC_E\";\n})(BarcodeFormat || (BarcodeFormat = {}));\n/**\n * @since 0.0.1\n */\nexport var BarcodeValueType;\n(function (BarcodeValueType) {\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"CalendarEvent\"] = \"CALENDAR_EVENT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"ContactInfo\"] = \"CONTACT_INFO\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"DriversLicense\"] = \"DRIVERS_LICENSE\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Email\"] = \"EMAIL\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Geo\"] = \"GEO\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Isbn\"] = \"ISBN\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Phone\"] = \"PHONE\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Product\"] = \"PRODUCT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Sms\"] = \"SMS\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Text\"] = \"TEXT\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Url\"] = \"URL\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Wifi\"] = \"WIFI\";\n /**\n * @since 0.0.1\n */\n BarcodeValueType[\"Unknown\"] = \"UNKNOWN\";\n})(BarcodeValueType || (BarcodeValueType = {}));\n/**\n * @since 0.0.1\n */\nexport var LensFacing;\n(function (LensFacing) {\n /**\n * @since 0.0.1\n */\n LensFacing[\"Front\"] = \"FRONT\";\n /**\n * @since 0.0.1\n */\n LensFacing[\"Back\"] = \"BACK\";\n})(LensFacing || (LensFacing = {}));\n/**\n * @since 5.1.0\n */\nexport var GoogleBarcodeScannerModuleInstallState;\n(function (GoogleBarcodeScannerModuleInstallState) {\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"CANCELED\"] = 3] = \"CANCELED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"COMPLETED\"] = 4] = \"COMPLETED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"INSTALLING\"] = 6] = \"INSTALLING\";\n /**\n * @since 5.1.0\n */\n GoogleBarcodeScannerModuleInstallState[GoogleBarcodeScannerModuleInstallState[\"DOWNLOAD_PAUSED\"] = 7] = \"DOWNLOAD_PAUSED\";\n})(GoogleBarcodeScannerModuleInstallState || (GoogleBarcodeScannerModuleInstallState = {}));\n//# sourceMappingURL=definitions.js.map"],"names":["BarcodeFormat","BarcodeValueType","LensFacing","GoogleBarcodeScannerModuleInstallState"],"mappings":"AAGU,IAAC;AAAA,CACV,SAAUA,gBAAe;AAMtB,EAAAA,eAAc,OAAO,IAAI;AAMzB,EAAAA,eAAc,SAAS,IAAI;AAM3B,EAAAA,eAAc,QAAQ,IAAI;AAM1B,EAAAA,eAAc,QAAQ,IAAI;AAM1B,EAAAA,eAAc,SAAS,IAAI;AAM3B,EAAAA,eAAc,YAAY,IAAI;AAM9B,EAAAA,eAAc,MAAM,IAAI;AAMxB,EAAAA,eAAc,OAAO,IAAI;AAMzB,EAAAA,eAAc,KAAK,IAAI;AAMvB,EAAAA,eAAc,QAAQ,IAAI;AAM1B,EAAAA,eAAc,QAAQ,IAAI;AAM1B,EAAAA,eAAc,MAAM,IAAI;AAMxB,EAAAA,eAAc,MAAM,IAAI;AAC5B,GAAG,kBAAkB,gBAAgB,CAAE,EAAC;AAI9B,IAAC;AAAA,CACV,SAAUC,mBAAkB;AAIzB,EAAAA,kBAAiB,eAAe,IAAI;AAIpC,EAAAA,kBAAiB,aAAa,IAAI;AAIlC,EAAAA,kBAAiB,gBAAgB,IAAI;AAIrC,EAAAA,kBAAiB,OAAO,IAAI;AAI5B,EAAAA,kBAAiB,KAAK,IAAI;AAI1B,EAAAA,kBAAiB,MAAM,IAAI;AAI3B,EAAAA,kBAAiB,OAAO,IAAI;AAI5B,EAAAA,kBAAiB,SAAS,IAAI;AAI9B,EAAAA,kBAAiB,KAAK,IAAI;AAI1B,EAAAA,kBAAiB,MAAM,IAAI;AAI3B,EAAAA,kBAAiB,KAAK,IAAI;AAI1B,EAAAA,kBAAiB,MAAM,IAAI;AAI3B,EAAAA,kBAAiB,SAAS,IAAI;AAClC,GAAG,qBAAqB,mBAAmB,CAAE,EAAC;AAIpC,IAAC;AAAA,CACV,SAAUC,aAAY;AAInB,EAAAA,YAAW,OAAO,IAAI;AAItB,EAAAA,YAAW,MAAM,IAAI;AACzB,GAAG,eAAe,aAAa,CAAE,EAAC;AAIxB,IAAC;AAAA,CACV,SAAUC,yCAAwC;AAI/C,EAAAA,wCAAuCA,wCAAuC,SAAS,IAAI,CAAC,IAAI;AAIhG,EAAAA,wCAAuCA,wCAAuC,SAAS,IAAI,CAAC,IAAI;AAIhG,EAAAA,wCAAuCA,wCAAuC,aAAa,IAAI,CAAC,IAAI;AAIpG,EAAAA,wCAAuCA,wCAAuC,UAAU,IAAI,CAAC,IAAI;AAIjG,EAAAA,wCAAuCA,wCAAuC,WAAW,IAAI,CAAC,IAAI;AAIlG,EAAAA,wCAAuCA,wCAAuC,QAAQ,IAAI,CAAC,IAAI;AAI/F,EAAAA,wCAAuCA,wCAAuC,YAAY,IAAI,CAAC,IAAI;AAInG,EAAAA,wCAAuCA,wCAAuC,iBAAiB,IAAI,CAAC,IAAI;AAC5G,GAAG,2CAA2C,yCAAyC,CAAA,EAAG;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const index = require("../../../../@capacitor/core/dist/index.cjs");
|
4
|
+
const definitions = require("./definitions.cjs");
|
5
|
+
const BarcodeScanner = index.registerPlugin("BarcodeScanner", {
|
6
|
+
web: () => Promise.resolve().then(() => require("./web.cjs")).then((m) => new m.BarcodeScannerWeb())
|
7
|
+
});
|
8
|
+
Object.defineProperty(exports, "BarcodeFormat", {
|
9
|
+
enumerable: true,
|
10
|
+
get: () => definitions.BarcodeFormat
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "BarcodeValueType", {
|
13
|
+
enumerable: true,
|
14
|
+
get: () => definitions.BarcodeValueType
|
15
|
+
});
|
16
|
+
Object.defineProperty(exports, "GoogleBarcodeScannerModuleInstallState", {
|
17
|
+
enumerable: true,
|
18
|
+
get: () => definitions.GoogleBarcodeScannerModuleInstallState
|
19
|
+
});
|
20
|
+
Object.defineProperty(exports, "LensFacing", {
|
21
|
+
enumerable: true,
|
22
|
+
get: () => definitions.LensFacing
|
23
|
+
});
|
24
|
+
exports.BarcodeScanner = BarcodeScanner;
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BarcodeScanner = registerPlugin('BarcodeScanner', {\n web: () => import('./web').then(m => new m.BarcodeScannerWeb()),\n});\nexport * from './definitions';\nexport { BarcodeScanner };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;AACK,MAAC,iBAAiBA,MAAc,eAAC,kBAAkB;AAAA,EACpD,KAAK,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA,QAAA,WAAO,GAAE,KAAK,OAAK,IAAI,EAAE,mBAAmB;AAClE,CAAC;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { registerPlugin } from "../../../../@capacitor/core/dist/index.js";
|
2
|
+
import { BarcodeFormat, BarcodeValueType, GoogleBarcodeScannerModuleInstallState, LensFacing } from "./definitions.js";
|
3
|
+
const BarcodeScanner = registerPlugin("BarcodeScanner", {
|
4
|
+
web: () => import("./web.js").then((m) => new m.BarcodeScannerWeb())
|
5
|
+
});
|
6
|
+
export {
|
7
|
+
BarcodeFormat,
|
8
|
+
BarcodeScanner,
|
9
|
+
BarcodeValueType,
|
10
|
+
GoogleBarcodeScannerModuleInstallState,
|
11
|
+
LensFacing
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BarcodeScanner = registerPlugin('BarcodeScanner', {\n web: () => import('./web').then(m => new m.BarcodeScannerWeb()),\n});\nexport * from './definitions';\nexport { BarcodeScanner };\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;AACK,MAAC,iBAAiB,eAAe,kBAAkB;AAAA,EACpD,KAAK,MAAM,OAAO,UAAO,EAAE,KAAK,OAAK,IAAI,EAAE,mBAAmB;AAClE,CAAC;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const index = require("../../../../@capacitor/core/dist/index.cjs");
|
4
|
+
class BarcodeScannerWeb extends index.WebPlugin {
|
5
|
+
async startScan(_options) {
|
6
|
+
throw this.createUnavailableException();
|
7
|
+
}
|
8
|
+
async stopScan() {
|
9
|
+
throw this.createUnavailableException();
|
10
|
+
}
|
11
|
+
async readBarcodesFromImage(_options) {
|
12
|
+
throw this.createUnavailableException();
|
13
|
+
}
|
14
|
+
async scan() {
|
15
|
+
throw this.createUnavailableException();
|
16
|
+
}
|
17
|
+
async isSupported() {
|
18
|
+
throw this.createUnavailableException();
|
19
|
+
}
|
20
|
+
async enableTorch() {
|
21
|
+
throw this.createUnavailableException();
|
22
|
+
}
|
23
|
+
async disableTorch() {
|
24
|
+
throw this.createUnavailableException();
|
25
|
+
}
|
26
|
+
async toggleTorch() {
|
27
|
+
throw this.createUnavailableException();
|
28
|
+
}
|
29
|
+
async isTorchEnabled() {
|
30
|
+
throw this.createUnavailableException();
|
31
|
+
}
|
32
|
+
async isTorchAvailable() {
|
33
|
+
throw this.createUnavailableException();
|
34
|
+
}
|
35
|
+
async setZoomRatio(_options) {
|
36
|
+
throw this.createUnavailableException();
|
37
|
+
}
|
38
|
+
async getZoomRatio() {
|
39
|
+
throw this.createUnavailableException();
|
40
|
+
}
|
41
|
+
async getMinZoomRatio() {
|
42
|
+
throw this.createUnavailableException();
|
43
|
+
}
|
44
|
+
async getMaxZoomRatio() {
|
45
|
+
throw this.createUnavailableException();
|
46
|
+
}
|
47
|
+
async openSettings() {
|
48
|
+
throw this.createUnavailableException();
|
49
|
+
}
|
50
|
+
async isGoogleBarcodeScannerModuleAvailable() {
|
51
|
+
throw this.createUnavailableException();
|
52
|
+
}
|
53
|
+
async installGoogleBarcodeScannerModule() {
|
54
|
+
throw this.createUnavailableException();
|
55
|
+
}
|
56
|
+
async checkPermissions() {
|
57
|
+
throw this.createUnavailableException();
|
58
|
+
}
|
59
|
+
async requestPermissions() {
|
60
|
+
throw this.createUnavailableException();
|
61
|
+
}
|
62
|
+
createUnavailableException() {
|
63
|
+
return new index.CapacitorException("This Barcode Scanner plugin method is not available on this platform.", index.ExceptionCode.Unavailable);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
exports.BarcodeScannerWeb = BarcodeScannerWeb;
|
67
|
+
//# sourceMappingURL=web.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"web.cjs","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js"],"sourcesContent":["import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class BarcodeScannerWeb extends WebPlugin {\n async startScan(_options) {\n throw this.createUnavailableException();\n }\n async stopScan() {\n throw this.createUnavailableException();\n }\n async readBarcodesFromImage(_options) {\n throw this.createUnavailableException();\n }\n async scan() {\n throw this.createUnavailableException();\n }\n async isSupported() {\n throw this.createUnavailableException();\n }\n async enableTorch() {\n throw this.createUnavailableException();\n }\n async disableTorch() {\n throw this.createUnavailableException();\n }\n async toggleTorch() {\n throw this.createUnavailableException();\n }\n async isTorchEnabled() {\n throw this.createUnavailableException();\n }\n async isTorchAvailable() {\n throw this.createUnavailableException();\n }\n async setZoomRatio(_options) {\n throw this.createUnavailableException();\n }\n async getZoomRatio() {\n throw this.createUnavailableException();\n }\n async getMinZoomRatio() {\n throw this.createUnavailableException();\n }\n async getMaxZoomRatio() {\n throw this.createUnavailableException();\n }\n async openSettings() {\n throw this.createUnavailableException();\n }\n async isGoogleBarcodeScannerModuleAvailable() {\n throw this.createUnavailableException();\n }\n async installGoogleBarcodeScannerModule() {\n throw this.createUnavailableException();\n }\n async checkPermissions() {\n throw this.createUnavailableException();\n }\n async requestPermissions() {\n throw this.createUnavailableException();\n }\n createUnavailableException() {\n return new CapacitorException('This Barcode Scanner plugin method is not available on this platform.', ExceptionCode.Unavailable);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;AACO,MAAM,0BAA0BA,MAAAA,UAAU;AAAA,EAC7C,MAAM,UAAU,UAAU;AACtB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,WAAW;AACb,UAAM,KAAK;EACd;AAAA,EACD,MAAM,sBAAsB,UAAU;AAClC,UAAM,KAAK;EACd;AAAA,EACD,MAAM,OAAO;AACT,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,iBAAiB;AACnB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,mBAAmB;AACrB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,aAAa,UAAU;AACzB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,kBAAkB;AACpB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,kBAAkB;AACpB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,wCAAwC;AAC1C,UAAM,KAAK;EACd;AAAA,EACD,MAAM,oCAAoC;AACtC,UAAM,KAAK;EACd;AAAA,EACD,MAAM,mBAAmB;AACrB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,qBAAqB;AACvB,UAAM,KAAK;EACd;AAAA,EACD,6BAA6B;AACzB,WAAO,IAAIC,MAAAA,mBAAmB,yEAAyEC,MAAa,cAAC,WAAW;AAAA,EACnI;AACL;;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import { WebPlugin, CapacitorException, ExceptionCode } from "../../../../@capacitor/core/dist/index.js";
|
2
|
+
class BarcodeScannerWeb extends WebPlugin {
|
3
|
+
async startScan(_options) {
|
4
|
+
throw this.createUnavailableException();
|
5
|
+
}
|
6
|
+
async stopScan() {
|
7
|
+
throw this.createUnavailableException();
|
8
|
+
}
|
9
|
+
async readBarcodesFromImage(_options) {
|
10
|
+
throw this.createUnavailableException();
|
11
|
+
}
|
12
|
+
async scan() {
|
13
|
+
throw this.createUnavailableException();
|
14
|
+
}
|
15
|
+
async isSupported() {
|
16
|
+
throw this.createUnavailableException();
|
17
|
+
}
|
18
|
+
async enableTorch() {
|
19
|
+
throw this.createUnavailableException();
|
20
|
+
}
|
21
|
+
async disableTorch() {
|
22
|
+
throw this.createUnavailableException();
|
23
|
+
}
|
24
|
+
async toggleTorch() {
|
25
|
+
throw this.createUnavailableException();
|
26
|
+
}
|
27
|
+
async isTorchEnabled() {
|
28
|
+
throw this.createUnavailableException();
|
29
|
+
}
|
30
|
+
async isTorchAvailable() {
|
31
|
+
throw this.createUnavailableException();
|
32
|
+
}
|
33
|
+
async setZoomRatio(_options) {
|
34
|
+
throw this.createUnavailableException();
|
35
|
+
}
|
36
|
+
async getZoomRatio() {
|
37
|
+
throw this.createUnavailableException();
|
38
|
+
}
|
39
|
+
async getMinZoomRatio() {
|
40
|
+
throw this.createUnavailableException();
|
41
|
+
}
|
42
|
+
async getMaxZoomRatio() {
|
43
|
+
throw this.createUnavailableException();
|
44
|
+
}
|
45
|
+
async openSettings() {
|
46
|
+
throw this.createUnavailableException();
|
47
|
+
}
|
48
|
+
async isGoogleBarcodeScannerModuleAvailable() {
|
49
|
+
throw this.createUnavailableException();
|
50
|
+
}
|
51
|
+
async installGoogleBarcodeScannerModule() {
|
52
|
+
throw this.createUnavailableException();
|
53
|
+
}
|
54
|
+
async checkPermissions() {
|
55
|
+
throw this.createUnavailableException();
|
56
|
+
}
|
57
|
+
async requestPermissions() {
|
58
|
+
throw this.createUnavailableException();
|
59
|
+
}
|
60
|
+
createUnavailableException() {
|
61
|
+
return new CapacitorException("This Barcode Scanner plugin method is not available on this platform.", ExceptionCode.Unavailable);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
export {
|
65
|
+
BarcodeScannerWeb
|
66
|
+
};
|
67
|
+
//# sourceMappingURL=web.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"web.js","sources":["../../../../../../../node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js"],"sourcesContent":["import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class BarcodeScannerWeb extends WebPlugin {\n async startScan(_options) {\n throw this.createUnavailableException();\n }\n async stopScan() {\n throw this.createUnavailableException();\n }\n async readBarcodesFromImage(_options) {\n throw this.createUnavailableException();\n }\n async scan() {\n throw this.createUnavailableException();\n }\n async isSupported() {\n throw this.createUnavailableException();\n }\n async enableTorch() {\n throw this.createUnavailableException();\n }\n async disableTorch() {\n throw this.createUnavailableException();\n }\n async toggleTorch() {\n throw this.createUnavailableException();\n }\n async isTorchEnabled() {\n throw this.createUnavailableException();\n }\n async isTorchAvailable() {\n throw this.createUnavailableException();\n }\n async setZoomRatio(_options) {\n throw this.createUnavailableException();\n }\n async getZoomRatio() {\n throw this.createUnavailableException();\n }\n async getMinZoomRatio() {\n throw this.createUnavailableException();\n }\n async getMaxZoomRatio() {\n throw this.createUnavailableException();\n }\n async openSettings() {\n throw this.createUnavailableException();\n }\n async isGoogleBarcodeScannerModuleAvailable() {\n throw this.createUnavailableException();\n }\n async installGoogleBarcodeScannerModule() {\n throw this.createUnavailableException();\n }\n async checkPermissions() {\n throw this.createUnavailableException();\n }\n async requestPermissions() {\n throw this.createUnavailableException();\n }\n createUnavailableException() {\n return new CapacitorException('This Barcode Scanner plugin method is not available on this platform.', ExceptionCode.Unavailable);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":[],"mappings":";AACO,MAAM,0BAA0B,UAAU;AAAA,EAC7C,MAAM,UAAU,UAAU;AACtB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,WAAW;AACb,UAAM,KAAK;EACd;AAAA,EACD,MAAM,sBAAsB,UAAU;AAClC,UAAM,KAAK;EACd;AAAA,EACD,MAAM,OAAO;AACT,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,cAAc;AAChB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,iBAAiB;AACnB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,mBAAmB;AACrB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,aAAa,UAAU;AACzB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,kBAAkB;AACpB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,kBAAkB;AACpB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,eAAe;AACjB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,wCAAwC;AAC1C,UAAM,KAAK;EACd;AAAA,EACD,MAAM,oCAAoC;AACtC,UAAM,KAAK;EACd;AAAA,EACD,MAAM,mBAAmB;AACrB,UAAM,KAAK;EACd;AAAA,EACD,MAAM,qBAAqB;AACvB,UAAM,KAAK;EACd;AAAA,EACD,6BAA6B;AACzB,WAAO,IAAI,mBAAmB,yEAAyE,cAAc,WAAW;AAAA,EACnI;AACL;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const SelfClosingTags = ["meta", "link", "base"];
|
4
|
+
const TagsWithInnerContent = ["title", "titleTemplate", "script", "style", "noscript"];
|
5
|
+
exports.SelfClosingTags = SelfClosingTags;
|
6
|
+
exports.TagsWithInnerContent = TagsWithInnerContent;
|
7
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@unhead/shared/dist/index.mjs"],"sourcesContent":["function asArray$1(value) {\n return Array.isArray(value) ? value : [value];\n}\n\nconst SelfClosingTags = [\"meta\", \"link\", \"base\"];\nconst TagsWithInnerContent = [\"title\", \"titleTemplate\", \"script\", \"style\", \"noscript\"];\nconst HasElementTags = [\n \"base\",\n \"meta\",\n \"link\",\n \"style\",\n \"script\",\n \"noscript\"\n];\nconst ValidHeadTags = [\n \"title\",\n \"titleTemplate\",\n \"templateParams\",\n \"base\",\n \"htmlAttrs\",\n \"bodyAttrs\",\n \"meta\",\n \"link\",\n \"style\",\n \"script\",\n \"noscript\"\n];\nconst UniqueTags = [\"base\", \"title\", \"titleTemplate\", \"bodyAttrs\", \"htmlAttrs\", \"templateParams\"];\nconst TagConfigKeys = [\"tagPosition\", \"tagPriority\", \"tagDuplicateStrategy\", \"children\", \"innerHTML\", \"textContent\", \"processTemplateParams\"];\nconst IsBrowser = typeof window !== \"undefined\";\nconst composableNames = [\n \"getActiveHead\",\n \"useHead\",\n \"useSeoMeta\",\n \"useHeadSafe\",\n \"useServerHead\",\n \"useServerSeoMeta\",\n \"useServerHeadSafe\"\n];\n\nfunction defineHeadPlugin(plugin) {\n return plugin;\n}\n\nfunction hashCode(s) {\n let h = 9;\n for (let i = 0; i < s.length; )\n h = Math.imul(h ^ s.charCodeAt(i++), 9 ** 9);\n return ((h ^ h >>> 9) + 65536).toString(16).substring(1, 8).toLowerCase();\n}\nfunction hashTag(tag) {\n return tag._h || hashCode(tag._d ? tag._d : `${tag.tag}:${tag.textContent || tag.innerHTML || \"\"}:${Object.entries(tag.props).map(([key, value]) => `${key}:${String(value)}`).join(\",\")}`);\n}\n\nfunction tagDedupeKey(tag, fn) {\n const { props, tag: tagName } = tag;\n if (UniqueTags.includes(tagName))\n return tagName;\n if (tagName === \"link\" && props.rel === \"canonical\")\n return \"canonical\";\n if (props.charset)\n return \"charset\";\n const name = [\"id\"];\n if (tagName === \"meta\")\n name.push(...[\"name\", \"property\", \"http-equiv\"]);\n for (const n of name) {\n if (typeof props[n] !== \"undefined\") {\n const val = String(props[n]);\n if (fn && !fn(val))\n return false;\n return `${tagName}:${n}:${val}`;\n }\n }\n return false;\n}\n\nfunction resolveTitleTemplate(template, title) {\n if (template == null)\n return title || null;\n if (typeof template === \"function\")\n return template(title);\n return template;\n}\n\nfunction asArray(input) {\n return Array.isArray(input) ? input : [input];\n}\nconst InternalKeySymbol = \"_$key\";\nfunction packObject(input, options) {\n const keys = Object.keys(input);\n let [k, v] = keys;\n options = options || {};\n options.key = options.key || k;\n options.value = options.value || v;\n options.resolveKey = options.resolveKey || ((k2) => k2);\n const resolveKey = (index) => {\n const arr = asArray(options[index]);\n return arr.find((k2) => {\n if (typeof k2 === \"string\" && k2.includes(\".\")) {\n return k2;\n }\n return k2 && keys.includes(k2);\n });\n };\n const resolveValue = (k2, input2) => {\n if (k2.includes(\".\")) {\n const paths = k2.split(\".\");\n let val = input2;\n for (const path of paths)\n val = val[path];\n return val;\n }\n return input2[k2];\n };\n k = resolveKey(\"key\") || k;\n v = resolveKey(\"value\") || v;\n const dedupeKeyPrefix = input.key ? `${InternalKeySymbol}${input.key}-` : \"\";\n let keyValue = resolveValue(k, input);\n keyValue = options.resolveKey(keyValue);\n return {\n [`${dedupeKeyPrefix}${keyValue}`]: resolveValue(v, input)\n };\n}\n\nfunction packArray(input, options) {\n const packed = {};\n for (const i of input) {\n const packedObj = packObject(i, options);\n const pKey = Object.keys(packedObj)[0];\n const isDedupeKey = pKey.startsWith(InternalKeySymbol);\n if (!isDedupeKey && packed[pKey]) {\n packed[pKey] = Array.isArray(packed[pKey]) ? packed[pKey] : [packed[pKey]];\n packed[pKey].push(Object.values(packedObj)[0]);\n } else {\n packed[isDedupeKey ? pKey.split(\"-\").slice(1).join(\"-\") || pKey : pKey] = packedObj[pKey];\n }\n }\n return packed;\n}\n\nfunction unpackToArray(input, options) {\n const unpacked = [];\n const kFn = options.resolveKeyData || ((ctx) => ctx.key);\n const vFn = options.resolveValueData || ((ctx) => ctx.value);\n for (const [k, v] of Object.entries(input)) {\n unpacked.push(...(Array.isArray(v) ? v : [v]).map((i) => {\n const ctx = { key: k, value: i };\n const val = vFn(ctx);\n if (typeof val === \"object\")\n return unpackToArray(val, options);\n if (Array.isArray(val))\n return val;\n return {\n [typeof options.key === \"function\" ? options.key(ctx) : options.key]: kFn(ctx),\n [typeof options.value === \"function\" ? options.value(ctx) : options.value]: val\n };\n }).flat());\n }\n return unpacked;\n}\n\nfunction unpackToString(value, options) {\n return Object.entries(value).map(([key, value2]) => {\n if (typeof value2 === \"object\")\n value2 = unpackToString(value2, options);\n if (options.resolve) {\n const resolved = options.resolve({ key, value: value2 });\n if (typeof resolved !== \"undefined\")\n return resolved;\n }\n if (typeof value2 === \"number\")\n value2 = value2.toString();\n if (typeof value2 === \"string\" && options.wrapValue) {\n value2 = value2.replace(new RegExp(options.wrapValue, \"g\"), `\\\\${options.wrapValue}`);\n value2 = `${options.wrapValue}${value2}${options.wrapValue}`;\n }\n return `${key}${options.keyValueSeparator || \"\"}${value2}`;\n }).join(options.entrySeparator || \"\");\n}\n\nconst p = (p2) => ({ keyValue: p2, metaKey: \"property\" });\nconst k = (p2) => ({ keyValue: p2 });\nconst MetaPackingSchema = {\n appleItunesApp: {\n unpack: {\n entrySeparator: \", \",\n resolve({ key, value }) {\n return `${fixKeyCase(key)}=${value}`;\n }\n }\n },\n articleExpirationTime: p(\"article:expiration_time\"),\n articleModifiedTime: p(\"article:modified_time\"),\n articlePublishedTime: p(\"article:published_time\"),\n bookReleaseDate: p(\"book:release_date\"),\n charset: {\n metaKey: \"charset\"\n },\n contentSecurityPolicy: {\n unpack: {\n entrySeparator: \"; \",\n resolve({ key, value }) {\n return `${fixKeyCase(key)} ${value}`;\n }\n },\n metaKey: \"http-equiv\"\n },\n contentType: {\n metaKey: \"http-equiv\"\n },\n defaultStyle: {\n metaKey: \"http-equiv\"\n },\n fbAppId: p(\"fb:app_id\"),\n msapplicationConfig: k(\"msapplication-Config\"),\n msapplicationTileColor: k(\"msapplication-TileColor\"),\n msapplicationTileImage: k(\"msapplication-TileImage\"),\n ogAudioSecureUrl: p(\"og:audio:secure_url\"),\n ogAudioUrl: p(\"og:audio\"),\n ogImageSecureUrl: p(\"og:image:secure_url\"),\n ogImageUrl: p(\"og:image\"),\n ogSiteName: p(\"og:site_name\"),\n ogVideoSecureUrl: p(\"og:video:secure_url\"),\n ogVideoUrl: p(\"og:video\"),\n profileFirstName: p(\"profile:first_name\"),\n profileLastName: p(\"profile:last_name\"),\n profileUsername: p(\"profile:username\"),\n refresh: {\n metaKey: \"http-equiv\",\n unpack: {\n entrySeparator: \";\",\n resolve({ key, value }) {\n if (key === \"seconds\")\n return `${value}`;\n }\n }\n },\n robots: {\n unpack: {\n entrySeparator: \", \",\n resolve({ key, value }) {\n if (typeof value === \"boolean\")\n return `${fixKeyCase(key)}`;\n else\n return `${fixKeyCase(key)}:${value}`;\n }\n }\n },\n xUaCompatible: {\n metaKey: \"http-equiv\"\n }\n};\nconst openGraphNamespaces = [\n \"og\",\n \"book\",\n \"article\",\n \"profile\"\n];\nfunction resolveMetaKeyType(key) {\n const fKey = fixKeyCase(key).split(\":\")[0];\n if (openGraphNamespaces.includes(fKey))\n return \"property\";\n return MetaPackingSchema[key]?.metaKey || \"name\";\n}\nfunction resolveMetaKeyValue(key) {\n return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);\n}\nfunction fixKeyCase(key) {\n const updated = key.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n const fKey = updated.split(\"-\")[0];\n if (openGraphNamespaces.includes(fKey) || fKey === \"twitter\")\n return key.replace(/([A-Z])/g, \":$1\").toLowerCase();\n return updated;\n}\nfunction changeKeyCasingDeep(input) {\n if (Array.isArray(input)) {\n return input.map((entry) => changeKeyCasingDeep(entry));\n }\n if (typeof input !== \"object\" || Array.isArray(input))\n return input;\n const output = {};\n for (const [key, value] of Object.entries(input))\n output[fixKeyCase(key)] = changeKeyCasingDeep(value);\n return output;\n}\nfunction resolvePackedMetaObjectValue(value, key) {\n const definition = MetaPackingSchema[key];\n if (key === \"refresh\")\n return `${value.seconds};url=${value.url}`;\n return unpackToString(\n changeKeyCasingDeep(value),\n {\n keyValueSeparator: \"=\",\n entrySeparator: \", \",\n resolve({ value: value2, key: key2 }) {\n if (value2 === null)\n return \"\";\n if (typeof value2 === \"boolean\")\n return `${key2}`;\n },\n ...definition?.unpack\n }\n );\n}\nconst ObjectArrayEntries = [\"og:image\", \"og:video\", \"og:audio\", \"twitter:image\"];\nfunction sanitize(input) {\n const out = {};\n Object.entries(input).forEach(([k2, v]) => {\n if (String(v) !== \"false\" && k2)\n out[k2] = v;\n });\n return out;\n}\nfunction handleObjectEntry(key, v) {\n const value = sanitize(v);\n const fKey = fixKeyCase(key);\n const attr = resolveMetaKeyType(fKey);\n if (ObjectArrayEntries.includes(fKey)) {\n const input = {};\n Object.entries(value).forEach(([k2, v2]) => {\n input[`${key}${k2 === \"url\" ? \"\" : `${k2.charAt(0).toUpperCase()}${k2.slice(1)}`}`] = v2;\n });\n return unpackMeta(input).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));\n }\n return [{ [attr]: fKey, ...value }];\n}\nfunction unpackMeta(input) {\n const extras = [];\n const primitives = {};\n Object.entries(input).forEach(([key, value]) => {\n if (!Array.isArray(value)) {\n if (typeof value === \"object\" && value) {\n if (ObjectArrayEntries.includes(fixKeyCase(key))) {\n extras.push(...handleObjectEntry(key, value));\n return;\n }\n primitives[key] = sanitize(value);\n } else {\n primitives[key] = value;\n }\n return;\n }\n value.forEach((v) => {\n extras.push(...typeof v === \"string\" ? unpackMeta({ [key]: v }) : handleObjectEntry(key, v));\n });\n });\n const meta = unpackToArray(primitives, {\n key({ key }) {\n return resolveMetaKeyType(key);\n },\n value({ key }) {\n return key === \"charset\" ? \"charset\" : \"content\";\n },\n resolveKeyData({ key }) {\n return resolveMetaKeyValue(key);\n },\n resolveValueData({ value, key }) {\n if (value === null)\n return \"_null\";\n if (typeof value === \"object\")\n return resolvePackedMetaObjectValue(value, key);\n return typeof value === \"number\" ? value.toString() : value;\n }\n });\n return [...extras, ...meta].map((m) => {\n if (m.content === \"_null\")\n m.content = null;\n return m;\n });\n}\nfunction packMeta(inputs) {\n const mappedPackingSchema = Object.entries(MetaPackingSchema).map(([key, value]) => [key, value.keyValue]);\n return packArray(inputs, {\n key: [\"name\", \"property\", \"httpEquiv\", \"http-equiv\", \"charset\"],\n value: [\"content\", \"charset\"],\n resolveKey(k2) {\n let key = mappedPackingSchema.filter((sk) => sk[1] === k2)?.[0]?.[0] || k2;\n const replacer = (_, letter) => letter?.toUpperCase();\n key = key.replace(/:([a-z])/g, replacer).replace(/-([a-z])/g, replacer);\n return key;\n }\n });\n}\n\nconst WhitelistAttributes = {\n htmlAttrs: [\"id\", \"class\", \"lang\", \"dir\"],\n bodyAttrs: [\"id\", \"class\"],\n meta: [\"id\", \"name\", \"property\", \"charset\", \"content\"],\n noscript: [\"id\", \"textContent\"],\n script: [\"id\", \"type\", \"textContent\"],\n link: [\"id\", \"color\", \"crossorigin\", \"fetchpriority\", \"href\", \"hreflang\", \"imagesrcset\", \"imagesizes\", \"integrity\", \"media\", \"referrerpolicy\", \"rel\", \"sizes\", \"type\"]\n};\nfunction acceptDataAttrs(value) {\n const filtered = {};\n Object.keys(value || {}).filter((a) => a.startsWith(\"data-\")).forEach((a) => {\n filtered[a] = value[a];\n });\n return filtered;\n}\nfunction whitelistSafeInput(input) {\n const filtered = {};\n Object.keys(input).forEach((key) => {\n const tagValue = input[key];\n if (!tagValue)\n return;\n switch (key) {\n case \"title\":\n case \"titleTemplate\":\n case \"templateParams\":\n filtered[key] = tagValue;\n break;\n case \"htmlAttrs\":\n case \"bodyAttrs\":\n filtered[key] = acceptDataAttrs(tagValue);\n WhitelistAttributes[key].forEach((a) => {\n if (tagValue[a])\n filtered[key][a] = tagValue[a];\n });\n break;\n case \"meta\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const safeMeta = acceptDataAttrs(meta);\n WhitelistAttributes.meta.forEach((key2) => {\n if (meta[key2])\n safeMeta[key2] = meta[key2];\n });\n return safeMeta;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n case \"link\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const link = acceptDataAttrs(meta);\n WhitelistAttributes.link.forEach((key2) => {\n const val = meta[key2];\n if (key2 === \"rel\" && [\"stylesheet\", \"canonical\", \"modulepreload\", \"prerender\", \"preload\", \"prefetch\"].includes(val))\n return;\n if (key2 === \"href\") {\n if (val.includes(\"javascript:\") || val.includes(\"data:\"))\n return;\n link[key2] = val;\n } else if (val) {\n link[key2] = val;\n }\n });\n return link;\n }).filter((link) => Object.keys(link).length > 1 && !!link.rel);\n }\n break;\n case \"noscript\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const noscript = acceptDataAttrs(meta);\n WhitelistAttributes.noscript.forEach((key2) => {\n if (meta[key2])\n noscript[key2] = meta[key2];\n });\n return noscript;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n case \"script\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((script) => {\n const safeScript = acceptDataAttrs(script);\n WhitelistAttributes.script.forEach((s) => {\n if (script[s]) {\n if (s === \"textContent\") {\n try {\n const jsonVal = typeof script[s] === \"string\" ? JSON.parse(script[s]) : script[s];\n safeScript[s] = JSON.stringify(jsonVal, null, 0);\n } catch (e) {\n }\n } else {\n safeScript[s] = script[s];\n }\n }\n });\n return safeScript;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n }\n });\n return filtered;\n}\n\nasync function normaliseTag(tagName, input, e) {\n const tag = {\n tag: tagName,\n props: await normaliseProps(\n // explicitly check for an object\n // @ts-expect-error untyped\n typeof input === \"object\" && typeof input !== \"function\" && !(input instanceof Promise) ? { ...input } : { [[\"script\", \"noscript\", \"style\"].includes(tagName) ? \"innerHTML\" : \"textContent\"]: input },\n [\"templateParams\", \"titleTemplate\"].includes(tagName)\n )\n };\n TagConfigKeys.forEach((k) => {\n const val = typeof tag.props[k] !== \"undefined\" ? tag.props[k] : e[k];\n if (typeof val !== \"undefined\") {\n if (![\"innerHTML\", \"textContent\", \"children\"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {\n tag[k === \"children\" ? \"innerHTML\" : k] = val;\n }\n delete tag.props[k];\n }\n });\n if (tag.props.body) {\n tag.tagPosition = \"bodyClose\";\n delete tag.props.body;\n }\n if (tag.tag === \"script\") {\n if (typeof tag.innerHTML === \"object\") {\n tag.innerHTML = JSON.stringify(tag.innerHTML);\n tag.props.type = tag.props.type || \"application/json\";\n }\n }\n return Array.isArray(tag.props.content) ? tag.props.content.map((v) => ({ ...tag, props: { ...tag.props, content: v } })) : tag;\n}\nfunction normaliseStyleClassProps(key, v) {\n const sep = key === \"class\" ? \" \" : \";\";\n if (typeof v === \"object\" && !Array.isArray(v)) {\n v = Object.entries(v).filter(([, v2]) => v2).map(([k, v2]) => key === \"style\" ? `${k}:${v2}` : k);\n }\n return String(Array.isArray(v) ? v.join(sep) : v)?.split(sep).filter((c) => c.trim()).filter(Boolean).join(sep);\n}\nasync function normaliseProps(props, virtual) {\n for (const k of Object.keys(props)) {\n if ([\"class\", \"style\"].includes(k)) {\n props[k] = normaliseStyleClassProps(k, props[k]);\n continue;\n }\n if (props[k] instanceof Promise)\n props[k] = await props[k];\n if (!virtual && !TagConfigKeys.includes(k)) {\n const v = String(props[k]);\n const isDataKey = k.startsWith(\"data-\");\n if (v === \"true\" || v === \"\") {\n props[k] = isDataKey ? \"true\" : true;\n } else if (!props[k]) {\n if (isDataKey && v === \"false\")\n props[k] = \"false\";\n else\n delete props[k];\n }\n }\n }\n return props;\n}\nconst TagEntityBits = 10;\nasync function normaliseEntryTags(e) {\n const tagPromises = [];\n Object.entries(e.resolvedInput).filter(([k, v]) => typeof v !== \"undefined\" && ValidHeadTags.includes(k)).forEach(([k, value]) => {\n const v = asArray$1(value);\n tagPromises.push(...v.map((props) => normaliseTag(k, props, e)).flat());\n });\n return (await Promise.all(tagPromises)).flat().filter(Boolean).map((t, i) => {\n t._e = e._i;\n e.mode && (t._m = e.mode);\n t._p = (e._i << TagEntityBits) + i;\n return t;\n });\n}\n\nconst TAG_WEIGHTS = {\n // tags\n base: -10,\n title: 10\n};\nconst TAG_ALIASES = {\n // relative scores to their default values\n critical: -80,\n high: -10,\n low: 20\n};\nfunction tagWeight(tag) {\n let weight = 100;\n const priority = tag.tagPriority;\n if (typeof priority === \"number\")\n return priority;\n if (tag.tag === \"meta\") {\n if (tag.props[\"http-equiv\"] === \"content-security-policy\")\n weight = -30;\n if (tag.props.charset)\n weight = -20;\n if (tag.props.name === \"viewport\")\n weight = -15;\n } else if (tag.tag === \"link\" && tag.props.rel === \"preconnect\") {\n weight = 20;\n } else if (tag.tag in TAG_WEIGHTS) {\n weight = TAG_WEIGHTS[tag.tag];\n }\n if (typeof priority === \"string\" && priority in TAG_ALIASES) {\n return weight + TAG_ALIASES[priority];\n }\n return weight;\n}\nconst SortModifiers = [{ prefix: \"before:\", offset: -1 }, { prefix: \"after:\", offset: 1 }];\n\nconst NetworkEvents = [\"onload\", \"onerror\", \"onabort\", \"onprogress\", \"onloadstart\"];\nconst ScriptNetworkEvents = [\"onload\", \"onerror\"];\n\nconst sepSub = \"%separator\";\nfunction processTemplateParams(s, p, sep) {\n if (typeof s !== \"string\" || !s.includes(\"%\"))\n return s;\n function sub(token) {\n let val;\n if ([\"s\", \"pageTitle\"].includes(token)) {\n val = p.pageTitle;\n } else if (token.includes(\".\")) {\n val = token.split(\".\").reduce((acc, key) => acc ? acc[key] || void 0 : void 0, p);\n } else {\n val = p[token];\n }\n return typeof val !== \"undefined\" ? (val || \"\").replace(/\"/g, '\\\\\"') : false;\n }\n let decoded = s;\n try {\n decoded = decodeURI(s);\n } catch {\n }\n const tokens = (decoded.match(/%(\\w+\\.+\\w+)|%(\\w+)/g) || []).sort().reverse();\n tokens.forEach((token) => {\n const re = sub(token.slice(1));\n if (typeof re === \"string\") {\n s = s.replace(new RegExp(`\\\\${token}(\\\\W|$)`, \"g\"), (_, args) => `${re}${args}`).trim();\n }\n });\n if (s.includes(sepSub)) {\n if (s.endsWith(sepSub))\n s = s.slice(0, -sepSub.length).trim();\n if (s.startsWith(sepSub))\n s = s.slice(sepSub.length).trim();\n s = s.replace(new RegExp(`\\\\${sepSub}\\\\s*\\\\${sepSub}`, \"g\"), sepSub);\n s = processTemplateParams(s, { separator: sep }, sep);\n }\n return s;\n}\n\nexport { HasElementTags, IsBrowser, NetworkEvents, ScriptNetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray$1 as asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseEntryTags, normaliseProps, normaliseStyleClassProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };\n"],"names":[],"mappings":";;AAIK,MAAC,kBAAkB,CAAC,QAAQ,QAAQ,MAAM;AAC1C,MAAC,uBAAuB,CAAC,SAAS,iBAAiB,UAAU,SAAS,UAAU;;;","x_google_ignoreList":[0]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@unhead/shared/dist/index.mjs"],"sourcesContent":["function asArray$1(value) {\n return Array.isArray(value) ? value : [value];\n}\n\nconst SelfClosingTags = [\"meta\", \"link\", \"base\"];\nconst TagsWithInnerContent = [\"title\", \"titleTemplate\", \"script\", \"style\", \"noscript\"];\nconst HasElementTags = [\n \"base\",\n \"meta\",\n \"link\",\n \"style\",\n \"script\",\n \"noscript\"\n];\nconst ValidHeadTags = [\n \"title\",\n \"titleTemplate\",\n \"templateParams\",\n \"base\",\n \"htmlAttrs\",\n \"bodyAttrs\",\n \"meta\",\n \"link\",\n \"style\",\n \"script\",\n \"noscript\"\n];\nconst UniqueTags = [\"base\", \"title\", \"titleTemplate\", \"bodyAttrs\", \"htmlAttrs\", \"templateParams\"];\nconst TagConfigKeys = [\"tagPosition\", \"tagPriority\", \"tagDuplicateStrategy\", \"children\", \"innerHTML\", \"textContent\", \"processTemplateParams\"];\nconst IsBrowser = typeof window !== \"undefined\";\nconst composableNames = [\n \"getActiveHead\",\n \"useHead\",\n \"useSeoMeta\",\n \"useHeadSafe\",\n \"useServerHead\",\n \"useServerSeoMeta\",\n \"useServerHeadSafe\"\n];\n\nfunction defineHeadPlugin(plugin) {\n return plugin;\n}\n\nfunction hashCode(s) {\n let h = 9;\n for (let i = 0; i < s.length; )\n h = Math.imul(h ^ s.charCodeAt(i++), 9 ** 9);\n return ((h ^ h >>> 9) + 65536).toString(16).substring(1, 8).toLowerCase();\n}\nfunction hashTag(tag) {\n return tag._h || hashCode(tag._d ? tag._d : `${tag.tag}:${tag.textContent || tag.innerHTML || \"\"}:${Object.entries(tag.props).map(([key, value]) => `${key}:${String(value)}`).join(\",\")}`);\n}\n\nfunction tagDedupeKey(tag, fn) {\n const { props, tag: tagName } = tag;\n if (UniqueTags.includes(tagName))\n return tagName;\n if (tagName === \"link\" && props.rel === \"canonical\")\n return \"canonical\";\n if (props.charset)\n return \"charset\";\n const name = [\"id\"];\n if (tagName === \"meta\")\n name.push(...[\"name\", \"property\", \"http-equiv\"]);\n for (const n of name) {\n if (typeof props[n] !== \"undefined\") {\n const val = String(props[n]);\n if (fn && !fn(val))\n return false;\n return `${tagName}:${n}:${val}`;\n }\n }\n return false;\n}\n\nfunction resolveTitleTemplate(template, title) {\n if (template == null)\n return title || null;\n if (typeof template === \"function\")\n return template(title);\n return template;\n}\n\nfunction asArray(input) {\n return Array.isArray(input) ? input : [input];\n}\nconst InternalKeySymbol = \"_$key\";\nfunction packObject(input, options) {\n const keys = Object.keys(input);\n let [k, v] = keys;\n options = options || {};\n options.key = options.key || k;\n options.value = options.value || v;\n options.resolveKey = options.resolveKey || ((k2) => k2);\n const resolveKey = (index) => {\n const arr = asArray(options[index]);\n return arr.find((k2) => {\n if (typeof k2 === \"string\" && k2.includes(\".\")) {\n return k2;\n }\n return k2 && keys.includes(k2);\n });\n };\n const resolveValue = (k2, input2) => {\n if (k2.includes(\".\")) {\n const paths = k2.split(\".\");\n let val = input2;\n for (const path of paths)\n val = val[path];\n return val;\n }\n return input2[k2];\n };\n k = resolveKey(\"key\") || k;\n v = resolveKey(\"value\") || v;\n const dedupeKeyPrefix = input.key ? `${InternalKeySymbol}${input.key}-` : \"\";\n let keyValue = resolveValue(k, input);\n keyValue = options.resolveKey(keyValue);\n return {\n [`${dedupeKeyPrefix}${keyValue}`]: resolveValue(v, input)\n };\n}\n\nfunction packArray(input, options) {\n const packed = {};\n for (const i of input) {\n const packedObj = packObject(i, options);\n const pKey = Object.keys(packedObj)[0];\n const isDedupeKey = pKey.startsWith(InternalKeySymbol);\n if (!isDedupeKey && packed[pKey]) {\n packed[pKey] = Array.isArray(packed[pKey]) ? packed[pKey] : [packed[pKey]];\n packed[pKey].push(Object.values(packedObj)[0]);\n } else {\n packed[isDedupeKey ? pKey.split(\"-\").slice(1).join(\"-\") || pKey : pKey] = packedObj[pKey];\n }\n }\n return packed;\n}\n\nfunction unpackToArray(input, options) {\n const unpacked = [];\n const kFn = options.resolveKeyData || ((ctx) => ctx.key);\n const vFn = options.resolveValueData || ((ctx) => ctx.value);\n for (const [k, v] of Object.entries(input)) {\n unpacked.push(...(Array.isArray(v) ? v : [v]).map((i) => {\n const ctx = { key: k, value: i };\n const val = vFn(ctx);\n if (typeof val === \"object\")\n return unpackToArray(val, options);\n if (Array.isArray(val))\n return val;\n return {\n [typeof options.key === \"function\" ? options.key(ctx) : options.key]: kFn(ctx),\n [typeof options.value === \"function\" ? options.value(ctx) : options.value]: val\n };\n }).flat());\n }\n return unpacked;\n}\n\nfunction unpackToString(value, options) {\n return Object.entries(value).map(([key, value2]) => {\n if (typeof value2 === \"object\")\n value2 = unpackToString(value2, options);\n if (options.resolve) {\n const resolved = options.resolve({ key, value: value2 });\n if (typeof resolved !== \"undefined\")\n return resolved;\n }\n if (typeof value2 === \"number\")\n value2 = value2.toString();\n if (typeof value2 === \"string\" && options.wrapValue) {\n value2 = value2.replace(new RegExp(options.wrapValue, \"g\"), `\\\\${options.wrapValue}`);\n value2 = `${options.wrapValue}${value2}${options.wrapValue}`;\n }\n return `${key}${options.keyValueSeparator || \"\"}${value2}`;\n }).join(options.entrySeparator || \"\");\n}\n\nconst p = (p2) => ({ keyValue: p2, metaKey: \"property\" });\nconst k = (p2) => ({ keyValue: p2 });\nconst MetaPackingSchema = {\n appleItunesApp: {\n unpack: {\n entrySeparator: \", \",\n resolve({ key, value }) {\n return `${fixKeyCase(key)}=${value}`;\n }\n }\n },\n articleExpirationTime: p(\"article:expiration_time\"),\n articleModifiedTime: p(\"article:modified_time\"),\n articlePublishedTime: p(\"article:published_time\"),\n bookReleaseDate: p(\"book:release_date\"),\n charset: {\n metaKey: \"charset\"\n },\n contentSecurityPolicy: {\n unpack: {\n entrySeparator: \"; \",\n resolve({ key, value }) {\n return `${fixKeyCase(key)} ${value}`;\n }\n },\n metaKey: \"http-equiv\"\n },\n contentType: {\n metaKey: \"http-equiv\"\n },\n defaultStyle: {\n metaKey: \"http-equiv\"\n },\n fbAppId: p(\"fb:app_id\"),\n msapplicationConfig: k(\"msapplication-Config\"),\n msapplicationTileColor: k(\"msapplication-TileColor\"),\n msapplicationTileImage: k(\"msapplication-TileImage\"),\n ogAudioSecureUrl: p(\"og:audio:secure_url\"),\n ogAudioUrl: p(\"og:audio\"),\n ogImageSecureUrl: p(\"og:image:secure_url\"),\n ogImageUrl: p(\"og:image\"),\n ogSiteName: p(\"og:site_name\"),\n ogVideoSecureUrl: p(\"og:video:secure_url\"),\n ogVideoUrl: p(\"og:video\"),\n profileFirstName: p(\"profile:first_name\"),\n profileLastName: p(\"profile:last_name\"),\n profileUsername: p(\"profile:username\"),\n refresh: {\n metaKey: \"http-equiv\",\n unpack: {\n entrySeparator: \";\",\n resolve({ key, value }) {\n if (key === \"seconds\")\n return `${value}`;\n }\n }\n },\n robots: {\n unpack: {\n entrySeparator: \", \",\n resolve({ key, value }) {\n if (typeof value === \"boolean\")\n return `${fixKeyCase(key)}`;\n else\n return `${fixKeyCase(key)}:${value}`;\n }\n }\n },\n xUaCompatible: {\n metaKey: \"http-equiv\"\n }\n};\nconst openGraphNamespaces = [\n \"og\",\n \"book\",\n \"article\",\n \"profile\"\n];\nfunction resolveMetaKeyType(key) {\n const fKey = fixKeyCase(key).split(\":\")[0];\n if (openGraphNamespaces.includes(fKey))\n return \"property\";\n return MetaPackingSchema[key]?.metaKey || \"name\";\n}\nfunction resolveMetaKeyValue(key) {\n return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);\n}\nfunction fixKeyCase(key) {\n const updated = key.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n const fKey = updated.split(\"-\")[0];\n if (openGraphNamespaces.includes(fKey) || fKey === \"twitter\")\n return key.replace(/([A-Z])/g, \":$1\").toLowerCase();\n return updated;\n}\nfunction changeKeyCasingDeep(input) {\n if (Array.isArray(input)) {\n return input.map((entry) => changeKeyCasingDeep(entry));\n }\n if (typeof input !== \"object\" || Array.isArray(input))\n return input;\n const output = {};\n for (const [key, value] of Object.entries(input))\n output[fixKeyCase(key)] = changeKeyCasingDeep(value);\n return output;\n}\nfunction resolvePackedMetaObjectValue(value, key) {\n const definition = MetaPackingSchema[key];\n if (key === \"refresh\")\n return `${value.seconds};url=${value.url}`;\n return unpackToString(\n changeKeyCasingDeep(value),\n {\n keyValueSeparator: \"=\",\n entrySeparator: \", \",\n resolve({ value: value2, key: key2 }) {\n if (value2 === null)\n return \"\";\n if (typeof value2 === \"boolean\")\n return `${key2}`;\n },\n ...definition?.unpack\n }\n );\n}\nconst ObjectArrayEntries = [\"og:image\", \"og:video\", \"og:audio\", \"twitter:image\"];\nfunction sanitize(input) {\n const out = {};\n Object.entries(input).forEach(([k2, v]) => {\n if (String(v) !== \"false\" && k2)\n out[k2] = v;\n });\n return out;\n}\nfunction handleObjectEntry(key, v) {\n const value = sanitize(v);\n const fKey = fixKeyCase(key);\n const attr = resolveMetaKeyType(fKey);\n if (ObjectArrayEntries.includes(fKey)) {\n const input = {};\n Object.entries(value).forEach(([k2, v2]) => {\n input[`${key}${k2 === \"url\" ? \"\" : `${k2.charAt(0).toUpperCase()}${k2.slice(1)}`}`] = v2;\n });\n return unpackMeta(input).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));\n }\n return [{ [attr]: fKey, ...value }];\n}\nfunction unpackMeta(input) {\n const extras = [];\n const primitives = {};\n Object.entries(input).forEach(([key, value]) => {\n if (!Array.isArray(value)) {\n if (typeof value === \"object\" && value) {\n if (ObjectArrayEntries.includes(fixKeyCase(key))) {\n extras.push(...handleObjectEntry(key, value));\n return;\n }\n primitives[key] = sanitize(value);\n } else {\n primitives[key] = value;\n }\n return;\n }\n value.forEach((v) => {\n extras.push(...typeof v === \"string\" ? unpackMeta({ [key]: v }) : handleObjectEntry(key, v));\n });\n });\n const meta = unpackToArray(primitives, {\n key({ key }) {\n return resolveMetaKeyType(key);\n },\n value({ key }) {\n return key === \"charset\" ? \"charset\" : \"content\";\n },\n resolveKeyData({ key }) {\n return resolveMetaKeyValue(key);\n },\n resolveValueData({ value, key }) {\n if (value === null)\n return \"_null\";\n if (typeof value === \"object\")\n return resolvePackedMetaObjectValue(value, key);\n return typeof value === \"number\" ? value.toString() : value;\n }\n });\n return [...extras, ...meta].map((m) => {\n if (m.content === \"_null\")\n m.content = null;\n return m;\n });\n}\nfunction packMeta(inputs) {\n const mappedPackingSchema = Object.entries(MetaPackingSchema).map(([key, value]) => [key, value.keyValue]);\n return packArray(inputs, {\n key: [\"name\", \"property\", \"httpEquiv\", \"http-equiv\", \"charset\"],\n value: [\"content\", \"charset\"],\n resolveKey(k2) {\n let key = mappedPackingSchema.filter((sk) => sk[1] === k2)?.[0]?.[0] || k2;\n const replacer = (_, letter) => letter?.toUpperCase();\n key = key.replace(/:([a-z])/g, replacer).replace(/-([a-z])/g, replacer);\n return key;\n }\n });\n}\n\nconst WhitelistAttributes = {\n htmlAttrs: [\"id\", \"class\", \"lang\", \"dir\"],\n bodyAttrs: [\"id\", \"class\"],\n meta: [\"id\", \"name\", \"property\", \"charset\", \"content\"],\n noscript: [\"id\", \"textContent\"],\n script: [\"id\", \"type\", \"textContent\"],\n link: [\"id\", \"color\", \"crossorigin\", \"fetchpriority\", \"href\", \"hreflang\", \"imagesrcset\", \"imagesizes\", \"integrity\", \"media\", \"referrerpolicy\", \"rel\", \"sizes\", \"type\"]\n};\nfunction acceptDataAttrs(value) {\n const filtered = {};\n Object.keys(value || {}).filter((a) => a.startsWith(\"data-\")).forEach((a) => {\n filtered[a] = value[a];\n });\n return filtered;\n}\nfunction whitelistSafeInput(input) {\n const filtered = {};\n Object.keys(input).forEach((key) => {\n const tagValue = input[key];\n if (!tagValue)\n return;\n switch (key) {\n case \"title\":\n case \"titleTemplate\":\n case \"templateParams\":\n filtered[key] = tagValue;\n break;\n case \"htmlAttrs\":\n case \"bodyAttrs\":\n filtered[key] = acceptDataAttrs(tagValue);\n WhitelistAttributes[key].forEach((a) => {\n if (tagValue[a])\n filtered[key][a] = tagValue[a];\n });\n break;\n case \"meta\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const safeMeta = acceptDataAttrs(meta);\n WhitelistAttributes.meta.forEach((key2) => {\n if (meta[key2])\n safeMeta[key2] = meta[key2];\n });\n return safeMeta;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n case \"link\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const link = acceptDataAttrs(meta);\n WhitelistAttributes.link.forEach((key2) => {\n const val = meta[key2];\n if (key2 === \"rel\" && [\"stylesheet\", \"canonical\", \"modulepreload\", \"prerender\", \"preload\", \"prefetch\"].includes(val))\n return;\n if (key2 === \"href\") {\n if (val.includes(\"javascript:\") || val.includes(\"data:\"))\n return;\n link[key2] = val;\n } else if (val) {\n link[key2] = val;\n }\n });\n return link;\n }).filter((link) => Object.keys(link).length > 1 && !!link.rel);\n }\n break;\n case \"noscript\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((meta) => {\n const noscript = acceptDataAttrs(meta);\n WhitelistAttributes.noscript.forEach((key2) => {\n if (meta[key2])\n noscript[key2] = meta[key2];\n });\n return noscript;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n case \"script\":\n if (Array.isArray(tagValue)) {\n filtered[key] = tagValue.map((script) => {\n const safeScript = acceptDataAttrs(script);\n WhitelistAttributes.script.forEach((s) => {\n if (script[s]) {\n if (s === \"textContent\") {\n try {\n const jsonVal = typeof script[s] === \"string\" ? JSON.parse(script[s]) : script[s];\n safeScript[s] = JSON.stringify(jsonVal, null, 0);\n } catch (e) {\n }\n } else {\n safeScript[s] = script[s];\n }\n }\n });\n return safeScript;\n }).filter((meta) => Object.keys(meta).length > 0);\n }\n break;\n }\n });\n return filtered;\n}\n\nasync function normaliseTag(tagName, input, e) {\n const tag = {\n tag: tagName,\n props: await normaliseProps(\n // explicitly check for an object\n // @ts-expect-error untyped\n typeof input === \"object\" && typeof input !== \"function\" && !(input instanceof Promise) ? { ...input } : { [[\"script\", \"noscript\", \"style\"].includes(tagName) ? \"innerHTML\" : \"textContent\"]: input },\n [\"templateParams\", \"titleTemplate\"].includes(tagName)\n )\n };\n TagConfigKeys.forEach((k) => {\n const val = typeof tag.props[k] !== \"undefined\" ? tag.props[k] : e[k];\n if (typeof val !== \"undefined\") {\n if (![\"innerHTML\", \"textContent\", \"children\"].includes(k) || TagsWithInnerContent.includes(tag.tag)) {\n tag[k === \"children\" ? \"innerHTML\" : k] = val;\n }\n delete tag.props[k];\n }\n });\n if (tag.props.body) {\n tag.tagPosition = \"bodyClose\";\n delete tag.props.body;\n }\n if (tag.tag === \"script\") {\n if (typeof tag.innerHTML === \"object\") {\n tag.innerHTML = JSON.stringify(tag.innerHTML);\n tag.props.type = tag.props.type || \"application/json\";\n }\n }\n return Array.isArray(tag.props.content) ? tag.props.content.map((v) => ({ ...tag, props: { ...tag.props, content: v } })) : tag;\n}\nfunction normaliseStyleClassProps(key, v) {\n const sep = key === \"class\" ? \" \" : \";\";\n if (typeof v === \"object\" && !Array.isArray(v)) {\n v = Object.entries(v).filter(([, v2]) => v2).map(([k, v2]) => key === \"style\" ? `${k}:${v2}` : k);\n }\n return String(Array.isArray(v) ? v.join(sep) : v)?.split(sep).filter((c) => c.trim()).filter(Boolean).join(sep);\n}\nasync function normaliseProps(props, virtual) {\n for (const k of Object.keys(props)) {\n if ([\"class\", \"style\"].includes(k)) {\n props[k] = normaliseStyleClassProps(k, props[k]);\n continue;\n }\n if (props[k] instanceof Promise)\n props[k] = await props[k];\n if (!virtual && !TagConfigKeys.includes(k)) {\n const v = String(props[k]);\n const isDataKey = k.startsWith(\"data-\");\n if (v === \"true\" || v === \"\") {\n props[k] = isDataKey ? \"true\" : true;\n } else if (!props[k]) {\n if (isDataKey && v === \"false\")\n props[k] = \"false\";\n else\n delete props[k];\n }\n }\n }\n return props;\n}\nconst TagEntityBits = 10;\nasync function normaliseEntryTags(e) {\n const tagPromises = [];\n Object.entries(e.resolvedInput).filter(([k, v]) => typeof v !== \"undefined\" && ValidHeadTags.includes(k)).forEach(([k, value]) => {\n const v = asArray$1(value);\n tagPromises.push(...v.map((props) => normaliseTag(k, props, e)).flat());\n });\n return (await Promise.all(tagPromises)).flat().filter(Boolean).map((t, i) => {\n t._e = e._i;\n e.mode && (t._m = e.mode);\n t._p = (e._i << TagEntityBits) + i;\n return t;\n });\n}\n\nconst TAG_WEIGHTS = {\n // tags\n base: -10,\n title: 10\n};\nconst TAG_ALIASES = {\n // relative scores to their default values\n critical: -80,\n high: -10,\n low: 20\n};\nfunction tagWeight(tag) {\n let weight = 100;\n const priority = tag.tagPriority;\n if (typeof priority === \"number\")\n return priority;\n if (tag.tag === \"meta\") {\n if (tag.props[\"http-equiv\"] === \"content-security-policy\")\n weight = -30;\n if (tag.props.charset)\n weight = -20;\n if (tag.props.name === \"viewport\")\n weight = -15;\n } else if (tag.tag === \"link\" && tag.props.rel === \"preconnect\") {\n weight = 20;\n } else if (tag.tag in TAG_WEIGHTS) {\n weight = TAG_WEIGHTS[tag.tag];\n }\n if (typeof priority === \"string\" && priority in TAG_ALIASES) {\n return weight + TAG_ALIASES[priority];\n }\n return weight;\n}\nconst SortModifiers = [{ prefix: \"before:\", offset: -1 }, { prefix: \"after:\", offset: 1 }];\n\nconst NetworkEvents = [\"onload\", \"onerror\", \"onabort\", \"onprogress\", \"onloadstart\"];\nconst ScriptNetworkEvents = [\"onload\", \"onerror\"];\n\nconst sepSub = \"%separator\";\nfunction processTemplateParams(s, p, sep) {\n if (typeof s !== \"string\" || !s.includes(\"%\"))\n return s;\n function sub(token) {\n let val;\n if ([\"s\", \"pageTitle\"].includes(token)) {\n val = p.pageTitle;\n } else if (token.includes(\".\")) {\n val = token.split(\".\").reduce((acc, key) => acc ? acc[key] || void 0 : void 0, p);\n } else {\n val = p[token];\n }\n return typeof val !== \"undefined\" ? (val || \"\").replace(/\"/g, '\\\\\"') : false;\n }\n let decoded = s;\n try {\n decoded = decodeURI(s);\n } catch {\n }\n const tokens = (decoded.match(/%(\\w+\\.+\\w+)|%(\\w+)/g) || []).sort().reverse();\n tokens.forEach((token) => {\n const re = sub(token.slice(1));\n if (typeof re === \"string\") {\n s = s.replace(new RegExp(`\\\\${token}(\\\\W|$)`, \"g\"), (_, args) => `${re}${args}`).trim();\n }\n });\n if (s.includes(sepSub)) {\n if (s.endsWith(sepSub))\n s = s.slice(0, -sepSub.length).trim();\n if (s.startsWith(sepSub))\n s = s.slice(sepSub.length).trim();\n s = s.replace(new RegExp(`\\\\${sepSub}\\\\s*\\\\${sepSub}`, \"g\"), sepSub);\n s = processTemplateParams(s, { separator: sep }, sep);\n }\n return s;\n}\n\nexport { HasElementTags, IsBrowser, NetworkEvents, ScriptNetworkEvents, SelfClosingTags, SortModifiers, TAG_ALIASES, TAG_WEIGHTS, TagConfigKeys, TagEntityBits, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray$1 as asArray, composableNames, defineHeadPlugin, hashCode, hashTag, normaliseEntryTags, normaliseProps, normaliseStyleClassProps, normaliseTag, packMeta, processTemplateParams, resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue, resolveTitleTemplate, tagDedupeKey, tagWeight, unpackMeta, whitelistSafeInput };\n"],"names":[],"mappings":"AAIK,MAAC,kBAAkB,CAAC,QAAQ,QAAQ,MAAM;AAC1C,MAAC,uBAAuB,CAAC,SAAS,iBAAiB,UAAU,SAAS,UAAU;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const index = require("../../shared/dist/index.cjs");
|
4
|
+
function encodeAttribute(value) {
|
5
|
+
return String(value).replace(/"/g, """);
|
6
|
+
}
|
7
|
+
function propsToString(props) {
|
8
|
+
const attrs = [];
|
9
|
+
for (const [key, value] of Object.entries(props)) {
|
10
|
+
if (value !== false && value !== null)
|
11
|
+
attrs.push(value === true ? key : `${key}="${encodeAttribute(value)}"`);
|
12
|
+
}
|
13
|
+
return `${attrs.length > 0 ? " " : ""}${attrs.join(" ")}`;
|
14
|
+
}
|
15
|
+
function escapeHtml(str) {
|
16
|
+
return str.replace(/[&<>"'/]/g, (char) => {
|
17
|
+
switch (char) {
|
18
|
+
case "&":
|
19
|
+
return "&";
|
20
|
+
case "<":
|
21
|
+
return "<";
|
22
|
+
case ">":
|
23
|
+
return ">";
|
24
|
+
case '"':
|
25
|
+
return """;
|
26
|
+
case "'":
|
27
|
+
return "'";
|
28
|
+
case "/":
|
29
|
+
return "/";
|
30
|
+
default:
|
31
|
+
return char;
|
32
|
+
}
|
33
|
+
});
|
34
|
+
}
|
35
|
+
function tagToString(tag) {
|
36
|
+
const attrs = propsToString(tag.props);
|
37
|
+
const openTag = `<${tag.tag}${attrs}>`;
|
38
|
+
if (!index.TagsWithInnerContent.includes(tag.tag))
|
39
|
+
return index.SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}</${tag.tag}>`;
|
40
|
+
let content = String(tag.innerHTML || "");
|
41
|
+
if (tag.textContent)
|
42
|
+
content = escapeHtml(String(tag.textContent));
|
43
|
+
return index.SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}${content}</${tag.tag}>`;
|
44
|
+
}
|
45
|
+
function ssrRenderTags(tags, options) {
|
46
|
+
const schema = { htmlAttrs: {}, bodyAttrs: {}, tags: { head: [], bodyClose: [], bodyOpen: [] } };
|
47
|
+
for (const tag of tags) {
|
48
|
+
if (tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs") {
|
49
|
+
schema[tag.tag] = { ...schema[tag.tag], ...tag.props };
|
50
|
+
continue;
|
51
|
+
}
|
52
|
+
schema.tags[tag.tagPosition || "head"].push(tagToString(tag));
|
53
|
+
}
|
54
|
+
const lineBreaks = !(options == null ? void 0 : options.omitLineBreaks) ? "\n" : "";
|
55
|
+
return {
|
56
|
+
headTags: schema.tags.head.join(lineBreaks),
|
57
|
+
bodyTags: schema.tags.bodyClose.join(lineBreaks),
|
58
|
+
bodyTagsOpen: schema.tags.bodyOpen.join(lineBreaks),
|
59
|
+
htmlAttrs: propsToString(schema.htmlAttrs),
|
60
|
+
bodyAttrs: propsToString(schema.bodyAttrs)
|
61
|
+
};
|
62
|
+
}
|
63
|
+
async function renderSSRHead(head, options) {
|
64
|
+
const beforeRenderCtx = { shouldRender: true };
|
65
|
+
await head.hooks.callHook("ssr:beforeRender", beforeRenderCtx);
|
66
|
+
if (!beforeRenderCtx.shouldRender) {
|
67
|
+
return {
|
68
|
+
headTags: "",
|
69
|
+
bodyTags: "",
|
70
|
+
bodyTagsOpen: "",
|
71
|
+
htmlAttrs: "",
|
72
|
+
bodyAttrs: ""
|
73
|
+
};
|
74
|
+
}
|
75
|
+
const ctx = { tags: await head.resolveTags() };
|
76
|
+
await head.hooks.callHook("ssr:render", ctx);
|
77
|
+
const html = ssrRenderTags(ctx.tags, options);
|
78
|
+
const renderCtx = { tags: ctx.tags, html };
|
79
|
+
await head.hooks.callHook("ssr:rendered", renderCtx);
|
80
|
+
return renderCtx.html;
|
81
|
+
}
|
82
|
+
exports.escapeHtml = escapeHtml;
|
83
|
+
exports.propsToString = propsToString;
|
84
|
+
exports.renderSSRHead = renderSSRHead;
|
85
|
+
exports.ssrRenderTags = ssrRenderTags;
|
86
|
+
exports.tagToString = tagToString;
|
87
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@unhead/ssr/dist/index.mjs"],"sourcesContent":["import { TagsWithInnerContent, SelfClosingTags } from '@unhead/shared';\n\nfunction encodeAttribute(value) {\n return String(value).replace(/\"/g, \""\");\n}\nfunction propsToString(props) {\n const attrs = [];\n for (const [key, value] of Object.entries(props)) {\n if (value !== false && value !== null)\n attrs.push(value === true ? key : `${key}=\"${encodeAttribute(value)}\"`);\n }\n return `${attrs.length > 0 ? \" \" : \"\"}${attrs.join(\" \")}`;\n}\n\nfunction escapeHtml(str) {\n return str.replace(/[&<>\"'/]/g, (char) => {\n switch (char) {\n case \"&\":\n return \"&\";\n case \"<\":\n return \"<\";\n case \">\":\n return \">\";\n case '\"':\n return \""\";\n case \"'\":\n return \"'\";\n case \"/\":\n return \"/\";\n default:\n return char;\n }\n });\n}\nfunction tagToString(tag) {\n const attrs = propsToString(tag.props);\n const openTag = `<${tag.tag}${attrs}>`;\n if (!TagsWithInnerContent.includes(tag.tag))\n return SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}</${tag.tag}>`;\n let content = String(tag.innerHTML || \"\");\n if (tag.textContent)\n content = escapeHtml(String(tag.textContent));\n return SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}${content}</${tag.tag}>`;\n}\n\nfunction ssrRenderTags(tags, options) {\n const schema = { htmlAttrs: {}, bodyAttrs: {}, tags: { head: [], bodyClose: [], bodyOpen: [] } };\n for (const tag of tags) {\n if (tag.tag === \"htmlAttrs\" || tag.tag === \"bodyAttrs\") {\n schema[tag.tag] = { ...schema[tag.tag], ...tag.props };\n continue;\n }\n schema.tags[tag.tagPosition || \"head\"].push(tagToString(tag));\n }\n const lineBreaks = !options?.omitLineBreaks ? \"\\n\" : \"\";\n return {\n headTags: schema.tags.head.join(lineBreaks),\n bodyTags: schema.tags.bodyClose.join(lineBreaks),\n bodyTagsOpen: schema.tags.bodyOpen.join(lineBreaks),\n htmlAttrs: propsToString(schema.htmlAttrs),\n bodyAttrs: propsToString(schema.bodyAttrs)\n };\n}\n\nasync function renderSSRHead(head, options) {\n const beforeRenderCtx = { shouldRender: true };\n await head.hooks.callHook(\"ssr:beforeRender\", beforeRenderCtx);\n if (!beforeRenderCtx.shouldRender) {\n return {\n headTags: \"\",\n bodyTags: \"\",\n bodyTagsOpen: \"\",\n htmlAttrs: \"\",\n bodyAttrs: \"\"\n };\n }\n const ctx = { tags: await head.resolveTags() };\n await head.hooks.callHook(\"ssr:render\", ctx);\n const html = ssrRenderTags(ctx.tags, options);\n const renderCtx = { tags: ctx.tags, html };\n await head.hooks.callHook(\"ssr:rendered\", renderCtx);\n return renderCtx.html;\n}\n\nexport { escapeHtml, propsToString, renderSSRHead, ssrRenderTags, tagToString };\n"],"names":["TagsWithInnerContent","SelfClosingTags"],"mappings":";;;AAEA,SAAS,gBAAgB,OAAO;AAC9B,SAAO,OAAO,KAAK,EAAE,QAAQ,MAAM,QAAQ;AAC7C;AACA,SAAS,cAAc,OAAO;AAC5B,QAAM,QAAQ,CAAA;AACd,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,UAAU,SAAS,UAAU;AAC/B,YAAM,KAAK,UAAU,OAAO,MAAM,GAAG,GAAG,KAAK,gBAAgB,KAAK,CAAC,GAAG;AAAA,EACzE;AACD,SAAO,GAAG,MAAM,SAAS,IAAI,MAAM,EAAE,GAAG,MAAM,KAAK,GAAG,CAAC;AACzD;AAEA,SAAS,WAAW,KAAK;AACvB,SAAO,IAAI,QAAQ,aAAa,CAAC,SAAS;AACxC,YAAQ,MAAI;AAAA,MACV,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IACV;AAAA,EACL,CAAG;AACH;AACA,SAAS,YAAY,KAAK;AACxB,QAAM,QAAQ,cAAc,IAAI,KAAK;AACrC,QAAM,UAAU,IAAI,IAAI,GAAG,GAAG,KAAK;AACnC,MAAI,CAACA,MAAoB,qBAAC,SAAS,IAAI,GAAG;AACxC,WAAOC,MAAe,gBAAC,SAAS,IAAI,GAAG,IAAI,UAAU,GAAG,OAAO,KAAK,IAAI,GAAG;AAC7E,MAAI,UAAU,OAAO,IAAI,aAAa,EAAE;AACxC,MAAI,IAAI;AACN,cAAU,WAAW,OAAO,IAAI,WAAW,CAAC;AAC9C,SAAOA,MAAe,gBAAC,SAAS,IAAI,GAAG,IAAI,UAAU,GAAG,OAAO,GAAG,OAAO,KAAK,IAAI,GAAG;AACvF;AAEA,SAAS,cAAc,MAAM,SAAS;AACpC,QAAM,SAAS,EAAE,WAAW,CAAE,GAAE,WAAW,CAAE,GAAE,MAAM,EAAE,MAAM,CAAA,GAAI,WAAW,CAAA,GAAI,UAAU,CAAA,EAAI,EAAA;AAC9F,aAAW,OAAO,MAAM;AACtB,QAAI,IAAI,QAAQ,eAAe,IAAI,QAAQ,aAAa;AACtD,aAAO,IAAI,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,GAAG,GAAG,GAAG,IAAI,MAAK;AACpD;AAAA,IACD;AACD,WAAO,KAAK,IAAI,eAAe,MAAM,EAAE,KAAK,YAAY,GAAG,CAAC;AAAA,EAC7D;AACD,QAAM,aAAa,EAAC,mCAAS,kBAAiB,OAAO;AACrD,SAAO;AAAA,IACL,UAAU,OAAO,KAAK,KAAK,KAAK,UAAU;AAAA,IAC1C,UAAU,OAAO,KAAK,UAAU,KAAK,UAAU;AAAA,IAC/C,cAAc,OAAO,KAAK,SAAS,KAAK,UAAU;AAAA,IAClD,WAAW,cAAc,OAAO,SAAS;AAAA,IACzC,WAAW,cAAc,OAAO,SAAS;AAAA,EAC7C;AACA;AAEA,eAAe,cAAc,MAAM,SAAS;AAC1C,QAAM,kBAAkB,EAAE,cAAc;AACxC,QAAM,KAAK,MAAM,SAAS,oBAAoB,eAAe;AAC7D,MAAI,CAAC,gBAAgB,cAAc;AACjC,WAAO;AAAA,MACL,UAAU;AAAA,MACV,UAAU;AAAA,MACV,cAAc;AAAA,MACd,WAAW;AAAA,MACX,WAAW;AAAA,IACjB;AAAA,EACG;AACD,QAAM,MAAM,EAAE,MAAM,MAAM,KAAK,YAAa,EAAA;AAC5C,QAAM,KAAK,MAAM,SAAS,cAAc,GAAG;AAC3C,QAAM,OAAO,cAAc,IAAI,MAAM,OAAO;AAC5C,QAAM,YAAY,EAAE,MAAM,IAAI,MAAM,KAAI;AACxC,QAAM,KAAK,MAAM,SAAS,gBAAgB,SAAS;AACnD,SAAO,UAAU;AACnB;;;;;;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { TagsWithInnerContent, SelfClosingTags } from "../../shared/dist/index.js";
|
2
|
+
function encodeAttribute(value) {
|
3
|
+
return String(value).replace(/"/g, """);
|
4
|
+
}
|
5
|
+
function propsToString(props) {
|
6
|
+
const attrs = [];
|
7
|
+
for (const [key, value] of Object.entries(props)) {
|
8
|
+
if (value !== false && value !== null)
|
9
|
+
attrs.push(value === true ? key : `${key}="${encodeAttribute(value)}"`);
|
10
|
+
}
|
11
|
+
return `${attrs.length > 0 ? " " : ""}${attrs.join(" ")}`;
|
12
|
+
}
|
13
|
+
function escapeHtml(str) {
|
14
|
+
return str.replace(/[&<>"'/]/g, (char) => {
|
15
|
+
switch (char) {
|
16
|
+
case "&":
|
17
|
+
return "&";
|
18
|
+
case "<":
|
19
|
+
return "<";
|
20
|
+
case ">":
|
21
|
+
return ">";
|
22
|
+
case '"':
|
23
|
+
return """;
|
24
|
+
case "'":
|
25
|
+
return "'";
|
26
|
+
case "/":
|
27
|
+
return "/";
|
28
|
+
default:
|
29
|
+
return char;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function tagToString(tag) {
|
34
|
+
const attrs = propsToString(tag.props);
|
35
|
+
const openTag = `<${tag.tag}${attrs}>`;
|
36
|
+
if (!TagsWithInnerContent.includes(tag.tag))
|
37
|
+
return SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}</${tag.tag}>`;
|
38
|
+
let content = String(tag.innerHTML || "");
|
39
|
+
if (tag.textContent)
|
40
|
+
content = escapeHtml(String(tag.textContent));
|
41
|
+
return SelfClosingTags.includes(tag.tag) ? openTag : `${openTag}${content}</${tag.tag}>`;
|
42
|
+
}
|
43
|
+
function ssrRenderTags(tags, options) {
|
44
|
+
const schema = { htmlAttrs: {}, bodyAttrs: {}, tags: { head: [], bodyClose: [], bodyOpen: [] } };
|
45
|
+
for (const tag of tags) {
|
46
|
+
if (tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs") {
|
47
|
+
schema[tag.tag] = { ...schema[tag.tag], ...tag.props };
|
48
|
+
continue;
|
49
|
+
}
|
50
|
+
schema.tags[tag.tagPosition || "head"].push(tagToString(tag));
|
51
|
+
}
|
52
|
+
const lineBreaks = !(options == null ? void 0 : options.omitLineBreaks) ? "\n" : "";
|
53
|
+
return {
|
54
|
+
headTags: schema.tags.head.join(lineBreaks),
|
55
|
+
bodyTags: schema.tags.bodyClose.join(lineBreaks),
|
56
|
+
bodyTagsOpen: schema.tags.bodyOpen.join(lineBreaks),
|
57
|
+
htmlAttrs: propsToString(schema.htmlAttrs),
|
58
|
+
bodyAttrs: propsToString(schema.bodyAttrs)
|
59
|
+
};
|
60
|
+
}
|
61
|
+
async function renderSSRHead(head, options) {
|
62
|
+
const beforeRenderCtx = { shouldRender: true };
|
63
|
+
await head.hooks.callHook("ssr:beforeRender", beforeRenderCtx);
|
64
|
+
if (!beforeRenderCtx.shouldRender) {
|
65
|
+
return {
|
66
|
+
headTags: "",
|
67
|
+
bodyTags: "",
|
68
|
+
bodyTagsOpen: "",
|
69
|
+
htmlAttrs: "",
|
70
|
+
bodyAttrs: ""
|
71
|
+
};
|
72
|
+
}
|
73
|
+
const ctx = { tags: await head.resolveTags() };
|
74
|
+
await head.hooks.callHook("ssr:render", ctx);
|
75
|
+
const html = ssrRenderTags(ctx.tags, options);
|
76
|
+
const renderCtx = { tags: ctx.tags, html };
|
77
|
+
await head.hooks.callHook("ssr:rendered", renderCtx);
|
78
|
+
return renderCtx.html;
|
79
|
+
}
|
80
|
+
export {
|
81
|
+
escapeHtml,
|
82
|
+
propsToString,
|
83
|
+
renderSSRHead,
|
84
|
+
ssrRenderTags,
|
85
|
+
tagToString
|
86
|
+
};
|
87
|
+
//# sourceMappingURL=index.js.map
|