@saasira/holi 0.1.3
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/CHANGELOG.md +33 -0
- package/README.md +173 -0
- package/dist/holi.css +3255 -0
- package/dist/holi.html +822 -0
- package/dist/holi.js +2 -0
- package/dist/holi.js.LICENSE.txt +1 -0
- package/package.json +36 -0
package/dist/holi.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see holi.js.LICENSE.txt */
|
|
2
|
+
(()=>{var t={892(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{AccordionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.multipleOpen=n.readBooleanAttr("multiple",!1),n.initialOpenIndex=Math.max(0,Number(n.container.getAttribute("open-index"))||0),n.items=[],n.openIndexes=new Set,n.onClick=function(t){return n.handleClick(t)},n.onKeydown=function(t){return n.handleKeydown(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Accordion requires a container")}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return n=this.collectSourceItems(),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-accordion"),this.list=this.container.querySelector('[data-role="accordion-list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.buildItems(n),this.bindEvents(),this.items.length&&this.openPanel(this.initialOpenIndex,!1);case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"collectSourceItems",value:function(){var t=Array.from(this.container.querySelectorAll('[data-accordion-item], [slot="panel"]'));return t.length?t:Array.from(this.container.children).filter(function(t){return t instanceof HTMLElement&&!t.classList.contains("holi-accordion")})}},{key:"buildItems",value:function(t){var e=this;this.list.replaceChildren(),this.items=[],t.forEach(function(t,n){var r=e.extractTitle(t,n),i=e.extractContent(t),o=e.createItem(n,r,i);e.items.push(o),e.list.appendChild(o.root)})}},{key:"extractTitle",value:function(t,e){var n,r=t.getAttribute("title")||t.getAttribute("data-title")||"";if(r)return r;var i=t.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return i&&(null===(n=i.textContent)||void 0===n?void 0:n.trim())||"Section ".concat(e+1)}},{key:"extractContent",value:function(t){var e=t.cloneNode(!0),n=e.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return n&&n.remove(),e}},{key:"createItem",value:function(t,e,n){var r=document.createElement("article");r.className="accordion-item",r.setAttribute("data-index",String(t));var i=document.createElement("button");i.type="button",i.className="accordion-trigger",i.setAttribute("data-action","toggle"),i.setAttribute("data-index",String(t)),i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","accordion-panel-".concat(t)),i.textContent=e;var o=document.createElement("section");return o.className="accordion-panel",o.id="accordion-panel-".concat(t),o.hidden=!0,o.setAttribute("aria-hidden","true"),o.appendChild(n),r.append(i,o),{index:t,root:r,trigger:i,panel:o}}},{key:"bindEvents",value:function(){this.element.addEventListener("click",this.onClick),this.element.addEventListener("keydown",this.onKeydown)}},{key:"handleClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-action="toggle"]');if(r){var i=Number(r.getAttribute("data-index"));Number.isNaN(i)||this.togglePanel(i)}}},{key:"handleKeydown",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,".accordion-trigger");if(r){var i=Number(r.getAttribute("data-index"));if(!Number.isNaN(i))if("ArrowDown"!==t.key)if("ArrowUp"!==t.key)"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.togglePanel(i));else{var o;t.preventDefault();var a=(i-1+this.items.length)%this.items.length;null===(o=this.items[a])||void 0===o||null===(o=o.trigger)||void 0===o||o.focus()}else{var s;t.preventDefault();var l=(i+1)%this.items.length;null===(s=this.items[l])||void 0===s||null===(s=s.trigger)||void 0===s||s.focus()}}}},{key:"togglePanel",value:function(t){this.items[t]&&(this.openIndexes.has(t)?this.closePanel(t):this.openPanel(t))}},{key:"openPanel",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.items[t];r&&(this.multipleOpen||Array.from(this.openIndexes).forEach(function(n){n!==t&&e.closePanel(n,!1)}),this.openIndexes.add(t),r.root.classList.add("is-open"),r.trigger.setAttribute("aria-expanded","true"),r.panel.hidden=!1,r.panel.setAttribute("aria-hidden","false"),n&&this.dispatchEvent("accordionchange",{index:t,open:!0,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"closePanel",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.items[t];n&&(this.openIndexes.delete(t),n.root.classList.remove("is-open"),n.trigger.setAttribute("aria-expanded","false"),n.panel.hidden=!0,n.panel.setAttribute("aria-hidden","true"),e&&this.dispatchEvent("accordionchange",{index:t,open:!1,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"openAll",value:function(){var t=this;this.multipleOpen&&(this.items.forEach(function(e){return t.openPanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!0,multiple:!0,openIndexes:Array.from(this.openIndexes)}))}},{key:"closeAll",value:function(){var t=this;this.items.forEach(function(e){return t.closePanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!1,multiple:this.multipleOpen,openIndexes:[]})}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("click",this.onClick),null===(n=this.element)||void 0===n||n.removeEventListener("keydown",this.onKeydown),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"accordion"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"accordion"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="accordion-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.AccordionComponent=g)},951(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function l(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BackToTopComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=l(this,e,[t,r])).templateId=e.templateId,n.config={anchor:n.readAttr(["anchor","target","href","data-anchor"],""),label:n.readAttr(["label","data-label"],"Back to top"),ariaLabel:n.readAttr(["aria-label","data-aria-label"],"Back to top"),showAfter:Math.max(0,Number(n.readAttr(["show-after","data-show-after"],"240"))||240),behavior:n.readAttr(["behavior","data-behavior"],"smooth"),vertical:n.readAttr(["vertical","data-vertical"],""),alwaysVisible:n.readBoolAttr(["always-visible","data-always-visible"],!1)},n.state={label:n.config.label,ariaLabel:n.config.ariaLabel,visible:n.config.alwaysVisible},n.boundScroll=function(){return n.handleScroll()},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"readBoolAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;n<t.length;n+=1){var r=t[n];if(this.container.hasAttribute(r)){var i=String(this.container.getAttribute(r)||"").trim().toLowerCase();return!i||"false"!==i&&"0"!==i&&"no"!==i}}return e}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-backtotop"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyPosition(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick),window.addEventListener("scroll",this.boundScroll,{passive:!0}),this.handleScroll();case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,s,"next",t)}function s(t){a(i,n,r,o,s,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyPosition",value:function(){if(this.element){var t=this.resolveVertical(this.config.vertical);if(!t)return this.element.style.removeProperty("top"),void this.element.style.removeProperty("bottom");this.element.style.top=t,this.element.style.bottom="auto"}}},{key:"resolveVertical",value:function(t){var e=String(t||"").trim().toLowerCase();return e&&"bottom"!==e?"middle"===e||"center"===e?"50%":/^\d+(\.\d+)?%$/.test(e)||/^\d+(\.\d+)?px$/.test(e)?e:"":""}},{key:"handleScroll",value:function(){var t,e=this.config.alwaysVisible||window.scrollY>=this.config.showAfter;this.state.visible=e,null===(t=this.element)||void 0===t||t.classList.toggle("is-visible",e),this.element&&(this.element.hidden=!e)}},{key:"resolveAnchorTarget",value:function(){var t,e=this,n=String(this.config.anchor||"").trim();if(n){var r=n.startsWith("#")?n.slice(1):"";if(r){var i=document.getElementById(r);if(i)return i}var o=document.querySelector(n);if(o)return o}return Array.from((null===(t=document.body)||void 0===t?void 0:t.children)||[]).find(function(t){if(!(t instanceof HTMLElement))return!1;if(t===e.container)return!1;var n=t.tagName.toLowerCase();return"script"!==n&&"template"!==n})||document.documentElement}},{key:"scrollToTop",value:function(){var t=this.resolveAnchorTarget(),e="auto"===this.config.behavior?"auto":"smooth";t&&"function"==typeof t.scrollIntoView?t.scrollIntoView({behavior:e,block:"start",inline:"nearest"}):window.scrollTo({top:0,behavior:e})}},{key:"handleClick",value:function(t){t.preventDefault(),this.scrollToTop(),this.dispatchEvent("backtotopclick",{anchor:this.config.anchor||"",visible:this.state.visible})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),window.removeEventListener("scroll",this.boundScroll),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"backtotop"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"backtotop"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(812).Component);v=b,m="backtotop-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.BackToTopComponent=b)},935(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BlockComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Block requires a container")}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-block"),this.content=this.container.querySelector('[data-role="block-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:this.applyLayoutConfig();case 4:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyLayoutConfig",value:function(){if(this.element){var t=Math.max(1,Number(this.container.getAttribute("columns"))||12),e=this.container.getAttribute("gap")||"12px";this.element.style.setProperty("--holi-block-columns",String(t)),this.element.style.setProperty("--holi-block-gap",String(e))}}}],o=[{key:"selector",get:function(){return"block"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"block"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="block-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.BlockComponent=g)},400(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return a(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,a(f,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,r,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function h(t,e,n,r){var i=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.r(e),n.d(e,{BreadCrumbsComponent:()=>w});var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.separator=n.container.getAttribute("separator")||"/",n.maxItems=Math.max(0,Number(n.container.getAttribute("max-items"))||0),n.items=[],n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,a=[{key:"validateStructure",value:function(){h(e,"validateStructure",this,3)([])}},{key:"init",value:(f=l(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.items=this.collectItems(),this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"parseItemsAttr",value:function(){var t=String(this.container.getAttribute("data-items")||"").trim();if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"collectItems",value:function(){var t=this.parseItemsAttr();if(t.length)return this.normalizeItems(t);var e=this.container.querySelector('[slot="items"]')||this.container.querySelector("ol, ul");if(!e)return[];var n=Array.from(e.querySelectorAll(":scope > li")).map(function(t){var e=t.querySelector("a");return{label:String((null==e?void 0:e.textContent)||t.textContent||"").trim(),href:(null==e?void 0:e.getAttribute("href"))||"",current:t.hasAttribute("aria-current")||"true"===t.getAttribute("data-current")||"page"===(null==e?void 0:e.getAttribute("aria-current"))}});return e.remove(),this.normalizeItems(n)}},{key:"normalizeItems",value:function(t){var e=(t||[]).map(function(t){return t&&"object"===i(t)?{label:String(t.label||t.name||t.title||"").trim(),href:String(t.href||t.url||"").trim(),current:!!t.current}:{label:String(t||"").trim(),href:"",current:!1}}).filter(function(t){return t.label});return e.length?(e.some(function(t){return t.current})||(e[e.length-1].current=!0),e):e}},{key:"getVisibleItems",value:function(){return!this.maxItems||this.items.length<=this.maxItems?this.items:this.maxItems<3?this.items.slice(0,this.maxItems):[this.items[0],{label:"...",href:"",current:!1,ellipsis:!0}].concat(function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.items.slice(this.items.length-(this.maxItems-2))))}},{key:"render",value:(d=l(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-breadcrumbs"),this.list=this.container.querySelector('[data-role="list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.projectSlot("prefix"),this.projectSlot("suffix"),this.applySeparator(),this.renderItems(),this.list.addEventListener("click",this.boundClick);case 3:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applySeparator",value:function(){var t=String(this.separator||"/").replace(/["\\]/g,"\\$&");this.element.style.setProperty("--holi-breadcrumb-separator",'"'.concat(t,'"'))}},{key:"renderItems",value:function(){var t=this;this.list&&(this.list.replaceChildren(),this.getVisibleItems().forEach(function(e,n){var r=document.createElement("li");if(r.className="holi-breadcrumb-item",r.setAttribute("data-index",String(n)),e.ellipsis){var i=document.createElement("span");return i.className="holi-breadcrumb-ellipsis",i.textContent=e.label,r.appendChild(i),void t.list.appendChild(r)}if(e.current||!e.href){var o=document.createElement("span");o.className="holi-breadcrumb-current",o.textContent=e.label,e.current&&o.setAttribute("aria-current","page"),r.appendChild(o)}else{var a=document.createElement("a");a.className="holi-breadcrumb-link",a.href=e.href,a.textContent=e.label,r.appendChild(a)}t.list.appendChild(r)}))}},{key:"handleClick",value:function(t){var e=t.target.closest("a.holi-breadcrumb-link");if(e){var n=e.closest(".holi-breadcrumb-item"),r=Number((null==n?void 0:n.getAttribute("data-index"))||"-1"),i=this.getVisibleItems()[r];this.dispatchEvent("breadcrumbclick",{index:r,item:i||null,href:e.getAttribute("href")||""})}}},{key:"destroy",value:function(){var t;null===(t=this.list)||void 0===t||t.removeEventListener("click",this.boundClick),h(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"breadcrumbs"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"breadcrumbs"}}],a&&u(n.prototype,a),s&&u(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,s,d,f}(n(812).Component);m=w,g="breadcrumbs-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.BreadCrumbsComponent=w)},92(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function l(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ButtonComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=l(this,e,[t,r])).templateId=e.templateId,n.config={label:n.readAttr("label","Button"),type:n.readAttr("type","button"),variant:n.readAttr("variant","primary"),disabled:n.readBoolAttr("disabled",!1)},n.state={label:n.config.label,type:n.config.type,disabled:n.config.disabled},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-button"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyAttributes(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick);case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,s,"next",t)}function s(t){a(i,n,r,o,s,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyAttributes",value:function(){this.buttonEl&&(this.buttonEl.type=this.config.type||"button",this.buttonEl.disabled=!!this.config.disabled,this.buttonEl.setAttribute("data-variant",this.config.variant||"primary"))}},{key:"handleClick",value:function(t){var e;this.dispatchEvent("buttonclick",{nativeEvent:t,type:(null===(e=this.buttonEl)||void 0===e?void 0:e.type)||"button"})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-button"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"button-control"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(812).Component);v=b,m="button-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.ButtonComponent=b)},110(t,e,n){"use strict";n.r(e),n.d(e,{CalendarComponent:()=>O});var r=n(812);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,s(f,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(f),s(f,i,"Generator"),s(f,r,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function f(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var b=["ar","fa","he","ur"],g=new Map;function w(t,e,n){return Math.max(e,Math.min(n,t))}var S,k,E,O=function(t){function e(t){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,o])).templateId=e.templateId,n.locale=n.readAttr("locale",navigator.language||"en-US"),n.dir=n.readAttr("dir","auto"),n.rtl=(r=n.locale,"rtl"===(i=n.dir)||"ltr"!==i&&b.some(function(t){return String(r||"").startsWith(t)})),n.tz=n.readAttr("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),n.today=new Date,n.year=n.today.getFullYear(),n.month=n.today.getMonth()+1,n.day=null,n.hour=0,n.minute=0,n.step=Math.max(1,Number(n.readAttr("step","5"))||5),n.hour12=n.readBoolean("hour12",!1),n.validatorNames=n.parseList(n.readAttr("validators","")),n.validators=n.validatorNames.map(function(t){return g.get(t)}).filter(Boolean),n.onPrev=function(){return n.changeMonth(-1)},n.onNext=function(){return n.changeMonth(1)},n.onDayClick=function(t){return n.handleDayClick(t)},n.onToggleAmPm=function(){n.hour=(n.hour+12)%24,n.renderTime()},n.onTouchStart=function(t){return n.handleSwipe(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n&&""!==String(n).trim())return String(n).trim();var r=this.container.getAttribute("data-".concat(t));return null!=r&&""!==String(r).trim()?String(r).trim():e}},{key:"readBoolean",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.toLowerCase();return!!["1","true","yes","on"].includes(r)||!["0","false","no","off"].includes(r)&&e}},{key:"parseList",value:function(t){return t?String(t).split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveInputElement",value:function(){var t=this.container.querySelector('[data-role="calendar-input"]');if(t instanceof HTMLInputElement)return t;var e=this.container.querySelector('input[slot="input"]');return e instanceof HTMLInputElement?e:null}},{key:"init",value:(p=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"render",value:(h=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.input=this.resolveInputElement(),this.element=this.container.querySelector(".holi-calendar"),this.prevBtn=this.container.querySelector('[data-action="prev-month"]'),this.nextBtn=this.container.querySelector('[data-action="next-month"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.thead=this.container.querySelector('[data-role="thead"]'),this.tbody=this.container.querySelector('[data-role="tbody"]'),this.timeBox=this.container.querySelector('[data-role="time"]'),this.hourInput=this.container.querySelector('[data-role="hour"]'),this.minuteInput=this.container.querySelector('[data-role="minute"]'),this.timeToggle=this.container.querySelector('[data-action="toggle-ampm"]'),this.messages=this.container.querySelector('[data-role="messages"]'),this.live=this.container.querySelector('[data-role="live"]'),this.element&&this.thead&&this.tbody&&this.prevBtn&&this.nextBtn&&this.titleEl&&this.messages&&this.live){t.n=2;break}throw new Error("Calendar template is missing required nodes");case 2:this.element.dir=this.rtl?"rtl":"ltr",this.renderCalendar();case 3:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,s=this;null===(t=this.prevBtn)||void 0===t||t.addEventListener("click",this.onPrev),null===(e=this.nextBtn)||void 0===e||e.addEventListener("click",this.onNext),null===(n=this.tbody)||void 0===n||n.addEventListener("click",this.onDayClick),null===(r=this.timeToggle)||void 0===r||r.addEventListener("click",this.onToggleAmPm),null===(i=this.element)||void 0===i||i.addEventListener("touchstart",this.onTouchStart,{passive:!0}),null===(o=this.hourInput)||void 0===o||o.addEventListener("input",function(){var t=Number(s.hourInput.value);if(Number.isFinite(t)){if(s.hour12){var e=s.hour>=12,n=w(t,1,12);s.hour=n%12+(e?12:0)}else s.hour=w(t,0,23);s.renderTime()}}),null===(a=this.minuteInput)||void 0===a||a.addEventListener("input",function(){var t=Number(s.minuteInput.value);if(Number.isFinite(t)){var e=Math.round(t/s.step)*s.step;s.minute=w(e,0,59),s.renderTime()}})}},{key:"renderCalendar",value:function(){this.renderHeader(),this.renderDays(),this.renderTime()}},{key:"renderHeader",value:function(){var t=new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric",timeZone:this.tz});this.titleEl.textContent=t.format(new Date(this.year,this.month-1,1)),this.thead.replaceChildren();var e=document.createElement("tr"),n=new Intl.DateTimeFormat(this.locale,{weekday:"short"}),r=function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(7).keys()).map(function(t){return n.format(new Date(2021,7,t+1))});this.rtl&&r.reverse(),r.forEach(function(t){var n=document.createElement("th");n.textContent=t,e.appendChild(n)}),this.thead.appendChild(e)}},{key:"renderDays",value:function(){var t=this;this.tbody.replaceChildren();for(var e,n,r=new Date(this.year,this.month-1,1).getDay(),i=(e=this.year,n=this.month,new Date(e,n,0).getDate()),o=this.today.getFullYear(),a=this.today.getMonth()+1,s=this.today.getDate(),l=1-r,u=function(){for(var e=document.createElement("tr"),n=[],r=0;r<7;r+=1,l+=1){var u=document.createElement("td");u.className="holi-calendar-day",l<1||l>i?u.classList.add("is-outside"):(u.textContent=String(l),u.tabIndex=0,u.setAttribute("data-day",String(l)),t.year===o&&t.month===a&&l===s&&u.classList.add("is-today"),t.day===l&&u.classList.add("is-selected"),t.applyDateValidation(u,new Date(t.year,t.month-1,l))),n.push(u)}t.rtl&&n.reverse(),n.forEach(function(t){return e.appendChild(t)}),t.tbody.appendChild(e)},c=0;c<6;c+=1)u()}},{key:"renderTime",value:function(){this.timeBox&&this.hourInput&&this.minuteInput&&this.timeToggle&&(this.hourInput.step="1",this.minuteInput.step=String(this.step),this.hourInput.value=String(this.hour12?w(this.hour%12||12,1,12):w(this.hour,0,23)),this.minuteInput.value=String(w(this.minute,0,59)),this.timeToggle.hidden=!this.hour12,this.timeToggle.textContent=this.hour>=12?"PM":"AM")}},{key:"runValidators",value:(l=u(a().m(function t(e,n){var r,i,o,s;return a().w(function(t){for(;;)switch(t.n){case 0:r=[],i=0;case 1:if(!(i<this.validators.length)){t.n=5;break}if((o=this.validators[i])&&o.type===e){t.n=2;break}return t.a(3,4);case 2:return t.n=3,o.validate(n,this);case 3:!0!==(s=t.v)&&r.push({severity:o.severity||"error",message:"string"==typeof s?s:o.name});case 4:i+=1,t.n=1;break;case 5:return t.a(2,r)}},t,this)})),function(t,e){return l.apply(this,arguments)})},{key:"applyDateValidation",value:function(t,e){this.runValidators("date",e).then(function(e){var n=e.some(function(t){return"error"===t.severity}),r=e.find(function(t){return"warning"===t.severity});if(n){var i=e.find(function(t){return"error"===t.severity});return t.classList.add("is-invalid"),t.setAttribute("aria-disabled","true"),void(t.title=(null==i?void 0:i.message)||"Unavailable")}r&&(t.classList.add("is-warning"),t.title=r.message)})}},{key:"showIssues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.messages&&(this.messages.replaceChildren(),e.forEach(function(e){var n=document.createElement("div");n.className="holi-calendar-message is-".concat(e.severity||"info"),n.textContent=e.message||"",t.messages.appendChild(n)}),e.length&&this.announce(e.map(function(t){return t.message}).join(". ")))}},{key:"handleDayClick",value:(s=u(a().m(function t(e){var n,r,i,o,s;return a().w(function(t){for(;;)switch(t.n){case 0:if(i=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,"[data-day]")){t.n=1;break}return t.a(2);case 1:if(!i.classList.contains("is-invalid")&&!i.classList.contains("is-outside")){t.n=2;break}return t.a(2);case 2:if(o=Number(i.getAttribute("data-day")),Number.isFinite(o)&&!(o<=0)){t.n=3;break}return t.a(2);case 3:return this.day=o,this.renderDays(),t.n=4,this.runValidators("selection",this.getDate());case 4:if(s=t.v,this.showIssues(s),!s.some(function(t){return"error"===t.severity})){t.n=5;break}return t.a(2);case 5:this.commit();case 6:return t.a(2)}},t,this)})),function(t){return s.apply(this,arguments)})},{key:"handleSwipe",value:function(t){var e,n,r=this,i=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;Number.isFinite(i)&&(null===(n=this.element)||void 0===n||n.addEventListener("touchmove",function(t){var e,n=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;if(Number.isFinite(n)){var o=n-i,a=r.rtl?-1:1;o>60*a&&r.changeMonth(-1),o<-60*a&&r.changeMonth(1)}},{once:!0}))}},{key:"changeMonth",value:function(t){this.month+=t,this.month<1&&(this.month=12,this.year-=1),this.month>12&&(this.month=1,this.year+=1),this.renderCalendar()}},{key:"getDate",value:function(){var t,e=this.hour12?this.hour%12+("PM"===(null===(t=this.timeToggle)||void 0===t?void 0:t.textContent)?12:0):this.hour,n=this.day||1;return new Date(this.year,this.month-1,n,e,this.minute)}},{key:"commit",value:function(){var t,e=this.getDate();this.input&&(this.input.value=e.toISOString(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0}))),null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("calendarchange",{bubbles:!0,detail:{value:e.toISOString(),date:e}})),this.announce("Selected ".concat(e.toLocaleString(this.locale,{timeZone:this.tz})))}},{key:"announce",value:function(t){var e=this;this.live&&(this.live.textContent="",requestAnimationFrame(function(){e.live.textContent=t||""}))}},{key:"destroy",value:function(){var t,n,r,i,o;null===(t=this.prevBtn)||void 0===t||t.removeEventListener("click",this.onPrev),null===(n=this.nextBtn)||void 0===n||n.removeEventListener("click",this.onNext),null===(r=this.tbody)||void 0===r||r.removeEventListener("click",this.onDayClick),null===(i=this.timeToggle)||void 0===i||i.removeEventListener("click",this.onToggleAmPm),null===(o=this.element)||void 0===o||o.removeEventListener("touchstart",this.onTouchStart),f(e,"destroy",this,3)([])}}],i=[{key:"selector",get:function(){return"calendar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"calendar"}},{key:"registerValidator",value:function(t){if(!t||!t.name||"function"!=typeof t.validate)throw new Error("Invalid calendar validator");g.set(t.name,t)}}],r&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,s,l,h,p}(r.Component);S=O,E="calendar-template",(k=m(k="templateId"))in S?Object.defineProperty(S,k,{value:E,enumerable:!0,configurable:!0,writable:!0}):S[k]=E,"undefined"!=typeof window&&(window.CalendarComponent=O,window.Calendar=O,window.Calendar.registerValidator=O.registerValidator.bind(O))},838(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,s(f,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(f),s(f,i,"Generator"),s(f,r,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function h(t,e,n){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}n.r(e),n.d(e,{CarouselComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.mode=n.resolveMode(t.getAttribute("mode")||"fade"),n.baseActiveSlides=n.parseNumber(t.getAttribute("active-slides"),1),n.baseSlidesToMove=n.parseNumber(t.getAttribute("move-slides"),1),n.activeSlides=n.baseActiveSlides,n.slidesToMove=n.baseSlidesToMove,n.loop=!t.hasAttribute("no-loop"),n.autoStart=!t.hasAttribute("no-autoplay"),n.pauseOnHover=!t.hasAttribute("no-pause-on-hover"),n.intervalMs=n.parseNumber(t.getAttribute("interval"),5e3),n.skipTarget=t.getAttribute("skip-target")||"#main-content",n.responsive=n.parseResponsiveConfig(t.getAttribute("responsive")),n.currentIndex=0,n.isPlaying=n.autoStart,n.animationFrame=null,n.progressStartedAt=0,n.boundResize=null,n.slotted=null,n.track=null,n.slideList=[],n.prevButton=null,n.nextButton=null,n.playPauseButton=null,n.loopButton=null,n.dotsContainer=null,n.progressBar=null,n.liveRegion=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,o=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"resolveMode",value:function(t){return"slide"===String(t||"fade").trim().toLowerCase()?"slide":"fade"}},{key:"parseResponsiveConfig",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===c(e)?e:{}}catch(t){return{}}}},{key:"captureSlots",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-carousel")}),e=function(e){return t.find(function(t){return t.getAttribute("slot")===e})||null},n=e("slides")||this.container.querySelector(".slides");this.slotted={skipLink:e("skip-link"),slides:n,anchors:e("anchors"),dots:e("dots"),controls:e("controls"),progress:e("progress"),liveRegion:e("live-region")}}},{key:"init",value:(f=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlots(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.applyResponsiveSettings(),this.goToSlide(0,!1),this.autoStart&&this.startAutoSlide();case 2:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"validateStructure",value:function(){var t;if(p(e,"validateStructure",this,3)([]),!(null!==(t=this.slotted)&&void 0!==t&&t.slides||this.container.querySelector('.slides, .slide, [slot="slides"]')))throw new Error('Carousel requires slides markup. Provide [slot="slides"] with .slide items.')}},{key:"render",value:(l=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-carousel"),this.element){t.n=2;break}return t.a(2);case 2:this.element.classList.toggle("fade","fade"===this.mode),this.element.classList.toggle("slide-mode","slide"===this.mode),this.applySlotContent(),this.track=this.container.querySelector('[data-role="track"]'),this.prevButton=this.container.querySelector('[data-action="previous"]'),this.nextButton=this.container.querySelector('[data-action="next"]'),this.playPauseButton=this.container.querySelector('[data-action="play-pause"]'),this.loopButton=this.container.querySelector('[data-action="toggle-loop"]'),this.dotsContainer=this.container.querySelector('[data-role="dots"]'),this.progressBar=this.container.querySelector('[data-role="progress-bar"]'),this.liveRegion=this.container.querySelector('[data-role="live-region"]'),this.refreshSlides(),this.updateControlLabels(),this.updateTrackSizing(),this.renderDots();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"applySlotContent",value:function(){var t,e,n,o,a,s,l,u,c=this;if([["skip-link",null===(t=this.slotted)||void 0===t?void 0:t.skipLink],["slides",null===(e=this.slotted)||void 0===e?void 0:e.slides],["anchors",null===(n=this.slotted)||void 0===n?void 0:n.anchors],["dots",null===(o=this.slotted)||void 0===o?void 0:o.dots],["controls",null===(a=this.slotted)||void 0===a?void 0:a.controls],["progress",null===(s=this.slotted)||void 0===s?void 0:s.progress],["live-region",null===(l=this.slotted)||void 0===l?void 0:l.liveRegion]].forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];if(r){var o=c.container.querySelector('slot[name="'.concat(n,'"]'));o&&o.replaceWith(r)}}),this.track&&null!==(u=this.slotted)&&void 0!==u&&u.slides){var d=this.slotted.slides.matches(".slides")?this.slotted.slides:this.slotted.slides.querySelector(".slides");if(d){var h;(h=this.track).replaceChildren.apply(h,r(Array.from(d.children)))}else{var f,p=Array.from(this.slotted.slides.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("slide")});p.length&&(f=this.track).replaceChildren.apply(f,r(p))}}var v=this.container.querySelector('slot[name="slides"]');v&&v.parentElement===this.track&&v.replaceWith.apply(v,r(Array.from(v.childNodes)));var y=this.container.querySelector(".skip-link");y&&y.setAttribute("href",this.skipTarget)}},{key:"refreshSlides",value:function(){this.track&&(this.slideList=Array.from(this.track.querySelectorAll(".slide")),this.slideList.forEach(function(t,e){t.setAttribute("data-index",String(e)),t.setAttribute("aria-hidden","true"),t.classList.remove("active")}))}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.element&&(this.element.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e){var n=e.getAttribute("data-action");return"next"===n?(t.preventDefault(),void r.next()):"previous"===n?(t.preventDefault(),void r.previous()):"play-pause"===n?(t.preventDefault(),void r.togglePlayPause()):void("toggle-loop"===n&&(t.preventDefault(),r.toggleLoop()))}}),null===(t=this.dotsContainer)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-dot-index]");if(e){var n=Number(e.getAttribute("data-dot-index"));Number.isFinite(n)&&r.goToSlide(n,!0)}}),this.element.addEventListener("keydown",function(t){return r.handleKeydown(t)}),null===(e=this.track)||void 0===e||e.addEventListener("touchstart",function(t){return r.onTouchStart(t)},{passive:!0}),null===(n=this.track)||void 0===n||n.addEventListener("touchend",function(t){return r.onTouchEnd(t)},{passive:!0}),this.pauseOnHover&&(this.element.addEventListener("mouseenter",function(){return r.pauseAutoSlide(!1)}),this.element.addEventListener("mouseleave",function(){return r.resumeAutoSlide()})),"undefined"!=typeof window&&(this.boundResize=function(){return r.applyResponsiveSettings()},window.addEventListener("resize",this.boundResize)))}},{key:"applyResponsiveSettings",value:function(){var t=this,e=window.innerWidth||document.documentElement.clientWidth,n=null;Object.keys(this.responsive).map(function(t){return Number(t)}).filter(function(t){return Number.isFinite(t)}).sort(function(t,e){return t-e}).forEach(function(r){e<=r&&null==n&&(n=t.responsive[String(r)]||t.responsive[r])}),this.activeSlides=this.baseActiveSlides,this.slidesToMove=this.baseSlidesToMove,n&&"object"===c(n)&&(this.activeSlides=this.parseNumber(n.active,this.baseActiveSlides),this.slidesToMove=this.parseNumber(n.move,this.baseSlidesToMove)),this.activeSlides=Math.max(1,Math.min(this.activeSlides,this.slideList.length||1)),this.slidesToMove=Math.max(1,this.slidesToMove),this.updateTrackSizing(),this.renderDots(),this.goToSlide(Math.min(this.currentIndex,Math.max(this.getDotCount()-1,0)),!1)}},{key:"getDotCount",value:function(){return Math.max(1,Math.ceil((this.slideList.length||1)/this.slidesToMove))}},{key:"renderDots",value:function(){if(this.dotsContainer){this.dotsContainer.replaceChildren();for(var t=this.getDotCount(),e=0;e<t;e+=1){var n=document.createElement("button");n.type="button",n.className="dot",n.setAttribute("data-dot-index",String(e)),n.setAttribute("aria-label","Go to slide ".concat(e+1)),n.setAttribute("aria-pressed",e===this.currentIndex?"true":"false"),e===this.currentIndex&&n.classList.add("selected"),this.dotsContainer.appendChild(n)}}}},{key:"updateDots",value:function(){var t=this;this.dotsContainer&&this.dotsContainer.querySelectorAll("[data-dot-index]").forEach(function(e,n){var r=n===t.currentIndex;e.classList.toggle("selected",r),e.setAttribute("aria-pressed",r?"true":"false")})}},{key:"updateTrackSizing",value:function(){if(this.track&&this.slideList.length){var t=100/this.activeSlides;this.slideList.forEach(function(e){e.style.flex="0 0 ".concat(t,"%")})}}},{key:"goToSlide",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.slideList.length){var r=this.getDotCount()-1;this.currentIndex=Math.max(0,Math.min(t,r));var i=this.currentIndex*this.slidesToMove;if("slide"===this.mode){var o=i*(100/this.activeSlides);this.track&&(this.track.style.transform="translateX(-".concat(o,"%)")),this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")})}else this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")});this.updateDots(),this.announce("Slide ".concat(this.currentIndex+1," of ").concat(this.getDotCount()," is now visible")),n&&this.isPlaying&&this.startAutoSlide()}}},{key:"next",value:function(){var t=this.getDotCount()-1;if(this.currentIndex>=t){if(!this.loop)return;this.goToSlide(0)}else this.goToSlide(this.currentIndex+1)}},{key:"previous",value:function(){if(this.currentIndex<=0){if(!this.loop)return;this.goToSlide(this.getDotCount()-1)}else this.goToSlide(this.currentIndex-1)}},{key:"togglePlayPause",value:function(){this.isPlaying?this.pauseAutoSlide(!0):(this.isPlaying=!0,this.updateControlLabels(),this.announce("Carousel playing"),this.startAutoSlide())}},{key:"pauseAutoSlide",value:function(t){this.isPlaying=!1,this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.updateControlLabels(),t&&this.announce("Carousel paused")}},{key:"resumeAutoSlide",value:function(){this.isPlaying||(this.isPlaying=!0,this.updateControlLabels(),this.startAutoSlide())}},{key:"toggleLoop",value:function(){this.loop=!this.loop,this.updateControlLabels(),this.announce("Loop mode ".concat(this.loop?"enabled":"disabled"))}},{key:"updateControlLabels",value:function(){this.playPauseButton&&(this.playPauseButton.textContent=this.isPlaying?"Pause":"Play",this.playPauseButton.setAttribute("aria-label",this.isPlaying?"Pause auto sliding":"Resume auto sliding")),this.loopButton&&(this.loopButton.textContent=this.loop?"Disable Loop":"Enable Loop",this.loopButton.setAttribute("aria-pressed",this.loop?"true":"false"))}},{key:"startAutoSlide",value:function(){var t=this;if(this.progressBar){this.animationFrame&&cancelAnimationFrame(this.animationFrame),this.progressBar.style.width="0%",this.progressStartedAt=Date.now();var e=function(){if(t.isPlaying){var n=Date.now()-t.progressStartedAt,r=Math.min(n/t.intervalMs*100,100);t.progressBar.style.width="".concat(r,"%"),n>=t.intervalMs&&(t.next(),t.progressStartedAt=Date.now(),t.progressBar.style.width="0%"),t.animationFrame=requestAnimationFrame(e)}};this.animationFrame=requestAnimationFrame(e)}}},{key:"onTouchStart",value:function(t){var e,n;this.touchStartX=null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0}},{key:"onTouchEnd",value:function(t){var e,n,r=(null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)-(this.touchStartX||0);Math.abs(r)<24||(r<0?this.next():this.previous())}},{key:"handleKeydown",value:function(t){return"ArrowRight"===t.key?(t.preventDefault(),void this.next()):"ArrowLeft"===t.key?(t.preventDefault(),void this.previous()):void(" "===t.key&&(t.preventDefault(),this.togglePlayPause()))}},{key:"announce",value:function(t){this.liveRegion&&(this.liveRegion.textContent=t)}},{key:"destroy",value:function(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.boundResize&&(window.removeEventListener("resize",this.boundResize),this.boundResize=null),p(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"carousel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"carousel"}}],o&&d(n.prototype,o),s&&d(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,s,l,f}(n(812).Component);g=k,S="carousel-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CarouselComponent=k)},546(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,l(f,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(f),l(f,i,"Generator"),l(f,r,function(){return this}),l(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function h(t,e,n){return e=y(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ChartComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.type=n.resolveType(r.type||n.readAttr("type","line")),n.height=n.parseNumber(r.height,n.readAttr("height","220"),220),n.showLegend=n.parseBoolean(r.showLegend,n.readAttr("show-legend","true"),!0),n.title=String(r.title||n.readAttr("title","")).trim(),n.colors=n.resolveColors(r.colors||n.readAttr("colors","")),n.data=n.resolveData(r.data),n.element=null,n.svgEl=null,n.legendEl=null,n.emptyEl=null,n.boundClick=function(t){return n.handlePointClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.container.getAttribute(t);return null!=r?r:null!==(e=this.container.getAttribute("data-".concat(t)))&&void 0!==e?e:n}},{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(Number.isFinite(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){if("boolean"==typeof r)return r;var i=String(r).trim().toLowerCase();if(["1","true","yes","on"].includes(i))return!0;if(["0","false","no","off"].includes(i))return!1}}return e}},{key:"resolveType",value:function(t){var e=String(t||"line").trim().toLowerCase();return new Set(["line","bar","area","pie","doughnut"]).has(e)?e:"line"}},{key:"resolveColors",value:function(t){if(Array.isArray(t))return t.map(function(t){return String(t).trim()}).filter(Boolean);var e=String(t||"").trim();if(!e)return["#2563eb","#10b981","#f59e0b","#ef4444","#7c3aed","#14b8a6","#f97316"];if(e.startsWith("["))try{var n=JSON.parse(e);if(Array.isArray(n))return n.map(function(t){return String(t).trim()}).filter(Boolean)}catch(t){}return e.split(",").map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveData",value:function(t){var e=this;if(Array.isArray(t))return this.normalizeData(t);var n=this.readAttr("data",this.readAttr("series",""));if(n)try{var r=JSON.parse(n);if(Array.isArray(r))return this.normalizeData(r)}catch(t){}var i=Array.from(this.container.querySelectorAll("[data-point], [data-value], li"));if(i.length){var o=i.map(function(t,n){var r;return{label:t.getAttribute("data-label")||t.getAttribute("label")||(null===(r=t.textContent)||void 0===r?void 0:r.trim())||"Item ".concat(n+1),value:e.parseNumber(t.getAttribute("data-point"),t.getAttribute("data-value"),t.getAttribute("value"),0)}});return this.normalizeData(o)}return[]}},{key:"normalizeData",value:function(t){var e=this;return(Array.isArray(t)?t:[]).map(function(t,n){var r,i,o,a=null!==(r=null!==(i=null!==(o=null==t?void 0:t.label)&&void 0!==o?o:null==t?void 0:t.name)&&void 0!==i?i:null==t?void 0:t.x)&&void 0!==r?r:"Item ".concat(n+1),s=e.parseNumber(null==t?void 0:t.value,null==t?void 0:t.y,null==t?void 0:t.amount,0);return{label:String(a),value:Math.max(0,Number(s)||0)}})}},{key:"init",value:(u=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"render",value:(l=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-chart"),this.svgEl=this.container.querySelector('[data-role="svg"]'),this.legendEl=this.container.querySelector('[data-role="legend"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.element&&this.svgEl&&this.legendEl&&this.emptyEl&&this.titleEl){t.n=2;break}throw new Error("Chart template is missing required nodes");case 2:this.element.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px")),this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title,this.draw();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.addEventListener("click",this.boundClick)}},{key:"handlePointClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-point-index]");if(r){var i=Number(r.getAttribute("data-point-index"));!Number.isFinite(i)||i<0||i>=this.data.length||this.dispatchEvent("chartpointselect",{index:i,item:this.data[i],type:this.type})}}},{key:"draw",value:function(){if(this.svgEl&&this.legendEl&&this.emptyEl){this.svgEl.replaceChildren(),this.legendEl.replaceChildren();var t=this.normalizeData(this.data);this.data=t;var e=t.length>0&&t.some(function(t){return t.value>0});this.emptyEl.hidden=e,this.svgEl.hidden=!e,this.legendEl.hidden=!e||!this.showLegend,e&&(this.svgEl.setAttribute("viewBox","0 0 100 100"),this.svgEl.setAttribute("aria-label","Chart (".concat(this.type,")")),this.svgEl.setAttribute("preserveAspectRatio","pie"===this.type||"doughnut"===this.type?"xMidYMid meet":"none"),"bar"===this.type?this.drawBars(t):"pie"===this.type||"doughnut"===this.type?this.drawPie(t,"doughnut"===this.type):this.drawLine(t,"area"===this.type),this.showLegend&&this.drawLegend(t))}}},{key:"drawLine",value:function(t){for(var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.calculateCartesianPoints(t),o=this.createSvgNode("g",{class:"holi-chart-grid"}),a=0;a<=4;a+=1){var s=10+20*a;o.appendChild(this.createSvgNode("line",{x1:8,y1:s,x2:96,y2:s}))}if(this.svgEl.appendChild(o),n){var l=r[0],u=r[r.length-1],c=["M ".concat(l.x," 90")].concat(i(r.map(function(t,e){return"".concat("L"," ").concat(t.x," ").concat(t.y)})),["L ".concat(u.x," 90 Z")]).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d:c,class:"holi-chart-area"}))}var d=r.map(function(t,e){return"".concat(0===e?"M":"L"," ").concat(t.x," ").concat(t.y)}).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d,class:"holi-chart-line",stroke:this.resolveColor(0)})),r.forEach(function(t){var n=e.createSvgNode("circle",{cx:t.x,cy:t.y,r:2.2,class:"holi-chart-dot",fill:e.resolveColor(t.index),"data-point-index":t.index});e.svgEl.appendChild(n)})}},{key:"drawBars",value:function(t){var e=this,n=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),r=Math.max(4,(88-2*(t.length-1))/t.length);t.forEach(function(t,i){var o=t.value/n*72,a=8+i*(r+2),s=90-o;e.svgEl.appendChild(e.createSvgNode("rect",{x:a,y:s,width:r,height:o,rx:1.5,fill:e.resolveColor(i),class:"holi-chart-bar","data-point-index":i}))})}},{key:"drawPie",value:function(t,e){var n=this,r=t.reduce(function(t,e){return t+e.value},0);if(!(r<=0)){var i=-Math.PI/2;t.forEach(function(t,e){var o=t.value/r*Math.PI*2,a=i+o,s=n.describeArc(50,50,36,i,a);n.svgEl.appendChild(n.createSvgNode("path",{d:s,fill:n.resolveColor(e),class:"holi-chart-slice","data-point-index":e})),i=a}),e&&this.svgEl.appendChild(this.createSvgNode("circle",{cx:50,cy:50,r:19,class:"holi-chart-hole"}))}}},{key:"calculateCartesianPoints",value:function(t){var e=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),n=t.length>1?84/(t.length-1):0;return t.map(function(t,r){return{x:10+r*n,y:90-t.value/e*76,index:r}})}},{key:"describeArc",value:function(t,e,n,r,i){var o=t+n*Math.cos(r),a=e+n*Math.sin(r),s=t+n*Math.cos(i),l=e+n*Math.sin(i),u=i-r>Math.PI?1:0;return"M ".concat(t," ").concat(e," L ").concat(o," ").concat(a," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(s," ").concat(l," Z")}},{key:"drawLegend",value:function(t){var e=this;t.forEach(function(t,n){var r=document.createElement("li");r.className="holi-chart-legend-item",r.setAttribute("data-point-index",String(n));var i=document.createElement("span");i.className="holi-chart-legend-swatch",i.style.backgroundColor=e.resolveColor(n);var o=document.createElement("span");o.className="holi-chart-legend-label",o.textContent="".concat(t.label," (").concat(t.value,")"),r.append(i,o),e.legendEl.appendChild(r)})}},{key:"createSvgNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=e[0],i=e[1];null!=i&&n.setAttribute(r,String(i))}),n}},{key:"resolveColor",value:function(t){return this.colors.length?this.colors[t%this.colors.length]:"#2563eb"}},{key:"setType",value:function(t){this.type=this.resolveType(t),this.draw()}},{key:"update",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.type&&(this.type=this.resolveType(n.type)),null!=n.height&&(this.height=this.parseNumber(n.height,this.height),null===(t=this.element)||void 0===t||t.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px"))),n.colors&&(this.colors=this.resolveColors(n.colors)),null!=n.title&&(this.title=String(n.title||"").trim(),this.titleEl&&(this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title)),null!=n.showLegend&&(this.showLegend=this.parseBoolean(n.showLegend,this.showLegend)),this.data=this.normalizeData(e),this.draw(),this.dispatchEvent("chartupdate",{type:this.type,count:this.data.length})}},{key:"destroy",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.removeEventListener("click",this.boundClick),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"chart"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"chart"}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,u}(n(812).Component);g=k,S="chart-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.ChartComponent=k)},673(t,e,n){"use strict";n.r(e),n.d(e,{CheckboxGroupComponent:()=>k});var r=n(812),i=n(853);function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return u(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),f=d.prototype=s.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,u(f,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(f),u(f,i,"Generator"),u(f,r,function(){return this}),u(f,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function h(t,e,n){return e=y(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",type:n.container.getAttribute("type")||"checkbox",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,type:n.config.type,options:n.config.options,values:[]},n.boundChange=function(){return n.syncState()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,r=[{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=l().m(function t(){var n,r;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-checkbox-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),!(null===(n=this.optionsHost)||void 0===n?void 0:n.querySelector('input[type="checkbox"], input[type="radio"]'))&&this.config.options.length>0&&this.renderConfiguredOptions(),this.applyNameToInputs(),this.syncState(),null===(r=this.element)||void 0===r||r.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),f=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return f.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"renderConfiguredOptions",value:function(){var t=this;if(this.optionsHost){var e=document.createDocumentFragment();this.config.options.forEach(function(n,r){var i=n&&"object"===s(n)?n:{value:n,label:String(n)},o=document.createElement("label");o.className="holi-checkbox-option";var a=document.createElement("input");a.type="radio"===t.config.type?"radio":"checkbox",a.value=null==i.value?"":String(i.value),a.checked=!!i.checked,a.name=t.config.name||"holi-checkbox-".concat(r);var l=document.createElement("span");l.textContent=null==i.label?String(i.value||""):String(i.label),o.append(a,l),e.appendChild(o)}),this.optionsHost.appendChild(e)}}},{key:"applyNameToInputs",value:function(){var t=this;this.optionsHost&&this.config.name&&this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(function(e){e.name||(e.name=t.config.name)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=Array.from(this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]')).filter(function(t){return t.checked}).map(function(t){return t.value});this.state.values=t,this.dispatchEvent("checkboxchange",{values:o(this.state.values)})}}},{key:"value",get:function(){return o(this.state.values)}},{key:"validate",value:function(){return!0}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-checkbox"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"checkbox-group"}},{key:"getNativeSelectors",value:function(){return['input[type="checkbox"][component="checkbox"]','input[type="checkbox"][role="checkbox"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","checkbox-group"),e.setAttribute("type","checkbox");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,f}(r.Component);g=k,S="checkbox-group-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CheckboxGroupComponent=k)},812(t,e,n){"use strict";n.r(e),n.d(e,{Component:()=>D});var r=n(904),i=n(573),o=n(458);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function l(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.stateKey=this.resolveStateKey(),this.stateStoreId=this.resolveStateStoreId(),this.stateMap={},this.stateHydratedFromAttr=!1,this.stateInternal={},this.isPublishingState=!1,this.isApplyingExternalState=!1,this.isApplyingMappedState=!1,this.stateUnsubscribe=null,this.stateMapUnsubscribers=[],this.stateProxyCache=new WeakMap},e=[{key:"resolveStateKey",value:function(){var t,e,n,r,i,o,a,s,l,u=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-key");if(u)return String(u).trim();var c,d,h,f=(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"component"))||(null===(i=this.container)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"role"))||((h=String((null===(c=this.container)||void 0===c?void 0:c.tagName)||"").toLowerCase()).startsWith("holi-")?h.slice(5):h||((null===(d=this.component)||void 0===d||null===(d=d.constructor)||void 0===d?void 0:d.name)||"component").replace(/component$/i,"").toLowerCase()),p=(null===(a=this.container)||void 0===a||null===(s=a.getAttribute)||void 0===s?void 0:s.call(a,"data-component-id"))||(null===(l=this.container)||void 0===l?void 0:l.id)||"component";return"".concat(String(f||"component").trim().toLowerCase(),".").concat(String(p).trim())}},{key:"resolveStateStoreId",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-store");return n?String(n).trim():o.T.defaultStoreId}},{key:"install",value:function(){var t=this;this.container&&(this.stateMap=this.resolveStateMap(),Object.defineProperty(this.component,"state",{get:function(){return t.stateInternal},set:function(e){var n=e&&"object"===d(e)?e:{};t.stateInternal=t.createStateProxy(n),t.hydrateStateFromAttribute(),t.publishStateSnapshot()},configurable:!0,enumerable:!0}),this.component.state={},this.stateUnsubscribe=o.T.subscribe(this.stateKey,function(e){if(!t.isPublishingState&&!t.isApplyingExternalState&&e&&"object"===d(e)){t.isApplyingExternalState=!0;try{Object.keys(e).forEach(function(n){t.stateInternal[n]=e[n]})}finally{t.isApplyingExternalState=!1}}},this.stateStoreId),this.bindMappedStateSubscriptions())}},{key:"uninstall",value:function(){var t;null===(t=this.stateUnsubscribe)||void 0===t||t.call(this),this.stateUnsubscribe=null,this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[]}},{key:"resolveStateMap",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-map");if(!n)return{};try{var r=JSON.parse(n);if(!r||"object"!==d(r))return{};var i={};return Object.keys(r).forEach(function(t){var e=String(t||"").trim(),n=String(r[t]||"").trim();e&&n&&(i[e]=n)}),i}catch(t){return{}}}},{key:"bindMappedStateSubscriptions",value:function(){var t=this;this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[],Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=o.T.subscribe(i,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.isPublishingState||t.isApplyingExternalState||t.isApplyingMappedState||void 0===e&&null!=n&&n.initial)){t.isApplyingMappedState=!0;try{t.setStatePath(r,e)}finally{t.isApplyingMappedState=!1}}},t.stateStoreId);t.stateMapUnsubscribers.push(a)})}},{key:"hydrateStateFromAttribute",value:function(){var t,e,n=this;if(!this.stateHydratedFromAttr){this.stateHydratedFromAttr=!0;var r=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"state");if(r)try{var i=JSON.parse(r);if(!i||"object"!==d(i))return;var o=this.resolveStateExpressions(i);Object.keys(o).forEach(function(t){n.stateInternal[t]=o[t]})}catch(t){}}}},{key:"resolveStateExpressions",value:function(t){var e=this;if(Array.isArray(t))return t.map(function(t){return e.resolveStateExpressions(t)});if(t&&"object"===d(t)){var n={};return Object.keys(t).forEach(function(r){n[r]=e.resolveStateExpressions(t[r])}),n}if("string"!=typeof t)return t;var r=t.trim().match(/^@\{(.+)\}$/);if(!r)return t;var i=r[1].trim(),o=s(s(s({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),this.stateInternal);try{var a;if("function"==typeof(null===(a=this.component)||void 0===a?void 0:a.evaluateExpression))return this.component.evaluateExpression(i,o)}catch(t){}return t}},{key:"createStateProxy",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==d(t))return t;if(this.stateProxyCache.has(t))return this.stateProxyCache.get(t);var r=new Proxy(t,{get:function(t,r){var i=t[r];return null!=i&&"object"===d(i)?e.createStateProxy(i,n.concat(String(r))):i},set:function(t,r,i){t[r]=i;var o=n.concat(String(r)).join(".");return e.reflectStateValue(o,i),e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(o,i),!0},deleteProperty:function(t,r){if(!(r in t))return!0;delete t[r];var i=n.concat(String(r)).join(".");return e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(i,void 0),!0}});return this.stateProxyCache.set(t,r),r}},{key:"setStatePath",value:function(t,e){var n=String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(n.length){for(var r=this.stateInternal,i=0;i<n.length-1;i+=1){var o=n[i];null!=r[o]&&"object"===d(r[o])||(r[o]={}),r=r[o]}r[n[n.length-1]]=e}}},{key:"getStatePath",value:function(t){return String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean).reduce(function(t,e){return null==t?void 0:t[e]},this.stateInternal)}},{key:"resolveMappedPath",value:function(t){var e=String(t||"").trim();if(!e)return"";for(var n=Object.entries(this.stateMap),r=0;r<n.length;r+=1){var i=u(n[r],2),o=i[0],a=i[1];if(e===o)return a;if(e.startsWith("".concat(o,"."))){var s=e.slice(o.length);return"".concat(a).concat(s)}}return""}},{key:"cloneSerializable",value:function(t){return this.snapshotValue(t)}},{key:"snapshotValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(null==t||"object"!==d(t))return t;if(n.has(t))return null;if(n.add(t),Array.isArray(t))return t.map(function(t){return e.snapshotValue(t,n)});var r={};return Object.keys(t).forEach(function(i){r[i]=e.snapshotValue(t[i],n)}),r}},{key:"toKebabCase",value:function(t){return String(t||"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}},{key:"reflectStateValue",value:function(t,e){var n,r=String(t||"").trim();if(r&&!r.includes(".")){var i,o,a=this.toKebabCase(r);if(null==e)null===(i=this.container)||void 0===i||null===(o=i.removeAttribute)||void 0===o||o.call(i,a);else if("object"!==d(e)){var s,l;null===(s=this.container)||void 0===s||null===(l=s.setAttribute)||void 0===l||l.call(s,a,String(e))}r in this.component&&"function"!=typeof this.component[r]&&(this.component[r]=e),"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.onStateReflect)&&this.component.onStateReflect(r,e)}}},{key:"publishStateSnapshot",value:function(){var t=this,e=this.cloneSerializable(this.stateInternal||{});this.shouldDispatchPpr("",e,!0)&&this.dispatchPprChange("",e,!0),this.isPublishingState=!0;try{o.T.publish(this.stateKey,e,this.stateStoreId),Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=t.cloneSerializable(t.getStatePath(r));void 0!==a&&o.T.publish(i,a,t.stateStoreId)})}finally{this.isPublishingState=!1}}},{key:"publishStateChange",value:function(t,e){var n=String(t||"").trim();if(n){this.shouldDispatchPpr(n,e,!1)&&this.dispatchPprChange(n,e,!1),this.isPublishingState=!0;try{o.T.publish("".concat(this.stateKey,".").concat(n),this.cloneSerializable(e),this.stateStoreId);var r=this.resolveMappedPath(n);r&&o.T.publish(r,this.cloneSerializable(e),this.stateStoreId)}finally{this.isPublishingState=!1}}else this.publishStateSnapshot()}},{key:"dispatchPprChange",value:function(t,e,n){this.container instanceof Element&&this.container.dispatchEvent(new CustomEvent("holi:ppr-change",{detail:{component:this.component,path:t,value:this.cloneSerializable(e),initial:!!n},bubbles:!0}))}},{key:"shouldDispatchPpr",value:function(t,e,n){var r,i;return!(null!==(r=this.component)&&void 0!==r&&r.isApplyingDependencyUpdate||"function"==typeof(null===(i=this.component)||void 0===i?void 0:i.shouldDispatchPprChange)&&!1===this.component.shouldDispatchPprChange(t,e,n))}}],e&&h(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function g(t,e,n){return(e=w(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var S=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.boundDocumentChange=function(t){return n.handleDocumentChange(t)},this.boundOwnChange=function(t){return n.handleOwnChange(t)},this.initialSyncTimer=null}return e=t,(n=[{key:"install",value:function(){this.container instanceof Element&&(this.ensureComponentId(),this.hasInboundSubscriptions()&&(document.addEventListener("holi:ppr-change",this.boundDocumentChange),this.scheduleInitialSync()),this.hasOutboundTargets()&&this.container.addEventListener("holi:ppr-change",this.boundOwnChange))}},{key:"uninstall",value:function(){var t;this.initialSyncTimer&&(clearTimeout(this.initialSyncTimer),this.initialSyncTimer=null),document.removeEventListener("holi:ppr-change",this.boundDocumentChange),null===(t=this.container)||void 0===t||t.removeEventListener("holi:ppr-change",this.boundOwnChange)}},{key:"ensureComponentId",value:function(){this.container&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextAutoId++))}},{key:"scheduleInitialSync",value:function(){var t=this;this.initialSyncTimer&&clearTimeout(this.initialSyncTimer),this.initialSyncTimer=setTimeout(function(){t.initialSyncTimer=null,t.performInitialSync()},0)}},{key:"performInitialSync",value:function(){var e=this;if(this.container instanceof Element){var n=this.readFirstAttr(t.sourceAttrNames);this.resolveElements(n).forEach(function(t){if(t instanceof Element&&t!==e.container){var n=r.Z.getElementInstances(t)[0]||null,i="function"==typeof(null==n?void 0:n.getStateSnapshot)?n.getStateSnapshot():{};e.applyInboundUpdate({sourceElement:t,sourceComponent:n,path:"",value:i,snapshot:i,initial:!0})}})}}},{key:"hasInboundSubscriptions",value:function(){return!!this.readFirstAttr(t.sourceAttrNames)}},{key:"hasOutboundTargets",value:function(){return!!this.readFirstAttr(t.targetAttrNames)}},{key:"readFirstAttr",value:function(t){for(var e=0;e<t.length;e+=1){var n,r,i=null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,t[e]);if(i&&String(i).trim())return String(i).trim()}return""}},{key:"handleDocumentChange",value:function(t){var e=t.target;if(e instanceof Element&&e!==this.container&&this.matchesInboundSource(e)){var n=t.detail||{},i=r.Z.getElementInstances(e),o=n.component||i[0]||null,a="function"==typeof(null==o?void 0:o.getStateSnapshot)?o.getStateSnapshot():{};this.applyInboundUpdate({sourceElement:e,sourceComponent:o,path:n.path||"",value:n.value,snapshot:a,initial:!1})}}},{key:"handleOwnChange",value:function(e){var n;if(e.target===this.container){var r=e.detail||{};this.applyTargets(this.readFirstAttr(t.targetAttrNames),{sourceElement:this.container,sourceComponent:this.component,path:r.path||"",value:r.value,snapshot:"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.getStateSnapshot)?this.component.getStateSnapshot():{},initial:!!r.initial})}}},{key:"matchesInboundSource",value:function(e){var n=this.readFirstAttr(t.sourceAttrNames);return this.resolveElements(n).includes(e)}},{key:"applyInboundUpdate",value:function(e){var n,r;null===(n=this.component)||void 0===n||null===(r=n.recordDependencySnapshot)||void 0===r||r.call(n,e);var i=this.readFirstAttr(t.targetAttrNames)||"@this";this.applyTargets(i,e)}},{key:"getElementAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[String(t.id||"").trim(),String(t.getAttribute("data-ppr-id")||"").trim(),String(t.getAttribute("data-component-id")||"").trim(),String(t.getAttribute("component")||t.getAttribute("role")||t.getAttribute("data-holi-component-class")||t.tagName).trim().toLowerCase()].forEach(function(t){t&&!e.includes(t)&&e.push(t)}),e}},{key:"applyTargets",value:function(t,e){var n=this,r=this.resolveElements(t),i=new Set;r.forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),n.updateTarget(t,e))})}},{key:"updateTarget",value:function(t,e){var n=r.Z.getElementInstances(t)[0]||null,i=m(m({},e),{},{targetElement:t,targetComponent:n,subscriberComponent:this.component});t.dispatchEvent(new CustomEvent("holi:ppr-update",{detail:i,bubbles:!0})),n&&!n.isDestroyed&&("function"!=typeof n.receiveDependencyUpdate?"function"==typeof n.handlePprUpdate&&n.handlePprUpdate(i):n.receiveDependencyUpdate(i))}},{key:"resolveElements",value:function(t){var e=this,n=this.tokenize(t),r=[],i=new Set;return n.forEach(function(t){e.resolveToken(t).forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),r.push(t))})}),r}},{key:"tokenize",value:function(t){return String(t||"").split(/[\s,]+/).map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveToken",value:function(t){if(!t||"@none"===t)return[];if(!(this.container instanceof Element))return[];if("@this"===t)return[this.container];if("@parent"===t){var e=this.findClosestComponentHost(this.container.parentElement);return e?[e]:[]}if("@form"===t){var n=this.container.closest('form, holi-form, [component="form-shell"], [role="form-shell"]');return n?[n]:[]}if("@all"===t)return r.Z.collectInstances(document).map(function(t){return null==t?void 0:t.container}).filter(function(t){return t instanceof Element});if("@root"===t)return[document.documentElement];if(t.startsWith("#")){var i=document.querySelector(t);return i?[i]:[]}var o=document.getElementById(t);if(o)return[o];var a=document.querySelector('[data-component-id="'.concat(t,'"], [data-ppr-id="').concat(t,'"]'));if(a)return[a];var s=this.container.closest("[data-component-id], form, body")||document;if(s.querySelectorAll){var l=Array.from(s.querySelectorAll('[id="'.concat(t,'"], [data-component-id="').concat(t,'"], [data-ppr-id="').concat(t,'"]')));if(l.length)return l}return[]}},{key:"findClosestComponentHost",value:function(t){for(var e=t;e instanceof Element;){if(this.isComponentHost(e))return e;e=e.parentElement}return null}},{key:"isComponentHost",value:function(e){return e instanceof Element&&(r.Z.getElementInstances(e).length>0||e.matches(t.componentSelectors))}}])&&b(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function E(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return O(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(O(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,O(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,O(d,"constructor",u),O(u,"constructor",l),l.displayName="GeneratorFunction",O(u,i,"GeneratorFunction"),O(d),O(d,i,"Generator"),O(d,r,function(){return this}),O(d,"toString",function(){return"[object Generator]"}),(E=function(){return{w:o,m:h}})()}function O(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}O=function(t,e,n,r){function o(e,n){O(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},O(t,e,n,r)}function C(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function A(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){C(o,r,i,a,s,"next",t)}function s(t){C(o,r,i,a,s,"throw",t)}a(void 0)})}}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach(function(e){R(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,N(r.key),r)}}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=I(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},L.apply(null,arguments)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}function R(t,e,n){return(e=N(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}g(S,"nextAutoId",1),g(S,"sourceAttrNames",["data-ppr-listen","data-ppr-source"]),g(S,"targetAttrNames",["data-ppr-render","data-ppr-update","render","update"]),g(S,"componentSelectors",["[data-holi-component-class]","[component]","[role]","dropdown","region","tabs","holi-form","holi-input","holi-select"].join(", "));var D=function(){function t(e){var n,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=null,this.container=e,this.children=new Map,this.isDestroyed=!1,this.ppr={},this.pprMeta={},Object.assign(this,a),this.container instanceof Element&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextComponentId++)),this.instanceKey=this.constructor.name.toLowerCase(),this.instanceClassAttr="data-holi-component-class",null===(n=this.container)||void 0===n||null===(i=n.setAttribute)||void 0===i||i.call(n,this.instanceClassAttr,this.constructor.name);var s=null===(o=this.container)||void 0===o?void 0:o[this.instanceKey];if(s&&s!==this)try{delete this.container[this.instanceKey]}catch(t){}Object.defineProperty(this.container,this.instanceKey,{value:this,writable:!1,configurable:!0}),this.stateBridge=new p(this),this.stateBridge.install(),this.pprBridge=new S(this),this.pprBridge.install(),r.Z.registerInstance(this.container,this)}return e=t,n=[{key:"init",value:function(){var e;if(!this.initializing){this.initializing=!0;var n,r,i,o=performance.now();null===(n=t,r=this,e="function"==typeof(i=L(I(1&3?n.prototype:n),"init",r))?function(t){return i.apply(r,t)}:i)||void 0===e||e([]),this.validateStructure(),performance.now()-o>100&&console.warn("Component init slow:",this.constructor.name),this.initializing=!1}}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"runValidator",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.D.validateToken(t,e,T({component:this},n))}},{key:"toCamelCase",value:function(t){return String(t||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()})}},{key:"onStateReflect",value:function(t,e){var n=String(t||"").trim();if(n&&!n.includes(".")&&!this.isReflectingState){this.isReflectingState=!0;try{var r=this.toCamelCase(n),i="".concat(r,"Text");if(r in this&&"function"!=typeof this[r]&&(this[r]=e),i in this&&"function"!=typeof this[i]&&(this[i]=null==e?"":String(e)),this.config&&"object"===j(this.config)&&(Object.prototype.hasOwnProperty.call(this.config,n)?this.config[n]=e:Object.prototype.hasOwnProperty.call(this.config,r)&&(this.config[r]=e)),"function"==typeof this.applyStateUpdate)return void this.applyStateUpdate(r,e);"function"==typeof this.applyLayoutState&&this.applyLayoutState(),"function"==typeof this.applyDialogContent&&this.applyDialogContent(),"function"==typeof this.updateView&&this.updateView()}finally{this.isReflectingState=!1}}}},{key:"render",value:(s=A(E().m(function t(){var e;return E().w(function(t){for(;;)switch(t.n){case 0:if((e=document.getElementById(this.templateId))&&e.content){t.n=1;break}throw new Error('Template "'.concat(this.templateId,'" not found'));case 1:return this.fragment=e.content.cloneNode(!0),this.populateSlots(this.fragment),this.bindAttributes(this.fragment),this.container.appendChild(this.fragment),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"populateSlots",value:function(t){var e=this;t.querySelectorAll("[slot]").forEach(function(t){var n=e.container.querySelector('[slot="'.concat(t.name,'"]'));n&&t.appendChild(n)})}},{key:"bindAttributes",value:function(t){var e=this.getBindingContext();this.applyBindings(t,e)}},{key:"refresh",value:function(){this.refreshChildren()}},{key:"handlePprUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.resolvePprHandler();return e?(e(t),!0):(this.reportMissingPprContract(t),!1)}},{key:"receiveDependencyUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordDependencySnapshot(t),this.isApplyingDependencyUpdate=!0;try{return this.handlePprUpdate(t)}finally{this.isApplyingDependencyUpdate=!1}}},{key:"recordDependencySnapshot",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null==e?void 0:e.sourceElement,r=null==e?void 0:e.snapshot;if(n instanceof Element){this.ppr&&"object"===j(this.ppr)||(this.ppr={});var i=this.resolveDependencyAliases(n);i.forEach(function(e){t.ppr[e]=r}),this.pprMeta={source:i[0]||"",path:(null==e?void 0:e.path)||"",initial:!(null==e||!e.initial)}}}},{key:"resolveDependencyAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[t.id,t.getAttribute("data-ppr-id"),t.getAttribute("data-component-id"),t.getAttribute("component"),t.getAttribute("role"),t.getAttribute("data-holi-component-class"),String(t.tagName||"").toLowerCase()].forEach(function(t){var n=String(t||"").trim(),r=n.toLowerCase();[n,r].forEach(function(t){t&&!e.includes(t)&&e.push(t)})}),e}},{key:"resolvePprHandler",value:function(){for(var e,n=Array.isArray(null===(e=this.constructor)||void 0===e?void 0:e.pprHookNames)?this.constructor.pprHookNames:t.pprHookNames,r=0;r<n.length;r+=1){var i=this[n[r]];if("function"==typeof i)return i.bind(this)}return null}},{key:"getPprMissingHookPolicy",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-ppr-missing-hook-policy"),r="undefined"!=typeof window?window.HoliPprMissingHookPolicy:"",i=String(n||r||"warn").trim().toLowerCase();return"throw"===i||"ignore"===i?i:"warn"}},{key:"reportMissingPprContract",value:function(){var e,n,r,i,o,a,s,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=this.getPprMissingHookPolicy();if("ignore"!==c){var d=(null===(e=this.container)||void 0===e?void 0:e.id)||(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"data-component-id"))||(null===(i=this.constructor)||void 0===i?void 0:i.name)||"component",h=(null==u||null===(o=u.sourceElement)||void 0===o?void 0:o.id)||(null==u||null===(a=u.sourceElement)||void 0===a||null===(s=a.getAttribute)||void 0===s?void 0:s.call(a,"data-component-id"))||(null==u||null===(l=u.sourceComponent)||void 0===l||null===(l=l.constructor)||void 0===l?void 0:l.name)||"unknown-source",f='PPR target "'.concat(d,'" cannot handle updates from "').concat(h,'". Implement one of: ').concat(t.pprHookNames.join(", "));if("throw"===c)throw new Error(f);console.warn(f,{component:this,payload:u})}}},{key:"createChildren",value:(a=A(E().m(function t(){var e;return E().w(function(t){for(;;)switch(t.n){case 0:if((e=this.element||this.container)instanceof Element){t.n=1;break}return t.a(2);case 1:r.Z.initAll(e,{includeRoleSelectors:!1});case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"syncChildren",value:function(){var t=this,e=this.element||this.container;if(e instanceof Element){var n=r.Z.collectInstances(e,!0).filter(function(e){return e&&e!==t&&!e.isDestroyed});this.children.clear(),n.forEach(function(e,n){var r,i,o=e.container,a=(null==o?void 0:o.id)||(null==o||null===(r=o.getAttribute)||void 0===r?void 0:r.call(o,"data-component-id"))||"child-".concat(n),s="".concat((null===(i=e.constructor)||void 0===i?void 0:i.name)||"Component",":").concat(a,":").concat(n);t.children.set(s,e)})}}},{key:"refreshChildren",value:function(){this.syncChildren(),this.children.forEach(function(t){"function"==typeof t.refresh&&t.refresh()})}},{key:"destroy",value:function(){var t,e,n,i,o,a,s;if(null===(t=this.pprBridge)||void 0===t||null===(e=t.uninstall)||void 0===e||e.call(t),null===(n=this.stateBridge)||void 0===n||null===(i=n.uninstall)||void 0===i||i.call(n),this.children.forEach(function(t){return t.destroy()}),this.children.clear(),null===(o=this.element)||void 0===o||o.remove(),this.isDestroyed=!0,this.dispatchEvent("destroy",{component:this}),r.Z.unregisterInstance(this.container,this),(null===(a=this.container)||void 0===a||null===(s=a.getAttribute)||void 0===s?void 0:s.call(a,this.instanceClassAttr))===this.constructor.name&&this.container.removeAttribute(this.instanceClassAttr),this.container&&this.instanceKey&&this.container[this.instanceKey]===this)try{delete this.container[this.instanceKey]}catch(t){}}},{key:"registerChild",value:function(t,e){var n=this;this.children.set(t,e),e.on("destroy",function(){return n.children.delete(t)})}},{key:"on",value:function(t,e){var n;null===(n=this.element)||void 0===n||n.addEventListener(t,e)}},{key:"dispatchEvent",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null===(e=this.element)||void 0===e||e.dispatchEvent(new CustomEvent(t,{detail:n}))}},{key:"validateStructure",value:function(){if(!this.templateId)throw new Error("".concat(this.constructor.name," must define templateId"))}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return T(T(T(T(T({},window.appState||{}),window.pageContext||{}),this),this.state||{}),{},{data:this.data,ppr:this.ppr||{},pprMeta:this.pprMeta||{}},t)}},{key:"getStateSnapshot",value:function(){if(this.stateBridge&&"function"==typeof this.stateBridge.cloneSerializable)return this.stateBridge.cloneSerializable(this.state||{});try{return JSON.parse(JSON.stringify(this.state||{}))}catch(t){return this.state||{}}}},{key:"applyBindings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.processRepeats(t,e),this.processConditionals(t,e),this.processTextInterpolation(t,e),this.processAttributeInterpolation(t,e)}},{key:"processRepeats",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-repeat]")).forEach(function(t){if(t.parentNode){var r=n.extractExpression(t.getAttribute("data-repeat")),i=n.evaluateExpression(r,e),o=Array.isArray(i)?i:[],a=t.getAttribute("data-for")||"item";o.forEach(function(r,i){var o=t.cloneNode(!0);o.removeAttribute("data-repeat"),o.removeAttribute("data-for");var s=n.getBindingContext(T(T({},e),{},R(R(R({},a,r),"item",r),"index",i)));n.applyBindings(o,s),t.parentNode.insertBefore(o,t)}),t.remove()}})}},{key:"processConditionals",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-if], [data-show], [data-open], [visible]")).forEach(function(t){if(t.hasAttribute("data-if")){var r=n.extractExpression(t.getAttribute("data-if"));if(!n.evaluateExpression(r,e))return void t.remove()}if(t.hasAttribute("data-show")){var i=n.extractExpression(t.getAttribute("data-show")),o=!!n.evaluateExpression(i,e);t.hidden=!o}if(t.hasAttribute("visible")){var a=n.extractExpression(t.getAttribute("visible")),s=!!n.evaluateExpression(a,e);t.hidden=!s}if(t.hasAttribute("data-open")){var l=n.extractExpression(t.getAttribute("data-open"));n.evaluateExpression(l,e)?t.setAttribute("open",""):t.removeAttribute("open")}})}},{key:"processTextInterpolation",value:function(t,e){for(var n=this,r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i=[],o=r.nextNode();o;)i.push(o),o=r.nextNode();i.forEach(function(t){var r=t.textContent;if(r&&-1!==r.indexOf("@{")){var i=n.resolveTemplateString(r,e);t.textContent=null==i?"":String(i)}})}},{key:"processAttributeInterpolation",value:function(t,e){var n=this,r=[];t.nodeType===Node.ELEMENT_NODE&&r.push(t),r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.querySelectorAll("*"))),r.forEach(function(t){Array.from(t.attributes).forEach(function(r){if(r.value&&-1!==r.value.indexOf("@{")){var i=n.resolveAttributeValue(r.value,e);n.setBoundAttribute(t,r.name,i)}})})}},{key:"setBoundAttribute",value:function(t,e,n){new Set(["checked","disabled","selected","readonly","required","open","hidden"]).has(e)?n?(t.setAttribute(e,""),e in t&&(t[e]=!0)):(t.removeAttribute(e),e in t&&(t[e]=!1)):"data-slot"!==e?t.setAttribute(e,null==n?"":String(n)):null==n||""===n?t.removeAttribute("slot"):t.setAttribute("slot",String(n))}},{key:"resolveAttributeValue",value:function(t,e){var n=t.match(/^\s*@\{([^}]+)\}\s*$/);return n?this.evaluateExpression(n[1].trim(),e):this.resolveTemplateString(t,e)}},{key:"resolveTemplateString",value:function(t,e){var n=this;return t.replace(/@\{([^}]+)\}/g,function(t,r){var i=n.evaluateExpression(r.trim(),e);return null==i?"":String(i)})}},{key:"extractExpression",value:function(t){if(!t)return"";var e=String(t).trim().match(/^@\{([^}]+)\}$/);return e?e[1].trim():String(t).trim()}},{key:"evaluateExpression",value:function(t,e){if(t){var n=this.normalizeExpression(t);try{var r=window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(r)return new r(e).evaluate(n)}catch(t){}return this.getPathValue(e,n)}}},{key:"normalizeExpression",value:function(t){return String(t).replace(/\s*===\s*/g," eq ").replace(/\s*!==\s*/g," ne ").replace(/\s*>=\s*/g," gteq ").replace(/\s*<=\s*/g," lteq ").replace(/\s*>\s*/g," gt ").replace(/\s*<\s*/g," lt ").replace(/\s*&&\s*/g," and ").replace(/\s*\|\|\s*/g," or ").trim()}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}}],o=[{key:"selector",get:function(){return null}},{key:"library",get:function(){return"default"}},{key:"matchesLibrary",value:function(t,e){var n=t.getAttribute("library");return!n||n===e}},{key:"registerValidator",value:function(t,e){i.D.register(t,e)}},{key:"unregisterValidator",value:function(t){return i.D.unregister(t)}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}}],n&&x(e.prototype,n),o&&x(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,o,a,s}();R(D,"nextComponentId",1),R(D,"pprHookNames",["refreshPpr","refresh","updateView"]),"undefined"!=typeof window&&(window.Component=D,i.D.enableAutoBind())},40(t,e,n){"use strict";n.r(e),n.d(e,{DataGrid:()=>j});var r=n(812),i=n(696),o=n(62),a=n(76);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return f(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,f(d,"constructor",u),f(u,"constructor",l),l.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(d),f(d,i,"Generator"),f(d,r,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,s,"next",t)}function s(t){p(o,r,i,a,s,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var j=function(t){function e(t){var n,r,o,a,s,l,u,c,d,h,f,p,v,y,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var w=e.normalizeArgs(t,b);return(y=g(this,e,[w.container,w.config])).templateId=e.templateId,y.parent=w.parent,y.textProvider=w.textProvider,y.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=y.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=y.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=y.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:y.resolveMode(y.container),pageSize:Number(null===(a=y.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||24,infiniteChunkSize:Number(null===(s=y.container)||void 0===s?void 0:s.getAttribute("data-infinite-chunk"))||24,titleField:(null===(l=y.container)||void 0===l?void 0:l.getAttribute("data-title-field"))||null,iconField:(null===(u=y.container)||void 0===u?void 0:u.getAttribute("data-icon-field"))||null,avatarField:(null===(c=y.container)||void 0===c?void 0:c.getAttribute("data-avatar-field"))||null,mandatoryFields:y.parseFieldListAttr("data-mandatory-fields"),priorityFields:y.parseFieldListAttr("data-priority-fields"),readonlyFields:y.parseFieldListAttr("data-readonly-fields"),fieldMetadata:y.parseMetadataAttr("data-field-metadata"),idField:String((null===(d=y.container)||void 0===d?void 0:d.getAttribute("data-id-field"))||"id"),detailsSource:(null===(h=y.container)||void 0===h?void 0:h.getAttribute("data-details-source"))||(null===(f=y.container)||void 0===f?void 0:f.getAttribute("details-source"))||"",detailsCacheEnabled:y.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:y.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:y.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(p=y.container)||void 0===p?void 0:p.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(v=y.container)||void 0===v?void 0:v.getAttribute("data-update-method"))||"PUT").toUpperCase(),rows:[],headers:[],visibleFields:[]},w.config),y.config.endpointTemplate=y.config.endpoint,y.config.requestParams=y.parseObjectAttr("data-request-params"),y.rawRows=[],y.processedRows=[],y.remoteLoaded=!1,y.loadingMore=!1,y.windowScrollHandler=null,y.localCardPool=[],y.localCardsVersion=0,y.localCardsRenderedVersion=-1,y.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleFields:[],fieldChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},y.mandatoryFieldsResolved=[],y.priorityFieldsResolved=[],y.detailsDialog=new i.q,y.detailsCache=new Map,!1!==w.autoInit&&y.init(),y}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataGrid requires a container element")}},{key:"init",value:(I=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"render",value:(L=v(h().m(function t(){var n,r,i,s,l,u,c,d,f,p,v,y;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datagrid"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datagrid-content"),this.cardsHost=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="cards"]'),this.fieldChooser=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="field-chooser"]'),this.fieldChooserList=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="field-chooser-list"]'),this.resultCount=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="result-count"]'),this.pageInfo=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="page-info"]'),this.paginationControls=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="pagination-controls"]'),this.sortFieldSelect=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-action="sort-field"]'),this.sortDirectionButton=null===(f=this.element)||void 0===f?void 0:f.querySelector('[data-action="sort-direction"]'),this.requestStatus=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(y=this.element)||void 0===y?void 0:y.querySelector('[data-action="retry-load"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datagrid",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),o=null==i||null===(r=i.dataset)||void 0===r?void 0:r.action;if(o){if("toggle-fields"===o)return this.state.fieldChooserOpen=!this.state.fieldChooserOpen,void this.renderFieldChooser();if("add-row"!==o)if("view-row"!==o&&"edit-row"!==o){if("sort-direction"===o)return this.state.sortDir="asc"===this.state.sortDir?"desc":"asc",this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()));"prev-page"!==o?"next-page"!==o?"retry-load"===o&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1)}else{var a,s=Number(null==i||null===(a=i.dataset)||void 0===a?void 0:a.rowIndex);if(Number.isNaN(s)||s<0)return;var l=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(s>=l.length)return;var u=l[s];this.openDetailsDialog("edit-row"===o?"edit":"view",u)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,s=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-field"===o&&a)return this.setFieldVisibility(a,!!i.checked),void this.updateView();if("sort-field"===o){var l=String(i.value||"").trim();return this.state.sortField=l||null,this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}if(s){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[s]=u:delete this.state.filters[s],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"loadData",value:(x=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.hydrateSortControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(h().m(function t(){var e,n,r,i,o,a,s,l=arguments;return h().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=l.length>0&&void 0!==l[0]&&l[0],n=l.length>1&&void 0!==l[1]&&l[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2,!0);case 1:if(this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return t.p=2,t.n=3,fetch(r);case 3:if((o=t.v).ok){t.n=4;break}throw new Error("HTTP ".concat(o.status));case 4:return t.n=5,o.json();case 5:i=t.v,t.n=7;break;case 6:return t.p=6,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 7:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,s=Array.isArray(i.headers)?i.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(a),this.state.headers=s,this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,0===this.state.visibleFields.length&&(Array.isArray(i.visibleFields)&&i.visibleFields.length?this.state.visibleFields=u(i.visibleFields):this.state.visibleFields=s.filter(function(t){return t.visible}).map(function(t){return t.field})),this.applyChooserPoliciesForFields(),!this.config.serverSide){t.n=8;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 8:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[2,6]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(P=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(this.rawRows),this.state.totalPages=1,this.state.totalCount=this.rawRows.length,Array.isArray(this.config.visibleFields)&&this.config.visibleFields.length?this.state.visibleFields=u(this.config.visibleFields):this.state.visibleFields=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field}),this.applyChooserPoliciesForFields();case 1:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=l(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===s(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0}}):[]}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalCardsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||24),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e;return this.state.rows=t.slice(r,r+e),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(r+e,t.length))}if("infinite"===this.config.mode){var i=Math.max(1,Number(this.config.infiniteChunkSize)||24),o=this.state.page*i;return this.state.rows=t.slice(0,o),this.state.hasMore=o<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(o,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=l(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),s=Number(o);return Number.isNaN(a)||Number.isNaN(s)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-s)*n})}},{key:"setFieldVisibility",value:function(t,e){if(e)this.state.visibleFields.includes(t)||this.state.visibleFields.push(t);else{if(this.isMandatoryField(t))return;this.state.visibleFields=this.state.visibleFields.filter(function(e){return e!==t})}this.state.visibleFields=this.getOrderedVisibleFields(this.state.visibleFields),this.bumpLocalCardsVersion()}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"hydrateSortControls",value:function(){var t=this;this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.options.length>1||this.state.headers.forEach(function(e){var n=document.createElement("option");n.value=e.field,n.textContent=e.label||e.field,t.sortFieldSelect.appendChild(n)}))}},{key:"updateView",value:function(){this.renderCards(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderCards(),this.renderFieldChooser(),this.renderSortControls(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderCards",value:function(){var t=this;if(this.cardsHost)if(this.isLocalDomReuseEnabled())this.renderCardsWithLocalPool();else{if(this.cardsHost.replaceChildren(),!this.state.rows.length){var e=document.createElement("div");return e.className="datagrid-empty",e.textContent="No matching records",void this.cardsHost.appendChild(e)}this.state.rows.forEach(function(e,n){t.cardsHost.appendChild(t.createCard(e,n))})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalCardsVersion",value:function(){this.localCardsVersion+=1}},{key:"renderCardsWithLocalPool",value:function(){if(this.cardsHost){if(!this.processedRows.length){this.localCardPool=[],this.localCardsRenderedVersion=this.localCardsVersion,this.cardsHost.replaceChildren();var t=document.createElement("div");return t.className="datagrid-empty",t.textContent="No matching records",void this.cardsHost.appendChild(t)}this.localCardsRenderedVersion!==this.localCardsVersion?this.rebuildLocalCardPool():this.applyLocalCardVisibility()}}},{key:"rebuildLocalCardPool",value:function(){var t=this;this.cardsHost&&(this.cardsHost.replaceChildren(),this.localCardPool=[],this.processedRows.forEach(function(e,n){var r=t.createCard(e,n);t.localCardPool.push(r),t.cardsHost.appendChild(r)}),this.localCardsRenderedVersion=this.localCardsVersion,this.applyLocalCardVisibility())}},{key:"applyLocalCardVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);this.localCardPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"createCard",value:function(t,e){var n=document.createElement("article");n.className="datagrid-card";var r=this.resolveProminentFields(t),i=r.titleField&&this.state.visibleFields.includes(r.titleField),o=r.iconField&&this.state.visibleFields.includes(r.iconField),a=r.avatarField&&this.state.visibleFields.includes(r.avatarField);if(i||o||a){var s=document.createElement("header");if(s.className="datagrid-card-head",a){var l=document.createElement("img");l.className="datagrid-card-avatar",l.src=String(t[r.avatarField]||""),l.alt=i?String(t[r.titleField]||""):"Avatar",s.appendChild(l)}else if(o){var u=document.createElement("span");u.className="datagrid-card-icon",u.textContent=String(t[r.iconField]||""),s.appendChild(u)}if(i){var c=document.createElement("h3");c.className="datagrid-card-title",c.textContent=String(t[r.titleField]||""),s.appendChild(c)}n.appendChild(s)}var d=document.createElement("div");d.className="datagrid-card-body";var h=this.buildFieldLabelMap();this.state.visibleFields.forEach(function(e){if(e!==r.titleField&&e!==r.iconField&&e!==r.avatarField){var n=document.createElement("div");n.className="datagrid-field";var i=document.createElement("span");i.className="datagrid-field-label",i.textContent=h.get(e)||e;var o=document.createElement("span");o.className="datagrid-field-value",o.textContent=null==(null==t?void 0:t[e])?"":String(t[e]),n.append(i,o),d.appendChild(n)}}),n.appendChild(d);var f=document.createElement("footer");f.className="datagrid-card-actions";var p=document.createElement("button");p.type="button",p.dataset.action="view-row",p.dataset.rowIndex=String(e),p.textContent="View",f.appendChild(p);var v=document.createElement("button");return v.type="button",v.dataset.action="edit-row",v.dataset.rowIndex=String(e),v.textContent="Edit",f.appendChild(v),n.appendChild(f),n}},{key:"buildFieldLabelMap",value:function(){var t=new Map;return this.state.headers.forEach(function(e){t.set(e.field,e.label||e.field)}),t}},{key:"resolveProminentFields",value:function(t){var e=this.state.headers.map(function(t){return t.field}),n=function(t,n){return t&&e.includes(t)?t:n.find(function(t){return e.includes(t)})||null},r=n(this.config.titleField,["title","name","customer","orderNo","id"]),i=n(this.config.iconField,["icon"]),o=n(this.config.avatarField,["avatar","avatarUrl","photo","image"]);return o&&null==(null==t?void 0:t[o])?{titleField:r,iconField:i,avatarField:null}:{titleField:r,iconField:i,avatarField:o}}},{key:"renderFieldChooser",value:function(){var t=this;this.fieldChooser&&(this.fieldChooser.hidden=!this.state.fieldChooserOpen),this.fieldChooserList&&(this.fieldChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datagrid-field-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-field",r.dataset.field=e.field,r.checked=t.state.visibleFields.includes(e.field),r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.append(r,i),t.fieldChooserList.appendChild(n)}))}},{key:"renderSortControls",value:function(){this.sortDirectionButton&&(this.sortDirectionButton.textContent="asc"===this.state.sortDir?"Asc":"Desc"),this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.value=this.state.sortField||"")}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(j=v(h().m(function t(e){var n;return h().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datagrid-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"500px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderCards(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(h().m(function t(e){var n,r,i,o,a=this,s=arguments;return h().w(function(t){for(;;)switch(t.n){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(h().m(function t(e,n){var r;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(h().m(function t(e,n){var r,i,o,a,l,u,c,d,f,p,v,y;return h().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===s(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return l=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),l=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(f=t.v,p=this.extractDetailsPayload(f)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,l&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===s(t)?t.row&&"object"===s(t.row)?this.cloneRow(t.row):t.record&&"object"===s(t.record)?this.cloneRow(t.record):t.data&&"object"===s(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===s(t)?t:{},r=e&&"object"===s(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.fieldMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var l=i[a]&&"object"===s(i[a])?i[a]:{};n.push({name:a,label:l.label||o.label||a,type:l.formFieldType||l.type||e.inferFieldType(null==t?void 0:t[a]),required:l.required,optional:l.optional,readonly:l.readonly,constraints:l.constraints&&"object"===s(l.constraints)?l.constraints:{},lov:l.lov||l.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===s(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===s(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==s(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===s(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(h().m(function t(e,n){var r,i,o,a,l,u;return h().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return l=t.v,u=null!=l&&l.row&&"object"===s(l.row)?l.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(f=v(h().m(function t(e,n){var r,i,o=this;return h().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return f.apply(this,arguments)})},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===s(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===s(o)?o:{}}catch(t){return{}}if(i&&"object"===s(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===s(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=l(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=t.extractExpression(a),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForFields",value:function(){var t=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,t),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,t);var e=Array.isArray(this.state.visibleFields)?this.state.visibleFields.filter(function(e){return t.includes(e)}):[];e.length||(e=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field})),this.mandatoryFieldsResolved.forEach(function(t){e.includes(t)||e.push(t)}),this.state.visibleFields=this.getOrderedVisibleFields(e)}},{key:"getOrderedVisibleFields",value:function(t){var e=new Set(this.state.headers.map(function(t){return t.field})),n=[],r=new Set;if(t.forEach(function(t){e.has(t)&&!r.has(t)&&(r.add(t),n.push(t))}),!this.priorityFieldsResolved.length)return n;var i=new Map;return this.priorityFieldsResolved.forEach(function(t,e){i.set(t,e)}),[].concat(n).sort(function(t,e){var n=i.has(t)?i.get(t):Number.MAX_SAFE_INTEGER,r=i.has(e)?i.get(e):Number.MAX_SAFE_INTEGER;return n!==r?n-r:0})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleFields:u(this.state.visibleFields||[])}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleFields"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===s(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===s(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleFields)&&this.state.headers.length){var l=new Set(t.visibleFields.map(function(t){return String(t)})),u=this.state.headers.map(function(t){return t.field}).filter(function(t){return e.isMandatoryField(t)||l.has(t)});u.length||(u=this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})),this.state.visibleFields=this.getOrderedVisibleFields(u),n=!0}if(Number.isFinite(Number(t.page))){var c=Math.max(1,Number(t.page));c!==this.state.page&&(this.state.page=c,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}}],c=[{key:"selector",get:function(){return"datagrid"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datagrid"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,f,p,y,w,k,E,A,j,P,T,x,L,I}(r.Component);C(j,"templateId","datagrid-template"),"undefined"!=typeof window&&(window.DataGrid=j)},994(t,e,n){"use strict";n.r(e),n.d(e,{DataTable:()=>j});var r=n(812),i=n(696),o=n(62),a=n(76);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return f(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,f(d,"constructor",u),f(u,"constructor",l),l.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(d),f(d,i,"Generator"),f(d,r,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,s,"next",t)}function s(t){p(o,r,i,a,s,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var j=function(t){function e(t){var n,r,o,a,s,l,u,c,d,h,f,p,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var y=e.normalizeArgs(t,v);return(p=g(this,e,[y.container,y.config])).templateId=e.templateId,p.parent=y.parent,p.textProvider=y.textProvider,p.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=p.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=p.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=p.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:p.resolveMode(p.container),pageSize:Number(null===(a=p.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||25,infiniteChunkSize:Number(null===(s=p.container)||void 0===s?void 0:s.getAttribute("data-infinite-chunk"))||25,mandatoryFields:p.parseFieldListAttr("data-mandatory-fields"),priorityFields:p.parseFieldListAttr("data-priority-fields"),readonlyFields:p.parseFieldListAttr("data-readonly-fields"),columnMetadata:p.parseMetadataAttr("data-column-metadata"),idField:String((null===(l=p.container)||void 0===l?void 0:l.getAttribute("data-id-field"))||"id"),detailsSource:(null===(u=p.container)||void 0===u?void 0:u.getAttribute("data-details-source"))||(null===(c=p.container)||void 0===c?void 0:c.getAttribute("details-source"))||"",detailsCacheEnabled:p.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:p.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:p.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(d=p.container)||void 0===d?void 0:d.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(h=p.container)||void 0===h?void 0:h.getAttribute("data-update-method"))||"PUT").toUpperCase(),renderMode:p.normalizeRenderMode(null===(f=p.container)||void 0===f?void 0:f.getAttribute("data-render-mode")),rows:[],headers:[]},y.config),p.config.endpointTemplate=p.config.endpoint,p.config.requestParams=p.parseObjectAttr("data-request-params"),p.rawRows=[],p.processedRows=[],p.remoteLoaded=!1,p.loadingMore=!1,p.windowScrollHandler=null,p.pinnedColumns={left:[],right:[]},p.onPinnedResize=null,p.localRowPool=[],p.localRowsVersion=0,p.localRowsRenderedVersion=-1,p.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleColumns:[],columnChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},p.mandatoryFieldsResolved=[],p.priorityFieldsResolved=[],p.detailsDialog=new i.q,p.detailsCache=new Map,!1!==y.autoInit&&p.init(),p}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataTable requires a container element")}},{key:"init",value:(R=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return R.apply(this,arguments)})},{key:"render",value:(I=v(h().m(function t(){var n,r,i,s,l,u,c,d,f,p,v,y,m,b,g,w=this;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datatable"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datatable-content"),this.thead=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="thead"]'),this.tbody=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="tbody"]'),this.columnChooser=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="column-chooser"]'),this.columnChooserList=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="column-chooser-list"]'),this.resultCount=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="result-count"]'),this.pageInfo=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="page-info"]'),this.paginationControls=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-role="pagination-controls"]'),this.requestStatus=null===(f=this.element)||void 0===f?void 0:f.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-action="retry-load"]'),this.headerCellTemplate=null===(y=this.element)||void 0===y?void 0:y.querySelector('template[data-role="header-cell-template"]'),this.rowCellTemplate=null===(m=this.element)||void 0===m?void 0:m.querySelector('template[data-role="row-cell-template"]'),this.actionsCellTemplate=null===(b=this.element)||void 0===b?void 0:b.querySelector('template[data-role="actions-cell-template"]'),this.emptyRowTemplate=null===(g=this.element)||void 0===g?void 0:g.querySelector('template[data-role="empty-row-template"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datatable",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),this.onPinnedResize=function(){return w.applyPinnedStyles()},window.addEventListener("resize",this.onPinnedResize),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i,o=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),a=null==o||null===(r=o.dataset)||void 0===r?void 0:r.action,s=null==o||null===(i=o.dataset)||void 0===i?void 0:i.field;if("sort"===a&&s)this.sort(s);else{if("toggle-columns"===a)return this.state.columnChooserOpen=!this.state.columnChooserOpen,void this.renderColumnChooser();if("add-row"!==a)if("view-row"!==a&&"edit-row"!==a)"prev-page"!==a?"next-page"!==a?"retry-load"===a&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1);else{var l,u=Number(null==o||null===(l=o.dataset)||void 0===l?void 0:l.rowIndex);if(Number.isNaN(u)||u<0)return;var c=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(u>=c.length)return;var d=c[u];this.openDetailsDialog("edit-row"===a?"edit":"view",d)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,s=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-column"===o&&a){var l=!!i.checked;return this.setColumnVisibility(a,l),void this.updateView()}if(s){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[s]=u:delete this.state.filters[s],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"sort",value:(L=v(h().m(function t(e){return h().w(function(t){for(;;)switch(t.n){case 0:if(this.state.sortField===e?this.state.sortDir="asc"===this.state.sortDir?"desc":"asc":(this.state.sortField=e,this.state.sortDir="asc"),this.resetViewport(),!this.config.serverSide){t.n=2;break}return t.n=1,this.loadRemote(!0,!1);case 1:t.n=3;break;case 2:this.applyClientProcessing();case 3:this.updateView();case 4:return t.a(2)}},t,this)})),function(t){return L.apply(this,arguments)})},{key:"loadData",value:(x=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(h().m(function t(){var e,n,r,i,o,a,s,l=this,c=arguments;return h().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=c.length>0&&void 0!==c[0]&&c[0],n=c.length>1&&void 0!==c[1]&&c[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2);case 1:if(r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.p=3,t.n=4,fetch(r);case 4:if((o=t.v).ok){t.n=5;break}throw new Error("HTTP ".concat(o.status));case 5:return t.n=6,o.json();case 6:i=t.v,t.n=8;break;case 7:return t.p=7,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 8:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,s=Array.isArray(i.headers)?i.headers.map(function(t){return l.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(a),this.state.headers=s,this.applyChooserPoliciesForColumns(),this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,!this.config.serverSide){t.n=9;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 9:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[3,7]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(P=v(h().m(function t(){var e=this;return h().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return e.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(this.rawRows),this.applyChooserPoliciesForColumns(),this.state.totalPages=1,this.state.totalCount=this.rawRows.length;case 1:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=l(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===s(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0,pinned:null}}):[]}},{key:"normalizeRenderMode",value:function(t){return"template-clone"===String(t||"").trim().toLowerCase()?"template-clone":"programmatic"}},{key:"normalizeHeaderDefinition",value:function(t){var e,n;if(!t||"object"!==s(t))return null;var r=String(null!==(e=null!==(n=t.field)&&void 0!==n?n:t.key)&&void 0!==e?e:"").trim();return r?m(m({},t),{},{field:r,label:t.label||r,visible:!1!==t.visible,pinned:this.normalizePinnedSide(t.pinned)}):null}},{key:"normalizePinnedSide",value:function(t){if(null==t)return null;var e=String(t).trim().toLowerCase();return"left"===e||"right"===e?e:null}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalRowsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||25),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e,i=r+e;return this.state.rows=t.slice(r,i),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(i,t.length))}if("infinite"===this.config.mode){var o=Math.max(1,Number(this.config.infiniteChunkSize)||25),a=this.state.page*o;return this.state.rows=t.slice(0,a),this.state.hasMore=a<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(a,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=l(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),s=Number(o);return Number.isNaN(a)||Number.isNaN(s)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-s)*n})}},{key:"setColumnVisibility",value:function(t,e){var n=this.state.headers.find(function(e){return e.field===t});n&&(!e&&this.isMandatoryField(t)||(n.visible=e,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion()))}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"updateView",value:function(){this.renderHeaders(),this.renderRows(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderRows(),this.renderColumnChooser(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.applyPinnedStyles(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderHeaders",value:function(){var t=this;if(this.thead)if(this.thead.replaceChildren(),"template-clone"===this.config.renderMode&&this.headerCellTemplate)this.renderHeadersFromTemplates();else{var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=document.createElement("th");r.dataset.field=n.field;var i=document.createElement("button");i.type="button",i.dataset.action="sort",i.dataset.field=n.field,i.textContent=t.getHeaderLabel(n),r.appendChild(i),e.appendChild(r)});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"renderHeadersFromTemplates",value:function(){var t=this;if(this.thead){var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=t.cloneFirstElementFromTemplate(t.headerCellTemplate);if(r instanceof HTMLTableCellElement){r.dataset.field=n.field;var i=r.querySelector('[data-action="sort"]');i instanceof HTMLButtonElement&&(i.dataset.field=n.field);var o=r.querySelector('[data-role="header-label"]');o?o.textContent=t.getHeaderLabel(n):r.textContent=t.getHeaderLabel(n),e.appendChild(r)}});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"getHeaderLabel",value:function(t){var e=t.label||t.field;return this.state.sortField!==t.field?e:"".concat(e," ").concat("asc"===this.state.sortDir?"^":"v")}},{key:"renderRows",value:function(){var t=this;if(this.tbody)if(this.isLocalDomReuseEnabled())this.renderRowsWithLocalPool();else{if(this.tbody.replaceChildren(),!this.state.rows.length){if("template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var e=document.createElement("tr"),n=document.createElement("td");return n.colSpan=Math.max(this.state.visibleColumns.length+1,1),n.textContent="No matching records",e.appendChild(n),void this.tbody.appendChild(e)}this.state.rows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)});var i=t.createActionsCell(n);r.appendChild(i),t.tbody.appendChild(r)})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalRowsVersion",value:function(){this.localRowsVersion+=1}},{key:"renderRowsWithLocalPool",value:function(){if(this.tbody){if(!this.processedRows.length){if(this.localRowPool=[],this.localRowsRenderedVersion=this.localRowsVersion,this.tbody.replaceChildren(),"template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var t=document.createElement("tr"),e=document.createElement("td");return e.colSpan=Math.max(this.state.visibleColumns.length+1,1),e.textContent="No matching records",t.appendChild(e),void this.tbody.appendChild(t)}this.localRowsRenderedVersion!==this.localRowsVersion?this.rebuildLocalRowPool():this.applyLocalRowVisibility()}}},{key:"rebuildLocalRowPool",value:function(){var t=this;this.tbody&&(this.tbody.replaceChildren(),this.localRowPool=[],this.processedRows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)}),r.appendChild(t.createActionsCell(n)),t.localRowPool.push(r),t.tbody.appendChild(r)}),this.localRowsRenderedVersion=this.localRowsVersion,this.applyLocalRowVisibility())}},{key:"applyLocalRowVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);if("infinite"!==this.config.mode)this.localRowPool.forEach(function(n,r){n.hidden=r<t||r>=e});else{var n=Math.max(0,e-t);this.localRowPool.forEach(function(t,e){t.hidden=e>=n})}}},{key:"renderEmptyRowFromTemplate",value:function(){var t,e=this.cloneFirstElementFromTemplate(this.emptyRowTemplate);if(e instanceof HTMLTableRowElement){var n=e.querySelector('[data-role="empty-cell"]');n instanceof HTMLTableCellElement&&(n.colSpan=Math.max(this.state.visibleColumns.length+1,1)),null===(t=this.tbody)||void 0===t||t.appendChild(e)}}},{key:"renderRowCellsFromTemplate",value:function(t,e){var n=this;this.state.visibleColumns.forEach(function(r){var i=n.cloneFirstElementFromTemplate(n.rowCellTemplate);if(i instanceof HTMLTableCellElement){i.dataset.field=r.field;var o=null==e?void 0:e[r.field];i.textContent=null==o?"":String(o),t.appendChild(i)}})}},{key:"createActionsCell",value:function(t){var e=this.cloneFirstElementFromTemplate(this.actionsCellTemplate);if(e instanceof HTMLTableCellElement)return e.classList.add("datatable-actions-cell"),e.querySelectorAll('[data-action][data-role="row-action"]').forEach(function(e){e instanceof HTMLButtonElement&&(e.dataset.rowIndex=String(t))}),e;var n=document.createElement("td");n.className="datatable-actions-cell";var r=document.createElement("button");r.type="button",r.dataset.action="view-row",r.dataset.rowIndex=String(t),r.textContent="View",n.appendChild(r);var i=document.createElement("button");return i.type="button",i.dataset.action="edit-row",i.dataset.rowIndex=String(t),i.textContent="Edit",n.appendChild(i),n}},{key:"cloneFirstElementFromTemplate",value:function(t){return t instanceof HTMLTemplateElement&&t.content.cloneNode(!0).firstElementChild||null}},{key:"renderColumnChooser",value:function(){var t=this;this.columnChooser&&(this.columnChooser.hidden=!this.state.columnChooserOpen),this.columnChooserList&&(this.columnChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datatable-column-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-column",r.dataset.field=e.field,r.checked=!1!==e.visible,r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.appendChild(r),n.appendChild(i),t.columnChooserList.appendChild(n)}))}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(j=v(h().m(function t(e){var n;return h().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datatable-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"420px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(h().m(function t(e){var n,r,i,o,a=this,s=arguments;return h().w(function(t){for(;;)switch(t.n){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(h().m(function t(e,n){var r;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(h().m(function t(e,n){var r,i,o,a,l,u,c,d,f,p,v,y;return h().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===s(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return l=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),l=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(f=t.v,p=this.extractDetailsPayload(f)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,l&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===s(t)?t.row&&"object"===s(t.row)?this.cloneRow(t.row):t.record&&"object"===s(t.record)?this.cloneRow(t.record):t.data&&"object"===s(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===s(t)?t:{},r=e&&"object"===s(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.columnMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var l=i[a]&&"object"===s(i[a])?i[a]:{};n.push({name:a,label:l.label||o.label||a,type:l.formFieldType||l.type||e.inferFieldType(null==t?void 0:t[a]),required:l.required,optional:l.optional,readonly:l.readonly,constraints:l.constraints&&"object"===s(l.constraints)?l.constraints:{},lov:l.lov||l.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===s(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===s(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==s(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===s(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(h().m(function t(e,n){var r,i,o,a,l,u;return h().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return l=t.v,u=null!=l&&l.row&&"object"===s(l.row)?l.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(f=v(h().m(function t(e,n){var r,i,o=this;return h().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return f.apply(this,arguments)})},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.onPinnedResize&&(window.removeEventListener("resize",this.onPinnedResize),this.onPinnedResize=null),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(h().m(function t(){return h().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===s(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===s(o)?o:{}}catch(t){return{}}if(i&&"object"===s(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===s(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=l(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=t.extractExpression(a),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForColumns",value:function(){var t=this,e=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,e),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,e),this.state.headers.forEach(function(e){t.mandatoryFieldsResolved.includes(e.field)&&(e.visible=!0)}),this.state.visibleColumns=this.getOrderedVisibleColumns()}},{key:"getOrderedVisibleColumns",value:function(){var t=this,e=this.state.headers.map(function(t,e){return{header:t,index:e}}).filter(function(t){return t.header.visible});if(!this.priorityFieldsResolved.length&&!e.some(function(e){return t.resolvePinnedSide(e.header)}))return e.map(function(t){return t.header});var n=new Map;return this.priorityFieldsResolved.forEach(function(t,e){n.set(t,e)}),u(e).sort(function(e,r){var i=t.resolvePinnedSide(e.header)||"",o=t.resolvePinnedSide(r.header)||"",a="left"===i?0:"right"===i?2:1,s="left"===o?0:"right"===o?2:1;if(a!==s)return a-s;var l=n.has(e.header.field)?n.get(e.header.field):Number.MAX_SAFE_INTEGER,u=n.has(r.header.field)?n.get(r.header.field):Number.MAX_SAFE_INTEGER;return l!==u?l-u:e.index-r.index}).map(function(t){return t.header})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"resolvePinnedSide",value:function(t){var e;if(!t||"object"!==s(t))return null;var n=this.normalizePinnedSide(t.pinned);if(n)return n;var r=null===(e=this.config.columnMetadata)||void 0===e?void 0:e[t.field];return this.normalizePinnedSide(null==r?void 0:r.pinned)}},{key:"initPinnedColumns",value:function(){var t=this,e={left:[],right:[]};this.state.visibleColumns.forEach(function(n,r){var i=t.resolvePinnedSide(n);i&&e[i].push(r)}),this.pinnedColumns=e}},{key:"applyPinnedStyles",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".datatable-table");if(n){this.initPinnedColumns();var r=this.pinnedColumns.left.length>0||this.pinnedColumns.right.length>0;if(n.classList.toggle("datatable-has-pinned-columns",r),r){var i=0;this.pinnedColumns.left.forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-left"),t.style.left="".concat(i,"px")}),i+=r});var o=0;u(this.pinnedColumns.right).reverse().forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-right"),t.style.right="".concat(o,"px")}),o+=r})}}}},{key:"getColumnCells",value:function(t,e){return Array.from(t.querySelectorAll("tr > :nth-child(".concat(e+1,")")))}},{key:"getColumnWidth",value:function(t,e){var n,r,i=null===(n=this.thead)||void 0===n?void 0:n.querySelector("tr > :nth-child(".concat(e+1,")"));if(i)return i.getBoundingClientRect().width;var o=null===(r=this.tbody)||void 0===r?void 0:r.querySelector("tr > :nth-child(".concat(e+1,")"));if(o)return o.getBoundingClientRect().width;var a=t.querySelector("tr > :nth-child(".concat(e+1,")"));return a?a.getBoundingClientRect().width:0}},{key:"resolveHeaderByReference",value:function(t){return"number"==typeof t&&Number.isInteger(t)?this.state.headers[t]||null:"string"==typeof t&&this.state.headers.find(function(e){return e.field===t})||null}},{key:"pinColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left",n=this.resolveHeaderByReference(t),r=this.normalizePinnedSide(e);return!(!n||!r||(n.pinned=r,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),0))}},{key:"unpinColumn",value:function(t){var e=this.resolveHeaderByReference(t);return!!e&&(e.pinned=null,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),!0)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleColumns:this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleColumns"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===s(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===s(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleColumns)&&this.state.headers.length){var l=new Set(t.visibleColumns.map(function(t){return String(t)}));this.state.headers.forEach(function(t){t.visible=!!e.isMandatoryField(t.field)||l.has(t.field)}),this.state.visibleColumns=this.getOrderedVisibleColumns(),n=!0}if(Number.isFinite(Number(t.page))){var u=Math.max(1,Number(t.page));u!==this.state.page&&(this.state.page=u,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}}],c=[{key:"selector",get:function(){return"datatable"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datatable"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,f,p,y,w,k,E,A,j,P,T,x,L,I,R}(r.Component);C(j,"templateId","datatable-template"),"undefined"!=typeof window&&(window.DataTable=j)},704(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,s(f,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(f),s(f,i,"Generator"),s(f,r,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function f(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DialogComponent:()=>S});var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.id=n.container.getAttribute("id")||n.container.getAttribute("dialog-id")||"",n.size=n.resolveSize(n.container.getAttribute("size")||n.container.getAttribute("mode")||"medium"),n.titleText=n.container.getAttribute("title")||n.container.getAttribute("data-title")||"",n.footerMessage=n.container.getAttribute("footer-message")||n.container.getAttribute("data-footer-message")||"",n.closeOnBackdrop=!n.container.hasAttribute("no-backdrop-close"),n.returnValue="",n.isOpen=!1,n.useNative="undefined"!=typeof window&&void 0!==window.HTMLDialogElement&&!n.container.hasAttribute("no-native"),n.slotted=null,n.initialOpen=n.container.hasAttribute("open"),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"resolveSize",value:function(t){var e=String(t||"medium").trim().toLowerCase();return["mini","small","medium","large","mega"].includes(e)?e:"medium"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-dialog-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(l=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.initialOpen&&this.open();case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"render",value:(s=u(a().m(function t(){var n,r,i,o,s,l,u,c,d,h,p;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-dialog-root"),this.nativeDialog=null===(n=this.root)||void 0===n?void 0:n.querySelector(".holi-dialog-native"),this.fallback=null===(r=this.root)||void 0===r?void 0:r.querySelector('[data-role="fallback"]'),this.overlay=null===(i=this.root)||void 0===i?void 0:i.querySelector(".holi-dialog-overlay"),this.nativeHeader=null===(o=this.root)||void 0===o?void 0:o.querySelector('[data-role="header"]'),this.nativeTitle=null===(s=this.root)||void 0===s?void 0:s.querySelector('[data-role="title"]'),this.nativeBody=null===(l=this.root)||void 0===l?void 0:l.querySelector('[data-role="body"]'),this.nativeFooter=null===(u=this.root)||void 0===u?void 0:u.querySelector('[data-role="footer"]'),this.fallbackHeader=null===(c=this.root)||void 0===c?void 0:c.querySelector('[data-role="fallback-header"]'),this.fallbackTitle=null===(d=this.root)||void 0===d?void 0:d.querySelector('[data-role="fallback-title"]'),this.fallbackBody=null===(h=this.root)||void 0===h?void 0:h.querySelector('[data-role="fallback-body"]'),this.fallbackFooter=null===(p=this.root)||void 0===p?void 0:p.querySelector('[data-role="fallback-footer"]'),this.nativeDialog&&(this.useNative?(this.nativeDialog.hidden=!1,this.nativeDialog.style.display=""):(this.nativeDialog.hidden=!0,this.nativeDialog.style.display="none",this.nativeDialog.removeAttribute("open"))),this.applyDialogContent(),this.applyLayoutState();case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"applyDialogContent",value:function(){if(this.slotted){var t,e,n,r,o,a,s,l,u,c,d,h,f=this.slotted,p=f.header,v=f.footer,y=f.bodyNodes,m=!!this.useNative;m?(null===(t=this.nativeBody)||void 0===t||t.replaceChildren.apply(t,i(y)),null===(e=this.fallbackBody)||void 0===e||e.replaceChildren()):(null===(n=this.fallbackBody)||void 0===n||n.replaceChildren.apply(n,i(y)),null===(r=this.nativeBody)||void 0===r||r.replaceChildren()),p?m?(null===(o=this.nativeHeader)||void 0===o||o.replaceChildren(p),null===(a=this.fallbackHeader)||void 0===a||a.replaceChildren()):(null===(s=this.fallbackHeader)||void 0===s||s.replaceChildren(p),null===(l=this.nativeHeader)||void 0===l||l.replaceChildren()):(this.nativeTitle&&(this.nativeTitle.textContent=this.titleText),this.fallbackTitle&&(this.fallbackTitle.textContent=this.titleText)),v?m?(null===(u=this.nativeFooter)||void 0===u||u.replaceChildren(v),null===(c=this.fallbackFooter)||void 0===c||c.replaceChildren()):(null===(d=this.fallbackFooter)||void 0===d||d.replaceChildren(v),null===(h=this.nativeFooter)||void 0===h||h.replaceChildren()):this.footerMessage&&(this.nativeFooter&&(this.nativeFooter.textContent=this.footerMessage),this.fallbackFooter&&(this.fallbackFooter.textContent=this.footerMessage));var b=!!p||!!this.titleText,g=!!v||!!this.footerMessage;this.nativeHeader&&(this.nativeHeader.hidden=!b),this.fallbackHeader&&(this.fallbackHeader.hidden=!b),this.nativeFooter&&(this.nativeFooter.hidden=!g),this.fallbackFooter&&(this.fallbackFooter.hidden=!g)}}},{key:"applyLayoutState",value:function(){this.root&&(this.root.setAttribute("data-size",this.size),this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.nativeDialog&&this.nativeDialog.setAttribute("data-size",this.size))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this,a=function(t){var e,n=null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action;if("close"!==n)"backdrop"===n&&o.closeOnBackdrop&&o.close("backdrop");else{var r=t.target.getAttribute("data-value")||"";o.close(r)}};null===(t=this.root)||void 0===t||t.addEventListener("click",a),null===(e=this.nativeDialog)||void 0===e||e.addEventListener("click",a),null===(n=this.fallback)||void 0===n||n.addEventListener("click",a),null===(r=this.nativeDialog)||void 0===r||r.addEventListener("cancel",function(t){t.preventDefault(),o.close("cancel")}),null===(i=this.nativeDialog)||void 0===i||i.addEventListener("close",function(){o.onClosed()}),this.id&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var e,n,r,i;(null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-dialog-open="'.concat(o.id,'"]')))?o.open():(null===(r=t.target)||void 0===r||null===(i=r.closest)||void 0===i?void 0:i.call(r,'[data-dialog-close="'.concat(o.id,'"]')))&&o.close("trigger")})}},{key:"open",value:function(){var t;this.isOpen||(this.isOpen=!0,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.showModal?(this.fallback.hidden=!0,this.nativeDialog.open||this.nativeDialog.showModal()):this.fallback&&(this.fallback.hidden=!1),this.dispatchEvent("dialogopen",{size:this.size}))}},{key:"close",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.returnValue=e,this.isOpen&&(this.isOpen=!1,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.open?this.nativeDialog.close(e):this.onClosed())}},{key:"onClosed",value:function(){this.fallback&&(this.fallback.hidden=!0),this.applyLayoutState(),this.dispatchEvent("dialogclose",{size:this.size,returnValue:this.returnValue})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setSize",value:function(t){this.size=this.resolveSize(t),this.applyLayoutState()}}],o=[{key:"selector",get:function(){return"dialog"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dialog"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,s,l}(n(812).Component);b=S,w="dialog-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.DialogComponent=S)},145(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return a(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,a(f,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,r,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function h(t,e,n,r){var i=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DrawerComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.drawerId=n.ensureDrawerId(),n.panelId=n.ensurePanelId(),n.direction=n.resolveDirection(n.container.getAttribute("direction")||n.container.getAttribute("position")||"left"),n.breakpoint=n.parseNumber(n.container.getAttribute("breakpoint"),768),n.maxSize=n.container.getAttribute("max-size")||n.defaultMaxSize(n.direction),n.maxHeight=n.container.getAttribute("max-height")||"90vh",n.showEdgeTrigger=!n.container.hasAttribute("no-edge-trigger"),n.railName=(n.container.getAttribute("rail")||"").trim(),n.triggerLabel=n.container.getAttribute("trigger-label")||n.drawerId||"Open",n.triggerIcon=n.container.getAttribute("trigger-icon")||"",n.backdropEnabled=!n.container.hasAttribute("no-backdrop"),n.closeOnOverlay=!n.container.hasAttribute("no-overlay-close"),n.closeOnEscape=!n.container.hasAttribute("no-escape-close"),n.initialOpen=n.container.hasAttribute("open"),n.isOpen=!1,n.isDesktop=!1,n.mediaQueryList=null,n.mediaQueryHandler=null,n.edgeTrigger=null,n.railElement=null,n.ownsRail=!1,n.previousFocusedElement=null,n.lastTriggerElement=null,n.documentKeydownHandler=null,n.slotted=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"ensureDrawerId",value:function(){var t=this.container.getAttribute("id")||this.container.getAttribute("drawer-id");if(t)return t;e.idCounter+=1;var n="drawer-".concat(e.idCounter);return this.container.setAttribute("id",n),n}},{key:"ensurePanelId",value:function(){return this.container.getAttribute("panel-id")||(e.panelCounter+=1,"drawer-panel-".concat(e.panelCounter))}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveDirection",value:function(t){var e=String(t||"left").trim().toLowerCase();return["left","right","top","bottom","center"].includes(e)?e:"left"}},{key:"defaultMaxSize",value:function(t){return"center"===t?"760px":"left"===t||"right"===t?"380px":"42vh"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-drawer-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(d=l(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.setupResponsive(),this.bindEvents(),this.initialOpen?this.open():this.close("initial");case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(s=l(o().m(function t(){var n,r,i;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-drawer-root"),this.overlay=this.container.querySelector('[data-role="overlay"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.header=this.container.querySelector('[data-role="header"]'),this.footer=this.container.querySelector('[data-role="footer"]'),this.body=this.container.querySelector('[data-role="body"]'),this.edgeTrigger=this.container.querySelector('[data-role="edge-trigger"]'),null===(n=this.root)||void 0===n||n.setAttribute("data-direction",this.direction),null===(r=this.root)||void 0===r||r.style.setProperty("--drawer-max-size",this.maxSize),null===(i=this.root)||void 0===i||i.style.setProperty("--drawer-max-height",this.maxHeight),this.panel&&(this.panel.id=this.panelId,this.panel.setAttribute("role","center"===this.direction?"dialog":"complementary"),this.panel.setAttribute("aria-hidden","true"),this.panel.setAttribute("tabindex","-1")),this.setupEdgeTrigger(),this.decorateExternalTriggers(),this.applySlotContent(),this.applyState();case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"setupEdgeTrigger",value:function(){if(this.edgeTrigger&&this.root){if(!this.showEdgeTrigger)return this.edgeTrigger.remove(),void(this.edgeTrigger=null);var t=[this.triggerIcon,this.triggerLabel].filter(Boolean);if(this.edgeTrigger.textContent=t.join(" ").trim(),this.edgeTrigger.setAttribute("aria-label",this.triggerLabel),this.edgeTrigger.setAttribute("aria-controls",this.panelId),this.edgeTrigger.setAttribute("aria-expanded","false"),this.edgeTrigger.setAttribute("data-drawer-toggle",this.drawerId),this.railName){var n="".concat(this.direction,":").concat(this.railName),r=e.rails.get(n);r||"undefined"==typeof document||((r=document.createElement("nav")).className="holi-drawer-rail",r.setAttribute("data-rail",this.railName),r.setAttribute("data-direction",this.direction),document.body.appendChild(r),e.rails.set(n,r),this.ownsRail=!0),this.railElement=r||null,this.railElement&&(this.edgeTrigger.setAttribute("data-in-rail","true"),this.railElement.appendChild(this.edgeTrigger))}}}},{key:"decorateExternalTriggers",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]'),'[data-drawer-close="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-controls",t.panelId),e.matches("[data-drawer-open], [data-drawer-toggle]")&&e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applySlotContent",value:function(){if(this.slotted){var t,e=this.slotted,n=e.header,r=e.footer,o=e.bodyNodes;this.body&&(t=this.body).replaceChildren.apply(t,function(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o)),n&&this.header?(this.header.replaceChildren(n),this.header.hidden=!1):this.header&&(this.header.hidden=!0),r&&this.footer?(this.footer.replaceChildren(r),this.footer.hidden=!1):this.footer&&(this.footer.hidden=!0)}}},{key:"setupResponsive",value:function(){var t=this;if("undefined"!=typeof window){var e=window.matchMedia("(min-width: ".concat(this.breakpoint,"px)"));this.mediaQueryList=e,this.isDesktop=e.matches,this.mediaQueryHandler=function(e){t.isDesktop=e.matches,t.applyState()},"function"==typeof e.addEventListener?e.addEventListener("change",this.mediaQueryHandler):"function"==typeof e.addListener&&e.addListener(this.mediaQueryHandler)}}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;r&&("close"!==r?"backdrop"===r&&t.closeOnOverlay&&t.close("overlay"):t.close("button"))}),this.drawerId&&"undefined"!=typeof document&&document.addEventListener("click",function(e){var n,r,i,o,a,s,l=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-drawer-open="'.concat(t.drawerId,'"]'));if(l)return e.preventDefault(),t.lastTriggerElement=l,void t.open();var u=null===(i=e.target)||void 0===i||null===(o=i.closest)||void 0===o?void 0:o.call(i,'[data-drawer-toggle="'.concat(t.drawerId,'"]'));if(u)return e.preventDefault(),t.lastTriggerElement=u,void t.toggle();var c=null===(a=e.target)||void 0===a||null===(s=a.closest)||void 0===s?void 0:s.call(a,'[data-drawer-close="'.concat(t.drawerId,'"]'));c&&(e.preventDefault(),t.lastTriggerElement=c,t.close("trigger"))}),this.closeOnEscape&&"undefined"!=typeof document&&document.addEventListener("keydown",function(e){"Escape"===e.key&&t.isOpen&&t.close("escape")}),"undefined"!=typeof document&&(this.documentKeydownHandler=function(n){t.isOpen&&e.activeInstance===t&&"Tab"===n.key&&t.trapFocus(n)},document.addEventListener("keydown",this.documentKeydownHandler))}},{key:"open",value:function(){e.activeInstance&&e.activeInstance!==this&&e.activeInstance.close("switch"),"undefined"!=typeof document&&document.activeElement instanceof HTMLElement&&(this.previousFocusedElement=document.activeElement);var t=!this.isOpen;this.setOpen(!0),e.activeInstance=this,this.focusFirstElement(),t&&this.dispatchEvent("draweropen",{id:this.drawerId,direction:this.direction})}},{key:"close",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"manual",n=this.isOpen;this.setOpen(!1),e.activeInstance===this&&(e.activeInstance=null),this.restoreFocus(t),n&&this.dispatchEvent("drawerclose",{id:this.drawerId,direction:this.direction,reason:t})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setDirection",value:function(t){var e;this.direction=this.resolveDirection(t),null===(e=this.root)||void 0===e||e.setAttribute("data-direction",this.direction)}},{key:"setMaxSize",value:function(t){var e;this.maxSize=t||this.defaultMaxSize(this.direction),null===(e=this.root)||void 0===e||e.style.setProperty("--drawer-max-size",this.maxSize)}},{key:"setOpen",value:function(t){this.isOpen=!!t,this.container.toggleAttribute("open",this.isOpen),this.edgeTrigger&&this.edgeTrigger.setAttribute("aria-expanded",this.isOpen?"true":"false"),this.updateTriggerAriaExpanded(),this.applyState()}},{key:"updateTriggerAriaExpanded",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applyState",value:function(){if(this.root&&this.panel){this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.root.setAttribute("data-desktop",this.isDesktop?"true":"false");var t=this.backdropEnabled&&this.isOpen&&(!this.isDesktop||"center"===this.direction);this.overlay&&(this.overlay.hidden=!t,this.overlay.setAttribute("aria-hidden",t?"false":"true")),this.panel&&(this.panel.setAttribute("aria-hidden",this.isOpen?"false":"true"),this.panel.setAttribute("aria-modal",this.isOpen&&t?"true":"false")),"undefined"!=typeof document&&(t?document.body.classList.add("holi-drawer-lock"):document.body.classList.remove("holi-drawer-lock")),this.applyInlinePanelState()}}},{key:"applyInlinePanelState",value:function(){if(this.panel){if(this.panel.style.transition="transform 220ms ease, opacity 220ms ease, border-radius 220ms ease","center"===this.direction)return this.panel.style.width="fit-content",this.panel.style.maxWidth="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="auto",this.panel.style.maxHeight=this.maxHeight,this.panel.style.transformOrigin="center center",this.panel.style.borderRadius=this.isOpen?"12px":"999px",this.panel.style.opacity=this.isOpen?"1":"0.25",void(this.panel.style.transform=this.isOpen?"translate(-50%, -50%) scale(1)":"translate(-50%, -50%) scale(0.02)");"left"===this.direction||"right"===this.direction?(this.panel.style.width="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="100dvh"):(this.panel.style.width="100vw",this.panel.style.height="min(".concat(this.maxSize,", 92vh)")),this.panel.style.maxHeight="",this.panel.style.transformOrigin="",this.panel.style.borderRadius="",this.panel.style.opacity="",this.isOpen?this.panel.style.transform="translate(0, 0)":"left"!==this.direction?"right"!==this.direction?"top"!==this.direction?this.panel.style.transform="translateY(100%)":this.panel.style.transform="translateY(-100%)":this.panel.style.transform="translateX(100%)":this.panel.style.transform="translateX(-100%)"}}},{key:"getFocusableElements",value:function(){if(!this.panel)return[];var t=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(this.panel.querySelectorAll(t)).filter(function(t){return!t.hasAttribute("hidden")&&"true"!==t.getAttribute("aria-hidden")})}},{key:"focusFirstElement",value:function(){var t=this;this.panel&&requestAnimationFrame(function(){var e;if(t.isOpen){var n=t.getFocusableElements()[0]||t.panel;null===(e=n.focus)||void 0===e||e.call(n)}})}},{key:"trapFocus",value:function(t){if(this.panel){var e=this.getFocusableElements();if(!e.length)return t.preventDefault(),void this.panel.focus();var n=e[0],r=e[e.length-1],i=document.activeElement;if(!t.shiftKey&&i===r)return t.preventDefault(),void n.focus();!t.shiftKey||i!==n&&i!==this.panel||(t.preventDefault(),r.focus())}}},{key:"restoreFocus",value:function(t){if("switch"!==t){var e=this.lastTriggerElement&&this.lastTriggerElement.isConnected?this.lastTriggerElement:this.previousFocusedElement;e&&e.isConnected&&"function"==typeof e.focus?e.focus():this.edgeTrigger&&"function"==typeof this.edgeTrigger.focus&&this.edgeTrigger.focus()}}},{key:"destroy",value:function(){if(e.activeInstance===this&&(e.activeInstance=null),this.edgeTrigger&&this.edgeTrigger.parentNode&&this.edgeTrigger.remove(),this.railElement&&this.ownsRail&&0===this.railElement.childElementCount){var t="".concat(this.direction,":").concat(this.railName);this.railElement.remove(),e.rails.delete(t)}this.mediaQueryList&&this.mediaQueryHandler&&("function"==typeof this.mediaQueryList.removeEventListener?this.mediaQueryList.removeEventListener("change",this.mediaQueryHandler):"function"==typeof this.mediaQueryList.removeListener&&this.mediaQueryList.removeListener(this.mediaQueryHandler)),this.documentKeydownHandler&&"undefined"!=typeof document&&(document.removeEventListener("keydown",this.documentKeydownHandler),this.documentKeydownHandler=null),h(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"drawer"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"drawer"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,s,d}(n(812).Component);y(b,"activeInstance",null),y(b,"rails",new Map),y(b,"idCounter",0),y(b,"panelCounter",0),y(b,"templateId","drawer-template"),"undefined"!=typeof window&&(window.DrawerComponent=b)},257(t,e,n){"use strict";n.r(e),n.d(e,{DropdownComponent:()=>j});var r=n(812),i=n(62),o=n(76),a=n(853);function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),f=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=u,h(f,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(f),h(f,i,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function f(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)})}}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function m(t,e,n){return e=S(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function g(t,e,n,r){var i=w(S(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},w.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function E(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var O,C,A,j=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=m(this,e,[t,r])).templateId=n.constructor.templateId||e.templateId,n.config={endpoint:n.container.getAttribute("data-source")||n.container.getAttribute("data-endpoint")||n.container.getAttribute("endpoint")||"",valueField:n.container.getAttribute("data-value-field")||"value",labelField:n.container.getAttribute("data-label-field")||"label",pageSize:Math.max(1,Number(n.container.getAttribute("data-page-size"))||30),minQueryLength:Math.max(0,Number(n.container.getAttribute("data-min-query"))||0),debounceMs:Math.max(0,Number(n.container.getAttribute("data-debounce-ms"))||200),loaderMinMs:Math.max(0,Number(n.container.getAttribute("data-loader-min-ms"))||180),autoSuggest:n.readBooleanAttr("data-auto-suggest",!0),placeholder:n.container.getAttribute("placeholder")||n.container.getAttribute("data-placeholder")||"Select...",noCache:n.readBooleanAttr("no-cache",!1),localItems:n.parseItemsAttr("data-items"),localFilterMap:n.parseObjectAttr("data-local-filter-map"),requestParams:n.parseObjectAttr("data-request-params"),clearOnPpr:n.readBooleanAttr("data-ppr-clear",!0),autoLoadOnPpr:n.readBooleanAttr("data-ppr-autoload",!0)},n.state={open:!1,loading:!1,query:"",page:1,hasMore:!1,activeIndex:-1,selected:null,items:[],allLocalItems:[],filteredLocalItems:[]},n.remoteCache=new Map,n.remoteRequestSeq=0,n.fetchTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseItemsAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return[];try{var n=JSON.parse(e);return Array.isArray(n)?n:[]}catch(t){return[]}}},{key:"parseObjectAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return{};try{var n=JSON.parse(e);return n&&"object"===v(n)&&!Array.isArray(n)?n:{}}catch(t){return{}}}},{key:"validateStructure",value:function(){if(g(e,"validateStructure",this,3)([]),!this.container)throw new Error("Dropdown requires a container")}},{key:"init",value:(b=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return b.apply(this,arguments)})},{key:"render",value:(f=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,g(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-dropdown"),this.input=this.container.querySelector('[data-role="input"]'),this.valueInput=this.container.querySelector('[data-role="value"]'),this.list=this.container.querySelector('[data-role="list"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.toggleButton=this.container.querySelector('[data-action="toggle"]'),this.loaderState=(0,i.w)(this,{host:this.panel||this.element,busyTarget:this.panel||this.element,scope:"block",defaultMessage:"Loading options..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"dropdown",eventName:"dropdownselect",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input.placeholder=this.config.placeholder,this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.state.filteredLocalItems=l(this.state.allLocalItems),this.state.items=l(this.state.filteredLocalItems),this.state.activeIndex=this.state.items.length?0:-1,this.state.hasMore=!1,this.renderItems(),(n=this.container.getAttribute("value")||this.container.getAttribute("data-value"))&&(this.value=n),this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"collectLocalItems",value:function(){var t=Array.from(this.container.querySelectorAll("option")).map(function(t){return{value:t.value,label:t.textContent||t.value}});return t.length?t:this.config.localItems||[]}},{key:"normalizeItems",value:function(t){var e=this;return(t||[]).map(function(t){if(t&&"object"===v(t)){var n,r,i,o,a,s,l,u=null!==(n=null!==(r=null!==(i=null!==(o=t[e.config.valueField])&&void 0!==o?o:t.value)&&void 0!==i?i:t.id)&&void 0!==r?r:t.code)&&void 0!==n?n:"",c=null!==(a=null!==(s=null!==(l=t[e.config.labelField])&&void 0!==l?l:t.label)&&void 0!==s?s:t.name)&&void 0!==a?a:String(u||"");return{value:null==u?"":String(u),label:null==c?"":String(c),item:t}}return{value:String(null!=t?t:""),label:String(null!=t?t:""),item:t}})}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.input.addEventListener("focus",function(){r.open(),r.config.endpoint&&!r.config.autoSuggest&&r.loadRemotePage(1,!1)}),this.input.addEventListener("input",function(){var t=String(r.input.value||"").trim();r.state.query=t,r.open(),r.config.endpoint?r.debounceRemoteQuery():r.applyLocalFilter()}),this.input.addEventListener("keydown",function(t){r.handleKeydown(t)}),null===(t=this.toggleButton)||void 0===t||t.addEventListener("click",function(){r.state.open?r.close():(r.open(),r.config.endpoint&&r.loadRemotePage(1,!1))}),null===(e=this.list)||void 0===e||e.addEventListener("click",function(t){var e,n,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="item"]');if(i){var o=Number(i.getAttribute("data-index"));Number.isNaN(o)||o<0||o>=r.state.items.length||r.selectItem(r.state.items[o])}}),null===(n=this.panel)||void 0===n||n.addEventListener("scroll",function(){r.handleScrollLoad()}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.close()}},{key:"debounceRemoteQuery",value:function(){var t=this;this.fetchTimer&&clearTimeout(this.fetchTimer),this.fetchTimer=setTimeout(function(){t.loadRemotePage(1,!1)},this.config.debounceMs)}},{key:"applyLocalFilter",value:function(){var t=this.resolveLocalFilterCriteria();t&&0===Object.keys(t).length?this.state.filteredLocalItems=[]:this.state.filteredLocalItems=t?this.state.allLocalItems.filter(function(e){return Object.entries(t).every(function(t){var n,r=s(t,2),i=r[0],o=r[1],a=null==e||null===(n=e.item)||void 0===n?void 0:n[i];return String(null!=a?a:"")===String(o)})}):l(this.state.allLocalItems);var e=String(this.state.query||"").trim().toLowerCase();e&&(this.state.filteredLocalItems=this.state.allLocalItems.filter(function(n){return!(!n.label.toLowerCase().includes(e)&&!n.value.toLowerCase().includes(e))&&(!t||0!==Object.keys(t).length&&Object.entries(t).every(function(t){var e,r=s(t,2),i=r[0],o=r[1],a=null==n||null===(e=n.item)||void 0===e?void 0:e[i];return String(null!=a?a:"")===String(o)}))})),this.state.items=l(this.state.filteredLocalItems),this.state.hasMore=!1,this.renderItems()}},{key:"resolveLocalFilterCriteria",value:function(){var t=Object.entries(this.config.localFilterMap||{});if(!t.length)return null;for(var e={},n=0;n<t.length;n+=1){var r=s(t[n],2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=this.extractExpression(a),u=this.evaluateExpression(l,this.getBindingContext());if(null==u||""===u)return{};e[i]=u}}}return Object.keys(e).length?e:null}},{key:"loadRemotePage",value:(h=p(d().m(function t(){var e,n,r,i,o,a,s,l,u,c,h,f,p=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=p.length>0&&void 0!==p[0]?p[0]:1,n=p.length>1&&void 0!==p[1]&&p[1],this.config.endpoint){t.n=1;break}return t.a(2);case 1:if(!((r=String(this.state.query||"").trim()).length>0&&r.length<this.config.minQueryLength)){t.n=2;break}return t.a(2);case 2:if(i=++this.remoteRequestSeq,o=Date.now(),a="".concat(r,"|").concat(e,"|").concat(this.config.pageSize),this.config.noCache||!this.remoteCache.has(a)){t.n=3;break}return s=this.remoteCache.get(a),this.applyRemotePayload(s,n,e),t.a(2);case 3:return this.setLoading(!0),t.p=4,l=this.buildRemoteUrl(e,r),t.n=5,fetch(l,{credentials:"same-origin"});case 5:if((u=t.v).ok){t.n=6;break}throw new Error("HTTP ".concat(u.status));case 6:return t.n=7,u.json();case 7:if(c=t.v,this.config.noCache||this.remoteCache.set(a,c),i===this.remoteRequestSeq){t.n=8;break}return t.a(2);case 8:this.applyRemotePayload(c,n,e),t.n=11;break;case 9:if(t.p=9,t.v,i===this.remoteRequestSeq){t.n=10;break}return t.a(2);case 10:n||(this.state.items=[],this.state.hasMore=!1,this.renderItems());case 11:if(t.p=11,i===this.remoteRequestSeq){t.n=12;break}return t.a(2);case 12:if(h=Date.now()-o,!((f=this.config.loaderMinMs-h)>0)){t.n=13;break}return t.n=13,new Promise(function(t){return setTimeout(t,f)});case 13:return this.setLoading(!1),t.f(11);case 14:return t.a(2)}},t,this,[[4,9,11,14]])})),function(){return h.apply(this,arguments)})},{key:"buildRemoteUrl",value:function(t,e){var n=this.config.endpoint.includes("?"),r=new URLSearchParams({page:String(t),limit:String(this.config.pageSize),q:e}),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=s(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(this.config.endpoint).concat(n?"&":"?").concat(r.toString())}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=s(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=t.extractExpression(a),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"applyRemotePayload",value:function(t,e,n){var r=Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.data)?t.data:[],i=this.filterNormalizedItems(this.normalizeItems(r),this.state.query);this.state.page=n,this.state.hasMore=this.resolveHasMore(t,r.length,n),this.state.items=e?[].concat(l(this.state.items),l(i)):i,e?this.state.activeIndex<0&&this.state.items.length&&(this.state.activeIndex=0):this.state.activeIndex=this.state.items.length?0:-1,this.renderItems()}},{key:"resolveHasMore",value:function(t,e,n){if("boolean"==typeof(null==t?void 0:t.hasMore))return t.hasMore;var r=Number((null==t?void 0:t.totalPages)||0);if(r>0)return n<r;var i=Number((null==t?void 0:t.totalCount)||0);return i>0?n*this.config.pageSize<i:e>=this.config.pageSize}},{key:"filterNormalizedItems",value:function(t,e){var n=String(e||"").trim().toLowerCase();return n?t.filter(function(t){var e=String((null==t?void 0:t.label)||"").toLowerCase(),r=String((null==t?void 0:t.value)||"").toLowerCase();return e.includes(n)||r.includes(n)}):t}},{key:"handleScrollLoad",value:(c=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:if(this.state.open&&this.state.hasMore&&!this.state.loading&&this.panel){t.n=1;break}return t.a(2);case 1:if(this.panel.scrollTop+this.panel.clientHeight>=this.panel.scrollHeight-32){t.n=2;break}return t.a(2);case 2:return t.n=3,this.loadRemotePage(this.state.page+1,!0);case 3:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Loading options...")}},{key:"renderItems",value:function(){var t,e=this;if(this.list){this.list.replaceChildren();var n,r=this.list.id||"".concat(this.constructor.componentName||"dropdown","-").concat(Math.random().toString(16).slice(2));this.list.id=r,null===(t=this.input)||void 0===t||t.setAttribute("aria-controls",r),this.state.items.forEach(function(t,n){var i,o=document.createElement("li"),a="".concat(r,"-item-").concat(n);o.id=a,o.setAttribute("data-role","item"),o.setAttribute("data-index",String(n)),o.setAttribute("role","option"),o.setAttribute("data-value",t.value),o.setAttribute("aria-selected",e.state.activeIndex===n?"true":"false"),o.textContent=t.label,e.state.activeIndex===n&&(o.classList.add("is-active"),null===(i=e.input)||void 0===i||i.setAttribute("aria-activedescendant",a)),e.list.appendChild(o)}),0===this.state.items.length?(this.state.activeIndex=-1,null===(n=this.input)||void 0===n||n.removeAttribute("aria-activedescendant")):this.state.activeIndex>=this.state.items.length&&(this.state.activeIndex=this.state.items.length-1,this.updateActiveItem(!0)),this.emptyEl&&(this.emptyEl.hidden=this.state.items.length>0||this.state.loading)}}},{key:"selectItem",value:function(t){this.input&&(this.input.value=t.label),this.valueInput&&(this.valueInput.value=t.value),this.state.selected=t,this.dispatchEvent("dropdownselect",{label:t.label,value:t.value,item:t.item||null}),this.close()}},{key:"open",value:function(){this.state.open=!0,this.panel&&(this.panel.hidden=!1),this.input&&this.input.setAttribute("aria-expanded","true"),this.state.activeIndex<0&&this.state.items.length>0&&(this.state.activeIndex=0,this.updateActiveItem(!1))}},{key:"close",value:function(){this.state.open=!1,this.panel&&(this.panel.hidden=!0),this.input&&this.input.setAttribute("aria-expanded","false"),this.input&&this.input.removeAttribute("aria-activedescendant")}},{key:"handleKeydown",value:function(t){var e=t.key;if("Escape"===e)return t.preventDefault(),void this.close();if("ArrowDown"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(1);if("ArrowUp"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(-1);if("Enter"===e){if(!this.state.open)return;t.preventDefault(),this.state.activeIndex>=0&&this.state.activeIndex<this.state.items.length&&this.selectItem(this.state.items[this.state.activeIndex])}}},{key:"moveActive",value:function(t){if(this.state.items.length){var e=this.state.items.length,n=this.state.activeIndex<0?0:this.state.activeIndex;this.state.activeIndex=(n+t+e)%e,this.updateActiveItem(!0)}}},{key:"updateActiveItem",value:function(t){var e,n=this;Array.from((null===(e=this.list)||void 0===e?void 0:e.querySelectorAll('[data-role="item"]'))||[]).forEach(function(e){var r,i=Number(e.getAttribute("data-index"))===n.state.activeIndex;e.classList.toggle("is-active",i),e.setAttribute("aria-selected",i?"true":"false"),i&&(null===(r=n.input)||void 0===r||r.setAttribute("aria-activedescendant",e.id),t&&e.scrollIntoView({block:"nearest"}))})}},{key:"value",get:function(){var t;return(null===(t=this.valueInput)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t),n=this.state.items.find(function(t){return t.value===e})||this.state.allLocalItems.find(function(t){return t.value===e});n?this.selectItem(n):this.valueInput&&(this.valueInput.value=e)}},{key:"getBindableState",value:function(){var t;return{query:this.state.query||"",value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||""}}},{key:"getStateSnapshot",value:function(){var t;return{open:!!this.state.open,value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||"",selected:this.state.selected?{value:this.state.selected.value,label:this.state.selected.label}:null}}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||"selected"===t}},{key:"applyBindableState",value:function(t){if(t&&"object"===v(t)&&("string"==typeof t.query&&t.query!==this.state.query&&(this.state.query=t.query,this.input&&(this.input.value=t.query)),void 0!==t.value&&null!==t.value)){var e=String(t.value);e!==this.value&&(this.value=e)}}},{key:"handlePprUpdate",value:function(){this.refreshPpr()}},{key:"refreshPpr",value:function(){if(this.config.clearOnPpr&&(this.state.query="",this.state.selected=null,this.state.page=1,this.state.hasMore=!1,this.state.activeIndex=-1,this.input&&(this.input.value=""),this.valueInput&&(this.valueInput.value="")),this.config.endpoint)return this.remoteCache.clear(),this.state.items=[],this.renderItems(),void(this.config.autoLoadOnPpr&&this.loadRemotePage(1,!1));this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.applyLocalFilter()}},{key:"destroy",value:function(){var t,n,r,i;this.fetchTimer&&(clearTimeout(this.fetchTimer),this.fetchTimer=null),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),g(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"dropdown"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dropdown"}},{key:"getNativeSelectors",value:function(){return['select[component="dropdown"]','select[role="dropdown"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,a.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","dropdown"),e.setAttribute("data-items",JSON.stringify((0,a.NQ)(t))),e.setAttribute("value",(0,a.BD)(t)),t.replaceWith(e),e}}],r&&y(n.prototype,r),u&&y(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,h,f,b}(r.Component);O=j,A="dropdown-template",(C=E(C="templateId"))in O?Object.defineProperty(O,C,{value:A,enumerable:!0,configurable:!0,writable:!0}):O[C]=A,"undefined"!=typeof window&&(window.DropdownComponent=j)},734(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{FormComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.container.getAttribute("data-endpoint")||n.container.getAttribute("action")||"",method:(n.container.getAttribute("method")||"post").toLowerCase(),submitLabel:n.container.getAttribute("data-submit-label")||"Submit",resetLabel:n.container.getAttribute("data-reset-label")||"Reset"},n.state={submitError:"",submitting:!1,formInvalid:!1},n.boundSubmit=function(t){n.handleSubmit(t)},n.boundReset=function(){return n.handleReset()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-form"),this.errorEl=this.container.querySelector('[data-role="errors"]'),this.submitBtn=this.container.querySelector('[data-role="submit"]'),this.resetBtn=this.container.querySelector('[data-role="reset"]'),this.projectSlot("fields"),this.projectSlot("actions"),this.projectSlot("errors"),this.submitBtn&&(this.submitBtn.textContent=this.config.submitLabel),this.resetBtn&&(this.resetBtn.textContent=this.config.resetLabel),this.config.endpoint&&this.element.setAttribute("action",this.config.endpoint),this.element.setAttribute("method",this.config.method),this.element.addEventListener("submit",this.boundSubmit),this.element.addEventListener("reset",this.boundReset);case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"collectData",value:function(){var t=new FormData(this.element);return Object.fromEntries(t.entries())}},{key:"validateChildren",value:function(){var t=this.element.querySelectorAll('holi-input, [component="input-field"], [role="input-field"], holi-select, [component="select-field"], [role="select-field"], holi-checkbox, [component="checkbox-group"], [role="checkbox-group"], holi-radio, [component="radio-group"], [role="radio-group"]'),e=!0;return t.forEach(function(t){var n=t.inputcomponent||t.selectcomponent||t.checkboxgroupcomponent||t.radiogroupcomponent;null!=n&&n.validate&&!1===n.validate()&&(e=!1)}),this.state.formInvalid=!this.element.checkValidity()||!e,!this.state.formInvalid}},{key:"setError",value:function(t){this.state.submitError=t?String(t):"",this.errorEl&&(this.errorEl.hidden=!this.state.submitError,this.errorEl.textContent=this.state.submitError)}},{key:"handleSubmit",value:(a=s(i().m(function t(e){var n,r,o,a,s,l;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e.preventDefault(),this.element){t.n=1;break}return t.a(2);case 1:if(this.validateChildren()){t.n=2;break}return this.setError("Please fix validation errors before submitting."),t.a(2);case 2:if(this.setError(""),n={data:this.collectData()},r=new CustomEvent("formsubmit",{detail:n,cancelable:!0}),this.element.dispatchEvent(r)){t.n=3;break}return t.a(2);case 3:if(this.config.endpoint){t.n=4;break}return t.a(2);case 4:return this.state.submitting=!0,t.p=5,t.n=6,fetch(this.config.endpoint,{method:this.config.method.toUpperCase(),credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.data)});case 6:if((o=t.v).ok){t.n=7;break}throw new Error("HTTP ".concat(o.status));case 7:return a=null,t.p=8,t.n=9,o.json();case 9:a=t.v,t.n=11;break;case 10:t.p=10,t.v;case 11:this.element.dispatchEvent(new CustomEvent("formsuccess",{detail:{data:n.data,response:a}})),t.n=13;break;case 12:t.p=12,l=t.v,s="Form submission failed.",this.setError(s),this.element.dispatchEvent(new CustomEvent("formerror",{detail:{error:String((null==l?void 0:l.message)||l||s)}}));case 13:return t.p=13,this.state.submitting=!1,t.f(13);case 14:return t.a(2)}},t,this,[[8,10],[5,12,13,14]])})),function(t){return a.apply(this,arguments)})},{key:"handleReset",value:function(){var t;this.setError(""),this.state.formInvalid=!1,null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("formreset",{detail:{}}))}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("submit",this.boundSubmit),null===(n=this.element)||void 0===n||n.removeEventListener("reset",this.boundReset),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-form"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"form-shell"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="form-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.FormComponent=g)},120(t,e,n){"use strict";n.r(e),n.d(e,{GalleryComponent:()=>A});var r=n(812);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,l(f,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(f),l(f,i,"Generator"),l(f,r,function(){return this}),l(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f(t,e,n){return e=m(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t,e,n){return(e=O(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,O(r.key),r)}}function E(t,e,n){return e&&k(t.prototype,e),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}var C=function(){return E(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:80;S(this,t),this.limit=Math.max(10,Number(e)||80),this.store=new Map},[{key:"touch",value:function(t){if(this.store.has(t)){var e=this.store.get(t);this.store.delete(t),this.store.set(t,e)}}},{key:"set",value:function(t,e){for(this.store.has(t)&&this.store.delete(t),this.store.set(t,e);this.store.size>this.limit;){var n=this.store.keys().next().value;this.store.delete(n)}}},{key:"preload",value:function(t){var e=this;if(!t)return Promise.resolve(null);var n=String(t),r=this.store.get(n);if(null!=r&&r.promise)return this.touch(n),r.promise;var i=new Promise(function(t,e){var r=new Image;r.onload=function(){return t(n)},r.onerror=function(){return e(new Error("Failed to preload image: ".concat(n)))},r.src=n});return this.set(n,{promise:i}),i.then(function(){return e.set(n,{state:"loaded"})}).catch(function(){return e.set(n,{state:"error"})}),i}}])}(),A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.dialogTitle=t.getAttribute("dialog-title")||t.getAttribute("title")||"Image Viewer",n.footerMessage=t.getAttribute("footer-message")||"Use arrows or swipe to navigate.",n.remoteSource=t.getAttribute("source")||t.getAttribute("data-source")||"",n.remoteSourceTemplate=n.remoteSource,n.requestParams=n.parseObjectAttr("data-request-params"),n.pageSize=n.parsePositive(t.getAttribute("page-size"),12),n.maxThumbHeight=n.parsePositive(t.getAttribute("thumb-height"),72),n.defaultMode=n.resolveDisplayMode(t.getAttribute("display-mode")||""),n.displayMode=n.defaultMode,n.cache=new C(n.parsePositive(t.getAttribute("cache-size"),80)),n.sourceNodes=[],n.initialInlineItems=[],n.allItems=[],n.viewItems=[],n.visibleItems=[],n.visibleStart=0,n.visibleEnd=0,n.pendingIndex=0,n.query="",n.metaQuery="",n.sortField="name",n.sortDirection="desc"===t.getAttribute("sort-direction")?"desc":"asc",n.currentPage=1,n.visibleCount=n.pageSize,n.observer=null,n.loading=!1,n.thumbnailPool=[],n.thumbnailPoolVersion=0,n.thumbnailPoolRenderedVersion=-1,n.viewSignature="",n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),E(e,[{key:"parsePositive",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===w(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveDisplayMode",value:function(t){return"infinite"===String(t||"").trim().toLowerCase()||this.container.hasAttribute("infinite-scroll")?"infinite":"paginate"}},{key:"captureSourceItems",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-gallery-root")});return this.sourceNodes=t,t.filter(function(t){return!!t.matches("[slot]")||!!t.matches("img, figure, a")||!!t.querySelector("img")})}},{key:"parseItem",value:function(t,e){var n=t.matches("img")?t:t.querySelector("img");if(!n)return null;var r=t.matches("a")?t:t.querySelector("a"),i=t.getAttribute("data-thumb-src")||n.getAttribute("src"),o=t.getAttribute("data-full-src")||n.getAttribute("data-full-src")||(null==r?void 0:r.getAttribute("href"))||i;if(!i||!o)return null;var a=this.parseMetadata(t.getAttribute("data-meta")||n.getAttribute("data-meta")||""),s=this.extractDatasetMetadata(t,n),l=t.getAttribute("data-name")||n.getAttribute("data-name")||n.getAttribute("alt")||"Image ".concat(e+1);return{index:e,id:String(t.getAttribute("data-id")||n.getAttribute("data-id")||e),name:l,thumbSrc:i,fullSrc:o,thumbAlt:t.getAttribute("data-thumb-alt")||n.getAttribute("alt")||"Thumbnail ".concat(e+1),fullAlt:t.getAttribute("data-full-alt")||n.getAttribute("alt")||"Image ".concat(e+1),metadata:h(h({},s),a)}}},{key:"parseMetadata",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===w(e)?e:{}}catch(t){return{}}}},{key:"extractDatasetMetadata",value:function(){for(var t=new Set(["thumbSrc","fullSrc","thumbAlt","fullAlt","name","meta","id"]),e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.forEach(function(n){null!=n&&n.dataset&&Object.keys(n.dataset).forEach(function(r){if(!t.has(r)){var i=n.dataset[r];null!=i&&""!==i&&(e[r]=i)}})}),e}},{key:"parseApiItem",value:function(t,e){var n;if(!t||"object"!==w(t))return null;var r=t.thumbSrc||t.thumbnail||t.thumb||t.src||"",i=t.fullSrc||t.full||t.url||t.image||r;if(!r||!i)return null;var o=h({},t.metadata&&"object"===w(t.metadata)?t.metadata:{});Object.keys(t).forEach(function(e){["id","name","title","thumbSrc","thumbnail","thumb","src","fullSrc","full","url","image","alt","thumbAlt","fullAlt","metadata"].includes(e)||(o[e]=t[e])});var a=t.name||t.title||t.alt||"Image ".concat(e+1);return{index:e,id:String(null!==(n=t.id)&&void 0!==n?n:e),name:a,thumbSrc:r,fullSrc:i,thumbAlt:t.thumbAlt||t.alt||a,fullAlt:t.fullAlt||t.alt||a,metadata:o}}},{key:"resolveItems",value:(u=c(s().m(function t(){var e,n,r,i,o,a,l,u,c=this;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=this.captureSourceItems(),(n=e.map(function(t,e){return c.parseItem(t,e)}).filter(Boolean)).length&&(this.initialInlineItems=n),r=this.resolveRemoteSource()){t.n=1;break}return t.a(2,n.length?n:this.initialInlineItems);case 1:return this.setLoadingState(!0,"Loading images..."),t.p=2,t.n=3,fetch(r,{credentials:"same-origin"});case 3:if((i=t.v).ok){t.n=4;break}throw new Error("Gallery source request failed: ".concat(i.status));case 4:return t.n=5,i.json();case 5:return o=t.v,a=Array.isArray(o)?o:Array.isArray(null==o?void 0:o.items)?o.items:Array.isArray(null==o?void 0:o.rows)?o.rows:[],l=a.map(function(t,e){return c.parseApiItem(t,e)}).filter(Boolean),t.a(2,l.length?l:n.length?n:this.initialInlineItems);case 6:return t.p=6,u=t.v,this.setLoadingState(!1),this.setStateMessage("Failed to load remote gallery source. ".concat(String(u.message||u))),t.a(2,n.length?n:this.initialInlineItems);case 7:return t.p=7,this.setLoadingState(!1),t.f(7);case 8:return t.a(2)}},t,this,[[2,6,7,8]])})),function(){return u.apply(this,arguments)})},{key:"validateStructure",value:function(){v(e,"validateStructure",this,3)([]),this.hasItems=this.allItems.length>0}},{key:"init",value:(l=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.validateStructure(),t.n=2,this.render();case 2:this.bindEvents(),this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"render",value:(r=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-gallery-root"),this.toolbar=this.container.querySelector('[data-role="toolbar"]'),this.stateNode=this.container.querySelector('[data-role="state"]'),this.searchInput=this.container.querySelector('[data-role="search-input"]'),this.metaInput=this.container.querySelector('[data-role="meta-input"]'),this.sortFieldSelect=this.container.querySelector('[data-role="sort-field"]'),this.sortDirectionSelect=this.container.querySelector('[data-role="sort-direction"]'),this.displayModeSelect=this.container.querySelector('[data-role="display-mode"]'),this.gridWrap=this.container.querySelector('[data-role="grid-wrap"]'),this.grid=this.container.querySelector('[data-role="grid"]'),this.sentinel=this.container.querySelector('[data-role="sentinel"]'),this.pagination=this.container.querySelector('[data-role="pagination"]'),this.pageStatus=this.container.querySelector('[data-role="page-status"]'),this.dialogHost=this.container.querySelector('[data-role="dialog"]'),this.carouselHost=this.container.querySelector('[data-role="carousel"]'),this.slidesHost=this.container.querySelector('[data-role="slides"]'),this.sourceNodes.forEach(function(t){return t.remove()}),this.gridWrap&&(this.gridWrap.style.maxHeight="".concat(this.maxThumbHeight,"vh")),this.sortDirectionSelect&&(this.sortDirectionSelect.value=this.sortDirection),this.displayModeSelect&&(this.displayModeSelect.value=this.displayMode),this.renderSortOptions(),this.applyDialogConfig();case 2:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"renderSortOptions",value:function(){var t=this;if(this.sortFieldSelect){var e=new Set(["name"]);this.allItems.forEach(function(t){Object.keys(t.metadata||{}).forEach(function(t){return e.add(t)})}),this.sortFieldSelect.replaceChildren(),Array.from(e).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent="name"===e?"Name":"Metadata: ".concat(e),t.sortFieldSelect.appendChild(n)}),e.has(this.sortField)||(this.sortField="name"),this.sortFieldSelect.value=this.sortField}}},{key:"setLoadingState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.loading=!!t,this.stateNode&&(t?(this.stateNode.hidden=!1,this.stateNode.textContent=e||"Loading..."):e||(this.stateNode.hidden=!0,this.stateNode.textContent=""))}},{key:"setStateMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.stateNode){if(!t)return this.stateNode.hidden=!0,void(this.stateNode.textContent="");this.stateNode.hidden=!1,this.stateNode.textContent=t}}},{key:"resolveRemoteSource",value:function(){var t=String(this.remoteSourceTemplate||this.remoteSource||"").trim();if(!t)return this.remoteSource="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t,n=String(e||"").trim();if(!n)return this.remoteSource="","";var r=new URL(n,window.location.href),o=this.resolveRequestParams();return Object.entries(o).forEach(function(t){var e=i(t,2),n=e[0],o=e[1];null!=o&&""!==o&&r.searchParams.set(n,String(o))}),this.remoteSource=r.toString(),this.remoteSource}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=i(e,2),o=r[0],a=r[1];if(o){var s=String(a||"").trim();if(s){var l=t.extractExpression(s),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[o]=u)}}}),n}},{key:"refreshPpr",value:(n=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveRemoteSource()){t.n=2;break}return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.hasItems=this.allItems.length>0,this.renderSortOptions(),this.applyView(!0),t.a(2);case 2:this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})},{key:"normalizeText",value:function(t){return String(null!=t?t:"").trim().toLowerCase()}},{key:"matchesMetaFilter",value:function(t){var e=this.normalizeText(this.metaQuery);if(!e)return!0;var n=t.metadata||{};if(e.includes(":")){var r=i(e.split(":"),2),o=r[0],a=r[1],s=this.normalizeText(o),l=this.normalizeText(a);if(!s||!l)return!0;for(var u=Object.keys(n),c=0;c<u.length;c+=1)if(this.normalizeText(u[c])===s&&this.normalizeText(n[u[c]]).includes(l))return!0;return!1}return this.normalizeText(JSON.stringify(n)).includes(e)}},{key:"matchesSearch",value:function(t){var e=this.normalizeText(this.query);if(!e)return!0;var n=this.normalizeText(t.name),r=this.normalizeText(JSON.stringify(t.metadata||{}));return n.includes(e)||r.includes(e)}},{key:"sortItems",value:function(t){var e,n=this,r="desc"===this.sortDirection?-1:1,i=this.sortField||"name",s=function(t){if(Array.isArray(t))return a(t)}(e=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return s.sort(function(t,e){var o,a,s="name"===i?t.name:null===(o=t.metadata)||void 0===o?void 0:o[i],l="name"===i?e.name:null===(a=e.metadata)||void 0===a?void 0:a[i],u=Number(s),c=Number(l);if(Number.isFinite(u)&&Number.isFinite(c))return u<c?-1*r:u>c?1*r:0;var d=n.normalizeText(s),h=n.normalizeText(l);return d<h?-1*r:d>h?1*r:0}),s}},{key:"computeVisibleItems",value:function(t){if("infinite"===this.displayMode){t&&(this.visibleCount=this.pageSize);var e=Math.min(this.visibleCount,this.viewItems.length);return this.visibleStart=0,this.visibleEnd=e,void(this.visibleItems=this.viewItems.slice(0,e).map(function(t,e){return h(h({},t),{},{viewIndex:e})}))}var n=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize));this.currentPage=Math.min(this.currentPage,n),t&&(this.currentPage=1);var r=(this.currentPage-1)*this.pageSize,i=r+this.pageSize;this.visibleStart=r,this.visibleEnd=Math.min(i,this.viewItems.length),this.visibleItems=this.viewItems.slice(r,i).map(function(t,e){return h(h({},t),{},{viewIndex:r+e})})}},{key:"resolveViewSignature",value:function(t){return Array.isArray(t)&&t.length?t.map(function(t){var e,n;return String(null!==(e=null!==(n=t.id)&&void 0!==n?n:t.index)&&void 0!==e?e:"")}).join("|"):""}},{key:"applyView",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.hasItems)return this.viewItems=[],this.visibleItems=[],this.visibleStart=0,this.visibleEnd=0,this.thumbnailPool=[],this.thumbnailPoolVersion+=1,this.renderThumbnails(),this.renderSlides(),this.updatePagination(),this.updateSentinel(),void this.setStateMessage("No images available. Provide inline <img> content or a valid remote source.");var n=this.allItems.filter(function(e){return t.matchesSearch(e)&&t.matchesMetaFilter(e)});this.viewItems=this.sortItems(n);var r=this.resolveViewSignature(this.viewItems),i=r!==this.viewSignature;i&&(this.viewSignature=r,this.thumbnailPoolVersion+=1),this.computeVisibleItems(e),this.renderThumbnails(),(i||e)&&this.renderSlides(),this.updatePagination(),this.updateSentinel(),this.syncNestedComponents(),this.preloadVisibleImages(),this.viewItems.length?this.loading||this.setStateMessage(""):this.setStateMessage("No images match the current filters.")}},{key:"renderThumbnails",value:function(){var t=this;if(this.grid){if(!this.viewItems.length)return this.thumbnailPool=[],this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion,void this.grid.replaceChildren();this.thumbnailPoolRenderedVersion!==this.thumbnailPoolVersion&&(this.grid.replaceChildren(),this.thumbnailPool=[],this.viewItems.forEach(function(e,n){var r=document.createElement("button");r.type="button",r.className="holi-gallery-thumb",r.setAttribute("data-gallery-index",String(n)),r.setAttribute("aria-label","Open image ".concat(e.index+1)),r.setAttribute("title",e.name||e.thumbAlt||"");var i=document.createElement("img");i.src=e.thumbSrc,i.alt=e.thumbAlt,i.loading="lazy",r.appendChild(i),t.thumbnailPool.push(r),t.grid.appendChild(r)}),this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion),this.applyThumbnailVisibility()}}},{key:"applyThumbnailVisibility",value:function(){var t=Math.max(0,Number(this.visibleStart)||0),e=Math.max(t,Number(this.visibleEnd)||0);this.thumbnailPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"renderSlides",value:function(){var t=this,e=this.resolveSlidesHost();e&&(this.slidesHost=e,this.slidesHost.replaceChildren(),this.viewItems.forEach(function(e){var n=document.createElement("article");n.className="slide";var r=document.createElement("img");r.src=e.fullSrc,r.alt=e.fullAlt,n.appendChild(r),t.slidesHost.appendChild(n)}))}},{key:"resolveSlidesHost",value:function(){var t=this.getCarouselInstance();if(null!=t&&t.track&&t.track.isConnected)return t.track;for(var e=Array.from(this.container.querySelectorAll('[data-role="slides"], [data-role="track"]')),n=e.length-1;n>=0;n-=1){var r=e[n];if(r instanceof HTMLElement&&r.isConnected&&(r.matches('[data-role="track"]')||r.classList.contains("slides")))return r}return null}},{key:"applyDialogConfig",value:function(){this.dialogHost&&(this.dialogHost.setAttribute("title",this.dialogTitle),this.dialogHost.setAttribute("footer-message",this.footerMessage))}},{key:"ensureNestedComponents",value:function(){var t,e=null===(t=window.HoliApp)||void 0===t?void 0:t.HoliApp;e&&"function"==typeof e.init&&e.init(this.container)}},{key:"syncNestedComponents",value:function(){var t,e=this.getCarouselInstance();if(e){"function"==typeof e.refreshSlides&&e.refreshSlides(),"function"==typeof e.updateTrackSizing&&e.updateTrackSizing(),"function"==typeof e.renderDots&&e.renderDots();var n=Math.max((null===(t=e.getDotCount)||void 0===t?void 0:t.call(e))-1||0,0);this.pendingIndex=Math.min(this.pendingIndex,n),"function"==typeof e.goToSlide&&e.goToSlide(this.pendingIndex,!1)}else this.ensureNestedComponents()}},{key:"getDialogInstance",value:function(){var t;return(null===(t=this.dialogHost)||void 0===t?void 0:t.dialogcomponent)||null}},{key:"getCarouselInstance",value:function(){for(var t=this.container.querySelectorAll('carousel, [component="carousel"], [role="carousel"]'),e=0;e<t.length;e+=1){var n=t[e].carouselcomponent;if(n)return n}return null}},{key:"preloadVisibleImages",value:function(){var t=this;this.visibleItems.slice(0,this.pageSize).forEach(function(e){t.cache.preload(e.thumbSrc).catch(function(){})})}},{key:"syncToPendingIndex",value:function(){var t=this.getCarouselInstance();if(!t)return!1;var e=this.viewItems[this.pendingIndex];if(e){this.cache.preload(e.fullSrc).catch(function(){});var n=this.viewItems[this.pendingIndex+1],r=this.viewItems[this.pendingIndex-1];n&&this.cache.preload(n.fullSrc).catch(function(){}),r&&this.cache.preload(r.fullSrc).catch(function(){})}return t.goToSlide(this.pendingIndex,!1),!0}},{key:"openAt",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=Number(t);this.pendingIndex=Number.isFinite(r)?r:0;var i=this.getDialogInstance();if(i)i.open(),this.syncToPendingIndex()||requestAnimationFrame(function(){e.syncToPendingIndex()});else{if(this.ensureNestedComponents(),n>=8)return;requestAnimationFrame(function(){return e.openAt(e.pendingIndex,n+1)})}}},{key:"updatePagination",value:function(){if(this.pagination&&this.pageStatus){if("infinite"===this.displayMode)return this.pagination.hidden=!0,void(this.pageStatus.textContent="Showing ".concat(this.visibleItems.length," of ").concat(this.viewItems.length," images"));this.pagination.hidden=!1;var t=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize)),e=this.pagination.querySelector('[data-action="prev-page"]'),n=this.pagination.querySelector('[data-action="next-page"]');e&&(e.disabled=this.currentPage<=1),n&&(n.disabled=this.currentPage>=t),this.pageStatus.textContent="Page ".concat(this.currentPage," of ").concat(t," (").concat(this.viewItems.length," images)")}}},{key:"updateSentinel",value:function(){if(this.sentinel){var t="infinite"===this.displayMode&&this.visibleItems.length<this.viewItems.length;this.sentinel.hidden=!t}}},{key:"setupInfiniteObserver",value:function(){var t=this;this.observer&&(this.observer.disconnect(),this.observer=null),"infinite"===this.displayMode&&this.sentinel&&this.gridWrap&&"undefined"!=typeof IntersectionObserver&&(this.observer=new IntersectionObserver(function(e){e.some(function(t){return t.isIntersecting})&&(t.visibleItems.length>=t.viewItems.length||(t.visibleCount+=t.pageSize,t.computeVisibleItems(!1),t.renderThumbnails(),t.updateSentinel(),t.updatePagination(),t.preloadVisibleImages()))},{root:this.gridWrap,threshold:.1}),this.observer.observe(this.sentinel))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,s,l=this;null===(t=this.grid)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-gallery-index]");if(e){var n=Number(e.getAttribute("data-gallery-index"));l.openAt(n)}}),null===(e=this.dialogHost)||void 0===e||e.addEventListener("dialogopen",function(){l.syncToPendingIndex()}),null===(n=this.searchInput)||void 0===n||n.addEventListener("input",function(t){l.query=t.target.value||"",l.applyView(!0)}),null===(r=this.metaInput)||void 0===r||r.addEventListener("input",function(t){l.metaQuery=t.target.value||"",l.applyView(!0)}),null===(i=this.sortFieldSelect)||void 0===i||i.addEventListener("change",function(t){l.sortField=t.target.value||"name",l.applyView(!0)}),null===(o=this.sortDirectionSelect)||void 0===o||o.addEventListener("change",function(t){l.sortDirection="desc"===t.target.value?"desc":"asc",l.applyView(!0)}),null===(a=this.displayModeSelect)||void 0===a||a.addEventListener("change",function(t){l.displayMode="infinite"===t.target.value?"infinite":"paginate",l.applyView(!0),l.setupInfiniteObserver()}),null===(s=this.pagination)||void 0===s||s.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e&&"paginate"===l.displayMode){var n=e.getAttribute("data-action"),r=Math.max(1,Math.ceil(l.viewItems.length/l.pageSize));"prev-page"===n&&l.currentPage>1&&(l.currentPage-=1,l.applyView(!1)),"next-page"===n&&l.currentPage<r&&(l.currentPage+=1,l.applyView(!1))}}),this.setupInfiniteObserver()}},{key:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),v(e,"destroy",this,3)([])}}],[{key:"selector",get:function(){return"gallery"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"gallery"}}]);var n,r,l,u}(r.Component);g(A,"templateId","gallery-template"),"undefined"!=typeof window&&(window.GalleryComponent=A)},390(t,e,n){"use strict";n.r(e),n.d(e,{InputComponent:()=>k});var r=n(812),i=n(573),o=n(853);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return u(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),f=d.prototype=s.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,u(f,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(f),u(f,i,"Generator"),u(f,r,function(){return this}),u(f,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function h(t,e,n){return e=y(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId;var i=n.resolveControlType(),o="area"===i;return n.config={name:n.readAttr("name"),label:n.readAttr("label"),type:o?"text":i,controlType:i,isAreaMode:o,placeholder:n.readAttr("placeholder"),rows:Math.max(1,Number(n.readAttr("rows","4"))||4),cols:Math.max(1,Number(n.readAttr("cols","30"))||30),required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),errorMessage:n.readAttr("error-message","Invalid value."),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={label:n.config.label,required:n.config.required,name:n.config.name,type:n.config.type,placeholder:n.config.placeholder,rows:n.config.rows,cols:n.config.cols,isAreaMode:n.config.isAreaMode,isInputMode:!n.config.isAreaMode,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"resolveControlType",value:function(){var t=String(this.readAttr("type","text")||"text").trim().toLowerCase(),e=String(this.readAttr("role","")||"").trim().toLowerCase(),n={text:"text",email:"email",number:"number",password:"password",url:"url",tel:"tel",search:"search",textarea:"area",area:"area"};if(e&&n[e]){if("text"===t||"input"===t)return n[e];if("area"===t||"textarea"===t)return"area"}return"area"===t||"textarea"===t?"area":t||"text"}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-input"),this.inputEl=this.container.querySelector('[data-role="control-input"]'),this.areaEl=this.container.querySelector('[data-role="control-area"]'),this.controlEl=this.areaEl||this.inputEl,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),f=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return f.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.controlEl){this.controlEl.value=this.state.value,this.controlEl.name=this.config.name||"",this.controlEl.placeholder=this.config.placeholder||"",this.controlEl.required=!!this.config.required,this.controlEl.disabled=!!this.config.disabled,this.config.isAreaMode?(this.controlEl.rows=this.config.rows,this.controlEl.cols=this.config.cols):this.controlEl.type=this.config.type||"text";var t=this.controlEl.id||"holi-input-".concat(Math.random().toString(16).slice(2));this.controlEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.controlEl&&(this.controlEl.addEventListener("input",this.boundInput),this.controlEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("inputchange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){var n=i.D.validateToken(t,e,{element:this.controlEl,component:this});return n.valid||n.message&&"Invalid value."!==n.message||(n.message=this.config.errorMessage||"Invalid value."),n}},{key:"updateView",value:function(){this.element&&this.controlEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.controlEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage||this.config.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.controlEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.controlEl&&(this.controlEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.controlEl&&(this.controlEl.removeEventListener("input",this.boundInput),this.controlEl.removeEventListener("blur",this.boundBlur)),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-input"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"input-field"}},{key:"getNativeSelectors",value:function(){return['input[component="input"]','input[role="input"]','input[component="input-field"]','input[role="input-field"]','input[component="textarea"]','input[role="textarea"]','textarea[component="input"]','textarea[role="input"]','textarea[component="input-field"]','textarea[role="input-field"]','textarea[component="textarea"]','textarea[role="textarea"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return t;var e=document.createElement("section");return(0,o.ts)(t,e,{exclude:["component","role","value","type"]}),e.setAttribute("component","input-field"),e.setAttribute("type",t instanceof HTMLTextAreaElement||"textarea"===(t.getAttribute("role")||t.getAttribute("component"))?"textarea":t.getAttribute("type")||"text"),e.setAttribute("value",(0,o.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,f}(r.Component);g=k,S="input-field-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.InputComponent=k)},166(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LayoutComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Layout requires a container")}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-layout"),this.content=this.container.querySelector('[data-role="layout-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})}],o=[{key:"selector",get:function(){return"layout"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"layout"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="layout-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.LayoutComponent=g)},819(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LoaderComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.scope=n.resolveScope(n.readAttr("scope","inline")),n.message=n.readAttr("message","Loading..."),n.visible=n.readBooleanAttr("visible",!1),n.hostSelector=n.readAttr("host",""),n.host=null,n.appliedRelativeHost=!1,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"readBooleanAttr",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"resolveScope",value:function(t){var e=String(t||"inline").trim().toLowerCase();return"page"===e||"block"===e||"inline"===e?e:"inline"}},{key:"resolveHost",value:function(){if("page"===this.scope||"undefined"==typeof document)return null;if(this.hostSelector){var t=document.querySelector(this.hostSelector);if(t)return t}return this.container.parentElement||this.container}},{key:"ensureHostPositionContext",value:function(){this.host&&"page"!==this.scope&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.host).position&&(this.host.style.position="relative",this.appliedRelativeHost=!0)}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-loader"),this.messageEl=this.container.querySelector('[data-role="loader-message"]'),this.element&&this.messageEl){t.n=2;break}throw new Error("Loader template is missing required nodes");case 2:this.element.setAttribute("data-scope",this.scope),"block"===this.scope?(this.host=this.resolveHost(),this.host&&this.element.parentElement!==this.host&&(this.host.appendChild(this.element),this.ensureHostPositionContext()),this.container.hidden=!0):this.container.hidden=!1,this.setMessage(this.message),this.setVisible(this.visible),void 0===this.container.loader&&Object.defineProperty(this.container,"loader",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"setMessage",value:function(t){var e=String(t||"Loading...");this.message=e,this.messageEl&&(this.messageEl.textContent=e)}},{key:"setVisible",value:function(t){this.visible=!!t,this.element&&(this.element.hidden=!this.visible,this.element.setAttribute("aria-hidden",this.visible?"false":"true"))}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&this.setMessage(t),this.setVisible(!0)}},{key:"hide",value:function(){this.setVisible(!1)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t?this.show(e):this.hide()}},{key:"destroy",value:function(){this.appliedRelativeHost&&this.host&&(this.host.style.position=""),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"loader"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"loader"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="loader-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.LoaderComponent=g)},622(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{MenubarComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.baseMode=n.resolveMode(t),n.mode=n.baseMode,n.mobileBreakpoint=n.parseNumber(t.getAttribute("mobile-breakpoint"),768),n.mobileToggleMode=n.resolveMobileToggleMode(t),n.responsiveMenuEnabled="bar"===n.baseMode&&!t.hasAttribute("disable-mobile-menu"),n.openOnClick=t.hasAttribute("open-on-click"),n.hoverCloseDelay=n.parseNumber(t.getAttribute("hover-close-delay"),150),n.isOpen=!1,n.element=null,n.menuRoot=null,n.menuHost=null,n.toggleButton=null,n.boundOutsideClick=null,n.boundViewportChange=null,n.boundContainerResize=null,n.resizeObserver=null,n.closeTimer=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"resolveMode",value:function(t){var e=String(t.getAttribute("mode")||"").trim().toLowerCase();return"single"===e||"button"===e||t.hasAttribute("single-button")||t.hasAttribute("menu-button")?"single":"bar"}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveMobileToggleMode",value:function(t){return"icon"===String(t.getAttribute("data-mobile-toggle")||t.getAttribute("mobile-toggle")||"button").trim().toLowerCase()?"icon":"button"}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!(this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul")||this.container.querySelector("ol")))throw new Error('Menubar requires menu markup in slot="menu".')}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return o=this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-menubar"),this.menuHost=this.container.querySelector('[data-role="menu-host"]'),this.toggleButton=this.container.querySelector('[data-role="toggle"]'),null===(n=this.element)||void 0===n||n.setAttribute("data-mode",this.mode),null===(r=this.element)||void 0===r||r.setAttribute("data-open-on-click",this.openOnClick?"true":"false"),o&&this.menuHost&&this.menuHost.replaceChildren(o),(a=this.container.getAttribute("label"))&&this.toggleButton&&(this.toggleButton.textContent=a),this.prepareMenuTree(),this.applyTogglePresentation(),this.applyResponsiveMode(),this.applyMode();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"prepareMenuTree",value:function(){var t,e=null===(t=this.menuHost)||void 0===t?void 0:t.querySelector('ul, ol, [role="menu"]');e&&(this.menuRoot=e,this.menuRoot.classList.add("holi-menu-level","holi-menu-root"),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.decorateLevel(this.menuRoot,!0),this.closeAllSubmenus())}},{key:"decorateLevel",value:function(t,e){var n=this;Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-menu-item");var r=n.getTrigger(t),i=n.getSubmenu(t);r&&(r.classList.add("holi-menu-trigger"),r.setAttribute("role","menuitem"),r.setAttribute("tabindex",e?"0":"-1"),i&&(t.classList.add("has-submenu"),i.classList.add("holi-menu-level","holi-submenu"),i.setAttribute("role","menu"),i.hidden=!0,r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),n.decorateLevel(i,!1)))})}},{key:"getTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("A"===i||"BUTTON"===i||r.hasAttribute("data-menu-trigger"))return r}return null}},{key:"getSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("UL"===i||"OL"===i)return r}return null}},{key:"applyMode",value:function(){var t,e;this.toggleButton&&this.menuRoot&&(null===(t=this.element)||void 0===t||t.setAttribute("data-mode",this.mode),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.isOpen=!1,null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"),this.closeAllSubmenus(),this.applyTogglePresentation(),"single"===this.mode?(this.toggleButton.hidden=!1,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true")):(this.toggleButton.hidden=!0,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false")))}},{key:"applyTogglePresentation",value:function(){if(this.toggleButton){var t=String(this.container.getAttribute("label")||"Menu").trim()||"Menu",e=String(this.container.getAttribute("mobile-icon-label")||t).trim()||"Menu";this.toggleButton.setAttribute("data-toggle-appearance",this.mobileToggleMode),this.toggleButton.setAttribute("title","icon"===this.mobileToggleMode?e:""),this.toggleButton.setAttribute("aria-label","icon"===this.mobileToggleMode?e:t),this.toggleButton.textContent="icon"===this.mobileToggleMode?"":t}}},{key:"applyResponsiveMode",value:function(){var t,e;if(this.responsiveMenuEnabled&&this.menuRoot){var n=window.innerWidth||document.documentElement.clientWidth,r=(null===(t=(e=this.container).getBoundingClientRect)||void 0===t?void 0:t.call(e).width)||n,i=Math.min(n,r)<=this.mobileBreakpoint?"single":this.baseMode;i!==this.mode&&(this.mode=i,this.applyMode())}}},{key:"bindEvents",value:function(){var t=this;this.element&&this.menuRoot&&(this.element.addEventListener("click",function(e){if(e.target.closest('[data-role="toggle"]'))return e.preventDefault(),void t.toggleMenu();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");if(t.getSubmenu(r))return e.preventDefault(),void t.toggleSubmenu(r);"single"===t.mode?t.closeMenu():t.closeAllSubmenus()}}),this.openOnClick||this.element.addEventListener("mouseover",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("focusin",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("mouseleave",function(){"bar"===t.mode&&t.scheduleCloseAllSubmenus()}),this.element.addEventListener("mouseenter",function(){"bar"===t.mode&&t.cancelScheduledClose()}),this.element.addEventListener("keydown",function(e){return t.handleKeydown(e)}),this.boundOutsideClick=function(e){t.container.contains(e.target)||(t.closeAllSubmenus(),"single"===t.mode&&t.closeMenu())},document.addEventListener("click",this.boundOutsideClick),this.responsiveMenuEnabled&&(this.boundViewportChange=function(){return t.applyResponsiveMode()},window.addEventListener("resize",this.boundViewportChange),"undefined"!=typeof ResizeObserver&&(this.boundContainerResize=function(){return t.applyResponsiveMode()},this.resizeObserver=new ResizeObserver(this.boundContainerResize),this.resizeObserver.observe(this.container))))}},{key:"handleKeydown",value:function(t){var e=t.target.closest(".holi-menu-trigger");if(e){var n;if("Escape"===t.key)return this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu(),void(null===(n=this.toggleButton)||void 0===n||n.focus());if("ArrowRight"===t.key||"ArrowLeft"===t.key){if(!e.closest(".holi-menu-root"))return;return t.preventDefault(),void this.moveTopLevelFocus(e,"ArrowRight"===t.key?1:-1)}if("ArrowDown"!==t.key){if("Enter"===t.key||" "===t.key){var r=e.closest(".holi-menu-item");if(!this.getSubmenu(r))return;t.preventDefault(),this.toggleSubmenu(r)}}else{var i=e.closest(".holi-menu-item"),o=this.getSubmenu(i);if(!o)return;t.preventDefault(),this.openSubmenuBranch(i);var a=Array.from(o.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}),s=a?this.getTrigger(a):null;null==s||s.focus()}}else"Escape"===t.key&&(this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu())}},{key:"moveTopLevelFocus",value:function(t,e){var n,r=this;if(this.menuRoot){var i=Array.from(this.menuRoot.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}).map(function(t){return r.getTrigger(t)}).filter(Boolean);if(i.length){var o=i.indexOf(t);o<0||null===(n=i[(o+e+i.length)%i.length])||void 0===n||n.focus()}}}},{key:"toggleMenu",value:function(){this.isOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!0,this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","true"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","true"))}},{key:"closeMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!1,this.closeAllSubmenus(),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"))}},{key:"toggleSubmenu",value:function(t){var e=this.getSubmenu(t);e&&(e.hidden?this.openSubmenuBranch(t):this.closeSubmenu(t))}},{key:"openSubmenuBranch",value:function(t){var e=this,n=this.getItemPath(t);this.closeAllSubmenus(n),n.forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&r&&(n.hidden=!1,t.classList.add("open"),r.setAttribute("aria-expanded","true"),e.applySubmenuAlignment(t))})}},{key:"closeSubmenu",value:function(t){var e=this,n=this.getSubmenu(t),r=this.getTrigger(t);n&&r&&(Array.from(n.querySelectorAll(".holi-menu-item")).forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&(n.hidden=!0),r&&r.setAttribute("aria-expanded","false"),t.classList.remove("open")}),n.hidden=!0,r.setAttribute("aria-expanded","false"),t.classList.remove("open"))}},{key:"closeAllSubmenus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.menuRoot){var n=new Set(e);Array.from(this.menuRoot.querySelectorAll(".holi-menu-item.has-submenu")).forEach(function(e){n.has(e)||t.closeSubmenu(e)})}}},{key:"scheduleCloseAllSubmenus",value:function(){var t=this;this.cancelScheduledClose(),this.closeTimer=setTimeout(function(){t.closeAllSubmenus()},this.hoverCloseDelay)}},{key:"cancelScheduledClose",value:function(){this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null)}},{key:"applySubmenuAlignment",value:function(t){var e,n=this.getSubmenu(t);if(n){t.removeAttribute("data-submenu-align"),n.style.left="",n.style.right="";var r=t.parentElement,i=null==r||null===(e=r.classList)||void 0===e?void 0:e.contains("holi-menu-root"),o=n.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth;o.right>a-8?i?t.setAttribute("data-submenu-align","viewport"):t.setAttribute("data-submenu-align","left"):o.left<8&&!i&&t.setAttribute("data-submenu-align","right")}}},{key:"getItemPath",value:function(t){for(var e=[],n=t;n&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-menu-item");){var r;this.getSubmenu(n)&&e.unshift(n);var i=n.parentElement;n=i?i.closest(".holi-menu-item"):null}return e}},{key:"destroy",value:function(){this.cancelScheduledClose(),this.boundOutsideClick&&(document.removeEventListener("click",this.boundOutsideClick),this.boundOutsideClick=null),this.boundViewportChange&&(window.removeEventListener("resize",this.boundViewportChange),this.boundViewportChange=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null,this.boundContainerResize=null),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"menubar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"menubar"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="menubar-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.MenubarComponent=g)},683(){},511(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function f(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{PanelComponent:()=>g});var g=function(t){function e(t){var n,r,i,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=d(this,e,[t,s])).templateId=e.templateId,a.titleText=(null===(n=a.container)||void 0===n?void 0:n.getAttribute("title"))||(null===(r=a.container)||void 0===r?void 0:r.getAttribute("data-title"))||"",a.subtitleText=(null===(i=a.container)||void 0===i?void 0:i.getAttribute("subtitle"))||(null===(o=a.container)||void 0===o?void 0:o.getAttribute("data-subtitle"))||"",a.init(),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(f(e,"validateStructure",this,3)([]),!this.container)throw new Error("Panel requires a container")}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f(e,"getBindingContext",this,3)([u({title:this.titleText,subtitle:this.subtitleText,hasTitle:!!this.titleText,hasSubtitle:!!this.subtitleText},t)])}},{key:"init",value:(l=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-panel"),this.header=this.container.querySelector('[data-role="panel-header"]'),this.title=this.container.querySelector('[data-role="panel-title"]'),this.subtitle=this.container.querySelector('[data-role="panel-subtitle"]'),this.content=this.container.querySelector('[data-role="panel-content"]'),this.footer=this.container.querySelector('[data-role="panel-footer"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return this.projectSlot("header"),this.projectSlot("footer"),this.applyPanelState(),t.n=4,this.createChildren();case 4:this.syncChildren();case 5:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('[data-role="panel-'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.hidden=!1,e.replaceChildren(r)}else("header"!==t||this.titleText||this.subtitleText)&&"footer"!==t||(e.hidden=!0)}}},{key:"applyPanelState",value:function(){if(this.header){var t=this.header.childNodes.length>0,e=!!this.titleText||!!this.subtitleText;this.header.hidden=!t&&!e}this.title&&(this.title.hidden=!this.titleText,this.title.textContent=this.titleText),this.subtitle&&(this.subtitle.hidden=!this.subtitleText,this.subtitle.textContent=this.subtitleText),this.footer&&0===this.footer.childNodes.length&&(this.footer.hidden=!0)}},{key:"refreshPpr",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.syncChildren();var n=!1;this.children.forEach(function(r){if(r&&!r.isDestroyed&&r!==(null==e?void 0:e.sourceComponent)&&r.container!==(null==e?void 0:e.sourceElement)){var i=u(u({},e),{},{panelComponent:t,targetElement:r.container,targetComponent:r,delegatedByPanel:!0});if("function"==typeof r.receiveDependencyUpdate)return r.receiveDependencyUpdate(i),void(n=!0);"function"==typeof r.handlePprUpdate&&(r.handlePprUpdate(i),n=!0)}}),n||this.refresh()}}],o=[{key:"selector",get:function(){return"panel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"panel"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,l}(n(812).Component);m(g,"templateId","panel-template"),"undefined"!=typeof window&&(window.PanelComponent=g)},295(){},101(t,e,n){"use strict";n.r(e),n.d(e,{RadioGroupComponent:()=>w});var r=n(812),i=n(853);function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return a(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,a(f,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,r,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function h(t,e,n,r){var i=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",required:n.readBoolAttr("required",!1),requiredMessage:n.container.getAttribute("data-required-message")||"Please select one option.",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,required:n.config.required,options:n.config.options,value:"",invalid:!1,errorMessage:""},n.boundChange=function(){return n.handleChange()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e.map(function(t){return t&&"object"===l(t)?t:{value:t,label:String(t)}}):[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(d=o().m(function t(){var n;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-radio-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),this.applyOptionAttributes(),this.syncState(),this.validate(),null===(n=this.element)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),f=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=d.apply(t,e);function o(t){s(i,n,r,o,a,"next",t)}function a(t){s(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return f.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyOptionAttributes",value:function(){var t=this;this.optionsHost&&this.optionsHost.querySelectorAll('input[type="radio"]').forEach(function(e){t.config.name&&(e.name=t.config.name),t.config.required&&(e.required=!0)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=this.optionsHost.querySelector('input[type="radio"]:checked');this.state.value=(null==t?void 0:t.value)||""}}},{key:"handleChange",value:function(){this.syncState(),this.validate(),this.dispatchEvent("radiochange",{value:this.state.value})}},{key:"validate",value:function(){var t=!!this.config.required&&!this.state.value;return this.state.invalid=t,this.state.errorMessage=t?this.config.requiredMessage:"",this.element&&this.element.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=this.state.errorMessage),!t}},{key:"value",get:function(){return this.state.value||""},set:function(t){var e,n=null==t?"":String(t);Array.from((null===(e=this.optionsHost)||void 0===e?void 0:e.querySelectorAll('input[type="radio"]'))||[]).forEach(function(t){t.checked=t.value===n}),this.syncState(),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),h(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-radio"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"radio-group"}},{key:"getNativeSelectors",value:function(){return['input[type="radio"][component="radio"]','input[type="radio"][role="radio"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"radio"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","radio-group");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,d,f}(r.Component);m=w,g="radio-group-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.RadioGroupComponent=w)},953(){},108(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RegionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Region requires a container")}},{key:"init",value:(c=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=s(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-region"),this.content=this.container.querySelector('[data-role="region-content"]'),this.content&&(n=this.content).replaceChildren.apply(n,r),this.applyWidth();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyWidth",value:function(){if(this.element&&this.container){var t=Number(this.container.getAttribute("width")),e=Number.isNaN(t)||t<=0?12:Math.min(12,t);this.container.style.gridColumn="span ".concat(e),this.container.style.minWidth="0",this.element.style.setProperty("--holi-region-span",String(e))}}}],o=[{key:"selector",get:function(){return"region"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"region"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="region-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RegionComponent=g)},12(t,e,n){"use strict";n.r(e),n.d(e,{SearchComponent:()=>A});var r=n(812),i=n(62),o=n(76);function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),f=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=u,h(f,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(f),h(f,i,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function f(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,k(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var E,O,C,A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.readAttr(["data-endpoint","endpoint"],""),suggestionsEndpoint:n.readAttr(["data-suggestions-endpoint","data-suggest-endpoint","suggestions"],""),placeholder:n.readAttr(["placeholder","data-placeholder"],"Search..."),minLength:Math.max(1,Number(n.readAttr(["data-min-length","min-length"],"1"))||1),suggestionLimit:Math.max(1,Number(n.readAttr(["data-suggestion-limit","suggestion-limit"],"6"))||6),resultLimit:Math.max(1,Number(n.readAttr(["data-limit","limit"],"10"))||10),debounceMs:Math.max(0,Number(n.readAttr(["data-debounce-ms","debounce-ms"],"200"))||200)},n.state={query:"",suggestions:[],results:[],activeSuggestion:-1,open:!1,loading:!1},n.fetchSeq=0,n.debounceTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"parseJsonAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=String(this.container.getAttribute(t)||"").trim();if(!n)return e;try{var r=JSON.parse(n);return Array.isArray(r)?r:e}catch(t){return e}}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.renderSuggestions(),this.renderResults();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-search"),this.input=this.container.querySelector('[data-role="input"]'),this.suggestionPanel=this.container.querySelector('[data-role="suggestions"]'),this.suggestionList=this.container.querySelector('[data-role="suggestions-list"]'),this.resultsPanel=this.container.querySelector('[data-role="results"]'),this.resultsList=this.container.querySelector('[data-role="results-list"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.form=this.container.querySelector('[data-role="form"]'),this.loaderState=(0,i.w)(this,{host:this.resultsPanel||this.element,busyTarget:this.resultsPanel||this.element,scope:"block",defaultMessage:"Searching..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"search",eventName:"searchchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input&&(this.input.placeholder=this.config.placeholder,this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2)),this.suggestionList.id=n,this.input.setAttribute("aria-controls",n));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this;null===(t=this.input)||void 0===t||t.addEventListener("input",function(){var t=String(o.input.value||"").trim();o.state.query=t,o.state.activeSuggestion=-1,o.debounceTimer&&clearTimeout(o.debounceTimer),o.debounceTimer=setTimeout(function(){o.search(t)},o.config.debounceMs)}),null===(e=this.form)||void 0===e||e.addEventListener("submit",function(t){var e;t.preventDefault();var n=String((null===(e=o.input)||void 0===e?void 0:e.value)||"").trim();o.state.query=n,o.closeSuggestions(),o.search(n)}),null===(n=this.input)||void 0===n||n.addEventListener("keydown",function(t){return o.handleKeydown(t)}),null===(r=this.suggestionList)||void 0===r||r.addEventListener("mousedown",function(t){return t.preventDefault()}),null===(i=this.suggestionList)||void 0===i||i.addEventListener("click",function(t){return o.handleSuggestionClick(t)}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.closeSuggestions()}},{key:"handleSuggestionClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="suggestion"]');if(r){var i=String(r.getAttribute("data-value")||"").trim();i&&this.selectSuggestion(i)}}},{key:"handleKeydown",value:function(t){if(this.state.open&&this.state.suggestions.length)if("ArrowDown"!==t.key)if("ArrowUp"!==t.key){if("Enter"!==t.key)"Escape"===t.key&&(t.preventDefault(),this.closeSuggestions());else if(this.state.activeSuggestion>=0){t.preventDefault();var e=this.state.suggestions[this.state.activeSuggestion];this.selectSuggestion((null==e?void 0:e.value)||(null==e?void 0:e.label)||"")}}else{t.preventDefault();var n=this.state.activeSuggestion<=0?this.state.suggestions.length-1:this.state.activeSuggestion-1;this.setActiveSuggestion(n)}else{t.preventDefault();var r=(this.state.activeSuggestion+1)%this.state.suggestions.length;this.setActiveSuggestion(r)}else"Escape"===t.key&&this.closeSuggestions()}},{key:"setActiveSuggestion",value:function(t){var e,n=this;this.state.activeSuggestion=t,Array.from((null===(e=this.suggestionList)||void 0===e?void 0:e.querySelectorAll('[data-role="suggestion"]'))||[]).forEach(function(e,r){var i,o=r===t;e.setAttribute("aria-selected",o?"true":"false"),e.classList.toggle("is-active",o),o&&(e.scrollIntoView({block:"nearest"}),null===(i=n.input)||void 0===i||i.setAttribute("aria-activedescendant",e.id))})}},{key:"selectSuggestion",value:function(t){this.input&&(this.input.value=t,this.state.query=t,this.state.activeSuggestion=-1,this.closeSuggestions(),this.dispatchEvent("searchsuggestselect",{suggestion:t}),this.search(t))}},{key:"search",value:(f=p(d().m(function t(e){var n,r,i,o,a,s;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!((n=String(e||"").trim()).length<this.config.minLength)){t.n=1;break}return this.state.suggestions=[],this.state.results=[],this.state.activeSuggestion=-1,this.closeSuggestions(),this.renderSuggestions(),this.renderResults(),t.a(2);case 1:return r=++this.fetchSeq,this.setLoading(!0),t.p=2,t.n=3,Promise.all([this.fetchSuggestions(n),this.fetchResults(n)]);case 3:if(i=t.v,o=l(i,2),a=o[0],s=o[1],r===this.fetchSeq){t.n=4;break}return t.a(2);case 4:this.state.suggestions=a,this.state.results=s,this.state.activeSuggestion=-1,this.openSuggestionsIfNeeded(),this.renderSuggestions(),this.renderResults(),this.dispatchEvent("searchchange",{query:n,suggestionCount:a.length,resultCount:s.length});case 5:return t.p=5,r===this.fetchSeq&&this.setLoading(!1),t.f(5);case 6:return t.a(2)}},t,this,[[2,,5,6]])})),function(t){return f.apply(this,arguments)})},{key:"openSuggestionsIfNeeded",value:function(){var t,e,n=this.state.suggestions.length>0&&document.activeElement===this.input;this.state.open=n,this.suggestionPanel&&(this.suggestionPanel.hidden=!n),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded",n?"true":"false"),n||null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"closeSuggestions",value:function(){var t,e;this.state.open=!1,this.suggestionPanel&&(this.suggestionPanel.hidden=!0),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"fetchSuggestions",value:(h=p(d().m(function t(e){var n,r,i,o,a,s,l,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.suggestionsEndpoint){t.n=4;break}return(n=new URL(this.config.suggestionsEndpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.suggestionLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeSuggestionList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.label.toLowerCase().includes(a)}).slice(0,this.config.suggestionLimit));case 4:return s=this.parseJsonAttr("data-suggestions",[]),l=this.normalizeSuggestionList(s),u=e.toLowerCase(),t.a(2,l.filter(function(t){return t.label.toLowerCase().includes(u)}).slice(0,this.config.suggestionLimit))}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"fetchResults",value:(c=p(d().m(function t(e){var n,r,i,o,a,s,l,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.endpoint){t.n=4;break}return(n=new URL(this.config.endpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.resultLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeResultList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.title.toLowerCase().includes(a)||t.description.toLowerCase().includes(a)||t.url.toLowerCase().includes(a)}).slice(0,this.config.resultLimit));case 4:return s=this.parseJsonAttr("data-search-data",[]),l=this.normalizeResultList(s),u=e.toLowerCase(),t.a(2,l.filter(function(t){return t.title.toLowerCase().includes(u)||t.description.toLowerCase().includes(u)||t.url.toLowerCase().includes(u)}).slice(0,this.config.resultLimit))}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"normalizeSuggestionList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:[]).map(function(t){if(t&&"object"===s(t)){var e,n,r,i,o,a=String(null!==(e=null!==(n=null!==(r=null!==(i=t.label)&&void 0!==i?i:t.name)&&void 0!==r?r:t.title)&&void 0!==n?n:t.value)&&void 0!==e?e:"").trim();return{label:a,value:String(null!==(o=t.value)&&void 0!==o?o:a).trim()}}var l=String(null!=t?t:"").trim();return{label:l,value:l}}).filter(function(t){return t.label})}},{key:"normalizeResultList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.data)?t.data:[]).map(function(t){var e,n,r,i,o,a,l;return t&&"object"===s(t)?{title:String(null!==(e=null!==(n=null!==(r=t.title)&&void 0!==r?r:t.name)&&void 0!==n?n:t.label)&&void 0!==e?e:"").trim(),description:String(null!==(i=null!==(o=t.description)&&void 0!==o?o:t.content)&&void 0!==i?i:"").trim(),url:String(null!==(a=null!==(l=t.url)&&void 0!==l?l:t.href)&&void 0!==a?a:"").trim(),item:t}:{title:String(null!=t?t:"").trim(),description:"",url:"",item:t}}).filter(function(t){return t.title})}},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Searching...")}},{key:"getBindableState",value:function(){return{query:this.state.query||"",suggestions:a(this.state.suggestions||[]),results:a(this.state.results||[])}}},{key:"applyBindableState",value:function(t){if(t&&"object"===s(t)&&"string"==typeof t.query){var e=t.query.trim();e!==this.state.query&&(this.state.query=e,this.input&&(this.input.value=e),this.search(e))}}},{key:"renderSuggestions",value:function(){var t=this;if(this.suggestionList){this.suggestionList.replaceChildren();var e,n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2));this.suggestionList.id=n,this.state.suggestions.forEach(function(e,r){var i=document.createElement("li");i.className="holi-search-suggestion-row",i.setAttribute("role","presentation");var o=document.createElement("button");o.type="button",o.className="holi-search-suggestion",o.setAttribute("data-role","suggestion"),o.setAttribute("data-value",e.value),o.setAttribute("aria-selected","false"),o.setAttribute("role","option"),o.id="".concat(n,"-item-").concat(r),o.textContent=e.label,i.appendChild(o),t.suggestionList.appendChild(i)}),this.state.open&&this.state.suggestions.length>0?(this.suggestionPanel.hidden=!1,null===(e=this.input)||void 0===e||e.setAttribute("aria-expanded","true")):this.closeSuggestions()}}},{key:"renderResults",value:function(){var t=this;if(this.resultsList&&(this.resultsList.replaceChildren(),this.state.results.forEach(function(e){var n=document.createElement("article");n.className="holi-search-result",n.setAttribute("data-role","result");var r=document.createElement(e.url?"a":"h4");if(r.className="holi-search-result-title",r.textContent=e.title,e.url&&(r.href=e.url,r.setAttribute("data-role","result-link")),n.appendChild(r),e.description){var i=document.createElement("p");i.className="holi-search-result-description",i.textContent=e.description,n.appendChild(i)}t.resultsList.appendChild(n)}),this.emptyEl)){var e=this.state.query.length>=this.config.minLength;this.emptyEl.hidden=this.state.loading||!e||this.state.results.length>0}}},{key:"destroy",value:function(){var t,n,r,i;this.debounceTimer&&clearTimeout(this.debounceTimer),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),b(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"[data-search]"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"search"}}],r&&v(n.prototype,r),u&&v(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,h,f,m,g}(r.Component);E=A,C="search-template",(O=k(O="templateId"))in E?Object.defineProperty(E,O,{value:C,enumerable:!0,configurable:!0,writable:!0}):E[O]=C,"undefined"!=typeof window&&(window.SearchComponent=A)},796(t,e,n){"use strict";n.r(e),n.d(e,{SelectComponent:()=>w});var r=n(257),i=n(853);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,s(f,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(f),s(f,i,"Generator"),s(f,r,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){b(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function h(t,e,n){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var w=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,r=[{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(e,"getBindingContext",this,3)([c({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||""},r)])}},{key:"render",value:(s=a().m(function t(){var n,r=this;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.boundBlur||(this.boundBlur=function(){return r.validate()}),this.fieldRoot=this.container.querySelector(".holi-select-field")||this.element,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),null===(n=this.input)||void 0===n||n.addEventListener("blur",this.boundBlur),this.validate();case 2:return t.a(2)}},t,this)}),u=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=s.apply(t,e);function o(t){l(i,n,r,o,a,"next",t)}function a(t){l(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return u.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"readBoolAttr",value:function(t,n){return p(e,"readBooleanAttr",this,3)([t,n])}},{key:"applyFieldAttributes",value:function(){var t,e=this.container.getAttribute("name")||this.container.getAttribute("data-name")||"",n=this.readBoolAttr("required",!1)||this.readBoolAttr("data-required",!1),r=this.container.getAttribute("data-required-message")||"Please select an option.";this.required=n,this.requiredMessage=r,this.valueInput&&e&&(this.valueInput.name=e),this.input&&(this.input.required=n,this.input.setAttribute("aria-required",n?"true":"false"));var i=(null===(t=this.input)||void 0===t?void 0:t.id)||"holi-select-".concat(Math.random().toString(16).slice(2));this.input&&(this.input.id=i),this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",i);var o=this.container.getAttribute("value")||this.container.getAttribute("data-value");o&&(this.value=o)}},{key:"validate",value:function(){var t=!!this.required&&!this.value;return this.fieldRoot&&this.fieldRoot.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=t?this.requiredMessage:""),this.input&&this.input.setAttribute("aria-invalid",t?"true":"false"),!t}},{key:"selectItem",value:function(t){p(e,"selectItem",this,3)([t]),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.input)||void 0===t||t.removeEventListener("blur",this.boundBlur),p(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-select"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"select-field"}},{key:"getNativeSelectors",value:function(){return['select[component="select"]','select[role="select"]','select[component="select-field"]','select[role="select-field"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,i.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","select-field"),e.setAttribute("data-items",JSON.stringify((0,i.NQ)(t))),e.setAttribute("value",(0,i.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),o&&d(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,s,u}(r.DropdownComponent);b(w,"templateId","select-field-template"),"undefined"!=typeof window&&(window.SelectComponent=w)},911(t,e,n){"use strict";n.r(e),n.d(e,{StatsCard:()=>S});var r=n(812),i=n(76);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return s(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,s(f,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(f),s(f,i,"Generator"),s(f,r,function(){return this}),s(f,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function f(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.value=n.parseNumber(r.value,t.dataset.value,0),n.label=r.label||t.dataset.label||"Metric",n.trend=n.normalizeTrend(r.trend||t.dataset.trend||"neutral"),n.change=n.parseNumber(r.change,t.dataset.change,0),n.unit=r.unit||t.dataset.unit||"",n.animate=n.parseBoolean(r.animate,t.dataset.animate,!0),n.duration=n.parseNumber(r.duration,t.dataset.duration,1200),n.icon=r.icon||t.dataset.icon||n.getDefaultIcon(n.label),n.isAnimating=!1,n.valueEl=null,n.labelEl=null,n.changeEl=null,n.trendEl=null,n.iconEl=null,n.sparklineEl=null,n.frameId=null,void 0===n.container.statsCard&&Object.defineProperty(n.container,"statsCard",{value:n,writable:!1}),n.onMouseEnter=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.add("spark-active")},n.onMouseLeave=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.remove("spark-active")},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(!Number.isNaN(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=String(r).toLowerCase();if("true"===i||"1"===i||"yes"===i)return!0;if("false"===i||"0"===i||"no"===i)return!1}}return e}},{key:"normalizeTrend",value:function(t){var e=String(t||"neutral").toLowerCase();return["up","down","neutral"].includes(e)?e:"neutral"}},{key:"getDefaultIcon",value:function(t){return{revenue:"$",users:"U",orders:"O",conversion:"C",sales:"S"}[String(t||"").toLowerCase()]||"M"}},{key:"validateStructure",value:function(){if(f(e,"validateStructure",this,3)([]),this.duration<0)throw new Error("StatsCard duration must be >= 0")}},{key:"init",value:(h=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.update({value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon},{animate:this.animate});case 2:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"render",value:(l=u(a().m(function t(){var n,r,o,s,l,u;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".stats-card-view"),this.valueEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".stats-value"),this.labelEl=null===(r=this.element)||void 0===r?void 0:r.querySelector(".stats-label"),this.changeEl=null===(o=this.element)||void 0===o?void 0:o.querySelector(".change-value"),this.trendEl=null===(s=this.element)||void 0===s?void 0:s.querySelector(".change-trend"),this.iconEl=null===(l=this.element)||void 0===l?void 0:l.querySelector(".stats-icon"),this.sparklineEl=null===(u=this.element)||void 0===u?void 0:u.querySelector(".stats-sparkline"),this.element&&this.valueEl&&this.labelEl&&this.changeEl&&this.trendEl&&this.iconEl){t.n=2;break}throw new Error("StatsCard template is missing required nodes");case 2:this.stateBinding=(0,i.x)(this,{defaultPath:"statscard",eventName:"statsupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}});case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){this.container.addEventListener("mouseenter",this.onMouseEnter),this.container.addEventListener("mouseleave",this.onMouseLeave)}},{key:"applyStaticFields",value:function(){this.iconEl.textContent=this.icon,this.labelEl.textContent=this.label,this.changeEl.textContent="".concat(this.change>0?"+":"").concat(this.change.toFixed(1),"%"),this.trendEl.textContent=this.getTrendGlyph(this.trend),this.element.classList.remove("trend-up","trend-down","trend-neutral"),this.element.classList.add("trend-".concat(this.trend))}},{key:"getTrendGlyph",value:function(t){return"up"===t?"^":"down"===t?"v":"-"}},{key:"formatValue",value:function(t){return"$"===this.unit?"$".concat(Number(t).toLocaleString()):"%"===this.unit?"".concat(Number(t).toFixed(1),"%"):Number(t).toLocaleString()}},{key:"renderValue",value:function(t){this.valueEl.textContent=this.formatValue(t)}},{key:"animateValue",value:function(t,e){var n=this;if(!this.animate||0===this.duration)return this.renderValue(e),void(this.isAnimating=!1);this.frameId&&cancelAnimationFrame(this.frameId),this.isAnimating=!0;var r=null,i=e-t,o=function(e){null==r&&(r=e);var a=Math.min((e-r)/n.duration,1),s=1-Math.pow(1-a,3);n.renderValue(t+i*s),a<1?n.frameId=requestAnimationFrame(o):(n.frameId=null,n.isAnimating=!1)};this.frameId=requestAnimationFrame(o)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.value;void 0!==t.label&&(this.label=t.label),void 0!==t.unit&&(this.unit=t.unit),void 0!==t.icon&&(this.icon=t.icon),void 0!==t.value&&(this.value=this.parseNumber(t.value,this.value)),void 0!==t.change&&(this.change=this.parseNumber(t.change,this.change)),void 0!==t.trend&&(this.trend=this.normalizeTrend(t.trend)),this.applyStaticFields(),this.animateValue(e,this.value),this.dispatchEvent("statsupdate",{value:this.value,change:this.change,trend:this.trend,label:this.label})}},{key:"getBindableState",value:function(){return{value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon}}},{key:"applyBindableState",value:function(t){t&&"object"===o(t)&&this.update(t,{animate:!1})}},{key:"destroy",value:function(){var t,n;this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null),null===(t=this.stateBinding)||void 0===t||null===(n=t.disconnect)||void 0===n||n.call(t),this.container.removeEventListener("mouseenter",this.onMouseEnter),this.container.removeEventListener("mouseleave",this.onMouseLeave),f(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"[data-stats], .stats-card"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"statscard"}}],r&&c(n.prototype,r),s&&c(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,l,h}(r.Component);b=S,w="statscard",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.StatsCard=S)},396(t,e,n){"use strict";n.r(e),n.d(e,{TabsComponent:()=>g});var r=n(812),i=n(62),o=n(76);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,l(f,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(f),l(f,i,"Generator"),l(f,r,function(){return this}),l(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function f(t,e,n){return e=b(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n,r){var i=m(b(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},m.apply(null,arguments)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId="tabs",n.lazyLoad=n.container.hasAttribute("lazy"),n.cacheContent=!n.container.hasAttribute("no-cache"),n.preloadCount=parseInt(n.container.dataset.preload||0,10),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.panelCache=new Map,n.loadingStates=new Map,n.tabs=[],n.activeIndex=-1,!1!==r.autoInit&&n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"init",value:(S=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return y(e,"init",this,3)([]),t.n=1,this.resolveDataSource();case 1:return this.data=t.v,t.n=2,this.render();case 2:return this.bindEvents(),t.n=3,this.loadTabContent(0);case 3:return t.a(2)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"render",value:(w=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,y(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".tabs"),this.loaderState=(0,i.w)(this,{host:this.element,busyTarget:this.element,scope:"block",defaultMessage:"Loading tab..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"tabs",eventName:"tabchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.renderDataTabs(),this.refreshTabs(),t.n=2,this.switchToTab(0,!1);case 2:return t.a(2)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"renderDataTabs",value:function(){var t,e,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".tabbar"),r=null===(e=this.element)||void 0===e?void 0:e.querySelector(".tab_content_panels");n&&r&&(n.replaceChildren(),r.replaceChildren(),this.data.forEach(function(t,e){var i=document.createElement("li");i.className="link";var o=document.createElement("a");o.href="#",o.dataset.tab=String(e),o.textContent=(null==t?void 0:t.label)||"Tab ".concat(e+1);var a=document.createElement("span");a.className="tab-controls";var s=document.createElement("button");s.className="tab-refresh",s.title="Refresh",s.type="button",s.textContent="R";var l=document.createElement("button");l.className="close-tab",l.title="Close",l.type="button",l.textContent="X",a.append(s,l),o.appendChild(a),i.appendChild(o),n.appendChild(i);var u=document.createElement("div");u.className="tab_content_panel",u.id="tab-".concat(e);var c=document.createElement("div");c.className="tab_content",u.appendChild(c),r.appendChild(u)}))}},{key:"refreshTabs",value:function(){var t,e,n=(null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-tab]"))||[],r=(null===(e=this.element)||void 0===e?void 0:e.querySelectorAll(".tab_content_panel, .tab-content-panel"))||[];this.tabs=Array.from(n).map(function(t,e){return{link:t,panel:r[e]}}).filter(function(t){return t.panel})}},{key:"loadTabContent",value:(g=c(s().m(function t(e){var n,r,i,o,a,l=arguments;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],this.refreshTabs(),r=this.tabs[e]){t.n=1;break}return t.a(2);case 1:if(i=r.panel,o="tab-".concat(e),!this.cacheContent||!this.panelCache.has(o)||n){t.n=2;break}return this.setPanelContent(i,this.panelCache.get(o)),this.updateLoaderState(e,!1),t.a(2);case 2:return this.updateLoaderState(e,!0),t.p=3,t.n=4,this.fetchTabContent(e);case 4:a=t.v,this.cacheContent&&this.panelCache.set(o,a),this.setPanelContent(i,a),this.updateLoaderState(e,!1),t.n=6;break;case 5:t.p=5,t.v,this.setPanelError(i,"Load failed"),this.updateLoaderState(e,!1);case 6:return t.a(2)}},t,this,[[3,5]])})),function(t){return g.apply(this,arguments)})},{key:"getPanelContentElement",value:function(t){return t.querySelector(".tab_content")||t.querySelector(".tab-content")}},{key:"setPanelContent",value:function(t,e){var n=this.getPanelContentElement(t);n&&(e instanceof Node?n.replaceChildren(e):n.textContent=null==e?"":String(e))}},{key:"setPanelError",value:function(t,e){var n=this.getPanelContentElement(t);if(n){var r=document.createElement("div");r.className="error",r.textContent=e,n.replaceChildren(r)}}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(b=c(s().m(function t(){var e,n;return s().w(function(t){for(;;)switch(t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:return t.a(2,(null===(e=this.contentProviderInstance)||void 0===e?void 0:e.resolve(n))||[])}},t,this)})),function(){return b.apply(this,arguments)})},{key:"ensureProviderInstance",value:(m=c(s().m(function t(){var e,n,r,i,o;return s().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(e=this.getContentProviders(),n=e[this.providerName]){t.n=2;break}return console.warn('No ContentProvider "'.concat(this.providerName,'" found')),t.a(2,null);case 2:if(r=window.appState||window.pageContext||{},"function"!=typeof n){t.n=4;break}return this.contentProviderInstance=new n(r),t.n=3,null===(i=(o=this.contentProviderInstance).init)||void 0===i?void 0:i.call(o);case 3:t.n=5;break;case 4:"object"===a(n)?this.contentProviderInstance=n:this.contentProviderInstance=null;case 5:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateLoaderState",value:function(t,e){var n,r="tab-".concat(t);if(this.loadingStates.set(r,e),t===this.activeIndex||this.activeIndex<0){var i,o,a,s=(null===(i=this.data)||void 0===i||null===(i=i[t])||void 0===i?void 0:i.label)||"Tab ".concat(t+1);null===(o=this.loaderState)||void 0===o||null===(a=o.setLoading)||void 0===a||a.call(o,e,"Loading ".concat(s,"..."))}(null===(n=this.element)||void 0===n?void 0:n.querySelector('[data-loader="tab-'.concat(t,'"]')))&&this.dispatchEvent("staterefresh",{path:"loadingStates['tab-".concat(t,"']"),value:e})}},{key:"fetchTabContent",value:(p=c(s().m(function t(e){var n,r,i,o,a,l;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(i=this.data[e],null==(o=this.tabs[e])||null===(n=o.link)||void 0===n||!n.dataset.src){t.n=4;break}return t.n=2,fetch(o.link.dataset.src);case 2:return a=t.v,t.n=3,a.text();case 3:return t.a(2,t.v);case 4:return t.n=5,null===(r=this.contentProviderInstance)||void 0===r?void 0:r.getContent(i,e);case 5:if(l=t.v){t.n=6;break}l="";case 6:return t.a(2,l)}},t,this)})),function(t){return p.apply(this,arguments)})},{key:"bindEvents",value:function(){var t=this;this.on("click",function(){var e=c(s().m(function e(n){var r,i,o,a,l,u;return s().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest("[data-tab]"))){e.n=1;break}return n.preventDefault(),i=parseInt(r.dataset.tab,10),e.n=1,t.switchToTab(i);case 1:if(!n.target.closest(".tab-refresh")){e.n=2;break}if(!((a=parseInt((null===(o=n.target.closest("[data-tab]"))||void 0===o?void 0:o.dataset.tab)||"-1",10))>=0)){e.n=2;break}return e.n=2,t.refreshTab(a);case 2:n.target.closest(".close-tab")&&(u=parseInt((null===(l=n.target.closest("[data-tab]"))||void 0===l?void 0:l.dataset.tab)||"-1",10))>=0&&t.removeTab(u);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.on("keydown",function(e){var n;e.target.closest(".tabbar")&&(null===(n=t.handleKeyboardNavigation)||void 0===n||n.call(t,e))})}},{key:"switchToTab",value:(h=c(s().m(function t(e){var n,r=arguments;return s().w(function(t){for(;;)switch(t.n){case 0:if(n=!(r.length>1&&void 0!==r[1])||r[1],this.refreshTabs(),!(e<0||e>=this.tabs.length||e===this.activeIndex)){t.n=1;break}return t.a(2);case 1:if(this.updateTabVisuals(e),this.activeIndex=e,!n){t.n=2;break}return t.n=2,this.loadTabContent(e);case 2:this.dispatchEvent("tabchange",{index:e,data:this.data[e],fromCache:this.panelCache.has("tab-".concat(e))});case 3:return t.a(2)}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"updateTabVisuals",value:function(t){this.tabs.forEach(function(e,n){var r,i,o,a=n===t,s=null===(r=e.link)||void 0===r?void 0:r.parentElement;s&&(s.classList.toggle("active",a),null===(i=e.link)||void 0===i||i.setAttribute("aria-selected",String(a)),null===(o=e.link)||void 0===o||o.setAttribute("tabindex",a?"0":"-1")),e.panel.hidden=!a,e.panel.setAttribute("aria-hidden",String(!a))})}},{key:"refreshTab",value:(u=c(s().m(function t(e){return s().w(function(t){for(;;)switch(t.n){case 0:return this.panelCache.delete("tab-".concat(e)),t.n=1,this.loadTabContent(e,!0);case 1:return t.a(2)}},t,this)})),function(t){return u.apply(this,arguments)})},{key:"bindDataContext",value:function(t,n,r){var i;null===(i=y(e,"bindDataContext",this,3))||void 0===i||i([t,n,r]);var o=t.querySelector("a[data-tab]");o&&(o.dataset.tab=String(r))}},{key:"addTab",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tabs.length,r={label:t,contentUrl:e};this.data.splice(n,0,r),this.refresh(),this.switchToTab(n)}},{key:"removeTab",value:function(t){this.refreshTabs(),this.tabs.length<=1||(this.panelCache.delete("tab-".concat(t)),this.loadingStates.delete("tab-".concat(t)),this.data.splice(t,1),this.refresh())}},{key:"clearCache",value:function(){this.panelCache.clear(),this.loadingStates.clear()}},{key:"getBindableState",value:function(){var t;return{activeIndex:this.activeIndex,label:(null===(t=this.data)||void 0===t||null===(t=t[this.activeIndex])||void 0===t?void 0:t.label)||""}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.activeIndex);Number.isInteger(e)&&(e<0||e>=this.tabs.length||e!==this.activeIndex&&this.switchToTab(e,!0))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),y(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"tabs"}},{key:"library",get:function(){return"holi"}},{key:"matchesLibrary",value:function(t,n){return y(e,"matchesLibrary",this,2)([t,n])}}],r&&d(n.prototype,r),l&&d(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,u,h,p,m,b,g,w,S}(r.Component);"undefined"!=typeof window&&(window.TabsComponent=g)},618(t,e,n){"use strict";n.r(e),n.d(e,{TextAreaComponent:()=>S});var r=n(812),i=n(573);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,l(f,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(f),l(f,i,"Generator"),l(f,r,function(){return this}),l(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function f(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.config={name:n.readAttr("name"),label:n.readAttr("label"),placeholder:n.readAttr("placeholder"),rows:Number(n.readAttr("rows","4"))||4,required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={name:n.config.name,label:n.config.label,placeholder:n.config.placeholder,rows:n.config.rows,required:n.config.required,disabled:n.config.disabled,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(l=s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-textarea"),this.inputEl=this.container.querySelector('[data-role="control"]'),this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=l.apply(t,e);function o(t){u(i,n,r,o,a,"next",t)}function a(t){u(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.inputEl){this.inputEl.value=this.state.value,this.inputEl.name=this.config.name||"",this.inputEl.placeholder=this.config.placeholder||"",this.inputEl.rows=this.config.rows,this.inputEl.required=!!this.config.required,this.inputEl.disabled=!!this.config.disabled;var t=this.inputEl.id||"holi-textarea-".concat(Math.random().toString(16).slice(2));this.inputEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.inputEl&&(this.inputEl.addEventListener("input",this.boundInput),this.inputEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("textareachange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){return i.D.validateToken(t,e,{element:this.inputEl,component:this})}},{key:"updateView",value:function(){this.element&&this.inputEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.inputEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.inputEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.inputEl&&(this.inputEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.inputEl&&(this.inputEl.removeEventListener("input",this.boundInput),this.inputEl.removeEventListener("blur",this.boundBlur)),f(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-textarea"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"textarea-field"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,h}(r.Component);b=S,w="textarea-field-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.TextAreaComponent=S)},9(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return a(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,a(f,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,r,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function h(t,e,n,r){var i=f(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ToastComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.toastId=n.container.getAttribute("id")||n.container.getAttribute("toast-id")||"",n.scope=n.resolveScope(n.container.getAttribute("scope")||n.container.getAttribute("data-scope")||"page"),n.blockParentSelector=n.resolveBlockParentSelector(n.container.getAttribute("block-parent")||n.container.getAttribute("data-block-parent")||""),n.position=n.resolvePosition(n.container.getAttribute("position")||n.container.getAttribute("data-position")||"top-right"),n.defaultDuration=n.parseNumber(n.container.getAttribute("duration")||n.container.getAttribute("data-duration"),4e3),n.maxItems=n.parseNumber(n.container.getAttribute("max-items")||n.container.getAttribute("data-max-items"),5),n.newestOnTop=!n.container.hasAttribute("newest-bottom"),n.blockParentEl=null,n.appliedRelativeParent=!1,n.items=[],n.counter=0,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolvePosition",value:function(t){var e=String(t||"top-right").toLowerCase();return new Set(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center"]).has(e)?e:"top-right"}},{key:"resolveScope",value:function(t){var e=String(t||"page").toLowerCase();return"inline"===e||"block"===e?e:"page"}},{key:"resolveBlockParentSelector",value:function(t){return String(t||"").trim()}},{key:"resolveBlockParent",value:function(){return"undefined"==typeof document?null:this.blockParentSelector?document.querySelector(this.blockParentSelector):this.container.parentElement||this.container}},{key:"ensureBlockParentPositionContext",value:function(){"block"===this.scope&&this.blockParentEl&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.blockParentEl).position&&(this.blockParentEl.style.position="relative",this.appliedRelativeParent=!0)}},{key:"init",value:(d=l(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(s=l(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-toast-root"),this.stackEl=this.container.querySelector('[data-role="stack"]'),this.element&&(this.element.setAttribute("data-position",this.position),this.element.setAttribute("data-scope",this.scope)),"block"===this.scope&&this.element&&(this.blockParentEl=this.resolveBlockParent(),this.blockParentEl&&this.element.parentElement!==this.blockParentEl&&(this.blockParentEl.appendChild(this.element),this.ensureBlockParentPositionContext())),this.container.hidden="block"===this.scope;case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e=this;null===(t=this.element)||void 0===t||t.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-action="dismiss"]');if(i){var o=i.closest("[data-toast-item]");o&&e.hide(o.getAttribute("data-toast-item"),"dismiss")}}),this.toastId&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-toast-target="'.concat(e.toastId,'"]'));i&&e.show({type:i.getAttribute("data-toast-type")||"info",title:i.getAttribute("data-toast-title")||"",message:i.getAttribute("data-toast-message")||"",duration:e.parseNumber(i.getAttribute("data-toast-duration"),e.defaultDuration)})})}},{key:"normalizePayload",value:function(t){if("string"==typeof t)return{message:t,type:"info",duration:this.defaultDuration};var e=t||{};return{type:String(e.type||"info").toLowerCase(),title:String(e.title||""),message:String(e.message||""),duration:this.parseNumber(e.duration,this.defaultDuration)}}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.stackEl)return null;var n=this.normalizePayload(e);if(!n.message&&!n.title)return null;var r="toast-".concat(Date.now(),"-").concat(this.counter+=1),o=this.createToastNode(r,n);if(this.newestOnTop?this.stackEl.prepend(o):this.stackEl.appendChild(o),this.items.push({id:r,node:o,timer:null,duration:n.duration}),this.enforceMaxItems(),requestAnimationFrame(function(){o.setAttribute("data-state","shown")}),n.duration>0){var a=this.items.find(function(t){return t.id===r});a&&(a.timer=setTimeout(function(){return t.hide(r,"timeout")},n.duration))}return this.dispatchEvent("toastshown",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){y(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({id:r},n)),r}},{key:"createToastNode",value:function(t,e){var n=document.createElement("article");n.className="holi-toast-item toast-".concat(e.type),n.setAttribute("data-toast-item",t),n.setAttribute("data-state","enter"),n.setAttribute("role","error"===e.type?"alert":"status"),n.setAttribute("aria-live","error"===e.type?"assertive":"polite"),n.setAttribute("aria-atomic","true");var r=document.createElement("div");if(r.className="holi-toast-body",e.title){var i=document.createElement("strong");i.className="holi-toast-title",i.textContent=e.title,r.appendChild(i)}if(e.message){var o=document.createElement("div");o.className="holi-toast-message",o.textContent=e.message,r.appendChild(o)}var a=document.createElement("button");return a.type="button",a.className="holi-toast-close",a.setAttribute("data-action","dismiss"),a.setAttribute("aria-label","Dismiss"),a.textContent="x",n.append(r,a),n}},{key:"hide",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"manual",r=this.items.findIndex(function(e){return e.id===t});if(!(r<0)){var i=this.items[r];clearTimeout(i.timer),i.node.setAttribute("data-state","hide"),setTimeout(function(){i.node.remove(),e.items.splice(r,1),e.dispatchEvent("toasthidden",{id:t,reason:n})},180)}}},{key:"clear",value:function(){var t=this;this.items.map(function(t){return t.id}).forEach(function(e){return t.hide(e,"clear")})}},{key:"enforceMaxItems",value:function(){if(!(this.maxItems<=0))for(;this.items.length>this.maxItems;){var t=this.newestOnTop?this.items[0]:this.items[this.items.length-1];if(!t)break;this.hide(t.id,"overflow")}}},{key:"destroy",value:function(){this.appliedRelativeParent&&this.blockParentEl&&(this.blockParentEl.style.position=""),h(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"toast"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"toast"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,s,d}(n(812).Component);y(b,"templateId","toast-template"),"undefined"!=typeof window&&(window.ToastComponent=b)},648(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,i,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return o(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,o(f,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(f),o(f,a,"Generator"),o(f,r,function(){return this}),o(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=h(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{TreeComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.singleExpand=n.container.hasAttribute("single-expand"),n.loaderName=n.container.getAttribute("children-loader")||"",n.childrenLoader=n.resolveChildrenLoader(n.loaderName),n.onSelect="function"==typeof r.onSelect?r.onSelect:null,n.globalNoCache=n.container.hasAttribute("no-cache"),n.globalCacheTtl=n.parseNumber(n.container.getAttribute("cache-ttl"),3e5),n.childrenCache=new Map,n.loadingRequests=new Map,n.draggableNodes=n.container.hasAttribute("draggable-nodes"),n.reorderHandlerName=n.container.getAttribute("reorder-handler")||"",n.reorderHandler=n.resolveReorderHandler(n.reorderHandlerName),n.dragState={sourceItem:null,dropTarget:null},n.element=null,n.treeHost=null,n.treeRoot=null,n.activeTrigger=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,o=[{key:"resolveChildrenLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"resolveReorderHandler",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('Tree requires a nested list in slot="tree".')}},{key:"init",value:(m=s(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.syncFocusTargets();case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"render",value:(y=s(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-tree"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),r&&this.treeHost&&this.treeHost.replaceChildren(r),this.treeRoot=null===(n=this.treeHost)||void 0===n?void 0:n.querySelector("ul, ol"),this.treeRoot){t.n=2;break}return t.a(2);case 2:this.treeRoot.classList.add("holi-tree-level","holi-tree-root"),this.treeRoot.setAttribute("role","tree"),this.decorateLevel(this.treeRoot,1);case 3:return t.a(2)}},t,this)})),function(){return y.apply(this,arguments)})},{key:"decorateLevel",value:function(t,e){var n=this;t.setAttribute("data-depth",String(e)),Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-tree-item"),t.setAttribute("role","treeitem"),t.setAttribute("aria-level",String(e));var r=n.ensureTrigger(t),i=n.getDirectSubmenu(t),o="true"===t.getAttribute("data-lazy")||t.hasAttribute("data-lazy"),a=!!i||o;n.ensureNodeKey(t),n.draggableNodes&&(t.setAttribute("draggable","true"),t.classList.add("is-draggable")),r&&r.classList.add("holi-tree-trigger"),a?(t.classList.add("has-children"),n.ensureExpander(t,r),t.setAttribute("aria-expanded","false"),i&&(i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,n.decorateLevel(i,e+1))):t.setAttribute("aria-expanded","false")})}},{key:"ensureTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("BUTTON"===r.tagName||"A"===r.tagName||r.hasAttribute("data-tree-trigger"))return r}var i=this.extractItemLabel(t),o=document.createElement("button");return o.type="button",o.textContent=i||"Node",o.setAttribute("data-tree-trigger","true"),t.insertBefore(o,t.firstChild),o}},{key:"getTrigger",value:function(t){if(!t)return null;for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-trigger"))return i;if("BUTTON"===i.tagName||"A"===i.tagName||i.hasAttribute("data-tree-trigger"))return i}return null}},{key:"ensureExpander",value:function(t,e){var n=Array.from(t.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-expander")});if(n)return n;var r=document.createElement("button");return r.type="button",r.className="holi-tree-expander",r.setAttribute("data-tree-expander","true"),r.setAttribute("aria-label","Toggle children"),r.textContent="+",t.insertBefore(r,e||t.firstChild),r}},{key:"extractItemLabel",value:function(t){for(var e=Array.from(t.childNodes),n=0;n<e.length;n+=1){var r=e[n];if(r.nodeType===Node.TEXT_NODE){var i=String(r.textContent||"").trim();if(i)return r.textContent="",i}}return t.getAttribute("data-label")||""}},{key:"getDirectSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("UL"===r.tagName||"OL"===r.tagName)return r}return null}},{key:"getDirectExpander",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-expander"))return i}return null}},{key:"bindEvents",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.onClick(e)}),this.element.addEventListener("keydown",function(e){return t.onKeydown(e)}),this.element.addEventListener("focusin",function(e){var n=e.target.closest(".holi-tree-trigger");n&&(t.activeTrigger=n),t.syncFocusTargets()}),this.draggableNodes&&(this.element.addEventListener("dragstart",function(e){return t.onDragStart(e)}),this.element.addEventListener("dragover",function(e){return t.onDragOver(e)}),this.element.addEventListener("dragleave",function(e){return t.onDragLeave(e)}),this.element.addEventListener("drop",function(e){return t.onDrop(e)}),this.element.addEventListener("dragend",function(){return t.onDragEnd()})))}},{key:"onClick",value:function(t){var e=t.target.closest("[data-tree-expander]"),n=t.target.closest(".holi-tree-trigger"),r=e||n;if(r){var i=r.closest(".holi-tree-item");if(i&&"true"!==i.getAttribute("data-loading")){if(e&&i.classList.contains("has-children"))return t.preventDefault(),void this.toggleItem(i);n&&t.preventDefault(),this.activeTrigger=n;var o={item:i,id:i.getAttribute("data-node-id")||null,label:this.getNodeLabel(i)};this.onSelect&&this.onSelect(o),this.dispatchEvent("treeselect",o),this.syncFocusTargets()}}}},{key:"onKeydown",value:function(t){var e=t.target.closest(".holi-tree-trigger");if(e){var n=e.closest(".holi-tree-item");if(n){var r,i,o=this.getVisibleTriggers(),a=o.indexOf(e);if("ArrowDown"===t.key&&a>=0)return t.preventDefault(),void(null===(r=o[Math.min(a+1,o.length-1)])||void 0===r||r.focus());if("ArrowUp"===t.key&&a>=0)return t.preventDefault(),void(null===(i=o[Math.max(a-1,0)])||void 0===i||i.focus());if("ArrowRight"!==t.key)if("ArrowLeft"!==t.key){if("Enter"===t.key||" "===t.key){if(!n.classList.contains("has-children"))return;t.preventDefault(),this.toggleItem(n)}}else{if(t.preventDefault(),this.isExpanded(n))return void this.collapseItem(n);var s=this.getParentItem(n),l=s?this.getTrigger(s):null;null==l||l.focus()}else{if(t.preventDefault(),!this.isExpanded(n)&&n.classList.contains("has-children"))return void this.expandItem(n);var u=this.getFirstChildTrigger(n);null==u||u.focus()}}}}},{key:"getVisibleTriggers",value:function(){var t=this;return Array.from(this.element.querySelectorAll(".holi-tree-trigger")).filter(function(e){var n=e.closest(".holi-tree-item");return t.isItemVisible(n)})}},{key:"isItemVisible",value:function(t){if(!t)return!1;for(var e=t;e;){var n=this.getParentItem(e);if(!n)return!0;var r=this.getDirectSubmenu(n);if(null!=r&&r.hidden)return!1;e=n}return!0}},{key:"getParentItem",value:function(t){var e=null==t?void 0:t.parentElement;return e?e.closest(".holi-tree-item"):null}},{key:"getFirstChildTrigger",value:function(t){var e=this.getDirectSubmenu(t);if(!e||e.hidden)return null;var n=Array.from(e.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")});return n?this.getTrigger(n):null}},{key:"isExpanded",value:function(t){return"true"===t.getAttribute("aria-expanded")}},{key:"toggleItem",value:(v=s(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(!this.isExpanded(e)){t.n=1;break}this.collapseItem(e),t.n=2;break;case 1:return t.n=2,this.expandItem(e);case 2:return t.a(2)}},t,this)})),function(t){return v.apply(this,arguments)})},{key:"expandItem",value:(f=s(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return this.singleExpand&&this.collapseSiblings(e),t.n=1,this.ensureChildrenLoaded(e);case 1:if(n=this.getDirectSubmenu(e)){t.n=2;break}return t.a(2);case 2:n.hidden=!1,e.setAttribute("aria-expanded","true"),(r=this.getDirectExpander(e))&&(r.textContent="-"),this.syncFocusTargets(),this.dispatchEvent("treeexpand",{item:e,id:e.getAttribute("data-node-id")||null});case 3:return t.a(2)}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"collapseItem",value:function(t){var e=this.getDirectSubmenu(t);if(e){e.hidden=!0,t.setAttribute("aria-expanded","false");var n=this.getDirectExpander(t);n&&(n.textContent="+"),this.syncFocusTargets(),this.dispatchEvent("treecollapse",{item:t,id:t.getAttribute("data-node-id")||null})}}},{key:"collapseSiblings",value:function(t){var e=this,n=t.parentElement;n&&Array.from(n.children).forEach(function(n){var r;n!==t&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-tree-item")&&e.isExpanded(n)&&e.collapseItem(n)})}},{key:"ensureChildrenLoaded",value:(h=s(i().m(function t(e){var n,r,o,a,l,u,c,d=this;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(("true"===e.getAttribute("data-lazy")||e.hasAttribute("data-lazy"))&&this.childrenLoader){t.n=1;break}return t.a(2);case 1:if(n=this.ensureNodeKey(e),r=this.getCachePolicy(e),o=r.allowCache,a=r.ttl,l=Date.now(),!o){t.n=2;break}if(!((u=this.childrenCache.get(n))&&l-u.timestamp<=a)){t.n=2;break}return this.applyLoadedChildren(e,u.nodes),t.a(2);case 2:if(!this.loadingRequests.has(n)){t.n=4;break}return t.n=3,this.loadingRequests.get(n);case 3:case 7:return t.a(2);case 4:return c=s(i().m(function t(){var r,a,s;return i().w(function(t){for(;;)switch(t.n){case 0:return d.setNodeLoading(e,!0),r=e.getAttribute("data-node-id")||"",t.n=1,Promise.resolve(d.childrenLoader({id:r,item:e,tree:d}));case 1:a=t.v,s=Array.isArray(a)?a:[],d.applyLoadedChildren(e,s),o&&d.childrenCache.set(n,{timestamp:Date.now(),nodes:s});case 2:return t.a(2)}},t)}))(),this.loadingRequests.set(n,c),t.p=5,t.n=6,c;case 6:return t.p=6,this.loadingRequests.delete(n),this.setNodeLoading(e,!1),t.f(6)}},t,this,[[5,,6,7]])})),function(t){return h.apply(this,arguments)})},{key:"getCachePolicy",value:function(t){var e=t.hasAttribute("data-no-cache");if(this.globalNoCache||e)return{allowCache:!1,ttl:0};var n=this.parseNumber(t.getAttribute("data-cache-ttl"),this.globalCacheTtl);return{allowCache:!0,ttl:Math.max(0,n)}}},{key:"applyLoadedChildren",value:function(t,e){var n=this,r=Array.isArray(e)?e:[],i=this.getDirectSubmenu(t);i||(i=document.createElement("ul"),t.appendChild(i)),i.replaceChildren(),i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,r.forEach(function(t){i.appendChild(n.createNodeFromData(t))});var o=Number(t.getAttribute("aria-level")||1);this.decorateLevel(i,o+1),t.setAttribute("data-loaded","true"),r.length||t.removeAttribute("data-lazy")}},{key:"setNodeLoading",value:function(t,e){var n=this.getTrigger(t),r=this.getDirectExpander(t);t.setAttribute("data-loading",e?"true":"false"),t.setAttribute("aria-busy",e?"true":"false"),n&&(n.disabled=!!e),r&&(r.disabled=!!e,r.textContent=e?"...":this.isExpanded(t)?"-":"+")}},{key:"createNodeFromData",value:function(t){var e=this,n=document.createElement("li");n.className="holi-tree-item",t&&"object"===r(t)&&(null!=t.id&&n.setAttribute("data-node-id",String(t.id)),t.lazy&&n.setAttribute("data-lazy","true"));var i=document.createElement("button");if(i.type="button",i.className="holi-tree-trigger",i.textContent=null!=(null==t?void 0:t.label)?String(t.label):"Node",n.appendChild(i),Array.isArray(null==t?void 0:t.children)&&t.children.length){var o=document.createElement("ul");t.children.forEach(function(t){return o.appendChild(e.createNodeFromData(t))}),n.appendChild(o)}return n}},{key:"syncFocusTargets",value:function(){if(this.element){var t=this.getVisibleTriggers();t.forEach(function(t){return t.setAttribute("tabindex","-1")}),t.length&&(this.activeTrigger&&t.includes(this.activeTrigger)?this.activeTrigger:t[0]).setAttribute("tabindex","0")}}},{key:"ensureNodeKey",value:function(t){var e=t.getAttribute("data-node-id")||t.getAttribute("data-node-key");if(e)return t.hasAttribute("data-node-key")||t.setAttribute("data-node-key",String(e)),String(e);var n="node-".concat(Math.random().toString(36).slice(2,10));return t.setAttribute("data-node-key",n),n}},{key:"getNodeLabel",value:function(t){var e=this.getTrigger(t);return e?String(e.textContent||"").trim():""}},{key:"onDragStart",value:function(t){var e=t.target.closest(".holi-tree-item");if(e){this.dragState.sourceItem=e,e.classList.add("dragging");var n=e.getAttribute("data-node-id")||this.ensureNodeKey(e);t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",n)),this.dispatchEvent("treedragstart",{id:n,item:e})}}},{key:"onDragOver",value:function(t){var e=t.target.closest(".holi-tree-item");this.canDropOn(e)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.markDropTarget(e))}},{key:"onDragLeave",value:function(t){var e=t.target.closest(".holi-tree-item");e&&(e.contains(t.relatedTarget)||e.classList.remove("drop-target"))}},{key:"onDrop",value:(c=s(i().m(function t(e){var n,r,o,a,s,l,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=e.target.closest(".holi-tree-item"),this.canDropOn(r)){t.n=1;break}return t.a(2);case 1:if(e.preventDefault(),o=this.dragState.sourceItem,a=o.getAttribute("data-node-id")||this.ensureNodeKey(o),s=r.getAttribute("data-node-id")||this.ensureNodeKey(r),null===(n=r.parentElement)||void 0===n||n.insertBefore(o,r),l=Number(r.getAttribute("aria-level")||1),this.updateSubtreeLevels(o,l),this.syncFocusTargets(),u={source:o,target:r,fromId:a,toId:s,position:"before"},this.dispatchEvent("treereorder",u),!this.reorderHandler){t.n=2;break}return t.n=2,Promise.resolve(this.reorderHandler(u));case 2:this.onDragEnd();case 3:return t.a(2)}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"onDragEnd",value:function(){var t;Array.from((null===(t=this.element)||void 0===t?void 0:t.querySelectorAll(".holi-tree-item"))||[]).forEach(function(t){return t.classList.remove("dragging","drop-target")}),this.dragState.sourceItem=null}},{key:"markDropTarget",value:function(t){this.dragState.dropTarget&&this.dragState.dropTarget!==t&&this.dragState.dropTarget.classList.remove("drop-target"),this.dragState.dropTarget=t,t.classList.add("drop-target")}},{key:"canDropOn",value:function(t){var e=this.dragState.sourceItem;return!(!e||!t||e===t||e.contains(t))}},{key:"updateSubtreeLevels",value:function(t,e){var n=this;t.setAttribute("aria-level",String(e));var r=this.getDirectSubmenu(t);r&&Array.from(r.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")}).forEach(function(t){return n.updateSubtreeLevels(t,e+1)})}}],a=[{key:"selector",get:function(){return"tree"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"tree"}}],o&&l(n.prototype,o),a&&l(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,a,c,h,f,v,y,m}(n(812).Component);y=g,b="tree-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.TreeComponent=g)},712(t,e,n){"use strict";n.r(e),n.d(e,{TreePanelComponent:()=>O});var r=n(812),i=n(648);function o(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),f=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=u,h(f,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(f),h(f,i,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function f(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var O=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.viewMode=n.resolveViewMode(t.getAttribute("detail-view")),n.loaderName=t.getAttribute("details-loader")||"",n.detailsLoader=n.resolveDetailsLoader(n.loaderName),n.detailsSource=String(t.getAttribute("data-details-source")||t.getAttribute("details-source")||"").trim(),n.detailsMethod=String(t.getAttribute("data-details-method")||"GET").toUpperCase(),n.inlineEditEnabled=n.readBooleanAttr(t,"data-inline-edit"),n.saveMethod=String(t.getAttribute("data-save-method")||"PUT").toUpperCase(),n.treeInstance=null,n.state={selectedId:null,selectedLabel:"",loading:!1,editing:!1,saving:!1},n.currentDetails=null,n.editDraft=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!t||!e)return!1;if(!t.hasAttribute(e))return!1;var n=String(t.getAttribute(e)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"resolveViewMode",value:function(t){var e=String(t||"datapanel").trim().toLowerCase();return"table"===e?"datatable":"panel"===e?"datapanel":"grid"===e?"datagrid":"datatable"===e||"datagrid"===e||"datapanel"===e?e:"datapanel"}},{key:"resolveDetailsLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"validateStructure",value:function(){if(b(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('TreePanel requires a nested tree list in slot="tree".')}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n,r=this;return d().w(function(t){for(;;)switch(t.n){case 0:return n=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-treepanel"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),this.titleEl=this.container.querySelector('[data-role="detail-title"]'),this.statusEl=this.container.querySelector('[data-role="detail-status"]'),this.panelBody=this.container.querySelector('[data-role="panel-body"]'),this.tableEl=this.container.querySelector('[data-role="detail-table"]'),this.tableHead=this.container.querySelector('[data-role="table-head"]'),this.tableBody=this.container.querySelector('[data-role="table-body"]'),this.gridEl=this.container.querySelector('[data-role="detail-grid"]'),this.headerDefault=this.container.querySelector('[data-role="header-default"]'),this.footerDefault=this.container.querySelector('[data-role="footer-default"]'),this.contentDefault=this.container.querySelector('[data-role="content-default"]'),this.editButton=this.container.querySelector('[data-role="edit-button"]'),this.saveButton=this.container.querySelector('[data-role="save-button"]'),this.cancelButton=this.container.querySelector('[data-role="cancel-button"]'),this.headerSlotContent=this.mountNamedSlot("header",this.headerDefault),this.footerSlotContent=this.mountNamedSlot("footer",this.footerDefault),this.contentSlotContent=this.mountNamedSlot("content",this.contentDefault),this.hasCustomContent=!!this.contentSlotContent,this.customContentMode=this.resolveCustomContentMode(),n&&this.treeHost&&this.treeHost.replaceChildren(n),["single-expand","children-loader","cache-ttl","no-cache"].forEach(function(t){r.container.hasAttribute(t)&&r.treeHost&&r.treeHost.setAttribute(t,r.container.getAttribute(t)||"")}),this.treeHost&&!this.treeHost.hasAttribute("children-loader")&&this.treeHost.setAttribute("children-loader","loadTreeChildren"),this.applyViewMode(),this.updateEditControls(),this.setLoading(!1,""),this.treeHost&&(this.treeInstance=new i.TreeComponent(this.treeHost,{onSelect:function(t){r.loadNodeDetails(t)}}));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"mountNamedSlot",value:function(t,e){var n=this.container.querySelector('slot[name="'.concat(t,'"]')),r=this.container.querySelector('[slot="'.concat(t,'"]'));return n?r?(e&&(e.hidden=!0),n.replaceWith(r),r):(n.remove(),null):null}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;if("reload-selected"!==r)return"edit-details"===r?(e.preventDefault(),void t.startEditing()):"cancel-edit"===r?(e.preventDefault(),void t.cancelEditing()):void("save-details"===r&&(e.preventDefault(),t.saveDetails()));e.preventDefault(),t.state.selectedId&&t.loadNodeDetails({id:t.state.selectedId,label:t.state.selectedLabel,item:null},!0)})}},{key:"applyViewMode",value:function(){var t=this;this.customContentMode||(this.container.querySelectorAll("[data-view]").forEach(function(e){e.hidden=e.getAttribute("data-view")!==t.viewMode}),this.hasCustomContent&&this.contentDefault&&(this.contentDefault.hidden=!0))}},{key:"loadNodeDetails",value:(f=p(d().m(function t(e){var n,r,i,o,a,s,l=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],r=(null==e?void 0:e.id)||"",i=(null==e?void 0:e.label)||r||"Node",this.state.editing=!1,this.editDraft=null,this.state.selectedId=r,this.state.selectedLabel=i,this.updateEditControls(),this.setLoading(!0,i),t.p=1,o=null,!this.detailsLoader){t.n=3;break}return t.n=2,Promise.resolve(this.detailsLoader({id:r,label:i,item:(null==e?void 0:e.item)||null,forceReload:n}));case 2:o=t.v,t.n=5;break;case 3:if(!this.detailsSource){t.n=5;break}return t.n=4,this.fetchDetailsFromSource({id:r,label:i,item:(null==e?void 0:e.item)||null});case 4:o=t.v;case 5:a=this.normalizeDetailsPayload(o,r,i),this.renderDetails(a),t.n=7;break;case 6:t.p=6,s=t.v,this.renderDetails({title:i,fields:{error:String((null==s?void 0:s.message)||s||"Failed to load details")},columns:["field","value"],rows:[]});case 7:return t.p=7,this.setLoading(!1,i),t.f(7);case 8:return t.a(2)}},t,this,[[1,6,7,8]])})),function(t){return f.apply(this,arguments)})},{key:"fetchDetailsFromSource",value:(h=p(d().m(function t(e){var n,r,i,o;return d().w(function(t){for(;;)switch(t.n){case 0:if(n=this.buildDetailsSourceUrl(e)){t.n=1;break}return t.a(2,null);case 1:return t.n=2,fetch(n,{method:this.detailsMethod||"GET",credentials:"same-origin"});case 2:if((r=t.v).ok){t.n=3;break}throw new Error("Details request failed (".concat(r.status,")"));case 3:return t.n=4,r.json();case 4:if(!(i=t.v)||"object"!==c(i)){t.n=7;break}if(!i.detail||"object"!==c(i.detail)){t.n=5;break}return t.a(2,i.detail);case 5:if(!i.node||"object"!==c(i.node)){t.n=6;break}return t.a(2,i.node);case 6:if(!((o=i.nodes)&&"object"===c(o)&&null!=e&&e.id&&o[e.id])){t.n=7;break}return t.a(2,o[e.id]);case 7:return t.a(2,i)}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"buildDetailsSourceUrl",value:function(t){var e=String(this.detailsSource||"").trim();if(!e)return"";var n=null==(null==t?void 0:t.id)?"":String(t.id),r=null==(null==t?void 0:t.label)?"":String(t.label),i={id:encodeURIComponent(n),label:encodeURIComponent(r)},o=e;if((o=(o=o.replace(/@\{id\}/g,i.id).replace(/\{id\}/g,i.id).replace(/:id\b/g,i.id)).replace(/@\{label\}/g,i.label).replace(/\{label\}/g,i.label).replace(/:label\b/g,i.label))===e&&n){var a=o.includes("?");/(?:\?|&)(?:node|id)=/i.test(o)||(o+="".concat(a?"&":"?","node=").concat(i.id))}return o}},{key:"normalizeDetailsPayload",value:function(t,e,n){var r=t&&"object"===c(t)?t:{},i=r.fields&&"object"===c(r.fields)?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},r.fields):{},o=[];Array.isArray(r.rows)?o=r.rows:Array.isArray(r.items)?o=r.items:Array.isArray(r.data)&&(o=r.data);var a=this.normalizeColumns(r.columns,o,i);return Object.keys(i).length||o.length||(i.id=e||"",i.label=n||""),{title:String(r.title||n||"Node Details"),fields:i,columns:a,rows:o}}},{key:"normalizeColumns",value:function(t,e,n){if(Array.isArray(t)&&t.length)return t.map(function(t){return"string"==typeof t?t:t&&"object"===c(t)?String(t.field||t.key||t.name||""):""}).filter(Boolean);if(Array.isArray(e)&&e.length){var r=e.find(function(t){return t&&"object"===c(t)});if(r)return Object.keys(r)}return n&&"object"===c(n)&&Object.keys(n).length?["field","value"]:[]}},{key:"renderDetails",value:function(t){if(this.state.editing&&t===this.editDraft||(this.currentDetails=t),this.titleEl&&(this.titleEl.textContent=t.title),this.updateFooter(t),this.dispatchEvent("detailsloaded",{id:this.state.selectedId,label:this.state.selectedLabel,mode:this.viewMode,details:t}),this.hasCustomContent)return this.customContentMode&&this.renderCustomContent(t,this.state.editing),void this.updateEditControls();this.renderPanelFields(t.fields,null,this.state.editing),this.renderTable(t.columns,t.rows,t.fields,null,null,this.state.editing),this.renderGrid(t.columns,t.rows,t.fields,null,this.state.editing),this.updateEditControls()}},{key:"resolveCustomContentMode",value:function(){if(!this.contentSlotContent)return"";var t=this.contentSlotContent.getAttribute("data-content-mode")||this.container.getAttribute("data-content-mode")||"",e=String(t).trim();return e?this.resolveViewMode(e):""}},{key:"renderCustomContent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.contentSlotContent&&this.customContentMode){var n=this.contentSlotContent;if("datapanel"!==this.customContentMode)if("datatable"!==this.customContentMode){if("datagrid"===this.customContentMode){var r=n.querySelector('[data-role="detail-datagrid"]')||n;this.renderGrid(t.columns,t.rows,t.fields,r,e)}}else{var i=n.querySelector('[data-role="detail-datatable"]'),o=n.querySelector('[data-role="detail-table-head"]')||(null==i?void 0:i.querySelector("thead"))||n.querySelector("thead"),a=n.querySelector('[data-role="detail-table-body"]')||(null==i?void 0:i.querySelector("tbody"))||n.querySelector("tbody");this.renderTable(t.columns,t.rows,t.fields,o,a,e)}else{var s=n.querySelector('[data-role="detail-datapanel"]')||n;this.renderPanelFields(t.fields,s,e)}}}},{key:"updateFooter",value:function(t){if(this.footerDefault&&!this.footerDefault.hidden){var e=Array.isArray(t.rows)?t.rows.length:0,n=t.fields&&"object"===c(t.fields)?Object.keys(t.fields).length:0,r=document.createElement("p");r.className="treepanel-footer-summary",r.textContent="Fields: ".concat(n," | Rows: ").concat(e),this.footerDefault.replaceChildren(r)}}},{key:"renderPanelFields",value:function(t){var e=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||this.panelBody;if(r){r.replaceChildren();var i=Object.entries(t||{});if(!i.length){var o=document.createElement("p");return o.className="treepanel-empty",o.textContent="No details available.",void r.appendChild(o)}i.forEach(function(t){var i=a(t,2),o=i[0],s=i[1],l=document.createElement("div");l.className="treepanel-field";var u=document.createElement("span");u.className="treepanel-field-key",u.textContent=String(o);var c=n?e.createEditor(s,function(t){return e.setDraftField(String(o),t)}):document.createElement("span");n?c.classList.add("treepanel-field-editor"):(c.className="treepanel-field-value",c.textContent=null==s?"":String(s)),l.append(u,c),r.appendChild(l)})}}},{key:"renderTable",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.tableHead,u=i||this.tableBody;if(l&&u){l.replaceChildren(),u.replaceChildren();var c=Array.isArray(t)?o(t):[],d=Array.isArray(e)?o(e):[];if(!c.length&&d.length&&(c=Object.keys(d[0]||{})),!c.length&&Object.keys(n||{}).length&&(c=["field","value"],d=Object.entries(n).map(function(t){var e=a(t,2);return{field:e[0],value:e[1]}})),c.length){var h=document.createElement("tr");c.forEach(function(t){var e=document.createElement("th");e.textContent=String(t),h.appendChild(e)}),l.appendChild(h),d.forEach(function(t,e){var n=document.createElement("tr");c.forEach(function(i,o){var a=document.createElement("td");if(s){var l=null==t?void 0:t[i];a.appendChild(r.createEditor(l,function(n){r.setDraftRowValue(t,i,e,n)}))}else a.textContent=null==(null==t?void 0:t[i])?"":String(t[i]);n.appendChild(a)}),u.appendChild(n)})}}}},{key:"renderGrid",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.gridEl;if(o){o.replaceChildren();var a=Array.isArray(e)?e:[];if(!a.length&&n&&"object"===c(n)&&Object.keys(n).length&&(a=[n]),!a.length){var s=document.createElement("p");return s.className="treepanel-empty",s.textContent="No details available.",void o.appendChild(s)}var l=Array.isArray(t)&&t.length?t:Object.keys(a[0]||{});a.forEach(function(t,e){var n=document.createElement("article");n.className="treepanel-grid-card",l.forEach(function(o,a){var s=document.createElement("div");s.className="treepanel-grid-field";var l=document.createElement("span");l.className="treepanel-grid-key",l.textContent=String(o);var u=i?r.createEditor(null==t?void 0:t[o],function(t){r.setDraftCell(e,o,a,t)}):document.createElement("span");i?u.classList.add("treepanel-grid-editor"):(u.className="treepanel-grid-value",u.textContent=null==(null==t?void 0:t[o])?"":String(t[o])),s.append(l,u),n.appendChild(s)}),o.appendChild(n)})}}},{key:"startEditing",value:function(){this.inlineEditEnabled&&this.currentDetails&&(this.state.editing=!0,this.editDraft=this.cloneDetails(this.currentDetails),this.renderDetails(this.editDraft))}},{key:"cancelEditing",value:function(){this.state.editing&&(this.state.editing=!1,this.editDraft=null,this.currentDetails&&this.renderDetails(this.currentDetails))}},{key:"saveDetails",value:(l=p(d().m(function t(){var e,n,r,i,o,a,s;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(this.state.editing&&this.editDraft&&this.state.selectedId){t.n=1;break}return t.a(2);case 1:if(this.detailsSource){t.n=2;break}return this.setLoading(!1,this.state.selectedLabel||"node"),this.statusEl.textContent="Save skipped: data-details-source is not configured.",this.statusEl.setAttribute("data-state","ready"),t.a(2);case 2:return this.state.saving=!0,this.updateEditControls(),this.statusEl.textContent="Saving ".concat(this.state.selectedLabel||"details","..."),this.statusEl.setAttribute("data-state","loading"),e=this.cloneDetails(this.editDraft),n={id:this.state.selectedId,label:this.state.selectedLabel,detail:e},t.p=3,t.n=4,fetch(this.buildDetailsSourceUrl({id:this.state.selectedId,label:this.state.selectedLabel}),{method:this.saveMethod||"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 4:if((i=t.v).ok){t.n=5;break}throw new Error("Save failed (".concat(i.status,")"));case 5:return o=null,t.p=6,t.n=7,i.json();case 7:o=t.v,t.n=9;break;case 8:t.p=8,t.v;case 9:a=this.normalizeDetailsPayload((null===(r=o)||void 0===r?void 0:r.detail)||o||e,this.state.selectedId,this.state.selectedLabel),this.state.editing=!1,this.editDraft=null,this.currentDetails=a,this.renderDetails(a),this.statusEl.textContent="Saved details for ".concat(this.state.selectedLabel||"node"),this.statusEl.setAttribute("data-state","ready"),this.dispatchEvent("detailssaved",{id:this.state.selectedId,label:this.state.selectedLabel,details:a}),t.n=11;break;case 10:t.p=10,s=t.v,this.statusEl.textContent=String((null==s?void 0:s.message)||"Save failed"),this.statusEl.setAttribute("data-state","ready");case 11:return t.p=11,this.state.saving=!1,this.updateEditControls(),t.f(11);case 12:return t.a(2)}},t,this,[[6,8],[3,10,11,12]])})),function(){return l.apply(this,arguments)})},{key:"cloneDetails",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"updateEditControls",value:function(){if(this.editButton&&this.saveButton&&this.cancelButton){var t=this.inlineEditEnabled&&!!this.currentDetails;this.editButton.hidden=!t||this.state.editing,this.saveButton.hidden=!t||!this.state.editing,this.cancelButton.hidden=!t||!this.state.editing,this.editButton.disabled=this.state.saving,this.saveButton.disabled=this.state.saving,this.cancelButton.disabled=this.state.saving}}},{key:"createEditor",value:function(t,e){var n=document.createElement("input");return n.type="text",n.className="treepanel-input",n.value=null==t?"":String(t),n.addEventListener("input",function(){"function"==typeof e&&e(n.value)}),n}},{key:"setDraftField",value:function(t,e){this.editDraft&&this.editDraft.fields&&"object"===c(this.editDraft.fields)&&(this.editDraft.fields[t]=e)}},{key:"setDraftRowValue",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=this.editDraft.rows.findIndex(function(e){return e===t}),o=i>=0?i:Number(n);Number.isNaN(o)||o<0||o>=this.editDraft.rows.length||(this.editDraft.rows[o]&&"object"===c(this.editDraft.rows[o])||(this.editDraft.rows[o]={}),this.editDraft.rows[o][e]=r)}}},{key:"setDraftCell",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=Number(t);Number.isNaN(i)||i<0||i>=this.editDraft.rows.length?this.setDraftRowValue(null,e,n,r):(this.editDraft.rows[i]&&"object"===c(this.editDraft.rows[i])||(this.editDraft.rows[i]={}),this.editDraft.rows[i][e]=r)}}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.state.loading=!!t,this.statusEl&&(t?(this.statusEl.textContent="Loading ".concat(e||"details","..."),this.statusEl.setAttribute("data-state","loading")):(this.statusEl.textContent=e?"Showing details for ".concat(e):"Select a node to view details.",this.statusEl.setAttribute("data-state","ready")))}}],s=[{key:"selector",get:function(){return"treepanel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"treepanel"}}],r&&v(n.prototype,r),s&&v(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,l,h,f,m,g}(r.Component);k(O,"templateId","treepanel-template"),"undefined"!=typeof window&&(window.TreePanelComponent=O)},191(t,e,n){"use strict";n.r(e),n.d(e,{WizardComponent:()=>g});var r=n(812),i=n(62),o=n(76);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return l(c,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,l(f,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(f),l(f,i,"Generator"),l(f,r,function(){return this}),l(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function f(t,e,n){return e=m(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId="wizard",n.currentStep=0,n.steps=[],n.stepData=new Map,n.isComplete=!1,n.autoSync=t.hasAttribute("autosync"),n.lazyLoad=t.hasAttribute("lazy"),n.stepNavigationMode=n.resolveStepNavigationMode(t),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.loadedStepContent=new Set,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),n=e,r=[{key:"resolveStepNavigationMode",value:function(t){return"page"===String(t.getAttribute("data-step-navigation")||"inline").trim().toLowerCase()?"page":"inline"}},{key:"init",value:(I=c(s().m(function t(){var n;return s().w(function(t){for(;;)switch(t.n){case 0:return v(e,"init",this,3)([]),t.n=1,this.render();case 1:return this.bindEvents(),n=this.resolveInitialStepIndex(),t.n=2,this.loadStep(n,0,{allowPageNavigation:!1});case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"resolveInitialStepIndex",value:function(){if(!this.steps.length)return 0;var t=String(this.container.getAttribute("data-initial-step-id")||this.container.getAttribute("initial-step-id")||"").trim();if(t){var e=this.steps.findIndex(function(e){return String(e.id)===t});if(e>=0)return e}var n=this.container.getAttribute("data-initial-step")||this.container.getAttribute("initial-step"),r=Number(n);return Number.isInteger(r)&&r>=0&&r<this.steps.length?r:0}},{key:"render",value:(L=c(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".wizard"),this.nav=this.element.querySelector(".wizard-nav"),this.content=this.element.querySelector(".wizard-content"),this.progress=this.element.querySelector(".wizard-progress"),this.footer=this.element.querySelector(".wizard-footer"),this.loaderState=(0,i.w)(this,{host:this.content||this.element,busyTarget:this.content||this.element,scope:"block",defaultMessage:"Loading step..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"wizard",eventName:"stepchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),t.n=2,this.processDataRepeats();case 2:this.updateProgress(),this.updateFooterState();case 3:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"processDataRepeats",value:(x=c(s().m(function t(){var e,n;return s().w(function(t){for(;;)switch(t.n){case 0:if(this.container.dataset.source){t.n=1;break}return t.a(2);case 1:return t.n=2,this.resolveDataSource();case 2:if(this.data=t.v,n=Array.isArray(this.data)?this.data:Array.isArray(null===(e=this.data)||void 0===e?void 0:e.steps)?this.data.steps:[],this.steps=n.map(function(t,e){return{id:t.id||e,name:t.name||"Step ".concat(e+1),valid:!1,dirty:!1,data:{},canSkip:t.canSkip||!1,loadContent:t.contentUrl,contentType:t.contentType||"",pageUrl:t.pageUrl||t.href||t.route||"",content:t.content||null}}),this.lazyLoad){t.n=3;break}return t.n=3,this.preloadStepContent();case 3:this.renderStepNav(),this.updateFooterState();case 4:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"renderStepNav",value:function(){var t=this;this.nav.replaceChildren(),this.steps.forEach(function(e,n){var r=document.createElement("button");r.className="wizard-step ".concat(n<=t.currentStep?"complete":""),r.dataset.step=String(n),r.disabled=n>t.currentStep;var i=document.createElement("span");i.className="step-number",i.textContent=String(n+1);var o=document.createElement("span");o.className="step-name",o.textContent=e.name,r.append(i,o),t.nav.appendChild(r)})}},{key:"loadStep",value:(T=c(s().m(function t(e){var n,r,i,o,a,l,u,c=arguments;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(i=c.length>1&&void 0!==c[1]?c[1]:1,o=!1!==(c.length>2&&void 0!==c[2]?c[2]:{}).allowPageNavigation,this.steps.length){t.n=1;break}return this.renderStepContent(null),this.updateFooterState(),t.a(2,!1);case 1:if(!(e>0&&i>0)){t.n=3;break}return t.n=2,this.validateCurrentStep();case 2:if(t.v){t.n=3;break}return t.a(2,!1);case 3:return t.n=4,this.saveStepData(this.currentStep);case 4:if(this.currentStep=e,a=this.steps[e]){t.n=5;break}return t.a(2,!1);case 5:if(this.updateNavState(),this.updateProgress(),this.updateFooterState(),!o||!this.shouldNavigateToPage(a)){t.n=7;break}return t.n=6,this.navigateToStepPage(a,e,i);case 6:return t.a(2,!0);case 7:if(null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,!0,"Loading ".concat(a.name||"Step ".concat(e+1),"...")),t.p=8,!this.shouldLoadStepContent(a)){t.n=9;break}return t.n=9,this.loadStepContent(e);case 9:this.renderStepContent(a),this.focusContent();case 10:return t.p=10,null===(l=this.loaderState)||void 0===l||null===(u=l.setLoading)||void 0===u||u.call(l,!1),t.f(10);case 11:return this.dispatchEvent("stepchange",{step:e,direction:i,stepData:a}),t.a(2,!0)}},t,this,[[8,,10,11]])})),function(t){return T.apply(this,arguments)})},{key:"shouldNavigateToPage",value:function(t){return"page"===this.stepNavigationMode&&!(null==t||!t.pageUrl)}},{key:"shouldLoadStepContent",value:function(t){return!(!t||this.shouldNavigateToPage(t)||!this.lazyLoad&&!t.loadContent&&null!=t.content)}},{key:"preloadStepContent",value:(P=c(s().m(function t(){var e,n;return s().w(function(t){for(;;)switch(t.n){case 0:e=0;case 1:if(!(e<this.steps.length)){t.n=4;break}if(n=this.steps[e],this.shouldLoadStepContent(n)){t.n=2;break}return t.a(3,3);case 2:return t.n=3,this.loadStepContent(e);case 3:e+=1,t.n=1;break;case 4:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"renderStepContent",value:function(t){if(!t){var e=document.createElement("div");return e.className="wizard-empty",e.textContent="No steps configured.",void this.content.replaceChildren(e)}if(t.content instanceof Node)this.content.replaceChildren(t.content);else{if("string"==typeof t.content){var n=t.content.trim();if(!n)return void this.content.replaceChildren(this.createDefaultStepForm(t));var r=document.createElement("template");return r.innerHTML=n,void this.content.replaceChildren(r.content.cloneNode(!0))}this.isJsonStepContent(t.content)?this.content.replaceChildren(this.createJsonStepForm(t,t.content)):this.content.replaceChildren(this.createDefaultStepForm(t))}}},{key:"isJsonStepContent",value:function(t){return!(!t||"object"!==a(t)||t instanceof Node)}},{key:"createDefaultStepForm",value:function(t){var e=document.createElement("form");e.dataset.step=String(t.id);var n=document.createElement("h3");n.textContent=t.name||"Step ".concat(this.currentStep+1);var r=document.createElement("p");return r.textContent="No custom content configured for this step.",e.append(n,r),e}},{key:"loadStepContent",value:(j=c(s().m(function t(e){var n,r;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.steps[e]){t.n=1;break}return t.a(2);case 1:if(!this.loadedStepContent.has(e)){t.n=2;break}return t.a(2);case 2:return t.p=2,t.n=3,this.fetchStepContent(n);case 3:null!=(r=t.v)&&(n.content=r),this.loadedStepContent.add(e),t.n=5;break;case 4:t.p=4,t.v,this.showStepLoadError("Failed to load step");case 5:return t.a(2)}},t,this,[[2,4]])})),function(t){return j.apply(this,arguments)})},{key:"navigateToStepPage",value:(A=c(s().m(function t(e,n,r){return s().w(function(t){for(;;)switch(t.n){case 0:this.dispatchEvent("steppagenavigate",{step:n,direction:r,pageUrl:e.pageUrl,stepData:e}),window.location.assign(e.pageUrl);case 1:return t.a(2)}},t,this)})),function(t,e,n){return A.apply(this,arguments)})},{key:"showStepLoadError",value:function(t){var e=document.createElement("div");e.className="error",e.textContent=t,this.content.replaceChildren(e)}},{key:"fetchStepContent",value:(C=c(s().m(function t(e){var n,r;return s().w(function(t){for(;;)switch(t.n){case 0:if(!e.loadContent){t.n=4;break}return t.n=1,fetch(e.loadContent,{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}throw new Error("Failed to load step content: HTTP ".concat(r.status));case 2:return t.n=3,this.parseRemoteStepPayload(r,e);case 3:case 6:return t.a(2,t.v);case 4:return t.n=5,this.ensureProviderInstance();case 5:return t.n=6,null===(n=this.contentProviderInstance)||void 0===n?void 0:n.getContent(e,this.currentStep)}},t,this)})),function(t){return C.apply(this,arguments)})},{key:"parseRemoteStepPayload",value:(O=c(s().m(function t(e,n){var r,i;return s().w(function(t){for(;;)switch(t.n){case 0:if(r=String(e.headers.get("content-type")||"").toLowerCase(),"json"===String((null==n?void 0:n.contentType)||"").toLowerCase()||r.includes("application/json")||String((null==n?void 0:n.loadContent)||"").toLowerCase().endsWith(".json")){t.n=2;break}return t.n=1,e.text();case 1:return t.a(2,t.v);case 2:return t.n=3,e.json();case 3:if("string"!=typeof(i=t.v)){t.n=4;break}return t.a(2,i);case 4:if(!i||"string"!=typeof i.html){t.n=5;break}return t.a(2,i.html);case 5:return t.a(2,i)}},t)})),function(t,e){return O.apply(this,arguments)})},{key:"createJsonStepForm",value:function(t,e){var n=document.createElement("form");n.dataset.step=String(t.id);var r=document.createElement("h3");r.textContent=String((null==e?void 0:e.title)||t.name||"Step ".concat(this.currentStep+1)),n.appendChild(r);var i=String((null==e?void 0:e.description)||"").trim();if(i){var o=document.createElement("p");o.textContent=i,n.appendChild(o)}var s=Array.isArray(null==e?void 0:e.fields)?e.fields:[];if(s.length)return s.forEach(function(t,e){var r=String((null==t?void 0:t.name)||"field_".concat(e+1)),i=String((null==t?void 0:t.label)||r),o=String((null==t?void 0:t.type)||"text").toLowerCase(),s=null==(null==t?void 0:t.value)?"":String(t.value),l=null==(null==t?void 0:t.placeholder)?"":String(t.placeholder),u=!(null==t||!t.required),c=document.createElement("label");c.className="wizard-json-field";var d=document.createElement("span");d.textContent=i,c.appendChild(d);var h=null;"textarea"===o?(h=document.createElement("textarea")).value=s:"select"===o?(h=document.createElement("select"),(Array.isArray(null==t?void 0:t.options)?t.options:[]).forEach(function(t,e){var n,r,i,o,l="object"===a(t)&&t?{value:String(null!==(n=null!==(r=t.value)&&void 0!==r?r:t.label)&&void 0!==n?n:e),label:String(null!==(i=null!==(o=t.label)&&void 0!==o?o:t.value)&&void 0!==i?i:e)}:{value:String(t),label:String(t)},u=document.createElement("option");u.value=l.value,u.textContent=l.label,l.value===s&&(u.selected=!0),h.appendChild(u)})):((h=document.createElement("input")).type=o||"text",h.value=s),h.name=r,l&&"placeholder"in h&&(h.placeholder=l),u&&(h.required=!0),c.appendChild(h),n.appendChild(c)}),n;var l=e&&"object"===a(e.values)?e.values:e&&"object"===a(e.data)?e.data:null;if(l){var u=document.createElement("ul");return Object.keys(l).forEach(function(t){var e=document.createElement("li"),n=null==l[t]?"":String(l[t]);e.textContent="".concat(t,": ").concat(n),u.appendChild(e)}),n.appendChild(u),n}var c=document.createElement("p");return c.textContent="JSON step loaded (no fields declared).",n.appendChild(c),n}},{key:"validateCurrentStep",value:(E=c(s().m(function t(){var e,n;return s().w(function(t){for(;;)switch(t.n){case 0:if(e=this.extractFormData(this.content),n=this.steps[this.currentStep]){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.validateStep(e,n);case 2:if(n.valid=t.v,n.dirty=!0,this.stepData.set(this.currentStep,{data:e,valid:n.valid}),n.valid){t.n=3;break}return this.showValidationErrors(e),t.a(2,!1);case 3:return t.a(2,!0)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"saveStepData",value:(k=c(s().m(function t(e){var n;return s().w(function(t){for(;;)switch(t.n){case 0:if(!this.autoSync||!this.stepData.has(e)){t.n=2;break}return t.n=1,this.ensureProviderInstance();case 1:if(null==(n=t.v)||!n.saveStep){t.n=2;break}return t.n=2,n.saveStep(this.steps[e],this.stepData.get(e));case 2:return t.a(2)}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"next",value:(S=c(s().m(function t(){var e;return s().w(function(t){for(;;)switch(t.n){case 0:if(!((e=this.currentStep+1)>=this.steps.length)){t.n=1;break}return t.a(2,this.complete());case 1:return t.n=2,this.loadStep(e,1);case 2:return t.a(2,t.v)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"prev",value:(w=c(s().m(function t(){var e;return s().w(function(t){for(;;)switch(t.n){case 0:return e=Math.max(0,this.currentStep-1),t.n=1,this.loadStep(e,-1);case 1:return t.a(2,t.v)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"goToStep",value:(g=c(s().m(function t(e){return s().w(function(t){for(;;)switch(t.n){case 0:if(!(e<0||e>=this.steps.length||e>this.currentStep)){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.loadStep(e,0);case 2:return t.a(2,t.v)}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"complete",value:(m=c(s().m(function t(){var e=this;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.validateCurrentStep();case 1:if(t.v){t.n=2;break}return t.a(2,!1);case 2:if(!this.autoSync){t.n=3;break}return t.n=3,this.syncAllSteps();case 3:return this.isComplete=!0,this.element.classList.add("complete"),this.dispatchEvent("complete",{steps:this.steps.map(function(t,n){var r;return null===(r=e.stepData.get(n))||void 0===r?void 0:r.data})}),t.a(2,!0)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateProgress",value:function(){var t=this.steps.length||1,e=(this.currentStep+1)/t*100;this.progress.style.width="".concat(e,"%"),this.progress.setAttribute("aria-valuenow",String(this.currentStep+1)),this.progress.setAttribute("aria-valuemax",String(t))}},{key:"updateNavState",value:function(){var t=this;this.nav.querySelectorAll(".wizard-step").forEach(function(e,n){e.classList.toggle("current",n===t.currentStep),e.classList.toggle("complete",n<=t.currentStep),e.disabled=n>t.currentStep})}},{key:"updateFooterState",value:function(){if(this.footer){var t=this.footer.querySelector('[data-action="prev"]'),e=this.footer.querySelector('[data-action="next"]'),n=this.footer.querySelector('[data-action="complete"]'),r=this.steps.length>0,i=this.currentStep<=0,o=r&&this.currentStep>=this.steps.length-1;t&&(t.disabled=!r||i),e&&(e.disabled=!r||o,e.hidden=!r||o),n&&(n.hidden=!r||!o,n.disabled=!r||!o,n.classList.toggle("hidden",!r||!o))}}},{key:"bindEvents",value:function(){var t=this;this.nav.addEventListener("click",function(){var e=c(s().m(function e(n){var r,i;return s().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest(".wizard-step"))){e.n=1;break}return i=parseInt(r.dataset.step,10),e.n=1,t.goToStep(i);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.footer.addEventListener("click",function(){var e=c(s().m(function e(n){return s().w(function(e){for(;;)switch(e.n){case 0:if(!n.target.matches('[data-action="next"]')){e.n=2;break}return e.n=1,t.next();case 1:case 3:e.n=5;break;case 2:if(!n.target.matches('[data-action="prev"]')){e.n=4;break}return e.n=3,t.prev();case 4:if(!n.target.matches('[data-action="complete"]')){e.n=5;break}return e.n=5,t.complete();case 5:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.content.addEventListener("change",function(){t.steps[t.currentStep]&&(t.steps[t.currentStep].dirty=!0)})}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(y=c(s().m(function t(){var e,n,r,i;return s().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:if(null===(e=this.contentProviderInstance)||void 0===e||!e.resolve){t.n=3;break}return t.a(2,this.contentProviderInstance.resolve(n)||[]);case 3:if(!(r=String(n).trim()).startsWith("[")&&!r.startsWith("{")){t.n=6;break}return t.p=4,t.a(2,JSON.parse(r));case 5:return t.p=5,t.v,t.a(2,[]);case 6:if(!r.startsWith("/")&&!/^https?:\/\//i.test(r)){t.n=12;break}return t.p=7,t.n=8,fetch(r,{credentials:"same-origin"});case 8:if((i=t.v).ok){t.n=9;break}return t.a(2,[]);case 9:return t.n=10,i.json();case 10:return t.a(2,t.v);case 11:return t.p=11,t.v,t.a(2,[]);case 12:return t.a(2,[])}},t,this,[[7,11],[4,5]])})),function(){return y.apply(this,arguments)})},{key:"ensureProviderInstance",value:(p=c(s().m(function t(){var e,n,r,i,o;return s().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(r=this.getContentProviders(),i=r[this.providerName]){t.n=2;break}return t.a(2,null);case 2:return o=window.appState||window.pageContext||{},this.contentProviderInstance=new i(o),t.n=3,null===(e=(n=this.contentProviderInstance).init)||void 0===e?void 0:e.call(n);case 3:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"extractFormData",value:function(t){var e=t.querySelector("form");if(!e)return{};var n=new FormData(e);return Object.fromEntries(n)}},{key:"focusContent",value:function(){var t,e;null===(t=(e=this.content).focus)||void 0===t||t.call(e)}},{key:"validateStep",value:(h=c(s().m(function t(e,n){return s().w(function(t){for(;;)if(0===t.n)return t.a(2,!0)},t)})),function(t,e){return h.apply(this,arguments)})},{key:"showValidationErrors",value:function(t){}},{key:"syncAllSteps",value:(u=c(s().m(function t(){var e;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(null==(e=t.v)||!e.syncAllSteps){t.n=2;break}return t.n=2,e.syncAllSteps(this.steps,this.stepData);case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"serializeStepData",value:function(){var t={};return this.stepData.forEach(function(e,n){t[String(n)]=e}),t}},{key:"getBindableState",value:function(){return{currentStep:this.currentStep,isComplete:this.isComplete,stepData:this.serializeStepData()}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.currentStep);Number.isInteger(e)&&(e<0||e>=this.steps.length||e!==this.currentStep&&this.goToStep(e))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),v(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"wizard"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"wizard"}}],r&&d(n.prototype,r),l&&d(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,u,h,p,y,m,g,w,S,k,E,O,C,A,j,P,T,x,L,I}(r.Component);"undefined"!=typeof window&&(window.WizardComponent=g)},904(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{Z:()=>s});var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"registerLibrary",value:function(t,e){this.libraries.set(t,e)}},{key:"initAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.libraries.forEach(function(r,i){r.forEach(function(r){t.initLibraryComponents(r,i,e,n)})})}},{key:"registerInstance",value:function(t,e){var n;if(t instanceof Element&&e){var r=this.instances.get(t),i=r instanceof Map?r:new Map;i.set((null===(n=e.constructor)||void 0===n?void 0:n.name)||"Component",e),this.instances.set(t,i)}}},{key:"unregisterInstance",value:function(t,e){if(t instanceof Element){var n=this.instances.get(t);n instanceof Map&&(e?n.forEach(function(t,r){t===e&&n.delete(r)}):n.clear(),0!==n.size?this.instances.set(t,n):this.instances.delete(t))}}},{key:"getKnownInstanceKeys",value:function(){var t=new Set;return this.libraries.forEach(function(e){e.forEach(function(e){null!=e&&e.name&&t.add(e.name.toLowerCase())})}),Array.from(t)}},{key:"getElementInstances",value:function(t){if(!(t instanceof Element))return[];var e=new Set,n=this.instances.get(t);return n instanceof Map&&n.forEach(function(t){t&&e.add(t)}),this.getKnownInstanceKeys().forEach(function(n){var r=t[n];r&&"function"==typeof r.destroy&&e.add(r)}),Array.from(e)}},{key:"collectInstances",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof Element)&&t!==document)return[];var r=[],i=new Set,o=function(t){t&&!i.has(t)&&(i.add(t),r.push(t))};return n&&t instanceof Element&&this.getElementInstances(t).forEach(o),t.querySelectorAll&&t.querySelectorAll("*").forEach(function(t){e.getElementInstances(t).forEach(o)}),r}},{key:"resolveComponentName",value:function(t){if(t.componentName)return String(t.componentName).toLowerCase();var e=(t.selector||"").trim();if(/^[a-z][a-z0-9-]*$/i.test(e))return e.toLowerCase();var n=(t.name||"").replace(/Component$/i,"");return n?n.toLowerCase():""}},{key:"getDiscoverySelectors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1!==e.includeRoleSelectors,r=new Set,i=(t.selector||"").trim();i&&r.add(i);var o=this.resolveComponentName(t);return o&&(r.add(o),r.add('[component="'.concat(o,'"]')),n&&r.add('[role="'.concat(o,'"]'))),"function"==typeof t.getNativeSelectors&&(t.getNativeSelectors(e)||[]).forEach(function(t){var e=String(t||"").trim();e&&r.add(e)}),Array.from(r)}},{key:"shouldDeferInit",value:function(t){var e=(t.getAttribute("transform")||"").toLowerCase(),n=(t.getAttribute("lazy-transform")||t.dataset.lazyTransform||"").toLowerCase();return"lazy"===e||"true"===n||"1"===n}},{key:"initLibraryComponents",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getDiscoverySelectors(t,i);if(o.length){var a=new Set;o.forEach(function(t){n instanceof Element&&n.matches(t)&&a.add(n),n.querySelectorAll(t).forEach(function(t){return a.add(t)})}),a.forEach(function(n){var i,o="function"==typeof t.prepareHost&&t.prepareHost(n)||n;if(o instanceof Element&&t.matchesLibrary(o,e)&&!r.shouldDeferInit(o)){var a=null===(i=o.closest)||void 0===i?void 0:i.call(o,'[data-holi-component-class="'.concat(t.name,'"]'));a&&a!==o||o[t.name.toLowerCase()]||new t(o)}})}}},{key:"destroyContainerInstances",value:function(t){t instanceof Element&&this.collectInstances(t,!0).reverse().forEach(function(t){null!=t&&t.isDestroyed||"function"!=typeof t.destroy||t.destroy()})}},{key:"flushRemovedNodes",value:function(){var t=this;this.removalFlushScheduled=!1;var e=Array.from(this.pendingRemovedNodes);this.pendingRemovedNodes.clear(),e.forEach(function(e){e instanceof Element&&(e.isConnected||t.destroyContainerInstances(e))})}},{key:"scheduleRemovedFlush",value:function(){var t=this;this.removalFlushScheduled||(this.removalFlushScheduled=!0,queueMicrotask(function(){return t.flushRemovedNodes()}))}},{key:"observeLifecycle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!this.lifecycleObserver){var n=(null==e?void 0:e.documentElement)||e;(n instanceof Element||n===document)&&(this.lifecycleObserver=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e instanceof Element&&t.initAll(e,{includeRoleSelectors:!1})}),e.removedNodes.forEach(function(e){e instanceof Element&&t.pendingRemovedNodes.add(e)})}),t.scheduleRemovedFlush()}),this.lifecycleObserver.observe(n,{childList:!0,subtree:!0}))}}}],null&&i(t.prototype,null),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();o(s,"libraries",new Map),o(s,"instances",new WeakMap),o(s,"lifecycleObserver",null),o(s,"pendingRemovedNodes",new Set),o(s,"removalFlushScheduled",!1)},76(t,e,n){"use strict";n.d(e,{x:()=>c});var r=n(458);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e,n){return(e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var u=function(){return t=function t(e){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.options=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({storeAttr:"data-state-store",pathAttr:"data-state-path",modeAttr:"data-state-sync",debounceAttr:"data-state-debounce-ms",defaultPath:i.defaultPath||(null==e||null===(n=e.constructor)||void 0===n?void 0:n.componentName)||"component",eventName:i.eventName||"stateupdate",getSnapshot:i.getSnapshot||function(){return{}},applySnapshot:i.applySnapshot||function(){}},i),this.unsubscribe=null,this.boundOnComponentEvent=function(t){return r.handleComponentEvent(t)},this.pushTimer=null,this.applyingFromStore=!1,this.pushingToStore=!1,this.lastPushedJson="",this.mode="both",this.debounceMs=0},(e=[{key:"resolveMode",value:function(t){var e=String(t||"both").trim().toLowerCase();return"in"===e||"out"===e||"both"===e?e:"none"===e||"off"===e?"none":"both"}},{key:"connect",value:function(){var t,e,n=this,i=null===(t=this.component)||void 0===t?void 0:t.container,o=null===(e=this.component)||void 0===e?void 0:e.element;if(i instanceof HTMLElement&&o instanceof HTMLElement){var a=String(i.getAttribute(this.options.storeAttr)||"").trim();if(a){var s=r.T.get(a);if(s){this.store=s,this.storeId=a,this.path=String(i.getAttribute(this.options.pathAttr)||this.options.defaultPath||"").trim(),this.mode=this.resolveMode(i.getAttribute(this.options.modeAttr)),this.debounceMs=Math.max(0,Number(i.getAttribute(this.options.debounceAttr)||0)||0);var l=this.path?r.T.getByPath(s.proxy,this.path):void 0;"none"!==this.mode&&("in"!==this.mode&&"both"!==this.mode||(this.unsubscribe=s.subscribe(function(t,e){var r=n.path;r&&null!=e&&e.path&&(e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&n.pullFromStore()}),this.pullFromStore()),"out"!==this.mode&&"both"!==this.mode||(o.addEventListener(this.options.eventName,this.boundOnComponentEvent),void 0===l&&this.pushToStore(this.options.getSnapshot(this.component),!0)))}}}}},{key:"cloneSerializable",value:function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}},{key:"toJson",value:function(t){try{return JSON.stringify(t)}catch(t){return""}}},{key:"pullFromStore",value:function(){if(this.store&&this.path&&!this.pushingToStore){var t=r.T.getByPath(this.store.proxy,this.path);if(null!=t){var e=this.toJson(t);if(!e||e!==this.lastPushedJson){this.lastPushedJson=e,this.applyingFromStore=!0;try{this.options.applySnapshot(this.component,this.cloneSerializable(t))}finally{this.applyingFromStore=!1}}}}}},{key:"handleComponentEvent",value:function(t){var e=this;if(this.store&&this.path&&!this.applyingFromStore){var n=this.options.getSnapshot(this.component);if(this.debounceMs>0)return this.pushTimer&&clearTimeout(this.pushTimer),void(this.pushTimer=setTimeout(function(){e.pushTimer=null,e.pushToStore(n,!1)},this.debounceMs));this.pushToStore(n,!1)}}},{key:"pushToStore",value:function(t,e){if(this.store&&this.path){var n=this.cloneSerializable(t),i=this.toJson(n);if(e||!i||i!==this.lastPushedJson){this.pushingToStore=!0;try{r.T.setByPath(this.store.proxy,this.path,n),this.lastPushedJson=i}finally{this.pushingToStore=!1}}}}},{key:"disconnect",value:function(){var t,e;this.pushTimer&&(clearTimeout(this.pushTimer),this.pushTimer=null),null===(t=this.unsubscribe)||void 0===t||t.call(this),this.unsubscribe=null,null===(e=this.component)||void 0===e||null===(e=e.element)||void 0===e||e.removeEventListener(this.options.eventName,this.boundOnComponentEvent)}}])&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function c(t){var e=new u(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return e.connect(),e}},62(t,e,n){"use strict";n.d(e,{w:()=>i});var r=n(819);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.host||(null==t?void 0:t.element)||(null==t?void 0:t.container)||null;if(!(n instanceof HTMLElement))return{setLoading:function(){},destroy:function(){}};var i=e.busyTarget instanceof HTMLElement?e.busyTarget:n,o=e.scope||"block",a=String(e.defaultMessage||"Loading..."),s=n.querySelector('[data-role="component-loader"]');s?s.getAttribute("scope")||s.setAttribute("scope",o):(s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"block",e=document.createElement("section");return e.setAttribute("component","loader"),e.setAttribute("scope",t),e.hidden=!0,e}(o),s.setAttribute("data-role","component-loader"),n.appendChild(s));var l=s.loadercomponent||new r.LoaderComponent(s);return l.hide(),{setLoading:function(t){var e=!!t,n=String((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")||a||"Loading...");i.setAttribute("aria-busy",e?"true":"false"),e?l.show(n):l.hide()},destroy:function(){i.removeAttribute("aria-busy"),l.hide()}}}},853(t,e,n){"use strict";function r(t,e){if(t instanceof Element&&e instanceof Element){var n=new Set(((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).exclude||[]).map(function(t){return String(t||"").toLowerCase()}));Array.from(t.attributes||[]).forEach(function(t){var r=String(t.name||"").toLowerCase();r&&!n.has(r)&&e.setAttribute(t.name,t.value)})}}function i(t){var e;return t instanceof HTMLTextAreaElement?t.value||t.textContent||"":t instanceof HTMLInputElement||t instanceof HTMLSelectElement?t.value||"":(null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"value"))||""}function o(t){return t instanceof HTMLSelectElement?Array.from(t.options||[]).map(function(t){var e={value:null==t.value?"":String(t.value),label:String(t.textContent||t.label||t.value||"")};return Array.from(t.attributes||[]).forEach(function(t){var n,r=String(t.name||"").toLowerCase();r&&"value"!==r&&"label"!==r&&"selected"!==r&&(r.startsWith("data-")?e[(n=r.slice(5),String(n||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()}))]=t.value:e[r]=""===t.value||t.value)}),t.disabled&&(e.disabled=!0),e}):[]}function a(t){var e,n;if(!(t instanceof HTMLInputElement))return null;var r="label"===(null===(e=t.parentElement)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase())?t.parentElement:null;if(r)return r.setAttribute("slot","options"),r;var i=function(t){if(!(t instanceof Element))return null;var e=String(t.getAttribute("id")||"").trim();if(!e)return null;var n="undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(e):e.replace(/"/g,'\\"');return document.querySelector('label[for="'.concat(n,'"]'))}(t),o=document.createElement("label");o.className="holi-native-choice",o.setAttribute("slot","options"),o.appendChild(t);var a=String((null==i?void 0:i.textContent)||t.getAttribute("label")||t.getAttribute("aria-label")||t.value||"").trim();if(a){var s=document.createElement("span");s.textContent=a,o.appendChild(s)}return null==i||null===(n=i.remove)||void 0===n||n.call(i),o}n.d(e,{BD:()=>i,NQ:()=>o,VC:()=>a,ts:()=>r})},696(t,e,n){"use strict";function r(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,o,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return i(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,l}};function f(n,r){for(a=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=h.n<0)?s:n.call(r,h))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,o,a),!0),c}var l={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var h=[][o]?e(e([][o]())):(i(e={},o,function(){return this}),e),f=d.prototype=u.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,i(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=d,i(f,"constructor",d),i(d,"constructor",c),c.displayName="GeneratorFunction",i(d,a,"GeneratorFunction"),i(f),i(f,a,"Generator"),i(f,o,function(){return this}),i(f,"toString",function(){return"[object Generator]"}),(r=function(){return{w:s,m:p}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){function a(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},i(t,e,n,r)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,l,"next",t)}function l(t){a(o,r,i,s,l,"throw",t)}s(void 0)})}}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{q:()=>f});var f=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.overlay=null,this.keyHandler=null},e=[{key:"open",value:function(){var t=this,e=u({title:"Details",mode:"view",fields:[],record:{},readonlyFields:[],onSave:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),i=n.fragment,a=n.overlay,l=n.header,c=n.body,d=n.footer;this.overlay=a,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()});var h=this.normalizeFields(e.fields,e.record,e.readonlyFields),f=this.normalizeMode(e.mode),p=this.clone(e.record||{}),v=!1,y=function(){l.replaceChildren(),c.replaceChildren(),d.replaceChildren();var n=document.createElement("h2");n.textContent="".concat("add"===f?"Add":"edit"===f?"Edit":"View"," ").concat(e.title),l.appendChild(n);var i=document.createElement("div");if(i.className="holi-object-details-header-actions","view"===f){var a=document.createElement("button");a.type="button",a.className="holi-object-details-btn",a.textContent="Edit",a.addEventListener("click",function(){f="edit",y()}),i.appendChild(a)}var u=document.createElement("button");if(u.type="button",u.className="holi-object-details-btn holi-object-details-btn-secondary",u.textContent="Close",u.addEventListener("click",function(){return t.close()}),i.appendChild(u),l.appendChild(i),"view"!==f){var m=document.createElement("p");m.className="holi-object-details-status",c.appendChild(m);var b=new Map;h.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-field";var r=document.createElement("label");r.textContent=e.label;var i=t.createControl(e,p[e.name]);i.disabled=!!e.readonly||v,e.readonly||(i.addEventListener("input",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}),i.addEventListener("change",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}));var o=document.createElement("p");o.className="holi-object-details-field-error",n.append(r,i,o),c.appendChild(n),b.set(e.name,{field:e,control:i,errorEl:o})});var g=document.createElement("button");g.type="button",g.className="holi-object-details-btn holi-object-details-btn-secondary",g.textContent="Cancel",g.disabled=v,g.addEventListener("click",function(){"add"!==f?(p=t.clone(e.record||{}),f="view",y()):t.close()}),d.appendChild(g);var w=document.createElement("button");w.type="button",w.className="holi-object-details-btn",w.textContent=v?"Saving...":"Save",w.disabled=v,w.addEventListener("click",s(r().m(function n(){var i;return r().w(function(n){for(;;)switch(n.p=n.n){case 0:if(!v&&"function"==typeof e.onSave){n.n=1;break}return n.a(2);case 1:if(t.validateFields(b,m)){n.n=2;break}return n.a(2);case 2:return v=!0,y(),n.p=3,n.n=4,Promise.resolve(e.onSave(t.clone(p),f));case 4:(i=n.v)&&"object"===o(i)&&(p=t.clone(i)),f="view";case 5:return n.p=5,v=!1,y(),n.f(5);case 6:return n.a(2)}},n,null,[[3,,5,6]])}))),d.appendChild(w)}else h.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-row";var r=document.createElement("strong");r.textContent=e.label;var i=document.createElement("span");i.textContent=t.stringifyValue(p[e.name]),n.append(r,i),c.appendChild(n)})};this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(i),y()}},{key:"openLoading",value:function(){var t=this,e=u({title:"Details"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),r=n.fragment,i=(n.overlay,n.header),o=n.body,a=document.createElement("h2");a.textContent="Loading ".concat(e.title,"..."),i.appendChild(a);var s=document.createElement("div");s.className="holi-object-details-header-actions";var l=document.createElement("button");l.type="button",l.className="holi-object-details-btn holi-object-details-btn-secondary",l.textContent="Close",l.addEventListener("click",function(){return t.close()}),s.appendChild(l),i.appendChild(s);var c=document.getElementById("object-details-skeleton-template");if(c&&c.content)o.appendChild(c.content.cloneNode(!0));else{var d=document.createElement("div");d.className="dg-skeleton";for(var h=0;h<4;h+=1){var f=document.createElement("div");f.className=0===h?"sk-line sk-title":"sk-line",d.appendChild(f)}o.appendChild(d)}this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(r)}},{key:"close",value:function(){this.keyHandler&&(document.removeEventListener("keydown",this.keyHandler),this.keyHandler=null),this.overlay&&(this.overlay.remove(),this.overlay=null)}},{key:"createDialogScaffold",value:function(){var t=this,e=document.getElementById("object-details-template");if(!e||!e.content)throw new Error('Template "object-details-template" not found');var n=e.content.cloneNode(!0),r=n.querySelector(".dialog-overlay"),i=n.querySelector(".dialog-header"),o=n.querySelector(".dialog-body"),a=n.querySelector(".dialog-footer");if(!(r&&i&&o&&a))throw new Error("object-details-template has invalid structure");return this.overlay=r,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()}),{fragment:n,overlay:r,header:i,body:o,footer:a}}},{key:"normalizeMode",value:function(t){var e=String(t||"view").trim().toLowerCase();return"add"===e||"edit"===e||"view"===e?e:"view"}},{key:"normalizeFields",value:function(t,e,n){var r=this,i=new Set((n||[]).map(function(t){return String(t)})),o=new Map;return(t||[]).forEach(function(t){var n=String((null==t?void 0:t.name)||"").trim();n&&!o.has(n)&&o.set(n,r.normalizeField(t,null==e?void 0:e[n],i))}),Object.keys(e||{}).forEach(function(t){o.has(t)||o.set(t,r.normalizeField({name:t,label:t},null==e?void 0:e[t],i))}),Array.from(o.values())}},{key:"normalizeField",value:function(t,e,n){var r=null!=t&&t.constraints&&"object"===o(t.constraints)?t.constraints:{},i=this.resolveRequired(t,r),a=this.normalizeOptions((null==t?void 0:t.lov)||(null==t?void 0:t.options)||r.lov),s=(null==t?void 0:t.formFieldType)||(null==t?void 0:t.type)||r.type||this.inferType(e),l=this.normalizeFieldType(s,a);return{name:String((null==t?void 0:t.name)||""),label:String((null==t?void 0:t.label)||(null==t?void 0:t.name)||""),type:l,required:i,readonly:!(null==t||!t.readonly)||n.has(String((null==t?void 0:t.name)||"")),min:this.resolveConstraint(t,r,"min"),max:this.resolveConstraint(t,r,"max"),step:this.resolveConstraint(t,r,"step"),minLength:this.resolveConstraint(t,r,"minLength"),maxLength:this.resolveConstraint(t,r,"maxLength"),pattern:this.resolveConstraint(t,r,"pattern"),placeholder:String((null==t?void 0:t.placeholder)||r.placeholder||""),options:a}}},{key:"resolveRequired",value:function(t,e){return"boolean"==typeof(null==t?void 0:t.required)?t.required:"boolean"==typeof(null==e?void 0:e.required)?e.required:(!0===(null==t?void 0:t.optional)||null==e||e.optional,!1)}},{key:"resolveConstraint",value:function(t,e,n){return null!=(null==t?void 0:t[n])?t[n]:null!=(null==e?void 0:e[n])?e[n]:"min"===n&&Array.isArray(null==e?void 0:e.range)?e.range[0]:"max"===n&&Array.isArray(null==e?void 0:e.range)?e.range[1]:null}},{key:"normalizeFieldType",value:function(t,e){var n=String(t||"text").trim().toLowerCase();return!e.length||"select"!==n&&"lov"!==n&&"text"!==n?"textarea"===n?"textarea":"checkbox"===n||"boolean"===n?"boolean":"number"===n||"range"===n?"number":"date"===n||"datetime-local"===n||"time"===n||"email"===n||"url"===n?n:"text":"select"}},{key:"normalizeOptions",value:function(t){return Array.isArray(t)?t.map(function(t){return t&&"object"===o(t)?{value:null!=t.value?t.value:t.id,label:null!=t.label?t.label:t.value}:{value:t,label:t}}).filter(function(t){return null!=t.value}):[]}},{key:"inferType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createControl",value:function(t,e){if("select"===t.type){var n=document.createElement("select");if(!t.required){var r=document.createElement("option");r.value="",r.textContent="-- Select --",n.appendChild(r)}return t.options.forEach(function(t){var e=document.createElement("option");e.value=null==t.value?"":String(t.value),e.textContent=null==t.label?"":String(t.label),n.appendChild(e)}),n.value=null==e?"":String(e),this.applyControlConstraints(n,t),n}if("textarea"===t.type){var i=document.createElement("textarea");return i.value=null==e?"":String(e),this.applyControlConstraints(i,t),i}var o=document.createElement("input");return"boolean"===t.type?(o.type="checkbox",o.checked=!!e):(o.type="number"===t.type?"number":t.type,o.value=null==e?"":String(e)),this.applyControlConstraints(o,t),o}},{key:"applyControlConstraints",value:function(t,e){e.required&&(t.required=!0),e.placeholder&&"placeholder"in t&&(t.placeholder=e.placeholder),null!=e.min&&"min"in t&&(t.min=String(e.min)),null!=e.max&&"max"in t&&(t.max=String(e.max)),null!=e.step&&"step"in t&&(t.step=String(e.step)),null!=e.minLength&&"minLength"in t&&(t.minLength=Number(e.minLength)),null!=e.maxLength&&"maxLength"in t&&(t.maxLength=Number(e.maxLength)),e.pattern&&"pattern"in t&&"select"!==e.type&&(t.pattern=String(e.pattern))}},{key:"readControlValue",value:function(t,e){if("boolean"===e.type)return!!t.checked;if("number"===e.type){var n=String(t.value||"").trim();if(!n)return null;var r=Number(n);return Number.isNaN(r)?null:r}return t.value}},{key:"validateFields",value:function(t,e){var n=this,r=!0;return t.forEach(function(t){var e=t.field,i=t.control,o=t.errorEl;if(n.setFieldError(o,""),!e.readonly){var a=n.readControlValue(i,e);if(e.required&&(null==a||""===a||Array.isArray(a)&&0===a.length))return r=!1,void n.setFieldError(o,"".concat(e.label," is required."));i.checkValidity()||(r=!1,n.setFieldError(o,i.validationMessage||"Invalid value for ".concat(e.label,".")))}}),e&&(e.textContent=r?"":"Please fix validation errors before saving."),r}},{key:"setFieldError",value:function(t,e){t&&(t.textContent=String(e||""))}},{key:"stringifyValue",value:function(t){return null==t?"":"boolean"==typeof t?t?"true":"false":String(t)}},{key:"clone",value:function(t){return JSON.parse(JSON.stringify(null==t?{}:t))}}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},458(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.d(e,{T:()=>d});var d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,t),this.state=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e),this.listeners=new Set,this.id=n.id||"hub_".concat(t.nextId++),this.proxyCache=new WeakMap,this.proxy=this.createProxy(this.state,[]),t.stores.set(this.id,this)}return l(t,[{key:"createProxy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==i(t))return t;if(this.proxyCache.has(t))return this.proxyCache.get(t);var n=this,r=new Proxy(t,{get:function(t,r){var o=t[r];return null!=o&&"object"===i(o)?n.createProxy(o,e.concat(String(r))):o},set:function(t,r,i){var o=t[r];t[r]=i;var a=e.concat(String(r)).join(".");return n.notify(a,i,o),!0},deleteProperty:function(t,r){if(!(r in t))return!0;var i=t[r];delete t[r];var o=e.concat(String(r)).join(".");return n.notify(o,void 0,i),!0}});return this.proxyCache.set(t,r),r}},{key:"subscribe",value:function(t){var e=this,n={callback:t,selector:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null};return this.listeners.add(n),function(){return e.listeners.delete(n)}}},{key:"notify",value:function(t,e,n){var r=this;this.listeners.forEach(function(i){var o=i.callback,a=i.selector;a&&!a(r.proxy,{path:t,value:e,oldValue:n})||o(r.proxy,{path:t,value:e,oldValue:n})})}},{key:"batch",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.entries(n).forEach(function(n){var i,o,a=(o=2,function(t){if(Array.isArray(t))return t}(i=n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(i,o)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],l=a[1];t.setByPath(e.proxy,s,l)})}},{key:"getSnapshot",value:function(){return JSON.parse(JSON.stringify(this.state))}}],[{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"get",value:function(t){return this.stores.get(t)||null}},{key:"ensure",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultStoreId,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get(t)||this.create(e,{id:t})}},{key:"destroy",value:function(t){var e=this.get(t);return!!e&&(e.listeners.clear(),this.stores.delete(t),!0)}},{key:"parsePath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t&&"string"==typeof t?t.replace(/\[(\w+)\]/g,".$1").split(".").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"getByPath",value:function(t,e){return(Array.isArray(e)?e:this.parsePath(e)).reduce(function(t,e){return null==t?void 0:t[e]},t)}},{key:"setByPath",value:function(t,e,n){var r=Array.isArray(e)?e:this.parsePath(e);if(!r.length)return!1;for(var o=t,a=0;a<r.length-1;a+=1){var s=r[a];null!=o[s]&&"object"===i(o[s])||(o[s]={}),o=o[s]}return o[r[r.length-1]]=n,!0}},{key:"publish",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultStoreId;if(!t||"string"!=typeof t)return!1;var r=this.ensure(n);return this.setByPath(r.proxy,t,e)}}])}();u(d,"stores",new Map),u(d,"nextId",1),u(d,"defaultStoreId","global");var h=function(){return l(function t(){a(this,t)},null,[{key:"isInput",value:function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName}},{key:"readBoundValue",value:function(t,e){return e?d.getByPath(t.proxy,e):t.proxy}},{key:"writeBoundValue",value:function(t,e,n){e&&d.setByPath(t.proxy,e,n)}},{key:"renderElement",value:function(t,e){if(this.isInput(t)){var n=null==e?"":String(e);t.value!==n&&(t.value=n)}else t.textContent=null==e?"":String(e)}},{key:"disconnectElement",value:function(t){var e,n=this.bindings.get(t);n&&(t.removeEventListener("input",n.onInput),null===(e=n.unsubscribe)||void 0===e||e.call(n),this.bindings.delete(t))}},{key:"connectElement",value:function(t){var e=this;this.disconnectElement(t);var n=t.dataset.state,r=t.dataset.statePath||"",i=d.get(n);if(i){var o=function(){return e.renderElement(t,e.readBoundValue(i,r))},a=function(){return e.writeBoundValue(i,r,t.value)},s=i.subscribe(function(t,e){(!r||e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&o()});this.isInput(t)&&t.addEventListener("input",a),this.bindings.set(t,{onInput:a,unsubscribe:s}),o()}}},{key:"connect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.connectElement(e)})}},{key:"disconnect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.disconnectElement(e)})}}])}();u(h,"bindings",new WeakMap),d.subscribe=function(t,e,n){if("function"==typeof t){var r="string"==typeof e?e:d.defaultStoreId;return d.ensure(r).subscribe(t)}var i=String(t||"").trim(),o=e,a="string"==typeof n?n:d.defaultStoreId;if(!i||"function"!=typeof o)return function(){};var s=d.ensure(a),l=d.getByPath(s.proxy,i);return o(l,{path:i,initial:!0}),s.subscribe(function(t,e){var n=(null==e?void 0:e.path)||"";if(n===i||n.startsWith("".concat(i,"."))||i.startsWith("".concat(n,"."))){var r=d.getByPath(t,i);o(r,e)}})},"undefined"!=typeof window&&(window.StateHub=d,window.StateConnector=h)},573(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function s(t,e,n){return(e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{D:()=>u});var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeName",value:function(t){var e=String(t||"").trim().toLowerCase();return e?this.aliases.get(e)||e:""}},{key:"parseToken",value:function(t){var e=String(t||"").trim();if(!e)return{name:"",param:""};var n=e.indexOf(":");return-1===n?{name:this.normalizeName(e),param:""}:{name:this.normalizeName(e.slice(0,n)),param:e.slice(n+1).trim()}}},{key:"parseList",value:function(t){return t?Array.isArray(t)?t.map(function(t){return String(t||"").trim()}).filter(Boolean):String(t).split(/[,\s]+/g).map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveListFromElement",value:function(t){if(!t||!t.getAttribute)return[];var e=t.getAttribute("data-validator"),n=t.getAttribute("data-validators");return this.parseList(e||n||"")}},{key:"register",value:function(t,e){var n=this.normalizeName(t);if(!n)throw new Error("Validator name is required");if("function"!=typeof e)throw new Error("Validator must be a function");try{var r=e("test",void 0,{});if(!("boolean"==typeof r||r&&"object"===o(r)&&"boolean"==typeof r.valid))throw new Error("Validator must return boolean or { valid, message }")}catch(t){throw new Error('Invalid validator "'.concat(n,'": ').concat(t.message||t))}this.customValidators.set(n,e)}},{key:"unregister",value:function(t){var e=this.normalizeName(t);return!!e&&this.customValidators.delete(e)}},{key:"validateToken",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseToken(t),i=r.name,a=r.param;if(!i)return{valid:!0,message:"",token:""};var s=this.customValidators.get(i)||this.builtInValidators.get(i);if(!s)return{valid:!0,message:"",token:i};var l=this.buildValidationContext(n),u=this.resolveParam(a,l);try{var c=s(e,u,l);return"boolean"==typeof c?{valid:c,message:c?"":"Invalid value.",token:i}:c&&"object"===o(c)&&"boolean"==typeof c.valid?{valid:c.valid,message:c.valid?"":String(c.message||"Invalid value."),token:i}:{valid:!1,message:'Validator "'.concat(i,'" returned invalid result.'),token:i}}catch(t){return{valid:!1,message:'Validator "'.concat(i,'" failed.'),token:i}}}},{key:"validateValue",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseList(e),i=0;i<r.length;i+=1){var o=this.validateToken(r[i],t,n);if(!o.valid)return o}return{valid:!0,message:"",token:""}}},{key:"validateElement",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||void 0===t.value)return{valid:!0,message:"",token:""};var n=this.resolveListFromElement(t),r=this.validateValue(t.value,n,i({element:t},e));return"function"==typeof t.setCustomValidity&&t.setCustomValidity(r.valid?"":r.message),t.setAttribute("aria-invalid",r.valid?"false":"true"),r.valid?t.removeAttribute("data-validation-error"):t.setAttribute("data-validation-error",r.message||"Invalid value."),r}},{key:"bindNative",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e&&e.querySelectorAll&&e.querySelectorAll("[data-validator], [data-validators]").forEach(function(e){if(e instanceof HTMLElement&&!t.boundElements.has(e)){var n=function(){return t.validateElement(e)};e.addEventListener("input",n),e.addEventListener("change",n),e.addEventListener("blur",n),t.boundElements.add(e),n()}})}},{key:"enableAutoBind",value:function(){var t=this;if(!this.nativeValidationBound&&"undefined"!=typeof document){this.nativeValidationBound=!0;var e=function(){return t.bindNative(document)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}}},{key:"buildValidationContext",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i(i({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),r=e.element,o="undefined"!=typeof document?document:null,a=(null==r||null===(t=r.closest)||void 0===t?void 0:t.call(r,"form"))||o,s=this.readModelState(a);return i(i(i({},n),s),{},{model:s},e)}},{key:"readModelState",value:function(t){var e=this,n={};return t&&t.querySelectorAll?(t.querySelectorAll("[data-model]").forEach(function(t){var r=String(t.getAttribute("data-model")||"").trim();r&&e.setPathValue(n,r,t.value)}),n):n}},{key:"setPathValue",value:function(t,e,n){var r=String(e||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(r.length){for(var i=t,a=0;a<r.length-1;a+=1){var s=r[a];null!=i[s]&&"object"===o(i[s])||(i[s]={}),i=i[s]}i[r[r.length-1]]=n}}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}},{key:"resolveParam",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=String(t||"").trim();if(!n)return n;var r=n.match(/^@\{(.+)\}$/);if(r){var i=r[1].trim();try{var o="undefined"!=typeof window&&window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(o)return new o(e).evaluate(i)}catch(t){}return this.getPathValue(e,i)}if(/^(true|false)$/i.test(n))return"true"===n.toLowerCase();if(/^-?\d+(\.\d+)?$/.test(n))return Number(n);if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\[\w+\])*$/.test(n)){var a=this.getPathValue(e,n);if(void 0!==a)return a}return n}}],null&&a(t.prototype,null),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();s(u,"customValidators",new Map),s(u,"nativeValidationBound",!1),s(u,"boundElements",new WeakSet),s(u,"builtInValidators",new Map([["required",function(t){var e=(null==t?"":String(t)).trim().length>0;return{valid:e,message:e?"":"This field is required."}}],["email",function(t){var e=null==t?"":String(t).trim(),n=!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return{valid:n,message:n?"":"Enter a valid email address."}}],["eq",function(t,e){var n=(null==t?"":String(t))===(null==e?"":String(e));return{valid:n,message:n?"":"Values do not match."}}],["minlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length>=r;return{valid:i,message:i?"":"Minimum length is ".concat(r,".")}}],["maxlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length<=r;return{valid:i,message:i?"":"Maximum length is ".concat(r,".")}}],["pattern",function(t,e){var n=null==t?"":String(t),r=String(e||"").trim();if(!r)return{valid:!0,message:""};try{var i=new RegExp(r).test(n);return{valid:i,message:i?"":"Value does not match expected pattern."}}catch(t){return{valid:!0,message:""}}}]])),s(u,"aliases",new Map([["required","required"],["email","email"],["eq","eq"],["equals","eq"],["pattern","pattern"],["minlength","minlength"],["min-length","minlength"],["min_length","minlength"],["maxlength","maxlength"],["max-length","maxlength"],["max_length","maxlength"]])),"undefined"!=typeof window&&(window.Validator=u)},194(t,e,n){var r={"./accordion.js":892,"./backtotop.js":951,"./block.js":935,"./breadcrumbs.js":400,"./button.js":92,"./calendar.js":110,"./carousel.js":838,"./chart.js":546,"./checkbox.js":673,"./component.js":812,"./datagrid.js":40,"./datatable.js":994,"./dialog.js":704,"./drawer.js":145,"./dropdown.js":257,"./form.js":734,"./gallery.js":120,"./input.js":390,"./layout.js":166,"./loader.js":819,"./menubar.js":622,"./page.js":683,"./panel.js":511,"./progress.js":295,"./radio.js":101,"./rating.js":953,"./region.js":108,"./search.js":12,"./select.js":796,"./statscard.js":911,"./tabs.js":396,"./textarea.js":618,"./toast.js":9,"./tree.js":648,"./treepanel.js":712,"./wizard.js":191};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=194}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(904),e=n(396),r=n(994),i=n(40),o=n(257),a=n(796),s=n(390),l=n(673),u=n(734),c=n(101),d=n(92),h=n(166),f=n(819),p=n(935),v=n(511),y=n(108),m=n(892),b=n(110),g=n(838),w=n(400),S=n(951),k=n(546),E=n(704),O=n(9),C=n(145),A=n(120),j=n(622),P=n(648),T=n(712),x=n(12),L=n(191),I=n(911);function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach(function(e){H(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function M(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return F(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(F(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,F(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,F(d,"constructor",u),F(u,"constructor",l),l.displayName="GeneratorFunction",F(u,i,"GeneratorFunction"),F(d),F(d,i,"Generator"),F(d,r,function(){return this}),F(d,"toString",function(){return"[object Generator]"}),(M=function(){return{w:o,m:h}})()}function F(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}F=function(t,e,n,r){function o(e,n){F(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},F(t,e,n,r)}function q(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function _(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){q(o,r,i,a,s,"next",t)}function s(t){q(o,r,i,a,s,"throw",t)}a(void 0)})}}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,V(r.key),r)}}function H(t,e,n){return(e=V(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function V(t){var e=function(t){if("object"!=D(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==D(e)?e:e+""}var G=new Set(["fetch","push","sync"]),z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cacheName=e.cacheName||"html-first-lib-v2-2026",this.offlineFallbackUrl=e.offlineFallbackUrl||"/offline.html",this.remoteHandlers=new Map,this.runtimeHandlers=new Map,this.syncQueue=[],this.started=!1,this.registration=null,this.handleMessageEvent=this.handleMessageEvent.bind(this),this.handleFetchEvent=this.handleFetchEvent.bind(this),this.handlePushEvent=this.handlePushEvent.bind(this),this.handleSyncEvent=this.handleSyncEvent.bind(this)}return e=t,n=[{key:"isWorker",value:function(){return t.isServiceWorkerScope()}},{key:"isClient",value:function(){return t.isWindowScope()}},{key:"start",value:function(){return!this.isWorker()||this.started||(self.addEventListener("message",this.handleMessageEvent),self.addEventListener("fetch",this.handleFetchEvent),self.addEventListener("push",this.handlePushEvent),self.addEventListener("sync",this.handleSyncEvent),this.started=!0),this}},{key:"on",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!G.has(t))throw new Error("Unsupported service-worker event type: ".concat(t));if("function"!=typeof n)throw new Error("Service worker runtime handler must be a function");var i=this.toKey(t,e);return this.runtimeHandlers.set(i,{eventType:t,id:e,priority:Number(r.priority||0),match:r.match||null,handler:n}),this}},{key:"off",value:function(t,e){return this.runtimeHandlers.delete(this.toKey(t,e)),this.remoteHandlers.delete(this.toKey(t,e)),this}},{key:"registerHandlers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.isClient())return Promise.resolve(!1);var n=(Array.isArray(e)?e:[e]).map(function(e){return t.sanitizeRemoteHandler(e)}).filter(Boolean);return n.length?this.postToServiceWorker({type:"REGISTER_SW_HANDLERS",handlers:n}):Promise.resolve(!1)}},{key:"unregisterHandler",value:function(t,e){return this.isClient()?this.postToServiceWorker({type:"UNREGISTER_SW_HANDLER",eventType:t,id:e}):Promise.resolve(!1)}},{key:"clearHandlers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.isClient()?this.postToServiceWorker({type:"CLEAR_SW_HANDLERS",eventType:t}):Promise.resolve(!1)}},{key:"registerWorker",value:(h=_(M().m(function t(){var e,n,r=arguments;return M().w(function(t){for(;;)switch(t.n){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:"/sw.js",n=r.length>1&&void 0!==r[1]?r[1]:{},this.isClient()){t.n=1;break}return t.a(2,null);case 1:if("serviceWorker"in navigator){t.n=2;break}return t.a(2,null);case 2:return t.n=3,navigator.serviceWorker.register(e,n);case 3:return this.registration=t.v,t.a(2,this.registration)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"ready",value:(d=_(M().m(function t(){return M().w(function(t){for(;;)switch(t.n){case 0:if(this.isClient()){t.n=1;break}return t.a(2,null);case 1:if("serviceWorker"in navigator){t.n=2;break}return t.a(2,null);case 2:return t.a(2,navigator.serviceWorker.ready)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"postToServiceWorker",value:(c=_(M().m(function t(e){var n,r,i;return M().w(function(t){for(;;)switch(t.n){case 0:if(i=this.registration){t.n=2;break}return t.n=1,this.ready();case 1:i=t.v;case 2:if(n=i){t.n=3;break}return t.a(2,!1);case 3:if(r=navigator.serviceWorker.controller||n.active||n.waiting||n.installing){t.n=4;break}return t.a(2,!1);case 4:return r.postMessage(e),t.a(2,!0)}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"handleMessageEvent",value:function(t){var e=this,n=t&&t.data?t.data:{},r=n.type;if(r)if("REGISTER_SW_HANDLERS"!==r)if("UNREGISTER_SW_HANDLER"!==r){if("CLEAR_SW_HANDLERS"===r){var i=n.eventType;return i?void Array.from(this.remoteHandlers.keys()).forEach(function(t){t.startsWith("".concat(i,":"))&&e.remoteHandlers.delete(t)}):void this.remoteHandlers.clear()}if("SKIP_WAITING"!==r){if("QUEUE_SYNC_TASK"===r&&n.task&&"object"===D(n.task))this.syncQueue.push(n.task);else if("SHOW_NOTIFICATION"===r){var o=n.payload||{};t.waitUntil(this.showNotificationFromPayload(o))}}else self.skipWaiting()}else this.remoteHandlers.delete(this.toKey(n.eventType,n.id));else(Array.isArray(n.handlers)?n.handlers:[]).forEach(function(t){var n=e.sanitizeRemoteHandler(t);n&&e.remoteHandlers.set(e.toKey(n.eventType,n.id),n)})}},{key:"handleFetchEvent",value:function(t){var e=this.findRuntimeHandler("fetch",t);if(e)t.respondWith(Promise.resolve(e.handler(t)));else{var n=this.findRemoteHandler("fetch",t);n?t.respondWith(this.executeFetchStrategy(n,t)):t.respondWith(this.defaultFetch(t.request))}}},{key:"handlePushEvent",value:function(t){var e=this.findRuntimeHandler("push",t);if(e)t.waitUntil(Promise.resolve(e.handler(t)));else{var n=this.findRemoteHandler("push",t);n?t.waitUntil(this.executePush(n,t)):t.waitUntil(self.registration.showNotification("Update Available"))}}},{key:"handleSyncEvent",value:function(t){var e=this.findRuntimeHandler("sync",t);if(e)t.waitUntil(Promise.resolve(e.handler(t)));else{var n=this.findRemoteHandler("sync",t);n&&t.waitUntil(this.executeSync(n,t))}}},{key:"executeFetchStrategy",value:(u=_(M().m(function t(e,n){var r,i,o,a,s,l,u,c,d,h,f,p=this;return M().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=String(e.strategy||"network-first").toLowerCase(),i=n.request,"image-optimize"!==r){t.n=1;break}return t.a(2,this.optimizeImageFetch(i,e));case 1:if("cache-only"!==r){t.n=3;break}return t.n=2,caches.match(i);case 2:return o=t.v,t.a(2,o||this.defaultFetch(i));case 3:if("network-only"!==r){t.n=4;break}return t.a(2,fetch(i));case 4:if("cache-first"!==r){t.n=8;break}return t.n=5,caches.match(i);case 5:if(!(a=t.v)){t.n=6;break}return t.a(2,a);case 6:return t.n=7,fetch(i);case 7:return s=t.v,this.cacheResponse(i,s),t.a(2,s);case 8:if("stale-while-revalidate"!==r){t.n=10;break}return t.n=9,caches.match(i);case 9:return l=t.v,u=fetch(i).then(function(t){return p.cacheResponse(i,t),t}).catch(function(){return null}),t.a(2,l||u||this.defaultFetch(i));case 10:return t.p=10,t.n=11,fetch(i);case 11:return c=t.v,this.cacheResponse(i,c),t.a(2,c);case 12:return t.p=12,t.v,t.n=13,caches.match(i);case 13:if(!(d=t.v)){t.n=14;break}return t.a(2,d);case 14:if(!(h=e.fallbackUrl||this.offlineFallbackUrl)){t.n=16;break}return t.n=15,caches.match(h);case 15:if(!(f=t.v)){t.n=16;break}return t.a(2,f);case 16:return t.a(2,Response.error())}},t,this,[[10,12]])})),function(t,e){return u.apply(this,arguments)})},{key:"executePush",value:function(t,e){var n=this.extractPushPayload(e);return this.showNotificationFromPayload({title:n.title||t.notification&&t.notification.title||"Update Available",body:n.body||t.notification&&t.notification.body||"",icon:n.icon||t.notification&&t.notification.icon,badge:n.badge||t.notification&&t.notification.badge,data:n.data||t.notification&&t.notification.data})}},{key:"executeSync",value:(l=_(M().m(function t(e,n){var r,i;return M().w(function(t){for(;;)switch(t.n){case 0:if(!(r=e.match&&e.match.tag)||n.tag===r){t.n=1;break}return t.a(2);case 1:return t.n=2,this.flushSyncQueue(n.tag);case 2:if((i=e.sync&&"object"===D(e.sync)?e.sync:null)&&i.endpoint){t.n=3;break}return t.a(2);case 3:return t.n=4,fetch(i.endpoint,{method:i.method||"POST",headers:i.headers||{"Content-Type":"application/json"},body:i.body?JSON.stringify(i.body):void 0});case 4:return t.a(2)}},t,this)})),function(t,e){return l.apply(this,arguments)})},{key:"defaultFetch",value:(s=_(M().m(function t(e){var n,r;return M().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.n=1,caches.match(e);case 1:if(!(n=t.v)){t.n=2;break}return t.a(2,n);case 2:return t.p=2,t.n=3,fetch(e);case 3:return t.a(2,t.v);case 4:return t.p=4,t.v,t.n=5,caches.match(this.offlineFallbackUrl);case 5:return r=t.v,t.a(2,r||Response.error())}},t,this,[[2,4]])})),function(t){return s.apply(this,arguments)})},{key:"cacheResponse",value:(a=_(M().m(function t(e,n){return M().w(function(t){for(;;)switch(t.n){case 0:if(n&&n.ok&&"GET"===e.method){t.n=1;break}return t.a(2);case 1:return t.n=2,caches.open(this.cacheName);case 2:t.v.put(e,n.clone());case 3:return t.a(2)}},t,this)})),function(t,e){return a.apply(this,arguments)})},{key:"optimizeImageFetch",value:(o=_(M().m(function t(e,n){var r,i,o,a,s,l;return M().w(function(t){for(;;)switch(t.n){case 0:return r=new URL(e.url),i=Number(n.maxWidth||1280),o=Number(n.quality||75),r.searchParams.set("auto","format,compress"),r.searchParams.set("fit","max"),r.searchParams.set("w",String(i)),r.searchParams.set("q",String(o)),a=new Request(r.toString(),e),t.n=1,caches.match(a);case 1:if(!(s=t.v)){t.n=2;break}return t.a(2,s);case 2:return t.n=3,fetch(a);case 3:return l=t.v,this.cacheResponse(a,l),t.a(2,l)}},t,this)})),function(t,e){return o.apply(this,arguments)})},{key:"flushSyncQueue",value:(i=_(M().m(function t(){var e,n,r,i,o=arguments;return M().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=o.length>0&&void 0!==o[0]?o[0]:"",this.syncQueue.length){t.n=1;break}return t.a(2);case 1:n=this.syncQueue.slice(),this.syncQueue=[],r=0;case 2:if(!(r<n.length)){t.n=8;break}if(!(i=n[r]).tag||!e||i.tag===e){t.n=3;break}return this.syncQueue.push(i),t.a(3,7);case 3:if(i.url){t.n=4;break}return t.a(3,7);case 4:return t.p=4,t.n=5,fetch(i.url,{method:i.method||"POST",headers:i.headers||{"Content-Type":"application/json"},body:i.body?JSON.stringify(i.body):void 0});case 5:t.n=7;break;case 6:t.p=6,t.v,this.syncQueue.push(i);case 7:r+=1,t.n=2;break;case 8:return t.a(2)}},t,this,[[4,6]])})),function(){return i.apply(this,arguments)})},{key:"extractPushPayload",value:function(t){try{return t.data?t.data.json():{}}catch(e){return{title:"Update Available",body:t.data?t.data.text():""}}}},{key:"showNotificationFromPayload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return self.registration.showNotification(t.title||"Update Available",{body:t.body||"",icon:t.icon||null,badge:t.badge||null,data:t.data||null})}},{key:"findRuntimeHandler",value:function(t,e){var n=this,r=null;return this.runtimeHandlers.forEach(function(i){i.eventType===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"findRemoteHandler",value:function(t,e){var n=this,r=null;return this.remoteHandlers.forEach(function(i){i.eventType===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"matches",value:function(t,e){if(!t)return!0;if(e.request){var n=e.request,r=new URL(n.url);if(t.method&&String(t.method).toUpperCase()!==n.method)return!1;if(t.urlStartsWith&&!r.href.startsWith(String(t.urlStartsWith)))return!1;if(t.urlIncludes&&!r.href.includes(String(t.urlIncludes)))return!1;if(t.urlPattern)try{if(!new RegExp(String(t.urlPattern)).test(r.href))return!1}catch(t){return!1}}return"string"!=typeof e.tag||!t.tag||t.tag===e.tag}},{key:"sanitizeRemoteHandler",value:function(t){if(!t||"object"!==D(t))return null;var e=String(t.eventType||"").trim(),n=String(t.id||"").trim();return e&&n&&G.has(e)?{eventType:e,id:n,priority:Number(t.priority||0),match:t.match&&"object"===D(t.match)?N({},t.match):{},strategy:t.strategy?String(t.strategy):null,fallbackUrl:t.fallbackUrl?String(t.fallbackUrl):null,maxWidth:Number(t.maxWidth||1280),quality:Number(t.quality||75),notification:t.notification&&"object"===D(t.notification)?N({},t.notification):null,sync:t.sync&&"object"===D(t.sync)?N({},t.sync):null}:null}},{key:"toKey",value:function(t,e){return"".concat(t,":").concat(e)}}],r=[{key:"isServiceWorkerScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof ServiceWorkerGlobalScope&&t instanceof ServiceWorkerGlobalScope}},{key:"isWindowScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof window&&t===window}},{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.globalInstance||(this.globalInstance=new t(e)),this.globalInstance}},{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"buildHandler",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{eventType:t,id:e,priority:Number(n.priority||0),match:n.match||{},strategy:n.strategy||null,fallbackUrl:n.fallbackUrl||null}}}],n&&B(e.prototype,n),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,i,o,a,s,l,u,c,d,h}();function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function W(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return J(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(J(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,J(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,J(d,"constructor",u),J(u,"constructor",l),l.displayName="GeneratorFunction",J(u,i,"GeneratorFunction"),J(d),J(d,i,"Generator"),J(d,r,function(){return this}),J(d,"toString",function(){return"[object Generator]"}),(W=function(){return{w:o,m:h}})()}function J(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}J=function(t,e,n,r){function o(e,n){J(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},J(t,e,n,r)}function $(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function K(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){$(o,r,i,a,s,"next",t)}function s(t){$(o,r,i,a,s,"throw",t)}a(void 0)})}}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,X(r.key),r)}}function Z(t,e,n){return(e=X(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}H(z,"globalInstance",null),z.isServiceWorkerScope()&&z.getInstance().start(),"undefined"!=typeof window&&(window.ServiceWorkerManager=z);var Y=function(){function n(){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),n.instance)return n.instance;n.instance=this}return R=n,N=[{key:"initI18n",value:(B=K(W().m(function t(){return W().w(function(t){for(;;)switch(t.n){case 0:return this.currentLang=document.documentElement.lang||"en-US",t.n=1,this.loadDict(this.currentLang);case 1:return t.a(2)}},t,this)})),function(){return B.apply(this,arguments)})},{key:"getText",value:(_=K(W().m(function t(e,n){var r,i,o,a=arguments;return W().w(function(t){for(;;)switch(t.n){case 0:return r=a.length>2&&void 0!==a[2]?a[2]:{},t.n=1,this.getDict(e);case 1:return i=t.v,o=i[n]||n,t.a(2,o.replace(/{{(\w+)}}/g,function(t,e){return r[e]||""}))}},t,this)})),function(t,e){return _.apply(this,arguments)})},{key:"initThemes",value:function(){var t=this;this.currentPalette=document.documentElement.getAttribute("theme-palette")||"presto",this.activateThemePalette(this.currentPalette),document.addEventListener("theme-palette-change",function(e){t.activateThemePalette(e.detail.palette)})}},{key:"initServiceWorker",value:(q=K(W().m(function t(){var e,r,i,o,a=arguments;return W().w(function(t){for(;;)switch(t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},r=n.getServiceWorkerManager(e),i=e.scriptUrl||"/sw.js",o=e.registrationOptions||{},t.n=1,r.registerWorker(i,o);case 1:return t.a(2,r)}},t)})),function(){return q.apply(this,arguments)})},{key:"registerSWHandlers",value:(F=K(W().m(function t(){var e,r,i=arguments;return W().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:[],r=n.getServiceWorkerManager(),t.a(2,r.registerHandlers(e))},t)})),function(){return F.apply(this,arguments)})},{key:"clearSWHandlers",value:(M=K(W().m(function t(){var e,r,i=arguments;return W().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:null,r=n.getServiceWorkerManager(),t.a(2,r.clearHandlers(e))},t)})),function(){return M.apply(this,arguments)})},{key:"initPWA",value:function(){this.initInstallPrompt(),this.setPWAManifest()}}],D=[{key:"ensureLibraries",value:function(){if(!this.librariesRegistered){var n=[h.LayoutComponent,f.LoaderComponent,p.BlockComponent,v.PanelComponent,y.RegionComponent,m.AccordionComponent,b.CalendarComponent,g.CarouselComponent,w.BreadCrumbsComponent,S.BackToTopComponent,k.ChartComponent,e.TabsComponent,r.DataTable,i.DataGrid,o.DropdownComponent,a.SelectComponent,s.InputComponent,l.CheckboxGroupComponent,c.RadioGroupComponent,d.ButtonComponent,u.FormComponent,E.DialogComponent,O.ToastComponent,C.DrawerComponent,A.GalleryComponent,j.MenubarComponent,P.TreeComponent,T.TreePanelComponent,x.SearchComponent,L.WizardComponent,I.StatsCard].filter(Boolean);t.Z.registerLibrary("holi",n),this.librariesRegistered=!0}}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;this.ensureLibraries(),t.Z.initAll(e),t.Z.observeLifecycle(e)}},{key:"getServiceWorkerManager",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.swManager||(this.swManager=z.getInstance(t)),this.swManager}}],N&&Q(R.prototype,N),D&&Q(R,D),Object.defineProperty(R,"prototype",{writable:!1}),R;var R,N,D,M,F,q,_,B}();function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return nt(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(nt(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,nt(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,nt(d,"constructor",u),nt(u,"constructor",l),l.displayName="GeneratorFunction",nt(u,i,"GeneratorFunction"),nt(d),nt(d,i,"Generator"),nt(d,r,function(){return this}),nt(d,"toString",function(){return"[object Generator]"}),(et=function(){return{w:o,m:h}})()}function nt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}nt=function(t,e,n,r){function o(e,n){nt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},nt(t,e,n,r)}function rt(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function it(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){rt(o,r,i,a,s,"next",t)}function s(t){rt(o,r,i,a,s,"throw",t)}a(void 0)})}}function ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,at(r.key),r)}}function at(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}Z(Y,"contentProviders",{}),Z(Y,"swManager",null),Z(Y,"instance",null),Z(Y,"librariesRegistered",!1),"undefined"!=typeof window&&(window.HoliAppClass=Y);var st=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"resolve",value:function(t){throw new Error("Subclasses must implement resolve(dataSourceExpr)")}},{key:"getContent",value:(i=it(et().m(function t(e,n){return et().w(function(t){for(;;)switch(t.n){case 0:throw new Error("Subclasses must implement getContent(itemData, index)");case 1:return t.a(2)}},t)})),function(t,e){return i.apply(this,arguments)})},{key:"init",value:(r=it(et().m(function t(){return et().w(function(t){for(;;)if(0===t.n)return t.a(2)},t)})),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){}}],n=[{key:"name",get:function(){throw new Error("Subclasses must implement static name")}}],e&&ot(t.prototype,e),n&&ot(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();function lt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return ut(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function f(n,r){for(s=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],f=h.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=n<2&&f<o[1])?(s=0,h.v=r,h.n=o[1]):f<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(ut(e={},r,function(){return this}),e),d=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,ut(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=u,ut(d,"constructor",u),ut(u,"constructor",l),l.displayName="GeneratorFunction",ut(u,i,"GeneratorFunction"),ut(d),ut(d,i,"Generator"),ut(d,r,function(){return this}),ut(d,"toString",function(){return"[object Generator]"}),(lt=function(){return{w:o,m:h}})()}function ut(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}ut=function(t,e,n,r){function o(e,n){ut(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},ut(t,e,n,r)}function ct(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function dt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){ct(o,r,i,a,s,"next",t)}function s(t){ct(o,r,i,a,s,"throw",t)}a(void 0)})}}"undefined"!=typeof window&&(window.ContentProvider=st),n(458),n(194),window.HoliApp={HoliApp:Y,ServiceWorkerManager:z},window.Holi=window.HoliApp;var ht=function(){return!!document.getElementById("tabs")},ft=function(){var t=new Set(["/dist/holi.html","/holi.html"]),e=document.currentScript,n=(null==e?void 0:e.getAttribute("src"))||"";if(n){var r=n.replace(/holi\.js(\?.*)?$/i,"");r&&t.add("".concat(r,"holi.html"))}return Array.from(t)},pt=function(t){var e=document.createElement("div");e.innerHTML=t,e.querySelectorAll("template[id]").forEach(function(t){document.getElementById(t.id)||document.body.appendChild(t)})},vt=function(){var t=dt(lt().m(function t(){return lt().w(function(t){for(;;)switch(t.n){case 0:if(!ht()){t.n=1;break}return t.a(2);case 1:if(!window.__holiTemplatesLoading){t.n=3;break}return t.n=2,window.__holiTemplatesLoading;case 2:case 4:return t.a(2);case 3:return window.__holiTemplatesLoading=dt(lt().m(function t(){var e,n,r,i,o;return lt().w(function(t){for(;;)switch(t.p=t.n){case 0:e=ft(),n=0;case 1:if(!(n<e.length)){t.n=9;break}return r=e[n],t.p=2,t.n=3,fetch(r,{credentials:"same-origin"});case 3:if((i=t.v).ok){t.n=4;break}return t.a(3,8);case 4:return t.n=5,i.text();case 5:if(o=t.v,pt(o),!ht()){t.n=6;break}return t.a(2);case 6:t.n=8;break;case 7:t.p=7,t.v;case 8:n+=1,t.n=1;break;case 9:throw new Error("Holi template library not found (holi.html)");case 10:return t.a(2)}},t,null,[[2,7]])}))(),t.n=4,window.__holiTemplatesLoading}},t)}));return function(){return t.apply(this,arguments)}}(),yt=function(){var t=dt(lt().m(function t(){return lt().w(function(t){for(;;)switch(t.n){case 0:if(!1!==window.HoliAutoInit){t.n=1;break}return t.a(2);case 1:return t.n=2,vt();case 2:Y.init(document);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){yt().catch(function(t){return console.error(t)})},{once:!0}):yt().catch(function(t){return console.error(t)})})()})();
|