@iamproperty/components 7.7.1--beta2 → 7.7.1--beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +3 -3
- package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
- package/assets/js/components/advanced-select/advanced-select.component.js +21 -7
- package/assets/js/components/advanced-select/advanced-select.component.min.js +4 -4
- package/assets/js/components/advanced-select/advanced-select.component.min.js.map +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js +1 -1
- package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
- package/assets/js/components/calendar/calendar.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/config/config.component.min.js +1 -1
- package/assets/js/components/content/content.component.min.js +1 -1
- package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
- package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/form/form.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/input/input.component.min.js +1 -1
- package/assets/js/components/input-range/input-range.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/menu/menu.component.min.js +1 -1
- package/assets/js/components/milestone/milestone.component.min.js +1 -1
- package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
- package/assets/js/components/modal/modal.component.min.js +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multi-step-modal/multi-step-modal.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/password/password.component.min.js +1 -1
- package/assets/js/components/popover/popover.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.min.js +1 -1
- package/assets/js/components/rating/rating.component.min.js +1 -1
- package/assets/js/components/record-card/record-card.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +5 -5
- package/assets/js/components/search/search.component.min.js.map +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/split-button/split-button.component.min.js +1 -1
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +7 -7
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js.map +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/table-ajax/table-ajax.component.min.js +1 -1
- package/assets/js/components/table-basic/table-basic.component.min.js +1 -1
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js +1 -1
- package/assets/js/components/table-submit/table-submit.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/components/tag/tag.component.min.js +1 -1
- package/assets/js/components/tooltip/tooltip.component.min.js +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components/video-modal/video-modal.component.min.js +1 -1
- package/assets/js/components/word-count/word-count.component.min.js +1 -1
- package/assets/js/modules/advanced-select.js +31 -8
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/ts/components/advanced-select/advanced-select.component.ts +25 -7
- package/assets/ts/modules/advanced-select.ts +38 -17
- package/dist/components.es.js +24 -24
- package/dist/components.umd.js +98 -98
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-select.component.min.js","sources":["../../modules/advanced-select.js","../../modules/helpers.js","advanced-select.component.js"],"sourcesContent":["function advancedSelect(advancedSelect, displayInputField, datalist, isSearch = false) {\n let currentFocus = -1;\n const datalistWrapper = datalist.closest('.datalist__wrapper') ? datalist.closest('.datalist__wrapper') : datalist;\n // Hide the default datalist\n displayInputField.setAttribute('data-list', displayInputField.getAttribute('list'));\n displayInputField.setAttribute('list', '');\n if (displayInputField.hasAttribute('placeholder'))\n displayInputField.setAttribute('data-placeholder', displayInputField.getAttribute('placeholder'));\n if (displayInputField.hasAttribute('placeholder'))\n displayInputField.setAttribute('data-original-placeholder', displayInputField.getAttribute('placeholder'));\n displayInputField.addEventListener('focus', function () {\n if (displayInputField.value != \"\") {\n displayInputField.setAttribute('placeholder', displayInputField.value);\n displayInputField.setAttribute('data-value', displayInputField.value);\n }\n displayInputField.value = '';\n });\n displayInputField.addEventListener('keyup', function () {\n if (displayInputField.value != \"\") {\n displayInputField.setAttribute('data-value', displayInputField.value);\n }\n });\n displayInputField.addEventListener('blur', function () {\n if (displayInputField.hasAttribute('data-value')) {\n displayInputField.value = displayInputField.getAttribute('data-value');\n }\n if (displayInputField.hasAttribute('data-placeholder'))\n displayInputField.setAttribute('placeholder', displayInputField.getAttribute('data-placeholder'));\n });\n for (const option of datalist.options) {\n if (option.innerHTML == '')\n option.innerHTML = option.value;\n }\n datalist.addEventListener('click', function (event) {\n if (event && event.target instanceof HTMLElement && event.target.closest('option')) {\n const option = event.target.closest('option');\n displayInputField.value = option.value;\n if (typeof window.triggerDynamicEvent == 'function')\n window.triggerDynamicEvent(displayInputField);\n for (const optionInner of datalist.options) {\n optionInner.classList.remove('active');\n }\n option.classList.add('active');\n setTimeout(() => {\n advancedSelect.dispatchEvent(new CustomEvent('update-value', {\n detail: { value: option.value },\n }));\n }, 0);\n }\n });\n displayInputField.addEventListener('input', function () {\n displayInputField.removeAttribute('data-value');\n currentFocus = -1;\n if (advancedSelect.tagName != \"IAM-ADDRESS-LOOKUP\") {\n const text = displayInputField.value.toUpperCase();\n for (const option of datalist.options) {\n if (option.value.toUpperCase().indexOf(text) > -1) {\n option.style.display = 'block';\n option.classList.remove('hide');\n }\n else {\n option.style.display = 'none';\n option.classList.add('hide');\n }\n }\n }\n });\n advancedSelect.addEventListener('keydown', function (e) {\n if (e.keyCode == 40) {\n currentFocus++;\n addActive(datalist.options);\n }\n else if (e.keyCode == 38) {\n currentFocus--;\n addActive(datalist.options);\n }\n else if (e.keyCode == 13) {\n e.preventDefault();\n if (currentFocus > -1) {\n /*and simulate a click on the \"active\" item:*/\n if (datalist.options)\n datalist.options[currentFocus].click();\n }\n }\n });\n function addActive(x) {\n if (!x)\n return false;\n removeActive(x);\n if (currentFocus >= x.length)\n currentFocus = 0;\n if (currentFocus < 0)\n currentFocus = x.length - 1;\n x[currentFocus].classList.add('active');\n }\n function removeActive(x) {\n if (!x)\n return false;\n for (let i = 0; i < x.length; i++) {\n x[i].classList.remove('active');\n }\n }\n // Add the empty button\n displayInputField\n .closest('label')\n .insertAdjacentHTML('beforeend', '<button class=\"empty btn btn-action\" type=\"button\"><i class=\"fa-light fa-times me-0\"></i></button>');\n const emptyField = () => {\n displayInputField.removeAttribute('placeholder');\n if (displayInputField.hasAttribute('data-original-placeholder'))\n displayInputField.setAttribute('placeholder', displayInputField.getAttribute('data-original-placeholder'));\n displayInputField.removeAttribute('data-value');\n displayInputField.value = '';\n for (const optionInner of datalist.options) {\n optionInner.classList.remove('active');\n optionInner.removeAttribute('style');\n }\n const updateEvent = new CustomEvent('close-button-pressed');\n advancedSelect.dispatchEvent(updateEvent);\n };\n const closeBtn = advancedSelect.querySelector('.empty') ? advancedSelect.querySelector('.empty') : advancedSelect.shadowRoot.querySelector('.empty');\n closeBtn.addEventListener('click', function (e) {\n emptyField();\n });\n advancedSelect.addEventListener('empty', function (e) {\n emptyField();\n });\n}\nexport default advancedSelect;\n","/**\n * Global helper functions to help maintain and enhance framework elements.\n * @module Helpers\n */\n/**\n * Add global classes used by the CSS and later JavaScript.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addBodyClasses = (body) => {\n body.classList.add('js-enabled');\n if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n body.classList.add('ie');\n }\n};\n/**\n * Add global events.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addGlobalEvents = (body) => {\n const checkElements = function (hash) {\n const label = document.querySelector(`label[for=\"${hash.replace('#', '')}\"]`);\n const summary = document.querySelector(hash + ' summary');\n const dialog = document.querySelector(`dialog${hash}`);\n const detail = document.querySelector(`detail${hash}`);\n if (label instanceof HTMLElement)\n label.click();\n else if (summary instanceof HTMLElement)\n summary.click();\n else if (dialog instanceof HTMLElement)\n dialog.showModal();\n else if (detail instanceof HTMLElement)\n detail.addAttribute('open');\n };\n if (location.hash)\n checkElements(location.hash);\n window.addEventListener('hashchange', function () {\n checkElements(location.hash);\n }, false);\n addEventListener('popstate', (event) => {\n if (event && event.state && event.state.type && event.state.type == 'pagination') {\n const form = document.querySelector(`#${event.state.form}`);\n const pageInput = document.querySelector(`#${event.state.form} [data-pagination]`);\n if (pageInput)\n pageInput.value = event.state.page;\n else\n form.innerHTML += `<input name=\"page\" type=\"hidden\" data-pagination=\"true\" value=\"${event.state.page}\" />`;\n form.dispatchEvent(new Event('submit'));\n }\n });\n Array.from(document.querySelectorAll('form')).forEach((form) => {\n if (!(form === null || form === void 0 ? void 0 : form.closest('iam-form'))) {\n form.addEventListener('submit', (event) => {\n var _a;\n if (form.querySelector(':invalid')) {\n form.classList.add('was-validated');\n (_a = form === null || form === void 0 ? void 0 : form.querySelector('input:invalid')) === null || _a === void 0 ? void 0 : _a.scrollIntoView();\n event.preventDefault();\n }\n });\n }\n });\n document.addEventListener('click', (event) => {\n var _a;\n if (event && event.target instanceof HTMLElement && event.target.matches('form button:not([type=button])')) {\n const form = event.target.closest('form');\n if (!(form === null || form === void 0 ? void 0 : form.closest('iam-form'))) {\n // Reset password types\n Array.from(form.querySelectorAll('[data-password-type]')).forEach((input) => {\n input.setAttribute('type', 'password');\n });\n if (form.querySelector(':invalid') ||\n form.querySelector('.pwd-checker[data-strength=\"1\"]') ||\n form.querySelector('.pwd-checker[data-strength=\"2\"]')) {\n form.classList.add('was-validated');\n (_a = form === null || form === void 0 ? void 0 : form.querySelector('input:invalid')) === null || _a === void 0 ? void 0 : _a.scrollIntoView();\n event.preventDefault();\n }\n if (form.querySelector('iam-multiselect[data-is-required][data-error]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n }\n }\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n if (document.querySelector('.dialog--transactional[open], .dialog--acknowledgement[open]')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n });\n Array.from(document.querySelectorAll('label progress')).forEach((progress) => {\n const label = progress.closest('label');\n label.setAttribute('data-percent', progress.getAttribute('value'));\n });\n};\nexport const isNumeric = function (str) {\n if (typeof str != 'string')\n return false; // we only process strings!\n return (!isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str))); // ...and ensure strings of whitespace fail\n};\nexport const zeroPad = (num, places) => String(num).padStart(places, '0');\nexport const ucfirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);\nexport const ucwords = (str) => str\n .split(' ')\n .map((s) => ucfirst(s))\n .join(' ');\nexport const unsnake = (str) => str.replace(/_/g, ' ');\nexport const snake = (str) => str.replace(/ /g, '_');\nexport const safeID = function (str) {\n str = str.toLowerCase();\n str = snake(str);\n str = str.replace(/\\W/g, '');\n return str;\n};\nexport const numberOfDays = function (startDateString, endDateString) {\n const convertStart = startDateString.split('/');\n const convertEnd = endDateString.split('/');\n const dateStart = new Date(convertStart[1] + '/' + convertStart[0] + '/' + convertStart[2]);\n const dateEnd = new Date(convertEnd[1] + '/' + convertEnd[0] + '/' + convertEnd[2]);\n if (dateStart == 'Invalid Date')\n throw 'Start date is not a valid date';\n if (dateEnd == 'Invalid Date')\n throw 'End date is not a valid date';\n // To calculate the time difference of two dates\n const diffTime = dateEnd.getTime() - dateStart.getTime();\n const numberOfDays = diffTime / (1000 * 3600 * 24) + 1;\n if (numberOfDays < 0)\n throw 'The start date should be before the end date';\n return numberOfDays;\n};\n// Used to get values from nested json objects\nexport const resolvePath = (object, path, defaultValue) => path\n // eslint-disable-next-line no-useless-escape\n .split(/[\\.\\[\\]\\'\\\"]/)\n .filter((p) => p)\n .reduce((o, p) => (o ? o[p] : defaultValue), object);\nexport const isTraversable = (o) => Array.isArray(o) || (o !== null && ['function', 'object'].includes(typeof o));\nexport const getSwipeDirection = (touchstartX, touchstartY, touchendX, touchendY) => {\n const limit = Math.tan(((45 * 1.5) / 180) * Math.PI);\n const pageWidth = window.innerWidth || document.body.clientWidth;\n const treshold = Math.max(1, Math.floor(0.01 * pageWidth));\n const x = touchendX - touchstartX;\n const y = touchendY - touchstartY;\n const xy = Math.abs(x / y);\n const yx = Math.abs(y / x);\n if (Math.abs(x) > treshold || Math.abs(y) > treshold) {\n if (yx <= limit) {\n if (x < 0) {\n return 'left';\n }\n else {\n return 'right';\n }\n }\n if (xy <= limit) {\n if (y < 0) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n }\n else {\n return 'tap';\n }\n};\nexport const uniqueID = (index = 1) => {\n const ID = Math.floor(Math.random() * Date.now() * (index + 1));\n return ID;\n};\nexport const isValidPostcode = (searchValue) => {\n const regexp = /^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi;\n return regexp.test(searchValue.trim());\n};\n","import advancedSelect from '../../modules/advanced-select.js';\nimport { safeID } from '../../modules/helpers.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Advanced select',\n});\nclass iamAdvancedSelect 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 template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n input {\n background: red;\n }\n input:not(.is-invalid):not(:invalid) {\n background: none!important;\n }\n .optional-text {\n display: none;\n } \n .js-hide {\n display: none !important;\n }\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/8bd0fca975.css\" crossorigin=\"anonymous\" />\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n var _a;\n // Clone original input field, re-name and use for display purposes\n const inputField = this.querySelector('input');\n if (!inputField)\n return;\n const displayInputField = inputField.cloneNode();\n displayInputField.setAttribute('name', `${inputField.getAttribute('name')}Alt`);\n inputField.removeAttribute('data-change-events');\n displayInputField.removeAttribute('id');\n let datalist = this.querySelector('datalist');\n inputField.after(displayInputField);\n // Hide original input field\n inputField.setAttribute('type', 'hidden');\n // if data list does not exist then create one and append\n if (!datalist) {\n datalist = document.createElement('datalist');\n const listID = safeID('list');\n datalist.setAttribute('id', listID);\n searchWrapper.appendChild(datalist);\n displayInputField.setAttribute('list', listID);\n }\n if (datalist.querySelector(`[value=\"${inputField.value}\"]`))\n (_a = datalist.querySelector(`[value=\"${inputField.value}\"]`)) === null || _a === void 0 ? void 0 : _a.classList.add('active');\n advancedSelect(this, displayInputField, datalist);\n // Apply initial value passed to the component host\n const initialValue = this.getAttribute('value') || '';\n if (!initialValue)\n return;\n inputField.value = initialValue;\n inputField.setAttribute('value', initialValue);\n displayInputField.value = '';\n displayInputField.setAttribute('placeholder', initialValue);\n displayInputField.setAttribute('data-value', initialValue);\n if (datalist) {\n Array.from(datalist.querySelectorAll('option')).forEach((option) => {\n const isMatch = option.getAttribute('value') === initialValue;\n option.classList.toggle('active', isMatch);\n });\n }\n }\n}\nexport default iamAdvancedSelect;\n"],"names":["advancedSelect","displayInputField","datalist","isSearch","currentFocus","option","event","optionInner","text","addActive","x","removeActive","i","emptyField","updateEvent","snake","str","safeID","iamAdvancedSelect","assetLocation","coreCSS","template","_a","inputField","listID","initialValue","isMatch"],"mappings":";;;IAAA,SAASA,EAAeA,EAAgBC,EAAmBC,EAAUC,EAAW,GAAO,CACnF,IAAIC,EAAe,GACKF,EAAS,QAAQ,oBAAoB,GAAIA,EAAS,QAAQ,oBAAoB,EAEtGD,EAAkB,aAAa,YAAaA,EAAkB,aAAa,MAAM,CAAC,EAClFA,EAAkB,aAAa,OAAQ,EAAE,EACrCA,EAAkB,aAAa,aAAa,GAC5CA,EAAkB,aAAa,mBAAoBA,EAAkB,aAAa,aAAa,CAAC,EAChGA,EAAkB,aAAa,aAAa,GAC5CA,EAAkB,aAAa,4BAA6BA,EAAkB,aAAa,aAAa,CAAC,EAC7GA,EAAkB,iBAAiB,QAAS,UAAY,CAChDA,EAAkB,OAAS,KAC3BA,EAAkB,aAAa,cAAeA,EAAkB,KAAK,EACrEA,EAAkB,aAAa,aAAcA,EAAkB,KAAK,GAExEA,EAAkB,MAAQ,EAC9B,CAAC,EACDA,EAAkB,iBAAiB,QAAS,UAAY,CAChDA,EAAkB,OAAS,IAC3BA,EAAkB,aAAa,aAAcA,EAAkB,KAAK,CAE5E,CAAC,EACDA,EAAkB,iBAAiB,OAAQ,UAAY,CAC/CA,EAAkB,aAAa,YAAY,IAC3CA,EAAkB,MAAQA,EAAkB,aAAa,YAAY,GAErEA,EAAkB,aAAa,kBAAkB,GACjDA,EAAkB,aAAa,cAAeA,EAAkB,aAAa,kBAAkB,CAAC,CACxG,CAAC,EACD,UAAWI,KAAUH,EAAS,QACtBG,EAAO,WAAa,KACpBA,EAAO,UAAYA,EAAO,OAElCH,EAAS,iBAAiB,QA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AAkB,MAAQ,GAC1BA,EAAkB,aAAa,cAAewB,CAAY,EAC1DxB,EAAkB,aAAa,aAAcwB,CAAY,EACrDvB,GACA,MAAM,KAAKA,EAAS,iBAAiB,QAAQ,CAAC,EAAE,QAASG,GAAW,CAChE,MAAMqB,EAAUrB,EAAO,aAAa,OAAO,IAAMoB,EACjDpB,EAAO,UAAU,OAAO,SAAUqB,CAAO,CAC7C,CAAC,EAET,CACJ"}
|
|
1
|
+
{"version":3,"file":"advanced-select.component.min.js","sources":["../../modules/advanced-select.js","../../modules/helpers.js","advanced-select.component.js"],"sourcesContent":["function advancedSelect(advancedSelect, displayInputField, datalist, isSearch = false) {\n let currentFocus = -1;\n const datalistWrapper = datalist.closest('.datalist__wrapper') ? datalist.closest('.datalist__wrapper') : datalist;\n // Hide the default datalist\n displayInputField.setAttribute('data-list', displayInputField.getAttribute('list'));\n displayInputField.setAttribute('list', '');\n if (displayInputField.hasAttribute('placeholder'))\n displayInputField.setAttribute('data-placeholder', displayInputField.getAttribute('placeholder'));\n if (displayInputField.hasAttribute('placeholder'))\n displayInputField.setAttribute('data-original-placeholder', displayInputField.getAttribute('placeholder'));\n displayInputField.addEventListener('focus', function () {\n if (displayInputField.value != \"\") {\n displayInputField.setAttribute('placeholder', displayInputField.value);\n displayInputField.setAttribute('data-value', displayInputField.value);\n }\n displayInputField.value = '';\n });\n displayInputField.addEventListener('blur', function () {\n if (displayInputField.hasAttribute('data-value')) {\n displayInputField.value = displayInputField.getAttribute('data-value');\n }\n if (displayInputField.hasAttribute('data-placeholder'))\n displayInputField.setAttribute('placeholder', displayInputField.getAttribute('data-placeholder'));\n });\n for (const option of datalist.options) {\n if (option.innerHTML == '')\n option.innerHTML = option.value;\n }\n datalist.addEventListener('click', function (event) {\n var _a;\n if (event && event.target instanceof HTMLElement && event.target.closest('option')) {\n const option = event.target.closest('option');\n const optionText = ((_a = option.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || option.value;\n // Store actual value on the original input\n const originalInput = advancedSelect.querySelector('input[type=\"hidden\"]');\n if (originalInput) {\n originalInput.value = option.value;\n originalInput.setAttribute('value', option.value);\n }\n // Show label text in the visible field\n displayInputField.value = optionText;\n displayInputField.setAttribute('data-value', optionText);\n displayInputField.setAttribute('placeholder', optionText);\n if (typeof window.triggerDynamicEvent == 'function')\n window.triggerDynamicEvent(displayInputField);\n for (const optionInner of datalist.options) {\n optionInner.classList.remove('active');\n }\n option.classList.add('active');\n setTimeout(() => {\n advancedSelect.dispatchEvent(new CustomEvent('update-value', {\n detail: {\n value: option.value,\n text: optionText,\n },\n }));\n }, 0);\n }\n });\n displayInputField.addEventListener('input', function () {\n displayInputField.removeAttribute('data-value');\n currentFocus = -1;\n if (advancedSelect.tagName != \"IAM-ADDRESS-LOOKUP\") {\n const text = displayInputField.value.toUpperCase();\n for (const option of datalist.options) {\n const optionText = (option.textContent || option.value).toUpperCase();\n if (optionText.indexOf(text) > -1) {\n option.style.display = 'block';\n option.classList.remove('hide');\n }\n else {\n option.style.display = 'none';\n option.classList.add('hide');\n }\n }\n }\n });\n advancedSelect.addEventListener('keydown', function (e) {\n if (e.keyCode == 40) {\n currentFocus++;\n addActive(datalist.options);\n }\n else if (e.keyCode == 38) {\n currentFocus--;\n addActive(datalist.options);\n }\n else if (e.keyCode == 13) {\n e.preventDefault();\n if (currentFocus > -1) {\n /*and simulate a click on the \"active\" item:*/\n if (datalist.options)\n datalist.options[currentFocus].click();\n }\n }\n });\n function addActive(x) {\n if (!x)\n return false;\n removeActive(x);\n if (currentFocus >= x.length)\n currentFocus = 0;\n if (currentFocus < 0)\n currentFocus = x.length - 1;\n x[currentFocus].classList.add('active');\n }\n function removeActive(x) {\n if (!x)\n return false;\n for (let i = 0; i < x.length; i++) {\n x[i].classList.remove('active');\n }\n }\n // Add the empty button\n displayInputField\n .closest('label')\n .insertAdjacentHTML('beforeend', '<button class=\"empty btn btn-action\" type=\"button\"><i class=\"fa-light fa-times me-0\"></i></button>');\n const emptyField = () => {\n const originalInput = advancedSelect.querySelector('input[type=\"hidden\"]');\n if (originalInput) {\n originalInput.value = '';\n originalInput.setAttribute('value', '');\n }\n displayInputField.removeAttribute('placeholder');\n if (displayInputField.hasAttribute('data-original-placeholder'))\n displayInputField.setAttribute('placeholder', displayInputField.getAttribute('data-original-placeholder'));\n displayInputField.removeAttribute('data-value');\n displayInputField.value = '';\n for (const optionInner of datalist.options) {\n optionInner.classList.remove('active');\n optionInner.classList.remove('hide');\n optionInner.removeAttribute('style');\n }\n const updateEvent = new CustomEvent('close-button-pressed');\n advancedSelect.dispatchEvent(updateEvent);\n // Notify consumers the value was cleared\n advancedSelect.dispatchEvent(new CustomEvent('update-value', {\n detail: {\n value: '',\n text: '',\n },\n }));\n };\n const closeBtn = advancedSelect.querySelector('.empty') ? advancedSelect.querySelector('.empty') : advancedSelect.shadowRoot.querySelector('.empty');\n closeBtn.addEventListener('click', function (e) {\n emptyField();\n });\n advancedSelect.addEventListener('empty', function (e) {\n emptyField();\n });\n}\nexport default advancedSelect;\n","/**\n * Global helper functions to help maintain and enhance framework elements.\n * @module Helpers\n */\n/**\n * Add global classes used by the CSS and later JavaScript.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addBodyClasses = (body) => {\n body.classList.add('js-enabled');\n if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n body.classList.add('ie');\n }\n};\n/**\n * Add global events.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addGlobalEvents = (body) => {\n const checkElements = function (hash) {\n const label = document.querySelector(`label[for=\"${hash.replace('#', '')}\"]`);\n const summary = document.querySelector(hash + ' summary');\n const dialog = document.querySelector(`dialog${hash}`);\n const detail = document.querySelector(`detail${hash}`);\n if (label instanceof HTMLElement)\n label.click();\n else if (summary instanceof HTMLElement)\n summary.click();\n else if (dialog instanceof HTMLElement)\n dialog.showModal();\n else if (detail instanceof HTMLElement)\n detail.addAttribute('open');\n };\n if (location.hash)\n checkElements(location.hash);\n window.addEventListener('hashchange', function () {\n checkElements(location.hash);\n }, false);\n addEventListener('popstate', (event) => {\n if (event && event.state && event.state.type && event.state.type == 'pagination') {\n const form = document.querySelector(`#${event.state.form}`);\n const pageInput = document.querySelector(`#${event.state.form} [data-pagination]`);\n if (pageInput)\n pageInput.value = event.state.page;\n else\n form.innerHTML += `<input name=\"page\" type=\"hidden\" data-pagination=\"true\" value=\"${event.state.page}\" />`;\n form.dispatchEvent(new Event('submit'));\n }\n });\n Array.from(document.querySelectorAll('form')).forEach((form) => {\n if (!(form === null || form === void 0 ? void 0 : form.closest('iam-form'))) {\n form.addEventListener('submit', (event) => {\n var _a;\n if (form.querySelector(':invalid')) {\n form.classList.add('was-validated');\n (_a = form === null || form === void 0 ? void 0 : form.querySelector('input:invalid')) === null || _a === void 0 ? void 0 : _a.scrollIntoView();\n event.preventDefault();\n }\n });\n }\n });\n document.addEventListener('click', (event) => {\n var _a;\n if (event && event.target instanceof HTMLElement && event.target.matches('form button:not([type=button])')) {\n const form = event.target.closest('form');\n if (!(form === null || form === void 0 ? void 0 : form.closest('iam-form'))) {\n // Reset password types\n Array.from(form.querySelectorAll('[data-password-type]')).forEach((input) => {\n input.setAttribute('type', 'password');\n });\n if (form.querySelector(':invalid') ||\n form.querySelector('.pwd-checker[data-strength=\"1\"]') ||\n form.querySelector('.pwd-checker[data-strength=\"2\"]')) {\n form.classList.add('was-validated');\n (_a = form === null || form === void 0 ? void 0 : form.querySelector('input:invalid')) === null || _a === void 0 ? void 0 : _a.scrollIntoView();\n event.preventDefault();\n }\n if (form.querySelector('iam-multiselect[data-is-required][data-error]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n }\n }\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n if (document.querySelector('.dialog--transactional[open], .dialog--acknowledgement[open]')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n });\n Array.from(document.querySelectorAll('label progress')).forEach((progress) => {\n const label = progress.closest('label');\n label.setAttribute('data-percent', progress.getAttribute('value'));\n });\n};\nexport const isNumeric = function (str) {\n if (typeof str != 'string')\n return false; // we only process strings!\n return (!isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str))); // ...and ensure strings of whitespace fail\n};\nexport const zeroPad = (num, places) => String(num).padStart(places, '0');\nexport const ucfirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);\nexport const ucwords = (str) => str\n .split(' ')\n .map((s) => ucfirst(s))\n .join(' ');\nexport const unsnake = (str) => str.replace(/_/g, ' ');\nexport const snake = (str) => str.replace(/ /g, '_');\nexport const safeID = function (str) {\n str = str.toLowerCase();\n str = snake(str);\n str = str.replace(/\\W/g, '');\n return str;\n};\nexport const numberOfDays = function (startDateString, endDateString) {\n const convertStart = startDateString.split('/');\n const convertEnd = endDateString.split('/');\n const dateStart = new Date(convertStart[1] + '/' + convertStart[0] + '/' + convertStart[2]);\n const dateEnd = new Date(convertEnd[1] + '/' + convertEnd[0] + '/' + convertEnd[2]);\n if (dateStart == 'Invalid Date')\n throw 'Start date is not a valid date';\n if (dateEnd == 'Invalid Date')\n throw 'End date is not a valid date';\n // To calculate the time difference of two dates\n const diffTime = dateEnd.getTime() - dateStart.getTime();\n const numberOfDays = diffTime / (1000 * 3600 * 24) + 1;\n if (numberOfDays < 0)\n throw 'The start date should be before the end date';\n return numberOfDays;\n};\n// Used to get values from nested json objects\nexport const resolvePath = (object, path, defaultValue) => path\n // eslint-disable-next-line no-useless-escape\n .split(/[\\.\\[\\]\\'\\\"]/)\n .filter((p) => p)\n .reduce((o, p) => (o ? o[p] : defaultValue), object);\nexport const isTraversable = (o) => Array.isArray(o) || (o !== null && ['function', 'object'].includes(typeof o));\nexport const getSwipeDirection = (touchstartX, touchstartY, touchendX, touchendY) => {\n const limit = Math.tan(((45 * 1.5) / 180) * Math.PI);\n const pageWidth = window.innerWidth || document.body.clientWidth;\n const treshold = Math.max(1, Math.floor(0.01 * pageWidth));\n const x = touchendX - touchstartX;\n const y = touchendY - touchstartY;\n const xy = Math.abs(x / y);\n const yx = Math.abs(y / x);\n if (Math.abs(x) > treshold || Math.abs(y) > treshold) {\n if (yx <= limit) {\n if (x < 0) {\n return 'left';\n }\n else {\n return 'right';\n }\n }\n if (xy <= limit) {\n if (y < 0) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n }\n else {\n return 'tap';\n }\n};\nexport const uniqueID = (index = 1) => {\n const ID = Math.floor(Math.random() * Date.now() * (index + 1));\n return ID;\n};\nexport const isValidPostcode = (searchValue) => {\n const regexp = /^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi;\n return regexp.test(searchValue.trim());\n};\n","import advancedSelect from '../../modules/advanced-select.js';\nimport { safeID } from '../../modules/helpers.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Advanced select',\n});\nclass iamAdvancedSelect 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 template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n input {\n background: red;\n }\n input:not(.is-invalid):not(:invalid) {\n background: none!important;\n }\n .optional-text {\n display: none;\n } \n .js-hide {\n display: none !important;\n }\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/8bd0fca975.css\" crossorigin=\"anonymous\" />\n <slot></slot>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n var _a, _b;\n // Clone original input field, re-name and use for display purposes\n const inputField = this.querySelector('input');\n if (!inputField)\n return;\n const displayInputField = inputField.cloneNode();\n displayInputField.value = '';\n displayInputField.removeAttribute('value');\n displayInputField.setAttribute('name', `${inputField.getAttribute('name')}Alt`);\n inputField.removeAttribute('data-change-events');\n displayInputField.removeAttribute('id');\n let datalist = this.querySelector('datalist');\n inputField.after(displayInputField);\n // Hide original input field\n inputField.setAttribute('type', 'hidden');\n // if data list does not exist then create one and append\n if (!datalist) {\n datalist = document.createElement('datalist');\n const listID = safeID('list');\n datalist.setAttribute('id', listID);\n searchWrapper.appendChild(datalist);\n displayInputField.setAttribute('list', listID);\n }\n else {\n displayInputField.setAttribute('list', datalist.id);\n }\n if (datalist && datalist.querySelector(`[value=\"${inputField.value}\"]`)) {\n (_a = datalist.querySelector(`[value=\"${inputField.value}\"]`)) === null || _a === void 0 ? void 0 : _a.classList.add('active');\n }\n advancedSelect(this, displayInputField, datalist);\n // Apply initial value passed to the component host or original input\n const initialValue = this.getAttribute('value') || inputField.value || '';\n if (!initialValue)\n return;\n inputField.value = initialValue;\n inputField.setAttribute('value', initialValue);\n let displayValue = initialValue;\n if (datalist) {\n const selectedOption = Array.from(datalist.querySelectorAll('option')).find((option) => {\n return option.getAttribute('value') === initialValue;\n });\n if (selectedOption) {\n displayValue = ((_b = selectedOption.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || selectedOption.value;\n }\n Array.from(datalist.querySelectorAll('option')).forEach((option) => {\n const isMatch = option.getAttribute('value') === initialValue;\n option.classList.toggle('active', isMatch);\n });\n }\n displayInputField.value = displayValue;\n displayInputField.setAttribute('placeholder', displayValue);\n displayInputField.setAttribute('data-value', displayValue);\n displayInputField.removeAttribute('value');\n }\n}\nexport default iamAdvancedSelect;\n"],"names":["advancedSelect","displayInputField","datalist","isSearch","currentFocus","option","event","_a","optionText","originalInput","optionInner","text","addActive","x","removeActive","i","emptyField","updateEvent","snake","str","safeID","iamAdvancedSelect","assetLocation","coreCSS","template","_b","inputField","listID","initialValue","displayValue","selectedOption","isMatch"],"mappings":";;;IAAA,SAASA,EAAeA,EAAgBC,EAAmBC,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AK,IAAI,KAAO,MAAQnB,IAAO,QAAkBA,EAAG,UAAU,IAAI,QAAQ,GAEjIP,EAAe,KAAMC,EAAmBC,CAAQ,EAEhD,MAAM0B,EAAe,KAAK,aAAa,OAAO,GAAKF,EAAW,OAAS,GACvE,GAAI,CAACE,EACD,OACJF,EAAW,MAAQE,EACnBF,EAAW,aAAa,QAASE,CAAY,EAC7C,IAAIC,EAAeD,EACnB,GAAI1B,EAAU,CACV,MAAM4B,EAAiB,MAAM,KAAK5B,EAAS,iBAAiB,QAAQ,CAAC,EAAE,KAAMG,GAClEA,EAAO,aAAa,OAAO,IAAMuB,CAC3C,EACGE,IACAD,IAAiBJ,EAAKK,EAAe,eAAiB,MAAQL,IAAO,OAAS,OAASA,EAAG,KAAI,IAAOK,EAAe,OAExH,MAAM,KAAK5B,EAAS,iBAAiB,QAAQ,CAAC,EAAE,QAASG,GAAW,CAChE,MAAM0B,EAAU1B,EAAO,aAAa,OAAO,IAAMuB,EACjDvB,EAAO,UAAU,OAAO,SAAU0B,CAAO,CAC7C,CAAC,CACL,CACA9B,EAAkB,MAAQ4B,EAC1B5B,EAAkB,aAAa,cAAe4B,CAAY,EAC1D5B,EAAkB,aAAa,aAAc4B,CAAY,EACzD5B,EAAkB,gBAAgB,OAAO,CAC7C,CACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function E(t,m){const g=t.closest("dialog"),b=(e,o,r=!1)=>{let s=!1,a=o.getAttribute("name");if(!a)return!1;a.includes("[]")&&(a=a.replace("[]",`[${o.value}]`));let l=e.querySelector(`[data-name="${a}"]`);l&&o.getAttribute("type")=="checkbox"&&(s=!o.checked);const c=o.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),e.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),r||l.classList.add("tag--not-set"),l.setAttribute("data-name",a),l.innerHTML=c.replace("$value",o.value),(!o.value||s)&&l.remove(),o.parentNode.closest("[data-filter-text]")){const i=o.parentNode.closest("[data-filter-text]");let v=!0;if(a="",i.querySelectorAll("input").forEach((u,n)=>{const p=u.getAttribute("name");if(a+=`${n!=0?",":""}${p}`,e.querySelector(`[data-name="${p}"]`)&&e.querySelector(`[data-name="${p}"]`).remove(),u.value){const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r||l.classList.add("tag--not-set"),d.setAttribute("data-name",p),d.innerHTML=c.replace("$value",u.value),e.appendChild(d)}else v=!1}),e.querySelector(`[data-name="${a}"]`)&&e.querySelector(`[data-name="${a}"]`).remove(),v){let u=i.getAttribute("data-filter-text");i.querySelectorAll("input").forEach((p,d)=>{const y=p.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),u=u.replace(`$${d+1}`,p.value)});const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r||l.classList.add("tag--not-set"),n.setAttribute("data-name",a),n.innerHTML=u,e.appendChild(n)}}},f=(e=!1)=>{m.innerHTML="",Array.from(t.querySelectorAll('input:is([type="checkbox"],[type="radio"]):checked, input:not([type="checkbox"], [type="radio"])')).forEach(o=>{b(m,o,e)})};f(!0),Array.from(t.querySelectorAll("input[data-filter-text]")).forEach(e=>{e.addEventListener("change",function(o){var r;const s=!t.closest("dialog");if(!t.hasAttribute("data-keep-same")&&!t.querySelector("dialog")&&b(m,e,s),s){const a=new CustomEvent("update");(r=t.parentElement.closest("iam-applied-filters"))===null||r===void 0||r.dispatchEvent(a)}})});const h=e=>{if(!e?.hasAttribute("data-name"))return!1;const o=e.getAttribute("data-name").split(",");for(let r=0;r<o.length;r++){const s=o[r];let a=`[name="${s}"]`;s.match(/\[(.*)\]/)&&(a=`[value="${s.replace(/.*\[(.*)\]/,"$1")}"]`);const l=t.querySelectorAll(a);for(let c=0;c<l.length;c++){const i=l[c];i.getAttribute("type")!="radio"&&i.getAttribute("type")!="checkbox"?i.value="":i.checked=!1;const v=new CustomEvent("change");i?.dispatchEvent(v)}}e.remove(),f()};if(m.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const o=e.target.closest(".filter"),r=o.getAttribute("data-name");h(o);const s=new CustomEvent("filter-clicked",{detail:r});if(t.dispatchEvent(s),t.querySelector("dialog iam-applied-filters")){const a=new CustomEvent("filter",{detail:r});t.querySelector("dialog iam-applied-filters").dispatchEvent(a)}}},!1),t.addEventListener("filter",e=>{const o=t.shadowRoot.querySelector(`[data-name="${e.detail}"]`);h(o)}),t.addEventListener("set-filters",e=>{f(!0)}),g){const e=t.querySelector(".btn-primary")?t.querySelector(".btn-primary"):t.shadowRoot.querySelector(".btn-primary");e?.addEventListener("click",o=>{const r=new CustomEvent("update"),s=new CustomEvent("submit");if(t.dispatchEvent(s),t.parentElement.closest("iam-applied-filters")&&t.parentElement.closest("iam-applied-filters").dispatchEvent(r),t.parentElement&&t.parentElement.closest("iam-applied-filters")&&!t.parentElement.closest("iam-applied-filters").closest("dialog")){const a=new CustomEvent("set-filters");t.parentElement.closest("iam-applied-filters").dispatchEvent(a)}if(f(!0),!t.querySelector(".btn-primary").hasAttribute("command")){g.close();const a=new Event("close");g.dispatchEvent(a)}})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const m=this.classList.toString(),g=document.createElement("template");g.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const M=t=>t.charAt(0).toUpperCase()+t.slice(1),q=t=>t.replace(/_/g," "),N=(t,r)=>{for(let a=1;a<=10;a++){if(t.hasAttribute(`data-colour-${a}`)){const o=t.getAttribute(`data-colour-${a}`);t.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${o})`),t.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${o}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${a}]`)).forEach(o=>{const e=o.getAttribute(`data-colour-${a}`);o.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${e})`),o.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${e}-hover)`)})}return!0},k=(t,r,a)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return R(t,r,a),!0;const o=r.querySelector(".chart__key");o.innerHTML="";const e=r.querySelector(".chart__guidelines");e.innerHTML="";const i=r.querySelector(".chart__yaxis");i.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(c=>{c.remove()});const{xaxis:n}=g(t);return A(t,a),T(r,a,o),X(t,e),E(t,i),n&&Y(r),!0},R=(t,r,a)=>{const o=r.querySelector(".chart__key");return o.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(e=>{e.remove()}),A(t,a),T(r,a,o),H(r),!0},V=function(t,r){const a=r.querySelector(".chart");a.addEventListener("mousemove",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest("td:not(:first-child")){const s=n.target.closest("td:not(:first-child").getBoundingClientRect(),d=n.clientX-s.left,l=n.clientY-s.top;a.setAttribute("style",`--cursor-x: ${d}px; --cursor-y: ${l}px;`)}});const o=r.querySelectorAll("label");Array.from(o).forEach(n=>{r.querySelector(`input#${n.getAttribute("for")}`).checked?n.setAttribute("part","key-checked"):n.setAttribute("part","key-unchecked")});const e=t.querySelector("table"),i=r.querySelector("table");r.addEventListener("change",function(n){const c=n.target,s=new CustomEvent("view-change",{detail:{"data-dataset":c.getAttribute("data-dataset"),label:c.getAttribute("data-label"),checked:c.checked}});t.dispatchEvent(s),Array.from(o).forEach(d=>{var l;!((l=r.querySelector(`input#${d.getAttribute("for")}`))===null||l===void 0)&&l.checked?d.setAttribute("part","key-checked"):d.setAttribute("part","key-unchecked")}),i.innerHTML=e.innerHTML,A(t,i),t.tagName=="IAM-DOUGHNUTCHART"&&H(r)})},U=function(t,r){const a=t.querySelector("table"),o=r.querySelector("table"),e=(s,d)=>{d.disconnect(),c.disconnect();for(const l of s)(l.attributeName=="class"||l.type==="attributes"||l.type==="attributes")&&(o.innerHTML=a.innerHTML,k(t,r,o));d.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},i=(s,d)=>{d.disconnect(),c.disconnect();for(const l of s)(l.type=="characterData"||l.type=="childList"&&l.addedNodes.length)&&(o.innerHTML=a.innerHTML,k(t,r,o));d.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0})},n=new MutationObserver(i),c=new MutationObserver(e);return n.observe(a,{characterData:!0,subtree:!0}),c.observe(t,{attributes:!0}),!0};function C(t,r){r>1&&(t=t-.25);const a=Math.cos(2*Math.PI*t),o=Math.sin(2*Math.PI*t);return[a*100,o*100]}const g=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),a=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,o=t.hasAttribute("data-max")?t.getAttribute("data-max"):j(t,r),e=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],i=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],n=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:a,max:o,yaxis:e,xaxis:n,guidelines:i}};function j(t,r){const a=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",o=Array.from(r.querySelectorAll(a)).map(i=>i.getAttribute("data-numeric")),e=Math.max(...o);return Math.ceil(e)}const x=function(t,r,a,o){let e=String(t);e=e.replace("\xA3",""),e=e.replace("%",""),e=e.replace(",",""),e=Number.parseFloat(e);let i=(e-r)/(a-r)*100,n=i,c=0;return o&&o!=0&&(c=(o-r)/(a-r)*100),r<0&&(c=Math.abs(r/(a-r)*100),e<0?(i=c-i,c=c-i,n=c):(i=i-c,n=i+c)),{percent:i,axis:n,bottom:c}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(e=>{let i=0;Array.from(e.querySelectorAll("td:not(:first-child)")).forEach(n=>{const c=n.cloneNode(!0);Array.from(c.querySelectorAll("*")).forEach(l=>{l.remove()});const s=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));n.setAttribute("data-numeric",s),n.setAttribute("data-value",c.textContent),getComputedStyle(n).display!="none"&&(i+=s),Array.from(n.querySelectorAll("a, button")).forEach((l,m)=>{m==0&&l.insertAdjacentHTML("beforeBegin","<hr/>"),l.classList.add("btn"),l.classList.add("btn-tertiary")})}),e.setAttribute("data-numeric",i)});const{min:a,max:o}=g(t);Array.from(r.querySelectorAll("tbody tr")).forEach((e,i)=>{const n=e.querySelector("td:first-child, th:first-child")?e.querySelector("td:first-child, th:first-child").textContent:"";e.setAttribute("part","group");const c=(e.getAttribute("data-numeric")-a)/(o-a)*100;e.style.setProperty("--percent",`${c}%`),Array.from(e.querySelectorAll("td:not([data-label])")).forEach((l,m)=>{m==0?l.setAttribute("part","xaxis-label"):l.setAttribute("part","value"),e.querySelectorAll("td").length>2&&l.setAttribute("data-label",r.querySelectorAll("thead th")[m].textContent)});const s=e.hasAttribute("data-min")?e.getAttribute("data-min"):a,d=e.hasAttribute("data-max")?e.getAttribute("data-max"):o;if(s<0){const l=Math.abs(s/(d-s)*100);t.setAttribute("style",`--min-bottom: ${l}%;`)}e.style.setProperty("--row-index",i+1),Array.from(e.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(l=>{if(getComputedStyle(l).display=="none")return;const f=l.innerHTML,v=Number.parseFloat(l.getAttribute("data-numeric")),h=Number.parseFloat(l.getAttribute("data-start"));if(l.querySelector("span[data-group]")||(l.innerHTML=`<span data-group="${n}" ${l.hasAttribute("data-label")?`data-label="${l.getAttribute("data-label")}"`:""} part="popover">${f}</span>`),!l.hasAttribute("style")){const{percent:u,bottom:y,axis:p}=x(v,s,d,h);l.setAttribute("data-percent",u),l.setAttribute("style",`--bottom:${y}%;--percent:${u}%;--axis:${p}%;`)}})})},I=function(t){const r=t.querySelector(".chart__wrapper"),a=t.querySelector(".chart__spacer span"),o=t.querySelector(".chart table");let e="";Array.from(o.querySelectorAll("tbody tr td:first-child")).forEach(i=>{typeof i.textContent<"u"&&i.textContent.length>e.length&&(e=i.textContent)}),r.setAttribute("data-longest-label",e),a.innerHTML=e},B=function(t){const r=t.querySelector(".chart__wrapper"),a=t.querySelector(".chart table");let o="";Array.from(a.querySelectorAll("tbody tr td:not(:first-child)")).forEach(e=>{typeof e.getAttribute("data-value")<"u"&&e.getAttribute("data-value").length>o.length&&(o=e.getAttribute("data-value"))}),r.setAttribute("data-longest-value",o)},T=function(t,r,a){const o=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let e;const i=Array.from(r.querySelectorAll("thead th"));return i.forEach((n,c)=>{c!=0&&(e=K(o,c,n.textContent,a,t,e)),c==50&&(i.length=c+1)}),!0};function K(t,r,a,o,e,i){var n;const c=document.createElement("input");c.setAttribute("name",`${t}-dataset-${r}`),c.setAttribute("id",`${t}-dataset-${r}`),c.setAttribute("data-dataset",`${r}`),c.setAttribute("data-label",`${a}`),c.checked=!0,c.setAttribute("type","checkbox"),r==1?e.prepend(c):e.insertBefore(c,i.nextSibling),i=c;const s=document.createElement("label");s.setAttribute("class","key btn btn-action"),s.setAttribute("for",`${t}-dataset-${r}`),s.setAttribute("data-label",`${a}`),s.setAttribute("part","key");const d=(n=e.querySelector(`tbody tr td:nth-child(${r+1})`))===null||n===void 0?void 0:n.getAttribute("data-numeric");return s.setAttribute("data-numeric",d),s.innerHTML=`${a}`,o.append(s),i}const X=function(t,r){const{min:a,max:o,yaxis:e}=g(t);let{guidelines:i}=g(t);i.length||(i=e),r.innerHTML="";for(let n=0;n<i.length;n++){const c=parseFloat(i[n].replace("\xA3","").replace("%","").replace(",","")),{axis:s}=x(c,a,o);r.innerHTML+=`<div class="guideline" style="--percent:${s}%;">${e.indexOf(i[n])!=-1?`<span>${i[n]}</span>`:""}</div>`}},E=function(t,r){const{min:a,max:o,yaxis:e}=g(t);r.innerHTML="";for(let i=0;i<e.length;i++){const n=parseFloat(e[i].replace("\xA3","").replace("%","")),{axis:c}=x(n,a,o);r.innerHTML+=`<div class="axis__point" style="--percent:${c}%;"><span>${e[i]}</span></div>`}},Y=function(t){const r=t.querySelector(".chart");let a=t.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),r.prepend(a)},G=function(t){const r=t.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(r).forEach(a=>{const o=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;a.innerHTML=`<button class="tooltip" popovertarget="${o}" part="tooltip" style="anchor-name: --${o};">${a.textContent}</button><span id="${o}" style="position-anchor: --${o};" popover part="tooltip__content" class="tooltip__content">${a.getAttribute("title")}</span>`})},H=function(t){let r="";const a=t.querySelector(".chart");let o=t.querySelector(".doughnuts");o||(o=document.createElement("div"),o.setAttribute("class","doughnuts"),a.append(o)),Array.from(a.querySelectorAll("tbody tr")).forEach((e,i)=>{let n="",c="",s=0,d=0;const m=e.querySelectorAll("td")[0].innerHTML;let f=0;const v=e.getAttribute("data-numeric");Array.from(e.querySelectorAll("td")).forEach((h,u)=>{const y=getComputedStyle(h).display;if(u!=0&&y!="none"){let p=h.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),d+=p,f++}}),Array.from(e.querySelectorAll("td")).forEach((h,u)=>{var y,p;const _=getComputedStyle(h).display;if(u!=0&&f==1&&_!="none")n+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${h.getAttribute("style")} --path-index: ${u};"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(q(h.getAttribute("data-label"))).trim()}<br/>${h.hasAttribute("data-second")?`${h.getAttribute("data-second-label")}: ${h.getAttribute("data-second")}<br/>`:""}${(y=h.querySelector('[part="popover"]'))===null||y===void 0?void 0:y.innerHTML}</span>`;else if(u!=0){let b=h.getAttribute("data-numeric");const F=_=="none"?"display: none;":"";b=b.replace("\xA3",""),b=b.replace("%",""),b=b.replace(",",""),b=Number.parseInt(b);const w=b/d,[z,$]=C(s,f),[S,L]=C(s+w,f),D=w>.5?1:0,P=["M 0 0",`L ${z?z.toFixed(0):0} ${$?$.toFixed(0):0}`,`A 100 100 0 ${D} 1 ${S?S.toFixed(0):0} ${L?L.toFixed(0):0}`,"L 0 0"].join(" ");n+=`<path d="${P}" style="${h.getAttribute("style")} --path-index: ${u};${F}"></path>`,c+=`<span class="h5 mb-0" part="popover">${M(q(h.getAttribute("data-label"))).trim()}<br/>${h.hasAttribute("data-second")?`${h.getAttribute("data-second-label")}: ${h.getAttribute("data-second")}<br/>`:""}${(p=h.querySelector('[part="popover"]'))===null||p===void 0?void 0:p.innerHTML}</span>`,_!="none"&&(s+=w)}}),r+=`<div class="doughnut">
|
|
5
5
|
<svg viewBox="-105 -105 210 210" preserveAspectRatio="none" style="--row-index: ${i+1};">${n}</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"bento-grid"});class n extends HTMLElement{constructor(){var o;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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const P=M=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:M})},Y=(M,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(a=>{M.addEventListener(a,function(e){const r={event:a,element:t,target:e.target};Object.keys(e.detail).forEach(l=>{const d=e.detail[l];r[l]=d}),window.dataLayer.push(r)})}),!0),F=(M=1)=>Math.floor(Math.random()*Date.now()*(M+1));P("iam-calendar");class O extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=`<table class="table--day" role="presentation"><tbody>
|
|
5
5
|
<tr class="allday"><th>All day</th></tr>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const b=d=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:d})},h=(d,r,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:r}),a.forEach(t=>{d.addEventListener(t,function(c){const s={event:t,element:r,target:c.target};Object.keys(c.detail).forEach(p=>{const o=c.detail[p];s[p]=o}),window.dataLayer.push(s)})}),!0),u=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const M=function(o){const t=[];return Array.from(o.querySelectorAll(":scope > div")).forEach((n,e)=>{n.hasAttribute("data-thumbnail")&&(t[e]=n.getAttribute("data-thumbnail"))}),t},W=function(o,t){const n=o.querySelectorAll(":scope > div").length;let e="";for(let a=1;a<=n;a++){let r=null,i="";t.length&&t[a-1]?(i="has-thumbnail",r=`<img src="${t[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,e+=`<button class="control-${a} ${i}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return e},x=function(o,t){return t==1?o:Math.ceil(o/t)*t-t+1},z=function(o,t){return(o-1)/(t-1)*100},P=function(o){let t;const n=o.shadowRoot.querySelector(".carousel"),e=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),i=o.querySelectorAll(":scope > div").length;let p=e.clientWidth,y=o.querySelector(":scope > div").scrollWidth,g=Math.round(p/y);r.setAttribute("min",1),r.setAttribute("step",g);let h=x(i,g);r.setAttribute("max",h),r.value=1;let m=z(1,h);r.style.setProperty("--percent",m+"%");let f,A="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(A="touchend",L="touchstart"),e.addEventListener("scroll",function(){clearTimeout(t),t=setTimeout(function(){const c=e.clientWidth,s=e.scrollWidth,b=e.scrollLeft;let l=Math.round(b/s*i)+1;const v=o.querySelector(":scope > div").scrollWidth,w=o.querySelector(":scope > div:last-child").offsetLeft,_=e.scrollLeft+c+e.getBoundingClientRect().left>=w+60,u=Math.round(c/v),k=Math.ceil(i/u)*u-i;r.setAttribute("step",u),k>0&&_&&(l=Math.floor(i/u)*u+1),Array.from(n.querySelectorAll(".carousel__controls button")).forEach(d=>{d.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,h=x(i,u),r.setAttribute("max",h),m=l/h*100,m=z(l,h),r.style.setProperty("--percent",m+"%")},100)},!1),a.addEventListener("click",function(c){for(let s=c.target;s&&s!=this;s=s.parentNode)if(typeof s.matches=="function"&&s.matches("button")){c.preventDefault(),Array.from(a.querySelectorAll("button")).forEach(v=>{v.removeAttribute("aria-current")}),s.setAttribute("aria-current",!0);const b=new CustomEvent("pip-clicked",{detail:{slide:s.getAttribute("data-slide")}});o.dispatchEvent(b);const l=o.querySelector(`:scope > *:nth-child(${s.getAttribute("data-slide")})`);e.scroll({top:0,left:l.offsetLeft-e.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(c){const s=e.clientWidth,b=o.querySelector(":scope > div").scrollWidth,l=Math.round(s/b),v=o.querySelector(":scope > div:last-child").offsetLeft,w=e.scrollLeft+s+e.getBoundingClientRect().left>=v+60,_=Math.ceil(i/l)*l-i,u=l-_,k=w&&_>0?u*b:e.clientWidth;for(let d=c.target;d&&d!=this;d=d.parentNode)if(typeof d.matches=="function"&&d.matches(".btn-next, .btn-prev")){const S=d.matches(".btn-next")?"next":"prev",E=new CustomEvent(`${S}-clicked`,{detail:{slide:d.getAttribute("data-go")}});o.dispatchEvent(E),c.preventDefault();const q=d.classList.contains("btn-prev")?e.scrollLeft-k:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(){clearInterval(f),f=setInterval(function(){p=e.clientWidth,y=o.querySelector(":scope > div").scrollWidth,g=Math.round(p/y),r.setAttribute("step",g),h=x(i,g),r.setAttribute("max",h),m=z(r.value,h),r.style.setProperty("--percent",m+"%")},10)}),r.addEventListener(A,function(){clearInterval(f)}),r.addEventListener("change",function(){clearInterval(f);const c=o.querySelector(`:scope > *:nth-child(${r.value})`);e.scroll({top:0,left:c?c.offsetLeft-e.getBoundingClientRect().left:0,behavior:"smooth"});const s=new CustomEvent("slider-changed",{detail:{slide:r.value}});o.dispatchEvent(s)},!1)},$=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},C=(o,t,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),n.forEach(e=>{o.addEventListener(e,function(a){const r={event:e,element:t,target:a.target};Object.keys(a.detail).forEach(i=>{const p=a.detail[i];r[i]=p}),window.dataLayer.push(r)})}),!0);$("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 t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class m 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 class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function k(m){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var l in c)m[l]=c[l]}return m}var B={read:function(m){return m[0]==='"'&&(m=m.slice(1,-1)),m.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(m){return encodeURIComponent(m).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function C(m,s){function c(t,a,o){if(!(typeof document>"u")){o=k({},s,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var e in o)o[e]&&(r+="; "+e,o[e]!==!0&&(r+="="+o[e].split(";")[0]));return document.cookie=t+"="+m.write(a,t)+r}}function l(t){if(!(typeof document>"u"||arguments.length&&!t)){for(var a=document.cookie?document.cookie.split("; "):[],o={},r=0;r<a.length;r++){var e=a[r].split("="),i=e.slice(1).join("=");try{var n=decodeURIComponent(e[0]);if(o[n]=m.read(i,n),t===n)break}catch{}}return t?o[t]:o}}return Object.create({set:c,get:l,remove:function(t,a){c(t,"",k({},a,{expires:-1}))},withAttributes:function(t){return C(this.converter,k({},this.attributes,t))},withConverter:function(t){return C(k({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(m)}})}var D=C(B,{path:"/"});const j=m=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:m})};var x=function(m,s,c,l){function t(a){return a instanceof c?a:new c(function(o){o(a)})}return new(c||(c=Promise))(function(a,o){function r(n){try{i(l.next(n))}catch(b){o(b)}}function e(n){try{i(l.throw(n))}catch(b){o(b)}}function i(n){n.done?a(n.value):t(n.value).then(r,e)}i((l=l.apply(m,s||[])).next())})};j("iam-config");class L extends HTMLElement{constructor(){var s,c;super(),this.getBucketsData=t=>{if(!t)return[];const a=[];return t.forEach(o=>{var r,e;typeof((r=o.attributes)===null||r===void 0?void 0:r.criteria)=="object"&&Array.isArray((e=o.attributes)===null||e===void 0?void 0:e.criteria)&&a.push(o)}),a},this.createBuckets=t=>(console.log(t),this.shadowRoot.querySelector("#buckets"),t?(t.forEach(a=>{this.createBucket(a)}),!0):!1),this.createBucket=t=>{const a=this.shadowRoot.querySelector("#buckets"),o=document.createElement("div");o.innerHTML=this.addBucketHTML(t),o.classList.add("bucket__wrapper"),a?.insertAdjacentElement("beforeend",o),this.createEditBucketsEvents(o);const r=o.querySelector(".criteria--container");return t.attributes&&(t.attributes.criteria.forEach(e=>{var i,n,b;const g=document.createElement("form");g.classList.add("criteria"),g.innerHTML=this.addCriteriaHTML(e.attributes),(i=g.querySelector('[name="attribute"]'))===null||i===void 0||(i.value=e.attributes.attribute),(n=g.querySelector('[name="rule"]'))===null||n===void 0||(n.value=e.attributes.rule),(b=g.querySelector('[name="match"]'))===null||b===void 0||(b.value=e.attributes.match),r?.appendChild(g)}),this.createForms(t.attributes.items,t.id)),o},this.addCriteriaHTML=t=>`<label>
|
|
5
5
|
<span class="visually-hidden">Attribute</span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Dark mode button"});class i extends HTMLElement{constructor(){var e;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>::slotted(.toggle):after{--icon: var(--icon-light);background:red;mask-image:var(--icon);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%;z-index:2}::slotted(.toggle.dark-theme):after{--icon: var(--icon-dark)}/*# sourceMappingURL=assets/css/components/darkmode.component.css.map */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const L=t=>t.charAt(0).toUpperCase()+t.slice(1),q=t=>t.replace(/_/g," "),R=(t,r)=>{for(let a=1;a<=10;a++){if(t.hasAttribute(`data-colour-${a}`)){const c=t.getAttribute(`data-colour-${a}`);t.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${c})`),t.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${c}-hover)`)}Array.from(r.querySelectorAll(`[data-colour-${a}]`)).forEach(c=>{const e=c.getAttribute(`data-colour-${a}`);c.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${e})`),c.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${e}-hover)`)})}return!0},w=(t,r,a)=>{if(t.tagName=="IAM-DOUGHNUTCHART")return N(t,r,a),!0;const c=r.querySelector(".chart__key");c.innerHTML="";const e=r.querySelector(".chart__guidelines");e.innerHTML="";const i=r.querySelector(".chart__yaxis");i.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(n=>{n.remove()});const{xaxis:o}=v(t);return A(t,a),T(r,a,c),I(t,e),X(t,i),o&&K(r),!0},N=(t,r,a)=>{const c=r.querySelector(".chart__key");return c.innerHTML="",Array.from(r.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(e=>{e.remove()}),A(t,a),T(r,a,c),H(r),!0},j=function(t,r){const a=r.querySelector(".chart");a.addEventListener("mousemove",o=>{if(o&&o.target instanceof HTMLElement&&o.target.closest("td:not(:first-child")){const l=o.target.closest("td:not(:first-child").getBoundingClientRect(),d=o.clientX-l.left,h=o.clientY-l.top;a.setAttribute("style",`--cursor-x: ${d}px; --cursor-y: ${h}px;`)}});const c=r.querySelectorAll("label");Array.from(c).forEach(o=>{r.querySelector(`input#${o.getAttribute("for")}`).checked?o.setAttribute("part","key-checked"):o.setAttribute("part","key-unchecked")});const e=t.querySelector("table"),i=r.querySelector("table");r.addEventListener("change",function(o){const n=o.target,l=new CustomEvent("view-change",{detail:{"data-dataset":n.getAttribute("data-dataset"),label:n.getAttribute("data-label"),checked:n.checked}});t.dispatchEvent(l),Array.from(c).forEach(d=>{var h;!((h=r.querySelector(`input#${d.getAttribute("for")}`))===null||h===void 0)&&h.checked?d.setAttribute("part","key-checked"):d.setAttribute("part","key-unchecked")}),i.innerHTML=e.innerHTML,A(t,i),t.tagName=="IAM-DOUGHNUTCHART"&&H(r)})},B=function(t,r){const a=t.querySelector("table"),c=r.querySelector("table"),e=(l,d)=>{d.disconnect(),n.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(c.innerHTML=a.innerHTML,w(t,r,c));d.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0})},i=(l,d)=>{d.disconnect(),n.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(c.innerHTML=a.innerHTML,w(t,r,c));d.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0})},o=new MutationObserver(i),n=new MutationObserver(e);return o.observe(a,{characterData:!0,subtree:!0}),n.observe(t,{attributes:!0}),!0};function C(t,r){r>1&&(t=t-.25);const a=Math.cos(2*Math.PI*t),c=Math.sin(2*Math.PI*t);return[a*100,c*100]}const v=function(t){const r=t.shadowRoot.querySelector(".chart__wrapper table"),a=t.hasAttribute("data-min")?t.getAttribute("data-min"):0,c=t.hasAttribute("data-max")?t.getAttribute("data-max"):U(t,r),e=t.hasAttribute("data-yaxis")?t.getAttribute("data-yaxis").split(","):[],i=t.hasAttribute("data-guidelines")?t.getAttribute("data-guidelines").split(","):[],o=t.hasAttribute("data-xaxis")?t.getAttribute("data-xaxis").split(","):null;return{min:a,max:c,yaxis:e,xaxis:o,guidelines:i}};function U(t,r){const a=t.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",c=Array.from(r.querySelectorAll(a)).map(i=>i.getAttribute("data-numeric")),e=Math.max(...c);return Math.ceil(e)}const x=function(t,r,a,c){let e=String(t);e=e.replace("\xA3",""),e=e.replace("%",""),e=e.replace(",",""),e=Number.parseFloat(e);let i=(e-r)/(a-r)*100,o=i,n=0;return c&&c!=0&&(n=(c-r)/(a-r)*100),r<0&&(n=Math.abs(r/(a-r)*100),e<0?(i=n-i,n=n-i,o=n):(i=i-n,o=i+n)),{percent:i,axis:o,bottom:n}},A=function(t,r){Array.from(r.querySelectorAll("tbody tr")).forEach(e=>{let i=0;Array.from(e.querySelectorAll("td:not(:first-child)")).forEach(o=>{const n=o.cloneNode(!0);Array.from(n.querySelectorAll("*")).forEach(h=>{h.remove()});const l=parseFloat(n.textContent.replace("\xA3","").replace("%","").replace(",",""));o.setAttribute("data-numeric",l),o.setAttribute("data-value",n.textContent),getComputedStyle(o).display!="none"&&(i+=l),Array.from(o.querySelectorAll("a, button")).forEach((h,b)=>{b==0&&h.insertAdjacentHTML("beforeBegin","<hr/>"),h.classList.add("btn"),h.classList.add("btn-tertiary")})}),e.setAttribute("data-numeric",i)});const{min:a,max:c}=v(t);Array.from(r.querySelectorAll("tbody tr")).forEach((e,i)=>{const o=e.querySelector("td:first-child, th:first-child")?e.querySelector("td:first-child, th:first-child").textContent:"";e.setAttribute("part","group");const n=(e.getAttribute("data-numeric")-a)/(c-a)*100;e.style.setProperty("--percent",`${n}%`),Array.from(e.querySelectorAll("td:not([data-label])")).forEach((h,b)=>{b==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),e.querySelectorAll("td").length>2&&h.setAttribute("data-label",r.querySelectorAll("thead th")[b].textContent)});const l=e.hasAttribute("data-min")?e.getAttribute("data-min"):a,d=e.hasAttribute("data-max")?e.getAttribute("data-max"):c;if(l<0){const h=Math.abs(l/(d-l)*100);t.setAttribute("style",`--min-bottom: ${h}%;`)}e.style.setProperty("--row-index",i+1),Array.from(e.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(h=>{if(getComputedStyle(h).display=="none")return;const g=h.innerHTML,_=Number.parseFloat(h.getAttribute("data-numeric")),s=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${o}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${g}</span>`),!h.hasAttribute("style")){const{percent:m,bottom:y,axis:p}=x(_,l,d,s);h.setAttribute("data-percent",m),h.setAttribute("style",`--bottom:${y}%;--percent:${m}%;--axis:${p}%;`)}})})},T=function(t,r,a){const c=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let e;const i=Array.from(r.querySelectorAll("thead th"));return i.forEach((o,n)=>{n!=0&&(e=V(c,n,o.textContent,a,t,e)),n==50&&(i.length=n+1)}),!0};function V(t,r,a,c,e,i){var o;const n=document.createElement("input");n.setAttribute("name",`${t}-dataset-${r}`),n.setAttribute("id",`${t}-dataset-${r}`),n.setAttribute("data-dataset",`${r}`),n.setAttribute("data-label",`${a}`),n.checked=!0,n.setAttribute("type","checkbox"),r==1?e.prepend(n):e.insertBefore(n,i.nextSibling),i=n;const l=document.createElement("label");l.setAttribute("class","key btn btn-action"),l.setAttribute("for",`${t}-dataset-${r}`),l.setAttribute("data-label",`${a}`),l.setAttribute("part","key");const d=(o=e.querySelector(`tbody tr td:nth-child(${r+1})`))===null||o===void 0?void 0:o.getAttribute("data-numeric");return l.setAttribute("data-numeric",d),l.innerHTML=`${a}`,c.append(l),i}const I=function(t,r){const{min:a,max:c,yaxis:e}=v(t);let{guidelines:i}=v(t);i.length||(i=e),r.innerHTML="";for(let o=0;o<i.length;o++){const n=parseFloat(i[o].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=x(n,a,c);r.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${e.indexOf(i[o])!=-1?`<span>${i[o]}</span>`:""}</div>`}},X=function(t,r){const{min:a,max:c,yaxis:e}=v(t);r.innerHTML="";for(let i=0;i<e.length;i++){const o=parseFloat(e[i].replace("\xA3","").replace("%","")),{axis:n}=x(o,a,c);r.innerHTML+=`<div class="axis__point" style="--percent:${n}%;"><span>${e[i]}</span></div>`}},K=function(t){const r=t.querySelector(".chart");let a=t.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),r.prepend(a)},H=function(t){let r="";const a=t.querySelector(".chart");let c=t.querySelector(".doughnuts");c||(c=document.createElement("div"),c.setAttribute("class","doughnuts"),a.append(c)),Array.from(a.querySelectorAll("tbody tr")).forEach((e,i)=>{let o="",n="",l=0,d=0;const b=e.querySelectorAll("td")[0].innerHTML;let g=0;const _=e.getAttribute("data-numeric");Array.from(e.querySelectorAll("td")).forEach((s,m)=>{const y=getComputedStyle(s).display;if(m!=0&&y!="none"){let p=s.getAttribute("data-numeric");p=p.replace("\xA3",""),p=p.replace("%",""),p=p.replace(",",""),p=Number.parseInt(p),d+=p,g++}}),Array.from(e.querySelectorAll("td")).forEach((s,m)=>{var y,p;const f=getComputedStyle(s).display;if(m!=0&&g==1&&f!="none")o+=`<path d="M 0 0 L 100 0 A 100 100 0 1 1 100 -0.01 L 0 0" style="${s.getAttribute("style")} --path-index: ${m};"></path>`,n+=`<span class="h5 mb-0" part="popover">${L(q(s.getAttribute("data-label"))).trim()}<br/>${s.hasAttribute("data-second")?`${s.getAttribute("data-second-label")}: ${s.getAttribute("data-second")}<br/>`:""}${(y=s.querySelector('[part="popover"]'))===null||y===void 0?void 0:y.innerHTML}</span>`;else if(m!=0){let u=s.getAttribute("data-numeric");const F=f=="none"?"display: none;":"";u=u.replace("\xA3",""),u=u.replace("%",""),u=u.replace(",",""),u=Number.parseInt(u);const k=u/d,[$,z]=C(l,g),[S,M]=C(l+k,g),P=k>.5?1:0,D=["M 0 0",`L ${$?$.toFixed(0):0} ${z?z.toFixed(0):0}`,`A 100 100 0 ${P} 1 ${S?S.toFixed(0):0} ${M?M.toFixed(0):0}`,"L 0 0"].join(" ");o+=`<path d="${D}" style="${s.getAttribute("style")} --path-index: ${m};${F}"></path>`,n+=`<span class="h5 mb-0" part="popover">${L(q(s.getAttribute("data-label"))).trim()}<br/>${s.hasAttribute("data-second")?`${s.getAttribute("data-second-label")}: ${s.getAttribute("data-second")}<br/>`:""}${(p=s.querySelector('[part="popover"]'))===null||p===void 0?void 0:p.innerHTML}</span>`,f!="none"&&(l+=k)}}),r+=`<div class="doughnut">
|
|
5
5
|
<svg viewBox="-105 -105 210 210" preserveAspectRatio="none" style="--row-index: ${i+1};">${o}</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function f(l,a){const d=a.querySelector(".files"),n=a.querySelector(".drop-area"),e=l.querySelector("input"),b=l.hasAttribute("data-maxsize")?l.getAttribute("data-maxsize"):0,h=a.querySelector(".invalid-feedback.size"),u=a.querySelector(".invalid-feedback.ext"),o=e.cloneNode();n.append(o);const g=function(t){if(!e.hasAttribute("accept"))return!0;const i=t.split(".").pop();return!!e.getAttribute("accept").includes(i)};if(a.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(u.classList.remove("d-block"),h.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const i=new DataTransfer,{files:s}=e,r=t.target.closest(".files button");for(let p=0;p<s.length;p++){const v=s[p];v.name!=r.getAttribute("data-file")&&i.items.add(v)}e.files=i.files;const m=new Event("change");e.dispatchEvent(m);const c=new CustomEvent("fileRemoved",{detail:{removedFile:r?.dataset.file}});l.dispatchEvent(c)}}),o.addEventListener("change",()=>{if(e.hasAttribute("multiple")){const i=[...e.files,...o.files],s=[],r=new DataTransfer;for(let m=0;m<i.length;m++){const c=i[m],p=c.size/1e3;!s.includes(c.name)&&(b==0||p<b)&&g(c.name)&&r.items.add(c),g(c.name)||u.classList.add("d-block"),p>b&&h.classList.add("d-block"),s.push(c.name)}e.files=r.files}else e.files=o.files;const t=new Event("change");e.dispatchEvent(t)}),o.addEventListener("dragenter",()=>{o.classList.add("focus")}),o.addEventListener("dragleave",()=>{o.classList.remove("focus")}),o.addEventListener("drop",()=>{o.classList.remove("focus")}),e.addEventListener("change",()=>{if(e.files.length==1){const i=e.files[0],s=i.size/1e3;if(!g(i.name)){u.classList.add("d-block");const r=new DataTransfer;e.files=r.files}if(s>b){h.classList.add("d-block");const r=new DataTransfer;e.files=r.files}}d.innerHTML="";for(const i of e.files)d.innerHTML+=`<span class="file" part="file">${i.name} <button data-file="${i.name}" part="file__remove">Remove</button></span>`;const t=new CustomEvent("elementchange",{detail:{files:e.files}});if(l.dispatchEvent(t),e.files.length==0){const i=new CustomEvent("empty");l.dispatchEvent(i)}}),l.hasAttribute("data-filename")){const t=l.getAttribute("data-filename");t&&(d.innerHTML=`<span class="file" part="file">${t} <button data-file="${t}" part="file__remove">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class k extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},p=(a,t,o)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),o.forEach(e=>{a.addEventListener(e,function(i){const r={event:e,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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function r(s,t){i(s,t)}function i(s,t){let e;t.addEventListener("keyup",()=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",()=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach(e=>{const a=e.textContent.toLowerCase();e.classList.add("d-none"),a.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 n 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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};o("iam-tag");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<div class="wrapper">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class v extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const q=k=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:k})};q("iam-iamPrefix");class _ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=s=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:s})};o("iam-iamPrefix");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});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.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const l=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},m=(t,n,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),a.forEach(e=>{t.addEventListener(e,function(s){const d={event:e,element:n,target:s.target};Object.keys(s.detail).forEach(o=>{const i=s.detail[o];d[o]=i}),window.dataLayer.push(d)})}),!0),p=function(t){const n=t.dataset.status;if(!n)return;const a=t.shadowRoot.querySelector(".milestone-wrap"),e=document.createElement("span");e.setAttribute("part","status"),e.classList.add("milestone-status"),e.innerHTML=`${n} Step`,n==="Current"&&t.classList.add("current"),a.insertAdjacentElement("afterbegin",e)},u=function(t){const n=t.shadowRoot.querySelector(".task-wrap"),a=t.dataset.items?JSON.parse(t.dataset.items):[];a.length&&(a.forEach(e=>{const s=document.createElement("details"),d=document.createElement("summary"),o=document.createElement("div"),i=document.createElement("p");o.classList.add("task-details"),d.innerHTML=e.name,e.date_completed&&d.classList.add("complete"),s.appendChild(d),e.description&&(i.innerHTML=e.description,o.appendChild(i)),e.actions.length&&o.appendChild(h(e.actions,d)),s.appendChild(o),n.insertAdjacentElement("beforeend",s),s.addEventListener("click",()=>{s?.hasAttribute("open")?r("milestone-item-closed",e.name,t):r("milestone-item-opened",e.name,t)})}),t.appendChild(n))},r=function(t,n,a){const e=new CustomEvent(t,{detail:{title:n}});a.dispatchEvent(e)},h=function(t,n){const a=document.createElement("ul"),e=t.length,d=t.filter(o=>o.date_completed).length||0;if(!(e<1))return n.innerHTML+=` (${d}/${e})`,t.forEach(o=>{const i=document.createElement("li"),c=document.createElement("span");o.date_completed&&(i.classList.add("complete"),c.classList.add("action-date"),c.innerHTML=o.date_completed),i.innerHTML=o.action,i.appendChild(c),a.appendChild(i)}),a},w=function(t){p(t),u(t)};l("iam-milestone");class L extends HTMLElement{constructor(){var n;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const r=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},l=(t,s,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:s}),e.forEach(n=>{t.addEventListener(n,function(o){const a={event:n,element:s,target:o.target};Object.keys(o.detail).forEach(i=>{const d=o.detail[i];a[i]=d}),window.dataLayer.push(a)})}),!0),u=function(t){if(!t.dataset.showAllToggle)return;const e=document.createElement("button");e.innerHTML="Show next steps",e.classList.add("btn","btn-tertiary","show-all-toggle"),t.appendChild(e),e.addEventListener("click",()=>{t.classList.contains("show-all")?(e.innerHTML="Show next steps",t.classList.remove("show-all"),c("hide-future-items",t)):(e.innerHTML="Hide next steps",t.classList.add("show-all"),c("show-future-items",t))})},c=function(t,s){const e=new CustomEvent(t,{});s.dispatchEvent(e)},h=function(t){u(t)};r("iam-milestone-group");class m extends HTMLElement{constructor(){var s;super();const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const w=d=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:d})},y=(d,n)=>{var i;const o=(i=n.shadowRoot)===null||i===void 0?void 0:i.querySelector("dialog");o?.showModal(),o?.focus();const l=new CustomEvent("modal-opened",{bubbles:!0,cancelable:!0,detail:{modalId:d}});n.dispatchEvent(l),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:d})},r=(d,n)=>{var i;const o=(i=n.shadowRoot)===null||i===void 0?void 0:i.querySelector("dialog");o?.close();const l=new CustomEvent("modal-closed",{bubbles:!0,cancelable:!0,detail:{modalId:d}});n.dispatchEvent(l),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d})},k='<button class="btn btn-compact btn-secondary fa-xmark-large" data-close>Close</button>';w("iam-card");class x extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const g=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})},y=(c,e,u)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),u.forEach(l=>{c.addEventListener(l,function(i){const n={event:l,element:e,target:i.target};Object.keys(i.detail).forEach(d=>{const t=i.detail[d];n[d]=t}),window.dataLayer.push(n)})}),!0);g("iam-multi-step");class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const A=p=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:p})},E=(p,n,c)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),c.forEach(d=>{p.addEventListener(d,function(e){const i={event:d,element:n,target:e.target};Object.keys(e.detail).forEach(r=>{const b=e.detail[r];i[r]=b}),window.dataLayer.push(i)})}),!0);A("iam-multi-step-modal");class _ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function g(n){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var d in i)n[d]=i[d]}return n}var y={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function f(n,e){function i(a,s,o){if(!(typeof document>"u")){o=g({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var r in o)o[r]&&(m+="; "+r,o[r]!==!0&&(m+="="+o[r].split(";")[0]));return document.cookie=a+"="+n.write(s,a)+m}}function d(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],o={},m=0;m<s.length;m++){var r=s[m].split("="),h=r.slice(1).join("=");try{var c=decodeURIComponent(r[0]);if(o[c]=n.read(h,c),a===c)break}catch{}}return a?o[a]:o}}return Object.create({set:i,get:d,remove:function(a,s){i(a,"",g({},s,{expires:-1}))},withAttributes:function(a){return f(this.converter,g({},this.attributes,a))},withConverter:function(a){return f(g({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var k=f(y,{path:"/"}),w=function(n,e,i,d){function a(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function m(c){try{h(d.next(c))}catch(t){o(t)}}function r(c){try{h(d.throw(c))}catch(t){o(t)}}function h(c){c.done?s(c.value):a(c.value).then(m,r)}h((d=d.apply(n,e||[])).next())})};const v=(n,e)=>{Array.from(n.querySelectorAll('label:not([slot="checked"])')).forEach(i=>{const a=i.querySelector("input").value,s=i.textContent;a.toLowerCase().includes(e.value.toLowerCase())||s.toLowerCase().includes(e.value.toLowerCase())?i.removeAttribute("slot"):i.setAttribute("slot","notmatched")})},x=(n,e,i)=>w(void 0,void 0,void 0,function*(){const d=e.value,a=n.getAttribute("data-url"),s=n.querySelector("input");console.log(s);const o=s&&s.hasAttribute("type")?s.getAttribute("type"):"checkbox";let m=s&&s.hasAttribute("name")?s.getAttribute("name"):"tags";n.hasAttribute("data-name")&&(m=n.hasAttribute("data-name"));const r=`${a}?search_query=${encodeURI(d)}`;window.controller||(window.controller=[]),window.controller[r]&&window.controller[r].abort(),window.controller[r]=new AbortController;const{signal:h}=controller[r];try{yield fetch(r,{signal:h,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":k.get("XSRF-TOKEN")})}).then(c=>c.json()).then(c=>{let t="";for(let l=0;l<c.data.length;l++)n.querySelector(`[value="${c.data[l].value}"]`)||(t+=`<label class="tag dropdown__option"><input type="${o}" name="${n.hasAttribute("data-name")?n.getAttribute("data-name"):m}" value="${c.data[l].value}"/>${c.data[l].title}</label>`);return n.insertAdjacentHTML("beforeend",`${t}`),i(n,e),c})}catch(c){console.log(c)}}),A=(n,e)=>{e.addEventListener("keydown",i=>{var d;switch(i.keyCode){case 40:i.stopPropagation(),i.preventDefault(),(d=n.querySelector('label:not([slot="checked"]) input'))===null||d===void 0||d.focus();break}}),n.addEventListener("keydown",i=>{var d,a,s;const o=n.querySelectorAll(':scope > a, :scope > button, :scope > details > summary, :scope > label:not([slot="checked"]) > input'),m=n.querySelectorAll('a, button, input, label:not([slot="checked"]) > input');if(i&&i.target instanceof HTMLElement&&i.target.closest('a, button, summary, label:not([slot="checked"]) > input')){const r=document.activeElement,h=Array.from(o).indexOf(r)-1,c=Array.from(o).indexOf(r)+1;switch(i.keyCode){case 27:r.closest("details")?(i.stopPropagation(),i.preventDefault(),r.closest("details").removeAttribute("open"),r.closest("details").querySelector(":scope summary").focus()):i.stopPropagation();break;case 32:case 13:break;case 35:i.stopPropagation(),i.preventDefault(),(d=n.querySelector("details[open]"))===null||d===void 0||d.removeAttribute("open"),Array.from(m)[m.length-1].focus();break;case 36:i.stopPropagation(),i.preventDefault(),(a=n.querySelector("details[open]"))===null||a===void 0||a.removeAttribute("open"),Array.from(m)[0].focus();break;case 38:if(i.stopPropagation(),i.preventDefault(),Array.from(o).indexOf(r)>-1)Array.from(o)[h]!=null?Array.from(o)[h].focus():Array.from(o)[o.length-1].focus();else if(r.closest("details")){const t=r.closest("details").querySelectorAll("a, button, :scope details > summary");subPrevIndex=Array.from(t).indexOf(r)-1,Array.from(t)[subPrevIndex]!=null?Array.from(t)[subPrevIndex].focus():Array.from(t)[t.length-1].focus()}break;case 40:if(i.stopPropagation(),i.preventDefault(),Array.from(o).indexOf(r)>-1)Array.from(o)[c]!=null?Array.from(o)[c].focus():Array.from(o)[0].focus();else if(r.closest("details")){const t=(s=r.closest("details"))===null||s===void 0?void 0:s.querySelectorAll("a, button, :scope details > summary");subNextIndex=Array.from(t).indexOf(r)+1,Array.from(t)[subNextIndex]!=null?Array.from(t)[subNextIndex].focus():Array.from(t)[0].focus()}break}}})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class z extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class g extends HTMLElement{constructor(){super();const d=this.attachShadow({mode:"open"});document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function l(e){if(e.hasAttribute("data-type")&&e.getAttribute("data-type")=="toast"){let i=document.querySelector(".notification__holder");i||(i=document.createElement("div"),i.classList.add("notification__holder"),i.classList.add("container"),document.querySelector("body").appendChild(i)),e.closest(".notification__holder")||i.appendChild(e)}if(e.setAttribute("role","alert"),e.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&(event.target.closest("[data-dismiss-button]")||event.target.matches("[data-dismiss-button]"))&&(i.preventDefault(),d(e))},!1),e.hasAttribute("data-timeout")){const i=e.getAttribute("data-timeout"),t=new f(function(){d(e)},i);e.addEventListener("mouseenter",()=>{t.pause()}),e.addEventListener("mouseleave",()=>{t.resume()})}}function f(e,i){let t,o,a=i;this.pause=function(){window.clearTimeout(t),a-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(e,a)},this.resume()}const d=function(e){e.classList.add("d-none")},m=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},u=(e,i,t)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:i}),t.forEach(o=>{e.addEventListener(o,function(a){const n={event:o,element:i,target:a.target};Object.keys(a.detail).forEach(s=>{const r=a.detail[s];n[s]=r}),window.dataLayer.push(n)})}),!0);m("iam-notification");class h extends HTMLElement{constructor(){super(),this.addColour=(t,o)=>{t.hasAttribute("data-type")?t.classList.add(`bg-${o}`):t.classList.add(`colour-${o}`)},this.addIcon=(t,o)=>{switch(o){case"danger":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"warning":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"success":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>');break;default:t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>')}},this.addDismissBtn=t=>{var o;(o=t.shadowRoot.querySelector(".notification__dismiss"))===null||o===void 0||(o.innerHTML='<button data-dismiss-button part="dismiss-btn">Dismiss</button>'),t.shadowRoot.querySelector(".notification__dismiss [data-dismiss-button]").addEventListener("click",function(){d(t);const a=new CustomEvent("dismiss",{detail:{class:t.classList}});t.dispatchEvent(a)},!1)},this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const u=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})};function m(c){var r=new TextEncoder("utf-8").encode(c);return crypto.subtle.digest("SHA-1",r).then(function(e){for(var i=[],n=new DataView(e),o=0;o<n.byteLength;o+=4){var s=n.getUint32(o),a=s.toString(16),t="00000000",p=(t+a).slice(-t.length);i.push(p)}return i.join("")})}const b=(c,r)=>{m(c).then(function(e){const i=new XMLHttpRequest;i.addEventListener("load",function(){const n=this.responseText.split(`
|
|
5
5
|
`),o=e.slice(5).toUpperCase();var s=!1;for(let t in n)if(n[t].substring(0,35)==o){s=!0;break}const a=new CustomEvent("hibpCheck",{detail:s});r.dispatchEvent(a)}),i.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),i.send()})};u("iam-password");class x extends HTMLElement{constructor(){var r;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const a=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};a("iam-popover");class s extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const i=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};i("iam-rank");class a extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const C=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const m=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};m("iam-rank");class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const p=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:n})};p("iam-rating");class l extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta4
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},p=(o,a,r)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:a}),r.forEach(t=>{o.addEventListener(t,function(e){const d={event:t,element:a,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>
|