PageSourceSearch

https://www.tauchversand.com/theme/a0fb15957bc7c7dd096cbaf5d098a43…rers.cbax-offcanvas-filter.plugin.e03ae1.js

js tauchversand.com collected 2026-10-06 16:26:03 UTC 9,719 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunkcbax_modul_manufacturers=self.webpackChunkcbax_modul_manufacturers||[]).push([[95983],{983(e,t,s){s.r(t),s.d(t,{default:()=>u});class n{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(e,{detail:t,cancelable:s});return this.el.dispatchEvent(n),n}subscribe(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,i=e.split("."),r=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=r;r=function(s){n.unsubscribe(e),t(s)}}return this.el.addEventListener(i[0],r),this.listeners.push({splitEventName:i,opts:s,cb:r}),!0}unsubscribe(e){arguments.length>1&&"function"==typeof arguments[1]&&console.warn(`[NativeEventEmitter] Unsubscribing by passing the subscriber function as a second argument is not supported. By default, all listeners for the event will be removed. Use a suffix (separated by a dot) on the event name when subscribing/unsubscribing to identify/target your specific listener only, e.g. "${e}.MyCustomPlugin"`);let t=e.split(".");return this.listeners=this.listeners.reduce((e,s)=>([...s.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):e.push(s),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}}let i="js-offcanvas-singleton",r=new WeakMap;class a{constructor(){this.$emitter=new n}open(e,t,s,n,i,r,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,r,a,n);this.setContent(e,i),this._openOffcanvas(o,t)}setContent(e,t){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=e,this._registerEvents(t),this._setAriaAttrs())}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(`.${i}`)}close(e){let t=this.getOffCanvas();t.forEach(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"),this._disableBackgroundAccessibility(e),window.focusHandler._addFocusTrapGuard(e),a.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();t.forEach(s=>{let n=()=>{setTimeout(()=>
1{this._restoreBackgroundState(),s.remove(),window.focusHandler._removeFocusTrapGuard(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e),s.removeEventListener("hide.bs.offcanvas",n)};s.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0}),document.querySelectorAll(".js-offcanvas-close").forEach(t=>{t.addEventListener("click",this.close.bind(this,e))})}_setAriaAttrs(){let e=this.getOffCanvas()[0],t="off-canvas-headline",s=e.querySelector(`[data-id="${t}"]`);s&&!e.hasAttribute("aria-labelledby")&&(s.setAttribute("id",t),e.setAttribute("aria-labelledby",t))}_disableBackgroundAccessibility(e){let t=[...document.body.children].filter(t=>t!==e).map(e=>({element:e,inert:e.inert,ariaHidden:e.getAttribute("aria-hidden")}));r.set(this,t),t.forEach(e=>{let{element:t}=e;t.inert=!0,t.setAttribute("aria-hidden","true")})}_restoreBackgroundState(){let e=r.get(this);e?.forEach(e=>{let{element:t,inert:s,ariaHidden:n}=e;if(t.inert=s,null===n){t.removeAttribute("aria-hidden");return}t.setAttribute("aria-hidden",n)}),r.delete(this)}_removeExistingOffCanvas(){this.getOffCanvas().forEach(e=>{let t=bootstrap.Offcanvas.getInstance(e);t&&"function"==typeof t.dispose&&t.dispose(),e.remove(),window.focusHandler._removeFocusTrapGuard()}
1),this._restoreBackgroundState(),a.bsOffcanvas=null}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,s,n){let r=document.createElement("div");if(r.classList.add("offcanvas",i),r.classList.add(this._getPositionClass(e)),r.setAttribute("tabindex","-1"),!0===t&&r.classList.add("is-fullwidth"),s){let e=typeof s;if("string"===e)r.classList.add(s);else if(Array.isArray(s))s.forEach(e=>{r.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(r),a.bsOffcanvas=new bootstrap.Offcanvas(r,{backdrop:!1!==n||"static"}),r}}let o=Object.freeze(new a);class l{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";o.open(e,t,s,n,i,r,a)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;o.setContent(e,t,s)}static setAdditionalClassName(e){o.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;o.close(e)}static exists(){return o.exists()}static getOffCanvas(){return o.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class c{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 s=c.toUpperCamelCase(e,t);return c.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>c.ucFirst(e.toLowerCase())).join(""):c.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class d{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!d.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 s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===d.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),i=c.toLowerCamelCase(n,"-");if(!d.isNode(e)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let r=e.dataset[i];if(void 0===r){if(s)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return r}return c.parsePrimitive(r)}static querySelector(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!d.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(s&&!1===n)throw Error(`The required element "${t}" does not exist in parent node!`);return n}static querySelectorAll(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!d.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),s&&!1===n)throw Error(`At least one item of "${t}" must exist in parent node!`);return n}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return e.querySelectorAll(t)}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 u extends window.PluginBaseClass{init(){this._registerEventListeners()}_registerEventListeners(){this.el.addEventListener("click",this._onClickOffCanvasFilter.bind(this))}_onCloseOffCanvas(e){let t=e.detail.offCanvasContent[0];document.querySelector('[data-cbax-offcanvas-filter-content="true"]').innerHTML=t.innerHTML,document.$emitter.unsubscribe("onCloseOffcanvas",this._onCloseOffCanvas.bind(this));let s=window.PluginManager.getPluginInstances("Listing");Array.isArray(s)&&s.length>0&&s[0].refreshRegistry()}_onClickOffCanvasFilter(e){e.preventDefault();let t=document.querySelector("[data-cbax-offcanvas-filter-content]");if(!t)throw Error('There was no DOM element with the data attribute "data-cbax-offcanvas-filter-content".');l.open(t.innerHTML,()=>{},"bottom",!0,l.REMOVE_OFF_CANVAS_DELAY(),!0,"offcanvas-filter"),d.querySelector(t,".cbax-filter-panel").remove();let s=window.PluginManager.getPluginInstances("Listing");Array.isArray(s)&&s.length>0&&s[0].refreshRegistry(),document.$emitter.subscribe("onCloseOffcanvas",this._onCloseOffCanvas.bind(this)),this.$emitter.publish("onClickOffCanvasFilter")}}}}]);

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.