@claspo/components 1.10.18 → 1.10.19-gbx1
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/SysChoiceButtonsComponent/SysChoiceButtonsComponent.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 i(t){return"cl-"+t}class r{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 l={transparent:"#0000"},s=function(t,e,n,o){return null!=o&&""!==o||(o=1),t=parseFloat(t),e=parseFloat(e),n=parseFloat(n),o=parseFloat(o),t<=255&&t>=0&&e<=255&&e>=0&&n<=255&&n>=0&&o<=1&&o>=0?[Math.round(t),Math.round(e),Math.round(n),o]:null},a=[];for(var c in l)a.push(c);var d="\\s*([.\\d%]+)\\s*",p="\\("+[d,d,d]+"(?:,\\s*([.\\d]+)\\s*)?\\)",u="(?:rgb)a?",h="("+a.join("|")+")",g=RegExp(u+p,"i"),m=function(t,e){if(null==t)return null;t=(t+"").replace(/\s+/,"");var n=l[t];return n?m(n,e):(n=t.match(g))&&(t=n.slice(1))&&(t=s.apply(null,t))?e?t:(1===t[3]&&t.splice(3,1),"rgb"+(4===t.length?"a":"")+"("+t+")"):null};RegExp([h,"(?:#([a-f0-9]{3,8}))",u+p,"(?:hsl)a?"+p].join("|"),"gi");const b=m;class v{ratio(t,e,n){return t=this.getRgbTriplet(t,n),e=this.getRgbTriplet(e,n),this.wcagRgb(t,e)}isNotTransparent(t,e){e=e||{};const n=(t=b(t)).match(/\((.*)\)/)[1].split(",");if(4!=n.length||"0"!=n[3]||e.ignoreAlpha)return t;throw new TypeError("get-contrast cannot contrast transparent colors")}getRgbTriplet(t,e){if("string"!=typeof t)throw new TypeError("get-contrast expects colors as strings");let n=t.toLowerCase();return n=this.isNotTransparent(n,e),n.match(/\((.*)\)/)[1].split(",").slice(0,3)}wcagRgb(t,e){return this.luminance(this.relativeLuminance(t),this.relativeLuminance(e))}luminance(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}relativeLuminance(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=1/12.92;function r(t){return Math.pow((t+.055)/1.055,2.4)}return.2126*(e<=.03928?e*i:r(e))+.7152*(n<=.03928?n*i:r(n))+.0722*(o<=.03928?o*i:r(o))}}function f(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))}var y=Array.prototype.concat,E=Array.prototype.slice,O=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];f(i)?e=y.call(e,E.call(i)):e.push(i)}return e};O.wrap=function(t){return function(){return t(O(arguments))}};const T=O;var S={},C=Object.hasOwnProperty,A=Object.create(null);for(var I in S)C.call(S,I)&&(A[S[I]]=I);var R={to:{},get:{}};function _(t,e,n){return Math.min(Math.max(e,t),n)}R.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=R.get.hsl(t),n="hsl"):(e=R.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},R.get.rgb=function(t){if(!t)return null;var e,n,o,i=[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 r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[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++)i[n]=parseInt(e[n]+e[n],16);o&&(i[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++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[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]:C.call(S,e[1])?((i=S[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=_(i[n],0,255);return i[3]=_(i[3],0,1),i},R.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,_(parseFloat(e[2]),0,100),_(parseFloat(e[3]),0,100),_(isNaN(n)?1:n,0,1)]}return null},R.to.rgb=function(){var t=T(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]+")"},R.to.hsl=function(){var t=T(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 w=R,N={},P={};for(const t of Object.keys(N))P[N[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:n})}L.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),l=r-i;let s,a;r===i?s=0:e===r?s=(n-o)/l:n===r?s=2+(o-e)/l:o===r&&(s=4+(e-n)/l),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?l/(r+i):l/(2-r-i),[s,100*a,100*c]},L.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,l;if(0===n)return l=255*o,[l,l,l];i=o<.5?o*(1+n):o+n-o*n;const s=2*o-i,a=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,l=6*r<1?s+6*(i-s)*r:2*r<1?i:3*r<2?s+(i-s)*(2/3-r)*6:s,a[t]=255*l;return a};const x=L;function k(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=x[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=k(x[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const D={};Object.keys(x).forEach(t=>{D[t]={},Object.defineProperty(D[t],"channels",{value:x[t].channels}),Object.defineProperty(D[t],"labels",{value:x[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(x);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(x[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],l=e[i];-1===l.distance&&(l.distance=e[t].distance+1,l.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach(n=>{const o=e[n];D[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),D[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 j=D,U=["keyword","gray","hex"],B={};for(const t of Object.keys(j))B[[...j[t].labels].sort().join("")]=t;const V={};function F(t,e){if(!(this instanceof F))return new F(t,e);if(e&&e in U&&(e=null),e&&!(e in j))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 F)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=w.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=j[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=j[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=H(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 B))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=B[o];const{labels:i}=j[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=H(r)}if(V[this.model])for(o=j[this.model].channels,n=0;n<o;n++){const t=V[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)}F.prototype={toString(){return this.string()},string(t){let e=this.model in w.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return w.to[e.model](n)},round(t){return t=Math.max(t||0,0),new F([...this.color.map(W(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new F([...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(j)){if(U.includes(t))continue;const{channels:e}=j[t];F.prototype[t]=function(...e){return this.model===t?new F(this):e.length>0?new F(e,t):new F([...G(j[this.model][t].raw(this.color)),this.valpha],t)},F[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new F(o,t)}}function W(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function G(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const $=F,z="rgb(255, 255, 255)",K="rgb(0, 0, 0)";function Q(t,e){return $(t).alpha(e).string()}function q(t,e){try{return $(t).lighten(e).rgb().string()}catch(e){return console.warn("ColorUtils.lighten:",e),t}}function X(t,e){try{return $(t).darken(e).rgb().string()}catch(e){return console.warn("ColorUtils.darken:",e),t}}function J(t,e){try{return(new v).ratio(t,e)}catch(n){return console.warn(`ColorUtils.getContrastRatio: transparent colors were used ${t}, ${e}`),0}}function Z(t){const{element:e,html:n,appendHtml:o}=t,i=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+=i:e.innerHTML=i}function Y(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function tt(t,e){const n=window.getComputedStyle(t);return e.reduce((t,e)=>(t[e]=n.getPropertyValue(e),t),{})}function et(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find(t=>"label"===t.element))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find(t=>"label"===t.element))||void 0===o?void 0:o.params),i}function nt(t,e,n,o){var i;const r=n.querySelector(o),l=n.querySelector(".label"),s=et(t,e);l&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const i=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);i.includes(t.id)||(i.push(t.id),o.setAttribute("aria-labelledby",i.join(" ")))}(l,r),s&&l&&(Z({element:l,html:(null===(i=t.content)||void 0===i?void 0:i.label)||""}),"TOP"===s.position?(r.style.flexDirection="column",r.style.alignItems="unset",Y(l,{marginRight:"0",marginBottom:`${s.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",Y(l,{marginRight:`${s.margin}px`,marginBottom:"0"})),s.enabled?l.style.display="":l.style.display="none")}function ot(t,e,n,o,i){const r=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),i=null==n?void 0:n.styleAttributes;(null==i?void 0:i.width)&&(o=i)}return o}(t,e);if(!r)return;const l=et(t,e),s=i&&l&&l.enabled&&"TOP"===l.position?i.getBoundingClientRect().height+(l.margin||0):0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+s}px`)}function it(t,e,n){const o=function(t,e){let n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("var(")&&(n=function(t){const e=String(t).match(/var\([^,]+,\s*(rgb(?:a)?\([^)]+\))\)/);return e&&e[1]?e[1]:null}(n)||void 0),n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=Q(o,.5);return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function rt(){return o("overlay-menu-content")}function lt(t,e,n,o,i,l){const s=function(t,e,n,o,i){const l=function(t,e,n,o){const i=r.width(o),{right:l}=t.getBoundingClientRect(),s=i-n-l-r.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:st(e).width,availableSpaceToTheLeftSideOfTheTrigger:l-n,availableSpaceToTheRightSideOfTheTrigger:s}}(t,e,n,i),s=function(t,e,n,o){const i=r.height(o),{top:l,bottom:s}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:st(e).height,availableSpaceAboveTriggerElem:l-n,availableSpaceBelowTriggerElem:i-s-n}}(t,e,n,i);let a="undefined";const c={bottom:s.availableSpaceBelowTriggerElem>=s.contentHeight,top:s.availableSpaceAboveTriggerElem>=s.contentHeight,right:l.availableSpaceToTheRightSideOfTheTrigger>=l.contentWidth,left:l.availableSpaceToTheLeftSideOfTheTrigger>=l.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(s.availableSpaceBelowTriggerElem,s.availableSpaceAboveTriggerElem,l.availableSpaceToTheRightSideOfTheTrigger,l.availableSpaceToTheLeftSideOfTheTrigger);t===s.availableSpaceBelowTriggerElem?a="bottom":t===s.availableSpaceAboveTriggerElem?a="top":t===l.availableSpaceToTheRightSideOfTheTrigger?a="right":t===l.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},s),l),{position:a})}(t,e,n,o,l=l||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)Y(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),Y(e,{"margin-bottom":"0px"});else if("bottom"===t.position)Y(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),Y(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";Y(e,{"margin-top":t,"margin-bottom":t})}}(s,e),{coordinates:at(s,t.getBoundingClientRect(),e.getBoundingClientRect(),i,l),position:s.position}}function st(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:l}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(l,10),height:n+parseInt(i,10)+parseInt(o,10)}}function at(t,e,n,o,i){switch(t.position){case"top":return{left:`${ct(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${ct(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${dt(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${dt(0,t)}px`}}}function ct(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>r.width(o)&&(i-=i+e.width-r.width(o)),i}function dt(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function pt(t,e){return t.startsWith("transparent")||t.startsWith("none")||!t.startsWith("rgb")||1!==(n=t.slice(0,t.match(/\)/).index+1),$(n).alpha())?J(e,z)>J(e,K)?z:K:t;var n}function ut(t){const e=J(t,z),n=J(t,K);let o,i;if(e>n)for(o=z,i=e;i>5;)o=X(o,.1),i=J(t,o);else for(o="rgb(10, 10, 10)",i=n;i>5;)o=q(o,.1),i=J(t,o);return Q(o,.2)}const ht="cl-tooltip-text-styles",gt=`\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 mt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function bt(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 vt="VIEW",ft="MODULE",yt="CONTAINER",Et="INPUT",Ot="BUTTON",Tt="CONSENT",St="COLUMN";var Ct,At;(At=Ct||(Ct={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",At.REQUEST="REQUEST",At.DISPATCH_EVENT="DISPATCH_EVENT",At.GO_TO_VIEW="GO_TO_VIEW",At.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",At.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",At.SHOW_WIDGET="SHOW_WIDGET",At.OPEN_LINK="OPEN_LINK",At.CLOSE_WIDGET="CLOSE_WIDGET",At.CLICK="CLICK";const It=Ct;var Rt,_t;class wt{static sortActions(t){const e={[It.CLOSE_WIDGET]:-1,[It.OPEN_LINK]:-2,[It.SHOW_WIDGET]:1,[It.SUBSCRIBE_CONTACT]:2,[It.REQUEST]: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=wt.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(),r=o.getAttribute(i("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,r)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(i("type")));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(wt.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 i,r=!0,l=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,i){!function(t,e,n,o){Promise.resolve(o).then(function(e){t({value:e,done:n})},e)}(o,i,(e=t[n](e)).done,e.value)})}}}(this.eventsQueue);!(t=(i=await l.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=l.return)||await n.call(l)}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=[])}}wt.IGNORING_VIEW_ENTRY_TYPES=[Ot,Tt,Et],(_t=Rt||(Rt={})).CLICK="CLICK",_t.COMPONENT_EVENT="COMPONENT_EVENT";class Nt{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const r=null===(o=n())||void 0===o?void 0:o.getAttribute(i("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,r)}),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 Pt{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 Rt.CLICK:return new wt(t,e);case Rt.COMPONENT_EVENT:return new Nt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class Lt{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 xt{constructor(){this.listeners=xt.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=Lt.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=xt.createDefaultListenersState()}}xt.createDefaultListenersState=()=>({"*":{}});const kt=xt,Mt=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:l}=i;(r||l).call(t,e,n,o)};class Dt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class jt{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===ft?Object.assign(Object.assign({},t),jt.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})}}var Ut,Bt,Vt,Ft,Wt,Gt,Ht,$t,zt,Kt,Qt,qt,Xt,Jt,Zt;jt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Bt=Ut||(Ut={})).VIEW="VIEW",Bt.CONTAINER="CONTAINER",Bt.TEXT="TEXT",Bt.INPUT="INPUT",Bt.BUTTON="BUTTON",Bt.IMAGE="IMAGE",Bt.CONSENT="CONSENT",Bt.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Bt.PROMO_CODE="PROMO_CODE",Bt.MULTIPLE_INPUT="MULTIPLE_INPUT",Bt.VIDEO="VIDEO",Bt.SLIDER="SLIDER",Bt.SLIDE="SLIDE",Bt.SOCIAL="SOCIAL",Bt.COLUMNS="COLUMNS",Bt.COLUMN="COLUMN",Bt.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Vt||(Vt={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(Ft||(Ft={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Wt||(Wt={})),(Gt||(Gt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Ht||(Ht={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}($t||($t={})),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"}(zt||(zt={})),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"}(Kt||(Kt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(Qt||(Qt={})),(Xt=qt||(qt={})).BEFORE="BEFORE",Xt.AFTER="AFTER",Xt.INSIDE="INSIDE",Xt.INSTEAD="INSTEAD",function(t){t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.SUBMIT="SUBMIT",t.NPS_CONDITIONAL="NPS_CONDITIONAL"}(Jt||(Jt={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(Zt||(Zt={})),Ft.REQUEST,Ft.SUBSCRIBE_CONTACT;class Yt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class te extends kt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(te.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(te.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(te.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}te.changeEventName="CHANGE";const ee=te;class ne{static set(t,e){const n=t[ne.accumulatorPropertyName]||{};t[ne.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[ne.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}ne.accumulatorPropertyName="clStyleAttributes";const oe=ne;var ie;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(ie||(ie={}));class re{static applyHostStyles(t,e,n=null,o){var i,r,l;const s=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find(t=>"CLICK"===t.type);s&&(null===(l=s.actions)||void 0===l?void 0:l.length)&&(e.style.cursor="pointer"),t!==vt&&t!==yt&&t!==St||(e.style.display=o===ie.CONTENT_LOCKER&&t===vt?"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 le{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=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,i,r,l,s;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find(t=>t.element===n),c=(null===(r=e.styles)||void 0===r?void 0:r.find(t=>t.element===n))||{},d=(null===(l=null==c?void 0:c.styleAttributes)||void 0===l?void 0:l.background)||(null===(s=null==a?void 0:a.styleAttributes)||void 0===s?void 0:s.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({url:n.originalSVGResourceURL}).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)}).catch(t=>{console.error(t),Yt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)})}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)}),this.themeSubscription=this.documentModel.on("THEME_UPDATE",t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)}),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach(t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])}),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const se=new class{execute({url:t,method:e="GET",body:n=null,headers:o,abortSignal:i}){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function ae(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class ce{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 de{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}}var pe;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",t.LEAD_PROGRESS="LEAD_PROGRESS"}(pe||(pe={}));const ue=pe;class he{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(ue.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(ue.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new de(this.onCounterStateUpdate)}}}const ge=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>ge(...t)}},me=ge,be="props",ve="shared",fe="environment";function ye(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(l=null==r?void 0:r.getAttribute)||void 0===l?void 0:l.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var l};return i(t)}const Ee="SUBMIT";function Oe(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}const Te={DESKTOP:"desktop",MOBILE:"mobile"};function Se(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 Ce(t=[]){return t.map(t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)}))}function Ae(t,e,o){var i;let r="rgb(0, 0, 0)";const l=t.adaptiveStyles[e].find(t=>"input"===t.element);if(!l)return r;if(l.placeholderStyleAttributes&&l.placeholderStyleAttributes.color)return l.placeholderStyleAttributes.color;const s=(l.classes||"").split(" ").filter(t=>t.startsWith(n));if(!s.length)return r;let a=null===(i=o.textClasses)||void 0===i?void 0:i[s[0]];return a&&a.placeholderStyleAttributes&&a.placeholderStyleAttributes.color?a.placeholderStyleAttributes.color:r}const Ie=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class Re extends Ie{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var _e,we,Ne;function Pe(t){if(null!=t&&""!==t)return"string"==typeof t?t:"object"==typeof t?JSON.stringify(t):String(t)}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(_e||(_e={})),(Ne=we||(we={})).STATIC="STATIC",Ne.DATA_LAYER="DATA_LAYER",Ne.URL_QUERY_PARAMS="URL_QUERY_PARAMS",Ne.JS_API_VARIABLE="JS_API_VARIABLE",Ne.COOKIE="COOKIE",Ne.LOCAL_STORAGE="LOCAL_STORAGE";class Le{constructor(t,e){this.configService=t,this.registry=e}resolveValue(t,e){if(!(null==t?void 0:t.enabled)||!t.sourceType||this.configService.getConfig("renderMode")===_e.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===we.STATIC)return Pe(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return Pe("function"==typeof(null==r?void 0:r.processor)?r.processor(i,Object.assign({id:o},n)):null==r?void 0:r.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class xe extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let l=new Re("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(l),t=l.detail.props,Object.assign(this,t),this.observers=me(be,ve,fe),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 Dt({}),this.componentEventEmitter=new kt,this.componentResourceManager=new he(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new Pt(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(be).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=i("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(ve).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new le(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),se),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(ee.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(fe).forEach(e=>e(this.prevEnvironment,t)),this.prevEnvironment=t})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")}))},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.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===_e.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===_e.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(be).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ve).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(fe).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter(t=>!t.hasAttribute(i("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("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,i=!1;n.desktop&&n.desktop.forEach(n=>{n.element===e&&(Oe(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(Oe(n,t),i=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))}),n}(t,e),r=i("type"),l="element-styles";let s=this.getRootElement().querySelector(`style[${r}="${l}"]`);s||(s=document.createElement("style"),s.setAttribute(r,l),this.getRootElement().appendChild(s)),Z({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let r=Se(o,n,e);if(r){if(this.resizeListener.isMobile()){const t=Se(o,"desktop",e);t&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(r),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,r;const l=[];"host"===(e=xe._resolveTogglableStylesForElementModel(e)).element&&(re.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===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),l.push("background")));let s=e.styleAttributes.background,a=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],Mt(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),Mt(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:ae(e.styleAttributes,l)});if(oe.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(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),Z({element:r,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(.${i("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 i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.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="",r)=>{const l=Object.keys(n).reduce((t,e)=>t+` ${ce.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`,"");Z({element:t,html:`[${i("element")}="${e}"]${o} { ${l} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Z({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&Z({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)&&Z({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&Z({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 i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>ye(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ye(this.parentNode,i("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>mt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>bt(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.getAutofillValue=()=>{var t;const e=this.getModel();return new Le(this.services.config,this.services.context.getRegistry()).resolveValue(null===(t=e.props.control)||void 0===t?void 0:t.autofill,e.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(t,e)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=t?e:void 0,t&&this.services.context.updateRecord(this.getModel().id,{value:e})},this.addContextRecord=()=>{var t,e;const n=this.getModel();this.services.context.addRecord(n.id,{recordKey:n.id,id:n.props.control.name,label:this.getContextRecordLabel(n.props),value:null!==(t=this.getValidatedAutofillValue())&&void 0!==t?t:n.props.control.defaultValue||"",viewIndex:null===(e=n.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,l;const s=t.control.name;if(["email","first_name","last_name"].includes(s))return s.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=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===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(l=t.control)||void 0===l?void 0:l.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===Ee);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:It.REQUEST}).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.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then(()=>{this.attachHandlers()});const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}xe._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=xe._resolveTogglableStyles(e[t]))}),e},xe._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 ke=xe,Me=Symbol("required");var De=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 i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function je(){}const Ue="pending",Be="valid",Ve="invalid";class Fe extends ke{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=De(t,["element"]),i=this.getProps(),r=this.getModel(),l=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),s=this.getAutofillValue();void 0!==s&&(l.defaultValue=s);const a=this.services.form,c=[l,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==s&&d.getValue()===s&&this._validateAutofilledValue(d),d},this._validateAutofilledValue=t=>{t.validate({silent:!0}).then(e=>{e||t.markAsTouched(),this.syncAutofillContextRecord(e,t.getValue())})},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=je,invalidCallback:r=je,pendingCallback:l=je,elementToListen:s=n,validationMap:a={},listenStatusChange:c=!0}=e,d=De(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,u=(null==p?void 0:p.validator)?a[p.validator]:void 0,h=t.some(t=>t[Me]),g=!!(null==p?void 0:p.required),m=g||h,b=[...t];g&&!h&&b.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[Me]=!0,e}()),u&&b.push(u);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:m}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:s,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:l},d)),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=Ue;switch(!0){case n.control.pending:t=Ue;break;case n.control.valid:t=Be;break;default:t=Ve}this._handleValidationStatus(n,t)})},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:l,errorMessageMapper:s,pendingCallback:a}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Be:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ve:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=bt(e,mt(t));if(!o)return n;const i=o.translations,r=Object.keys(i).find(t=>t.includes(n));return r?i[r]:n}(c,d,e);s&&(r=s(e,r)),function(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${ht}`))return;const e=document.createElement("style");e.setAttribute("id",ht),Z({element:e,html:gt}),t.head.appendChild(e)})(o),i=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(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=lt(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),Y(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${ht}`);e&&e.remove()}(o))})}(o,i,r,this.htmlDocumentObject),l&&l()}break;case Ue:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),a&&a())}}}}function We(t){return Object.values(Te).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const Ge={name:"SysDropdownInputComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["SELECT"],contextMenuModel:We([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:We([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:We([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{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:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{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}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{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"]}}]},focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title","content,placeholder":"Choose an option"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок","content,placeholder":"Выберите опцию"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок","content,placeholder":"Оберіть опцію"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título","content,placeholder":"Escoja una opción"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel","content,placeholder":"Wählen Sie eine Option."},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre","content,placeholder":"Choisissez une option"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo","content,placeholder":"Scegli un'opzione"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título","content,placeholder":"Alege o opțiune"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu","content,placeholder":"Alege o opțiune"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие","content,placeholder":"Изберете опция"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul","content,placeholder":"Vyberte si možnost"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος","content,placeholder":"Διαλέξτε μια επιλογή"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel","content,placeholder":"Kies een optie"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł","content,placeholder":"Wybierz opcję"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł","content,placeholder":"Välj ett alternativ"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık","content,placeholder":"Bir seçenek belirleyin"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان","content,placeholder":"اختر خيارًا"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title","content,placeholder":"选择一项"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel","content,placeholder":"Vælg en mulighed"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","content,label":"Title","content,placeholder":"בחרו חלופה"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title","content,placeholder":"Valitse vaihtoehto"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title","content,placeholder":"एक विकल्प चुनें"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title","content,placeholder":"Odaberite opciju"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title","content,placeholder":"Válasszon egy opciót"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title","content,placeholder":"Pilih satu opsi"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title","content,placeholder":"オプションを選択"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title","content,placeholder":"옵션 선택"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title","content,placeholder":"Velg et alternativ"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title","content,placeholder":"Vyberte si možnosť"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title","content,placeholder":"Izberite možnost"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title","content,placeholder":"Izaberite opciju"}},props:{content:{label:"Title",placeholder:"Choose an option",textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"dropdown",integrationName:"dropdown",defaultValue:null,hoverColor:"rgba(0, 0, 0, 0)",selectedColor:"rgba(0, 0, 0, 0)",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",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(He=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(Te).reduce((t,e)=>Object.assign(t,{[e]:Ce(He)}),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysDropdownInputComponent/assets/img/component-icon.svg",label:{en:"Dropdown",ru:"Выпадающий список",uk:"Випадаючий список",es:"Desplegable",fr:"Menu déroulant",de:"Dropdown",it:"A tendina",pt:"Suspenso",ro:"Derulantă",bg:"Падащо меню",cs:"Rozevírací seznam",el:"Αναπτυσσόμενη λίστα",nl:"Vervolgkeuzelijst",pl:"Lista rozwijana",sv:"Rullgardin",tr:"Açılır",ar:"القائمة المنسدلة",zh:"下拉菜单",da:"Dropdown",he:"רשימה נפתחת",fi:"Pudotus",hi:"ड्रॉपडाउन",hr:"Padajući izbornik",hu:"Legördülő menü",id:"tarik-turun",ja:"ドロップダウン",ko:"드롭다운",no:"Nedtrekk",sk:"Rozbaľovacia ponuka",sl:"Spustni meni",sr:"Padajući meni"}},syncEnabled:!0,stylesImitationEnabled:!0,showComponentOptionsPropertyPaneOnInsert:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};var He;function $e(t){setTimeout(t,50)}function ze(t){return ze="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},ze(t)}function Ke(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 Qe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ke(Object(n),!0).forEach(function(e){on(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function qe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,r,l,s=[],a=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=r.call(n)).done)&&(s.push(o.value),s.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Xe(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)?Xe(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(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 Je(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,rn(o.key),o)}}function Ze(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ze=function(){return!!t})()}function Ye(t,e,n,o){var i=tn(en(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function tn(){return tn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=en(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},tn.apply(null,arguments)}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}function nn(t,e){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nn(t,e)}function on(t,e,n){return(e=rn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rn(t){var e=function(t){if("object"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}var ln=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),on(e=function(t,e,n){return e=en(e),function(t,e){if(e&&("object"==ze(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,Ze()?Reflect.construct(e,n||[],en(t).constructor):e.apply(t,n))}(this,t),"registerControl",function(t){e.registeredControl=e.createControlWithValidation()}),on(e,"getOptions",function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=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],[i,r])=>function(t,e,n,o=!1){let i=t[n],r=e[n];return isNaN(i)||isNaN(r)?"string"!=typeof i||"string"!=typeof r?0:(i=i.toLowerCase(),r=r.toLowerCase(),o?r.localeCompare(i):i.localeCompare(r)):i<r?o?1:-1:i>r?o?-1:1:0}(o,r,e,n)))}(e.filterOptionsBySearchValue(e.getProps().control.options,n),o)}),on(e,"filterOptionsBySearchValue",function(t,e){if(!e.trim())return t;var n=e.trim().toLowerCase(),o=[];return 1===n.length?(o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label[0].toLowerCase()===n})).length||(o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label.toLowerCase().includes(n)})):o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label.toLowerCase().includes(n)}),Object.fromEntries(o)}),on(e,"createDropdownButtonMenuButtonComponent",function(t,n,o,i){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=document.createElement("div");l.classList.add("option-wrapper"),l.dataset.selectable=String(r),r&&(l.setAttribute("role","option"),l.setAttribute("aria-selected",n?"true":"false"),null!=t.id&&(l.id=e.getOptionId(t.id)));var s=document.createElement("span");return s.textContent=t.label,Y(s,o),n&&(l.style.backgroundColor=ut(i)),l.appendChild(s),l}),on(e,"setDropdownInputText",function(t){var n,o,i=e.getElement("input"),r=(null===(n=e.registeredControl)||void 0===n?void 0:n.getValue())||null;t.hasOwnProperty(null==r?void 0:r.id)&&(o=t[r.id]),i.value=o?o.label:""}),on(e,"createOverlayContent",function(n,o,i,r){var l,s=e.getElement("input"),a=tt(s,t.dropdownMenuOptionLabelStyles),c=tt(s,t.overlayContentStyles);c.background=pt(c.background,a.color),Y(o,Qe(Qe({},c),{},{"border-top-left-radius":"".concat(4,"px"),"border-top-right-radius":"".concat(4,"px"),"border-bottom-left-radius":"".concat(4,"px"),"border-bottom-right-radius":"".concat(4,"px")}));var d=(null===(l=e.registeredControl)||void 0===l?void 0:l.getValue())||null,p=document.createElement("div");e.overlayOptions=[],Object.entries(i).forEach(function(t,o){var r=qe(t,1)[0],l=i[r],s=(null==d?void 0:d.id)===r,u=e.createDropdownButtonMenuButtonComponent(l,s,a,c.background);u.addEventListener("click",function(){e.selectOption(r,l,n)}),u.addEventListener("mouseenter",function(){e.setActiveOption(o,!1)}),p.appendChild(u),e.overlayOptions.push({id:r,option:l,element:u})});var u=Object.keys(i).length;if(!u){var h={exportId:null,id:null,sort:0,label:e.getTranslationsMap(t.NO_MATCHES_OPTION).translations},g=e.createDropdownButtonMenuButtonComponent(h,!1,a,c.background,!1);p.appendChild(g)}o.appendChild(p),e.setInitialActiveOption();var m=Object.keys(r).length;if(u>0&&m>u){var b=Object.keys(r).filter(function(t){return!i.hasOwnProperty(t)}).reduce(function(t,n){var o=r[n],i=e.createDropdownButtonMenuButtonComponent(o,!1,a,c.background);i.style.visibility="hidden",p.appendChild(i);var l=parseFloat(i.getBoundingClientRect().height);return p.removeChild(i),t+l},0);Y(o,{"margin-bottom":"".concat(b,"px")})}}),on(e,"getOverlayStyles",function(){var n=rt(),o=e.getElement("input"),i=pt(tt(o,t.overlayContentStyles).background,tt(o,t.dropdownMenuOptionLabelStyles).color);return"\n .".concat(n," {\n max-height: 380px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n padding: 5px 0;\n overflow: auto;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n }\n \n .").concat(n,"::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n background-color: transparent;\n }\n \n .").concat(n,"::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #848484;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n }\n\n .option-wrapper.option-active,\n .option-wrapper:hover {\n background-color: ").concat(ut(i),";\n }\n ")}),on(e,"createOverlay",function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selected";e.overlayBackdrop&&e.overlayBackdrop.click();var o=e.getElement("input");o.setAttribute("aria-expanded","true"),o.setAttribute("aria-controls",e.overlayListboxId),e.navigationHint=n;var i=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:i,overlayHeight:r,offset:l,onDestroy:s,positionByDefault:a,isHorizontallyCentered:c,isBackdropDisabledOnUI:d}=t,p=t.htmlDocumentObject||document,u=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(d),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),i&&(h.style.width=`${i}px`),r&&(h.style.height=`${r}px`);const g=h.attachShadow({mode:"open"}),m=document.createElement("style");Z({element:m,html:n}),g.append(m);const b=document.createElement("div");b.classList.add(rt()),p.body.append(u),p.body.append(h),g.append(b),o(u,b),(()=>{const t=lt(e,b,function(t){return null!=t?t:5}(l),a,c,p);(function(t,e){t.setAttribute("cl-overlay-position",e)})(b,t.position),Y(h,t.coordinates)})(),h.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault()});const v=t=>{u.remove(),h.remove(),s&&s(),window.removeEventListener("keyup",t,!0)},f=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),v(f))};return u.addEventListener("click",()=>v(f)),window.addEventListener("keyup",f,!0),{backdrop:u,overlay:h}}({triggerElement:o,overlayStyles:e.getOverlayStyles(),createOverlayContent:function(n,o){o.setAttribute("role","listbox"),o.id=e.overlayListboxId,o.addEventListener("keydown",e.handleOverlayKeydown),e.overlayContentElement=o,e.createOverlayContent(n,o,t,e.getProps().control.options)},overlayWidth:o.getBoundingClientRect().width,onDestroy:function(){e.overlayBackdrop=null,e.overlayContentElement=null,e.overlayOptions=[],e.activeOptionIndex=-1,o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-controls"),o.removeAttribute("aria-activedescendant")},positionByDefault:"bottom",htmlDocumentObject:e.htmlDocumentObject});e.overlayBackdrop=i.backdrop,e.overlayBackdrop.addEventListener("click",function(t){t.isTrusted&&e.setDropdownInputText(e.getProps().control.options)})}),on(e,"applyTriggerAriaLabel",function(){var n=e.getElement("input");if(n&&!n.hasAttribute("aria-label")){var o=e.getTranslationsMap(t.SELECT_OPTION).translations;n.setAttribute("aria-label",o)}}),on(e,"setPlaceholder",function(n,o){var i=e.getElement("input"),r=Ae(n,o,e.getShared());e.getRootElement().querySelector("#cl-dropdown-styles").textContent=t.componentStyle({placeholderColor:r});var l=n.content.placeholder||e.getTranslationsMap(t.DEFAULT_PLACEHOLDER_VALUE).translations;i.setAttribute("placeholder",l)}),on(e,"setArrowIconStyles",function(t,n){var o=e.getRootElement(),i=Ae(t,n,e.getShared()),r=o.querySelector(".dropdown-input-select-button");r&&(r.style.color=i)}),on(e,"configInputEventListeners",function(){e.getElement("input").addEventListener("keydown",e.handleInputKeydown)}),on(e,"updateInputMode",function(){var t=e.getElement("input");if(t){if(t.removeEventListener("input",e.handleSearchInput),Object.values(e.getOptions()).length<e.enableSearchOptionsCount)return t.setAttribute("readonly","readonly"),t.setAttribute("aria-autocomplete","none"),void t.setAttribute("aria-readonly","true");t.removeAttribute("readonly"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-readonly","false"),t.addEventListener("input",e.handleSearchInput)}}),on(e,"handleTriggerClick",function(){$e(function(){return e.createOverlay(e.getOptions())})}),on(e,"handleSearchInput",function(t){var n=t.target;$e(function(){return e.createOverlay(e.getOptions(n.value),"first")})}),on(e,"handleInputKeydown",function(t){var n=e.getElement("input").hasAttribute("readonly"),o=!!e.overlayBackdrop;switch(t.key){case"ArrowDown":t.preventDefault(),o?e.moveActiveOption(1):e.createOverlay(e.getOptions(),"first");break;case"ArrowUp":t.preventDefault(),o?e.moveActiveOption(-1):e.createOverlay(e.getOptions(),"last");break;case"Enter":o?(t.preventDefault(),e.selectActiveOption()):(t.preventDefault(),e.createOverlay(e.getOptions()));break;case" ":case"Spacebar":n&&(t.preventDefault(),o?e.selectActiveOption():e.createOverlay(e.getOptions()));break;case"Home":o&&n&&(t.preventDefault(),e.setActiveOption(0));break;case"End":o&&n&&(t.preventDefault(),e.setActiveOption(e.overlayOptions.length-1));break;case"Escape":var i;o&&(t.preventDefault(),null===(i=t.stopPropagation)||void 0===i||i.call(t),e.armEscapeKeyupGuard(),e.closeOverlay(!0));break;case"Tab":o&&e.closeOverlay(!0)}}),on(e,"handleOverlayKeydown",function(t){var n;"Escape"===t.key&&e.overlayBackdrop&&(null===(n=t.stopPropagation)||void 0===n||n.call(t),e.armEscapeKeyupGuard(),e.closeOverlay(!0))}),on(e,"armEscapeKeyupGuard",function(){e.removeEscapeKeyupGuard(),e.boundEscapeKeyupGuard=function(t){var n,o;"Escape"===t.key&&(null===(n=t.preventDefault)||void 0===n||n.call(t),null===(o=t.stopImmediatePropagation)||void 0===o||o.call(t),e.removeEscapeKeyupGuard())},window.addEventListener("keyup",e.boundEscapeKeyupGuard,!0)}),on(e,"removeEscapeKeyupGuard",function(){e.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",e.boundEscapeKeyupGuard,!0),e.boundEscapeKeyupGuard=null)}),on(e,"closeOverlay",function(){var t;arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&e.setDropdownInputText(e.getProps().control.options),null===(t=e.overlayBackdrop)||void 0===t||t.click()}),on(e,"moveActiveOption",function(t){if(e.overlayOptions.length){var n=e.activeOptionIndex<0?t>0?0:e.overlayOptions.length-1:Math.max(0,Math.min(e.activeOptionIndex+t,e.overlayOptions.length-1));e.setActiveOption(n)}}),on(e,"setInitialActiveOption",function(){var t;if(e.overlayOptions.length)if("first"!==e.navigationHint)if("last"!==e.navigationHint){var n=null===(t=e.registeredControl)||void 0===t||null===(t=t.getValue())||void 0===t?void 0:t.id,o=e.overlayOptions.findIndex(function(t){return t.id===n});e.setActiveOption(o>=0?o:0,!1)}else e.setActiveOption(e.overlayOptions.length-1,!1);else e.setActiveOption(0,!1);else e.getElement("input").removeAttribute("aria-activedescendant")}),on(e,"setActiveOption",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.overlayOptions.length){e.activeOptionIndex=Math.max(0,Math.min(t,e.overlayOptions.length-1)),e.overlayOptions.forEach(function(t,n){t.element.classList.toggle("option-active",n===e.activeOptionIndex)});var o=e.overlayOptions[e.activeOptionIndex];e.getElement("input").setAttribute("aria-activedescendant",o.element.id),n&&o.element.scrollIntoView({block:"nearest"})}}),on(e,"selectActiveOption",function(){if(!(e.activeOptionIndex<0)){var t=e.overlayOptions[e.activeOptionIndex];e.selectOption(t.id,t.option,e.overlayBackdrop)}}),on(e,"selectOption",function(t,n,o){var i={id:t,exportId:n.exportId},r=e.getElement("input");e.registeredControl.setValue(i),r.value=n.label,o.click(),r.focus()}),on(e,"getOptionId",function(t){return"cl-dropdown-option-".concat(String(t).replace(/[^a-zA-Z0-9_-]/g,"-"))}),on(e,"manifest",Ge),on(e,"registeredControl",void 0),on(e,"overlayBackdrop",void 0),on(e,"overlayContentElement",null),on(e,"overlayOptions",[]),on(e,"activeOptionIndex",-1),on(e,"enableSearchOptionsCount",5),on(e,"overlayListboxId","cl-dropdown-listbox-".concat(Math.random().toString(36).slice(2,11))),on(e,"navigationHint","selected"),on(e,"boundEscapeKeyupGuard",null),e.handleTriggerClick=e.handleTriggerClick.bind(e),e.handleInputKeydown=e.handleInputKeydown.bind(e),e.handleSearchInput=e.handleSearchInput.bind(e),e.handleOverlayKeydown=e.handleOverlayKeydown.bind(e),e.getRootElement().innerHTML='\n <style id="cl-dropdown-styles">'.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&&nn(t,e)}(t,Fe),function(t,e){return e&&Je(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Ye(t,"connectedCallback",this,3)([]);var n=this.getRootElement(),o=this.getProps();this.registerControl(n),this.setPlaceholder(o,this.getEnvironment()),this.setDropdownInputText(this.getOptions()),this.applyTriggerAriaLabel(),this.updateInputMode(),this.observeProps(function(t,o){var i,r=e.getEnvironment();e.applyAutoAdaptiveStyles(o.adaptiveStyles,o.styles),nt(o,r,n,".label-with-dropdown-input-container"),ot(o,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setPlaceholder(o,r),e.setDropdownInputText(e.getOptions()),e.setArrowIconStyles(o,r),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=it(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=it(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=it(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=it(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("input")),e.getElement("input").setAttribute("aria-required",String(!(null===(i=o.control)||void 0===i||null===(i=i.validation)||void 0===i||!i.required))),e.updateInputMode()}),this.observeShared(function(){e.setPlaceholder(e.getProps(),e.getEnvironment()),e.setArrowIconStyles(e.getProps(),e.getEnvironment()),e.updateInputMode()}),this.observeEnvironment(function(t,o){var i=e.getProps();nt(i,o,n,".label-with-dropdown-input-container"),ot(i,o,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setPlaceholder(i,o),e.setArrowIconStyles(i,o)}),n.querySelector(".dropdown-input-with-tooltip").addEventListener("click",this.handleTriggerClick),this.configInputEventListeners()}},{key:"disconnectedCallback",value:function(){var e;Ye(t,"disconnectedCallback",this,3)([]),this.removeEscapeKeyupGuard();var n=this.getElement("input");null==n||n.removeEventListener("keydown",this.handleInputKeydown),null==n||n.removeEventListener("input",this.handleSearchInput),null===(e=this.getRootElement().querySelector(".dropdown-input-with-tooltip"))||void 0===e||e.removeEventListener("click",this.handleTriggerClick)}}])}();on(ln,"define",{name:"sys-dropdown-input",model:Ge.name,manifest:Ge}),on(ln,"DEFAULT_PLACEHOLDER_VALUE",{en:"Choose an option",ru:"Выберите опцию",uk:"Оберіть опцію",es:"Escoja una opción",de:"Wählen Sie eine Option",fr:"Choisissez une option",it:"Scegli un'opzione",pt:"Escolha uma opção",ro:"Alegeți o opțiune",bg:"Изберете опция",cs:"Vyberte si možnost",el:"Διαλέξτε μια επιλογή",nl:"Kies een optie",pl:"Wybierz opcję",sv:"Välj ett alternativ",tr:"Bir seçenek belirleyin",ar:"اختر خيارًا"}),on(ln,"NO_MATCHES_OPTION",{en:"No matches",ru:"Нет совпадений",uk:"Збігів немає",es:"No matches",de:"No matches",fr:"No matches",it:"No matches",pt:"No matches",ro:"No matches",bg:"No matches",cs:"No matches",el:"No matches",nl:"No matches",pl:"No matches",sv:"No matches",tr:"No matches",ar:"No matches"}),on(ln,"SELECT_OPTION",{en:"Select option",ru:"Выберите опцию",uk:"Оберіть опцію",es:"Seleccionar opción",de:"Option auswählen",fr:"Sélectionner une option",it:"Seleziona opzione",pt:"Selecionar opção",ro:"Selectați opțiunea",bg:"Изберете опция",cs:"Vyberte možnost",el:"Επιλέξτε επιλογή",nl:"Selecteer optie",pl:"Wybierz opcję",sv:"Välj alternativ",tr:"Seçenek seçin",ar:"حدد خيارًا",zh:"选择选项",da:"Vælg en mulighed",he:"בחר אפשרות",fi:"Valitse vaihtoehto",hi:"विकल्प चुनें",hr:"Odaberite opciju",hu:"Válasszon opciót",id:"Pilih opsi",ja:"オプションを選択",ko:"옵션 선택",no:"Velg et alternativ",sk:"Vyberte možnosť",sl:"Izberite možnost",sr:"Izaberite opciju"}),on(ln,"overlayContentStyles",["background","border-style","border-top-width","border-top-color","border-bottom-width","border-bottom-color","border-left-width","border-left-color","border-right-width","border-right-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"]),on(ln,"dropdownMenuOptionLabelStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","line-height","text-align"]),on(ln,"componentStyle",function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).placeholderColor||"#808080";return"\n .main-container {\n height: 100%;\n }\n \n .label-with-dropdown-input-container {\n height: 100%;\n display: flex;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .dropdown-input-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 .input-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 .dropdown-label {\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n padding: 0 35px 0 20px;\n cursor: pointer;\n }\n \n .dropdown-label::placeholder {\n color: ".concat(t,";\n }\n \n .dropdown-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n margin-right: 5px;\n position: absolute;\n right: 0;\n z-index: 2;\n }\n \n button.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n }\n")}),on(ln,"componentTemplate",'\n <div class="main-container">\n <div class="label-with-dropdown-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-dropdown-label">\n </div>\n <div class="dropdown-input-with-tooltip">\n <div class="dropdown-input-select-button" aria-hidden="true">\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n \x3c!--"one-time-code" disables autofill in chromium--\x3e\n <input cl-element="input"\n class="dropdown-label"\n role="combobox"\n aria-haspopup="listbox"\n aria-autocomplete="none"\n aria-expanded="false"\n aria-labelledby="cl-dropdown-label"\n name="cl-dropdown-no-autofill"\n autocomplete="one-time-code"\n placeholder="placeholder"/>\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\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');export{ln as default};window.clComponentClass_SysDropdownInputComponent=ln;
|
|
1
|
+
const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}class r{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 l={transparent:"#0000"},s=function(t,e,n,o){return null!=o&&""!==o||(o=1),t=parseFloat(t),e=parseFloat(e),n=parseFloat(n),o=parseFloat(o),t<=255&&t>=0&&e<=255&&e>=0&&n<=255&&n>=0&&o<=1&&o>=0?[Math.round(t),Math.round(e),Math.round(n),o]:null},a=[];for(var c in l)a.push(c);var d="\\s*([.\\d%]+)\\s*",p="\\("+[d,d,d]+"(?:,\\s*([.\\d]+)\\s*)?\\)",u="(?:rgb)a?",h="("+a.join("|")+")",g=RegExp(u+p,"i"),m=function(t,e){if(null==t)return null;t=(t+"").replace(/\s+/,"");var n=l[t];return n?m(n,e):(n=t.match(g))&&(t=n.slice(1))&&(t=s.apply(null,t))?e?t:(1===t[3]&&t.splice(3,1),"rgb"+(4===t.length?"a":"")+"("+t+")"):null};RegExp([h,"(?:#([a-f0-9]{3,8}))",u+p,"(?:hsl)a?"+p].join("|"),"gi");const b=m;class v{ratio(t,e,n){return t=this.getRgbTriplet(t,n),e=this.getRgbTriplet(e,n),this.wcagRgb(t,e)}isNotTransparent(t,e){e=e||{};const n=(t=b(t)).match(/\((.*)\)/)[1].split(",");if(4!=n.length||"0"!=n[3]||e.ignoreAlpha)return t;throw new TypeError("get-contrast cannot contrast transparent colors")}getRgbTriplet(t,e){if("string"!=typeof t)throw new TypeError("get-contrast expects colors as strings");let n=t.toLowerCase();return n=this.isNotTransparent(n,e),n.match(/\((.*)\)/)[1].split(",").slice(0,3)}wcagRgb(t,e){return this.luminance(this.relativeLuminance(t),this.relativeLuminance(e))}luminance(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}relativeLuminance(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=1/12.92;function r(t){return Math.pow((t+.055)/1.055,2.4)}return.2126*(e<=.03928?e*i:r(e))+.7152*(n<=.03928?n*i:r(n))+.0722*(o<=.03928?o*i:r(o))}}function f(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))}var y=Array.prototype.concat,E=Array.prototype.slice,O=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];f(i)?e=y.call(e,E.call(i)):e.push(i)}return e};O.wrap=function(t){return function(){return t(O(arguments))}};const T=O;var S={},C=Object.hasOwnProperty,A=Object.create(null);for(var I in S)C.call(S,I)&&(A[S[I]]=I);var R={to:{},get:{}};function _(t,e,n){return Math.min(Math.max(e,t),n)}R.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=R.get.hsl(t),n="hsl"):(e=R.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},R.get.rgb=function(t){if(!t)return null;var e,n,o,i=[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 r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[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++)i[n]=parseInt(e[n]+e[n],16);o&&(i[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++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[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]:C.call(S,e[1])?((i=S[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=_(i[n],0,255);return i[3]=_(i[3],0,1),i},R.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,_(parseFloat(e[2]),0,100),_(parseFloat(e[3]),0,100),_(isNaN(n)?1:n,0,1)]}return null},R.to.rgb=function(){var t=T(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]+")"},R.to.hsl=function(){var t=T(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 w=R,N={},P={};for(const t of Object.keys(N))P[N[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:n})}L.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),l=r-i;let s,a;r===i?s=0:e===r?s=(n-o)/l:n===r?s=2+(o-e)/l:o===r&&(s=4+(e-n)/l),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?l/(r+i):l/(2-r-i),[s,100*a,100*c]},L.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,l;if(0===n)return l=255*o,[l,l,l];i=o<.5?o*(1+n):o+n-o*n;const s=2*o-i,a=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,l=6*r<1?s+6*(i-s)*r:2*r<1?i:3*r<2?s+(i-s)*(2/3-r)*6:s,a[t]=255*l;return a};const x=L;function k(t,e){return function(n){return e(t(n))}}function M(t,e){const n=[e[t].parent,t];let o=x[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=k(x[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const D={};Object.keys(x).forEach(t=>{D[t]={},Object.defineProperty(D[t],"channels",{value:x[t].channels}),Object.defineProperty(D[t],"labels",{value:x[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(x);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(x[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],l=e[i];-1===l.distance&&(l.distance=e[t].distance+1,l.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=M(t,e))}return n}(t);Object.keys(e).forEach(n=>{const o=e[n];D[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),D[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 j=D,U=["keyword","gray","hex"],B={};for(const t of Object.keys(j))B[[...j[t].labels].sort().join("")]=t;const V={};function F(t,e){if(!(this instanceof F))return new F(t,e);if(e&&e in U&&(e=null),e&&!(e in j))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 F)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=w.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=j[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=j[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=H(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 B))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=B[o];const{labels:i}=j[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=H(r)}if(V[this.model])for(o=j[this.model].channels,n=0;n<o;n++){const t=V[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)}F.prototype={toString(){return this.string()},string(t){let e=this.model in w.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return w.to[e.model](n)},round(t){return t=Math.max(t||0,0),new F([...this.color.map(W(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new F([...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(j)){if(U.includes(t))continue;const{channels:e}=j[t];F.prototype[t]=function(...e){return this.model===t?new F(this):e.length>0?new F(e,t):new F([...G(j[this.model][t].raw(this.color)),this.valpha],t)},F[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new F(o,t)}}function W(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function G(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const $=F,z="rgb(255, 255, 255)",K="rgb(0, 0, 0)";function Q(t,e){return $(t).alpha(e).string()}function q(t,e){try{return $(t).lighten(e).rgb().string()}catch(e){return console.warn("ColorUtils.lighten:",e),t}}function X(t,e){try{return $(t).darken(e).rgb().string()}catch(e){return console.warn("ColorUtils.darken:",e),t}}function Z(t,e){try{return(new v).ratio(t,e)}catch(n){return console.warn(`ColorUtils.getContrastRatio: transparent colors were used ${t}, ${e}`),0}}function J(t){const{element:e,html:n,appendHtml:o}=t,i=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+=i:e.innerHTML=i}function Y(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function tt(t,e){const n=window.getComputedStyle(t);return e.reduce((t,e)=>(t[e]=n.getPropertyValue(e),t),{})}function et(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find(t=>"label"===t.element))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find(t=>"label"===t.element))||void 0===o?void 0:o.params),i}function nt(t,e,n,o){var i;const r=n.querySelector(o),l=n.querySelector(".label"),s=et(t,e);l&&function(t,e){if(!e)return;t.id||(t.id=((t="cl-a11y")=>`${t}-${Math.random().toString(36).slice(2,10)}`)("cl-label"));const n=e.getAttribute("role"),o="group"===n||"radiogroup"===n?e:e.querySelector('[cl-element="input"]');if(!o)return;const i=(o.getAttribute("aria-labelledby")||"").split(" ").filter(Boolean);i.includes(t.id)||(i.push(t.id),o.setAttribute("aria-labelledby",i.join(" ")))}(l,r),s&&l&&(J({element:l,html:(null===(i=t.content)||void 0===i?void 0:i.label)||""}),"TOP"===s.position?(r.style.flexDirection="column",r.style.alignItems="unset",Y(l,{marginRight:"0",marginBottom:`${s.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",Y(l,{marginRight:`${s.margin}px`,marginBottom:"0"})),s.enabled?l.style.display="":l.style.display="none")}function ot(t,e,n,o,i){const r=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),i=null==n?void 0:n.styleAttributes;(null==i?void 0:i.width)&&(o=i)}return o}(t,e);if(!r)return;const l=et(t,e),s=i&&l&&l.enabled&&"TOP"===l.position?i.getBoundingClientRect().height+(l.margin||0):0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+s}px`)}function it(t,e,n){const o=function(t,e){let n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("var(")&&(n=function(t){const e=String(t).match(/var\([^,]+,\s*(rgb(?:a)?\([^)]+\))\)/);return e&&e[1]?e[1]:null}(n)||void 0),n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=Q(o,.5);return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function rt(){return o("overlay-menu-content")}function lt(t,e,n,o,i,l){const s=function(t,e,n,o,i){const l=function(t,e,n,o){const i=r.width(o),{right:l}=t.getBoundingClientRect(),s=i-n-l-r.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:st(e).width,availableSpaceToTheLeftSideOfTheTrigger:l-n,availableSpaceToTheRightSideOfTheTrigger:s}}(t,e,n,i),s=function(t,e,n,o){const i=r.height(o),{top:l,bottom:s}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:st(e).height,availableSpaceAboveTriggerElem:l-n,availableSpaceBelowTriggerElem:i-s-n}}(t,e,n,i);let a="undefined";const c={bottom:s.availableSpaceBelowTriggerElem>=s.contentHeight,top:s.availableSpaceAboveTriggerElem>=s.contentHeight,right:l.availableSpaceToTheRightSideOfTheTrigger>=l.contentWidth,left:l.availableSpaceToTheLeftSideOfTheTrigger>=l.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(s.availableSpaceBelowTriggerElem,s.availableSpaceAboveTriggerElem,l.availableSpaceToTheRightSideOfTheTrigger,l.availableSpaceToTheLeftSideOfTheTrigger);t===s.availableSpaceBelowTriggerElem?a="bottom":t===s.availableSpaceAboveTriggerElem?a="top":t===l.availableSpaceToTheRightSideOfTheTrigger?a="right":t===l.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},s),l),{position:a})}(t,e,n,o,l=l||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)Y(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),Y(e,{"margin-bottom":"0px"});else if("bottom"===t.position)Y(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),Y(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";Y(e,{"margin-top":t,"margin-bottom":t})}}(s,e),{coordinates:at(s,t.getBoundingClientRect(),e.getBoundingClientRect(),i,l),position:s.position}}function st(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:l}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(l,10),height:n+parseInt(i,10)+parseInt(o,10)}}function at(t,e,n,o,i){switch(t.position){case"top":return{left:`${ct(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${ct(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${dt(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${dt(0,t)}px`}}}function ct(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>r.width(o)&&(i-=i+e.width-r.width(o)),i}function dt(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function pt(t,e){return t.startsWith("transparent")||t.startsWith("none")||!t.startsWith("rgb")||1!==(n=t.slice(0,t.match(/\)/).index+1),$(n).alpha())?Z(e,z)>Z(e,K)?z:K:t;var n}function ut(t){const e=Z(t,z),n=Z(t,K);let o,i;if(e>n)for(o=z,i=e;i>5;)o=X(o,.1),i=Z(t,o);else for(o="rgb(10, 10, 10)",i=n;i>5;)o=q(o,.1),i=Z(t,o);return Q(o,.2)}const ht="cl-tooltip-text-styles",gt=`\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 mt(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function bt(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 vt="VIEW",ft="MODULE",yt="CONTAINER",Et="INPUT",Ot="BUTTON",Tt="CONSENT",St="COLUMN";var Ct,At;(At=Ct||(Ct={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",At.REQUEST="REQUEST",At.DISPATCH_EVENT="DISPATCH_EVENT",At.GO_TO_VIEW="GO_TO_VIEW",At.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",At.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",At.SHOW_WIDGET="SHOW_WIDGET",At.OPEN_LINK="OPEN_LINK",At.CLOSE_WIDGET="CLOSE_WIDGET",At.CLICK="CLICK";const It=Ct;var Rt,_t;class wt{static sortActions(t){const e={[It.CLOSE_WIDGET]:-1,[It.OPEN_LINK]:-2,[It.SHOW_WIDGET]:1,[It.SUBSCRIBE_CONTACT]:2,[It.REQUEST]: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=wt.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(),r=o.getAttribute(i("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,r)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(i("type")));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(wt.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 i,r=!0,l=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,i){!function(t,e,n,o){Promise.resolve(o).then(function(e){t({value:e,done:n})},e)}(o,i,(e=t[n](e)).done,e.value)})}}}(this.eventsQueue);!(t=(i=await l.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=l.return)||await n.call(l)}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=[])}}wt.IGNORING_VIEW_ENTRY_TYPES=[Ot,Tt,Et],(_t=Rt||(Rt={})).CLICK="CLICK",_t.COMPONENT_EVENT="COMPONENT_EVENT";class Nt{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const r=null===(o=n())||void 0===o?void 0:o.getAttribute(i("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,r)}),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 Pt{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 Rt.CLICK:return new wt(t,e);case Rt.COMPONENT_EVENT:return new Nt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class Lt{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 xt{constructor(){this.listeners=xt.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=Lt.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=xt.createDefaultListenersState()}}xt.createDefaultListenersState=()=>({"*":{}});const kt=xt,Mt=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:l}=i;(r||l).call(t,e,n,o)};class Dt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class jt{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===ft?Object.assign(Object.assign({},t),jt.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})}}var Ut,Bt,Vt,Ft,Wt,Gt,Ht,$t,zt,Kt,Qt,qt,Xt,Zt,Jt;jt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Bt=Ut||(Ut={})).VIEW="VIEW",Bt.CONTAINER="CONTAINER",Bt.TEXT="TEXT",Bt.INPUT="INPUT",Bt.BUTTON="BUTTON",Bt.IMAGE="IMAGE",Bt.CONSENT="CONSENT",Bt.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Bt.PROMO_CODE="PROMO_CODE",Bt.MULTIPLE_INPUT="MULTIPLE_INPUT",Bt.VIDEO="VIDEO",Bt.SLIDER="SLIDER",Bt.SLIDE="SLIDE",Bt.SOCIAL="SOCIAL",Bt.COLUMNS="COLUMNS",Bt.COLUMN="COLUMN",Bt.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(Vt||(Vt={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK",t.DISPATCH_EVENT="DISPATCH_EVENT"}(Ft||(Ft={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Wt||(Wt={})),(Gt||(Gt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(Ht||(Ht={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}($t||($t={})),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"}(zt||(zt={})),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"}(Kt||(Kt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(Qt||(Qt={})),(Xt=qt||(qt={})).BEFORE="BEFORE",Xt.AFTER="AFTER",Xt.INSIDE="INSIDE",Xt.INSTEAD="INSTEAD",function(t){t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.SUBMIT="SUBMIT",t.NPS_CONDITIONAL="NPS_CONDITIONAL",t.PRIZE_CONDITIONAL="PRIZE_CONDITIONAL"}(Zt||(Zt={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(Jt||(Jt={})),Ft.REQUEST,Ft.SUBSCRIBE_CONTACT;class Yt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class te extends kt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(te.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(te.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(te.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}te.changeEventName="CHANGE";const ee=te;class ne{static set(t,e){const n=t[ne.accumulatorPropertyName]||{};t[ne.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[ne.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}ne.accumulatorPropertyName="clStyleAttributes";const oe=ne;var ie;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(ie||(ie={}));class re{static applyHostStyles(t,e,n=null,o){var i,r,l;const s=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find(t=>"CLICK"===t.type);s&&(null===(l=s.actions)||void 0===l?void 0:l.length)&&(e.style.cursor="pointer"),t!==vt&&t!==yt&&t!==St||(e.style.display=o===ie.CONTENT_LOCKER&&t===vt?"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 le{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=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,i,r,l,s;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find(t=>t.element===n),c=(null===(r=e.styles)||void 0===r?void 0:r.find(t=>t.element===n))||{},d=(null===(l=null==c?void 0:c.styleAttributes)||void 0===l?void 0:l.background)||(null===(s=null==a?void 0:a.styleAttributes)||void 0===s?void 0:s.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({url:n.originalSVGResourceURL}).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)}).catch(t=>{console.error(t),Yt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)})}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)}),this.themeSubscription=this.documentModel.on("THEME_UPDATE",t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)}),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach(t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])}),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const se=new class{execute({url:t,method:e="GET",body:n=null,headers:o,abortSignal:i}){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function ae(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class ce{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 de{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}}var pe;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",t.LEAD_PROGRESS="LEAD_PROGRESS"}(pe||(pe={}));const ue=pe;class he{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(ue.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(ue.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new de(this.onCounterStateUpdate)}}}const ge=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>ge(...t)}},me=ge,be="props",ve="shared",fe="environment";function ye(t,e,n,o){const i=t=>{let r=function(t){return t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host||null:t}(t);return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(l=null==r?void 0:r.getAttribute)||void 0===l?void 0:l.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var l};return i(t)}const Ee="SUBMIT";function Oe(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}const Te={DESKTOP:"desktop",MOBILE:"mobile"};function Se(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 Ce(t=[]){return t.map(t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)}))}function Ae(t,e,o){var i;let r="rgb(0, 0, 0)";const l=t.adaptiveStyles[e].find(t=>"input"===t.element);if(!l)return r;if(l.placeholderStyleAttributes&&l.placeholderStyleAttributes.color)return l.placeholderStyleAttributes.color;const s=(l.classes||"").split(" ").filter(t=>t.startsWith(n));if(!s.length)return r;let a=null===(i=o.textClasses)||void 0===i?void 0:i[s[0]];return a&&a.placeholderStyleAttributes&&a.placeholderStyleAttributes.color?a.placeholderStyleAttributes.color:r}const Ie=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class Re extends Ie{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var _e,we,Ne;function Pe(t){if(null!=t&&""!==t)return"string"==typeof t?t:"object"==typeof t?JSON.stringify(t):String(t)}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(_e||(_e={})),(Ne=we||(we={})).STATIC="STATIC",Ne.DATA_LAYER="DATA_LAYER",Ne.URL_QUERY_PARAMS="URL_QUERY_PARAMS",Ne.JS_API_VARIABLE="JS_API_VARIABLE",Ne.COOKIE="COOKIE",Ne.LOCAL_STORAGE="LOCAL_STORAGE";class Le{constructor(t,e){this.configService=t,this.registry=e}resolveValue(t,e){if(!(null==t?void 0:t.enabled)||!t.sourceType||this.configService.getConfig("renderMode")===_e.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===we.STATIC)return Pe(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return Pe("function"==typeof(null==r?void 0:r.processor)?r.processor(i,Object.assign({id:o},n)):null==r?void 0:r.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class xe extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let l=new Re("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(l),t=l.detail.props,Object.assign(this,t),this.observers=me(be,ve,fe),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 Dt({}),this.componentEventEmitter=new kt,this.componentResourceManager=new he(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new Pt(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(be).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=i("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(ve).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new le(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),se),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(ee.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(fe).forEach(e=>e(this.prevEnvironment,t)),this.prevEnvironment=t})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")})),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")}))},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.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===_e.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===_e.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(be).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ve).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(fe).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter(t=>!t.hasAttribute(i("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("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,i=!1;n.desktop&&n.desktop.forEach(n=>{n.element===e&&(Oe(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(Oe(n,t),i=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))}),n}(t,e),r=i("type"),l="element-styles";let s=this.getRootElement().querySelector(`style[${r}="${l}"]`);s||(s=document.createElement("style"),s.setAttribute(r,l),this.getRootElement().appendChild(s)),J({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let r=Se(o,n,e);if(r){if(this.resizeListener.isMobile()){const t=Se(o,"desktop",e);t&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(r),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,r;const l=[];"host"===(e=xe._resolveTogglableStylesForElementModel(e)).element&&(re.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===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),l.push("background")));let s=e.styleAttributes.background,a=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],Mt(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),Mt(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:ae(e.styleAttributes,l)});if(oe.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(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),J({element:r,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(.${i("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 i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.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="",r)=>{const l=Object.keys(n).reduce((t,e)=>t+` ${ce.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`,"");J({element:t,html:`[${i("element")}="${e}"]${o} { ${l} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{J({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&J({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)&&J({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&J({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 i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>ye(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ye(this.parentNode,i("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>mt(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>bt(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.getAutofillValue=()=>{var t;const e=this.getModel();return new Le(this.services.config,this.services.context.getRegistry()).resolveValue(null===(t=e.props.control)||void 0===t?void 0:t.autofill,e.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(t,e)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=t?e:void 0,t&&this.services.context.updateRecord(this.getModel().id,{value:e})},this.addContextRecord=()=>{var t,e;const n=this.getModel();this.services.context.addRecord(n.id,{recordKey:n.id,id:n.props.control.name,label:this.getContextRecordLabel(n.props),value:null!==(t=this.getValidatedAutofillValue())&&void 0!==t?t:n.props.control.defaultValue||"",viewIndex:null===(e=n.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,l;const s=t.control.name;if(["email","first_name","last_name"].includes(s))return s.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=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===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(l=t.control)||void 0===l?void 0:l.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===Ee);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:It.REQUEST}).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.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then(()=>{this.attachHandlers()});const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}xe._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=xe._resolveTogglableStyles(e[t]))}),e},xe._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 ke=xe,Me=Symbol("required");var De=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 i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function je(){}const Ue="pending",Be="valid",Ve="invalid";class Fe extends ke{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=De(t,["element"]),i=this.getProps(),r=this.getModel(),l=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),s=this.getAutofillValue();void 0!==s&&(l.defaultValue=s);const a=this.services.form,c=[l,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==s&&d.getValue()===s&&this._validateAutofilledValue(d),d},this._validateAutofilledValue=t=>{t.validate({silent:!0}).then(e=>{e||t.markAsTouched(),this.syncAutofillContextRecord(e,t.getValue())})},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=je,invalidCallback:r=je,pendingCallback:l=je,elementToListen:s=n,validationMap:a={},listenStatusChange:c=!0}=e,d=De(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,u=(null==p?void 0:p.validator)?a[p.validator]:void 0,h=t.some(t=>t[Me]),g=!!(null==p?void 0:p.required),m=g||h,b=[...t];g&&!h&&b.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[Me]=!0,e}()),u&&b.push(u);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:m}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:s,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:l},d)),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=Ue;switch(!0){case n.control.pending:t=Ue;break;case n.control.valid:t=Be;break;default:t=Ve}this._handleValidationStatus(n,t)})},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:l,errorMessageMapper:s,pendingCallback:a}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Be:(function(t,e){t&&(t.classList.remove("invalid"),t.setAttribute("aria-invalid","false")),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case Ve:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=bt(e,mt(t));if(!o)return n;const i=o.translations,r=Object.keys(i).find(t=>t.includes(n));return r?i[r]:n}(c,d,e);s&&(r=s(e,r)),function(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${ht}`))return;const e=document.createElement("style");e.setAttribute("id",ht),J({element:e,html:gt}),t.head.appendChild(e)})(o),i=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(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=lt(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),Y(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${ht}`);e&&e.remove()}(o))})}(o,i,r,this.htmlDocumentObject),l&&l()}break;case Ue:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t&&t.classList.contains("invalid")&&(t.classList.remove("invalid"),t.removeAttribute("aria-invalid"))}(o,i),a&&a())}}}}function We(t){return Object.values(Te).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const Ge={name:"SysDropdownInputComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["SELECT"],contextMenuModel:We([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:We([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:We([{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{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:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{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}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{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"]}}]},focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title","content,placeholder":"Choose an option"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок","content,placeholder":"Выберите опцию"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок","content,placeholder":"Оберіть опцію"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título","content,placeholder":"Escoja una opción"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel","content,placeholder":"Wählen Sie eine Option."},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre","content,placeholder":"Choisissez une option"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo","content,placeholder":"Scegli un'opzione"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título","content,placeholder":"Alege o opțiune"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu","content,placeholder":"Alege o opțiune"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие","content,placeholder":"Изберете опция"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul","content,placeholder":"Vyberte si možnost"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος","content,placeholder":"Διαλέξτε μια επιλογή"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel","content,placeholder":"Kies een optie"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł","content,placeholder":"Wybierz opcję"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł","content,placeholder":"Välj ett alternativ"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık","content,placeholder":"Bir seçenek belirleyin"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان","content,placeholder":"اختر خيارًا"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title","content,placeholder":"选择一项"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel","content,placeholder":"Vælg en mulighed"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","content,label":"Title","content,placeholder":"בחרו חלופה"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title","content,placeholder":"Valitse vaihtoehto"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title","content,placeholder":"एक विकल्प चुनें"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title","content,placeholder":"Odaberite opciju"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title","content,placeholder":"Válasszon egy opciót"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title","content,placeholder":"Pilih satu opsi"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title","content,placeholder":"オプションを選択"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title","content,placeholder":"옵션 선택"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title","content,placeholder":"Velg et alternativ"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title","content,placeholder":"Vyberte si možnosť"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title","content,placeholder":"Izberite možnost"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title","content,placeholder":"Izaberite opciju"}},props:{content:{label:"Title",placeholder:"Choose an option",textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"dropdown",integrationName:"dropdown",defaultValue:null,hoverColor:"rgba(0, 0, 0, 0)",selectedColor:"rgba(0, 0, 0, 0)",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",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:(He=[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"35px",minHeight:"35px",color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],Object.values(Te).reduce((t,e)=>Object.assign(t,{[e]:Ce(He)}),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysDropdownInputComponent/assets/img/component-icon.svg",label:{en:"Dropdown",ru:"Выпадающий список",uk:"Випадаючий список",es:"Desplegable",fr:"Menu déroulant",de:"Dropdown",it:"A tendina",pt:"Suspenso",ro:"Derulantă",bg:"Падащо меню",cs:"Rozevírací seznam",el:"Αναπτυσσόμενη λίστα",nl:"Vervolgkeuzelijst",pl:"Lista rozwijana",sv:"Rullgardin",tr:"Açılır",ar:"القائمة المنسدلة",zh:"下拉菜单",da:"Dropdown",he:"רשימה נפתחת",fi:"Pudotus",hi:"ड्रॉपडाउन",hr:"Padajući izbornik",hu:"Legördülő menü",id:"tarik-turun",ja:"ドロップダウン",ko:"드롭다운",no:"Nedtrekk",sk:"Rozbaľovacia ponuka",sl:"Spustni meni",sr:"Padajući meni"}},syncEnabled:!0,stylesImitationEnabled:!0,showComponentOptionsPropertyPaneOnInsert:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};var He;function $e(t){setTimeout(t,50)}function ze(t){return ze="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},ze(t)}function Ke(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 Qe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ke(Object(n),!0).forEach(function(e){on(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function qe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,r,l,s=[],a=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=r.call(n)).done)&&(s.push(o.value),s.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Xe(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)?Xe(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(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 Ze(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,rn(o.key),o)}}function Je(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Je=function(){return!!t})()}function Ye(t,e,n,o){var i=tn(en(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function tn(){return tn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=en(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},tn.apply(null,arguments)}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}function nn(t,e){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nn(t,e)}function on(t,e,n){return(e=rn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rn(t){var e=function(t){if("object"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}var ln=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),on(e=function(t,e,n){return e=en(e),function(t,e){if(e&&("object"==ze(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,Je()?Reflect.construct(e,n||[],en(t).constructor):e.apply(t,n))}(this,t),"registerControl",function(t){e.registeredControl=e.createControlWithValidation()}),on(e,"getOptions",function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=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],[i,r])=>function(t,e,n,o=!1){let i=t[n],r=e[n];return isNaN(i)||isNaN(r)?"string"!=typeof i||"string"!=typeof r?0:(i=i.toLowerCase(),r=r.toLowerCase(),o?r.localeCompare(i):i.localeCompare(r)):i<r?o?1:-1:i>r?o?-1:1:0}(o,r,e,n)))}(e.filterOptionsBySearchValue(e.getProps().control.options,n),o)}),on(e,"filterOptionsBySearchValue",function(t,e){if(!e.trim())return t;var n=e.trim().toLowerCase(),o=[];return 1===n.length?(o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label[0].toLowerCase()===n})).length||(o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label.toLowerCase().includes(n)})):o=Object.entries(t).filter(function(t){var e=qe(t,2);return e[0],e[1].label.toLowerCase().includes(n)}),Object.fromEntries(o)}),on(e,"createDropdownButtonMenuButtonComponent",function(t,n,o,i){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=document.createElement("div");l.classList.add("option-wrapper"),l.dataset.selectable=String(r),r&&(l.setAttribute("role","option"),l.setAttribute("aria-selected",n?"true":"false"),null!=t.id&&(l.id=e.getOptionId(t.id)));var s=document.createElement("span");return s.textContent=t.label,Y(s,o),n&&(l.style.backgroundColor=ut(i)),l.appendChild(s),l}),on(e,"setDropdownInputText",function(t){var n,o,i=e.getElement("input"),r=(null===(n=e.registeredControl)||void 0===n?void 0:n.getValue())||null;t.hasOwnProperty(null==r?void 0:r.id)&&(o=t[r.id]),i.value=o?o.label:""}),on(e,"createOverlayContent",function(n,o,i,r){var l,s=e.getElement("input"),a=tt(s,t.dropdownMenuOptionLabelStyles),c=tt(s,t.overlayContentStyles);c.background=pt(c.background,a.color),Y(o,Qe(Qe({},c),{},{"border-top-left-radius":"".concat(4,"px"),"border-top-right-radius":"".concat(4,"px"),"border-bottom-left-radius":"".concat(4,"px"),"border-bottom-right-radius":"".concat(4,"px")}));var d=(null===(l=e.registeredControl)||void 0===l?void 0:l.getValue())||null,p=document.createElement("div");e.overlayOptions=[],Object.entries(i).forEach(function(t,o){var r=qe(t,1)[0],l=i[r],s=(null==d?void 0:d.id)===r,u=e.createDropdownButtonMenuButtonComponent(l,s,a,c.background);u.addEventListener("click",function(){e.selectOption(r,l,n)}),u.addEventListener("mouseenter",function(){e.setActiveOption(o,!1)}),p.appendChild(u),e.overlayOptions.push({id:r,option:l,element:u})});var u=Object.keys(i).length;if(!u){var h={exportId:null,id:null,sort:0,label:e.getTranslationsMap(t.NO_MATCHES_OPTION).translations},g=e.createDropdownButtonMenuButtonComponent(h,!1,a,c.background,!1);p.appendChild(g)}o.appendChild(p),e.setInitialActiveOption();var m=Object.keys(r).length;if(u>0&&m>u){var b=Object.keys(r).filter(function(t){return!i.hasOwnProperty(t)}).reduce(function(t,n){var o=r[n],i=e.createDropdownButtonMenuButtonComponent(o,!1,a,c.background);i.style.visibility="hidden",p.appendChild(i);var l=parseFloat(i.getBoundingClientRect().height);return p.removeChild(i),t+l},0);Y(o,{"margin-bottom":"".concat(b,"px")})}}),on(e,"getOverlayStyles",function(){var n=rt(),o=e.getElement("input"),i=pt(tt(o,t.overlayContentStyles).background,tt(o,t.dropdownMenuOptionLabelStyles).color);return"\n .".concat(n," {\n max-height: 380px;\n box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);\n border-radius: 4px;\n padding: 5px 0;\n overflow: auto;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n }\n \n .").concat(n,"::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n background-color: transparent;\n }\n \n .").concat(n,"::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #848484;\n }\n \n .option-wrapper {\n border: 0;\n align-items: center;\n font-size: 16px;\n padding: 10px 20px;\n outline: 0;\n cursor: pointer;\n text-align: left;\n }\n\n .option-wrapper.option-active,\n .option-wrapper:hover {\n background-color: ").concat(ut(i),";\n }\n ")}),on(e,"createOverlay",function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selected";e.overlayBackdrop&&e.overlayBackdrop.click();var o=e.getElement("input");o.setAttribute("aria-expanded","true"),o.setAttribute("aria-controls",e.overlayListboxId),e.navigationHint=n;var i=function(t){const{triggerElement:e,overlayStyles:n,createOverlayContent:o,overlayWidth:i,overlayHeight:r,offset:l,onDestroy:s,positionByDefault:a,isHorizontallyCentered:c,isBackdropDisabledOnUI:d}=t,p=t.htmlDocumentObject||document,u=function(t){const e=document.createElement("div");return e.style.position="fixed",e.style.zIndex=String(Number.MAX_SAFE_INTEGER-1),e.style.top="0",e.style.left="0",e.style.width=t?"0px":"100%",e.style.height=t?"0px":"100%",e}(d),h=document.createElement("div");h.style.position="fixed",h.style.display="block",h.style.zIndex=String(Number.MAX_SAFE_INTEGER),i&&(h.style.width=`${i}px`),r&&(h.style.height=`${r}px`);const g=h.attachShadow({mode:"open"}),m=document.createElement("style");J({element:m,html:n}),g.append(m);const b=document.createElement("div");b.classList.add(rt()),p.body.append(u),p.body.append(h),g.append(b),o(u,b),(()=>{const t=lt(e,b,function(t){return null!=t?t:5}(l),a,c,p);(function(t,e){t.setAttribute("cl-overlay-position",e)})(b,t.position),Y(h,t.coordinates)})(),h.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault()});const v=t=>{u.remove(),h.remove(),s&&s(),window.removeEventListener("keyup",t,!0)},f=t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),v(f))};return u.addEventListener("click",()=>v(f)),window.addEventListener("keyup",f,!0),{backdrop:u,overlay:h}}({triggerElement:o,overlayStyles:e.getOverlayStyles(),createOverlayContent:function(n,o){o.setAttribute("role","listbox"),o.id=e.overlayListboxId,o.addEventListener("keydown",e.handleOverlayKeydown),e.overlayContentElement=o,e.createOverlayContent(n,o,t,e.getProps().control.options)},overlayWidth:o.getBoundingClientRect().width,onDestroy:function(){e.overlayBackdrop=null,e.overlayContentElement=null,e.overlayOptions=[],e.activeOptionIndex=-1,o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-controls"),o.removeAttribute("aria-activedescendant")},positionByDefault:"bottom",htmlDocumentObject:e.htmlDocumentObject});e.overlayBackdrop=i.backdrop,e.overlayBackdrop.addEventListener("click",function(t){t.isTrusted&&e.setDropdownInputText(e.getProps().control.options)})}),on(e,"applyTriggerAriaLabel",function(){var n=e.getElement("input");if(n&&!n.hasAttribute("aria-label")){var o=e.getTranslationsMap(t.SELECT_OPTION).translations;n.setAttribute("aria-label",o)}}),on(e,"setPlaceholder",function(n,o){var i=e.getElement("input"),r=Ae(n,o,e.getShared());e.getRootElement().querySelector("#cl-dropdown-styles").textContent=t.componentStyle({placeholderColor:r});var l=n.content.placeholder||e.getTranslationsMap(t.DEFAULT_PLACEHOLDER_VALUE).translations;i.setAttribute("placeholder",l)}),on(e,"setArrowIconStyles",function(t,n){var o=e.getRootElement(),i=Ae(t,n,e.getShared()),r=o.querySelector(".dropdown-input-select-button");r&&(r.style.color=i)}),on(e,"configInputEventListeners",function(){e.getElement("input").addEventListener("keydown",e.handleInputKeydown)}),on(e,"updateInputMode",function(){var t=e.getElement("input");if(t){if(t.removeEventListener("input",e.handleSearchInput),Object.values(e.getOptions()).length<e.enableSearchOptionsCount)return t.setAttribute("readonly","readonly"),t.setAttribute("aria-autocomplete","none"),void t.setAttribute("aria-readonly","true");t.removeAttribute("readonly"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-readonly","false"),t.addEventListener("input",e.handleSearchInput)}}),on(e,"handleTriggerClick",function(){$e(function(){return e.createOverlay(e.getOptions())})}),on(e,"handleSearchInput",function(t){var n=t.target;$e(function(){return e.createOverlay(e.getOptions(n.value),"first")})}),on(e,"handleInputKeydown",function(t){var n=e.getElement("input").hasAttribute("readonly"),o=!!e.overlayBackdrop;switch(t.key){case"ArrowDown":t.preventDefault(),o?e.moveActiveOption(1):e.createOverlay(e.getOptions(),"first");break;case"ArrowUp":t.preventDefault(),o?e.moveActiveOption(-1):e.createOverlay(e.getOptions(),"last");break;case"Enter":o?(t.preventDefault(),e.selectActiveOption()):(t.preventDefault(),e.createOverlay(e.getOptions()));break;case" ":case"Spacebar":n&&(t.preventDefault(),o?e.selectActiveOption():e.createOverlay(e.getOptions()));break;case"Home":o&&n&&(t.preventDefault(),e.setActiveOption(0));break;case"End":o&&n&&(t.preventDefault(),e.setActiveOption(e.overlayOptions.length-1));break;case"Escape":var i;o&&(t.preventDefault(),null===(i=t.stopPropagation)||void 0===i||i.call(t),e.armEscapeKeyupGuard(),e.closeOverlay(!0));break;case"Tab":o&&e.closeOverlay(!0)}}),on(e,"handleOverlayKeydown",function(t){var n;"Escape"===t.key&&e.overlayBackdrop&&(null===(n=t.stopPropagation)||void 0===n||n.call(t),e.armEscapeKeyupGuard(),e.closeOverlay(!0))}),on(e,"armEscapeKeyupGuard",function(){e.removeEscapeKeyupGuard(),e.boundEscapeKeyupGuard=function(t){var n,o;"Escape"===t.key&&(null===(n=t.preventDefault)||void 0===n||n.call(t),null===(o=t.stopImmediatePropagation)||void 0===o||o.call(t),e.removeEscapeKeyupGuard())},window.addEventListener("keyup",e.boundEscapeKeyupGuard,!0)}),on(e,"removeEscapeKeyupGuard",function(){e.boundEscapeKeyupGuard&&(window.removeEventListener("keyup",e.boundEscapeKeyupGuard,!0),e.boundEscapeKeyupGuard=null)}),on(e,"closeOverlay",function(){var t;arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&e.setDropdownInputText(e.getProps().control.options),null===(t=e.overlayBackdrop)||void 0===t||t.click()}),on(e,"moveActiveOption",function(t){if(e.overlayOptions.length){var n=e.activeOptionIndex<0?t>0?0:e.overlayOptions.length-1:Math.max(0,Math.min(e.activeOptionIndex+t,e.overlayOptions.length-1));e.setActiveOption(n)}}),on(e,"setInitialActiveOption",function(){var t;if(e.overlayOptions.length)if("first"!==e.navigationHint)if("last"!==e.navigationHint){var n=null===(t=e.registeredControl)||void 0===t||null===(t=t.getValue())||void 0===t?void 0:t.id,o=e.overlayOptions.findIndex(function(t){return t.id===n});e.setActiveOption(o>=0?o:0,!1)}else e.setActiveOption(e.overlayOptions.length-1,!1);else e.setActiveOption(0,!1);else e.getElement("input").removeAttribute("aria-activedescendant")}),on(e,"setActiveOption",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.overlayOptions.length){e.activeOptionIndex=Math.max(0,Math.min(t,e.overlayOptions.length-1)),e.overlayOptions.forEach(function(t,n){t.element.classList.toggle("option-active",n===e.activeOptionIndex)});var o=e.overlayOptions[e.activeOptionIndex];e.getElement("input").setAttribute("aria-activedescendant",o.element.id),n&&o.element.scrollIntoView({block:"nearest"})}}),on(e,"selectActiveOption",function(){if(!(e.activeOptionIndex<0)){var t=e.overlayOptions[e.activeOptionIndex];e.selectOption(t.id,t.option,e.overlayBackdrop)}}),on(e,"selectOption",function(t,n,o){var i={id:t,exportId:n.exportId},r=e.getElement("input");e.registeredControl.setValue(i),r.value=n.label,o.click(),r.focus()}),on(e,"getOptionId",function(t){return"cl-dropdown-option-".concat(String(t).replace(/[^a-zA-Z0-9_-]/g,"-"))}),on(e,"manifest",Ge),on(e,"registeredControl",void 0),on(e,"overlayBackdrop",void 0),on(e,"overlayContentElement",null),on(e,"overlayOptions",[]),on(e,"activeOptionIndex",-1),on(e,"enableSearchOptionsCount",5),on(e,"overlayListboxId","cl-dropdown-listbox-".concat(Math.random().toString(36).slice(2,11))),on(e,"navigationHint","selected"),on(e,"boundEscapeKeyupGuard",null),e.handleTriggerClick=e.handleTriggerClick.bind(e),e.handleInputKeydown=e.handleInputKeydown.bind(e),e.handleSearchInput=e.handleSearchInput.bind(e),e.handleOverlayKeydown=e.handleOverlayKeydown.bind(e),e.getRootElement().innerHTML='\n <style id="cl-dropdown-styles">'.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&&nn(t,e)}(t,Fe),function(t,e){return e&&Ze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Ye(t,"connectedCallback",this,3)([]);var n=this.getRootElement(),o=this.getProps();this.registerControl(n),this.setPlaceholder(o,this.getEnvironment()),this.setDropdownInputText(this.getOptions()),this.applyTriggerAriaLabel(),this.updateInputMode(),this.observeProps(function(t,o){var i,r=e.getEnvironment();e.applyAutoAdaptiveStyles(o.adaptiveStyles,o.styles),nt(o,r,n,".label-with-dropdown-input-container"),ot(o,r,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setPlaceholder(o,r),e.setDropdownInputText(e.getOptions()),e.setArrowIconStyles(o,r),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=it(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=it(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=it(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=it(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("input")),e.getElement("input").setAttribute("aria-required",String(!(null===(i=o.control)||void 0===i||null===(i=i.validation)||void 0===i||!i.required))),e.updateInputMode()}),this.observeShared(function(){e.setPlaceholder(e.getProps(),e.getEnvironment()),e.setArrowIconStyles(e.getProps(),e.getEnvironment()),e.updateInputMode()}),this.observeEnvironment(function(t,o){var i=e.getProps();nt(i,o,n,".label-with-dropdown-input-container"),ot(i,o,e.getHostElement(),e.getElement("input"),e.getElement("label")),e.setPlaceholder(i,o),e.setArrowIconStyles(i,o)}),n.querySelector(".dropdown-input-with-tooltip").addEventListener("click",this.handleTriggerClick),this.configInputEventListeners()}},{key:"disconnectedCallback",value:function(){var e;Ye(t,"disconnectedCallback",this,3)([]),this.removeEscapeKeyupGuard();var n=this.getElement("input");null==n||n.removeEventListener("keydown",this.handleInputKeydown),null==n||n.removeEventListener("input",this.handleSearchInput),null===(e=this.getRootElement().querySelector(".dropdown-input-with-tooltip"))||void 0===e||e.removeEventListener("click",this.handleTriggerClick)}}])}();on(ln,"define",{name:"sys-dropdown-input",model:Ge.name,manifest:Ge}),on(ln,"DEFAULT_PLACEHOLDER_VALUE",{en:"Choose an option",ru:"Выберите опцию",uk:"Оберіть опцію",es:"Escoja una opción",de:"Wählen Sie eine Option",fr:"Choisissez une option",it:"Scegli un'opzione",pt:"Escolha uma opção",ro:"Alegeți o opțiune",bg:"Изберете опция",cs:"Vyberte si možnost",el:"Διαλέξτε μια επιλογή",nl:"Kies een optie",pl:"Wybierz opcję",sv:"Välj ett alternativ",tr:"Bir seçenek belirleyin",ar:"اختر خيارًا"}),on(ln,"NO_MATCHES_OPTION",{en:"No matches",ru:"Нет совпадений",uk:"Збігів немає",es:"No matches",de:"No matches",fr:"No matches",it:"No matches",pt:"No matches",ro:"No matches",bg:"No matches",cs:"No matches",el:"No matches",nl:"No matches",pl:"No matches",sv:"No matches",tr:"No matches",ar:"No matches"}),on(ln,"SELECT_OPTION",{en:"Select option",ru:"Выберите опцию",uk:"Оберіть опцію",es:"Seleccionar opción",de:"Option auswählen",fr:"Sélectionner une option",it:"Seleziona opzione",pt:"Selecionar opção",ro:"Selectați opțiunea",bg:"Изберете опция",cs:"Vyberte možnost",el:"Επιλέξτε επιλογή",nl:"Selecteer optie",pl:"Wybierz opcję",sv:"Välj alternativ",tr:"Seçenek seçin",ar:"حدد خيارًا",zh:"选择选项",da:"Vælg en mulighed",he:"בחר אפשרות",fi:"Valitse vaihtoehto",hi:"विकल्प चुनें",hr:"Odaberite opciju",hu:"Válasszon opciót",id:"Pilih opsi",ja:"オプションを選択",ko:"옵션 선택",no:"Velg et alternativ",sk:"Vyberte možnosť",sl:"Izberite možnost",sr:"Izaberite opciju"}),on(ln,"overlayContentStyles",["background","border-style","border-top-width","border-top-color","border-bottom-width","border-bottom-color","border-left-width","border-left-color","border-right-width","border-right-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"]),on(ln,"dropdownMenuOptionLabelStyles",["color","font-family","font-size","letter-spacing","text-shadow","font-weight","line-height","text-align"]),on(ln,"componentStyle",function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).placeholderColor||"#808080";return"\n .main-container {\n height: 100%;\n }\n \n .label-with-dropdown-input-container {\n height: 100%;\n display: flex;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .dropdown-input-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 .input-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 .dropdown-label {\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n padding: 0 35px 0 20px;\n cursor: pointer;\n }\n \n .dropdown-label::placeholder {\n color: ".concat(t,";\n }\n \n .dropdown-input-select-button {\n background: transparent;\n border: none;\n min-width: max-content;\n width: 24px;\n height: 100%;\n display: flex;\n align-items: center;\n margin-right: 5px;\n position: absolute;\n right: 0;\n z-index: 2;\n }\n \n button.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n }\n")}),on(ln,"componentTemplate",'\n <div class="main-container">\n <div class="label-with-dropdown-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-dropdown-label">\n </div>\n <div class="dropdown-input-with-tooltip">\n <div class="dropdown-input-select-button" aria-hidden="true">\n <svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M10.5248 1.90196L9.57381 2.71322L6.05712 5.71322L5.24395 6.40691L4.4324 5.71132L0.949088 2.72576L0 1.91229L1.62694 0.0141139L2.57603 0.827583L5.24778 3.11756L7.9513 0.811257L8.90228 0L10.5248 1.90196Z"\n fill="currentColor"/>\n </svg>\n </div>\n \x3c!--"one-time-code" disables autofill in chromium--\x3e\n <input cl-element="input"\n class="dropdown-label"\n role="combobox"\n aria-haspopup="listbox"\n aria-autocomplete="none"\n aria-expanded="false"\n aria-labelledby="cl-dropdown-label"\n name="cl-dropdown-no-autofill"\n autocomplete="one-time-code"\n placeholder="placeholder"/>\n <div class="input-tooltip" aria-hidden="true">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\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');export{ln as default};window.clComponentClass_SysDropdownInputComponent=ln;
|