@claspo/components 1.1.16 → 1.1.17

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",n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}class r{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){return t=t||document,Math.max(t.documentElement.clientWidth,t.defaultView.innerWidth||0)}static height(t){return t=t||document,Math.max(t.documentElement.clientHeight,t.defaultView.innerHeight||0)}static scrollbarWidth(t){return(t=t||document).defaultView.innerWidth-t.documentElement.clientWidth}}var a=[];for(var l in{transparent:"#0000"})a.push(l);var s="\\s*([.\\d%]+)\\s*",c="\\("+[s,s,s]+"(?:,\\s*([.\\d]+)\\s*)?\\)",d="(?:rgb)a?",h="("+a.join("|")+")";function p(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(d+c,"i"),RegExp([h,"(?:#([a-f0-9]{3,8}))",d+c,"(?:hsl)a?"+c].join("|"),"gi");var u=Array.prototype.concat,m=Array.prototype.slice,g=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];p(i)?e=u.call(e,m.call(i)):e.push(i)}return e};g.wrap=function(t){return function(){return t(g(arguments))}};const b=g;var v={},f=Object.hasOwnProperty,y=Object.create(null);for(var E in v)f.call(v,E)&&(y[v[E]]=E);var O={to:{},get:{}};function T(t,e,n){return Math.min(Math.max(e,t),n)}O.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=O.get.hsl(t),n="hsl"):(e=O.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},O.get.rgb=function(t){if(!t)return null;var e,n,o,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]:f.call(v,e[1])?((i=v[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]=T(i[n],0,255);return i[3]=T(i[3],0,1),i},O.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,T(parseFloat(e[2]),0,100),T(parseFloat(e[3]),0,100),T(isNaN(n)?1:n,0,1)]}return null},O.to.rgb=function(){var t=b(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},O.to.hsl=function(){var t=b(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 A=O,R={},C={};for(const t of Object.keys(R))C[R[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),a=r-i;let l,s;r===i?l=0:e===r?l=(n-o)/a:n===r?l=2+(o-e)/a:o===r&&(l=4+(e-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return s=r===i?0:c<=.5?a/(r+i):a/(2-r-i),[l,100*s,100*c]},S.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,a;if(0===n)return a=255*o,[a,a,a];i=o<.5?o*(1+n):o+n-o*n;const l=2*o-i,s=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,s[t]=255*a;return s};const N=S;function x(t,e){return function(n){return e(t(n))}}function _(t,e){const n=[e[t].parent,t];let o=N[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=x(N[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const P={};Object.keys(N).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:N[t].channels}),Object.defineProperty(P[t],"labels",{value:N[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(N);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(N[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],a=e[i];-1===a.distance&&(a.distance=e[t].distance+1,a.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]=_(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];P[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),P[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=P,w=["keyword","gray","hex"],L={};for(const t of Object.keys(I))L[[...I[t].labels].sort().join("")]=t;const k={};function M(t,e){if(!(this instanceof M))return new M(t,e);if(e&&e in w&&(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 M)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=A.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=H(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[o];const{labels:i}=I[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=H(r)}if(k[this.model])for(o=I[this.model].channels,n=0;n<o;n++){const t=k[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}M.prototype={toString(){return this.string()},string(t){let e=this.model in A.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return A.to[e.model](n)},round(t){return t=Math.max(t||0,0),new M([...this.color.map(D(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new M([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(I)){if(w.includes(t))continue;const{channels:e}=I[t];M.prototype[t]=function(...e){return this.model===t?new M(this):e.length>0?new M(e,t):new M([...j(I[this.model][t].raw(this.color)),this.valpha],t)},M[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new M(o,t)}}function D(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function j(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const B=M;function F(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 U(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function G(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),i}function W(t,e,n,o){const i=n.querySelector(o),r=G(t,e);if(!r)return;const a=n.querySelector(".label");F({element:a,html:t.content.label}),"TOP"===r.position?(i.style.flexDirection="column",i.style.alignItems="unset",U(a,{marginRight:0,marginBottom:`${r.margin}px`})):(i.style.flexDirection="row",i.style.alignItems="center",U(a,{marginRight:`${r.margin}px`,marginBottom:0})),r.enabled?a.style.display="":a.style.display="none"}function $(t,e,n,o,i){const r=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)).styleAttributes;(null==n?void 0:n.width)&&(o=n)}return o}(t,e);if(!r)return;const a=G(t,e),l=i&&a&&a.enabled&&"TOP"===a.position?i.getBoundingClientRect().height+a.margin:0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+l}px`)}function z(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=B(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function V(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(a,10),height:n+parseInt(i,10)+parseInt(o,10)}}function Q(t,e,n,o,i){switch(t.position){case"top":return{left:`${X(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${X(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:`${q(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${q(0,t)}px`}}}function X(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>r.width(o)&&(i-=i+e.width-r.width(o)),i}function q(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const K="cl-tooltip-text-styles",Z=`\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 J(t,e,n,o){let i;o=o||document,t.classList.add("invalid"),e.style.visibility="visible",e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${K}`))return;const e=document.createElement("style");e.setAttribute("id",K),F({element:e,html:Z}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,a=function(t,e,n,o,i,a){const l=function(t,e,n,o,i){const a=function(t,e,n,o){const i=r.width(o),{right:a}=t.getBoundingClientRect(),l=i-n-a-r.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:V(e).width,availableSpaceToTheLeftSideOfTheTrigger:a-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,i),l=function(t,e,n,o){const i=r.height(o),{top:a,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:V(e).height,availableSpaceAboveTriggerElem:a-n,availableSpaceBelowTriggerElem:i-l-n}}(t,e,n,i);let s="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:a.availableSpaceToTheRightSideOfTheTrigger>=a.contentWidth,left:a.availableSpaceToTheLeftSideOfTheTrigger>=a.contentWidth};if(c.top?s="top":c.bottom?s="bottom":c.right?s="right":c.left&&(s="left"),c[o]&&(s=o),"undefined"===s){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,a.availableSpaceToTheRightSideOfTheTrigger,a.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?s="bottom":t===l.availableSpaceAboveTriggerElem?s="top":t===a.availableSpaceToTheRightSideOfTheTrigger?s="right":t===a.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},l),a),{position:s})}(t,e,n,o,a=a||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:Q(l,t.getBoundingClientRect(),e.getBoundingClientRect(),i,a),position:l.position}}(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",a.position),U(n,a.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${K}`);e&&e.remove()}(o))}}function Y(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function tt(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 et="VIEW",nt="MODULE",ot="CONTAINER",it="INPUT",rt="BUTTON",at="CONSENT",lt="COLUMN",st="SUBSCRIBE_CONTACT",ct="REQUEST",dt="SHOW_WIDGET",ht="OPEN_LINK",pt="CLOSE_WIDGET";class ut{static sortActions(t){const e={[pt]:-1,[ht]:-2,[dt]:1,[st]:2,[ct]: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=ut.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(ut.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,a=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 a.next()).done);){o=i.value,r=!1;try{const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{r=!0}}}catch(t){e={error:t}}finally{try{r||t||!(n=a.return)||await n.call(a)}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=[])}}ut.IGNORING_VIEW_ENTRY_TYPES=[rt,at,it];const mt="CLICK",gt="COMPONENT_EVENT";class bt{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class vt{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 mt:return new ut(t,e);case gt:return new bt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class ft{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 yt{constructor(){this.listeners=yt.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=ft.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=yt.createDefaultListenersState()}}yt.createDefaultListenersState=()=>({"*":{}});const Et=(t,e,n,o)=>{const{addEventListenerBase:i,addEventListener:r}=EventTarget.prototype;(i||r).call(t,e,n,o)};class Ot{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Tt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===nt?Object.assign(Object.assign({},t),Tt.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}Tt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class At extends yt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(At.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(At.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(At.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}At.changeEventName="CHANGE";class Rt{static set(t,e){const n=t[Rt.accumulatorPropertyName]||{};t[Rt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Rt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Rt.accumulatorPropertyName="clStyleAttributes";const Ct="CONTENT_LOCKER";class St{static applyHostStyles(t,e,n=null,o){var i,r,a;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===(a=l.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==et&&t!==ot&&t!==lt||(e.style.display=o===Ct&&t===et?"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 Nt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class xt{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.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,a,l;const s=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===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(l=null==s?void 0:s.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((()=>{this._applyHostElementBackground(this.envUrlMaps[t].get("host"),this.getSharedCb().cssVars)})).catch((t=>{console.error(t),Nt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this}_applyHostElementBackground(t,e){t&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const _t=new class{execute(t,e,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 Pt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class It{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 wt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const Lt="COMPONENT_RESOURCES_LOADED",kt="FAILED_TO_LOAD_COMPONENT_RESOURCE";class Mt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Lt,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(kt,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new wt(this.onCounterStateUpdate)}}}const Dt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Dt(...t)}},jt=Dt,Ht="props",Bt="shared",Ft="environment";function Ut(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===(a=null==r?void 0:r.getAttribute)||void 0===a?void 0:a.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var a};return i(t)}const Gt="SUBMIT";function Wt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{"element"!==n&&"classes"!==n&&(e[n]&&"object"==typeof e[n]&&!Array.isArray(e[n])?t[n]=Object.assign(Object.assign({},t[n]||{}),e[n]):t[n]=e[n])})),t):t}function $t(t,e,n){var o;return null===(o=t[e])||void 0===o?void 0:o.find((t=>t.element===n))}class zt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}class Vt extends HTMLElement{constructor(){var t,e;super(),this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let a=new zt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=jt(Ht,Bt,Ft),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 Ot,this.componentEventEmitter=new yt,this.componentResourceManager=new Mt(this.model.id,this.services.eventEmitter,"STATIC"===this.services.config.getConfig("entryModuleType")),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new vt(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(Ht).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Bt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new xt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),_t),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(At.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Ft).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(Ht).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Bt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Ft).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;t=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Wt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Wt(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);const o=i("type"),r="element-styles";let a=this.getRootElement().querySelector(`style[${o}="${r}"]`);a||(a=document.createElement("style"),a.setAttribute(o,r),this.getRootElement().appendChild(a)),F({element:a,html:""}),n.forEach((e=>{let n=e.getAttribute(i("element"));const o=this.getEnvironment();let r=$t(t,o,n);if(r){if(this.resizeListener.isMobile()){const e=$t(t,"desktop",n);e&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(r),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,n)=>{var o,r;const a=[];"host"===(e=Vt._resolveTogglableStylesForElementModel(e)).element&&(St.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),a.push("background")));let l=e.styleAttributes.background,s=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&s){this.componentResourceManager.getPending().increment();const t=new Image;t.src=s[1],Et(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Et(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),"UPDATING"===this.services.config.getConfig("entryModuleType")&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Pt(e.styleAttributes,a)});if(Rt.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),F({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this._fixMarginOverflow=t=>{const e=this.getParentComponent(),n=e&&("flex"===e.style.display||"inline-flex"===e.style.display),o="host",r=t.getAttribute(i("element"))===o;if(!n||!r)return;const a=this.getProps(),l=this.getEnvironment(),{styleAttributes:s}=$t(a.adaptiveStyles,l,o)||{};if(!s)return;const c=s.marginLeft||s.marginRight,d="100%"===s.width;if(c&&d){const e=(parseFloat(s.marginLeft)||0)+(parseFloat(s.marginRight)||0);e&&setTimeout((()=>{t.style.width=`calc(100% - ${e}px)`}))}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${It.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");F({element:t,html:`[${i("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{F({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&F({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&F({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&F({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>Ut(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return t&&1===t.split(",").length?this.parentNode:Ut(this.parentNode,i("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>Y(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>tt(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n;const o=t.control.name;if(["email","first_name","last_name"].includes(o))return o.toUpperCase();if(t.content.label&&(null===(n=null===(e=t.adaptiveStyles.desktop.find((t=>"label"===t.element)))||void 0===e?void 0:e.params)||void 0===n?void 0:n.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return t.content.placeholder?this.capitalizeFirstLetter(t.content.placeholder):t.control.integrationName?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{switch(t.control.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===Gt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:ct}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>this.getProps().handlers&&this.getProps().handlers.length?[...this.getProps().handlers]:[],this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.define)||void 0===t?void 0:t.manifest)||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=Vt._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const Qt=Symbol("required");var Xt=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 qt(){}const Kt="pending",Zt="valid",Jt="invalid";class Yt extends Vt{constructor(){super(...arguments),this._createControl=(t={},...e)=>{var{element:n}=t,o=Xt(t,["element"]);const i=this.getProps(),r=this.getModel(),a=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),l=this.services.form,s=[a,n,...e];return l.hasControl(i.control.name)?l.updateControl(...s):l.registerControl(...s)},this.createControlWithValidation=(t=[],e={})=>{var{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=qt,invalidCallback:r=qt,pendingCallback:a=qt,elementToListen:l=n,validationMap:s={},listenStatusChange:c=!0}=e,d=Xt(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,p=s[null==h?void 0:h.validator],u=t.some((t=>t[Qt])),m=!!(null==h?void 0:h.required),g=m||u,b=[...t];m&&!u&&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[Qt]=!0,e}()),p&&b.push(p);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:a},d)),f},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=Kt;switch(!0){case n.control.pending:t=Kt;break;case n.control.valid:t=Zt;break;default:t=Jt}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:a,errorMessageMapper:l,pendingCallback:s}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Zt:(function(t,e){t.classList.remove("invalid"),e.style.visibility="hidden"})(o,i),r&&r();break;case Jt:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=tt(e,Y(t)).translations,i=Object.keys(o).find((t=>t.includes(n)));return i?o[i]:n}(c,d,e);l&&(r=l(e,r)),J(o,i,r,this.htmlDocumentObject),a&&a()}break;case Kt:n.touched&&(function(t,e){e.style.visibility="hidden",t.classList.contains("invalid")&&t.classList.remove("invalid")}(o,i),s&&s())}}}}const te={name:"SysTextAreaComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["TEXT_AREA"],contextMenuModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}}]},focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Invalid characters used: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximum length is 5000","content,placeholder":"Text area","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Недопустимые символы: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максимальная длина 5000 символов","content,placeholder":"Текстовая область","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Заборонені символи: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максимальна довжина 5000","content,placeholder":"Текстова область","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Invalid characters used: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Longitud máxima es de 5000","content,placeholder":"Área de texto","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ungültige Zeichen verwendet: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximale Länge beträgt 5000","content,placeholder":"Textbereich","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caractères non valides utilisés: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"La longueur maximale est de 5000","content,placeholder":"Zone de texte","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caratteri non validi utilizzati: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"La lunghezza massima è 5000","content,placeholder":"Area del testo","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caracteres inválidos usados: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Comprimento máximo de 5000","content,placeholder":"Área de texto","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caractere nevalide folosite: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Lungimea maximă este de 5000","content,placeholder":"Zona de text","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Използвани са невалидни: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максималната дължина е 5000","content,placeholder":"Поле за текст","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Použité neplatné znaky: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximální délka je 5000","content,placeholder":"Oblast textu","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Χρησιμοποιήθηκαν άκυροι χαρακτήρες: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Το μέγιστο μήκος είναι 5000","content,placeholder":"Περιοχή κειμένου","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ongeldige tekens gebruikt: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximale lengte is 5000","content,placeholder":"Tekstgebied","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Użyto nieprawidłowych znaków: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksymalna długość to 5000","content,placeholder":"Obszar tekstu","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ogiltiga tecken används: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximal längd är 5000","content,placeholder":"Textområde","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Geçersiz karakterler kullanıldı: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimum uzunluk 5000","content,placeholder":"Metin alanı","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":"الأحرف غير الصالحة المستخدَمة {{characters}}","control,validation,validationErrors,MAX_LENGTH_5000":"الحد الأقصى للطول هو 5000","content,placeholder":"منطقة النص","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'使用了无效的字符 "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"最大长度为 5000","content,placeholder":"文本区域","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ugyldige tegn brugt: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimum længde er 5000","content,placeholder":"Tekstfelt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'שימוש בתווים לא חוקיים "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"אורך מקסימלי הוא 5000","content,placeholder":"אזור הטקסט","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Virheellisiä merkkejä käytettiin "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimipituus on 5000","content,placeholder":"Tekstialue","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'अमान्य वर्णों का उपयोग किया गया "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"अधिकतम लंबाई 5000 है","content,placeholder":"टेक्स्ट एरिया","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Korišteni su nevažeći znakovi "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimalna duljina je 5000","content,placeholder":"Tekstualno područje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Érvénytelen karakterek használata "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"A maximális hossz 5000","content,placeholder":"Szövegterület","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Karakter tidak valid yang digunakan "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Panjang maksimum adalah 5000","content,placeholder":"Area teks","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'無効な文字が使用されています "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"最長5000文字です","content,placeholder":"テキストエリア","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'"{{characters}}"(이)가 사용된 잘못된 문자',"control,validation,validationErrors,MAX_LENGTH_5000":"최대 길이 5000","content,placeholder":"텍스트 영역","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ugyldige tegn brukt "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimal lengde er 5000","content,placeholder":"Tekstområde","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Použité neplatné znaky "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximálna dĺžka je 5000","content,placeholder":"Oblasť textu","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Uporabljeni neveljavni znaki "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Največja dolžina je 5000","content,placeholder":"Območje besedila","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Korišćeni su nevažeći znakovi "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimalna dužina je 5000","content,placeholder":"Oblast teksta","content,label":"Title"}},props:{content:{placeholder:"Text area",label:"Title",textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"textArea",defaultValue:"",integrationName:"text_area",validation:{required:!0}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"80px",minHeight:"80px",color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],mobile:[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"80px",minHeight:"80px",color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}]}},metaDescription:{icon:"/SysTextAreaComponent/assets/img/text-area-component-icon.svg",label:{en:"Text area",ru:"Текстовое область",uk:"Текстова область",es:"Área de texto",fr:"Zone de texte",de:"Textbereich",it:"Area del testo",pt:"Área de texto",ro:"Zona de text",bg:"Поле за текст",cs:"Oblast textu",el:"Περιοχή κειμένου",nl:"Tekstgebied",pl:"Obszar tekstu",sv:"Textområde",tr:"Metin alanı",ar:"منطقة النص",zh:"文本区域",da:"Tekstfelt",he:"אזור הטקסט",fi:"Tekstialue",hi:"टेक्स्ट एरिया",hr:"Tekstualno područje",hu:"Szövegterület",id:"Area teks",ja:"テキストエリア",ko:"텍스트 영역",no:"Tekstområde",sk:"Oblasť textu",sl:"Območje besedila",sr:"Oblast teksta"}}};function ee(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;return function(e){var n=e.trim().length<=t;return{isValid:n,errorKey:n?null:"MAX_LENGTH_".concat(t)}}}function ne(t){return ne="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},ne(t)}function oe(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,ce(o.key),o)}}function ie(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ie=function(){return!!t})()}function re(){return re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ae(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}},re.apply(null,arguments)}function ae(t){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ae(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}function se(t,e,n){return(e=ce(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ce(t){var e=function(t){if("object"!=ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ne(e)?e:e+""}var de=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),se(n=function(t,e,n){return e=ae(e),function(t,e){if(e&&("object"==ne(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,ie()?Reflect.construct(e,n||[],ae(t).constructor):e.apply(t,n))}(this,t,[e]),"manifest",te),se(n,"applyParams",(function(t,e){n.getRootElement().querySelector("textarea").setAttribute("placeholder",t.content.placeholder)})),n.getRootElement().innerHTML="\n <style>".concat("\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n}\n\n.label {\n min-height: 10px;\n}\n\n.label.cl-focused {\n min-height: auto;\n}\n\n.input-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n}\n\n.invalid {\n border: 1px solid #ff0000 !important;\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\ntextarea {\n width: 100%;\n margin: 0;\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n resize: none;\n}\n\ntextarea.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n",'</style>\n <div class="main-container">\n <div class="label-with-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n <div class="input-with-tooltip">\n <textarea cl-element="input" name="fname"></textarea>\n <div class="input-tooltip">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n </div>\n </div>\n '),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(t,Yt),e=t,n=[{key:"connectedCallback",value:function(){var e,n,o,i=this;(e=t,n=this,"function"==typeof(o=re(ae(1&3?e.prototype:e),"connectedCallback",n))?function(t){return o.apply(n,t)}:o)([]),this.observeProps((function(t,e){i.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles);var n=i.getEnvironment();W(e,n,i.getRootElement(),".label-with-input-container"),$(e,n,i.getHostElement(),i.getElement("input"),i.getElement("label")),function(t){let e;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=z(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=z(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=z(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=z(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(i.getElement("input")),i.applyParams(e,n)})),this.observeEnvironment((function(t,e){var n=i.getProps();W(n,e,i.getRootElement(),".label-with-input-container"),$(n,e,i.getHostElement(),i.getElement("input"),i.getElement("label")),i.applyParams(n,e)}));var r=this.getRootElement().querySelector("textarea");this.registeredControl=this.createControlWithValidation([ee(5e3)],{element:r}),r.value=this.registeredControl.value||""}}],n&&oe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();se(de,"define",{name:"sys-text-area",model:te.name,manifest:te});export{de as default};window.clComponentClass_SysTextAreaComponent=de;
1
+ const t="validationStatusChanged",e="touchedStatusChanged",n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}class r{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}var a=[];for(var l in{transparent:"#0000"})a.push(l);var s="\\s*([.\\d%]+)\\s*",c="\\("+[s,s,s]+"(?:,\\s*([.\\d]+)\\s*)?\\)",d="(?:rgb)a?",h="("+a.join("|")+")";function p(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(d+c,"i"),RegExp([h,"(?:#([a-f0-9]{3,8}))",d+c,"(?:hsl)a?"+c].join("|"),"gi");var u=Array.prototype.concat,m=Array.prototype.slice,g=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];p(i)?e=u.call(e,m.call(i)):e.push(i)}return e};g.wrap=function(t){return function(){return t(g(arguments))}};const b=g;var v={},f=Object.hasOwnProperty,y=Object.create(null);for(var E in v)f.call(v,E)&&(y[v[E]]=E);var O={to:{},get:{}};function T(t,e,n){return Math.min(Math.max(e,t),n)}O.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=O.get.hsl(t),n="hsl"):(e=O.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},O.get.rgb=function(t){if(!t)return null;var e,n,o,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]:f.call(v,e[1])?((i=v[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]=T(i[n],0,255);return i[3]=T(i[3],0,1),i},O.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,T(parseFloat(e[2]),0,100),T(parseFloat(e[3]),0,100),T(isNaN(n)?1:n,0,1)]}return null},O.to.rgb=function(){var t=b(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},O.to.hsl=function(){var t=b(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 A=O,R={},C={};for(const t of Object.keys(R))C[R[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),a=r-i;let l,s;r===i?l=0:e===r?l=(n-o)/a:n===r?l=2+(o-e)/a:o===r&&(l=4+(e-n)/a),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return s=r===i?0:c<=.5?a/(r+i):a/(2-r-i),[l,100*s,100*c]},S.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,a;if(0===n)return a=255*o,[a,a,a];i=o<.5?o*(1+n):o+n-o*n;const l=2*o-i,s=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,a=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,s[t]=255*a;return s};const N=S;function x(t,e){return function(n){return e(t(n))}}function _(t,e){const n=[e[t].parent,t];let o=N[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=x(N[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const P={};Object.keys(N).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:N[t].channels}),Object.defineProperty(P[t],"labels",{value:N[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(N);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(N[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],a=e[i];-1===a.distance&&(a.distance=e[t].distance+1,a.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]=_(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];P[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),P[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=P,w=["keyword","gray","hex"],L={};for(const t of Object.keys(I))L[[...I[t].labels].sort().join("")]=t;const k={};function M(t,e){if(!(this instanceof M))return new M(t,e);if(e&&e in w&&(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 M)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=A.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=H(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[o];const{labels:i}=I[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=H(r)}if(k[this.model])for(o=I[this.model].channels,n=0;n<o;n++){const t=k[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}M.prototype={toString(){return this.string()},string(t){let e=this.model in A.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return A.to[e.model](n)},round(t){return t=Math.max(t||0,0),new M([...this.color.map(D(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new M([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(I)){if(w.includes(t))continue;const{channels:e}=I[t];M.prototype[t]=function(...e){return this.model===t?new M(this):e.length>0?new M(e,t):new M([...j(I[this.model][t].raw(this.color)),this.valpha],t)},M[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=H(n,e)),new M(o,t)}}function D(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function j(t){return Array.isArray(t)?t:[t]}function H(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const B=M;function F(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 U(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function G(t,e){var n,o;let i;return t.styles&&(i=null===(n=t.styles.find((t=>"label"===t.element)))||void 0===n?void 0:n.params),t.adaptiveStyles&&!i&&(i=null===(o=t.adaptiveStyles[e].find((t=>"label"===t.element)))||void 0===o?void 0:o.params),i}function W(t,e,n,o){var i;const r=n.querySelector(o),a=G(t,e);if(!a)return;const l=n.querySelector(".label");l&&(F({element:l,html:(null===(i=t.content)||void 0===i?void 0:i.label)||""}),"TOP"===a.position?(r.style.flexDirection="column",r.style.alignItems="unset",U(l,{marginRight:"0",marginBottom:`${a.margin}px`})):(r.style.flexDirection="row",r.style.alignItems="center",U(l,{marginRight:`${a.margin}px`,marginBottom:"0"})),a.enabled?l.style.display="":l.style.display="none")}function $(t,e,n,o,i){const r=function(t,e){var n;let o;if(t.styles){const e=null===(n=t.styles.find((t=>"input"===t.element)))||void 0===n?void 0:n.styleAttributes;(null==e?void 0:e.width)&&(o=e)}if(t.adaptiveStyles&&!o){const n=t.adaptiveStyles[e].find((t=>"input"===t.element)),i=null==n?void 0:n.styleAttributes;(null==i?void 0:i.width)&&(o=i)}return o}(t,e);if(!r)return;const a=G(t,e),l=i&&a&&a.enabled&&"TOP"===a.position?i.getBoundingClientRect().height+(a.margin||0):0;r.width&&(r.width.includes("100%")?(o.style.width="100%",n.style.width=r.width):n.style.width="auto"),r.height&&(r.height.includes("100%")?(o.style.height="100%",n.style.height=r.height):n.style.height=`${parseFloat(r.height)+l}px`)}function z(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=B(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}function V(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:a}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(a,10),height:n+parseInt(i,10)+parseInt(o,10)}}function Q(t,e,n,o,i){switch(t.position){case"top":return{left:`${X(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${X(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:`${q(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${q(0,t)}px`}}}function X(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>r.width(o)&&(i-=i+e.width-r.width(o)),i}function q(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const K="cl-tooltip-text-styles",Z=`\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 J(t,e,n,o){o=o||document;let i=null;t.classList.add("invalid"),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${K}`))return;const e=document.createElement("style");e.setAttribute("id",K),F({element:e,html:Z}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,a=function(t,e,n,o,i,a){const l=function(t,e,n,o,i){const a=function(t,e,n,o){const i=r.width(o),{right:a}=t.getBoundingClientRect(),l=i-n-a-r.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:V(e).width,availableSpaceToTheLeftSideOfTheTrigger:a-n,availableSpaceToTheRightSideOfTheTrigger:l}}(t,e,n,i),l=function(t,e,n,o){const i=r.height(o),{top:a,bottom:l}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:V(e).height,availableSpaceAboveTriggerElem:a-n,availableSpaceBelowTriggerElem:i-l-n}}(t,e,n,i);let s="undefined";const c={bottom:l.availableSpaceBelowTriggerElem>=l.contentHeight,top:l.availableSpaceAboveTriggerElem>=l.contentHeight,right:a.availableSpaceToTheRightSideOfTheTrigger>=a.contentWidth,left:a.availableSpaceToTheLeftSideOfTheTrigger>=a.contentWidth};if(c.top?s="top":c.bottom?s="bottom":c.right?s="right":c.left&&(s="left"),o&&c[o]&&(s=o),"undefined"===s){const t=Math.max(l.availableSpaceBelowTriggerElem,l.availableSpaceAboveTriggerElem,a.availableSpaceToTheRightSideOfTheTrigger,a.availableSpaceToTheLeftSideOfTheTrigger);t===l.availableSpaceBelowTriggerElem?s="bottom":t===l.availableSpaceAboveTriggerElem?s="top":t===a.availableSpaceToTheRightSideOfTheTrigger?s="right":t===a.availableSpaceToTheLeftSideOfTheTrigger&&(s="left")}return Object.assign(Object.assign(Object.assign({},l),a),{position:s})}(t,e,n,o,a=a||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:Q(l,t.getBoundingClientRect(),e.getBoundingClientRect(),i,a),position:l.position}}(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",a.position),U(n,a.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${K}`);e&&e.remove()}(o))})}function Y(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}function tt(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 et="VIEW",nt="MODULE",ot="CONTAINER",it="INPUT",rt="BUTTON",at="CONSENT",lt="COLUMN",st="SUBSCRIBE_CONTACT",ct="REQUEST",dt="SHOW_WIDGET",ht="OPEN_LINK",pt="CLOSE_WIDGET";class ut{static sortActions(t){const e={[pt]:-1,[ht]:-2,[dt]:1,[st]:2,[ct]: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=ut.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(ut.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,a=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 a.next()).done);){o=i.value,r=!1;try{const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{r=!0}}}catch(t){e={error:t}}finally{try{r||t||!(n=a.return)||await n.call(a)}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=[])}}ut.IGNORING_VIEW_ENTRY_TYPES=[rt,at,it];const mt="CLICK",gt="COMPONENT_EVENT";class bt{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class vt{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 mt:return new ut(t,e);case gt:return new bt(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class ft{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 yt{constructor(){this.listeners=yt.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=ft.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=yt.createDefaultListenersState()}}yt.createDefaultListenersState=()=>({"*":{}});const Et=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:a}=i;(r||a).call(t,e,n,o)};class Ot{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class Tt{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===nt?Object.assign(Object.assign({},t),Tt.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}Tt.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class At extends yt{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(At.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(At.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(At.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}At.changeEventName="CHANGE";class Rt{static set(t,e){const n=t[Rt.accumulatorPropertyName]||{};t[Rt.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[Rt.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}Rt.accumulatorPropertyName="clStyleAttributes";const Ct="CONTENT_LOCKER";class St{static applyHostStyles(t,e,n=null,o){var i,r,a;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===(a=l.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==et&&t!==ot&&t!==lt||(e.style.display=o===Ct&&t===et?"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 Nt{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class xt{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.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,a,l;const s=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===(a=null==c?void 0:c.styleAttributes)||void 0===a?void 0:a.background)||(null===(l=null==s?void 0:s.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((()=>{this._applyHostElementBackground(this.envUrlMaps[t].get("host"),this.getSharedCb().cssVars)})).catch((t=>{console.error(t),Nt.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const _t=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 Pt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class It{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 wt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const Lt="COMPONENT_RESOURCES_LOADED",kt="FAILED_TO_LOAD_COMPONENT_RESOURCE";class Mt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Lt,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(kt,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new wt(this.onCounterStateUpdate)}}}const Dt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>Dt(...t)}},jt=Dt,Ht="props",Bt="shared",Ft="environment";function Ut(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===(a=null==r?void 0:r.getAttribute)||void 0===a?void 0:a.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var a};return i(t)}const Gt="SUBMIT";function Wt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function $t(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))}class zt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}const Vt="STATIC",Qt="UPDATING";class Xt extends HTMLElement{constructor(){var t,e;super(),this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let a=new zt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(a),t=a.detail.props,Object.assign(this,t),this.observers=jt(Ht,Bt,Ft),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 Ot({}),this.componentEventEmitter=new yt,this.componentResourceManager=new Mt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new vt(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(Ht).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Bt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new xt(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),_t),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(At.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Ft).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(Ht).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(Bt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Ft).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(Wt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(Wt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),r=i("type"),a="element-styles";let l=this.getRootElement().querySelector(`style[${r}="${a}"]`);l||(l=document.createElement("style"),l.setAttribute(r,a),this.getRootElement().appendChild(l)),F({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let r=$t(o,n,e);if(r){if(this.resizeListener.isMobile()){const t=$t(o,"desktop",e);t&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(r),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,r;const a=[];"host"===(e=Xt._resolveTogglableStylesForElementModel(e)).element&&(St.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),a.push("background")));let l=e.styleAttributes.background,s=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&s){this.componentResourceManager.getPending().increment();const t=new Image;t.src=s[1],Et(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),Et(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:Pt(e.styleAttributes,a)});if(Rt.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),F({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const a=Object.keys(n).reduce(((t,e)=>t+` ${It.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");F({element:t,html:`[${i("element")}="${e}"]${o} { ${a} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{F({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&F({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&F({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&F({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>Ut(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return t&&1===t.split(",").length?this.parentNode:Ut(this.parentNode,i("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>Y(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>tt(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,a;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===(a=t.control)||void 0===a?void 0:a.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===Gt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:ct}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.define)||void 0===t?void 0:t.manifest)||(null===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}get isStaticRenderMode(){return this.services.config.getConfig("renderMode")===Vt}get isUpdatingRenderMode(){return this.services.config.getConfig("renderMode")===Qt}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=Xt._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const qt=Symbol("required");var Kt=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 Zt(){}const Jt="pending",Yt="valid",te="invalid";class ee extends Xt{constructor(){super(...arguments),this._createControl=(t={},...e)=>{const{element:n}=t,o=Kt(t,["element"]),i=this.getProps(),r=this.getModel(),a=Object.assign(Object.assign(Object.assign({},i.control),{componentId:r.id,viewIdx:r.path[0]}),o),l=this.services.form,s=[a,n,...e];return l.hasControl(i.control.name)?l.updateControl(...s):l.registerControl(...s)},this.createControlWithValidation=(t=[],e={})=>{const{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:i=Zt,invalidCallback:r=Zt,pendingCallback:a=Zt,elementToListen:l=n,validationMap:s={},listenStatusChange:c=!0}=e,d=Kt(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,p=(null==h?void 0:h.validator)?s[h.validator]:void 0,u=t.some((t=>t[qt])),m=!!(null==h?void 0:h.required),g=m||u,b=[...t];m&&!u&&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[qt]=!0,e}()),p&&b.push(p);const v=this._prepareAsyncValidators(b),f=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,v);return c&&this._handleControlStatusChange(Object.assign({control:f,element:l,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:i,invalidCallback:r,pendingCallback:a},d)),f},this._prepareAsyncValidators=(t=[])=>t.reduce(((t,e,n)=>"function"!=typeof e?(console.warn(`Validator ${n} should be a function, so it will be skipped`),t):(t[`custom_${n}`]=async(...t)=>{const n=await Promise.resolve(e(...t));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},t)),{}),this._handleControlStatusChange=n=>{n.control.on(t,(t=>{this._handleValidationStatus(n,t)})),n.control.on(e,(()=>{let t=Jt;switch(!0){case n.control.pending:t=Jt;break;case n.control.valid:t=Yt;break;default:t=te}this._handleValidationStatus(n,t)}))},this._handleValidationStatus=(t,e)=>{const{control:n,element:o,tooltipElement:i,validCallback:r,invalidCallback:a,errorMessageMapper:l,pendingCallback:s}=t,c=this.services.config,d=this.manifest.i18n;switch(e){case Yt:(function(t,e){t.classList.remove("invalid"),e&&(e.style.visibility="hidden")})(o,i),r&&r();break;case te:if(n.touched){const t=n.getErrorKeys();if(!t)break;const e=t[0];let r=function(t,e,n){const o=tt(e,Y(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)),J(o,i,r,this.htmlDocumentObject),a&&a()}break;case Jt:n.touched&&(function(t,e){e&&(e.style.visibility="hidden"),t.classList.contains("invalid")&&t.classList.remove("invalid")}(o,i),s&&s())}}}}const ne={name:"SysTextAreaComponent",componentType:"INPUT",version:"1.0.0",mappingTypes:["TEXT_AREA"],contextMenuModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"input",elementProp:"styleAttributes",params:{width:{options:["fixed","fill"]},height:{options:["fixed","fill"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"input",showPlaceholderControl:!0,isLineSpaceAvailable:!0,isTextTransformAvailable:!0},{element:"label",displayCondition:"return !!sdk.component.getProps().styles.find(element => element.element === 'label').params.enabled",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=input]","styleAttributes"]},{type:"CONTROL",name:"INPUT_LABEL",propPath:["styles","[element=label]","params"]},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"input",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}],general:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}},{type:"CONTROL",name:"INTEGRATION_FIELD_MAPPING",params:{integrationNamePropPath:["control","integrationName"],groupNamePropPath:["control","groupName"],fieldNamePropPath:["control","fieldName"],fieldTypePropPath:["control","fieldType"],validationPropPath:["control","validation"],placeholderPropPath:["content","placeholder"],labelPropPath:["content","label"],optionsPropPath:["control","options"]}},{type:"CONTROL",name:"INPUT_VALIDATION",params:{validationPropPath:["control","validation"],fieldTypePropPath:["control","fieldType"],required:!0}}]},autoContrast:[{slave:{element:"input",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","textContrastEnabled"]},{slave:{element:"input",elementProp:"placeholderStyleAttributes",elementSubProp:"color",dimmed:!0},master:{element:"input",propPath:["styles","[element=input]","styleAttributes","background"]},enabledPropPath:["content","placeholderTextContrastEnabled"]}],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"TEXT_INPUT",propPath:["content","placeholder"],params:{label:"DOCUMENT_INPUT_PLACEHOLDER"}}]},focusableElements:["input","label"],events:{dispatch:[],listen:[]},i18nPropPaths:["content,label","content,placeholder"],i18n:{en:{"control,validation,validationErrors,REQUIRED":"Required field","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Invalid characters used: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximum length is 5000","content,placeholder":"Text area","content,label":"Title"},ru:{"control,validation,validationErrors,REQUIRED":"Обязательное поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Недопустимые символы: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максимальная длина 5000 символов","content,placeholder":"Текстовая область","content,label":"Заголовок"},uk:{"control,validation,validationErrors,REQUIRED":"Обов'язкове поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Заборонені символи: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максимальна довжина 5000","content,placeholder":"Текстова область","content,label":"Заголовок"},es:{"control,validation,validationErrors,REQUIRED":"Campo obligatorio","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Invalid characters used: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Longitud máxima es de 5000","content,placeholder":"Área de texto","content,label":"Título"},de:{"control,validation,validationErrors,REQUIRED":"Pflichtfeld","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ungültige Zeichen verwendet: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximale Länge beträgt 5000","content,placeholder":"Textbereich","content,label":"Titel"},fr:{"control,validation,validationErrors,REQUIRED":"Champs requis","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caractères non valides utilisés: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"La longueur maximale est de 5000","content,placeholder":"Zone de texte","content,label":"Titre"},it:{"control,validation,validationErrors,REQUIRED":"Campo obbligatorio","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caratteri non validi utilizzati: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"La lunghezza massima è 5000","content,placeholder":"Area del testo","content,label":"Titolo"},pt:{"control,validation,validationErrors,REQUIRED":"Campo obrigatório","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caracteres inválidos usados: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Comprimento máximo de 5000","content,placeholder":"Área de texto","content,label":"Título"},ro:{"control,validation,validationErrors,REQUIRED":"Câmp obligatoriu","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Caractere nevalide folosite: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Lungimea maximă este de 5000","content,placeholder":"Zona de text","content,label":"Titlu"},bg:{"control,validation,validationErrors,REQUIRED":"Изисквано поле","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Използвани са невалидни: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Максималната дължина е 5000","content,placeholder":"Поле за текст","content,label":"Заглавие"},cs:{"control,validation,validationErrors,REQUIRED":"Vyžadované pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Použité neplatné znaky: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximální délka je 5000","content,placeholder":"Oblast textu","content,label":"Titul"},el:{"control,validation,validationErrors,REQUIRED":"Απαιτητό πεδίο","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Χρησιμοποιήθηκαν άκυροι χαρακτήρες: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Το μέγιστο μήκος είναι 5000","content,placeholder":"Περιοχή κειμένου","content,label":"Τίτλος"},nl:{"control,validation,validationErrors,REQUIRED":"Verplicht veld","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ongeldige tekens gebruikt: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximale lengte is 5000","content,placeholder":"Tekstgebied","content,label":"Titel"},pl:{"control,validation,validationErrors,REQUIRED":"Wymagane pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Użyto nieprawidłowych znaków: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksymalna długość to 5000","content,placeholder":"Obszar tekstu","content,label":"Tytuł"},sv:{"control,validation,validationErrors,REQUIRED":"Obligatoriskt fält","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ogiltiga tecken används: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximal längd är 5000","content,placeholder":"Textområde","content,label":"Tytuł"},tr:{"control,validation,validationErrors,REQUIRED":"Gerekli alan","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Geçersiz karakterler kullanıldı: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimum uzunluk 5000","content,placeholder":"Metin alanı","content,label":"Başlık"},ar:{"control,validation,validationErrors,REQUIRED":"الحقل المطلوب","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":"الأحرف غير الصالحة المستخدَمة {{characters}}","control,validation,validationErrors,MAX_LENGTH_5000":"الحد الأقصى للطول هو 5000","content,placeholder":"منطقة النص","content,label":"عنوان"},zh:{"control,validation,validationErrors,REQUIRED":"必填字段","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'使用了无效的字符 "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"最大长度为 5000","content,placeholder":"文本区域","content,label":"Title"},da:{"control,validation,validationErrors,REQUIRED":"Påkrævet felt","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ugyldige tegn brugt: "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimum længde er 5000","content,placeholder":"Tekstfelt","content,label":"Titel"},he:{"control,validation,validationErrors,REQUIRED":"שדה נדרש","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'שימוש בתווים לא חוקיים "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"אורך מקסימלי הוא 5000","content,placeholder":"אזור הטקסט","content,label":"Title"},fi:{"control,validation,validationErrors,REQUIRED":"Vaadittu kenttä","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Virheellisiä merkkejä käytettiin "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimipituus on 5000","content,placeholder":"Tekstialue","content,label":"Title"},hi:{"control,validation,validationErrors,REQUIRED":"आवश्यक फील्ड","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'अमान्य वर्णों का उपयोग किया गया "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"अधिकतम लंबाई 5000 है","content,placeholder":"टेक्स्ट एरिया","content,label":"Title"},hr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Korišteni su nevažeći znakovi "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimalna duljina je 5000","content,placeholder":"Tekstualno područje","content,label":"Title"},hu:{"control,validation,validationErrors,REQUIRED":"Kötelező mező","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Érvénytelen karakterek használata "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"A maximális hossz 5000","content,placeholder":"Szövegterület","content,label":"Title"},id:{"control,validation,validationErrors,REQUIRED":"Bidang yang wajib diisi","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Karakter tidak valid yang digunakan "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Panjang maksimum adalah 5000","content,placeholder":"Area teks","content,label":"Title"},ja:{"control,validation,validationErrors,REQUIRED":"必須フィールド","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'無効な文字が使用されています "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"最長5000文字です","content,placeholder":"テキストエリア","content,label":"Title"},ko:{"control,validation,validationErrors,REQUIRED":"필수 칸","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'"{{characters}}"(이)가 사용된 잘못된 문자',"control,validation,validationErrors,MAX_LENGTH_5000":"최대 길이 5000","content,placeholder":"텍스트 영역","content,label":"Title"},no:{"control,validation,validationErrors,REQUIRED":"Obligatorisk felt","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Ugyldige tegn brukt "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimal lengde er 5000","content,placeholder":"Tekstområde","content,label":"Title"},sk:{"control,validation,validationErrors,REQUIRED":"Povinné pole","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Použité neplatné znaky "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maximálna dĺžka je 5000","content,placeholder":"Oblasť textu","content,label":"Title"},sl:{"control,validation,validationErrors,REQUIRED":"Obvezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Uporabljeni neveljavni znaki "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Največja dolžina je 5000","content,placeholder":"Območje besedila","content,label":"Title"},sr:{"control,validation,validationErrors,REQUIRED":"Obavezno polje","control,validation,validationErrors,CONTAINS_FORBIDDEN_CHARACTERS":'Korišćeni su nevažeći znakovi "{{characters}}"',"control,validation,validationErrors,MAX_LENGTH_5000":"Maksimalna dužina je 5000","content,placeholder":"Oblast teksta","content,label":"Title"}},props:{content:{placeholder:"Text area",label:"Title",textContrastEnabled:!0,placeholderTextContrastEnabled:!0},control:{name:"textArea",defaultValue:"",integrationName:"text_area",validation:{required:!0}},styles:[{element:"input",styleAttributes:{background:"rgb(255, 255, 255)",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(0, 0, 0, 0.1)",borderBottomWidth:"1px",borderBottomColor:"rgba(0, 0, 0, 0.1)",borderLeftWidth:"1px",borderLeftColor:"rgba(0, 0, 0, 0.1)",borderRightWidth:"1px",borderRightColor:"rgba(0, 0, 0, 0.1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"}},{element:"label",params:{enabled:!1,position:"TOP",margin:5}}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"80px",minHeight:"80px",color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}],mobile:[{element:"host",styleAttributes:{marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{width:"100%",minWidth:null,height:"80px",minHeight:"80px",color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",_paddingEnabled:!0},placeholderStyleAttributes:{color:"rgb(81, 81, 81)"},classes:""},{element:"label",styleAttributes:{color:"rgb(0, 0, 0)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"16px",textShadow:"none"},classes:""}]}},metaDescription:{icon:"/SysTextAreaComponent/assets/img/text-area-component-icon.svg",label:{en:"Text area",ru:"Текстовое область",uk:"Текстова область",es:"Área de texto",fr:"Zone de texte",de:"Textbereich",it:"Area del testo",pt:"Área de texto",ro:"Zona de text",bg:"Поле за текст",cs:"Oblast textu",el:"Περιοχή κειμένου",nl:"Tekstgebied",pl:"Obszar tekstu",sv:"Textområde",tr:"Metin alanı",ar:"منطقة النص",zh:"文本区域",da:"Tekstfelt",he:"אזור הטקסט",fi:"Tekstialue",hi:"टेक्स्ट एरिया",hr:"Tekstualno područje",hu:"Szövegterület",id:"Area teks",ja:"テキストエリア",ko:"텍스트 영역",no:"Tekstområde",sk:"Oblasť textu",sl:"Območje besedila",sr:"Oblast teksta"}}};function oe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;return function(e){var n=e.trim().length<=t;return{isValid:n,errorKey:n?null:"MAX_LENGTH_".concat(t)}}}function ie(t){return ie="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},ie(t)}function re(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,he(o.key),o)}}function ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ae=function(){return!!t})()}function le(){return le="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=se(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}},le.apply(null,arguments)}function se(t){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},se(t)}function ce(t,e){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ce(t,e)}function de(t,e,n){return(e=he(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function he(t){var e=function(t){if("object"!=ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ie(e)?e:e+""}var pe=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),de(n=function(t,e,n){return e=se(e),function(t,e){if(e&&("object"==ie(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,ae()?Reflect.construct(e,n||[],se(t).constructor):e.apply(t,n))}(this,t,[e]),"manifest",ne),de(n,"applyParams",(function(t,e){n.getRootElement().querySelector("textarea").setAttribute("placeholder",t.content.placeholder)})),n.getRootElement().innerHTML="\n <style>".concat("\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n}\n\n.label {\n min-height: 10px;\n}\n\n.label.cl-focused {\n min-height: auto;\n}\n\n.input-with-tooltip {\n position: relative;\n display: flex;\n height: 100%;\n width: 100%;\n}\n\n.invalid {\n border: 1px solid #ff0000 !important;\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\ntextarea {\n width: 100%;\n margin: 0;\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n resize: none;\n}\n\ntextarea.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n",'</style>\n <div class="main-container">\n <div class="label-with-input-container">\n <div cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n <div class="input-with-tooltip">\n <textarea cl-element="input" name="fname"></textarea>\n <div class="input-tooltip">\n <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.5 13.0604C1.5 19.4116 6.6481 24.5605 13.0075 24.5605C19.353 24.5605 24.5 19.4107 24.5 13.0604C24.5 6.70865 19.3531 1.55909 13.0075 1.55908C6.64806 1.55908 1.5 6.7077 1.5 13.0604ZM12.9775 17.9668C12.7032 17.9668 12.4807 17.7443 12.4807 17.47C12.4807 17.1956 12.7032 16.9732 12.9775 16.9732C13.2519 16.9732 13.4743 17.1956 13.4743 17.47C13.4743 17.7443 13.2519 17.9668 12.9775 17.9668ZM12.9775 13.4764C12.7032 13.4764 12.4807 13.254 12.4807 12.9796L12.4807 8.48924C12.4807 8.21487 12.7032 7.99245 12.9775 7.99245C13.2519 7.99245 13.4743 8.21487 13.4743 8.48924L13.4743 12.9796C13.4743 13.254 13.2519 13.4764 12.9775 13.4764Z" fill="#FF0000" stroke="white" stroke-width="2"></path>\n </svg>\n </div>\n </div>\n </div>\n </div>\n '),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ce(t,e)}(t,ee),e=t,n=[{key:"connectedCallback",value:function(){var e,n,o,i=this;(e=t,n=this,"function"==typeof(o=le(se(1&3?e.prototype:e),"connectedCallback",n))?function(t){return o.apply(n,t)}:o)([]),this.observeProps((function(t,e){i.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles);var n=i.getEnvironment();W(e,n,i.getRootElement(),".label-with-input-container"),$(e,n,i.getHostElement(),i.getElement("input"),i.getElement("label")),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=z(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=z(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=z(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=z(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(i.getElement("input")),i.applyParams(e,n)})),this.observeEnvironment((function(t,e){var n=i.getProps();W(n,e,i.getRootElement(),".label-with-input-container"),$(n,e,i.getHostElement(),i.getElement("input"),i.getElement("label")),i.applyParams(n,e)}));var r=this.getRootElement().querySelector("textarea");this.registeredControl=this.createControlWithValidation([oe(5e3)],{element:r}),r.value=this.registeredControl.value||""}}],n&&re(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();de(pe,"define",{name:"sys-text-area",model:ne.name,manifest:ne});export{pe as default};window.clComponentClass_SysTextAreaComponent=pe;