{"id":8268,"date":"2026-10-03T16:06:53","date_gmt":"2026-10-03T16:06:53","guid":{"rendered":"https:\/\/staging.guardexy.eu\/?page_id=8268"},"modified":"2026-10-03T16:06:53","modified_gmt":"2026-10-03T16:06:53","slug":"care-partner-selection","status":"publish","type":"page","link":"https:\/\/www.guardexy.eu\/en\/care-partner-selection\/","title":{"rendered":"Care partner selection"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"8268\" class=\"elementor elementor-8268 elementor-8167\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0d4bc95 e-con e-atomic-element e-flexbox-base e-default-div e-c0c3a0a \" data-id=\"0d4bc95\" data-element_type=\"e-flexbox\" data-e-type=\"e-flexbox\" data-interaction-id=\"0d4bc95\" id=\"content\" data-e-type=\"e-flexbox\" data-id=\"0d4bc95\">\n    \t\t<div class=\"elementor-element elementor-element-84e7d7b elementor-widget elementor-widget-guardexy-care-process\" data-id=\"84e7d7b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"guardexy-care-process.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t  <style>.gx-care-title{font-size:clamp(28px,3vw,40px);font-weight:500;line-height:1.2;margin:0 0 28px;color:#090446}.gx-care a{color:#090446;text-underline-offset:3px}.gx-care a:hover{color:#004cff}.gx-care a.gx-care-contact{color:#fff}.gx-care-back{margin-top:28px}.gx-care button:hover{background:#090446}.gx-care{overflow-wrap:anywhere}.gx-care-summary dd{white-space:pre-wrap}.gx-care-steps a{display:block;margin:-10px -18px;padding:10px 18px;border-radius:100px;text-decoration:none}.gx-care-steps a:hover{background:#f3f2fa}.gx-care .gx-care-summary{position:relative;padding-right:72px}.gx-care .gx-care-edit-icon{position:absolute;top:12px;right:12px;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;text-decoration:none}.gx-care-edit-icon:hover{background:#e9e8f2}.gx-care-edit-icon svg{display:block;flex-shrink:0}<\/style>\n  <div class=\"gx-care\" data-lang=\"en\" data-step=\"2\" data-endpoint=\"https:\/\/www.guardexy.eu\/wp-admin\/admin-ajax.php\" data-nonce=\"609fcc0a35\" data-next=\"https:\/\/www.guardexy.eu\/en\/care-partner-selection\/\" data-back=\"https:\/\/www.guardexy.eu\/en\/care-service-request\/\">\n   <h1 class=\"gx-care-title\">Choose a&nbsp;service partner<\/h1>\n   <ol class=\"gx-care-steps\" aria-label=\"Request steps\"><li ><a href=\"https:\/\/www.guardexy.eu\/en\/care-service-request\/\">1. Installation details<\/a><\/li><li aria-current=\"step\">2. Choose a&nbsp;partner<\/li><\/ol>\n   <div class=\"gx-care-result\" role=\"status\" aria-live=\"polite\" tabindex=\"-1\"><\/div><noscript>Enable JavaScript for this two-step form. No details have been sent.<\/noscript>\n      <div class=\"gx-care-summary\" hidden><\/div>\n   <form class=\"gx-care-finish\" hidden><fieldset><legend>Choose a&nbsp;service partner<\/legend><div class=\"gx-care-partners\"><\/div><\/fieldset><div class=\"gx-care-actions\"><button type=\"submit\">Submit request to selected partner<\/button><\/div><\/form>\n   <dialog class=\"gx-care-confirm\" aria-labelledby=\"gx-care-confirm-title\"><h2 id=\"gx-care-confirm-title\">Confirm request<\/h2><p>Selected recipient of the request:<br><strong class=\"gx-care-confirm-partner\"><\/strong><\/p><p>By confirming, you send your request details to the selected partner by email and save them in ClickUp. If the partner integration is not ready, nothing is sent and an error is shown.<\/p><div class=\"gx-care-actions\"><button type=\"button\" class=\"gx-care-confirm-cancel\" autofocus>Back to selection<\/button><button type=\"button\" class=\"gx-care-confirm-submit\">Confirm request<\/button><\/div><\/dialog>\n   <div class=\"gx-care-no-partner\" hidden><h3>No partner is available for this region and inverter brand.<\/h3><p>Please contact us to discuss the next step.<\/p><a class=\"gx-care-contact\" href=\"https:\/\/www.guardexy.eu\/en\/contact\/\">Contact us<\/a><\/div>  <\/div>\n  <style>.gx-care{color:#090446;font-family:inherit;max-width:100%;font-size:16px}.gx-care [hidden]{display:none!important}.gx-care-steps{display:flex;gap:12px;padding:0;list-style:none;margin:0 0 24px;flex-wrap:wrap}.gx-care-steps li{padding:10px 18px;border:1px solid #deddea;border-radius:100px}.gx-care-steps [aria-current]{background:#090446;color:white}.gx-care-notice{padding:16px 20px;background:#f3f2fa;border-left:3px solid #090446;border-radius:8px;margin-bottom:28px}.gx-care fieldset{border:0;padding:0;margin:0 0 28px;min-width:0}.gx-care legend{font-size:20px;font-weight:600;margin-bottom:18px}.gx-care-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.gx-care label{display:block;font-weight:500;line-height:1.5}.gx-care input:not([type=checkbox]):not([type=radio]),.gx-care select,.gx-care textarea{display:block;width:100%;max-width:100%;margin-top:8px;padding:12px 14px;border:1px solid #d7d6e4;border-radius:8px;background:white;color:#090446;font:inherit;box-sizing:border-box}.gx-care textarea{resize:vertical}.gx-care button,.gx-care-contact{display:inline-block;background:#004cff;color:white;border:0;border-radius:8px;padding:14px 22px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}.gx-care button:disabled{opacity:.6;cursor:wait}.gx-care .gx-care-ack{display:flex;align-items:flex-start;gap:10px;margin:8px 0 24px;font-size:14px}.gx-care .gx-care-ack input{margin-top:5px;flex-shrink:0}.gx-care p{line-height:1.6}.gx-care-location-note{font-size:14px}.gx-care-result:not(:empty){padding:16px;border:1px solid #bcc8ff;border-radius:8px;margin:20px 0}.gx-care-partners{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.gx-care-partner{padding:22px;border:1px solid #deddea;border-radius:12px;display:block;background:#fff}.gx-care-partner:has(input:checked){border:2px solid #004cff;padding:21px;background:#f6f8ff}.gx-care-partner input{margin-right:10px}.gx-care-partner strong{font-size:18px}.gx-care-partner a{display:block;margin-top:14px}.gx-care-actions{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.gx-care-summary{padding:20px;background:#f6f6f9;border-radius:10px;margin-bottom:28px}.gx-care-summary dl{display:grid;grid-template-columns:150px 1fr;gap:8px 16px;margin:0}.gx-care-summary dt{font-weight:600}.gx-care-summary dd{margin:0;overflow-wrap:anywhere}.gx-care-hp{position:absolute;left:-9999px}.gx-care :focus-visible{outline:3px solid #4972ff;outline-offset:3px}@media(max-width:767px){.gx-care-fields,.gx-care-partners{grid-template-columns:1fr}.gx-care-summary dl{grid-template-columns:1fr}.gx-care-summary dd{margin-bottom:8px}.gx-care-actions{align-items:stretch;flex-direction:column}.gx-care button{width:100%}}<\/style>\n  <style>.gx-care-fields>.gx-care-street{grid-column:1\/-1}.gx-care input[type=hidden]{display:none!important}.gx-care-fields>label{position:relative}.gx-care-suggestions{position:absolute;left:0;right:0;z-index:50;box-shadow:0 8px 24px #09044620;display:block;border:1px solid #d7d6e4;border-radius:8px;background:#fff;max-height:240px;overflow:auto;margin-top:4px}.gx-care .gx-care-suggestions button{display:block;width:100%;background:#fff;color:#090446;text-align:left;border-radius:0;padding:10px 14px;font-weight:400}.gx-care .gx-care-suggestions button:hover,.gx-care .gx-care-suggestions button:focus{background:#edf1ff}.gx-care small{display:block;font-size:13px;font-weight:400;margin-top:8px}.gx-care [readonly]{background:#f6f6f9}.gx-care [type=file]:disabled{opacity:.6}<\/style>\n  <style>.gx-care-phone-controls{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);gap:10px}.gx-care-confirm{width:560px;max-width:calc(100vw - 32px);max-height:calc(100vh - 40px);overflow:auto;box-sizing:border-box;padding:28px;border:1px solid #deddea;border-radius:16px;color:#090446;background:#fff;font:inherit;box-shadow:0 24px 80px #09044633}.gx-care-confirm::backdrop{background:#09044680}.gx-care-confirm h2{font-size:24px;line-height:1.3;margin:0 0 20px}.gx-care-confirm p{line-height:1.6}.gx-care .gx-care-confirm-cancel{background:#f3f2fa;color:#090446}@media(max-width:480px){.gx-care-phone-controls{grid-template-columns:1fr}.gx-care-confirm{padding:20px}}<\/style>\n  <script>(function(){\n   const root=document.currentScript.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling;\n   if(!root||root.dataset.ready)return;root.dataset.ready='1';\n   const result=root.querySelector('.gx-care-result');let token='';\n   try{token=sessionStorage.getItem('gx_care_token')||'';}catch(e){}\n   const say=(text,focus=false)=>{result.textContent=text;if(focus)result.focus();};\n   async function api(op,data={}){\n    const fd=new FormData();fd.set('action','gx_care_process');fd.set('nonce',root.dataset.nonce);fd.set('op',op);fd.set('lang',root.dataset.lang||'cs');\n    for(const[k,v]of Object.entries(data))fd.set(k,v);\n    if(op==='start'||op==='finish'){if(!window.GXLocalGuard)throw new Error(root.dataset.lang==='en'?'Form verification is loading. Please try again.':'Ov\u011b\u0159en\u00ed formul\u00e1\u0159e se na\u010d\u00edt\u00e1. Zkuste to pros\u00edm znovu.');const guard=await window.GXLocalGuard.prepare(root,'care');fd.set('gx_guard_token',guard.token);fd.set('gx_guard_trap',guard.trap);}\n    const res=await (async()=>{\/* gx-care-altcha-ready *\/if(op!=='start'&&op!=='finish')return fetch(root.dataset.endpoint,{method:'POST',body:fd,credentials:'same-origin'});if(!window.GXAltcha||typeof window.GXAltcha.request!=='function')throw new Error(root.dataset.lang==='en'?'Verification is still loading. Please try again in a moment. Your details are preserved.':'Ov\u011b\u0159en\u00ed se je\u0161t\u011b na\u010d\u00edt\u00e1. Zkuste to pros\u00edm za chv\u00edli znovu. Vypln\u011bn\u00e9 \u00fadaje z\u016fst\u00e1vaj\u00ed zachov\u00e1ny.');return window.GXAltcha.request(root,op,fd);})();\n    let j;try{j=await res.json();}catch(e){throw new Error('The server returned an invalid response. Try this step again; nothing has been sent.');}\n    if(!j.success)throw new Error(j.data?.message||'This step could not be completed. Reload the page.');try{if(window.GXAnalytics&&typeof window.GXAnalytics.care==='function')window.GXAnalytics.care(j.data?.analytics,root.dataset.lang||'cs');}catch(_){}return j.data;\n   }\n   function summary(data){\n    const box=root.querySelector('.gx-care-summary');if(!box)return;box.replaceChildren();box.hidden=false;\n    const dl=document.createElement('dl');\n    for(const[k,v]of [['Name',data.draft.name],['Email',data.draft.email],['Phone',data.draft.phone||'Not provided'],['Installation',data.draft.street+', '+data.draft.municipality+' '+data.draft.postcode],['Inverter',data.brand_name],['Model',data.draft.model||'Not provided'],['Request',data.draft.description]]){\n     const dt=document.createElement('dt'),dd=document.createElement('dd');dt.textContent=k;dd.textContent=v;dl.append(dt,dd);\n    }box.append(dl);\n    const edit=document.createElement('a');edit.href=root.dataset.back;edit.className='gx-care-edit-icon';edit.setAttribute('aria-label','Edit installation details');edit.title='Edit details';\n    const svg=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','svg');svg.setAttribute('viewBox','0 0 24 24');svg.setAttribute('width','20');svg.setAttribute('height','20');svg.setAttribute('fill','none');svg.setAttribute('stroke','currentColor');svg.setAttribute('stroke-width','1.7');svg.setAttribute('stroke-linecap','round');svg.setAttribute('stroke-linejoin','round');svg.setAttribute('aria-hidden','true');\n    const path=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','path');path.setAttribute('d','M16 4l4 4M4 20l4-1L20 7a2.83 2.83 0 0 0-4-4L4 15l-1 6z');svg.append(path);edit.append(svg);box.append(edit);\n   }\n   const start=root.querySelector('.gx-care-start');\n   if(start){\n    const brandInput=start.elements.brand,otherBrandInput=start.elements.brand_other,otherBrandLabel=root.querySelector('.gx-care-brand-other');\n    const syncBrand=()=>{const other=brandInput.selectedOptions[0]?.dataset.otherBrand==='1';otherBrandLabel.hidden=!other;otherBrandInput.disabled=!other;otherBrandInput.required=other;otherBrandInput.setCustomValidity(other&&!\/[\\p{L}\\p{N}]\/u.test(otherBrandInput.value.trim())?'Enter the specific inverter brand.':'');};\n    brandInput.addEventListener('change',syncBrand);otherBrandInput.addEventListener('input',syncBrand);syncBrand();\n    const emailInput=start.elements.email,phoneInput=start.elements.phone,countryInput=start.elements.phone_country,phoneRules=JSON.parse(phoneInput.dataset.rules);\n    const checkContact=()=>{emailInput.setCustomValidity(\/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(emailInput.value.trim())?'':'Enter a valid email address.');let v=phoneInput.value.trim(),error='';const c=countryInput.value,r=phoneRules[c];if(v){if(!\/^[+0-9\\s().-]+$\/.test(v))error='Enter a valid phone number for the selected country.';else{v=v.replace(\/[\\s().-]\/g,'').replace(\/^00\/,'+');if(c==='OTHER'){if(!\/^\\+[1-9][0-9]{6,14}$\/.test(v))error='For another country, include the international calling code starting with +.';}else{if(v.startsWith('+')){if(!v.startsWith('+'+r[1]))error='The calling code does not match the selected country.';v=v.slice(r[1].length+1);}else if(!['CZ','SK','IT'].includes(c))v=v.replace(\/^0+\/,'');if(!\/^[0-9]+$\/.test(v)||v.length<r[2]||v.length>r[3]||v.length+r[1].length>15||(c!=='IT'&&v.startsWith('0')))error=error||'Enter a valid phone number for the selected country.';}}}phoneInput.setCustomValidity(error);};\n    for(const el of [emailInput,phoneInput,countryInput]){el.addEventListener('input',checkContact);el.addEventListener('change',checkContact);}\n    const submit=start.querySelector('button[type=submit]');let restoring=false;\n    submit.disabled=false;\n    start.addEventListener('submit',async e=>{\n     e.preventDefault();checkContact();syncBrand();if(!start.reportValidity())return;submit.disabled=true;\n     try{const d=await api('start',Object.fromEntries(new FormData(start)));try{sessionStorage.setItem('gx_care_token',d.token);}catch(e){throw new Error('Allow browser storage to continue to the next step. Nothing has been sent.');}location.assign(root.dataset.next);}\n     catch(e){say(e.message,true);submit.disabled=false;}\n    });\n    const f=start.elements,postcodes=root.querySelector('#gx-care-postcodes'),municipalities=root.querySelector('#gx-care-municipalities'),streets=root.querySelector('#gx-care-streets');\n    let selectedMunicipality=f.municipality_id.value,chosenStreet=null;\n    \/\/ A Google partial selection replaces the former local address; postcode input clears pending lookups.\n    root.addEventListener('gx-care-address-replaced',()=>{\n     ++postcodeSeq;++placeSeq;++streetSeq;clearTimeout(postcodeTimer);clearTimeout(placeTimer);clearTimeout(streetTimer);\n     selectedMunicipality='';chosenStreet=null;\n     for(const box of [postcodes,municipalities,streets]){box.hidden=true;addressBusy(box,false);}say('');\n    });\n    root.addEventListener('gx-care-address-apply',event=>{\n     const d=event.detail,p=d&&d.place;if(!p||!p.municipality_id||!p.region||!\/^\\d{5}$\/.test(String(p.postcode)))return;\n     choose(p);f.street.value=typeof d.street==='string'?d.street:'';f.street_id.value='';f.address_id.value='';d.applied=true;\n    });\n    const choose=p=>{++postcodeSeq;++placeSeq;++streetSeq;clearTimeout(postcodeTimer);clearTimeout(placeTimer);clearTimeout(streetTimer);streets.hidden=true;if(selectedMunicipality&&selectedMunicipality!==String(p.municipality_id)){f.street.value='';f.street_id.value='';f.address_id.value='';chosenStreet=null;}selectedMunicipality=String(p.municipality_id);f.municipality.value=p.name;f.municipality_id.value=p.municipality_id;f.region.value=p.region;if(p.postcode)f.postcode.value=p.postcode;municipalities.hidden=true;postcodes.hidden=true;for(const box of [postcodes,municipalities,streets])addressBusy(box,false);say('');};\n    const suggestions=(box,items,label,pick)=>{box.replaceChildren();box.hidden=!items.length;for(const item of items){const b=document.createElement('button');b.type='button';b.textContent=label(item);b.addEventListener('click',()=>pick(item));box.append(b);}};\n    let postcodeSeq=0,placeSeq=0,streetSeq=0,placeTimer,streetTimer,postcodeTimer;\n    const addressEn=root.dataset.lang==='en',addressStates=new Map();\n    function addressBusy(box,busy){let status=addressStates.get(box);if(!status){status=document.createElement('small');status.setAttribute('role','status');status.setAttribute('aria-live','polite');box.before(status);addressStates.set(box,status);}box.setAttribute('aria-busy',busy?'true':'false');status.textContent=busy?(addressEn?'Searching address\u2026':'Vyhled\u00e1v\u00e1m adresu\u2026'):'';}\n    function dismissAddress(box){if(box===streets){++streetSeq;clearTimeout(streetTimer);}else if(box===municipalities){++placeSeq;clearTimeout(placeTimer);}else{++postcodeSeq;clearTimeout(postcodeTimer);}box.hidden=true;addressBusy(box,false);}\n    function splitStreetAddress(value){const raw=value.trim(),chunks=raw.split(',').map(s=>s.trim()).filter(Boolean),first=chunks[0]||'',m=first.match(\/^(.*?)\\s*(\\d+(?:\\s*\\\/\\s*\\d+)?[a-zA-Z]?)$\/);const town=chunks.slice(1).map(s=>s.replace(\/\\b\\d{3}\\s?\\d{2}\\b\/g,'').trim()).filter(Boolean).join(' ');return m&&\/[A-Za-z\\u00c0-\\u024f]\/.test(m[1])?{street:m[1].trim(),house:m[2].replace(\/\\s\/g,''),town}:{street:first,house:'',town};}\n    const normalizeStreet=value=>value.normalize('NFD').replace(\/[\\u0300-\\u036f]\/g,'').toLocaleLowerCase().replace(\/\\s+\/g,' ').trim();\n\n    const lookupPostcode=async()=>{\n     const generation=++postcodeSeq;const query=f.postcode.value.replace(\/\\s\/g,'');addressBusy(postcodes,true);\n     try{const d=await api('postcode',{postcode:query});if(generation!==postcodeSeq)return;postcodes.replaceChildren();postcodes.hidden=true;\n      if(!d.available)return;if(!d.places.length){say('The postcode was not found in the address index. Check it.');f.region.value='';return;}\n      if(query.length===5&&d.places.length===1){choose(d.places[0]);return;}\n      suggestions(postcodes,d.places,p=>p.postcode+' \u00b7 '+p.name+' \u00b7 '+p.region_name,p=>{choose(p);f.postcode.focus();});\n      say('');\n     }catch(e){if(generation===postcodeSeq)say(e.message);}finally{if(generation===postcodeSeq)addressBusy(postcodes,false);}\n    };\n    f.postcode.addEventListener('input',()=>{++postcodeSeq;++placeSeq;++streetSeq;clearTimeout(streetTimer);clearTimeout(placeTimer);clearTimeout(postcodeTimer);f.municipality_id.value='';f.address_id.value='';f.region.value='';postcodes.hidden=true;municipalities.hidden=true;streets.hidden=true;chosenStreet=null;f.street_id.value='';for(const box of [postcodes,municipalities,streets])addressBusy(box,false);if(\/^[0-9]{2,5}$\/.test(f.postcode.value.replace(\/\\s\/g,''))){addressBusy(postcodes,true);postcodeTimer=setTimeout(lookupPostcode,300);}});\n    f.postcode.addEventListener('change',()=>{if(f.municipality_id.value)return;clearTimeout(postcodeTimer);if(\/^[0-9]{2,5}$\/.test(f.postcode.value.replace(\/\\s\/g,'')))lookupPostcode();});\n    f.municipality.addEventListener('input',()=>{\n     say('');f.municipality_id.value='';f.address_id.value='';f.region.value='';chosenStreet=null;f.street_id.value='';postcodes.hidden=true;streets.hidden=true;for(const box of [postcodes,municipalities,streets])addressBusy(box,false);++postcodeSeq;++streetSeq;clearTimeout(postcodeTimer);clearTimeout(streetTimer);clearTimeout(placeTimer);const generation=++placeSeq;\n     if(f.municipality.value.trim().length<2){municipalities.hidden=true;return;}\n     addressBusy(municipalities,true);placeTimer=setTimeout(async()=>{try{const d=await api('places',{query:f.municipality.value,postcode:f.postcode.value});if(generation!==placeSeq)return;suggestions(municipalities,d.places,p=>p.name+' \u00b7 '+p.postcode+' \u00b7 '+p.region_name,choose);if(!d.places.length)say('No town matches this name and postcode. Check or clear the postcode and search by town.');}catch(e){if(generation===placeSeq)say(e.message);}finally{if(generation===placeSeq)addressBusy(municipalities,false);}},300);\n    });\n    async function loadHouses(query='',offset=0){\n     if(!chosenStreet)return;const generation=++streetSeq;const chosen={...chosenStreet};addressBusy(streets,true);\n     try{const d=await api('houses',{municipality_id:chosen.municipality_id,street_id:chosen.id,query,offset});if(generation!==streetSeq)return;\n      suggestions(streets,d.houses,h=>chosen.name+' '+h.number+' \u00b7 '+chosen.municipality_name+' \u00b7 '+h.postcode,h=>{choose({...chosen,name:chosen.municipality_name,postcode:h.postcode});chosenStreet=chosen;f.street_id.value=chosen.id;f.address_id.value=h.address_id;f.street.value=chosen.name+' '+h.number;streets.hidden=true;f.street.focus();});\n      if(offset>0){const back=document.createElement('button');back.type='button';back.textContent='Previous house numbers';back.addEventListener('click',()=>loadHouses(query,Math.max(0,offset-20)));streets.prepend(back);streets.hidden=false;}\n      if(offset+d.houses.length<d.total){const more=document.createElement('button');more.type='button';more.textContent='Show more house numbers';more.addEventListener('click',()=>loadHouses(query,offset+20));streets.append(more);streets.hidden=false;}\n      if(!d.houses.length)say('You can enter the house number manually. No address point matches this selection.');\n     }catch(e){if(generation===streetSeq)say(e.message);}finally{if(generation===streetSeq)addressBusy(streets,false);}\n    }\n    f.street.addEventListener('input',()=>{\n      clearTimeout(streetTimer);streets.hidden=true;addressBusy(streets,false);say('');f.address_id.value='';const generation=++streetSeq,parts=splitStreetAddress(f.street.value);\n     streets.hidden=true;addressBusy(streets,false);\n     if(chosenStreet&&normalizeStreet(parts.street)===normalizeStreet(chosenStreet.name)&&(!parts.town||normalizeStreet(parts.town)===normalizeStreet(chosenStreet.municipality_name))){addressBusy(streets,true);streetTimer=setTimeout(()=>{if(generation===streetSeq)loadHouses(parts.house,0);},300);return;}\n     chosenStreet=null;f.street_id.value='';\n     if(parts.street.length<2)return;\n     addressBusy(streets,true);\n     streetTimer=setTimeout(async()=>{try{let searchCity=parts.town?'':f.municipality_id.value;const queryTown=parts.town||(!searchCity?f.municipality.value:'');if(queryTown){const places=await api('places',{query:queryTown,postcode:''});if(generation!==streetSeq)return;const cities=[...new Map(places.places.filter(p=>normalizeStreet(p.name)===normalizeStreet(queryTown)).map(p=>[String(p.municipality_id),p])).values()];if(cities.length===1)searchCity=String(cities[0].municipality_id);}const d=await api('streets',{municipality_id:searchCity,postcode:'',query:parts.street});if(generation!==streetSeq)return;if(parts.house){const city=parts.town?'':f.municipality_id.value,town=normalizeStreet(parts.town||f.municipality.value);const exact=[...new Map(d.streets.filter(p=>normalizeStreet(p.name)===normalizeStreet(parts.street)&&(!city||String(p.municipality_id)===city)&&(!town||normalizeStreet(p.municipality_name)===town)).map(p=>[String(p.municipality_id)+':'+String(p.id),p])).values()];if(exact.length===1){chosenStreet=exact[0];loadHouses(parts.house);return;}}const matches=parts.town?d.streets.filter(p=>normalizeStreet(p.municipality_name)===normalizeStreet(parts.town)):d.streets; suggestions(streets,matches,p=>p.name+' \u00b7 '+p.municipality_name+' \u00b7 '+p.postcode,p=>{choose({...p,name:p.municipality_name});chosenStreet=p;f.street_id.value=p.id;f.address_id.value='';f.street.value=p.name+' '+parts.house;f.street.focus();loadHouses(parts.house);});if(!matches.length)say('No matching street was found. You can enter the address manually.');}catch(e){if(generation===streetSeq)say(e.message);}finally{if(generation===streetSeq)addressBusy(streets,false);}},300);\n    });\n    for(const[input,box]of [[f.postcode,postcodes],[f.municipality,municipalities],[f.street,streets]]){input.addEventListener('keydown',e=>{if(e.key==='Escape')dismissAddress(box);if(e.key==='Enter'&&!box.hidden&&box.querySelector('button')){e.preventDefault();box.querySelector('button').click();}if(e.key==='ArrowDown'&&!box.hidden){e.preventDefault();box.querySelector('button')?.focus();}});box.addEventListener('keydown',e=>{const buttons=[...box.querySelectorAll('button')];const index=buttons.indexOf(e.target);if(e.key==='Escape'){dismissAddress(box);input.focus();}if(e.key==='ArrowDown'||e.key==='ArrowUp'){e.preventDefault();buttons[(index+(e.key==='ArrowDown'?1:-1)+buttons.length)%buttons.length]?.focus();}});}\n     start.addEventListener('focusin',e=>{for(const[input,box]of [[f.postcode,postcodes],[f.municipality,municipalities],[f.street,streets]])if(e.target!==input&&!box.contains(e.target))dismissAddress(box);});\n     document.addEventListener('click',e=>{for(const[input,box]of [[f.postcode,postcodes],[f.municipality,municipalities],[f.street,streets]])if(e.target!==input&&!box.contains(e.target)&&!e.composedPath().includes(box))dismissAddress(box);});\n    if(token){\n     restoring=true;const controls=[...start.querySelectorAll('input,select,textarea,button')].filter(el=>!el.disabled);for(const el of controls)el.disabled=true;say('');\n     api('load',{token}).then(d=>{for(const[k,v]of Object.entries(d.draft))if(f[k])f[k].value=v;selectedMunicipality=f.municipality_id.value;if(d.street_name&&d.draft.street_id)chosenStreet={id:d.draft.street_id,name:d.street_name,municipality_id:d.draft.municipality_id,municipality_name:d.draft.municipality,postcode:d.draft.postcode,region:d.draft.region};say('');})\n     .catch(()=>{try{sessionStorage.removeItem('gx_care_token');}catch(e){}say('The previous draft has expired. Complete a new request.');})\n     .finally(()=>{restoring=false;for(const el of controls)el.disabled=false;syncBrand();});\n    }\n   }\n   const finish=root.querySelector('.gx-care-finish');\n   if(finish){\n    if(!token){say('Complete the first step using the Installation details link.');return;}\n    say('');\n    api('load',{token}).then(d=>{\n     say('');summary(d);\n     if(d.draft.record_id){say('The request has already been processed. No additional email or task was created.'+' Reference: '+d.draft.id);return;}\n     if(!d.partners.length){root.querySelector('.gx-care-no-partner').hidden=false;return;}\n     finish.hidden=false;const list=root.querySelector('.gx-care-partners');list.replaceChildren();\n     for(const p of d.partners){\n      const card=document.createElement('div');card.className='gx-care-partner';\n      const label=document.createElement('label'),radio=document.createElement('input'),strong=document.createElement('strong');radio.type='radio';radio.name='partner';radio.value=p.id;radio.required=true;strong.textContent=p.name;label.append(radio,strong);card.append(label);\n      if(p.description){const text=document.createElement('p');text.textContent=p.description;card.append(text);}\n      if(p.web){const a=document.createElement('a');a.href=p.web;a.target='_blank';a.rel='noopener noreferrer';a.textContent='Partner website';card.append(a);}list.append(card);\n     }\n    }).catch(e=>say(e.message,true));\n    const dialog=root.querySelector('.gx-care-confirm'),send=finish.querySelector('button[type=submit]'),confirm=dialog.querySelector('.gx-care-confirm-submit');let pendingPartner='',busy=false;\n    dialog.querySelector('.gx-care-confirm-cancel').addEventListener('click',()=>dialog.close());dialog.addEventListener('close',()=>send.focus());\n    finish.addEventListener('submit',e=>{e.preventDefault();if(busy||!finish.reportValidity())return;const chosen=finish.querySelector('input[name=partner]:checked');if(!chosen)return;pendingPartner=chosen.value;dialog.querySelector('.gx-care-confirm-partner').textContent=chosen.parentElement.querySelector('strong').textContent;dialog.showModal();});\n    confirm.addEventListener('click',async()=>{if(busy||!pendingPartner)return;busy=true;confirm.disabled=true;send.disabled=true;dialog.close();try{const data=await api('finish',{token,partner:pendingPartner,confirmed_partner:pendingPartner});finish.hidden=true;say(data.message+' Reference: '+data.reference,true);}catch(e){say(e.message,true);send.disabled=false;}finally{busy=false;confirm.disabled=false;pendingPartner='';}});\n   }\n  })();<\/script>\n  \t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ec02f2 elementor-widget elementor-widget-html\" data-id=\"4ec02f2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style data-gx-care-design=\"homepage5\">\n.elementor-8268 .gx-care{color:#090446;}\n.elementor-8268 .gx-care .gx-care-title{font-family:\"Albert Sans\",sans-serif;font-size:60px;line-height:1.2;font-weight:200;color:#090446;margin:0 0 24px;}\n.elementor-8268 .gx-care legend{font-size:24px;line-height:32px;font-weight:500;color:#090446;}\n.elementor-8268 .gx-care button:not(.gx-care-edit){font-family:\"Albert Sans\",sans-serif;font-size:16px;line-height:24px;font-weight:600;letter-spacing:1.1px;text-transform:uppercase;border-radius:50px;padding:12px 24px;}\n@media(max-width:767px){.elementor-8268 .gx-care .gx-care-title{font-size:40px;line-height:48px;}.elementor-8268 .gx-care button:not(.gx-care-edit){max-width:100%;white-space:normal;}}\n.elementor-8268 .gx-care{max-width:1296px;margin-inline:auto;}\n<\/style>\t\t\t\t<\/div>\n\t\t\n<\/div>\n\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Choose a&nbsp;service partner 1. Installation details 2. Choose a&nbsp;partner Enable JavaScript for this two-step form. No details have been sent. Choose a&nbsp;service partner Submit request to selected partner Confirm request Selected recipient of the request: You are confirming the request to the selected partner. Delivery is currently authorized only for Test s.r.o.; email is sent [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-8268","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/pages\/8268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/comments?post=8268"}],"version-history":[{"count":0,"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/pages\/8268\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.guardexy.eu\/en\/wp-json\/wp\/v2\/media?parent=8268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}