@claspo/components 1.2.0-theme.13 → 1.2.0-theme.16
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/SysButtonComponent/SysButtonComponent.js +1 -1
- package/SysCalendarComponent/SysCalendarComponent.js +1 -1
- package/SysCheckboxListComponent/SysCheckboxListComponent.js +1 -1
- package/SysColumnComponent/SysColumnComponent.js +1 -1
- package/SysColumnsComponent/SysColumnsComponent.js +1 -1
- package/SysConsentComponent/SysConsentComponent.js +1 -1
- package/SysContainerComponent/SysContainerComponent.js +1 -1
- package/SysCountdownTimerComponent/SysCountdownTimerComponent.js +1 -1
- package/SysDateComponent/SysDateComponent.js +1 -1
- package/SysDropdownInputComponent/SysDropdownInputComponent.js +1 -1
- package/SysImageComponent/SysImageComponent.js +1 -1
- package/SysInAppColumnsComponent/SysInAppColumnsComponent.js +1 -1
- package/SysInputComponent/SysInputComponent.js +1 -1
- package/SysPhoneInputComponent/SysPhoneInputComponent.js +1 -1
- package/SysPromoCodeComponent/SysPromoCodeComponent.js +1 -1
- package/SysRadioGroupComponent/SysRadioGroupComponent.js +1 -1
- package/SysSlideComponent/SysSlideComponent.js +1 -1
- package/SysSliderComponent/SysSliderComponent.js +1 -1
- package/SysSocialComponent/SysSocialComponent.js +1 -1
- package/SysTextAreaComponent/SysTextAreaComponent.js +1 -1
- package/SysTextComponent/SysTextComponent.js +1 -1
- package/SysVideoComponent/SysVideoComponent.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function r(t){return"cl-"+t}class i{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){return t=t||document,Math.max(t.documentElement.clientWidth,t.defaultView.innerWidth||0)}static height(t){return t=t||document,Math.max(t.documentElement.clientHeight,t.defaultView.innerHeight||0)}static scrollbarWidth(t){return(t=t||document).defaultView.innerWidth-t.documentElement.clientWidth}}var s=[];for(var l in{transparent:"#0000"})s.push(l);var a="\\s*([.\\d%]+)\\s*",c="\\("+[a,a,a]+"(?:,\\s*([.\\d]+)\\s*)?\\)",p="(?:rgb)a?",d="("+s.join("|")+")";function h(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(p+c,"i"),RegExp([d,"(?:#([a-f0-9]{3,8}))",p+c,"(?:hsl)a?"+c].join("|"),"gi");var u=Array.prototype.concat,m=Array.prototype.slice,b=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var r=t[n];h(r)?e=u.call(e,m.call(r)):e.push(r)}return e};b.wrap=function(t){return function(){return t(b(arguments))}};const g=b;var y={},f=Object.hasOwnProperty,v=Object.create(null);for(var E in y)f.call(y,E)&&(v[y[E]]=E);var O={to:{},get:{}};function S(t,e,n){return Math.min(Math.max(e,t),n)}O.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=O.get.hsl(t),n="hsl"):(e=O.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},O.get.rgb=function(t){if(!t)return null;var e,n,o,r=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(e.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)r[n]=parseInt(e[n]+e[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(e[n+1],0);e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:f.call(y,e[1])?((r=y[e[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}for(n=0;n<3;n++)r[n]=S(r[n],0,255);return r[3]=S(r[3],0,1),r},O.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,S(parseFloat(e[2]),0,100),S(parseFloat(e[3]),0,100),S(isNaN(n)?1:n,0,1)]}return null},O.to.rgb=function(){var t=g(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},O.to.hsl=function(){var t=g(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const T=O,C={},x={};for(const t of Object.keys(C))x[C[t]]=t;const R={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(R)){if(!("channels"in R[t]))throw new Error("missing channels property: "+t);if(!("labels"in R[t]))throw new Error("missing channel labels property: "+t);if(R[t].labels.length!==R[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=R[t];delete R[t].channels,delete R[t].labels,Object.defineProperty(R[t],"channels",{value:e}),Object.defineProperty(R[t],"labels",{value:n})}R.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=Math.min(e,n,o),i=Math.max(e,n,o),s=i-r;let l,a;i===r?l=0:e===i?l=(n-o)/s:n===i?l=2+(o-e)/s:o===i&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(r+i)/2;return a=i===r?0:c<=.5?s/(i+r):s/(2-i-r),[l,100*a,100*c]},R.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let r,i,s;if(0===n)return s=255*o,[s,s,s];r=o<.5?o*(1+n):o+n-o*n;const l=2*o-r,a=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,s=6*i<1?l+6*(r-l)*i:2*i<1?r:3*i<2?l+(r-l)*(2/3-i)*6:l,a[t]=255*s;return a};const k=R;function A(t,e){return function(n){return e(t(n))}}function P(t,e){const n=[e[t].parent,t];let o=k[e[t].parent][t],r=e[t].parent;for(;e[r].parent;)n.unshift(e[r].parent),o=A(k[e[r].parent][r],o),r=e[r].parent;return o.conversion=n,o}const w={};Object.keys(k).forEach((t=>{w[t]={},Object.defineProperty(w[t],"channels",{value:k[t].channels}),Object.defineProperty(w[t],"labels",{value:k[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(k);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(k[t]);for(let r=o.length,i=0;i<r;i++){const r=o[i],s=e[r];-1===s.distance&&(s.distance=e[t].distance+1,s.parent=t,n.unshift(r))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,r=0;r<t;r++){const t=o[r];null!==e[t].parent&&(n[t]=P(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];w[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),w[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const L=w,N=["keyword","gray","hex"],I={};for(const t of Object.keys(L))I[[...L[t].labels].sort().join("")]=t;const _={};function M(t,e){if(!(this instanceof M))return new M(t,e);if(e&&e in N&&(e=null),e&&!(e in L))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof M)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=T.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=L[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=L[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=U(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in I))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=I[o];const{labels:r}=L[this.model],i=[];for(n=0;n<r.length;n++)i.push(t[r[n]]);this.color=U(i)}if(_[this.model])for(o=L[this.model].channels,n=0;n<o;n++){const t=_[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}M.prototype={toString(){return this.string()},string(t){let e=this.model in T.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return T.to[e.model](n)},round(t){return t=Math.max(t||0,0),new M([...this.color.map(j(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new M([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(L)){if(N.includes(t))continue;const{channels:e}=L[t];M.prototype[t]=function(...e){return this.model===t?new M(this):e.length>0?new M(e,t):new M([...D(L[this.model][t].raw(this.color)),this.valpha],t)},M[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=U(n,e)),new M(o,t)}}function j(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function D(t){return Array.isArray(t)?t:[t]}function U(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const B=M;function F(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}function W(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function H(t,e){const n=window.getComputedStyle(t);return e.reduce(((t,e)=>(t[e]=n.getPropertyValue(e),t)),{})}function $(t,e){var n,o;let r;return t.styles&&(r=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!r&&(r=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),r}function V(t,e,n,o){const r=n.querySelector(o),i=$(t,e);if(!i)return;const s=n.querySelector(".label");F({element:s,html:t.content.label}),"TOP"===i.position?(r.style.flexDirection="column",r.style.alignItems="unset",W(s,{marginRight:0,marginBottom:`${i.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",W(s,{marginRight:`${i.margin}px`,marginBottom:0})),i.enabled?s.style.display="":s.style.display="none"}function z(t,e,n,o,r){const i=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)).styleAttributes;(null==n?void 0:n.width)&&(o=n)}return o}(t,e);if(!i)return;const s=$(t,e),l=r&&s&&s.enabled&&"TOP"===s.position?r.getBoundingClientRect().height+s.margin:0;i.width&&(i.width.includes("100%")?(o.style.width="100%",n.style.width=i.width):n.style.width="auto"),i.height&&(i.height.includes("100%")?(o.style.height="100%",n.style.height=i.height):n.style.height=`${parseFloat(i.height)+l}px`)}function G(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=B(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function Q(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(i,10)+parseInt(s,10),height:n+parseInt(r,10)+parseInt(o,10)}}function q(t,e,n,o,r){switch(t.position){case"top":return{left:`${K(e,n,o,r)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${K(e,n,o,r)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${Z(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${Z(0,t)}px`}}}function K(t,e,n,o){let r=n?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>i.width(o)&&(r-=r+e.width-i.width(o)),r}function Z(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const J="cl-tooltip-text-styles",X=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n \n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n \n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function Y(t,e,n,o){let r;o=o||document,t.classList.add("invalid"),e.style.visibility="visible",e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${J}`))return;const e=document.createElement("style");e.setAttribute("id",J),F({element:e,html:X}),t.head.appendChild(e)})(o),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=t,s=function(t,e,n,o,r,s){const l=function(t,e,n,o,r){const s=function(t,e,n,o){const r=i.width(o),{right:s}=t.getBoundingClientRect(),l=r-n-s-i.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:Q(e).width,availableSpaceToTheLeftSideOfTheTrigger:s-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,r),l=function(t,e,n,o){const r=i.height(o),{top:s,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:Q(e).height,availableSpaceAboveTriggerElem:s-n,availableSpaceBelowTriggerElem:r-l-n}}(t,e,n,r);let a="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:s.availableSpaceToTheRightSideOfTheTrigger>=s.contentWidth,left:s.availableSpaceToTheLeftSideOfTheTrigger>=s.contentWidth};if(c.top?a="top":c.bottom?a="bottom":c.right?a="right":c.left&&(a="left"),c[o]&&(a=o),"undefined"===a){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,s.availableSpaceToTheRightSideOfTheTrigger,s.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?a="bottom":t===l.availableSpaceAboveTriggerElem?a="top":t===s.availableSpaceToTheRightSideOfTheTrigger?a="right":t===s.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},l),s),{position:a})}(t,e,n,o,s=s||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)W(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),W(e,{"margin-bottom":"0px"});else if("bottom"===t.position)W(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),W(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";W(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:q(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,s),position:l.position}}(e,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",s.position),W(n,s.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:o})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${J}`);e&&e.remove()}(o))}}function tt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function et(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}const nt="VIEW",ot="MODULE",rt="CONTAINER",it="INPUT",st="BUTTON",lt="CONSENT",at="COLUMN",ct="SUBSCRIBE_CONTACT",pt="REQUEST",dt="SHOW_WIDGET",ht="OPEN_LINK",ut="CLOSE_WIDGET";class mt{static sortActions(t){const e={[ut]:-1,[ht]:-2,[dt]:1,[ct]:2,[pt]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=mt.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(r("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(r("type"))));let n=0;for(;e[n]&&e[n].getAttribute(r("id"))!==i;){let t=e[n].getAttribute(r("type"));if(mt.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var r,i=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,r){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,r,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(r=await s.next()).done);){o=r.value,i=!1;try{const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{i=!0}}}catch(t){e={error:t}}finally{try{i||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}mt.IGNORING_VIEW_ENTRY_TYPES=[st,lt,it];const bt="CLICK",gt="COMPONENT_EVENT";class yt{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class ft{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case bt:return new mt(t,e);case gt:return new yt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class vt{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class Et{constructor(){this.listeners=Et.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=vt.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=Et.createDefaultListenersState()}}Et.createDefaultListenersState=()=>({"*":{}});const Ot=(t,e,n,o)=>{const{addEventListenerBase:r,addEventListener:i}=EventTarget.prototype;(r||i).call(t,e,n,o)};class St{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Tt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===ot?Object.assign(Object.assign({},t),Tt.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}Tt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class Ct extends Et{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Ct.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Ct.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Ct.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Ct.changeEventName="CHANGE";class xt{static set(t,e){const n=t[xt.accumulatorPropertyName]||{};t[xt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[xt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}xt.accumulatorPropertyName="clStyleAttributes";const Rt="CONTENT_LOCKER";class kt{static applyHostStyles(t,e,n=null,o){var r,i,s;const l=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==nt&&t!==rt&&t!==at||(e.style.display=o===Rt&&t===nt?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class At{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Pt{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,r,i,s,l;const a=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find((t=>t.element===n)),c=(null===(i=e.styles)||void 0===i?void 0:i.find((t=>t.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),d=this.parseBackground(p);d.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;this._applyHostElementBackground(this.envUrlMaps[t].get("host"),null===(e=this.getSharedCb().theme)||void 0===e?void 0:e.schema)})).catch((t=>{console.error(t),At.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackground(t,e={}){t&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e.accent);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}}const wt=new class{execute(t,e,n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function Lt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Nt{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class It{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const _t="COMPONENT_RESOURCES_LOADED",Mt="FAILED_TO_LOAD_COMPONENT_RESOURCE";class jt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(_t,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Mt,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new It(this.onCounterStateUpdate)}}}const Dt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Dt(...t)}},Ut=Dt,Bt="props",Ft="shared",Wt="environment";function Ht(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(t)}const $t="SUBMIT";function Vt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{"element"!==n&&"classes"!==n&&(e[n]&&"object"==typeof e[n]&&!Array.isArray(e[n])?t[n]=Object.assign(Object.assign({},t[n]||{}),e[n]):t[n]=e[n])})),t):t}const zt={DESKTOP:"desktop",MOBILE:"mobile"};function Gt(t,e,n){var o;return null===(o=t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function Qt(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}class qt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}class Kt extends HTMLElement{constructor(){var t,e;super(),this.construct=()=>{let t;const e=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let s=new qt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=Ut(Bt,Ft,Wt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new St,this.componentEventEmitter=new Et,this.componentResourceManager=new jt(this.model.id,this.services.eventEmitter,"STATIC"===this.services.config.getConfig("entryModuleType")),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new ft(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(Bt).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=r("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Ft).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Pt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),wt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Ct.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Wt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(Bt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Ft).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Wt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter((t=>!t.hasAttribute(r("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(r("element"))===t&&n.id===e:n.getAttribute(r("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;t=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Vt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Vt(n,t),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e);const o=r("type"),i="element-styles";let s=this.getRootElement().querySelector(`style[${o}="${i}"]`);s||(s=document.createElement("style"),s.setAttribute(o,i),this.getRootElement().appendChild(s)),F({element:s,html:""}),n.forEach((e=>{let n=e.getAttribute(r("element"));const o=this.getEnvironment();let i=Gt(t,o,n);if(i){if(this.resizeListener.isMobile()){const e=Gt(t,"desktop",n);e&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(i),s)}})),this._addLinkColor(s,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const s=[];"host"===(e=Kt._resolveTogglableStylesForElementModel(e)).element&&(kt.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],Ot(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Ot(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),"UPDATING"===this.services.config.getConfig("entryModuleType")&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Lt(e.styleAttributes,s)});if(xt.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),r=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,t.appendChild(i)),F({element:i,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${r("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this._fixMarginOverflow=t=>{const e=this.getParentComponent(),n=e&&("flex"===e.style.display||"inline-flex"===e.style.display),o="host",i=t.getAttribute(r("element"))===o;if(!n||!i)return;const s=this.getProps(),l=this.getEnvironment(),{styleAttributes:a}=Gt(s.adaptiveStyles,l,o)||{};if(!a)return;const c=a.marginLeft||a.marginRight,p="100%"===a.width;if(c&&p){const e=(parseFloat(a.marginLeft)||0)+(parseFloat(a.marginRight)||0);e&&setTimeout((()=>{t.style.width=`calc(100% - ${e}px)`}))}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let r=null===(n=e.textClasses)||void 0===n?void 0:n[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${Nt.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");F({element:t,html:`[${r("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{F({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&F({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&F({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&F({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const r=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",r)},this.getParentComponent=()=>Ht(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return t&&1===t.split(",").length?this.parentNode:Ht(this.parentNode,r("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>tt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>et(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n;const o=t.control.name;if(["email","first_name","last_name"].includes(o))return o.toUpperCase();if(t.content.label&&(null===(n=null===(e=t.adaptiveStyles.desktop.find((t=>"label"===t.element)))||void 0===e?void 0:e.params)||void 0===n?void 0:n.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return t.content.placeholder?this.capitalizeFirstLetter(t.content.placeholder):t.control.integrationName?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{switch(t.control.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===$t));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:pt}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>this.getProps().handlers&&this.getProps().handlers.length?[...this.getProps().handlers]:[],this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.define)||void 0===t?void 0:t.manifest)||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=Kt._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const Zt=Symbol("required");var Jt=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n};function Xt(){}const Yt="pending",te="valid",ee="invalid";class ne extends Kt{constructor(){super(...arguments),this._createControl=(t={},...e)=>{var{element:n}=t,o=Jt(t,["element"]);const r=this.getProps(),i=this.getModel(),s=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),l=this.services.form,a=[s,n,...e];return l.hasControl(r.control.name)?l.updateControl(...a):l.registerControl(...a)},this.createControlWithValidation=(t=[],e={})=>{var{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=Xt,invalidCallback:i=Xt,pendingCallback:s=Xt,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,p=Jt(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const d=this.getProps().control.validation,h=a[null==d?void 0:d.validator],u=t.some((t=>t[Zt])),m=!!(null==d?void 0:d.required),b=m||u,g=[...t];m&&!u&&g.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[Zt]=!0,e}()),h&&g.push(h);const y=this._prepareAsyncValidators(g),f=this._createControl({element:n,validation:{validator:"custom",required:b}},void 0,y);return c&&this._handleControlStatusChange(Object.assign({control:f,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:s},p)),f},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=Yt;switch(!0){case n.control.pending:t=Yt;break;case n.control.valid:t=te;break;default:t=ee}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:s,errorMessageMapper:l,pendingCallback:a}=t,c=this.services.config,p=this.manifest.i18n;switch(e){case te:(function(t,e){t.classList.remove("invalid"),e.style.visibility="hidden"})(o,r),i&&i();break;case ee:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let i=function(t,e,n){const o=et(e,tt(t)).translations,r=Object.keys(o).find((t=>t.includes(n)));return r?o[r]:n}(c,p,e);l&&(i=l(e,i)),Y(o,r,i,this.htmlDocumentObject),s&&s()}break;case Yt:n.touched&&(function(t,e){e.style.visibility="hidden",t.classList.contains("invalid")&&t.classList.remove("invalid")}(o,r),a&&a())}}}}const oe={name:"SysCheckboxListComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],contextMenuModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!1,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"LIST_POSITION",elementProp:"styleAttributes",element:"listContainer"},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND_MARKER_SELECTED",propPath:["styles","[element=input]","markerStyleAttributes"],params:{label:"DOCUMENT_CHOSEN_ITEM_COLOR_TITLE",property:"selectedColor",onlyColorSelection:!0,disableGradientSelection:!0,hideSwitch:!0}},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","markerStyleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","markerStyleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!1,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"LIST_POSITION",elementProp:"styleAttributes",element:"listContainer"},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND_MARKER_SELECTED",propPath:["styles","[element=input]","markerStyleAttributes"],params:{label:"DOCUMENT_CHOSEN_ITEM_COLOR_TITLE",property:"selectedColor",onlyColorSelection:!0,disableGradientSelection:!0,hideSwitch:!0}},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","markerStyleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","markerStyleAttributes"],params:{minValue:1,maxValue:4,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"]}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!0,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!1,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}}]},autoContrast:[{slave:{element:"input",propPath:["styles","[element=input]","markerStyleAttributes","selectedColor"]},master:{element:"input",propPath:["styles","[element=input]","markerStyleAttributes","background"]},enabledPropPath:["content","selectedColorContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",selectedColorContrastEnabled:!0},control:{name:"checkboxList",integrationName:"checkboxList",defaultValue:null,options:{option_1:{exportId:"option_1",label:"Option 1",id:"option_1",sort:0},option_2:{exportId:"option_2",label:"Option 2",id:"option_2",sort:1},option_3:{exportId:"other",label:"Other",id:"option_3",sort:2}},optionsAlphabeticSort:{enabled:!1},validation:{required:!0}},styles:[{element:"input",markerStyleAttributes:{selectedColor:"var(--cl-schema-primary, rgb(0, 0, 0))",background:"rgba(255, 255, 255, 1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderBottomWidth:"1px",borderBottomColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderLeftWidth:"1px",borderLeftColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderRightWidth:"1px",borderRightColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!0,position:"TOP",margin:5}}],adaptiveStyles:(re=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"listContainer",styleAttributes:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"start",gap:"20px"},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"auto",minHeight:null,background:"rgba(0, 0, 0, 0)",color:"var(--cl-schema-text, rgb(68, 68, 68))",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",paddingTop:"0",_paddingEnabled:!1,textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},markerStyleAttributes:{inputSize:"22px",inputToTextGapSize:"13px",textShadow:"none"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"optionWrapper",styleAttributes:{margin:"0 3px"}}],Object.values(zt).reduce(((t,e)=>Object.assign(t,{[e]:Qt(re)})),{[zt.DESKTOP]:[],[zt.MOBILE]:[]}))},metaDescription:{icon:"/SysCheckboxListComponent/assets/img/checkbox-component-icon.svg",label:{en:"Checkbox",ru:"Чекбокс",uk:"Чекбокс",es:"Casilla de verificación",fr:"Case à cocher",de:"Kontrollkästchen",it:"Checkbox",pt:"Caixa de seleção",ro:"Casetă de control",bg:"Поле за маркиране",cs:"Zaškrtávací pole",el:"Πλαίσιο ελέγχου",nl:"Selectievakje",pl:"Pole wyboru",sv:"Kryssruta",tr:"Onay kutusu",ar:"خانة اختيار",zh:"复选框",da:"Afkrydsningsfelt",he:"תיבת סימון",fi:"Valintaruutu",hi:"चेकबॉक्स",hr:"Potvrdni okvir",hu:"Jelölőnégyzet",id:"Kotak Centang",ja:"チェックボックス",ko:"체크 박스",no:"Avmerkingsboks",sk:"Začiarkavacie políčko",sl:"Potrditveno polje",sr:"Polje za potvrdu"}}};var re;const ie={inputSize:"22px",inputToTextGapSize:"13px",selectedColor:"rgb(0,0,0,1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",textShadow:"none",background:"rgb(255, 255, 255)",backdropFilter:"none"},se=new Map;se.set("checkboxSize","inputSize"),se.set("checkboxToTextGapSize","inputToTextGapSize");const le=se;function ae(t){return ae="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},ae(t)}function ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function pe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function de(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pe(Object(n),!0).forEach((function(e){ye(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function he(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,fe(o.key),o)}}function ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ue=function(){return!!t})()}function me(){return me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=be(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},me.apply(null,arguments)}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},be(t)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}function ye(t,e,n){return(e=fe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fe(t){var e=function(t){if("object"!=ae(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ae(e)?e:e+""}var ve=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ye(e=function(t,e,n){return e=be(e),function(t,e){if(e&&("object"==ae(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,ue()?Reflect.construct(e,n||[],be(t).constructor):e.apply(t,n))}(this,t),"manifest",oe),ye(e,"registeredControl",void 0),ye(e,"markerStyleAttributes",void 0),ye(e,"updateElementSizeStyles",(function(){var t=e.getElement("listContainer");t&&(e.applyStylesToMarkersShadows(),e.applyStylesToMarkers(),t.querySelectorAll(".checkmark-container").forEach((function(t){e.setStylesVariables(t)})))})),ye(e,"getInputAdaptiveStyles",(function(){var t=e.getProps(),n=e.getEnvironment();return t.adaptiveStyles[n].filter((function(t){return"input"===t.element}))})),ye(e,"setMarkerStyleAttributes",(function(){var n=e.getInputAdaptiveStyles();if(n.length&&n[0].markerStyleAttributes){var o;e.markerStyleAttributes=de(de({},ie),n[0].markerStyleAttributes);var r=null===(o=e.getProps().styles)||void 0===o||null===(o=o.find((function(t){return"input"===t.element})))||void 0===o?void 0:o.markerStyleAttributes;r&&(e.markerStyleAttributes=de(de({},e.markerStyleAttributes),r))}else e.markerStyleAttributes=t.defaultMarkerStyleAttributes})),ye(e,"setStylesVariables",(function(t){Object.keys(e.markerStyleAttributes).forEach((function(n){var o=le.get(n)||n;t.style.setProperty("--".concat(o),e.markerStyleAttributes[n])}))})),ye(e,"getOptions",(function(){var t,n=null!==(t=e.getProps().control.optionsAlphabeticSort)&&void 0!==t&&t.enabled?"label":"sort";return function(t,e,n=!1){return function(t){return[...t].reduce(((t,[e,n])=>(t[e]=n,t)),{})}(Object.entries(t).sort((([t,o],[r,i])=>function(t,e,n,o=!1){let r=t[n],i=e[n];return isNaN(r)||isNaN(i)?"string"!=typeof r||"string"!=typeof i?0:(r=r.toLowerCase(),i=i.toLowerCase(),o?i.localeCompare(r):r.localeCompare(i)):r<i?o?1:-1:r>i?o?-1:1:0}(o,i,e,n))))}(e.getProps().control.options,n)})),ye(e,"applyStylesToOptionWrapper",(function(){var t=e.getElement("listContainer"),n=Gt(e.getProps().adaptiveStyles,e.getEnvironment(),"optionWrapper"),o=t.querySelectorAll(".option-wrapper");if(n){var r=Object.keys(n);o.forEach((function(t){r.forEach((function(e){t.style[e]=n[e]}))}))}else o.forEach((function(t){t.style.margin="10px 3px"})),t.style.gap="0px"})),ye(e,"createCheckboxListItemComponent",(function(t,n,o){var r=e.getHostElement(),i=document.createElement("div");i.classList.add("option-wrapper"),i.setAttribute("cl-element","optionWrapper");var s=document.createElement("label");s.classList.add("checkmark-container");var l=document.createElement("div");l.classList.add("checkmark-shadow"),s.appendChild(l);var a=document.createElement("input");a.setAttribute("type","checkbox"),s.appendChild(a);var c=document.createElement("span");c.classList.add("checkmark"),s.appendChild(c);var p=document.createElement("span");if(p.classList.add("checkbox-label"),p.textContent=t.label,e.setStylesVariables(r),W(p,o),s.appendChild(p),n){var d=e.markerStyleAttributes.selectedColor;c.classList.add("checkmark-checked"),c.style.borderColor=d,c.style.outlineColor=d,r.style.setProperty("--selectedColor",d),r.style.setProperty("--borderColor",d)}else c.style.borderColor=null,c.style.outlineColor=null,r.style.setProperty("--borderColor","rgba(0,0,0, 0.7)");return i.appendChild(s),i})),ye(e,"getCurrentValue",(function(){var t;return JSON.parse((null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null)})),ye(e,"applyStylesToMarkersShadows",(function(){e.getElement("input").querySelectorAll(".checkmark-shadow").forEach((function(t){e.setStylesVariables(t)}))})),ye(e,"applyStyleToOptionLabels",(function(){var n=e.getElement("input"),o=H(n,t.checkboxListButtonMenuStyles);n.querySelectorAll(".checkbox-label").forEach((function(t){W(t,o)}))})),ye(e,"applyStylesToMarkers",(function(){e.getElement("input").querySelectorAll(".checkmark").forEach((function(t){e.setStylesVariables(t),function(t){let e;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=G(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=G(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=G(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=G(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(t)}))})),ye(e,"createContent",(function(){var n=e.getElement("input"),o=H(n,t.checkboxListButtonMenuStyles),r=e.getCurrentValue(),i=e.getOptions(),s=document.createElement("div");s.classList.add("buttons-list"),s.setAttribute("cl-element","listContainer"),Object.entries(i).forEach((function(t){var n,l,a=(n=t,l=1,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,s,l=[],a=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(l.push(o.value),l.length!==e);a=!0);}catch(t){c=!0,r=t}finally{try{if(!a&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return l}}(n,l)||function(t,e){if(t){if("string"==typeof t)return ce(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)?ce(t,e):void 0}}(n,l)||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.")}())[0],c=i[a],p=!!r&&r.hasOwnProperty(a),d=e.createCheckboxListItemComponent(c,p,o);d.classList.add("checkboxListItem"),"UPDATING"!==e.services.config.getConfig("entryModuleType")&&d.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault();var n=d.querySelector(".checkmark"),o=e.getCurrentValue();if(o&&o[a])delete o[a],n.classList.remove("checkmark-checked"),n.style.borderColor=null,n.style.outlineColor=null,e.getHostElement().style.setProperty("--borderColor","rgba(0,0,0, 0.7)");else{o=de(de({},o),{},ye({},a,i[a].exportId)),n.classList.add("checkmark-checked");var r=e.markerStyleAttributes.selectedColor;n.style.borderColor="".concat(r),n.style.outlineColor="".concat(r),e.getHostElement().style.setProperty("--selectedColor","".concat(r)),e.getHostElement().style.setProperty("--borderColor","".concat(r))}var s=JSON.stringify(o);e.registeredControl.setValue("{}"===s?null:s)})),s.appendChild(d)})),F({element:n,html:""}),n.append(s)})),ye(e,"registerControl",(function(t){var n=t.querySelector(".list-tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:n}),e.registeredControl.setValue(null,{silent:!0,skipValidation:!0})})),ye(e,"handleSafariHeightIssue",(function(){var t=e.getHostElement();"auto"===t.style.height&&(t.style.height="fit-content")})),e.getRootElement().innerHTML="\n <style>".concat(t.componentStyle,"</style>\n ").concat(t.componentTemplate,"\n "),e}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&&ge(t,e)}(t,ne),e=t,n=[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=me(be(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]);var n=this.getRootElement();this.registerControl(n),this.observeProps((function(t,o){var r=e.getEnvironment();V(o,r,n,".label-with-checkbox-list-container"),z(o,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setMarkerStyleAttributes(),e.createContent(),e.applyAutoAdaptiveStyles(o.adaptiveStyles,o.styles),e.handleSafariHeightIssue(),e.applyStylesToOptionWrapper()})),this.observeShared((function(t,n){e.applyStyleToOptionLabels(e.getProps(),e.getEnvironment())})),this.observeEnvironment((function(t,o){e.setMarkerStyleAttributes(),e.applyStylesToMarkers(),e.applyStylesToMarkersShadows();var r=e.getProps();V(r,o,n,".label-with-checkbox-list-container"),z(r,o,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.handleSafariHeightIssue(),e.applyStyleToOptionLabels(r,o),e.updateElementSizeStyles()}))}}],n&&he(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();ye(ve,"define",{name:"sys-checkbox-list",model:oe.name,manifest:oe}),ye(ve,"componentStyle","\n .main-container {\n height: 100%;\n }\n \n .label-with-checkbox-list-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .buttons-list {\n width: 100%;\n height: auto;\n text-align: inherit;\n }\n \n .checkbox-list-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n cursor: pointer;\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .list-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n \n .checkbox-list-content {\n display: flex;\n /*align-items: center;*/\n /*position: absolute;*/\n height: 100%;\n width: 100%;\n padding: 0;\n /*padding: 0 35px 0 20px;*/\n cursor: pointer;\n border: 1px solid transparent;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n outline: 0;\n text-align: inherit;\n padding: var(--borderTopWidth);\n }\n \n input {\n -moz-appearance: none;\n -webkit-appearance: none;\n -o-appearance: none;\n width: 24px;\n height: auto;\n padding: 0 10px;\n margin: 0;\n }\n \n /* The container */\n .checkmark-container {\n cursor: pointer;\n display: flex;\n position: relative;\n padding-left: calc(var(--inputSize, 22px) + var(--inputToTextGapSize, 18px) + var(--borderTopWidth, 1));\n height: var(--inputSize, 22px);\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n \n /* Hide the browser's default checkbox */\n .checkmark-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n }\n \n .checkmark-container .checkbox-label {\n display: block;\n }\n \n /* Create a custom checkbox */\n .checkmark {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 2px;\n /*border-style: var(--borderStyle);\n border-color: var(--borderTopColor);\n border-width: var(--borderTopWidth);*/\n border-top-left-radius: var(--borderTopLeftRadius);\n border-top-right-radius: var(--borderTopRightRadius);\n border-bottom-left-radius: var(--borderBottomLeftRadius);\n border-bottom-right-radius: var(--borderBottomRightRadius);\n box-shadow: 0 0 0 var(--borderTopWidth) var(--borderTopColor);\n background: var(--background, rgb(256, 256, 256));\n backdrop-filter: var(--backdropFilter);\n }\n \n .checkmark-shadow {\n box-shadow: var(--boxShadow);\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n padding-bottom: 2px;\n z-index: 1;\n border-top-left-radius: var(--borderTopLeftRadius);\n border-top-right-radius: var(--borderTopRightRadius);\n border-bottom-left-radius: var(--borderBottomLeftRadius);\n border-bottom-right-radius: var(--borderBottomRightRadius);\n }\n \n .checkmark:after {\n content: \"L\";\n position: absolute;\n display: none;\n transform: rotate(45deg) scaleX(-1);\n font-family: 'Arial';\n }\n \n .checkmark-checked {\n box-shadow: 0 0 0 var(--borderTopWidth) var(--selectedColor);\n }\n \n .checkmark-checked:after {\n display: block;\n }\n \n .checkmark-container .checkmark:after {\n width: var(--inputSize, 22px);\n height: var(--inputSize, 22px);\n font-size: var(--inputSize, 22px);\n line-height: var(--inputSize, 22px);\n text-align: center;\n color: var(--borderColor);\n margin-left: 10%;\n margin-bottom: 10%;\n }\n \n .checkbox-label {\n margin: 0;\n height: auto;\n min-height: 10px;\n width: auto;\n align-self: center;\n text-shadow: var(--textShadow);\n }\n \n input:focus ~ .checkmark.focus-outline-defined {\n /*outline: var(--clFocusOutline);*/\n z-index: 3;\n outline-width: calc(var(--borderTopWidth) + 3px);\n outline-color: var(--borderTopColor);\n outline-style: solid;\n opacity: 0.7;\n }\n \n input:focus ~ .checkmark.checkmark-checked.focus-outline-defined {\n outline-color: var(--selectedColor);\n }\n"),ye(ve,"componentTemplate",'\n <div class="main-container">\n <div class="label-with-checkbox-list-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n <div class="checkbox-list-with-tooltip">\n <div cl-element="input" class="checkbox-list-content">\n </div>\n <div class="list-tooltip">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n </div>\n</div>\n'),ye(ve,"checkboxListButtonMenuStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","text-align"]),ye(ve,"defaultMarkerStyleAttributes",ie);export{ve as default};window.clComponentClass_SysCheckboxListComponent=ve;
|
|
1
|
+
const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function r(t){return"cl-"+t}class i{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var s=[];for(var l in{transparent:"#0000"})s.push(l);var a="\\s*([.\\d%]+)\\s*",c="\\("+[a,a,a]+"(?:,\\s*([.\\d]+)\\s*)?\\)",d="(?:rgb)a?",p="("+s.join("|")+")";function h(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(d+c,"i"),RegExp([p,"(?:#([a-f0-9]{3,8}))",d+c,"(?:hsl)a?"+c].join("|"),"gi");var u=Array.prototype.concat,m=Array.prototype.slice,b=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var r=t[n];h(r)?e=u.call(e,m.call(r)):e.push(r)}return e};b.wrap=function(t){return function(){return t(b(arguments))}};const g=b;var f={},y=Object.hasOwnProperty,v=Object.create(null);for(var E in f)y.call(f,E)&&(v[f[E]]=E);var O={to:{},get:{}};function S(t,e,n){return Math.min(Math.max(e,t),n)}O.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=O.get.hsl(t),n="hsl"):(e=O.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},O.get.rgb=function(t){if(!t)return null;var e,n,o,r=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(e.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)r[n]=parseInt(e[n]+e[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(e[n+1],0);e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:y.call(f,e[1])?((r=f[e[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?r[3]=.01*parseFloat(e[4]):r[3]=parseFloat(e[4]))}for(n=0;n<3;n++)r[n]=S(r[n],0,255);return r[3]=S(r[3],0,1),r},O.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,S(parseFloat(e[2]),0,100),S(parseFloat(e[3]),0,100),S(isNaN(n)?1:n,0,1)]}return null},O.to.rgb=function(){var t=g(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},O.to.hsl=function(){var t=g(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const T=O,C={},R={};for(const t of Object.keys(C))R[C[t]]=t;const x={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(x)){if(!("channels"in x[t]))throw new Error("missing channels property: "+t);if(!("labels"in x[t]))throw new Error("missing channel labels property: "+t);if(x[t].labels.length!==x[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=x[t];delete x[t].channels,delete x[t].labels,Object.defineProperty(x[t],"channels",{value:e}),Object.defineProperty(x[t],"labels",{value:n})}x.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,r=Math.min(e,n,o),i=Math.max(e,n,o),s=i-r;let l,a;i===r?l=0:e===i?l=(n-o)/s:n===i?l=2+(o-e)/s:o===i&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(r+i)/2;return a=i===r?0:c<=.5?s/(i+r):s/(2-i-r),[l,100*a,100*c]},x.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let r,i,s;if(0===n)return s=255*o,[s,s,s];r=o<.5?o*(1+n):o+n-o*n;const l=2*o-r,a=[0,0,0];for(let t=0;t<3;t++)i=e+1/3*-(t-1),i<0&&i++,i>1&&i--,s=6*i<1?l+6*(r-l)*i:2*i<1?r:3*i<2?l+(r-l)*(2/3-i)*6:l,a[t]=255*s;return a};const k=x;function A(t,e){return function(n){return e(t(n))}}function P(t,e){const n=[e[t].parent,t];let o=k[e[t].parent][t],r=e[t].parent;for(;e[r].parent;)n.unshift(e[r].parent),o=A(k[e[r].parent][r],o),r=e[r].parent;return o.conversion=n,o}const w={};Object.keys(k).forEach((t=>{w[t]={},Object.defineProperty(w[t],"channels",{value:k[t].channels}),Object.defineProperty(w[t],"labels",{value:k[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(k);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(k[t]);for(let r=o.length,i=0;i<r;i++){const r=o[i],s=e[r];-1===s.distance&&(s.distance=e[t].distance+1,s.parent=t,n.unshift(r))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,r=0;r<t;r++){const t=o[r];null!==e[t].parent&&(n[t]=P(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];w[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),w[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const L=w,N=["keyword","gray","hex"],I={};for(const t of Object.keys(L))I[[...L[t].labels].sort().join("")]=t;const _={};function M(t,e){if(!(this instanceof M))return new M(t,e);if(e&&e in N&&(e=null),e&&!(e in L))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof M)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=T.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=L[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=L[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=U(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in I))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=I[o];const{labels:r}=L[this.model],i=[];for(n=0;n<r.length;n++)i.push(t[r[n]]);this.color=U(i)}if(_[this.model])for(o=L[this.model].channels,n=0;n<o;n++){const t=_[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}M.prototype={toString(){return this.string()},string(t){let e=this.model in T.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return T.to[e.model](n)},round(t){return t=Math.max(t||0,0),new M([...this.color.map(j(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new M([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(L)){if(N.includes(t))continue;const{channels:e}=L[t];M.prototype[t]=function(...e){return this.model===t?new M(this):e.length>0?new M(e,t):new M([...D(L[this.model][t].raw(this.color)),this.valpha],t)},M[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=U(n,e)),new M(o,t)}}function j(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function D(t){return Array.isArray(t)?t:[t]}function U(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const B=M;function F(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}function W(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function H(t,e){const n=window.getComputedStyle(t);return e.reduce(((t,e)=>(t[e]=n.getPropertyValue(e),t)),{})}function $(t,e){var n,o;let r;return t.styles&&(r=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!r&&(r=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),r}function V(t,e,n,o){var r;const i=n.querySelector(o),s=$(t,e);if(!s)return;const l=n.querySelector(".label");l&&(F({element:l,html:(null===(r=t.content)||void 0===r?void 0:r.label)||""}),"TOP"===s.position?(i.style.flexDirection="column",i.style.alignItems="unset",W(l,{marginRight:"0",marginBottom:`${s.margin}px`})):(i.style.flexDirection="row",i.style.alignItems="center",W(l,{marginRight:`${s.margin}px`,marginBottom:"0"})),s.enabled?l.style.display="":l.style.display="none")}function z(t,e,n,o,r){const i=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)),r=null==n?void 0:n.styleAttributes;(null==r?void 0:r.width)&&(o=r)}return o}(t,e);if(!i)return;const s=$(t,e),l=r&&s&&s.enabled&&"TOP"===s.position?r.getBoundingClientRect().height+(s.margin||0):0;i.width&&(i.width.includes("100%")?(o.style.width="100%",n.style.width=i.width):n.style.width="auto"),i.height&&(i.height.includes("100%")?(o.style.height="100%",n.style.height=i.height):n.style.height=`${parseFloat(i.height)+l}px`)}function G(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=B(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function Q(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(i,10)+parseInt(s,10),height:n+parseInt(r,10)+parseInt(o,10)}}function K(t,e,n,o,r){switch(t.position){case"top":return{left:`${q(e,n,o,r)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${q(e,n,o,r)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${Z(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${Z(0,t)}px`}}}function q(t,e,n,o){let r=n?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>i.width(o)&&(r-=r+e.width-i.width(o)),r}function Z(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const J="cl-tooltip-text-styles",X=`\n .cl-tooltip-text {\n z-index: ${Number.MAX_SAFE_INTEGER};\n width: max-content;\n height: fit-content;\n visibility: hidden;\n background-color: white;\n color: #000;\n border: 1px solid rgb(194, 194, 194);\n border-radius: 5px;\n padding: 5px 10px;\n position: fixed;\n max-width: 300px;\n max-height: 100vh;\n box-shadow: 0 1px 5px rgba(0,0,0,.28);\n font-size: 14px;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:before {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 13px);\n border-width: 12px;\n border-style: solid;\n border-color: rgb(194, 194, 194) transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='top']:after {\n content: "";\n position: absolute;\n top: 100%;\n left: calc(50% - 5px);\n margin-left: -8px;\n margin-top: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: white transparent transparent transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:before {\n content: "";\n position: absolute;\n top: -24px;\n left: calc(50% - 9px);\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent rgb(194, 194, 194) transparent;\n }\n\n .cl-tooltip-text[cl-tooltip-position='bottom']:after {\n content: "";\n position: absolute;\n top: -22px;\n left: calc(50% - 4px);\n margin-left: -5px;\n margin-bottom: -2px;\n border-width: 12px;\n border-style: solid;\n border-color: transparent transparent white transparent;\n }\n`;function Y(t,e,n,o){o=o||document;let r=null;t.classList.add("invalid"),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${J}`))return;const e=document.createElement("style");e.setAttribute("id",J),F({element:e,html:X}),t.head.appendChild(e)})(o),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=t,s=function(t,e,n,o,r,s){const l=function(t,e,n,o,r){const s=function(t,e,n,o){const r=i.width(o),{right:s}=t.getBoundingClientRect(),l=r-n-s-i.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:Q(e).width,availableSpaceToTheLeftSideOfTheTrigger:s-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,r),l=function(t,e,n,o){const r=i.height(o),{top:s,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:Q(e).height,availableSpaceAboveTriggerElem:s-n,availableSpaceBelowTriggerElem:r-l-n}}(t,e,n,r);let a="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:s.availableSpaceToTheRightSideOfTheTrigger>=s.contentWidth,left:s.availableSpaceToTheLeftSideOfTheTrigger>=s.contentWidth};if(c.top?a="top":c.bottom?a="bottom":c.right?a="right":c.left&&(a="left"),o&&c[o]&&(a=o),"undefined"===a){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,s.availableSpaceToTheRightSideOfTheTrigger,s.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?a="bottom":t===l.availableSpaceAboveTriggerElem?a="top":t===s.availableSpaceToTheRightSideOfTheTrigger?a="right":t===s.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},l),s),{position:a})}(t,e,n,o,s=s||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)W(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),W(e,{"margin-bottom":"0px"});else if("bottom"===t.position)W(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),W(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";W(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:K(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,s),position:l.position}}(e,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",s.position),W(n,s.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:o})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${J}`);e&&e.remove()}(o))})}function tt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function et(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}const nt="VIEW",ot="MODULE",rt="CONTAINER",it="INPUT",st="BUTTON",lt="CONSENT",at="COLUMN",ct="SUBSCRIBE_CONTACT",dt="REQUEST",pt="SHOW_WIDGET",ht="OPEN_LINK",ut="CLOSE_WIDGET";class mt{static sortActions(t){const e={[ut]:-1,[ht]:-2,[pt]:1,[ct]:2,[dt]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=mt.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(r("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(r("type"))));let n=0;for(;e[n]&&e[n].getAttribute(r("id"))!==i;){let t=e[n].getAttribute(r("type"));if(mt.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var r,i=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,r){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,r,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(r=await s.next()).done);){o=r.value,i=!1;try{const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{i=!0}}}catch(t){e={error:t}}finally{try{i||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}mt.IGNORING_VIEW_ENTRY_TYPES=[st,lt,it];const bt="CLICK",gt="COMPONENT_EVENT";class ft{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class yt{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case bt:return new mt(t,e);case gt:return new ft(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class vt{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class Et{constructor(){this.listeners=Et.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=vt.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=Et.createDefaultListenersState()}}Et.createDefaultListenersState=()=>({"*":{}});const Ot=(t,e,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:s}=r;(i||s).call(t,e,n,o)};class St{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Tt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===ot?Object.assign(Object.assign({},t),Tt.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}Tt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class Ct extends Et{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(Ct.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Ct.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Ct.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Ct.changeEventName="CHANGE";class Rt{static set(t,e){const n=t[Rt.accumulatorPropertyName]||{};t[Rt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Rt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Rt.accumulatorPropertyName="clStyleAttributes";const xt="CONTENT_LOCKER";class kt{static applyHostStyles(t,e,n=null,o){var r,i,s;const l=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==nt&&t!==rt&&t!==at||(e.style.display=o===xt&&t===nt?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class At{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}var Pt,wt,Lt,Nt,It,_t,Mt;(Pt||(Pt={})).ACCENT="accent",(Lt=wt||(wt={})).TOP="TOP",Lt.CENTER="CENTER",Lt.BOTTOM="BOTTOM",function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Nt||(Nt={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(It||(It={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(_t||(_t={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(Mt||(Mt={}));class jt{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,r,i,s,l;const a=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find((t=>t.element===n)),c=(null===(i=e.styles)||void 0===i?void 0:i.find((t=>t.element===n)))||{},d=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),p=this.parseBackground(d);p.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:p.url,inlineSvgString:null,positionOptions:p.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;this._applyHostElementBackground(this.envUrlMaps[t].get("host"),null===(e=this.getSharedCb().theme)||void 0===e?void 0:e.schema)})).catch((t=>{console.error(t),At.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace(`var(--cl-schema-${Pt.ACCENT})`,e[Pt.ACCENT]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const Dt=new class{execute(t,e="GET",n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function Ut(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Bt{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Ft{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const Wt="COMPONENT_RESOURCES_LOADED",Ht="FAILED_TO_LOAD_COMPONENT_RESOURCE";class $t{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Wt,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Ht,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new Ft(this.onCounterStateUpdate)}}}const Vt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Vt(...t)}},zt=Vt,Gt="props",Qt="shared",Kt="environment";function qt(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(t)}const Zt="SUBMIT";function Jt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function Xt(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function Yt(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}class te extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}const ee="STATIC",ne="UPDATING";class oe extends HTMLElement{constructor(){var t,e;super(),this.construct=()=>{let t;const e=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let s=new te("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=zt(Gt,Qt,Kt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new St({}),this.componentEventEmitter=new Et,this.componentResourceManager=new $t(this.model.id,this.services.eventEmitter,this.isStaticRenderMode),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new yt(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(Gt).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=r("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Qt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new jt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Dt),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Ct.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Kt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(Gt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Qt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Kt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter((t=>!t.hasAttribute(r("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(r("element"))===t&&n.id===e:n.getAttribute(r("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Jt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Jt(n,t),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),i=r("type"),s="element-styles";let l=this.getRootElement().querySelector(`style[${i}="${s}"]`);l||(l=document.createElement("style"),l.setAttribute(i,s),this.getRootElement().appendChild(l)),F({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(r("element"));const n=this.getEnvironment();let i=Xt(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=Xt(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const s=[];"host"===(e=oe._resolveTogglableStylesForElementModel(e)).element&&(kt.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],Ot(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Ot(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Ut(e.styleAttributes,s)});if(Rt.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),r=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,t.appendChild(i)),F({element:i,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${r("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let r=null===(n=e.textClasses)||void 0===n?void 0:n[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&e.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.headerFontFamily})})),!r.isHeader&&e.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${Bt.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`),"");F({element:t,html:`[${r("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{F({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&F({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&F({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&F({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const r=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",r)},this.getParentComponent=()=>qt(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(r("path"));return t&&1===t.split(",").length?this.parentNode:qt(this.parentNode,r("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>tt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>et(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,r,i,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(r=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===r?void 0:r.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(i=t.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===Zt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:dt}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.define)||void 0===t?void 0:t.manifest)||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}get isStaticRenderMode(){return this.services.config.getConfig("renderMode")===ee}get isUpdatingRenderMode(){return this.services.config.getConfig("renderMode")===ne}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=oe._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const re=Symbol("required");var ie=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n};function se(){}const le="pending",ae="valid",ce="invalid";class de extends oe{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=ie(t,["element"]),r=this.getProps(),i=this.getModel(),s=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),l=this.services.form,a=[s,n,...e];return l.hasControl(r.control.name)?l.updateControl(...a):l.registerControl(...a)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=se,invalidCallback:i=se,pendingCallback:s=se,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=ie(e,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!t||!Array.isArray(t))throw new Error("Validators should be an array");const p=this.getProps().control.validation,h=(null==p?void 0:p.validator)?a[p.validator]:void 0,u=t.some((t=>t[re])),m=!!(null==p?void 0:p.required),b=m||u,g=[...t];m&&!u&&g.unshift(function(t="REQUIRED"){const e=e=>{let n;switch(typeof e){case"string":n=e&&e.length>0;break;case"boolean":n=e;break;case"number":n=!isNaN(e);break;default:n=!!e}return{isValid:n,errorKey:n?null:t}};return e[re]=!0,e}()),h&&g.push(h);const f=this._prepareAsyncValidators(g),y=this._createControl({element:n,validation:{validator:"custom",required:b}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:y,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:s},d)),y},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=le;switch(!0){case n.control.pending:t=le;break;case n.control.valid:t=ae;break;default:t=ce}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:s,errorMessageMapper:l,pendingCallback:a}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case ae:(function(t,e){t.classList.remove("invalid"),e&&(e.style.visibility="hidden")})(o,r),i&&i();break;case ce:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let i=function(t,e,n){const o=et(e,tt(t));if(!o)return n;const r=o.translations,i=Object.keys(r).find((t=>t.includes(n)));return i?r[i]:n}(c,d,e);l&&(i=l(e,i)),Y(o,r,i,this.htmlDocumentObject),s&&s()}break;case le:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t.classList.contains("invalid")&&t.classList.remove("invalid")}(o,r),a&&a())}}}}const pe={name:"SysCheckboxListComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],contextMenuModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!1,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"LIST_POSITION",elementProp:"styleAttributes",element:"listContainer"},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND_MARKER_SELECTED",propPath:["styles","[element=input]","markerStyleAttributes"],params:{label:"DOCUMENT_CHOSEN_ITEM_COLOR_TITLE",property:"selectedColor",onlyColorSelection:!0,disableGradientSelection:!0,hideSwitch:!0}},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","markerStyleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","markerStyleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!1,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"LIST_POSITION",elementProp:"styleAttributes",element:"listContainer"},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND_MARKER_SELECTED",propPath:["styles","[element=input]","markerStyleAttributes"],params:{label:"DOCUMENT_CHOSEN_ITEM_COLOR_TITLE",property:"selectedColor",onlyColorSelection:!0,disableGradientSelection:!0,hideSwitch:!0}},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","markerStyleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","markerStyleAttributes"],params:{minValue:1,maxValue:4,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","markerStyleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"]}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!0,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!1,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}}]},autoContrast:[{slave:{element:"input",propPath:["styles","[element=input]","markerStyleAttributes","selectedColor"]},master:{element:"input",propPath:["styles","[element=input]","markerStyleAttributes","background"]},enabledPropPath:["content","selectedColorContrastEnabled"]}],focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",selectedColorContrastEnabled:!0},control:{name:"checkboxList",integrationName:"checkboxList",defaultValue:null,options:{option_1:{exportId:"option_1",label:"Option 1",id:"option_1",sort:0},option_2:{exportId:"option_2",label:"Option 2",id:"option_2",sort:1},option_3:{exportId:"other",label:"Other",id:"option_3",sort:2}},optionsAlphabeticSort:{enabled:!1},validation:{required:!0}},styles:[{element:"input",markerStyleAttributes:{selectedColor:"var(--cl-schema-primary, rgb(0, 0, 0))",background:"rgba(255, 255, 255, 1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderBottomWidth:"1px",borderBottomColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderLeftWidth:"1px",borderLeftColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderRightWidth:"1px",borderRightColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!0,position:"TOP",margin:5}}],adaptiveStyles:(he=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"listContainer",styleAttributes:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"start",gap:"20px"},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"auto",minHeight:null,background:"rgba(0, 0, 0, 0)",color:"var(--cl-schema-text, rgb(68, 68, 68))",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",paddingTop:"0",_paddingEnabled:!1,textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},markerStyleAttributes:{inputSize:"22px",inputToTextGapSize:"13px",textShadow:"none"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"optionWrapper",styleAttributes:{margin:"0 3px"}}],Object.values({DESKTOP:"desktop",MOBILE:"mobile"}).reduce(((t,e)=>Object.assign(t,{[e]:Yt(he)})),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysCheckboxListComponent/assets/img/checkbox-component-icon.svg",label:{en:"Checkbox",ru:"Чекбокс",uk:"Чекбокс",es:"Casilla de verificación",fr:"Case à cocher",de:"Kontrollkästchen",it:"Checkbox",pt:"Caixa de seleção",ro:"Casetă de control",bg:"Поле за маркиране",cs:"Zaškrtávací pole",el:"Πλαίσιο ελέγχου",nl:"Selectievakje",pl:"Pole wyboru",sv:"Kryssruta",tr:"Onay kutusu",ar:"خانة اختيار",zh:"复选框",da:"Afkrydsningsfelt",he:"תיבת סימון",fi:"Valintaruutu",hi:"चेकबॉक्स",hr:"Potvrdni okvir",hu:"Jelölőnégyzet",id:"Kotak Centang",ja:"チェックボックス",ko:"체크 박스",no:"Avmerkingsboks",sk:"Začiarkavacie políčko",sl:"Potrditveno polje",sr:"Polje za potvrdu"}}};var he;const ue={inputSize:"22px",inputToTextGapSize:"13px",selectedColor:"rgb(0,0,0,1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none",textShadow:"none",background:"rgb(255, 255, 255)",backdropFilter:"none"},me=new Map;me.set("checkboxSize","inputSize"),me.set("checkboxToTextGapSize","inputToTextGapSize");const be=me;function ge(t){return ge="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},ge(t)}function fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function ve(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach((function(e){Re(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ee(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,xe(o.key),o)}}function Oe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oe=function(){return!!t})()}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Te(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},Se.apply(null,arguments)}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Te(t)}function Ce(t,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ce(t,e)}function Re(t,e,n){return(e=xe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xe(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}var ke=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Re(e=function(t,e,n){return e=Te(e),function(t,e){if(e&&("object"==ge(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,Oe()?Reflect.construct(e,n||[],Te(t).constructor):e.apply(t,n))}(this,t),"manifest",pe),Re(e,"registeredControl",void 0),Re(e,"markerStyleAttributes",void 0),Re(e,"updateElementSizeStyles",(function(){var t=e.getElement("listContainer");t&&(e.applyStylesToMarkersShadows(),e.applyStylesToMarkers(),t.querySelectorAll(".checkmark-container").forEach((function(t){e.setStylesVariables(t)})))})),Re(e,"getInputAdaptiveStyles",(function(){var t=e.getProps(),n=e.getEnvironment();return t.adaptiveStyles[n].filter((function(t){return"input"===t.element}))})),Re(e,"setMarkerStyleAttributes",(function(){var n=e.getInputAdaptiveStyles();if(n.length&&n[0].markerStyleAttributes){var o;e.markerStyleAttributes=ve(ve({},ue),n[0].markerStyleAttributes);var r=null===(o=e.getProps().styles)||void 0===o||null===(o=o.find((function(t){return"input"===t.element})))||void 0===o?void 0:o.markerStyleAttributes;r&&(e.markerStyleAttributes=ve(ve({},e.markerStyleAttributes),r))}else e.markerStyleAttributes=t.defaultMarkerStyleAttributes})),Re(e,"setStylesVariables",(function(t){Object.keys(e.markerStyleAttributes).forEach((function(n){var o=be.get(n)||n;t.style.setProperty("--".concat(o),e.markerStyleAttributes[n])}))})),Re(e,"getOptions",(function(){var t,n=null!==(t=e.getProps().control.optionsAlphabeticSort)&&void 0!==t&&t.enabled?"label":"sort";return function(t,e,n=!1){return function(t){return[...t].reduce(((t,[e,n])=>(t[e]=n,t)),{})}(Object.entries(t).sort((([t,o],[r,i])=>function(t,e,n,o=!1){let r=t[n],i=e[n];return isNaN(r)||isNaN(i)?"string"!=typeof r||"string"!=typeof i?0:(r=r.toLowerCase(),i=i.toLowerCase(),o?i.localeCompare(r):r.localeCompare(i)):r<i?o?1:-1:r>i?o?-1:1:0}(o,i,e,n))))}(e.getProps().control.options,n)})),Re(e,"applyStylesToOptionWrapper",(function(){var t=e.getElement("listContainer"),n=Xt(e.getProps().adaptiveStyles,e.getEnvironment(),"optionWrapper"),o=t.querySelectorAll(".option-wrapper");if(n){var r=Object.keys(n);o.forEach((function(t){r.forEach((function(e){t.style[e]=n[e]}))}))}else o.forEach((function(t){t.style.margin="10px 3px"})),t.style.gap="0px"})),Re(e,"createCheckboxListItemComponent",(function(t,n,o){var r=e.getHostElement(),i=document.createElement("div");i.classList.add("option-wrapper"),i.setAttribute("cl-element","optionWrapper");var s=document.createElement("label");s.classList.add("checkmark-container");var l=document.createElement("div");l.classList.add("checkmark-shadow"),s.appendChild(l);var a=document.createElement("input");a.setAttribute("type","checkbox"),s.appendChild(a);var c=document.createElement("span");c.classList.add("checkmark"),s.appendChild(c);var d=document.createElement("span");if(d.classList.add("checkbox-label"),d.textContent=t.label,e.setStylesVariables(r),W(d,o),s.appendChild(d),n){var p=e.markerStyleAttributes.selectedColor;c.classList.add("checkmark-checked"),c.style.borderColor=p,c.style.outlineColor=p,r.style.setProperty("--selectedColor",p),r.style.setProperty("--borderColor",p)}else c.style.borderColor=null,c.style.outlineColor=null,r.style.setProperty("--borderColor","rgba(0,0,0, 0.7)");return i.appendChild(s),i})),Re(e,"getCurrentValue",(function(){var t;return JSON.parse((null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null)})),Re(e,"applyStylesToMarkersShadows",(function(){e.getElement("input").querySelectorAll(".checkmark-shadow").forEach((function(t){e.setStylesVariables(t)}))})),Re(e,"applyStyleToOptionLabels",(function(){var n=e.getElement("input"),o=H(n,t.checkboxListButtonMenuStyles);n.querySelectorAll(".checkbox-label").forEach((function(t){W(t,o)}))})),Re(e,"applyStylesToMarkers",(function(){e.getElement("input").querySelectorAll(".checkmark").forEach((function(t){e.setStylesVariables(t),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=G(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=G(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=G(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=G(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(t)}))})),Re(e,"createContent",(function(){var n=e.getElement("input"),o=H(n,t.checkboxListButtonMenuStyles),r=e.getCurrentValue(),i=e.getOptions(),s=document.createElement("div");s.classList.add("buttons-list"),s.setAttribute("cl-element","listContainer"),Object.entries(i).forEach((function(t){var n,l,a=(n=t,l=1,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,s,l=[],a=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(l.push(o.value),l.length!==e);a=!0);}catch(t){c=!0,r=t}finally{try{if(!a&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return l}}(n,l)||function(t,e){if(t){if("string"==typeof t)return fe(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)?fe(t,e):void 0}}(n,l)||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.")}())[0],c=i[a],d=!!r&&r.hasOwnProperty(a),p=e.createCheckboxListItemComponent(c,d,o);p.classList.add("checkboxListItem"),e.isStaticRenderMode&&p.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault();var n=p.querySelector(".checkmark"),o=e.getCurrentValue();if(o&&o[a])delete o[a],n.classList.remove("checkmark-checked"),n.style.borderColor=null,n.style.outlineColor=null,e.getHostElement().style.setProperty("--borderColor","rgba(0,0,0, 0.7)");else{o=ve(ve({},o),{},Re({},a,i[a].exportId)),n.classList.add("checkmark-checked");var r=e.markerStyleAttributes.selectedColor;n.style.borderColor="".concat(r),n.style.outlineColor="".concat(r),e.getHostElement().style.setProperty("--selectedColor","".concat(r)),e.getHostElement().style.setProperty("--borderColor","".concat(r))}var s=JSON.stringify(o);e.registeredControl.setValue("{}"===s?null:s)})),s.appendChild(p)})),F({element:n,html:""}),n.append(s)})),Re(e,"registerControl",(function(t){var n=t.querySelector(".list-tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:n}),e.registeredControl.setValue(null,{silent:!0,skipValidation:!0})})),Re(e,"handleSafariHeightIssue",(function(){var t=e.getHostElement();"auto"===t.style.height&&(t.style.height="fit-content")})),e.getRootElement().innerHTML="\n <style>".concat(t.componentStyle,"</style>\n ").concat(t.componentTemplate,"\n "),e}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&&Ce(t,e)}(t,de),e=t,n=[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=Se(Te(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]);var n=this.getRootElement();this.registerControl(n),this.observeProps((function(t,o){var r=e.getEnvironment();V(o,r,n,".label-with-checkbox-list-container"),z(o,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setMarkerStyleAttributes(),e.createContent(),e.applyAutoAdaptiveStyles(o.adaptiveStyles,o.styles),e.handleSafariHeightIssue(),e.applyStylesToOptionWrapper()})),this.observeShared((function(t,n){e.applyStyleToOptionLabels(e.getProps(),e.getEnvironment())})),this.observeEnvironment((function(t,o){e.setMarkerStyleAttributes(),e.applyStylesToMarkers(),e.applyStylesToMarkersShadows();var r=e.getProps();V(r,o,n,".label-with-checkbox-list-container"),z(r,o,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.handleSafariHeightIssue(),e.applyStyleToOptionLabels(r,o),e.updateElementSizeStyles()}))}}],n&&Ee(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();Re(ke,"define",{name:"sys-checkbox-list",model:pe.name,manifest:pe}),Re(ke,"componentStyle","\n .main-container {\n height: 100%;\n }\n \n .label-with-checkbox-list-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .buttons-list {\n width: 100%;\n height: auto;\n text-align: inherit;\n }\n \n .checkbox-list-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n cursor: pointer;\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .list-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n }\n \n .checkbox-list-content {\n display: flex;\n /*align-items: center;*/\n /*position: absolute;*/\n height: 100%;\n width: 100%;\n padding: 0;\n /*padding: 0 35px 0 20px;*/\n cursor: pointer;\n border: 1px solid transparent;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n outline: 0;\n text-align: inherit;\n padding: var(--borderTopWidth);\n }\n \n input {\n -moz-appearance: none;\n -webkit-appearance: none;\n -o-appearance: none;\n width: 24px;\n height: auto;\n padding: 0 10px;\n margin: 0;\n }\n \n /* The container */\n .checkmark-container {\n cursor: pointer;\n display: flex;\n position: relative;\n padding-left: calc(var(--inputSize, 22px) + var(--inputToTextGapSize, 18px) + var(--borderTopWidth, 1));\n height: var(--inputSize, 22px);\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n \n /* Hide the browser's default checkbox */\n .checkmark-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n }\n \n .checkmark-container .checkbox-label {\n display: block;\n }\n \n /* Create a custom checkbox */\n .checkmark {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 2px;\n /*border-style: var(--borderStyle);\n border-color: var(--borderTopColor);\n border-width: var(--borderTopWidth);*/\n border-top-left-radius: var(--borderTopLeftRadius);\n border-top-right-radius: var(--borderTopRightRadius);\n border-bottom-left-radius: var(--borderBottomLeftRadius);\n border-bottom-right-radius: var(--borderBottomRightRadius);\n box-shadow: 0 0 0 var(--borderTopWidth) var(--borderTopColor);\n background: var(--background, rgb(256, 256, 256));\n backdrop-filter: var(--backdropFilter);\n }\n \n .checkmark-shadow {\n box-shadow: var(--boxShadow);\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n padding-bottom: 2px;\n z-index: 1;\n border-top-left-radius: var(--borderTopLeftRadius);\n border-top-right-radius: var(--borderTopRightRadius);\n border-bottom-left-radius: var(--borderBottomLeftRadius);\n border-bottom-right-radius: var(--borderBottomRightRadius);\n }\n \n .checkmark:after {\n content: \"L\";\n position: absolute;\n display: none;\n transform: rotate(45deg) scaleX(-1);\n font-family: 'Arial';\n }\n \n .checkmark-checked {\n box-shadow: 0 0 0 var(--borderTopWidth) var(--selectedColor);\n }\n \n .checkmark-checked:after {\n display: block;\n }\n \n .checkmark-container .checkmark:after {\n width: var(--inputSize, 22px);\n height: var(--inputSize, 22px);\n font-size: var(--inputSize, 22px);\n line-height: var(--inputSize, 22px);\n text-align: center;\n color: var(--borderColor);\n margin-left: 10%;\n margin-bottom: 10%;\n }\n \n .checkbox-label {\n margin: 0;\n height: auto;\n min-height: 10px;\n width: auto;\n align-self: center;\n text-shadow: var(--textShadow);\n }\n \n input:focus ~ .checkmark.focus-outline-defined {\n /*outline: var(--clFocusOutline);*/\n z-index: 3;\n outline-width: calc(var(--borderTopWidth) + 3px);\n outline-color: var(--borderTopColor);\n outline-style: solid;\n opacity: 0.7;\n }\n \n input:focus ~ .checkmark.checkmark-checked.focus-outline-defined {\n outline-color: var(--selectedColor);\n }\n"),Re(ke,"componentTemplate",'\n <div class="main-container">\n <div class="label-with-checkbox-list-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n <div class="checkbox-list-with-tooltip">\n <div cl-element="input" class="checkbox-list-content">\n </div>\n <div class="list-tooltip">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n </div>\n</div>\n'),Re(ke,"checkboxListButtonMenuStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","text-align"]),Re(ke,"defaultMarkerStyleAttributes",ue);export{ke as default};window.clComponentClass_SysCheckboxListComponent=ke;
|