@claspo/components 1.10.11 → 1.10.12-socialinapp

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.
@@ -1 +1 @@
1
- const t="validationStatusChanged",e="touchedStatusChanged";class n{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 o=[];for(var i in{transparent:"#0000"})o.push(i);var r="\\s*([.\\d%]+)\\s*",s="\\("+[r,r,r]+"(?:,\\s*([.\\d]+)\\s*)?\\)",l="(?:rgb)a?",a="("+o.join("|")+")";function c(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(l+s,"i"),RegExp([a,"(?:#([a-f0-9]{3,8}))",l+s,"(?:hsl)a?"+s].join("|"),"gi");var d=Array.prototype.concat,u=Array.prototype.slice,h=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];c(i)?e=d.call(e,u.call(i)):e.push(i)}return e};h.wrap=function(t){return function(){return t(h(arguments))}};const p=h;var m={},g=Object.hasOwnProperty,b=Object.create(null);for(var f in m)g.call(m,f)&&(b[m[f]]=f);var E={to:{},get:{}};function v(t,e,n){return Math.min(Math.max(e,t),n)}E.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=E.get.hsl(t),n="hsl"):(e=E.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},E.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]:g.call(m,e[1])?((i=m[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]=v(i[n],0,255);return i[3]=v(i[3],0,1),i},E.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,v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}return null},E.to.rgb=function(){var t=p(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]+")"},E.to.hsl=function(){var t=p(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 y=E,O={},T={};for(const t of Object.keys(O))T[O[t]]=t;const S={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(S)){if(!("channels"in S[t]))throw new Error("missing channels property: "+t);if(!("labels"in S[t]))throw new Error("missing channel labels property: "+t);if(S[t].labels.length!==S[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=S[t];delete S[t].channels,delete S[t].labels,Object.defineProperty(S[t],"channels",{value:e}),Object.defineProperty(S[t],"labels",{value:n})}S.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),s=r-i;let l,a;r===i?l=0:e===r?l=(n-o)/s:n===r?l=2+(o-e)/s:o===r&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[l,100*a,100*c]},S.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const l=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--,s=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,a[t]=255*s;return a};const C=S;function A(t,e){return function(n){return e(t(n))}}function R(t,e){const n=[e[t].parent,t];let o=C[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=A(C[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const _={};Object.keys(C).forEach(t=>{_[t]={},Object.defineProperty(_[t],"channels",{value:C[t].channels}),Object.defineProperty(_[t],"labels",{value:C[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(C);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(C[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],s=e[i];-1===s.distance&&(s.distance=e[t].distance+1,s.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]=R(t,e))}return n}(t);Object.keys(e).forEach(n=>{const o=e[n];_[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),_[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 I=_,N=["keyword","gray","hex"],P={};for(const t of Object.keys(I))P[[...I[t].labels].sort().join("")]=t;const L={};function x(t,e){if(!(this instanceof x))return new x(t,e);if(e&&e in N&&(e=null),e&&!(e in I))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 x)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=y.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=I[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=I[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=D(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 P))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=P[o];const{labels:i}=I[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=D(r)}if(L[this.model])for(o=I[this.model].channels,n=0;n<o;n++){const t=L[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)}x.prototype={toString(){return this.string()},string(t){let e=this.model in y.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return y.to[e.model](n)},round(t){return t=Math.max(t||0,0),new x([...this.color.map(M(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new x([...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(I)){if(N.includes(t))continue;const{channels:e}=I[t];x.prototype[t]=function(...e){return this.model===t?new x(this):e.length>0?new x(e,t):new x([...w(I[this.model][t].raw(this.color)),this.valpha],t)},x[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=D(n,e)),new x(o,t)}}function M(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function w(t){return Array.isArray(t)?t:[t]}function D(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}function U(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function k(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(s,10),height:n+parseInt(i,10)+parseInt(o,10)}}function j(t,e,n,o,i){switch(t.position){case"top":return{left:`${B(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${B(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:`${V(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${V(0,t)}px`}}}function B(t,e,o,i){let r=o?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>n.width(i)&&(r-=r+e.width-n.width(i)),r}function V(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function W(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}const F="cl-tooltip-text-styles",H=`\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 G(t,e,o,i){i=i||document;let r=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(`#${F}`))return;const e=document.createElement("style");e.setAttribute("id",F),W({element:e,html:H}),t.head.appendChild(e)})(i),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(o),i.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:o,offset:i=10,htmlDocumentObject:r}=t,s=function(t,e,o,i,r,s){const l=function(t,e,o,i,r){const s=function(t,e,o,i){const r=n.width(i),{right:s}=t.getBoundingClientRect(),l=r-o-s-n.scrollbarWidth(i);return{horizontalOffset:o,contentWidth:k(e).width,availableSpaceToTheLeftSideOfTheTrigger:s-o,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,o,r),l=function(t,e,o,i){const r=n.height(i),{top:s,bottom:l}=t.getBoundingClientRect();return{verticalOffset:o,contentHeight:k(e).height,availableSpaceAboveTriggerElem:s-o,availableSpaceBelowTriggerElem:r-l-o}}(t,e,o,r);let a="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:s.availableSpaceToTheRightSideOfTheTrigger>=s.contentWidth,left:s.availableSpaceToTheLeftSideOfTheTrigger>=s.contentWidth};if(c.top?a="top":c.bottom?a="bottom":c.right?a="right":c.left&&(a="left"),i&&c[i]&&(a=i),"undefined"===a){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,s.availableSpaceToTheRightSideOfTheTrigger,s.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?a="bottom":t===l.availableSpaceAboveTriggerElem?a="top":t===s.availableSpaceToTheRightSideOfTheTrigger?a="right":t===s.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},l),s),{position:a})}(t,e,o,i,s=s||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)U(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),U(e,{"margin-bottom":"0px"});else if("bottom"===t.position)U(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),U(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";U(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:j(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,s),position:l.position}}(e,o,i,"top",!0,r);o.setAttribute("cl-tooltip-position",s.position),U(o,s.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:i})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${F}`);e&&e.remove()}(i))})}function $(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function Q(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 z="cl-";function K(t){return z+t}function q(t){return"cl-"+t}const X="VIEW",J="MODULE",Y="CONTAINER",Z="INPUT",tt="BUTTON",et="CONSENT",nt="COLUMN";var ot,it;(it=ot||(ot={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",it.REQUEST="REQUEST",it.DISPATCH_EVENT="DISPATCH_EVENT",it.GO_TO_VIEW="GO_TO_VIEW",it.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",it.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",it.SHOW_WIDGET="SHOW_WIDGET",it.OPEN_LINK="OPEN_LINK",it.CLOSE_WIDGET="CLOSE_WIDGET",it.CLICK="CLICK";const rt=ot;var st,lt;class at{static sortActions(t){const e={[rt.CLOSE_WIDGET]:-1,[rt.OPEN_LINK]:-2,[rt.SHOW_WIDGET]:1,[rt.SUBSCRIBE_CONTACT]:2,[rt.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=at.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(q("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(q("type")));let n=0;for(;e[n]&&e[n].getAttribute(q("id"))!==i;){let t=e[n].getAttribute(q("type"));if(at.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,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise(function(o,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 s.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=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(t=>{t.removeEventListener("click",this.listener)}),this.targetElements=[])}}at.IGNORING_VIEW_ENTRY_TYPES=[tt,et,Z],(lt=st||(st={})).CLICK="CLICK",lt.COMPONENT_EVENT="COMPONENT_EVENT";class ct{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(q("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 dt{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 st.CLICK:return new at(t,e);case st.COMPONENT_EVENT:return new ct(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class ut{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 ht{constructor(){this.listeners=ht.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=ut.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=ht.createDefaultListenersState()}}ht.createDefaultListenersState=()=>({"*":{}});const pt=ht,mt=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class gt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class bt{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===J?Object.assign(Object.assign({},t),bt.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 ft,Et,vt,yt,Ot,Tt,St,Ct,At,Rt,_t,It,Nt,Pt,Lt;bt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Et=ft||(ft={})).VIEW="VIEW",Et.CONTAINER="CONTAINER",Et.TEXT="TEXT",Et.INPUT="INPUT",Et.BUTTON="BUTTON",Et.IMAGE="IMAGE",Et.CONSENT="CONSENT",Et.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Et.PROMO_CODE="PROMO_CODE",Et.MULTIPLE_INPUT="MULTIPLE_INPUT",Et.VIDEO="VIDEO",Et.SLIDER="SLIDER",Et.SLIDE="SLIDE",Et.SOCIAL="SOCIAL",Et.COLUMNS="COLUMNS",Et.COLUMN="COLUMN",Et.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"}(yt||(yt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Ot||(Ot={})),(Tt||(Tt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(St||(St={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Ct||(Ct={})),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"}(At||(At={})),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"}(Rt||(Rt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(_t||(_t={})),(Nt=It||(It={})).BEFORE="BEFORE",Nt.AFTER="AFTER",Nt.INSIDE="INSIDE",Nt.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"}(Pt||(Pt={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(Lt||(Lt={})),yt.REQUEST,yt.SUBSCRIBE_CONTACT;class xt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Mt extends pt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(Mt.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(Mt.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Mt.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Mt.changeEventName="CHANGE";const wt=Mt;class Dt{static set(t,e){const n=t[Dt.accumulatorPropertyName]||{};t[Dt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Dt.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}Dt.accumulatorPropertyName="clStyleAttributes";const Ut=Dt;var kt;!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"}(kt||(kt={}));class jt{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=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);l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==X&&t!==Y&&t!==nt||(e.style.display=o===kt.CONTENT_LOCKER&&t===X?"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 Bt{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,s,l;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===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(d);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})}),Promise.all([...this.envUrlMaps[t].entries()].map(([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;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),xt.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 Vt=new class{execute(t,e="GET",n=null,o,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 Wt(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class Ft{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 Ht{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 Gt;!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"}(Gt||(Gt={}));const $t=Gt;class Qt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit($t.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit($t.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 Ht(this.onCounterStateUpdate)}}}const zt=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>zt(...t)}},Kt=zt,qt="props",Xt="shared",Jt="environment";function Yt(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===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const Zt="SUBMIT";function te(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 ee={DESKTOP:"desktop",MOBILE:"mobile"};function ne(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)}const oe=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class ie extends oe{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var re,se,le;function ae(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"}(re||(re={})),(le=se||(se={})).STATIC="STATIC",le.DATA_LAYER="DATA_LAYER",le.URL_QUERY_PARAMS="URL_QUERY_PARAMS",le.JS_API_VARIABLE="JS_API_VARIABLE",le.COOKIE="COOKIE",le.LOCAL_STORAGE="LOCAL_STORAGE";class ce{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")===re.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===se.STATIC)return ae(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return ae("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 de extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(q("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${q("widget-id")}]`);let i;o&&(i=o.getAttribute(q("widget-id")));let r=new ie("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(q("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=Kt(qt,Xt,Jt),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 gt({}),this.componentEventEmitter=new pt,this.componentResourceManager=new Qt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new dt(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(qt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=q("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(Xt).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Bt(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),Vt),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(wt.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Jt).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")===re.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===re.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(qt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Xt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Jt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${q("element")}]`)).filter(t=>!t.hasAttribute(q("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(q("element"))===t&&n.id===e:n.getAttribute(q("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&&(te(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(te(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),i=q("type"),r="element-styles";let s=this.getRootElement().querySelector(`style[${i}="${r}"]`);s||(s=document.createElement("style"),s.setAttribute(i,r),this.getRootElement().appendChild(s)),W({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(q("element"));const n=this.getEnvironment();let i=ne(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=ne(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),s)}}),this._addLinkColor(s,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const r=[];"host"===(e=de._resolveTogglableStylesForElementModel(e)).element&&(jt.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],mt(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),mt(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const a=Object.assign(Object.assign({},e),{styleAttributes:Wt(e.styleAttributes,r)});if(Ut.set(t,a),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)),W({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(.${q("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 n=t;return(n.classes||"").split(" ").filter(t=>t.startsWith(z)).forEach(t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[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})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))}),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce((t,e)=>t+` ${Ft.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`,"");W({element:t,html:`[${q("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{W({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&W({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)&&W({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)&&W({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!==K("hovered")&&t!==K("focused")).forEach(e=>{e.startsWith(z)&&t.classList.remove(e)});const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>Yt(this.parentNode,q("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(q("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:Yt(this.parentNode,q("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>$(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>Q(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 ce(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,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(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===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find(t=>t.category===Zt);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:rt.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()}}de._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=de._resolveTogglableStyles(e[t]))}),e},de._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 ue=de,he=Symbol("required");var pe=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 me(){}const ge="pending",be="valid",fe="invalid";class Ee extends ue{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=pe(t,["element"]),i=this.getProps(),r=this.getModel(),s=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),l=this.getAutofillValue();void 0!==l&&(s.defaultValue=l);const a=this.services.form,c=[s,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==l&&d.getValue()===l&&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=me,invalidCallback:r=me,pendingCallback:s=me,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=pe(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 u=this.getProps().control.validation,h=(null==u?void 0:u.validator)?a[u.validator]:void 0,p=t.some(t=>t[he]),m=!!(null==u?void 0:u.required),g=m||p,b=[...t];m&&!p&&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[he]=!0,e}()),h&&b.push(h);const f=this._prepareAsyncValidators(b),E=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:E,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:s},d)),E},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=ge;switch(!0){case n.control.pending:t=ge;break;case n.control.valid:t=be;break;default:t=fe}this._handleValidationStatus(n,t)})},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:s,errorMessageMapper:l,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 fe:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=Q(e,$(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);l&&(r=l(e,r)),G(o,i,r,this.htmlDocumentObject),s&&s()}break;case ge: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 ve(t){return Object.values(ee).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const ye={name:"SysChoiceButtonsComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],focusableElements:["label","button"],contextMenuModel:ve([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:ve([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:ve([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"button"},{element:"label"}]},{type:"CONTROL",name:"NUMBER_INPUT",element:"buttonsContainer",elementProp:"styleAttributes",elementSubProp:"gap",params:{label:"DOCUMENT_FLEX_GAP",validators:{min:0}},valueTransformers:[{name:"px"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","styleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","styleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"button",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"HOVER_ANIMATION",propPath:["styles","[element=button]","hoverStyleAttributes"]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{onlyColorSelection:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BACKGROUND"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BORDERS"}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{label:"i18n_DOCUMENT_SELECTED_BUTTON_SHADOW"}},{type:"CONTROL",name:"SWITCH",propPath:["content","labelEnabled"],params:{label:"DOCUMENT_SHOW_INPUT_LABELS",boldLabel:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"]}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!0,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"],actionParams:{getRelativeSelector:function(t){return'[option-id="'.concat(t,'"]')},getOptionIdFromRelativeSelector:function(t){var e,n;return null!==(e=null===(n=t.match(/option-id="([^"]+)"/))||void 0===n?void 0:n[1])&&void 0!==e?e:null},availableActions:["GO_TO_VIEW"]}}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!1,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}}]},i18nPropPaths:["content,label","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",labelEnabled:!1},control:{name:"choiceButtons",integrationName:"choiceButtons",defaultValue:null,multipleChoice:!1,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}},optionsAlphabeticSort:{enabled:!1},validation:{required:!0}},styles:[{element:"button",styleAttributes:{background:"rgb(0, 0, 0)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",boxShadow:"none"},hoverStyleAttributes:{background:"rgba(35, 35, 35, 1)",externalBackgroundUrlSource:!1,borderTopColor:"rgb(0, 0, 0)",borderBottomColor:"rgb(0, 0, 0)",borderLeftColor:"rgb(0, 0, 0)",borderRightColor:"rgb(0, 0, 0)",boxShadow:null},selectedStyleAttributes:{background:"rgba(35, 35, 35, 1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"2px",borderTopColor:"rgba(108, 108, 108, 1)",borderBottomWidth:"2px",borderBottomColor:"rgba(108, 108, 108, 1)",borderLeftWidth:"2px",borderLeftColor:"rgba(108, 108, 108, 1)",borderRightWidth:"2px",borderRightColor:"rgba(108, 108, 108, 1)",boxShadow:"none",externalBackgroundUrlSource:!1},hoverAnimationType:null}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{width:"230px",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0",minWidth:"230px"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"500",fontSize:"16px",textShadow:"none","--textDisplay":"inline",fontFamily:"Montserrat",letterSpacing:"0px",textTransform:"none"},classes:"cl-text-class-button"}],mobile:[{element:"host",styleAttributes:{width:"auto",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"16px",textShadow:"none","--textDisplay":"inline"},classes:"cl-text-class-button"}]}},metaDescription:{icon:"/SysChoiceButtonsComponent/assets/img/component-icon.svg",label:{en:"Choice",ru:"Один вариант",uk:"Один варіант",es:"Opción única",fr:"Choix unique",de:"Einzelauswahl",it:"Scelta singola",pt:"Escolha única",ro:"Alegere unică",bg:"Единичен избор",cs:"Jeden výběr",el:"Μία επιλογή",nl:"Enkele keuze",pl:"Pojedynczy wybór",sv:"Enskilt val",tr:"Tek seçim",ar:"اختيار واحد",zh:"单选",da:"Enkelt valg",he:"בחירה יחידה",fi:"Yksittäinen valinta",hi:"एकल विकल्प",hr:"Jedan izbor",hu:"Egyetlen választás",id:"Pilihan tunggal",ja:"単一選択",ko:"단일 선택",no:"Enkelt valg",sk:"Jednoduchá voľba",sl:"Ena izbira",sr:"Један избор"}},showComponentOptionsPropertyPaneOnInsert:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};function Oe(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 Te(t){return Te="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},Te(t)}function Se(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 Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Se(Object(n),!0).forEach(function(e){Pe(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ae(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,Le(o.key),o)}}function Re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Re=function(){return!!t})()}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ie(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}},_e.apply(null,arguments)}function Ie(t){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ie(t)}function Ne(t,e){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ne(t,e)}function Pe(t,e,n){return(e=Le(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Le(t){var e=function(t){if("object"!=Te(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Te(e)?e:e+""}var xe=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),Pe(e=function(t,e,n){return e=Ie(e),function(t,e){if(e&&("object"==Te(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,Re()?Reflect.construct(e,n||[],Ie(t).constructor):e.apply(t,n))}(this,t),"setLabelStylesAndContent",function(t){var n=e.getElement("label");n.style.display=t.content.labelEnabled?"block":"none",Oe({element:n,html:t.content.label})}),Pe(e,"createButtons",function(){var t=e.getElement("buttonsContainer"),n=e.getOptionsMap(),o=(e.getProps(),e.isStaticRenderMode());t.innerHTML="",Object.keys(n).forEach(function(i){var r=n[i],s=document.createElement("button");s.type="button",s.setAttribute("cl-element","button"),s.setAttribute("option-id",i),s.setAttribute("aria-pressed","false"),s.setAttribute("aria-disabled",String(!o)),o&&s.addEventListener("click",function(){var o=e.getCurrentValue(),r=e.getProps();if(null!=o&&o[i]){e.removeSelectedOptionStyles(s,r),delete o[i];var l=Object.keys(o).length?o:null;e.registeredControl.setValue(l)}else{r.control.multipleChoice||e.removeSelectionFromAllButtons(t,r),e.setSelectedOptionStyles(s,r);var a=r.control.multipleChoice?Ce(Ce({},o),{},Pe({},i,n[i].exportId)):Pe({},i,n[i].exportId);e.registeredControl.setValue(a)}}),Oe({element:s,html:r.label}),t.append(s)})}),Pe(e,"getOptionsMap",function(){var t,n=null!==(t=e.getProps().control.optionsAlphabeticSort)&&void 0!==t&&t.enabled?"label":"sort";return function(t,e,n=!1){return function(t){return[...t].reduce((t,[e,n])=>(t[e]=n,t),{})}(Object.entries(t).sort(([t,o],[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.getProps().control.options,n)}),Pe(e,"registerControl",function(){var t=e.getRootElement().querySelector(".tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:t})}),Pe(e,"getCurrentValue",function(){var t;return(null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null}),Pe(e,"setSelectedOptionStyles",function(t,e){U(t,e.styles.find(function(t){return"button"===t.element}).selectedStyleAttributes),t.setAttribute("aria-pressed","true")}),Pe(e,"removeSelectedOptionStyles",function(t,e){U(t,e.styles.find(function(t){return"button"===t.element}).styleAttributes),t.setAttribute("aria-pressed","false")}),Pe(e,"removeSelectionFromAllButtons",function(t,n){t.querySelectorAll("[cl-element=button]").forEach(function(t){e.removeSelectedOptionStyles(t,n)})}),Pe(e,"applySelectedStylesToCurrentValue",function(t){var n=e.getCurrentValue();n?e.getElement("buttonsContainer").querySelectorAll("[cl-element=button]").forEach(function(o){var i=o.getAttribute("option-id");n[i]?e.setSelectedOptionStyles(o,t):e.removeSelectedOptionStyles(o,t)}):e.removeSelectionFromAllButtons(e.getElement("buttonsContainer"),t)}),Pe(e,"manifest",ye),e.getRootElement().innerHTML="\n <style>".concat('\n .main-container {\n height: 100%;\n }\n \n .container-with-label {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .container-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n cursor: pointer;\n }\n \n .buttons-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .buttons-container [cl-element="button"] {\n appearance: none;\n -webkit-appearance: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n cursor: pointer;\n }\n\n .buttons-container [cl-element="button"]:disabled {\n opacity: 1;\n cursor: default;\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .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',"</style>\n ").concat('\n <div class="main-container">\n <div class="container-with-label" role="group" aria-labelledby="cl-choice-buttons-label">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-choice-buttons-label">\n </div>\n <div class="container-with-tooltip">\n <div class="buttons-container" cl-element="buttonsContainer"></div>\n <div class="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',"\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&&Ne(t,e)}(t,Ee),function(t,e){return e&&Ae(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=_e(Ie(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]),this.registerControl(),this.observeProps(function(t,n){e.setLabelStylesAndContent(n),e.createButtons(),e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.applySelectedStylesToCurrentValue(n)})}}])}();Pe(xe,"define",{name:"sys-choice-buttons",model:ye.name,manifest:ye});export{xe as default};window.clComponentClass_SysChoiceButtonsComponent=xe;
1
+ const t="validationStatusChanged",e="touchedStatusChanged";class n{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 o=[];for(var i in{transparent:"#0000"})o.push(i);var r="\\s*([.\\d%]+)\\s*",s="\\("+[r,r,r]+"(?:,\\s*([.\\d]+)\\s*)?\\)",l="(?:rgb)a?",a="("+o.join("|")+")";function c(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(l+s,"i"),RegExp([a,"(?:#([a-f0-9]{3,8}))",l+s,"(?:hsl)a?"+s].join("|"),"gi");var d=Array.prototype.concat,h=Array.prototype.slice,u=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];c(i)?e=d.call(e,h.call(i)):e.push(i)}return e};u.wrap=function(t){return function(){return t(u(arguments))}};const p=u;var m={},g=Object.hasOwnProperty,b=Object.create(null);for(var f in m)g.call(m,f)&&(b[m[f]]=f);var E={to:{},get:{}};function v(t,e,n){return Math.min(Math.max(e,t),n)}E.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=E.get.hsl(t),n="hsl"):(e=E.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},E.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]:g.call(m,e[1])?((i=m[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]=v(i[n],0,255);return i[3]=v(i[3],0,1),i},E.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,v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}return null},E.to.rgb=function(){var t=p(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]+")"},E.to.hsl=function(){var t=p(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 y=E,O={},T={};for(const t of Object.keys(O))T[O[t]]=t;const S={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(S)){if(!("channels"in S[t]))throw new Error("missing channels property: "+t);if(!("labels"in S[t]))throw new Error("missing channel labels property: "+t);if(S[t].labels.length!==S[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=S[t];delete S[t].channels,delete S[t].labels,Object.defineProperty(S[t],"channels",{value:e}),Object.defineProperty(S[t],"labels",{value:n})}S.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),s=r-i;let l,a;r===i?l=0:e===r?l=(n-o)/s:n===r?l=2+(o-e)/s:o===r&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[l,100*a,100*c]},S.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const l=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--,s=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,a[t]=255*s;return a};const C=S;function A(t,e){return function(n){return e(t(n))}}function R(t,e){const n=[e[t].parent,t];let o=C[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=A(C[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const _={};Object.keys(C).forEach(t=>{_[t]={},Object.defineProperty(_[t],"channels",{value:C[t].channels}),Object.defineProperty(_[t],"labels",{value:C[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(C);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(C[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],s=e[i];-1===s.distance&&(s.distance=e[t].distance+1,s.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]=R(t,e))}return n}(t);Object.keys(e).forEach(n=>{const o=e[n];_[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),_[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 I=_,N=["keyword","gray","hex"],P={};for(const t of Object.keys(I))P[[...I[t].labels].sort().join("")]=t;const L={};function x(t,e){if(!(this instanceof x))return new x(t,e);if(e&&e in N&&(e=null),e&&!(e in I))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 x)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=y.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=I[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=I[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=D(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 P))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=P[o];const{labels:i}=I[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=D(r)}if(L[this.model])for(o=I[this.model].channels,n=0;n<o;n++){const t=L[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)}x.prototype={toString(){return this.string()},string(t){let e=this.model in y.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return y.to[e.model](n)},round(t){return t=Math.max(t||0,0),new x([...this.color.map(M(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new x([...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(I)){if(N.includes(t))continue;const{channels:e}=I[t];x.prototype[t]=function(...e){return this.model===t?new x(this):e.length>0?new x(e,t):new x([...w(I[this.model][t].raw(this.color)),this.valpha],t)},x[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=D(n,e)),new x(o,t)}}function M(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function w(t){return Array.isArray(t)?t:[t]}function D(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}function U(t,e){Object.keys(e).forEach(n=>{t.style[n]=e[n]})}function k(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(s,10),height:n+parseInt(i,10)+parseInt(o,10)}}function j(t,e,n,o,i){switch(t.position){case"top":return{left:`${B(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${B(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:`${V(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${V(0,t)}px`}}}function B(t,e,o,i){let r=o?t.x+t.width/2-e.width/2:t.x;return r<0&&(r=0),r+e.width>n.width(i)&&(r-=r+e.width-n.width(i)),r}function V(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}function W(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}const F="cl-tooltip-text-styles",H=`\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 G(t,e,o,i){i=i||document;let r=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(`#${F}`))return;const e=document.createElement("style");e.setAttribute("id",F),W({element:e,html:H}),t.head.appendChild(e)})(i),r=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(o),i.body.append(r),r.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:o,offset:i=10,htmlDocumentObject:r}=t,s=function(t,e,o,i,r,s){const l=function(t,e,o,i,r){const s=function(t,e,o,i){const r=n.width(i),{right:s}=t.getBoundingClientRect(),l=r-o-s-n.scrollbarWidth(i);return{horizontalOffset:o,contentWidth:k(e).width,availableSpaceToTheLeftSideOfTheTrigger:s-o,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,o,r),l=function(t,e,o,i){const r=n.height(i),{top:s,bottom:l}=t.getBoundingClientRect();return{verticalOffset:o,contentHeight:k(e).height,availableSpaceAboveTriggerElem:s-o,availableSpaceBelowTriggerElem:r-l-o}}(t,e,o,r);let a="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:s.availableSpaceToTheRightSideOfTheTrigger>=s.contentWidth,left:s.availableSpaceToTheLeftSideOfTheTrigger>=s.contentWidth};if(c.top?a="top":c.bottom?a="bottom":c.right?a="right":c.left&&(a="left"),i&&c[i]&&(a=i),"undefined"===a){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,s.availableSpaceToTheRightSideOfTheTrigger,s.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?a="bottom":t===l.availableSpaceAboveTriggerElem?a="top":t===s.availableSpaceToTheRightSideOfTheTrigger?a="right":t===s.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},l),s),{position:a})}(t,e,o,i,s=s||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)U(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),U(e,{"margin-bottom":"0px"});else if("bottom"===t.position)U(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),U(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";U(e,{"margin-top":t,"margin-bottom":t})}}(l,e),{coordinates:j(l,t.getBoundingClientRect(),e.getBoundingClientRect(),r,s),position:l.position}}(e,o,i,"top",!0,r);o.setAttribute("cl-tooltip-position",s.position),U(o,s.coordinates)}({triggerElement:e,tooltipElement:r,htmlDocumentObject:i})},e.onmouseleave=()=>{r&&(r.remove(),function(t){const e=(t=t||document).head.querySelector(`#${F}`);e&&e.remove()}(i))})}function $(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}function Q(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 z="cl-";function K(t){return z+t}function q(t){return"cl-"+t}const X="VIEW",J="MODULE",Y="CONTAINER",Z="INPUT",tt="BUTTON",et="CONSENT",nt="COLUMN";var ot,it;(it=ot||(ot={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",it.REQUEST="REQUEST",it.DISPATCH_EVENT="DISPATCH_EVENT",it.GO_TO_VIEW="GO_TO_VIEW",it.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",it.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",it.SHOW_WIDGET="SHOW_WIDGET",it.OPEN_LINK="OPEN_LINK",it.CLOSE_WIDGET="CLOSE_WIDGET",it.CLICK="CLICK";const rt=ot;var st,lt;class at{static sortActions(t){const e={[rt.CLOSE_WIDGET]:-1,[rt.OPEN_LINK]:-2,[rt.SHOW_WIDGET]:1,[rt.SUBSCRIBE_CONTACT]:2,[rt.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=at.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),i=o.getAttribute(q("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(q("type")));let n=0;for(;e[n]&&e[n].getAttribute(q("id"))!==i;){let t=e[n].getAttribute(q("type"));if(at.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,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise(function(o,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 s.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=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(t=>{t.removeEventListener("click",this.listener)}),this.targetElements=[])}}at.IGNORING_VIEW_ENTRY_TYPES=[tt,et,Z],(lt=st||(st={})).CLICK="CLICK",lt.COMPONENT_EVENT="COMPONENT_EVENT";class ct{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(q("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 dt{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 st.CLICK:return new at(t,e);case st.COMPONENT_EVENT:return new ct(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class ht{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 ut{constructor(){this.listeners=ut.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=ht.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=ut.createDefaultListenersState()}}ut.createDefaultListenersState=()=>({"*":{}});const pt=ut,mt=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class gt{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class bt{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===J?Object.assign(Object.assign({},t),bt.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 ft,Et,vt,yt,Ot,Tt,St,Ct,At,Rt,_t,It,Nt,Pt,Lt;bt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(Et=ft||(ft={})).VIEW="VIEW",Et.CONTAINER="CONTAINER",Et.TEXT="TEXT",Et.INPUT="INPUT",Et.BUTTON="BUTTON",Et.IMAGE="IMAGE",Et.CONSENT="CONSENT",Et.COUNTDOWN_TIMER="COUNTDOWN_TIMER",Et.PROMO_CODE="PROMO_CODE",Et.MULTIPLE_INPUT="MULTIPLE_INPUT",Et.VIDEO="VIDEO",Et.SLIDER="SLIDER",Et.SLIDE="SLIDE",Et.SOCIAL="SOCIAL",Et.COLUMNS="COLUMNS",Et.COLUMN="COLUMN",Et.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"}(yt||(yt={})),function(t){t.SELF="_self",t.BLANK="_blank"}(Ot||(Ot={})),(Tt||(Tt={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(St||(St={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(Ct||(Ct={})),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"}(At||(At={})),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"}(Rt||(Rt={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(_t||(_t={})),(Nt=It||(It={})).BEFORE="BEFORE",Nt.AFTER="AFTER",Nt.INSIDE="INSIDE",Nt.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"}(Pt||(Pt={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(Lt||(Lt={})),yt.REQUEST,yt.SUBSCRIBE_CONTACT;class xt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Mt extends pt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(Mt.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(Mt.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(Mt.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Mt.changeEventName="CHANGE";const wt=Mt;class Dt{static set(t,e){const n=t[Dt.accumulatorPropertyName]||{};t[Dt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Dt.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}Dt.accumulatorPropertyName="clStyleAttributes";const Ut=Dt;var kt;!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"}(kt||(kt={}));class jt{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=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);l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==X&&t!==Y&&t!==nt||(e.style.display=o===kt.CONTENT_LOCKER&&t===X?"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 Bt{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,s,l;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===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),h=this.parseBackground(d);h.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})}),Promise.all([...this.envUrlMaps[t].entries()].map(([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;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),xt.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 Vt=new class{execute(t,e="GET",n=null,o,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 Wt(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class Ft{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 Ht{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 Gt;!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"}(Gt||(Gt={}));const $t=Gt;class Qt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit($t.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit($t.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 Ht(this.onCounterStateUpdate)}}}const zt=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>zt(...t)}},Kt=zt,qt="props",Xt="shared",Jt="environment";function Yt(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===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const Zt="SUBMIT";function te(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 ee={DESKTOP:"desktop",MOBILE:"mobile"};function ne(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)}const oe=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class ie extends oe{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var re,se,le;function ae(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"}(re||(re={})),(le=se||(se={})).STATIC="STATIC",le.DATA_LAYER="DATA_LAYER",le.URL_QUERY_PARAMS="URL_QUERY_PARAMS",le.JS_API_VARIABLE="JS_API_VARIABLE",le.COOKIE="COOKIE",le.LOCAL_STORAGE="LOCAL_STORAGE";class ce{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")===re.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===se.STATIC)return ae(null==n?void 0:n.value);const i=t.getSource(e);if(!i)return;const r=i.getValue(o);return ae("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 de extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(q("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${q("widget-id")}]`);let i;o&&(i=o.getAttribute(q("widget-id")));let r=new ie("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(q("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=Kt(qt,Xt,Jt),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 gt({}),this.componentEventEmitter=new pt,this.componentResourceManager=new Qt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new dt(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(qt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),n=q("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(Xt).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Bt(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),Vt),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(wt.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Jt).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")===re.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===re.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(qt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Xt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Jt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${q("element")}]`)).filter(t=>!t.hasAttribute(q("component")))],this.getElement=(t,e)=>this.getElements().find(n=>e?n.getAttribute(q("element"))===t&&n.id===e:n.getAttribute(q("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&&(te(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(te(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),i=q("type"),r="element-styles";let s=this.getRootElement().querySelector(`style[${i}="${r}"]`);s||(s=document.createElement("style"),s.setAttribute(i,r),this.getRootElement().appendChild(s)),W({element:s,html:""}),n.forEach(t=>{let e=t.getAttribute(q("element"));const n=this.getEnvironment();let i=ne(o,n,e);if(i){if(this.resizeListener.isMobile()){const t=ne(o,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),s)}}),this._addLinkColor(s,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,i;const r=[];"host"===(e=de._resolveTogglableStylesForElementModel(e)).element&&(jt.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.push("background")));let s=e.styleAttributes.background,l=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],mt(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),mt(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const a=Object.assign(Object.assign({},e),{styleAttributes:Wt(e.styleAttributes,r)});if(Ut.set(t,a),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)),W({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(.${q("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 n=t;return(n.classes||"").split(" ").filter(t=>t.startsWith(z)).forEach(t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[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})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))}),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",i)=>{const r=Object.keys(n).reduce((t,e)=>t+` ${Ft.camelCaseToDashCase(e)}: ${n[e]}${i?" !important;":";"}`,"");W({element:t,html:`[${q("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{W({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&W({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)&&W({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)&&W({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!==K("hovered")&&t!==K("focused")).forEach(e=>{e.startsWith(z)&&t.classList.remove(e)});const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>Yt(this.parentNode,q("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(q("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:Yt(this.parentNode,q("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>$(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>Q(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 ce(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,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(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===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find(t=>t.category===Zt);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:rt.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()}}de._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=de._resolveTogglableStyles(e[t]))}),e},de._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 he=de,ue=Symbol("required");var pe=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 me(){}const ge="pending",be="valid",fe="invalid";class Ee extends he{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=pe(t,["element"]),i=this.getProps(),r=this.getModel(),s=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),l=this.getAutofillValue();void 0!==l&&(s.defaultValue=l);const a=this.services.form,c=[s,n,...e],d=a.hasControl(i.control.name)?a.updateControl(...c):a.registerControl(...c);return void 0!==l&&d.getValue()===l&&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=me,invalidCallback:r=me,pendingCallback:s=me,elementToListen:l=n,validationMap:a={},listenStatusChange:c=!0}=e,d=pe(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 h=this.getProps().control.validation,u=(null==h?void 0:h.validator)?a[h.validator]:void 0,p=t.some(t=>t[ue]),m=!!(null==h?void 0:h.required),g=m||p,b=[...t];m&&!p&&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[ue]=!0,e}()),u&&b.push(u);const f=this._prepareAsyncValidators(b),E=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:E,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:s},d)),E},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=ge;switch(!0){case n.control.pending:t=ge;break;case n.control.valid:t=be;break;default:t=fe}this._handleValidationStatus(n,t)})},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:s,errorMessageMapper:l,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 fe:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=Q(e,$(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);l&&(r=l(e,r)),G(o,i,r,this.htmlDocumentObject),s&&s()}break;case ge: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 ve(t){return Object.values(ee).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const ye={name:"SysChoiceButtonsComponent",componentType:"MULTIPLE_INPUT",version:"1.0.0",mappingTypes:["CHECKBOX_LIST"],focusableElements:["label","button"],contextMenuModel:ve([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:ve([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:ve([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","hug","fill"]},height:{options:["fixed","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"button"},{element:"label"}]},{type:"CONTROL",name:"NUMBER_INPUT",element:"buttonsContainer",elementProp:"styleAttributes",elementSubProp:"gap",params:{label:"DOCUMENT_FLEX_GAP",validators:{min:0}},valueTransformers:[{name:"px"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","styleAttributes"],params:{onlyColorSelection:!0}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","styleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"button",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"HOVER_ANIMATION",propPath:["styles","[element=button]","hoverStyleAttributes"]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{onlyColorSelection:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BACKGROUND"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{minValue:1,maxValue:5,hideAdditionalParams:!0,label:"i18n_DOCUMENT_SELECTED_BUTTON_BORDERS"}},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","selectedStyleAttributes"],params:{label:"i18n_DOCUMENT_SELECTED_BUTTON_SHADOW"}},{type:"CONTROL",name:"SWITCH",propPath:["content","labelEnabled"],params:{label:"DOCUMENT_SHOW_INPUT_LABELS",boldLabel:!0}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"]}},{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!0,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"],actionParams:{getRelativeSelector:function(t){return'[option-id="'.concat(t,'"]')},getOptionIdFromRelativeSelector:function(t){var e,n;return null!==(e=null===(n=t.match(/option-id="([^"]+)"/))||void 0===n?void 0:n[1])&&void 0!==e?e:null},availableActions:["GO_TO_VIEW"]}}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"COMPONENT_OPTIONS",params:{label:"DOCUMENT_EXPORT_ID",header:"DOCUMENT_OPTIONS_HEADER",tooltip:"DOCUMENT_OPTIONS_TOOLTIP_PART1,DOCUMENT_OPTIONS_TOOLTIP_PART2",origin:!1,optionsPropPath:["control","options"],optionsAlphabeticSortPropPath:["control","optionsAlphabeticSort"],integrationNamePropPath:["control","integrationName"]}}]},i18nPropPaths:["content,label","control,options,[id],label"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"Required field","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","content,label":"Title"}},props:{content:{label:"Title",labelEnabled:!1},control:{name:"choiceButtons",integrationName:"choiceButtons",defaultValue:null,multipleChoice:!1,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}},optionsAlphabeticSort:{enabled:!1},validation:{required:!0}},styles:[{element:"button",styleAttributes:{background:"rgb(0, 0, 0)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",boxShadow:"none"},hoverStyleAttributes:{background:"rgba(35, 35, 35, 1)",externalBackgroundUrlSource:!1,borderTopColor:"rgb(0, 0, 0)",borderBottomColor:"rgb(0, 0, 0)",borderLeftColor:"rgb(0, 0, 0)",borderRightColor:"rgb(0, 0, 0)",boxShadow:null},selectedStyleAttributes:{background:"rgba(35, 35, 35, 1)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"2px",borderTopColor:"rgba(108, 108, 108, 1)",borderBottomWidth:"2px",borderBottomColor:"rgba(108, 108, 108, 1)",borderLeftWidth:"2px",borderLeftColor:"rgba(108, 108, 108, 1)",borderRightWidth:"2px",borderRightColor:"rgba(108, 108, 108, 1)",boxShadow:"none",externalBackgroundUrlSource:!1},hoverAnimationType:null}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{width:"230px",height:"auto",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0",minWidth:"230px"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"500",fontSize:"16px",textShadow:"none","--textDisplay":"inline",fontFamily:"Montserrat",letterSpacing:"0px",textTransform:"none"},classes:"cl-text-class-button"}],mobile:[{element:"host",styleAttributes:{width:"auto",height:"auto",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,zIndex:"0"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""},{element:"buttonsContainer",styleAttributes:{gap:"10px"}},{element:"button",styleAttributes:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"16px",textShadow:"none","--textDisplay":"inline"},classes:"cl-text-class-button"}]}},metaDescription:{icon:"/SysChoiceButtonsComponent/assets/img/component-icon.svg",label:{en:"Choice",ru:"Один вариант",uk:"Один варіант",es:"Opción única",fr:"Choix unique",de:"Einzelauswahl",it:"Scelta singola",pt:"Escolha única",ro:"Alegere unică",bg:"Единичен избор",cs:"Jeden výběr",el:"Μία επιλογή",nl:"Enkele keuze",pl:"Pojedynczy wybór",sv:"Enskilt val",tr:"Tek seçim",ar:"اختيار واحد",zh:"单选",da:"Enkelt valg",he:"בחירה יחידה",fi:"Yksittäinen valinta",hi:"एकल विकल्प",hr:"Jedan izbor",hu:"Egyetlen választás",id:"Pilihan tunggal",ja:"単一選択",ko:"단일 선택",no:"Enkelt valg",sk:"Jednoduchá voľba",sl:"Ena izbira",sr:"Један избор"}},showComponentOptionsPropertyPaneOnInsert:!0,showIntegrationFieldMappingPropertyPaneOnInsert:!0};function Oe(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 Te(t){return Te="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},Te(t)}function Se(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 Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Se(Object(n),!0).forEach(function(e){Pe(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ae(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,Le(o.key),o)}}function Re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Re=function(){return!!t})()}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ie(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}},_e.apply(null,arguments)}function Ie(t){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ie(t)}function Ne(t,e){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ne(t,e)}function Pe(t,e,n){return(e=Le(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Le(t){var e=function(t){if("object"!=Te(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Te(e)?e:e+""}var xe=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),Pe(e=function(t,e,n){return e=Ie(e),function(t,e){if(e&&("object"==Te(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,Re()?Reflect.construct(e,n||[],Ie(t).constructor):e.apply(t,n))}(this,t),"setLabelStylesAndContent",function(t){var n=e.getElement("label");n.style.display=t.content.labelEnabled?"block":"none",Oe({element:n,html:t.content.label})}),Pe(e,"createButtons",function(){var t=e.getElement("buttonsContainer"),n=e.getOptionsMap(),o=(e.getProps(),e.isStaticRenderMode());t.innerHTML="",Object.keys(n).forEach(function(i){var r=n[i],s=document.createElement("button");s.type="button",s.setAttribute("cl-element","button"),s.setAttribute("option-id",i),s.setAttribute("aria-pressed","false"),s.setAttribute("aria-disabled",String(!o)),o&&s.addEventListener("click",function(){var o=e.getCurrentValue(),r=e.getProps();if(null!=o&&o[i]){e.removeSelectedOptionStyles(s,r),delete o[i];var l=Object.keys(o).length?o:null;e.registeredControl.setValue(l)}else{r.control.multipleChoice||e.removeSelectionFromAllButtons(t,r),e.setSelectedOptionStyles(s,r);var a=r.control.multipleChoice?Ce(Ce({},o),{},Pe({},i,n[i].exportId)):Pe({},i,n[i].exportId);e.registeredControl.setValue(a)}}),Oe({element:s,html:r.label}),t.append(s)})}),Pe(e,"getOptionsMap",function(){var t,n=null!==(t=e.getProps().control.optionsAlphabeticSort)&&void 0!==t&&t.enabled?"label":"sort";return function(t,e,n=!1){return function(t){return[...t].reduce((t,[e,n])=>(t[e]=n,t),{})}(Object.entries(t).sort(([t,o],[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.getProps().control.options,n)}),Pe(e,"registerControl",function(){var t=e.getRootElement().querySelector(".tooltip");e.registeredControl=e.createControlWithValidation([],{tooltipElement:t})}),Pe(e,"getCurrentValue",function(){var t;return(null===(t=e.registeredControl)||void 0===t?void 0:t.getValue())||null}),Pe(e,"setSelectedOptionStyles",function(t,e){U(t,e.styles.find(function(t){return"button"===t.element}).selectedStyleAttributes),t.setAttribute("aria-pressed","true")}),Pe(e,"removeSelectedOptionStyles",function(t,e){U(t,e.styles.find(function(t){return"button"===t.element}).styleAttributes),t.setAttribute("aria-pressed","false")}),Pe(e,"removeSelectionFromAllButtons",function(t,n){t.querySelectorAll("[cl-element=button]").forEach(function(t){e.removeSelectedOptionStyles(t,n)})}),Pe(e,"applySelectedStylesToCurrentValue",function(t){var n=e.getCurrentValue();n?e.getElement("buttonsContainer").querySelectorAll("[cl-element=button]").forEach(function(o){var i=o.getAttribute("option-id");n[i]?e.setSelectedOptionStyles(o,t):e.removeSelectedOptionStyles(o,t)}):e.removeSelectionFromAllButtons(e.getElement("buttonsContainer"),t)}),Pe(e,"manifest",ye),e.getRootElement().innerHTML="\n <style>".concat('\n .main-container {\n height: 100%;\n }\n \n .container-with-label {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .label {\n min-height: 10px;\n }\n \n .label.cl-focused {\n min-height: auto;\n }\n \n .container-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n cursor: pointer;\n }\n \n .buttons-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .buttons-container [cl-element="button"] {\n appearance: none;\n -webkit-appearance: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n cursor: pointer;\n /* Share out whatever height the component is given. With the default\n by-content height there is no spare room and the buttons keep their\n own size, so this only takes effect once a height is actually set. */\n flex-grow: 1;\n }\n\n .buttons-container [cl-element="button"]:disabled {\n opacity: 1;\n cursor: default;\n }\n \n .invalid {\n border: 1px solid #ff0000 !important;\n }\n \n .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',"</style>\n ").concat('\n <div class="main-container">\n <div class="container-with-label" role="group" aria-labelledby="cl-choice-buttons-label">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label"\n id="cl-choice-buttons-label">\n </div>\n <div class="container-with-tooltip">\n <div class="buttons-container" cl-element="buttonsContainer"></div>\n <div class="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',"\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&&Ne(t,e)}(t,Ee),function(t,e){return e&&Ae(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=_e(Ie(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]),this.registerControl(),this.observeProps(function(t,n){e.setLabelStylesAndContent(n),e.createButtons(),e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),e.applySelectedStylesToCurrentValue(n)})}}])}();Pe(xe,"define",{name:"sys-choice-buttons",model:ye.name,manifest:ye});export{xe as default};window.clComponentClass_SysChoiceButtonsComponent=xe;
@@ -1 +1 @@
1
- const e={DESKTOP:"desktop",MOBILE:"mobile"};function t(t){return Object.values(e).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const n="cl-";function o(e){return n+e}function r(e){return"cl-"+e}function i(e,t,n){var o;return null===(o=null==e?void 0:e[t])||void 0===o?void 0:o.find(e=>e.element===n)}function s(e=[]){return e.map(e=>Object.assign(Object.assign({},e),{styleAttributes:Object.assign({},e.styleAttributes)}))}const a={name:"SysCountdownTimerComponent",componentType:"COUNTDOWN_TIMER",version:"1.0.0",contextMenuModel:t([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:t([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"counter"},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"TEXT_COLOR",propPath:["styles","[element=separator]","styleAttributes","color"],params:{label:"DOCUMENT_SEPARATOR_COLOR"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"counter"},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"TEXT_COLOR",propPath:["styles","[element=separator]","styleAttributes","color"],params:{label:"DOCUMENT_SEPARATOR_COLOR"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"SELECT",propPath:["content","format"],params:{label:"DOCUMENT_DATE_FORMAT_TITLE",options:[{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_DD_HH_MM_SS",value:"DD:HH:MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_HH_MM_SS",value:"HH:MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_MM_SS",value:"MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_SS",value:"SS"}]}},{type:"CONTROL",name:"DATEPICKER_COUNTDOWN_TIMER"},{type:"CONTROL",name:"SUPPORTED_LANGUAGES",params:{text:"DOCUMENT_COUNTDOWN_TIMER_LANGUAGES_DESCR"}}]},autoContrast:[{slave:{element:"counter",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"counterContainer",propPath:["styles","[element=counterContainer]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]}],keepGeneralTabOpenUntilInteracted:!0,focusableElements:["counter","label"],events:{dispatch:[],listen:[]},i18n:{en:{"content,counterLabel,day,single":"Day","content,counterLabel,day,upToFour":"Days","content,counterLabel,day,fromFive":"Days","content,counterLabel,hour,single":"Hour","content,counterLabel,hour,upToFour":"Hours","content,counterLabel,hour,fromFive":"Hours","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minutes","content,counterLabel,minute,fromFive":"Minutes","content,counterLabel,second,single":"Second","content,counterLabel,second,upToFour":"Seconds","content,counterLabel,second,fromFive":"Seconds"},ru:{"content,counterLabel,day,single":"День","content,counterLabel,day,upToFour":"Дня","content,counterLabel,day,fromFive":"Дней","content,counterLabel,hour,single":"Час","content,counterLabel,hour,upToFour":"Часа","content,counterLabel,hour,fromFive":"Часов","content,counterLabel,minute,single":"Минута","content,counterLabel,minute,upToFour":"Минуты","content,counterLabel,minute,fromFive":"Минут","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунды","content,counterLabel,second,fromFive":"Секунд"},uk:{"content,counterLabel,day,single":"День","content,counterLabel,day,upToFour":"Дні","content,counterLabel,day,fromFive":"Днів","content,counterLabel,hour,single":"Година","content,counterLabel,hour,upToFour":"Години","content,counterLabel,hour,fromFive":"Годин","content,counterLabel,minute,single":"Хвилина","content,counterLabel,minute,upToFour":"Хвилини","content,counterLabel,minute,fromFive":"Хвилин","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунди","content,counterLabel,second,fromFive":"Секунд"},de:{"content,counterLabel,day,single":"Tag","content,counterLabel,day,upToFour":"Tage","content,counterLabel,day,fromFive":"Tage","content,counterLabel,hour,single":"Stunde","content,counterLabel,hour,upToFour":"Stunden","content,counterLabel,hour,fromFive":"Stunden","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minuten","content,counterLabel,minute,fromFive":"Minuten","content,counterLabel,second,single":"Sekunde","content,counterLabel,second,upToFour":"Sekunden","content,counterLabel,second,fromFive":"Sekunden"},es:{"content,counterLabel,day,single":"Día","content,counterLabel,day,upToFour":"Días","content,counterLabel,day,fromFive":"Días","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},fr:{"content,counterLabel,day,single":"Jour","content,counterLabel,day,upToFour":"Jours","content,counterLabel,day,fromFive":"Jours","content,counterLabel,hour,single":"Heure","content,counterLabel,hour,upToFour":"Heures","content,counterLabel,hour,fromFive":"Heures","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minutes","content,counterLabel,minute,fromFive":"Minutes","content,counterLabel,second,single":"Seconde","content,counterLabel,second,upToFour":"Secondes","content,counterLabel,second,fromFive":"Secondes"},it:{"content,counterLabel,day,single":"Giorno","content,counterLabel,day,upToFour":"Giorni","content,counterLabel,day,fromFive":"Giorni","content,counterLabel,hour,single":"Ora","content,counterLabel,hour,upToFour":"Ore","content,counterLabel,hour,fromFive":"Ore","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minuti","content,counterLabel,minute,fromFive":"Minuti","content,counterLabel,second,single":"Secondo","content,counterLabel,second,upToFour":"Secondi","content,counterLabel,second,fromFive":"Secondi"},pt:{"content,counterLabel,day,single":"Dia","content,counterLabel,day,upToFour":"Dias","content,counterLabel,day,fromFive":"Dias","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},"pt-BR":{"content,counterLabel,day,single":"Dia","content,counterLabel,day,upToFour":"Dias","content,counterLabel,day,fromFive":"Dias","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},sv:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dagar","content,counterLabel,day,fromFive":"Dagar","content,counterLabel,hour,single":"Timme","content,counterLabel,hour,upToFour":"Timmar","content,counterLabel,hour,fromFive":"Timmar","content,counterLabel,minute,single":"Minutt","content,counterLabel,minute,upToFour":"Minuter","content,counterLabel,minute,fromFive":"Minuter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},et:{"content,counterLabel,day,single":"Päev","content,counterLabel,day,upToFour":"Päeva","content,counterLabel,day,fromFive":"Päeva","content,counterLabel,hour,single":"Tund","content,counterLabel,hour,upToFour":"Tundi","content,counterLabel,hour,fromFive":"Tundi","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minutit","content,counterLabel,minute,fromFive":"Minutit","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekundit","content,counterLabel,second,fromFive":"Sekundit"},lv:{"content,counterLabel,day,single":"Diena","content,counterLabel,day,upToFour":"Dienas","content,counterLabel,day,fromFive":"Dienas","content,counterLabel,hour,single":"Stunda","content,counterLabel,hour,upToFour":"Stundas","content,counterLabel,hour,fromFive":"Stundas","content,counterLabel,minute,single":"Minūte","content,counterLabel,minute,upToFour":"Minūtes","content,counterLabel,minute,fromFive":"Minūtes","content,counterLabel,second,single":"Sekunde","content,counterLabel,second,upToFour":"Sekundes","content,counterLabel,second,fromFive":"Sekundes"},pl:{"content,counterLabel,day,single":"Dzień","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dni","content,counterLabel,hour,single":"Godzina","content,counterLabel,hour,upToFour":"Godziny","content,counterLabel,hour,fromFive":"Godzin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},nl:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dagen","content,counterLabel,day,fromFive":"Dagen","content,counterLabel,hour,single":"Uur","content,counterLabel,hour,upToFour":"Uren","content,counterLabel,hour,fromFive":"Uren","content,counterLabel,minute,single":"Minuut","content,counterLabel,minute,upToFour":"Minuten","content,counterLabel,minute,fromFive":"Minuten","content,counterLabel,second,single":"Seconde","content,counterLabel,second,upToFour":"Seconden","content,counterLabel,second,fromFive":"Seconden"},cz:{"content,counterLabel,day,single":"Den","content,counterLabel,day,upToFour":"Dny","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},tr:{"content,counterLabel,day,single":"Gün","content,counterLabel,day,upToFour":"Gün","content,counterLabel,day,fromFive":"Gün","content,counterLabel,hour,single":"Saat","content,counterLabel,hour,upToFour":"Saat","content,counterLabel,hour,fromFive":"Saat","content,counterLabel,minute,single":"Dakika","content,counterLabel,minute,upToFour":"Dakika","content,counterLabel,minute,fromFive":"Dakika","content,counterLabel,second,single":"Saniye","content,counterLabel,second,upToFour":"Saniye","content,counterLabel,second,fromFive":"Saniye"},ro:{"content,counterLabel,day,single":"Zi","content,counterLabel,day,upToFour":"Zile","content,counterLabel,day,fromFive":"Zile","content,counterLabel,hour,single":"Oră","content,counterLabel,hour,upToFour":"Ore","content,counterLabel,hour,fromFive":"Ore","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minute","content,counterLabel,second,single":"Secundă","content,counterLabel,second,upToFour":"Secunde","content,counterLabel,second,fromFive":"Secunde"},vi:{"content,counterLabel,day,single":"Ngày","content,counterLabel,day,upToFour":"Ngày","content,counterLabel,day,fromFive":"Ngày","content,counterLabel,hour,single":"Giờ","content,counterLabel,hour,upToFour":"Giờ","content,counterLabel,hour,fromFive":"Giờ","content,counterLabel,minute,single":"Phút","content,counterLabel,minute,upToFour":"Phút","content,counterLabel,minute,fromFive":"Phút","content,counterLabel,second,single":"Giây","content,counterLabel,second,upToFour":"Giây","content,counterLabel,second,fromFive":"Giây"},zh:{"content,counterLabel,day,single":"天","content,counterLabel,day,upToFour":"天","content,counterLabel,day,fromFive":"天","content,counterLabel,hour,single":"小時","content,counterLabel,hour,upToFour":"小時","content,counterLabel,hour,fromFive":"小時","content,counterLabel,minute,single":"分鐘","content,counterLabel,minute,upToFour":"分鐘","content,counterLabel,minute,fromFive":"分鐘","content,counterLabel,second,single":"秒","content,counterLabel,second,upToFour":"秒","content,counterLabel,second,fromFive":"秒"},ms:{"content,counterLabel,day,single":"Hari","content,counterLabel,day,upToFour":"Hari","content,counterLabel,day,fromFive":"Hari","content,counterLabel,hour,single":"Jam","content,counterLabel,hour,upToFour":"Jam","content,counterLabel,hour,fromFive":"Jam","content,counterLabel,minute,single":"Minit","content,counterLabel,minute,upToFour":"Minit","content,counterLabel,minute,fromFive":"Minit","content,counterLabel,second,single":"Saat","content,counterLabel,second,upToFour":"Saat","content,counterLabel,second,fromFive":"Saat"},ar:{"content,counterLabel,day,single":"يوما","content,counterLabel,day,upToFour":"يومان","content,counterLabel,day,fromFive":"أيام","content,counterLabel,hour,single":"ساعة","content,counterLabel,hour,upToFour":"ساعتين","content,counterLabel,hour,fromFive":"ساعات","content,counterLabel,minute,single":"دقيقة","content,counterLabel,minute,upToFour":"دقيقتين","content,counterLabel,minute,fromFive":"دقائق","content,counterLabel,second,single":"ثانية","content,counterLabel,second,upToFour":"ثانيتين","content,counterLabel,second,fromFive":"ثواني"},th:{"content,counterLabel,day,single":"วัน","content,counterLabel,day,upToFour":"วัน","content,counterLabel,day,fromFive":"วัน","content,counterLabel,hour,single":" ชั่วโมง","content,counterLabel,hour,upToFour":" ชั่วโมง","content,counterLabel,hour,fromFive":" ชั่วโมง","content,counterLabel,minute,single":"นาที","content,counterLabel,minute,upToFour":"นาที","content,counterLabel,minute,fromFive":"นาที","content,counterLabel,second,single":"วินาที","content,counterLabel,second,upToFour":"วินาที","content,counterLabel,second,fromFive":"วินาที"},bs:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dana","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minuta","content,counterLabel,second,single":"Sekundi","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekundi"},bg:{"content,counterLabel,day,single":"Дeн","content,counterLabel,day,upToFour":"Дни","content,counterLabel,day,fromFive":"Дни","content,counterLabel,hour,single":"Час","content,counterLabel,hour,upToFour":"Часа","content,counterLabel,hour,fromFive":"Часа","content,counterLabel,minute,single":"Минута","content,counterLabel,minute,upToFour":"Минути","content,counterLabel,minute,fromFive":"Минути","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунди","content,counterLabel,second,fromFive":"Секунди"},lt:{"content,counterLabel,day,single":"Diena","content,counterLabel,day,upToFour":"Dienos","content,counterLabel,day,fromFive":"Dienos","content,counterLabel,hour,single":"Valanda","content,counterLabel,hour,upToFour":"Valandos","content,counterLabel,hour,fromFive":"Valandos","content,counterLabel,minute,single":"Minutė","content,counterLabel,minute,upToFour":"Minutės","content,counterLabel,minute,fromFive":"Minutės","content,counterLabel,second,single":"Sekundė","content,counterLabel,second,upToFour":"Sekundės","content,counterLabel,second,fromFive":"Sekundės"},cs:{"content,counterLabel,day,single":"Den","content,counterLabel,day,upToFour":"Dny","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},el:{"content,counterLabel,day,single":"ημέρα","content,counterLabel,day,upToFour":"ημέρες","content,counterLabel,day,fromFive":"μέρες","content,counterLabel,hour,single":"ώρα","content,counterLabel,hour,upToFour":"ώρες","content,counterLabel,hour,fromFive":"ώρες","content,counterLabel,minute,single":"λεπτό","content,counterLabel,minute,upToFour":"λεπτά","content,counterLabel,minute,fromFive":"λεπτά","content,counterLabel,second,single":"δευτερόλεπτο","content,counterLabel,second,upToFour":"δευτερόλεπτα","content,counterLabel,second,fromFive":"δευτερόλεπτα"},da:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dage","content,counterLabel,day,fromFive":"Dage","content,counterLabel,hour,single":"Time","content,counterLabel,hour,upToFour":"Timer","content,counterLabel,hour,fromFive":"Timer","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minutter","content,counterLabel,minute,fromFive":"Minutter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},he:{"content,counterLabel,day,single":"יום","content,counterLabel,day,upToFour":"ימים","content,counterLabel,day,fromFive":"ימים","content,counterLabel,hour,single":"שעה","content,counterLabel,hour,upToFour":"שעות","content,counterLabel,hour,fromFive":"שעות","content,counterLabel,minute,single":"דקה","content,counterLabel,minute,upToFour":"דקות","content,counterLabel,minute,fromFive":"דקות","content,counterLabel,second,single":"שנייה","content,counterLabel,second,upToFour":"שניות","content,counterLabel,second,fromFive":"שניות"},fi:{"content,counterLabel,day,single":"Päivä","content,counterLabel,day,upToFour":"Päivää","content,counterLabel,day,fromFive":"Päivää","content,counterLabel,hour,single":"Tunti","content,counterLabel,hour,upToFour":"Tuntia","content,counterLabel,hour,fromFive":"Tuntia","content,counterLabel,minute,single":"Minuutti","content,counterLabel,minute,upToFour":"Minuuttia","content,counterLabel,minute,fromFive":"Minuuttia","content,counterLabel,second,single":"Sekunti","content,counterLabel,second,upToFour":"Sekuntia","content,counterLabel,second,fromFive":"Sekuntia"},hi:{"content,counterLabel,day,single":"दिन ","content,counterLabel,day,upToFour":"दिन ","content,counterLabel,day,fromFive":"दिन ","content,counterLabel,hour,single":"घंटा ","content,counterLabel,hour,upToFour":"घंटे ","content,counterLabel,hour,fromFive":"घंटे ","content,counterLabel,minute,single":"मिनट ","content,counterLabel,minute,upToFour":"मिनट","content,counterLabel,minute,fromFive":"मिनट ","content,counterLabel,second,single":"सेकंड","content,counterLabel,second,upToFour":"सेकंड","content,counterLabel,second,fromFive":"सेकंड"},hr:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dani","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minute","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekunde"},hu:{"content,counterLabel,day,single":"Nap","content,counterLabel,day,upToFour":"Nap","content,counterLabel,day,fromFive":"Nap","content,counterLabel,hour,single":"Óra","content,counterLabel,hour,upToFour":"Óra","content,counterLabel,hour,fromFive":"Óra","content,counterLabel,minute,single":"Perc","content,counterLabel,minute,upToFour":"Perc","content,counterLabel,minute,fromFive":"Perc","content,counterLabel,second,single":"Másodperc","content,counterLabel,second,upToFour":"Másodperc","content,counterLabel,second,fromFive":"Másodperc"},id:{"content,counterLabel,day,single":"Hari","content,counterLabel,day,upToFour":"Hari","content,counterLabel,day,fromFive":"Hari","content,counterLabel,hour,single":"Jam","content,counterLabel,hour,upToFour":"Jam","content,counterLabel,hour,fromFive":"Jam","content,counterLabel,minute,single":"Menit","content,counterLabel,minute,upToFour":"Menit","content,counterLabel,minute,fromFive":"Menit","content,counterLabel,second,single":"Detik","content,counterLabel,second,upToFour":"Detik","content,counterLabel,second,fromFive":"Detik"},ja:{"content,counterLabel,day,single":"日","content,counterLabel,day,upToFour":"日","content,counterLabel,day,fromFive":"日","content,counterLabel,hour,single":"時間","content,counterLabel,hour,upToFour":"時間","content,counterLabel,hour,fromFive":"時間","content,counterLabel,minute,single":"分","content,counterLabel,minute,upToFour":"分","content,counterLabel,minute,fromFive":"分","content,counterLabel,second,single":"秒","content,counterLabel,second,upToFour":"秒","content,counterLabel,second,fromFive":"秒"},ko:{"content,counterLabel,day,single":"일","content,counterLabel,day,upToFour":"일","content,counterLabel,day,fromFive":"일","content,counterLabel,hour,single":"시","content,counterLabel,hour,upToFour":"시","content,counterLabel,hour,fromFive":"시","content,counterLabel,minute,single":"분","content,counterLabel,minute,upToFour":"분","content,counterLabel,minute,fromFive":"분","content,counterLabel,second,single":"초","content,counterLabel,second,upToFour":"초","content,counterLabel,second,fromFive":"초"},no:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dager","content,counterLabel,day,fromFive":"Dager","content,counterLabel,hour,single":"Time","content,counterLabel,hour,upToFour":"Timer","content,counterLabel,hour,fromFive":"Timer","content,counterLabel,minute,single":"Minutt","content,counterLabel,minute,upToFour":"Minutter","content,counterLabel,minute,fromFive":"Minutter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},sk:{"content,counterLabel,day,single":"Deň","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodín","content,counterLabel,minute,single":"Minúta","content,counterLabel,minute,upToFour":"Minúty","content,counterLabel,minute,fromFive":"Minút","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekúnd"},sl:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dni","content,counterLabel,hour,single":"Ura","content,counterLabel,hour,upToFour":"Ure","content,counterLabel,hour,fromFive":"Ur","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Skunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekund"},sr:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dani","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minuti","content,counterLabel,minute,fromFive":"Minuti","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekunde"}},props:{content:{endDate:"",timeZone:null,mode:"UNTIL_THE_EXPIRATION_DATE",lengthFromTheStart:"00.00.10.00",isShowAgainAllowed:!0,showAgainMode:"NEXT_SESSION",showAgainAmount:1,showAgainUnit:"DAYS",textContrastEnabled:!0,format:"HH:MM:SS"},control:{icon:""},styles:[{element:"counterContainer",styleAttributes:{background:"rgb(255, 255, 255, 0.2)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"2px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"2px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"2px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"2px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"6px",borderTopRightRadius:"6px",borderBottomLeftRadius:"6px",borderBottomRightRadius:"6px",boxShadow:"none"},classes:""},{element:"separator",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))"},classes:""}],adaptiveStyles:(c=[{element:"host",styleAttributes:{width:"220px",minWidth:"220px",height:"auto",minHeight:null,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"counter",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"20px",textShadow:"none"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))",textAlign:"center",lineHeight:"120%",fontWeight:"400",fontSize:"12px",textShadow:"none"},classes:""}],Object.values(e).reduce((e,t)=>Object.assign(e,{[t]:s(c)}),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysCountdownTimerComponent/assets/img/component-icon.svg",label:{en:"Countdown timer",ru:"Таймер обратного отсчета",uk:"Таймер зворотного відліку",es:"Contador regresivo",fr:"Compte à rebours",de:"Countdown-Timer",it:"Conto alla rovescia",pt:"Temporizador",ro:"Cronometru de numărătoare inversă",bg:"Таймер за обратно броене",cs:"Čas odpočítávání",el:"Χρονόμετρο αντίστροφης μέτρησης",nl:"Afteltimer",pl:"Czasomierz odliczania",sv:"Nedräkning tidtagare",tr:"Geri sayım saati",ar:"العد التنازلي",zh:"倒计时",da:"Nedtællingstimer",he:"טיימר ספירה לאחור",fi:"Ajastin",hi:"काउंटडाउन टाइमर",hr:"Odbrojavanje vremena",hu:"Visszaszámláló időzítő",id:"Penghitung waktu mundur",ja:"カウントダウンタイマー",ko:"카운트다운 타이머",no:"Nedtellingstidtaker",sk:"Časovač odpočítavania",sl:"Odštevalnik časa",sr:"Tajmer za odbrojavanje"}},syncEnabled:!0,stylesImitationEnabled:!0};var c;const u="VIEW",l="MODULE",d="CONTAINER",m="INPUT",b="BUTTON",h="CONSENT",p="COLUMN";var g,L;(L=g||(g={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",L.REQUEST="REQUEST",L.DISPATCH_EVENT="DISPATCH_EVENT",L.GO_TO_VIEW="GO_TO_VIEW",L.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",L.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",L.SHOW_WIDGET="SHOW_WIDGET",L.OPEN_LINK="OPEN_LINK",L.CLOSE_WIDGET="CLOSE_WIDGET",L.CLICK="CLICK";const v=g;var f,T;class y{static sortActions(e){const t={[v.CLOSE_WIDGET]:-1,[v.OPEN_LINK]:-2,[v.SHOW_WIDGET]:1,[v.SUBSCRIBE_CONTACT]:2,[v.REQUEST]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0)}constructor(e,t){this.config=e,this.actions=y.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const o=n(),i=o.getAttribute(r("id"));this.actions.forEach(e=>{var t;return null===(t=e.setInitiatorComponentId)||void 0===t?void 0:t.call(e,i)}),this.listener=e=>{const t=e.composedPath().filter(e=>e instanceof HTMLElement&&e.getAttribute(r("type")));let n=0;for(;t[n]&&t[n].getAttribute(r("id"))!==i;){let e=t[n].getAttribute(r("type"));if(y.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach(e=>{e.addEventListener("click",this.listener)})}async execute(){var e,t,n,o;try{for(var r,i=!0,s=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise(function(o,r){!function(e,t,n,o){Promise.resolve(o).then(function(t){e({value:t,done:n})},t)}(o,r,(t=e[n](t)).done,t.value)})}}}(this.eventsQueue);!(e=(r=await s.next()).done);i=!0){o=r.value,i=!1;const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}}catch(e){t={error:e}}finally{try{i||e||!(n=s.return)||await n.call(s)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(e=>{e.removeEventListener("click",this.listener)}),this.targetElements=[])}}y.IGNORING_VIEW_ENTRY_TYPES=[b,h,m],(T=f||(f={})).CLICK="CLICK",T.COMPONENT_EVENT="COMPONENT_EVENT";class E{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(r("id"));this.actions.forEach(e=>{var t;return null===(t=e.setInitiatorComponentId)||void 0===t?void 0:t.call(e,i)}),this.componentEmitterListener=t.on(this.config.eventName,()=>{this.actions.forEach(t=>t.execute(e.getState(),this.config.params))})}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class S{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map(e=>this.actionFactory.get(e));switch(t.forEach(e=>this.actionRegister.register(e)),e.type){case f.CLICK:return new y(e,t);case f.COMPONENT_EVENT:return new E(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class O{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class F{constructor(){this.listeners=F.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach(o=>o(t,e,n)),Object.values(this.listeners["*"]).forEach(o=>o(t,e,n))}on(e,t){const n=O.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=F.createDefaultListenersState()}}F.createDefaultListenersState=()=>({"*":{}});const C=F,_=(e,t,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:s}=r;(i||s).call(e,t,n,o)};class A{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class R{static extract(e){const t=e.views.map(e=>{const t=e.children.map(e=>e.type===l?Object.assign(Object.assign({},e),R.moduleToContainerParams):e);return Object.assign(Object.assign({},e),{children:t})});return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}var M,N,I,D,P,k,U,x,w,H,G,j,B,W,V;R.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(N=M||(M={})).VIEW="VIEW",N.CONTAINER="CONTAINER",N.TEXT="TEXT",N.INPUT="INPUT",N.BUTTON="BUTTON",N.IMAGE="IMAGE",N.CONSENT="CONSENT",N.COUNTDOWN_TIMER="COUNTDOWN_TIMER",N.PROMO_CODE="PROMO_CODE",N.MULTIPLE_INPUT="MULTIPLE_INPUT",N.VIDEO="VIDEO",N.SLIDER="SLIDER",N.SLIDE="SLIDE",N.SOCIAL="SOCIAL",N.COLUMNS="COLUMNS",N.COLUMN="COLUMN",N.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(I||(I={})).CLICK="CLICK",function(e){e.SHOW_WIDGET="SHOW_WIDGET",e.OPEN_LINK="OPEN_LINK",e.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",e.REQUEST="REQUEST",e.CLOSE_WIDGET="CLOSE_WIDGET",e.GO_TO_VIEW="GO_TO_VIEW",e.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",e.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",e.CLICK="CLICK"}(D||(D={})),function(e){e.SELF="_self",e.BLANK="_blank"}(P||(P={})),(k||(k={})).ACCENT="accent",function(e){e.TOP="TOP",e.CENTER="CENTER",e.BOTTOM="BOTTOM"}(U||(U={})),function(e){e.LEFT="LEFT",e.CENTER="CENTER",e.RIGHT="RIGHT"}(x||(x={})),function(e){e.SLIDE_TO_TOP="SLIDE_TO_TOP",e.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",e.SLIDE_TO_LEFT="SLIDE_TO_LEFT",e.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(w||(w={})),function(e){e.PULSE="PULSE",e.VIBRATE="VIBRATE",e.WOBBLE="WOBBLE",e.SHAKE="SHAKE",e.JELLO="JELLO",e.BOUNCE="BOUNCE",e.BLINK="BLINK",e.FLICKER="FLICKER",e.PING="PING"}(H||(H={})),function(e){e.LEFT="LEFT",e.RIGHT="RIGHT"}(G||(G={})),(B=j||(j={})).BEFORE="BEFORE",B.AFTER="AFTER",B.INSIDE="INSIDE",B.INSTEAD="INSTEAD",function(e){e.GO_TO_VIEW="GO_TO_VIEW",e.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",e.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",e.SUBMIT="SUBMIT",e.NPS_CONDITIONAL="NPS_CONDITIONAL"}(W||(W={})),function(e){e.TRUE_TERMINAL="TRUE_TERMINAL",e.INTERMEDIATE="INTERMEDIATE"}(V||(V={})),D.REQUEST,D.SUBSCRIBE_CONTACT;class ${static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}class K extends C{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",({isMobileEnv:e})=>{this._isMobile=e,this.emit(K.changeEventName,this._isMobile)})}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(K.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(K.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}K.changeEventName="CHANGE";const z=K;class Q{static set(e,t){const n=e[Q.accumulatorPropertyName]||{};e[Q.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[Q.accumulatorPropertyName]).forEach(n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""})}}Q.accumulatorPropertyName="clStyleAttributes";const J=Q;var Z;!function(e){e.BUILT_IN="BUILT_IN",e.DETACHED="DETACHED",e.FLOATING_BOX="FLOATING_BOX",e.FLOATING_BAR="FLOATING_BAR",e.LAUNCHER="LAUNCHER",e.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class X{static applyHostStyles(e,t,n=null,o){var r,i,s;const a=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find(e=>"CLICK"===e.type);a&&(null===(s=a.actions)||void 0===s?void 0:s.length)&&(t.style.cursor="pointer"),e!==u&&e!==d&&e!==p||(t.style.display=o===Z.CONTENT_LOCKER&&e===u?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class Y{constructor(e,t,n,o,r,i){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach(n=>{var o,r,i,s,a;const c=null===(r=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===r?void 0:r.find(e=>e.element===n),u=(null===(i=t.styles)||void 0===i?void 0:i.find(e=>e.element===n))||{},l=(null===(s=null==u?void 0:u.styleAttributes)||void 0===s?void 0:s.background)||(null===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background),d=this.parseBackground(l);d.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.positionOptions})}),Promise.all([...this.envUrlMaps[e].entries()].map(([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(e=>e.text()).then(o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var t;const n=this.getSharedCb();return Object.keys((null===(t=n.theme)||void 0===t?void 0:t.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[e].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[e].get("host"),n.cssVars)}).catch(e=>{console.error(e),$.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)})}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",e=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),e)}),this.themeSubscription=this.documentModel.on("THEME_UPDATE",e=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),e.schema)}),this}_applyHostElementBackgroundFromCssVars(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(e,t))}_applyHostElementBackgroundFromTheme(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(e,t))}_buildBackgroundUrlFromCssVars(e,t){const n=e.inlineSvgString.trim().replace("var(--cl-schema-accent)",t["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}_buildBackgroundUrlFromTheme(e,t){const n=e.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach(e=>{const n=function(e=""){return e.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(e[1]);var r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,t[n])}),`url('data:image/svg+xml,${encodeURIComponent(o)}')${e.positionOptions}`}off(){var e,t;null===(e=this.schemaSubscription)||void 0===e||e.off(),null===(t=this.themeSubscription)||void 0===t||t.off()}}const q=new class{execute(e,t="GET",n=null,o,r){const i={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,i)}};function ee(e,t){return Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]}),{})}class te{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,e=>"_"+e).toUpperCase()}}class ne{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var oe;!function(e){e.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",e.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",e.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",e.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",e.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",e.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",e.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",e.LEAD_PROGRESS="LEAD_PROGRESS"}(oe||(oe={}));const re=oe;class ie{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(re.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(re.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new ne(this.onCounterStateUpdate)}}}const se=(...e)=>{let t=e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:[]}),{});return{get:e=>t[e],clear:()=>se(...e)}},ae=se,ce="props",ue="shared",le="environment";function de(e,t,n,o){const r=e=>{let i=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return i&&(o&&"function"==typeof o?o(i.getAttribute(t)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,t))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(e)}const me="SUBMIT";function be(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach(n=>{if("element"===n||"classes"===n)return;const o=t[n];o&&"object"==typeof o&&!Array.isArray(o)?e[n]=Object.assign(Object.assign({},e[n]||{}),o):e[n]=o}),e):e}function he(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(e=>e.remove()),t.querySelectorAll("*").forEach(e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(t=>e.removeAttribute(t)),Array.from(e.attributes).forEach(t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)}),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}}),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}const pe=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class ge extends pe{constructor(e,t={},n){super(e,Object.assign(Object.assign({},n),{detail:t}))}}var Le,ve,fe;function Te(e){if(null!=e&&""!==e)return"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e)}!function(e){e.STATIC="STATIC",e.UPDATING="UPDATING"}(Le||(Le={})),(fe=ve||(ve={})).STATIC="STATIC",fe.DATA_LAYER="DATA_LAYER",fe.URL_QUERY_PARAMS="URL_QUERY_PARAMS",fe.JS_API_VARIABLE="JS_API_VARIABLE",fe.COOKIE="COOKIE",fe.LOCAL_STORAGE="LOCAL_STORAGE";class ye{constructor(e,t){this.configService=e,this.registry=t}resolveValue(e,t){if(!(null==e?void 0:e.enabled)||!e.sourceType||this.configService.getConfig("renderMode")===Le.UPDATING)return;const n=function(e,t,n,o){if(!t)return;if(t===ve.STATIC)return Te(null==n?void 0:n.value);const r=e.getSource(t);if(!r)return;const i=r.getValue(o);return Te("function"==typeof(null==i?void 0:i.processor)?i.processor(r,Object.assign({id:o},n)):null==i?void 0:i.value)}(this.registry,e.sourceType,e.config,t);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class Ee extends HTMLElement{constructor(){var e;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let e;const t=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let s=new ge("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:t,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),e=s.detail.props,Object.assign(this,e),this.observers=ae(ce,ue,le),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach(e=>null==e?void 0:e.off())}},this.state=new A({}),this.componentEventEmitter=new C,this.componentResourceManager=new ie(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new S(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,e=>{this.model.props=e,this.observers.get(ce).forEach(t=>t(this.prevProps,e)),this.prevProps=e;const t=this.getHostElement(),n=r("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)}),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,e=>{Object.assign(this.model,e)}),this.documentModel.on("SHARED_UPDATE_ALL",()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ue).forEach(e=>e(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Y(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),q),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(z.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(le).forEach(t=>t(this.prevEnvironment,e)),this.prevEnvironment=e})),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(e=>this._handlerFactory.get(e)).map(e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this))).forEach(e=>e())},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach(e=>e.postpone())},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach(e=>e.release())},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===Le.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Le.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(ce).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(ue).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(le).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter(e=>!e.hasAttribute(r("component")))],this.getElement=(e,t)=>this.getElements().find(n=>t?n.getAttribute(r("element"))===e&&n.id===t:n.getAttribute(r("element"))===e),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;const o=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach(e=>{const t=e.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach(n=>{n.element===t&&(be(n,e),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===t&&(be(n,e),r=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))}),n}(e,t),s=r("type"),a="element-styles";let c=this.getRootElement().querySelector(`style[${s}="${a}"]`);c||(c=document.createElement("style"),c.setAttribute(s,a),this.getRootElement().appendChild(c)),he({element:c,html:""}),n.forEach(e=>{let t=e.getAttribute(r("element"));const n=this.getEnvironment();let s=i(o,n,t);if(s){if(this.resizeListener.isMobile()){const e=i(o,"desktop",t);e&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),s.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(s),c)}}),this._addLinkColor(c,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var o,i;const s=[];"host"===(t=Ee._resolveTogglableStylesForElementModel(t)).element&&(X.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let a=t.styleAttributes.background,c=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&c){this.componentResourceManager.getPending().increment();const e=new Image;e.src=c[1],_(e,"load",()=>{this.componentResourceManager.getPending().decrement()}),_(e,"error",()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const u=Object.assign(Object.assign({},t),{styleAttributes:ee(t.styleAttributes,s)});if(J.set(e,u),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let o=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),r=`flip-up-animation-${t.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,e.appendChild(i)),he({element:i,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.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({},t.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,t.element,o,`:not(.${r("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this.applySharedClassesToElementModel=e=>function(e,t){let o=e;return(o.classes||"").split(" ").filter(e=>e.startsWith(n)).forEach(e=>{var n;let r=null===(n=t.textClasses)||void 0===n?void 0:n[e];r&&(r.styleAttributes.fontFamily||(r.isHeader&&t.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.headerFontFamily})})),!r.isHeader&&t.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))}),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:t.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,o="",i)=>{const s=Object.keys(n).reduce((e,t)=>e+` ${te.camelCaseToDashCase(t)}: ${n[t]}${i?" !important;":";"}`,"");he({element:e,html:`[${r("element")}="${t}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{he({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,r,i;t.linkColor&&he({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&he({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=t.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=t.linkParams)||void 0===i?void 0:i.removeUnderline)&&he({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,t)=>{Array.from(e.classList).filter(e=>e!==o("hovered")&&e!==o("focused")).forEach(t=>{t.startsWith(n)&&e.classList.remove(t)});const r=((e.getAttribute("class")||"")+" "+t.classes).trim();e.setAttribute("class",r)},this.getParentComponent=()=>de(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(r("path"));return 1===(null==e?void 0:e.split(",").length)?this.parentNode:de(this.parentNode,r("path"),void 0,e=>1===(null==e?void 0:e.split(",").length))},this.getWidgetLanguages=()=>function(e){return[e.getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter(e=>!!e)}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>function(e,t){return t.reduce((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null},null)}(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.getAutofillValue=()=>{var e;const t=this.getModel();return new ye(this.services.config,this.services.context.getRegistry()).resolveValue(null===(e=t.props.control)||void 0===e?void 0:e.autofill,t.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(e,t)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=e?t:void 0,e&&this.services.context.updateRecord(this.getModel().id,{value:t})},this.addContextRecord=()=>{var e,t;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!==(e=this.getValidatedAutofillValue())&&void 0!==e?e:n.props.control.defaultValue||"",viewIndex:null===(t=n.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.props)}})},this.getContextRecordLabel=e=>{var t,n,o,r,i,s;const a=e.control.name;if(["email","first_name","last_name"].includes(a))return a.toUpperCase();if((null===(t=e.content)||void 0===t?void 0:t.label)&&(null===(r=null===(o=null===(n=e.adaptiveStyles)||void 0===n?void 0:n.desktop.find(e=>"label"===e.element))||void 0===o?void 0:o.params)||void 0===r?void 0:r.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return(null===(i=e.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(e.content.placeholder):(null===(s=e.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{var t;switch(null===(t=e.control)||void 0===t?void 0:t.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find(e=>e.category===me);n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:v.REQUEST}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>{var e;return(null===(e=this.getProps())||void 0===e?void 0:e.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then(()=>{this.attachHandlers()});const e=document.createElement("style");e.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(e)}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}}Ee._resolveTogglableStylesForElementModel=e=>{const t=Object.assign({},e);return Object.keys(t).forEach(e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=Ee._resolveTogglableStyles(t[e]))}),t},Ee._resolveTogglableStyles=e=>{const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach(e=>{e in t&&(t[e]=t[n]?t[e]:o)}),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t};const Se=Ee;function Oe(e,t,n){if("en"===n&&e>1)return t[1];const o=Math.abs(e);return t[o%100>4&&o%100<20?2:[2,0,1,1,1,2][o%10<5?o%10:5]]}function Fe(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(e=>e.remove()),t.querySelectorAll("*").forEach(e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(t=>e.removeAttribute(t)),Array.from(e.attributes).forEach(t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)}),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}}),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ke(o.key),o)}}function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}function Me(e,t,n,o){var r=Ne(Ie(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof r?function(e){return r.apply(n,e)}:r}function Ne(){return Ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Ne.apply(null,arguments)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Pe(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var Ue=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Pe(t=function(e,t,n){return t=Ie(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Re()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"getEndDateData",function(e){if("FROM_THE_START_OF_DISPLAYING"===e.content.mode){var n=t.getStoredRelativeStartDate(),o=t.getLengthMs(e.content.lengthFromTheStart);return n?{dateInMs:new Date(n).getTime()+o,shouldBeStored:!1}:{dateInMs:(new Date).getTime()+o,shouldBeStored:!0}}return{dateInMs:new Date(e.content.endDate).getTime(),shouldBeStored:!1}}),Pe(t,"getLengthMs",function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e,t)||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.")}()}(e.split(".").map(Number),4);return 864e5*t[0]+36e5*t[1]+6e4*t[2]+1e3*t[3]}),Pe(t,"getStoredRelativeStartDate",function(){var e;if(t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode)return null===(e=t.services.config.getConfig("getRelativeTimerViewDate"))||void 0===e?void 0:e()}),Pe(t,"storeRelativeStartDate",function(){var e;t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode&&(null===(e=t.services.config.getConfig("storeRelativeTimerViewDate"))||void 0===e||e())}),Pe(t,"clearRelativeStartDate",function(){var e;t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode&&(null===(e=t.services.config.getConfig("clearRelativeTimerViewDate"))||void 0===e||e())}),Pe(t,"getDateWithTimeZone",function(e,t){var n=t?new Date(t):new Date;return e?new Date(n.toLocaleString("en-US",{timeZone:e})):n}),Pe(t,"splitMilliseconds",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("number"!=typeof e||e<0)return{days:0,hours:0,minutes:0,seconds:0,milliseconds:0};var n=e,o={},r=function(e,t,r){var i=Math.floor(n/e);o[r]=t?i:0,n=t?n-i*e:n};return r(864e5,t.days,"days"),r(36e5,t.hours,"hours"),r(6e4,t.minutes,"minutes"),r(1e3,t.seconds,"seconds"),o.milliseconds=n,o}),Pe(t,"drawTimer",function(e,n){var o=t.getRootElement().querySelector(".countdownContainer"),r=t.createElementContainers(o),i=t.getTranslationsMap(t.manifest.i18n),s=i.translations,a=i.language,c=e.content.format||(e.content.showDays?"DD:HH:MM:SS":"HH:MM:SS"),u=t.parseFormat(c),l=n+50,d=t.splitMilliseconds(l,u),m=d.days,b=d.hours,h=d.minutes,p=d.seconds;u.days&&t.createCounterElement(r,m,"day",s,a),u.hours&&(u.days&&t.addSeparatorElements(r),t.createCounterElement(r,b,"hour",s,a)),u.minutes&&((u.days||u.hours)&&t.addSeparatorElements(r),t.createCounterElement(r,h,"minute",s,a)),u.seconds&&((u.days||u.hours||u.minutes)&&t.addSeparatorElements(r),t.createCounterElement(r,p,"second",s,a)),t.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles)}),Pe(t,"createElementContainers",function(e){Fe({element:e,html:""});var t=document.createElement("div");t.className="countersContainer";var n=document.createElement("div");return n.className="labelsContainer",e.append(t,n),{countersContainerElement:t,labelsContainerElement:n}}),Pe(t,"parseFormat",function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toUpperCase();return{days:e.includes("D"),hours:e.includes("H"),minutes:e.includes("M"),seconds:e.includes("S")}}),Pe(t,"createCounterElement",function(e,n,o,r,i){var s=document.createElement("div");s.setAttribute("cl-element","counterContainer"),s.className="counterContainer";var a=document.createElement("span");a.setAttribute("cl-element","counter"),a.className="counter",Fe({element:a,html:n>=10?n:"0".concat(n)});var c=document.createElement("div");c.className="counterLabelContainer";var u=document.createElement("span");u.setAttribute("cl-element","label"),u.className="counterLabel",Fe({element:u,html:Oe(n,t.getLabelKeys(r,o),i)}),s.appendChild(a),c.appendChild(u),e.countersContainerElement.appendChild(s),e.labelsContainerElement.appendChild(c)}),Pe(t,"getLabelKeys",function(e,t){return[e["content,counterLabel,".concat(t,",single")],e["content,counterLabel,".concat(t,",upToFour")],e["content,counterLabel,".concat(t,",fromFive")]]}),Pe(t,"addSeparatorElements",function(e){var t=document.createElement("div");t.setAttribute("cl-element","separator"),t.className="counter-separator",t.textContent=":";var n=t.cloneNode(!0);n.className="label-separator",e.countersContainerElement.appendChild(t),e.labelsContainerElement.appendChild(n)}),Pe(t,"manifest",a),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(e,Se),function(e,t){return t&&Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"connectedCallback",value:function(){var t=this;Me(e,"connectedCallback",this,3)([]),this.getRootElement().innerHTML+="\n".concat("\n<style>\n.countdownContainer {\n display: flex;\n flex-direction: column;\n}\n\n.labelsContainer,\n.countersContainer {\n display: flex;\n align-items: center;\n width: 100%;\n}\n\n.countersContainer {\n flex-grow: 1;\n margin-bottom: 5px;\n}\n\n.counterLabelContainer,\n.counterContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n width: 100%;\n min-width: 40px;\n}\n\n.counterContainer {\n height: 100%;\n}\n\n.counter-separator,\n.label-separator {\n margin: 0 5px;\n font-weight: 700;\n font-size: 16px;\n}\n\n.label-separator {\n /* \n limit label separator height so that it never will be higher than label or container,\n still having the same width as counter separator\n */\n height: 3px;\n opacity: 0;\n}\n\n.counter, .counterLabel {\n width: 100%;\n}\n\n.counter {\n margin: 5px;\n}\n\n.counterLabel {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n</style>\n ",'\n<div class="countdownContainer"></div>\n'),this.observeProps(function(e,n){clearInterval(t.intervalId);var o="FROM_THE_START_OF_DISPLAYING"===n.content.mode?null:function(e){return e&&"Europe/Kyiv"===e?"Europe/Kiev":e}(n.content.timeZone),r=t.getEndDateData(n),i=r.dateInMs,s=i-t.getDateWithTimeZone(o).getTime();s<=0&&(t.clearRelativeStartDate(),r=t.getEndDateData(n),s=(i=r.dateInMs)-t.getDateWithTimeZone(o).getTime()),r.shouldBeStored&&t.storeRelativeStartDate(i),t.drawTimer(n,s>=0?s:0),s<=0||t.services.config.getConfig("devMode")||(t.intervalId=setInterval(function(){var e=i-t.getDateWithTimeZone(o).getTime();t.drawTimer(n,e>=0?e:0),e<=0&&clearInterval(t.intervalId)},1e3))})}},{key:"disconnectedCallback",value:function(){Me(e,"disconnectedCallback",this,3)([]),clearInterval(this.intervalId)}}])}();Pe(Ue,"define",{name:"sys-countdown-timer",model:a.name,manifest:a});export{Ue as default};window.clComponentClass_SysCountdownTimerComponent=Ue;
1
+ const e={DESKTOP:"desktop",MOBILE:"mobile"};function t(t){return Object.values(e).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}const n="cl-";function o(e){return n+e}function r(e){return"cl-"+e}function i(e,t,n){var o;return null===(o=null==e?void 0:e[t])||void 0===o?void 0:o.find(e=>e.element===n)}function a(e=[]){return e.map(e=>Object.assign(Object.assign({},e),{styleAttributes:Object.assign({},e.styleAttributes)}))}const s={name:"SysCountdownTimerComponent",componentType:"COUNTDOWN_TIMER",version:"1.0.0",contextMenuModel:t([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:t([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"counter"},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"TEXT_COLOR",propPath:["styles","[element=separator]","styleAttributes","color"],params:{label:"DOCUMENT_SEPARATOR_COLOR"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"counter"},{element:"label"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"TEXT_COLOR",propPath:["styles","[element=separator]","styleAttributes","color"],params:{label:"DOCUMENT_SEPARATOR_COLOR"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=counterContainer]","styleAttributes"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"SELECT",propPath:["content","format"],params:{label:"DOCUMENT_DATE_FORMAT_TITLE",options:[{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_DD_HH_MM_SS",value:"DD:HH:MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_HH_MM_SS",value:"HH:MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_MM_SS",value:"MM:SS"},{label:"DOCUMENT_COUNTDOWN_TIMER_FORMAT_SS",value:"SS"}]}},{type:"CONTROL",name:"DATEPICKER_COUNTDOWN_TIMER"},{type:"CONTROL",name:"SWITCH",propPath:["content","labelsEnabled"],params:{label:"DOCUMENT_SHOW_INPUT_LABELS"}},{type:"CONTROL",name:"SUPPORTED_LANGUAGES",params:{text:"DOCUMENT_COUNTDOWN_TIMER_LANGUAGES_DESCR"}}]},autoContrast:[{slave:{element:"counter",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"counterContainer",propPath:["styles","[element=counterContainer]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]}],keepGeneralTabOpenUntilInteracted:!0,focusableElements:["counter","label"],events:{dispatch:[],listen:[]},i18n:{en:{"content,counterLabel,day,single":"Day","content,counterLabel,day,upToFour":"Days","content,counterLabel,day,fromFive":"Days","content,counterLabel,hour,single":"Hour","content,counterLabel,hour,upToFour":"Hours","content,counterLabel,hour,fromFive":"Hours","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minutes","content,counterLabel,minute,fromFive":"Minutes","content,counterLabel,second,single":"Second","content,counterLabel,second,upToFour":"Seconds","content,counterLabel,second,fromFive":"Seconds"},ru:{"content,counterLabel,day,single":"День","content,counterLabel,day,upToFour":"Дня","content,counterLabel,day,fromFive":"Дней","content,counterLabel,hour,single":"Час","content,counterLabel,hour,upToFour":"Часа","content,counterLabel,hour,fromFive":"Часов","content,counterLabel,minute,single":"Минута","content,counterLabel,minute,upToFour":"Минуты","content,counterLabel,minute,fromFive":"Минут","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунды","content,counterLabel,second,fromFive":"Секунд"},uk:{"content,counterLabel,day,single":"День","content,counterLabel,day,upToFour":"Дні","content,counterLabel,day,fromFive":"Днів","content,counterLabel,hour,single":"Година","content,counterLabel,hour,upToFour":"Години","content,counterLabel,hour,fromFive":"Годин","content,counterLabel,minute,single":"Хвилина","content,counterLabel,minute,upToFour":"Хвилини","content,counterLabel,minute,fromFive":"Хвилин","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунди","content,counterLabel,second,fromFive":"Секунд"},de:{"content,counterLabel,day,single":"Tag","content,counterLabel,day,upToFour":"Tage","content,counterLabel,day,fromFive":"Tage","content,counterLabel,hour,single":"Stunde","content,counterLabel,hour,upToFour":"Stunden","content,counterLabel,hour,fromFive":"Stunden","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minuten","content,counterLabel,minute,fromFive":"Minuten","content,counterLabel,second,single":"Sekunde","content,counterLabel,second,upToFour":"Sekunden","content,counterLabel,second,fromFive":"Sekunden"},es:{"content,counterLabel,day,single":"Día","content,counterLabel,day,upToFour":"Días","content,counterLabel,day,fromFive":"Días","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},fr:{"content,counterLabel,day,single":"Jour","content,counterLabel,day,upToFour":"Jours","content,counterLabel,day,fromFive":"Jours","content,counterLabel,hour,single":"Heure","content,counterLabel,hour,upToFour":"Heures","content,counterLabel,hour,fromFive":"Heures","content,counterLabel,minute,single":"Minute","content,counterLabel,minute,upToFour":"Minutes","content,counterLabel,minute,fromFive":"Minutes","content,counterLabel,second,single":"Seconde","content,counterLabel,second,upToFour":"Secondes","content,counterLabel,second,fromFive":"Secondes"},it:{"content,counterLabel,day,single":"Giorno","content,counterLabel,day,upToFour":"Giorni","content,counterLabel,day,fromFive":"Giorni","content,counterLabel,hour,single":"Ora","content,counterLabel,hour,upToFour":"Ore","content,counterLabel,hour,fromFive":"Ore","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minuti","content,counterLabel,minute,fromFive":"Minuti","content,counterLabel,second,single":"Secondo","content,counterLabel,second,upToFour":"Secondi","content,counterLabel,second,fromFive":"Secondi"},pt:{"content,counterLabel,day,single":"Dia","content,counterLabel,day,upToFour":"Dias","content,counterLabel,day,fromFive":"Dias","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},"pt-BR":{"content,counterLabel,day,single":"Dia","content,counterLabel,day,upToFour":"Dias","content,counterLabel,day,fromFive":"Dias","content,counterLabel,hour,single":"Hora","content,counterLabel,hour,upToFour":"Horas","content,counterLabel,hour,fromFive":"Horas","content,counterLabel,minute,single":"Minuto","content,counterLabel,minute,upToFour":"Minutos","content,counterLabel,minute,fromFive":"Minutos","content,counterLabel,second,single":"Segundo","content,counterLabel,second,upToFour":"Segundos","content,counterLabel,second,fromFive":"Segundos"},sv:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dagar","content,counterLabel,day,fromFive":"Dagar","content,counterLabel,hour,single":"Timme","content,counterLabel,hour,upToFour":"Timmar","content,counterLabel,hour,fromFive":"Timmar","content,counterLabel,minute,single":"Minutt","content,counterLabel,minute,upToFour":"Minuter","content,counterLabel,minute,fromFive":"Minuter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},et:{"content,counterLabel,day,single":"Päev","content,counterLabel,day,upToFour":"Päeva","content,counterLabel,day,fromFive":"Päeva","content,counterLabel,hour,single":"Tund","content,counterLabel,hour,upToFour":"Tundi","content,counterLabel,hour,fromFive":"Tundi","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minutit","content,counterLabel,minute,fromFive":"Minutit","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekundit","content,counterLabel,second,fromFive":"Sekundit"},lv:{"content,counterLabel,day,single":"Diena","content,counterLabel,day,upToFour":"Dienas","content,counterLabel,day,fromFive":"Dienas","content,counterLabel,hour,single":"Stunda","content,counterLabel,hour,upToFour":"Stundas","content,counterLabel,hour,fromFive":"Stundas","content,counterLabel,minute,single":"Minūte","content,counterLabel,minute,upToFour":"Minūtes","content,counterLabel,minute,fromFive":"Minūtes","content,counterLabel,second,single":"Sekunde","content,counterLabel,second,upToFour":"Sekundes","content,counterLabel,second,fromFive":"Sekundes"},pl:{"content,counterLabel,day,single":"Dzień","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dni","content,counterLabel,hour,single":"Godzina","content,counterLabel,hour,upToFour":"Godziny","content,counterLabel,hour,fromFive":"Godzin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},nl:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dagen","content,counterLabel,day,fromFive":"Dagen","content,counterLabel,hour,single":"Uur","content,counterLabel,hour,upToFour":"Uren","content,counterLabel,hour,fromFive":"Uren","content,counterLabel,minute,single":"Minuut","content,counterLabel,minute,upToFour":"Minuten","content,counterLabel,minute,fromFive":"Minuten","content,counterLabel,second,single":"Seconde","content,counterLabel,second,upToFour":"Seconden","content,counterLabel,second,fromFive":"Seconden"},cz:{"content,counterLabel,day,single":"Den","content,counterLabel,day,upToFour":"Dny","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},tr:{"content,counterLabel,day,single":"Gün","content,counterLabel,day,upToFour":"Gün","content,counterLabel,day,fromFive":"Gün","content,counterLabel,hour,single":"Saat","content,counterLabel,hour,upToFour":"Saat","content,counterLabel,hour,fromFive":"Saat","content,counterLabel,minute,single":"Dakika","content,counterLabel,minute,upToFour":"Dakika","content,counterLabel,minute,fromFive":"Dakika","content,counterLabel,second,single":"Saniye","content,counterLabel,second,upToFour":"Saniye","content,counterLabel,second,fromFive":"Saniye"},ro:{"content,counterLabel,day,single":"Zi","content,counterLabel,day,upToFour":"Zile","content,counterLabel,day,fromFive":"Zile","content,counterLabel,hour,single":"Oră","content,counterLabel,hour,upToFour":"Ore","content,counterLabel,hour,fromFive":"Ore","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minute","content,counterLabel,second,single":"Secundă","content,counterLabel,second,upToFour":"Secunde","content,counterLabel,second,fromFive":"Secunde"},vi:{"content,counterLabel,day,single":"Ngày","content,counterLabel,day,upToFour":"Ngày","content,counterLabel,day,fromFive":"Ngày","content,counterLabel,hour,single":"Giờ","content,counterLabel,hour,upToFour":"Giờ","content,counterLabel,hour,fromFive":"Giờ","content,counterLabel,minute,single":"Phút","content,counterLabel,minute,upToFour":"Phút","content,counterLabel,minute,fromFive":"Phút","content,counterLabel,second,single":"Giây","content,counterLabel,second,upToFour":"Giây","content,counterLabel,second,fromFive":"Giây"},zh:{"content,counterLabel,day,single":"天","content,counterLabel,day,upToFour":"天","content,counterLabel,day,fromFive":"天","content,counterLabel,hour,single":"小時","content,counterLabel,hour,upToFour":"小時","content,counterLabel,hour,fromFive":"小時","content,counterLabel,minute,single":"分鐘","content,counterLabel,minute,upToFour":"分鐘","content,counterLabel,minute,fromFive":"分鐘","content,counterLabel,second,single":"秒","content,counterLabel,second,upToFour":"秒","content,counterLabel,second,fromFive":"秒"},ms:{"content,counterLabel,day,single":"Hari","content,counterLabel,day,upToFour":"Hari","content,counterLabel,day,fromFive":"Hari","content,counterLabel,hour,single":"Jam","content,counterLabel,hour,upToFour":"Jam","content,counterLabel,hour,fromFive":"Jam","content,counterLabel,minute,single":"Minit","content,counterLabel,minute,upToFour":"Minit","content,counterLabel,minute,fromFive":"Minit","content,counterLabel,second,single":"Saat","content,counterLabel,second,upToFour":"Saat","content,counterLabel,second,fromFive":"Saat"},ar:{"content,counterLabel,day,single":"يوما","content,counterLabel,day,upToFour":"يومان","content,counterLabel,day,fromFive":"أيام","content,counterLabel,hour,single":"ساعة","content,counterLabel,hour,upToFour":"ساعتين","content,counterLabel,hour,fromFive":"ساعات","content,counterLabel,minute,single":"دقيقة","content,counterLabel,minute,upToFour":"دقيقتين","content,counterLabel,minute,fromFive":"دقائق","content,counterLabel,second,single":"ثانية","content,counterLabel,second,upToFour":"ثانيتين","content,counterLabel,second,fromFive":"ثواني"},th:{"content,counterLabel,day,single":"วัน","content,counterLabel,day,upToFour":"วัน","content,counterLabel,day,fromFive":"วัน","content,counterLabel,hour,single":" ชั่วโมง","content,counterLabel,hour,upToFour":" ชั่วโมง","content,counterLabel,hour,fromFive":" ชั่วโมง","content,counterLabel,minute,single":"นาที","content,counterLabel,minute,upToFour":"นาที","content,counterLabel,minute,fromFive":"นาที","content,counterLabel,second,single":"วินาที","content,counterLabel,second,upToFour":"วินาที","content,counterLabel,second,fromFive":"วินาที"},bs:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dana","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minuta","content,counterLabel,second,single":"Sekundi","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekundi"},bg:{"content,counterLabel,day,single":"Дeн","content,counterLabel,day,upToFour":"Дни","content,counterLabel,day,fromFive":"Дни","content,counterLabel,hour,single":"Час","content,counterLabel,hour,upToFour":"Часа","content,counterLabel,hour,fromFive":"Часа","content,counterLabel,minute,single":"Минута","content,counterLabel,minute,upToFour":"Минути","content,counterLabel,minute,fromFive":"Минути","content,counterLabel,second,single":"Секунда","content,counterLabel,second,upToFour":"Секунди","content,counterLabel,second,fromFive":"Секунди"},lt:{"content,counterLabel,day,single":"Diena","content,counterLabel,day,upToFour":"Dienos","content,counterLabel,day,fromFive":"Dienos","content,counterLabel,hour,single":"Valanda","content,counterLabel,hour,upToFour":"Valandos","content,counterLabel,hour,fromFive":"Valandos","content,counterLabel,minute,single":"Minutė","content,counterLabel,minute,upToFour":"Minutės","content,counterLabel,minute,fromFive":"Minutės","content,counterLabel,second,single":"Sekundė","content,counterLabel,second,upToFour":"Sekundės","content,counterLabel,second,fromFive":"Sekundės"},cs:{"content,counterLabel,day,single":"Den","content,counterLabel,day,upToFour":"Dny","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodin","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minuty","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekund"},el:{"content,counterLabel,day,single":"ημέρα","content,counterLabel,day,upToFour":"ημέρες","content,counterLabel,day,fromFive":"μέρες","content,counterLabel,hour,single":"ώρα","content,counterLabel,hour,upToFour":"ώρες","content,counterLabel,hour,fromFive":"ώρες","content,counterLabel,minute,single":"λεπτό","content,counterLabel,minute,upToFour":"λεπτά","content,counterLabel,minute,fromFive":"λεπτά","content,counterLabel,second,single":"δευτερόλεπτο","content,counterLabel,second,upToFour":"δευτερόλεπτα","content,counterLabel,second,fromFive":"δευτερόλεπτα"},da:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dage","content,counterLabel,day,fromFive":"Dage","content,counterLabel,hour,single":"Time","content,counterLabel,hour,upToFour":"Timer","content,counterLabel,hour,fromFive":"Timer","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minutter","content,counterLabel,minute,fromFive":"Minutter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},he:{"content,counterLabel,day,single":"יום","content,counterLabel,day,upToFour":"ימים","content,counterLabel,day,fromFive":"ימים","content,counterLabel,hour,single":"שעה","content,counterLabel,hour,upToFour":"שעות","content,counterLabel,hour,fromFive":"שעות","content,counterLabel,minute,single":"דקה","content,counterLabel,minute,upToFour":"דקות","content,counterLabel,minute,fromFive":"דקות","content,counterLabel,second,single":"שנייה","content,counterLabel,second,upToFour":"שניות","content,counterLabel,second,fromFive":"שניות"},fi:{"content,counterLabel,day,single":"Päivä","content,counterLabel,day,upToFour":"Päivää","content,counterLabel,day,fromFive":"Päivää","content,counterLabel,hour,single":"Tunti","content,counterLabel,hour,upToFour":"Tuntia","content,counterLabel,hour,fromFive":"Tuntia","content,counterLabel,minute,single":"Minuutti","content,counterLabel,minute,upToFour":"Minuuttia","content,counterLabel,minute,fromFive":"Minuuttia","content,counterLabel,second,single":"Sekunti","content,counterLabel,second,upToFour":"Sekuntia","content,counterLabel,second,fromFive":"Sekuntia"},hi:{"content,counterLabel,day,single":"दिन ","content,counterLabel,day,upToFour":"दिन ","content,counterLabel,day,fromFive":"दिन ","content,counterLabel,hour,single":"घंटा ","content,counterLabel,hour,upToFour":"घंटे ","content,counterLabel,hour,fromFive":"घंटे ","content,counterLabel,minute,single":"मिनट ","content,counterLabel,minute,upToFour":"मिनट","content,counterLabel,minute,fromFive":"मिनट ","content,counterLabel,second,single":"सेकंड","content,counterLabel,second,upToFour":"सेकंड","content,counterLabel,second,fromFive":"सेकंड"},hr:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dani","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minute","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekunde"},hu:{"content,counterLabel,day,single":"Nap","content,counterLabel,day,upToFour":"Nap","content,counterLabel,day,fromFive":"Nap","content,counterLabel,hour,single":"Óra","content,counterLabel,hour,upToFour":"Óra","content,counterLabel,hour,fromFive":"Óra","content,counterLabel,minute,single":"Perc","content,counterLabel,minute,upToFour":"Perc","content,counterLabel,minute,fromFive":"Perc","content,counterLabel,second,single":"Másodperc","content,counterLabel,second,upToFour":"Másodperc","content,counterLabel,second,fromFive":"Másodperc"},id:{"content,counterLabel,day,single":"Hari","content,counterLabel,day,upToFour":"Hari","content,counterLabel,day,fromFive":"Hari","content,counterLabel,hour,single":"Jam","content,counterLabel,hour,upToFour":"Jam","content,counterLabel,hour,fromFive":"Jam","content,counterLabel,minute,single":"Menit","content,counterLabel,minute,upToFour":"Menit","content,counterLabel,minute,fromFive":"Menit","content,counterLabel,second,single":"Detik","content,counterLabel,second,upToFour":"Detik","content,counterLabel,second,fromFive":"Detik"},ja:{"content,counterLabel,day,single":"日","content,counterLabel,day,upToFour":"日","content,counterLabel,day,fromFive":"日","content,counterLabel,hour,single":"時間","content,counterLabel,hour,upToFour":"時間","content,counterLabel,hour,fromFive":"時間","content,counterLabel,minute,single":"分","content,counterLabel,minute,upToFour":"分","content,counterLabel,minute,fromFive":"分","content,counterLabel,second,single":"秒","content,counterLabel,second,upToFour":"秒","content,counterLabel,second,fromFive":"秒"},ko:{"content,counterLabel,day,single":"일","content,counterLabel,day,upToFour":"일","content,counterLabel,day,fromFive":"일","content,counterLabel,hour,single":"시","content,counterLabel,hour,upToFour":"시","content,counterLabel,hour,fromFive":"시","content,counterLabel,minute,single":"분","content,counterLabel,minute,upToFour":"분","content,counterLabel,minute,fromFive":"분","content,counterLabel,second,single":"초","content,counterLabel,second,upToFour":"초","content,counterLabel,second,fromFive":"초"},no:{"content,counterLabel,day,single":"Dag","content,counterLabel,day,upToFour":"Dager","content,counterLabel,day,fromFive":"Dager","content,counterLabel,hour,single":"Time","content,counterLabel,hour,upToFour":"Timer","content,counterLabel,hour,fromFive":"Timer","content,counterLabel,minute,single":"Minutt","content,counterLabel,minute,upToFour":"Minutter","content,counterLabel,minute,fromFive":"Minutter","content,counterLabel,second,single":"Sekund","content,counterLabel,second,upToFour":"Sekunder","content,counterLabel,second,fromFive":"Sekunder"},sk:{"content,counterLabel,day,single":"Deň","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dní","content,counterLabel,hour,single":"Hodina","content,counterLabel,hour,upToFour":"Hodiny","content,counterLabel,hour,fromFive":"Hodín","content,counterLabel,minute,single":"Minúta","content,counterLabel,minute,upToFour":"Minúty","content,counterLabel,minute,fromFive":"Minút","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekundy","content,counterLabel,second,fromFive":"Sekúnd"},sl:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dni","content,counterLabel,day,fromFive":"Dni","content,counterLabel,hour,single":"Ura","content,counterLabel,hour,upToFour":"Ure","content,counterLabel,hour,fromFive":"Ur","content,counterLabel,minute,single":"Minuta","content,counterLabel,minute,upToFour":"Minute","content,counterLabel,minute,fromFive":"Minut","content,counterLabel,second,single":"Skunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekund"},sr:{"content,counterLabel,day,single":"Dan","content,counterLabel,day,upToFour":"Dani","content,counterLabel,day,fromFive":"Dani","content,counterLabel,hour,single":"Sat","content,counterLabel,hour,upToFour":"Sati","content,counterLabel,hour,fromFive":"Sati","content,counterLabel,minute,single":"Minut","content,counterLabel,minute,upToFour":"Minuti","content,counterLabel,minute,fromFive":"Minuti","content,counterLabel,second,single":"Sekunda","content,counterLabel,second,upToFour":"Sekunde","content,counterLabel,second,fromFive":"Sekunde"}},props:{content:{endDate:"",timeZone:null,mode:"UNTIL_THE_EXPIRATION_DATE",lengthFromTheStart:"00.00.10.00",isShowAgainAllowed:!0,showAgainMode:"NEXT_SESSION",showAgainAmount:1,showAgainUnit:"DAYS",textContrastEnabled:!0,format:"HH:MM:SS",labelsEnabled:!0},control:{icon:""},styles:[{element:"counterContainer",styleAttributes:{background:"rgb(255, 255, 255, 0.2)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"2px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"2px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"2px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"2px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"6px",borderTopRightRadius:"6px",borderBottomLeftRadius:"6px",borderBottomRightRadius:"6px",boxShadow:"none"},classes:""},{element:"separator",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))"},classes:""}],adaptiveStyles:(c=[{element:"host",styleAttributes:{width:"220px",minWidth:"220px",height:"auto",minHeight:null,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"counter",styleAttributes:{color:"var(--cl-schema-text, rgb(0, 0, 0))",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"20px",textShadow:"none"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))",textAlign:"center",lineHeight:"120%",fontWeight:"400",fontSize:"12px",textShadow:"none"},classes:""}],Object.values(e).reduce((e,t)=>Object.assign(e,{[t]:a(c)}),{desktop:[],mobile:[]}))},metaDescription:{icon:"/SysCountdownTimerComponent/assets/img/component-icon.svg",label:{en:"Countdown timer",ru:"Таймер обратного отсчета",uk:"Таймер зворотного відліку",es:"Contador regresivo",fr:"Compte à rebours",de:"Countdown-Timer",it:"Conto alla rovescia",pt:"Temporizador",ro:"Cronometru de numărătoare inversă",bg:"Таймер за обратно броене",cs:"Čas odpočítávání",el:"Χρονόμετρο αντίστροφης μέτρησης",nl:"Afteltimer",pl:"Czasomierz odliczania",sv:"Nedräkning tidtagare",tr:"Geri sayım saati",ar:"العد التنازلي",zh:"倒计时",da:"Nedtællingstimer",he:"טיימר ספירה לאחור",fi:"Ajastin",hi:"काउंटडाउन टाइमर",hr:"Odbrojavanje vremena",hu:"Visszaszámláló időzítő",id:"Penghitung waktu mundur",ja:"カウントダウンタイマー",ko:"카운트다운 타이머",no:"Nedtellingstidtaker",sk:"Časovač odpočítavania",sl:"Odštevalnik časa",sr:"Tajmer za odbrojavanje"}},syncEnabled:!0,stylesImitationEnabled:!0};var c;const l="VIEW",u="MODULE",d="CONTAINER",m="INPUT",b="BUTTON",h="CONSENT",p="COLUMN";var g,L;(L=g||(g={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",L.REQUEST="REQUEST",L.DISPATCH_EVENT="DISPATCH_EVENT",L.GO_TO_VIEW="GO_TO_VIEW",L.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",L.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",L.SHOW_WIDGET="SHOW_WIDGET",L.OPEN_LINK="OPEN_LINK",L.CLOSE_WIDGET="CLOSE_WIDGET",L.CLICK="CLICK";const v=g;var f,T;class y{static sortActions(e){const t={[v.CLOSE_WIDGET]:-1,[v.OPEN_LINK]:-2,[v.SHOW_WIDGET]:1,[v.SUBSCRIBE_CONTACT]:2,[v.REQUEST]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0)}constructor(e,t){this.config=e,this.actions=y.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const o=n(),i=o.getAttribute(r("id"));this.actions.forEach(e=>{var t;return null===(t=e.setInitiatorComponentId)||void 0===t?void 0:t.call(e,i)}),this.listener=e=>{const t=e.composedPath().filter(e=>e instanceof HTMLElement&&e.getAttribute(r("type")));let n=0;for(;t[n]&&t[n].getAttribute(r("id"))!==i;){let e=t[n].getAttribute(r("type"));if(y.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach(e=>{e.addEventListener("click",this.listener)})}async execute(){var e,t,n,o;try{for(var r,i=!0,a=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise(function(o,r){!function(e,t,n,o){Promise.resolve(o).then(function(t){e({value:t,done:n})},t)}(o,r,(t=e[n](t)).done,t.value)})}}}(this.eventsQueue);!(e=(r=await a.next()).done);i=!0){o=r.value,i=!1;const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}}catch(e){t={error:e}}finally{try{i||e||!(n=a.return)||await n.call(a)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(e=>{e.removeEventListener("click",this.listener)}),this.targetElements=[])}}y.IGNORING_VIEW_ENTRY_TYPES=[b,h,m],(T=f||(f={})).CLICK="CLICK",T.COMPONENT_EVENT="COMPONENT_EVENT";class E{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){var o;const i=null===(o=n())||void 0===o?void 0:o.getAttribute(r("id"));this.actions.forEach(e=>{var t;return null===(t=e.setInitiatorComponentId)||void 0===t?void 0:t.call(e,i)}),this.componentEmitterListener=t.on(this.config.eventName,()=>{this.actions.forEach(t=>t.execute(e.getState(),this.config.params))})}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class S{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map(e=>this.actionFactory.get(e));switch(t.forEach(e=>this.actionRegister.register(e)),e.type){case f.CLICK:return new y(e,t);case f.COMPONENT_EVENT:return new E(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class O{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class F{constructor(){this.listeners=F.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach(o=>o(t,e,n)),Object.values(this.listeners["*"]).forEach(o=>o(t,e,n))}on(e,t){const n=O.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=F.createDefaultListenersState()}}F.createDefaultListenersState=()=>({"*":{}});const C=F,_=(e,t,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:a}=r;(i||a).call(e,t,n,o)};class A{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class R{static extract(e){const t=e.views.map(e=>{const t=e.children.map(e=>e.type===u?Object.assign(Object.assign({},e),R.moduleToContainerParams):e);return Object.assign(Object.assign({},e),{children:t})});return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}var M,N,I,D,P,k,U,x,w,H,G,j,B,W,V;R.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(N=M||(M={})).VIEW="VIEW",N.CONTAINER="CONTAINER",N.TEXT="TEXT",N.INPUT="INPUT",N.BUTTON="BUTTON",N.IMAGE="IMAGE",N.CONSENT="CONSENT",N.COUNTDOWN_TIMER="COUNTDOWN_TIMER",N.PROMO_CODE="PROMO_CODE",N.MULTIPLE_INPUT="MULTIPLE_INPUT",N.VIDEO="VIDEO",N.SLIDER="SLIDER",N.SLIDE="SLIDE",N.SOCIAL="SOCIAL",N.COLUMNS="COLUMNS",N.COLUMN="COLUMN",N.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(I||(I={})).CLICK="CLICK",function(e){e.SHOW_WIDGET="SHOW_WIDGET",e.OPEN_LINK="OPEN_LINK",e.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",e.REQUEST="REQUEST",e.CLOSE_WIDGET="CLOSE_WIDGET",e.GO_TO_VIEW="GO_TO_VIEW",e.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",e.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",e.CLICK="CLICK"}(D||(D={})),function(e){e.SELF="_self",e.BLANK="_blank"}(P||(P={})),(k||(k={})).ACCENT="accent",function(e){e.TOP="TOP",e.CENTER="CENTER",e.BOTTOM="BOTTOM"}(U||(U={})),function(e){e.LEFT="LEFT",e.CENTER="CENTER",e.RIGHT="RIGHT"}(x||(x={})),function(e){e.SLIDE_TO_TOP="SLIDE_TO_TOP",e.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",e.SLIDE_TO_LEFT="SLIDE_TO_LEFT",e.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(w||(w={})),function(e){e.PULSE="PULSE",e.VIBRATE="VIBRATE",e.WOBBLE="WOBBLE",e.SHAKE="SHAKE",e.JELLO="JELLO",e.BOUNCE="BOUNCE",e.BLINK="BLINK",e.FLICKER="FLICKER",e.PING="PING"}(H||(H={})),function(e){e.LEFT="LEFT",e.RIGHT="RIGHT"}(G||(G={})),(B=j||(j={})).BEFORE="BEFORE",B.AFTER="AFTER",B.INSIDE="INSIDE",B.INSTEAD="INSTEAD",function(e){e.GO_TO_VIEW="GO_TO_VIEW",e.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",e.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",e.SUBMIT="SUBMIT",e.NPS_CONDITIONAL="NPS_CONDITIONAL"}(W||(W={})),function(e){e.TRUE_TERMINAL="TRUE_TERMINAL",e.INTERMEDIATE="INTERMEDIATE"}(V||(V={})),D.REQUEST,D.SUBSCRIBE_CONTACT;class ${static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}class K extends C{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",({isMobileEnv:e})=>{this._isMobile=e,this.emit(K.changeEventName,this._isMobile)})}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(K.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(K.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}K.changeEventName="CHANGE";const z=K;class Q{static set(e,t){const n=e[Q.accumulatorPropertyName]||{};e[Q.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[Q.accumulatorPropertyName]).forEach(n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""})}}Q.accumulatorPropertyName="clStyleAttributes";const J=Q;var Z;!function(e){e.BUILT_IN="BUILT_IN",e.DETACHED="DETACHED",e.FLOATING_BOX="FLOATING_BOX",e.FLOATING_BAR="FLOATING_BAR",e.LAUNCHER="LAUNCHER",e.CONTENT_LOCKER="CONTENT_LOCKER"}(Z||(Z={}));class X{static applyHostStyles(e,t,n=null,o){var r,i,a;const s=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find(e=>"CLICK"===e.type);s&&(null===(a=s.actions)||void 0===a?void 0:a.length)&&(t.style.cursor="pointer"),e!==l&&e!==d&&e!==p||(t.style.display=o===Z.CONTENT_LOCKER&&e===l?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class Y{constructor(e,t,n,o,r,i){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach(n=>{var o,r,i,a,s;const c=null===(r=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===r?void 0:r.find(e=>e.element===n),l=(null===(i=t.styles)||void 0===i?void 0:i.find(e=>e.element===n))||{},u=(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background)||(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background),d=this.parseBackground(u);d.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.positionOptions})}),Promise.all([...this.envUrlMaps[e].entries()].map(([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(e=>e.text()).then(o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var t;const n=this.getSharedCb();return Object.keys((null===(t=n.theme)||void 0===t?void 0:t.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[e].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[e].get("host"),n.cssVars)}).catch(e=>{console.error(e),$.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)})}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",e=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),e)}),this.themeSubscription=this.documentModel.on("THEME_UPDATE",e=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),e.schema)}),this}_applyHostElementBackgroundFromCssVars(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(e,t))}_applyHostElementBackgroundFromTheme(e,t){e&&t&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(e,t))}_buildBackgroundUrlFromCssVars(e,t){const n=e.inlineSvgString.trim().replace("var(--cl-schema-accent)",t["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}_buildBackgroundUrlFromTheme(e,t){const n=e.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach(e=>{const n=function(e=""){return e.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(e[1]);var r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,t[n])}),`url('data:image/svg+xml,${encodeURIComponent(o)}')${e.positionOptions}`}off(){var e,t;null===(e=this.schemaSubscription)||void 0===e||e.off(),null===(t=this.themeSubscription)||void 0===t||t.off()}}const q=new class{execute(e,t="GET",n=null,o,r){const i={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,i)}};function ee(e,t){return Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]}),{})}class te{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,e=>"_"+e).toUpperCase()}}class ne{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var oe;!function(e){e.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",e.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",e.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",e.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",e.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",e.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",e.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN",e.LEAD_PROGRESS="LEAD_PROGRESS"}(oe||(oe={}));const re=oe;class ie{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(re.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(re.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new ne(this.onCounterStateUpdate)}}}const ae=(...e)=>{let t=e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:[]}),{});return{get:e=>t[e],clear:()=>ae(...e)}},se=ae,ce="props",le="shared",ue="environment";function de(e,t,n,o){const r=e=>{let i=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return i&&(o&&"function"==typeof o?o(i.getAttribute(t)):(null===(a=null==i?void 0:i.getAttribute)||void 0===a?void 0:a.call(i,t))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var a};return r(e)}const me="SUBMIT";function be(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach(n=>{if("element"===n||"classes"===n)return;const o=t[n];o&&"object"==typeof o&&!Array.isArray(o)?e[n]=Object.assign(Object.assign({},e[n]||{}),o):e[n]=o}),e):e}function he(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(e=>e.remove()),t.querySelectorAll("*").forEach(e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(t=>e.removeAttribute(t)),Array.from(e.attributes).forEach(t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)}),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}}),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}const pe=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class ge extends pe{constructor(e,t={},n){super(e,Object.assign(Object.assign({},n),{detail:t}))}}var Le,ve,fe;function Te(e){if(null!=e&&""!==e)return"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e)}!function(e){e.STATIC="STATIC",e.UPDATING="UPDATING"}(Le||(Le={})),(fe=ve||(ve={})).STATIC="STATIC",fe.DATA_LAYER="DATA_LAYER",fe.URL_QUERY_PARAMS="URL_QUERY_PARAMS",fe.JS_API_VARIABLE="JS_API_VARIABLE",fe.COOKIE="COOKIE",fe.LOCAL_STORAGE="LOCAL_STORAGE";class ye{constructor(e,t){this.configService=e,this.registry=t}resolveValue(e,t){if(!(null==e?void 0:e.enabled)||!e.sourceType||this.configService.getConfig("renderMode")===Le.UPDATING)return;const n=function(e,t,n,o){if(!t)return;if(t===ve.STATIC)return Te(null==n?void 0:n.value);const r=e.getSource(t);if(!r)return;const i=r.getValue(o);return Te("function"==typeof(null==i?void 0:i.processor)?i.processor(r,Object.assign({id:o},n)):null==i?void 0:i.value)}(this.registry,e.sourceType,e.config,t);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class Ee extends HTMLElement{constructor(){var e;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let e;const t=this.getAttribute(r("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${r("widget-id")}]`);let i;o&&(i=o.getAttribute(r("widget-id")));let a=new ge("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(r("path")),id:t,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(a),e=a.detail.props,Object.assign(this,e),this.observers=se(ce,le,ue),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach(e=>null==e?void 0:e.off())}},this.state=new A({}),this.componentEventEmitter=new C,this.componentResourceManager=new ie(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new S(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,e=>{this.model.props=e,this.observers.get(ce).forEach(t=>t(this.prevProps,e)),this.prevProps=e;const t=this.getHostElement(),n=r("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)}),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,e=>{Object.assign(this.model,e)}),this.documentModel.on("SHARED_UPDATE_ALL",()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(le).forEach(e=>e(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Y(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),q),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(z.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(ue).forEach(t=>t(this.prevEnvironment,e)),this.prevEnvironment=e})),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(e=>this._handlerFactory.get(e)).map(e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this))).forEach(e=>e())},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach(e=>e.postpone())},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach(e=>e.release())},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===Le.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===Le.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(ce).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(le).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(ue).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${r("element")}]`)).filter(e=>!e.hasAttribute(r("component")))],this.getElement=(e,t)=>this.getElements().find(n=>t?n.getAttribute(r("element"))===e&&n.id===t:n.getAttribute(r("element"))===e),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;const o=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach(e=>{const t=e.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach(n=>{n.element===t&&(be(n,e),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===t&&(be(n,e),r=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))}),n}(e,t),a=r("type"),s="element-styles";let c=this.getRootElement().querySelector(`style[${a}="${s}"]`);c||(c=document.createElement("style"),c.setAttribute(a,s),this.getRootElement().appendChild(c)),he({element:c,html:""}),n.forEach(e=>{let t=e.getAttribute(r("element"));const n=this.getEnvironment();let a=i(o,n,t);if(a){if(this.resizeListener.isMobile()){const e=i(o,"desktop",t);e&&(a=Object.assign(Object.assign({},a),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),a.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(a),c)}}),this._addLinkColor(c,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var o,i;const a=[];"host"===(t=Ee._resolveTogglableStylesForElementModel(t)).element&&(X.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),a.push("background")));let s=t.styleAttributes.background,c=s&&s.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&c){this.componentResourceManager.getPending().increment();const e=new Image;e.src=c[1],_(e,"load",()=>{this.componentResourceManager.getPending().decrement()}),_(e,"error",()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const l=Object.assign(Object.assign({},t),{styleAttributes:ee(t.styleAttributes,a)});if(J.set(e,l),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let o=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),r=`flip-up-animation-${t.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,e.appendChild(i)),he({element:i,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.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({},t.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,t.element,o,`:not(.${r("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this.applySharedClassesToElementModel=e=>function(e,t){let o=e;return(o.classes||"").split(" ").filter(e=>e.startsWith(n)).forEach(e=>{var n;let r=null===(n=t.textClasses)||void 0===n?void 0:n[e];r&&(r.styleAttributes.fontFamily||(r.isHeader&&t.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.headerFontFamily})})),!r.isHeader&&t.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))}),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:t.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,o="",i)=>{const a=Object.keys(n).reduce((e,t)=>e+` ${te.camelCaseToDashCase(t)}: ${n[t]}${i?" !important;":";"}`,"");he({element:e,html:`[${r("element")}="${t}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{he({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,r,i;t.linkColor&&he({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&he({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=t.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=t.linkParams)||void 0===i?void 0:i.removeUnderline)&&he({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,t)=>{Array.from(e.classList).filter(e=>e!==o("hovered")&&e!==o("focused")).forEach(t=>{t.startsWith(n)&&e.classList.remove(t)});const r=((e.getAttribute("class")||"")+" "+t.classes).trim();e.setAttribute("class",r)},this.getParentComponent=()=>de(this.parentNode,r("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(r("path"));return 1===(null==e?void 0:e.split(",").length)?this.parentNode:de(this.parentNode,r("path"),void 0,e=>1===(null==e?void 0:e.split(",").length))},this.getWidgetLanguages=()=>function(e){return[e.getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter(e=>!!e)}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>function(e,t){return t.reduce((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null},null)}(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.getAutofillValue=()=>{var e;const t=this.getModel();return new ye(this.services.config,this.services.context.getRegistry()).resolveValue(null===(e=t.props.control)||void 0===e?void 0:e.autofill,t.id)},this.getValidatedAutofillValue=()=>this.isAutofillValidated?this.validatedAutofillValue:void 0,this.syncAutofillContextRecord=(e,t)=>{this.isAutofillValidated=!0,this.validatedAutofillValue=e?t:void 0,e&&this.services.context.updateRecord(this.getModel().id,{value:t})},this.addContextRecord=()=>{var e,t;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!==(e=this.getValidatedAutofillValue())&&void 0!==e?e:n.props.control.defaultValue||"",viewIndex:null===(t=n.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(n.props)}})},this.getContextRecordLabel=e=>{var t,n,o,r,i,a;const s=e.control.name;if(["email","first_name","last_name"].includes(s))return s.toUpperCase();if((null===(t=e.content)||void 0===t?void 0:t.label)&&(null===(r=null===(o=null===(n=e.adaptiveStyles)||void 0===n?void 0:n.desktop.find(e=>"label"===e.element))||void 0===o?void 0:o.params)||void 0===r?void 0:r.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return(null===(i=e.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(e.content.placeholder):(null===(a=e.control)||void 0===a?void 0:a.integrationName)?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{var t;switch(null===(t=e.control)||void 0===t?void 0:t.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find(e=>e.category===me);n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:v.REQUEST}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>{var e;return(null===(e=this.getProps())||void 0===e?void 0:e.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then(()=>{this.attachHandlers()});const e=document.createElement("style");e.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(e)}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}}Ee._resolveTogglableStylesForElementModel=e=>{const t=Object.assign({},e);return Object.keys(t).forEach(e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=Ee._resolveTogglableStyles(t[e]))}),t},Ee._resolveTogglableStyles=e=>{const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach(e=>{e in t&&(t[e]=t[n]?t[e]:o)}),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t};const Se=Ee;function Oe(e,t,n){if("en"===n&&e>1)return t[1];const o=Math.abs(e);return t[o%100>4&&o%100<20?2:[2,0,1,1,1,2][o%10<5?o%10:5]]}function Fe(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(e=>e.remove()),t.querySelectorAll("*").forEach(e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(t=>e.removeAttribute(t)),Array.from(e.attributes).forEach(t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)}),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}}),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ke(o.key),o)}}function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}function Me(e,t,n,o){var r=Ne(Ie(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof r?function(e){return r.apply(n,e)}:r}function Ne(){return Ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Ne.apply(null,arguments)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Pe(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var Ue=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Pe(t=function(e,t,n){return t=Ie(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Re()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"getEndDateData",function(e){if("FROM_THE_START_OF_DISPLAYING"===e.content.mode){var n=t.getStoredRelativeStartDate(),o=t.getLengthMs(e.content.lengthFromTheStart);return n?{dateInMs:new Date(n).getTime()+o,shouldBeStored:!1}:{dateInMs:(new Date).getTime()+o,shouldBeStored:!0}}return{dateInMs:new Date(e.content.endDate).getTime(),shouldBeStored:!1}}),Pe(t,"getLengthMs",function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e,t)||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.")}()}(e.split(".").map(Number),4);return 864e5*t[0]+36e5*t[1]+6e4*t[2]+1e3*t[3]}),Pe(t,"getStoredRelativeStartDate",function(){var e;if(t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode)return null===(e=t.services.config.getConfig("getRelativeTimerViewDate"))||void 0===e?void 0:e()}),Pe(t,"storeRelativeStartDate",function(){var e;t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode&&(null===(e=t.services.config.getConfig("storeRelativeTimerViewDate"))||void 0===e||e())}),Pe(t,"clearRelativeStartDate",function(){var e;t.isStaticRenderMode()&&"FROM_THE_START_OF_DISPLAYING"===t.getProps().content.mode&&(null===(e=t.services.config.getConfig("clearRelativeTimerViewDate"))||void 0===e||e())}),Pe(t,"getDateWithTimeZone",function(e,t){var n=t?new Date(t):new Date;return e?new Date(n.toLocaleString("en-US",{timeZone:e})):n}),Pe(t,"splitMilliseconds",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("number"!=typeof e||e<0)return{days:0,hours:0,minutes:0,seconds:0,milliseconds:0};var n=e,o={},r=function(e,t,r){var i=Math.floor(n/e);o[r]=t?i:0,n=t?n-i*e:n};return r(864e5,t.days,"days"),r(36e5,t.hours,"hours"),r(6e4,t.minutes,"minutes"),r(1e3,t.seconds,"seconds"),o.milliseconds=n,o}),Pe(t,"drawTimer",function(e,n){var o=t.getRootElement().querySelector(".countdownContainer"),r=!1!==e.content.labelsEnabled,i=t.createElementContainers(o,r),a=t.getTranslationsMap(t.manifest.i18n),s=a.translations,c=a.language,l=e.content.format||(e.content.showDays?"DD:HH:MM:SS":"HH:MM:SS"),u=t.parseFormat(l),d=n+50,m=t.splitMilliseconds(d,u),b=m.days,h=m.hours,p=m.minutes,g=m.seconds;u.days&&t.createCounterElement(i,b,"day",s,c),u.hours&&(u.days&&t.addSeparatorElements(i),t.createCounterElement(i,h,"hour",s,c)),u.minutes&&((u.days||u.hours)&&t.addSeparatorElements(i),t.createCounterElement(i,p,"minute",s,c)),u.seconds&&((u.days||u.hours||u.minutes)&&t.addSeparatorElements(i),t.createCounterElement(i,g,"second",s,c)),t.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles)}),Pe(t,"createElementContainers",function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Fe({element:e,html:""});var n=document.createElement("div");n.className="countersContainer";var o=document.createElement("div");return o.className="labelsContainer",e.classList.toggle("countdownContainer--noLabels",!t),e.append(n),t&&e.append(o),{countersContainerElement:n,labelsContainerElement:o}}),Pe(t,"parseFormat",function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toUpperCase();return{days:e.includes("D"),hours:e.includes("H"),minutes:e.includes("M"),seconds:e.includes("S")}}),Pe(t,"createCounterElement",function(e,n,o,r,i){var a=document.createElement("div");a.setAttribute("cl-element","counterContainer"),a.className="counterContainer";var s=document.createElement("span");s.setAttribute("cl-element","counter"),s.className="counter",Fe({element:s,html:n>=10?n:"0".concat(n)});var c=document.createElement("div");c.className="counterLabelContainer";var l=document.createElement("span");l.setAttribute("cl-element","label"),l.className="counterLabel",Fe({element:l,html:Oe(n,t.getLabelKeys(r,o),i)}),a.appendChild(s),c.appendChild(l),e.countersContainerElement.appendChild(a),e.labelsContainerElement.appendChild(c)}),Pe(t,"getLabelKeys",function(e,t){return[e["content,counterLabel,".concat(t,",single")],e["content,counterLabel,".concat(t,",upToFour")],e["content,counterLabel,".concat(t,",fromFive")]]}),Pe(t,"addSeparatorElements",function(e){var t=document.createElement("div");t.setAttribute("cl-element","separator"),t.className="counter-separator",t.textContent=":";var n=t.cloneNode(!0);n.className="label-separator",e.countersContainerElement.appendChild(t),e.labelsContainerElement.appendChild(n)}),Pe(t,"manifest",s),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(e,Se),function(e,t){return t&&Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"connectedCallback",value:function(){var t=this;Me(e,"connectedCallback",this,3)([]),this.getRootElement().innerHTML+="\n".concat("\n<style>\n.countdownContainer {\n display: flex;\n flex-direction: column;\n /* Carries the host height inwards. Without it this box is content-sized, and\n the flex-grow below plus the counters' height:100% never get any room to\n share - which is why setting a height used to do nothing at all. Under the\n default by-content height this resolves to auto, so nothing changes. */\n height: 100%;\n}\n\n.labelsContainer,\n.countersContainer {\n display: flex;\n align-items: center;\n width: 100%;\n}\n\n.countersContainer {\n flex-grow: 1;\n margin-bottom: 5px;\n}\n\n/* that margin only exists to separate the counters from the labels below */\n.countdownContainer--noLabels .countersContainer {\n margin-bottom: 0;\n}\n\n.counterLabelContainer,\n.counterContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n width: 100%;\n min-width: 40px;\n}\n\n.counterContainer {\n height: 100%;\n}\n\n.counter-separator,\n.label-separator {\n margin: 0 5px;\n font-weight: 700;\n font-size: 16px;\n}\n\n.label-separator {\n /* \n limit label separator height so that it never will be higher than label or container,\n still having the same width as counter separator\n */\n height: 3px;\n opacity: 0;\n}\n\n.counter, .counterLabel {\n width: 100%;\n}\n\n.counter {\n margin: 5px;\n}\n\n.counterLabel {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n</style>\n ",'\n<div class="countdownContainer"></div>\n'),this.observeProps(function(e,n){clearInterval(t.intervalId);var o="FROM_THE_START_OF_DISPLAYING"===n.content.mode?null:function(e){return e&&"Europe/Kyiv"===e?"Europe/Kiev":e}(n.content.timeZone),r=t.getEndDateData(n),i=r.dateInMs,a=i-t.getDateWithTimeZone(o).getTime();a<=0&&(t.clearRelativeStartDate(),r=t.getEndDateData(n),a=(i=r.dateInMs)-t.getDateWithTimeZone(o).getTime()),r.shouldBeStored&&t.storeRelativeStartDate(i),t.drawTimer(n,a>=0?a:0),a<=0||t.services.config.getConfig("devMode")||(t.intervalId=setInterval(function(){var e=i-t.getDateWithTimeZone(o).getTime();t.drawTimer(n,e>=0?e:0),e<=0&&clearInterval(t.intervalId)},1e3))})}},{key:"disconnectedCallback",value:function(){Me(e,"disconnectedCallback",this,3)([]),clearInterval(this.intervalId)}}])}();Pe(Ue,"define",{name:"sys-countdown-timer",model:s.name,manifest:s});export{Ue as default};window.clComponentClass_SysCountdownTimerComponent=Ue;
@@ -1 +1 @@
1
- const t="cl-";function e(e){return t+e}function n(t){return"cl-"+t}const o="VIEW",r="MODULE",i="CONTAINER",s="INPUT",a="BUTTON",l="CONSENT",c="COLUMN";var u,h;(h=u||(u={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",h.REQUEST="REQUEST",h.DISPATCH_EVENT="DISPATCH_EVENT",h.GO_TO_VIEW="GO_TO_VIEW",h.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",h.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",h.SHOW_WIDGET="SHOW_WIDGET",h.OPEN_LINK="OPEN_LINK",h.CLOSE_WIDGET="CLOSE_WIDGET",h.CLICK="CLICK";const d=u;var p,m;class g{static sortActions(t){const e={[d.CLOSE_WIDGET]:-1,[d.OPEN_LINK]:-2,[d.SHOW_WIDGET]:1,[d.SUBSCRIBE_CONTACT]:2,[d.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=g.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,o){this.state=t;const r=o(),i=r.getAttribute(n("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(n("type")));let o=0;for(;e[o]&&e[o].getAttribute(n("id"))!==i;){let t=e[o].getAttribute(n("type"));if(g.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;o++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((r.shadowRoot||r).querySelectorAll(this.config.relativeSelector)):[r],this.targetElements.forEach(t=>{t.addEventListener("click",this.listener)})}async execute(){var t,e,n,o;try{for(var r,i=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise(function(o,r){!function(t,e,n,o){Promise.resolve(o).then(function(e){t({value:e,done:n})},e)}(o,r,(e=t[n](e)).done,e.value)})}}}(this.eventsQueue);!(t=(r=await s.next()).done);i=!0){o=r.value,i=!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{i||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(t=>{t.removeEventListener("click",this.listener)}),this.targetElements=[])}}g.IGNORING_VIEW_ENTRY_TYPES=[a,l,s],(m=p||(p={})).CLICK="CLICK",m.COMPONENT_EVENT="COMPONENT_EVENT";class f{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,o){var r;const i=null===(r=o())||void 0===r?void 0:r.getAttribute(n("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 E{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 p.CLICK:return new g(t,e);case p.COMPONENT_EVENT:return new f(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class y{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 b{constructor(){this.listeners=b.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=y.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=b.createDefaultListenersState()}}b.createDefaultListenersState=()=>({"*":{}});const v=b,O=(t,e,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:s}=r;(i||s).call(t,e,n,o)};class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class T{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===r?Object.assign(Object.assign({},t),T.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 A,_,C,I,N,R,L,P,M,U,w,D,j,k,x;T.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(_=A||(A={})).VIEW="VIEW",_.CONTAINER="CONTAINER",_.TEXT="TEXT",_.INPUT="INPUT",_.BUTTON="BUTTON",_.IMAGE="IMAGE",_.CONSENT="CONSENT",_.COUNTDOWN_TIMER="COUNTDOWN_TIMER",_.PROMO_CODE="PROMO_CODE",_.MULTIPLE_INPUT="MULTIPLE_INPUT",_.VIDEO="VIDEO",_.SLIDER="SLIDER",_.SLIDE="SLIDE",_.SOCIAL="SOCIAL",_.COLUMNS="COLUMNS",_.COLUMN="COLUMN",_.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(C||(C={})).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"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(N||(N={})),(R||(R={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(L||(L={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(P||(P={})),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"}(M||(M={})),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"}(U||(U={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(w||(w={})),(j=D||(D={})).BEFORE="BEFORE",j.AFTER="AFTER",j.INSIDE="INSIDE",j.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"}(k||(k={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(x||(x={})),I.REQUEST,I.SUBSCRIBE_CONTACT;class F{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class W extends v{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(W.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(W.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(W.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}W.changeEventName="CHANGE";const B=W;class G{static set(t,e){const n=t[G.accumulatorPropertyName]||{};t[G.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[G.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}G.accumulatorPropertyName="clStyleAttributes";const V=G;var H;!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"}(H||(H={}));class ${static applyHostStyles(t,e,n=null,r){var s,a,l;const u=null===(a=null===(s=null==n?void 0:n.props)||void 0===s?void 0:s.handlers)||void 0===a?void 0:a.find(t=>"CLICK"===t.type);u&&(null===(l=u.actions)||void 0===l?void 0:l.length)&&(e.style.cursor="pointer"),t!==o&&t!==i&&t!==c||(e.style.display=r===H.CONTENT_LOCKER&&t===o?"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 K{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.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,r,i,s,a;const l=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find(t=>t.element===n),c=(null===(i=e.styles)||void 0===i?void 0:i.find(t=>t.element===n))||{},u=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),h=this.parseBackground(u);h.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})}),Promise.all([...this.envUrlMaps[t].entries()].map(([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;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),F.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 r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,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 z=new class{execute(t,e="GET",n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function Q(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class q{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 Y{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 J;!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"}(J||(J={}));const X=J;class Z{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(X.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(X.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 Y(this.onCounterStateUpdate)}}}const tt=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>tt(...t)}},et=tt,nt="props",ot="shared",rt="environment";function it(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(t)}const st="SUBMIT";function at(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 lt={DESKTOP:"desktop",MOBILE:"mobile"};function ct(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 ut(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(t=>t.remove()),e.querySelectorAll("*").forEach(t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(e=>t.removeAttribute(e)),Array.from(t.attributes).forEach(e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)}),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}}),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}const ht=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class dt extends ht{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var pt,mt,gt;function ft(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"}(pt||(pt={})),(gt=mt||(mt={})).STATIC="STATIC",gt.DATA_LAYER="DATA_LAYER",gt.URL_QUERY_PARAMS="URL_QUERY_PARAMS",gt.JS_API_VARIABLE="JS_API_VARIABLE",gt.COOKIE="COOKIE",gt.LOCAL_STORAGE="LOCAL_STORAGE";class Et{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")===pt.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===mt.STATIC)return ft(null==n?void 0:n.value);const r=t.getSource(e);if(!r)return;const i=r.getValue(o);return ft("function"==typeof(null==i?void 0:i.processor)?i.processor(r,Object.assign({id:o},n)):null==i?void 0:i.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class yt extends HTMLElement{constructor(){var o;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(n("id")),o=this.getWidgetContainerNode();if(!o)throw new Error("Widget container not found in construct");const r=o.closest(`[${n("widget-id")}]`);let i;r&&(i=r.getAttribute(n("widget-id")));let s=new dt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(n("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=et(nt,ot,rt),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 S({}),this.componentEventEmitter=new v,this.componentResourceManager=new Z(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new E(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(nt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),o=n("floating");t.floating&&!e.getAttribute(o)?e.setAttribute(o,"true"):!t.floating&&e.getAttribute(o)&&e.removeAttribute(o)}),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(ot).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new K(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),z),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(B.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(rt).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")===pt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===pt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(nt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ot).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(rt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${n("element")}]`)).filter(t=>!t.hasAttribute(n("component")))],this.getElement=(t,e)=>this.getElements().find(o=>e?o.getAttribute(n("element"))===t&&o.id===e:o.getAttribute(n("element"))===t),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const o=this.getElements();if(!o.length)return;const r=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach(t=>{const e=t.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach(n=>{n.element===e&&(at(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(at(n,t),r=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))}),n}(t,e),i=n("type"),s="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${s}"]`);a||(a=document.createElement("style"),a.setAttribute(i,s),this.getRootElement().appendChild(a)),ut({element:a,html:""}),o.forEach(t=>{let e=t.getAttribute(n("element"));const o=this.getEnvironment();let i=ct(r,o,e);if(i){if(this.resizeListener.isMobile()){const t=ct(r,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}}),this._addLinkColor(a,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,o)=>{var r,i;const s=[];"host"===(e=yt._resolveTogglableStylesForElementModel(e)).element&&($.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let a=e.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],O(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),O(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,s)});if(V.set(t,c),this._setClassAttributes(t,e),o){if(e.hoverStyleAttributes){let r=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(),o=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${o}`);i||(i=document.createElement("style"),i.id=o,t.appendChild(i)),ut({element:i,html:`\n ${n}::before {\n content: '';\n background: ${r.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 `}),r=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}r.borderTopWidth&&"0px"!==r.borderTopWidth||delete r.borderTopColor,r.borderBottomWidth&&"0px"!==r.borderBottomWidth||delete r.borderBottomColor,r.borderLeftWidth&&"0px"!==r.borderLeftWidth||delete r.borderLeftColor,r.borderRightWidth&&"0px"!==r.borderRightWidth||delete r.borderRightColor,this._addStylesToStyleElement(o,e.element,r,`:not(.${n("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(o,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(o,this.getShared()),this.stylesAppliedToElement(t,e,o)}},this.applySharedClassesToElementModel=e=>function(e,n){let o=e;return(o.classes||"").split(" ").filter(e=>e.startsWith(t)).forEach(t=>{var e;let r=null===(e=n.textClasses)||void 0===e?void 0:e[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&n.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.headerFontFamily})})),!r.isHeader&&n.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))}),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:n.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,o,r="",i)=>{const s=Object.keys(o).reduce((t,e)=>t+` ${q.camelCaseToDashCase(e)}: ${o[e]}${i?" !important;":";"}`,"");ut({element:t,html:`[${n("element")}="${e}"]${r} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{ut({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&ut({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)&&ut({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&ut({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(n,o)=>{Array.from(n.classList).filter(t=>t!==e("hovered")&&t!==e("focused")).forEach(e=>{e.startsWith(t)&&n.classList.remove(e)});const r=((n.getAttribute("class")||"")+" "+o.classes).trim();n.setAttribute("class",r)},this.getParentComponent=()=>it(this.parentNode,n("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(n("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:it(this.parentNode,n("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(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)}(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 Et(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,r,i,s;const a=t.control.name;if(["email","first_name","last_name"].includes(a))return a.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(r=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find(t=>"label"===t.element))||void 0===o?void 0:o.params)||void 0===r?void 0:r.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(i=t.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find(t=>t.category===st);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:d.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===(o=this.constructor.define)||void 0===o?void 0:o.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()}}yt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=yt._resolveTogglableStyles(e[t]))}),e},yt._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 bt=yt;var vt={FOLLOW:"FOLLOW",SHARE:"SHARE"},Ot={FACEBOOK:"FACEBOOK",INSTAGRAM:"INSTAGRAM",LINKEDIN:"LINKEDIN",TWITTER:"TWITTER",CUSTOM:"CUSTOM",EMAIL:"EMAIL",PINTEREST:"PINTEREST",WHATSAPP:"WHATSAPP"},St={ROUNDED:"ROUNDED"};function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function At(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,_t(o.key),o)}}function _t(t){var e=function(t){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}var Ct=function(){return function(t,e){return e&&At(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.imgPath="".concat(e.replace(/\/$/,""),"/img")},[{key:"getValidPlatformName",value:function(t){return Ot[t.type]?t.type:Ot.CUSTOM}},{key:"getValidIconMode",value:function(t){return(St[t.mode]?t.mode:St.ROUNDED).toLowerCase()}},{key:"getDefaultImage",value:function(){return"".concat(this.imgPath,"/image-placeholder.svg")}},{key:"getPlatformImageUrl",value:function(t){if(t.image)return t.image;var e=this.getValidPlatformName(t);if(e===Ot.CUSTOM)return this.getDefaultImage();var n="".concat(e.toLowerCase(),"-logo"),o=this.getValidIconMode(t),r=o?"-".concat(o):"";return"".concat(this.imgPath,"/").concat(n).concat(r,".svg")}}])}();const It={name:"SysSocialComponent",componentType:"SOCIAL",version:"1.0.0",events:{dispatch:[],listen:[]},contextMenuModel:function(t){return Object.values(lt).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SOCIAL_ICON_SIZE",propPath:["control","size","desktop"]},{type:"CONTROL",name:"SOCIAL_TYPE_AND_ICON_SELECT",propPath:["control"]}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SOCIAL_ICON_SIZE",propPath:["control","size","mobile"]},{type:"CONTROL",name:"SOCIAL_TYPE_AND_ICON_SELECT",propPath:["control"]}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["content,text","handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{control:{options:[{type:"FACEBOOK",order:0},{type:"INSTAGRAM",order:1},{type:"LINKEDIN",order:2},{type:"TWITTER",order:3}],mode:"FOLLOW",size:{desktop:32,mobile:32}},adaptiveStyles:{desktop:[{element:"host",styleAttributes:{}}],mobile:[{element:"host",styleAttributes:{}}]}},metaDescription:{icon:"/SysSocialComponent/assets/img/social-component-icon.svg",label:{en:"Social",ru:"Социальные сети",uk:"Соціальні мережі",es:"Social",de:"Social",fr:"Social",it:"Social",pt:"Social",ro:"Social",bg:"Social",cs:"Social",el:"Social",nl:"Social",pl:"Social",sv:"Social",tr:"Social",ar:"Social",zh:"社群媒体",da:"Social",he:"Social",fi:"Social",hi:"Social",hr:"Social",hu:"Social",id:"Social",ja:"Social",ko:"Social",no:"Social",sk:"Social",sl:"Social",sr:"Social"}},syncEnabled:!0,stylesImitationEnabled:!0};function Nt(t){return Nt="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},Nt(t)}function Rt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lt(t){var e=t&&t.type;return Boolean(e)}function Pt(t){return Pt="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},Pt(t)}function Mt(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 Ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(n),!0).forEach(function(e){wt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function wt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dt(t){var e,n,o,r,i=function(t){Array.isArray(t.options)||(console.warn("SysSocial: options should be an array, setting default value"),t.options=[]);var e=t.options.filter(Lt);return e.length!==t.options.length&&(console.error("SysSocial: options contain invalid platforms, filtering them out"),t.options=e),Object.values(vt).includes(t.mode)||(console.error("SysSocial: mode is invalid, setting default value"),t.mode=vt.FOLLOW),"object"!==Pt(t.size)&&Number.isNaN(Number(t.size))&&(console.error("SysSocial: size should be a number, setting default value"),t.size=32),"string"!=typeof t.size&&"number"!=typeof t.size||(console.warn("SysSocial: migrating size from primitive to object"),t.size={desktop:t.size,mobile:t.size}),t}(Ut({},null==t?void 0:t.control));return i.mode===vt.SHARE&&(i.options=(n=(e=i).options,o=e.shareUrl,r="INTERNAL"===e.shareUrlType?window.location.href:o,n.reduce(function(t,e){var n=function(t){return t?Rt(Rt(Rt(Rt(Rt(Rt({},Ot.FACEBOOK,function(t){var e=t.url;return"https://www.facebook.com/sharer/sharer.php?u=".concat(e)}),Ot.LINKEDIN,function(t){var e=t.url;return"https://www.linkedin.com/sharing/share-offsite/?url=".concat(e)}),Ot.TWITTER,function(t){var e=t.url;return"https://twitter.com/intent/tweet?url=".concat(e)}),Ot.PINTEREST,function(t){var e=t.url;return"https://www.pinterest.com/pin/create/button/?url=".concat(e)}),Ot.WHATSAPP,function(t){var e=t.url;return"https://wa.me/?text=".concat(e)}),Ot.EMAIL,function(t){var e=t.url,n=t.subject,o=void 0===n?"":n;return"mailto:?body=".concat(e,"&subject=").concat(o)})[t.type]:null}(e);return n&&t.push(Ut(Ut({},e),{},{url:n(Ut({url:r},e.props))})),t},[]))),i}function jt(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(t=>t.remove()),e.querySelectorAll("*").forEach(t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(e=>t.removeAttribute(e)),Array.from(t.attributes).forEach(e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)}),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}}),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}function kt(t){return kt="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},kt(t)}function xt(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 Ft(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,$t(o.key),o)}}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wt=function(){return!!t})()}function Bt(){return Bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gt(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},Bt.apply(null,arguments)}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gt(t)}function Vt(t,e){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vt(t,e)}function Ht(t,e,n){return(e=$t(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $t(t){var e=function(t){if("object"!=kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kt(e)?e:e+""}var Kt=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),Ht(e=function(t,e,n){return e=Gt(e),function(t,e){if(e&&("object"==kt(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,Wt()?Reflect.construct(e,n||[],Gt(t).constructor):e.apply(t,n))}(this,t),"createContent",function(t){var n=e.getElement("social"),o=Dt(t),r=n.querySelector(".items-wrapper");r?e._renderItemsForExistingComponent(r,o):e._renderItemsForEmptyComponent(n,o)}),Ht(e,"_renderItemsForEmptyComponent",function(t,n){var o=document.createElement("div");o.classList.add("items-wrapper"),e.addItemsContent(o,n),jt({element:t,html:""}),t.append(o)}),Ht(e,"_renderItemsForExistingComponent",function(t,n){var o={};n.options.forEach(function(r){var i=e.getPlatformKey(r),s=t.querySelector('[key="'.concat(i,'"]'));o[i]=s?e._updatePlatformComponent(s,r,n):e._createNewPlatformComponent(t,r,n),e._setPlatformStyles(o[i],r)});var r,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return xt(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)?xt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t.children);try{for(i.s();!(r=i.n()).done;){var s=r.value,a=s.getAttribute("key");o[a]||t.removeChild(s)}}catch(t){i.e(t)}finally{i.f()}}),Ht(e,"_updatePlatformComponent",function(t,n,o){var r=t.querySelector("img"),i=e.urlManager.getPlatformImageUrl(n);r.src!==i&&(r.src=i);var s=o.size[e.getEnvironment()];return s!==r.width&&(r.height=s,r.width=s),t}),Ht(e,"_createNewPlatformComponent",function(t,n,o){var r=e.createPlatformComponent(n,o);return t.append(r),r}),Ht(e,"addItemsContent",function(t,n){return t.classList.add("social-list"),t.setAttribute("role","list"),n.options.forEach(function(o){t.append(e.createPlatformComponent(o,n))}),t}),Ht(e,"createPlatformComponent",function(t,n){var o,r=n.size,i=t.url;i?((o=document.createElement("a")).setAttribute("href",i||"#"),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.setAttribute("aria-label",e.getPlatformAccessibleLabel(t))):((o=document.createElement("div")).setAttribute("role","img"),o.setAttribute("aria-label",e.getPlatformAccessibleLabel(t))),o.classList.add("social-list-item"),o.setAttribute("key",e.getPlatformKey(t)),e._setPlatformStyles(o,t);var s=e.urlManager.getPlatformImageUrl(t),a=r[e.getEnvironment()],l=document.createElement("img");return l.src=s,l.height=a,l.width=a,l.alt="",l.setAttribute("aria-hidden","true"),jt({element:o,html:""}),o.appendChild(l),o}),Ht(e,"getPlatformKey",function(t){return"".concat(t.type,"-").concat(t.order)}),Ht(e,"_setPlatformStyles",function(t,e){t.setAttribute("style","order:".concat(e.order))}),Ht(e,"getPlatformAccessibleLabel",function(t){var e={FACEBOOK:"Facebook",INSTAGRAM:"Instagram",LINKEDIN:"LinkedIn",TWITTER:"Twitter",CUSTOM:"Custom social link",EMAIL:"Email",PINTEREST:"Pinterest",WHATSAPP:"WhatsApp"};return e[t.type]||e.CUSTOM}),Ht(e,"manifest",It),e.getRootElement().innerHTML="\n <style>".concat(t.componentStyle,"</style>\n ").concat(t.componentTemplate,"\n "),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vt(t,e)}(t,bt),function(t,e){return e&&Ft(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=Bt(Gt(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]),this.urlManager=new Ct(this.assets()),this.observeProps(function(t,n){e.createContent(n),e.applyAutoAdaptiveStyles(n.adaptiveStyles)}),this.observeEnvironment(function(){var t=e.getProps();e.createContent(t),e.applyAutoAdaptiveStyles(t.adaptiveStyles)})}}])}();Ht(Kt,"define",{name:"sys-social",model:It.name,manifest:It}),Ht(Kt,"componentStyle","\n .social-list {\n display: flex;\n gap: 10px;\n }\n \n .social-list-item {\n display: flex;\n }\n"),Ht(Kt,"componentTemplate",'\n <div class="social-container">\n <div cl-element="social" class="social-list-content">\n </div>\n </div>\n');export{Kt as default};window.clComponentClass_SysSocialComponent=Kt;
1
+ const t="cl-";function e(e){return t+e}function n(t){return"cl-"+t}const o="VIEW",r="MODULE",i="CONTAINER",s="INPUT",a="BUTTON",l="CONSENT",c="COLUMN";var u,h;(h=u||(u={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",h.REQUEST="REQUEST",h.DISPATCH_EVENT="DISPATCH_EVENT",h.GO_TO_VIEW="GO_TO_VIEW",h.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",h.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",h.SHOW_WIDGET="SHOW_WIDGET",h.OPEN_LINK="OPEN_LINK",h.CLOSE_WIDGET="CLOSE_WIDGET",h.CLICK="CLICK";const d=u;var p,m;class g{static sortActions(t){const e={[d.CLOSE_WIDGET]:-1,[d.OPEN_LINK]:-2,[d.SHOW_WIDGET]:1,[d.SUBSCRIBE_CONTACT]:2,[d.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=g.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,o){this.state=t;const r=o(),i=r.getAttribute(n("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),this.listener=t=>{const e=t.composedPath().filter(t=>t instanceof HTMLElement&&t.getAttribute(n("type")));let o=0;for(;e[o]&&e[o].getAttribute(n("id"))!==i;){let t=e[o].getAttribute(n("type"));if(g.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;o++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((r.shadowRoot||r).querySelectorAll(this.config.relativeSelector)):[r],this.targetElements.forEach(t=>{t.addEventListener("click",this.listener)})}async execute(){var t,e,n,o;try{for(var r,i=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise(function(o,r){!function(t,e,n,o){Promise.resolve(o).then(function(e){t({value:e,done:n})},e)}(o,r,(e=t[n](e)).done,e.value)})}}}(this.eventsQueue);!(t=(r=await s.next()).done);i=!0){o=r.value,i=!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{i||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach(t=>{t.removeEventListener("click",this.listener)}),this.targetElements=[])}}g.IGNORING_VIEW_ENTRY_TYPES=[a,l,s],(m=p||(p={})).CLICK="CLICK",m.COMPONENT_EVENT="COMPONENT_EVENT";class f{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,o){var r;const i=null===(r=o())||void 0===r?void 0:r.getAttribute(n("id"));this.actions.forEach(t=>{var e;return null===(e=t.setInitiatorComponentId)||void 0===e?void 0:e.call(t,i)}),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 E{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 p.CLICK:return new g(t,e);case p.COMPONENT_EVENT:return new f(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class y{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 b{constructor(){this.listeners=b.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=y.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=b.createDefaultListenersState()}}b.createDefaultListenersState=()=>({"*":{}});const v=b,O=(t,e,n,o)=>{const r=EventTarget.prototype,{addEventListenerBase:i,addEventListener:s}=r;(i||s).call(t,e,n,o)};class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class T{static extract(t){const e=t.views.map(t=>{const e=t.children.map(t=>t.type===r?Object.assign(Object.assign({},t),T.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 A,_,C,I,N,R,L,P,M,U,w,D,j,k,x;T.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(_=A||(A={})).VIEW="VIEW",_.CONTAINER="CONTAINER",_.TEXT="TEXT",_.INPUT="INPUT",_.BUTTON="BUTTON",_.IMAGE="IMAGE",_.CONSENT="CONSENT",_.COUNTDOWN_TIMER="COUNTDOWN_TIMER",_.PROMO_CODE="PROMO_CODE",_.MULTIPLE_INPUT="MULTIPLE_INPUT",_.VIDEO="VIDEO",_.SLIDER="SLIDER",_.SLIDE="SLIDE",_.SOCIAL="SOCIAL",_.COLUMNS="COLUMNS",_.COLUMN="COLUMN",_.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(C||(C={})).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"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(N||(N={})),(R||(R={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(L||(L={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(P||(P={})),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"}(M||(M={})),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"}(U||(U={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(w||(w={})),(j=D||(D={})).BEFORE="BEFORE",j.AFTER="AFTER",j.INSIDE="INSIDE",j.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"}(k||(k={})),function(t){t.TRUE_TERMINAL="TRUE_TERMINAL",t.INTERMEDIATE="INTERMEDIATE"}(x||(x={})),I.REQUEST,I.SUBSCRIBE_CONTACT;class F{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class W extends v{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",({isMobileEnv:t})=>{this._isMobile=t,this.emit(W.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(W.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(W.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}W.changeEventName="CHANGE";const B=W;class G{static set(t,e){const n=t[G.accumulatorPropertyName]||{};t[G.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[G.accumulatorPropertyName]).forEach(n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""})}}G.accumulatorPropertyName="clStyleAttributes";const V=G;var H;!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"}(H||(H={}));class ${static applyHostStyles(t,e,n=null,r){var s,a,l;const u=null===(a=null===(s=null==n?void 0:n.props)||void 0===s?void 0:s.handlers)||void 0===a?void 0:a.find(t=>"CLICK"===t.type);u&&(null===(l=u.actions)||void 0===l?void 0:l.length)&&(e.style.cursor="pointer"),t!==o&&t!==i&&t!==c||(e.style.display=r===H.CONTENT_LOCKER&&t===o?"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 K{constructor(t,e,n,o,r,i){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.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,r,i,s,a;const l=null===(r=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===r?void 0:r.find(t=>t.element===n),c=(null===(i=e.styles)||void 0===i?void 0:i.find(t=>t.element===n))||{},u=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),h=this.parseBackground(u);h.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})}),Promise.all([...this.envUrlMaps[t].entries()].map(([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then(t=>t.text()).then(o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))).then(()=>{var e;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),F.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 r;o=o.replace(`var(--${r=n,`cl-schema-${r}`})`,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 z=new class{execute(t,e="GET",n=null,o,r){const i={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,i)}};function Q(t,e){return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{})}class q{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 Y{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 J;!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"}(J||(J={}));const X=J;class Z{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(X.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(X.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 Y(this.onCounterStateUpdate)}}}const tt=(...t)=>{let e=t.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:[]}),{});return{get:t=>e[t],clear:()=>tt(...t)}},et=tt,nt="props",ot="shared",rt="environment";function it(t,e,n,o){const r=t=>{let i=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return i&&(o&&"function"==typeof o?o(i.getAttribute(e)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,e))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(t)}const st="SUBMIT";function at(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 lt={DESKTOP:"desktop",MOBILE:"mobile"};function ct(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 ut(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(t=>t.remove()),e.querySelectorAll("*").forEach(t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(e=>t.removeAttribute(e)),Array.from(t.attributes).forEach(e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)}),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}}),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}const ht=Object.getPrototypeOf(document.createEvent("CustomEvent")).constructor;class dt extends ht{constructor(t,e={},n){super(t,Object.assign(Object.assign({},n),{detail:e}))}}var pt,mt,gt;function ft(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"}(pt||(pt={})),(gt=mt||(mt={})).STATIC="STATIC",gt.DATA_LAYER="DATA_LAYER",gt.URL_QUERY_PARAMS="URL_QUERY_PARAMS",gt.JS_API_VARIABLE="JS_API_VARIABLE",gt.COOKIE="COOKIE",gt.LOCAL_STORAGE="LOCAL_STORAGE";class Et{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")===pt.UPDATING)return;const n=function(t,e,n,o){if(!e)return;if(e===mt.STATIC)return ft(null==n?void 0:n.value);const r=t.getSource(e);if(!r)return;const i=r.getValue(o);return ft("function"==typeof(null==i?void 0:i.processor)?i.processor(r,Object.assign({id:o},n)):null==i?void 0:i.value)}(this.registry,t.sourceType,t.config,e);if(void 0===n)return;const o=n.trim();return""===o?void 0:o}}class yt extends HTMLElement{constructor(){var o;super(),this.skipGameBlur=!0,this.isAutofillValidated=!1,this.validatedAutofillValue=void 0,this.construct=()=>{let t;const e=this.getAttribute(n("id")),o=this.getWidgetContainerNode();if(!o)throw new Error("Widget container not found in construct");const r=o.closest(`[${n("widget-id")}]`);let i;r&&(i=r.getAttribute(n("widget-id")));let s=new dt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(n("path")),id:e,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=et(nt,ot,rt),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 S({}),this.componentEventEmitter=new v,this.componentResourceManager=new Z(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new E(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(nt).forEach(e=>e(this.prevProps,t)),this.prevProps=t;const e=this.getHostElement(),o=n("floating");t.floating&&!e.getAttribute(o)?e.setAttribute(o,"true"):!t.floating&&e.getAttribute(o)&&e.removeAttribute(o)}),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(ot).forEach(t=>t(this.getShared()))}),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new K(this.documentModel,this.getHostElement(),()=>this.getShared(),()=>this.model.props,()=>this.getEnvironment(),z),this.colorSchemaListener.apply(this.getEnvironment()).then(()=>{this.subscriptions.push(this.colorSchemaListener.on())})),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(B.changeEventName,()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(rt).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")===pt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===pt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(nt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ot).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(rt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${n("element")}]`)).filter(t=>!t.hasAttribute(n("component")))],this.getElement=(t,e)=>this.getElements().find(o=>e?o.getAttribute(n("element"))===t&&o.id===e:o.getAttribute(n("element"))===t),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const o=this.getElements();if(!o.length)return;const r=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach(t=>{const e=t.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach(n=>{n.element===e&&(at(n,t),o=!0)}),n.mobile&&n.mobile.forEach(n=>{n.element===e&&(at(n,t),r=!0)}),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))}),n}(t,e),i=n("type"),s="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${s}"]`);a||(a=document.createElement("style"),a.setAttribute(i,s),this.getRootElement().appendChild(a)),ut({element:a,html:""}),o.forEach(t=>{let e=t.getAttribute(n("element"));const o=this.getEnvironment();let i=ct(r,o,e);if(i){if(this.resizeListener.isMobile()){const t=ct(r,"desktop",e);t&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),i.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(i),a)}}),this._addLinkColor(a,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,o)=>{var r,i;const s=[];"host"===(e=yt._resolveTogglableStylesForElementModel(e)).element&&($.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let a=e.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const t=new Image;t.src=l[1],O(t,"load",()=>{this.componentResourceManager.getPending().decrement()}),O(t,"error",()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()})}const c=Object.assign(Object.assign({},e),{styleAttributes:Q(e.styleAttributes,s)});if(V.set(t,c),this._setClassAttributes(t,e),o){if(e.hoverStyleAttributes){let r=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(),o=`flip-up-animation-${e.element}`;let i=this.getRootElement().querySelector(`#${o}`);i||(i=document.createElement("style"),i.id=o,t.appendChild(i)),ut({element:i,html:`\n ${n}::before {\n content: '';\n background: ${r.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 `}),r=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}r.borderTopWidth&&"0px"!==r.borderTopWidth||delete r.borderTopColor,r.borderBottomWidth&&"0px"!==r.borderBottomWidth||delete r.borderBottomColor,r.borderLeftWidth&&"0px"!==r.borderLeftWidth||delete r.borderLeftColor,r.borderRightWidth&&"0px"!==r.borderRightWidth||delete r.borderRightColor,this._addStylesToStyleElement(o,e.element,r,`:not(.${n("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(o,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(o,this.getShared()),this.stylesAppliedToElement(t,e,o)}},this.applySharedClassesToElementModel=e=>function(e,n){let o=e;return(o.classes||"").split(" ").filter(e=>e.startsWith(t)).forEach(t=>{var e;let r=null===(e=n.textClasses)||void 0===e?void 0:e[t];r&&(r.styleAttributes.fontFamily||(r.isHeader&&n.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.headerFontFamily})})),!r.isHeader&&n.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))}),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:n.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,o,r="",i)=>{const s=Object.keys(o).reduce((t,e)=>t+` ${q.camelCaseToDashCase(e)}: ${o[e]}${i?" !important;":";"}`,"");ut({element:t,html:`[${n("element")}="${e}"]${r} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{ut({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,r,i;e.linkColor&&ut({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)&&ut({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=e.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.removeUnderline)&&ut({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(n,o)=>{Array.from(n.classList).filter(t=>t!==e("hovered")&&t!==e("focused")).forEach(e=>{e.startsWith(t)&&n.classList.remove(e)});const r=((n.getAttribute("class")||"")+" "+o.classes).trim();n.setAttribute("class",r)},this.getParentComponent=()=>it(this.parentNode,n("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(n("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:it(this.parentNode,n("path"),void 0,t=>1===(null==t?void 0:t.split(",").length))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter(t=>!!t)}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(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)}(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 Et(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,r,i,s;const a=t.control.name;if(["email","first_name","last_name"].includes(a))return a.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(r=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find(t=>"label"===t.element))||void 0===o?void 0:o.params)||void 0===r?void 0:r.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(i=t.content)||void 0===i?void 0:i.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find(t=>t.category===st);n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:d.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===(o=this.constructor.define)||void 0===o?void 0:o.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()}}yt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach(t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=yt._resolveTogglableStyles(e[t]))}),e},yt._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 bt=yt;var vt={FOLLOW:"FOLLOW",SHARE:"SHARE"},Ot={FACEBOOK:"FACEBOOK",INSTAGRAM:"INSTAGRAM",LINKEDIN:"LINKEDIN",TWITTER:"TWITTER",CUSTOM:"CUSTOM",EMAIL:"EMAIL",PINTEREST:"PINTEREST",WHATSAPP:"WHATSAPP"},St={ROUNDED:"ROUNDED"};function Tt(t){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(t)}function At(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,_t(o.key),o)}}function _t(t){var e=function(t){if("object"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(e)?e:e+""}var Ct=function(){return function(t,e){return e&&At(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.imgPath="".concat(e.replace(/\/$/,""),"/img")},[{key:"getValidPlatformName",value:function(t){return Ot[t.type]?t.type:Ot.CUSTOM}},{key:"getValidIconMode",value:function(t){return(St[t.mode]?t.mode:St.ROUNDED).toLowerCase()}},{key:"getDefaultImage",value:function(){return"".concat(this.imgPath,"/image-placeholder.svg")}},{key:"getPlatformImageUrl",value:function(t){if(t.image)return t.image;var e=this.getValidPlatformName(t);if(e===Ot.CUSTOM)return this.getDefaultImage();var n="".concat(e.toLowerCase(),"-logo"),o=this.getValidIconMode(t),r=o?"-".concat(o):"";return"".concat(this.imgPath,"/").concat(n).concat(r,".svg")}}])}();const It={name:"SysSocialComponent",componentType:"SOCIAL",version:"1.0.0",events:{dispatch:[],listen:[]},contextMenuModel:function(t){return Object.values(lt).map(e=>({type:"GROUP",propPath:["adaptiveStyles",e],children:t}))}([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SOCIAL_ICON_SIZE",propPath:["control","size","desktop"]},{type:"CONTROL",name:"SOCIAL_TYPE_AND_ICON_SELECT",propPath:["control"]}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SOCIAL_ICON_SIZE",propPath:["control","size","mobile"]},{type:"CONTROL",name:"SOCIAL_TYPE_AND_ICON_SELECT",propPath:["control"],displayCondition:function(t){return!t.component.getProps().control.typeSelectDisabled}}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:function(t){return!t.component.getProps().control.actionsDisabled}}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["content,text","handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],props:{control:{options:[{type:"FACEBOOK",order:0},{type:"INSTAGRAM",order:1},{type:"LINKEDIN",order:2},{type:"TWITTER",order:3}],mode:"FOLLOW",size:{desktop:32,mobile:32}},adaptiveStyles:{desktop:[{element:"host",styleAttributes:{}}],mobile:[{element:"host",styleAttributes:{}}]}},metaDescription:{icon:"/SysSocialComponent/assets/img/social-component-icon.svg",label:{en:"Social",ru:"Социальные сети",uk:"Соціальні мережі",es:"Social",de:"Social",fr:"Social",it:"Social",pt:"Social",ro:"Social",bg:"Social",cs:"Social",el:"Social",nl:"Social",pl:"Social",sv:"Social",tr:"Social",ar:"Social",zh:"社群媒体",da:"Social",he:"Social",fi:"Social",hi:"Social",hr:"Social",hu:"Social",id:"Social",ja:"Social",ko:"Social",no:"Social",sk:"Social",sl:"Social",sr:"Social"}},syncEnabled:!0,stylesImitationEnabled:!0};function Nt(t){return Nt="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},Nt(t)}function Rt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lt(t){var e=t&&t.type;return Boolean(e)}function Pt(t){return Pt="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},Pt(t)}function Mt(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 Ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(n),!0).forEach(function(e){wt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function wt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dt(t){var e,n,o,r,i=function(t){Array.isArray(t.options)||(console.warn("SysSocial: options should be an array, setting default value"),t.options=[]);var e=t.options.filter(Lt);return e.length!==t.options.length&&(console.error("SysSocial: options contain invalid platforms, filtering them out"),t.options=e),Object.values(vt).includes(t.mode)||(console.error("SysSocial: mode is invalid, setting default value"),t.mode=vt.FOLLOW),"object"!==Pt(t.size)&&Number.isNaN(Number(t.size))&&(console.error("SysSocial: size should be a number, setting default value"),t.size=32),"string"!=typeof t.size&&"number"!=typeof t.size||(console.warn("SysSocial: migrating size from primitive to object"),t.size={desktop:t.size,mobile:t.size}),t}(Ut({},null==t?void 0:t.control));return i.mode===vt.SHARE&&(i.options=(n=(e=i).options,o=e.shareUrl,r="INTERNAL"===e.shareUrlType?window.location.href:o,n.reduce(function(t,e){var n=function(t){return t?Rt(Rt(Rt(Rt(Rt(Rt({},Ot.FACEBOOK,function(t){var e=t.url;return"https://www.facebook.com/sharer/sharer.php?u=".concat(e)}),Ot.LINKEDIN,function(t){var e=t.url;return"https://www.linkedin.com/sharing/share-offsite/?url=".concat(e)}),Ot.TWITTER,function(t){var e=t.url;return"https://twitter.com/intent/tweet?url=".concat(e)}),Ot.PINTEREST,function(t){var e=t.url;return"https://www.pinterest.com/pin/create/button/?url=".concat(e)}),Ot.WHATSAPP,function(t){var e=t.url;return"https://wa.me/?text=".concat(e)}),Ot.EMAIL,function(t){var e=t.url,n=t.subject,o=void 0===n?"":n;return"mailto:?body=".concat(e,"&subject=").concat(o)})[t.type]:null}(e);return n&&t.push(Ut(Ut({},e),{},{url:n(Ut({url:r},e.props))})),t},[]))),i}function jt(t){const{element:e,html:n,appendHtml:o}=t,r=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach(t=>t.remove()),e.querySelectorAll("*").forEach(t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach(e=>t.removeAttribute(e)),Array.from(t.attributes).forEach(e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)}),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}}),e.body.innerHTML}(n);o?e.innerHTML+=r:e.innerHTML=r}function kt(t){return kt="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},kt(t)}function xt(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 Ft(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,$t(o.key),o)}}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wt=function(){return!!t})()}function Bt(){return Bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gt(t)););return t}(t,e);if(o){var r=Object.getOwnPropertyDescriptor(o,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},Bt.apply(null,arguments)}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gt(t)}function Vt(t,e){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vt(t,e)}function Ht(t,e,n){return(e=$t(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $t(t){var e=function(t){if("object"!=kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kt(e)?e:e+""}var Kt=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),Ht(e=function(t,e,n){return e=Gt(e),function(t,e){if(e&&("object"==kt(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,Wt()?Reflect.construct(e,n||[],Gt(t).constructor):e.apply(t,n))}(this,t),"createContent",function(t){var n=e.getElement("social"),o=Dt(t),r=n.querySelector(".items-wrapper");r?e._renderItemsForExistingComponent(r,o):e._renderItemsForEmptyComponent(n,o)}),Ht(e,"_renderItemsForEmptyComponent",function(t,n){var o=document.createElement("div");o.classList.add("items-wrapper"),e.addItemsContent(o,n),jt({element:t,html:""}),t.append(o)}),Ht(e,"_renderItemsForExistingComponent",function(t,n){var o={};n.options.forEach(function(r){var i=e.getPlatformKey(r),s=t.querySelector('[key="'.concat(i,'"]'));o[i]=s?e._updatePlatformComponent(s,r,n):e._createNewPlatformComponent(t,r,n),e._setPlatformStyles(o[i],r)});var r,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return xt(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)?xt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t.children);try{for(i.s();!(r=i.n()).done;){var s=r.value,a=s.getAttribute("key");o[a]||t.removeChild(s)}}catch(t){i.e(t)}finally{i.f()}}),Ht(e,"_updatePlatformComponent",function(t,n,o){var r=t.querySelector("img"),i=e.urlManager.getPlatformImageUrl(n);r.src!==i&&(r.src=i);var s=o.size[e.getEnvironment()];return s!==r.width&&(r.height=s,r.width=s),t}),Ht(e,"_createNewPlatformComponent",function(t,n,o){var r=e.createPlatformComponent(n,o);return t.append(r),r}),Ht(e,"addItemsContent",function(t,n){return t.classList.add("social-list"),t.setAttribute("role","list"),n.options.forEach(function(o){t.append(e.createPlatformComponent(o,n))}),t}),Ht(e,"createPlatformComponent",function(t,n){var o,r=n.size,i=t.url;i?((o=document.createElement("a")).setAttribute("href",i||"#"),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.setAttribute("aria-label",e.getPlatformAccessibleLabel(t))):((o=document.createElement("div")).setAttribute("role","img"),o.setAttribute("aria-label",e.getPlatformAccessibleLabel(t))),o.classList.add("social-list-item"),o.setAttribute("key",e.getPlatformKey(t)),e._setPlatformStyles(o,t);var s=e.urlManager.getPlatformImageUrl(t),a=r[e.getEnvironment()],l=document.createElement("img");return l.src=s,l.height=a,l.width=a,l.alt="",l.setAttribute("aria-hidden","true"),jt({element:o,html:""}),o.appendChild(l),o}),Ht(e,"getPlatformKey",function(t){return"".concat(t.type,"-").concat(t.order)}),Ht(e,"_setPlatformStyles",function(t,e){t.setAttribute("style","order:".concat(e.order))}),Ht(e,"getPlatformAccessibleLabel",function(t){var e={FACEBOOK:"Facebook",INSTAGRAM:"Instagram",LINKEDIN:"LinkedIn",TWITTER:"Twitter",CUSTOM:"Custom social link",EMAIL:"Email",PINTEREST:"Pinterest",WHATSAPP:"WhatsApp"};return e[t.type]||e.CUSTOM}),Ht(e,"manifest",It),e.getRootElement().innerHTML="\n <style>".concat(t.componentStyle,"</style>\n ").concat(t.componentTemplate,"\n "),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vt(t,e)}(t,bt),function(t,e){return e&&Ft(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;!function(t,e,n){var o=Bt(Gt(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(t,0,this)([]),this.urlManager=new Ct(this.assets()),this.observeProps(function(t,n){e.createContent(n),e.applyAutoAdaptiveStyles(n.adaptiveStyles)}),this.observeEnvironment(function(){var t=e.getProps();e.createContent(t),e.applyAutoAdaptiveStyles(t.adaptiveStyles)})}}])}();Ht(Kt,"define",{name:"sys-social",model:It.name,manifest:It}),Ht(Kt,"componentStyle","\n .social-list {\n display: flex;\n gap: 10px;\n }\n \n .social-list-item {\n display: flex;\n }\n"),Ht(Kt,"componentTemplate",'\n <div class="social-container">\n <div cl-element="social" class="social-list-content">\n </div>\n </div>\n');export{Kt as default};window.clComponentClass_SysSocialComponent=Kt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/components",
3
- "version": "1.10.11",
3
+ "version": "1.10.12-socialinapp",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "prebuild": "rm -rf out",