@iamproperty/components 4.1.1-beta-5 → 4.1.1-beta-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/assets/css/components/component.reset.css +1 -1
  2. package/assets/css/components/component.reset.css.map +1 -1
  3. package/assets/css/core.min.css +1 -1
  4. package/assets/css/core.min.css.map +1 -1
  5. package/assets/css/style.min.css +1 -1
  6. package/assets/css/style.min.css.map +1 -1
  7. package/assets/img/buyer.png +0 -0
  8. package/assets/img/estate-agents.png +0 -0
  9. package/assets/img/illustrations/modified/auctioneer-28days.png +0 -0
  10. package/assets/img/illustrations/modified/auctioneer-56days.png +0 -0
  11. package/assets/img/seller.png +0 -0
  12. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  13. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  14. package/assets/js/components/address-lookup/address-lookup.component.js +1 -1
  15. package/assets/js/components/address-lookup/address-lookup.component.min.js +4 -4
  16. package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
  17. package/assets/js/components/applied-filters/applied-filters.component.min.js +3 -3
  18. package/assets/js/components/applied-filters/applied-filters.component.min.js.map +1 -1
  19. package/assets/js/components/card/card.component.min.js +1 -1
  20. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  21. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  22. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  23. package/assets/js/components/header/header.component.min.js +1 -1
  24. package/assets/js/components/nav/nav.component.min.js +1 -1
  25. package/assets/js/components/notification/notification.component.min.js +1 -1
  26. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  27. package/assets/js/components/table/table.component.min.js +1 -1
  28. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  29. package/assets/js/dynamic.min.js +1 -1
  30. package/assets/js/modules/applied-filters.js +10 -1
  31. package/assets/js/scripts.bundle.js +2 -2
  32. package/assets/js/scripts.bundle.js.map +1 -1
  33. package/assets/js/scripts.bundle.min.js +2 -2
  34. package/assets/js/scripts.bundle.min.js.map +1 -1
  35. package/assets/sass/foundations/reboot.scss +3 -0
  36. package/assets/ts/components/address-lookup/address-lookup.component.ts +1 -1
  37. package/assets/ts/modules/applied-filters.ts +16 -3
  38. package/dist/components.es.js +19 -14
  39. package/dist/components.umd.js +14 -14
  40. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  (function(w,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(w=typeof globalThis<"u"?globalThis:w||self,o(w.iamkey={},w.Vue))})(this,function(w,o){"use strict";const A=(a,e)=>{const t=a.__vccOpts||a;for(const[n,l]of e)t[n]=l;return t},rt={name:"Logo",props:{id:{type:String,required:!1,default:"property"},path:{type:String,required:!1,default:"/svg/logo.svg"},desc:{type:String}},computed:{src:function(){return"#logo-"+this.id},className:function(){return"brand brand--"+this.id}}},nt=["xlink:href"],it=["innerHTML"];function st(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(i.className)},[(o.openBlock(),o.createElementBlock("svg",null,[o.createElementVNode("title",null,"iam "+o.toDisplayString(t.id),1),o.createElementVNode("use",{"xlink:href":t.path+i.src},null,8,nt)])),t.desc?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:t.desc},null,8,it)):o.createCommentVNode("",!0)],2)}const lt=A(rt,[["render",st]]);/*!
2
- * iamKey v4.1.1-beta-5
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const ct=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},dt=(a,e)=>String(a).padStart(e,"0"),mt=a=>a.charAt(0).toUpperCase()+a.slice(1);var ut=function(a,e,t,n){function l(i){return i instanceof t?i:new t(function(r){r(i)})}return new(t||(t=Promise))(function(i,r){function s(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?i(u.value):l(u.value).then(s,d)}c((n=n.apply(a,e||[])).next())})};const P=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{const l=Array.from(t.querySelectorAll("th, td")),i=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","error"];l.forEach((r,s)=>{const d=e[s];if(typeof d<"u"){let c=document.createElement("div");c.innerHTML=d.innerHTML;let u=c.textContent||c.innerText||"";r.setAttribute("data-label",u),d.hasAttribute("data-td-class")&&r.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(r.setAttribute("data-format",d.getAttribute("data-format")),r.innerHTML=B(d.getAttribute("data-format"),r.textContent.trim())),i.includes(r.textContent.trim().toLowerCase())&&r.setAttribute("data-content",r.textContent.trim().toLowerCase())}})})},ht=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{let l=window.getComputedStyle(document.querySelector("html")),i=t.querySelector(":scope > *:last-child > *:first-child");if(i){i.classList.add("text-nowrap");let r=i.offsetWidth/parseFloat(l.fontSize);r+=1.7,e=e>r?e:r}}),e},pt=(a,e)=>{if(e.classList.contains(".table--fullwidth")&&!e.hasAttribute("data-expandable")||a.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(a.querySelectorAll("thead tr")).forEach((t,n)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{t.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button>Expand</button></td>')})},bt=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let t=e.target.closest("[data-expand-button]"),n=t.closest("tr");n.getAttribute("data-view")=="full"?n.setAttribute("data-view","default"):n.setAttribute("data-view","full"),t.blur()}})},I=(a,e)=>{let t=e.querySelector("[data-search]");if(!t)return!1;const n=t.getAttribute("id"),l=t.getAttribute("data-search").split(",");let i=t.parentNode,r={};l.forEach((s,d)=>{Array.from(a.querySelectorAll('td[data-label="'+s.trim()+'"]')).forEach((c,u)=>{c.querySelector(".td__content")?r[c.querySelector(".td__content").textContent]=c.querySelector(".td__content").textContent:r[c.textContent]=c.textContent})}),t.setAttribute("list",`${n}_list`),t.setAttribute("autocomplete","off"),i.querySelector("datalist")||(i.innerHTML+=`<datalist id="${n}_list"></datalist>`),i.querySelector("datalist").innerHTML=`${Object.keys(r).map(s=>`<option value="${s}"></option>`).join("")}`},ft=(a,e,t,n,l)=>{var i;let r=function(c,u=!1){if(e.classList.contains("processing"))return!1;if(c.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((m,b)=>{const p=m.getAttribute("data-duplicate"),h=document.getElementById(p),f=document.querySelector(`[for="${p}"] iam-card`);if(h.checked!=m.checked)if(f){let y=new Event("click");f.dispatchEvent(y)}else h.checked=m.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!u){let m=e.querySelector("[data-pagination]");m.value=1,n.setAttribute("data-page",1)}X(a,e,t,n)}else e.hasAttribute("data-submit")?e.submit():(M(a,e,n),$(a,e));if(e.hasAttribute("data-ajax-post")){let m=new FormData(e),b=new URLSearchParams(m).toString();const p=new XMLHttpRequest;p.open("GET",`${window.location.href}?ajax=true&${b}`),p.send()}};e.addEventListener("keyup",c=>{clearTimeout(i),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&(i=setTimeout(function(){r(c)},500))}),e.addEventListener("change",c=>{clearTimeout(i),c&&c.target instanceof HTMLElement&&c.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||O(a,e,l),r(c)),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter][data-no-ajax]")?(M(a,e,n),$(a,e)):(c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter]")&&c.target.closest("form .dialog__wrapper > dialog")||c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter]")&&!c.target.closest("form dialog"))&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-show]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-mimic]")&&r(c)}),e.addEventListener("click",c=>{if(clearTimeout(i),c&&c.target instanceof HTMLElement&&c.target.closest('dialog button:not([type="button"])')&&c.target.closest('dialog button:not([type="button"])').closest("dialog").close(),c&&c.target instanceof HTMLElement&&c.target.closest(".dialog__close")&&(c.preventDefault(),c.stopPropagation()),c&&c.target instanceof HTMLElement&&c.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((m,b)=>{m.innerHTML=""});let u=e.elements;for(let m=0;m<u.length;m++)switch(u[m].type.toLowerCase()?u[m].type.toLowerCase():"text"){case"text":case"password":case"textarea":u[m].value="";break;case"radio":case"checkbox":if(u[m].checked){let b=u[m],p=b.getAttribute("id"),h=document.querySelector(`[for="${p}"`);if(h.querySelector("iam-card")){let f=h.querySelector("iam-card"),y=new Event("click");f.dispatchEvent(y)}b.checked=!1}break;case"select-one":case"select-multi":u[m].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||O(a,e,l),r(c)}}),e.addEventListener("submit",c=>{clearTimeout(i),e.hasAttribute("data-submit")||c.preventDefault(),r(c)}),e.addEventListener("force",c=>{r(c)}),e.addEventListener("paginate",c=>{r(c,!0)});let s=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((c,u)=>{let m=c.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${m}"]`)).forEach((b,p)=>{let h=b.closest("form");s.includes(h)||s.push(h),d.includes(m)||d.push(m)})}),s.forEach((c,u)=>{const m=function(){let b=[],p=new FormData(c);for(const[h,f]of p)document.querySelector(`[data-mimic="${h}"]`)&&!b.includes(h)?(b.push(h),document.querySelector(`[data-mimic="${h}"]`).value=f):document.querySelector(`[data-mimic="${h}"]`)&&(document.querySelector(`[data-mimic="${h}"]`).value+=","+f);for(const h of b){const f=new Event("force");e.dispatchEvent(f)}for(const h of d)if(!p.has(h)&&c.querySelector(`[name="${h}"]`)){document.querySelector(`[data-mimic="${h}"]`).value="";const f=new Event("force");e.dispatchEvent(f)}};c.addEventListener("force",b=>{m()}),c.addEventListener("change",b=>{m()})})},O=(a,e,t)=>{if(e.getAttribute("data-ajax"))return!1;let n=a.querySelector("tbody"),l=e.querySelector("[data-sort]"),i=l.querySelector(`option:nth-child(${l.selectedIndex+1})`),r=i.getAttribute("data-sort"),s=i.getAttribute("data-order"),d=i.getAttribute("data-format");if(!r)return n.innerHTML=t.innerHTML,P(a),!1;let c=[];["asc","desc","descending"].includes(s)||(c=s.split(","));let u=[];Array.from(n.querySelectorAll("tr")).forEach((b,p)=>{let h=b.querySelector('td[data-label="'+r+'"], th[data-label="'+r+'"]').textContent.trim();b.querySelector('[data-label="'+r+'"] .td__content')&&(h=b.querySelector('[data-label="'+r+'"] .td__content').textContent.trim()),c.length&&c.includes(h)&&(h=c.indexOf(h)),ct(h)&&(h=dt(h,10)),d&&d=="date"&&(h=new Date(h));const f={index:h,row:b};u.push(f)}),u.sort((b,p)=>b.index>p.index?1:-1),(s=="descending"||s=="desc")&&(u=u.reverse());let m="";u.forEach((b,p)=>{m+=b.row.outerHTML}),n.innerHTML=m},M=(a,e,t)=>{a.classList.remove("table--filtered");let n=W(e),l=[],i=0,r=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,s=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((c,u)=>{c.classList.remove("filtered"),c.classList.remove("filtered--matched"),c.classList.remove("filtered--show"),c.removeAttribute("data-filtered-by")}),e.querySelector("[data-search]")){let c=e.querySelector("[data-search]");e.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((u,m)=>{l.push({column:`${u.trim()}`,value:`${c.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML="",c.parentNode.classList.remove("hover")});let d=0;Object.values(n).forEach((c,u)=>{typeof c=="object"&&Object.values(c).length?d+=Object.values(c).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML+=`(${d})`,c.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[c,u]of Object.entries(n))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((m,b)=>{let p=!1;u.forEach((h,f)=>{let y=m.querySelector(`[data-label="${c}"]`);if(h&&h=="$today")h=B("date",new Date);else if(h&&h=="$yesterday"){let v=new Date;v.setDate(v.getDate()-1),h=B("date",v)}else if(h&&(h=="$thisWeek"||h=="$lastWeek")){let v=new Date,S=new Date(v.setDate(v.getDate()-(v.getDay()-1))),x=new Date(v.setDate(v.getDate()-v.getDay()+7)),k=new Date(y.textContent.toLowerCase());if(v.setHours(0,0,0,0),S.setHours(0,0,0,0),x.setHours(0,0,0,0),k.setHours(0,0,0,0),h=="$thisWeek")p=k>=S&&k<=x;else{let V=new Date(S.setDate(S.getDate()-7)),E=new Date(x.setDate(x.getDate()-7));V.setHours(0,0,0,0),E.setHours(0,0,0,0),p=k>=V&&k<=E}}else if(h&&h=="$thisMonth"){let v=new Date,S=v.getFullYear(),x=v.getMonth();var g=new Date(S,x,1),_=new Date(S,x+1,0);let k=new Date(y.textContent.toLowerCase());g.setHours(0,0,0,0),_.setHours(0,0,0,0),k.setHours(0,0,0,0),p=k>=g&&k<=_}else if(h&&h=="$lastMonth"){let v=new Date,S=v.getFullYear(),x=v.getMonth();var L=new Date(S,x-1,1),q=new Date(S,x,0);let k=new Date(y.textContent.toLowerCase());L.setHours(0,0,0,0),q.setHours(0,0,0,0),k.setHours(0,0,0,0),p=k>=L&&k<=q}y&&y.textContent.toLowerCase().includes(h.toLowerCase())&&(p=!0)}),p||(m.classList.add("filtered"),m.setAttribute("data-filtered-by",c))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((c,u)=>{let m=!(l.length>0&&l[0].value.length>=3);l.forEach((b,p)=>{let h=c.querySelector(`[data-label="${b.column}"]`);h&&b.value.length>=3&&h.textContent.toLowerCase().includes(b.value.toLowerCase())&&(m=!0)}),m||c.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((c,u)=>{i++,c.classList.add("filtered--matched"),Math.ceil(i/s)==parseInt(r)&&c.classList.add("filtered--show")}),t&&(t.setAttribute("data-total",i),t.setAttribute("data-show",s),t.setAttribute("data-page",r))},$=(a,e,t)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((n,l)=>{let i=n.getAttribute("data-query"),r;if(i=="total")t.hasAttribute("data-total")?r=t.getAttribute("data-total"):r=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!i.includes(" == ")&&i.includes(" & ")){let s=i.split(" & "),d="";s.forEach(c=>{d+=`:not([data-filtered-by="${c}"])`}),r=Array.from(a.querySelectorAll(`tbody tr${d}`)).length}else if(!i.includes(" == "))r=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${i}"])`)).length;else if(i.includes(" && ")){let s=i.split(" && ");r=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let c=!0;for(const[u,m]of Object.entries(s)){let b=m.split(" == ");(!d.querySelector(`td[data-label="${b[0]}"]`)||d.querySelector(`td[data-label="${b[0]}"]`).textContent!=`${b[1]}`)&&(c=!1)}return c}).length}else{let s=i.split(" == ");r=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${s[0]}"], tbody tr[data-filtered-by="${s[0]}"] td[data-label="${s[0]}"]`)).filter(function(d){return d.textContent===s[1]}).length}n.hasAttribute("data-total")?n.setAttribute("data-total",r):n.innerHTML=r})},gt=function(a,e,t,n){t.addEventListener("update-page",l=>{let i=e.querySelector("[data-pagination]"),r=l.detail.page;if(i.value=r,e.dispatchEvent(new Event("paginate")),n.setAttribute("data-page",r),a.hasAttribute("data-show-history")){const s=new URL(location);s.searchParams.set("page",r),history.pushState({type:"pagination",form:e.getAttribute("id"),page:r},"",s)}if(!n.hasAttribute("data-no-scroll")){const s=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:s,behavior:"smooth"})}}),t.addEventListener("update-show",l=>{let i=e.querySelector("[data-show]"),r=l.detail.show;i.value=r,n.setAttribute("data-show",r),e.dispatchEvent(new Event("submit"))})},yt=(a,e)=>{if(!a)return!1;a.addEventListener("click",t=>{wt(e)})},wt=function(a){for(var e=[],t=a.getElementsByTagName("tr"),n=0;n<t.length;n++){for(var l=t[n].querySelectorAll("td,th"),i=[],r=0;r<l.length;r++)i.push(`"${l[r].textContent}"`);e.push(i.join(","))}e=e.join(`
5
5
  `);let s=new Blob([e],{type:"text/csv"});var d=document.createElement("a");d.download="export.csv";var c=window.URL.createObjectURL(s);d.href=c,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d)},U=function(a,e,t,n){if(P(a),pt(a,n),$(a,e,n),n&&n.classList.contains("table--cta")){let l=function(){Array.from(a.querySelectorAll("tr")).forEach((r,s)=>{let d=r.offsetHeight;r.style.setProperty("--row-height",`${d}px`)})};const i=ht(a);n.style.setProperty("--cta-width",`${i}rem`),new ResizeObserver(l).observe(a)}},W=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((t,n)=>{if(!(t.type=="radio"&&!t.checked)&&!(t.type=="checkbox"&&!t.checked)&&t&&t.value){let l=t.getAttribute("data-filter");e[l]||(e[l]=new Array),e[l].push(t.value)}}),e},X=function(a,e,t,n){return ut(this,void 0,void 0,function*(){const l=(p,h,f)=>h.split(/[\.\[\]\'\"]/).filter(y=>y).reduce((y,g)=>y?y[g]:f,p);let i=new FormData(e),r=new URLSearchParams(i).toString(),s=a.querySelectorAll("thead tr th"),d=a.querySelector("tbody"),c=e.getAttribute("data-ajax");n.classList.add("table--loading");let u=W(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,h)=>{p.innerHTML="",p.parentNode.classList.remove("hover")});let m=0;Object.values(u).forEach((p,h)=>{typeof p=="object"&&Object.values(p).length?m+=Object.values(p).length:m++}),m&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,h)=>{p.innerHTML+=`(${m})`,p.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:b}=controller[c];t.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(c+"?"+r,{signal:b,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(p=>p.json()).then(p=>{let h=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",f=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",y=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",g=l(p,f,15),_=l(p,y,1),L=l(p,h),q=n.hasAttribute("data-empty-msg")?n.getAttribute("data-empty-msg"):"No results found";L?(d.innerHTML="",L.forEach((v,S)=>{var x=document.createElement("tr");s.forEach((k,V)=>{let E="";var D=document.createElement("td");if(D.setAttribute("data-label",k.innerText),k.getAttribute("data-output")){var z=k.getAttribute("data-output");E=z.replace(new RegExp(/{(.*?)}/,"gm"),function(ur){return l(v,ur.replace("{","").replace("}",""))})}if(k.hasAttribute("data-output-array")){var z=k.getAttribute("data-output");let hr=l(v,z.replace("{","").replace("}",""));E="",hr.forEach((ot,Lr)=>{let pr=k.getAttribute("data-output-array"),C="";if(k.hasAttribute("data-output-array-property")&&k.hasAttribute("data-output-array-transform")){const F=l(ot,k.getAttribute("data-output-array-property")),br=JSON.parse(k.getAttribute("data-output-array-transform"))[F];C=pr.replace(`{${k.getAttribute("data-output-array-property")}}`,br)}C=C.replace(new RegExp(/{(.*?)}/,"gm"),function(F){return l(ot,F.replace("{","").replace("}",""))}),E+=C})}k.hasAttribute("data-transform")&&(E=JSON.parse(k.getAttribute("data-transform"))[E],!E&&k.hasAttribute("data-default")&&(E=k.getAttribute("data-default"))),D.innerHTML=E,x.appendChild(D)}),d.appendChild(x)}),I(a,e),n.setAttribute("data-total",parseInt(g)),n.setAttribute("data-page",parseInt(_)),U(a,e,t,n),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((v,S)=>{let x=l(p,v.getAttribute("data-ajax-query"),"");v.hasAttribute("data-total")?v.setAttribute("data-total",x):v.innerHTML=x}),parseInt(g)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${q}</span></td></tr>`),n.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:c,formData:r})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',t.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(p){console.log(p)}})},B=(a,e)=>{switch(a){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{year:"2-digit",month:"long",day:"numeric"});case"capitalise":return e=mt(e)}};class vt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
@@ -29,7 +29,7 @@
29
29
  <iam-pagination class="pagination--table" ${this.hasAttribute("data-page")?`data-page="${this.getAttribute("data-page")}"`:""} ></iam-pagination>
30
30
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",`<style id="tableExtras">*:has(>iam-table){container-type:inline-size}iam-table{--hover-background: var(--colour-light);--row-bg: var(--colour-canvas-2)}iam-table thead tr{background:var(--row-bg)}iam-table tbody tr{background:var(--row-bg)}iam-table tbody tr:is(:hover,:focus-within,.hover){--bg-colour-rgb: 238,238,238;--row-bg: var(--hover-background);background:var(--row-bg)}@media screen and (prefers-color-scheme: dark){iam-table tbody tr{--hover-background: var(--colour-canvas)}iam-table tbody tr:is(:hover,:focus-within,.hover){background:var(--row-bg)}}@container (width < 23.4375em){iam-table:not(.table--fullwidth) thead{display:none}iam-table:not(.table--fullwidth) tbody{display:block;overflow:visible}iam-table:not(.table--fullwidth) tbody tr td:first-child{padding-top:0}iam-table:not(.table--fullwidth) tr{display:block;position:relative;border:none;background:var(--row-bg);padding:var(--wrapper-padding);box-shadow:0px 6px 12px rgba(0,0,0,.11);border-radius:0.5rem}iam-table:not(.table--fullwidth) tr+tr{margin-top:2rem}iam-table:not(.table--fullwidth) tr:is(:hover,:focus,.hover){--row-bg: var(--colour-canvas-2)}iam-table:not(.table--fullwidth) :is(td,th){display:block;border-color:var(--colour-border);padding-right:0}iam-table:not(.table--fullwidth) :is(td,th):nth-child(1){border-top:none}iam-table:not(.table--fullwidth) :is(td,th)[data-label]:not([data-label=""]):before{content:attr(data-label);color:var(--colour-heading);padding:0 0 0.375rem 0;margin-bottom:0;display:block;font-weight:bold}iam-table:not(.table--fullwidth) td:first-child::after{top:1.75rem !important}iam-table:not(.table--fullwidth) td::after{top:2.5rem}iam-table:not(.table--fullwidth) .td--fixed{padding-right:50%}iam-table:not(.table--fullwidth) tbody tr td:not(:first-child){border-top:var(--border-width) solid currentColor;border-color:var(--colour-border) !important}iam-table:not(.table--fullwidth) tr:not([data-view=full]) td p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}iam-table:not(.table--fullwidth) td:has([data-expand-button]){height:0;padding:0;position:relative}iam-table:not(.table--fullwidth) td:has([data-expand-button])+td{border-top:none !important;padding-top:0 !important}iam-table:not(.table--fullwidth) [data-expand-button]{top:0;right:0;background:rgba(0,0,0,0) !important;border:none;position:absolute;overflow:hidden;--compact-size: 2rem}iam-table:not(.table--fullwidth) [data-expand-button]:before{font-family:"Font Awesome 6 Pro";content:"";font-weight:300 !important;font-size:1.75rem;line-height:var(--compact-size) !important}iam-table:not(.table--fullwidth) tr[data-view=full] [data-expand-button]:before{content:"";font-weight:900 !important}iam-table:not(.table--fullwidth) .dialog__wrapper{margin-top:-0.5rem;margin-left:-1rem;z-index:10}iam-table:not(.table--fullwidth) tbody tr:not([data-view=full]) td:not(.td--fixed)+td:not(.td--fixed)+td+td{display:none}iam-table.table--cta:not(.table--fullwidth) tr td:not(:first-child):last-child{display:block !important;position:static;width:100%;min-width:100%;margin-left:0;padding-left:0;text-align:left;min-height:0}iam-table.table--cta:not(.table--fullwidth) tr td:not(:first-child):last-child:after{display:none}}@container (width > 23.4375em){iam-table.table--cta:not(.table--loading):has(tr:first-child td:first-child:last-child){padding-right:calc(var(--wrapper-padding) + 1.5rem)}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>th:nth-last-child(2),iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>td:nth-last-child(2){padding-right:var(--cta-width)}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child{position:absolute;left:calc(100% - var(--cta-width));top:auto;background:rgba(0,0,0,0);width:var(--cta-width);min-height:calc(var(--row-height) - 2px);text-align:right;background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem);cursor:default}@media screen and (prefers-color-scheme: dark){iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child{background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem)}}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child a{white-space:nowrap;padding-right:.2rem}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tbody tr:hover>*:not(:first-child):last-child{background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem)}}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta){position:relative}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) thead{position:sticky;top:0;left:0;z-index:1;background-color:var(--row-bg)}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) thead:before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--colour-primary)}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody{position:relative}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody tr:first-child td{border-top:0}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody tr:last-child td{border-bottom:0}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty)){position:relative;padding-left:1.5rem}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty))::before{margin-left:-1.5rem !important}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty)):after{font-family:"Font Awesome 6 Pro";position:absolute;top:1rem;left:0;font-size:1rem;line-height:1;height:1rem;width:1rem;display:inline-block}table [data-content=high]:after{content:"";font-weight:normal;color:var(--colour-danger)}table [data-content=medium]:after{content:"";font-weight:normal;color:var(--colour-warning)}table [data-content=low]:after{content:"";font-weight:normal;color:var(--colour-complete)}table [data-content=unknown]:after{content:"";font-weight:normal;color:var(--colour-muted)}table :is([data-content=overdue],[data-content=due],[data-content=incomplete]):after{content:"";color:var(--colour-danger)}table :is([data-content="not started"],[data-content="to do"],[data-content="on track"]):after{content:"";color:var(--colour-muted)}table :is([data-content="requires approval"],[data-content="approval required"],[data-content=upcoming]):after{content:"";color:var(--colour-warning)}table :is([data-content=warning]):after{content:"";color:var(--colour-warning)}table :is([data-content=verified],[data-content=completed],[data-content=complete]):after{content:"";font-weight:normal;color:var(--colour-complete)}table .alert-status:not([data-content="0"]):not([data-content=""]):not(:empty):after{content:"";color:var(--colour-primary)}iam-table .table--filtered tbody tr:not(.filtered--show){display:none !important}iam-table table:not(.table--filtered):not(.table--ajax) tbody tr:nth-child(15)~tr{display:none}iam-table input:is([type=radio],[type=checkbox])+label{padding-left:0 !important;margin:0 !important}iam-table input:is([type=radio],[type=checkbox])+label:before,iam-table input:is([type=radio],[type=checkbox])+label:after{top:.75rem !important;left:.25rem !important}iam-table:has([type=checkbox]:checked) tr:has([type=checkbox]) [type=checkbox]{width:100vw;height:100%;max-height:var(--row-height);max-width:100vw;cursor:pointer;pointer-events:all;top:auto;margin:0;margin-top:0rem}iam-table tr:has([type=checkbox]:checked){--row-bg: #E0E0E0}@media screen and (prefers-color-scheme: dark){iam-table tr:has([type=checkbox]:checked){--row-bg: #000000}}@container (width < 23.4375em){@media screen and (prefers-color-scheme: light){iam-table:has([slot=before]) iam-actionbar{background-color:#e6eaec}}iam-table:has([slot=before]) .actionbar__sticky+*{margin-top:0 !important}iam-table input:is([type=radio],[type=checkbox])+label{padding-left:0 !important;margin:0 !important;min-height:2rem}iam-table input:is([type=radio],[type=checkbox])+label:before,iam-table input:is([type=radio],[type=checkbox])+label:after{top:.25rem !important;left:0 !important}iam-table:has([type=checkbox]:checked) tr:has([type=checkbox]) [type=checkbox]{width:100%;height:100%;max-height:100%;max-width:100%;margin-top:-2rem}}iam-table.table--fullwidth:not([data-expandable]) th.expand-button-heading{display:none}iam-table.table--fullwidth:not([data-expandable]) td:has([data-expand-button]){display:none}@container (width > 23.4375em){iam-table:not([data-expandable]) th.expand-button-heading{display:none}iam-table:not([data-expandable]) td.td--expand{display:none}iam-table[data-expandable] [data-expand-button]{margin:0}iam-table[data-expandable] [data-expand-button]:before{font-family:"Font Awesome 6 Pro";content:"";font-weight:500}iam-table[data-expandable] tr[data-view=full] [data-expand-button]:before{content:""}iam-table[data-expandable] tr:not([data-view=full]) td p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}}@container (width < 23.4375em){iam-table:not(.table--fullwidth) .td--fixed+td:not(.td--fixed){border-top:none}}@container (width > 23.4375em){iam-table{--width-adjust: 0px}iam-table:has([type=checkbox]){--width-adjust: -1rem}iam-table .th--fixed{min-width:calc(4.5rem + var(--width-adjust));position:absolute;padding:0}iam-table .th--fixed:after{top:auto;left:0;content:"";position:absolute;width:100%;height:calc(var(--row-height) - 2px);background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table .td--fixed{position:absolute;position:absolute;left:auto;top:auto;z-index:3;padding:0;min-width:4.5rem;height:calc(var(--row-height) - 2px);text-align:left;background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table .td--fixed:has([open]){z-index:4}iam-table tr:is(:hover,:focus) .td--fixed{background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table tr:has([data-expand-button]){height:calc(4.625rem - 2px)}iam-table .th--fixed+th:not(.th--fixed),iam-table .td--fixed+td:not(.td--fixed){padding-left:calc(4.5rem + var(--width-adjust))}iam-table .th--fixed:not(.expand-button-heading)+.th--fixed+th:not(.th--fixed),iam-table .td--fixed:not(.td--expand)+.td--fixed+td:not(.td--fixed){padding-left:calc(7.75rem + var(--width-adjust))}iam-table[data-expandable] .th--fixed+.th--fixed+th:not(.th--fixed),iam-table[data-expandable] .td--fixed+.td--fixed+td:not(.td--fixed){padding-left:calc(7.75rem + var(--width-adjust))}iam-table .th--fixed+.th--fixed,iam-table .td--fixed+.td--fixed{padding-left:calc(3.25rem + var(--width-adjust));min-width:calc(7.75rem + var(--width-adjust))}iam-table .th--fixed:has(+.th--fixed),iam-table .td--fixed:has(+.td--fixed){min-width:calc(3.25rem + var(--width-adjust));z-index:5}iam-table .dialog__wrapper{z-index:10}iam-table .dialog__wrapper:has([open]){z-index:20}iam-table[data-expandable] input:is([type=radio],[type=checkbox])+label:before,iam-table[data-expandable] input:is([type=radio],[type=checkbox])+label:after{left:1.25rem !important}iam-table:not([data-expandable]) th.expand-button-heading+th{padding-left:0 !important}iam-table:not([data-expandable]) td.td--expand+td{padding-left:0 !important}iam-table:not([data-expandable]) th.expand-button-heading+.th--fixed{min-width:calc(4.5rem + var(--width-adjust)) !important}iam-table:not([data-expandable]) td.td--expand+.td--fixed{min-width:calc(4.5rem + var(--width-adjust)) !important}}/*# sourceMappingURL=assets/css/components/table.extras.css.map */
31
31
  </style>`)}connectedCallback(){const e=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",e.has("page")?e.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",e.has("show")?e.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));let t=this.classList.toString();if(t=t.replace("table--cta",""),t=t.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=` ${t}`,this.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true"),this.classList.contains("table--cta")||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector(`#${this.getAttribute("data-filterby")}`):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),I(this.table,this.form),this.form.querySelector("[data-pagination]")||(this.form.innerHTML+=`<input name="page" type="hidden" value="${this.getAttribute("data-page")}" data-pagination="true" />`),this.form.querySelector("[data-show]")||(this.form.innerHTML+=`<input name="show" type="hidden" value="${this.getAttribute("data-show")}" data-show="true" />`),bt(this.table),ft(this.table,this.form,this.pagination,this,this.savedTableBody),gt(this.table,this.form,this.pagination,this),yt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))X(this.table,this.form,this.pagination,this);else{let n=function(i=1){return Math.floor(Math.random()*Date.now()*(i+1))};if(this.querySelector("iam-actionbar[data-selectall]")){const i=this.querySelector("iam-actionbar[data-selectall]");Array.from(this.table.querySelectorAll("thead tr")).forEach((r,s)=>{r.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((r,s)=>{let d=`row${n(s)}`;r.insertAdjacentHTML("afterbegin",`<td class="td--fixed selectrow"><input type="checkbox" name="row" id="${d}"/><label for="${d}"><span class="visually-hidden">Select row</span></label></td>`)}),this.table.addEventListener("change",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".selectrow input")){let s=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,d=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;i.setAttribute("data-selected",s==d?"all":d)}}),i.addEventListener("selected",r=>{r.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((s,d)=>{s.checked=!1}):r.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((s,d)=>{s.checked=!0})})}let l=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((i,r)=>{if(i.querySelector(":scope > td > .dialog__wrapper")){let s=i.querySelector(":scope > td > .dialog__wrapper").parentNode;s.classList.add("td--fixed"),l=Array.from(s.parentNode.children).indexOf(s)}}),l!=-1&&(this.table.querySelector(`thead tr th:nth-child(${l+1})`).classList.add("th--fixed"),Array.from(this.table.querySelectorAll(`tbody tr td:nth-child(${l+1})`)).forEach((i,r)=>{i.classList.add("td--fixed")})),U(this.table,this.form,this.pagination,this),M(this.table,this.form,this),$(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",n=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(e,t,n){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),e){case"data-total":{t!=n&&this.pagination.setAttribute("data-total",n);break}case"data-show":{t!=n&&this.pagination.setAttribute("data-show",n);break}case"data-page":{t!=n&&this.pagination.setAttribute("data-page",n);break}}}}/*!
32
- * iamKey v4.1.1-beta-5
32
+ * iamKey v4.1.1-beta-6
33
33
  * Copyright 2022-2023 iamproperty
34
34
  */let K=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
35
35
  <style>
@@ -88,7 +88,7 @@
88
88
  <div class="files"></div>
89
89
  </div>
90
90
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}connectedCallback(){this.innerHTML+='<i class="fa-regular fa-arrow-up-from-bracket me-2" aria-hidden="true" slot="btn"></i>';const e=this.shadowRoot.querySelector(".file-upload"),t=this.querySelector("input"),n=this.shadowRoot.querySelector(".helper-text");n.innerHTML=`${this.hasAttribute("data-maxsize")?`Max file size is ${this.getAttribute("data-maxsize")}kb. `:""}${t.hasAttribute("accept")?`Supported file types are ${t.getAttribute("accept")}`:""}`,Zt(this,e)}}const ee={name:"FileUpload",props:{maxfilesize:{type:Number,required:!1},maxfiles:{type:Number,required:!1}},mounted(){this.$nextTick(function(){window.customElements.get("iam-fileupload")||window.customElements.define("iam-fileupload",te)})}};function ae(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-fileupload",null,[o.renderSlot(a.$slots,"default")])}const oe=A(ee,[["render",ae]]);/*!
91
- * iamKey v4.1.1-beta-5
91
+ * iamKey v4.1.1-beta-6
92
92
  * Copyright 2022-2023 iamproperty
93
93
  */function re(a){let e=a.querySelectorAll("details"),t=a.querySelectorAll("summary");if(e.forEach(n=>{n.classList.add("accordion-item")}),t.forEach(n=>{n.classList.add("accordion-header"),n.classList.add("accordion-button"),n.classList.add("h4")}),!a.classList.contains("accordion--keep-open")){const n=a.querySelectorAll(":scope > details");n.forEach(l=>{l.addEventListener("click",()=>{n.forEach(i=>{i!==l&&i.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});let ne=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
94
94
  <style>
@@ -101,7 +101,7 @@
101
101
  <slot></slot>
102
102
  </div>
103
103
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){re(this)}};const fr="";window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",ne);const ie={name:"Accordion",props:{},mounted(){}},se={ref:"wrapper"};function le(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-accordion",se,[o.renderSlot(a.$slots,"default")],512)}const ce=A(ie,[["render",le]]),de={name:"AccordionItem",props:{title:{type:String,required:!0},titlecolour:{type:String,required:!1},badge:{type:[Number,String],required:!1},badgecolour:{type:String,required:!1,default:"light"},lazy:{type:Boolean,required:!1}},computed:{createID(){return a=>`${Lt(a)}`}},data(){return{show:!this.lazy}}},me=["id"],ue=["classList"];function he(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("details",{id:i.createID(t.title)},[o.createElementVNode("summary",{classList:`${t.titlecolour?`bg-${t.titlecolour}`:""}`},[o.createTextVNode(o.toDisplayString(t.title),1),t.badge?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(`badge bg-${t.badgecolour}`)},o.toDisplayString(t.badge),3)):o.createCommentVNode("",!0)],8,ue),o.renderSlot(a.$slots,"default")],8,me)}const pe=A(de,[["render",he]]),be={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1},background:{type:String,default:"light",required:!1}}},fe={class:"container"},ge={class:"row"},ye={class:"col-sm-6"},we={class:"pt-5 pb-3 px-4"},ve={class:"col-sm-6 col-md-5 ms-auto"},ke=["src"];function Ae(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",fe,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background+" mb-4")},[o.createElementVNode("div",ge,[o.createElementVNode("div",ye,[o.createElementVNode("div",we,[o.createElementVNode("h2",null,o.toDisplayString(t.title),1),o.renderSlot(a.$slots,"default")])]),o.createElementVNode("div",ve,[t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:"",class:"h-100 w-100 object-cover"},null,8,ke)):o.createCommentVNode("",!0)])])],2)])}const _e=A(be,[["render",Ae]]),Le={name:"Card",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>rr).then(a=>{window.customElements.get("iam-card")||window.customElements.define("iam-card",a.default)}).catch(a=>{console.log(a.message)})})}};function xe(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-card",null,[o.renderSlot(a.$slots,"default")])}const Y=A(Le,[["render",xe]]);function Se(a){var e;let t=a.querySelector(".carousel__inner"),n=a.querySelectorAll(".carousel__item").length;a.getAttribute("data-cols");let l=a.getAttribute("data-sm-cols"),i=a.getAttribute("data-md-cols");a.querySelector(".carousel__controls a").classList.add("active"),t.addEventListener("scroll",function(r){clearTimeout(e),e=setTimeout(function(){let s=t.clientWidth,d=t.scrollWidth,c=t.scrollLeft,u=Math.round(c/d*n)+1,m=a.querySelector(".carousel__item:last-child").offsetLeft;Array.from(a.querySelectorAll(".carousel__controls a")).forEach((b,p)=>{b.classList.remove("active")}),a.querySelector(".control-"+u).classList.add("active"),u==1?a.querySelector(".btn-prev").setAttribute("disabled","disabled"):a.querySelector(".btn-prev").removeAttribute("disabled"),t.scrollLeft+s>m?a.querySelector(".btn-next").setAttribute("disabled","disabled"):a.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),a.addEventListener("click",function(r){for(var s=r.target;s&&s!=this;s=s.parentNode)if(s.matches(".carousel__controls a")){r.preventDefault(),Array.from(a.querySelectorAll(".carousel__controls a")).forEach((c,u)=>{c.classList.remove("active")}),s.classList.add("active");const d=document.querySelector(s.getAttribute("href"));t.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),a.addEventListener("click",function(r){for(var s=r.target;s&&s!=this;s=s.parentNode)if(s.matches(".btn-next, .btn-prev")){r.preventDefault();let d=s.classList.contains("btn-prev")?t.scrollLeft-t.clientWidth:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:d,behavior:"smooth"});break}},!1),n==1&&a.classList.add("hide-btns"),l>=n&&a.classList.add("hide-sm-btns"),i>=n&&a.classList.add("hide-md-btns")}const gr="",Ee={components:{Card:Y},name:"Carousel",data(){return{id:null}},props:{items:{type:Array,required:!1},cols:{type:Number,required:!1,default:1},smcols:{type:Number,required:!1,default:1},mdcols:{type:Number,required:!1,default:3},gap:{type:Number,required:!1,default:4},cardtype:{type:String,required:!1},cardclass:{type:String,required:!1},btntype:{type:String,required:!1},titleclass:{type:String,required:!1},ctatext:{type:String,required:!1},hidectatext:{type:Boolean,required:!1,default:!1},colclass:{type:String,required:!1},type:{type:String,required:!1}},computed:{content(){return a=>`${a.image?`<img src="${a.image}" alt="" />`:""}${a.content?a.content:""}`}},mounted(){this.id=this._uid,this.$nextTick(function(){Se(this.$refs.wrapper)})}},qe=["id","data-cols","data-sm-cols","data-md-cols"],$e={class:"carousel__wrapper"},Te={class:"carousel__inner"},Ce=["id"],Me=["innerHTML","id"],Be=["href"],He=o.createElementVNode("button",{class:"btn btn-prev","data-go":"0",disabled:""},"Prev",-1),Ne=o.createElementVNode("button",{class:"btn btn-next","data-go":"2"},"Next",-1);function Re(a,e,t,n,l,i){const r=o.resolveComponent("Card");return o.openBlock(),o.createElementBlock("div",{class:"container carousel",id:"carousel"+l.id,ref:"wrapper","data-cols":t.cols,"data-sm-cols":t.smcols,"data-md-cols":t.mdcols},[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",$e,[o.createElementVNode("div",Te,[t.type=="card"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(s,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,id:"carousel"+l.id+"slide"+(d+1)},[o.createVNode(r,o.mergeProps(s,{class:t.cardclass,type:t.cardtype,btnyype:t.btntype,titleclass:t.titleclass,ctatext:t.ctatext,hidectatext:t.hidectatext}),null,16,["class","type","btnyype","titleclass","ctatext","hidectatext"])],10,Ce))),128))],2)):o.createCommentVNode("",!0),t.type!="card"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(s,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,innerHTML:i.content(s),id:"carousel"+l.id+"slide"+(d+1)},null,10,Me))),128))],2)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(`carousel__controls cols-${t.cols} cols-sm-${t.smcols} cols-md-${t.mdcols}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(s,d)=>(o.openBlock(),o.createElementBlock("a",{key:d,href:"#carousel"+l.id+"slide"+(d+1),class:o.normalizeClass(`control-${d+1}`)},"Slide "+o.toDisplayString(d+1),11,Be))),128))],2),He,Ne])],8,qe)}const je=A(Ee,[["render",Re]]);/*!
104
- * iamKey v4.1.1-beta-5
104
+ * iamKey v4.1.1-beta-6
105
105
  * Copyright 2022-2023 iamproperty
106
106
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Ve extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
107
107
  <style>
@@ -125,7 +125,7 @@
125
125
  </picture>
126
126
  </div>
127
127
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");const e=this.shadowRoot.querySelector("picture"),t=this.shadowRoot.querySelector("picture source");this.hasAttribute("image")?t.setAttribute("srcset",this.getAttribute("image")):e.remove()}}const De={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1}},mounted(){this.$nextTick(function(){window.customElements.get("iam-header")||window.customElements.define("iam-header",Ve)})}},ze=["image"],Fe=["innerHTML"];function Pe(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-header",{class:"bg-secondary",image:t.image},[o.renderSlot(a.$slots,"breadcrumb"),t.title?(o.openBlock(),o.createElementBlock("h1",{key:0,innerHTML:t.title},null,8,Fe)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")],8,ze)}const Ie=A(De,[["render",Pe]]);function Oe(a){var e;const t=a.querySelector(".testimonial__images"),n=t.querySelectorAll("img").length;if(n==1)return!1;a.classList.add("testimonial--multi");const l=function(i){const r=a.querySelector(".btn-next"),s=a.querySelector(".btn-prev");r.setAttribute("data-go",i+1),s.setAttribute("data-go",i-1),r.removeAttribute("disabled"),s.removeAttribute("disabled"),i==1?s.setAttribute("disabled",!0):i==n&&r.setAttribute("disabled",!0)};t.addEventListener("scroll",function(i){clearTimeout(e),e=setTimeout(function(){let r=t.scrollWidth,s=t.scrollHeight,d=t.scrollLeft,c=t.scrollTop,u=Math.round(d/r*n)+1;d==0&&c!=0&&(u=Math.round(c/s*n)+1),a.setAttribute("data-show",u),l(u)},300)},!1),a.addEventListener("click",function(i){for(var r=i.target;r&&r!=this;r=r.parentNode)if(r.matches("[data-go]")){let s=parseInt(r.getAttribute("data-go")),d=0,c=0,u=t.scrollWidth,m=t.scrollHeight;u>m?c=Math.floor(u*((s-1)/n)):d=Math.floor(m*((s-1)/n)),t.scroll({top:d,left:c,behavior:"smooth"});break}},!1)}const yr="",Ue={name:"Testimonial",props:{items:{type:Array,required:!0},background:{type:String,default:"light",required:!1}},mounted(){Oe(this.$refs.wrapper)}},We={class:"container testimonial mb-5","data-show":"1",ref:"wrapper"},Xe={class:"row"},Ke={class:"col-md-5 position-relative"},Ye={class:"testimonial__images"},Ge=["src"],Je=o.createElementVNode("div",{class:"testimonial__controls"},[o.createElementVNode("button",{"data-go":"0",disabled:"",class:"btn-prev"},"Previous"),o.createElementVNode("button",{"data-go":"2",class:"btn-next"},"Next")],-1),Qe={class:"col-md-7"},Ze=o.createElementVNode("h2",null,"What our customers think…",-1),ta={class:"testimonial__content"},ea=["innerHTML"],aa=["innerHTML"],oa={class:"testimonial__after"},ra=o.createElementVNode("span",{class:"circle circle--dots d-none d-md-block"},null,-1);function na(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",We,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background)},[o.createElementVNode("div",Xe,[o.createElementVNode("div",Ke,[o.createElementVNode("div",Ye,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,s)=>(o.openBlock(),o.createElementBlock("img",{key:s,src:r.image?r.image:"data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"",class:o.normalizeClass("h-100 w-100 object-cover"+(r.image?"":" opacity-0"))},null,10,Ge))),128))]),Je]),o.createElementVNode("div",Qe,[Ze,o.createElementVNode("div",ta,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,s)=>(o.openBlock(),o.createElementBlock("blockquote",{key:s,class:o.normalizeClass(r.class)},[o.createElementVNode("div",{innerHTML:r.quote},null,8,ea),o.createElementVNode("cite",{innerHTML:r.cite},null,8,aa)],2))),128))]),o.createElementVNode("div",oa,[o.renderSlot(a.$slots,"default")])])]),ra],2)],512)}const ia=A(Ue,[["render",na]]),wr="",sa={name:"Timeline",props:{image:{type:String,required:!1}}},la={class:"timeline"},ca={class:"timeline__content"},da=["src"];function ma(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",la,[o.createElementVNode("div",ca,[o.renderSlot(a.$slots,"default")]),t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:""},null,8,da)):o.createCommentVNode("",!0)])}const ua=A(sa,[["render",ma]]),vr="",ha={components:{Input:N},name:"PropertySearchbar",props:{formaction:{type:String,required:!1},formmethod:{type:String,required:!1},location:{type:String,required:!1},locations:{type:Array,required:!1},distances:{type:Array,required:!1,default(){return[{value:"0.25",display:"+¼ mi"},{value:"0.5",display:"+½ mi"},{value:"1",display:"+1 mi"},{value:"2",display:"+2 mi"},{value:"3",display:"+3 mi"},{value:"4",display:"+4 mi"},{value:"5",display:"+5 mi"}]}},pricemin:{type:Array,required:!1,default(){return[{value:"0",display:"No min"},{value:"50000",display:"£50k min"},{value:"75000",display:"£75k min"},{value:"100000",display:"£100k min"},{value:"150000",display:"£150k min"},{value:"200000",display:"£200k min"},{value:"250000",display:"£250k min"}]}},pricemax:{type:Array,required:!1,default(){return[{value:"any",display:"No max"},{value:"50000",display:"£50k max"},{value:"75000",display:"£75k max"},{value:"100000",display:"£100k max"},{value:"150000",display:"£150k max"},{value:"200000",display:"£200k max"},{value:"250000",display:"£250k max"}]}},bedsmin:{type:Array,required:!1,default(){return[{value:"any",display:"No min"},{value:"0",display:"Studio min"},{value:"1",display:"1 bed min"},{value:"2",display:"2 beds min"},{value:"3",display:"3 beds min"},{value:"4",display:"4 beds min"},{value:"5",display:"5 beds min"},{value:"6",display:"6 beds min"}]}},bedsmax:{type:Array,required:!1,default(){return[{value:"any",display:"No max"},{value:"0",display:"Studio max"},{value:"1",display:"1 bed max"},{value:"2",display:"2 beds max"},{value:"3",display:"3 beds max"},{value:"4",display:"4 beds max"},{value:"5",display:"5 beds max"},{value:"6",display:"6 beds max"}]}},propertytypes:{type:Array,required:!1,default(){return[{value:"all",display:"Show all"},{value:"Bungalow",display:"Bungalow"},{value:"Character Property",display:"Character Property"},{value:"Commercial Property",display:"Commercial Property"},{value:"Flat / Apartment",display:"Flat / Apartment"},{value:"Garage / Parking",display:"Garage / Parking"},{value:"Guest House / Hotel",display:"Guest House / Hotel"},{value:"House",display:"House"},{value:"House / Flat Share",display:"House / Flat Share"},{value:"Land",display:"Land"},{value:"Mobile / Park Home",display:"Mobile / Park Home"},{value:"Private Halls",display:"Private Halls"},{value:"Retirement Property",display:"Retirement Property"}]}}},data(){return{locationSave:""}},methods:{locationKeyup:function(a){this.$emit("locationKeyup",a)}},computed:{locationSet:{get(){return this.locationSave?this.locationSave:this.location},set(a){this.locationSave=a,this.$emit("input",a)}},locationsList(){return()=>this.locations?this.locations:[{value:"Newcastle"}]}}},pa={class:"container",ref:"wrapper"},ba={class:"property-searchbar"},fa=["action","method"],ga={class:"col-12 col-md-3"},ya={class:"col-12 col-md"},wa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Price range",-1),va={class:"row","data-input-range":""},ka={class:"col-12 col-md"},Aa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Number of beds",-1),_a={class:"row","data-input-range":""},La={class:"col-12 col-md-2"},xa=o.createElementVNode("div",{class:"col-12 col-md mw-md-fit-content d-flex property-searchbar__btn"},[o.createElementVNode("button",{class:"btn w-100 me-0",type:"submit",value:"submit"},"Search")],-1);function Sa(a,e,t,n,l,i){const r=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",pa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",ba,[o.createElementVNode("form",{class:"row",action:t.formaction,method:t.formmethod},[o.createElementVNode("fieldset",ga,[o.createVNode(r,{inputClass:"input--locations",modelValue:i.locationSet,"onUpdate:modelValue":e[0]||(e[0]=s=>i.locationSet=s),label:"Location",id:"location",options:i.locationsList(),required:"",placeholder:"i.e. Newcastle or NE1",onKeyupEvent:e[1]||(e[1]=s=>i.locationKeyup(...arguments)),ref:"search"},null,8,["modelValue","options"]),o.createVNode(r,{class:"select--miles",label:"Miles",id:"miles",type:"select",options:t.distances},null,8,["options"])]),o.createElementVNode("fieldset",ya,[wa,o.createElementVNode("div",va,[o.createVNode(r,{class:"col-6",label:"Minimum price",id:"price-min","data-min":"true",type:"select",options:t.pricemin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum price",id:"price-max","data-max":"true",type:"select",options:t.pricemax},null,8,["options"])])]),o.createElementVNode("fieldset",ka,[Aa,o.createElementVNode("div",_a,[o.createVNode(r,{class:"col-6",label:"Minimum beds",id:"beds-min","data-min":"true",type:"select",options:t.bedsmin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum beds",id:"beds-max","data-max":"true",type:"select",options:t.bedsmax},null,8,["options"])])]),o.createElementVNode("fieldset",La,[o.createVNode(r,{label:"Property type",id:"property-type",type:"select",options:t.propertytypes},null,8,["options"])]),xa],8,fa)]),o.renderSlot(a.$slots,"after")],512)}const Ea=A(ha,[["render",Sa]]),qa={components:{},name:"Nav",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>ir).then(a=>{window.customElements.get("iam-nav")||window.customElements.define("iam-nav",a.default)}).catch(a=>{console.log(a.message)})})},methods:{}},$a={ref:"wrapper"};function Ta(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-nav",$a,[o.renderSlot(a.$slots,"default")],512)}const Ca=A(qa,[["render",Ta]]),kr="",Ma={name:"Stepper",props:{label:{type:String,required:!1},endlabel:{type:String,required:!1,default:"Complete"}}},Ba={class:"container"},Ha=["aria-label"],Na={key:0,class:"h6 stepper__start"},Ra={class:"list-unstyled"},ja={class:"h6 stepper__end"};function Va(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",Ba,[o.createElementVNode("nav",{class:"stepper","aria-label":t.label?t.label:"Progress"},[t.label?(o.openBlock(),o.createElementBlock("span",Na,o.toDisplayString(t.label),1)):o.createCommentVNode("",!0),o.createElementVNode("ol",Ra,[o.renderSlot(a.$slots,"default")]),o.createElementVNode("span",ja,o.toDisplayString(t.endlabel),1)],8,Ha)])}const Da=A(Ma,[["render",Va]]),Ar="",za={name:"Snapshot",props:{items:{type:Array,required:!0}}},Fa={class:"container snapshot",ref:"wrapper"},Pa={class:"row"},Ia=["href"],Oa={class:"lead snapshot__title"},Ua={class:"stat"};function Wa(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("div",Fa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",Pa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,s)=>(o.openBlock(),o.createElementBlock("div",{class:"col",key:s},[r.link?(o.openBlock(),o.createElementBlock("a",{key:0,href:r.link},"View "+o.toDisplayString(r.title),9,Ia)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(`snapshot__item ${r.bg?"bg-"+r.bg:""}`)},[o.createElementVNode("span",Oa,o.toDisplayString(r.title),1),o.createElementVNode("span",Ua,o.toDisplayString(r.number),1)],2)]))),128))])],512)}const Xa=A(za,[["render",Wa]]),Ka={name:"Stepper",props:{url:{type:String,required:!1},status:{type:String,required:!1},current:{type:String,required:!1}}},Ya=["href","aria-current"],Ga={key:0,class:"visually-hidden"};function Ja(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("li",null,[o.createElementVNode("a",{href:t.url,class:o.normalizeClass(`${t.status?"bg-"+t.status:""}${typeof t.current<"u"?"current":""}`),"aria-current":typeof t.current<"u"},[o.createElementVNode("span",null,[o.renderSlot(a.$slots,"default")]),t.status?(o.openBlock(),o.createElementBlock("em",Ga," - status: "+o.toDisplayString(t.status),1)):o.createCommentVNode("",!0)],10,Ya)])}const Qa=A(Ka,[["render",Ja]]);/*!
128
- * iamKey v4.1.1-beta-5
128
+ * iamKey v4.1.1-beta-6
129
129
  * Copyright 2022-2023 iamproperty
130
130
  */const Za=function(a){const e=a.querySelectorAll(":scope > details");a.querySelectorAll(":scope > details > summary");let t=a.querySelector(":scope > .tabs__links");if(a.shadowRoot&&a.shadowRoot.querySelector(".tabs__links")&&(t=a.shadowRoot.querySelector(".tabs__links")),!t){t=document.createElement("div"),t.classList.add("tabs__links");let n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(t),a.prepend(n)}e.forEach((n,l)=>{let i=n.querySelector(":scope > summary"),r=i.classList.contains("disabled");i.classList.add("visually-hidden");let s=document.createElement("button");n.hasAttribute("id")&&(s=document.createElement("a"),s.setAttribute("href",`#${n.getAttribute("id")}`)),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${i.innerText}`,s.classList.add("link"),s.setAttribute("data-index",l),s.setAttribute("tabindex","-1"),r&&s.classList.add("disabled"),t.appendChild(s)})},to=function(a){let e=a.querySelectorAll(":scope > details"),t=a.querySelectorAll(":scope > details > summary"),n=a.querySelectorAll(":scope .tabs__links > .link");a.shadowRoot&&(n=a.shadowRoot.querySelectorAll(".tabs__links > .link")),n.forEach(l=>{l.addEventListener("click",i=>{if(i.preventDefault(),l.classList.contains("disabled"))return!1;n.forEach(r=>{let s=r==l;r.setAttribute("aria-pressed",s)}),e.forEach((r,s)=>{let d=l.getAttribute("data-index")==s;d?r.setAttribute("open",d):r.removeAttribute("open")}),l.hasAttribute("href")&&history.pushState(void 0,void 0,l.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:l.textContent})})}),t.forEach((l,i)=>{l.addEventListener("focus",r=>{n.forEach(s=>{s.classList.remove("focus")}),n[i].classList.add("focus")}),l.addEventListener("click",r=>{r.preventDefault(),n[i].click()})})},eo=function(a){let e=a.querySelectorAll(":scope > details"),t=a.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");a.shadowRoot&&(t=a.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&a.querySelector(`.tabs__links [href="${location.hash}"]`)?(a.querySelector(`[href="${location.hash}"]`).setAttribute("open",!0),a.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):a.querySelector("details[open]")||(e[0].setAttribute("open",!0),t[0].setAttribute("aria-pressed",!0))},ao=function(a){Za(a),to(a),eo(a)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});let oo=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
131
131
  <style>
@@ -144,9 +144,9 @@
144
144
  <slot></slot>
145
145
  </div>
146
146
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){let e=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class",`tabs ${e}`),ao(this)}};const _r="";window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",oo);const ro={name:"Tabs"},no={ref:"wrapper"};function io(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-tabs",no,[o.renderSlot(a.$slots,"default")],512)}const so=A(ro,[["render",io]]),lo={name:"Tab",props:{title:{type:String,required:!0},lazy:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},data(){return{show:!this.lazy,isDisabled:!!this.disabled}}},co={class:"tab"},mo=["innerHTML"];function uo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("details",co,[o.createElementVNode("summary",{innerHTML:t.title,class:o.normalizeClass({disabled:l.isDisabled})},null,10,mo),o.renderSlot(a.$slots,"default")])}const ho=A(lo,[["render",uo]]);let G=H.props;G.fields.required=!1;const po={components:{Table:H,Input:N},data(){return{itemsData:[...this.items]}},methods:{submitForm:function(a){console.log(this);const e=new FormData(a.target);let t=new Date;const n=t.getFullYear();let l=t.getMonth()+1,i=t.getDate();i<10&&(i="0"+i),l<10&&(l="0"+l),t=i+"/"+l+"/"+n,this.itemsData.unshift({date_added:t,user:e.get("user"),note:e.get("addNote")}),this.$emit("formSubmitted",a)}},name:"NoteFeed",props:{user:{type:String,required:!0},...G,title:{type:String,required:!1},method:{type:String,required:!1,default:"post"},action:{type:String,required:!1}}},bo={class:"container note-feed mb-2"},fo=["innerHTML"],go=["action","method"],yo=["value"],wo=o.createElementVNode("button",{class:"btn btn-tertiary"},"Submit note",-1);function vo(a,e,t,n,l,i){const r=o.resolveComponent("Table"),s=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",bo,[t.title?(o.openBlock(),o.createElementBlock("span",{key:0,class:"h3",innerHTML:t.title},null,8,fo)):o.createCommentVNode("",!0),o.createVNode(r,o.mergeProps({fields:[{key:"date_added"},{key:"user"},{key:"note"}],items:l.itemsData},a.$props,{class:"mb-0"}),null,16,["items"]),o.createElementVNode("form",{action:t.action,method:t.method,onSubmit:e[0]||(e[0]=o.withModifiers(d=>i.submitForm(...arguments),["prevent"]))},[o.createElementVNode("input",{type:"hidden",value:t.user,name:"user"},null,8,yo),o.createVNode(s,{id:"addNote",type:"textarea",label:"Add note",required:"",class:"mw-100"}),wo],40,go)])}const ko=A(po,[["render",vo]]);/*!
147
- * iamKey v4.1.1-beta-5
147
+ * iamKey v4.1.1-beta-6
148
148
  * Copyright 2022-2023 iamproperty
149
- */function Ao(a,e){function t(n,l){let i=!1,r=l.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${l.value}]`));let s=n.querySelector(`[data-name="${r}"]`);s&&l.getAttribute("type")=="checkbox"&&(i=!0);let d=l.getAttribute("data-filter-text");if(s||(s=document.createElement("button"),n.appendChild(s)),s.setAttribute("type","button"),s.classList.add("filter"),s.setAttribute("data-name",r),s.innerHTML=d.replace("$value",l.value),(!l.value||i)&&s.remove(),l.parentNode.closest("[data-filter-text]")){let c=l.parentNode.closest("[data-filter-text]"),u=!0;if(r="",c.querySelectorAll("input").forEach((m,b)=>{let p=m.getAttribute("name");if(r+=`${b!=0?",":""}${p}`,n.querySelector(`[data-name="${p}"]`)&&n.querySelector(`[data-name="${p}"]`).remove(),m.value){let h=document.createElement("button");h.setAttribute("type","button"),h.classList.add("filter"),h.setAttribute("data-name",p),h.innerHTML=d.replace("$value",m.value),n.appendChild(h)}else u=!1}),n.querySelector(`[data-name="${r}"]`)&&n.querySelector(`[data-name="${r}"]`).remove(),u){let m=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((p,h)=>{let f=p.getAttribute("name");n.querySelector(`[data-name="${f}"]`)&&n.querySelector(`[data-name="${f}"]`).remove(),m=m.replace(`$${h+1}`,p.value)});let b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",r),b.innerHTML=m,n.appendChild(b)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((n,l)=>{t(e,n)}),Array.from(a.querySelectorAll("input[data-filter-text]")).forEach((n,l)=>{n.addEventListener("change",function(i){t(e,n)})}),e.addEventListener("click",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest(".filter")){let r=n.target.closest(".filter"),s=r.getAttribute("data-name").split(",");for(var l=0;l<s.length;l++){let d=s[l],c=`[name="${d}"]`;d.match(/\[(.*)\]/)&&(d.replace(/\[(.*)\]/,"[]"),c=`[value="${d.replace(/.*\[(.*)\]/,"$1")}"]`);let u=a.querySelectorAll(c);for(var i=0;i<u.length;i++){let m=u[i];if(m.getAttribute("type")!="radio"&&m.getAttribute("type")!="checkbox")m.value="";else{m.checked=!1;var n=new Event("force");a.hasAttribute("data-nosubmit")||m.closest("form").dispatchEvent(n)}}}r.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});let _o=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`;let n=this.classList.toString();const l=document.createElement("template");l.innerHTML=`
149
+ */function Ao(a,e){function t(n,l){let i=!1,r=l.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${l.value}]`));let s=n.querySelector(`[data-name="${r}"]`);s&&l.getAttribute("type")=="checkbox"&&(i=!l.checked);let d=l.getAttribute("data-filter-text");if(s||(s=document.createElement("button"),n.appendChild(s)),s.setAttribute("type","button"),s.classList.add("filter"),s.setAttribute("data-name",r),s.innerHTML=d.replace("$value",l.value),(!l.value||i)&&s.remove(),l.parentNode.closest("[data-filter-text]")){let c=l.parentNode.closest("[data-filter-text]"),u=!0;if(r="",c.querySelectorAll("input").forEach((m,b)=>{let p=m.getAttribute("name");if(r+=`${b!=0?",":""}${p}`,n.querySelector(`[data-name="${p}"]`)&&n.querySelector(`[data-name="${p}"]`).remove(),m.value){let h=document.createElement("button");h.setAttribute("type","button"),h.classList.add("filter"),h.setAttribute("data-name",p),h.innerHTML=d.replace("$value",m.value),n.appendChild(h)}else u=!1}),n.querySelector(`[data-name="${r}"]`)&&n.querySelector(`[data-name="${r}"]`).remove(),u){let m=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((p,h)=>{let f=p.getAttribute("name");n.querySelector(`[data-name="${f}"]`)&&n.querySelector(`[data-name="${f}"]`).remove(),m=m.replace(`$${h+1}`,p.value)});let b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",r),b.innerHTML=m,n.appendChild(b)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((n,l)=>{t(e,n)}),Array.from(a.querySelectorAll("input[data-filter-text]")).forEach((n,l)=>{n.addEventListener("change",function(i){t(e,n),i.stopPropagation()})}),a.addEventListener("change",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest("input[data-filter-text]")){let l=n.target.closest("input[data-filter-text]");t(e,l)}}),e.addEventListener("click",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest(".filter")){let r=n.target.closest(".filter"),s=r.getAttribute("data-name").split(",");for(var l=0;l<s.length;l++){let d=s[l],c=`[name="${d}"]`;d.match(/\[(.*)\]/)&&(d.replace(/\[(.*)\]/,"[]"),c=`[value="${d.replace(/.*\[(.*)\]/,"$1")}"]`);let u=a.querySelectorAll(c);for(var i=0;i<u.length;i++){let m=u[i];if(m.getAttribute("type")!="radio"&&m.getAttribute("type")!="checkbox")m.value="";else{m.checked=!1;var n=new Event("force");a.hasAttribute("data-nosubmit")||m.closest("form").dispatchEvent(n)}}}r.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});let _o=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`;let n=this.classList.toString();const l=document.createElement("template");l.innerHTML=`
150
150
  <style>
151
151
  @import "${t}";
152
152
  .applied-filters:not(.applied-filters--compact):not(:empty):before{content:"Applied filters";font-weight:bold;font-size:1.125rem;line-height:1.375rem;color:var(--colour-header);margin-bottom:1rem;display:block}.applied-filters:not(:empty){margin-bottom:1rem}::slotted(*:last-child){margin-bottom:0}.applied-filters .filter{border:1px solid var(--colour-border);padding:1rem 1.5rem 1rem 1.5rem;background:rgba(0,0,0,0);margin-right:.5rem !important;margin-bottom:.5rem !important;line-height:1.5rem;white-space:nowrap}.applied-filters .filter:after{content:"";display:inline-block;height:1.25rem;width:1.25rem;padding:0;margin-left:1.5rem;margin-bottom:-0.25rem;border:none;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}.applied-filters--compact .filter{background-color:var(--colour-light);border:none;padding:0.625rem;line-height:1rem;border-radius:0.3125rem}.applied-filters--compact .filter:after{margin-left:0.625rem;height:1rem;width:1rem;margin-bottom:-0.1rem}/*# sourceMappingURL=assets/css/components/applied-filters.css.map */
@@ -156,7 +156,7 @@
156
156
  <div class="applied-filters ${n}"></div>
157
157
  <slot></slot>
158
158
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}connectedCallback(){Ao(this,this.shadowRoot.querySelector(".applied-filters"))}};window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",_o);const Lo={name:"Header"};function xo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-applied-filters",null,[o.renderSlot(a.$slots,"default")])}const So=A(Lo,[["render",xo]]);/*!
159
- * iamKey v4.1.1-beta-5
159
+ * iamKey v4.1.1-beta-6
160
160
  * Copyright 2022-2023 iamproperty
161
161
  */function Eo(a,e){qo(a,e)}function qo(a,e){var t;e.addEventListener("keyup",n=>{clearTimeout(t),t=setTimeout(function(){J(a,e.value)},500)}),e.addEventListener("change",n=>{clearTimeout(t),J(a,e.value)})}const J=function(a,e){Array.from(a.querySelectorAll(":scope > li")).forEach((t,n)=>{let l=t.textContent.toLowerCase();t.classList.add("d-none"),l.includes(e.toLowerCase())&&t.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:e})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class $o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
162
162
  <style>
@@ -198,7 +198,7 @@
198
198
  ${this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>':""}
199
199
  </div>
200
200
  `,this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){const e=this.shadowRoot.querySelector("[data-dismiss-button]"),t=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";this.hasAttribute("data-type")?this.classList.add(`bg-${t}`):this.classList.add(`colour-${t}`);const n=this;if(!this.querySelector("i"))switch(t){case"danger":this.innerHTML+='<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"warning":this.innerHTML+='<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"success":this.innerHTML+='<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>';break;default:this.innerHTML+='<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>'}Bo(n),e&&e.addEventListener("click",function(l){R(n)},!1)}}const Ro={name:"Notification",props:{},created(){this.$nextTick(function(){window.customElements.get("iam-notification")||window.customElements.define("iam-notification",No)})}};function jo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-notification",null,[o.renderSlot(a.$slots,"default")])}const Vo=A(Ro,[["render",jo]]);/*!
201
- * iamKey v4.1.1-beta-5
201
+ * iamKey v4.1.1-beta-6
202
202
  * Copyright 2022-2023 iamproperty
203
203
  */const Do=function(a){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=a.getAttribute("data-id"),t=a.getAttribute("id");if(typeof t>"u"||t==null){var n=String.fromCharCode(65+Math.floor(Math.random()*26));t=n+Date.now(),a.setAttribute("id",t)}function l(){window.player=new YT.Player(t,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:i,onStateChange:s}})}l();function i(d){d.target.playVideo()}var r=!1;function s(d){if(d.data==YT.PlayerState.PLAYING&&!r){var c=document.getElementById(t);c.classList.add("player-ready"),r=!0}}},zo=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((e,t)=>{e.closest(".dialog__wrapper")||(e.removeAttribute("open"),e.showModal(),e.focus(),Q(e))}),a.addEventListener("click",e=>{if(e.target.tagName=="IAM-ACTIONBAR")return!1;if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-modal]")){const l=e.target.closest("[data-modal]"),i=l.hasAttribute("data-modal")?l.getAttribute("data-modal"):l.getAttribute("data-filter"),r=document.querySelector(`dialog#${i}`);Q(r),r.showModal(),r.focus();let s=r.offsetWidth;r.setAttribute("style",`max-width: ${s}px;`),Array.from(r.querySelectorAll("[data-duplicate]")).forEach((d,c)=>{const u=d.getAttribute("data-duplicate"),m=document.getElementById(u);if(d.checked!=m.checked){d.checked=m.checked;let b=new Event("change");d.dispatchEvent(b)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:i})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){const l=e.target.closest("dialog[open]");e.preventDefault(),l.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((i,r)=>{i.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest('button[formmethod="dialog"]')){const l=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((i,r)=>{i.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){let l=e.target.closest("dialog[open]");var t=window.getComputedStyle(l);if(t.display==="contents"&&(l=l.parentNode.closest("dialog[open]")),!l.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||l.classList.contains("dialog--multi")){const i=l.getBoundingClientRect();(e.clientX<i.left||e.clientX>i.right||e.clientY<i.top||e.clientY>i.bottom)&&(e.target.closest('input[type="radio"]')||l.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")}))}}if(e&&e.target instanceof HTMLElement&&e.target.closest(".dialog__wrapper > button")){e.stopPropagation();let l=e.target.closest(".dialog__wrapper > button"),i=e.target.closest(".dialog__wrapper > button").parentNode,r="openPopover",s=i.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=s&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((m,b)=>{m.classList.remove("active")}),s.hasAttribute("open"))s.close(),r="closePopover",s.removeAttribute("style"),l.classList.remove("active");else{s.show(),l.classList.add("active");var n=l.getBoundingClientRect();let m=n.top,b=n.left;if(l.closest("iam-table")){let p=l.closest("iam-table").parentNode.getBoundingClientRect();m-=p.top,b-=p.left}s.classList.contains("dialog--fix")&&s.setAttribute("style",`position:fixed;top: ${m}px; left: ${b}px; margin: 3rem 0 0 0;`)}let d=s.getBoundingClientRect(),c=d.bottom-window.scrollY,u=window.innerHeight-window.scrollY;if(c>u){let m=s.hasAttribute("style")?s.getAttribute("style")+" ":"";s.setAttribute("style",m+"transform: translate(0, calc(-100% - 4rem))"),d=s.getBoundingClientRect(),d.top-window.scrollY<100&&s.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:r,id:l.textContent})}e&&e.target instanceof HTMLElement&&!e.target.closest("dialog[open]")&&!e.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach((l,i)=>{l.classList.remove("active")}))}),null),Q=a=>{a.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!a.classList.contains("dialog--multi")&&a.addEventListener("cancel",t=>{t.preventDefault()});let e=a.querySelector(".youtube-embed a");if(e&&Do(e),a.classList.contains("dialog--multi")&&!a.querySelector(":scope > .steps")&&Fo(a),!a.querySelector(":scope > .mh-lg")&&!a.classList.contains("dialog--multi")){a.innerHTML=`<div class="mh-lg">${a.innerHTML}</div>`;let t=a.querySelector(".mh-lg"),n=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(n){let l=n.previousSibling;t.before(n),l&&n.before(l)}}a.querySelector(":scope > button:first-child")||a.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},Fo=a=>{let e="",t=Array.from(a.querySelectorAll("fieldset[data-title]")),n=a.querySelector("form");t.forEach((r,s)=>{e+=`<button data-title="${r.getAttribute("data-title")}" type="button" class="${s==0?"active":""}" tabindex="-1">${r.getAttribute("data-title")}</button>`;const d=document.createElement("div");if(d.classList.add("btn--wrapper"),r.appendChild(d),s!=0&&(d.innerHTML+=`<button data-title="${t[s-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),s!=t.length-1&&(d.innerHTML+=`<button data-title="${t[s+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),s==t.length-1)if(n&&n.querySelector(':scope > button[type="submit"]')){let c=n.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),d.insertAdjacentElement("beforeend",c)}else d.innerHTML+=`<button data-title="${t[s].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),a.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${e}</div>`);let l=Array.from(a.querySelectorAll("fieldset.was-validated"));for(let r=0;r<l.length;r++){let s=l[r],d=s.getAttribute("data-title");if(s.querySelector(".is-invalid")){Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((c,u)=>{c.classList.add("active")});break}else Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((c,u)=>{c.classList.add("valid")})}a.addEventListener("invalid",function(){return function(r){r.preventDefault()}}(),!0);function i(r){const s=a.querySelector("fieldset.active")?a.querySelector("fieldset.active"):a.querySelector("fieldset[data-title]"),d=s.getAttribute("data-title");let c=!0;if(s.classList.add("was-validated"),Array.from(s.querySelectorAll("input")).forEach((b,p)=>{b.checkValidity()||(c=!1)}),c?Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((b,p)=>{b.classList.add("valid")}):Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((b,p)=>{b.classList.remove("valid")}),c||!r.hasAttribute("data-next")){const b=a.querySelector(`fieldset[data-title="${r.getAttribute("data-title")}"]`),p=a.querySelector(`.steps button[data-title="${r.getAttribute("data-title")}"]`);Array.from(a.querySelectorAll("button")).forEach((h,f)=>{h.classList.remove("active")}),Array.from(a.querySelectorAll("fieldset")).forEach((h,f)=>{h.classList.remove("active")}),p.classList.add("active"),b.classList.add("active")}let u=Array.from(a.querySelectorAll("fieldset")).length,m=Array.from(a.querySelectorAll("fieldset.valid")).length;a.style.setProperty("--progress",`${m/(u-1)*100}%`)}a.addEventListener("keydown",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest("button")){const s=r.target.closest("button");r.keyCode==13&&s.getAttribute("type")!="submit"&&(r.preventDefault(),i(s))}r&&r.target instanceof HTMLElement&&r.target.closest("input")&&(r.target.closest("input").classList.remove("is-invalid"),r.keyCode==13&&r.preventDefault())}),a.addEventListener("click",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest('button[type="submit"]'))r.target.closest("form").classList.add("was-validated");else if(r&&r.target instanceof HTMLElement&&r.target.closest("button[data-title]")){const s=r.target.closest("button[data-title]");i(s)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function Z(a,e){a&&e=="all"?(a.querySelector("input").indeterminate=!1,a.querySelector("input").checked=!0,a.querySelector("label").textContent="Select all"):a&&e==0?(a.querySelector("input").indeterminate=!1,a.querySelector("input").checked=!1,a.querySelector("label").textContent="Select all"):a&&e?(a.querySelector("input").indeterminate=!0,a.querySelector("input").checked=!1,a.querySelector("label").textContent=`${e} item${e>1?"s":""} selected`):a&&(a.querySelector("input").checked=!1,a.querySelector("input").indeterminate=!1,a.querySelector("label").textContent="Select all")}class Po extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
204
204
  <style>
@@ -249,7 +249,7 @@
249
249
  </div>
250
250
  </div>
251
251
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){let e=this;const t=this.shadowRoot.querySelector(".actionbar__wrapper");if(this.hasAttribute("data-selectall")){t.insertAdjacentHTML("afterbegin",'<div class="selectall pb-0"><input type="checkbox" name="selectall" id="selectall"><label for="selectall" class="m-0">Select all</label></div>');let i=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&Z(i,this.getAttribute("data-selected")),i.addEventListener("change",s=>{s&&s.target instanceof HTMLElement&&s.target.closest("input")&&(s.target.closest("input").checked?this.setAttribute("data-selected","all"):this.setAttribute("data-selected",0))});let r=this.querySelector("button[data-cancel]");r&&r.addEventListener("click",s=>{this.setAttribute("data-selected",0)})}if(this.hasAttribute("data-select-watch")){const i=document.getElementById(this.getAttribute("data-select-watch"));i.setAttribute("data-select-container","true"),Array.from(i.querySelectorAll('input[type="checkbox"]')).forEach((r,s)=>{r.parentElement.setAttribute("slot","checkbox")}),i.addEventListener("change",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest('[type="checkbox"]')){let s=i.querySelectorAll('input[type="checkbox"]').length,d=i.querySelectorAll('input[type="checkbox"]:checked').length;e.setAttribute("data-selected",s==d?"all":d),r.target.closest('[type="checkbox"]'),d?Array.from(i.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").setAttribute("data-selected","true")}):Array.from(i.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").removeAttribute("data-selected")})}})}if(this.hasAttribute("data-switchviews")){let i="";this.getAttribute("data-switchviews").split(",").forEach((r,s)=>{let d="fa-grid-2";r=="list"?d="fa-grip-lines":r=="small"&&(d="fa-bars"),i+=`<button class="btn btn-action btn-compact mb-0 fa-regular ${d}">${r}</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="views m-0">${i}</div>`),this.shadowRoot.querySelector(".views").addEventListener("click",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".btn-action")){let s=r.target.closest(".btn-action");this.setAttribute("data-view",s.textContent);const d=new CustomEvent("switch-view",{detail:{view:s.textContent}});this.dispatchEvent(d)}})}const n=this.shadowRoot.querySelector(".actionbar--search");this.hasAttribute("data-search")&&this.getAttribute("data-search")=="show"&&n.classList.add("show"),this.shadowRoot.addEventListener("click",i=>{i&&i.target instanceof HTMLElement&&i.target.closest("button[data-search]")&&n.classList.toggle("show")}),n.addEventListener("keyup",i=>{const r=new CustomEvent("search-keyup",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("change",i=>{const r=new CustomEvent("search-change",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("click",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest("button.suffix")){const r=new CustomEvent("search-submit",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}}),Array.from(this.shadowRoot.querySelectorAll(".body")).forEach((i,r)=>{zo(i)});function l(){const i=t.scrollWidth,r=document.documentElement.scrollWidth;let s=750,d=16,c=e.hasAttribute("data-switchviews")?144:210,u=1;r>=992&&r<=1280?u=r/1280:r>=576&&r<=1280?u=r/768:r<576&&(u=r/375),i>=992&&i<=1280?s=s*u:i>=576&&i<=1280?s=450*u:i<576&&(s=c*u),d=d*u,i<576?Array.from(e.querySelectorAll(":scope > .btn:not(.js-updated)")).forEach((m,b)=>{m.className=m.className.replace(" btn-compact"," _btn-compact"),m.classList.add("btn-compact"),m.classList.add("js-updated")}):Array.from(e.querySelectorAll(":scope > .btn.js-updated")).forEach((m,b)=>{m.classList.remove("btn-compact"),m.classList.remove("js-updated"),m.className=m.className.replace(" _btn-compact"," btn-compact")}),Array.from(e.querySelectorAll("[slot]")).forEach((m,b)=>{m.getAttribute("slot")=="overflow"&&m.removeAttribute("slot"),m.getAttribute("slot")=="selected-overflow"&&m.setAttribute("slot","selected")}),Array.from(e.querySelectorAll(".show")).forEach((m,b)=>{m.classList.remove("show")}),Array.from(e.shadowRoot.querySelectorAll(".safe-area")).forEach((m,b)=>{let p="overflow";m.querySelector("slot").hasAttribute("name")&&m.querySelector("slot").getAttribute("name")=="selected"&&(p="selected-overflow");let h=m.querySelector("slot").assignedElements(),f=44*u;e.hasAttribute("data-search")&&(f+=44*u);for(let g=0;g<h.length;g++)!h[g].classList.contains("btn-action")&&!h[g].classList.contains("dialog__wrapper")&&(f+=h[g].offsetWidth,f+=d);for(let g=0;g<h.length;g++)if(h[g].classList.contains("dialog__wrapper")&&(h[g].classList.add("show"),f+=h[g].offsetWidth,f+=d/2,f-d/2>s)){h[g].classList.remove("show");break}for(let g=0;g<h.length;g++)if(h[g].classList.contains("btn-action")&&(h[g].classList.add("show"),f+=h[g].offsetWidth,f+=d/2,f-d/2>s)){h[g].classList.remove("show");break}let y=m.querySelector(".dialog-overflow");y&&y.classList.add("d-none");for(let g=0;g<h.length;g++)(h[g].classList.contains("btn-action")||h[g].classList.contains("dialog__wrapper"))&&(h[g].classList.contains("show")||(h[g].setAttribute("slot",p),y&&y.classList.remove("d-none")))})}l(),new ResizeObserver(l).observe(t)}static get observedAttributes(){return["data-selected"]}attributeChangedCallback(e,t,n){switch(e){case"data-selected":{let l=this.shadowRoot.querySelector(".selectall");l&&Z(l,n);const i=new CustomEvent("selected",{detail:{selected:n}});if(this.dispatchEvent(i),n=="all"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((s,d)=>{s.checked=!0,s.closest("iam-card")&&s.closest("iam-card").setAttribute("data-selected","true")})}if(n=="0"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((s,d)=>{s.checked=!1,s.closest("iam-card")&&s.closest("iam-card").removeAttribute("data-selected","true")})}break}}}}window.customElements.get("iam-actionbar")||window.customElements.define("iam-actionbar",Po);const Io={name:"Actionbar",props:{},mounted(){}};function Oo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-actionbar",null,[o.renderSlot(a.$slots,"default")])}const Uo=A(Io,[["render",Oo]]),Wo={name:"Pagination",props:{},computed:{},created(){this.$nextTick(function(){window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",K)})},updated(){}};function Xo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-pagination")}const Ko=A(Wo,[["render",Xo]]),Yo=(a,e)=>{const t=a[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+e)))})},Go={name:"Address Lookup",mounted(){this.$nextTick(function(){Yo(Object.assign({"../../../assets/js/components/address-lookup/address-lookup.component.js":()=>Promise.resolve().then(()=>cr),"../../../assets/js/components/address-lookup/address-lookup.component.min.js":()=>Promise.resolve().then(()=>mr)}),"../../../assets/js/components/address-lookup/address-lookup.component.js").then(a=>{window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",a.default)}).catch(a=>{console.log(a.message)})})}};function Jo(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-address-lookup",null,[o.renderSlot(a.$slots,"default")])}const Qo=A(Go,[["render",Jo]]);/*!
252
- * iamKey v4.1.1-beta-5
252
+ * iamKey v4.1.1-beta-6
253
253
  * Copyright 2022-2023 iamproperty
254
254
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class Zo extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
255
255
  <style class="styles">
@@ -274,7 +274,7 @@
274
274
 
275
275
  </div>
276
276
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){const e=this.shadowRoot.querySelector(".side-menu"),t=this.shadowRoot.querySelector(".side-menu-content"),n=this.shadowRoot.querySelector(".main-content"),l=this.shadowRoot.querySelector(".side-menu > .btn");this.hasAttribute("data-css")&&this.shadowRoot.querySelector(".styles").insertAdjacentHTML("beforeend",`@import "${this.getAttribute("data-css")}";`),this.hasAttribute("data-title")||this.setAttribute("data-title","configuration"),t.insertAdjacentHTML("afterbegin",`<span class="h3">${this.getAttribute("data-title")}</span>`),n.insertAdjacentHTML("afterbegin",`<span class="h3">${this.getAttribute("data-title")}</span>`),this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)")&&(this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)").classList.add("h4"),this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)").classList.add("main-content__title")),l.addEventListener("click",i=>{e.classList.contains("open")?(e.classList.remove("open"),setTimeout(function(){t.classList.add("closed")},1e3),e.classList.add("pe-none"),setTimeout(function(){e.classList.remove("pe-none")},1e3)):(t.classList.remove("closed"),setTimeout(function(){e.classList.add("open")},100))}),e.addEventListener("mouseenter",i=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"),e.classList.add("hover"))}),e.addEventListener("mousemove",i=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"))}),e.addEventListener("mouseleave",i=>{window.innerWidth>992&&(e.classList.remove("hover"),e.classList.contains("open")||setTimeout(function(){t.classList.add("closed")},1e3))})}}window.customElements.get("iam-collapsible-side")||window.customElements.define("iam-collapsible-side",Zo);const tr={name:"CollapsibleSideMenu",props:{},mounted(){}};function er(a,e,t,n,l,i){return o.openBlock(),o.createElementBlock("iam-collapsible-side",null,[o.renderSlot(a.$slots,"default")])}const ar=A(tr,[["render",er]]);/*!
277
- * iamKey v4.1.1-beta-5
277
+ * iamKey v4.1.1-beta-6
278
278
  * Copyright 2022-2023 iamproperty
279
279
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class or extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");let e=this.classList.toString();const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
280
280
  <style>
@@ -295,7 +295,7 @@
295
295
  ${this.hasAttribute("data-cta")?`<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>`:""}
296
296
  </div>
297
297
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");const e=this.parentNode.closest("a, button, label"),t=this.shadowRoot.querySelector(".card");e.setAttribute("tabindex","-1"),e.matches("label[for]")&&(document.getElementById(e.getAttribute("for")).checked?t.classList.add("checked"):t.classList.remove("checked")),this.addEventListener("click",n=>{let l=new Event("click");t.dispatchEvent(l)}),t.addEventListener("click",n=>{if(e.matches("label[for]")){n.stopPropagation(),n.preventDefault();const l=document.getElementById(e.getAttribute("for")),i=l.getAttribute("name"),r=l.getAttribute("id");Array.from(document.querySelectorAll(`[name="${i}"][type="radio"]:not([id="${r}"])`)).forEach((s,d)=>{document.querySelector(`[for="${s.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"))}),e.click(),l.checked?t.classList.add("checked"):t.classList.remove("checked")}}),this.addEventListener("inactive",n=>{t.classList.remove("checked")}),t.addEventListener("keydown",n=>{switch(n.keyCode){case 32:case 13:if(e.matches("label[for]")){n.stopPropagation(),n.preventDefault();const l=document.getElementById(e.getAttribute("for")),i=l.getAttribute("name"),r=l.getAttribute("id");Array.from(document.querySelectorAll(`[name="${i}"]:not([id="${r}"])`)).forEach((s,d)=>{document.querySelector(`[for="${s.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"))}),e.click(),l.checked?t.classList.add("checked"):t.classList.remove("checked")}else e.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(e,t,n){switch(e){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=n);break}case"class":{let l=this.classList.toString();this.querySelector('[class*="fa-"]')&&(l+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class",`card ${l}`);break}}}}const rr=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"}));/*!
298
- * iamKey v4.1.1-beta-5
298
+ * iamKey v4.1.1-beta-6
299
299
  * Copyright 2022-2023 iamproperty
300
300
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class nr extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"}),t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
301
301
  <style class="styles">
@@ -377,7 +377,7 @@
377
377
  <p><span class="pre-filled-address"></span><button class="text-primary text-decoration-none ms-1 cursor-pointer"><i class="fa-regular fa-pen-to-square"></i><span class="visually-hidden">Edit</span></button></p>
378
378
  </div>
379
379
  </div>
380
- `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}connectedCallback(){return et(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),l=this.shadowRoot.querySelector(".pre-filled"),i=this.shadowRoot.querySelector("datalist"),r=this.shadowRoot.querySelector(".switch-to-manual-btn"),s=this.shadowRoot.querySelector(".switch-to-lookup-btn"),d=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Property address";let c=!0;const u=this.shadowRoot.querySelector(".pre-filled-address"),m=this.shadowRoot.querySelector(".pre-filled-address + button");if(Array.from(this.shadowRoot.querySelectorAll(".title")).forEach((h,f)=>{h.innerHTML=d}),Array.from(this.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach((h,f)=>{h.value?u.innerHTML+=", "+h.value:c=!1}),u.innerHTML=u.innerHTML.slice(1),c&&(l.classList.remove("js-hide"),t.classList.add("js-hide"),n.classList.add("js-hide")),this.hasAttribute("data-use")){let f=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",f),this.shadowRoot.addEventListener("change",y=>{if(y&&y.target instanceof HTMLElement&&y.target.closest('[name="use"]')&&y.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let _=JSON.parse(this.getAttribute("data-use"));Object.keys(_).forEach((L,q)=>{let v=_[L];this.querySelector(`[data-name="${L}"]`)?this.querySelector(`[data-name="${L}"]`).value=v:this.querySelector(`[name="${L}"]`)&&(this.querySelector(`[name="${L}"]`).value=v)})}})}function b(){t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((h,f)=>{h.setAttribute("required","true")}),n.scrollIntoView()}m.addEventListener("click",h=>{l.classList.add("js-hide"),b()}),r.addEventListener("click",h=>{b()}),s.addEventListener("click",h=>{t.classList.remove("js-hide"),n.classList.add("js-hide"),t.scrollIntoView()}),e.addEventListener("keyup",h=>{e.value.length>=3&&p(e.value)}),e.addEventListener("change",h=>{if(e.value.length>=3&&(p(e.value),i.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let f=JSON.parse(i.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(f).forEach((y,g)=>{let _=f[y];this.querySelector(`[data-name="${y}"]`)?this.querySelector(`[data-name="${y}"]`).value=_:this.querySelector(`[name="${y}"]`)&&(this.querySelector(`[name="${y}"]`).value=_)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((y,g)=>{y.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const p=h=>et(this,void 0,void 0,function*(){let f=this.getAttribute("data-url");f+=`${encodeURI(h)}`,window.controller||(window.controller=[]),window.controller[f]&&window.controller[f].abort(),window.controller[f]=new AbortController;const{signal:y}=controller[f];try{yield fetch(f,{signal:y,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(g=>g.json()).then(g=>{let _="";return g.forEach((L,q)=>{let v=JSON.stringify(L.value);_+=`<option value="${L.label}, ${h}" data-values='${v}'></option>`}),i.innerHTML=_,g})}catch(g){console.log(g)}})})}}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"}));var at=function(a,e,t,n){function l(i){return i instanceof t?i:new t(function(r){r(i)})}return new(t||(t=Promise))(function(i,r){function s(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?i(u.value):l(u.value).then(s,d)}c((n=n.apply(a,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class dr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
380
+ `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}connectedCallback(){return et(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),l=this.shadowRoot.querySelector(".pre-filled"),i=this.shadowRoot.querySelector("datalist"),r=this.shadowRoot.querySelector(".switch-to-manual-btn"),s=this.shadowRoot.querySelector(".switch-to-lookup-btn"),d=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Property address";let c=!0;const u=this.shadowRoot.querySelector(".pre-filled-address"),m=this.shadowRoot.querySelector(".pre-filled-address + button");if(Array.from(this.shadowRoot.querySelectorAll(".title")).forEach((h,f)=>{h.innerHTML=d}),Array.from(this.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach((h,f)=>{h.value?u.innerHTML+=", "+h.value:c=!1}),u.innerHTML=u.innerHTML.slice(1),c&&(l.classList.remove("js-hide"),t.classList.add("js-hide"),n.classList.add("js-hide")),this.hasAttribute("data-use")){let f=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",f),this.shadowRoot.addEventListener("change",y=>{if(y&&y.target instanceof HTMLElement&&y.target.closest('[name="use"]')&&y.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let _=JSON.parse(this.getAttribute("data-use"));Object.keys(_).forEach((L,q)=>{let v=_[L];this.querySelector(`[data-name="${L}"]`)?this.querySelector(`[data-name="${L}"]`).value=v:this.querySelector(`[name="${L}"]`)&&(this.querySelector(`[name="${L}"]`).value=v)})}})}function b(){t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach((h,f)=>{h.setAttribute("required","true")}),n.scrollIntoView()}m.addEventListener("click",h=>{l.classList.add("js-hide"),b()}),r.addEventListener("click",h=>{b()}),s.addEventListener("click",h=>{t.classList.remove("js-hide"),n.classList.add("js-hide"),t.scrollIntoView()}),e.addEventListener("keyup",h=>{e.value.length>=3&&p(e.value)}),e.addEventListener("change",h=>{if(e.value.length>=3&&(p(e.value),i.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let f=JSON.parse(i.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(f).forEach((y,g)=>{let _=f[y];this.querySelector(`[data-name="${y}"]`)?this.querySelector(`[data-name="${y}"]`).value=_:this.querySelector(`[name="${y}"]`)&&(this.querySelector(`[name="${y}"]`).value=_)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((y,g)=>{y.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const p=h=>et(this,void 0,void 0,function*(){let f=this.getAttribute("data-url");f+=`${encodeURI(h)}`,window.controller||(window.controller=[]),window.controller[f]&&window.controller[f].abort(),window.controller[f]=new AbortController;const{signal:y}=controller[f];try{yield fetch(f,{signal:y,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(g=>g.json()).then(g=>{let _="";return g.forEach((L,q)=>{let v=JSON.stringify(L.value);_+=`<option value="${L.label}, ${h}" data-values='${v}'></option>`}),i.innerHTML=_,g})}catch(g){console.log(g)}})})}}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"}));var at=function(a,e,t,n){function l(i){return i instanceof t?i:new t(function(r){r(i)})}return new(t||(t=Promise))(function(i,r){function s(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?i(u.value):l(u.value).then(s,d)}c((n=n.apply(a,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class dr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
381
381
  <style>
382
382
  @import "${t}";
383
383
  :host{margin-bottom:1rem;display:block}input[name=postcode]{border-color:var(--error-border, var(--colour-primary)) !important}div:has(input[name=postcode]) .suffix{border-color:var(--error-border, var(--colour-primary)) !important}.invalid-feedback{display:var(--error-display, none) !important}.optional{display:var(--req-display, inline-block) !important}.pre-filled p{padding-bottom:1rem}.pre-filled button{border:none;background:none;cursor:pointer}/*# sourceMappingURL=assets/css/components/address-lookup.css.map */
@@ -412,4 +412,4 @@
412
412
  <p><span class="pre-filled-address"></span><button class="text-primary text-decoration-none ms-1 cursor-pointer"><i class="fa-regular fa-pen-to-square"></i><span class="visually-hidden">Edit</span></button></p>
413
413
  </div>
414
414
  </div>
415
- `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){return at(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),l=this.shadowRoot.querySelector(".pre-filled"),i=this.shadowRoot.querySelector("datalist"),r=this.shadowRoot.querySelector(".switch-to-manual-btn"),s=this.shadowRoot.querySelector(".switch-to-lookup-btn"),d=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Property address";let c=!0;const u=this.shadowRoot.querySelector(".pre-filled-address"),m=this.shadowRoot.querySelector(".pre-filled-address + button");if(Array.from(this.shadowRoot.querySelectorAll(".title")).forEach((h,f)=>{h.innerHTML=d}),Array.from(this.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach((h,f)=>{h.value?u.innerHTML+=", "+h.value:c=!1}),u.innerHTML=u.innerHTML.slice(1),c&&(l.classList.remove("js-hide"),t.classList.add("js-hide"),n.classList.add("js-hide")),this.hasAttribute("data-use")){let h=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",h),this.shadowRoot.addEventListener("change",f=>{if(f&&f.target instanceof HTMLElement&&f.target.closest('[name="use"]')&&f.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let y=JSON.parse(this.getAttribute("data-use"));Object.keys(y).forEach((g,_)=>{let L=y[g];this.querySelector(`[data-name="${g}"]`)?this.querySelector(`[data-name="${g}"]`).value=L:this.querySelector(`[name="${g}"]`)&&(this.querySelector(`[name="${g}"]`).value=L)})}})}function b(){t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((h,f)=>{h.setAttribute("required","true")}),n.scrollIntoView()}m.addEventListener("click",h=>{l.classList.add("js-hide"),b()}),r.addEventListener("click",h=>{b()}),s.addEventListener("click",h=>{t.classList.remove("js-hide"),n.classList.add("js-hide"),t.scrollIntoView()}),e.addEventListener("keyup",h=>{e.value.length>=3&&p(e.value)}),e.addEventListener("change",h=>{if(e.value.length>=3&&(p(e.value),i.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let f=JSON.parse(i.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(f).forEach((y,g)=>{let _=f[y];this.querySelector(`[data-name="${y}"]`)?this.querySelector(`[data-name="${y}"]`).value=_:this.querySelector(`[name="${y}"]`)&&(this.querySelector(`[name="${y}"]`).value=_)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((y,g)=>{y.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const p=h=>at(this,void 0,void 0,function*(){let f=this.getAttribute("data-url");f+=`${encodeURI(h)}`,window.controller||(window.controller=[]),window.controller[f]&&window.controller[f].abort(),window.controller[f]=new AbortController;const{signal:y}=controller[f];try{yield fetch(f,{signal:y,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(g=>g.json()).then(g=>{let _="";return g.forEach((L,q)=>{let v=JSON.stringify(L.value);_+=`<option value="${L.label}, ${h}" data-values='${v}'></option>`}),i.innerHTML=_,g})}catch(g){console.log(g)}})})}}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"}));w.Accordion=ce,w.AccordionItem=pe,w.Actionbar=Uo,w.AddressLookup=Qo,w.AppliedFilters=So,w.Banner=_e,w.Card=Y,w.Carousel=je,w.CollapsibleSideMenu=ar,w.FileUpload=oe,w.Filterlist=Mo,w.Header=Ie,w.Input=N,w.Logo=lt,w.Nav=Ca,w.NoteFeed=ko,w.Notification=Vo,w.Pagination=Ko,w.PropertySearchbar=Ea,w.Snapshot=Xa,w.Step=Qa,w.Stepper=Da,w.Tab=ho,w.Table=H,w.Tabs=so,w.Testimonial=ia,w.Timeline=ua,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
415
+ `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){return at(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),l=this.shadowRoot.querySelector(".pre-filled"),i=this.shadowRoot.querySelector("datalist"),r=this.shadowRoot.querySelector(".switch-to-manual-btn"),s=this.shadowRoot.querySelector(".switch-to-lookup-btn"),d=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Property address";let c=!0;const u=this.shadowRoot.querySelector(".pre-filled-address"),m=this.shadowRoot.querySelector(".pre-filled-address + button");if(Array.from(this.shadowRoot.querySelectorAll(".title")).forEach((h,f)=>{h.innerHTML=d}),Array.from(this.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach((h,f)=>{h.value?u.innerHTML+=", "+h.value:c=!1}),u.innerHTML=u.innerHTML.slice(1),c&&(l.classList.remove("js-hide"),t.classList.add("js-hide"),n.classList.add("js-hide")),this.hasAttribute("data-use")){let h=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",h),this.shadowRoot.addEventListener("change",f=>{if(f&&f.target instanceof HTMLElement&&f.target.closest('[name="use"]')&&f.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let y=JSON.parse(this.getAttribute("data-use"));Object.keys(y).forEach((g,_)=>{let L=y[g];this.querySelector(`[data-name="${g}"]`)?this.querySelector(`[data-name="${g}"]`).value=L:this.querySelector(`[name="${g}"]`)&&(this.querySelector(`[name="${g}"]`).value=L)})}})}function b(){t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach((h,f)=>{h.setAttribute("required","true")}),n.scrollIntoView()}m.addEventListener("click",h=>{l.classList.add("js-hide"),b()}),r.addEventListener("click",h=>{b()}),s.addEventListener("click",h=>{t.classList.remove("js-hide"),n.classList.add("js-hide"),t.scrollIntoView()}),e.addEventListener("keyup",h=>{e.value.length>=3&&p(e.value)}),e.addEventListener("change",h=>{if(e.value.length>=3&&(p(e.value),i.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let f=JSON.parse(i.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(f).forEach((y,g)=>{let _=f[y];this.querySelector(`[data-name="${y}"]`)?this.querySelector(`[data-name="${y}"]`).value=_:this.querySelector(`[name="${y}"]`)&&(this.querySelector(`[name="${y}"]`).value=_)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((y,g)=>{y.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const p=h=>at(this,void 0,void 0,function*(){let f=this.getAttribute("data-url");f+=`${encodeURI(h)}`,window.controller||(window.controller=[]),window.controller[f]&&window.controller[f].abort(),window.controller[f]=new AbortController;const{signal:y}=controller[f];try{yield fetch(f,{signal:y,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(g=>g.json()).then(g=>{let _="";return g.forEach((L,q)=>{let v=JSON.stringify(L.value);_+=`<option value="${L.label}, ${h}" data-values='${v}'></option>`}),i.innerHTML=_,g})}catch(g){console.log(g)}})})}}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"}));w.Accordion=ce,w.AccordionItem=pe,w.Actionbar=Uo,w.AddressLookup=Qo,w.AppliedFilters=So,w.Banner=_e,w.Card=Y,w.Carousel=je,w.CollapsibleSideMenu=ar,w.FileUpload=oe,w.Filterlist=Mo,w.Header=Ie,w.Input=N,w.Logo=lt,w.Nav=Ca,w.NoteFeed=ko,w.Notification=Vo,w.Pagination=Ko,w.PropertySearchbar=Ea,w.Snapshot=Xa,w.Step=Qa,w.Stepper=Da,w.Tab=ho,w.Table=H,w.Tabs=so,w.Testimonial=ia,w.Timeline=ua,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "iamproperty"
6
6
  },
7
7
  "private": false,
8
- "version": "4.1.1-beta-5",
8
+ "version": "4.1.1-beta-6",
9
9
  "scripts": {
10
10
  "bootstrap": "copyfiles -u 2 node_modules/bootstrap/**/* assets/bootstrap",
11
11
  "dev": "npm run copy && node local_modules/delete-assets.js && vite --host",