PageSourceSearch

https://www.agrar-fachversand.com/theme/1e244a63cd51d3f2904154cac7…/cbax-offcanvas-filter.plugin.90b3e4.js

js agrar-fachversand.com collected 2026-10-10 02:06:54 UTC 9,594 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["cbax-offcanvas-filter.plugin"],{812:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});class i{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return i.isIPhoneDevice()||i.isIPadDevice()}static isNativeWindowsBrowser(){return i.isIEBrowser()||i.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":i.isTouchDevice(),"is-ios":i.isIOSDevice(),"is-native-windows":i.isNativeWindowsBrowser(),"is-iphone":i.isIPhoneDevice(),"is-ipad":i.isIPadDevice(),"is-ie":i.isIEBrowser(),"is-edge":i.isEdgeBrowser()}}}class n{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),r=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=r;r=function(s){i.unsubscribe(e),t(s)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:s,cb:r}),!0}unsubscribe(e){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}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class r{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var s of e.entries())t(s[1],s[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(s=>{t(e[s],s)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}let a="offcanvas";class o{open(e,t,s,i,n,r,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,r,a,i);this.setContent(e,i,n),this._openOffcanvas(o,t)}setContent(e,t){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=e,this._registerEvents(t))}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(".".concat(a))}close(e){let t=this.getOffCanvas();r.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"),o.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}
1_registerEvents(e){let t=i.isTouchDevice()?"touchend":"click",s=this.getOffCanvas();r.iterate(s,t=>{let i=()=>{setTimeout(()=>{t.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:s})},e),t.removeEventListener("hide.bs.offcanvas",i)};t.addEventListener("hide.bs.offcanvas",i)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let n=document.querySelectorAll(".".concat("js-offcanvas-close"));r.iterate(n,s=>s.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){o.bsOffcanvas=null;let e=this.getOffCanvas();return r.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,s,i){let n=document.createElement("div");if(n.classList.add(a),n.classList.add(this._getPositionClass(e)),n.setAttribute("tabindex","-1"),!0===t&&n.classList.add("is-fullwidth"),s){let e=typeof s;if("string"===e)n.classList.add(s);else if(Array.isArray(s))s.forEach(e=>{n.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(n),o.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==i||"static"}),n}constructor(){this.$emitter=new n}}let c=Object.freeze(new o);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",i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=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]:"";c.open(e,t,s,i,n,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;c.setContent(e,t,s)}static setAdditionalClassName(e){c.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;c.close(e)}static exists(){return c.exists()}static getOffCanvas(){return c.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class d{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=d.toUpperCamelCase(e,t);return d.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>d.ucFirst(e.toLowerCase())).join(""):d.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class f{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!f.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===f.hasAttribute(e,t))throw Error('The required property "'.concat(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],i=t.replace(/^data(|-)/,""),n=d.toLowerCamelCase(i,"-");if(!f.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[n];if(void 0===r){if(s)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return r}return d.parsePrimitive(r)}static querySelector(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!f.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(s&&!1===i)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return i}static querySelectorAll(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!f.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),s&&!1===i)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return i}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 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"),f.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.