@iamproperty/components 7.1.0--beta5 → 7.1.0--beta6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/assets/css/components/multiselect.css +1 -1
  2. package/assets/css/components/multiselect.css.map +1 -1
  3. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  4. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  5. package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
  6. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  7. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  8. package/assets/js/components/card/card.component.min.js +1 -1
  9. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  10. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  11. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  12. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  13. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  14. package/assets/js/components/header/header.component.min.js +1 -1
  15. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  16. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  17. package/assets/js/components/multiselect/multiselect.component.js +5 -0
  18. package/assets/js/components/multiselect/multiselect.component.min.js +3 -3
  19. package/assets/js/components/multiselect/multiselect.component.min.js.map +1 -1
  20. package/assets/js/components/nav/nav.component.min.js +1 -1
  21. package/assets/js/components/notification/notification.component.min.js +1 -1
  22. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  23. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  24. package/assets/js/components/search/search.component.min.js +1 -1
  25. package/assets/js/components/slider/slider.component.min.js +1 -1
  26. package/assets/js/components/table/table.component.min.js +1 -1
  27. package/assets/js/components/tabs/tabs.component.min.js +3 -3
  28. package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
  29. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  30. package/assets/js/components.bundle.js +1 -1
  31. package/assets/js/modules/tabs.js +12 -22
  32. package/assets/js/scripts.bundle.js +1 -1
  33. package/assets/js/scripts.bundle.min.js +1 -1
  34. package/assets/sass/components/multiselect.scss +1 -1
  35. package/assets/ts/components/multiselect/multiselect.component.ts +5 -0
  36. package/assets/ts/modules/tabs.ts +15 -22
  37. package/dist/components.es.js +11 -11
  38. package/dist/components.umd.js +39 -39
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- .outer{position:relative;max-width:var(--input-max-width, 50rem);display:block}label{margin-bottom:0;padding-bottom:.5rem}.wrapper{margin-bottom:1.5rem;max-width:var(--input-max-width, 50rem)}.wrapper:after{content:"";display:block;position:absolute;top:100%;left:0;width:100%;height:1rem}.wrapper input{margin-bottom:0.5rem}.wrapper .feedback{position:absolute;right:0;bottom:100%;padding:.85rem;width:min-content;white-space:nowrap;margin-bottom:.5rem;display:none}.wrapper.was-validated .feedback{display:block}.wrapper.filled{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;min-height:calc(2.75rem + 4px);padding:0.5rem 2rem 0rem 0.8125rem;font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);color:var(--colour-body);background-color:var(--colour-canvas-2);border:2px solid var(--colour-primary);border-radius:0.5rem}.wrapper.filled:is(:focus-within,.focus-within):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}.wrapper.filled input{all:unset;font-size:1rem;line-height:1.625rem;display:inline-block;width:0;flex-grow:1;padding:0 0.5rem 0 0 !important;margin-inline:0.1875rem;order:999;margin-bottom:0.5rem}.wrapper.filled .feedback{display:none !important}.wrapper.filled:is(:focus,.focus):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}button{position:absolute;top:.75rem;right:.5rem;border:none;background:none;padding-inline:.5rem;display:var(--display-button, none)}button:after{content:"✕";font-weight:bold}.dropdown{position:absolute;top:calc(100% + .5rem);padding:0;left:0;width:100%;margin:0;z-index:99;display:none;max-height:15.25rem !important;overflow:auto}.dropdown:before{display:none}.wrapper:is(:focus-within) .dropdown{display:var(--display-panel, none)}@media(hover: hover){.wrapper .dropdown:hover{display:var(--display-panel, none)}}@media(hover: none){:host-context(.hover) .wrapper .dropdown{display:block}}:host-context(:focus-within) input{background-color:none !important}:host-context(iam-inline-edit){display:block;--display-btns: none}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]),:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) input,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover input{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) .dropdown,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover .dropdown{display:none}:host-context(iam-inline-edit) .wrapper{margin-bottom:0}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) input{border:none;background:none;margin-left:-1rem;width:calc(100% + 1rem);max-width:calc(100% + 1rem);box-shadow:none}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) .dropdown{display:none}:host-context(iam-inline-edit) .wrapper.filled:not(:focus-within):not([data-mousedown]){background:none;border:none;padding-left:0}/*# sourceMappingURL=multiselect.css.map */
1
+ .outer{position:relative;max-width:var(--input-max-width, 50rem);display:block}label{margin-bottom:0;padding-bottom:.5rem}.wrapper{margin-bottom:1.5rem;max-width:var(--input-max-width, 50rem)}.wrapper:after{content:"";display:block;position:absolute;top:100%;left:0;width:100%;height:1rem}.wrapper input{margin-bottom:0.5rem}.wrapper .feedback{position:absolute;right:0;bottom:100%;padding:.85rem;width:min-content;white-space:nowrap;margin-bottom:.5rem;display:none}.wrapper.was-validated .feedback{display:block}.wrapper.filled{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;min-height:calc(2.75rem + 4px);padding:0.5rem 2rem 0rem 0.8125rem;font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);color:var(--colour-body);background-color:var(--colour-canvas-2);border:2px solid var(--colour-primary);border-radius:0.5rem}.wrapper.filled:is(:focus-within,.focus-within):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}.wrapper.filled input{all:unset;font-size:1rem;line-height:1.625rem;display:inline-block;width:0;flex-grow:1;padding:0 0.5rem 0 0 !important;margin-inline:0.1875rem;order:999;margin-bottom:0.5rem}.wrapper.filled .feedback{display:none !important}.wrapper.filled:is(:focus,.focus):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}button{position:absolute;top:.75rem;right:.5rem;border:none;background:none;padding-inline:.5rem;display:var(--display-button, none)}button:after{content:"✕";font-weight:bold}.dropdown{position:absolute;top:calc(100% + .5rem);padding:0;left:0;width:100%;margin:0;z-index:99;display:none;max-height:15.25rem !important;overflow:auto}.dropdown:before{display:none}.wrapper:is(:focus-within) .dropdown{display:var(--display-panel, none)}@media(hover: hover){.wrapper .dropdown:hover{display:var(--display-panel, none)}}@media(hover: none){:host(.hover) .wrapper .dropdown{display:block}}:host-context(:focus-within) input{background-color:none !important}:host-context(iam-inline-edit){display:block;--display-btns: none}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]),:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) input,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover input{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) .dropdown,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover .dropdown{display:none}:host-context(iam-inline-edit) .wrapper{margin-bottom:0}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) input{border:none;background:none;margin-left:-1rem;width:calc(100% + 1rem);max-width:calc(100% + 1rem);box-shadow:none}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) .dropdown{display:none}:host-context(iam-inline-edit) .wrapper.filled:not(:focus-within):not([data-mousedown]){background:none;border:none;padding-left:0}/*# sourceMappingURL=multiselect.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../sass/components/multiselect.scss"],"names":[],"mappings":"CAEA,OACE,kBACA,wCACA,cAGF,MACE,gBACA,qBAGF,SACE,qBACA,wCAEA,eACE,WACA,cACA,kBACA,SACA,OACA,WACA,YAGF,eACE,qBAGF,mBACE,kBACA,QACA,YACA,eACA,kBACA,mBACA,oBACA,aAGF,iCACE,cAIJ,gBACE,aACA,mBACA,eACA,uBACA,+BACA,mCACA,gCACA,qCACA,yBACA,wCACA,uCACA,qBAEA,+DACE,gCACA,UACA,4CAGF,sBACE,UACA,eACA,qBACA,qBACA,QACA,YACA,gCACA,wBACA,UACA,qBAGF,0BACE,wBAGF,iDACE,gCACA,UACA,4CAIJ,OACE,kBACA,WACA,YACA,YACA,gBACA,qBACA,oCAEA,aACE,YACA,iBAIJ,UACE,kBACA,uBACA,UACA,OACA,WACA,SACA,WACA,aACA,+BACA,cAEA,iBACE,aAIJ,qCACE,mCAGF,qBACE,yBACE,oCAIJ,oBACE,yCACE,eAMF,mCACE,iCAGJ,+BACE,cACA,qBAEA,kMAEE,qCAEA,8MACE,qCAGF,sNACE,aAIJ,wCACE,gBAIA,oGACE,YACA,gBACA,kBACA,wBACA,4BACA,gBAGF,wGACE,aAGJ,wFACE,gBACA,YACA","file":"multiselect.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../sass/components/multiselect.scss"],"names":[],"mappings":"CAEA,OACE,kBACA,wCACA,cAGF,MACE,gBACA,qBAGF,SACE,qBACA,wCAEA,eACE,WACA,cACA,kBACA,SACA,OACA,WACA,YAGF,eACE,qBAGF,mBACE,kBACA,QACA,YACA,eACA,kBACA,mBACA,oBACA,aAGF,iCACE,cAIJ,gBACE,aACA,mBACA,eACA,uBACA,+BACA,mCACA,gCACA,qCACA,yBACA,wCACA,uCACA,qBAEA,+DACE,gCACA,UACA,4CAGF,sBACE,UACA,eACA,qBACA,qBACA,QACA,YACA,gCACA,wBACA,UACA,qBAGF,0BACE,wBAGF,iDACE,gCACA,UACA,4CAIJ,OACE,kBACA,WACA,YACA,YACA,gBACA,qBACA,oCAEA,aACE,YACA,iBAIJ,UACE,kBACA,uBACA,UACA,OACA,WACA,SACA,WACA,aACA,+BACA,cAEA,iBACE,aAIJ,qCACE,mCAGF,qBACE,yBACE,oCAIJ,oBACE,iCACE,eAMF,mCACE,iCAGJ,+BACE,cACA,qBAEA,kMAEE,qCAEA,8MACE,qCAGF,sNACE,aAIJ,wCACE,gBAIA,oGACE,YACA,gBACA,kBACA,wBACA,4BACA,gBAGF,wGACE,aAGJ,wFACE,gBACA,YACA","file":"multiselect.css"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class a extends HTMLElement{constructor(){var t;super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=o=>(Array.from(o.querySelectorAll("dialog[open]")).forEach((t,a)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),E(t))}),o.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){const a=t.target.closest("[data-modal]"),s=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),n=document.querySelector(`dialog#${s}`);if(E(n),n.showModal(),n.focus(),!n.querySelector("iam-multi-step")){const i=n.offsetWidth;n.setAttribute("style",`max-width: ${i}px;`)}Array.from(n.querySelectorAll("[data-duplicate]")).forEach((i,f)=>{const h=i.getAttribute("data-duplicate"),d=document.getElementById(h);if(i.checked!=d.checked){i.checked=d.checked;const w=new Event("change");i.dispatchEvent(w)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:s})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){const a=t.target.closest("dialog[open]");t.preventDefault(),a.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((n,i)=>{n.classList.remove("active")});const s=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:a.id}});t.target.dispatchEvent(s),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){const a=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((s,n)=>{s.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){let a=t.target.closest("dialog[open]");if(window.getComputedStyle(a).display==="contents"&&(a=a.parentNode.closest("dialog[open]")),!a.classList.contains("dialog--transactional")&&!a.classList.contains("dialog--acknowledgement")){const n=a.getBoundingClientRect();(t.clientX<n.left||t.clientX>n.right||t.clientY<n.top||t.clientY>n.bottom)&&(t.target.closest("dialog *")||a.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();const a=t.target.closest(".dialog__wrapper > button"),s=a.parentNode;let n="openPopover";const i=s.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=i&&a.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((w,_)=>{w.removeAttribute("aria-expanded")}),i.hasAttribute("open"))i.close(),n="closePopover",i.removeAttribute("style"),a.removeAttribute("aria-expanded");else{i.show(),a.setAttribute("aria-expanded",!0);const w=a.getBoundingClientRect();let _=w.top,e=w.left;if(a.closest("iam-table")){const r=a.closest("iam-table").parentNode.getBoundingClientRect();_-=r.top,e-=r.left}i.classList.contains("dialog--fix")&&i.setAttribute("style",`position:fixed;top: ${_}px; left: ${e}px; margin: 3rem 0 0 0;`)}let f=i.getBoundingClientRect();const h=f.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(h>d){const w=i.hasAttribute("style")?i.getAttribute("style")+" ":"";i.setAttribute("style",w+"transform: translate(0, calc(-100% - 4rem))"),f=i.getBoundingClientRect(),f.top-window.scrollY<100&&i.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:n,id:a.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach((a,s)=>{a.removeAttribute("aria-expanded")}))}),null),E=o=>{if(!o.querySelector(":scope .mh-lg")&&!o.querySelector("iam-multi-step")){o.innerHTML=`<div class="mh-lg">${o.innerHTML}</div>`;const t=o.querySelector(".mh-lg"),a=o.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){const s=a.previousSibling;t.before(a),s&&a.before(s)}}o.querySelector(":scope > button:first-child")||o.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function q(o,t){o&&t=="all"?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!0,o.querySelector("label").textContent="Select all"):o&&t==0?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!1,o.querySelector("label").textContent="Select all"):o&&t?(o.querySelector("input").indeterminate=!0,o.querySelector("input").checked=!1,o.querySelector("label").textContent=`${t} item${t>1?"s":""} selected`):o&&(o.querySelector("input").checked=!1,o.querySelector("input").indeterminate=!1,o.querySelector("label").textContent="Select all")}class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import x from"js-cookie";var g=function(S,c,a,i){function n(u){return u instanceof a?u:new a(function(p){p(u)})}return new(a||(a=Promise))(function(u,p){function b(d){try{m(i.next(d))}catch(f){p(f)}}function v(d){try{m(i.throw(d))}catch(f){p(f)}}function m(d){d.done?u(d.value):n(d.value).then(b,v)}m((i=i.apply(S,c||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class j extends HTMLElement{constructor(){var c;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function A(o,i){function u(e,t,r=!0){let p=!1,a=t.getAttribute("name");if(!a)return!1;a.includes("[]")&&(a=a.replace("[]",`[${t.value}]`));let s=e.querySelector(`[data-name="${a}"]`);s&&t.getAttribute("type")=="checkbox"&&(p=!t.checked);const h=t.getAttribute("data-filter-text");if(s||(s=document.createElement("button"),e.appendChild(s)),s.setAttribute("type","button"),s.classList.add("filter"),s.classList.add("tag"),r&&s.classList.add("tag--not-set"),s.setAttribute("data-name",a),s.innerHTML=h.replace("$value",t.value),(!t.value||p)&&s.remove(),t.parentNode.closest("[data-filter-text]")){const c=t.parentNode.closest("[data-filter-text]");let l=!0;if(a="",c.querySelectorAll("input").forEach((f,n)=>{const m=f.getAttribute("name");if(a+=`${n!=0?",":""}${m}`,e.querySelector(`[data-name="${m}"]`)&&e.querySelector(`[data-name="${m}"]`).remove(),f.value){const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r&&s.classList.add("tag--not-set"),d.setAttribute("data-name",m),d.innerHTML=h.replace("$value",f.value),e.appendChild(d)}else l=!1}),e.querySelector(`[data-name="${a}"]`)&&e.querySelector(`[data-name="${a}"]`).remove(),l){let f=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((m,d)=>{const y=m.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),f=f.replace(`$${d+1}`,m.value)});const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r&&s.classList.add("tag--not-set"),n.setAttribute("data-name",a),n.innerHTML=f,e.appendChild(n)}}}Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{u(i,e,!1)});const b=o.closest("dialog");b&&new MutationObserver(function(t){t[0].attributeName=="open"&&Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((r,p)=>{u(i,r,!1)})}).observe(b,{attributes:!0}),o.addEventListener("tags-set",function(e){i.innerHTML="",Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((t,r)=>{u(i,t,!1)})}),Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{e.addEventListener("change",function(r){o.hasAttribute("data-keep-same")||u(i,e),r.stopPropagation()})}),o.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){const t=e.target.closest("input[data-filter-text]");o.hasAttribute("data-keep-same")||u(i,t)}}),i.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const t=e.target.closest(".filter"),r=t.getAttribute("data-name").split(",");for(let p=0;p<r.length;p++){const a=r[p];let s=`[name="${a}"]`;a.match(/\[(.*)\]/)&&(a.replace(/\[(.*)\]/,"[]"),s=`[value="${a.replace(/.*\[(.*)\]/,"$1")}"]`);const h=o.querySelectorAll(s);for(let c=0;c<h.length;c++){const l=h[c];if(l.getAttribute("type")!="radio"&&l.getAttribute("type")!="checkbox"){l.value="";var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}else{l.checked=!1;var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}}}t.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",u=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,b=this.classList.toString(),e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const x=(e,t)=>{for(let a=1;a<=10;a++){if(e.hasAttribute(`data-colour-${a}`)){const i=e.getAttribute(`data-colour-${a}`);e.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${i})`),e.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${i}-hover)`)}Array.from(t.querySelectorAll(`[data-colour-${a}]`)).forEach(i=>{const r=i.getAttribute(`data-colour-${a}`);i.style.setProperty(`--chart-colour-${a}-set`,`var(--chart-colour-${r})`),i.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${r}-hover)`)})}return!0},u=(e,t,a)=>{const i=t.querySelector(".chart__key");i.innerHTML="";const r=t.querySelector(".chart__guidelines");r.innerHTML="";const o=t.querySelector(".chart__yaxis");o.innerHTML="",Array.from(t.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(n=>{n.remove()});const{xaxis:c}=d(e);return _(e,a),S(t,a,i),q(e,r),M(e,o),c&&T(t),!0},k=function(e,t){const a=t.querySelector(".chart");a.addEventListener("mousemove",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest("td:not(:first-child")){const l=c.target.closest("td:not(:first-child").getBoundingClientRect(),s=c.clientX-l.left,h=c.clientY-l.top;a.setAttribute("style",`--cursor-x: ${s}px; --cursor-y: ${h}px;`)}});const i=t.querySelectorAll("label");Array.from(i).forEach(c=>{t.querySelector(`input#${c.getAttribute("for")}`).checked?c.setAttribute("part","key-checked"):c.setAttribute("part","key-unchecked")});const r=e.querySelector("table"),o=t.querySelector("table");t.addEventListener("change",function(c){const n=c.target,l=new CustomEvent("view-change",{detail:{"data-dataset":n.getAttribute("data-dataset"),label:n.getAttribute("data-label"),checked:n.checked}});e.dispatchEvent(l),Array.from(i).forEach(s=>{var h;!((h=t.querySelector(`input#${s.getAttribute("for")}`))===null||h===void 0)&&h.checked?s.setAttribute("part","key-checked"):s.setAttribute("part","key-unchecked")}),o.innerHTML=r.innerHTML,_(e,o)})},A=function(e,t){const a=e.querySelector("table"),i=t.querySelector("table"),r=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},o=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},c=new MutationObserver(o),n=new MutationObserver(r);return c.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0}),!0},d=function(e){const t=e.shadowRoot.querySelector(".chart__wrapper table"),a=e.hasAttribute("data-min")?e.getAttribute("data-min"):0,i=e.hasAttribute("data-max")?e.getAttribute("data-max"):z(e,t),r=e.hasAttribute("data-yaxis")?e.getAttribute("data-yaxis").split(","):[],o=e.hasAttribute("data-guidelines")?e.getAttribute("data-guidelines").split(","):[],c=e.hasAttribute("data-xaxis")?e.getAttribute("data-xaxis").split(","):null;return{min:a,max:i,yaxis:r,xaxis:c,guidelines:o}};function z(e,t){const a=e.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",i=Array.from(t.querySelectorAll(a)).map(o=>o.getAttribute("data-numeric")),r=Math.max(...i);return Math.ceil(r)}const b=function(e,t,a,i){let r=String(e);r=r.replace("\xA3",""),r=r.replace("%",""),r=r.replace(",",""),r=Number.parseFloat(r);let o=(r-t)/(a-t)*100,c=o,n=0;return i&&i!=0&&(n=(i-t)/(a-t)*100),t<0&&(n=Math.abs(t/(a-t)*100),r<0?(o=n-o,n=n-o,c=n):(o=o-n,c=o+n)),{percent:o,axis:c,bottom:n}},_=function(e,t){Array.from(t.querySelectorAll("tbody tr")).forEach(r=>{let o=0;Array.from(r.querySelectorAll("td:not(:first-child)")).forEach(c=>{const n=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));c.setAttribute("data-numeric",n),c.setAttribute("data-value",c.textContent),getComputedStyle(c).display!="none"&&(o+=n)}),r.setAttribute("data-numeric",o)});const{min:a,max:i}=d(e);Array.from(t.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.querySelector("td:first-child, th:first-child")?r.querySelector("td:first-child, th:first-child").textContent:"";r.setAttribute("part","group");const n=(r.getAttribute("data-numeric")-a)/(i-a)*100;r.style.setProperty("--percent",`${n}%`),Array.from(r.querySelectorAll("td:not([data-label])")).forEach((h,p)=>{p==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),r.querySelectorAll("td").length>2&&h.setAttribute("data-label",t.querySelectorAll("thead th")[p].textContent)});const l=r.hasAttribute("data-min")?r.getAttribute("data-min"):a,s=r.hasAttribute("data-max")?r.getAttribute("data-max"):i;if(l<0){const h=Math.abs(l/(s-l)*100);e.setAttribute("style",`--min-bottom: ${h}%;`)}r.style.setProperty("--row-index",o+1),Array.from(r.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(h=>{if(getComputedStyle(h).display=="none")return;const f=h.innerHTML,v=Number.parseFloat(h.getAttribute("data-numeric")),m=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${c}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${f}</span>`),!h.hasAttribute("style")){const{percent:y,bottom:g,axis:w}=b(v,l,s,m);h.setAttribute("data-percent",y),h.setAttribute("style",`--bottom:${g}%;--percent:${y}%;--axis:${w}%;`)}})})},C=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart__spacer span"),i=e.querySelector(".chart table");let r="";Array.from(i.querySelectorAll("tbody tr td:first-child")).forEach(o=>{typeof o.textContent<"u"&&o.textContent.length>r.length&&(r=o.textContent)}),t.setAttribute("data-longest-label",r),a.innerHTML=r},$=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart table");let i="";Array.from(a.querySelectorAll("tbody tr td:not(:first-child) span")).forEach(r=>{typeof r.textContent<"u"&&r.textContent.length>i.length&&(i=r.textContent)}),t.setAttribute("data-longest-value",i)},S=function(e,t,a){const i=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let r;const o=Array.from(t.querySelectorAll("thead th"));return o.forEach((c,n)=>{n!=0&&(r=L(i,n,c.textContent,a,e,r)),n==50&&(o.length=n+1)}),!0};function L(e,t,a,i,r,o){const c=document.createElement("input");c.setAttribute("name",`${e}-dataset-${t}`),c.setAttribute("id",`${e}-dataset-${t}`),c.setAttribute("data-dataset",`${t}`),c.setAttribute("data-label",`${a}`),c.checked=!0,c.setAttribute("type","checkbox"),t==1?r.prepend(c):r.insertBefore(c,o.nextSibling),o=c;const n=document.createElement("label");return n.setAttribute("class","key btn btn-action"),n.setAttribute("for",`${e}-dataset-${t}`),n.setAttribute("data-label",`${a}`),n.setAttribute("part","key"),n.innerHTML=`${a}`,i.append(n),o}const q=function(e,t){let{min:a,max:i,yaxis:r,guidelines:o}=d(e);o.length||(o=r),t.innerHTML="";for(let c=0;c<o.length;c++){const n=parseFloat(o[c].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=b(n,a,i);t.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${r.indexOf(o[c])!=-1?`<span>${o[c]}</span>`:""}</div>`}},M=function(e,t){const{min:a,max:i,yaxis:r}=d(e);t.innerHTML="";for(let o=0;o<r.length;o++){const c=parseFloat(r[o].replace("\xA3","").replace("%","")),{axis:n}=b(c,a,i);t.innerHTML+=`<div class="axis__point" style="--percent:${n}%;"><span>${r[o]}</span></div>`}},T=function(e){const t=e.querySelector(".chart");let a=e.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),t.prepend(a)},F=function(e){const t=e.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(t).forEach(a=>{const i=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;a.innerHTML=`<button class="tooltip" popovertarget="${i}" part="tooltip" style="anchor-name: --${i};">${a.textContent}</button><span id="${i}" style="position-anchor: --${i};" popover part="tooltip__content" class="tooltip__content">${a.getAttribute("title")}</span>`})},H=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},D=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(i=>{e.addEventListener(i,function(r){const o={event:i,element:t,target:r.target};Object.keys(r.detail).forEach(c=>{const n=r.detail[c];o[c]=n}),window.dataLayer.push(o)})}),!0);H("iam-barchart");class E extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const m=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})},g=(r,t,i)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),i.forEach(e=>{r.addEventListener(e,function(n){const d={event:e,element:t,target:n.target};Object.keys(n.detail).forEach(o=>{const a=n.detail[o];d[o]=a}),window.dataLayer.push(d)})}),!0),b=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const M=function(e){const o=[];return Array.from(e.querySelectorAll(":scope > div")).forEach((n,t)=>{n.hasAttribute("data-thumbnail")&&(o[t]=n.getAttribute("data-thumbnail"))}),o},W=function(e,o){const n=e.querySelectorAll(":scope > div").length;let t="";for(let a=1;a<=n;a++){let r=null,i="";o.length&&o[a-1]?(i="has-thumbnail",r=`<img src="${o[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,t+=`<button class="control-${a} ${i}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return t},z=function(e,o){return o==1?e:Math.ceil(e/o)*o-o+1},A=function(e,o){return(e-1)/(o-1)*100},$=function(e){let o;const n=e.shadowRoot.querySelector(".carousel"),t=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),i=e.querySelectorAll(":scope > div").length;let v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y);r.setAttribute("min",1),r.setAttribute("step",g);let d=z(i,g);r.setAttribute("max",d),r.value=1;let p=A(1,d);r.style.setProperty("--percent",p+"%");let f,S="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(S="touchend",L="touchstart"),t.addEventListener("scroll",function(h){clearTimeout(o),o=setTimeout(function(){const s=t.clientWidth,m=t.scrollWidth,b=t.scrollLeft;let l=Math.round(b/m*i)+1;const _=e.querySelector(":scope > div").scrollWidth,w=e.querySelector(":scope > div:last-child").offsetLeft,k=t.scrollLeft+s+t.getBoundingClientRect().left>=w+60,u=Math.round(s/_),c=Math.ceil(i/u)*u-i;r.setAttribute("step",u),c>0&&k&&(l=Math.floor(i/u)*u+1),Array.from(n.querySelectorAll(".carousel__controls button")).forEach((x,E)=>{x.removeAttribute("aria-current")}),n.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?n.querySelector(".btn-prev").setAttribute("disabled","disabled"):n.querySelector(".btn-prev").removeAttribute("disabled"),l>i-u?n.querySelector(".btn-next").setAttribute("disabled","disabled"):n.querySelector(".btn-next").removeAttribute("disabled"),r.value=l,d=z(i,u),r.setAttribute("max",d),p=l/d*100,p=A(l,d),r.style.setProperty("--percent",p+"%")},100)},!1),a.addEventListener("click",function(h){for(let s=h.target;s&&s!=this;s=s.parentNode)if(typeof s.matches=="function"&&s.matches("button")){h.preventDefault(),Array.from(a.querySelectorAll("button")).forEach((l,_)=>{l.removeAttribute("aria-current")}),s.setAttribute("aria-current",!0);const m=new CustomEvent("pip-clicked",{detail:{slide:s.getAttribute("data-slide")}});e.dispatchEvent(m);const b=e.querySelector(`:scope > *:nth-child(${s.getAttribute("data-slide")})`);t.scroll({top:0,left:b.offsetLeft-t.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(h){const s=t.clientWidth;t.scrollWidth;const m=e.querySelector(":scope > div").scrollWidth,b=Math.round(s/m),l=e.querySelector(":scope > div:last-child").offsetLeft,_=t.scrollLeft+s+t.getBoundingClientRect().left>=l+60,w=Math.ceil(i/b)*b-i,k=b-w,u=_&&w>0?k*m:t.clientWidth;for(let c=h.target;c&&c!=this;c=c.parentNode)if(typeof c.matches=="function"&&c.matches(".btn-next, .btn-prev")){const x=c.matches(".btn-next")?"next":"prev",E=new CustomEvent(`${x}-clicked`,{detail:{slide:c.getAttribute("data-go")}});e.dispatchEvent(E),h.preventDefault();const q=c.classList.contains("btn-prev")?t.scrollLeft-u:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(h){clearInterval(f),f=setInterval(function(){v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y),r.setAttribute("step",g),d=z(i,g),r.setAttribute("max",d),p=A(r.value,d),r.style.setProperty("--percent",p+"%")},10)}),r.addEventListener(S,function(h){clearInterval(f)}),r.addEventListener("change",function(h){clearInterval(f);const s=e.querySelector(`:scope > *:nth-child(${r.value})`);t.scroll({top:0,left:s?s.offsetLeft-t.getBoundingClientRect().left:0,behavior:"smooth"}),s.matches(".btn-next");const m=new CustomEvent("slider-changed",{detail:{slide:r.value}});e.dispatchEvent(m)},!1)},C=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},P=(e,o,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),n.forEach(t=>{e.addEventListener(t,function(a){const r={event:t,element:o,target:a.target};Object.keys(a.detail).forEach(i=>{const v=a.detail[i];r[i]=v}),window.dataLayer.push(r)})}),!0);C("iam-carousel");class I extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class a extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function v(d,s){const n=s.querySelector(".files"),i=s.querySelector(".drop-area"),e=d.querySelector("input"),f=d.hasAttribute("data-maxsize")?d.getAttribute("data-maxsize"):0,u=s.querySelector(".invalid-feedback.size"),h=s.querySelector(".invalid-feedback.ext"),o=e.cloneNode();i.append(o);const b=function(t){if(!e.hasAttribute("accept"))return!0;const r=t.split(".").pop();return!!e.getAttribute("accept").includes(r)};if(s.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(t.target.closest(".btn-primary"),h.classList.remove("d-block"),u.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),s.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const r=new DataTransfer,{files:a}=e,m=t.target.closest(".files button");for(let p=0;p<a.length;p++){const l=a[p];l.name!=m.getAttribute("data-file")&&r.items.add(l)}e.files=r.files;const c=new Event("change");e.dispatchEvent(c)}}),o.addEventListener("change",t=>{if(e.hasAttribute("multiple")){const a=[...e.files,...o.files],m=[],c=new DataTransfer;for(let p=0;p<a.length;p++){const l=a[p],g=l.size/1e3;!m.includes(l.name)&&(f==0||g<f)&&b(l.name)&&c.items.add(l),b(l.name)||h.classList.add("d-block"),g>f&&u.classList.add("d-block"),m.push(l.name)}e.files=c.files}else e.files=o.files;const r=new Event("change");e.dispatchEvent(r)}),o.addEventListener("dragenter",t=>{o.classList.add("focus")}),o.addEventListener("dragleave",t=>{o.classList.remove("focus")}),o.addEventListener("drop",t=>{o.classList.remove("focus")}),e.addEventListener("change",t=>{if(e.files.length==1){const a=e.files[0],m=a.size/1e3;if(!b(a.name)){h.classList.add("d-block");const c=new DataTransfer;e.files=c.files}if(m>f){u.classList.add("d-block");const c=new DataTransfer;e.files=c.files}}n.innerHTML="";for(const a of e.files)n.innerHTML+=`<span class="file" part="file">${a.name} <button data-file="${a.name}">Remove</button></span>`;const r=new CustomEvent("elementchange",{detail:{files:e.files}});if(d.dispatchEvent(r),e.files.length==0){const a=new CustomEvent("empty");d.dispatchEvent(a)}}),d.hasAttribute("data-filename")){const t=d.getAttribute("data-filename");t&&(n.innerHTML=`<span class="file">${t} <button data-file="${t}">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class y extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const h=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},p=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(o=>{e.addEventListener(o,function(i){const r={event:o,element:t,target:i.target};Object.keys(i.detail).forEach(d=>{const s=i.detail[d];r[d]=s}),window.dataLayer.push(r)})}),!0),g=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function i(s,t){n(s,t)}function n(s,t){let e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach((e,a)=>{const r=e.textContent.toLowerCase();e.classList.add("d-none"),r.includes(t.toLowerCase())&&e.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:t})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class b extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",c=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -142,6 +142,11 @@ class iamMultiselect extends HTMLElement {
142
142
  const checkbox = event.target.closest('input[type="checkbox"]');
143
143
  setItem(checkbox);
144
144
  search.focus();
145
+ clearTimeout(hoverTimeout);
146
+ multiselect.classList.add('hover');
147
+ hoverTimeout = setTimeout(function () {
148
+ multiselect.classList.remove('hover');
149
+ }, 5000);
145
150
  }
146
151
  });
147
152
  // Clear all
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",l=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
5
5
  <style>
6
6
  @import "${l}";
7
- .outer{position:relative;max-width:var(--input-max-width, 50rem);display:block}label{margin-bottom:0;padding-bottom:.5rem}.wrapper{margin-bottom:1.5rem;max-width:var(--input-max-width, 50rem)}.wrapper:after{content:"";display:block;position:absolute;top:100%;left:0;width:100%;height:1rem}.wrapper input{margin-bottom:0.5rem}.wrapper .feedback{position:absolute;right:0;bottom:100%;padding:.85rem;width:min-content;white-space:nowrap;margin-bottom:.5rem;display:none}.wrapper.was-validated .feedback{display:block}.wrapper.filled{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;min-height:calc(2.75rem + 4px);padding:0.5rem 2rem 0rem 0.8125rem;font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);color:var(--colour-body);background-color:var(--colour-canvas-2);border:2px solid var(--colour-primary);border-radius:0.5rem}.wrapper.filled:is(:focus-within,.focus-within):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}.wrapper.filled input{all:unset;font-size:1rem;line-height:1.625rem;display:inline-block;width:0;flex-grow:1;padding:0 0.5rem 0 0 !important;margin-inline:0.1875rem;order:999;margin-bottom:0.5rem}.wrapper.filled .feedback{display:none !important}.wrapper.filled:is(:focus,.focus):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}button{position:absolute;top:.75rem;right:.5rem;border:none;background:none;padding-inline:.5rem;display:var(--display-button, none)}button:after{content:"\u2715";font-weight:bold}.dropdown{position:absolute;top:calc(100% + .5rem);padding:0;left:0;width:100%;margin:0;z-index:99;display:none;max-height:15.25rem !important;overflow:auto}.dropdown:before{display:none}.wrapper:is(:focus-within) .dropdown{display:var(--display-panel, none)}@media(hover: hover){.wrapper .dropdown:hover{display:var(--display-panel, none)}}@media(hover: none){:host-context(.hover) .wrapper .dropdown{display:block}}:host-context(:focus-within) input{background-color:none !important}:host-context(iam-inline-edit){display:block;--display-btns: none}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]),:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) input,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover input{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) .dropdown,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover .dropdown{display:none}:host-context(iam-inline-edit) .wrapper{margin-bottom:0}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) input{border:none;background:none;margin-left:-1rem;width:calc(100% + 1rem);max-width:calc(100% + 1rem);box-shadow:none}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) .dropdown{display:none}:host-context(iam-inline-edit) .wrapper.filled:not(:focus-within):not([data-mousedown]){background:none;border:none;padding-left:0}/*# sourceMappingURL=assets/css/components/multiselect.css.map */
7
+ .outer{position:relative;max-width:var(--input-max-width, 50rem);display:block}label{margin-bottom:0;padding-bottom:.5rem}.wrapper{margin-bottom:1.5rem;max-width:var(--input-max-width, 50rem)}.wrapper:after{content:"";display:block;position:absolute;top:100%;left:0;width:100%;height:1rem}.wrapper input{margin-bottom:0.5rem}.wrapper .feedback{position:absolute;right:0;bottom:100%;padding:.85rem;width:min-content;white-space:nowrap;margin-bottom:.5rem;display:none}.wrapper.was-validated .feedback{display:block}.wrapper.filled{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;min-height:calc(2.75rem + 4px);padding:0.5rem 2rem 0rem 0.8125rem;font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);color:var(--colour-body);background-color:var(--colour-canvas-2);border:2px solid var(--colour-primary);border-radius:0.5rem}.wrapper.filled:is(:focus-within,.focus-within):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}.wrapper.filled input{all:unset;font-size:1rem;line-height:1.625rem;display:inline-block;width:0;flex-grow:1;padding:0 0.5rem 0 0 !important;margin-inline:0.1875rem;order:999;margin-bottom:0.5rem}.wrapper.filled .feedback{display:none !important}.wrapper.filled:is(:focus,.focus):not(:disabled){border-color:var(--colour-info);outline:0;box-shadow:0 0 0 .1rem rgba(30,190,230,.25)}button{position:absolute;top:.75rem;right:.5rem;border:none;background:none;padding-inline:.5rem;display:var(--display-button, none)}button:after{content:"\u2715";font-weight:bold}.dropdown{position:absolute;top:calc(100% + .5rem);padding:0;left:0;width:100%;margin:0;z-index:99;display:none;max-height:15.25rem !important;overflow:auto}.dropdown:before{display:none}.wrapper:is(:focus-within) .dropdown{display:var(--display-panel, none)}@media(hover: hover){.wrapper .dropdown:hover{display:var(--display-panel, none)}}@media(hover: none){:host(.hover) .wrapper .dropdown{display:block}}:host-context(:focus-within) input{background-color:none !important}:host-context(iam-inline-edit){display:block;--display-btns: none}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]),:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) input,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover input{background-color:var(--colour-light)}:host-context(iam-inline-edit) label:hover+.outer:not(:focus-within) .wrapper:not([data-mousedown]) .dropdown,:host-context(iam-inline-edit) .outer:not(:focus-within) .wrapper:not([data-mousedown]):hover .dropdown{display:none}:host-context(iam-inline-edit) .wrapper{margin-bottom:0}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) input{border:none;background:none;margin-left:-1rem;width:calc(100% + 1rem);max-width:calc(100% + 1rem);box-shadow:none}:host-context(iam-inline-edit) .wrapper:not(.filled):not(:focus-within):not([data-mousedown]) .dropdown{display:none}:host-context(iam-inline-edit) .wrapper.filled:not(:focus-within):not([data-mousedown]){background:none;border:none;padding-left:0}/*# sourceMappingURL=assets/css/components/multiselect.css.map */
8
8
 
9
9
  ${this.hasAttribute("css")?`@import "${this.getAttribute("css")}";`:""}
10
10
  </style>
@@ -22,5 +22,5 @@
22
22
  </div>
23
23
  </div>
24
24
  </label>
25
- `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const t=this,l=this.closest("form"),r=this.shadowRoot.querySelector(".wrapper"),a=t.shadowRoot.querySelector("#search"),h=t.shadowRoot.querySelector("#clear");let i=0;const m=t.shadowRoot.querySelector("label .inner-label");if(m.innerHTML=t.getAttribute("data-label"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")),t.setAttribute("data-error","true"),l&&t.hasAttribute("data-is-required")){const e=new MutationObserver(function(o){o.forEach(function(n){const s=n.target;console.log(s),s.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated")})});l.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated"),e.observe(l,{attributes:!0,attributeFilter:["style","class"]})}function c(e){e.checked==!1?(e.closest("label").removeAttribute("slot"),e.closest("label").removeAttribute("style"),e.closest("label").removeAttribute("data-order")):(i++,e.closest("label").setAttribute("slot","checked"),e.closest("label").setAttribute("style",`--order:${i};`),e.closest("label").setAttribute("data-order",i)),t.querySelector('label[slot="checked"]')?(r.classList.add("filled"),t.removeAttribute("data-error"),a.removeAttribute("placeholder")):(r.classList.remove("filled"),t.setAttribute("data-error","true"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")))}Array.from(t.querySelectorAll('label input[type="checkbox"]:checked')).forEach((e,o)=>{c(e)}),a.addEventListener("input",e=>{Array.from(t.querySelectorAll('label:not([slot="checked"])')).forEach((o,n)=>{const d=o.querySelector("input").value,b=o.textContent;d.toLowerCase().includes(a.value.toLowerCase())||b.toLowerCase().includes(a.value.toLowerCase())?o.removeAttribute("slot"):o.setAttribute("slot","notmatched")})});let u;t.addEventListener("focus",e=>{t.classList.add("hover"),clearTimeout(u)}),a.addEventListener("blur",e=>{clearTimeout(u),u=setTimeout(function(){t.classList.remove("hover")},1e3)}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest('input[type="checkbox"]')){const o=e.target.closest('input[type="checkbox"]');c(o),a.focus()}}),h.addEventListener("click",function(e){Array.from(t.querySelectorAll('label input[type="checkbox"]')).forEach((o,n)=>{o.checked=!1,c(o)}),a.focus()}),t.addEventListener("keydown",function(e){const o=document.activeElement;switch(e.key){case"ArrowUp":if(e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=t.querySelectorAll('label:not([slot="checked"]):not([slot="checked"])'),s=Array.from(n).indexOf(o.closest("label")),d=Array.from(n)[s-1];d?d.focus():a.focus()}break;case"ArrowDown":if(e.preventDefault(),o==t)t.querySelector('label:not([slot="checked"]):not([slot="checked"])').focus();else if(o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=o.value,s=t.querySelector(`label:has(input[value="${n}"]) ~ label:not([slot="checked"]):not([slot="checked"])`);s&&s.focus()}break;case"Enter":e.stopPropagation(),e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"&&(o.checked==!1?o.checked=!0:o.checked=!1),c(o),a.focus();break}});function p(){if(i==0)return!1;let e=t.querySelector(`label[data-order="${i}"]`);return e||(e=p(i--)),e}a.addEventListener("keydown",function(e){switch(e.key){case"Enter":t.querySelector(`input[value="${a.value}"]:not(:checked)`)||(a.value=""),a.focus();break;case"Backspace":if(!a.value){const n=p();if(n){const s=n.querySelector("input");s.checked=!1,c(s)}a.focus()}break}}),t.addEventListener("mousedown",e=>{r.setAttribute("data-mousedown","true")}),t.addEventListener("mouseup",e=>{r.removeAttribute("data-mousedown")})}}export{f as default};
25
+ `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const t=this,l=this.closest("form"),r=this.shadowRoot.querySelector(".wrapper"),a=t.shadowRoot.querySelector("#search"),h=t.shadowRoot.querySelector("#clear");let i=0;const m=t.shadowRoot.querySelector("label .inner-label");if(m.innerHTML=t.getAttribute("data-label"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")),t.setAttribute("data-error","true"),l&&t.hasAttribute("data-is-required")){const e=new MutationObserver(function(o){o.forEach(function(n){const s=n.target;console.log(s),s.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated")})});l.classList.contains("was-validated")?r.classList.add("was-validated"):r.classList.remove("was-validated"),e.observe(l,{attributes:!0,attributeFilter:["style","class"]})}function c(e){e.checked==!1?(e.closest("label").removeAttribute("slot"),e.closest("label").removeAttribute("style"),e.closest("label").removeAttribute("data-order")):(i++,e.closest("label").setAttribute("slot","checked"),e.closest("label").setAttribute("style",`--order:${i};`),e.closest("label").setAttribute("data-order",i)),t.querySelector('label[slot="checked"]')?(r.classList.add("filled"),t.removeAttribute("data-error"),a.removeAttribute("placeholder")):(r.classList.remove("filled"),t.setAttribute("data-error","true"),t.hasAttribute("placeholder")&&a.setAttribute("placeholder",t.getAttribute("placeholder")))}Array.from(t.querySelectorAll('label input[type="checkbox"]:checked')).forEach((e,o)=>{c(e)}),a.addEventListener("input",e=>{Array.from(t.querySelectorAll('label:not([slot="checked"])')).forEach((o,n)=>{const u=o.querySelector("input").value,b=o.textContent;u.toLowerCase().includes(a.value.toLowerCase())||b.toLowerCase().includes(a.value.toLowerCase())?o.removeAttribute("slot"):o.setAttribute("slot","notmatched")})});let d;t.addEventListener("focus",e=>{t.classList.add("hover"),clearTimeout(d)}),a.addEventListener("blur",e=>{clearTimeout(d),d=setTimeout(function(){t.classList.remove("hover")},1e3)}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest('input[type="checkbox"]')){const o=e.target.closest('input[type="checkbox"]');c(o),a.focus(),clearTimeout(d),t.classList.add("hover"),d=setTimeout(function(){t.classList.remove("hover")},5e3)}}),h.addEventListener("click",function(e){Array.from(t.querySelectorAll('label input[type="checkbox"]')).forEach((o,n)=>{o.checked=!1,c(o)}),a.focus()}),t.addEventListener("keydown",function(e){const o=document.activeElement;switch(e.key){case"ArrowUp":if(e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=t.querySelectorAll('label:not([slot="checked"]):not([slot="checked"])'),s=Array.from(n).indexOf(o.closest("label")),u=Array.from(n)[s-1];u?u.focus():a.focus()}break;case"ArrowDown":if(e.preventDefault(),o==t)t.querySelector('label:not([slot="checked"]):not([slot="checked"])').focus();else if(o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"){const n=o.value,s=t.querySelector(`label:has(input[value="${n}"]) ~ label:not([slot="checked"]):not([slot="checked"])`);s&&s.focus()}break;case"Enter":e.stopPropagation(),e.preventDefault(),o.hasAttribute("type")&&o.getAttribute("type")=="checkbox"&&(o.checked==!1?o.checked=!0:o.checked=!1),c(o),a.focus();break}});function p(){if(i==0)return!1;let e=t.querySelector(`label[data-order="${i}"]`);return e||(e=p(i--)),e}a.addEventListener("keydown",function(e){switch(e.key){case"Enter":t.querySelector(`input[value="${a.value}"]:not(:checked)`)||(a.value=""),a.focus();break;case"Backspace":if(!a.value){const n=p();if(n){const s=n.querySelector("input");s.checked=!1,c(s)}a.focus()}break}}),t.addEventListener("mousedown",e=>{r.setAttribute("data-mousedown","true")}),t.addEventListener("mouseup",e=>{r.removeAttribute("data-mousedown")})}}export{f as default};
26
26
  //# sourceMappingURL=multiselect.component.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiselect.component.min.js","sources":["multiselect.component.js"],"sourcesContent":["// @ts-nocheck\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'mutliselect',\n});\nclass iamMultiselect extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/multiselect.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <label for=\"search\" class=\"mb-0\"><span class=\"inner-label label\"></span> <slot name=\"feedback\"></slot>\n <div class=\"outer\">\n <div class=\"wrapper\">\n \n <slot name=\"checked\"></slot>\n <input name=\"search\" id=\"search\" autocomplete=\"off\" required part=\"search-input\"/>\n <span class=\"admin-panel feedback\">This field is required</span>\n <div class=\"admin-panel dropdown\" part=\"dropdown\">\n <slot></slot>\n </div>\n <button id=\"clear\"><span class=\"visually-hidden\">Clear</span></button>\n </div>\n </div>\n </label>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const multiselect = this;\n const form = this.closest('form');\n const wrapper = this.shadowRoot.querySelector('.wrapper');\n const search = multiselect.shadowRoot.querySelector('#search');\n const button = multiselect.shadowRoot.querySelector('#clear');\n let order = 0;\n const innerLabel = multiselect.shadowRoot.querySelector('label .inner-label');\n innerLabel.innerHTML = multiselect.getAttribute('data-label');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n multiselect.setAttribute('data-error', 'true');\n // If in form and is required lets watch for the form being submitted\n if (form && multiselect.hasAttribute('data-is-required')) {\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutationRecord) {\n const targetElement = mutationRecord.target;\n console.log(targetElement);\n if (targetElement.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n });\n });\n if (form.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n observer.observe(form, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n // Set the correct attributes\n function setItem(inputToSet) {\n if (inputToSet.checked == false) {\n inputToSet.closest('label').removeAttribute('slot');\n inputToSet.closest('label').removeAttribute('style');\n inputToSet.closest('label').removeAttribute('data-order');\n }\n else {\n order++;\n inputToSet.closest('label').setAttribute('slot', 'checked');\n inputToSet.closest('label').setAttribute('style', `--order:${order};`);\n inputToSet.closest('label').setAttribute('data-order', order);\n }\n // check for errors\n if (multiselect.querySelector('label[slot=\"checked\"]')) {\n wrapper.classList.add('filled');\n multiselect.removeAttribute('data-error');\n search.removeAttribute('placeholder');\n }\n else {\n wrapper.classList.remove('filled');\n multiselect.setAttribute('data-error', 'true');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n }\n }\n // Set on load\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]:checked`)).forEach((checkbox, index) => {\n setItem(checkbox);\n });\n // Filter list\n search.addEventListener('input', (event) => {\n Array.from(multiselect.querySelectorAll(`label:not([slot=\"checked\"])`)).forEach((label, index) => {\n const checkbox = label.querySelector('input');\n const searchValue = checkbox.value;\n const labelText = label.textContent;\n if (searchValue.toLowerCase().includes(search.value.toLowerCase()) ||\n labelText.toLowerCase().includes(search.value.toLowerCase())) {\n label.removeAttribute('slot');\n }\n else {\n label.setAttribute('slot', 'notmatched');\n }\n });\n });\n // Add a delayed hover effect for non hover devices\n let hoverTimeout;\n multiselect.addEventListener('focus', (event) => {\n multiselect.classList.add('hover');\n clearTimeout(hoverTimeout);\n });\n search.addEventListener('blur', (event) => {\n clearTimeout(hoverTimeout);\n hoverTimeout = setTimeout(function () {\n multiselect.classList.remove('hover');\n }, 1000);\n });\n // Set items\n multiselect.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input[type=\"checkbox\"]')) {\n const checkbox = event.target.closest('input[type=\"checkbox\"]');\n setItem(checkbox);\n search.focus();\n }\n });\n // Clear all\n button.addEventListener('click', function (event) {\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]`)).forEach((checkbox, index) => {\n checkbox.checked = false;\n setItem(checkbox);\n });\n search.focus();\n });\n // Add some keyboard features to keep it accessible\n multiselect.addEventListener('keydown', function (event) {\n const activeElement = document.activeElement;\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'ArrowUp':\n // Up pressed\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const arrCheckboxes = multiselect.querySelectorAll(`label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n const activeIndex = Array.from(arrCheckboxes).indexOf(activeElement.closest('label'));\n const prevCheckbox = Array.from(arrCheckboxes)[activeIndex - 1];\n if (prevCheckbox)\n prevCheckbox.focus();\n else\n search.focus();\n }\n break;\n case 'ArrowDown':\n // Down pressed\n event.preventDefault();\n if (activeElement == multiselect) {\n multiselect.querySelector('label:not([slot=\"checked\"]):not([slot=\"checked\"])').focus();\n }\n else if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const activeValue = activeElement.value;\n const nextCheckbox = multiselect.querySelector(`label:has(input[value=\"${activeValue}\"]) ~ label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n if (nextCheckbox)\n nextCheckbox.focus();\n }\n break;\n case 'Enter':\n event.stopPropagation();\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n if (activeElement.checked == false)\n activeElement.checked = true;\n else\n activeElement.checked = false;\n }\n setItem(activeElement);\n search.focus();\n break;\n }\n });\n function checkLastTag() {\n if (order == 0)\n return false;\n let lastTag = multiselect.querySelector(`label[data-order=\"${order}\"]`);\n if (!lastTag) {\n lastTag = checkLastTag(order--);\n }\n return lastTag;\n }\n search.addEventListener('keydown', function (event) {\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'Enter':\n const match = multiselect.querySelector(`input[value=\"${search.value}\"]:not(:checked)`);\n if (!match)\n search.value = '';\n search.focus();\n break;\n case 'Backspace':\n if (!search.value) {\n const lastTag = checkLastTag(order);\n if (lastTag) {\n const lastTagInput = lastTag.querySelector('input');\n lastTagInput.checked = false;\n setItem(lastTagInput);\n }\n search.focus();\n }\n break;\n }\n });\n // Fix for the inline edit multiselect\n multiselect.addEventListener('mousedown', (event) => {\n wrapper.setAttribute('data-mousedown', 'true');\n });\n multiselect.addEventListener('mouseup', (event) => {\n wrapper.removeAttribute('data-mousedown');\n });\n }\n}\nexport default iamMultiselect;\n"],"names":["iamMultiselect","assetLocation","coreCSS","template","multiselect","form","wrapper","search","button","order","innerLabel","observer","mutations","mutationRecord","targetElement","setItem","inputToSet","checkbox","index","event","label","searchValue","labelText","hoverTimeout","activeElement","arrCheckboxes","activeIndex","prevCheckbox","activeValue","nextCheckbox","checkLastTag","lastTag","lastTagInput"],"mappings":";;;IAEA,OAAO,UAAY,OAAO,WAAa,GACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAAS,aACb,CAAC,EACD,MAAMA,UAAuB,WAAY,CACrC,aAAc,CACV,QACA,KAAK,aAAa,CAAE,KAAM,MAAQ,CAAA,EAClC,MAAMC,EAAgB,SAAS,KAAK,aAAa,sBAAsB,EACjE,SAAS,KAAK,aAAa,sBAAsB,EACjD,UACAC,EAAU,SAAS,KAAK,aAAa,eAAe,EACpD,SAAS,KAAK,aAAa,eAAe,EAC1C,GAAGD,qBAEHE,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA,eAEdD;AAAA;AAAA;AAAA,MAET,KAAK,aAAa,KAAK,EAAI,YAAY,KAAK,aAAa,KAAK,MAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAiBpE,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,mBAAoB,CAChB,MAAMC,EAAc,KACdC,EAAO,KAAK,QAAQ,MAAM,EAC1BC,EAAU,KAAK,WAAW,cAAc,UAAU,EAClDC,EAASH,EAAY,WAAW,cAAc,SAAS,EACvDI,EAASJ,EAAY,WAAW,cAAc,QAAQ,EAC5D,IAAIK,EAAQ,EACZ,MAAMC,EAAaN,EAAY,WAAW,cAAc,oBAAoB,EAO5E,GANAM,EAAW,UAAYN,EAAY,aAAa,YAAY,EACxDA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAE9EA,EAAY,aAAa,aAAc,MAAM,EAEzCC,GAAQD,EAAY,aAAa,kBAAkB,EAAG,CACtD,MAAMO,EAAW,IAAI,iBAAiB,SAAUC,EAAW,CACvDA,EAAU,QAAQ,SAAUC,EAAgB,CACxC,MAAMC,EAAgBD,EAAe,OACrC,QAAQ,IAAIC,CAAa,EACrBA,EAAc,UAAU,SAAS,eAAe,EAChDR,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,CAEhE,CAAiB,CACjB,CAAa,EACGD,EAAK,UAAU,SAAS,eAAe,EACvCC,EAAQ,UAAU,IAAI,eAAe,EAGrCA,EAAQ,UAAU,OAAO,eAAe,EAE5CK,EAAS,QAAQN,EAAM,CACnB,WAAY,GACZ,gBAAiB,CAAC,QAAS,OAAO,CAClD,CAAa,EAGL,SAASU,EAAQC,EAAY,CACrBA,EAAW,SAAW,IACtBA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,MAAM,EAClDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,OAAO,EACnDA,EAAW,QAAQ,OAAO,EAAE,gBAAgB,YAAY,IAGxDP,IACAO,EAAW,QAAQ,OAAO,EAAE,aAAa,OAAQ,SAAS,EAC1DA,EAAW,QAAQ,OAAO,EAAE,aAAa,QAAS,WAAWP,IAAQ,EACrEO,EAAW,QAAQ,OAAO,EAAE,aAAa,aAAcP,CAAK,GAG5DL,EAAY,cAAc,uBAAuB,GACjDE,EAAQ,UAAU,IAAI,QAAQ,EAC9BF,EAAY,gBAAgB,YAAY,EACxCG,EAAO,gBAAgB,aAAa,IAGpCD,EAAQ,UAAU,OAAO,QAAQ,EACjCF,EAAY,aAAa,aAAc,MAAM,EACzCA,EAAY,aAAa,aAAa,GACtCG,EAAO,aAAa,cAAeH,EAAY,aAAa,aAAa,CAAC,EAGtF,CAEA,MAAM,KAAKA,EAAY,iBAAiB,sCAAsC,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAC1GH,EAAQE,CAAQ,CAC5B,CAAS,EAEDV,EAAO,iBAAiB,QAAUY,GAAU,CACxC,MAAM,KAAKf,EAAY,iBAAiB,6BAA6B,CAAC,EAAE,QAAQ,CAACgB,EAAOF,IAAU,CAE9F,MAAMG,EADWD,EAAM,cAAc,OAAO,EACf,MACvBE,EAAYF,EAAM,YACpBC,EAAY,cAAc,SAASd,EAAO,MAAM,aAAa,GAC7De,EAAU,YAAW,EAAG,SAASf,EAAO,MAAM,YAAW,CAAE,EAC3Da,EAAM,gBAAgB,MAAM,EAG5BA,EAAM,aAAa,OAAQ,YAAY,CAE3D,CAAa,CACb,CAAS,EAED,IAAIG,EACJnB,EAAY,iBAAiB,QAAUe,GAAU,CAC7Cf,EAAY,UAAU,IAAI,OAAO,EACjC,aAAamB,CAAY,CACrC,CAAS,EACDhB,EAAO,iBAAiB,OAASY,GAAU,CACvC,aAAaI,CAAY,EACzBA,EAAe,WAAW,UAAY,CAClCnB,EAAY,UAAU,OAAO,OAAO,CACvC,EAAE,GAAI,CACnB,CAAS,EAEDA,EAAY,iBAAiB,SAAWe,GAAU,CAC9C,GAAIA,GAASA,EAAM,kBAAkB,aAAeA,EAAM,OAAO,QAAQ,wBAAwB,EAAG,CAChG,MAAMF,EAAWE,EAAM,OAAO,QAAQ,wBAAwB,EAC9DJ,EAAQE,CAAQ,EAChBV,EAAO,MAAK,EAE5B,CAAS,EAEDC,EAAO,iBAAiB,QAAS,SAAUW,EAAO,CAC9C,MAAM,KAAKf,EAAY,iBAAiB,8BAA8B,CAAC,EAAE,QAAQ,CAACa,EAAUC,IAAU,CAClGD,EAAS,QAAU,GACnBF,EAAQE,CAAQ,CAChC,CAAa,EACDV,EAAO,MAAK,CACxB,CAAS,EAEDH,EAAY,iBAAiB,UAAW,SAAUe,EAAO,CACrD,MAAMK,EAAgB,SAAS,cAC/B,OAAQL,EAAM,IAC1B,CACgB,IAAK,UAGD,GADAA,EAAM,eAAc,EAChBK,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CACxF,MAAMC,EAAgBrB,EAAY,iBAAiB,mDAAmD,EAChGsB,EAAc,MAAM,KAAKD,CAAa,EAAE,QAAQD,EAAc,QAAQ,OAAO,CAAC,EAC9EG,EAAe,MAAM,KAAKF,CAAa,EAAEC,EAAc,CAAC,EAC1DC,EACAA,EAAa,MAAK,EAElBpB,EAAO,MAAK,EAEpB,MACJ,IAAK,YAGD,GADAY,EAAM,eAAc,EAChBK,GAAiBpB,EACjBA,EAAY,cAAc,mDAAmD,EAAE,MAAK,UAE/EoB,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,WAAY,CAC7F,MAAMI,EAAcJ,EAAc,MAC5BK,EAAezB,EAAY,cAAc,0BAA0BwB,0DAAoE,EACzIC,GACAA,EAAa,MAAK,EAE1B,MACJ,IAAK,QACDV,EAAM,gBAAe,EACrBA,EAAM,eAAc,EAChBK,EAAc,aAAa,MAAM,GAAKA,EAAc,aAAa,MAAM,GAAK,aACxEA,EAAc,SAAW,GACzBA,EAAc,QAAU,GAExBA,EAAc,QAAU,IAEhCT,EAAQS,CAAa,EACrBjB,EAAO,MAAK,EACZ,KACR,CACZ,CAAS,EACD,SAASuB,GAAe,CACpB,GAAIrB,GAAS,EACT,MAAO,GACX,IAAIsB,EAAU3B,EAAY,cAAc,qBAAqBK,KAAS,EACtE,OAAKsB,IACDA,EAAUD,EAAarB,GAAO,GAE3BsB,CACX,CACAxB,EAAO,iBAAiB,UAAW,SAAUY,EAAO,CAChD,OAAQA,EAAM,IAC1B,CACgB,IAAK,QACaf,EAAY,cAAc,gBAAgBG,EAAO,uBAAuB,IAElFA,EAAO,MAAQ,IACnBA,EAAO,MAAK,EACZ,MACJ,IAAK,YACD,GAAI,CAACA,EAAO,MAAO,CACf,MAAMwB,EAAUD,EAAkB,EAClC,GAAIC,EAAS,CACT,MAAMC,EAAeD,EAAQ,cAAc,OAAO,EAClDC,EAAa,QAAU,GACvBjB,EAAQiB,CAAY,EAExBzB,EAAO,MAAK,EAEhB,KACR,CACZ,CAAS,EAEDH,EAAY,iBAAiB,YAAce,GAAU,CACjDb,EAAQ,aAAa,iBAAkB,MAAM,CACzD,CAAS,EACDF,EAAY,iBAAiB,UAAYe,GAAU,CAC/Cb,EAAQ,gBAAgB,gBAAgB,CACpD,CAAS,CACL,CACJ"}
1
+ {"version":3,"file":"multiselect.component.min.js","sources":["multiselect.component.js"],"sourcesContent":["// @ts-nocheck\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'mutliselect',\n});\nclass iamMultiselect extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/multiselect.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <label for=\"search\" class=\"mb-0\"><span class=\"inner-label label\"></span> <slot name=\"feedback\"></slot>\n <div class=\"outer\">\n <div class=\"wrapper\">\n \n <slot name=\"checked\"></slot>\n <input name=\"search\" id=\"search\" autocomplete=\"off\" required part=\"search-input\"/>\n <span class=\"admin-panel feedback\">This field is required</span>\n <div class=\"admin-panel dropdown\" part=\"dropdown\">\n <slot></slot>\n </div>\n <button id=\"clear\"><span class=\"visually-hidden\">Clear</span></button>\n </div>\n </div>\n </label>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const multiselect = this;\n const form = this.closest('form');\n const wrapper = this.shadowRoot.querySelector('.wrapper');\n const search = multiselect.shadowRoot.querySelector('#search');\n const button = multiselect.shadowRoot.querySelector('#clear');\n let order = 0;\n const innerLabel = multiselect.shadowRoot.querySelector('label .inner-label');\n innerLabel.innerHTML = multiselect.getAttribute('data-label');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n multiselect.setAttribute('data-error', 'true');\n // If in form and is required lets watch for the form being submitted\n if (form && multiselect.hasAttribute('data-is-required')) {\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutationRecord) {\n const targetElement = mutationRecord.target;\n console.log(targetElement);\n if (targetElement.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n });\n });\n if (form.classList.contains('was-validated')) {\n wrapper.classList.add('was-validated');\n }\n else {\n wrapper.classList.remove('was-validated');\n }\n observer.observe(form, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n // Set the correct attributes\n function setItem(inputToSet) {\n if (inputToSet.checked == false) {\n inputToSet.closest('label').removeAttribute('slot');\n inputToSet.closest('label').removeAttribute('style');\n inputToSet.closest('label').removeAttribute('data-order');\n }\n else {\n order++;\n inputToSet.closest('label').setAttribute('slot', 'checked');\n inputToSet.closest('label').setAttribute('style', `--order:${order};`);\n inputToSet.closest('label').setAttribute('data-order', order);\n }\n // check for errors\n if (multiselect.querySelector('label[slot=\"checked\"]')) {\n wrapper.classList.add('filled');\n multiselect.removeAttribute('data-error');\n search.removeAttribute('placeholder');\n }\n else {\n wrapper.classList.remove('filled');\n multiselect.setAttribute('data-error', 'true');\n if (multiselect.hasAttribute('placeholder')) {\n search.setAttribute('placeholder', multiselect.getAttribute('placeholder'));\n }\n }\n }\n // Set on load\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]:checked`)).forEach((checkbox, index) => {\n setItem(checkbox);\n });\n // Filter list\n search.addEventListener('input', (event) => {\n Array.from(multiselect.querySelectorAll(`label:not([slot=\"checked\"])`)).forEach((label, index) => {\n const checkbox = label.querySelector('input');\n const searchValue = checkbox.value;\n const labelText = label.textContent;\n if (searchValue.toLowerCase().includes(search.value.toLowerCase()) ||\n labelText.toLowerCase().includes(search.value.toLowerCase())) {\n label.removeAttribute('slot');\n }\n else {\n label.setAttribute('slot', 'notmatched');\n }\n });\n });\n // Add a delayed hover effect for non hover devices\n let hoverTimeout;\n multiselect.addEventListener('focus', (event) => {\n multiselect.classList.add('hover');\n clearTimeout(hoverTimeout);\n });\n search.addEventListener('blur', (event) => {\n clearTimeout(hoverTimeout);\n hoverTimeout = setTimeout(function () {\n multiselect.classList.remove('hover');\n }, 1000);\n });\n // Set items\n multiselect.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input[type=\"checkbox\"]')) {\n const checkbox = event.target.closest('input[type=\"checkbox\"]');\n setItem(checkbox);\n search.focus();\n clearTimeout(hoverTimeout);\n multiselect.classList.add('hover');\n hoverTimeout = setTimeout(function () {\n multiselect.classList.remove('hover');\n }, 5000);\n }\n });\n // Clear all\n button.addEventListener('click', function (event) {\n Array.from(multiselect.querySelectorAll(`label input[type=\"checkbox\"]`)).forEach((checkbox, index) => {\n checkbox.checked = false;\n setItem(checkbox);\n });\n search.focus();\n });\n // Add some keyboard features to keep it accessible\n multiselect.addEventListener('keydown', function (event) {\n const activeElement = document.activeElement;\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'ArrowUp':\n // Up pressed\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const arrCheckboxes = multiselect.querySelectorAll(`label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n const activeIndex = Array.from(arrCheckboxes).indexOf(activeElement.closest('label'));\n const prevCheckbox = Array.from(arrCheckboxes)[activeIndex - 1];\n if (prevCheckbox)\n prevCheckbox.focus();\n else\n search.focus();\n }\n break;\n case 'ArrowDown':\n // Down pressed\n event.preventDefault();\n if (activeElement == multiselect) {\n multiselect.querySelector('label:not([slot=\"checked\"]):not([slot=\"checked\"])').focus();\n }\n else if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n const activeValue = activeElement.value;\n const nextCheckbox = multiselect.querySelector(`label:has(input[value=\"${activeValue}\"]) ~ label:not([slot=\"checked\"]):not([slot=\"checked\"])`);\n if (nextCheckbox)\n nextCheckbox.focus();\n }\n break;\n case 'Enter':\n event.stopPropagation();\n event.preventDefault();\n if (activeElement.hasAttribute('type') && activeElement.getAttribute('type') == 'checkbox') {\n if (activeElement.checked == false)\n activeElement.checked = true;\n else\n activeElement.checked = false;\n }\n setItem(activeElement);\n search.focus();\n break;\n }\n });\n function checkLastTag() {\n if (order == 0)\n return false;\n let lastTag = multiselect.querySelector(`label[data-order=\"${order}\"]`);\n if (!lastTag) {\n lastTag = checkLastTag(order--);\n }\n return lastTag;\n }\n search.addEventListener('keydown', function (event) {\n switch (event.key // change to event.key to key to use the above variable\n ) {\n case 'Enter':\n const match = multiselect.querySelector(`input[value=\"${search.value}\"]:not(:checked)`);\n if (!match)\n search.value = '';\n search.focus();\n break;\n case 'Backspace':\n if (!search.value) {\n const lastTag = checkLastTag(order);\n if (lastTag) {\n const lastTagInput = lastTag.querySelector('input');\n lastTagInput.checked = false;\n setItem(lastTagInput);\n }\n search.focus();\n }\n break;\n }\n });\n // Fix for the inline edit multiselect\n multiselect.addEventListener('mousedown', (event) => {\n wrapper.setAttribute('data-mousedown', 'true');\n });\n multiselect.addEventListener('mouseup', (event) => {\n wrapper.removeAttribute('data-mousedown');\n });\n }\n}\nexport default iamMultiselect;\n"],"names":["iamMultiselect","assetLocation","coreCSS","template","multiselect","form","wrapper","search","button","order","innerLabel","observer","mutations","mutationRecord","targetElement","setItem","inputToSet","checkbox","index","event","label","searchValue","labelText","hoverTimeout","activeElement","arrCheckboxes","activeIndex","prevCheckbox","activeValue","nextCheckbox","checkLastTag","lastTag","lastTagInput"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class v extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),n=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */function f(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]")||event.target.matches("[data-dismiss-button]"))&&(t.preventDefault(),d(i))},!1),i.hasAttribute("data-timeout")){const t=i.getAttribute("data-timeout"),o=new m(function(){d(i)},t);i.addEventListener("mouseenter",n=>{o.pause()}),i.addEventListener("mouseleave",n=>{o.resume()})}}function m(i,t){let o,n,e=t;this.pause=function(){window.clearTimeout(o),e-=new Date-n},this.resume=function(){n=new Date,window.clearTimeout(o),o=window.setTimeout(i,e)},this.resume()}const d=function(i){i.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=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"):`${t}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const h=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},p=(t,o,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),a.forEach(r=>{t.addEventListener(r,function(e){const d={event:r,element:o,target:e.target};Object.keys(e.detail).forEach(i=>{const c=e.detail[i];d[i]=c}),window.dataLayer.push(d)})}),!0),g=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */import k from"js-cookie";const q=e=>e.replace(/ /g,"_"),x=function(e){return e=e.toLowerCase(),e=q(e),e=e.replace(/\W/g,""),e},m=(e,s,a)=>s.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,d)=>o?o[d]:a,e),S=e=>Array.isArray(e)||e!==null&&["function","object"].includes(typeof e);var L=function(e,s,a,o){function d(r){return r instanceof a?r:new a(function(n){n(r)})}return new(a||(a=Promise))(function(r,n){function v(c){try{u(o.next(c))}catch(i){n(i)}}function t(c){try{u(o.throw(c))}catch(i){n(i)}}function u(c){c.done?r(c.value):d(c.value).then(v,t)}u((o=o.apply(e,s||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",p=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
4
  */const U=function(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))},B=(i,e)=>String(i).padStart(e,"0"),Q=i=>i.charAt(0).toUpperCase()+i.slice(1),k=(i,e,r)=>e.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,c)=>o?o[c]:r,i);var X=function(i,e,r,o){function c(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function d(h){try{t(o.next(h))}catch(n){a(n)}}function l(h){try{t(o.throw(h))}catch(n){a(n)}}function t(h){h.done?s(h.value):c(h.value).then(d,l)}t((o=o.apply(i,e||[])).next())})};const j=i=>{const e=Array.from(i.querySelectorAll("thead th"));Array.from(i.querySelectorAll("tbody tr")).forEach((o,c)=>{const s=Array.from(o.querySelectorAll("th, td")),a=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","error"];s.forEach((d,l)=>{const t=e[l];if(typeof t<"u"){const h=document.createElement("div");h.innerHTML=t.innerHTML;const n=h.textContent||h.innerText||"";d.setAttribute("data-label",n),t.hasAttribute("data-td-class")&&d.setAttribute("class",t.getAttribute("data-td-class")),t.hasAttribute("data-format")&&(d.setAttribute("data-format",t.getAttribute("data-format")),d.innerHTML=_(t.getAttribute("data-format"),d.textContent.trim())),a.includes(d.textContent.trim().toLowerCase())&&d.setAttribute("data-content",d.textContent.trim().toLowerCase())}})})},Y=i=>{let e=0;return Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=window.getComputedStyle(document.querySelector("html")),s=r.querySelector(":scope > *:last-child > *:first-child");if(s){s.classList.add("text-nowrap");let a=s.offsetWidth/parseFloat(c.fontSize);a+=1.7,e=e>a?e:a}}),e},J=(i,e)=>{if(e.classList.contains("table--fullwidth")&&!e.hasAttribute("data-expandable")||i.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(i.querySelectorAll("thead tr")).forEach((r,o)=>{i.querySelectorAll("thead tr th.expand-button-heading").length||r.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.getAttribute("data-view")==="full"?"aria-expanded":"";r.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${c}>Expand</button></td>`)})},G=i=>{i.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){const r=e.target.closest("[data-expand-button]"),o=r.closest("tr");r.toggleAttribute("aria-expanded"),o.getAttribute("data-view")=="full"?o.setAttribute("data-view","default"):o.setAttribute("data-view","full"),r.blur()}})},R=(i,e)=>{const r=e.querySelector("input[data-search]");if(!r)return!1;const o=r.getAttribute("id"),c=r.getAttribute("data-search").split(","),s=r.parentNode,a={};c.forEach((d,l)=>{Array.from(i.querySelectorAll('td[data-label="'+d.trim()+'"]')).forEach((t,h)=>{t.querySelector(".td__content")?a[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:a[t.textContent]=t.textContent})}),r.setAttribute("list",`${o}_list`),r.setAttribute("autocomplete","off"),s.querySelector("datalist")||(s.innerHTML+=`<datalist id="${o}_list"></datalist>`),s.querySelector("datalist").innerHTML=`${Object.keys(a).map(d=>`<option value="${d}"></option>`).join("")}`},V=(i,e,r,o,c)=>{let s;const a=function(t,h=!1){if(o.hasAttribute("data-no-submit")||e.classList.contains("processing"))return!1;if(Array.from(e.querySelectorAll("iam-applied-filters")).forEach((n,p)=>{const u=new Event("tags-set");n.dispatchEvent(u)}),t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((n,p)=>{const u=n.getAttribute("data-duplicate"),b=document.getElementById(u),w=document.querySelector(`[for="${u}"] iam-card`);if(b.checked!=n.checked)if(w){const A=new Event("click");w.dispatchEvent(A)}else b.checked=n.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!h){const n=e.querySelector("[data-pagination]");n.value=1,o.setAttribute("data-page",1)}z(i,e,r,o)}else e.hasAttribute("data-submit")?e.submit():(H(i,e,o),E(i,e));if(e.hasAttribute("data-ajax-post")){const n=new FormData(e),p=new URLSearchParams(n).toString(),u=new XMLHttpRequest;u.open("GET",`${window.location.href}?ajax=true&${p}`),u.send()}};e.querySelector("iam-actionbar[data-search]")&&e.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",t=>{e.querySelector("input[data-search]")?e.querySelector("input[data-search]").value=t.detail.search:e.insertAdjacentHTML("beforeend",`<input type="hidden" name="search" data-search="${e.querySelector("iam-actionbar[data-search]").getAttribute("data-search")}" value="${t.detail.search}"/>`),clearTimeout(s),a(t)}),e.addEventListener("keyup",t=>{clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&(s=setTimeout(function(){a(t)},500))}),e.addEventListener("change",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||N(i,e,c),a(t)),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(H(i,e,o),E(i,e)):(t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&t.target.closest("form .dialog__wrapper > dialog")||t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&!t.target.closest("form dialog"))&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.hasAttribute("id")){const h=t.target.getAttribute("id");document.querySelector(`[data-duplicate="${h}"]`)&&(document.querySelector(`[data-duplicate="${h}"]`).checked=t.target.checked)}}),e.addEventListener("click",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest('dialog button:not([type="button"])')&&t.target.closest('dialog button:not([type="button"])').closest("dialog").close(),t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__close")&&(t.preventDefault(),t.stopPropagation()),t&&t.target instanceof HTMLElement&&t.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((n,p)=>{n.innerHTML=""});const h=e.elements;for(let n=0;n<h.length;n++)switch(h[n].type.toLowerCase()?h[n].type.toLowerCase():"text"){case"text":case"password":case"textarea":h[n].value="";break;case"radio":case"checkbox":if(h[n].checked){const u=h[n],b=u.getAttribute("id"),w=document.querySelector(`[for="${b}"`);if(w.querySelector("iam-card")){const A=w.querySelector("iam-card"),m=new Event("click");A.dispatchEvent(m)}u.checked=!1}break;case"select-one":case"select-multi":h[n].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||N(i,e,c),a(t)}}),e.addEventListener("submit",t=>{clearTimeout(s),e.hasAttribute("data-submit")||t.preventDefault(),a(t)}),e.addEventListener("force",t=>{a(t)}),e.addEventListener("paginate",t=>{a(t,!0)});const d=[],l=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,h)=>{const n=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${n}"]`)).forEach((p,u)=>{const b=p.closest("form");d.includes(b)||d.push(b),l.includes(n)||l.push(n)})}),d.forEach((t,h)=>{const n=function(){const p=[],u=new FormData(t);for(const[b,w]of u)document.querySelector(`[data-mimic="${b}"]`)&&!p.includes(b)?(p.push(b),document.querySelector(`[data-mimic="${b}"]`).value=w):document.querySelector(`[data-mimic="${b}"]`)&&(document.querySelector(`[data-mimic="${b}"]`).value+=","+w);for(const b of p){const w=new Event("force");e.dispatchEvent(w)}for(const b of l)if(!u.has(b)&&t.querySelector(`[name="${b}"]`)){document.querySelector(`[data-mimic="${b}"]`).value="";const w=new Event("force");e.dispatchEvent(w)}};t.addEventListener("force",p=>{n()}),t.addEventListener("change",p=>{n()})})},N=(i,e,r)=>{if(e.getAttribute("data-ajax"))return!1;const o=i.querySelector("tbody");let c=e.querySelector('input[type="radio"][data-sort]:checked');if(e.querySelector("select[data-sort]")){const n=e.querySelector("select[data-sort]");c=e.querySelector(`select[data-sort] option:nth-child(${n.selectedIndex+1})`)}const s=c.getAttribute("data-sort"),a=c.getAttribute("data-order"),d=c.getAttribute("data-format");if(!s)return o.innerHTML=r.innerHTML,j(i),!1;let l=[];["asc","desc","descending"].includes(a)||(l=a.split(","));let t=[];Array.from(o.querySelectorAll("tr")).forEach((n,p)=>{let u=n.querySelector('td[data-label="'+s+'"], th[data-label="'+s+'"]').textContent.trim();n.querySelector('[data-label="'+s+'"] .td__content')&&(u=n.querySelector('[data-label="'+s+'"] .td__content').textContent.trim()),l.length&&l.includes(u)&&(u=l.indexOf(u)),U(u)&&(u=B(u,10)),d&&d=="date"&&(u=new Date(u));const b={index:u,row:n};t.push(b)}),t.sort((n,p)=>n.index>p.index?1:-1),(a=="descending"||a=="desc")&&(t=t.reverse());let h="";t.forEach((n,p)=>{h+=n.row.outerHTML}),o.innerHTML=h},H=(i,e,r)=>{i.classList.remove("table--filtered");const o=P(e),c=[];let s=0;const a=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,d=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(i.querySelectorAll("tbody tr")).forEach((t,h)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")}),e.querySelector("input[data-search]")){const t=e.querySelector("input[data-search]");e.querySelector("input[data-search]").getAttribute("data-search").split(",").forEach((n,p)=>{c.push({column:`${n.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let l=0;Object.values(o).forEach((t,h)=>{typeof t=="object"&&Object.values(t).length?l+=Object.values(t).length:l++}),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML+=`(${l})`,t.parentNode.classList.add("hover")}),i.classList.add("table--filtered");for(const[t,h]of Object.entries(o))Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((n,p)=>{let u=!1;h.forEach((b,w)=>{const A=n.querySelector(`[data-label="${t}"]`);if(b.includes("-date-from")){const m=new Date(b.replace("-date-from","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f<m?(n.classList.add("less-than-from-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}else if(b.includes("-date-to")){const m=new Date(b.replace("-date-to","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f>m?(n.classList.add("greater-than-to-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}if(b&&b=="$today")b=_("date",new Date);else if(b&&b=="$yesterday"){const m=new Date;m.setDate(m.getDate()-1),b=_("date",m)}else if(b&&(b=="$thisWeek"||b=="$lastWeek")){const m=new Date,f=new Date(m.setDate(m.getDate()-(m.getDay()-1))),v=new Date(m.setDate(m.getDate()-m.getDay()+7)),g=new Date(A.textContent.toLowerCase());if(m.setHours(0,0,0,0),f.setHours(0,0,0,0),v.setHours(0,0,0,0),g.setHours(0,0,0,0),b=="$thisWeek")u=g>=f&&g<=v;else{const L=new Date(f.setDate(f.getDate()-7)),y=new Date(v.setDate(v.getDate()-7));L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=g>=L&&g<=y}}else if(b&&b=="$thisMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v,1),L=new Date(f,v+1,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}else if(b&&b=="$lastMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v-1,1),L=new Date(f,v,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}A&&A.textContent.toLowerCase().includes(b.replace("-"," ").toLowerCase())&&(u=!0)}),u||(n.classList.add("filtered"),n.setAttribute("data-filtered-by",t))});Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{let n=!(c.length>0&&c[0].value.length>=3);c.forEach((p,u)=>{const b=t.querySelector(`[data-label="${p.column}"]`);b&&p.value.length>=3&&b.textContent.toLowerCase().includes(p.value.toLowerCase())&&(n=!0)}),n||t.classList.add("filtered")}),Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{s++,t.classList.add("filtered--matched"),Math.ceil(s/d)==parseInt(a)&&t.classList.add("filtered--show")}),r&&(r.setAttribute("data-total",s),r.setAttribute("data-show",d),r.setAttribute("data-page",a))},E=(i,e,r)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((c,s)=>{const a=c.getAttribute("data-query");let d=0;if(a=="total")r.hasAttribute("data-total")?d=r.getAttribute("data-total"):d=(i.classList.contains("table--filtered"),i.querySelectorAll("tbody tr").length);else if(!a.includes(" == ")&&a.includes(" & ")){const l=a.split(" & ");let t="";l.forEach(h=>{t+=`:not([data-filtered-by="${h}"])`}),d=Array.from(i.querySelectorAll(`tbody tr${t}`)).length}else if(!a.includes(" == "))d=Array.from(i.querySelectorAll(`tbody tr:not([data-filtered-by="${a}"])`)).length;else if(a.includes(" && ")){const l=a.split(" && ");d=Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let h=!0;for(const[n,p]of Object.entries(l)){const u=p.split(" == ");(!t.querySelector(`td[data-label="${u[0]}"]`)||t.querySelector(`td[data-label="${u[0]}"]`).textContent!=`${u[1]}`)&&(h=!1)}return h}).length}else{const l=a.split(" == ");d=Array.from(i.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(t){return t.textContent===l[1]}).length}c.hasAttribute("data-total")?c.setAttribute("data-total",d):c.innerHTML=d})},K=function(i,e,r,o){if(o.hasAttribute("data-no-submit"))return!1;r.addEventListener("update-page",c=>{const s=e.querySelector("[data-pagination]"),a=c.detail.page;if(s.value=a,e.dispatchEvent(new Event("paginate")),o.setAttribute("data-page",a),i.hasAttribute("data-show-history")){const d=new URL(location);d.searchParams.set("page",a),history.pushState({type:"pagination",form:e.getAttribute("id"),page:a},"",d)}if(!o.hasAttribute("data-no-scroll")){const l=i.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}),r.addEventListener("update-show",c=>{const s=e.querySelector("[data-show]"),a=c.detail.show;s.value=a,o.setAttribute("data-show",a),e.dispatchEvent(new Event("submit"))})},Z=(i,e)=>{if(!i)return!1;i.addEventListener("click",r=>{tt(e)})},tt=function(i){let e=[];const r=i.getElementsByTagName("tr");for(let a=0;a<r.length;a++){const d=r[a].querySelectorAll("td,th"),l=[];for(let t=0;t<d.length;t++)l.push(`"${d[t].textContent}"`);e.push(l.join(","))}e=e.join(`
5
5
  `);const o=new Blob([e],{type:"text/csv"}),c=document.createElement("a");c.download="export.csv";const s=window.URL.createObjectURL(o);c.href=s,c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c)},O=function(i,e,r,o){if(j(i),J(i,o),E(i,e,o),o&&o.classList.contains("table--cta")){let s=function(){Array.from(i.querySelectorAll("tr")).forEach((a,d)=>{const l=a.offsetHeight;a.style.setProperty("--row-height",`${l}px`)})};const c=Y(i);o.style.setProperty("--cta-width",`${c}rem`),new ResizeObserver(s).observe(i)}},P=function(i){const e=new Object;return Array.from(i.querySelectorAll("[data-filter]")).forEach((o,c)=>{if(!(o.type=="radio"&&!o.checked)&&!(o.type=="checkbox"&&!o.checked)&&o&&o.value){const s=o.getAttribute("data-filter");let a=o.value;o.hasAttribute("data-date-from")&&(a+="-date-from"),o.hasAttribute("data-date-to")&&(a+="-date-to"),e[s]||(e[s]=[]),e[s].push(a)}}),e},z=function(i,e,r,o){return X(this,void 0,void 0,function*(){const c=new FormData(e),s=new URLSearchParams(c).toString(),a=i.querySelectorAll("thead tr th:not(.expand-button-heading)"),d=i.querySelector("tbody"),l=e.getAttribute("data-ajax");o.classList.add("table--loading");const t=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML="",p.parentNode.classList.remove("hover")});let h=0;Object.values(t).forEach((p,u)=>{typeof p=="object"&&Object.values(p).length?h+=Object.values(p).length:h++}),h&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML+=`(${h})`,p.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;const{signal:n}=controller[l];r.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(l+"?"+s,{signal:n,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(p=>p.json()).then(p=>{const u=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",b=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",w=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",A=k(p,b,15),m=k(p,w,1),f=k(p,u),v=o.hasAttribute("data-empty-msg")?o.getAttribute("data-empty-msg"):"No results found";f?(d.innerHTML="",f.forEach((g,L)=>{const y=document.createElement("tr");a.forEach((x,at)=>{let S="";const T=document.createElement("td");if(T.setAttribute("data-label",x.innerText),x.getAttribute("data-output")){var D=x.getAttribute("data-output");S=D.replace(new RegExp(/{(.*?)}/,"gm"),function(C){return k(g,C.replace("{","").replace("}",""))})}if(x.hasAttribute("data-output-array")){var D=x.getAttribute("data-output");const I=k(g,D.replace("{","").replace("}",""));S="",I.forEach((M,ot)=>{const F=x.getAttribute("data-output-array");let q="";if(x.hasAttribute("data-output-array-property")&&x.hasAttribute("data-output-array-transform")){const $=k(M,x.getAttribute("data-output-array-property")),W=JSON.parse(x.getAttribute("data-output-array-transform"))[$];q=F.replace(`{${x.getAttribute("data-output-array-property")}}`,W)}q=q.replace(new RegExp(/{(.*?)}/,"gm"),function($){return k(M,$.replace("{","").replace("}",""))}),S+=q})}x.hasAttribute("data-transform")&&(S=JSON.parse(x.getAttribute("data-transform"))[S],!S&&x.hasAttribute("data-default")&&(S=x.getAttribute("data-default"))),T.innerHTML=S,y.appendChild(T)}),d.appendChild(y)}),R(i,e),o.setAttribute("data-total",parseInt(A)),o.setAttribute("data-page",parseInt(m)),O(i,e,r,o),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((g,L)=>{const y=k(p,g.getAttribute("data-ajax-query"),"");g.hasAttribute("data-total")?g.setAttribute("data-total",y):g.innerHTML=y}),parseInt(A)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${v}</span></td></tr>`),o.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:s})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',r.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(p){console.log(p)}})},_=(i,e)=>{switch(i){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return e=Q(e)}};class et extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta5
2
+ * iamKey v7.1.0--beta6
3
3
  * Copyright 2022-2025 iamproperty
4
- */const f=(t,l,o,r)=>{const n=Math.tan(.375*Math.PI),c=window.innerWidth||document.body.clientWidth,s=Math.max(1,Math.floor(.01*c)),e=o-t,a=r-l,i=Math.abs(e/a),d=Math.abs(a/e);if(Math.abs(e)>s||Math.abs(a)>s){if(d<=n)return e<0?"left":"right";if(i<=n)return a<0?"top":"bottom"}else return"tap"},k=function(t){t.querySelectorAll(":scope > details");const l=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),!o){o=document.createElement("div"),o.classList.add("tabs__links");const n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(o),t.prepend(n)}let r=0;l.forEach((n,c)=>{let s=document.createElement("button");if(n.matches("details")){const e=n.querySelector(":scope > summary"),a=e.classList.contains("disabled");e.classList.add("visually-hidden"),n.hasAttribute("id")&&s.setAttribute("data-id",`${n.getAttribute("id")}`),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${e.innerText}`,s.classList.add("link"),s.setAttribute("data-index",r),s.setAttribute("part","tab-link"),n.setAttribute("tabindex","-1"),a&&s.classList.add("disabled"),r++}else n.matches("a")&&(s=n);s.classList.add("link"),o.appendChild(s)})},g=function(t){const l=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary");let r=t.querySelector(":scope .tabs__links"),n=t.querySelectorAll(":scope .tabs__links > button"),c=t.querySelector(":scope .tabs__next");var s;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(n=t.shadowRoot.querySelectorAll(".tabs__links > button"),r=t.shadowRoot.querySelector(".tabs__links"),c=t.shadowRoot.querySelector(":scope .tabs__next")),n.forEach(e=>{e.addEventListener("click",a=>{if(a.preventDefault(),!window.isScrolling){if(window.triggered||(window.isClicked=!0),e.classList.contains("disabled"))return!1;n.forEach(i=>{const d=i==e;i.setAttribute("aria-pressed",d)}),r.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),l.forEach((i,d)=>{const u=e.getAttribute("data-index")==d;u?i.setAttribute("open",u):i.removeAttribute("open")}),e.matches(":last-child")?c.setAttribute("disabled","disabled"):c.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})}})}),r.addEventListener("scroll",e=>{window.isScrolling||(clearTimeout(s),window.isScrolling=!0)}),r.addEventListener("scrollend",e=>{window.isScrolling=!1,clearTimeout(s),s=setTimeout(function(){if(window.isClicked)return window.isClicked=!1,!1;let a=n[0],i=Math.abs(a.getBoundingClientRect().left);n.forEach(d=>{Math.abs(d.getBoundingClientRect().left)<i&&(i=Math.abs(d.getBoundingClientRect().left),a=d)}),window.triggered=!0,a.focus(),a.click(),window.triggered=!1},200)}),o.forEach((e,a)=>{e.addEventListener("click",i=>{i.preventDefault(),n[a].click()})}),c.addEventListener("click",e=>{e.preventDefault();const i=r.querySelector('[aria-pressed="true"]').nextSibling;i&&i.click()}),t.classList.contains("tabs--guided")){let e=0,a=0,i=0,d=0;l.forEach(u=>{u.addEventListener("touchstart",p=>{p.stopPropagation(),e=p.changedTouches[0].screenX,a=p.changedTouches[0].screenY}),u.addEventListener("touchend",p=>{p.stopPropagation(),i=p.changedTouches[0].screenX,d=p.changedTouches[0].screenY;const m=f(e,a,i,d),b=r.querySelector('[aria-pressed="true"]'),_=b.nextSibling,h=b.previousSibling;switch(m){case"left":_&&_.click();break;case"right":h&&h.click();break}})})}},w=function(t){if(!t.querySelector(":scope > details"))return!1;const l=t.querySelectorAll(":scope > details"),o=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(l[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},y=function(t){k(t),g(t),w(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${l}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
4
+ */const k=(t,d,o,r)=>{const n=Math.tan(.375*Math.PI),l=window.innerWidth||document.body.clientWidth,s=Math.max(1,Math.floor(.01*l)),e=o-t,a=r-d,i=Math.abs(e/a),c=Math.abs(a/e);if(Math.abs(e)>s||Math.abs(a)>s){if(c<=n)return e<0?"left":"right";if(i<=n)return a<0?"top":"bottom"}else return"tap"},f=function(t){t.querySelectorAll(":scope > details");const d=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),!o){o=document.createElement("div"),o.classList.add("tabs__links");const n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(o),t.prepend(n)}let r=0;d.forEach((n,l)=>{let s=document.createElement("button");if(n.matches("details")){const e=n.querySelector(":scope > summary"),a=e.classList.contains("disabled");e.classList.add("visually-hidden"),n.hasAttribute("id")&&s.setAttribute("data-id",`${n.getAttribute("id")}`),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${e.innerText}`,s.classList.add("link"),s.setAttribute("data-index",r),s.setAttribute("part","tab-link"),n.setAttribute("tabindex","-1"),a&&s.classList.add("disabled"),r++}else n.matches("a")&&(s=n);s.classList.add("link"),o.appendChild(s)})},g=function(t){const d=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary");let r=t.querySelector(":scope .tabs__links"),n=t.querySelectorAll(":scope .tabs__links > button"),l=t.querySelector(":scope .tabs__next");var s;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(n=t.shadowRoot.querySelectorAll(".tabs__links > button"),r=t.shadowRoot.querySelector(".tabs__links"),l=t.shadowRoot.querySelector(":scope .tabs__next")),n.forEach(e=>{e.addEventListener("click",a=>{if(a.preventDefault(),window.isClicked=!0,e.classList.contains("disabled"))return!1;n.forEach(i=>{const c=i==e;i.setAttribute("aria-pressed",c)}),r.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),d.forEach((i,c)=>{const u=e.getAttribute("data-index")==c;u?i.setAttribute("open",u):i.removeAttribute("open")}),e.matches(":last-child")?l?.setAttribute("disabled","disabled"):l?.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})})}),r.addEventListener("scrollend",e=>{clearTimeout(s),s=setTimeout(function(){let a=n[0],i=Math.abs(a.getBoundingClientRect().left);if(n.forEach(c=>{Math.abs(c.getBoundingClientRect().left)<i&&(i=Math.abs(c.getBoundingClientRect().left),a=c)}),window.isClicked)return window.isClicked=!1,!1;a.click(),a.focus()},500)}),o.forEach((e,a)=>{e.addEventListener("click",i=>{i.preventDefault(),n[a].click()})}),l?.addEventListener("click",e=>{e.preventDefault();const i=r.querySelector('[aria-pressed="true"]').nextSibling;i&&i.click()}),t.classList.contains("tabs--guided")){let e=0,a=0,i=0,c=0;d.forEach(u=>{u.addEventListener("touchstart",p=>{p.stopPropagation(),e=p.changedTouches[0].screenX,a=p.changedTouches[0].screenY}),u.addEventListener("touchend",p=>{p.stopPropagation(),i=p.changedTouches[0].screenX,c=p.changedTouches[0].screenY;const m=k(e,a,i,c),b=r.querySelector('[aria-pressed="true"]'),_=b.nextSibling,h=b.previousSibling;switch(m){case"left":_&&_.click();break;case"right":h&&h.click();break}})})}},w=function(t){if(!t.querySelector(":scope > details"))return!1;const d=t.querySelectorAll(":scope > details"),o=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(d[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},y=function(t){f(t),g(t),w(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const d=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"):`${d}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
5
5
  <style>
6
6
  @import "${o}";
7
7
  *:not(main):has(>iam-tabs){container-type:inline-size}iam-tabs details:not([open]){padding-bottom:0}iam-tabs::part(next-button){display:none}@container (width > 62em){iam-tabs.tabs--guided::part(next-button){position:absolute;top:9.375rem;right:0;display:block}}iam-tabs.tabs--guided::part(next-button):not(:hover){background:var(--colour-success)}.tabs:not(.admin-panel){position:relative}.tabs:not(.admin-panel) .tabs__links__wrapper{position:relative;margin:0 auto 2rem}.tabs:not(.admin-panel) .tabs__links__wrapper:after{content:"";left:50%;position:relative;height:1px;width:100vw;background-color:var(--colour-border);transform:translate(-50%, 0);display:block;clear:both}.tabs.admin-panel .tabs__links__wrapper:after{display:none}.tabs__links{scroll-snap-type:x mandatory;-webkit-mask-image:linear-gradient(to right, rgb(0, 0, 0) 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgb(0, 0, 0) 90%, rgba(0, 0, 0, 0) 100%)}.tabs__links{padding-bottom:3px;position:relative;display:flex;flex-wrap:nowrap;width:auto;margin:0 -1.5rem;overflow-y:clip;overflow-x:auto}.tabs__links::-webkit-scrollbar{display:none}.tabs__links .link{white-space:nowrap;scroll-snap-align:start;scroll-margin-left:var(--container-padding)}.tabs__links .link:not(.text-decoration-none):not(.btn){--is-current: 0;font-weight:bold;font-family:var(--font-heading);font-size:1.125rem;cursor:pointer;margin:0;padding:1.5rem 1.5rem .5rem 1.5rem;display:inline-block}.tabs__links .link:not(.text-decoration-none):not(.btn).disabled{cursor:not-allowed;opacity:.4}.tabs__links .link:not(.text-decoration-none):not(.btn):last-child{margin-inline-end:0}.tabs__links .link:not(.text-decoration-none):not(.btn):after{position:absolute;content:"";bottom:0;left:50%;height:3px;width:100%;transform:translate(-50%, 0) scale(0, 0);background:var(--colour-info);transition:transform .4s}.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):hover:after,.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):focus:after,.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled).focus:after{transform:translate(-50%, 0) scale(0.6, 1)}.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):is([aria-pressed=true],:active,.current):after{transform:translate(-50%, 0) scale(1, 1)}.tabs__links .link:not(.text-decoration-none):not(.btn):is([aria-pressed=true],.current){pointer-events:none;outline:var(--contrast-outline-width, 0px) solid var(--colour-primary-theme) !important}@media(min-width: 576px){.tabs__links .link:not(.text-decoration-none):not(.btn){padding:2rem 2rem .5rem 2rem}.tabs__links__wrapper{margin:0 auto 2.5rem}}.admin-panel :is(.admin-panel__links,.tabs__links){padding:0;margin:calc(var(--padding-top)*-1) calc(var(--padding-x)*-1) var(--padding-top) calc(var(--padding-x)*-1);border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;display:flex;flex-direction:column;border-bottom:1px solid var(--colour-border);overflow:hidden;outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}.admin-panel :is(.admin-panel__links,.tabs__links):after{display:none}@media screen and (min-width: 36em){.admin-panel :is(.admin-panel__links,.tabs__links){flex-direction:row}}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn){margin:0;padding:1rem var(--padding-x);width:100%;position:relative;text-align:left;flex-grow:1;--gradient-direction: -90deg;background-color:var(--colour-success)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not([class*=bg-]){background-image:linear-gradient(var(--gradient-direction), var(--colour-info) 0, transparent 100%)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):is(.current,[aria-pressed=true]){color:var(--colour-primary-theme)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not(.current,[aria-pressed=true]){background:var(--colour-canvas-2) !important}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):after{display:none}@media screen and (min-width: 36em){.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn){margin:0}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not(:first-child){border-left:1px solid var(--colour-border) !important}}.admin-panel :is(.admin-panel__links,.tabs__links) .link:is(.current,[aria-pressed=true]){pointer-events:none}@media screen and (min-width: 36em){:host(.tabs--inline) .tabs__links{margin:0;justify-content:center}:host(.tabs--inline) .tabs__links__wrapper:after{width:100%}}/*# sourceMappingURL=assets/css/components/tabs.css.map */
@@ -21,5 +21,5 @@
21
21
  <slot></slot>
22
22
  <button part="next-button" class="btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next">Next</button>
23
23
  </div>
24
- `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const l=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class",`tabs ${l}`),y(this)}}export{v as default};
24
+ `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){const d=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class",`tabs ${d}`),y(this)}}export{v as default};
25
25
  //# sourceMappingURL=tabs.component.min.js.map