PageSourceSearch

https://www.verdeck.de/theme/efd3b34e91d58a73eca4758c316cb2a8/js/a…override-cookie-permission.plugin.3cb010.js

js verdeck.de collected 2026-10-02 13:29:12 UTC 10,045 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[91085],{59(e,t,i){i.d(t,{A:()=>s});class s{static debounce(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];s&&!i&&setTimeout(e.bind(e,...n),0),clearTimeout(i),i=setTimeout(e.bind(e,...n),t)}}}},85(e,t,i){i.r(t),i.d(t,{default:()=>c});var s=i(59),r=i(632),n=i(452),o=i(335);class a extends o.A{static #e=this.options={cookieExpiration:30,cookieName:"cookie-preference",buttonSelector:".js-cookie-permission-button",resizeDebounceTime:200,autoFocus:!0};init(){this._button=this.el.querySelector(this.options.buttonSelector),this._isPreferenceSet()||(this._setBodyPadding(),this._registerEvents(),this._setFocus()),this._registerShowAndHideCookieBarEvents()}_setFocus(){!this._isDataPrivacyPage()&&this.options.autoFocus&&window.focusHandler.setFocus(this.el,{preventScroll:!0})}_isDataPrivacyPage(){let e=this.el.querySelector(".cookie-permission-content a");if(!e?.href)return!1;let t=e=>e.origin+e.pathname.replace(/\/$/,"").toLowerCase(),i=new URL(this._getCurrentLocation()),s=new URL(e.href);return t(i)===t(s)}_getCurrentLocation(){return window.location.href}_isPreferenceSet(){return!!n.A.getItem(this.options.cookieName)||(this._showCookieBar(),!1)}_showCookieBar(){this.el.style.display="block",this.$emitter.publish("showCookieBar")}_hideCookieBar(){this.el.style.display="none",this.$emitter.publish("hideCookieBar")}_registerEvents(){if(this._button){let e=r.A.isTouchDevice()?"touchstart":"click";this._button.addEventListener(e,this._handleDenyButton.bind(this))}window.addEventListener("resize",s.A.debounce(this._setBodyPadding.bind(this),this.options.resizeDebounceTime),{capture:!0,passive:!0})}_registerShowAndHideCookieBarEvents(){document.addEventListener("showCookieBar",this._handleShowCookieBarEvent.bind(this)),document.addEventListener("hideCookieBar",this._handleHideCookieBarEvent.bind(this))}_handleShowCookieBarEvent(){this._setBodyPadding(),this._showCookieBar(),this._setFocus()}_handleHideCookieBarEvent(){this._removeBodyPadding(),this._hideCookieBar()}_handleDenyButton(e){e.preventDefault();let{cookieExpiration:t,cookieName:i}=this.options;this._hideCookieBar(),this._removeBodyPadding(),n.A.setItem(i,"1",t),this.$emitter.publish("onClickDenyButton")}_calculateCookieBarHeight(){return this.el.offsetHeight}_setBodyPadding(){document.body.style.paddingBottom=`${this._calculateCookieBarHeight()}px`,this.$emitter.publish("setBodyPadding")}_removeBodyPadding(){document.body.style.paddingBottom="0",this.$emitter.publish("removeBodyPadding")}}class c extends a{static #e=this.options={...a.options,inertTargetSelector:"main",modalWrapperSelector:".modal.cookie-modal"};init(){super.init(),this._escapeHandler=this._onEscapeKey.bind(this),this._modalWrapper=this.el.closest(this.options.modalWrapperSelector),this._modalWrapper&&(this._modalWrapper.addEventListener("shown.bs.modal",()=>this._activateModalGuards()),this._modalWrapper.addEventListener("hidden.bs.modal",()=>this._deactivateModalGuards()),this._modalWrapper.classList.contains("show")&&this._activateModalGuards())}showCookieBar(){let e=window.PluginManager.getPluginInstances("ArvConsentTool");e[0]&&e[0].openCookiePopup(),this._showCookieBar(),this._setBodyPadding(),this._registerEvents()}_activateModalGuards(){let e=document.querySelector(this.options.inertTargetSelector);e&&e.setAttribute("inert",""),document.addEventListener("keydown",this._escapeHandler)}_deactivateModalGuards(){let e=document.querySelector(this.options.inertTargetSelector);e&&e.removeAttribute("inert"),document.removeEventListener("keydown",this._escapeHandler)}_onEscapeKey(e){if("Escape"!==e.key)return;e.preventDefault();let t=this.el.querySelector(this.options.buttonSelector);t&&t.click()}}},156(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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function r(e,t,i){return e.concat(t).map(function(e){return s(e,i)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||r,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=s;var l,u,h=Array.isArray(i);
1return h!==Array.isArray(e)?s(i,c):h?c.arrayMerge(e,i,c):(u={},(l=c).isMergeableObject(e)&&n(e).forEach(function(t){u[t]=s(e[t],l)}),n(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&l.isMergeableObject(i[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,l)(e[t],i[t],l):u[t]=s(i[t],l))}),u)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a},308(e,t,i){i.d(t,{A:()=>s});class s{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,r=e.split("."),n=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=n;n=function(i){s.unsubscribe(e),t(i)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:i,cb:n}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),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}}},335(e,t,i){i.d(t,{A:()=>a});var s=i(156),r=i.n(s);class n{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 i=n.toUpperCamelCase(e,t);return n.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>n.ucFirst(e.toLowerCase())).join(""):n.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}var o=i(308);class a{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new o.A(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),r().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return 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}}},452(e,t,i){i.d(t,{A:()=>s});class s{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,i){if(null==e)throw Error("You must specify a key to set a cookie");let s=new Date;s.setTime(s.getTime()+864e5*i);let r="";"https:"===location.protocol&&(r="secure"),document.cookie=`${e}=${t};expires=${s.toUTCString()};path=/;sameSite=lax;${r}`}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let s=i[e];for(;" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return!1}static removeItem(e){document.cookie=`${e}= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/`}static key(){return""}static clear(){}}},632(e,t,i){i.d(t,{A:()=>s});class s{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return s.isIPhoneDevice()||s.isIPadDevice()}static isNativeWindowsBrowser(){return s.isIEBrowser()||s.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":s.isTouchDevice(),"is-ios":s.isIOSDevice(),"is-native-windows":s.isNativeWindowsBrowser(),"is-iphone":s.isIPhoneDevice(),"is-ipad":s.isIPadDevice(),"is-ie"
1:s.isIEBrowser(),"is-edge":s.isEdgeBrowser()}}}}}]);

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.