PageSourceSearch

https://zinkbakken.dk/theme/89fec0e0143898505c6fffd88afa0419/js/ze…izon.zen-offcanvas-top-bar.plugin.45ae63.js

js zinkbakken.dk collected 2026-09-26 07:49:59 UTC 9,416 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[71076],{1076:(t,e,s)=>{s.r(e),s.d(e,{default:()=>o});var i=s(4049),n=s(9062);class o extends window.PluginBaseClass{init(){this._registerEvents()}_registerEvents(){this.el.addEventListener("click",this._onClickOffCanvasTopBar.bind(this))}_onClickOffCanvasTopBar(t){t.preventDefault();let e=i.Z.querySelector(document,this.options.initialContentSelector);if(this._content=e.innerHTML,this._content.length>0)try{void 0===window.focusHandler&&(window.focusHandler={saveFocusState:function(){},resumeFocusState:function(){}}),n.Z.open(this._content,()=>{window.PluginManager.initializePlugins(),this._initializeCookieConfiguration()},this.options.offcanvasPostion,!0,n.Z.REMOVE_OFF_CANVAS_DELAY(),!1),n.Z.setAdditionalClassName(this.options.additionalClass)}catch(t){console.error("Error opening offcanvas:",t)}this.$emitter.publish("onClickOffCanvasTopBar")}_initializeCookieConfiguration(){let t=this.options,e=i.Z.querySelector(document,t.cookieConfigurationSelector,!1);e&&(this._cookieConfigurationPlugin=window.PluginManager.getPluginInstanceFromElement(e,"CookieConfiguration")),this._cookieConfigurationPlugin&&this._cookieConfigurationPlugin._registerEvents()}}o.options={initialContentSelector:".js-top-bar-offcanvas-initial-content",offcanvasPostion:"right",additionalClass:"top-bar-offcanvas",cookieConfigurationSelector:"[data-cookie-permission]"}},4049:(t,e,s)=>{s.d(e,{Z:()=>n});var i=s(5140);class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=e.replace(/^data(|-)/,""),a=i.Z.toLowerCamelCase(o,"-");if(!n.isNode(t)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let r=t.dataset[a];if(void 0===r){if(s)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return r}return i.Z.parsePrimitive(r)}static querySelector(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(s&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),s&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.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([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},4830:(t,e,s)=>{s.d(e,{Z:()=>i});class i{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),o=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=o;o=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(n[0],o),this.listeners.push({splitEventName:n,opts:s,cb:o}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,s)=>([...s.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):t.push(s),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}},3266:(t,e,s)=>{s.d(e,{Z:()=>i});class i{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var s of t.entries())e(s[1],s[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(s=>{e(t[s],s)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}},5140:(t,e,s)=>{s.d(e,{Z:()=>i});class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let s=i.toUpperCamelCase(t,e);return i.lcFirst(s)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},9062:(t,e,s)=>{s.d(e,{Z:()=>l,r:()=>r});var i=s(4830),n=s(3266);let o="js-offcanvas-singleton";class a{open(t,e,s,i,n,o,a){this._removeExistingOffCanvas();let r=this._createOffCanvas(s,o,a,i);this.setContent(t,n),this._openOffcanvas(r,e)}setContent(t,e){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(".".concat(o))}close(t){let e=this.getOffCanvas();n.Z.iterate(e,t=>{bootstrap.Offcanvas.getInstance(t).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(t,e){window.focusHandler.saveFocusState("offcanvas"),a.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();n.Z.iterate(e,s=>{let i=()=>{setTimeout(()=>{s.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),s.removeEventListener("hide.bs.offcanvas",i)};s.addEventListener("hide.bs.offcanvas",i)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0});let s=document.querySelectorAll(".".concat("js-offcanvas-close"));n.Z.iterate(s,e=>e.addEventListener("click",this.close.bind(this,t)))}_setAriaAttrs(){let t=this.getOffCanvas()[0],e="off-canvas-headline",s=t.querySelector('[data-id="'.concat(e,'"]'));s&&!t.hasAttribute("aria-labelledby")&&(s.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){a.bsOffcanvas=null;let t=this.getOffCanvas();return n.Z.iterate(t,t=>t.remove())}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":"offcanvas-".concat(t)}_createOffCanvas(t,e,s,i){let n=document.createElement("div");if(n.classList.add("offcanvas",o),n.classList.add(this._getPositionClass(t)),n.setAttribute("tabindex","-1"),!0===e&&n.classList.add("is-fullwidth"),s){let t=typeof s;if("string"===t)n.classList.add(s);else if(Array.isArray(s))s.forEach(t=>{n.classList.add(t)});else throw Error('The type "'.concat(t,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(n),a.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==i||"static"}),n}constructor(){this.$emitter=new i.Z}}let r=Object.freeze(new a);class l{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";r.open(t,e,s,i,n,o,a)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;r.setContent(t,e,s)}static setAdditionalClassName(t){r.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;r.close(t)}static exists(){return r.exists()}static getOffCanvas(){return r.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}}}]);

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.