@iamproperty/components 5.3.0-beta2 → 5.3.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.
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +1 -1
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/dist/components.es.js +825 -1335
- package/dist/components.umd.js +134 -148
- package/package.json +1 -1
- package/src/components/Card/Card.vue +1 -1
- package/src/components/Table/Table.vue +17 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/function n(e){let r=e.querySelectorAll("details"),a=e.querySelectorAll("summary");if(r.forEach(o=>{o.classList.add("accordion-item")}),a.forEach(o=>{o.classList.add("accordion-header"),o.classList.add("accordion-button"),o.classList.add("h4")}),!e.classList.contains("accordion--keep-open")){const o=e.querySelectorAll(":scope > details");o.forEach(c=>{c.addEventListener("click",()=>{o.forEach(t=>{t!==c&&t.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const r=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"):`${r}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/const A=function(i){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=i.getAttribute("data-id"),d=i.getAttribute("id");if(typeof d>"u"||d==null){var n=String.fromCharCode(65+Math.floor(Math.random()*26));d=n+Date.now(),i.setAttribute("id",d)}function o(){window.player=new YT.Player(d,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:u,onStateChange:e}})}o();function u(r){r.target.playVideo()}var t=!1;function e(r){if(r.data==YT.PlayerState.PLAYING&&!t){var s=document.getElementById(d);s.classList.add("player-ready"),t=!0}}},L=i=>(Array.from(i.querySelectorAll("dialog[open]")).forEach((a,d)=>{a.closest(".dialog__wrapper")||(a.removeAttribute("open"),a.showModal(),a.focus(),w(a))}),i.addEventListener("click",a=>{if(a.target.tagName=="IAM-ACTIONBAR")return!1;if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-modal]")){const o=a.target.closest("[data-modal]"),u=o.hasAttribute("data-modal")?o.getAttribute("data-modal"):o.getAttribute("data-filter"),t=document.querySelector(`dialog#${u}`);w(t),t.showModal(),t.focus();let e=t.offsetWidth;t.setAttribute("style",`max-width: ${e}px;`),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((r,s)=>{const b=r.getAttribute("data-duplicate"),c=document.getElementById(b);if(r.checked!=c.checked){r.checked=c.checked;let l=new Event("change");r.dispatchEvent(l)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:u})}if(a&&a.target instanceof HTMLElement&&a.target.closest("button.dialog__close")){const o=a.target.closest("dialog[open]");a.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,t)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest('button[formmethod="dialog"]')){const o=a.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,t)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest("dialog[open]")){let o=a.target.closest("dialog[open]");var d=window.getComputedStyle(o);if(d.display==="contents"&&(o=o.parentNode.closest("dialog[open]")),!o.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||o.classList.contains("dialog--multi")){const u=o.getBoundingClientRect();(a.clientX<u.left||a.clientX>u.right||a.clientY<u.top||a.clientY>u.bottom)&&(a.target.closest('input[type="radio"]')||o.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")}))}}if(a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__wrapper > button")){a.stopPropagation();let o=a.target.closest(".dialog__wrapper > button"),u=a.target.closest(".dialog__wrapper > button").parentNode,t="openPopover",e=u.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=e&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((c,l)=>{c.removeAttribute("aria-expanded")}),e.hasAttribute("open"))e.close(),t="closePopover",e.removeAttribute("style"),o.removeAttribute("aria-expanded");else{e.show(),o.setAttribute("aria-expanded",!0);var n=o.getBoundingClientRect();let c=n.top,l=n.left;if(o.closest("iam-table")){let h=o.closest("iam-table").parentNode.getBoundingClientRect();c-=h.top,l-=h.left}e.classList.contains("dialog--fix")&&e.setAttribute("style",`position:fixed;top: ${c}px; left: ${l}px; margin: 3rem 0 0 0;`)}let r=e.getBoundingClientRect(),s=r.bottom-window.scrollY,b=window.innerHeight-window.scrollY;if(s>b){let c=e.hasAttribute("style")?e.getAttribute("style")+" ":"";e.setAttribute("style",c+"transform: translate(0, calc(-100% - 4rem))"),r=e.getBoundingClientRect(),r.top-window.scrollY<100&&e.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,id:o.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((o,u)=>{o.removeAttribute("aria-expanded")}))}),null),w=i=>{i.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!i.classList.contains("dialog--multi")&&i.addEventListener("cancel",d=>{d.preventDefault()});let a=i.querySelector(".youtube-embed a");if(a&&A(a),i.classList.contains("dialog--multi")&&!i.querySelector(":scope > .steps")&&_(i),!i.querySelector(":scope > .mh-lg")&&!i.classList.contains("dialog--multi")){i.innerHTML=`<div class="mh-lg">${i.innerHTML}</div>`;let d=i.querySelector(".mh-lg"),n=i.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(n){let o=n.previousSibling;d.before(n),o&&n.before(o)}}i.querySelector(":scope > button:first-child")||i.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},_=i=>{let a="",d=Array.from(i.querySelectorAll("fieldset[data-title]")),n=i.querySelector("form");d.forEach((t,e)=>{a+=`<button data-title="${t.getAttribute("data-title")}" type="button" class="${e==0?"active":""}" tabindex="-1">${t.getAttribute("data-title")}</button>`;const r=document.createElement("div");if(r.classList.add("btn--wrapper"),t.appendChild(r),e!=0&&(r.innerHTML+=`<button data-title="${d[e-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),e!=d.length-1&&(r.innerHTML+=`<button data-title="${d[e+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),e==d.length-1)if(n&&n.querySelector(':scope > button[type="submit"]')){let s=n.querySelector(':scope > button[type="submit"]');s.classList.add("mb-0"),r.insertAdjacentElement("beforeend",s)}else r.innerHTML+=`<button data-title="${d[e].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),i.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${a}</div>`);let o=Array.from(i.querySelectorAll("fieldset.was-validated"));for(let t=0;t<o.length;t++){let e=o[t],r=e.getAttribute("data-title");if(e.querySelector(".is-invalid")){Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((s,b)=>{s.classList.add("active")});break}else Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((s,b)=>{s.classList.add("valid")})}i.addEventListener("invalid",function(){return function(t){t.preventDefault()}}(),!0);function u(t){const e=i.querySelector("fieldset.active")?i.querySelector("fieldset.active"):i.querySelector("fieldset[data-title]"),r=e.getAttribute("data-title");let s=!0;if(e.classList.add("was-validated"),Array.from(e.querySelectorAll("input")).forEach((l,h)=>{l.checkValidity()||(s=!1)}),s?Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((l,h)=>{l.classList.add("valid")}):Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((l,h)=>{l.classList.remove("valid")}),s||!t.hasAttribute("data-next")){const l=i.querySelector(`fieldset[data-title="${t.getAttribute("data-title")}"]`),h=i.querySelector(`.steps button[data-title="${t.getAttribute("data-title")}"]`);Array.from(i.querySelectorAll("button")).forEach((g,m)=>{g.classList.remove("active")}),Array.from(i.querySelectorAll("fieldset")).forEach((g,m)=>{g.classList.remove("active")}),h.classList.add("active"),l.classList.add("active")}let b=Array.from(i.querySelectorAll("fieldset")).length,c=Array.from(i.querySelectorAll("fieldset.valid")).length;i.style.setProperty("--progress",`${c/(b-1)*100}%`)}i.addEventListener("keydown",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button")){const e=t.target.closest("button");t.keyCode==13&&e.getAttribute("type")!="submit"&&(t.preventDefault(),u(e))}t&&t.target instanceof HTMLElement&&t.target.closest("input")&&(t.target.closest("input").classList.remove("is-invalid"),t.keyCode==13&&t.preventDefault())}),i.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 e=t.target.closest("button[data-title]");u(e)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function v(i,a){i&&a=="all"?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!0,i.querySelector("label").textContent="Select all"):i&&a==0?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!1,i.querySelector("label").textContent="Select all"):i&&a?(i.querySelector("input").indeterminate=!0,i.querySelector("input").checked=!1,i.querySelector("label").textContent=`${a} item${a>1?"s":""} selected`):i&&(i.querySelector("input").checked=!1,i.querySelector("input").indeterminate=!1,i.querySelector("label").textContent="Select all")}class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",d=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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/import k from"js-cookie";var g=function(L,i,r,a){function m(c){return c instanceof r?c:new r(function(u){u(c)})}return new(r||(r=Promise))(function(c,u){function b(n){try{f(a.next(n))}catch(p){u(p)}}function v(n){try{f(a.throw(n))}catch(p){u(p)}}function f(n){n.done?c(n.value):m(n.value).then(b,v)}f((a=a.apply(L,i||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class $ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=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"):`${i}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/function h(d,m){function u(e,t){let l=!1,r=t.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${t.value}]`));let i=e.querySelector(`[data-name="${r}"]`);i&&t.getAttribute("type")=="checkbox"&&(l=!t.checked);let o=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=o.replace("$value",t.value),(!t.value||l)&&i.remove(),t.parentNode.closest("[data-filter-text]")){let p=t.parentNode.closest("[data-filter-text]"),f=!0;if(r="",p.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 f=!1}),e.querySelector(`[data-name="${r}"]`)&&e.querySelector(`[data-name="${r}"]`).remove(),f){let a=p.getAttribute("data-filter-text");p.querySelectorAll("input").forEach((s,c)=>{let b=s.getAttribute("name");e.querySelector(`[data-name="${b}"]`)&&e.querySelector(`[data-name="${b}"]`).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(d.querySelectorAll('input[type="checkbox"]:checked')).forEach((e,t)=>{u(m,e)}),Array.from(d.querySelectorAll("input[data-filter-text]")).forEach((e,t)=>{e.addEventListener("change",function(l){u(m,e),l.stopPropagation()})}),d.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]");u(m,t)}}),m.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 o=i[t],p=`[name="${o}"]`;o.match(/\[(.*)\]/)&&(o.replace(/\[(.*)\]/,"[]"),p=`[value="${o.replace(/.*\[(.*)\]/,"$1")}"]`);let f=d.querySelectorAll(p);for(var l=0;l<f.length;l++){let a=f[l];if(a.getAttribute("type")!="radio"&&a.getAttribute("type")!="checkbox")a.value="";else{a.checked=!1;var e=new Event("force");d.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 m=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"):`${m}/css/core.min.css`;let e=this.classList.toString();const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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",o=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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/function h(c,o){const r=o.querySelector(".files"),l=o.querySelector(".drop-area"),t=c.querySelector("input"),u=c.hasAttribute("data-maxsize")?c.getAttribute("data-maxsize"):0,a=t.cloneNode();l.append(a),o.addEventListener("click",e=>{e&&e.target instanceof HTMLElement&&e.target.closest(".btn-primary")&&(e.target.closest(".btn-primary"),(t.hasAttribute("multiple")?a:t).click())}),o.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest(".files button")){const i=new DataTransfer,{files:d}=t,p=e.target.closest(".files button");for(let n=0;n<d.length;n++){const s=d[n];s.name!=p.getAttribute("data-file")&&i.items.add(s)}t.files=i.files;const m=new Event("change");t.dispatchEvent(m)}}),a.addEventListener("change",e=>{if(t.hasAttribute("multiple")){const d=[...t.files,...a.files];let p=[];const m=new DataTransfer;for(let n=0;n<d.length;n++){const s=d[n],f=s.size/1e3;!p.includes(s.name)&&(u==0||f<u)&&m.items.add(s),p.push(s.name)}t.files=m.files}else t.files=a.files;const i=new Event("change");t.dispatchEvent(i)}),a.addEventListener("dragenter",e=>{a.classList.add("focus")}),a.addEventListener("dragleave",e=>{a.classList.remove("focus")}),a.addEventListener("drop",e=>{a.classList.remove("focus")}),t.addEventListener("change",e=>{r.innerHTML="";for(const i of t.files)r.innerHTML+=`<span class="file">${i.name} <button data-file="${i.name}">Remove</button></span>`})}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class b extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=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"):`${o}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class p extends HTMLElement{constructor(){super();const c=this.attachShadow({mode:"open"}),n=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"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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(),a(i))},!1),i.hasAttribute("data-timeout")){let t=i.getAttribute("data-timeout");var n=new c(function(){a(i)},t);i.addEventListener("mouseenter",o=>{n.pause()}),i.addEventListener("mouseleave",o=>{n.resume()})}}function c(i,n){var t,o,e=n;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 a=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 n=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"):`${n}/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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/import k from"js-cookie";const q=e=>e.replace(/ /g,"_"),C=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(c){return c instanceof a?c:new a(function(n){n(c)})}return new(a||(a=Promise))(function(c,n){function v(r){try{u(o.next(r))}catch(i){n(i)}}function t(r){try{u(o.throw(r))}catch(i){n(i)}}function u(r){r.done?c(r.value):d(r.value).then(v,t)}u((o=o.apply(e,s||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class R 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 v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/const B=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},Q=(a,e)=>String(a).padStart(e,"0"),X=a=>a.charAt(0).toUpperCase()+a.slice(1),k=(a,e,o)=>e.split(/[\.\[\]\'\"]/).filter(i=>i).reduce((i,b)=>i?i[b]:o,a);var Y=function(a,e,o,i){function b(d){return d instanceof o?d:new o(function(r){r(d)})}return new(o||(o=Promise))(function(d,r){function n(c){try{t(i.next(c))}catch(h){r(h)}}function l(c){try{t(i.throw(c))}catch(h){r(h)}}function t(c){c.done?d(c.value):b(c.value).then(n,l)}t((i=i.apply(a,e||[])).next())})};const R=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((i,b)=>{const d=Array.from(i.querySelectorAll("th, td")),r=["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"];d.forEach((n,l)=>{const t=e[l];if(typeof t<"u"){let c=document.createElement("div");c.innerHTML=t.innerHTML;let h=c.textContent||c.innerText||"";n.setAttribute("data-label",h),t.hasAttribute("data-td-class")&&n.setAttribute("class",t.getAttribute("data-td-class")),t.hasAttribute("data-format")&&(n.setAttribute("data-format",t.getAttribute("data-format")),n.innerHTML=M(t.getAttribute("data-format"),n.textContent.trim())),r.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},J=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((o,i)=>{let b=window.getComputedStyle(document.querySelector("html")),d=o.querySelector(":scope > *:last-child > *:first-child");if(d){d.classList.add("text-nowrap");let r=d.offsetWidth/parseFloat(b.fontSize);r+=1.7,e=e>r?e:r}}),e},G=(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((o,i)=>{a.querySelectorAll("thead tr th.expand-button-heading").length||o.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((o,i)=>{const b=o.getAttribute("data-view")==="full"?"aria-expanded":"";o.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${b}>Expand</button></td>`)})},K=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let o=e.target.closest("[data-expand-button]"),i=o.closest("tr");o.toggleAttribute("aria-expanded"),i.getAttribute("data-view")=="full"?i.setAttribute("data-view","default"):i.setAttribute("data-view","full"),o.blur()}})},N=(a,e)=>{let o=e.querySelector("[data-search]");if(!o)return!1;const i=o.getAttribute("id"),b=o.getAttribute("data-search").split(",");let d=o.parentNode,r={};b.forEach((n,l)=>{Array.from(a.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((t,c)=>{t.querySelector(".td__content")?r[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:r[t.textContent]=t.textContent})}),o.setAttribute("list",`${i}_list`),o.setAttribute("autocomplete","off"),d.querySelector("datalist")||(d.innerHTML+=`<datalist id="${i}_list"></datalist>`),d.querySelector("datalist").innerHTML=`${Object.keys(r).map(n=>`<option value="${n}"></option>`).join("")}`},V=(a,e,o,i,b)=>{var d;let r=function(t,c=!1){if(e.classList.contains("processing"))return!1;if(t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((h,u)=>{const m=h.getAttribute("data-duplicate"),s=document.getElementById(m),g=document.querySelector(`[for="${m}"] iam-card`);if(s.checked!=h.checked)if(g){let x=new Event("click");g.dispatchEvent(x)}else s.checked=h.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!c){let h=e.querySelector("[data-pagination]");h.value=1,i.setAttribute("data-page",1)}z(a,e,o,i)}else e.hasAttribute("data-submit")?e.submit():(C(a,e,i),_(a,e));if(e.hasAttribute("data-ajax-post")){let h=new FormData(e),u=new URLSearchParams(h).toString();const m=new XMLHttpRequest;m.open("GET",`${window.location.href}?ajax=true&${u}`),m.send()}};e.addEventListener("keyup",t=>{clearTimeout(d),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&(d=setTimeout(function(){r(t)},500))}),e.addEventListener("change",t=>{clearTimeout(d),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||O(a,e,b),r(t)),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(C(a,e,i),_(a,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"))&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&r(t)}),e.addEventListener("click",t=>{if(clearTimeout(d),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((h,u)=>{h.innerHTML=""});let c=e.elements;for(let h=0;h<c.length;h++)switch(c[h].type.toLowerCase()?c[h].type.toLowerCase():"text"){case"text":case"password":case"textarea":c[h].value="";break;case"radio":case"checkbox":if(c[h].checked){let m=c[h],s=m.getAttribute("id"),g=document.querySelector(`[for="${s}"`);if(g.querySelector("iam-card")){let x=g.querySelector("iam-card"),S=new Event("click");x.dispatchEvent(S)}m.checked=!1}break;case"select-one":case"select-multi":c[h].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||O(a,e,b),r(t)}}),e.addEventListener("submit",t=>{clearTimeout(d),e.hasAttribute("data-submit")||t.preventDefault(),r(t)}),e.addEventListener("force",t=>{r(t)}),e.addEventListener("paginate",t=>{r(t,!0)});let n=[],l=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,c)=>{let h=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${h}"]`)).forEach((u,m)=>{let s=u.closest("form");n.includes(s)||n.push(s),l.includes(h)||l.push(h)})}),n.forEach((t,c)=>{const h=function(){let u=[],m=new FormData(t);for(const[s,g]of m)document.querySelector(`[data-mimic="${s}"]`)&&!u.includes(s)?(u.push(s),document.querySelector(`[data-mimic="${s}"]`).value=g):document.querySelector(`[data-mimic="${s}"]`)&&(document.querySelector(`[data-mimic="${s}"]`).value+=","+g);for(const s of u){const g=new Event("force");e.dispatchEvent(g)}for(const s of l)if(!m.has(s)&&t.querySelector(`[name="${s}"]`)){document.querySelector(`[data-mimic="${s}"]`).value="";const g=new Event("force");e.dispatchEvent(g)}};t.addEventListener("force",u=>{h()}),t.addEventListener("change",u=>{h()})})},O=(a,e,o)=>{if(e.getAttribute("data-ajax"))return!1;let i=a.querySelector("tbody"),b=e.querySelector("[data-sort]"),d=b.querySelector(`option:nth-child(${b.selectedIndex+1})`),r=d.getAttribute("data-sort"),n=d.getAttribute("data-order"),l=d.getAttribute("data-format");if(!r)return i.innerHTML=o.innerHTML,R(a),!1;let t=[];["asc","desc","descending"].includes(n)||(t=n.split(","));let c=[];Array.from(i.querySelectorAll("tr")).forEach((u,m)=>{let s=u.querySelector('td[data-label="'+r+'"], th[data-label="'+r+'"]').textContent.trim();u.querySelector('[data-label="'+r+'"] .td__content')&&(s=u.querySelector('[data-label="'+r+'"] .td__content').textContent.trim()),t.length&&t.includes(s)&&(s=t.indexOf(s)),B(s)&&(s=Q(s,10)),l&&l=="date"&&(s=new Date(s));const g={index:s,row:u};c.push(g)}),c.sort((u,m)=>u.index>m.index?1:-1),(n=="descending"||n=="desc")&&(c=c.reverse());let h="";c.forEach((u,m)=>{h+=u.row.outerHTML}),i.innerHTML=h},C=(a,e,o)=>{a.classList.remove("table--filtered");let i=P(e),b=[],d=0,r=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,n=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((t,c)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")}),e.querySelector("[data-search]")){let t=e.querySelector("[data-search]");e.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((h,u)=>{b.push({column:`${h.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,c)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let l=0;Object.values(i).forEach((t,c)=>{typeof t=="object"&&Object.values(t).length?l+=Object.values(t).length:l++}),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,c)=>{t.innerHTML+=`(${l})`,t.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[t,c]of Object.entries(i))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((h,u)=>{let m=!1;c.forEach((s,g)=>{let x=h.querySelector(`[data-label="${t}"]`);if(s&&s=="$today")s=M("date",new Date);else if(s&&s=="$yesterday"){let f=new Date;f.setDate(f.getDate()-1),s=M("date",f)}else if(s&&(s=="$thisWeek"||s=="$lastWeek")){let f=new Date,y=new Date(f.setDate(f.getDate()-(f.getDay()-1))),p=new Date(f.setDate(f.getDate()-f.getDay()+7)),w=new Date(x.textContent.toLowerCase());if(f.setHours(0,0,0,0),y.setHours(0,0,0,0),p.setHours(0,0,0,0),w.setHours(0,0,0,0),s=="$thisWeek")m=w>=y&&w<=p;else{let A=new Date(y.setDate(y.getDate()-7)),L=new Date(p.setDate(p.getDate()-7));A.setHours(0,0,0,0),L.setHours(0,0,0,0),m=w>=A&&w<=L}}else if(s&&s=="$thisMonth"){let f=new Date,y=f.getFullYear(),p=f.getMonth();var S=new Date(y,p,1),q=new Date(y,p+1,0);let w=new Date(x.textContent.toLowerCase());S.setHours(0,0,0,0),q.setHours(0,0,0,0),w.setHours(0,0,0,0),m=w>=S&&w<=q}else if(s&&s=="$lastMonth"){let f=new Date,y=f.getFullYear(),p=f.getMonth();var E=new Date(y,p-1,1),v=new Date(y,p,0);let w=new Date(x.textContent.toLowerCase());E.setHours(0,0,0,0),v.setHours(0,0,0,0),w.setHours(0,0,0,0),m=w>=E&&w<=v}x&&x.textContent.toLowerCase().includes(s.toLowerCase())&&(m=!0)}),m||(h.classList.add("filtered"),h.setAttribute("data-filtered-by",t))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,c)=>{let h=!(b.length>0&&b[0].value.length>=3);b.forEach((u,m)=>{let s=t.querySelector(`[data-label="${u.column}"]`);s&&u.value.length>=3&&s.textContent.toLowerCase().includes(u.value.toLowerCase())&&(h=!0)}),h||t.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((t,c)=>{d++,t.classList.add("filtered--matched"),Math.ceil(d/n)==parseInt(r)&&t.classList.add("filtered--show")}),o&&(o.setAttribute("data-total",d),o.setAttribute("data-show",n),o.setAttribute("data-page",r))},_=(a,e,o)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((b,d)=>{let r=b.getAttribute("data-query"),n=0;if(r=="total")o.hasAttribute("data-total")?n=o.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!r.includes(" == ")&&r.includes(" & ")){let l=r.split(" & "),t="";l.forEach(c=>{t+=`:not([data-filtered-by="${c}"])`}),n=Array.from(a.querySelectorAll(`tbody tr${t}`)).length}else if(!r.includes(" == "))n=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${r}"])`)).length;else if(r.includes(" && ")){let l=r.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let c=!0;for(const[h,u]of Object.entries(l)){let m=u.split(" == ");(!t.querySelector(`td[data-label="${m[0]}"]`)||t.querySelector(`td[data-label="${m[0]}"]`).textContent!=`${m[1]}`)&&(c=!1)}return c}).length}else{let l=r.split(" == ");n=Array.from(a.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}b.hasAttribute("data-total")?b.setAttribute("data-total",n):b.innerHTML=n})},Z=function(a,e,o,i){o.addEventListener("update-page",b=>{let d=e.querySelector("[data-pagination]"),r=b.detail.page;if(d.value=r,e.dispatchEvent(new Event("paginate")),i.setAttribute("data-page",r),a.hasAttribute("data-show-history")){const n=new URL(location);n.searchParams.set("page",r),history.pushState({type:"pagination",form:e.getAttribute("id"),page:r},"",n)}if(!i.hasAttribute("data-no-scroll")){const l=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}),o.addEventListener("update-show",b=>{let d=e.querySelector("[data-show]"),r=b.detail.show;d.value=r,i.setAttribute("data-show",r),e.dispatchEvent(new Event("submit"))})},tt=(a,e)=>{if(!a)return!1;a.addEventListener("click",o=>{et(e)})},et=function(a){for(var e=[],o=a.getElementsByTagName("tr"),i=0;i<o.length;i++){for(var b=o[i].querySelectorAll("td,th"),d=[],r=0;r<b.length;r++)d.push(`"${b[r].textContent}"`);e.push(d.join(","))}e=e.join(`
|
|
5
5
|
`);let n=new Blob([e],{type:"text/csv"});var l=document.createElement("a");l.download="export.csv";var t=window.URL.createObjectURL(n);l.href=t,l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)},I=function(a,e,o,i){if(R(a),G(a,i),_(a,e,i),i&&i.classList.contains("table--cta")){let d=function(){Array.from(a.querySelectorAll("tr")).forEach((r,n)=>{let l=r.offsetHeight;r.style.setProperty("--row-height",`${l}px`)})};const b=J(a);i.style.setProperty("--cta-width",`${b}rem`),new ResizeObserver(d).observe(a)}},P=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((i,b)=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){let d=i.getAttribute("data-filter");e[d]||(e[d]=new Array),e[d].push(i.value)}}),e},z=function(a,e,o,i){return Y(this,void 0,void 0,function*(){let b=new FormData(e),d=new URLSearchParams(b).toString(),r=a.querySelectorAll("thead tr th:not(.expand-button-heading)"),n=a.querySelector("tbody"),l=e.getAttribute("data-ajax");i.classList.add("table--loading");let t=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,m)=>{u.innerHTML="",u.parentNode.classList.remove("hover")});let c=0;Object.values(t).forEach((u,m)=>{typeof u=="object"&&Object.values(u).length?c+=Object.values(u).length:c++}),c&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,m)=>{u.innerHTML+=`(${c})`,u.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;const{signal:h}=controller[l];o.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(l+"?"+d,{signal:h,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(u=>u.json()).then(u=>{let m=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",s=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",g=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",x=k(u,s,15),S=k(u,g,1),q=k(u,m),E=i.hasAttribute("data-empty-msg")?i.getAttribute("data-empty-msg"):"No results found";q?(n.innerHTML="",q.forEach((v,f)=>{var y=document.createElement("tr");r.forEach((p,w)=>{let A="";var L=document.createElement("td");if(L.setAttribute("data-label",p.innerText),p.getAttribute("data-output")){var $=p.getAttribute("data-output");A=$.replace(new RegExp(/{(.*?)}/,"gm"),function(D){return k(v,D.replace("{","").replace("}",""))})}if(p.hasAttribute("data-output-array")){var $=p.getAttribute("data-output");let F=k(v,$.replace("{","").replace("}",""));A="",F.forEach((j,it)=>{let W=p.getAttribute("data-output-array"),T="";if(p.hasAttribute("data-output-array-property")&&p.hasAttribute("data-output-array-transform")){const H=k(j,p.getAttribute("data-output-array-property")),U=JSON.parse(p.getAttribute("data-output-array-transform"))[H];T=W.replace(`{${p.getAttribute("data-output-array-property")}}`,U)}T=T.replace(new RegExp(/{(.*?)}/,"gm"),function(H){return k(j,H.replace("{","").replace("}",""))}),A+=T})}p.hasAttribute("data-transform")&&(A=JSON.parse(p.getAttribute("data-transform"))[A],!A&&p.hasAttribute("data-default")&&(A=p.getAttribute("data-default"))),L.innerHTML=A,y.appendChild(L)}),n.appendChild(y)}),N(a,e),i.setAttribute("data-total",parseInt(x)),i.setAttribute("data-page",parseInt(S)),I(a,e,o,i),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((v,f)=>{let y=k(u,v.getAttribute("data-ajax-query"),"");v.hasAttribute("data-total")?v.setAttribute("data-total",y):v.innerHTML=y}),parseInt(x)==0&&(n.innerHTML=`<tr><td colspan="100%"><span>${E}</span></td></tr>`),i.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:d})):n.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',o.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(u){console.log(u)}})},M=(a,e)=>{switch(a){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{year:"2-digit",month:"long",day:"numeric"});case"capitalise":return e=X(e)}};class at extends HTMLElement{constructor(){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`,i=document.createElement("template");i.innerHTML=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/const d=function(t){t.querySelectorAll(":scope > details");const o=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let a=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(a=t.shadowRoot.querySelector(".tabs__links")),!a){a=document.createElement("div"),a.classList.add("tabs__links");let e=document.createElement("div");e.classList.add("tabs__links__wrapper"),e.prepend(a),t.prepend(e)}let i=0;o.forEach((e,r)=>{let n=document.createElement("button");if(e.matches("details")){let s=e.querySelector(":scope > summary"),l=s.classList.contains("disabled");s.classList.add("visually-hidden"),e.hasAttribute("id")&&n.setAttribute("data-id",`${e.getAttribute("id")}`),e.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML=`${s.innerText}`,n.classList.add("link"),n.setAttribute("data-index",i),e.setAttribute("tabindex","-1"),l&&n.classList.add("disabled"),i++}else e.matches("a")&&(n=e);n.classList.add("link"),a.appendChild(n)})},c=function(t){let o=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > details > summary"),i=t.querySelectorAll(":scope .tabs__links > button");t.shadowRoot&&(i=t.shadowRoot.querySelectorAll(".tabs__links > button")),i.forEach(e=>{e.addEventListener("click",r=>{if(r.preventDefault(),e.classList.contains("disabled"))return!1;i.forEach(n=>{let s=n==e;n.setAttribute("aria-pressed",s)}),o.forEach((n,s)=>{let l=e.getAttribute("data-index")==s;l?n.setAttribute("open",l):n.removeAttribute("open")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})})}),a.forEach((e,r)=>{e.addEventListener("click",n=>{n.preventDefault(),i[r].click()})})},p=function(t){if(!t.querySelector(":scope > details"))return!1;let o=t.querySelectorAll(":scope > details"),a=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]")||(o[0].setAttribute("open",!0),a[0].setAttribute("aria-pressed",!0))},b=function(t){d(t),c(t),p(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=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"):`${o}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
package/assets/js/dynamic.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/(function(h){typeof define=="function"&&define.amd?define(h):h()})(function(){"use strict";const h=t=>(t.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&t.classList.add("ie"),null),L=t=>{const i=function(e){const a=document.querySelector(`label[for="${e.replace("#","")}"]`),o=document.querySelector(e+" summary"),r=document.querySelector(`dialog${e}`);a instanceof HTMLElement?a.click():o instanceof HTMLElement?o.click():r instanceof HTMLElement&&r.showModal()};return location.hash&&i(location.hash),window.addEventListener("hashchange",function(){i(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&e.state.type=="pagination"){let a=document.querySelector(`#${e.state.form}`),o=document.querySelector(`#${e.state.form} [data-pagination]`);o?o.value=e.state.page:a.innerHTML+=`<input name="page" type="hidden" data-pagination="true" value="${e.state.page}" />`,a.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){let a=e.target;Array.from(a.querySelectorAll("[data-password-type]")).forEach((o,r)=>{o.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),e.preventDefault())}}),null};class S{constructor(i){document.body.classList.contains("youtubeLoaded")?i.addEventListener("click",function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches("a")){e.preventDefault(),y(a);break}},!1):this.loadScripts(i,this.createEmbed)}loadScripts(i){return new Promise((e,a)=>{const o=new Image;o.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=()=>{i.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),y(n.target.closest("a")))},!1)}},o.onerror=function(){a(!1)},o.src="https://youtube.com/favicon.ico"})}}const y=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var i=t.getAttribute("data-id"),e=t.getAttribute("id");if(typeof e>"u"||e==null){var a=String.fromCharCode(65+Math.floor(Math.random()*26));e=a+Date.now(),t.setAttribute("id",e)}function o(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:i,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:r,onStateChange:n}})}o();function r(l){l.target.playVideo()}var s=!1;function n(l){if(l.data==YT.PlayerState.PLAYING&&!s){var c=document.getElementById(e);c.classList.add("player-ready"),s=!0}}},E=t=>(Array.from(t.querySelectorAll("dialog[open]")).forEach((i,e)=>{i.closest(".dialog__wrapper")||(i.removeAttribute("open"),i.showModal(),i.focus(),w(i))}),t.addEventListener("click",i=>{if(i.target.tagName=="IAM-ACTIONBAR")return!1;if(i&&i.target instanceof HTMLElement&&i.target.closest("[data-modal]")){const o=i.target.closest("[data-modal]"),r=o.hasAttribute("data-modal")?o.getAttribute("data-modal"):o.getAttribute("data-filter"),s=document.querySelector(`dialog#${r}`);w(s),s.showModal(),s.focus();let n=s.offsetWidth;s.setAttribute("style",`max-width: ${n}px;`),Array.from(s.querySelectorAll("[data-duplicate]")).forEach((l,c)=>{const d=l.getAttribute("data-duplicate"),u=document.getElementById(d);if(l.checked!=u.checked){l.checked=u.checked;let f=new Event("change");l.dispatchEvent(f)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(i&&i.target instanceof HTMLElement&&i.target.closest("button.dialog__close")){const o=i.target.closest("dialog[open]");i.preventDefault(),o.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:o.getAttribute("id")})}if(i&&i.target instanceof HTMLElement&&i.target.closest('button[formmethod="dialog"]')){const o=i.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:o.getAttribute("id")})}if(i&&i.target instanceof HTMLElement&&i.target.closest("dialog[open]")){let o=i.target.closest("dialog[open]");var e=window.getComputedStyle(o);if(e.display==="contents"&&(o=o.parentNode.closest("dialog[open]")),!o.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||o.classList.contains("dialog--multi")){const r=o.getBoundingClientRect();(i.clientX<r.left||i.clientX>r.right||i.clientY<r.top||i.clientY>r.bottom)&&(i.target.closest('input[type="radio"]')||o.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")}))}}if(i&&i.target instanceof HTMLElement&&i.target.closest(".dialog__wrapper > button")){i.stopPropagation();let o=i.target.closest(".dialog__wrapper > button"),r=i.target.closest(".dialog__wrapper > button").parentNode,s="openPopover",n=r.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=n&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,f)=>{u.removeAttribute("aria-expanded")}),n.hasAttribute("open"))n.close(),s="closePopover",n.removeAttribute("style"),o.removeAttribute("aria-expanded");else{n.show(),o.setAttribute("aria-expanded",!0);var a=o.getBoundingClientRect();let u=a.top,f=a.left;if(o.closest("iam-table")){let m=o.closest("iam-table").parentNode.getBoundingClientRect();u-=m.top,f-=m.left}n.classList.contains("dialog--fix")&&n.setAttribute("style",`position:fixed;top: ${u}px; left: ${f}px; margin: 3rem 0 0 0;`)}let l=n.getBoundingClientRect(),c=l.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(c>d){let u=n.hasAttribute("style")?n.getAttribute("style")+" ":"";n.setAttribute("style",u+"transform: translate(0, calc(-100% - 4rem))"),l=n.getBoundingClientRect(),l.top-window.scrollY<100&&n.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:s,id:o.textContent})}i&&i.target instanceof HTMLElement&&!i.target.closest("dialog[open]")&&!i.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((o,r)=>{o.removeAttribute("aria-expanded")}))}),null),w=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 i=t.querySelector(".youtube-embed a");if(i&&y(i),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"),a=t.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){let o=a.previousSibling;e.before(a),o&&a.before(o)}}t.querySelector(":scope > button:first-child")||t.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},q=t=>{let i="",e=Array.from(t.querySelectorAll("fieldset[data-title]")),a=t.querySelector("form");e.forEach((s,n)=>{i+=`<button data-title="${s.getAttribute("data-title")}" type="button" class="${n==0?"active":""}" tabindex="-1">${s.getAttribute("data-title")}</button>`;const l=document.createElement("div");if(l.classList.add("btn--wrapper"),s.appendChild(l),n!=0&&(l.innerHTML+=`<button data-title="${e[n-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),n!=e.length-1&&(l.innerHTML+=`<button data-title="${e[n+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),n==e.length-1)if(a&&a.querySelector(':scope > button[type="submit"]')){let c=a.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),l.insertAdjacentElement("beforeend",c)}else l.innerHTML+=`<button data-title="${e[n].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${i}</div>`);let o=Array.from(t.querySelectorAll("fieldset.was-validated"));for(let s=0;s<o.length;s++){let n=o[s],l=n.getAttribute("data-title");if(n.querySelector(".is-invalid")){Array.from(t.querySelectorAll(`[data-title="${l}"]`)).forEach((c,d)=>{c.classList.add("active")});break}else Array.from(t.querySelectorAll(`[data-title="${l}"]`)).forEach((c,d)=>{c.classList.add("valid")})}t.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function r(s){const n=t.querySelector("fieldset.active")?t.querySelector("fieldset.active"):t.querySelector("fieldset[data-title]"),l=n.getAttribute("data-title");let c=!0;if(n.classList.add("was-validated"),Array.from(n.querySelectorAll("input")).forEach((f,m)=>{f.checkValidity()||(c=!1)}),c?Array.from(t.querySelectorAll(`[data-title="${l}"]`)).forEach((f,m)=>{f.classList.add("valid")}):Array.from(t.querySelectorAll(`[data-title="${l}"]`)).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((A,Y)=>{A.classList.remove("active")}),Array.from(t.querySelectorAll("fieldset")).forEach((A,Y)=>{A.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 n=s.target.closest("button");s.keyCode==13&&n.getAttribute("type")!="submit"&&(s.preventDefault(),r(n))}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 n=s.target.closest("button[data-title]");r(n)}return null})};function x(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",t=>{const i=t.target.closest("[open] summary");if(i)window.dataLayer.push({event:"closeDetails",detailsTitle:i.textContent||""});else{const e=t.target.closest("summary"),a=t.target.closest("a"),o=t.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),a&&window.dataLayer.push({event:"linkClicked",linkText:a.hasAttribute("title")?a.getAttribute("title")||"":a.textContent||"",class:a.hasAttribute("class")&&a.getAttribute("class")||"",href:a.getAttribute("href")||""}),o&&window.dataLayer.push({event:"buttonClicked",buttonText:o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||""})}})}function T(t){var i=new TextEncoder("utf-8").encode(t);return crypto.subtle.digest("SHA-1",i).then(function(e){for(var a=[],o=new DataView(e),r=0;r<o.byteLength;r+=4){var s=o.getUint32(r),n=s.toString(16),l="00000000",c=(l+n).slice(-l.length);a.push(c)}return a.join("")})}const k=(t,i)=>{T(t).then(function(e){const a=new XMLHttpRequest;a.addEventListener("load",function(){const o=this.responseText.split(`
|
|
5
5
|
`),r=e.slice(5).toUpperCase();var s=!1;for(let l in o)if(o[l].substring(0,35)==r){s=!0;break}const n=new CustomEvent("hibpCheck",{detail:s});i.dispatchEvent(n)}),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()})},M=t=>{function i(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((e,a)=>{e.parentElement,$(e)}),Array.from(document.querySelectorAll("label input")).forEach((e,a)=>{!e.closest("label").querySelector(".optional-text")&&!e.hasAttribute("required")&&e.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>')}),document.querySelector('input[type="date"]')){let a=function(o){const r=o.getFullYear(),s=String(o.getMonth()+1).padStart(2,"0"),n=String(o.getDate()).padStart(2,"0");return`${r}-${s}-${n}`};const e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((o,r)=>{let s=e;if(o.hasAttribute("data-start")&&(s.setDate(s.getDate()+parseInt(o.getAttribute("data-start"))),o.setAttribute("min",a(s))),o.hasAttribute("data-period")){let n=parseInt(o.getAttribute("data-period")),l=new Date;l.setDate(s.getDate()+n),o.setAttribute("max",a(l))}if(o.hasAttribute("data-allowed-days")){let n=JSON.parse(`[${o.getAttribute("data-allowed-days")}]`);o.addEventListener("input",function(l){var c=new Date(this.value).getUTCDay();n.includes(c)?o.setCustomValidity(""):o.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&i(),document.onreadystatechange=()=>{document.readyState==="complete"&&i()},t.addEventListener("input",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){const a=e.target.closest("input,textarea,select");a.parentElement,a.hasAttribute("type")&&a.getAttribute("type")=="color"&&(a.nextElementSibling.value=a.value),a.hasAttribute("maxlength")&&a.nextElementSibling&&a.nextElementSibling.setAttribute("data-count",a.value.length),a.hasAttribute("data-strength-checker")&&p(a)}}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){const a=e.target.closest("select");if(a.hasAttribute("data-change-type")&&a.hasAttribute("data-input")){const o=document.getElementById(a.getAttribute("data-input")),r=a.value;v(o,r)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){const a=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(a.querySelectorAll('[type="radio"][autofocus]')).forEach((o,r)=>{o.removeAttribute("autofocus")}),Array.from(a.querySelectorAll('[type="radio"]:checked')).forEach((o,r)=>{o.setAttribute("autofocus",!0)})}}),t.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){const a=e.target.closest("[data-change-type]"),o=document.getElementById(a.getAttribute("data-input")),r=a.getAttribute("data-change-type");if(a.setAttribute("data-change-type",o.getAttribute("type")),v(o,r),a.hasAttribute("data-alt-class")){const s=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",s)}}})},$=t=>{let i=t.parentElement,e=t.getAttribute("maxlength");i.style.setProperty("--maxlength",e);let a=t.nextElementSibling;(!a||a&&a.classList.contains("invalid-feedback"))&&(a=document.createElement("span"),i.insertBefore(a,t.nextSibling)),a.setAttribute("data-count",t.value.length)},v=(t,i)=>{t.hasAttribute("type")&&t.getAttribute("type")=="password"&&t.setAttribute("data-password-type",!0),t.setAttribute("type",i)},p=(t,i="no")=>{const e=document.getElementById(t.getAttribute("data-strength-checker")),a=t.value,o=t.hasAttribute("minlength")?t.getAttribute("minlength"):12;let r=1,s=["Very weak","Weak","Average","Strong","Very strong"],n="";if(a.match(/(?=.*[0-9])/)&&(r+=1),a.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(r+=1),a.match(/(?=.*[a-z])/)&&(r+=1),a.match(/(?=.*[A-Z])/)&&(r+=1),a.length<o&&(r=1,n=`(must be at least ${o} characters.)`),r>=3&&i=="no"){let l=function(c,d){c.detail?p(d,"danger"):p(d,"success"),d.removeEventListener("hibpCheck",l)};k(a,t),t.addEventListener("hibpCheck",function(c){l(c,t)})}else r>=3&&i=="danger"&&(r=3,n="(this password is very common)");e&&(r<=3?e.classList.add("invalid-feedback"):e.classList.remove("invalid-feedback"),e.setAttribute("data-strength",r),e.innerHTML=`Password strength: ${s[r-1]} ${n}`)},_=t=>{Array.from(t.querySelectorAll("details")).forEach((i,e)=>{i.addEventListener("mouseenter",function(a){window.matchMedia("(min-width: 62em)").matches&&i.setAttribute("open","true")},!1),i.addEventListener("mouseleave",function(a){window.matchMedia("(min-width: 62em)").matches&&i.removeAttribute("open")},!1)}),"IntersectionObserver"in window&&new IntersectionObserver(([e])=>e.target.classList.toggle("is-stuck",e.intersectionRatio<1),{threshold:[1]}).observe(t)};function C(t){var i;const e=t.querySelector(".testimonial__images"),a=e.querySelectorAll("img").length;if(a==1)return!1;t.classList.add("testimonial--multi");const o=function(r){const s=t.querySelector(".btn-next"),n=t.querySelector(".btn-prev");s.setAttribute("data-go",r+1),n.setAttribute("data-go",r-1),s.removeAttribute("disabled"),n.removeAttribute("disabled"),r==1?n.setAttribute("disabled",!0):r==a&&s.setAttribute("disabled",!0)};e.addEventListener("scroll",function(r){clearTimeout(i),i=setTimeout(function(){let s=e.scrollWidth,n=e.scrollHeight,l=e.scrollLeft,c=e.scrollTop,d=Math.round(l/s*a)+1;l==0&&c!=0&&(d=Math.round(c/n*a)+1),t.setAttribute("data-show",d),o(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 n=parseInt(s.getAttribute("data-go")),l=0,c=0,d=e.scrollWidth,u=e.scrollHeight;d>u?c=Math.floor(d*((n-1)/a)):l=Math.floor(u*((n-1)/a)),e.scroll({top:l,left:c,behavior:"smooth"});break}},!1)}function H(t,i){var e;let a=t.querySelector(".carousel__inner"),o=t.querySelector(".carousel__controls"),r=i.querySelectorAll(".col").length;a.addEventListener("scroll",function(s){clearTimeout(e),e=setTimeout(function(){let n=a.clientWidth,l=a.scrollWidth,c=a.scrollLeft,d=Math.round(c/l*r)+1,u=i.querySelector(".col:last-child").offsetLeft+50;a.scrollLeft+n>=u&&(d=r),Array.from(t.querySelectorAll(".carousel__controls button")).forEach((f,m)=>{f.removeAttribute("aria-current")}),t.querySelector(".control-"+d).setAttribute("aria-current",!0),d==1?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),d==r?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),o.addEventListener("click",function(s){for(var n=s.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){s.preventDefault(),Array.from(o.querySelectorAll("button")).forEach((c,d)=>{c.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);const l=i.querySelector(`*:nth-child(${n.getAttribute("data-slide")})`);a.scroll({top:0,left:l.offsetLeft,behavior:"smooth"});break}},!1),t.addEventListener("click",function(s){for(var n=s.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches(".btn-next, .btn-prev")){s.preventDefault();let l=n.classList.contains("btn-prev")?a.scrollLeft-a.clientWidth:a.scrollLeft+a.clientWidth;a.scroll({top:0,left:l,behavior:"smooth"});break}},!1)}function D(t){t.addEventListener("change",function(i){var e=parseInt(t.querySelector("[data-min] select,[data-min] input").value),a=parseInt(t.querySelector("[data-max] select,[data-max] input").value);Array.from(t.querySelectorAll("[data-min] input")).forEach((o,r)=>{o.setAttribute("max",a)}),Array.from(t.querySelectorAll("[data-max] input")).forEach((o,r)=>{o.setAttribute("min",e)}),Array.from(t.querySelectorAll("[data-min] select option")).forEach((o,r)=>{parseInt(o.getAttribute("value"))>a?o.classList.add("d-none"):o.classList.remove("d-none")}),Array.from(t.querySelectorAll("[data-max] select option")).forEach((o,r)=>{parseInt(o.getAttribute("value"))<e?o.classList.add("d-none"):o.classList.remove("d-none")})},!1)}function I(t){t.addEventListener("change",function(i){if(t.matches("[data-value-if]")){const e=t.getAttribute("data-redirect"),a=t.getAttribute("data-value-if");t.value==a&&(document.location.href=e)}else typeof t.value<"u"&&(document.location.href=t.value)},!1)}function B(t){const e=t.querySelector(".row").cloneNode(!0),a=t.querySelector("[data-add]");t.addEventListener("click",function(o){for(var r=o.target;r&&r!=this;r=r.parentNode){if(r.matches("[data-add]")){const s=e.cloneNode(!0);t.insertBefore(s,r),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(r.matches("[data-delete]")){r.closest(".row").remove(),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function N(t){Array.from(t.querySelectorAll("[data-input-range]")).forEach((i,e)=>{D(i)}),Array.from(t.querySelectorAll("[data-redirect]")).forEach((i,e)=>{I(i)}),Array.from(t.querySelectorAll(".multiple-file-uploads")).forEach((i,e)=>{B(i)}),t.addEventListener("change",function(i){for(var e=i.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){const a=e.dataset.filesize;e.files[0].size>a&&(e.value="",alert("File too large"));break}},!1),t.addEventListener("change",function(i){Array.from(t.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,a)=>{let o=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;o.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,a)=>{let o=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;o.querySelector(`select[data-id="${r}"],input[data-id="${r}"]`).value==s?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}function P(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(),g(t))},!1),t.hasAttribute("data-timeout")){let e=t.getAttribute("data-timeout");var i=new R(function(){g(t)},e);t.addEventListener("mouseenter",a=>{i.pause()}),t.addEventListener("mouseleave",a=>{i.resume()})}}function R(t,i){var e,a,o=i;this.pause=function(){window.clearTimeout(e),o-=new Date-a},this.resume=function(){a=new Date,window.clearTimeout(e),e=window.setTimeout(t,o)},this.resume()}const g=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});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",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,a=`@import "${i}/css/components/notification.css";`,o=`@import "${i}/css/components/notification.global.css";`,r=this.querySelectorAll("a,button");Array.from(r).forEach((n,l)=>{n.setAttribute("slot","btns"),n.classList.add("link")}),(r.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const s=document.createElement("template");s.innerHTML=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta3
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/(function(_){typeof define=="function"&&define.amd?define(_):_()})(function(){"use strict";var _=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),st=r=>{var t=function(e){var s=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),c=document.querySelector(e+" summary"),o=document.querySelector("dialog".concat(e));s instanceof HTMLElement?s.click():c instanceof HTMLElement?c.click():o instanceof HTMLElement&&o.showModal()};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",a=>{if(a&&a.state&&a.state.type&&a.state.type=="pagination"){var e=document.querySelector("#".concat(a.state.form)),s=document.querySelector("#".concat(a.state.form," [data-pagination]"));s?s.value=a.state.page:e.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(a.state.page,'" />'),e.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",a=>{if(a&&a.target instanceof HTMLElement&&a.target.matches("form")){var e=a.target;Array.from(e.querySelectorAll("[data-password-type]")).forEach((s,c)=>{s.setAttribute("type","password")}),(e.querySelector(":invalid")||e.querySelector('.pwd-checker[data-strength="1"]')||e.querySelector('.pwd-checker[data-strength="2"]'))&&(e.classList.add("was-validated"),a.preventDefault())}}),null},it=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},ot=(r,t)=>String(r).padStart(t,"0"),nt=r=>r.charAt(0).toUpperCase()+r.slice(1),k=(r,t,a)=>t.split(/[\.\[\]\'\"]/).filter(e=>e).reduce((e,s)=>e?e[s]:a,r);class ct{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(a){for(var e=a.target;e&&e!=this;e=e.parentNode)if(e.matches("a")){a.preventDefault(),U(e);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((a,e)=>{var s=new Image;s.onload=function(){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(c,o),document.body.classList.add("youtubeLoaded"),a(!0),c.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),U(n.target.closest("a")))},!1)}},s.onerror=function(){e(!1)},s.src="https://youtube.com/favicon.ico"})}}var U=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 s=String.fromCharCode(65+Math.floor(Math.random()*26));e=s+Date.now(),t.setAttribute("id",e)}function c(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:o,onStateChange:d}})}c();function o(i){i.target.playVideo()}var n=!1;function d(i){if(i.data==YT.PlayerState.PLAYING&&!n){var l=document.getElementById(e);l.classList.add("player-ready"),n=!0}}},dt=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((t,a)=>{var e=t.closest(".dialog__wrapper");e||(t.removeAttribute("open"),t.showModal(),t.focus(),J(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var a=t.target.closest("[data-modal]"),e=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),s=document.querySelector("dialog#".concat(e));J(s),s.showModal(),s.focus();var c=s.offsetWidth;s.setAttribute("style","max-width: ".concat(c,"px;")),Array.from(s.querySelectorAll("[data-duplicate]")).forEach((v,x)=>{var L=v.getAttribute("data-duplicate"),E=document.getElementById(L);if(v.checked!=E.checked){v.checked=E.checked;var C=new Event("change");v.dispatchEvent(C)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:e})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var n=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var d=t.target.closest("dialog[open]"),i=window.getComputedStyle(d);if(i.display==="contents"&&(d=d.parentNode.closest("dialog[open]")),!d.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||d.classList.contains("dialog--multi")){var l=d.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||d.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var u=t.target.closest(".dialog__wrapper > button"),f=t.target.closest(".dialog__wrapper > button").parentNode,b="openPopover",h=f.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=h&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.removeAttribute("aria-expanded")}),h.hasAttribute("open"))h.close(),b="closePopover",h.removeAttribute("style"),u.removeAttribute("aria-expanded");else{h.show(),u.setAttribute("aria-expanded",!0);var m=u.getBoundingClientRect(),p=m.top,y=m.left;if(u.closest("iam-table")){var w=u.closest("iam-table").parentNode.getBoundingClientRect();p-=w.top,y-=w.left}h.classList.contains("dialog--fix")&&h.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(y,"px; margin: 3rem 0 0 0;"))}var A=h.getBoundingClientRect(),g=A.bottom-window.scrollY,S=window.innerHeight-window.scrollY;if(g>S){var T=h.hasAttribute("style")?h.getAttribute("style")+" ":"";h.setAttribute("style",T+"transform: translate(0, calc(-100% - 4rem))"),A=h.getBoundingClientRect();var q=A.top-window.scrollY;q<100&&h.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:b,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((v,x)=>{v.removeAttribute("aria-expanded")}))}),null),J=r=>{r.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!r.classList.contains("dialog--multi")&&r.addEventListener("cancel",c=>{c.preventDefault()});var t=r.querySelector(".youtube-embed a");if(t&&U(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&<(r),!r.querySelector(":scope > .mh-lg")&&!r.classList.contains("dialog--multi")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var a=r.querySelector(".mh-lg"),e=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(e){var s=e.previousSibling;a.before(e),s&&e.before(s)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},lt=r=>{var t="",a=Array.from(r.querySelectorAll("fieldset[data-title]")),e=r.querySelector("form");a.forEach((i,l)=>{t+='<button data-title="'.concat(i.getAttribute("data-title"),'" type="button" class="').concat(l==0?"active":"",'" tabindex="-1">').concat(i.getAttribute("data-title"),"</button>");var u=document.createElement("div");if(u.classList.add("btn--wrapper"),i.appendChild(u),l!=0&&(u.innerHTML+='<button data-title="'.concat(a[l-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),l!=a.length-1&&(u.innerHTML+='<button data-title="'.concat(a[l+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),l==a.length-1)if(e&&e.querySelector(':scope > button[type="submit"]')){var f=e.querySelector(':scope > button[type="submit"]');f.classList.add("mb-0"),u.insertAdjacentElement("beforeend",f)}else u.innerHTML+='<button data-title="'.concat(a[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),r.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var s=Array.from(r.querySelectorAll("fieldset.was-validated")),c=0;c<s.length;c++){var o=s[c],n=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((i,l)=>{i.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((i,l)=>{i.classList.add("valid")})}r.addEventListener("invalid",function(){return function(i){i.preventDefault()}}(),!0);function d(i){var l=r.querySelector("fieldset.active")?r.querySelector("fieldset.active"):r.querySelector("fieldset[data-title]"),u=l.getAttribute("data-title"),f=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((y,w)=>{y.checkValidity()||(f=!1)}),f?Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.remove("valid")}),f||!i.hasAttribute("data-next")){var b=r.querySelector('fieldset[data-title="'.concat(i.getAttribute("data-title"),'"]')),h=r.querySelector('.steps button[data-title="'.concat(i.getAttribute("data-title"),'"]'));Array.from(r.querySelectorAll("button")).forEach((y,w)=>{y.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((y,w)=>{y.classList.remove("active")}),h.classList.add("active"),b.classList.add("active")}var m=Array.from(r.querySelectorAll("fieldset")).length,p=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(p/(m-1)*100,"%"))}r.addEventListener("keydown",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest("button")){var l=i.target.closest("button");i.keyCode==13&&l.getAttribute("type")!="submit"&&(i.preventDefault(),d(l))}if(i&&i.target instanceof HTMLElement&&i.target.closest("input")){var u=i.target.closest("input");u.classList.remove("is-invalid"),i.keyCode==13&&i.preventDefault()}}),r.addEventListener("click",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest('button[type="submit"]')){var l=i.target.closest("form");l.classList.add("was-validated")}else if(i&&i.target instanceof HTMLElement&&i.target.closest("button[data-title]")){var u=i.target.closest("button[data-title]");d(u)}return null})};function ut(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var t=r.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=r.target.closest("summary"),e=r.target.closest("a"),s=r.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),e&&window.dataLayer.push({event:"linkClicked",linkText:e.hasAttribute("title")?e.getAttribute("title")||"":e.textContent||"",class:e.hasAttribute("class")&&e.getAttribute("class")||"",href:e.getAttribute("href")||""}),s&&window.dataLayer.push({event:"buttonClicked",buttonText:s.textContent||"",class:s.hasAttribute("class")&&s.getAttribute("class")||""})}})}function ht(r){var t=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",t).then(function(a){for(var e=[],s=new DataView(a),c=0;c<s.byteLength;c+=4){var o=s.getUint32(c),n=o.toString(16),d="00000000",i=(d+n).slice(-d.length);e.push(i)}return e.join("")})}var ft=(r,t)=>{ht(r).then(function(a){var e=new XMLHttpRequest;e.addEventListener("load",function(){var s=this.responseText.split(`
|
|
5
5
|
`),c=a.slice(5).toUpperCase(),o=!1;for(var n in s)if(s[n].substring(0,35)==c){o=!0;break}var d=new CustomEvent("hibpCheck",{detail:o});t.dispatchEvent(d)}),e.open("GET","https://api.pwnedpasswords.com/range/"+a.substr(0,5)),e.send()})},bt=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((e,s)=>{e.parentElement,mt(e)}),Array.from(document.querySelectorAll("label input")).forEach((e,s)=>{!e.closest("label").querySelector(".optional-text")&&!e.hasAttribute("required")&&e.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>')}),document.querySelector('input[type="date"]')){let e=function(s){var c=s.getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),n=String(s.getDate()).padStart(2,"0");return"".concat(c,"-").concat(o,"-").concat(n)};var a=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((s,c)=>{var o=a;if(s.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(s.getAttribute("data-start"))),s.setAttribute("min",e(o))),s.hasAttribute("data-period")){var n=parseInt(s.getAttribute("data-period")),d=new Date;d.setDate(o.getDate()+n),s.setAttribute("max",e(d))}if(s.hasAttribute("data-allowed-days")){var i=JSON.parse("[".concat(s.getAttribute("data-allowed-days"),"]"));s.addEventListener("input",function(l){var u=new Date(this.value).getUTCDay();i.includes(u)?s.setCustomValidity(""):s.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&t(),document.onreadystatechange=()=>{document.readyState==="complete"&&t()},r.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){var 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),e.hasAttribute("data-strength-checker")&&vt(e)}}),r.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){var e=a.target.closest("select");if(e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var s=document.getElementById(e.getAttribute("data-input")),c=e.value;Q(s,c)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){var o=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((n,d)=>{n.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((n,d)=>{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 e=a.target.closest("[data-change-type]"),s=document.getElementById(e.getAttribute("data-input")),c=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",s.getAttribute("type")),Q(s,c),e.hasAttribute("data-alt-class")){var o=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",o)}}})},mt=r=>{var t=r.parentElement,a=r.getAttribute("maxlength");t.style.setProperty("--maxlength",a);var e=r.nextElementSibling;(!e||e&&e.classList.contains("invalid-feedback"))&&(e=document.createElement("span"),t.insertBefore(e,r.nextSibling)),e.setAttribute("data-count",r.value.length)},Q=(r,t)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",t)},vt=function r(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",e=document.getElementById(t.getAttribute("data-strength-checker")),s=t.value,c=t.hasAttribute("minlength")?t.getAttribute("minlength"):12,o=1,n=["Very weak","Weak","Average","Strong","Very strong"],d="";if(s.match(/(?=.*[0-9])/)&&(o+=1),s.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(o+=1),s.match(/(?=.*[a-z])/)&&(o+=1),s.match(/(?=.*[A-Z])/)&&(o+=1),s.length<c&&(o=1,d="(must be at least ".concat(c," characters.)")),o>=3&&a=="no"){let i=function(l,u){l.detail?r(u,"danger"):r(u,"success"),u.removeEventListener("hibpCheck",i)};ft(s,t),t.addEventListener("hibpCheck",function(l){i(l,t)})}else o>=3&&a=="danger"&&(o=3,d="(this password is very common)");e&&(o<=3?e.classList.add("invalid-feedback"):e.classList.remove("invalid-feedback"),e.setAttribute("data-strength",o),e.innerHTML="Password strength: ".concat(n[o-1]," ").concat(d))},pt=r=>{if(Array.from(r.querySelectorAll("details")).forEach((a,e)=>{a.addEventListener("mouseenter",function(s){window.matchMedia("(min-width: 62em)").matches&&a.setAttribute("open","true")},!1),a.addEventListener("mouseleave",function(s){window.matchMedia("(min-width: 62em)").matches&&a.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(a=>{var[e]=a;return e.target.classList.toggle("is-stuck",e.intersectionRatio<1)},{threshold:[1]});t.observe(r)}};function yt(r){var t,a=r.querySelector(".testimonial__images"),e=a.querySelectorAll("img").length;if(e==1)return!1;r.classList.add("testimonial--multi");var s=function(o){var n=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");n.setAttribute("data-go",o+1),d.setAttribute("data-go",o-1),n.removeAttribute("disabled"),d.removeAttribute("disabled"),o==1?d.setAttribute("disabled",!0):o==e&&n.setAttribute("disabled",!0)};a.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=a.scrollWidth,n=a.scrollHeight,d=a.scrollLeft,i=a.scrollTop,l=Math.round(d/o*e)+1;d==0&&i!=0&&(l=Math.round(i/n*e)+1),r.setAttribute("data-show",l),s(l)},300)},!1),r.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches("[data-go]")){var n=parseInt(o.getAttribute("data-go")),d=0,i=0,l=a.scrollWidth,u=a.scrollHeight;l>u?i=Math.floor(l*((n-1)/e)):d=Math.floor(u*((n-1)/e)),a.scroll({top:d,left:i,behavior:"smooth"});break}},!1)}function gt(r,t){var a,e=r.querySelector(".carousel__inner"),s=r.querySelector(".carousel__controls"),c=t.querySelectorAll(".col").length;e.addEventListener("scroll",function(o){clearTimeout(a),a=setTimeout(function(){var n=e.clientWidth,d=e.scrollWidth,i=e.scrollLeft,l=Math.round(i/d*c)+1,u=t.querySelector(".col:last-child").offsetLeft+50;e.scrollLeft+n>=u&&(l=c),Array.from(r.querySelectorAll(".carousel__controls button")).forEach((f,b)=>{f.removeAttribute("aria-current")}),r.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?r.querySelector(".btn-prev").setAttribute("disabled","disabled"):r.querySelector(".btn-prev").removeAttribute("disabled"),l==c?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),s.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){o.preventDefault(),Array.from(s.querySelectorAll("button")).forEach((i,l)=>{i.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);var d=t.querySelector("*:nth-child(".concat(n.getAttribute("data-slide"),")"));e.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),r.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches(".btn-next, .btn-prev")){o.preventDefault();var d=n.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:d,behavior:"smooth"});break}},!1)}function At(r){r.addEventListener("change",function(t){var a=parseInt(r.querySelector("[data-min] select,[data-min] input").value),e=parseInt(r.querySelector("[data-max] select,[data-max] input").value);Array.from(r.querySelectorAll("[data-min] input")).forEach((s,c)=>{s.setAttribute("max",e)}),Array.from(r.querySelectorAll("[data-max] input")).forEach((s,c)=>{s.setAttribute("min",a)}),Array.from(r.querySelectorAll("[data-min] select option")).forEach((s,c)=>{parseInt(s.getAttribute("value"))>e?s.classList.add("d-none"):s.classList.remove("d-none")}),Array.from(r.querySelectorAll("[data-max] select option")).forEach((s,c)=>{parseInt(s.getAttribute("value"))<a?s.classList.add("d-none"):s.classList.remove("d-none")})},!1)}function wt(r){r.addEventListener("change",function(t){if(r.matches("[data-value-if]")){var a=r.getAttribute("data-redirect"),e=r.getAttribute("data-value-if");r.value==e&&(document.location.href=a)}else typeof r.value<"u"&&(document.location.href=r.value)},!1)}function Lt(r){var t=r.querySelector(".row"),a=t.cloneNode(!0),e=r.querySelector("[data-add]");r.addEventListener("click",function(s){for(var c=s.target;c&&c!=this;c=c.parentNode){if(c.matches("[data-add]")){var o=a.cloneNode(!0);r.insertBefore(o,c),e.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length>=e.dataset.maxfiles&&e.setAttribute("disabled","disabled");break}if(c.matches("[data-delete]")){var n=c.closest(".row");n.remove(),e.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<e.dataset.maxfiles&&e.removeAttribute("disabled");break}}},!1)}function St(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,a)=>{At(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,a)=>{wt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,a)=>{Lt(t)}),r.addEventListener("change",function(t){for(var a=t.target;a&&a!=this;a=a.parentNode)if(a.matches('[type="file"][data-filesize]')&&a.files&&a.files[0]){var e=a.dataset.filesize;a.files[0].size>e&&(a.value="",alert("File too large"));break}},!1),r.addEventListener("change",function(t){Array.from(r.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((a,e)=>{var s=a.closest("[data-group]")?a.closest("[data-group]"):r,c=a.dataset.activeif,o=a.dataset.equals,n=s.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?a.removeAttribute("disabled"):(a.setAttribute("disabled","disabled"),a.value="")}),Array.from(r.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((a,e)=>{var s=a.closest("[data-group]")?a.closest("[data-group]"):r,c=a.dataset.activeif,o=a.dataset.equals,n=s.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?a.classList.remove("d-none"):a.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Et extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var 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"):"".concat(t,"/css/core.min.css"),e='@import "'.concat(t,'/css/components/header.css";'),s=document.createElement("template");s.innerHTML=`
|