PageSourceSearch

https://zinkbakken.dk/theme/89fec0e0143898505c6fffd88afa0419/js/zinkbakken/zinkbakken.js?1790055801

js zinkbakken.dk collected 2026-09-26 07:48:02 UTC 16,710 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function s(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function i(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=r;var c,d,u=Array.isArray(n);return u!==Array.isArray(e)?r(n,l):u?l.arrayMerge(e,n,l):(d={},(c=l).isMergeableObject(e)&&i(e).forEach(function(t){d[t]=r(e[t],c)}),i(n).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(n[t])?d[t]=(function(e,t){if(!t.customMerge)return o;var n=t.customMerge(e);return"function"==typeof n?n:o})(t,c)(e[t],n[t],c):d[t]=r(n[t],c))}),d)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return o(e,n,t)},{})},e.exports=o}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=n(857),t=n.n(e);class r{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let n=r.toUpperCamelCase(e,t);return r.lcFirst(n)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class s{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!s.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!1===s.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(n)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),a=r.toLowerCamelCase(i,"-");if(!s.isNode(e)){if(n)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(n)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[a];if(void 0===o){if(n)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return o}return r.parsePrimitive(o)}static querySelector(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelector(t)||!1;if(n&&!1===r)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return r}static querySelectorAll(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelectorAll(t);if(0===r.length&&(r=!1),n&&!1===r)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return r}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not
1([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}class i{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:n});return this.el.dispatchEvent(r),r}subscribe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,s=e.split("."),i=n.scope?t.bind(n.scope):t;if(n.once&&!0===n.once){let t=i;i=function(n){r.unsubscribe(e),t(n)}}return this.el.addEventListener(s[0],i),this.listeners.push({splitEventName:s,opts:n,cb:i}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,n)=>([...n.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(n.splitEventName[0],n.cb):e.push(n),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class a{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let n=r.toDashCase(this._pluginName),i=s.getDataAttribute(this.el,"data-".concat(n,"-config"),!1),a=s.getAttribute(this.el,"data-".concat(n,"-options"),!1),o=[this.constructor.options,this.options,e];i&&o.push(window.PluginConfigManager.get(this._pluginName,i));try{a&&o.push(JSON.parse(a))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(n,'-options" could not be parsed to json: ').concat(e.message))}return t().all(o.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},n=!1){if(!s.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new i(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}let o="phoneNumber",l=/^\+?\d{8,}$/;class c{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var n of e.entries())t(n[1],n[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(n=>{t(e[n],n)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}let d="js-offcanvas-singleton";class u{open(e,t,n,r,s,i,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(n,i,a,r);this.setContent(e,s),this._openOffcanvas(o,t)}setContent(e,t){let n=this.getOffCanvas();n[0]&&(n[0].innerHTML=e,this._registerEvents(t),this._setAriaAttrs())}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(".".concat(d))}close(e){let t=this.getOffCanvas();c.iterate(t,e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){window.focusHandler.saveFocusState("offcanvas"),u.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();c.iterate(t,n=>{let r=()=>{setTimeout(()=>{n.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e),n.removeEventListener("hide.bs.offcanvas",r)};n.addEventListener("hide.bs.offcanvas",r)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let n=document.querySelectorAll(".".concat("js-offcanvas-close"));c.iterate(n,t=>t.addEventListener("click",this.close.bind(this,e)))}_setAriaAttrs(){let e=this.getOffCanvas()[0],t="off-canvas-headline",n=e.querySelector('[data-id="'.concat(t,'"]'));n&&!e.hasAttribute("aria-labelledby")&&(n.setAttribute("id",t),e.setAttribute("aria-labelledby",t))}_removeExistingOffCanvas(){u.bsOffcanvas=null;let e=this.getOffCanvas();return c.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,n,r){let s=document.createElement("div");if(s.classList.add("offcanvas",d),s.classList.add(this._getPositionClass(e)),s.setAttribute("tabindex","-1"),!0===t&&s.classList.add("is-fullwidth"),n){let e=typeof n;if("string"===e)s.classList.add(n);
1else if(Array.isArray(n))n.forEach(e=>{s.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(s),u.bsOffcanvas=new bootstrap.Offcanvas(s,{backdrop:!1!==r||"static"}),s}constructor(){this.$emitter=new i}}let h=Object.freeze(new u);class f{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",r=!(arguments.length>3)||void 0===arguments[3]||arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";h.open(e,t,n,r,s,i,a)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;h.setContent(e,t,n)}static setAdditionalClassName(e){h.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;h.close(e)}static exists(){return h.exists()}static getOffCanvas(){return h.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class p{get(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=this._createPreparedRequest("GET",e,n);return this._sendRequest(r,null,t)}post(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let s=this._createPreparedRequest("POST",e,r);return this._sendRequest(s,t,n)}delete(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let s=this._createPreparedRequest("DELETE",e,r);return this._sendRequest(s,t,n)}patch(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let s=this._createPreparedRequest("PATCH",e,r);return this._sendRequest(s,t,n)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,n){return this._registerOnLoaded(e,n),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,n){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),n&&this._request.setRequestHeader("Content-type",n),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}let g="loader",v={BEFORE:"before",INNER:"inner"};class m{create(){if(!this.exists()){if(this.position===v.INNER){this.parent.innerHTML=m.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),m.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(g));c.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(g)).length>0}_getPosition(){return this.position===v.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(g,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return g}constructor(e,t=v.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}let b=null;class y extends f{static open(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",s=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:f.REMOVE_OFF_CANVAS_DELAY(),a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");h._removeExistingOffCanvas();let l=h._createOffCanvas(r,a,o,s);this.setContent(e,t,n,s,i),h._openOffcanvas(l)}
1static setContent(e,t,n,r,s){let i=new p;super.setContent('<div class="offcanvas-body">'.concat(m.getTemplate(),"</div>"),r,s),b&&b.abort();let a=e=>{super.setContent(e,r,s),"function"==typeof n&&n(e)};b=t?i.post(e,t,y.executeCallback.bind(this,a)):i.get(e,y.executeCallback.bind(this,a))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}let E="element-loader-backdrop";class w extends m{static create(e){e.classList.add("has-element-loader"),w.exists(e)||(w.appendLoader(e),setTimeout(()=>{let t=e.querySelector(".".concat(E));t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(".".concat(E));t&&t.remove()}static exists(e){return e.querySelectorAll(".".concat(E)).length>0}static getTemplate(){return'\n        <div class="'.concat(E,'">\n            <div class="loader" role="status">\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(e){e.insertAdjacentHTML("beforeend",w.getTemplate())}}window.router["frontend.cookie.offcanvas"];let _="od-klaviyo-track-allow";function C(){let e=!!(window.CookieInformation&&"function"==typeof window.CookieInformation.getConsentGivenFor&&window.CookieInformation.getConsentGivenFor("cookie_cat_marketing"));e?document.cookie="".concat(_,"=1; path=/; max-age=").concat(2592e3,"; SameSite=Lax"):document.cookie="".concat(_,"=; path=/; max-age=0; SameSite=Lax"),document.$emitter.publish("CookieConfiguration_Update",{[_]:e})}window.addEventListener("CookieInformationConsentGiven",C),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",C):C();let O=window.PluginManager;O.register("ValidateShipping",class extends a{init(){let e=document.querySelectorAll(".shipping-method-input:checked"),t=document.querySelector("#confirmOrderForm"),n=document.querySelector("#confirmShippingErrorMessageContainer");t.addEventListener("submit",function(t){e.length||(t.preventDefault(),n.setAttribute("style","display:block"))})}},".checkout-container"),O.register("PhoneNumberValidation",class extends a{init(){window.formValidation.validators.has(o)||window.formValidation.addValidator(o,e=>""===e||l.test(e),window.validationMessages[o]);let e=(this.el.getAttribute("data-validation")||"").split(",").filter(Boolean);e.includes(o)||(e.push(o),this.el.setAttribute("data-validation",e.join(",")))}},'input[name$="[phoneNumber]"], input[name="phoneNumber"], input[name="phone"]')})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.