{"version":3,"sources":["webpack:///./src/composables/meta.ts","webpack:///./src/composables/canonical.ts","webpack:///./src/views/OrderConfirm.vue","webpack:///./src/views/OrderConfirm.vue?2449"],"names":["setMeta","title","description","document","length","metaDescription","querySelector","setAttribute","newMetaDescription","createElement","head","appendChild","useMeta","titleRef","ref","descriptionRef","onMounted","value","watchEffect","i","setCanonical","href","address","canonical","metaCanonicalValue","useCanonical","hrefRef","dontUseCanonical","remove","removeCanonical","_hoisted_1","class","_hoisted_2","_createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","xmlns","width","height","fill","viewBox","d","_defineComponent","__name","setup","__props","async","_ctx","_cache","_component_router_link","_resolveComponent","_openBlock","_createElementBlock","_createVNode","to","name","custom","default","_withCtx","navigate","role","onClick","_createTextVNode","_","__exports__"],"mappings":"0GAAA,kDAEM,SAAUA,EAAQC,EAAeC,GACnCC,SAASF,MAAQ,GAAGA,IAASA,EAAMG,OAAS,MAAQ,uFACpD,MAAMC,EAAkBF,SAASG,cAAc,4BAC/C,GAAID,EACAA,EAAgBE,aAAa,UAAWL,OACrC,CACH,MAAMM,EAAqBL,SAASM,cAAc,QAClDD,EAAmBD,aAAa,OAAQ,eACxCC,EAAmBD,aAAa,UAAWL,GAC3CC,SAASO,KAAKC,YAAYH,IAI5B,SAAUI,EAAQX,EAAeC,GACnC,MAAMW,EAAWC,cAAIb,GACfc,EAAiBD,cAAIZ,GAU3B,OARAc,qBAAU,KACNhB,EAAQa,EAASI,MAAOF,EAAeE,MAAKA,IAGhDC,uBAAY,KACRlB,EAAQa,EAASI,MAAOF,EAAeE,MAAKA,IAGzC,CACHhB,MAAOY,EACPX,YAAaa,K,kCC7BrB,+DAAAI,CAAA,oBAEM,SAAUC,EAAaC,GACzB,MAAMC,EAAU,6BAA+BD,EAAKjB,OAAS,EAAI,IAAIiB,EAASA,GACxEE,EAAYpB,SAASG,cAAc,yBAEzC,GAAIiB,EACAA,EAAUhB,aAAa,OAAQe,OAC5B,CACH,MAAME,EAAqB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OrderConfirm.50a54f0c.js","sourcesContent":["import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setMeta(title: string, description: string) {\r\n document.title = `${title}${(title.length ? ' - ' : '')}NG Hantverk - Upplev äventyret med våra handgjorda och exklusiva knivar och fodral`;\r\n const metaDescription = document.querySelector('meta[name=\"description\"]');\r\n if (metaDescription) {\r\n metaDescription.setAttribute('content', description);\r\n } else {\r\n const newMetaDescription = document.createElement('meta');\r\n newMetaDescription.setAttribute('name', 'description');\r\n newMetaDescription.setAttribute('content', description);\r\n document.head.appendChild(newMetaDescription);\r\n }\r\n}\r\n\r\nexport function useMeta(title: string, description: string) {\r\n const titleRef = ref(title);\r\n const descriptionRef = ref(description);\r\n\r\n onMounted(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n return {\r\n title: titleRef,\r\n description: descriptionRef,\r\n };\r\n}","import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setCanonical(href: string) {\r\n const address = 'https://www.nghantverk.se' + (href.length > 0 ? `/${href}` : href);\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n\r\n if (canonical) {\r\n canonical.setAttribute('href', address);\r\n } else {\r\n const metaCanonicalValue = document.createElement('link');\r\n metaCanonicalValue.setAttribute('rel', 'canonical');\r\n metaCanonicalValue.setAttribute('href', address);\r\n document.head.appendChild(metaCanonicalValue);\r\n }\r\n}\r\n\r\nexport function removeCanonical() {\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n if (canonical)\r\n canonical.remove();\r\n}\r\n\r\nexport function useCanonical(href: string) {\r\n const hrefRef = ref(href);\r\n\r\n onMounted(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n return {\r\n href: hrefRef\r\n };\r\n}\r\n\r\nexport function dontUseCanonical() {\r\n removeCanonical();\r\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"row gx-4 gx-lg-5 padding-bottom-100\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"col-12 text-center\" }, [\n /*#__PURE__*/_createElementVNode(\"h1\", { class: \"display-3 mt-4\" }, \"Tack för din beställning!\"),\n /*#__PURE__*/_createElementVNode(\"h2\", { class: \"display-6 mt-4\" }, \"Göm inte att prenumera på vårat nyhetsbrev\")\n], -1)\nconst _hoisted_3 = { class: \"col-12 d-flex justify-content-center align-items-center pt-5\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16\",\n height: \"16\",\n fill: \"currentColor\",\n class: \"bi bi-house\",\n viewBox: \"0 0 16 16\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.707 1.5ZM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5 5 5Z\" })\n], -1)\n\nimport { onMounted } from 'vue';\r\n import { useMeta } from '@/composables/meta';\r\n import { dontUseCanonical } from '@/composables/canonical';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'OrderConfirm',\n setup(__props) {\n\r\n onMounted(async () => {\r\n useMeta('Tack för din beställning!', 'Beställningen är genomförd. Tack för ditt köp! Detaljer om ditt köp kommer på mail.');\r\n dontUseCanonical();\r\n });\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_router_link, {\n to: { name: 'Start' },\n custom: \"\"\n }, {\n default: _withCtx(({ navigate }) => [\n _createElementVNode(\"button\", {\n role: \"button\",\n onClick: navigate,\n class: \"btn btn-primary btn-custom-size mt-5\"\n }, [\n _hoisted_5,\n _createTextVNode(\" TILL STARTSIDAN \")\n ], 8, _hoisted_4)\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","import script from \"./OrderConfirm.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./OrderConfirm.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"sourceRoot":""}