@iamproperty/components 4.0.1 → 4.0.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function n(r){let a=r.querySelectorAll("details"),e=r.querySelectorAll("summary");if(a.forEach(o=>{o.classList.add("accordion-item")}),e.forEach(o=>{o.classList.add("accordion-header"),o.classList.add("accordion-button"),o.classList.add("h4")}),!r.classList.contains("accordion--keep-open")){const o=r.querySelectorAll(":scope > details");o.forEach(c=>{c.addEventListener("click",()=>{o.forEach(i=>{i!==c&&i.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=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"):`${a}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const A=function(o){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=o.getAttribute("data-id"),n=o.getAttribute("id");if(typeof n>"u"||n==null){var c=String.fromCharCode(65+Math.floor(Math.random()*26));n=c+Date.now(),o.setAttribute("id",n)}function s(){window.player=new YT.Player(n,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:i,onStateChange:a}})}s();function i(r){r.target.playVideo()}var t=!1;function a(r){if(r.data==YT.PlayerState.PLAYING&&!t){var d=document.getElementById(n);d.classList.add("player-ready"),t=!0}}},v=o=>(Array.from(o.querySelectorAll("dialog[open]")).forEach((e,n)=>{e.closest(".dialog__wrapper")||(e.removeAttribute("open"),e.showModal(),e.focus(),g(e))}),o.addEventListener("click",e=>{if(e.target.tagName=="IAM-ACTIONBAR")return!1;if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-modal]")){const s=e.target.closest("[data-modal]"),i=s.hasAttribute("data-modal")?s.getAttribute("data-modal"):s.getAttribute("data-filter"),t=document.querySelector(`dialog#${i}`);g(t),t.showModal(),t.focus();let a=t.offsetWidth;t.setAttribute("style",`max-width: ${a}px;`),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((r,d)=>{const p=r.getAttribute("data-duplicate"),l=document.getElementById(p);if(r.checked!=l.checked){r.checked=l.checked;let f=new Event("change");r.dispatchEvent(f)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:i})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){const s=e.target.closest("dialog[open]");e.preventDefault(),s.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((i,t)=>{i.classList.remove("active")}),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"]')){const s=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((i,t)=>{i.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){let s=e.target.closest("dialog[open]");var n=window.getComputedStyle(s);if(n.display==="contents"&&(s=s.parentNode.closest("dialog[open]")),!s.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||s.classList.contains("dialog--multi")){const i=s.getBoundingClientRect();(e.clientX<i.left||e.clientX>i.right||e.clientY<i.top||e.clientY>i.bottom)&&(e.target.closest('input[type="radio"]')||s.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")}))}}if(e&&e.target instanceof HTMLElement&&e.target.closest(".dialog__wrapper > button")){e.stopPropagation();let s=e.target.closest(".dialog__wrapper > button"),i=e.target.closest(".dialog__wrapper > button").parentNode,t="openPopover",a=i.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=a&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((l,f)=>{l.classList.remove("active")}),a.hasAttribute("open"))a.close(),t="closePopover",a.removeAttribute("style"),s.classList.remove("active");else{a.show(),s.classList.add("active");var c=s.getBoundingClientRect();let l=c.top,f=c.left;if(s.closest("iam-table")){let b=s.closest("iam-table").parentNode.getBoundingClientRect();l-=b.top,f-=b.left}a.classList.contains("dialog--fix")&&a.setAttribute("style",`position:fixed;top: ${l}px; left: ${f}px; margin: 3rem 0 0 0;`)}let r=a.getBoundingClientRect(),d=r.bottom-window.scrollY,p=window.innerHeight-window.scrollY;if(d>p){let l=a.hasAttribute("style")?a.getAttribute("style")+" ":"";a.setAttribute("style",l+"transform: translate(0, calc(-100% - 4rem))"),r=a.getBoundingClientRect(),r.top-window.scrollY<100&&a.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,id:s.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((s,i)=>{s.classList.remove("active")}))}),null),g=o=>{o.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!o.classList.contains("dialog--multi")&&o.addEventListener("cancel",n=>{n.preventDefault()});let e=o.querySelector(".youtube-embed a");if(e&&A(e),o.classList.contains("dialog--multi")&&!o.querySelector(":scope > .steps")&&L(o),!o.querySelector(":scope > .mh-lg")&&!o.classList.contains("dialog--multi")){o.innerHTML=`<div class="mh-lg">${o.innerHTML}</div>`;let n=o.querySelector(".mh-lg"),c=o.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(c){let s=c.previousSibling;n.before(c),s&&c.before(s)}}o.querySelector(":scope > button:first-child")||o.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},L=o=>{let e="",n=Array.from(o.querySelectorAll("fieldset[data-title]")),c=o.querySelector("form");n.forEach((t,a)=>{e+=`<button data-title="${t.getAttribute("data-title")}" type="button" class="${a==0?"active":""}" tabindex="-1">${t.getAttribute("data-title")}</button>`;const r=document.createElement("div");if(r.classList.add("btn--wrapper"),t.appendChild(r),a!=0&&(r.innerHTML+=`<button data-title="${n[a-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),a!=n.length-1&&(r.innerHTML+=`<button data-title="${n[a+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),a==n.length-1)if(c&&c.querySelector(':scope > button[type="submit"]')){let d=c.querySelector(':scope > button[type="submit"]');d.classList.add("mb-0"),r.insertAdjacentElement("beforeend",d)}else r.innerHTML+=`<button data-title="${n[a].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),o.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${e}</div>`);let s=Array.from(o.querySelectorAll("fieldset.was-validated"));for(let t=0;t<s.length;t++){let a=s[t],r=a.getAttribute("data-title");if(a.querySelector(".is-invalid")){Array.from(o.querySelectorAll(`[data-title="${r}"]`)).forEach((d,p)=>{d.classList.add("active")});break}else Array.from(o.querySelectorAll(`[data-title="${r}"]`)).forEach((d,p)=>{d.classList.add("valid")})}o.addEventListener("invalid",function(){return function(t){t.preventDefault()}}(),!0);function i(t){const a=o.querySelector("fieldset.active")?o.querySelector("fieldset.active"):o.querySelector("fieldset[data-title]"),r=a.getAttribute("data-title");let d=!0;if(a.classList.add("was-validated"),Array.from(a.querySelectorAll("input")).forEach((f,b)=>{f.checkValidity()||(d=!1)}),d?Array.from(o.querySelectorAll(`[data-title="${r}"]`)).forEach((f,b)=>{f.classList.add("valid")}):Array.from(o.querySelectorAll(`[data-title="${r}"]`)).forEach((f,b)=>{f.classList.remove("valid")}),d||!t.hasAttribute("data-next")){const f=o.querySelector(`fieldset[data-title="${t.getAttribute("data-title")}"]`),b=o.querySelector(`.steps button[data-title="${t.getAttribute("data-title")}"]`);Array.from(o.querySelectorAll("button")).forEach((h,m)=>{h.classList.remove("active")}),Array.from(o.querySelectorAll("fieldset")).forEach((h,m)=>{h.classList.remove("active")}),b.classList.add("active"),f.classList.add("active")}let p=Array.from(o.querySelectorAll("fieldset")).length,l=Array.from(o.querySelectorAll("fieldset.valid")).length;o.style.setProperty("--progress",`${l/(p-1)*100}%`)}o.addEventListener("keydown",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button")){const a=t.target.closest("button");t.keyCode==13&&a.getAttribute("type")!="submit"&&(t.preventDefault(),i(a))}t&&t.target instanceof HTMLElement&&t.target.closest("input")&&(t.target.closest("input").classList.remove("is-invalid"),t.keyCode==13&&t.preventDefault())}),o.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest('button[type="submit"]'))t.target.closest("form").classList.add("was-validated");else if(t&&t.target instanceof HTMLElement&&t.target.closest("button[data-title]")){const a=t.target.closest("button[data-title]");i(a)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function w(o,e){o&&e=="all"?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!0,o.querySelector("label").textContent="Select all"):o&&e==0?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!1,o.querySelector("label").textContent="Select all"):o&&e?(o.querySelector("input").indeterminate=!0,o.querySelector("input").checked=!1,o.querySelector("label").textContent=`${e} item${e>1?"s":""} selected`):o&&(o.querySelector("input").checked=!1,o.querySelector("input").indeterminate=!1,o.querySelector("label").textContent="Select all")}class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=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"):`${e}/css/core.min.css`,c=document.createElement("template");c.innerHTML=`
5
5
  <style>
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
- */function h(m,p){function b(e,t){let i=!1,r=t.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${t.value}]`));let l=e.querySelector(`[data-name="${r}"]`);l&&t.getAttribute("type")=="checkbox"&&(i=!0);let o=t.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),e.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.setAttribute("data-name",r),l.innerHTML=o.replace("$value",t.value),(!t.value||i)&&l.remove(),t.parentNode.closest("[data-filter-text]")){let d=t.parentNode.closest("[data-filter-text]"),u=!0;if(r="",d.querySelectorAll("input").forEach((a,n)=>{let s=a.getAttribute("name");if(r+=`${n!=0?",":""}${s}`,e.querySelector(`[data-name="${s}"]`)&&e.querySelector(`[data-name="${s}"]`).remove(),a.value){let c=document.createElement("button");c.setAttribute("type","button"),c.classList.add("filter"),c.setAttribute("data-name",s),c.innerHTML=o.replace("$value",a.value),e.appendChild(c)}else u=!1}),e.querySelector(`[data-name="${r}"]`)&&e.querySelector(`[data-name="${r}"]`).remove(),u){let a=d.getAttribute("data-filter-text");d.querySelectorAll("input").forEach((s,c)=>{let f=s.getAttribute("name");e.querySelector(`[data-name="${f}"]`)&&e.querySelector(`[data-name="${f}"]`).remove(),a=a.replace(`$${c+1}`,s.value)});let n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",r),n.innerHTML=a,e.appendChild(n)}}}Array.from(m.querySelectorAll('input[type="checkbox"]:checked')).forEach((e,t)=>{b(p,e)}),Array.from(m.querySelectorAll("input[data-filter-text]")).forEach((e,t)=>{e.addEventListener("change",function(i){b(p,e)})}),p.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){let r=e.target.closest(".filter"),l=r.getAttribute("data-name").split(",");for(var t=0;t<l.length;t++){let o=l[t],d=`[name="${o}"]`;o.match(/\[(.*)\]/)&&(o.replace(/\[(.*)\]/,"[]"),d=`[value="${o.replace(/.*\[(.*)\]/,"$1")}"]`);let u=m.querySelectorAll(d);for(var i=0;i<u.length;i++){let a=u[i];if(a.getAttribute("type")!="radio"&&a.getAttribute("type")!="checkbox")a.value="";else{a.checked=!1;var e=new Event("force");m.hasAttribute("data-nosubmit")||a.closest("form").dispatchEvent(e)}}}r.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 p=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",b=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${p}/css/core.min.css`;let e=this.classList.toString();const t=document.createElement("template");t.innerHTML=`
4
+ */function h(m,p){function b(e,t){console.log("hey");let c=!1,r=t.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${t.value}]`));let i=e.querySelector(`[data-name="${r}"]`);i&&t.getAttribute("type")=="checkbox"&&(c=!0);let l=t.getAttribute("data-filter-text");if(i||(i=document.createElement("button"),e.appendChild(i)),i.setAttribute("type","button"),i.classList.add("filter"),i.setAttribute("data-name",r),i.innerHTML=l.replace("$value",t.value),(!t.value||c)&&i.remove(),t.parentNode.closest("[data-filter-text]")){let d=t.parentNode.closest("[data-filter-text]"),u=!0;if(r="",d.querySelectorAll("input").forEach((a,o)=>{let s=a.getAttribute("name");if(r+=`${o!=0?",":""}${s}`,e.querySelector(`[data-name="${s}"]`)&&e.querySelector(`[data-name="${s}"]`).remove(),a.value){let n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",s),n.innerHTML=l.replace("$value",a.value),e.appendChild(n)}else u=!1}),e.querySelector(`[data-name="${r}"]`)&&e.querySelector(`[data-name="${r}"]`).remove(),u){let a=d.getAttribute("data-filter-text");d.querySelectorAll("input").forEach((s,n)=>{let f=s.getAttribute("name");e.querySelector(`[data-name="${f}"]`)&&e.querySelector(`[data-name="${f}"]`).remove(),a=a.replace(`$${n+1}`,s.value)});let o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("filter"),o.setAttribute("data-name",r),o.innerHTML=a,e.appendChild(o)}}}Array.from(m.querySelectorAll('input[type="checkbox"]:checked')).forEach((e,t)=>{b(p,e)}),m.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){let t=e.target.closest("input[data-filter-text]");b(p,t)}}),p.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){let r=e.target.closest(".filter"),i=r.getAttribute("data-name").split(",");for(var t=0;t<i.length;t++){let l=i[t],d=`[name="${l}"]`;l.match(/\[(.*)\]/)&&(l.replace(/\[(.*)\]/,"[]"),d=`[value="${l.replace(/.*\[(.*)\]/,"$1")}"]`);let u=m.querySelectorAll(d);for(var c=0;c<u.length;c++){let a=u[c];if(a.getAttribute("type")!="radio"&&a.getAttribute("type")!="checkbox")a.value="";else{a.checked=!1;var e=new Event("force");m.hasAttribute("data-nosubmit")||a.closest("form").dispatchEvent(e)}}}r.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 p=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",b=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${p}/css/core.min.css`;let e=this.classList.toString();const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
6
6
  @import "${b}";
7
7
  .applied-filters:not(.applied-filters--compact):not(:empty):before{content:"Applied filters";font-weight:bold;font-size:1.125rem;line-height:1.375rem;color:var(--colour-header);margin-bottom:1rem;display:block}.applied-filters:not(:empty){margin-bottom:1rem}::slotted(*:last-child){margin-bottom:0}.applied-filters .filter{border:1px solid var(--colour-border);padding:1rem 1.5rem 1rem 1.5rem;background:rgba(0,0,0,0);margin-right:.5rem !important;margin-bottom:.5rem !important;line-height:1.5rem;white-space:nowrap}.applied-filters .filter:after{content:"";display:inline-block;height:1.25rem;width:1.25rem;padding:0;margin-left:1.5rem;margin-bottom:-0.25rem;border:none;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}.applied-filters--compact .filter{background-color:var(--colour-light);border:none;padding:0.625rem;line-height:1rem;border-radius:0.3125rem}.applied-filters--compact .filter:after{margin-left:0.625rem;height:1rem;width:1rem;margin-bottom:-0.1rem}/*# sourceMappingURL=assets/css/components/applied-filters.css.map */
@@ -1 +1 @@
1
- {"version":3,"file":"applied-filters.component.min.js","sources":["../../modules/applied-filters.js","applied-filters.component.js"],"sourcesContent":["// @ts-nocheck\nfunction createAppliedFilters(container, filters) {\n function addFilterButton(filters, input) {\n let shouldRemoveFilter = false;\n let inputName = input.getAttribute('name');\n if (inputName.includes('[]'))\n inputName = inputName.replace('[]', `[${input.value}]`);\n let filter = filters.querySelector(`[data-name=\"${inputName}\"]`);\n if (filter && input.getAttribute('type') == 'checkbox')\n shouldRemoveFilter = true;\n let filterText = input.getAttribute('data-filter-text');\n if (!filter) {\n filter = document.createElement('button');\n filters.appendChild(filter);\n }\n filter.setAttribute('type', 'button');\n filter.classList.add('filter');\n filter.setAttribute('data-name', inputName);\n filter.innerHTML = filterText.replace('$value', input.value);\n // If the value\n if (!input.value || shouldRemoveFilter)\n filter.remove();\n // If input has an ancestor with data-filter and all of inputs in that parent have been filled in then we need to transform the filter\n if (input.parentNode.closest('[data-filter-text]')) {\n let parent = input.parentNode.closest('[data-filter-text]');\n let allValuesSet = true;\n inputName = \"\";\n parent.querySelectorAll('input').forEach((element, index) => {\n let name = element.getAttribute('name');\n // create a joined inputname for the parent filter\n inputName += `${index != 0 ? ',' : ''}${name}`;\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n if (element.value) {\n let childFilter = document.createElement('button');\n childFilter.setAttribute('type', 'button');\n childFilter.classList.add('filter');\n childFilter.setAttribute('data-name', name);\n childFilter.innerHTML = filterText.replace('$value', element.value);\n filters.appendChild(childFilter);\n }\n else\n allValuesSet = false;\n });\n if (filters.querySelector(`[data-name=\"${inputName}\"]`))\n filters.querySelector(`[data-name=\"${inputName}\"]`).remove();\n if (allValuesSet) {\n let newFilterText = parent.getAttribute('data-filter-text');\n parent.querySelectorAll('input').forEach((element, index) => {\n let name = element.getAttribute('name');\n // Remove all the child filter tags\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n newFilterText = newFilterText.replace(`$${index + 1}`, element.value);\n });\n let parentFilter = document.createElement('button');\n parentFilter.setAttribute('type', 'button');\n parentFilter.classList.add('filter');\n parentFilter.setAttribute('data-name', inputName);\n parentFilter.innerHTML = newFilterText;\n filters.appendChild(parentFilter);\n }\n }\n }\n // check for inputs on load\n Array.from(container.querySelectorAll('input[type=\"checkbox\"]:checked')).forEach((input, index) => {\n addFilterButton(filters, input);\n });\n Array.from(container.querySelectorAll('input[data-filter-text]')).forEach((input, index) => {\n input.addEventListener('change', function (event) {\n addFilterButton(filters, input);\n });\n });\n filters.addEventListener('click', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {\n let filter = event.target.closest('.filter');\n let names = filter.getAttribute('data-name').split(',');\n for (var t = 0; t < names.length; t++) {\n let name = names[t];\n let selector = `[name=\"${name}\"]`;\n if (name.match(/\\[(.*)\\]/)) {\n let newName = name.replace(/\\[(.*)\\]/, `[]`);\n let value = name.replace(/.*\\[(.*)\\]/, `$1`);\n selector = `[value=\"${value}\"]`;\n }\n let inputs = container.querySelectorAll(selector);\n for (var i = 0; i < inputs.length; i++) {\n let input = inputs[i];\n if (input.getAttribute('type') != 'radio' && input.getAttribute('type') != 'checkbox')\n input.value = \"\";\n else {\n input.checked = false;\n var event = new Event('force');\n if (!container.hasAttribute('data-nosubmit'))\n input.closest('form').dispatchEvent(event);\n }\n }\n }\n filter.remove();\n }\n }, false);\n}\nexport default createAppliedFilters;\n","// @ts-nocheck\nimport createAppliedFilters from \"../../modules/applied-filters.js\";\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n \"event\": \"customElementRegistered\",\n \"element\": \"Applied Filters\"\n});\nclass iamAppliedFilters extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css') ? document.body.getAttribute('data-core-css') : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/applied-filters.css\";`;\n let classList = this.classList.toString();\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 <div class=\"applied-filters ${classList}\"></div>\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n createAppliedFilters(this, this.shadowRoot.querySelector('.applied-filters'));\n }\n}\nexport default iamAppliedFilters;\n"],"names":["createAppliedFilters","container","filters","addFilterButton","input","shouldRemoveFilter","inputName","filter","filterText","parent","allValuesSet","element","index","name","childFilter","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E,CACL"}
1
+ {"version":3,"file":"applied-filters.component.min.js","sources":["../../modules/applied-filters.js","applied-filters.component.js"],"sourcesContent":["// @ts-nocheck\nfunction createAppliedFilters(container, filters) {\n function addFilterButton(filters, input) {\n console.log('hey');\n let shouldRemoveFilter = false;\n let inputName = input.getAttribute('name');\n if (inputName.includes('[]'))\n inputName = inputName.replace('[]', `[${input.value}]`);\n let filter = filters.querySelector(`[data-name=\"${inputName}\"]`);\n if (filter && input.getAttribute('type') == 'checkbox')\n shouldRemoveFilter = true;\n let filterText = input.getAttribute('data-filter-text');\n if (!filter) {\n filter = document.createElement('button');\n filters.appendChild(filter);\n }\n filter.setAttribute('type', 'button');\n filter.classList.add('filter');\n filter.setAttribute('data-name', inputName);\n filter.innerHTML = filterText.replace('$value', input.value);\n // If the value\n if (!input.value || shouldRemoveFilter)\n filter.remove();\n // If input has an ancestor with data-filter and all of inputs in that parent have been filled in then we need to transform the filter\n if (input.parentNode.closest('[data-filter-text]')) {\n let parent = input.parentNode.closest('[data-filter-text]');\n let allValuesSet = true;\n inputName = \"\";\n parent.querySelectorAll('input').forEach((element, index) => {\n let name = element.getAttribute('name');\n // create a joined inputname for the parent filter\n inputName += `${index != 0 ? ',' : ''}${name}`;\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n if (element.value) {\n let childFilter = document.createElement('button');\n childFilter.setAttribute('type', 'button');\n childFilter.classList.add('filter');\n childFilter.setAttribute('data-name', name);\n childFilter.innerHTML = filterText.replace('$value', element.value);\n filters.appendChild(childFilter);\n }\n else\n allValuesSet = false;\n });\n if (filters.querySelector(`[data-name=\"${inputName}\"]`))\n filters.querySelector(`[data-name=\"${inputName}\"]`).remove();\n if (allValuesSet) {\n let newFilterText = parent.getAttribute('data-filter-text');\n parent.querySelectorAll('input').forEach((element, index) => {\n let name = element.getAttribute('name');\n // Remove all the child filter tags\n if (filters.querySelector(`[data-name=\"${name}\"]`))\n filters.querySelector(`[data-name=\"${name}\"]`).remove();\n newFilterText = newFilterText.replace(`$${index + 1}`, element.value);\n });\n let parentFilter = document.createElement('button');\n parentFilter.setAttribute('type', 'button');\n parentFilter.classList.add('filter');\n parentFilter.setAttribute('data-name', inputName);\n parentFilter.innerHTML = newFilterText;\n filters.appendChild(parentFilter);\n }\n }\n }\n // check for inputs on load\n Array.from(container.querySelectorAll('input[type=\"checkbox\"]:checked')).forEach((input, index) => {\n addFilterButton(filters, input);\n });\n container.addEventListener('change', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('input[data-filter-text]')) {\n let input = event.target.closest('input[data-filter-text]');\n addFilterButton(filters, input);\n }\n });\n filters.addEventListener('click', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {\n let filter = event.target.closest('.filter');\n let names = filter.getAttribute('data-name').split(',');\n for (var t = 0; t < names.length; t++) {\n let name = names[t];\n let selector = `[name=\"${name}\"]`;\n if (name.match(/\\[(.*)\\]/)) {\n let newName = name.replace(/\\[(.*)\\]/, `[]`);\n let value = name.replace(/.*\\[(.*)\\]/, `$1`);\n selector = `[value=\"${value}\"]`;\n }\n let inputs = container.querySelectorAll(selector);\n for (var i = 0; i < inputs.length; i++) {\n let input = inputs[i];\n if (input.getAttribute('type') != 'radio' && input.getAttribute('type') != 'checkbox')\n input.value = \"\";\n else {\n input.checked = false;\n var event = new Event('force');\n if (!container.hasAttribute('data-nosubmit'))\n input.closest('form').dispatchEvent(event);\n }\n }\n }\n filter.remove();\n }\n }, false);\n}\nexport default createAppliedFilters;\n","// @ts-nocheck\nimport createAppliedFilters from \"../../modules/applied-filters.js\";\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n \"event\": \"customElementRegistered\",\n \"element\": \"Applied Filters\"\n});\nclass iamAppliedFilters extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css') ? document.body.getAttribute('data-core-css') : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/applied-filters.css\";`;\n let classList = this.classList.toString();\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 <div class=\"applied-filters ${classList}\"></div>\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n createAppliedFilters(this, this.shadowRoot.querySelector('.applied-filters'));\n }\n}\nexport default iamAppliedFilters;\n"],"names":["createAppliedFilters","container","filters","addFilterButton","input","shouldRemoveFilter","inputName","filter","filterText","parent","allValuesSet","element","index","name","childFilter","newFilterText","parentFilter","event","names","selector","inputs","i","iamAppliedFilters","assetLocation","coreCSS","classList","template"],"mappings":";;;IACA,SAASA,EAAqBC,EAAWC,EAAS,CAC9C,SAASC,EAAgBD,EAASE,EAAO,CACrC,QAAQ,IAAI,KAAK,EACjB,IAAIC,EAAqB,GACrBC,EAAYF,EAAM,aAAa,MAAM,EACrCE,EAAU,SAAS,IAAI,IACvBA,EAAYA,EAAU,QAAQ,KAAM,IAAIF,EAAM,QAAQ,GAC1D,IAAIG,EAASL,EAAQ,cAAc,eAAeI,KAAa,EAC3DC,GAAUH,EAAM,aAAa,MAAM,GAAK,aACxCC,EAAqB,IACzB,IAAIG,EAAaJ,EAAM,aAAa,kBAAkB,EAatD,GAZKG,IACDA,EAAS,SAAS,cAAc,QAAQ,EACxCL,EAAQ,YAAYK,CAAM,GAE9BA,EAAO,aAAa,OAAQ,QAAQ,EACpCA,EAAO,UAAU,IAAI,QAAQ,EAC7BA,EAAO,aAAa,YAAaD,CAAS,EAC1CC,EAAO,UAAYC,EAAW,QAAQ,SAAUJ,EAAM,KAAK,GAEvD,CAACA,EAAM,OAASC,IAChBE,EAAO,OAAM,EAEbH,EAAM,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K,aAAa,CAAE,KAAM,MAAQ,CAAA,EAClC,MAAMC,EAAgB,SAAS,KAAK,aAAa,sBAAsB,EAAI,SAAS,KAAK,aAAa,sBAAsB,EAAI,UAC1HC,EAAU,SAAS,KAAK,aAAa,eAAe,EAAI,SAAS,KAAK,aAAa,eAAe,EAAI,GAAGD,qBAE/G,IAAIE,EAAY,KAAK,UAAU,SAAQ,EACvC,MAAMC,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA,eAEdF;AAAA;AAAA;AAAA,MAET,KAAK,aAAa,KAAK,EAAI,YAAY,KAAK,aAAa,KAAK,MAAQ;AAAA;AAAA,kCAE1CC;AAAA;AAAA,MAG1B,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAC/D,CACD,mBAAoB,CAChB1B,EAAqB,KAAM,KAAK,WAAW,cAAc,kBAAkB,CAAC,CAC/E,CACL"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");let e=this.classList.toString();const a=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"):`${a}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class s 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`,o=document.createElement("template");o.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function r(s,t){n(s,t)}function n(s,t){var 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)=>{let i=e.textContent.toLowerCase();e.classList.add("d-none"),i.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 l 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 v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class t 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=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class p extends HTMLElement{constructor(){super();const d=this.attachShadow({mode:"open"}),n=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"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function r(i){if(i.hasAttribute("data-type")&&i.getAttribute("data-type")=="toast"){let t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),i.closest(".notification__holder")||t.appendChild(i)}if(i.setAttribute("role","alert"),i.addEventListener("click",function(t){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(t.preventDefault(),n(i))},!1),i.hasAttribute("data-timeout")){let t=i.getAttribute("data-timeout");var a=new c(function(){n(i)},t);i.addEventListener("mouseenter",o=>{a.pause()}),i.addEventListener("mouseleave",o=>{a.resume()})}}function c(i,a){var t,o,e=a;this.pause=function(){window.clearTimeout(t),e-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(i,e)},this.resume()}const n=function(i){i.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 a=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"):`${a}/css/core.min.css`,o=this.querySelectorAll("a,button");Array.from(o).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(o.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 v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const l=function(e,t){if(!e.getAttribute("data-pages"))return!1;e.getAttribute("data-page")||e.setAttribute("data-page",1);let a=e.getAttribute("data-page"),i=e.getAttribute("data-pages"),d=e.getAttribute("data-total"),n=e.getAttribute("data-show"),o=e.getAttribute("data-increment");if(i<=1)return t.innerHTML="",!1;let r="";for(let s=1;s<=i;s++)s==a?r+=`<li class="page-item active" aria-current="page"><span class="page-link">${s}</span></li>`:r+=`<li class="page-item"><a href="?page=${s}" class="page-link" data-page="${s}">${s}</a></li>`;return t.innerHTML=`<ul class="pagination mb-0 d-none d-sm-flex">
5
5
  ${a==1?'<li class="page-item disabled"><span class="page-link">Previous</span></li>':`<li class="page-item"><a href="?page=${parseInt(a)-1}" class="page-link" data-page="${parseInt(a)-1}">Previous</a></li>`}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const z=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},Y=(a,e)=>String(a).padStart(e,"0"),Q=a=>a.charAt(0).toUpperCase()+a.slice(1),T=function(a,e){if(!a.getAttribute("data-pages"))return!1;a.getAttribute("data-page")||a.setAttribute("data-page",1);let l=a.getAttribute("data-page"),s=a.getAttribute("data-pages"),o=a.getAttribute("data-total"),i=a.getAttribute("data-show"),r=a.getAttribute("data-increment");if(s<=1)return e.innerHTML="",!1;let c="";for(let u=1;u<=s;u++)u==l?c+=`<li class="page-item active" aria-current="page"><span class="page-link">${u}</span></li>`:c+=`<li class="page-item"><a href="?page=${u}" class="page-link" data-page="${u}">${u}</a></li>`;return e.innerHTML=`<ul class="pagination mb-0 d-none d-sm-flex">
5
5
  ${l==1?'<li class="page-item disabled"><span class="page-link">Previous</span></li>':`<li class="page-item"><a href="?page=${parseInt(l)-1}" class="page-link" data-page="${parseInt(l)-1}">Previous</a></li>`}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const n=function(t){const i=t.querySelectorAll(":scope > details");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),o||(o=document.createElement("div"),o.classList.add("tabs__links"),t.prepend(o)),i.forEach((s,a)=>{let r=s.querySelector(":scope > summary");r.classList.add("visually-hidden");let e=document.createElement("button");s.hasAttribute("id")&&(e=document.createElement("a"),e.setAttribute("href",`#${s.getAttribute("id")}`)),s.hasAttribute("open")&&e.setAttribute("aria-pressed",!0),e.innerHTML=`${r.innerText}`,e.classList.add("link"),e.setAttribute("data-index",a),e.setAttribute("tabindex","-1"),o.appendChild(e)})},d=function(t){let i=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary"),s=t.querySelectorAll(":scope .tabs__links > .link");t.shadowRoot&&(s=t.shadowRoot.querySelectorAll(".tabs__links > .link")),s.forEach(a=>{a.addEventListener("click",r=>{r.preventDefault(),s.forEach(e=>{let c=e==a;e.setAttribute("aria-pressed",c)}),i.forEach((e,c)=>{let l=a.getAttribute("data-index")==c;l?e.setAttribute("open",l):e.removeAttribute("open")}),a.hasAttribute("href")&&history.pushState(void 0,void 0,a.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:a.textContent})})}),o.forEach((a,r)=>{a.addEventListener("focus",e=>{s.forEach(c=>{c.classList.remove("focus")}),s[r].classList.add("focus")}),a.addEventListener("click",e=>{e.preventDefault(),s[r].click()})})},u=function(t){let i=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");t.shadowRoot&&(o=t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&t.querySelector(`.tabs__links [href="${location.hash}"]`)?(t.querySelector(`[href="${location.hash}"]`).setAttribute("open",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(i[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},h=function(t){n(t),d(t),u(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class p 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`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.0.1
2
+ * iamKey v4.0.2
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */(function(b){typeof define=="function"&&define.amd?define(b):b()})(function(){"use strict";const b=t=>(t.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&t.classList.add("ie"),null),w=t=>{const a=function(e){const o=document.querySelector(`label[for="${e.replace("#","")}"]`),i=document.querySelector(e+" summary"),r=document.querySelector(`dialog${e}`);o instanceof HTMLElement?o.click():i instanceof HTMLElement?i.click():r instanceof HTMLElement&&r.showModal()};return location.hash&&a(location.hash),window.addEventListener("hashchange",function(){a(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state.type&&e.state.type=="pagination"){let o=document.querySelector(`#${e.state.form}`),i=document.querySelector(`#${e.state.form} [data-pagination]`);i?i.value=e.state.page:o.innerHTML+=`<input name="page" type="hidden" data-pagination="true" value="${e.state.page}" />`,o.dispatchEvent(new Event("submit"))}}),null};class v{constructor(a){document.body.classList.contains("youtubeLoaded")?a.addEventListener("click",function(e){for(var o=e.target;o&&o!=this;o=o.parentNode)if(o.matches("a")){e.preventDefault(),p(o);break}},!1):this.loadScripts(a,this.createEmbed)}loadScripts(a){return new Promise((e,o)=>{const i=new Image;i.onload=function(){var r=document.createElement("script");r.src="https://www.youtube.com/iframe_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(r,s),document.body.classList.add("youtubeLoaded"),e(!0),r.onload=()=>{a.addEventListener("click",function(l){console.log("click"),l&&l.target instanceof HTMLElement&&l.target.closest("a")&&(l.preventDefault(),p(l.target.closest("a")))},!1)}},i.onerror=function(){o(!1)},i.src="https://youtube.com/favicon.ico"})}}const p=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=t.getAttribute("data-id"),e=t.getAttribute("id");if(typeof e>"u"||e==null){var o=String.fromCharCode(65+Math.floor(Math.random()*26));e=o+Date.now(),t.setAttribute("id",e)}function i(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:r,onStateChange:l}})}i();function r(n){n.target.playVideo()}var s=!1;function l(n){if(n.data==YT.PlayerState.PLAYING&&!s){var c=document.getElementById(e);c.classList.add("player-ready"),s=!0}}},S=t=>(Array.from(t.querySelectorAll("dialog[open]")).forEach((a,e)=>{a.closest(".dialog__wrapper")||(a.removeAttribute("open"),a.showModal(),a.focus(),A(a))}),t.addEventListener("click",a=>{if(a.target.tagName=="IAM-ACTIONBAR")return!1;if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-modal]")){const i=a.target.closest("[data-modal]"),r=i.hasAttribute("data-modal")?i.getAttribute("data-modal"):i.getAttribute("data-filter"),s=document.querySelector(`dialog#${r}`);A(s),s.showModal(),s.focus();let l=s.offsetWidth;s.setAttribute("style",`max-width: ${l}px;`),Array.from(s.querySelectorAll("[data-duplicate]")).forEach((n,c)=>{const d=n.getAttribute("data-duplicate"),u=document.getElementById(d);if(n.checked!=u.checked){n.checked=u.checked;let f=new Event("change");n.dispatchEvent(f)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(a&&a.target instanceof HTMLElement&&a.target.closest("button.dialog__close")){const i=a.target.closest("dialog[open]");a.preventDefault(),i.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((r,s)=>{r.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest('button[formmethod="dialog"]')){const i=a.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((r,s)=>{r.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest("dialog[open]")){let i=a.target.closest("dialog[open]");var e=window.getComputedStyle(i);if(e.display==="contents"&&(i=i.parentNode.closest("dialog[open]")),!i.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||i.classList.contains("dialog--multi")){const r=i.getBoundingClientRect();(a.clientX<r.left||a.clientX>r.right||a.clientY<r.top||a.clientY>r.bottom)&&(a.target.closest('input[type="radio"]')||i.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")}))}}if(a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__wrapper > button")){a.stopPropagation();let i=a.target.closest(".dialog__wrapper > button"),r=a.target.closest(".dialog__wrapper > button").parentNode,s="openPopover",l=r.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=l&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,f)=>{u.classList.remove("active")}),l.hasAttribute("open"))l.close(),s="closePopover",l.removeAttribute("style"),i.classList.remove("active");else{l.show(),i.classList.add("active");var o=i.getBoundingClientRect();let u=o.top,f=o.left;if(i.closest("iam-table")){let m=i.closest("iam-table").parentNode.getBoundingClientRect();u-=m.top,f-=m.left}l.classList.contains("dialog--fix")&&l.setAttribute("style",`position:fixed;top: ${u}px; left: ${f}px; margin: 3rem 0 0 0;`)}let n=l.getBoundingClientRect(),c=n.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(c>d){let u=l.hasAttribute("style")?l.getAttribute("style")+" ":"";l.setAttribute("style",u+"transform: translate(0, calc(-100% - 4rem))"),n=l.getBoundingClientRect(),n.top-window.scrollY<100&&l.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:s,id:i.textContent})}a&&a.target instanceof HTMLElement&&!a.target.closest("dialog[open]")&&!a.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((i,r)=>{i.classList.remove("active")}))}),null),A=t=>{t.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!t.classList.contains("dialog--multi")&&t.addEventListener("cancel",e=>{e.preventDefault()});let a=t.querySelector(".youtube-embed a");if(a&&p(a),t.classList.contains("dialog--multi")&&!t.querySelector(":scope > .steps")&&q(t),!t.querySelector(":scope > .mh-lg")&&!t.classList.contains("dialog--multi")){t.innerHTML=`<div class="mh-lg">${t.innerHTML}</div>`;let e=t.querySelector(".mh-lg"),o=t.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(o){let i=o.previousSibling;e.before(o),i&&o.before(i)}}t.querySelector(":scope > button:first-child")||t.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},q=t=>{let a="",e=Array.from(t.querySelectorAll("fieldset[data-title]")),o=t.querySelector("form");e.forEach((s,l)=>{a+=`<button data-title="${s.getAttribute("data-title")}" type="button" class="${l==0?"active":""}" tabindex="-1">${s.getAttribute("data-title")}</button>`;const n=document.createElement("div");if(n.classList.add("btn--wrapper"),s.appendChild(n),l!=0&&(n.innerHTML+=`<button data-title="${e[l-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),l!=e.length-1&&(n.innerHTML+=`<button data-title="${e[l+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),l==e.length-1)if(o&&o.querySelector(':scope > button[type="submit"]')){let c=o.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),n.insertAdjacentElement("beforeend",c)}else n.innerHTML+=`<button data-title="${e[l].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${a}</div>`);let i=Array.from(t.querySelectorAll("fieldset.was-validated"));for(let s=0;s<i.length;s++){let l=i[s],n=l.getAttribute("data-title");if(l.querySelector(".is-invalid")){Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((c,d)=>{c.classList.add("active")});break}else Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((c,d)=>{c.classList.add("valid")})}t.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function r(s){const l=t.querySelector("fieldset.active")?t.querySelector("fieldset.active"):t.querySelector("fieldset[data-title]"),n=l.getAttribute("data-title");let c=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((f,m)=>{f.checkValidity()||(c=!1)}),c?Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((f,m)=>{f.classList.add("valid")}):Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((f,m)=>{f.classList.remove("valid")}),c||!s.hasAttribute("data-next")){const f=t.querySelector(`fieldset[data-title="${s.getAttribute("data-title")}"]`),m=t.querySelector(`.steps button[data-title="${s.getAttribute("data-title")}"]`);Array.from(t.querySelectorAll("button")).forEach((g,O)=>{g.classList.remove("active")}),Array.from(t.querySelectorAll("fieldset")).forEach((g,O)=>{g.classList.remove("active")}),m.classList.add("active"),f.classList.add("active")}let d=Array.from(t.querySelectorAll("fieldset")).length,u=Array.from(t.querySelectorAll("fieldset.valid")).length;t.style.setProperty("--progress",`${u/(d-1)*100}%`)}t.addEventListener("keydown",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest("button")){const l=s.target.closest("button");s.keyCode==13&&l.getAttribute("type")!="submit"&&(s.preventDefault(),r(l))}s&&s.target instanceof HTMLElement&&s.target.closest("input")&&(s.target.closest("input").classList.remove("is-invalid"),s.keyCode==13&&s.preventDefault())}),t.addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest('button[type="submit"]'))s.target.closest("form").classList.add("was-validated");else if(s&&s.target instanceof HTMLElement&&s.target.closest("button[data-title]")){const l=s.target.closest("button[data-title]");r(l)}return null})};function E(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",t=>{const a=t.target.closest("[open] summary");if(a)window.dataLayer.push({event:"closeDetails",detailsTitle:a.textContent||""});else{const e=t.target.closest("summary"),o=t.target.closest("a"),i=t.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),o&&window.dataLayer.push({event:"linkClicked",linkText:o.hasAttribute("title")?o.getAttribute("title")||"":o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||"",href:o.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}const x=t=>{document.addEventListener("load",function(){console.log(Array.from(document.querySelectorAll("input[maxlength]"))),Array.from(document.querySelectorAll("input")).forEach((a,e)=>{a.parentElement,T(a)})}),t.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){const e=a.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}}),t.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){const e=a.target.closest("select");if(console.log(e),e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){const o=document.getElementById(e.getAttribute("data-input")),i=e.value;L(o,i)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){const e=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(e.querySelectorAll('[type="radio"][autofocus]')).forEach((o,i)=>{o.removeAttribute("autofocus")}),Array.from(e.querySelectorAll('[type="radio"]:checked')).forEach((o,i)=>{o.setAttribute("autofocus",!0)})}}),t.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-type][data-input]:not(select)")){const e=a.target.closest("[data-change-type]"),o=document.getElementById(e.getAttribute("data-input")),i=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",o.getAttribute("type")),L(o,i),e.hasAttribute("data-alt-class")){const r=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",r)}}})},T=t=>{let a=t.parentElement,e=t.getAttribute("maxlength");a.style.setProperty("--maxlength",e);let o=t.nextElementSibling;(!o||o&&o.classList.contains("invalid-feedback"))&&(o=document.createElement("span"),a.insertBefore(o,t.nextSibling)),o.setAttribute("data-count",t.value.length)},L=(t,a)=>{t.setAttribute("type",a)},_=t=>{Array.from(t.querySelectorAll("details")).forEach((a,e)=>{a.addEventListener("mouseenter",function(o){window.matchMedia("(min-width: 62em)").matches&&a.setAttribute("open","true")},!1),a.addEventListener("mouseleave",function(o){window.matchMedia("(min-width: 62em)").matches&&a.removeAttribute("open")},!1)}),"IntersectionObserver"in window&&new IntersectionObserver(([e])=>e.target.classList.toggle("is-stuck",e.intersectionRatio<1),{threshold:[1]}).observe(t)};function M(t){var a;const e=t.querySelector(".testimonial__images"),o=e.querySelectorAll("img").length;if(o==1)return!1;t.classList.add("testimonial--multi");const i=function(r){const s=t.querySelector(".btn-next"),l=t.querySelector(".btn-prev");s.setAttribute("data-go",r+1),l.setAttribute("data-go",r-1),s.removeAttribute("disabled"),l.removeAttribute("disabled"),r==1?l.setAttribute("disabled",!0):r==o&&s.setAttribute("disabled",!0)};e.addEventListener("scroll",function(r){clearTimeout(a),a=setTimeout(function(){let s=e.scrollWidth,l=e.scrollHeight,n=e.scrollLeft,c=e.scrollTop,d=Math.round(n/s*o)+1;n==0&&c!=0&&(d=Math.round(c/l*o)+1),t.setAttribute("data-show",d),i(d)},300)},!1),t.addEventListener("click",function(r){for(var s=r.target;s&&s!=this;s=s.parentNode)if(s.matches("[data-go]")){let l=parseInt(s.getAttribute("data-go")),n=0,c=0,d=e.scrollWidth,u=e.scrollHeight;d>u?c=Math.floor(d*((l-1)/o)):n=Math.floor(u*((l-1)/o)),e.scroll({top:n,left:c,behavior:"smooth"});break}},!1)}function k(t){var a;let e=t.querySelector(".carousel__inner"),o=t.querySelectorAll(".carousel__item").length;t.getAttribute("data-cols");let i=t.getAttribute("data-sm-cols"),r=t.getAttribute("data-md-cols");t.querySelector(".carousel__controls a").classList.add("active"),e.addEventListener("scroll",function(s){clearTimeout(a),a=setTimeout(function(){let l=e.clientWidth,n=e.scrollWidth,c=e.scrollLeft,d=Math.round(c/n*o)+1,u=t.querySelector(".carousel__item:last-child").offsetLeft;Array.from(t.querySelectorAll(".carousel__controls a")).forEach((f,m)=>{f.classList.remove("active")}),t.querySelector(".control-"+d).classList.add("active"),d==1?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+l>u?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),t.addEventListener("click",function(s){for(var l=s.target;l&&l!=this;l=l.parentNode)if(l.matches(".carousel__controls a")){s.preventDefault(),Array.from(t.querySelectorAll(".carousel__controls a")).forEach((c,d)=>{c.classList.remove("active")}),l.classList.add("active");const n=document.querySelector(l.getAttribute("href"));e.scroll({top:0,left:n.offsetLeft,behavior:"smooth"});break}},!1),t.addEventListener("click",function(s){for(var l=s.target;l&&l!=this;l=l.parentNode)if(l.matches(".btn-next, .btn-prev")){s.preventDefault();let n=l.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:n,behavior:"smooth"});break}},!1),o==1&&t.classList.add("hide-btns"),i>=o&&t.classList.add("hide-sm-btns"),r>=o&&t.classList.add("hide-md-btns")}function $(t){t.addEventListener("change",function(a){var e=parseInt(t.querySelector("[data-min] select,[data-min] input").value),o=parseInt(t.querySelector("[data-max] select,[data-max] input").value);Array.from(t.querySelectorAll("[data-min] input")).forEach((i,r)=>{i.setAttribute("max",o)}),Array.from(t.querySelectorAll("[data-max] input")).forEach((i,r)=>{i.setAttribute("min",e)}),Array.from(t.querySelectorAll("[data-min] select option")).forEach((i,r)=>{parseInt(i.getAttribute("value"))>o?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(t.querySelectorAll("[data-max] select option")).forEach((i,r)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function C(t){t.addEventListener("change",function(a){if(t.matches("[data-value-if]")){const e=t.getAttribute("data-redirect"),o=t.getAttribute("data-value-if");t.value==o&&(document.location.href=e)}else typeof t.value<"u"&&(document.location.href=t.value)},!1)}function H(t){const e=t.querySelector(".row").cloneNode(!0),o=t.querySelector("[data-add]");t.addEventListener("click",function(i){for(var r=i.target;r&&r!=this;r=r.parentNode){if(r.matches("[data-add]")){const s=e.cloneNode(!0);t.insertBefore(s,r),o.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length>=o.dataset.maxfiles&&o.setAttribute("disabled","disabled");break}if(r.matches("[data-delete]")){r.closest(".row").remove(),o.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length<o.dataset.maxfiles&&o.removeAttribute("disabled");break}}},!1)}function I(t){Array.from(t.querySelectorAll("[data-input-range]")).forEach((a,e)=>{$(a)}),Array.from(t.querySelectorAll("[data-redirect]")).forEach((a,e)=>{C(a)}),Array.from(t.querySelectorAll(".multiple-file-uploads")).forEach((a,e)=>{H(a)}),t.addEventListener("change",function(a){for(var e=a.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){const o=e.dataset.filesize;e.files[0].size>o&&(e.value="",alert("File too large"));break}},!1),t.addEventListener("change",function(a){Array.from(t.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,o)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${r}"],input[data-id="${r}"]`).value==s?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(t.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,o)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${r}"],input[data-id="${r}"]`).value==s?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}function D(t){if(t.hasAttribute("data-type")&&t.getAttribute("data-type")=="toast"){let e=document.querySelector(".notification__holder");e||(e=document.createElement("div"),e.classList.add("notification__holder"),e.classList.add("container"),document.querySelector("body").appendChild(e)),t.closest(".notification__holder")||e.appendChild(t)}if(t.setAttribute("role","alert"),t.addEventListener("click",function(e){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(e.preventDefault(),y(t))},!1),t.hasAttribute("data-timeout")){let e=t.getAttribute("data-timeout");var a=new B(function(){y(t)},e);t.addEventListener("mouseenter",o=>{a.pause()}),t.addEventListener("mouseleave",o=>{a.resume()})}}function B(t,a){var e,o,i=a;this.pause=function(){window.clearTimeout(e),i-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(e),e=window.setTimeout(t,i)},this.resume()}const y=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class N extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=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"):`${a}/css/core.min.css`,o=`@import "${a}/css/components/notification.css";`,i=this.querySelectorAll("a,button");Array.from(i).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(i.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const r=document.createElement("template");r.innerHTML=`
5
5
  <style>
@@ -1,6 +1,7 @@
1
1
  // @ts-nocheck
2
2
  function createAppliedFilters(container, filters) {
3
3
  function addFilterButton(filters, input) {
4
+ console.log('hey');
4
5
  let shouldRemoveFilter = false;
5
6
  let inputName = input.getAttribute('name');
6
7
  if (inputName.includes('[]'))
@@ -66,10 +67,11 @@ function createAppliedFilters(container, filters) {
66
67
  Array.from(container.querySelectorAll('input[type="checkbox"]:checked')).forEach((input, index) => {
67
68
  addFilterButton(filters, input);
68
69
  });
69
- Array.from(container.querySelectorAll('input[data-filter-text]')).forEach((input, index) => {
70
- input.addEventListener('change', function (event) {
70
+ container.addEventListener('change', function (event) {
71
+ if (event && event.target instanceof HTMLElement && event.target.closest('input[data-filter-text]')) {
72
+ let input = event.target.closest('input[data-filter-text]');
71
73
  addFilterButton(filters, input);
72
- });
74
+ }
73
75
  });
74
76
  filters.addEventListener('click', function (event) {
75
77
  if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {