1"use strict";(self.webpackChunks_t_r_delivery_adress=self.webpackChunks_t_r_delivery_adress||[]).push([[21993],{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!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,t):e}function r(e,t,s){return e.concat(t).map(function(e){return i(e,s)})}function n(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 l(e,s,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=i;var u,c,d=Array.isArray(s);return d!==Array.isArray(e)?i(s,o):d?o.arrayMerge(e,s,o):(c={},(u=o).isMergeableObject(e)&&n(e).forEach(function(t){c[t]=i(e[t],u)}),n(s).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&u.isMergeableObject(s[t])?c[t]=(function(e,t){if(!t.customMerge)return l;var s=t.customMerge(e);return"function"==typeof s?s:l})(t,u)(e[t],s[t],u):c[t]=i(s[t],u))}),c)}l.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,s){return l(e,s,t)},{})},e.exports=l},308(e,t,s){s.d(t,{A:()=>i});class i{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],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,r=e.split("."),n=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=n;n=function(s){i.unsubscribe(e),t(s)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:s,cb:n}),!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}}},335(e,t,s){s.d(t,{A:()=>l});var i=s(156),r=s.n(i);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 s=n.toUpperCamelCase(e,t);return n.lcFirst(s)}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 a=s(308);class l{constructor(e,t={},s=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${s}".`);return}this.el=e,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(s),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(){}destroy(){}_init(){this._initialized||(this.init(),this._initialized=!0)}
1_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),s=this.el.getAttribute(`data-${t}-config`);return s?window.PluginConfigManager.get(this._pluginName,s):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${t}-options`);if(s)try{return JSON.parse(s)}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}}},993(e,t,s){s.r(t),s.d(t,{default:()=>r});var i=s(335);
1class r extends i.A{static #e=this.options={deliveryRadiusPluginSelector:"[data-delivery-radius]",statusSelector:".delivery-radius-status",addressSelector:".delivery-radius-address",srStatusSelector:".delivery-radius-sr-status"};init(){this._button=this.el,this._statusBadge=this.el.querySelector(this.options.statusSelector),this._addressEl=this.el.querySelector(this.options.addressSelector),this._srStatus=this.el.querySelector(this.options.srStatusSelector),this._checkInitialState(),this._registerEvents()}_checkInitialState(){let e=localStorage.getItem("str_delivery_address");if(e)try{let t=JSON.parse(e);t&&t.validated&&this._updateDisplay(!0,t)}catch(e){}}_registerEvents(){this._button.addEventListener("click",this._onClick.bind(this)),document.addEventListener("delivery-radius:address-validated",e=>{e.detail&&this._updateDisplay(!0,e.detail)}),document.addEventListener("delivery-radius:address-cleared",()=>{this._updateDisplay(!1)})}_onClick(e){e.preventDefault();let t=document.querySelector(this.options.deliveryRadiusPluginSelector);if(t){let e=window.PluginManager.getPluginInstancesFromElement(t).get("DeliveryRadius");if(e&&"function"==typeof e.openModal){e.openModal();return}}document.dispatchEvent(new CustomEvent("delivery-radius:open-modal"))}_updateDisplay(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this._button.classList.toggle("has-valid-address",e),this._statusBadge&&(this._statusBadge.classList.toggle("is-valid",e),this._statusBadge.classList.toggle("is-pending",!e)),this._srStatus&&(e&&t?this._srStatus.textContent=`Lieferadresse geprueft: ${t.zipcode||""} ${t.city||""}`:this._srStatus.textContent="Lieferadresse noch nicht geprueft"),e&&t){let e=[t.street,t.houseNumber,t.zipcode,t.city].filter(Boolean).join(" ");this._button.setAttribute("aria-label",`Lieferadresse: ${e}. Klicken zum Aendern.`)}else this._button.setAttribute("aria-label","Lieferadresse pruefen");if(this._addressEl){if(e&&t&&t.zipcode){let e=(e,t)=>e&&e.length>t?`${e.substring(0,t)}...`:e||"",s=e(t.street||"",20),i=t.houseNumber||"",r=e(t.city||"",15),n=this._escapeHtml(`${s} ${i}`.trim()),a=this._escapeHtml(`${t.zipcode} ${r}`.trim());this._addressEl.innerHTML=`<span class="delivery-radius-address-line1">${n}</span><span class="delivery-radius-address-line2">${a}</span>`}else this._addressEl.innerHTML=""}}_escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}}}}]);
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.