1(()=>{var tt=Object.create;var U=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var it=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty;var nt=(r,e)=>()=>(r&&(e=r(r=0)),e);var S=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ot=(r,e,i,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of rt(e))!st.call(r,o)&&o!==i&&U(r,o,{get:()=>e[o],enumerable:!(c=et(e,o))||c.enumerable});return r};var D=(r,e,i)=>(i=r!=null?tt(it(r)):{},ot(e||!r||!r.__esModule?U(i,"default",{value:r,enumerable:!0}):i,r));var L=S(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});var at=function(){function r(e){this._el=e,e.$emitter=this,this._listeners=[]}return r.prototype.publish=function(e,i,c){i===void 0&&(i={}),c===void 0&&(c=!1);var o=new CustomEvent(e,{detail:i,cancelable:c});return this.el.dispatchEvent(o),o},r.prototype.subscribe=function(e,i,c){c===void 0&&(c={});var o=this,h=e.split("."),d=c.scope?i.bind(c.scope):i;if(c.once&&c.once===!0){var O=d;d=function(_){o.unsubscribe(e),O(_)}}return this.el.addEventListener(h[0],d),this.listeners.push({splitEventName:h,opts:c,cb:d}),!0},r.prototype.unsubscribe=function(e){var i=this,c=e.split(".");return this.listeners=this.listeners.reduce(function(o,h){var d=h.splitEventName.sort().toString()===c.sort().toString();return d?(i.el.removeEventListener(h.splitEventName[0],h.cb),o):(o.push(h),o)},[]),!0},r.prototype.reset=function(){var e=this;return this.listeners.forEach(function(i){e.el.removeEventListener(i.splitEventName[0],i.cb)}),this.listeners=[],!0},Object.defineProperty(r.prototype,"el",{get:function(){return this._el},set:function(e){this._el=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"listeners",{get:function(){return this._listeners},set:function(e){this._listeners=e},enumerable:!1,configurable:!0}),r}();M.default=at});var R=S((Tt,B)=>{"use strict";var ct=function(e){return ut(e)&&!lt(e)};function ut(r){return!!r&&typeof r=="object"}function lt(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||pt(r)}var dt=typeof Symbol=="function"&&Symbol.for,ht=dt?Symbol.for("react.element"):60103;function pt(r){return r.$$typeof===ht}function ft(r){return Array.isArray(r)?[]:{}}function E(r,e){return e.clone!==!1&&e.isMergeableObject(r)?y(ft(r),r,e):r}function mt(r,e,i){return r.concat(e).map(function(c){return E(c,i)})}function gt(r,e){if(!e.customMerge)return y;var i=e.customMerge(r);return typeof i=="function"?i:y}function vt(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function $(r){return Object.keys(r).concat(vt(r))}function q(r,e){try{return e in r}catch{return!1}}function yt(r,e){return q(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function bt(r,e,i){var c={};return i.isMergeableObject(r)&&$(r).forEach(function(o){c[o]=E(r[o],i)}),$(e).forEach(function(o){yt(r,o)||(q(r,o)&&i.isMergeableObject(e[o])?c[o]=gt(o,i)(r[o],e[o],i):c[o]=E(e[o],i))}),c}function y(r,e,i){i=i||{},i.arrayMerge=i.arrayMerge||mt,i.isMergeableObject=i.isMergeableObject||ct,i.cloneUnlessOtherwiseSpecified=E;var c=Array.isArray(e),o=Array.isArray(r),h=c===o;return h?c?i.arrayMerge(r,e,i):bt(r,e,i):E(e,i)}y.all=function(e,i){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(c,o){return y(c,o,i)},{})};var St=y;B.exports=St});var H=S(w=>{"use strict";var K=w&&w.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(w,"__esModule",{value:!0});var Et=K(L()),wt=K(R()),Ct=function(){function r(e,i,c){i===void 0&&(i={}),c===void 0&&(c=!1),this.el=e,this.$emitter=new Et.default(this.el),this._pluginName=this._getPluginName(c),this.options=this._mergeOptions(i),this._initialized=!1,this._registerInstance(),this._init()}return r.prototype._init=function(){this._initialized||(this.init(),this._initialized=!0)},r.prototype._update=function(){this._initialized&&this.update()},r.prototype.update=function(){},r.prototype._registerInstance=function(){var e=window.PluginManager.getPluginInstancesFromElement(this.el);e.set(this._pluginName,this);var i=window.PluginManager.getPlugin(this._pluginName,!1);i.get("instances").push(this)},r.prototype._getPluginName=function(e){return e===!1?this.constructor.name:e},r.prototype._mergeOptions=function(e){var i=this._pluginName.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase(),c=this.parseJsonOrFail(i),o=this.el.getAttribute("data-".concat(i,"-options"))||"",h=[this.constructor.options,this.options,e];c&&h.push(window.PluginConfigManager.get(this._pluginName,c));try{o&&h.push(JSON.parse(o))}catch(d){throw new Error('The data attribute "data-'.concat(i,'-options" could not be parsed to json: ').concat(d.message||""))}return wt.default.all(h.filter(function(d){return d instanceof Object&&!(d instanceof Array)}).map(function(d){return d||{}}))},r.prototype.parseJsonOrFail=function(e){var i=this.el.getAttribute("data-".concat(e,"-config"))||"";try{return JSON.parse(i)}catch{return i}},r}();w.default=Ct});var z=S((T,F)=>{(function(r,e){typeof T=="object"&&typeof F<"u"?F.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self).postdirektAutocompleteLib=e()})(T,function(){"use strict";var r;
1(function(l){l.Buildings="buildings",l.Cities="cities",l.Districts="districts",l.PostalCodes="postalcodes",l.PostalCodesCities="postalcodes_cities",l.PostalCodesCitiesDistricts="postalcodes_cities_districts",l.PostalCodesCitiesDistrictsStreets="postalcodes_cities_districts_streets",l.PostalCodesCitiesStreets="postalcodes_cities_streets"})(r||(r={}));var e,i=r;class c{async request(t){var s;let a=new Request(t.url,{method:t.method,headers:t.headers}),n=await fetch(a);return n.status>=200&&n.status<300?!((s=n.headers.get("Content-Type"))===null||s===void 0)&&s.startsWith("application/json")?n.json():n.text():n.status===400?n.json().then(u=>{throw new Error(`${n.statusText}: ${u.message}`.trim())}):n.text().then(u=>{throw new Error(`${n.statusText} ${u}`.trim())})}}class o{static getAdapter(){return new c}}o.baseUrl="https://autocomplete2.postdirekt.de/autocomplete2/",o.headers={Accept:"application/json",Authorization:""};class h{constructor(t,s="GET",a={}){this.url="",this.method="GET",this.headers={},this.url=t,this.method=s,this.headers=a}}class d{constructor(t,s){this.addressTypeSupported=[i.PostalCodesCitiesDistrictsStreets,i.PostalCodesCitiesStreets],this.baseUrl=t,this.accessToken=s}create(t){let{subject:s,country:a}=t,n=function(u,p){var f={};for(var m in u)Object.prototype.hasOwnProperty.call(u,m)&&p.indexOf(m)<0&&(f[m]=u[m]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(m=Object.getOwnPropertySymbols(u);v<m.length;v++)p.indexOf(m[v])<0&&Object.prototype.propertyIsEnumerable.call(u,m[v])&&(f[m[v]]=u[m[v]])}return f}(t,["subject","country"]);return n.address_type&&this.addressTypeSupported.includes(s)||delete n.address_type,new h(this.buildUrl(a,s,n),"GET",Object.assign(Object.assign({},o.headers),{Authorization:"Bearer "+this.accessToken}))}buildUrl(t,s,a){let n=`${this.baseUrl}/${t}`;return n=`${n}/${s}`,n+=d.buildQueryString(a),n}static buildQueryString(t){let s=Object.entries(t).map(([a,n])=>`${encodeURIComponent(a)}=${encodeURIComponent(n)}`).join("&");return s&&(s="?"+s),s}}class O{constructor(t,s,a){this.adapter=a,this.requestBuilder=new d(s,t)}async search(t){return await this.adapter.request(t)}}class x extends d{create(t){return super.create(t)}}class _{constructor(t,s,a){this.adapter=a,this.requestBuilder=new x(s,t)}async select(t){return this.adapter.request(t)}}class b{static createSearchService(t){return new O(t,o.baseUrl+"search",o.getAdapter())}static createSelectService(t){return new _(t,o.baseUrl+"select",o.getAdapter())}createSearchService(t){return b.createSearchService(t)}createSelectService(t){return b.createSelectService(t)}}(function(l){l.A="A",l.F="F",l.P="P"})(e||(e={}));var j,Q=e;class V{constructor(){this.suggestions=[]}getByUuid(t){return this.suggestions.find(s=>s.uuid===t)||null}}class W{constructor(t){this.inputMap=t}get address(){let t={city:"",postalCode:"",street:""};return this.inputMap.forEach((s,a)=>{t[a]=s.value}),t}set address(t){for(let[s,a]of this.inputMap)a.value=t[s],a.dispatchEvent(new Event("change"))}}(function(l){l.ArrowUp="ArrowUp",l.ArrowDown="ArrowDown",l.Enter="Enter",l.Tab="Tab"})(j||(j={}));var P,g=j;class Y{render(t,s){if(!t.parentElement)throw Error("Input elements without a parent cannot be assigned a suggestion list.");this.remove(),this.currentField=t,t.setAttribute("autocomplete","none");let a=document.createElement("ul");a.setAttribute("id","datalist-"+t.id),a.setAttribute("class","datalist"),a.setAttribute("style",`width:${t.offsetWidth}px; top:${t.offsetHeight}px;`),s.map(n=>({id:n.uuid,title:[n.street,n.postalCode,n.city].filter(Boolean).join(", ")})).forEach(n=>{let u=document.createElement("li"),p=document.createTextNode(n.title);u.setAttribute("id",n.id),u.setAttribute("data-value",n.title),u.appendChild(p),a.appendChild(u)}),t.parentElement.appendChild(a),t.parentElement.classList.add("autocomplete-container"),a.addEventListener("mousedown",n=>{let u=n.target;this.itemSelect(u),setTimeout(()=>t.focus(),0)}),t.addEventListener("focusout",this.remove.bind(this)),this.removableEventHandler=this.navigationKeyListener.bind(this),t.addEventListener("keydown",this.removableEventHandler)}remove(){if(!this.removableEventHandler||!this.currentField)return;let t=document.querySelector(`[id="datalist-${this.currentField.id}"]`);t&&t.remove(),this.currentField.removeEventListener("keydown",this.removableEventHandler),this.currentField=void 0}navigationKeyListener(t){t.key in g&&(t.key!==g.Tab&&t.preventDefault(),this.triggerKeydown(t.key))}triggerKeydown(t){if(!this.currentField)return;let s=document.querySelector(`[id="datalist-${this.currentField.id}"]`);if(!s)return;let a=Array.from(s.children),n=s.querySelector("[data-active]"),u=a.find(()=>!0);
1if(n||t!==g.Enter)if(t!==g.ArrowDown||n){if(n){let p=null,f=null;a.forEach((m,v,N)=>{m===n&&(p=N[v-1],f=N[v+1])}),n.removeAttribute("data-active"),t===g.ArrowUp&&(p?(p=p,p.setAttribute("data-active","true"),p.offsetTop<s.scrollTop&&(s.scrollTop-=p.offsetHeight)):a[a.length-1].setAttribute("data-active","true")),t===g.ArrowDown&&(f?(f=f,f.setAttribute("data-active","true")):a[0].setAttribute("data-active","true")),t===g.Tab&&this.currentField.focus(),[g.Enter,g.Tab].includes(t)&&this.itemSelect(n)}}else u.setAttribute("data-active","true")}itemSelect(t){this.currentField&&(this.currentField.dataset.suggestionUuid=t.id,this.currentField.dispatchEvent(new Event("autocomplete:datalist-select")),this.remove())}}(function(l){l.City="city",l.Street="street",l.PostalCode="postalCode"})(P||(P={}));var A=P;class Z{constructor(t){this.hintText=t}render(t){if(!t.parentElement)throw Error("Input elements without a parent cannot be assigned a infobox.");if(this.hintText.length===0)return;let s=document.createElement("div"),a=document.createElement("span");s.setAttribute("class","autocomplete-infoBox"),s.setAttribute("id","autocomplete-hint"),a.innerHTML=this.hintText,s.appendChild(a),this.infoBox=s,t.parentElement.appendChild(s)}remove(){if(this.infoBox){let t=document.getElementById("autocomplete-hint");t&&t.parentNode&&(t.parentNode.removeChild(t),this.infoBox=void 0)}}}class X{constructor(t,s,a,n,u){this.navigationKeyCodes=["ArrowUp","ArrowDown","Escape","Enter","Space","Tab"],this.typingDelay=500,this.inputMap=t,this.countrySelect=s,this.deCountryId=a,this.searchService=b.createSearchService(n),this.selectService=b.createSelectService(n),this.addressSuggestions=new V,this.domAddress=new W(this.inputMap),this.listRenderer=new Y,this.hintRenderer=new Z(u)}start(){for(let t of this.inputMap.values())t.addEventListener("keyup",this.handleFieldKeystroke.bind(this)),t.addEventListener("autocomplete:datalist-select",this.handleDatalistSelect.bind(this));this.countrySelect.addEventListener("change",this.handleCountryChange.bind(this))}handleFieldKeystroke(t){this.countrySelect.value===this.deCountryId&&(this.navigationKeyCodes.includes(t.code)||this.triggerDelayedCallback(()=>this.searchAction(t.target),this.typingDelay),t.code!=="Enter"&&this.hintRenderer.remove())}handleDatalistSelect(t){let s=t.target,a=s.dataset.suggestionUuid,n=this.addressSuggestions.getByUuid(a),u=this.inputMap.get(A.Street);n&&(this.domAddress.address=n,this.selectAction(n.uuid),u&&u===s&&this.hintRenderer.render(u))}handleCountryChange(){this.countrySelect.value!==this.deCountryId&&this.listRenderer.remove()}triggerDelayedCallback(t,s){typeof this.timeoutId!==void 0&&clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(t,s)}searchAction(t){let s=this.domAddress.address,a=s.street?i.PostalCodesCitiesStreets:i.PostalCodesCities;Object.values(s).join("").trim()!==""&&this.searchService.search(this.searchService.requestBuilder.create({country:"de",subject:a,combined:Object.values(s).join(" "),address_type:Q.A})).then(n=>{this.addressSuggestions.suggestions=n.addresses.filter(u=>!!u.uuid).map(u=>({street:u.street||"",postalCode:u.postalCode||"",city:u.city||"",uuid:u.uuid,district:u.district})),t===document.activeElement&&this.listRenderer.render(t,this.addressSuggestions.suggestions)})}selectAction(t){this.selectService.select(this.selectService.requestBuilder.create({country:"de",subject:i.PostalCodesCitiesStreets,uuid:t}))}}return{init:(l,t,s,a,n,u,p)=>{let f=new X(new Map([[A.Street,l],[A.PostalCode,s],[A.City,t]]),a,n,u,p);return f.start(),f}}})});var k,J,At,Ot,C,G=nt(()=>{k=D(H()),J=D(z()),At={},Ot=r=>r.split("").reduce((e,i)=>(e<<5)-e+i.charCodeAt(0)|0,0),C=class extends k.default{options={token:null,hint:null,streetFieldSelector:null,cityFieldSelector:null,postalCodeFieldSelector:null,countryFieldSelector:null,deCountryId:null};init(){let e=Ot(this.options.streetFieldSelector+this.options.cityFieldSelector+this.options.postalCodeFieldSelector+this.options.countryFieldSelector+""),i=document.querySelector(this.options.streetFieldSelector),c=document.querySelector(this.options.cityFieldSelector),o=document.querySelector(this.options.postalCodeFieldSelector),h=document.querySelector(this.options.countryFieldSelector);J.default.init(i,c,o,h,this.options.deCountryId,this.options.token,this.options.hint),At[e]=e,[i,c,o,h].forEac
1h(d=>{d.addEventListener("change",()=>{window.formValidation.validateForm(d.form,[d])})})}}});var jt=S((Nt,I)=>{G();var _t=window.PluginManager;_t.register("AutocompletePlugin",C,"[data-autocomplete-plugin]");I.hot&&I.hot.accept()});jt();})(); 2/*! Bundled license information: 3 4@netresearch/postdirekt-autocomplete-library/dist/browser/postdirekt-autocomplete-lib.umd.js: 5 (*! ***************************************************************************** 6 Copyright (c) Microsoft Corporation. 7 8 Permission to use, copy, modify, and/or distribute this software for any 9 purpose with or without fee is hereby granted. 10 11 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 12 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 14 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 16 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 PERFORMANCE OF THIS SOFTWARE. 18 ***************************************************************************** *) 19*/
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.