"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{var e;const a=exports.los,s=exports.maps,t=document.querySelector("#searchFilter--map"),n=document.querySelector("#container--searchResults");function i(){var e,i,d,l,r,o,c,p,m,u,h,v,$,L,f,b,y;n.innerHTML=a.getLoadingParagraphHTML(`Loading ${a.escapedAliases.Maps}...`);let H=0;const M=document.createElement("tbody"),g=t.value.trim().toLowerCase().split(" ");for(const t of s){const s=`${null!==(e=t.mapName)&&void 0!==e?e:""} ${null!==(i=t.mapDescription)&&void 0!==i?i:""} ${null!==(d=t.mapAddress1)&&void 0!==d?d:""} ${null!==(l=t.mapAddress2)&&void 0!==l?l:""}`.toLowerCase();let n=!0;for(const e of g)if(!s.includes(e)){n=!1;break}n&&(H+=1,M.insertAdjacentHTML("beforeend",`\n \n \n ${cityssm.escapeHTML(""===(null!==(r=t.mapName)&&void 0!==r?r:"")?"(No Name)":null!==(o=t.mapName)&&void 0!==o?o:"")}\n
\n \n ${cityssm.escapeHTML(null!==(c=t.mapDescription)&&void 0!==c?c:"")}\n \n \n ${""===(null!==(p=t.mapAddress1)&&void 0!==p?p:"")?"":`${cityssm.escapeHTML(null!==(m=t.mapAddress1)&&void 0!==m?m:"")}
`}\n ${""===(null!==(u=t.mapAddress2)&&void 0!==u?u:"")?"":`${cityssm.escapeHTML(null!==(h=t.mapAddress2)&&void 0!==h?h:"")}
`}\n ${t.mapCity||t.mapProvince?`${cityssm.escapeHTML(null!==(v=t.mapCity)&&void 0!==v?v:"")}, ${cityssm.escapeHTML(null!==($=t.mapProvince)&&void 0!==$?$:"")}
`:""}\n ${""===(null!==(L=t.mapPostalCode)&&void 0!==L?L:"")?"":cityssm.escapeHTML(null!==(f=t.mapPostalCode)&&void 0!==f?f:"")}\n \n ${cityssm.escapeHTML(null!==(b=t.mapPhoneNumber)&&void 0!==b?b:"")}\n \n ${t.mapLatitude&&t.mapLongitude?'\n \n ':""}\n \n ${""===(null!==(y=t.mapSVG)&&void 0!==y?y:"")?"":''}\n \n ${t.lotCount}\n \n `))}if(n.innerHTML="",0===H)n.innerHTML=`
\n

There are no ${a.escapedAliases.maps} that meet the search criteria.

\n
`;else{const e=document.createElement("table");e.className="table is-fullwidth is-striped is-hoverable has-sticky-header",e.innerHTML=`\n ${a.escapedAliases.Map}\n Address\n Phone Number\n Coordinates\n Image\n ${a.escapedAliases.Lot} Count\n `,e.append(M),n.append(e)}}t.addEventListener("keyup",i),null===(e=document.querySelector("#form--searchFilters"))||void 0===e||e.addEventListener("submit",e=>{e.preventDefault(),i()}),i()})();