@iamproperty/components 7.1.0--beta2 → 7.1.0--beta3

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 (33) hide show
  1. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  2. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  3. package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
  4. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  5. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  6. package/assets/js/components/card/card.component.min.js +1 -1
  7. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  8. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  9. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  10. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  11. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  12. package/assets/js/components/header/header.component.min.js +1 -1
  13. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  14. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  15. package/assets/js/components/multiselect/multiselect.component.js +4 -3
  16. package/assets/js/components/multiselect/multiselect.component.min.js +4 -3
  17. package/assets/js/components/multiselect/multiselect.component.min.js.map +1 -1
  18. package/assets/js/components/nav/nav.component.min.js +1 -1
  19. package/assets/js/components/notification/notification.component.min.js +1 -1
  20. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  21. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  22. package/assets/js/components/search/search.component.min.js +1 -1
  23. package/assets/js/components/slider/slider.component.min.js +1 -1
  24. package/assets/js/components/table/table.component.min.js +1 -1
  25. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  26. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  27. package/assets/js/components.bundle.js +1 -1
  28. package/assets/js/scripts.bundle.js +1 -1
  29. package/assets/js/scripts.bundle.min.js +1 -1
  30. package/assets/ts/components/multiselect/multiselect.component.ts +4 -3
  31. package/dist/components.es.js +11 -11
  32. package/dist/components.umd.js +11 -11
  33. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class a extends HTMLElement{constructor(){var t;super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=o=>(Array.from(o.querySelectorAll("dialog[open]")).forEach((t,a)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),E(t))}),o.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){const a=t.target.closest("[data-modal]"),s=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),n=document.querySelector(`dialog#${s}`);if(E(n),n.showModal(),n.focus(),!n.querySelector("iam-multi-step")){const i=n.offsetWidth;n.setAttribute("style",`max-width: ${i}px;`)}Array.from(n.querySelectorAll("[data-duplicate]")).forEach((i,f)=>{const h=i.getAttribute("data-duplicate"),d=document.getElementById(h);if(i.checked!=d.checked){i.checked=d.checked;const w=new Event("change");i.dispatchEvent(w)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:s})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){const a=t.target.closest("dialog[open]");t.preventDefault(),a.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((n,i)=>{n.classList.remove("active")});const s=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:a.id}});t.target.dispatchEvent(s),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){const a=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((s,n)=>{s.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){let a=t.target.closest("dialog[open]");if(window.getComputedStyle(a).display==="contents"&&(a=a.parentNode.closest("dialog[open]")),!a.classList.contains("dialog--transactional")&&!a.classList.contains("dialog--acknowledgement")){const n=a.getBoundingClientRect();(t.clientX<n.left||t.clientX>n.right||t.clientY<n.top||t.clientY>n.bottom)&&(t.target.closest("dialog *")||a.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();const a=t.target.closest(".dialog__wrapper > button"),s=a.parentNode;let n="openPopover";const i=s.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=i&&a.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((w,_)=>{w.removeAttribute("aria-expanded")}),i.hasAttribute("open"))i.close(),n="closePopover",i.removeAttribute("style"),a.removeAttribute("aria-expanded");else{i.show(),a.setAttribute("aria-expanded",!0);const w=a.getBoundingClientRect();let _=w.top,e=w.left;if(a.closest("iam-table")){const r=a.closest("iam-table").parentNode.getBoundingClientRect();_-=r.top,e-=r.left}i.classList.contains("dialog--fix")&&i.setAttribute("style",`position:fixed;top: ${_}px; left: ${e}px; margin: 3rem 0 0 0;`)}let f=i.getBoundingClientRect();const h=f.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(h>d){const w=i.hasAttribute("style")?i.getAttribute("style")+" ":"";i.setAttribute("style",w+"transform: translate(0, calc(-100% - 4rem))"),f=i.getBoundingClientRect(),f.top-window.scrollY<100&&i.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:n,id:a.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.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((a,s)=>{a.removeAttribute("aria-expanded")}))}),null),E=o=>{if(!o.querySelector(":scope .mh-lg")&&!o.querySelector("iam-multi-step")){o.innerHTML=`<div class="mh-lg">${o.innerHTML}</div>`;const t=o.querySelector(".mh-lg"),a=o.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){const s=a.previousSibling;t.before(a),s&&a.before(s)}}o.querySelector(":scope > button:first-child")||o.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function q(o,t){o&&t=="all"?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!0,o.querySelector("label").textContent="Select all"):o&&t==0?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!1,o.querySelector("label").textContent="Select all"):o&&t?(o.querySelector("input").indeterminate=!0,o.querySelector("input").checked=!1,o.querySelector("label").textContent=`${t} item${t>1?"s":""} selected`):o&&(o.querySelector("input").checked=!1,o.querySelector("input").indeterminate=!1,o.querySelector("label").textContent="Select all")}class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import x from"js-cookie";var g=function(S,c,a,i){function n(u){return u instanceof a?u:new a(function(p){p(u)})}return new(a||(a=Promise))(function(u,p){function b(d){try{m(i.next(d))}catch(f){p(f)}}function v(d){try{m(i.throw(d))}catch(f){p(f)}}function m(d){d.done?u(d.value):n(d.value).then(b,v)}m((i=i.apply(S,c||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class j extends HTMLElement{constructor(){var c;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function A(o,i){function u(e,t,r=!0){let p=!1,a=t.getAttribute("name");if(!a)return!1;a.includes("[]")&&(a=a.replace("[]",`[${t.value}]`));let s=e.querySelector(`[data-name="${a}"]`);s&&t.getAttribute("type")=="checkbox"&&(p=!t.checked);const h=t.getAttribute("data-filter-text");if(s||(s=document.createElement("button"),e.appendChild(s)),s.setAttribute("type","button"),s.classList.add("filter"),s.classList.add("tag"),r&&s.classList.add("tag--not-set"),s.setAttribute("data-name",a),s.innerHTML=h.replace("$value",t.value),(!t.value||p)&&s.remove(),t.parentNode.closest("[data-filter-text]")){const c=t.parentNode.closest("[data-filter-text]");let l=!0;if(a="",c.querySelectorAll("input").forEach((f,n)=>{const m=f.getAttribute("name");if(a+=`${n!=0?",":""}${m}`,e.querySelector(`[data-name="${m}"]`)&&e.querySelector(`[data-name="${m}"]`).remove(),f.value){const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r&&s.classList.add("tag--not-set"),d.setAttribute("data-name",m),d.innerHTML=h.replace("$value",f.value),e.appendChild(d)}else l=!1}),e.querySelector(`[data-name="${a}"]`)&&e.querySelector(`[data-name="${a}"]`).remove(),l){let f=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((m,d)=>{const y=m.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),f=f.replace(`$${d+1}`,m.value)});const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r&&s.classList.add("tag--not-set"),n.setAttribute("data-name",a),n.innerHTML=f,e.appendChild(n)}}}Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{u(i,e,!1)});const b=o.closest("dialog");b&&new MutationObserver(function(t){t[0].attributeName=="open"&&Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((r,p)=>{u(i,r,!1)})}).observe(b,{attributes:!0}),o.addEventListener("tags-set",function(e){i.innerHTML="",Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((t,r)=>{u(i,t,!1)})}),Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{e.addEventListener("change",function(r){o.hasAttribute("data-keep-same")||u(i,e),r.stopPropagation()})}),o.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){const t=e.target.closest("input[data-filter-text]");o.hasAttribute("data-keep-same")||u(i,t)}}),i.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const t=e.target.closest(".filter"),r=t.getAttribute("data-name").split(",");for(let p=0;p<r.length;p++){const a=r[p];let s=`[name="${a}"]`;a.match(/\[(.*)\]/)&&(a.replace(/\[(.*)\]/,"[]"),s=`[value="${a.replace(/.*\[(.*)\]/,"$1")}"]`);const h=o.querySelectorAll(s);for(let c=0;c<h.length;c++){const l=h[c];if(l.getAttribute("type")!="radio"&&l.getAttribute("type")!="checkbox"){l.value="";var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}else{l.checked=!1;var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}}}t.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",u=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,b=this.classList.toString(),e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const x=(e,t)=>{for(let a=1;a<=10;a++){if(e.hasAttribute(`data-colour-${a}`)){const i=e.getAttribute(`data-colour-${a}`);e.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${i})`),e.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${i}-hover)`)}Array.from(t.querySelectorAll(`[data-colour-${a}]`)).forEach(i=>{const r=i.getAttribute(`data-colour-${a}`);i.style.setProperty(`--chart-colour-${a}-set`,`var(--chart-colour-${r})`),i.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${r}-hover)`)})}return!0},u=(e,t,a)=>{const i=t.querySelector(".chart__key");i.innerHTML="";const r=t.querySelector(".chart__guidelines");r.innerHTML="";const o=t.querySelector(".chart__yaxis");o.innerHTML="",Array.from(t.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(n=>{n.remove()});const{xaxis:c}=d(e);return _(e,a),S(t,a,i),q(e,r),M(e,o),c&&T(t),!0},k=function(e,t){const a=t.querySelector(".chart");a.addEventListener("mousemove",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest("td:not(:first-child")){const l=c.target.closest("td:not(:first-child").getBoundingClientRect(),s=c.clientX-l.left,h=c.clientY-l.top;a.setAttribute("style",`--cursor-x: ${s}px; --cursor-y: ${h}px;`)}});const i=t.querySelectorAll("label");Array.from(i).forEach(c=>{t.querySelector(`input#${c.getAttribute("for")}`).checked?c.setAttribute("part","key-checked"):c.setAttribute("part","key-unchecked")});const r=e.querySelector("table"),o=t.querySelector("table");t.addEventListener("change",function(c){const n=c.target,l=new CustomEvent("view-change",{detail:{"data-dataset":n.getAttribute("data-dataset"),label:n.getAttribute("data-label"),checked:n.checked}});e.dispatchEvent(l),Array.from(i).forEach(s=>{var h;!((h=t.querySelector(`input#${s.getAttribute("for")}`))===null||h===void 0)&&h.checked?s.setAttribute("part","key-checked"):s.setAttribute("part","key-unchecked")}),o.innerHTML=r.innerHTML,_(e,o)})},A=function(e,t){const a=e.querySelector("table"),i=t.querySelector("table"),r=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},o=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},c=new MutationObserver(o),n=new MutationObserver(r);return c.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0}),!0},d=function(e){const t=e.shadowRoot.querySelector(".chart__wrapper table"),a=e.hasAttribute("data-min")?e.getAttribute("data-min"):0,i=e.hasAttribute("data-max")?e.getAttribute("data-max"):z(e,t),r=e.hasAttribute("data-yaxis")?e.getAttribute("data-yaxis").split(","):[],o=e.hasAttribute("data-guidelines")?e.getAttribute("data-guidelines").split(","):[],c=e.hasAttribute("data-xaxis")?e.getAttribute("data-xaxis").split(","):null;return{min:a,max:i,yaxis:r,xaxis:c,guidelines:o}};function z(e,t){const a=e.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",i=Array.from(t.querySelectorAll(a)).map(o=>o.getAttribute("data-numeric")),r=Math.max(...i);return Math.ceil(r)}const b=function(e,t,a,i){let r=String(e);r=r.replace("\xA3",""),r=r.replace("%",""),r=r.replace(",",""),r=Number.parseFloat(r);let o=(r-t)/(a-t)*100,c=o,n=0;return i&&i!=0&&(n=(i-t)/(a-t)*100),t<0&&(n=Math.abs(t/(a-t)*100),r<0?(o=n-o,n=n-o,c=n):(o=o-n,c=o+n)),{percent:o,axis:c,bottom:n}},_=function(e,t){Array.from(t.querySelectorAll("tbody tr")).forEach(r=>{let o=0;Array.from(r.querySelectorAll("td:not(:first-child)")).forEach(c=>{const n=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));c.setAttribute("data-numeric",n),c.setAttribute("data-value",c.textContent),getComputedStyle(c).display!="none"&&(o+=n)}),r.setAttribute("data-numeric",o)});const{min:a,max:i}=d(e);Array.from(t.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.querySelector("td:first-child, th:first-child")?r.querySelector("td:first-child, th:first-child").textContent:"";r.setAttribute("part","group");const n=(r.getAttribute("data-numeric")-a)/(i-a)*100;r.style.setProperty("--percent",`${n}%`),Array.from(r.querySelectorAll("td:not([data-label])")).forEach((h,p)=>{p==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),r.querySelectorAll("td").length>2&&h.setAttribute("data-label",t.querySelectorAll("thead th")[p].textContent)});const l=r.hasAttribute("data-min")?r.getAttribute("data-min"):a,s=r.hasAttribute("data-max")?r.getAttribute("data-max"):i;if(l<0){const h=Math.abs(l/(s-l)*100);e.setAttribute("style",`--min-bottom: ${h}%;`)}r.style.setProperty("--row-index",o+1),Array.from(r.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(h=>{if(getComputedStyle(h).display=="none")return;const f=h.innerHTML,v=Number.parseFloat(h.getAttribute("data-numeric")),m=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${c}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${f}</span>`),!h.hasAttribute("style")){const{percent:y,bottom:g,axis:w}=b(v,l,s,m);h.setAttribute("data-percent",y),h.setAttribute("style",`--bottom:${g}%;--percent:${y}%;--axis:${w}%;`)}})})},C=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart__spacer span"),i=e.querySelector(".chart table");let r="";Array.from(i.querySelectorAll("tbody tr td:first-child")).forEach(o=>{typeof o.textContent<"u"&&o.textContent.length>r.length&&(r=o.textContent)}),t.setAttribute("data-longest-label",r),a.innerHTML=r},$=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart table");let i="";Array.from(a.querySelectorAll("tbody tr td:not(:first-child) span")).forEach(r=>{typeof r.textContent<"u"&&r.textContent.length>i.length&&(i=r.textContent)}),t.setAttribute("data-longest-value",i)},S=function(e,t,a){const i=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let r;const o=Array.from(t.querySelectorAll("thead th"));return o.forEach((c,n)=>{n!=0&&(r=L(i,n,c.textContent,a,e,r)),n==50&&(o.length=n+1)}),!0};function L(e,t,a,i,r,o){const c=document.createElement("input");c.setAttribute("name",`${e}-dataset-${t}`),c.setAttribute("id",`${e}-dataset-${t}`),c.setAttribute("data-dataset",`${t}`),c.setAttribute("data-label",`${a}`),c.checked=!0,c.setAttribute("type","checkbox"),t==1?r.prepend(c):r.insertBefore(c,o.nextSibling),o=c;const n=document.createElement("label");return n.setAttribute("class","key btn btn-action"),n.setAttribute("for",`${e}-dataset-${t}`),n.setAttribute("data-label",`${a}`),n.setAttribute("part","key"),n.innerHTML=`${a}`,i.append(n),o}const q=function(e,t){let{min:a,max:i,yaxis:r,guidelines:o}=d(e);o.length||(o=r),t.innerHTML="";for(let c=0;c<o.length;c++){const n=parseFloat(o[c].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=b(n,a,i);t.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${r.indexOf(o[c])!=-1?`<span>${o[c]}</span>`:""}</div>`}},M=function(e,t){const{min:a,max:i,yaxis:r}=d(e);t.innerHTML="";for(let o=0;o<r.length;o++){const c=parseFloat(r[o].replace("\xA3","").replace("%","")),{axis:n}=b(c,a,i);t.innerHTML+=`<div class="axis__point" style="--percent:${n}%;"><span>${r[o]}</span></div>`}},T=function(e){const t=e.querySelector(".chart");let a=e.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),t.prepend(a)},F=function(e){const t=e.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(t).forEach(a=>{const i=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;a.innerHTML=`<button class="tooltip" popovertarget="${i}" part="tooltip" style="anchor-name: --${i};">${a.textContent}</button><span id="${i}" style="position-anchor: --${i};" popover part="tooltip__content" class="tooltip__content">${a.getAttribute("title")}</span>`})},H=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},D=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(i=>{e.addEventListener(i,function(r){const o={event:i,element:t,target:r.target};Object.keys(r.detail).forEach(c=>{const n=r.detail[c];o[c]=n}),window.dataLayer.push(o)})}),!0);H("iam-barchart");class E extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const m=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})},g=(r,t,i)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),i.forEach(e=>{r.addEventListener(e,function(n){const d={event:e,element:t,target:n.target};Object.keys(n.detail).forEach(o=>{const a=n.detail[o];d[o]=a}),window.dataLayer.push(d)})}),!0),b=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=function(e){const o=[];return Array.from(e.querySelectorAll(":scope > div")).forEach((n,t)=>{n.hasAttribute("data-thumbnail")&&(o[t]=n.getAttribute("data-thumbnail"))}),o},W=function(e,o){const n=e.querySelectorAll(":scope > div").length;let t="";for(let a=1;a<=n;a++){let r=null,i="";o.length&&o[a-1]?(i="has-thumbnail",r=`<img src="${o[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,t+=`<button class="control-${a} ${i}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return t},z=function(e,o){return o==1?e:Math.ceil(e/o)*o-o+1},A=function(e,o){return(e-1)/(o-1)*100},$=function(e){let o;const n=e.shadowRoot.querySelector(".carousel"),t=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),i=e.querySelectorAll(":scope > div").length;let v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y);r.setAttribute("min",1),r.setAttribute("step",g);let d=z(i,g);r.setAttribute("max",d),r.value=1;let p=A(1,d);r.style.setProperty("--percent",p+"%");let f,S="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(S="touchend",L="touchstart"),t.addEventListener("scroll",function(h){clearTimeout(o),o=setTimeout(function(){const s=t.clientWidth,m=t.scrollWidth,b=t.scrollLeft;let l=Math.round(b/m*i)+1;const _=e.querySelector(":scope > div").scrollWidth,w=e.querySelector(":scope > div:last-child").offsetLeft,k=t.scrollLeft+s+t.getBoundingClientRect().left>=w+60,u=Math.round(s/_),c=Math.ceil(i/u)*u-i;r.setAttribute("step",u),c>0&&k&&(l=Math.floor(i/u)*u+1),Array.from(n.querySelectorAll(".carousel__controls button")).forEach((x,E)=>{x.removeAttribute("aria-current")}),n.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?n.querySelector(".btn-prev").setAttribute("disabled","disabled"):n.querySelector(".btn-prev").removeAttribute("disabled"),l>i-u?n.querySelector(".btn-next").setAttribute("disabled","disabled"):n.querySelector(".btn-next").removeAttribute("disabled"),r.value=l,d=z(i,u),r.setAttribute("max",d),p=l/d*100,p=A(l,d),r.style.setProperty("--percent",p+"%")},100)},!1),a.addEventListener("click",function(h){for(let s=h.target;s&&s!=this;s=s.parentNode)if(typeof s.matches=="function"&&s.matches("button")){h.preventDefault(),Array.from(a.querySelectorAll("button")).forEach((l,_)=>{l.removeAttribute("aria-current")}),s.setAttribute("aria-current",!0);const m=new CustomEvent("pip-clicked",{detail:{slide:s.getAttribute("data-slide")}});e.dispatchEvent(m);const b=e.querySelector(`:scope > *:nth-child(${s.getAttribute("data-slide")})`);t.scroll({top:0,left:b.offsetLeft-t.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(h){const s=t.clientWidth;t.scrollWidth;const m=e.querySelector(":scope > div").scrollWidth,b=Math.round(s/m),l=e.querySelector(":scope > div:last-child").offsetLeft,_=t.scrollLeft+s+t.getBoundingClientRect().left>=l+60,w=Math.ceil(i/b)*b-i,k=b-w,u=_&&w>0?k*m:t.clientWidth;for(let c=h.target;c&&c!=this;c=c.parentNode)if(typeof c.matches=="function"&&c.matches(".btn-next, .btn-prev")){const x=c.matches(".btn-next")?"next":"prev",E=new CustomEvent(`${x}-clicked`,{detail:{slide:c.getAttribute("data-go")}});e.dispatchEvent(E),h.preventDefault();const q=c.classList.contains("btn-prev")?t.scrollLeft-u:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(h){clearInterval(f),f=setInterval(function(){v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y),r.setAttribute("step",g),d=z(i,g),r.setAttribute("max",d),p=A(r.value,d),r.style.setProperty("--percent",p+"%")},10)}),r.addEventListener(S,function(h){clearInterval(f)}),r.addEventListener("change",function(h){clearInterval(f);const s=e.querySelector(`:scope > *:nth-child(${r.value})`);t.scroll({top:0,left:s?s.offsetLeft-t.getBoundingClientRect().left:0,behavior:"smooth"}),s.matches(".btn-next");const m=new CustomEvent("slider-changed",{detail:{slide:r.value}});e.dispatchEvent(m)},!1)},C=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},P=(e,o,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),n.forEach(t=>{e.addEventListener(t,function(a){const r={event:t,element:o,target:a.target};Object.keys(a.detail).forEach(i=>{const v=a.detail[i];r[i]=v}),window.dataLayer.push(r)})}),!0);C("iam-carousel");class I extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class a 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=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function v(d,s){const n=s.querySelector(".files"),i=s.querySelector(".drop-area"),e=d.querySelector("input"),f=d.hasAttribute("data-maxsize")?d.getAttribute("data-maxsize"):0,u=s.querySelector(".invalid-feedback.size"),h=s.querySelector(".invalid-feedback.ext"),o=e.cloneNode();i.append(o);const b=function(t){if(!e.hasAttribute("accept"))return!0;const r=t.split(".").pop();return!!e.getAttribute("accept").includes(r)};if(s.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(t.target.closest(".btn-primary"),h.classList.remove("d-block"),u.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),s.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const r=new DataTransfer,{files:a}=e,m=t.target.closest(".files button");for(let p=0;p<a.length;p++){const l=a[p];l.name!=m.getAttribute("data-file")&&r.items.add(l)}e.files=r.files;const c=new Event("change");e.dispatchEvent(c)}}),o.addEventListener("change",t=>{if(e.hasAttribute("multiple")){const a=[...e.files,...o.files],m=[],c=new DataTransfer;for(let p=0;p<a.length;p++){const l=a[p],g=l.size/1e3;!m.includes(l.name)&&(f==0||g<f)&&b(l.name)&&c.items.add(l),b(l.name)||h.classList.add("d-block"),g>f&&u.classList.add("d-block"),m.push(l.name)}e.files=c.files}else e.files=o.files;const r=new Event("change");e.dispatchEvent(r)}),o.addEventListener("dragenter",t=>{o.classList.add("focus")}),o.addEventListener("dragleave",t=>{o.classList.remove("focus")}),o.addEventListener("drop",t=>{o.classList.remove("focus")}),e.addEventListener("change",t=>{if(e.files.length==1){const a=e.files[0],m=a.size/1e3;if(!b(a.name)){h.classList.add("d-block");const c=new DataTransfer;e.files=c.files}if(m>f){u.classList.add("d-block");const c=new DataTransfer;e.files=c.files}}n.innerHTML="";for(const a of e.files)n.innerHTML+=`<span class="file" part="file">${a.name} <button data-file="${a.name}">Remove</button></span>`;const r=new CustomEvent("elementchange",{detail:{files:e.files}});if(d.dispatchEvent(r),e.files.length==0){const a=new CustomEvent("empty");d.dispatchEvent(a)}}),d.hasAttribute("data-filename")){const t=d.getAttribute("data-filename");t&&(n.innerHTML=`<span class="file">${t} <button data-file="${t}">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class y extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=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"):`${s}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const h=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},p=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(o=>{e.addEventListener(o,function(i){const r={event:o,element:t,target:i.target};Object.keys(i.detail).forEach(d=>{const s=i.detail[d];r[d]=s}),window.dataLayer.push(r)})}),!0),g=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function i(s,t){n(s,t)}function n(s,t){let e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach((e,a)=>{const r=e.textContent.toLowerCase();e.classList.add("d-none"),r.includes(t.toLowerCase())&&e.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:t})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class b extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",c=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});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",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -23,7 +23,7 @@ class iamMultiselect extends HTMLElement {
23
23
  ${loadCSS}
24
24
  ${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
25
25
  </style>
26
- <label for="search"> <slot name="feedback"></slot></label>
26
+ <label for="search" class="mb-0"><span class="inner-label label"></span> <slot name="feedback"></slot>
27
27
  <div class="outer">
28
28
  <div class="wrapper">
29
29
 
@@ -36,6 +36,7 @@ class iamMultiselect extends HTMLElement {
36
36
  <button id="clear"><span class="visually-hidden">Clear</span></button>
37
37
  </div>
38
38
  </div>
39
+ </label>
39
40
  `;
40
41
  this.shadowRoot.appendChild(template.content.cloneNode(true));
41
42
  }
@@ -46,8 +47,8 @@ class iamMultiselect extends HTMLElement {
46
47
  const search = multiselect.shadowRoot.querySelector('#search');
47
48
  const button = multiselect.shadowRoot.querySelector('#clear');
48
49
  let order = 0;
49
- const label = multiselect.shadowRoot.querySelector('label');
50
- label.innerHTML = multiselect.getAttribute('data-label');
50
+ const innerLabel = multiselect.shadowRoot.querySelector('label .inner-label');
51
+ innerLabel.innerHTML = multiselect.getAttribute('data-label');
51
52
  if (multiselect.hasAttribute('placeholder')) {
52
53
  search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));
53
54
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",l=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
5
5
  <style>
@@ -8,7 +8,7 @@
8
8
 
9
9
  ${this.hasAttribute("css")?`@import "${this.getAttribute("css")}";`:""}
10
10
  </style>
11
- <label for="search"> <slot name="feedback"></slot></label>
11
+ <label for="search" class="mb-0"><span class="inner-label label"></span> <slot name="feedback"></slot>
12
12
  <div class="outer">
13
13
  <div class="wrapper">
14
14
 
@@ -21,5 +21,6 @@
21
21
  <button id="clear"><span class="visually-hidden">Clear</span></button>
22
22
  </div>
23
23
  </div>
24
- `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const t=this,l=this.closest("form"),r=this.shadowRoot.querySelector(".wrapper"),a=t.shadowRoot.querySelector("#search"),h=t.shadowRoot.querySelector("#clear");let i=0;const m=t.shadowRoot.querySelector("label");if(m.innerHTML=t.getAttribute("data-label"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")),t.setAttribute("data-error","true"),l&&t.hasAttribute("data-is-required")){const e=new MutationObserver(function(o){o.forEach(function(n){const s=n.target;console.log(s),s.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated")})});l.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated"),e.observe(l,{attributes:!0,attributeFilter:["style","class"]})}function c(e){e.checked==!1?(e.closest("label").removeAttribute("slot"),e.closest("label").removeAttribute("style"),e.closest("label").removeAttribute("data-order")):(i++,e.closest("label").setAttribute("slot","checked"),e.closest("label").setAttribute("style",`--order:${i};`),e.closest("label").setAttribute("data-order",i)),t.querySelector('label[slot="checked"]')?(r.classList.add("filled"),t.removeAttribute("data-error"),a.removeAttribute("placeholder")):(r.classList.remove("filled"),t.setAttribute("data-error","true"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")))}Array.from(t.querySelectorAll('label input[type="checkbox"]:checked')).forEach((e,o)=>{c(e)}),a.addEventListener("input",e=>{Array.from(t.querySelectorAll('label:not([slot="checked"])')).forEach((o,n)=>{const d=o.querySelector("input").value,b=o.textContent;d.toLowerCase().includes(a.value.toLowerCase())||b.toLowerCase().includes(a.value.toLowerCase())?o.removeAttribute("slot"):o.setAttribute("slot","notmatched")})});let u;t.addEventListener("focus",e=>{t.classList.add("hover"),clearTimeout(u)}),a.addEventListener("blur",e=>{clearTimeout(u),u=setTimeout(function(){t.classList.remove("hover")},1e3)}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest('input[type="checkbox"]')){const o=e.target.closest('input[type="checkbox"]');c(o),a.focus()}}),h.addEventListener("click",function(e){Array.from(t.querySelectorAll('label input[type="checkbox"]')).forEach((o,n)=>{o.checked=!1,c(o)}),a.focus()}),t.addEventListener("keydown",function(e){const o=document.activeElement;switch(e.key){case"ArrowUp":if(e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=t.querySelectorAll('label:not([slot="checked"]):not([slot="checked"])'),s=Array.from(n).indexOf(o.closest("label")),d=Array.from(n)[s-1];d?d.focus():a.focus()}break;case"ArrowDown":if(e.preventDefault(),o==t)t.querySelector('label:not([slot="checked"]):not([slot="checked"])').focus();else if(o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=o.value,s=t.querySelector(`label:has(input[value="${n}"]) ~ label:not([slot="checked"]):not([slot="checked"])`);s&&s.focus()}break;case"Enter":e.stopPropagation(),e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"&&(o.checked==!1?o.checked=!0:o.checked=!1),c(o),a.focus();break}});function p(){if(i==0)return!1;let e=t.querySelector(`label[data-order="${i}"]`);return e||(e=p(i--)),e}a.addEventListener("keydown",function(e){switch(e.key){case"Enter":t.querySelector(`input[value="${a.value}"]:not(:checked)`)||(a.value=""),a.focus();break;case"Backspace":if(!a.value){const n=p();if(n){const s=n.querySelector("input");s.checked=!1,c(s)}a.focus()}break}}),t.addEventListener("mousedown",e=>{r.setAttribute("data-mousedown","true")}),t.addEventListener("mouseup",e=>{r.removeAttribute("data-mousedown")})}}export{f as default};
24
+ </label>
25
+ `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const t=this,l=this.closest("form"),r=this.shadowRoot.querySelector(".wrapper"),a=t.shadowRoot.querySelector("#search"),h=t.shadowRoot.querySelector("#clear");let i=0;const m=t.shadowRoot.querySelector("label .inner-label");if(m.innerHTML=t.getAttribute("data-label"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")),t.setAttribute("data-error","true"),l&&t.hasAttribute("data-is-required")){const e=new MutationObserver(function(o){o.forEach(function(n){const s=n.target;console.log(s),s.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated")})});l.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated"),e.observe(l,{attributes:!0,attributeFilter:["style","class"]})}function c(e){e.checked==!1?(e.closest("label").removeAttribute("slot"),e.closest("label").removeAttribute("style"),e.closest("label").removeAttribute("data-order")):(i++,e.closest("label").setAttribute("slot","checked"),e.closest("label").setAttribute("style",`--order:${i};`),e.closest("label").setAttribute("data-order",i)),t.querySelector('label[slot="checked"]')?(r.classList.add("filled"),t.removeAttribute("data-error"),a.removeAttribute("placeholder")):(r.classList.remove("filled"),t.setAttribute("data-error","true"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")))}Array.from(t.querySelectorAll('label input[type="checkbox"]:checked')).forEach((e,o)=>{c(e)}),a.addEventListener("input",e=>{Array.from(t.querySelectorAll('label:not([slot="checked"])')).forEach((o,n)=>{const d=o.querySelector("input").value,b=o.textContent;d.toLowerCase().includes(a.value.toLowerCase())||b.toLowerCase().includes(a.value.toLowerCase())?o.removeAttribute("slot"):o.setAttribute("slot","notmatched")})});let u;t.addEventListener("focus",e=>{t.classList.add("hover"),clearTimeout(u)}),a.addEventListener("blur",e=>{clearTimeout(u),u=setTimeout(function(){t.classList.remove("hover")},1e3)}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest('input[type="checkbox"]')){const o=e.target.closest('input[type="checkbox"]');c(o),a.focus()}}),h.addEventListener("click",function(e){Array.from(t.querySelectorAll('label input[type="checkbox"]')).forEach((o,n)=>{o.checked=!1,c(o)}),a.focus()}),t.addEventListener("keydown",function(e){const o=document.activeElement;switch(e.key){case"ArrowUp":if(e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=t.querySelectorAll('label:not([slot="checked"]):not([slot="checked"])'),s=Array.from(n).indexOf(o.closest("label")),d=Array.from(n)[s-1];d?d.focus():a.focus()}break;case"ArrowDown":if(e.preventDefault(),o==t)t.querySelector('label:not([slot="checked"]):not([slot="checked"])').focus();else if(o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=o.value,s=t.querySelector(`label:has(input[value="${n}"]) ~ label:not([slot="checked"]):not([slot="checked"])`);s&&s.focus()}break;case"Enter":e.stopPropagation(),e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"&&(o.checked==!1?o.checked=!0:o.checked=!1),c(o),a.focus();break}});function p(){if(i==0)return!1;let e=t.querySelector(`label[data-order="${i}"]`);return e||(e=p(i--)),e}a.addEventListener("keydown",function(e){switch(e.key){case"Enter":t.querySelector(`input[value="${a.value}"]:not(:checked)`)||(a.value=""),a.focus();break;case"Backspace":if(!a.value){const n=p();if(n){const s=n.querySelector("input");s.checked=!1,c(s)}a.focus()}break}}),t.addEventListener("mousedown",e=>{r.setAttribute("data-mousedown","true")}),t.addEventListener("mouseup",e=>{r.removeAttribute("data-mousedown")})}}export{f as default};
25
26
  //# sourceMappingURL=multiselect.component.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiselect.component.min.js","sources":["multiselect.component.js"],"sourcesContent":["// @ts-nocheck\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'mutliselect',\n});\nclass iamMultiselect extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/multiselect.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <label for=\"search\"> <slot name=\"feedback\"></slot></label>\n <div class=\"outer\">\n <div class=\"wrapper\">\n \n <slot name=\"checked\"></slot>\n <input name=\"search\" id=\"search\" autocomplete=\"off\" required part=\"search-input\"/>\n <span class=\"admin-panel feedback\">This field is required</span>\n <div class=\"admin-panel dropdown\" part=\"dropdown\">\n <slot></slot>\n </div>\n <button id=\"clear\"><span class=\"visually-hidden\">Clear</span></button>\n </div>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const multiselect = this;\n const form = this.closest('form');\n const wrapper = this.shadowRoot.querySelector('.wrapper');\n const search = multiselect.shadowRoot.querySelector('#search');\n const button = multiselect.shadowRoot.querySelector('#clear');\n let order = 0;\n const label = multiselect.shadowRoot.querySelector('label');\n label.innerHTML = multiselect.getAttribute('data-label');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n multiselect.setAttribute('data-error', 'true');\n // If in form and is required lets watch for the form being submitted\n if (form && multiselect.hasAttribute('data-is-required')) {\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutationRecord) {\n const targetElement = mutationRecord.target;\n console.log(targetElement);\n if (targetElement.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n });\n });\n if (form.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n observer.observe(form, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n // Set the correct attributes\n function setItem(inputToSet) {\n if (inputToSet.checked == false) {\n inputToSet.closest('label').removeAttribute('slot');\n inputToSet.closest('label').removeAttribute('style');\n inputToSet.closest('label').removeAttribute('data-order');\n }\n else {\n order++;\n inputToSet.closest('label').setAttribute('slot', 'checked');\n inputToSet.closest('label').setAttribute('style', `--order:${order};`);\n inputToSet.closest('label').setAttribute('data-order', order);\n }\n // check for errors\n if (multiselect.querySelector('label[slot=\"checked\"]')) {\n wrapper.classList.add('filled');\n multiselect.removeAttribute('data-error');\n search.removeAttribute('placeholder');\n }\n else {\n wrapper.classList.remove('filled');\n multiselect.setAttribute('data-error', 'true');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n }\n }\n // Set on load\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]:checked`)).forEach((checkbox, index) => {\n setItem(checkbox);\n });\n // Filter list\n search.addEventListener('input', (event) => {\n Array.from(multiselect.querySelectorAll(`label:not([slot=\"checked\"])`)).forEach((label, index) => {\n const checkbox = label.querySelector('input');\n const searchValue = checkbox.value;\n const labelText = label.textContent;\n if (searchValue.toLowerCase().includes(search.value.toLowerCase()) ||\n labelText.toLowerCase().includes(search.value.toLowerCase())) {\n label.removeAttribute('slot');\n }\n else {\n label.setAttribute('slot', 'notmatched');\n }\n });\n });\n // Add a delayed hover effect for non hover devices\n let hoverTimeout;\n multiselect.addEventListener('focus', (event) => {\n multiselect.classList.add('hover');\n clearTimeout(hoverTimeout);\n });\n search.addEventListener('blur', (event) => {\n clearTimeout(hoverTimeout);\n hoverTimeout = setTimeout(function () {\n multiselect.classList.remove('hover');\n }, 1000);\n });\n // Set items\n multiselect.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input[type=\"checkbox\"]')) {\n const checkbox = event.target.closest('input[type=\"checkbox\"]');\n setItem(checkbox);\n search.focus();\n }\n });\n // Clear all\n button.addEventListener('click', function (event) {\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]`)).forEach((checkbox, index) => {\n checkbox.checked = false;\n setItem(checkbox);\n });\n search.focus();\n });\n // Add some keyboard features to keep it accessible\n multiselect.addEventListener('keydown', function (event) {\n const activeElement = document.activeElement;\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'ArrowUp':\n // Up pressed\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const arrCheckboxes = multiselect.querySelectorAll(`label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n const activeIndex = Array.from(arrCheckboxes).indexOf(activeElement.closest('label'));\n const prevCheckbox = Array.from(arrCheckboxes)[activeIndex - 1];\n if (prevCheckbox)\n prevCheckbox.focus();\n else\n search.focus();\n }\n break;\n case 'ArrowDown':\n // Down pressed\n event.preventDefault();\n if (activeElement == multiselect) {\n multiselect.querySelector('label:not([slot=\"checked\"]):not([slot=\"checked\"])').focus();\n }\n else if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const activeValue = activeElement.value;\n const nextCheckbox = multiselect.querySelector(`label:has(input[value=\"${activeValue}\"]) ~ label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n if (nextCheckbox)\n nextCheckbox.focus();\n }\n break;\n case 'Enter':\n event.stopPropagation();\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n if (activeElement.checked == false)\n activeElement.checked = true;\n else\n activeElement.checked = false;\n }\n setItem(activeElement);\n search.focus();\n break;\n }\n });\n function checkLastTag() {\n if (order == 0)\n return false;\n let lastTag = multiselect.querySelector(`label[data-order=\"${order}\"]`);\n if (!lastTag) {\n lastTag = checkLastTag(order--);\n }\n return lastTag;\n }\n search.addEventListener('keydown', function (event) {\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'Enter':\n const match = multiselect.querySelector(`input[value=\"${search.value}\"]:not(:checked)`);\n if (!match)\n search.value = '';\n search.focus();\n break;\n case 'Backspace':\n if (!search.value) {\n const lastTag = checkLastTag(order);\n if (lastTag) {\n const lastTagInput = lastTag.querySelector('input');\n lastTagInput.checked = false;\n setItem(lastTagInput);\n }\n search.focus();\n }\n break;\n }\n });\n // Fix for the inline edit multiselect\n multiselect.addEventListener('mousedown', (event) => {\n wrapper.setAttribute('data-mousedown', 'true');\n });\n multiselect.addEventListener('mouseup', (event) => {\n wrapper.removeAttribute('data-mousedown');\n });\n }\n}\nexport default iamMultiselect;\n"],"names":["iamMultiselect","assetLocation","coreCSS","template","multiselect","form","wrapper","search","button","order","label","observer","mutations","mutationRecord","targetElement","setItem","inputToSet","checkbox","index","event","searchValue","labelText","hoverTimeout","activeElement","arrCheckboxes","activeIndex","prevCheckbox","activeValue","nextCheckbox","checkLastTag","lastTag","lastTagInput"],"mappings":";;;IAEA,OAAO,UAAY,OAAO,WAAa,GACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAAS,aACb,CAAC,EACD,MAAMA,UAAuB,WAAY,CACrC,aAAc,CACV,QACA,KAAK,aAAa,CAAE,KAAM,MAAQ,CAAA,EAClC,MAAMC,EAAgB,SAAS,KAAK,aAAa,sBAAsB,EACjE,SAAS,KAAK,aAAa,sBAAsB,EACjD,UACAC,EAAU,SAAS,KAAK,aAAa,eAAe,EACpD,SAAS,KAAK,aAAa,eAAe,EAC1C,GAAGD,qBAEHE,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA,eAEdD;AAAA;AAAA;AAAA,MAET,KAAK,aAAa,KAAK,EAAI,YAAY,KAAK,aAAa,KAAK,MAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAgBpE,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,mBAAoB,CAChB,MAAMC,EAAc,KACdC,EAAO,KAAK,QAAQ,MAAM,EAC1BC,EAAU,KAAK,WAAW,cAAc,UAAU,EAClDC,EAASH,EAAY,WAAW,cAAc,SAAS,EACvDI,EAASJ,EAAY,WAAW,cAAc,QAAQ,EAC5D,IAAIK,EAAQ,EACZ,MAAMC,EAAQN,EAAY,WAAW,cAAc,OAAO,EAO1D,GANAM,EAAM,UAAYN,EAAY,aAAa,YAAY,EACnDA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAE9EA,EAAY,aAAa,aAAc,MAAM,EAEzCC,GAAQD,EAAY,aAAa,kBAAkB,EAAG,CACtD,MAAMO,EAAW,IAAI,iBAAiB,SAAUC,EAAW,CACvDA,EAAU,QAAQ,SAAUC,EAAgB,CACxC,MAAMC,EAAgBD,EAAe,OACrC,QAAQ,IAAIC,CAAa,EACrBA,EAAc,UAAU,SAAS,eAAe,EAChDR,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,CAEhE,CAAiB,CACjB,CAAa,EACGD,EAAK,UAAU,SAAS,eAAe,EACvCC,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,EAE5CK,EAAS,QAAQN,EAAM,CACnB,WAAY,GACZ,gBAAiB,CAAC,QAAS,OAAO,CAClD,CAAa,EAGL,SAASU,EAAQC,EAAY,CACrBA,EAAW,SAAW,IACtBA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,MAAM,EAClDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,OAAO,EACnDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,YAAY,IAGxDP,IACAO,EAAW,QAAQ,OAAO,EAAE,aAAa,OAAQ,SAAS,EAC1DA,EAAW,QAAQ,OAAO,EAAE,aAAa,QAAS,WAAWP,IAAQ,EACrEO,EAAW,QAAQ,OAAO,EAAE,aAAa,aAAcP,CAAK,GAG5DL,EAAY,cAAc,uBAAuB,GACjDE,EAAQ,UAAU,IAAI,QAAQ,EAC9BF,EAAY,gBAAgB,YAAY,EACxCG,EAAO,gBAAgB,aAAa,IAGpCD,EAAQ,UAAU,OAAO,QAAQ,EACjCF,EAAY,aAAa,aAAc,MAAM,EACzCA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAGtF,CAEA,MAAM,KAAKA,EAAY,iBAAiB,sCAAsC,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAC1GH,EAAQE,CAAQ,CAC5B,CAAS,EAEDV,EAAO,iBAAiB,QAAUY,GAAU,CACxC,MAAM,KAAKf,EAAY,iBAAiB,6BAA6B,CAAC,EAAE,QAAQ,CAACM,EAAOQ,IAAU,CAE9F,MAAME,EADWV,EAAM,cAAc,OAAO,EACf,MACvBW,EAAYX,EAAM,YACpBU,EAAY,cAAc,SAASb,EAAO,MAAM,aAAa,GAC7Dc,EAAU,YAAW,EAAG,SAASd,EAAO,MAAM,YAAW,CAAE,EAC3DG,EAAM,gBAAgB,MAAM,EAG5BA,EAAM,aAAa,OAAQ,YAAY,CAE3D,CAAa,CACb,CAAS,EAED,IAAIY,EACJlB,EAAY,iBAAiB,QAAUe,GAAU,CAC7Cf,EAAY,UAAU,IAAI,OAAO,EACjC,aAAakB,CAAY,CACrC,CAAS,EACDf,EAAO,iBAAiB,OAASY,GAAU,CACvC,aAAaG,CAAY,EACzBA,EAAe,WAAW,UAAY,CAClClB,EAAY,UAAU,OAAO,OAAO,CACvC,EAAE,GAAI,CACnB,CAAS,EAEDA,EAAY,iBAAiB,SAAWe,GAAU,CAC9C,GAAIA,GAASA,EAAM,kBAAkB,aAAeA,EAAM,OAAO,QAAQ,wBAAwB,EAAG,CAChG,MAAMF,EAAWE,EAAM,OAAO,QAAQ,wBAAwB,EAC9DJ,EAAQE,CAAQ,EAChBV,EAAO,MAAK,EAE5B,CAAS,EAEDC,EAAO,iBAAiB,QAAS,SAAUW,EAAO,CAC9C,MAAM,KAAKf,EAAY,iBAAiB,8BAA8B,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAClGD,EAAS,QAAU,GACnBF,EAAQE,CAAQ,CAChC,CAAa,EACDV,EAAO,MAAK,CACxB,CAAS,EAEDH,EAAY,iBAAiB,UAAW,SAAUe,EAAO,CACrD,MAAMI,EAAgB,SAAS,cAC/B,OAAQJ,EAAM,IAC1B,CACgB,IAAK,UAGD,GADAA,EAAM,eAAc,EAChBI,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CACxF,MAAMC,EAAgBpB,EAAY,iBAAiB,mDAAmD,EAChGqB,EAAc,MAAM,KAAKD,CAAa,EAAE,QAAQD,EAAc,QAAQ,OAAO,CAAC,EAC9EG,EAAe,MAAM,KAAKF,CAAa,EAAEC,EAAc,CAAC,EAC1DC,EACAA,EAAa,MAAK,EAElBnB,EAAO,MAAK,EAEpB,MACJ,IAAK,YAGD,GADAY,EAAM,eAAc,EAChBI,GAAiBnB,EACjBA,EAAY,cAAc,mDAAmD,EAAE,MAAK,UAE/EmB,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CAC7F,MAAMI,EAAcJ,EAAc,MAC5BK,EAAexB,EAAY,cAAc,0BAA0BuB,0DAAoE,EACzIC,GACAA,EAAa,MAAK,EAE1B,MACJ,IAAK,QACDT,EAAM,gBAAe,EACrBA,EAAM,eAAc,EAChBI,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,aACxEA,EAAc,SAAW,GACzBA,EAAc,QAAU,GAExBA,EAAc,QAAU,IAEhCR,EAAQQ,CAAa,EACrBhB,EAAO,MAAK,EACZ,KACR,CACZ,CAAS,EACD,SAASsB,GAAe,CACpB,GAAIpB,GAAS,EACT,MAAO,GACX,IAAIqB,EAAU1B,EAAY,cAAc,qBAAqBK,KAAS,EACtE,OAAKqB,IACDA,EAAUD,EAAapB,GAAO,GAE3BqB,CACX,CACAvB,EAAO,iBAAiB,UAAW,SAAUY,EAAO,CAChD,OAAQA,EAAM,IAC1B,CACgB,IAAK,QACaf,EAAY,cAAc,gBAAgBG,EAAO,uBAAuB,IAElFA,EAAO,MAAQ,IACnBA,EAAO,MAAK,EACZ,MACJ,IAAK,YACD,GAAI,CAACA,EAAO,MAAO,CACf,MAAMuB,EAAUD,EAAkB,EAClC,GAAIC,EAAS,CACT,MAAMC,EAAeD,EAAQ,cAAc,OAAO,EAClDC,EAAa,QAAU,GACvBhB,EAAQgB,CAAY,EAExBxB,EAAO,MAAK,EAEhB,KACR,CACZ,CAAS,EAEDH,EAAY,iBAAiB,YAAce,GAAU,CACjDb,EAAQ,aAAa,iBAAkB,MAAM,CACzD,CAAS,EACDF,EAAY,iBAAiB,UAAYe,GAAU,CAC/Cb,EAAQ,gBAAgB,gBAAgB,CACpD,CAAS,CACL,CACJ"}
1
+ {"version":3,"file":"multiselect.component.min.js","sources":["multiselect.component.js"],"sourcesContent":["// @ts-nocheck\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'mutliselect',\n});\nclass iamMultiselect extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/multiselect.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <label for=\"search\" class=\"mb-0\"><span class=\"inner-label label\"></span> <slot name=\"feedback\"></slot>\n <div class=\"outer\">\n <div class=\"wrapper\">\n \n <slot name=\"checked\"></slot>\n <input name=\"search\" id=\"search\" autocomplete=\"off\" required part=\"search-input\"/>\n <span class=\"admin-panel feedback\">This field is required</span>\n <div class=\"admin-panel dropdown\" part=\"dropdown\">\n <slot></slot>\n </div>\n <button id=\"clear\"><span class=\"visually-hidden\">Clear</span></button>\n </div>\n </div>\n </label>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const multiselect = this;\n const form = this.closest('form');\n const wrapper = this.shadowRoot.querySelector('.wrapper');\n const search = multiselect.shadowRoot.querySelector('#search');\n const button = multiselect.shadowRoot.querySelector('#clear');\n let order = 0;\n const innerLabel = multiselect.shadowRoot.querySelector('label .inner-label');\n innerLabel.innerHTML = multiselect.getAttribute('data-label');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n multiselect.setAttribute('data-error', 'true');\n // If in form and is required lets watch for the form being submitted\n if (form && multiselect.hasAttribute('data-is-required')) {\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutationRecord) {\n const targetElement = mutationRecord.target;\n console.log(targetElement);\n if (targetElement.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n });\n });\n if (form.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n observer.observe(form, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n // Set the correct attributes\n function setItem(inputToSet) {\n if (inputToSet.checked == false) {\n inputToSet.closest('label').removeAttribute('slot');\n inputToSet.closest('label').removeAttribute('style');\n inputToSet.closest('label').removeAttribute('data-order');\n }\n else {\n order++;\n inputToSet.closest('label').setAttribute('slot', 'checked');\n inputToSet.closest('label').setAttribute('style', `--order:${order};`);\n inputToSet.closest('label').setAttribute('data-order', order);\n }\n // check for errors\n if (multiselect.querySelector('label[slot=\"checked\"]')) {\n wrapper.classList.add('filled');\n multiselect.removeAttribute('data-error');\n search.removeAttribute('placeholder');\n }\n else {\n wrapper.classList.remove('filled');\n multiselect.setAttribute('data-error', 'true');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n }\n }\n // Set on load\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]:checked`)).forEach((checkbox, index) => {\n setItem(checkbox);\n });\n // Filter list\n search.addEventListener('input', (event) => {\n Array.from(multiselect.querySelectorAll(`label:not([slot=\"checked\"])`)).forEach((label, index) => {\n const checkbox = label.querySelector('input');\n const searchValue = checkbox.value;\n const labelText = label.textContent;\n if (searchValue.toLowerCase().includes(search.value.toLowerCase()) ||\n labelText.toLowerCase().includes(search.value.toLowerCase())) {\n label.removeAttribute('slot');\n }\n else {\n label.setAttribute('slot', 'notmatched');\n }\n });\n });\n // Add a delayed hover effect for non hover devices\n let hoverTimeout;\n multiselect.addEventListener('focus', (event) => {\n multiselect.classList.add('hover');\n clearTimeout(hoverTimeout);\n });\n search.addEventListener('blur', (event) => {\n clearTimeout(hoverTimeout);\n hoverTimeout = setTimeout(function () {\n multiselect.classList.remove('hover');\n }, 1000);\n });\n // Set items\n multiselect.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input[type=\"checkbox\"]')) {\n const checkbox = event.target.closest('input[type=\"checkbox\"]');\n setItem(checkbox);\n search.focus();\n }\n });\n // Clear all\n button.addEventListener('click', function (event) {\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]`)).forEach((checkbox, index) => {\n checkbox.checked = false;\n setItem(checkbox);\n });\n search.focus();\n });\n // Add some keyboard features to keep it accessible\n multiselect.addEventListener('keydown', function (event) {\n const activeElement = document.activeElement;\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'ArrowUp':\n // Up pressed\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const arrCheckboxes = multiselect.querySelectorAll(`label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n const activeIndex = Array.from(arrCheckboxes).indexOf(activeElement.closest('label'));\n const prevCheckbox = Array.from(arrCheckboxes)[activeIndex - 1];\n if (prevCheckbox)\n prevCheckbox.focus();\n else\n search.focus();\n }\n break;\n case 'ArrowDown':\n // Down pressed\n event.preventDefault();\n if (activeElement == multiselect) {\n multiselect.querySelector('label:not([slot=\"checked\"]):not([slot=\"checked\"])').focus();\n }\n else if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const activeValue = activeElement.value;\n const nextCheckbox = multiselect.querySelector(`label:has(input[value=\"${activeValue}\"]) ~ label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n if (nextCheckbox)\n nextCheckbox.focus();\n }\n break;\n case 'Enter':\n event.stopPropagation();\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n if (activeElement.checked == false)\n activeElement.checked = true;\n else\n activeElement.checked = false;\n }\n setItem(activeElement);\n search.focus();\n break;\n }\n });\n function checkLastTag() {\n if (order == 0)\n return false;\n let lastTag = multiselect.querySelector(`label[data-order=\"${order}\"]`);\n if (!lastTag) {\n lastTag = checkLastTag(order--);\n }\n return lastTag;\n }\n search.addEventListener('keydown', function (event) {\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'Enter':\n const match = multiselect.querySelector(`input[value=\"${search.value}\"]:not(:checked)`);\n if (!match)\n search.value = '';\n search.focus();\n break;\n case 'Backspace':\n if (!search.value) {\n const lastTag = checkLastTag(order);\n if (lastTag) {\n const lastTagInput = lastTag.querySelector('input');\n lastTagInput.checked = false;\n setItem(lastTagInput);\n }\n search.focus();\n }\n break;\n }\n });\n // Fix for the inline edit multiselect\n multiselect.addEventListener('mousedown', (event) => {\n wrapper.setAttribute('data-mousedown', 'true');\n });\n multiselect.addEventListener('mouseup', (event) => {\n wrapper.removeAttribute('data-mousedown');\n });\n }\n}\nexport default iamMultiselect;\n"],"names":["iamMultiselect","assetLocation","coreCSS","template","multiselect","form","wrapper","search","button","order","innerLabel","observer","mutations","mutationRecord","targetElement","setItem","inputToSet","checkbox","index","event","label","searchValue","labelText","hoverTimeout","activeElement","arrCheckboxes","activeIndex","prevCheckbox","activeValue","nextCheckbox","checkLastTag","lastTag","lastTagInput"],"mappings":";;;IAEA,OAAO,UAAY,OAAO,WAAa,GACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAAS,aACb,CAAC,EACD,MAAMA,UAAuB,WAAY,CACrC,aAAc,CACV,QACA,KAAK,aAAa,CAAE,KAAM,MAAQ,CAAA,EAClC,MAAMC,EAAgB,SAAS,KAAK,aAAa,sBAAsB,EACjE,SAAS,KAAK,aAAa,sBAAsB,EACjD,UACAC,EAAU,SAAS,KAAK,aAAa,eAAe,EACpD,SAAS,KAAK,aAAa,eAAe,EAC1C,GAAGD,qBAEHE,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA,eAEdD;AAAA;AAAA;AAAA,MAET,KAAK,aAAa,KAAK,EAAI,YAAY,KAAK,aAAa,KAAK,MAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAiBpE,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,mBAAoB,CAChB,MAAMC,EAAc,KACdC,EAAO,KAAK,QAAQ,MAAM,EAC1BC,EAAU,KAAK,WAAW,cAAc,UAAU,EAClDC,EAASH,EAAY,WAAW,cAAc,SAAS,EACvDI,EAASJ,EAAY,WAAW,cAAc,QAAQ,EAC5D,IAAIK,EAAQ,EACZ,MAAMC,EAAaN,EAAY,WAAW,cAAc,oBAAoB,EAO5E,GANAM,EAAW,UAAYN,EAAY,aAAa,YAAY,EACxDA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAE9EA,EAAY,aAAa,aAAc,MAAM,EAEzCC,GAAQD,EAAY,aAAa,kBAAkB,EAAG,CACtD,MAAMO,EAAW,IAAI,iBAAiB,SAAUC,EAAW,CACvDA,EAAU,QAAQ,SAAUC,EAAgB,CACxC,MAAMC,EAAgBD,EAAe,OACrC,QAAQ,IAAIC,CAAa,EACrBA,EAAc,UAAU,SAAS,eAAe,EAChDR,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,CAEhE,CAAiB,CACjB,CAAa,EACGD,EAAK,UAAU,SAAS,eAAe,EACvCC,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,EAE5CK,EAAS,QAAQN,EAAM,CACnB,WAAY,GACZ,gBAAiB,CAAC,QAAS,OAAO,CAClD,CAAa,EAGL,SAASU,EAAQC,EAAY,CACrBA,EAAW,SAAW,IACtBA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,MAAM,EAClDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,OAAO,EACnDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,YAAY,IAGxDP,IACAO,EAAW,QAAQ,OAAO,EAAE,aAAa,OAAQ,SAAS,EAC1DA,EAAW,QAAQ,OAAO,EAAE,aAAa,QAAS,WAAWP,IAAQ,EACrEO,EAAW,QAAQ,OAAO,EAAE,aAAa,aAAcP,CAAK,GAG5DL,EAAY,cAAc,uBAAuB,GACjDE,EAAQ,UAAU,IAAI,QAAQ,EAC9BF,EAAY,gBAAgB,YAAY,EACxCG,EAAO,gBAAgB,aAAa,IAGpCD,EAAQ,UAAU,OAAO,QAAQ,EACjCF,EAAY,aAAa,aAAc,MAAM,EACzCA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAGtF,CAEA,MAAM,KAAKA,EAAY,iBAAiB,sCAAsC,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAC1GH,EAAQE,CAAQ,CAC5B,CAAS,EAEDV,EAAO,iBAAiB,QAAUY,GAAU,CACxC,MAAM,KAAKf,EAAY,iBAAiB,6BAA6B,CAAC,EAAE,QAAQ,CAACgB,EAAOF,IAAU,CAE9F,MAAMG,EADWD,EAAM,cAAc,OAAO,EACf,MACvBE,EAAYF,EAAM,YACpBC,EAAY,cAAc,SAASd,EAAO,MAAM,aAAa,GAC7De,EAAU,YAAW,EAAG,SAASf,EAAO,MAAM,YAAW,CAAE,EAC3Da,EAAM,gBAAgB,MAAM,EAG5BA,EAAM,aAAa,OAAQ,YAAY,CAE3D,CAAa,CACb,CAAS,EAED,IAAIG,EACJnB,EAAY,iBAAiB,QAAUe,GAAU,CAC7Cf,EAAY,UAAU,IAAI,OAAO,EACjC,aAAamB,CAAY,CACrC,CAAS,EACDhB,EAAO,iBAAiB,OAASY,GAAU,CACvC,aAAaI,CAAY,EACzBA,EAAe,WAAW,UAAY,CAClCnB,EAAY,UAAU,OAAO,OAAO,CACvC,EAAE,GAAI,CACnB,CAAS,EAEDA,EAAY,iBAAiB,SAAWe,GAAU,CAC9C,GAAIA,GAASA,EAAM,kBAAkB,aAAeA,EAAM,OAAO,QAAQ,wBAAwB,EAAG,CAChG,MAAMF,EAAWE,EAAM,OAAO,QAAQ,wBAAwB,EAC9DJ,EAAQE,CAAQ,EAChBV,EAAO,MAAK,EAE5B,CAAS,EAEDC,EAAO,iBAAiB,QAAS,SAAUW,EAAO,CAC9C,MAAM,KAAKf,EAAY,iBAAiB,8BAA8B,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAClGD,EAAS,QAAU,GACnBF,EAAQE,CAAQ,CAChC,CAAa,EACDV,EAAO,MAAK,CACxB,CAAS,EAEDH,EAAY,iBAAiB,UAAW,SAAUe,EAAO,CACrD,MAAMK,EAAgB,SAAS,cAC/B,OAAQL,EAAM,IAC1B,CACgB,IAAK,UAGD,GADAA,EAAM,eAAc,EAChBK,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CACxF,MAAMC,EAAgBrB,EAAY,iBAAiB,mDAAmD,EAChGsB,EAAc,MAAM,KAAKD,CAAa,EAAE,QAAQD,EAAc,QAAQ,OAAO,CAAC,EAC9EG,EAAe,MAAM,KAAKF,CAAa,EAAEC,EAAc,CAAC,EAC1DC,EACAA,EAAa,MAAK,EAElBpB,EAAO,MAAK,EAEpB,MACJ,IAAK,YAGD,GADAY,EAAM,eAAc,EAChBK,GAAiBpB,EACjBA,EAAY,cAAc,mDAAmD,EAAE,MAAK,UAE/EoB,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CAC7F,MAAMI,EAAcJ,EAAc,MAC5BK,EAAezB,EAAY,cAAc,0BAA0BwB,0DAAoE,EACzIC,GACAA,EAAa,MAAK,EAE1B,MACJ,IAAK,QACDV,EAAM,gBAAe,EACrBA,EAAM,eAAc,EAChBK,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,aACxEA,EAAc,SAAW,GACzBA,EAAc,QAAU,GAExBA,EAAc,QAAU,IAEhCT,EAAQS,CAAa,EACrBjB,EAAO,MAAK,EACZ,KACR,CACZ,CAAS,EACD,SAASuB,GAAe,CACpB,GAAIrB,GAAS,EACT,MAAO,GACX,IAAIsB,EAAU3B,EAAY,cAAc,qBAAqBK,KAAS,EACtE,OAAKsB,IACDA,EAAUD,EAAarB,GAAO,GAE3BsB,CACX,CACAxB,EAAO,iBAAiB,UAAW,SAAUY,EAAO,CAChD,OAAQA,EAAM,IAC1B,CACgB,IAAK,QACaf,EAAY,cAAc,gBAAgBG,EAAO,uBAAuB,IAElFA,EAAO,MAAQ,IACnBA,EAAO,MAAK,EACZ,MACJ,IAAK,YACD,GAAI,CAACA,EAAO,MAAO,CACf,MAAMwB,EAAUD,EAAkB,EAClC,GAAIC,EAAS,CACT,MAAMC,EAAeD,EAAQ,cAAc,OAAO,EAClDC,EAAa,QAAU,GACvBjB,EAAQiB,CAAY,EAExBzB,EAAO,MAAK,EAEhB,KACR,CACZ,CAAS,EAEDH,EAAY,iBAAiB,YAAce,GAAU,CACjDb,EAAQ,aAAa,iBAAkB,MAAM,CACzD,CAAS,EACDF,EAAY,iBAAiB,UAAYe,GAAU,CAC/Cb,EAAQ,gBAAgB,gBAAgB,CACpD,CAAS,CACL,CACJ"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class v extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),n=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function r(t){if(t.hasAttribute("data-type")&&t.getAttribute("data-type")=="toast"){let i=document.querySelector(".notification__holder");i||(i=document.createElement("div"),i.classList.add("notification__holder"),i.classList.add("container"),document.querySelector("body").appendChild(i)),t.closest(".notification__holder")||i.appendChild(t)}if(t.setAttribute("role","alert"),t.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(i.preventDefault(),a(t))},!1),t.hasAttribute("data-timeout")){const i=t.getAttribute("data-timeout"),o=new c(function(){a(t)},i);t.addEventListener("mouseenter",n=>{o.pause()}),t.addEventListener("mouseleave",n=>{o.resume()})}}function c(t,i){let o,n,e=i;this.pause=function(){window.clearTimeout(o),e-=new Date-n},this.resume=function(){n=new Date,window.clearTimeout(o),o=window.setTimeout(t,e)},this.resume()}const a=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class d extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,n=this.querySelectorAll("a,button");Array.from(n).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(n.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=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"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const h=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},p=(t,o,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),a.forEach(r=>{t.addEventListener(r,function(e){const d={event:r,element:o,target:e.target};Object.keys(e.detail).forEach(i=>{const c=e.detail[i];d[i]=c}),window.dataLayer.push(d)})}),!0),g=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import k from"js-cookie";const q=e=>e.replace(/ /g,"_"),x=function(e){return e=e.toLowerCase(),e=q(e),e=e.replace(/\W/g,""),e},m=(e,s,a)=>s.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,d)=>o?o[d]:a,e),S=e=>Array.isArray(e)||e!==null&&["function","object"].includes(typeof e);var L=function(e,s,a,o){function d(r){return r instanceof a?r:new a(function(n){n(r)})}return new(a||(a=Promise))(function(r,n){function v(c){try{u(o.next(c))}catch(i){n(i)}}function t(c){try{u(o.throw(c))}catch(i){n(i)}}function u(c){c.done?r(c.value):d(c.value).then(v,t)}u((o=o.apply(e,s||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",p=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const U=function(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))},B=(i,e)=>String(i).padStart(e,"0"),Q=i=>i.charAt(0).toUpperCase()+i.slice(1),k=(i,e,r)=>e.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,c)=>o?o[c]:r,i);var X=function(i,e,r,o){function c(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function d(h){try{t(o.next(h))}catch(n){a(n)}}function l(h){try{t(o.throw(h))}catch(n){a(n)}}function t(h){h.done?s(h.value):c(h.value).then(d,l)}t((o=o.apply(i,e||[])).next())})};const j=i=>{const e=Array.from(i.querySelectorAll("thead th"));Array.from(i.querySelectorAll("tbody tr")).forEach((o,c)=>{const s=Array.from(o.querySelectorAll("th, td")),a=["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"];s.forEach((d,l)=>{const t=e[l];if(typeof t<"u"){const h=document.createElement("div");h.innerHTML=t.innerHTML;const n=h.textContent||h.innerText||"";d.setAttribute("data-label",n),t.hasAttribute("data-td-class")&&d.setAttribute("class",t.getAttribute("data-td-class")),t.hasAttribute("data-format")&&(d.setAttribute("data-format",t.getAttribute("data-format")),d.innerHTML=_(t.getAttribute("data-format"),d.textContent.trim())),a.includes(d.textContent.trim().toLowerCase())&&d.setAttribute("data-content",d.textContent.trim().toLowerCase())}})})},Y=i=>{let e=0;return Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=window.getComputedStyle(document.querySelector("html")),s=r.querySelector(":scope > *:last-child > *:first-child");if(s){s.classList.add("text-nowrap");let a=s.offsetWidth/parseFloat(c.fontSize);a+=1.7,e=e>a?e:a}}),e},J=(i,e)=>{if(e.classList.contains("table--fullwidth")&&!e.hasAttribute("data-expandable")||i.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(i.querySelectorAll("thead tr")).forEach((r,o)=>{i.querySelectorAll("thead tr th.expand-button-heading").length||r.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.getAttribute("data-view")==="full"?"aria-expanded":"";r.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${c}>Expand</button></td>`)})},G=i=>{i.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){const r=e.target.closest("[data-expand-button]"),o=r.closest("tr");r.toggleAttribute("aria-expanded"),o.getAttribute("data-view")=="full"?o.setAttribute("data-view","default"):o.setAttribute("data-view","full"),r.blur()}})},R=(i,e)=>{const r=e.querySelector("input[data-search]");if(!r)return!1;const o=r.getAttribute("id"),c=r.getAttribute("data-search").split(","),s=r.parentNode,a={};c.forEach((d,l)=>{Array.from(i.querySelectorAll('td[data-label="'+d.trim()+'"]')).forEach((t,h)=>{t.querySelector(".td__content")?a[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:a[t.textContent]=t.textContent})}),r.setAttribute("list",`${o}_list`),r.setAttribute("autocomplete","off"),s.querySelector("datalist")||(s.innerHTML+=`<datalist id="${o}_list"></datalist>`),s.querySelector("datalist").innerHTML=`${Object.keys(a).map(d=>`<option value="${d}"></option>`).join("")}`},V=(i,e,r,o,c)=>{let s;const a=function(t,h=!1){if(o.hasAttribute("data-no-submit")||e.classList.contains("processing"))return!1;if(Array.from(e.querySelectorAll("iam-applied-filters")).forEach((n,p)=>{const u=new Event("tags-set");n.dispatchEvent(u)}),t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((n,p)=>{const u=n.getAttribute("data-duplicate"),b=document.getElementById(u),w=document.querySelector(`[for="${u}"] iam-card`);if(b.checked!=n.checked)if(w){const A=new Event("click");w.dispatchEvent(A)}else b.checked=n.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!h){const n=e.querySelector("[data-pagination]");n.value=1,o.setAttribute("data-page",1)}z(i,e,r,o)}else e.hasAttribute("data-submit")?e.submit():(H(i,e,o),E(i,e));if(e.hasAttribute("data-ajax-post")){const n=new FormData(e),p=new URLSearchParams(n).toString(),u=new XMLHttpRequest;u.open("GET",`${window.location.href}?ajax=true&${p}`),u.send()}};e.querySelector("iam-actionbar[data-search]")&&e.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",t=>{e.querySelector("input[data-search]")?e.querySelector("input[data-search]").value=t.detail.search:e.insertAdjacentHTML("beforeend",`<input type="hidden" name="search" data-search="${e.querySelector("iam-actionbar[data-search]").getAttribute("data-search")}" value="${t.detail.search}"/>`),clearTimeout(s),a(t)}),e.addEventListener("keyup",t=>{clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&(s=setTimeout(function(){a(t)},500))}),e.addEventListener("change",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||N(i,e,c),a(t)),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(H(i,e,o),E(i,e)):(t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&t.target.closest("form .dialog__wrapper > dialog")||t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&!t.target.closest("form dialog"))&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.hasAttribute("id")){const h=t.target.getAttribute("id");document.querySelector(`[data-duplicate="${h}"]`)&&(document.querySelector(`[data-duplicate="${h}"]`).checked=t.target.checked)}}),e.addEventListener("click",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest('dialog button:not([type="button"])')&&t.target.closest('dialog button:not([type="button"])').closest("dialog").close(),t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__close")&&(t.preventDefault(),t.stopPropagation()),t&&t.target instanceof HTMLElement&&t.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((n,p)=>{n.innerHTML=""});const h=e.elements;for(let n=0;n<h.length;n++)switch(h[n].type.toLowerCase()?h[n].type.toLowerCase():"text"){case"text":case"password":case"textarea":h[n].value="";break;case"radio":case"checkbox":if(h[n].checked){const u=h[n],b=u.getAttribute("id"),w=document.querySelector(`[for="${b}"`);if(w.querySelector("iam-card")){const A=w.querySelector("iam-card"),m=new Event("click");A.dispatchEvent(m)}u.checked=!1}break;case"select-one":case"select-multi":h[n].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||N(i,e,c),a(t)}}),e.addEventListener("submit",t=>{clearTimeout(s),e.hasAttribute("data-submit")||t.preventDefault(),a(t)}),e.addEventListener("force",t=>{a(t)}),e.addEventListener("paginate",t=>{a(t,!0)});const d=[],l=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,h)=>{const n=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${n}"]`)).forEach((p,u)=>{const b=p.closest("form");d.includes(b)||d.push(b),l.includes(n)||l.push(n)})}),d.forEach((t,h)=>{const n=function(){const p=[],u=new FormData(t);for(const[b,w]of u)document.querySelector(`[data-mimic="${b}"]`)&&!p.includes(b)?(p.push(b),document.querySelector(`[data-mimic="${b}"]`).value=w):document.querySelector(`[data-mimic="${b}"]`)&&(document.querySelector(`[data-mimic="${b}"]`).value+=","+w);for(const b of p){const w=new Event("force");e.dispatchEvent(w)}for(const b of l)if(!u.has(b)&&t.querySelector(`[name="${b}"]`)){document.querySelector(`[data-mimic="${b}"]`).value="";const w=new Event("force");e.dispatchEvent(w)}};t.addEventListener("force",p=>{n()}),t.addEventListener("change",p=>{n()})})},N=(i,e,r)=>{if(e.getAttribute("data-ajax"))return!1;const o=i.querySelector("tbody");let c=e.querySelector('input[type="radio"][data-sort]:checked');if(e.querySelector("select[data-sort]")){const n=e.querySelector("select[data-sort]");c=e.querySelector(`select[data-sort] option:nth-child(${n.selectedIndex+1})`)}const s=c.getAttribute("data-sort"),a=c.getAttribute("data-order"),d=c.getAttribute("data-format");if(!s)return o.innerHTML=r.innerHTML,j(i),!1;let l=[];["asc","desc","descending"].includes(a)||(l=a.split(","));let t=[];Array.from(o.querySelectorAll("tr")).forEach((n,p)=>{let u=n.querySelector('td[data-label="'+s+'"], th[data-label="'+s+'"]').textContent.trim();n.querySelector('[data-label="'+s+'"] .td__content')&&(u=n.querySelector('[data-label="'+s+'"] .td__content').textContent.trim()),l.length&&l.includes(u)&&(u=l.indexOf(u)),U(u)&&(u=B(u,10)),d&&d=="date"&&(u=new Date(u));const b={index:u,row:n};t.push(b)}),t.sort((n,p)=>n.index>p.index?1:-1),(a=="descending"||a=="desc")&&(t=t.reverse());let h="";t.forEach((n,p)=>{h+=n.row.outerHTML}),o.innerHTML=h},H=(i,e,r)=>{i.classList.remove("table--filtered");const o=P(e),c=[];let s=0;const a=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,d=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(i.querySelectorAll("tbody tr")).forEach((t,h)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")}),e.querySelector("input[data-search]")){const t=e.querySelector("input[data-search]");e.querySelector("input[data-search]").getAttribute("data-search").split(",").forEach((n,p)=>{c.push({column:`${n.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let l=0;Object.values(o).forEach((t,h)=>{typeof t=="object"&&Object.values(t).length?l+=Object.values(t).length:l++}),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML+=`(${l})`,t.parentNode.classList.add("hover")}),i.classList.add("table--filtered");for(const[t,h]of Object.entries(o))Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((n,p)=>{let u=!1;h.forEach((b,w)=>{const A=n.querySelector(`[data-label="${t}"]`);if(b.includes("-date-from")){const m=new Date(b.replace("-date-from","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f<m?(n.classList.add("less-than-from-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}else if(b.includes("-date-to")){const m=new Date(b.replace("-date-to","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f>m?(n.classList.add("greater-than-to-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}if(b&&b=="$today")b=_("date",new Date);else if(b&&b=="$yesterday"){const m=new Date;m.setDate(m.getDate()-1),b=_("date",m)}else if(b&&(b=="$thisWeek"||b=="$lastWeek")){const m=new Date,f=new Date(m.setDate(m.getDate()-(m.getDay()-1))),v=new Date(m.setDate(m.getDate()-m.getDay()+7)),g=new Date(A.textContent.toLowerCase());if(m.setHours(0,0,0,0),f.setHours(0,0,0,0),v.setHours(0,0,0,0),g.setHours(0,0,0,0),b=="$thisWeek")u=g>=f&&g<=v;else{const L=new Date(f.setDate(f.getDate()-7)),y=new Date(v.setDate(v.getDate()-7));L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=g>=L&&g<=y}}else if(b&&b=="$thisMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v,1),L=new Date(f,v+1,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}else if(b&&b=="$lastMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v-1,1),L=new Date(f,v,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}A&&A.textContent.toLowerCase().includes(b.replace("-"," ").toLowerCase())&&(u=!0)}),u||(n.classList.add("filtered"),n.setAttribute("data-filtered-by",t))});Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{let n=!(c.length>0&&c[0].value.length>=3);c.forEach((p,u)=>{const b=t.querySelector(`[data-label="${p.column}"]`);b&&p.value.length>=3&&b.textContent.toLowerCase().includes(p.value.toLowerCase())&&(n=!0)}),n||t.classList.add("filtered")}),Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{s++,t.classList.add("filtered--matched"),Math.ceil(s/d)==parseInt(a)&&t.classList.add("filtered--show")}),r&&(r.setAttribute("data-total",s),r.setAttribute("data-show",d),r.setAttribute("data-page",a))},E=(i,e,r)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((c,s)=>{const a=c.getAttribute("data-query");let d=0;if(a=="total")r.hasAttribute("data-total")?d=r.getAttribute("data-total"):d=(i.classList.contains("table--filtered"),i.querySelectorAll("tbody tr").length);else if(!a.includes(" == ")&&a.includes(" & ")){const l=a.split(" & ");let t="";l.forEach(h=>{t+=`:not([data-filtered-by="${h}"])`}),d=Array.from(i.querySelectorAll(`tbody tr${t}`)).length}else if(!a.includes(" == "))d=Array.from(i.querySelectorAll(`tbody tr:not([data-filtered-by="${a}"])`)).length;else if(a.includes(" && ")){const l=a.split(" && ");d=Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let h=!0;for(const[n,p]of Object.entries(l)){const u=p.split(" == ");(!t.querySelector(`td[data-label="${u[0]}"]`)||t.querySelector(`td[data-label="${u[0]}"]`).textContent!=`${u[1]}`)&&(h=!1)}return h}).length}else{const l=a.split(" == ");d=Array.from(i.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(t){return t.textContent===l[1]}).length}c.hasAttribute("data-total")?c.setAttribute("data-total",d):c.innerHTML=d})},K=function(i,e,r,o){if(o.hasAttribute("data-no-submit"))return!1;r.addEventListener("update-page",c=>{const s=e.querySelector("[data-pagination]"),a=c.detail.page;if(s.value=a,e.dispatchEvent(new Event("paginate")),o.setAttribute("data-page",a),i.hasAttribute("data-show-history")){const d=new URL(location);d.searchParams.set("page",a),history.pushState({type:"pagination",form:e.getAttribute("id"),page:a},"",d)}if(!o.hasAttribute("data-no-scroll")){const l=i.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}),r.addEventListener("update-show",c=>{const s=e.querySelector("[data-show]"),a=c.detail.show;s.value=a,o.setAttribute("data-show",a),e.dispatchEvent(new Event("submit"))})},Z=(i,e)=>{if(!i)return!1;i.addEventListener("click",r=>{tt(e)})},tt=function(i){let e=[];const r=i.getElementsByTagName("tr");for(let a=0;a<r.length;a++){const d=r[a].querySelectorAll("td,th"),l=[];for(let t=0;t<d.length;t++)l.push(`"${d[t].textContent}"`);e.push(l.join(","))}e=e.join(`
5
5
  `);const o=new Blob([e],{type:"text/csv"}),c=document.createElement("a");c.download="export.csv";const s=window.URL.createObjectURL(o);c.href=s,c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c)},O=function(i,e,r,o){if(j(i),J(i,o),E(i,e,o),o&&o.classList.contains("table--cta")){let s=function(){Array.from(i.querySelectorAll("tr")).forEach((a,d)=>{const l=a.offsetHeight;a.style.setProperty("--row-height",`${l}px`)})};const c=Y(i);o.style.setProperty("--cta-width",`${c}rem`),new ResizeObserver(s).observe(i)}},P=function(i){const e=new Object;return Array.from(i.querySelectorAll("[data-filter]")).forEach((o,c)=>{if(!(o.type=="radio"&&!o.checked)&&!(o.type=="checkbox"&&!o.checked)&&o&&o.value){const s=o.getAttribute("data-filter");let a=o.value;o.hasAttribute("data-date-from")&&(a+="-date-from"),o.hasAttribute("data-date-to")&&(a+="-date-to"),e[s]||(e[s]=[]),e[s].push(a)}}),e},z=function(i,e,r,o){return X(this,void 0,void 0,function*(){const c=new FormData(e),s=new URLSearchParams(c).toString(),a=i.querySelectorAll("thead tr th:not(.expand-button-heading)"),d=i.querySelector("tbody"),l=e.getAttribute("data-ajax");o.classList.add("table--loading");const t=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML="",p.parentNode.classList.remove("hover")});let h=0;Object.values(t).forEach((p,u)=>{typeof p=="object"&&Object.values(p).length?h+=Object.values(p).length:h++}),h&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML+=`(${h})`,p.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;const{signal:n}=controller[l];r.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(l+"?"+s,{signal:n,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=>{const u=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",b=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",w=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",A=k(p,b,15),m=k(p,w,1),f=k(p,u),v=o.hasAttribute("data-empty-msg")?o.getAttribute("data-empty-msg"):"No results found";f?(d.innerHTML="",f.forEach((g,L)=>{const y=document.createElement("tr");a.forEach((x,at)=>{let S="";const T=document.createElement("td");if(T.setAttribute("data-label",x.innerText),x.getAttribute("data-output")){var D=x.getAttribute("data-output");S=D.replace(new RegExp(/{(.*?)}/,"gm"),function(C){return k(g,C.replace("{","").replace("}",""))})}if(x.hasAttribute("data-output-array")){var D=x.getAttribute("data-output");const I=k(g,D.replace("{","").replace("}",""));S="",I.forEach((M,ot)=>{const F=x.getAttribute("data-output-array");let q="";if(x.hasAttribute("data-output-array-property")&&x.hasAttribute("data-output-array-transform")){const $=k(M,x.getAttribute("data-output-array-property")),W=JSON.parse(x.getAttribute("data-output-array-transform"))[$];q=F.replace(`{${x.getAttribute("data-output-array-property")}}`,W)}q=q.replace(new RegExp(/{(.*?)}/,"gm"),function($){return k(M,$.replace("{","").replace("}",""))}),S+=q})}x.hasAttribute("data-transform")&&(S=JSON.parse(x.getAttribute("data-transform"))[S],!S&&x.hasAttribute("data-default")&&(S=x.getAttribute("data-default"))),T.innerHTML=S,y.appendChild(T)}),d.appendChild(y)}),R(i,e),o.setAttribute("data-total",parseInt(A)),o.setAttribute("data-page",parseInt(m)),O(i,e,r,o),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((g,L)=>{const y=k(p,g.getAttribute("data-ajax-query"),"");g.hasAttribute("data-total")?g.setAttribute("data-total",y):g.innerHTML=y}),parseInt(A)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${v}</span></td></tr>`),o.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:s})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',r.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(p){console.log(p)}})},_=(i,e)=>{switch(i){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",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return e=Q(e)}};class et extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const f=(t,l,o,r)=>{const n=Math.tan(.375*Math.PI),c=window.innerWidth||document.body.clientWidth,s=Math.max(1,Math.floor(.01*c)),e=o-t,a=r-l,i=Math.abs(e/a),d=Math.abs(a/e);if(Math.abs(e)>s||Math.abs(a)>s){if(d<=n)return e<0?"left":"right";if(i<=n)return a<0?"top":"bottom"}else return"tap"},k=function(t){t.querySelectorAll(":scope > details");const l=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),!o){o=document.createElement("div"),o.classList.add("tabs__links");const n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(o),t.prepend(n)}let r=0;l.forEach((n,c)=>{let s=document.createElement("button");if(n.matches("details")){const e=n.querySelector(":scope > summary"),a=e.classList.contains("disabled");e.classList.add("visually-hidden"),n.hasAttribute("id")&&s.setAttribute("data-id",`${n.getAttribute("id")}`),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${e.innerText}`,s.classList.add("link"),s.setAttribute("data-index",r),n.setAttribute("tabindex","-1"),a&&s.classList.add("disabled"),r++}else n.matches("a")&&(s=n);s.classList.add("link"),o.appendChild(s)})},g=function(t){const l=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary");let r=t.querySelector(":scope .tabs__links"),n=t.querySelectorAll(":scope .tabs__links > button"),c=t.querySelector(":scope .tabs__next");var s;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(n=t.shadowRoot.querySelectorAll(".tabs__links > button"),r=t.shadowRoot.querySelector(".tabs__links"),c=t.shadowRoot.querySelector(":scope .tabs__next")),n.forEach(e=>{e.addEventListener("click",a=>{if(a.preventDefault(),!window.isScrolling){if(window.triggered||(window.isClicked=!0),e.classList.contains("disabled"))return!1;n.forEach(i=>{const d=i==e;i.setAttribute("aria-pressed",d)}),r.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),l.forEach((i,d)=>{const u=e.getAttribute("data-index")==d;u?i.setAttribute("open",u):i.removeAttribute("open")}),e.matches(":last-child")?c.setAttribute("disabled","disabled"):c.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})}})}),r.addEventListener("scroll",e=>{window.isScrolling||(clearTimeout(s),window.isScrolling=!0)}),r.addEventListener("scrollend",e=>{window.isScrolling=!1,clearTimeout(s),s=setTimeout(function(){if(window.isClicked)return window.isClicked=!1,!1;let a=n[0],i=Math.abs(a.getBoundingClientRect().left);n.forEach(d=>{Math.abs(d.getBoundingClientRect().left)<i&&(i=Math.abs(d.getBoundingClientRect().left),a=d)}),window.triggered=!0,a.focus(),a.click(),window.triggered=!1},200)}),o.forEach((e,a)=>{e.addEventListener("click",i=>{i.preventDefault(),n[a].click()})}),c.addEventListener("click",e=>{e.preventDefault();const i=r.querySelector('[aria-pressed="true"]').nextSibling;i&&i.click()}),t.classList.contains("tabs--guided")){let e=0,a=0,i=0,d=0;l.forEach(u=>{u.addEventListener("touchstart",p=>{p.stopPropagation(),e=p.changedTouches[0].screenX,a=p.changedTouches[0].screenY}),u.addEventListener("touchend",p=>{p.stopPropagation(),i=p.changedTouches[0].screenX,d=p.changedTouches[0].screenY;const m=f(e,a,i,d),b=r.querySelector('[aria-pressed="true"]'),_=b.nextSibling,h=b.previousSibling;switch(m){case"left":_&&_.click();break;case"right":h&&h.click();break}})})}},w=function(t){if(!t.querySelector(":scope > details"))return!1;const l=t.querySelectorAll(":scope > details"),o=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(l[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},y=function(t){k(t),g(t),w(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${l}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const u=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})},p=(i,t,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),e.forEach(r=>{i.addEventListener(r,function(o){const a={event:r,element:t,target:o.target};Object.keys(o.detail).forEach(d=>{const n=o.detail[d];a[d]=n}),window.dataLayer.push(a)})}),!0),h=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */(function(t){typeof define=="function"&&define.amd?define(t):t()})(function(){"use strict";var t=["accordion","header","table","tabs","card","filter-card","video-card","record-card","filterlist","applied-filters","pagination","notification","actionbar","nav","collapsible-side","address-lookup","fileupload","search","inline-edit","multiselect","multi-step","slider","carousel","marketing","barchart"],a="iam",i={rootMargin:"50px",threshold:.1},r=".component.min.js";t.forEach(e=>{if(document.getElementsByTagName("".concat(a,"-").concat(e)).length!==0){var s=l=>{l.forEach(o=>{o.intersectionRatio>0&&(console.log(e),import("./components/".concat(e,"/").concat(e).concat(r)).then(c=>{window.customElements.get("".concat(a,"-").concat(e))||window.customElements.define("".concat(a,"-").concat(e),c.default)}).catch(c=>{console.log(c.message)}),n.unobserve(o.target))})},n=new IntersectionObserver(s,i);n.observe(document.getElementsByTagName("".concat(a,"-").concat(e))[0])}})});
5
5
  //# sourceMappingURL=components.bundle.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */(function(h){typeof define=="function"&&define.amd?define(h):h()})(function(){"use strict";var h=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),T=r=>{var e=function(t){var o=document.querySelector('label[for="'.concat(t.replace("#",""),'"]')),c=document.querySelector(t+" summary"),s=document.querySelector("dialog".concat(t)),n=document.querySelector("detail".concat(t));o instanceof HTMLElement?o.click():c instanceof HTMLElement?c.click():s instanceof HTMLElement?s.showModal():n instanceof HTMLElement&&n.addAttribute("open")};return location.hash&&e(location.hash),window.addEventListener("hashchange",function(){e(location.hash)},!1),addEventListener("popstate",a=>{if(a&&a.state&&a.state.type&&a.state.type=="pagination"){var t=document.querySelector("#".concat(a.state.form)),o=document.querySelector("#".concat(a.state.form," [data-pagination]"));o?o.value=a.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(a.state.page,'" />'),t.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",a=>{if(a&&a.target instanceof HTMLElement&&a.target.matches("form")){var t=a.target;Array.from(t.querySelectorAll("[data-password-type]")).forEach((o,c)=>{o.setAttribute("type","password")}),(t.querySelector(":invalid")||t.querySelector('.pwd-checker[data-strength="1"]')||t.querySelector('.pwd-checker[data-strength="2"]'))&&(t.classList.add("was-validated"),a.preventDefault()),t.querySelector("iam-multiselect[data-is-required][data-error]")&&(t.classList.add("was-validated"),a.preventDefault())}}),document.addEventListener("keydown",a=>{a.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(a.preventDefault(),a.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach((a,t)=>{var o=a.closest("label");o.setAttribute("data-percent",a.getAttribute("value"))}),null},C=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((e,a)=>{var t=e.closest(".dialog__wrapper");t||(e.removeAttribute("open"),e.showModal(),e.focus(),v(e))}),r.addEventListener("click",e=>{if(e.target.tagName=="IAM-ACTIONBAR")return!1;if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-modal]")){var a=e.target.closest("[data-modal]"),t=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),o=document.querySelector("dialog#".concat(t));if(v(o),o.showModal(),o.focus(),!o.querySelector("iam-multi-step")){var c=o.offsetWidth;o.setAttribute("style","max-width: ".concat(c,"px;"))}Array.from(o.querySelectorAll("[data-duplicate]")).forEach((u,p)=>{var W=u.getAttribute("data-duplicate"),M=document.getElementById(W);if(u.checked!=M.checked){u.checked=M.checked;var J=new Event("change");u.dispatchEvent(J)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:t})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){var s=e.target.closest("dialog[open]");e.preventDefault(),s.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,p)=>{u.classList.remove("active")});var n=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:s.id}});e.target.dispatchEvent(n),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest('button[formmethod="dialog"]')){var i=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,p)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){var l=e.target.closest("dialog[open]"),y=window.getComputedStyle(l);if(y.display==="contents"&&(l=l.parentNode.closest("dialog[open]")),!l.classList.contains("dialog--transactional")&&!l.classList.contains("dialog--acknowledgement")){var g=l.getBoundingClientRect();(e.clientX<g.left||e.clientX>g.right||e.clientY<g.top||e.clientY>g.bottom)&&(e.target.closest("dialog *")||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();var f=e.target.closest(".dialog__wrapper > button"),V=f.parentNode,E="openPopover",d=V.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=d&&f.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,p)=>{u.removeAttribute("aria-expanded")}),d.hasAttribute("open"))d.close(),E="closePopover",d.removeAttribute("style"),f.removeAttribute("aria-expanded");else{d.show(),f.setAttribute("aria-expanded",!0);var L=f.getBoundingClientRect(),q=L.top,x=L.left;if(f.closest("iam-table")){var k=f.closest("iam-table").parentNode.getBoundingClientRect();q-=k.top,x-=k.left}d.classList.contains("dialog--fix")&&d.setAttribute("style","position:fixed;top: ".concat(q,"px; left: ").concat(x,"px; margin: 3rem 0 0 0;"))}var w=d.getBoundingClientRect(),O=w.bottom-window.scrollY,Y=window.innerHeight-window.scrollY;if(O>Y){var R=d.hasAttribute("style")?d.getAttribute("style")+" ":"";d.setAttribute("style",R+"transform: translate(0, calc(-100% - 4rem))"),w=d.getBoundingClientRect();var F=w.top-window.scrollY;F<100&&d.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:E,id:f.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((u,p)=>{u.removeAttribute("aria-expanded")}))}),null),v=r=>{if(!r.querySelector(":scope .mh-lg")&&!r.querySelector("iam-multi-step")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var e=r.querySelector(".mh-lg"),a=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var t=a.previousSibling;e.before(a),t&&a.before(t)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};function H(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var e=r.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var a=r.target.closest("summary"),t=r.target.closest("a"),o=r.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),t&&window.dataLayer.push({event:"linkClicked",linkText:t.hasAttribute("title")?t.getAttribute("title")||"":t.textContent||"",class:t.hasAttribute("class")&&t.getAttribute("class")||"",href:t.getAttribute("href")||""}),o&&window.dataLayer.push({event:"buttonClicked",buttonText:o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||""})}})}function D(r){var e=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",e).then(function(a){for(var t=[],o=new DataView(a),c=0;c<o.byteLength;c+=4){var s=o.getUint32(c),n=s.toString(16),i="00000000",l=(i+n).slice(-i.length);t.push(l)}return t.join("")})}var _=(r,e)=>{D(r).then(function(a){var t=new XMLHttpRequest;t.addEventListener("load",function(){var o=this.responseText.split(`
5
5
  `),c=a.slice(5).toUpperCase(),s=!1;for(var n in o)if(o[n].substring(0,35)==c){s=!0;break}var i=new CustomEvent("hibpCheck",{detail:s});e.dispatchEvent(i)}),t.open("GET","https://api.pwnedpasswords.com/range/"+a.substr(0,5)),t.send()})},B=r=>{function e(){if(Array.from(document.querySelectorAll("input[maxlength],textarea[maxlength]")).forEach((t,o)=>{t.parentElement,I(t)}),Array.from(document.querySelectorAll("label input")).forEach((t,o)=>{!t.closest("label").querySelector(".optional-text")&&!t.hasAttribute("required")&&(t.parentNode.tagName.toLowerCase()=="span"?t.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):t.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))}),document.querySelector('input[type="date"]')){let t=function(o){var c=o.getFullYear(),s=String(o.getMonth()+1).padStart(2,"0"),n=String(o.getDate()).padStart(2,"0");return"".concat(c,"-").concat(s,"-").concat(n)};var a=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((o,c)=>{var s=a;if(o.hasAttribute("data-start")&&(s.setDate(s.getDate()+parseInt(o.getAttribute("data-start"))),o.setAttribute("min",t(s))),o.hasAttribute("data-period")){var n=parseInt(o.getAttribute("data-period")),i=new Date;i.setDate(s.getDate()+n),o.setAttribute("max",t(i))}if(o.hasAttribute("data-allowed-days")){var l=JSON.parse("[".concat(o.getAttribute("data-allowed-days"),"]"));o.addEventListener("input",function(y){var g=new Date(this.value).getUTCDay();l.includes(g)?o.setCustomValidity(""):o.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&e(),document.onreadystatechange=()=>{document.readyState==="complete"&&e()},r.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){var t=a.target.closest("input,textarea,select");t.parentElement,t.hasAttribute("type")&&t.getAttribute("type")=="color"&&(t.nextElementSibling.value=t.value),t.hasAttribute("maxlength")&&t.nextElementSibling&&t.nextElementSibling.setAttribute("data-count",t.value.length),t.hasAttribute("data-strength-checker")&&b(t)}}),r.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){var t=a.target.closest("select");if(t.hasAttribute("data-change-type")&&t.hasAttribute("data-input")){var o=document.getElementById(t.getAttribute("data-input")),c=t.value;S(o,c)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){var s=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(s.querySelectorAll('[type="radio"][autofocus]')).forEach((n,i)=>{n.removeAttribute("autofocus")}),Array.from(s.querySelectorAll('[type="radio"]:checked')).forEach((n,i)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-type][data-input]:not(select)")){var t=a.target.closest("[data-change-type]"),o=document.getElementById(t.getAttribute("data-input")),c=t.getAttribute("data-change-type");if(t.setAttribute("data-change-type",o.getAttribute("type")),S(o,c),t.hasAttribute("data-alt-class")){var s=t.getAttribute("data-alt-class");t.setAttribute("data-alt-class",t.getAttribute("class")),t.setAttribute("class",s)}}})},I=r=>{var e=r.parentElement,a=r.getAttribute("maxlength");e.style.setProperty("--maxlength",a);var t=r.nextElementSibling;(!t||t&&t.classList.contains("invalid-feedback"))&&(t=document.createElement("span"),e.insertBefore(t,r.nextSibling)),t.setAttribute("data-count",r.value.length)},S=(r,e)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",e)},b=function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",t=document.getElementById(e.getAttribute("data-strength-checker")),o=e.value,c=e.hasAttribute("minlength")?e.getAttribute("minlength"):12,s=1,n=["Very weak","Weak","Average","Strong","Very strong"],i="";if(o.match(/(?=.*[0-9])/)&&(s+=1),o.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(s+=1),o.match(/(?=.*[a-z])/)&&(s+=1),o.match(/(?=.*[A-Z])/)&&(s+=1),o.length<c&&(s=1,i="(must be at least ".concat(c," characters.)")),s>=3&&a=="no"){let l=function(y,g){y.detail?b(g,"danger"):b(g,"success"),g.removeEventListener("hibpCheck",l)};_(o,e),e.addEventListener("hibpCheck",function(y){l(y,e)})}else s>=3&&a=="danger"&&(s=3,i="(this password is very common)");t&&(s<=3?t.classList.add("invalid-feedback"):t.classList.remove("invalid-feedback"),t.setAttribute("data-strength",s),t.innerHTML="Password strength: ".concat(n[s-1]," ").concat(i))},N=()=>{document.addEventListener("change",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-change-events]")&&A(r.target,r.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-change-events]")&&A(r.target,r.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-click-events]")&&A(r.target,r.target.closest("[data-click-events]").getAttribute("data-click-events"))})},A=(r,e)=>{if(e||(e=r.parentNode.getAttribute("data-change-events")),!e)return!1;Array.from(JSON.parse(e)).forEach((a,t)=>{P(r,a)})},P=(r,e)=>{if("matches"in e)return e.matches=="any"||r.value==e.matches?m(r,e,"if"):m(r,e,"else"),!1;if("in-list"in e){var a=document.querySelector("".concat(e["in-list"],' option[value="').concat(r.value,'"]'));return document.querySelector("".concat(e["in-list"],' option[value="').concat(r.value,'"]'))?m(a,e,"if"):m(a,e,"else"),!1}else"event"in e&&m(r,e,"event")},m=(r,e,a)=>{if(!(a in e))return!1;switch(e[a]){case"hide":if(document.querySelector(e.target)){var t=document.querySelector(e.target);t.classList.add("js-hide"),Array.from(t.querySelectorAll("[data-required]")).forEach((n,i)=>{n.removeAttribute("required")})}break;case"show":if(document.querySelector(e.target)){var o=document.querySelector(e.target);o.classList.remove("js-hide"),Array.from(o.querySelectorAll("[data-required]")).forEach((n,i)=>{n.closest(".js-hide")||n.setAttribute("required","true")})}break;case"populate-form":j(r,e);break;case"dispatchEvent":var c=new Event(e.value);document.querySelector("".concat(e.target)).dispatchEvent(c);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(n,i){n.setAttribute(e.attribute,e.value)});break;case"focus":document.querySelector("".concat(e.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(n,i){n.removeAttribute(e.attribute)});break;case"updateValue":document.querySelector("".concat(e.target)).value=e.value?e.value:"";var s=new Event("change");document.querySelector("".concat(e.target)).dispatchEvent(s);break;case"submitForm":document.querySelector("".concat(e.target)).submit();break;case"openLink":document.querySelector("".concat(e.target)).value&&(window.location.href=document.querySelector("".concat(e.target)).value);break}},j=function(e,a){var t=JSON.parse(e.getAttribute("data-values")),o=document.querySelector(a.target);if(!t)return!1;Object.keys(t).forEach((c,s)=>{document.getElementById(c)&&document.getElementById(c).tagName=="SPAN"&&(document.getElementById(c).innerHTML=t[c]),o.querySelector('select[name="'.concat(c,'"] [value="').concat(t[c],'"]'))?(o.querySelector('select[name="'.concat(c,'"]')).value=t[c],e.hasAttribute("data-lock-fields")&&(o.querySelector('select[name="'.concat(c,'"]')).disabled=!0)):o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]'))?(Array.from(o.querySelectorAll('input[name="'.concat(c,'"][type="radio"]'))).forEach(function(n,i){n.disabled=!0}),o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]')).checked=!0,o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]')).disabled=!1):o.querySelector('input[name="'.concat(c,'"]'))&&(o.querySelector('input[name="'.concat(c,'"]')).value=t[c],e.hasAttribute("data-lock-fields")&&o.querySelector('input[name="'.concat(c,'"]')).setAttribute("readonly","true"))})};document.addEventListener("DOMContentLoaded",function(){H(),N(),h(document.body),T(),C(document.body),B(document.body)})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */
5
5
  !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e=e=>{if(!e.querySelector(":scope .mh-lg")&&!e.querySelector("iam-multi-step")){e.innerHTML='<div class="mh-lg">'.concat(e.innerHTML,"</div>");var t=e.querySelector(".mh-lg"),a=e.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var r=a.previousSibling;t.before(a),r&&a.before(r)}}e.querySelector(":scope > button:first-child")||e.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},t=(e,t)=>{(function(e){var t=new TextEncoder("utf-8").encode(e);return crypto.subtle.digest("SHA-1",t).then((function(e){for(var t=[],a=new DataView(e),r=0;r<a.byteLength;r+=4){var n=("00000000"+a.getUint32(r).toString(16)).slice(-8);t.push(n)}return t.join("")}))})(e).then((function(e){var a=new XMLHttpRequest;a.addEventListener("load",(function(){var a=this.responseText.split("\n"),r=e.slice(5).toUpperCase(),n=!1;for(var o in a)if(a[o].substring(0,35)==r){n=!0;break}var c=new CustomEvent("hibpCheck",{detail:n});t.dispatchEvent(c)})),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()}))},a=e=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength],textarea[maxlength]")).forEach(((e,t)=>{e.parentElement,r(e)})),Array.from(document.querySelectorAll("label input")).forEach(((e,t)=>{!e.closest("label").querySelector(".optional-text")&&!e.hasAttribute("required")&&("span"==e.parentNode.tagName.toLowerCase()?e.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):e.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))})),document.querySelector('input[type="date"]')){let t=function(e){var t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach(((a,r)=>{var n=e;if(a.hasAttribute("data-start")&&(n.setDate(n.getDate()+parseInt(a.getAttribute("data-start"))),a.setAttribute("min",t(n))),a.hasAttribute("data-period")){var o=parseInt(a.getAttribute("data-period")),c=new Date;c.setDate(n.getDate()+o),a.setAttribute("max",t(c))}if(a.hasAttribute("data-allowed-days")){var i=JSON.parse("[".concat(a.getAttribute("data-allowed-days"),"]"));a.addEventListener("input",(function(e){var t=new Date(this.value).getUTCDay();i.includes(t)?a.setCustomValidity(""):a.setCustomValidity("That day of the week is not allowed")}))}}))}}"complete"===document.readyState&&t(),document.onreadystatechange=()=>{"complete"===document.readyState&&t()},e.addEventListener("input",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){var t=e.target.closest("input,textarea,select");t.parentElement,t.hasAttribute("type")&&"color"==t.getAttribute("type")&&(t.nextElementSibling.value=t.value),t.hasAttribute("maxlength")&&t.nextElementSibling&&t.nextElementSibling.setAttribute("data-count",t.value.length),t.hasAttribute("data-strength-checker")&&o(t)}})),e.addEventListener("change",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){var t=e.target.closest("select");if(t.hasAttribute("data-change-type")&&t.hasAttribute("data-input")){var a=document.getElementById(t.getAttribute("data-input")),r=t.value;n(a,r)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){var o=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach(((e,t)=>{e.removeAttribute("autofocus")})),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach(((e,t)=>{e.setAttribute("autofocus",!0)}))}})),e.addEventListener("click",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){var t=e.target.closest("[data-change-type]"),a=document.getElementById(t.getAttribute("data-input")),r=t.getAttribute("data-change-type");if(t.setAttribute("data-change-type",a.getAttribute("type")),n(a,r),t.hasAttribute("data-alt-class")){var o=t.getAttribute("data-alt-class");t.setAttribute("data-alt-class",t.getAttribute("class")),t.setAttribute("class",o)}}}))},r=e=>{var t=e.parentElement,a=e.getAttribute("maxlength");t.style.setProperty("--maxlength",a);var r=e.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),t.insertBefore(r,e.nextSibling)),r.setAttribute("data-count",e.value.length)},n=(e,t)=>{e.hasAttribute("type")&&"password"==e.getAttribute("type")&&e.setAttribute("data-password-type",!0),e.setAttribute("type",t)},o=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"no",r=document.getElementById(e.getAttribute("data-strength-checker")),n=e.value,c=e.hasAttribute("minlength")?e.getAttribute("minlength"):12,i=1,l="";if(n.match(/(?=.*[0-9])/)&&(i+=1),n.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(i+=1),n.match(/(?=.*[a-z])/)&&(i+=1),n.match(/(?=.*[A-Z])/)&&(i+=1),n.length<c&&(i=1,l="(must be at least ".concat(c," characters.)")),i>=3&&"no"==a){let a=function(e,t){e.detail?o(t,"danger"):o(t,"success"),t.removeEventListener("hibpCheck",a)};t(n,e),e.addEventListener("hibpCheck",(function(t){a(t,e)}))}else i>=3&&"danger"==a&&(i=3,l="(this password is very common)");r&&(i<=3?r.classList.add("invalid-feedback"):r.classList.remove("invalid-feedback"),r.setAttribute("data-strength",i),r.innerHTML="Password strength: ".concat(["Very weak","Weak","Average","Strong","Very strong"][i-1]," ").concat(l))},c=(e,t)=>{if(t||(t=e.parentNode.getAttribute("data-change-events")),!t)return!1;Array.from(JSON.parse(t)).forEach(((t,a)=>{i(e,t)}))},i=(e,t)=>{if("matches"in t)return"any"==t.matches||e.value==t.matches?l(e,t,"if"):l(e,t,"else"),!1;if("in-list"in t){var a=document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'));return document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'))?l(a,t,"if"):l(a,t,"else"),!1}"event"in t&&l(e,t,"event")},l=(e,t,a)=>{if(!(a in t))return!1;switch(t[a]){case"hide":if(document.querySelector(t.target)){var r=document.querySelector(t.target);r.classList.add("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(((e,t)=>{e.removeAttribute("required")}))}break;case"show":if(document.querySelector(t.target)){var n=document.querySelector(t.target);n.classList.remove("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(((e,t)=>{e.closest(".js-hide")||e.setAttribute("required","true")}))}break;case"populate-form":s(e,t);break;case"dispatchEvent":var o=new Event(t.value);document.querySelector("".concat(t.target)).dispatchEvent(o);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach((function(e,a){e.setAttribute(t.attribute,t.value)}));break;case"focus":document.querySelector("".concat(t.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach((function(e,a){e.removeAttribute(t.attribute)}));break;case"updateValue":document.querySelector("".concat(t.target)).value=t.value?t.value:"";var c=new Event("change");document.querySelector("".concat(t.target)).dispatchEvent(c);break;case"submitForm":document.querySelector("".concat(t.target)).submit();break;case"openLink":document.querySelector("".concat(t.target)).value&&(window.location.href=document.querySelector("".concat(t.target)).value)}},s=function(e,t){var a=JSON.parse(e.getAttribute("data-values")),r=document.querySelector(t.target);if(!a)return!1;Object.keys(a).forEach(((t,n)=>{document.getElementById(t)&&"SPAN"==document.getElementById(t).tagName&&(document.getElementById(t).innerHTML=a[t]),r.querySelector('select[name="'.concat(t,'"] [value="').concat(a[t],'"]'))?(r.querySelector('select[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&(r.querySelector('select[name="'.concat(t,'"]')).disabled=!0)):r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]'))?(Array.from(r.querySelectorAll('input[name="'.concat(t,'"][type="radio"]'))).forEach((function(e,t){e.disabled=!0})),r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).checked=!0,r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).disabled=!1):r.querySelector('input[name="'.concat(t,'"]'))&&(r.querySelector('input[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&r.querySelector('input[name="'.concat(t,'"]')).setAttribute("readonly","true"))}))};document.addEventListener("DOMContentLoaded",(function(){var t,r;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",(e=>{var t=e.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=e.target.closest("summary"),r=e.target.closest("a"),n=e.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),r&&window.dataLayer.push({event:"linkClicked",linkText:r.hasAttribute("title")?r.getAttribute("title")||"":r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||"",href:r.getAttribute("href")||""}),n&&window.dataLayer.push({event:"buttonClicked",buttonText:n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||""})}})),document.addEventListener("change",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-events]")&&c(e.target,e.target.closest("[data-change-events]").getAttribute("data-change-events"))})),document.addEventListener("keyup",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-events]")&&c(e.target,e.target.closest("[data-change-events]").getAttribute("data-change-events"))})),document.addEventListener("click",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-click-events]")&&c(e.target,e.target.closest("[data-click-events]").getAttribute("data-click-events"))})),(r=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),t=function(e){var t=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),a=document.querySelector(e+" summary"),r=document.querySelector("dialog".concat(e)),n=document.querySelector("detail".concat(e));t instanceof HTMLElement?t.click():a instanceof HTMLElement?a.click():r instanceof HTMLElement?r.showModal():n instanceof HTMLElement&&n.addAttribute("open")},location.hash&&t(location.hash),window.addEventListener("hashchange",(function(){t(location.hash)}),!1),addEventListener("popstate",(e=>{if(e&&e.state&&e.state.type&&"pagination"==e.state.type){var t=document.querySelector("#".concat(e.state.form)),a=document.querySelector("#".concat(e.state.form," [data-pagination]"));a?a.value=e.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),t.dispatchEvent(new Event("submit"))}})),document.addEventListener("submit",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var t=e.target;Array.from(t.querySelectorAll("[data-password-type]")).forEach(((e,t)=>{e.setAttribute("type","password")})),(t.querySelector(":invalid")||t.querySelector('.pwd-checker[data-strength="1"]')||t.querySelector('.pwd-checker[data-strength="2"]'))&&(t.classList.add("was-validated"),e.preventDefault()),t.querySelector("iam-multiselect[data-is-required][data-error]")&&(t.classList.add("was-validated"),e.preventDefault())}})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())})),Array.from(document.querySelectorAll("label progress")).forEach(((e,t)=>{e.closest("label").setAttribute("data-percent",e.getAttribute("value"))})),(t=>{Array.from(t.querySelectorAll("dialog[open]")).forEach(((t,a)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),e(t))})),t.addEventListener("click",(t=>{if("IAM-ACTIONBAR"==t.target.tagName)return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var a=t.target.closest("[data-modal]"),r=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),n=document.querySelector("dialog#".concat(r));if(e(n),n.showModal(),n.focus(),!n.querySelector("iam-multi-step")){var o=n.offsetWidth;n.setAttribute("style","max-width: ".concat(o,"px;"))}Array.from(n.querySelectorAll("[data-duplicate]")).forEach(((e,t)=>{var a=e.getAttribute("data-duplicate"),r=document.getElementById(a);if(e.checked!=r.checked){e.checked=r.checked;var n=new Event("change");e.dispatchEvent(n)}})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var c=t.target.closest("dialog[open]");t.preventDefault(),c.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((e,t)=>{e.classList.remove("active")}));var i=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:c.id}});t.target.dispatchEvent(i),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var l=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((e,t)=>{e.classList.remove("active")})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var s=t.target.closest("dialog[open]");if("contents"===window.getComputedStyle(s).display&&(s=s.parentNode.closest("dialog[open]")),!s.classList.contains("dialog--transactional")&&!s.classList.contains("dialog--acknowledgement")){var d=s.getBoundingClientRect();(t.clientX<d.left||t.clientX>d.right||t.clientY<d.top||t.clientY>d.bottom)&&(t.target.closest("dialog *")||s.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var u=t.target.closest(".dialog__wrapper > button"),g="openPopover",p=u.parentNode.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=p&&u.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((e,t)=>{e.removeAttribute("aria-expanded")})),p.hasAttribute("open"))p.close(),g="closePopover",p.removeAttribute("style"),u.removeAttribute("aria-expanded");else{p.show(),u.setAttribute("aria-expanded",!0);var m=u.getBoundingClientRect(),y=m.top,v=m.left;if(u.closest("iam-table")){var f=u.closest("iam-table").parentNode.getBoundingClientRect();y-=f.top,v-=f.left}p.classList.contains("dialog--fix")&&p.setAttribute("style","position:fixed;top: ".concat(y,"px; left: ").concat(v,"px; margin: 3rem 0 0 0;"))}var h=p.getBoundingClientRect();if(h.bottom-window.scrollY>window.innerHeight-window.scrollY){var b=p.hasAttribute("style")?p.getAttribute("style")+" ":"";p.setAttribute("style",b+"transform: translate(0, calc(-100% - 4rem))"),(h=p.getBoundingClientRect()).top-window.scrollY<100&&p.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:g,id:u.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.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(((e,t)=>{e.removeAttribute("aria-expanded")})))}))})(document.body),a(document.body)}))}));
@@ -27,7 +27,7 @@ class iamMultiselect extends HTMLElement {
27
27
  ${loadCSS}
28
28
  ${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
29
29
  </style>
30
- <label for="search"> <slot name="feedback"></slot></label>
30
+ <label for="search" class="mb-0"><span class="inner-label label"></span> <slot name="feedback"></slot>
31
31
  <div class="outer">
32
32
  <div class="wrapper">
33
33
 
@@ -40,6 +40,7 @@ class iamMultiselect extends HTMLElement {
40
40
  <button id="clear"><span class="visually-hidden">Clear</span></button>
41
41
  </div>
42
42
  </div>
43
+ </label>
43
44
  `;
44
45
  this.shadowRoot.appendChild(template.content.cloneNode(true));
45
46
  }
@@ -51,9 +52,9 @@ class iamMultiselect extends HTMLElement {
51
52
  const search = multiselect.shadowRoot.querySelector('#search');
52
53
  const button = multiselect.shadowRoot.querySelector('#clear');
53
54
  let order = 0;
54
- const label = multiselect.shadowRoot.querySelector('label');
55
+ const innerLabel = multiselect.shadowRoot.querySelector('label .inner-label');
55
56
 
56
- label.innerHTML = multiselect.getAttribute('data-label');
57
+ innerLabel.innerHTML = multiselect.getAttribute('data-label');
57
58
 
58
59
  if (multiselect.hasAttribute('placeholder')) {
59
60
  search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));
@@ -67,7 +67,7 @@ const qs = /* @__PURE__ */ m(U, [["render", G]]), Q = (t) => t.charAt(0).toUpper
67
67
  },
68
68
  created() {
69
69
  this.$nextTick(function() {
70
- import("./table.component.min-9636d751.mjs").then((t) => {
70
+ import("./table.component.min-7189fb5a.mjs").then((t) => {
71
71
  window.customElements.get("iam-table") || window.customElements.define("iam-table", t.default);
72
72
  }).catch((t) => {
73
73
  console.log(t.message);
@@ -455,7 +455,7 @@ const N = /* @__PURE__ */ m(ne, [["render", xe]]), Se = {
455
455
  },
456
456
  created() {
457
457
  this.$nextTick(function() {
458
- import("./fileupload.component.min-c49f1632.mjs").then((t) => {
458
+ import("./fileupload.component.min-916115f7.mjs").then((t) => {
459
459
  window.customElements.get("iam-fileupload") || window.customElements.define("iam-fileupload", t.default);
460
460
  }).catch((t) => {
461
461
  console.log(t.message);
@@ -485,7 +485,7 @@ const qe = {
485
485
  props: {},
486
486
  mounted() {
487
487
  this.$nextTick(function() {
488
- import("./accordion.component.min-f3b3ca78.mjs").then((t) => {
488
+ import("./accordion.component.min-c9c63553.mjs").then((t) => {
489
489
  window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", t.default);
490
490
  }).catch((t) => {
491
491
  console.log(t.message);
@@ -594,7 +594,7 @@ const Ms = /* @__PURE__ */ m(Ne, [["render", Fe]]), ze = {
594
594
  name: "Card",
595
595
  created() {
596
596
  this.$nextTick(function() {
597
- import("./card.component.min-8f9ddf79.mjs").then((t) => {
597
+ import("./card.component.min-96f150ac.mjs").then((t) => {
598
598
  window.customElements.get("iam-card") || window.customElements.define("iam-card", t.default);
599
599
  }).catch((t) => {
600
600
  console.log(t.message);
@@ -611,7 +611,7 @@ const Cs = /* @__PURE__ */ m(ze, [["render", Be]]), Oe = {
611
611
  name: "Header",
612
612
  mounted() {
613
613
  this.$nextTick(function() {
614
- import("./carousel.component.min-e7835d0a.mjs").then((t) => {
614
+ import("./carousel.component.min-9cf1f9a9.mjs").then((t) => {
615
615
  window.customElements.get("iam-carousel") || window.customElements.define("iam-carousel", t.default);
616
616
  }).catch((t) => {
617
617
  console.log(t.message);
@@ -638,7 +638,7 @@ const Ns = /* @__PURE__ */ m(Oe, [["render", Ue]]), We = {
638
638
  },
639
639
  mounted() {
640
640
  this.$nextTick(function() {
641
- import("./header.component.min-a09cf4f0.mjs").then((t) => {
641
+ import("./header.component.min-42926eb3.mjs").then((t) => {
642
642
  window.customElements.get("iam-header") || window.customElements.define("iam-header", t.default);
643
643
  }).catch((t) => {
644
644
  console.log(t.message);
@@ -1043,7 +1043,7 @@ const Is = /* @__PURE__ */ m(ht, [["render", At]]), Lt = {
1043
1043
  name: "Nav",
1044
1044
  mounted() {
1045
1045
  this.$nextTick(function() {
1046
- import("./nav.component.min-e9eadc01.mjs").then((t) => {
1046
+ import("./nav.component.min-1a444aac.mjs").then((t) => {
1047
1047
  window.customElements.get("iam-nav") || window.customElements.define("iam-nav", t.default);
1048
1048
  }).catch((t) => {
1049
1049
  console.log(t.message);
@@ -1163,7 +1163,7 @@ const Wt = {
1163
1163
  name: "Tabs",
1164
1164
  created() {
1165
1165
  this.$nextTick(function() {
1166
- import("./tabs.component.min-23690b2c.mjs").then((t) => {
1166
+ import("./tabs.component.min-12b4b5db.mjs").then((t) => {
1167
1167
  window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", t.default);
1168
1168
  }).catch((t) => {
1169
1169
  console.log(t.message);
@@ -1310,7 +1310,7 @@ function os(t, s, e, i, r, a) {
1310
1310
  }
1311
1311
  const Ws = /* @__PURE__ */ m(ns, [["render", os]]);
1312
1312
  /*!
1313
- * iamKey v7.1.0--beta2
1313
+ * iamKey v7.1.0--beta3
1314
1314
  * Copyright 2022-2025 iamproperty
1315
1315
  */
1316
1316
  function ls(t, s) {
@@ -1479,7 +1479,7 @@ const Gs = /* @__PURE__ */ m(fs, [["render", bs]]), ys = {
1479
1479
  props: {},
1480
1480
  mounted() {
1481
1481
  this.$nextTick(function() {
1482
- import("./actionbar.component.min-69d13be6.mjs").then((t) => {
1482
+ import("./actionbar.component.min-b6c1f1e2.mjs").then((t) => {
1483
1483
  window.customElements.get("iam-actionbar") || window.customElements.define("iam-actionbar", t.default);
1484
1484
  }).catch((t) => {
1485
1485
  console.log(t.message);
@@ -1494,7 +1494,7 @@ function gs(t, s, e, i, r, a) {
1494
1494
  }
1495
1495
  const Qs = /* @__PURE__ */ m(ys, [["render", gs]]);
1496
1496
  /*!
1497
- * iamKey v7.1.0--beta2
1497
+ * iamKey v7.1.0--beta3
1498
1498
  * Copyright 2022-2025 iamproperty
1499
1499
  */
1500
1500
  class R extends HTMLElement {
@@ -1,5 +1,5 @@
1
1
  (function(k,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(k=typeof globalThis<"u"?globalThis:k||self,o(k.iamkey={},k.Vue))})(this,function(k,o){"use strict";const S=(a,e)=>{const t=a.__vccOpts||a;for(const[r,i]of e)t[r]=i;return t},ot={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}}},rt=["xlink:href"],nt=["innerHTML"];function it(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(s.className)},[(o.openBlock(),o.createElementBlock("svg",null,[o.createElementVNode("title",null,"iam "+o.toDisplayString(t.id),1),o.createElementVNode("use",{"xlink:href":t.path+s.src},null,8,rt)])),t.desc?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:t.desc},null,8,nt)):o.createCommentVNode("",!0)],2)}const st=S(ot,[["render",it]]),lt=a=>a.charAt(0).toUpperCase()+a.slice(1),ct=a=>a.replace(/_/g," "),dt=a=>a.replace(/ /g,"_"),mt=function(a){return a=a.toLowerCase(),a=dt(a),a=a.replace(/\W/g,""),a},ut={name:"Table",props:{items:{type:Array,required:!1},fields:{type:Array,required:!1}},computed:{cellHeading(){return a=>`${lt(ct(a))}`}},created(){this.$nextTick(function(){Promise.resolve().then(()=>ko).then(a=>{window.customElements.get("iam-table")||window.customElements.define("iam-table",a.default)}).catch(a=>{console.log(a.message)}),Promise.resolve().then(()=>Qa).then(a=>{window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",a.default)}).catch(a=>{console.log(a.message)})})},updated(){}},ht={key:0},pt={key:0},bt=["data-row-id"],gt=["innerHTML"];function ft(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-table",null,[o.renderSlot(a.$slots,"before"),t.fields?(o.openBlock(),o.createElementBlock("table",ht,[o.createElementVNode("thead",null,[o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.fields,n=>(o.openBlock(),o.createElementBlock("th",{key:n.key},o.toDisplayString(s.cellHeading(n.key)),1))),128))])]),t.items?(o.openBlock(),o.createElementBlock("tbody",pt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(n,c)=>(o.openBlock(),o.createElementBlock("tr",{key:c,"data-row-id":n.rowid},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.fromEntries(Object.entries(n).filter(([d])=>d!=="rowid")),(d,l)=>(o.openBlock(),o.createElementBlock("td",{key:l,innerHTML:d},null,8,gt))),128))],8,bt))),128))])):o.createCommentVNode("",!0)])):o.renderSlot(a.$slots,"default",{key:1})])}const B=S(ut,[["render",ft]]),vt={name:"Input",props:{value:{type:String,required:!1},id:{type:String,required:!0},name:{type:String,required:!1},list:{type:String,required:!1},label:{type:String,required:!1},labelclass:{type:String,required:!1},inputclass:{type:String,required:!1},type:{type:String,required:!1,default:"text"},size:{type:String,required:!1},errormsg:{type:String,required:!1},options:{type:Array,required:!1},prefix:{type:String,required:!1},prefixClass:{type:String,required:!1},suffix:{type:String,required:!1},pattern:{type:String,required:!1},suffixClass:{type:String,required:!1},title:{type:String,required:!1},hint:{type:String,required:!1},multiple:{type:String,required:!1}},computed:{displayLabel(){return()=>this.$attrs.multiple?this.label+'<span class="small d-block text-body font-body fw-normal">Hold down the Ctrl (windows) or Command (Mac) button to select multiple options.</span>':this.hint?this.label+`<span class="small d-block text-body font-body fw-normal">${this.hint}</span>`:this.label},wrapperClass(){return()=>{switch(this.type){case"radio":case"checkbox":return"form-check";case"radio-btn":case"checkbox-btn":return!1;default:return"form-control__wrapper"}}},needPattern(){return()=>{if(this.pattern)return this.pattern;switch(this.type){case"datetime-local":return"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}"}return"(.*?)"}},needsLabel(){return()=>{switch(this.type){case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},isInput(){return()=>{switch(this.type){case"textarea":case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":case"range":case"color":return!1;default:return!0}}},allowDatalist(){return()=>{switch(this.type){case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},hasOptions(){return()=>{if(this.list)return this.list;if(this.options)return this.id+"-list"}},inputVal:{get(){return this.value==null&&this.options!=null&&this.type=="select"?this.$attrs.multiple?[]:this.options[0].value:this.value},set(a){this.$emit("input",a)}}},mounted(){this.$nextTick(function(){let a=this.$refs.wrapper;if(a.parentNode&&a.parentNode.classList.contains("form-check")||a.classList.length==0){const e=document.createDocumentFragment();Array.from(a.childNodes).forEach(t=>e.appendChild(t)),a.parentNode.insertBefore(e,a),a.parentNode.removeChild(a)}})},methods:{inputKeyup(a){this.$emit("keyupEvent",a)},clickEvent(){this.$emit("bus")}}},yt=["for","innerHTML","title"],wt=["innerHTML"],_t=["innerHTML"],kt=["type","name","id","pattern","list"],xt=["type","name","id","pattern"],At={key:5,class:"input-group"},Lt=["type","name","id","pattern","list"],St={class:"input-group-text border-0 col-2 col-sm-1 px-0"},Et={key:6,class:"input-group"},qt=["type","name","id","pattern","list"],$t={class:"input-group-text flex-fill"},Tt=["type","name","id","pattern"],Ct=["value"],Mt=["type","name","id"],zt=["for","innerHTML"],Ht=["type","name","id"],Bt=["for","innerHTML"],Rt=["innerHTML"],Nt=["id"],jt=["value"];function Vt(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(s.wrapperClass()),ref:"wrapper"},[s.needsLabel()?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(`form-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:s.displayLabel(),title:t.title},null,10,yt)):o.createCommentVNode("",!0),t.prefix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(`prefix ${this.prefixClass} ${t.size?`prefix-${t.size}`:""}`),innerHTML:t.prefix,role:"presentation"},null,10,wt)):o.createCommentVNode("",!0),t.suffix?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(`suffix ${this.suffixClass} ${t.size?`suffix-${t.size}`:""}`),innerHTML:t.suffix,role:"presentation"},null,10,_t)):o.createCommentVNode("",!0),s.isInput()?o.withDirectives((o.openBlock(),o.createElementBlock("input",o.mergeProps({key:3,"onUpdate:modelValue":e[0]||(e[0]=n=>s.inputVal=n),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:s.needPattern(),list:s.hasOptions()},a.$attrs,{onKeyup:e[1]||(e[1]=(...n)=>s.inputKeyup&&s.inputKeyup(...n))}),null,16,kt)),[[o.vModelDynamic,s.inputVal]]):o.createCommentVNode("",!0),t.type=="textarea"?o.withDirectives((o.openBlock(),o.createElementBlock("textarea",o.mergeProps({key:4,"onUpdate:modelValue":e[2]||(e[2]=n=>s.inputVal=n),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:s.needPattern()},a.$attrs),null,16,xt)),[[o.vModelText,s.inputVal]]):o.createCommentVNode("",!0),t.type=="range"?(o.openBlock(),o.createElementBlock("div",At,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[3]||(e[3]=n=>s.inputVal=n),class:`form-range${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:s.needPattern(),list:s.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,Lt),[[o.vModelDynamic,s.inputVal]]),o.createElementVNode("output",St,o.toDisplayString(t.value),1)])):o.createCommentVNode("",!0),t.type=="color"?(o.openBlock(),o.createElementBlock("div",Et,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[4]||(e[4]=n=>s.inputVal=n),class:`form-control form-control-color${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:s.needPattern(),list:s.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,qt),[[o.vModelDynamic,s.inputVal]]),o.createElementVNode("output",$t,o.toDisplayString(t.value?a.vale:"#000000"),1)])):o.createCommentVNode("",!0),t.type=="select"?o.withDirectives((o.openBlock(),o.createElementBlock("select",o.mergeProps({key:7,"onUpdate:modelValue":e[5]||(e[5]=n=>s.inputVal=n),class:`form-select${t.size?` form-select-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.id,id:t.id,pattern:s.needPattern()},a.$attrs),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(n,c)=>(o.openBlock(),o.createElementBlock("option",{key:c,value:n.value},o.toDisplayString(n.display?n.display:n.value),9,Ct))),128))],16,Tt)),[[o.vModelSelect,s.inputVal]]):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:8,class:"form-check-input",type:t.type,name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Mt)):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("label",{key:9,class:o.normalizeClass(`form-label form-check-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label},null,10,zt)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:10,class:`btn-check${t.inputclass?` ${t.inputclass}`:""}`,type:t.type.replace("-btn",""),autocomplete:"off",name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Ht)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("label",{key:11,class:o.normalizeClass(`btn${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label,onClick:e[6]||(e[6]=(...n)=>s.clickEvent&&s.clickEvent(...n))},null,10,Bt)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default"),t.errormsg?(o.openBlock(),o.createElementBlock("span",{key:12,class:"invalid-feedback mb-0",innerHTML:t.errormsg},null,8,Rt)):o.createCommentVNode("",!0),s.allowDatalist()?(o.openBlock(),o.createElementBlock("datalist",{key:13,id:t.id+"-list"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(n,c)=>(o.openBlock(),o.createElementBlock("option",{key:c,value:n.value},o.toDisplayString(n.value),9,jt))),128))],8,Nt)):o.createCommentVNode("",!0)],2)}const R=S(vt,[["render",Vt]]),Dt=Object.assign({name:"FileUpload",props:{maxfilesize:{type:Number,required:!1},maxfiles:{type:Number,required:!1}},created(){this.$nextTick(function(){Promise.resolve().then(()=>Ao).then(a=>{window.customElements.get("iam-fileupload")||window.customElements.define("iam-fileupload",a.default)}).catch(a=>{console.log(a.message)})})}},{emits:["elementChange","empty"],setup(a,{emit:e}){const t=e,r=o.ref(null);return o.onMounted(()=>{r.value.addEventListener("elementChange",function(i){t("elementChange",i)}),r.value.addEventListener("empty",function(i){t("empty",i)})}),(i,s)=>(o.openBlock(),o.createElementBlock("iam-fileupload",{ref_key:"$component",ref:r},[o.renderSlot(i.$slots,"default")],512))}}),ur="",Pt={name:"Accordion",props:{},mounted(){this.$nextTick(function(){Promise.resolve().then(()=>So).then(a=>{window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",a.default)}).catch(a=>{console.log(a.message)})})}},Ft={ref:"wrapper"};function Ot(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-accordion",Ft,[o.renderSlot(a.$slots,"default")],512)}const It=S(Pt,[["render",Ot]]),Ut={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=>`${mt(a)}`}},data(){return{show:!this.lazy}}},Wt=["id"];function Gt(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("details",{id:s.createID(t.title)},[o.createElementVNode("summary",null,[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)]),o.renderSlot(a.$slots,"default")],8,Wt)}const Xt=S(Ut,[["render",Gt]]),Yt={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1},background:{type:String,default:"light",required:!1}}},Kt={class:"container"},Jt={class:"row"},Qt={class:"col-sm-6"},Zt={class:"pt-5 pb-3 px-4"},te={class:"col-sm-6 col-md-5 ms-auto"},ee=["src"];function ae(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",Kt,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background+" mb-4")},[o.createElementVNode("div",Jt,[o.createElementVNode("div",Qt,[o.createElementVNode("div",Zt,[o.createElementVNode("h2",null,o.toDisplayString(t.title),1),o.renderSlot(a.$slots,"default")])]),o.createElementVNode("div",te,[t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:"",class:"h-100 w-100 object-cover"},null,8,ee)):o.createCommentVNode("",!0)])])],2)])}const oe=S(Yt,[["render",ae]]),re={name:"Card",created(){this.$nextTick(function(){Promise.resolve().then(()=>zo).then(a=>{window.customElements.get("iam-card")||window.customElements.define("iam-card",a.default)}).catch(a=>{console.log(a.message)})})}};function ne(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-card",null,[o.renderSlot(a.$slots,"default")])}const ie=S(re,[["render",ne]]),se={name:"Header",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>Do).then(a=>{window.customElements.get("iam-carousel")||window.customElements.define("iam-carousel",a.default)}).catch(a=>{console.log(a.message)})})}};function le(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-carousel",null,[o.renderSlot(a.$slots,"default")])}const ce=S(se,[["render",le]]),de={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1}},mounted(){this.$nextTick(function(){Promise.resolve().then(()=>Fo).then(a=>{window.customElements.get("iam-header")||window.customElements.define("iam-header",a.default)}).catch(a=>{console.log(a.message)})})}},me=["image"],ue=["innerHTML"];function he(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-header",{image:t.image},[o.renderSlot(a.$slots,"breadcrumb"),t.title?(o.openBlock(),o.createElementBlock("h1",{key:0,innerHTML:t.title},null,8,ue)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")],8,me)}const pe=S(de,[["render",he]]);function be(a){let e;const t=a.querySelector(".testimonial__images"),r=t.querySelectorAll("img").length;if(r==1)return!1;a.classList.add("testimonial--multi");const i=function(s){const n=a.querySelector(".btn-next"),c=a.querySelector(".btn-prev");n.setAttribute("data-go",s+1),c.setAttribute("data-go",s-1),n.removeAttribute("disabled"),c.removeAttribute("disabled"),s==1?c.setAttribute("disabled",!0):s==r&&n.setAttribute("disabled",!0)};t.addEventListener("scroll",function(){clearTimeout(e),e=setTimeout(function(){const s=t.scrollWidth,n=t.scrollHeight,c=t.scrollLeft,d=t.scrollTop;let l=Math.round(c/s*r)+1;c==0&&d!=0&&(l=Math.round(d/n*r)+1),a.setAttribute("data-show",l),i(l)},300)},!1),a.addEventListener("click",function(s){for(let n=s.target;n&&n!=this;n=n.parentNode)if(n.matches("[data-go]")){const c=parseInt(n.getAttribute("data-go"));let d=0,l=0;const u=t.scrollWidth,m=t.scrollHeight;u>m?l=Math.floor(u*((c-1)/r)):d=Math.floor(m*((c-1)/r)),t.scroll({top:d,left:l,behavior:"smooth"});break}},!1)}const hr="",ge={name:"Testimonial",props:{items:{type:Array,required:!0},background:{type:String,default:"light",required:!1}},mounted(){be(this.$refs.wrapper)}},fe={class:"container testimonial mb-5","data-show":"1",ref:"wrapper"},ve={class:"row"},ye={class:"col-md-5 position-relative"},we={class:"testimonial__images"},_e=["src"],ke={class:"col-md-7"},xe={class:"testimonial__content"},Ae=["innerHTML"],Le=["innerHTML"],Se={class:"testimonial__after"};function Ee(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",fe,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background)},[o.createElementVNode("div",ve,[o.createElementVNode("div",ye,[o.createElementVNode("div",we,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(n,c)=>(o.openBlock(),o.createElementBlock("img",{key:c,src:n.image?n.image:"data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"",class:o.normalizeClass("h-100 w-100 object-cover"+(n.image?"":" opacity-0"))},null,10,_e))),128))]),e[0]||(e[0]=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))]),o.createElementVNode("div",ke,[e[1]||(e[1]=o.createElementVNode("h2",null,"What our customers think…",-1)),o.createElementVNode("div",xe,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(n,c)=>(o.openBlock(),o.createElementBlock("blockquote",{key:c,class:o.normalizeClass(n.class)},[o.createElementVNode("div",{innerHTML:n.quote},null,8,Ae),o.createElementVNode("cite",{innerHTML:n.cite},null,8,Le)],2))),128))]),o.createElementVNode("div",Se,[o.renderSlot(a.$slots,"default")])])]),e[2]||(e[2]=o.createElementVNode("span",{class:"circle circle--dots d-none d-md-block"},null,-1))],2)],512)}const qe=S(ge,[["render",Ee]]),pr="",$e={name:"Timeline",props:{image:{type:String,required:!1}}},Te={class:"timeline"},Ce={class:"timeline__content"},Me=["src"];function ze(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",Te,[o.createElementVNode("div",Ce,[o.renderSlot(a.$slots,"default")]),t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:""},null,8,Me)):o.createCommentVNode("",!0)])}const He=S($e,[["render",ze]]),br="",Be={components:{Input:R},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"}]}}},Re={class:"container",ref:"wrapper"},Ne={class:"property-searchbar"},je=["action","method"],Ve={class:"col-12 col-md-3"},De={class:"col-12 col-md"},Pe={class:"row","data-input-range":""},Fe={class:"col-12 col-md"},Oe={class:"row","data-input-range":""},Ie={class:"col-12 col-md-2"};function Ue(a,e,t,r,i,s){const n=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",Re,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",Ne,[o.createElementVNode("form",{class:"row",action:t.formaction,method:t.formmethod},[o.createElementVNode("fieldset",Ve,[o.createVNode(n,{inputClass:"input--locations",modelValue:s.locationSet,"onUpdate:modelValue":e[0]||(e[0]=c=>s.locationSet=c),label:"Location",id:"location",options:s.locationsList(),required:"",placeholder:"i.e. Newcastle or NE1",onKeyupEvent:e[1]||(e[1]=c=>s.locationKeyup(...arguments)),ref:"search"},null,8,["modelValue","options"]),o.createVNode(n,{class:"select--miles",label:"Miles",id:"miles",type:"select",options:t.distances},null,8,["options"])]),o.createElementVNode("fieldset",De,[e[2]||(e[2]=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Price range",-1)),o.createElementVNode("div",Pe,[o.createVNode(n,{class:"col-6",label:"Minimum price",id:"price-min","data-min":"true",type:"select",options:t.pricemin},null,8,["options"]),o.createVNode(n,{class:"col-6",label:"Maximum price",id:"price-max","data-max":"true",type:"select",options:t.pricemax},null,8,["options"])])]),o.createElementVNode("fieldset",Fe,[e[3]||(e[3]=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Number of beds",-1)),o.createElementVNode("div",Oe,[o.createVNode(n,{class:"col-6",label:"Minimum beds",id:"beds-min","data-min":"true",type:"select",options:t.bedsmin},null,8,["options"]),o.createVNode(n,{class:"col-6",label:"Maximum beds",id:"beds-max","data-max":"true",type:"select",options:t.bedsmax},null,8,["options"])])]),o.createElementVNode("fieldset",Ie,[o.createVNode(n,{label:"Property type",id:"property-type",type:"select",options:t.propertytypes},null,8,["options"])]),e[4]||(e[4]=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))],8,je)]),o.renderSlot(a.$slots,"after")],512)}const We=S(Be,[["render",Ue]]),Ge={components:{},name:"Nav",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>Oo).then(a=>{window.customElements.get("iam-nav")||window.customElements.define("iam-nav",a.default)}).catch(a=>{console.log(a.message)})})},methods:{}},Xe={ref:"wrapper"};function Ye(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-nav",Xe,[o.renderSlot(a.$slots,"default")],512)}const Ke=S(Ge,[["render",Ye]]),gr="",Je={name:"Stepper",props:{label:{type:String,required:!1},endlabel:{type:String,required:!1,default:"Complete"}}},Qe={class:"container"},Ze=["aria-label"],ta={key:0,class:"h6 stepper__start"},ea={class:"list-unstyled"},aa={class:"h6 stepper__end"};function oa(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",Qe,[o.createElementVNode("nav",{class:"stepper","aria-label":t.label?t.label:"Progress"},[t.label?(o.openBlock(),o.createElementBlock("span",ta,o.toDisplayString(t.label),1)):o.createCommentVNode("",!0),o.createElementVNode("ol",ea,[o.renderSlot(a.$slots,"default")]),o.createElementVNode("span",aa,o.toDisplayString(t.endlabel),1)],8,Ze)])}const ra=S(Je,[["render",oa]]),fr="",na={name:"Snapshot",props:{items:{type:Array,required:!0}}},ia={class:"container snapshot",ref:"wrapper"},sa={class:"row"},la=["href"],ca={class:"lead snapshot__title"},da={class:"stat"};function ma(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("div",ia,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",sa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(n,c)=>(o.openBlock(),o.createElementBlock("div",{class:"col",key:c},[n.link?(o.openBlock(),o.createElementBlock("a",{key:0,href:n.link},"View "+o.toDisplayString(n.title),9,la)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(`snapshot__item ${n.bg?"bg-"+n.bg:""}`)},[o.createElementVNode("span",ca,o.toDisplayString(n.title),1),o.createElementVNode("span",da,o.toDisplayString(n.number),1)],2)]))),128))])],512)}const ua=S(na,[["render",ma]]),ha={name:"Stepper",props:{url:{type:String,required:!1},status:{type:String,required:!1},current:{type:String,required:!1}}},pa=["href","aria-current"],ba={key:0,class:"visually-hidden"};function ga(a,e,t,r,i,s){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"?"step":!1},[o.createElementVNode("span",null,[o.renderSlot(a.$slots,"default")]),t.status?(o.openBlock(),o.createElementBlock("em",ba," - status: "+o.toDisplayString(t.status),1)):o.createCommentVNode("",!0)],10,pa)])}const fa=S(ha,[["render",ga]]),vr="",va={name:"Tabs",created(){this.$nextTick(function(){Promise.resolve().then(()=>Ko).then(a=>{window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",a.default)}).catch(a=>{console.log(a.message)})})}},ya={ref:"wrapper"};function wa(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-tabs",ya,[o.renderSlot(a.$slots,"default")],512)}const _a=S(va,[["render",wa]]),ka={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}}},xa={class:"tab"},Aa=["innerHTML"];function La(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("details",xa,[o.createElementVNode("summary",{innerHTML:t.title,class:o.normalizeClass({disabled:i.isDisabled})},null,10,Aa),o.renderSlot(a.$slots,"default")])}const Sa=S(ka,[["render",La]]);let I=B.props;I.fields.required=!1;const Ea={components:{Table:B,Input:R},data(){return{itemsData:[...this.items]}},methods:{submitForm:function(a){console.log(this);const e=new FormData(a.target);let t=new Date;const r=t.getFullYear();let i=t.getMonth()+1,s=t.getDate();s<10&&(s="0"+s),i<10&&(i="0"+i),t=s+"/"+i+"/"+r,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},...I,title:{type:String,required:!1},method:{type:String,required:!1,default:"post"},action:{type:String,required:!1}}},qa={class:"container note-feed mb-2"},$a=["innerHTML"],Ta=["action","method"],Ca=["value"];function Ma(a,e,t,r,i,s){const n=o.resolveComponent("Table"),c=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",qa,[t.title?(o.openBlock(),o.createElementBlock("span",{key:0,class:"h3",innerHTML:t.title},null,8,$a)):o.createCommentVNode("",!0),o.createVNode(n,o.mergeProps({fields:[{key:"date_added"},{key:"user"},{key:"note"}],items:i.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=>s.submitForm(...arguments),["prevent"]))},[o.createElementVNode("input",{type:"hidden",value:t.user,name:"user"},null,8,Ca),o.createVNode(c,{id:"addNote",type:"textarea",label:"Add note",required:"",class:"mw-100"}),e[1]||(e[1]=o.createElementVNode("button",{class:"btn btn-tertiary"},"Submit note",-1))],40,Ta)])}const za=S(Ea,[["render",Ma]]),Ha={name:"Applied Filter",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>Zo).then(a=>{window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",a.default)}).catch(a=>{console.log(a.message)})})}};function Ba(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-applied-filters",null,[o.renderSlot(a.$slots,"default")])}const Ra=S(Ha,[["render",Ba]]);/*!
2
- * iamKey v7.1.0--beta2
2
+ * iamKey v7.1.0--beta3
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function Na(a,e){ja(a,e)}function ja(a,e){let t;e.addEventListener("keyup",r=>{clearTimeout(t),t=setTimeout(function(){U(a,e.value)},500)}),e.addEventListener("change",r=>{clearTimeout(t),U(a,e.value)})}const U=function(a,e){Array.from(a.querySelectorAll(":scope > li")).forEach((t,r)=>{const i=t.textContent.toLowerCase();t.classList.add("d-none"),i.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 Va 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`,r=document.createElement("template");r.innerHTML=`
5
5
  <style>
@@ -41,7 +41,7 @@
41
41
  ${this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button part="dismiss-btn">Dismiss</button></div>':""}
42
42
  </div>
43
43
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",`<style id="notificationHolder">${i}</style>`)}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 r=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>'}Oa(r),e&&e.addEventListener("click",function(i){N(r)},!1)}}const Wa={name:"Notification",props:{},created(){this.$nextTick(function(){window.customElements.get("iam-notification")||window.customElements.define("iam-notification",Ua)})}};function Ga(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-notification",null,[o.renderSlot(a.$slots,"default")])}const Xa=S(Wa,[["render",Ga]]),Ya={name:"Actionbar",props:{},mounted(){this.$nextTick(function(){Promise.resolve().then(()=>ar).then(a=>{window.customElements.get("iam-actionbar")||window.customElements.define("iam-actionbar",a.default)}).catch(a=>{console.log(a.message)})})}};function Ka(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-actionbar",null,[o.renderSlot(a.$slots,"default")])}const Ja=S(Ya,[["render",Ka]]);/*!
44
- * iamKey v7.1.0--beta2
44
+ * iamKey v7.1.0--beta3
45
45
  * Copyright 2022-2025 iamproperty
46
46
  */let W=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`,r=document.createElement("template");r.innerHTML=`
47
47
  <style>
@@ -106,7 +106,7 @@
106
106
 
107
107
  </div>
108
108
  `,this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){const e=this.shadowRoot.querySelector(".side-menu"),t=this.shadowRoot.querySelector(".side-menu-content"),r=this.shadowRoot.querySelector(".main-content"),i=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>`),r.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")),this.hasAttribute("open")&&window.innerWidth>992&&(e.classList.add("open"),i.setAttribute("aria-expanded",!0)),i.addEventListener("click",s=>{e.classList.contains("open")?(e.classList.remove("open"),i.removeAttribute("aria-expanded"),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"),i.setAttribute("aria-expanded",!0)},100))}),e.addEventListener("mouseenter",s=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"),e.classList.add("hover"))}),e.addEventListener("mousemove",s=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"))}),e.addEventListener("mouseleave",s=>{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",no);const io={name:"CollapsibleSideMenu",props:{},mounted(){}};function so(a,e,t,r,i,s){return o.openBlock(),o.createElementBlock("iam-collapsible-side",null,[o.renderSlot(a.$slots,"default")])}const lo=S(io,[["render",so]]);/*!
109
- * iamKey v7.1.0--beta2
109
+ * iamKey v7.1.0--beta3
110
110
  * Copyright 2022-2025 iamproperty
111
111
  */const co=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},mo=(a,e)=>String(a).padStart(e,"0"),uo=a=>a.charAt(0).toUpperCase()+a.slice(1),T=(a,e,t)=>e.split(/[\.\[\]\'\"]/).filter(r=>r).reduce((r,i)=>r?r[i]:t,a);var ho=function(a,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function c(u){try{l(r.next(u))}catch(m){n(m)}}function d(u){try{l(r.throw(u))}catch(m){n(m)}}function l(u){u.done?s(u.value):i(u.value).then(c,d)}l((r=r.apply(a,e||[])).next())})};const G=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((t,r)=>{const i=Array.from(t.querySelectorAll("th, td")),s=["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"];i.forEach((n,c)=>{const d=e[c];if(typeof d<"u"){const l=document.createElement("div");l.innerHTML=d.innerHTML;const u=l.textContent||l.innerText||"";n.setAttribute("data-label",u),d.hasAttribute("data-td-class")&&n.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(n.setAttribute("data-format",d.getAttribute("data-format")),n.innerHTML=V(d.getAttribute("data-format"),n.textContent.trim())),s.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},po=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((t,r)=>{const i=window.getComputedStyle(document.querySelector("html")),s=t.querySelector(":scope > *:last-child > *:first-child");if(s){s.classList.add("text-nowrap");let n=s.offsetWidth/parseFloat(i.fontSize);n+=1.7,e=e>n?e:n}}),e},bo=(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,r)=>{a.querySelectorAll("thead tr th.expand-button-heading").length||t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((t,r)=>{const i=t.getAttribute("data-view")==="full"?"aria-expanded":"";t.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${i}>Expand</button></td>`)})},go=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){const t=e.target.closest("[data-expand-button]"),r=t.closest("tr");t.toggleAttribute("aria-expanded"),r.getAttribute("data-view")=="full"?r.setAttribute("data-view","default"):r.setAttribute("data-view","full"),t.blur()}})},X=(a,e)=>{const t=e.querySelector("input[data-search]");if(!t)return!1;const r=t.getAttribute("id"),i=t.getAttribute("data-search").split(","),s=t.parentNode,n={};i.forEach((c,d)=>{Array.from(a.querySelectorAll('td[data-label="'+c.trim()+'"]')).forEach((l,u)=>{l.querySelector(".td__content")?n[l.querySelector(".td__content").textContent]=l.querySelector(".td__content").textContent:n[l.textContent]=l.textContent})}),t.setAttribute("list",`${r}_list`),t.setAttribute("autocomplete","off"),s.querySelector("datalist")||(s.innerHTML+=`<datalist id="${r}_list"></datalist>`),s.querySelector("datalist").innerHTML=`${Object.keys(n).map(c=>`<option value="${c}"></option>`).join("")}`},fo=(a,e,t,r,i)=>{let s;const n=function(l,u=!1){if(r.hasAttribute("data-no-submit")||e.classList.contains("processing"))return!1;if(Array.from(e.querySelectorAll("iam-applied-filters")).forEach((m,h)=>{const b=new Event("tags-set");m.dispatchEvent(b)}),l.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((m,h)=>{const b=m.getAttribute("data-duplicate"),p=document.getElementById(b),f=document.querySelector(`[for="${b}"] iam-card`);if(p.checked!=m.checked)if(f){const g=new Event("click");f.dispatchEvent(g)}else p.checked=m.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!u){const m=e.querySelector("[data-pagination]");m.value=1,r.setAttribute("data-page",1)}Q(a,e,t,r)}else e.hasAttribute("data-submit")?e.submit():(j(a,e,r),M(a,e));if(e.hasAttribute("data-ajax-post")){const m=new FormData(e),h=new URLSearchParams(m).toString(),b=new XMLHttpRequest;b.open("GET",`${window.location.href}?ajax=true&${h}`),b.send()}};e.querySelector("iam-actionbar[data-search]")&&e.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",l=>{e.querySelector("input[data-search]")?e.querySelector("input[data-search]").value=l.detail.search:e.insertAdjacentHTML("beforeend",`<input type="hidden" name="search" data-search="${e.querySelector("iam-actionbar[data-search]").getAttribute("data-search")}" value="${l.detail.search}"/>`),clearTimeout(s),n(l)}),e.addEventListener("keyup",l=>{clearTimeout(s),l&&l.target instanceof HTMLElement&&l.target.closest("input[data-search]")&&(s=setTimeout(function(){n(l)},500))}),e.addEventListener("change",l=>{if(clearTimeout(s),l&&l.target instanceof HTMLElement&&l.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||Y(a,e,i),n(l)),l&&l.target instanceof HTMLElement&&l.target.closest("input[data-search]")&&n(l),l&&l.target instanceof HTMLElement&&l.target.closest("[data-filter][data-no-ajax]")?(j(a,e,r),M(a,e)):(l&&l.target instanceof HTMLElement&&l.target.closest("[data-filter]")&&l.target.closest("form .dialog__wrapper > dialog")||l&&l.target instanceof HTMLElement&&l.target.closest("[data-filter]")&&!l.target.closest("form dialog"))&&n(l),l&&l.target instanceof HTMLElement&&l.target.closest("[data-show]")&&n(l),l&&l.target instanceof HTMLElement&&l.target.closest("[data-mimic]")&&n(l),l&&l.target instanceof HTMLElement&&l.target.hasAttribute("id")){const u=l.target.getAttribute("id");document.querySelector(`[data-duplicate="${u}"]`)&&(document.querySelector(`[data-duplicate="${u}"]`).checked=l.target.checked)}}),e.addEventListener("click",l=>{if(clearTimeout(s),l&&l.target instanceof HTMLElement&&l.target.closest('dialog button:not([type="button"])')&&l.target.closest('dialog button:not([type="button"])').closest("dialog").close(),l&&l.target instanceof HTMLElement&&l.target.closest(".dialog__close")&&(l.preventDefault(),l.stopPropagation()),l&&l.target instanceof HTMLElement&&l.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((m,h)=>{m.innerHTML=""});const 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){const h=u[m],b=h.getAttribute("id"),p=document.querySelector(`[for="${b}"`);if(p.querySelector("iam-card")){const f=p.querySelector("iam-card"),g=new Event("click");f.dispatchEvent(g)}h.checked=!1}break;case"select-one":case"select-multi":u[m].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||Y(a,e,i),n(l)}}),e.addEventListener("submit",l=>{clearTimeout(s),e.hasAttribute("data-submit")||l.preventDefault(),n(l)}),e.addEventListener("force",l=>{n(l)}),e.addEventListener("paginate",l=>{n(l,!0)});const c=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((l,u)=>{const m=l.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${m}"]`)).forEach((h,b)=>{const p=h.closest("form");c.includes(p)||c.push(p),d.includes(m)||d.push(m)})}),c.forEach((l,u)=>{const m=function(){const h=[],b=new FormData(l);for(const[p,f]of b)document.querySelector(`[data-mimic="${p}"]`)&&!h.includes(p)?(h.push(p),document.querySelector(`[data-mimic="${p}"]`).value=f):document.querySelector(`[data-mimic="${p}"]`)&&(document.querySelector(`[data-mimic="${p}"]`).value+=","+f);for(const p of h){const f=new Event("force");e.dispatchEvent(f)}for(const p of d)if(!b.has(p)&&l.querySelector(`[name="${p}"]`)){document.querySelector(`[data-mimic="${p}"]`).value="";const f=new Event("force");e.dispatchEvent(f)}};l.addEventListener("force",h=>{m()}),l.addEventListener("change",h=>{m()})})},Y=(a,e,t)=>{if(e.getAttribute("data-ajax"))return!1;const r=a.querySelector("tbody");let i=e.querySelector('input[type="radio"][data-sort]:checked');if(e.querySelector("select[data-sort]")){const m=e.querySelector("select[data-sort]");i=e.querySelector(`select[data-sort] option:nth-child(${m.selectedIndex+1})`)}const s=i.getAttribute("data-sort"),n=i.getAttribute("data-order"),c=i.getAttribute("data-format");if(!s)return r.innerHTML=t.innerHTML,G(a),!1;let d=[];["asc","desc","descending"].includes(n)||(d=n.split(","));let l=[];Array.from(r.querySelectorAll("tr")).forEach((m,h)=>{let b=m.querySelector('td[data-label="'+s+'"], th[data-label="'+s+'"]').textContent.trim();m.querySelector('[data-label="'+s+'"] .td__content')&&(b=m.querySelector('[data-label="'+s+'"] .td__content').textContent.trim()),d.length&&d.includes(b)&&(b=d.indexOf(b)),co(b)&&(b=mo(b,10)),c&&c=="date"&&(b=new Date(b));const p={index:b,row:m};l.push(p)}),l.sort((m,h)=>m.index>h.index?1:-1),(n=="descending"||n=="desc")&&(l=l.reverse());let u="";l.forEach((m,h)=>{u+=m.row.outerHTML}),r.innerHTML=u},j=(a,e,t)=>{a.classList.remove("table--filtered");const r=J(e),i=[];let s=0;const n=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,c=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((l,u)=>{l.classList.remove("filtered"),l.classList.remove("filtered--matched"),l.classList.remove("filtered--show"),l.removeAttribute("data-filtered-by")}),e.querySelector("input[data-search]")){const l=e.querySelector("input[data-search]");e.querySelector("input[data-search]").getAttribute("data-search").split(",").forEach((u,m)=>{i.push({column:`${u.trim()}`,value:`${l.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((l,u)=>{l.innerHTML="",l.parentNode.classList.remove("hover")});let d=0;Object.values(r).forEach((l,u)=>{typeof l=="object"&&Object.values(l).length?d+=Object.values(l).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((l,u)=>{l.innerHTML+=`(${d})`,l.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[l,u]of Object.entries(r))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((m,h)=>{let b=!1;u.forEach((p,f)=>{const g=m.querySelector(`[data-label="${l}"]`);if(p.includes("-date-from")){const v=new Date(p.replace("-date-from","")),y=new Date(g.textContent.toLowerCase());v.setHours(0,0,0,0),y.setHours(0,0,0,0),y<v?(m.classList.add("less-than-from-date"),b=!1):!m.classList.contains("less-than-from-date")&&!m.classList.contains("greater-than-to-date")&&(b=!0)}else if(p.includes("-date-to")){const v=new Date(p.replace("-date-to","")),y=new Date(g.textContent.toLowerCase());v.setHours(0,0,0,0),y.setHours(0,0,0,0),y>v?(m.classList.add("greater-than-to-date"),b=!1):!m.classList.contains("less-than-from-date")&&!m.classList.contains("greater-than-to-date")&&(b=!0)}if(p&&p=="$today")p=V("date",new Date);else if(p&&p=="$yesterday"){const v=new Date;v.setDate(v.getDate()-1),p=V("date",v)}else if(p&&(p=="$thisWeek"||p=="$lastWeek")){const v=new Date,y=new Date(v.setDate(v.getDate()-(v.getDay()-1))),_=new Date(v.setDate(v.getDate()-v.getDay()+7)),A=new Date(g.textContent.toLowerCase());if(v.setHours(0,0,0,0),y.setHours(0,0,0,0),_.setHours(0,0,0,0),A.setHours(0,0,0,0),p=="$thisWeek")b=A>=y&&A<=_;else{const q=new Date(y.setDate(y.getDate()-7)),L=new Date(_.setDate(_.getDate()-7));q.setHours(0,0,0,0),L.setHours(0,0,0,0),b=A>=q&&A<=L}}else if(p&&p=="$thisMonth"){const v=new Date,y=v.getFullYear(),_=v.getMonth(),A=new Date(y,_,1),q=new Date(y,_+1,0),L=new Date(g.textContent.toLowerCase());A.setHours(0,0,0,0),q.setHours(0,0,0,0),L.setHours(0,0,0,0),b=L>=A&&L<=q}else if(p&&p=="$lastMonth"){const v=new Date,y=v.getFullYear(),_=v.getMonth(),A=new Date(y,_-1,1),q=new Date(y,_,0),L=new Date(g.textContent.toLowerCase());A.setHours(0,0,0,0),q.setHours(0,0,0,0),L.setHours(0,0,0,0),b=L>=A&&L<=q}g&&g.textContent.toLowerCase().includes(p.replace("-"," ").toLowerCase())&&(b=!0)}),b||(m.classList.add("filtered"),m.setAttribute("data-filtered-by",l))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((l,u)=>{let m=!(i.length>0&&i[0].value.length>=3);i.forEach((h,b)=>{const p=l.querySelector(`[data-label="${h.column}"]`);p&&h.value.length>=3&&p.textContent.toLowerCase().includes(h.value.toLowerCase())&&(m=!0)}),m||l.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((l,u)=>{s++,l.classList.add("filtered--matched"),Math.ceil(s/c)==parseInt(n)&&l.classList.add("filtered--show")}),t&&(t.setAttribute("data-total",s),t.setAttribute("data-show",c),t.setAttribute("data-page",n))},M=(a,e,t)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((r,i)=>{const s=r.getAttribute("data-query");let n=0;if(s=="total")t.hasAttribute("data-total")?n=t.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!s.includes(" == ")&&s.includes(" & ")){const c=s.split(" & ");let d="";c.forEach(l=>{d+=`:not([data-filtered-by="${l}"])`}),n=Array.from(a.querySelectorAll(`tbody tr${d}`)).length}else if(!s.includes(" == "))n=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${s}"])`)).length;else if(s.includes(" && ")){const c=s.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let l=!0;for(const[u,m]of Object.entries(c)){const h=m.split(" == ");(!d.querySelector(`td[data-label="${h[0]}"]`)||d.querySelector(`td[data-label="${h[0]}"]`).textContent!=`${h[1]}`)&&(l=!1)}return l}).length}else{const c=s.split(" == ");n=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${c[0]}"], tbody tr[data-filtered-by="${c[0]}"] td[data-label="${c[0]}"]`)).filter(function(d){return d.textContent===c[1]}).length}r.hasAttribute("data-total")?r.setAttribute("data-total",n):r.innerHTML=n})},vo=function(a,e,t,r){if(r.hasAttribute("data-no-submit"))return!1;t.addEventListener("update-page",i=>{const s=e.querySelector("[data-pagination]"),n=i.detail.page;if(s.value=n,e.dispatchEvent(new Event("paginate")),r.setAttribute("data-page",n),a.hasAttribute("data-show-history")){const c=new URL(location);c.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",c)}if(!r.hasAttribute("data-no-scroll")){const c=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:c,behavior:"smooth"})}}),t.addEventListener("update-show",i=>{const s=e.querySelector("[data-show]"),n=i.detail.show;s.value=n,r.setAttribute("data-show",n),e.dispatchEvent(new Event("submit"))})},yo=(a,e)=>{if(!a)return!1;a.addEventListener("click",t=>{wo(e)})},wo=function(a){let e=[];const t=a.getElementsByTagName("tr");for(let n=0;n<t.length;n++){const c=t[n].querySelectorAll("td,th"),d=[];for(let l=0;l<c.length;l++)d.push(`"${c[l].textContent}"`);e.push(d.join(","))}e=e.join(`
112
112
  `);const r=new Blob([e],{type:"text/csv"}),i=document.createElement("a");i.download="export.csv";const s=window.URL.createObjectURL(r);i.href=s,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)},K=function(a,e,t,r){if(G(a),bo(a,r),M(a,e,r),r&&r.classList.contains("table--cta")){let i=function(){Array.from(a.querySelectorAll("tr")).forEach((n,c)=>{const d=n.offsetHeight;n.style.setProperty("--row-height",`${d}px`)})};const s=po(a);r.style.setProperty("--cta-width",`${s}rem`),new ResizeObserver(i).observe(a)}},J=function(a){const e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((t,r)=>{if(!(t.type=="radio"&&!t.checked)&&!(t.type=="checkbox"&&!t.checked)&&t&&t.value){const i=t.getAttribute("data-filter");let s=t.value;t.hasAttribute("data-date-from")&&(s+="-date-from"),t.hasAttribute("data-date-to")&&(s+="-date-to"),e[i]||(e[i]=[]),e[i].push(s)}}),e},Q=function(a,e,t,r){return ho(this,void 0,void 0,function*(){const i=new FormData(e),s=new URLSearchParams(i).toString(),n=a.querySelectorAll("thead tr th:not(.expand-button-heading)"),c=a.querySelector("tbody"),d=e.getAttribute("data-ajax");r.classList.add("table--loading");const l=J(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});let u=0;Object.values(l).forEach((h,b)=>{typeof h=="object"&&Object.values(h).length?u+=Object.values(h).length:u++}),u&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML+=`(${u})`,h.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[d]&&window.controller[d].abort(),window.controller[d]=new AbortController;const{signal:m}=controller[d];t.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(d+"?"+s,{signal:m,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(h=>h.json()).then(h=>{const b=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",p=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",f=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",g=T(h,p,15),v=T(h,f,1),y=T(h,b),_=r.hasAttribute("data-empty-msg")?r.getAttribute("data-empty-msg"):"No results found";y?(c.innerHTML="",y.forEach((A,q)=>{const L=document.createElement("tr");n.forEach((w,E)=>{let $="";const x=document.createElement("td");if(x.setAttribute("data-label",w.innerText),w.getAttribute("data-output")){var C=w.getAttribute("data-output");$=C.replace(new RegExp(/{(.*?)}/,"gm"),function(sr){return T(A,sr.replace("{","").replace("}",""))})}if(w.hasAttribute("data-output-array")){var C=w.getAttribute("data-output");const lr=T(A,C.replace("{","").replace("}",""));$="",lr.forEach((at,_r)=>{const cr=w.getAttribute("data-output-array");let H="";if(w.hasAttribute("data-output-array-property")&&w.hasAttribute("data-output-array-transform")){const O=T(at,w.getAttribute("data-output-array-property")),dr=JSON.parse(w.getAttribute("data-output-array-transform"))[O];H=cr.replace(`{${w.getAttribute("data-output-array-property")}}`,dr)}H=H.replace(new RegExp(/{(.*?)}/,"gm"),function(O){return T(at,O.replace("{","").replace("}",""))}),$+=H})}w.hasAttribute("data-transform")&&($=JSON.parse(w.getAttribute("data-transform"))[$],!$&&w.hasAttribute("data-default")&&($=w.getAttribute("data-default"))),x.innerHTML=$,L.appendChild(x)}),c.appendChild(L)}),X(a,e),r.setAttribute("data-total",parseInt(g)),r.setAttribute("data-page",parseInt(v)),K(a,e,t,r),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((A,q)=>{const L=T(h,A.getAttribute("data-ajax-query"),"");A.hasAttribute("data-total")?A.setAttribute("data-total",L):A.innerHTML=L}),parseInt(g)==0&&(c.innerHTML=`<tr><td colspan="100%"><span>${_}</span></td></tr>`),r.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:d,formData:s})):c.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',t.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(h){console.log(h)}})},V=(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",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return e=uo(e)}};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`,r=document.createElement("template");r.innerHTML=`
@@ -136,7 +136,7 @@
136
136
  <iam-pagination part="pagination" class="pagination--table" ${this.hasAttribute("data-page")?`data-page="${this.getAttribute("data-page")}"`:""} ></iam-pagination>
137
137
  `,this.shadowRoot.appendChild(r.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)}iam-table[data-expandable] [data-expand-button][aria-expanded]{background-color:rgba(0,0,0,0)}@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;height:auto}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) [data-expand-button][aria-expanded]:before{content:"";font-weight:900 !important}iam-table:not(.table--fullwidth) .dialog__wrapper:not([slot=overflow]){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;padding-bottom:0}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;padding-bottom:0}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 .hide-status:after{display:none}table :not(.hide-status):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 :not(.hide-status):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 :not(.hide-status):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="action 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="manually verified"],[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:not(.radio--tick){padding-left:0 !important;margin:0 !important}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):before,iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):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}@container (width > 23.4375em){iam-table tr:has([type=checkbox]:checked){height:calc(4.625rem - 2px)}}iam-table tr:has([type=checkbox]:checked){--row-bg: #e0e0e0}@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:not(.radio--tick){padding-left:0 !important;margin:0 !important;min-height:2rem}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):before,iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):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] [data-expand-button][aria-expanded]:before{content:""}iam-table[data-expandable] tr:not(:has(p)) [data-expand-button]{display:none}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.25rem 0 0 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:has(.td--fixed){height:3.5rem}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.global.css.map */
138
138
  </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"),X(this.table,this.form),this.form.querySelector("[data-pagination]")||this.form.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${this.getAttribute("data-page")}" data-pagination="true" />`),this.form.querySelector("[data-show]")||this.form.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${this.getAttribute("data-show")}" data-show="true" />`),go(this.table),fo(this.table,this.form,this.pagination,this,this.savedTableBody),vo(this.table,this.form,this.pagination,this),yo(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))Q(this.table,this.form,this.pagination,this);else{let r=function(s=1){return Math.floor(Math.random()*Date.now()*(s+1))};if(this.querySelector("iam-actionbar[data-selectall]")||document.querySelector(`iam-actionbar[data-for='${this.getAttribute("id")}']`)){const s=this.querySelector("iam-actionbar[data-selectall]")?this.querySelector("iam-actionbar[data-selectall]"):document.querySelector(`iam-actionbar[data-for='${this.getAttribute("id")}']`);Array.from(this.table.querySelectorAll("thead tr")).forEach((n,c)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,c)=>{const d=`row${r(c)}`;n.insertAdjacentHTML("afterbegin",`<td class="td--fixed selectrow selected"><input type="checkbox" name="row" id="${d}" ${n.hasAttribute("data-selected")?'checked="true"':""}/><label for="${d}"><span class="visually-hidden">Select row</span></label></td>`)}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){const c=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,d=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;s.setAttribute("data-selected",c==d?"all":d)}}),s.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((c,d)=>{c.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((c,d)=>{c.checked=!0})})}let i=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((s,n)=>{if(s.querySelector(":scope > td > .dialog__wrapper")){const c=s.querySelector(":scope > td > .dialog__wrapper").parentNode;c.classList.add("td--fixed"),i=Array.from(c.parentNode.children).indexOf(c)}}),i!=-1&&(this.table.querySelector(`thead tr th:nth-child(${i+1})`).classList.add("th--fixed"),Array.from(this.table.querySelectorAll(`tbody tr td:nth-child(${i+1})`)).forEach((s,n)=>{s.classList.add("td--fixed")})),K(this.table,this.form,this.pagination,this),this.hasAttribute("data-no-submit")||j(this.table,this.form,this),M(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",r=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))}),this.pagination.addEventListener("update-show",r=>{const i=r.detail.show,s=new CustomEvent("update-show",{detail:{show:i}});this.dispatchEvent(s)}),this.pagination.addEventListener("update-page",r=>{const i=r.detail.page,s=new CustomEvent("update-page",{detail:{page:i}});this.dispatchEvent(s)})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(e,t,r){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),e){case"data-total":{t!=r&&this.pagination.setAttribute("data-total",r);break}case"data-show":{t!=r&&this.pagination.setAttribute("data-show",r);break}case"data-page":{t!=r&&this.pagination.setAttribute("data-page",r);break}}}}const ko=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"}));/*!
139
- * iamKey v7.1.0--beta2
139
+ * iamKey v7.1.0--beta3
140
140
  * Copyright 2022-2025 iamproperty
141
141
  */function xo(a,e){const t=e.querySelector(".files"),r=e.querySelector(".drop-area"),i=a.querySelector("input"),s=a.hasAttribute("data-maxsize")?a.getAttribute("data-maxsize"):0,n=e.querySelector(".invalid-feedback.size"),c=e.querySelector(".invalid-feedback.ext"),d=i.cloneNode();r.append(d);const l=function(u){if(!i.hasAttribute("accept"))return!0;const m=u.split(".").pop();return!!i.getAttribute("accept").includes(m)};if(e.addEventListener("click",u=>{u&&u.target instanceof HTMLElement&&u.target.closest(".btn-primary")&&(u.target.closest(".btn-primary"),c.classList.remove("d-block"),n.classList.remove("d-block"),(i.hasAttribute("multiple")?d:i).click())}),e.addEventListener("click",u=>{if(u&&u.target instanceof HTMLElement&&u.target.closest(".files button")){const m=new DataTransfer,{files:h}=i,b=u.target.closest(".files button");for(let f=0;f<h.length;f++){const g=h[f];g.name!=b.getAttribute("data-file")&&m.items.add(g)}i.files=m.files;const p=new Event("change");i.dispatchEvent(p)}}),d.addEventListener("change",u=>{if(i.hasAttribute("multiple")){const h=[...i.files,...d.files],b=[],p=new DataTransfer;for(let f=0;f<h.length;f++){const g=h[f],v=g.size/1e3;!b.includes(g.name)&&(s==0||v<s)&&l(g.name)&&p.items.add(g),l(g.name)||c.classList.add("d-block"),v>s&&n.classList.add("d-block"),b.push(g.name)}i.files=p.files}else i.files=d.files;const m=new Event("change");i.dispatchEvent(m)}),d.addEventListener("dragenter",u=>{d.classList.add("focus")}),d.addEventListener("dragleave",u=>{d.classList.remove("focus")}),d.addEventListener("drop",u=>{d.classList.remove("focus")}),i.addEventListener("change",u=>{if(i.files.length==1){const h=i.files[0],b=h.size/1e3;if(!l(h.name)){c.classList.add("d-block");const p=new DataTransfer;i.files=p.files}if(b>s){n.classList.add("d-block");const p=new DataTransfer;i.files=p.files}}t.innerHTML="";for(const h of i.files)t.innerHTML+=`<span class="file" part="file">${h.name} <button data-file="${h.name}">Remove</button></span>`;const m=new CustomEvent("elementchange",{detail:{files:i.files}});if(a.dispatchEvent(m),i.files.length==0){const h=new CustomEvent("empty");a.dispatchEvent(h)}}),a.hasAttribute("data-filename")){const u=a.getAttribute("data-filename");u&&(t.innerHTML=`<span class="file">${u} <button data-file="${u}">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});const Ao=Object.freeze(Object.defineProperty({__proto__:null,default: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`,r=document.createElement("template");r.innerHTML=`
142
142
  <style>
@@ -157,7 +157,7 @@
157
157
  <span class="invalid-feedback size">Some files Were too large to upload.</span>
158
158
  </div>
159
159
  `,this.shadowRoot.appendChild(r.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"),r=this.shadowRoot.querySelector(".helper-text");this.querySelector('[slot="helper"]')||(r.innerHTML=`${this.hasAttribute("data-maxsize")?`Max file size is ${this.getAttribute("data-maxsize")}kb. `:""}${t.hasAttribute("accept")?`Supported file types are ${t.getAttribute("accept")}`:""}`),xo(this,e)}static get observedAttributes(){return["data-filename"]}attributeChangedCallback(e,t,r){switch(e){case"data-filename":{if(t!=r){const i=this.shadowRoot.querySelector(".files");r!=null&&r!="null"&&r!=""&&(i.innerHTML=`<span class="file">${r} <button data-file="${r}">Remove</button></span>`)}break}}}}},Symbol.toStringTag,{value:"Module"}));/*!
160
- * iamKey v7.1.0--beta2
160
+ * iamKey v7.1.0--beta3
161
161
  * Copyright 2022-2025 iamproperty
162
162
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class Lo extends HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
163
163
  <style>
@@ -175,7 +175,7 @@
175
175
  </style>
176
176
  <slot></slot>
177
177
  `,(e=this.shadowRoot)===null||e===void 0||e.appendChild(i.content.cloneNode(!0))}connectedCallback(){if(!this.classList.contains("accordion--keep-open")){const e=this.querySelectorAll(":scope > details");e.forEach(t=>{t.addEventListener("toggle",()=>{e.forEach(r=>{r!==t&&t.hasAttribute("open")&&r.removeAttribute("open")})})})}}}const So=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"}));/*!
178
- * iamKey v7.1.0--beta2
178
+ * iamKey v7.1.0--beta3
179
179
  * Copyright 2022-2025 iamproperty
180
180
  */const Eo=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},qo=(a,e,t)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),t.forEach(r=>{a.addEventListener(r,function(i){const s={event:r,element:e,target:i.target};Object.keys(i.detail).forEach(n=>{const c=i.detail[n];s[n]=c}),window.dataLayer.push(s)})}),!0),$o=`<div class="card__head" part="head">
181
181
  <slot name="head"></slot>
@@ -206,7 +206,7 @@
206
206
  <slot name="btns"></slot>
207
207
  </div>
208
208
  </div>`),Array.from(e.querySelectorAll('[slot="btns"]')).forEach((n,c)=>{n.classList.add("btn"),n.classList.add("btn-action")}),e.querySelector('[slot="checkbox"],[slot="secondary"]')){const n=e.querySelector('[slot="checkbox"],[slot="secondary"]');n.addEventListener("mouseenter",c=>{e.classList.add("prevent-hover")}),n.addEventListener("mouseleave",c=>{e.classList.remove("prevent-hover")})}if(e.shadowRoot.querySelector(".dialog__wrapper")){const n=e.shadowRoot.querySelector(".dialog__wrapper");n.addEventListener("mouseenter",c=>{e.classList.add("prevent-hover")}),n.addEventListener("mouseleave",c=>{e.classList.remove("prevent-hover")})}const r=e.querySelector('input[type="checkbox"]');r&&r.addEventListener("change",n=>{if(r.checked){const c=new CustomEvent("select-card",{detail:{"Card value":r.value,"input name":r.getAttribute("name")}});e.dispatchEvent(c)}else{const c=new CustomEvent("unselect-card",{detail:{"Card value":r.value,"input name":r.getAttribute("name")}});e.dispatchEvent(c)}});const i=e.querySelector('[slot="secondary"]');i&&i.addEventListener("click",n=>{const c=new CustomEvent("secondary-button-clicked",{detail:{Title:i.getAttribute("title")}});e.dispatchEvent(c)});const s=e.querySelectorAll('[slot="btns"]');Array.from(s).forEach((n,c)=>{n.addEventListener("click",d=>{const l=new CustomEvent("action-button-clicked",{detail:{Title:n.getAttribute("title")}});e.dispatchEvent(l)})}),qo(e,"iam-card",["select-card","unselect-card","secondary-button-clicked","action-button-clicked"])})}static get observedAttributes(){return["data-image"]}attributeChangedCallback(e,t,r){switch(e){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=r);break}case"data-image":{if(t!=r){const i=this.shadowRoot.querySelector(".card__head img");i&&i.setAttribute("src",r)}break}}}}const zo=Object.freeze(Object.defineProperty({__proto__:null,default:Mo},Symbol.toStringTag,{value:"Module"}));/*!
209
- * iamKey v7.1.0--beta2
209
+ * iamKey v7.1.0--beta3
210
210
  * Copyright 2022-2025 iamproperty
211
211
  */const Ho=function(a){const e=[];return Array.from(a.querySelectorAll(":scope > div")).forEach((t,r)=>{t.hasAttribute("data-thumbnail")&&(e[r]=t.getAttribute("data-thumbnail"))}),e},Bo=function(a,e){const t=a.querySelectorAll(":scope > div").length;let r="";for(let i=1;i<=t;i++){let s=null,n="";e.length&&e[i-1]?(n="has-thumbnail",s=`<img src="${e[i-1]}" alt="Slide ${i}" height="148"/>`):s=`Slide ${i}`,r+=`<button class="control-${i} ${n}" data-slide="${i}" ${i==1?"aria-current":""}>${s}</button>`}return r},D=function(a,e){return e==1?a:Math.ceil(a/e)*e-e+1},P=function(a,e){return(a-1)/(e-1)*100},Ro=function(a){let e;const t=a.shadowRoot.querySelector(".carousel"),r=t.querySelector(".carousel__inner"),i=t.querySelector(".carousel__controls"),s=t.querySelector('.carousel__progress [type="range"]'),n=a.querySelectorAll(":scope > div").length;let c=r.clientWidth,d=a.querySelector(":scope > div").scrollWidth,l=Math.round(c/d);s.setAttribute("min",1),s.setAttribute("step",l);let u=D(n,l);s.setAttribute("max",u),s.value=1;let m=P(1,u);s.style.setProperty("--percent",m+"%");let h,b="mouseup",p="mousedown";"ontouchstart"in document.documentElement&&(b="touchend",p="touchstart"),r.addEventListener("scroll",function(f){clearTimeout(e),e=setTimeout(function(){const g=r.clientWidth,v=r.scrollWidth,y=r.scrollLeft;let _=Math.round(y/v*n)+1;const A=a.querySelector(":scope > div").scrollWidth,q=a.querySelector(":scope > div:last-child").offsetLeft,L=r.scrollLeft+g+r.getBoundingClientRect().left>=q+60,w=Math.round(g/A),E=Math.ceil(n/w)*w-n;s.setAttribute("step",w),E>0&&L&&(_=Math.floor(n/w)*w+1),Array.from(t.querySelectorAll(".carousel__controls button")).forEach(($,x)=>{$.removeAttribute("aria-current")}),t.querySelector(".control-"+_).setAttribute("aria-current",!0),_==1?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),_>n-w?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled"),s.value=_,u=D(n,w),s.setAttribute("max",u),m=_/u*100,m=P(_,u),s.style.setProperty("--percent",m+"%")},100)},!1),i.addEventListener("click",function(f){for(let g=f.target;g&&g!=this;g=g.parentNode)if(typeof g.matches=="function"&&g.matches("button")){f.preventDefault(),Array.from(i.querySelectorAll("button")).forEach((_,A)=>{_.removeAttribute("aria-current")}),g.setAttribute("aria-current",!0);const v=new CustomEvent("pip-clicked",{detail:{slide:g.getAttribute("data-slide")}});a.dispatchEvent(v);const y=a.querySelector(`:scope > *:nth-child(${g.getAttribute("data-slide")})`);r.scroll({top:0,left:y.offsetLeft-r.getBoundingClientRect().left,behavior:"smooth"});break}},!1),t.addEventListener("click",function(f){const g=r.clientWidth;r.scrollWidth;const v=a.querySelector(":scope > div").scrollWidth,y=Math.round(g/v),_=a.querySelector(":scope > div:last-child").offsetLeft,A=r.scrollLeft+g+r.getBoundingClientRect().left>=_+60,q=Math.ceil(n/y)*y-n,L=y-q,w=A&&q>0?L*v:r.clientWidth;for(let E=f.target;E&&E!=this;E=E.parentNode)if(typeof E.matches=="function"&&E.matches(".btn-next, .btn-prev")){const $=E.matches(".btn-next")?"next":"prev",x=new CustomEvent(`${$}-clicked`,{detail:{slide:E.getAttribute("data-go")}});a.dispatchEvent(x),f.preventDefault();const C=E.classList.contains("btn-prev")?r.scrollLeft-w:r.scrollLeft+r.clientWidth;r.scroll({top:0,left:C,behavior:"smooth"});break}},!1),s.addEventListener(p,function(f){clearInterval(h),h=setInterval(function(){c=r.clientWidth,d=a.querySelector(":scope > div").scrollWidth,l=Math.round(c/d),s.setAttribute("step",l),u=D(n,l),s.setAttribute("max",u),m=P(s.value,u),s.style.setProperty("--percent",m+"%")},10)}),s.addEventListener(b,function(f){clearInterval(h)}),s.addEventListener("change",function(f){clearInterval(h);const g=a.querySelector(`:scope > *:nth-child(${s.value})`);r.scroll({top:0,left:g?g.offsetLeft-r.getBoundingClientRect().left:0,behavior:"smooth"}),g.matches(".btn-next");const v=new CustomEvent("slider-changed",{detail:{slide:s.value}});a.dispatchEvent(v)},!1)},No=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},jo=(a,e,t)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),t.forEach(r=>{a.addEventListener(r,function(i){const s={event:r,element:e,target:i.target};Object.keys(i.detail).forEach(n=>{const c=i.detail[n];s[n]=c}),window.dataLayer.push(s)})}),!0);No("iam-carousel");class Vo extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
212
212
  <style>
@@ -238,7 +238,7 @@
238
238
 
239
239
  </div>
240
240
  `,this.shadowRoot.appendChild(e.content.cloneNode(!0))}connectedCallback(){const e=this;this.shadowRoot.querySelector(".carousel"),this.shadowRoot.querySelector(".row");let t=[];const r=this.shadowRoot.querySelector(".carousel__controls");e.querySelector("[data-thumbnail]")&&(t=Ho(e),e.classList.add("thumbnails")),r.innerHTML=Bo(e,t),Array.from(e.querySelectorAll(":scope > div > img:first-child:last-child, :scope > div > picture:first-child:last-child img")).forEach((i,s)=>{i.style.inset="0 0.5rem 0 0.5rem",i.style.position="absolute",i.style.width="calc(100% - 1rem)",i.style.height="100%",i.style["object-fit"]="cover",i.closest("div").classList.add("image__wrapper")}),Ro(e),jo(e,"iam-carousel",["pip-clicked","next-clicked","prev-clicked","slider-changed"])}attributeChangedCallback(e,t,r){}}const Do=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"}));/*!
241
- * iamKey v7.1.0--beta2
241
+ * iamKey v7.1.0--beta3
242
242
  * Copyright 2022-2025 iamproperty
243
243
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});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`,r=document.createElement("template");r.innerHTML=`
244
244
  <style>
@@ -256,7 +256,7 @@
256
256
  </div>
257
257
  </div>
258
258
  `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){this.classList.add("bg-primary");const e=this.shadowRoot.querySelector("picture"),t=this.shadowRoot.querySelector("picture img");this.hasAttribute("image")?t.setAttribute("src",this.getAttribute("image")):e.remove()}}const Fo=Object.freeze(Object.defineProperty({__proto__:null,default:Po},Symbol.toStringTag,{value:"Module"}));/*!
259
- * iamKey v7.1.0--beta2
259
+ * iamKey v7.1.0--beta3
260
260
  * Copyright 2022-2025 iamproperty
261
261
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});const Oo=Object.freeze(Object.defineProperty({__proto__:null,default:class extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"}),t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
262
262
  <style class="styles">
@@ -305,7 +305,7 @@
305
305
  </div>
306
306
  </div>
307
307
  </dialog>`);const c=this.shadowRoot.querySelector("#search-button"),d=this.shadowRoot.querySelector("#search-close"),l=this.shadowRoot.querySelector("#search-dialog");this.hasAttribute("data-search-open")&&(l.setAttribute("open","open"),this.classList.add("search-open"),c.setAttribute("aria-expanded",!0)),c.addEventListener("click",u=>{l.setAttribute("open","open"),this.classList.add("search-open"),c.setAttribute("aria-expanded",!0)}),d.addEventListener("click",u=>{l.removeAttribute("open"),this.classList.remove("search-open"),c.removeAttribute("aria-expanded")})}}}},Symbol.toStringTag,{value:"Module"}));/*!
308
- * iamKey v7.1.0--beta2
308
+ * iamKey v7.1.0--beta3
309
309
  * Copyright 2022-2025 iamproperty
310
310
  */const Io=(a,e,t,r)=>{const i=Math.tan(.375*Math.PI),s=window.innerWidth||document.body.clientWidth,n=Math.max(1,Math.floor(.01*s)),c=t-a,d=r-e,l=Math.abs(c/d),u=Math.abs(d/c);if(Math.abs(c)>n||Math.abs(d)>n){if(u<=i)return c<0?"left":"right";if(l<=i)return d<0?"top":"bottom"}else return"tap"},Uo=function(a){a.querySelectorAll(":scope > details");const e=a.querySelectorAll(":scope > details, :scope > a");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");const i=document.createElement("div");i.classList.add("tabs__links__wrapper"),i.prepend(t),a.prepend(i)}let r=0;e.forEach((i,s)=>{let n=document.createElement("button");if(i.matches("details")){const c=i.querySelector(":scope > summary"),d=c.classList.contains("disabled");c.classList.add("visually-hidden"),i.hasAttribute("id")&&n.setAttribute("data-id",`${i.getAttribute("id")}`),i.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML=`${c.innerText}`,n.classList.add("link"),n.setAttribute("data-index",r),i.setAttribute("tabindex","-1"),d&&n.classList.add("disabled"),r++}else i.matches("a")&&(n=i);n.classList.add("link"),t.appendChild(n)})},Wo=function(a){const e=a.querySelectorAll(":scope > details"),t=a.querySelectorAll(":scope > details > summary");let r=a.querySelector(":scope .tabs__links"),i=a.querySelectorAll(":scope .tabs__links > button"),s=a.querySelector(":scope .tabs__next");var n;if(window.isClicked=!1,window.isScrolling=!1,a.shadowRoot&&(i=a.shadowRoot.querySelectorAll(".tabs__links > button"),r=a.shadowRoot.querySelector(".tabs__links"),s=a.shadowRoot.querySelector(":scope .tabs__next")),i.forEach(c=>{c.addEventListener("click",d=>{if(d.preventDefault(),!window.isScrolling){if(window.triggered||(window.isClicked=!0),c.classList.contains("disabled"))return!1;i.forEach(l=>{const u=l==c;l.setAttribute("aria-pressed",u)}),r.scroll({top:0,left:c.offsetLeft,behavior:"smooth"}),e.forEach((l,u)=>{const m=c.getAttribute("data-index")==u;m?l.setAttribute("open",m):l.removeAttribute("open")}),c.matches(":last-child")?s.setAttribute("disabled","disabled"):s.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:c.textContent})}})}),r.addEventListener("scroll",c=>{window.isScrolling||(clearTimeout(n),window.isScrolling=!0)}),r.addEventListener("scrollend",c=>{window.isScrolling=!1,clearTimeout(n),n=setTimeout(function(){if(window.isClicked)return window.isClicked=!1,!1;let d=i[0],l=Math.abs(d.getBoundingClientRect().left);i.forEach(u=>{Math.abs(u.getBoundingClientRect().left)<l&&(l=Math.abs(u.getBoundingClientRect().left),d=u)}),window.triggered=!0,d.focus(),d.click(),window.triggered=!1},200)}),t.forEach((c,d)=>{c.addEventListener("click",l=>{l.preventDefault(),i[d].click()})}),s.addEventListener("click",c=>{c.preventDefault();const d=r.querySelector('[aria-pressed="true"]').nextSibling;d&&d.click()}),a.classList.contains("tabs--guided")){let c=0,d=0,l=0,u=0;e.forEach(m=>{m.addEventListener("touchstart",h=>{h.stopPropagation(),c=h.changedTouches[0].screenX,d=h.changedTouches[0].screenY}),m.addEventListener("touchend",h=>{h.stopPropagation(),l=h.changedTouches[0].screenX,u=h.changedTouches[0].screenY;const b=Io(c,d,l,u),p=r.querySelector('[aria-pressed="true"]'),f=p.nextSibling,g=p.previousSibling;switch(b){case"left":f&&f.click();break;case"right":g&&g.click();break}})})}},Go=function(a){if(!a.querySelector(":scope > details"))return!1;const e=a.querySelectorAll(":scope > details"),t=a.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&a.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(a.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!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))},Xo=function(a){Uo(a),Wo(a),Go(a)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class Yo 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`,r=document.createElement("template");r.innerHTML=`
311
311
  <style>
@@ -336,7 +336,7 @@
336
336
  <div class="applied-filters ${i}"></div>
337
337
  <slot></slot>
338
338
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){Jo(this,this.shadowRoot.querySelector(".applied-filters"))}}const Zo=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"}));/*!
339
- * iamKey v7.1.0--beta2
339
+ * iamKey v7.1.0--beta3
340
340
  * Copyright 2022-2025 iamproperty
341
341
  */const tr=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((e,t)=>{e.closest(".dialog__wrapper")||(e.removeAttribute("open"),e.showModal(),e.focus(),Z(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 t=e.target.closest("[data-modal]"),r=t.hasAttribute("data-modal")?t.getAttribute("data-modal"):t.getAttribute("data-filter"),i=document.querySelector(`dialog#${r}`);if(Z(i),i.showModal(),i.focus(),!i.querySelector("iam-multi-step")){const s=i.offsetWidth;i.setAttribute("style",`max-width: ${s}px;`)}Array.from(i.querySelectorAll("[data-duplicate]")).forEach((s,n)=>{const c=s.getAttribute("data-duplicate"),d=document.getElementById(c);if(s.checked!=d.checked){s.checked=d.checked;const l=new Event("change");s.dispatchEvent(l)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){const t=e.target.closest("dialog[open]");e.preventDefault(),t.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((i,s)=>{i.classList.remove("active")});const r=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:t.id}});e.target.dispatchEvent(r),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:t.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest('button[formmethod="dialog"]')){const t=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((r,i)=>{r.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:t.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){let t=e.target.closest("dialog[open]");if(window.getComputedStyle(t).display==="contents"&&(t=t.parentNode.closest("dialog[open]")),!t.classList.contains("dialog--transactional")&&!t.classList.contains("dialog--acknowledgement")){const r=t.getBoundingClientRect();(e.clientX<r.left||e.clientX>r.right||e.clientY<r.top||e.clientY>r.bottom)&&(e.target.closest("dialog *")||t.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:t.getAttribute("id")}))}}if(e&&e.target instanceof HTMLElement&&e.target.closest(".dialog__wrapper > button")){e.stopPropagation();const t=e.target.closest(".dialog__wrapper > button"),r=t.parentNode;let i="openPopover";const s=r.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=s&&t.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((l,u)=>{l.removeAttribute("aria-expanded")}),s.hasAttribute("open"))s.close(),i="closePopover",s.removeAttribute("style"),t.removeAttribute("aria-expanded");else{s.show(),t.setAttribute("aria-expanded",!0);const l=t.getBoundingClientRect();let u=l.top,m=l.left;if(t.closest("iam-table")){const h=t.closest("iam-table").parentNode.getBoundingClientRect();u-=h.top,m-=h.left}s.classList.contains("dialog--fix")&&s.setAttribute("style",`position:fixed;top: ${u}px; left: ${m}px; margin: 3rem 0 0 0;`)}let n=s.getBoundingClientRect();const c=n.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(c>d){const l=s.hasAttribute("style")?s.getAttribute("style")+" ":"";s.setAttribute("style",l+"transform: translate(0, calc(-100% - 4rem))"),n=s.getBoundingClientRect(),n.top-window.scrollY<100&&s.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:i,id:t.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((t,r)=>{t.removeAttribute("aria-expanded")}))}),null),Z=a=>{if(!a.querySelector(":scope .mh-lg")&&!a.querySelector("iam-multi-step")){a.innerHTML=`<div class="mh-lg">${a.innerHTML}</div>`;const e=a.querySelector(".mh-lg"),t=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(t){const r=t.previousSibling;e.before(t),r&&t.before(r)}}a.querySelector(":scope > button:first-child")||a.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function tt(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 er 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`,r=document.createElement("template");r.innerHTML=`
342
342
  <style>
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "iamproperty"
6
6
  },
7
7
  "private": false,
8
- "version": "7.1.0--beta2",
8
+ "version": "7.1.0--beta3",
9
9
  "scripts": {
10
10
  "temp": "rollup --environment COMPONENT:carousel --config rollup-component.config.js --sourcemap",
11
11
  "bootstrap": "copyfiles -u 2 node_modules/bootstrap/**/* assets/bootstrap",