@iamproperty/components 5.5.1-beta-4 → 5.5.1-beta-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/assets/css/components/actionbar.css +1 -1
  2. package/assets/css/components/actionbar.css.map +1 -1
  3. package/assets/css/components/actionbar.global.css +1 -1
  4. package/assets/css/components/actionbar.global.css.map +1 -1
  5. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  6. package/assets/js/components/actionbar/actionbar.component.js +2 -0
  7. package/assets/js/components/actionbar/actionbar.component.min.js +5 -3
  8. package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
  9. package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
  10. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  11. package/assets/js/components/card/card.component.min.js +1 -1
  12. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  13. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  14. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  15. package/assets/js/components/header/header.component.min.js +1 -1
  16. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  17. package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
  18. package/assets/js/components/nav/nav.component.min.js +1 -1
  19. package/assets/js/components/notification/notification.component.min.js +1 -1
  20. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  21. package/assets/js/components/search/search.component.min.js +1 -1
  22. package/assets/js/components/table/table.component.js +26 -14
  23. package/assets/js/components/table/table.component.min.js +4 -4
  24. package/assets/js/components/table/table.component.min.js.map +1 -1
  25. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  26. package/assets/js/dynamic.min.js +1 -1
  27. package/assets/js/modules/table.js +36 -18
  28. package/assets/js/scripts.bundle.js +2 -2
  29. package/assets/js/scripts.bundle.js.map +1 -1
  30. package/assets/js/scripts.bundle.min.js +2 -2
  31. package/assets/js/scripts.bundle.min.js.map +1 -1
  32. package/assets/sass/components/actionbar.global.scss +10 -0
  33. package/assets/sass/components/actionbar.scss +20 -3
  34. package/assets/ts/components/actionbar/actionbar.component.ts +2 -0
  35. package/assets/ts/components/table/table.component.ts +28 -21
  36. package/assets/ts/modules/table.ts +40 -19
  37. package/dist/components.es.js +66 -65
  38. package/dist/components.umd.js +61 -64
  39. package/package.json +1 -1
  40. package/src/components/Table/Table.vue +2 -1
@@ -143,8 +143,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
143
143
  }
144
144
  loadAjaxTable(table, form, pagination, wrapper);
145
145
  }
146
- else if (form.hasAttribute('data-submit'))
146
+ else if (form.hasAttribute('data-submit')) {
147
147
  form.submit();
148
+ }
148
149
  else {
149
150
  filterTable(table, form, wrapper);
150
151
  populateDataQueries(table, form);
@@ -182,8 +183,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
182
183
  form.addEventListener('change', (event) => {
183
184
  clearTimeout(timer);
184
185
  if (event && event.target instanceof HTMLElement && event.target.closest('[data-sort]')) {
185
- if (!form.hasAttribute('data-submit'))
186
+ if (!form.hasAttribute('data-submit')) {
186
187
  sortTable(table, form, savedTableBody);
188
+ }
187
189
  formSubmit(event);
188
190
  }
189
191
  if (event && event.target instanceof HTMLElement && event.target.closest('input[data-search]')) {
@@ -258,15 +260,17 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
258
260
  }
259
261
  }
260
262
  form.classList.remove('processing');
261
- if (!form.hasAttribute('data-submit'))
263
+ if (!form.hasAttribute('data-submit')) {
262
264
  sortTable(table, form, savedTableBody);
265
+ }
263
266
  formSubmit(event);
264
267
  }
265
268
  });
266
269
  form.addEventListener('submit', (event) => {
267
270
  clearTimeout(timer);
268
- if (!form.hasAttribute('data-submit'))
271
+ if (!form.hasAttribute('data-submit')) {
269
272
  event.preventDefault();
273
+ }
270
274
  formSubmit(event);
271
275
  });
272
276
  form.addEventListener('force', (event) => {
@@ -283,10 +287,12 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
283
287
  let mimicField = input.getAttribute('data-mimic');
284
288
  Array.from(document.querySelectorAll(`[name="${mimicField}"]`)).forEach((mimicInput, index) => {
285
289
  let parentForm = mimicInput.closest('form');
286
- if (!forms.includes(parentForm))
290
+ if (!forms.includes(parentForm)) {
287
291
  forms.push(parentForm);
288
- if (!fields.includes(mimicField))
292
+ }
293
+ if (!fields.includes(mimicField)) {
289
294
  fields.push(mimicField);
295
+ }
290
296
  });
291
297
  });
292
298
  // For each form add change listener
@@ -351,17 +357,20 @@ export const sortTable = (table, form, savedTableBody) => {
351
357
  let tableArr = [];
352
358
  Array.from(tbody.querySelectorAll('tr')).forEach((tableRow, index) => {
353
359
  let rowIndex = tableRow.querySelector('td[data-label="' + sortBy + '"], th[data-label="' + sortBy + '"]').textContent.trim();
354
- if (tableRow.querySelector('[data-label="' + sortBy + '"] .td__content'))
360
+ if (tableRow.querySelector('[data-label="' + sortBy + '"] .td__content')) {
355
361
  rowIndex = tableRow.querySelector('[data-label="' + sortBy + '"] .td__content').textContent.trim();
362
+ }
356
363
  // If a predefined order set replace the search term with an ordered numeric value so it can be sorted
357
364
  if (orderArray.length && orderArray.includes(rowIndex)) {
358
365
  rowIndex = orderArray.indexOf(rowIndex);
359
366
  }
360
- if (isNumeric(rowIndex))
367
+ if (isNumeric(rowIndex)) {
361
368
  rowIndex = zeroPad(rowIndex, 10);
369
+ }
362
370
  // If the sort format is date then lets transform the index to a sortable date (this is never displayed)
363
- if (format && format == "date")
371
+ if (format && format == "date") {
364
372
  rowIndex = new Date(rowIndex);
373
+ }
365
374
  const dataRow = {
366
375
  index: rowIndex,
367
376
  row: tableRow
@@ -371,8 +380,9 @@ export const sortTable = (table, form, savedTableBody) => {
371
380
  // Sort array alphabetically
372
381
  tableArr.sort((a, b) => (a.index > b.index) ? 1 : -1);
373
382
  // Reverse if descending
374
- if (order == "descending" || order == "desc")
383
+ if (order == "descending" || order == "desc") {
375
384
  tableArr = tableArr.reverse();
385
+ }
376
386
  // Create a string to return and populate the tbody
377
387
  let strTbody = '';
378
388
  tableArr.forEach((tableRow, index) => {
@@ -409,10 +419,12 @@ export const filterTable = (table, form, wrapper) => {
409
419
  });
410
420
  let filterCount = 0;
411
421
  Object.values(filters).forEach((filter, index) => {
412
- if (typeof filter == "object" && Object.values(filter).length)
422
+ if (typeof filter == "object" && Object.values(filter).length) {
413
423
  filterCount += Object.values(filter).length;
414
- else
424
+ }
425
+ else {
415
426
  filterCount++;
427
+ }
416
428
  });
417
429
  if (filterCount) {
418
430
  Array.from(form.querySelectorAll('[data-filter-count]')).forEach((element, index) => {
@@ -454,8 +466,9 @@ export const filterTable = (table, form, wrapper) => {
454
466
  }
455
467
  }
456
468
  // Dynamic values
457
- if (filter && filter == "$today")
469
+ if (filter && filter == "$today") {
458
470
  filter = formatCell('date', new Date());
471
+ }
459
472
  else if (filter && filter == "$yesterday") {
460
473
  let yesterday = new Date();
461
474
  yesterday.setDate(yesterday.getDate() - 1);
@@ -520,8 +533,9 @@ export const filterTable = (table, form, wrapper) => {
520
533
  isSearched = true;
521
534
  }
522
535
  });
523
- if (!isSearched)
536
+ if (!isSearched) {
524
537
  row.classList.add('filtered');
538
+ }
525
539
  });
526
540
  // Work out what to display after pagination
527
541
  Array.from(table.querySelectorAll('tbody tr:not(.filtered')).forEach((row, index) => {
@@ -529,8 +543,9 @@ export const filterTable = (table, form, wrapper) => {
529
543
  row.classList.add('filtered--matched');
530
544
  // pagination bit
531
545
  let matchesPage = Math.ceil(matched / showRows);
532
- if (matchesPage == parseInt(page))
546
+ if (matchesPage == parseInt(page)) {
533
547
  row.classList.add('filtered--show');
548
+ }
534
549
  });
535
550
  if (wrapper) {
536
551
  wrapper.setAttribute('data-total', matched);
@@ -578,10 +593,12 @@ export const populateDataQueries = (table, form, wrapper) => {
578
593
  return element.textContent === queryParts[1];
579
594
  }).length;
580
595
  }
581
- if (queryElement.hasAttribute('data-total'))
596
+ if (queryElement.hasAttribute('data-total')) {
582
597
  queryElement.setAttribute('data-total', numberOfMatchedRows);
583
- else
598
+ }
599
+ else {
584
600
  queryElement.innerHTML = numberOfMatchedRows;
601
+ }
585
602
  });
586
603
  };
587
604
  // Pagination
@@ -616,8 +633,9 @@ export const addPaginationEventListeners = function (table, form, pagination, wr
616
633
  };
617
634
  // Export CSV Data
618
635
  export const addExportEventListeners = (button, table) => {
619
- if (!button)
636
+ if (!button) {
620
637
  return false;
638
+ }
621
639
  button.addEventListener('click', (event) => {
622
640
  exportAsCSV(table);
623
641
  });
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.5.1-beta-4
2
+ * iamKey v5.5.1-beta-5
3
3
  * Copyright 2022-2024 iamproperty
4
4
  */(function(j){typeof define=="function"&&define.amd?define(j):j()})(function(){"use strict";var j=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),ct=r=>{var t=function(a){var i=document.querySelector('label[for="'.concat(a.replace("#",""),'"]')),c=document.querySelector(a+" summary"),o=document.querySelector("dialog".concat(a)),n=document.querySelector("detail".concat(a));i instanceof HTMLElement?i.click():c instanceof HTMLElement?c.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&e.state.type=="pagination"){var a=document.querySelector("#".concat(e.state.form)),i=document.querySelector("#".concat(e.state.form," [data-pagination]"));i?i.value=e.state.page:a.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),a.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var a=e.target;Array.from(a.querySelectorAll("[data-password-type]")).forEach((i,c)=>{i.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault())}}),document.addEventListener("keydown",e=>{e.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),null},dt=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},lt=(r,t)=>String(r).padStart(t,"0"),ut=r=>r.charAt(0).toUpperCase()+r.slice(1),T=(r,t,e)=>t.split(/[\.\[\]\'\"]/).filter(a=>a).reduce((a,i)=>a?a[i]:e,r);class ht{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches("a")){e.preventDefault(),U(a);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,a)=>{var i=new Image;i.onload=function(){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(c,o),document.body.classList.add("youtubeLoaded"),e(!0),c.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),U(n.target.closest("a")))},!1)}},i.onerror=function(){a(!1)},i.src="https://youtube.com/favicon.ico"})}}var U=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),a=t.getAttribute("id");if(typeof a>"u"||a==null){var i=String.fromCharCode(65+Math.floor(Math.random()*26));a=i+Date.now(),t.setAttribute("id",a)}function c(){window.player=new YT.Player(a,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:o,onStateChange:d}})}c();function o(s){s.target.playVideo()}var n=!1;function d(s){if(s.data==YT.PlayerState.PLAYING&&!n){var l=document.getElementById(a);l.classList.add("player-ready"),n=!0}}},ft=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((t,e)=>{var a=t.closest(".dialog__wrapper");a||(t.removeAttribute("open"),t.showModal(),t.focus(),J(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var e=t.target.closest("[data-modal]"),a=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),i=document.querySelector("dialog#".concat(a));J(i),i.showModal(),i.focus();var c=i.offsetWidth;i.setAttribute("style","max-width: ".concat(c,"px;")),Array.from(i.querySelectorAll("[data-duplicate]")).forEach((g,C)=>{var S=g.getAttribute("data-duplicate"),k=document.getElementById(S);if(g.checked!=k.checked){g.checked=k.checked;var E=new Event("change");g.dispatchEvent(E)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:a})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,C)=>{g.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var n=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,C)=>{g.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var d=t.target.closest("dialog[open]"),s=window.getComputedStyle(d);if(s.display==="contents"&&(d=d.parentNode.closest("dialog[open]")),!d.classList.contains("dialog--transactional")&&!d.classList.contains("dialog--acknowledgement")){var l=d.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||d.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var h=t.target.closest(".dialog__wrapper > button"),b=t.target.closest(".dialog__wrapper > button").parentNode,f="openPopover",u=b.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=u&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,C)=>{g.removeAttribute("aria-expanded")}),u.hasAttribute("open"))u.close(),f="closePopover",u.removeAttribute("style"),h.removeAttribute("aria-expanded");else{u.show(),h.setAttribute("aria-expanded",!0);var m=h.getBoundingClientRect(),p=m.top,v=m.left;if(h.closest("iam-table")){var w=h.closest("iam-table").parentNode.getBoundingClientRect();p-=w.top,v-=w.left}u.classList.contains("dialog--fix")&&u.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(v,"px; margin: 3rem 0 0 0;"))}var y=u.getBoundingClientRect(),A=y.bottom-window.scrollY,L=window.innerHeight-window.scrollY;if(A>L){var q=u.hasAttribute("style")?u.getAttribute("style")+" ":"";u.setAttribute("style",q+"transform: translate(0, calc(-100% - 4rem))"),y=u.getBoundingClientRect();var x=y.top-window.scrollY;x<100&&u.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:f,id:h.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((g,C)=>{g.removeAttribute("aria-expanded")}))}),null),J=r=>{var t=r.querySelector(".youtube-embed a");if(t&&U(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&&bt(r),!r.querySelector(":scope > .mh-lg")&&!r.classList.contains("dialog--multi")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var e=r.querySelector(".mh-lg"),a=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var i=a.previousSibling;e.before(a),i&&a.before(i)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},bt=r=>{var t="",e=Array.from(r.querySelectorAll("fieldset[data-title]")),a=r.querySelector("form");e.forEach((s,l)=>{t+='<button data-title="'.concat(s.getAttribute("data-title"),'" type="button" class="').concat(l==0?"active":"",'" tabindex="-1">').concat(s.getAttribute("data-title"),"</button>");var h=document.createElement("div");if(h.classList.add("btn--wrapper"),s.appendChild(h),l!=0&&(h.innerHTML+='<button data-title="'.concat(e[l-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),l!=e.length-1&&(h.innerHTML+='<button data-title="'.concat(e[l+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),l==e.length-1)if(a&&a.querySelector(':scope > button[type="submit"]')){var b=a.querySelector(':scope > button[type="submit"]');b.classList.add("mb-0"),h.insertAdjacentElement("beforeend",b)}else h.innerHTML+='<button data-title="'.concat(e[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),r.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var i=Array.from(r.querySelectorAll("fieldset.was-validated")),c=0;c<i.length;c++){var o=i[c],n=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("valid")})}r.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function d(s){var l=r.querySelector("fieldset.active")?r.querySelector("fieldset.active"):r.querySelector("fieldset[data-title]"),h=l.getAttribute("data-title"),b=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((v,w)=>{v.checkValidity()||(b=!1)}),b?Array.from(r.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((v,w)=>{v.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((v,w)=>{v.classList.remove("valid")}),b||!s.hasAttribute("data-next")){var f=r.querySelector('fieldset[data-title="'.concat(s.getAttribute("data-title"),'"]')),u=r.querySelector('.steps button[data-title="'.concat(s.getAttribute("data-title"),'"]'));Array.from(r.querySelectorAll("button")).forEach((v,w)=>{v.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((v,w)=>{v.classList.remove("active")}),u.classList.add("active"),f.classList.add("active")}var m=Array.from(r.querySelectorAll("fieldset")).length,p=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(p/(m-1)*100,"%"))}r.addEventListener("keydown",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest("button")){var l=s.target.closest("button");s.keyCode==13&&l.getAttribute("type")!="submit"&&(s.preventDefault(),d(l))}if(s&&s.target instanceof HTMLElement&&s.target.closest("input")){var h=s.target.closest("input");h.classList.remove("is-invalid"),s.keyCode==13&&s.preventDefault()}}),r.addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest('button[type="submit"]')){var l=s.target.closest("form");l.classList.add("was-validated")}else if(s&&s.target instanceof HTMLElement&&s.target.closest("button[data-title]")){var h=s.target.closest("button[data-title]");d(h)}return null})};function mt(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var t=r.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=r.target.closest("summary"),a=r.target.closest("a"),i=r.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),a&&window.dataLayer.push({event:"linkClicked",linkText:a.hasAttribute("title")?a.getAttribute("title")||"":a.textContent||"",class:a.hasAttribute("class")&&a.getAttribute("class")||"",href:a.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}function vt(r){var t=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",t).then(function(e){for(var a=[],i=new DataView(e),c=0;c<i.byteLength;c+=4){var o=i.getUint32(c),n=o.toString(16),d="00000000",s=(d+n).slice(-d.length);a.push(s)}return a.join("")})}var pt=(r,t)=>{vt(r).then(function(e){var a=new XMLHttpRequest;a.addEventListener("load",function(){var i=this.responseText.split(`
5
5
  `),c=e.slice(5).toUpperCase(),o=!1;for(var n in i)if(i[n].substring(0,35)==c){o=!0;break}var d=new CustomEvent("hibpCheck",{detail:o});t.dispatchEvent(d)}),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()})},yt=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((a,i)=>{a.parentElement,gt(a)}),Array.from(document.querySelectorAll("label input")).forEach((a,i)=>{!a.closest("label").querySelector(".optional-text")&&!a.hasAttribute("required")&&(a.parentNode.tagName.toLowerCase()=="span"?a.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):a.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))}),document.querySelector('input[type="date"]')){let a=function(i){var c=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),n=String(i.getDate()).padStart(2,"0");return"".concat(c,"-").concat(o,"-").concat(n)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((i,c)=>{var o=e;if(i.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(i.getAttribute("data-start"))),i.setAttribute("min",a(o))),i.hasAttribute("data-period")){var n=parseInt(i.getAttribute("data-period")),d=new Date;d.setDate(o.getDate()+n),i.setAttribute("max",a(d))}if(i.hasAttribute("data-allowed-days")){var s=JSON.parse("[".concat(i.getAttribute("data-allowed-days"),"]"));i.addEventListener("input",function(l){var h=new Date(this.value).getUTCDay();s.includes(h)?i.setCustomValidity(""):i.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&t(),document.onreadystatechange=()=>{document.readyState==="complete"&&t()},r.addEventListener("input",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){var a=e.target.closest("input,textarea,select");a.parentElement,a.hasAttribute("type")&&a.getAttribute("type")=="color"&&(a.nextElementSibling.value=a.value),a.hasAttribute("maxlength")&&a.nextElementSibling&&a.nextElementSibling.setAttribute("data-count",a.value.length),a.hasAttribute("data-strength-checker")&&At(a)}}),r.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){var a=e.target.closest("select");if(a.hasAttribute("data-change-type")&&a.hasAttribute("data-input")){var i=document.getElementById(a.getAttribute("data-input")),c=a.value;Q(i,c)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){var o=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((n,d)=>{n.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((n,d)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){var a=e.target.closest("[data-change-type]"),i=document.getElementById(a.getAttribute("data-input")),c=a.getAttribute("data-change-type");if(a.setAttribute("data-change-type",i.getAttribute("type")),Q(i,c),a.hasAttribute("data-alt-class")){var o=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",o)}}})},gt=r=>{var t=r.parentElement,e=r.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var a=r.nextElementSibling;(!a||a&&a.classList.contains("invalid-feedback"))&&(a=document.createElement("span"),t.insertBefore(a,r.nextSibling)),a.setAttribute("data-count",r.value.length)},Q=(r,t)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",t)},At=function r(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",a=document.getElementById(t.getAttribute("data-strength-checker")),i=t.value,c=t.hasAttribute("minlength")?t.getAttribute("minlength"):12,o=1,n=["Very weak","Weak","Average","Strong","Very strong"],d="";if(i.match(/(?=.*[0-9])/)&&(o+=1),i.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(o+=1),i.match(/(?=.*[a-z])/)&&(o+=1),i.match(/(?=.*[A-Z])/)&&(o+=1),i.length<c&&(o=1,d="(must be at least ".concat(c," characters.)")),o>=3&&e=="no"){let s=function(l,h){l.detail?r(h,"danger"):r(h,"success"),h.removeEventListener("hibpCheck",s)};pt(i,t),t.addEventListener("hibpCheck",function(l){s(l,t)})}else o>=3&&e=="danger"&&(o=3,d="(this password is very common)");a&&(o<=3?a.classList.add("invalid-feedback"):a.classList.remove("invalid-feedback"),a.setAttribute("data-strength",o),a.innerHTML="Password strength: ".concat(n[o-1]," ").concat(d))},wt=r=>{if(Array.from(r.querySelectorAll("details")).forEach((e,a)=>{e.addEventListener("mouseenter",function(i){window.matchMedia("(min-width: 62em)").matches&&e.setAttribute("open","true")},!1),e.addEventListener("mouseleave",function(i){window.matchMedia("(min-width: 62em)").matches&&e.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(e=>{var[a]=e;return a.target.classList.toggle("is-stuck",a.intersectionRatio<1)},{threshold:[1]});t.observe(r)}};function Lt(r){var t,e=r.querySelector(".testimonial__images"),a=e.querySelectorAll("img").length;if(a==1)return!1;r.classList.add("testimonial--multi");var i=function(o){var n=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");n.setAttribute("data-go",o+1),d.setAttribute("data-go",o-1),n.removeAttribute("disabled"),d.removeAttribute("disabled"),o==1?d.setAttribute("disabled",!0):o==a&&n.setAttribute("disabled",!0)};e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=e.scrollWidth,n=e.scrollHeight,d=e.scrollLeft,s=e.scrollTop,l=Math.round(d/o*a)+1;d==0&&s!=0&&(l=Math.round(s/n*a)+1),r.setAttribute("data-show",l),i(l)},300)},!1),r.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches("[data-go]")){var n=parseInt(o.getAttribute("data-go")),d=0,s=0,l=e.scrollWidth,h=e.scrollHeight;l>h?s=Math.floor(l*((n-1)/a)):d=Math.floor(h*((n-1)/a)),e.scroll({top:d,left:s,behavior:"smooth"});break}},!1)}function St(r,t){var e,a=r.querySelector(".carousel__inner"),i=r.querySelector(".carousel__controls"),c=t.querySelectorAll(".col").length;a.addEventListener("scroll",function(o){clearTimeout(e),e=setTimeout(function(){var n=a.clientWidth,d=a.scrollWidth,s=a.scrollLeft,l=Math.round(s/d*c)+1,h=t.querySelector(".col:last-child").offsetLeft+50;a.scrollLeft+n>=h&&(l=c),Array.from(r.querySelectorAll(".carousel__controls button")).forEach((b,f)=>{b.removeAttribute("aria-current")}),r.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?r.querySelector(".btn-prev").setAttribute("disabled","disabled"):r.querySelector(".btn-prev").removeAttribute("disabled"),l==c?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),i.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){o.preventDefault(),Array.from(i.querySelectorAll("button")).forEach((s,l)=>{s.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);var d=t.querySelector("*:nth-child(".concat(n.getAttribute("data-slide"),")"));a.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),r.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches(".btn-next, .btn-prev")){o.preventDefault();var d=n.classList.contains("btn-prev")?a.scrollLeft-a.clientWidth:a.scrollLeft+a.clientWidth;a.scroll({top:0,left:d,behavior:"smooth"});break}},!1)}function Et(r){r.addEventListener("change",function(t){var e=parseInt(r.querySelector("[data-min] select,[data-min] input").value),a=parseInt(r.querySelector("[data-max] select,[data-max] input").value);Array.from(r.querySelectorAll("[data-min] input")).forEach((i,c)=>{i.setAttribute("max",a)}),Array.from(r.querySelectorAll("[data-max] input")).forEach((i,c)=>{i.setAttribute("min",e)}),Array.from(r.querySelectorAll("[data-min] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))>a?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(r.querySelectorAll("[data-max] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function qt(r){r.addEventListener("change",function(t){if(r.matches("[data-value-if]")){var e=r.getAttribute("data-redirect"),a=r.getAttribute("data-value-if");r.value==a&&(document.location.href=e)}else typeof r.value<"u"&&(document.location.href=r.value)},!1)}function xt(r){var t=r.querySelector(".row"),e=t.cloneNode(!0),a=r.querySelector("[data-add]");r.addEventListener("click",function(i){for(var c=i.target;c&&c!=this;c=c.parentNode){if(c.matches("[data-add]")){var o=e.cloneNode(!0);r.insertBefore(o,c),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(c.matches("[data-delete]")){var n=c.closest(".row");n.remove(),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function kt(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,e)=>{Et(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,e)=>{qt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{xt(t)}),r.addEventListener("change",function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){var a=e.dataset.filesize;e.files[0].size>a&&(e.value="",alert("File too large"));break}},!1),r.addEventListener("change",function(t){Array.from(r.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(r.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Tt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var 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"):"".concat(t,"/css/core.min.css"),a='@import "'.concat(t,'/css/components/header.css";'),i=document.createElement("template");i.innerHTML=`
@@ -73,7 +73,7 @@
73
73
  </div>
74
74
  </div>
75
75
  <iam-pagination class="pagination--table" `).concat(this.hasAttribute("data-page")?'data-page="'.concat(this.getAttribute("data-page"),'"'):"",` ></iam-pagination>
76
- `),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(i,"</style>"))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));var e=this.classList.toString();e=e.replace("table--cta",""),e=e.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=" ".concat(e),this.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true");var a=this.classList.contains("table--cta");if(a||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector("#".concat(this.getAttribute("data-filterby"))):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),K(this.table,this.form),this.form.querySelector("[data-pagination]")||this.form.insertAdjacentHTML("beforeend",'<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||this.form.insertAdjacentHTML("beforeend",'<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Bt(this.table),Pt(this.table,this.form,this.pagination,this,this.savedTableBody),Ot(this.table,this.form,this.pagination,this),Ft(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))et(this.table,this.form,this.pagination,this);else{let o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,d=Math.floor(Math.random()*Date.now()*(n+1));return d};if(this.querySelector("iam-actionbar[data-selectall]")){var i=this.querySelector("iam-actionbar[data-selectall]");Array.from(this.table.querySelectorAll("thead tr")).forEach((n,d)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{var s="row".concat(o(d));n.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(s,'"/><label for="').concat(s,'"><span class="visually-hidden">Select row</span></label></td>'))}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){var d=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,s=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;i.setAttribute("data-selected",d==s?"all":s)}}),i.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!0})})}var c=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{if(n.querySelector(":scope > td > .dialog__wrapper")){var s=n.querySelector(":scope > td > .dialog__wrapper").parentNode;s.classList.add("td--fixed"),c=Array.from(s.parentNode.children).indexOf(s)}}),c!=-1&&(this.table.querySelector("thead tr th:nth-child(".concat(c+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(c+1,")"))).forEach((n,d)=>{n.classList.add("td--fixed")})),W(this.table,this.form,this.pagination,this),Y(this.table,this.form,this),I(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",o=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(t,e,a){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),t){case"data-total":{e!=a&&this.pagination.setAttribute("data-total",a);break}case"data-show":{e!=a&&this.pagination.setAttribute("data-show",a);break}case"data-page":{e!=a&&this.pagination.setAttribute("data-page",a);break}}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class $t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),i='@import "'.concat(e,'/css/components/card.css";'),c='@import "'.concat(e,'/css/components/card.global.css";'),o=document.createElement("template");o.innerHTML=`
76
+ `),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(i,"</style>"))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));var e=this.classList.toString();e=e.replace("table--cta",""),e=e.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=" ".concat(e),this.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true");var a=this.classList.contains("table--cta");if(a||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector("#".concat(this.getAttribute("data-filterby"))):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),K(this.table,this.form),this.form.querySelector("[data-pagination]")||this.form.insertAdjacentHTML("beforeend",'<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||this.form.insertAdjacentHTML("beforeend",'<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Bt(this.table),Pt(this.table,this.form,this.pagination,this,this.savedTableBody),Ot(this.table,this.form,this.pagination,this),Ft(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))et(this.table,this.form,this.pagination,this);else{let o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,d=Math.floor(Math.random()*Date.now()*(n+1));return d};if(this.querySelector("iam-actionbar[data-selectall]")||document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"))){var i=this.querySelector("iam-actionbar[data-selectall]")?this.querySelector("iam-actionbar[data-selectall]"):document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"));Array.from(this.table.querySelectorAll("thead tr")).forEach((n,d)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{var s="row".concat(o(d));n.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(s,'"/><label for="').concat(s,'"><span class="visually-hidden">Select row</span></label></td>'))}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){var d=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,s=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;i.setAttribute("data-selected",d==s?"all":s)}}),i.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!0})})}var c=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{if(n.querySelector(":scope > td > .dialog__wrapper")){var s=n.querySelector(":scope > td > .dialog__wrapper").parentNode;s.classList.add("td--fixed"),c=Array.from(s.parentNode.children).indexOf(s)}}),c!=-1&&(this.table.querySelector("thead tr th:nth-child(".concat(c+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(c+1,")"))).forEach((n,d)=>{n.classList.add("td--fixed")})),W(this.table,this.form,this.pagination,this),Y(this.table,this.form,this),I(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",o=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(t,e,a){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),t){case"data-total":{e!=a&&this.pagination.setAttribute("data-total",a);break}case"data-show":{e!=a&&this.pagination.setAttribute("data-show",a);break}case"data-page":{e!=a&&this.pagination.setAttribute("data-page",a);break}}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class $t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),i='@import "'.concat(e,'/css/components/card.css";'),c='@import "'.concat(e,'/css/components/card.global.css";'),o=document.createElement("template");o.innerHTML=`
77
77
  <style>
78
78
  @import "`.concat(a,`";
79
79
  `).concat(i,`