@claspo/components 1.1.16 → 1.2.0-theme.13

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 e={name:"SysConsentComponent",componentType:"CONSENT",version:"1.0.0",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:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"label",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"label",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!0}]},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_DEFAULT_TITLE",property:"defaultBackground"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_SELECTED_TITLE",property:"selectedBackground"}},{type:"CONTROL",name:"BORDERS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BOX_SHADOW",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"label",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"label",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!0}]},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_DEFAULT_TITLE",property:"defaultBackground"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_SELECTED_TITLE",property:"selectedBackground"}},{type:"CONTROL",name:"BORDERS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BOX_SHADOW",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}]},events:{dispatch:[],listen:[]},i18nPropPaths:["content,label"],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"text",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!1}]}]},i18n:{en:{"control,validation,validationErrors,REQUIRED":"Accept consent to subscribe","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ru:{"control,validation,validationErrors,REQUIRED":"Примите соглашение для подписки","content,label":'Я даю согласие на обработку своих персональных данных и ознакомлен с <a href="https://example.com/termsofuse" target="_blank">условиями использования сервиса</a>'},uk:{"control,validation,validationErrors,REQUIRED":"Прийміть угоду для підписки","content,label":'Я даю згоду на обробку своїх персональних даних та ознайомлений з <a href="https://example.com/termsofuse" target="_blank">умовами використання сервісу</a>'},es:{"control,validation,validationErrors,REQUIRED":"Aceptar el consentimiento para suscribirse","content,label":'Doy mi consentimiento para el procesamiento de mis datos personales y he leído y acepto los <a href="https://example.com/termsofuse" target="_blank">Términos de uso</a>'},de:{"control,validation,validationErrors,REQUIRED":"Zustimmung zum Abonnement akzeptieren","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},fr:{"control,validation,validationErrors,REQUIRED":"Accepter le consentement pour s'abonner","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},it:{"control,validation,validationErrors,REQUIRED":"Accetti il consenso per iscriversi","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},pt:{"control,validation,validationErrors,REQUIRED":"Aceitar consentimento para subscrever","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ro:{"control,validation,validationErrors,REQUIRED":"Acceptați consimțământul pentru abonare","content,label":'Sunt de acord cu prelucrarea datelor mele personale și am citit și accept <a href="https://example.com/termsofuse" target="_blank">Termenii de utilizare</a>'},bg:{"control,validation,validationErrors,REQUIRED":"Приемете съгласието, за да се абонирате","content,label":'Съгласен съм с обработката на личните ми данни и прочетох и приемам <a href="https://example.com/termsofuse" target="_blank">Условията за ползване</a>'},cs:{"control,validation,validationErrors,REQUIRED":"Pro odběr přijměte souhlas","content,label":'Souhlasím se zpracováním mých osobních údajů a přečetl jsem si a přijímám <a href="https://example.com/termsofuse" target="_blank">Podmínky použití</a>'},el:{"control,validation,validationErrors,REQUIRED":"Αποδέχεστε τη συναίνεση στην εγγραφή","content,label":'Συναινώ στην επεξεργασία των προσωπικών μου δεδομένων και έχω διαβάσει και αποδέχομαι τους <a href="https://example.com/termsofuse" target="_blank">Όρους Χρήσης</a>'},nl:{"control,validation,validationErrors,REQUIRED":"Accepteer toestemming om u te abonneren","content,label":'Jeg giver samtykke til behandlingen af mine personlige data, og jeg har læst og accepterer <a href="https://example.com/termsofuse" target="_blank">Brugervilkår</a>'},pl:{"control,validation,validationErrors,REQUIRED":"Wyraź zgodę, aby zasubskrybować","content,label":'Wyrażam zgodę na przetwarzanie moich danych osobowych oraz zapoznałem się i akceptuję <a href="https://example.com/termsofuse" target="_blank">Warunki użytkowania</a>'},sv:{"control,validation,validationErrors,REQUIRED":"Acceptera samtycke för att prenumerera","content,label":'Jag samtycker till behandlingen av mina personuppgifter och jag har läst och accepterar <a href="https://example.com/termsofuse" target="_blank">Användarvillkor</a>'},tr:{"control,validation,validationErrors,REQUIRED":"Abone olmak için onayı kabul edin","content,label":'Kişisel verilerimin işlenmesine izin veriyorum ve <a href="https://example.com/termsofuse" target="_blank">Kullanım Koşulları</a>\'nı okudum ve kabul ediyorum.'},ar:{"control,validation,validationErrors,REQUIRED":"قبول الموافقة على الاشتراك","content,label":'أوافق على معالجة بياناتي الشخصية وقد قرأت وأوافق على <a href="https://example.com/termsofuse" target="_blank"> شروط الاستخدام </a>'},zh:{"control,validation,validationErrors,REQUIRED":"接受同意订阅","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},da:{"control,validation,validationErrors,REQUIRED":"Accepter samtykke til at abonnere","content,label":'Jeg giver samtykke til behandlingen af ​​mine personoplysninger, og jeg har læst og accepterer <a href="https://example.com/termsofuse" target="_blank">Vilkår for brug</a>'},he:{"control,validation,validationErrors,REQUIRED":"קבלו הסכמה להירשם","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},fi:{"control,validation,validationErrors,REQUIRED":"Anna suostumus tilaukseen","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hi:{"control,validation,validationErrors,REQUIRED":"सदस्यता लेने के लिए सहमति स्वीकार करें","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hr:{"control,validation,validationErrors,REQUIRED":"Prihvatite privolu za pretplatu","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hu:{"control,validation,validationErrors,REQUIRED":"Az előfizetéshez való hozzájárulás elfogadása","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},id:{"control,validation,validationErrors,REQUIRED":"Terima persetujuan untuk berlangganan","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ja:{"control,validation,validationErrors,REQUIRED":"サブスクリプションへの同意を承諾","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ko:{"control,validation,validationErrors,REQUIRED":"구독하려면 동의 수락","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},no:{"control,validation,validationErrors,REQUIRED":"Godta samtykke for å abonnere","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sk:{"control,validation,validationErrors,REQUIRED":"Udeľte súhlas s odberom","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sl:{"control,validation,validationErrors,REQUIRED":"Sprejmite soglasje za naročnino","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sr:{"control,validation,validationErrors,REQUIRED":"Prihvatite saglasnost za pretplatu","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'}},props:{content:{label:'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},control:{name:"consentId",defaultValue:!1,validation:{required:!0,validationErrors:{REQUIRED:"Accept consent to subscribe"}}},adaptiveStyles:{desktop:[{element:"host",styleAttributes:{paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,width:"100%",minWidth:null,height:"auto",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(68, 68, 68, 1)",borderBottomWidth:"1px",borderBottomColor:"rgba(68, 68, 68, 1)",borderLeftWidth:"1px",borderLeftColor:"rgba(68, 68, 68, 1)",borderRightWidth:"1px",borderRightColor:"rgba(68, 68, 68, 1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},markerStyleAttributes:{inputSize:"22px",inputToTextGapSize:"13px",defaultBackground:"rgb(255, 255, 255)",selectedBackground:"rgb(255, 255, 255)"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""}],mobile:[{element:"host",styleAttributes:{paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,width:"100%",minWidth:null,height:"auto",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"rgba(68, 68, 68, 1)",borderBottomWidth:"1px",borderBottomColor:"rgba(68, 68, 68, 1)",borderLeftWidth:"1px",borderLeftColor:"rgba(68, 68, 68, 1)",borderRightWidth:"1px",borderRightColor:"rgba(68, 68, 68, 1)",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},markerStyleAttributes:{inputSize:"22px",inputToTextGapSize:"13px",defaultBackground:"rgb(255, 255, 255)",selectedBackground:"rgb(255, 255, 255)"},classes:""},{element:"label",styleAttributes:{color:"rgba(68, 68, 68, 1)",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""}]}},metaDescription:{icon:"/SysConsentComponent/assets/img/consent-component-icon.svg",label:{en:"Data processing and terms of use",ru:"Обработка данных и условия использования",uk:"Обробка даних та умови використання",es:"Tratamiento de datos y condiciones de uso",fr:"Traitement des données et conditions d'utilisation",de:"Datenverarbeitung und Nutzungsbedingungen",it:"Trattamento dei dati e condizioni d'uso",pt:"Processamento de dados e termos de utilização",ro:"Prelucrarea datelor și condițiile de utilizare",bg:"Обработка на данни и условия за ползване",cs:"Zpracování dat a podmínky použití",el:"Επεξεργασία δεδομένων και όροι χρήσης",nl:"Gegevensverwerking en gebruiksvoorwaarden",pl:"Przetwarzanie danych i warunki użytkowania",sv:"Databehandling och användarvillkor",tr:"Veri işleme ve kullanım koşulları",ar:"معالجة البيانات وشروط الاستخدام",zh:"数据处理和使用条款",da:"Databehandling og brugsbetingelser",he:"עיבוד נתונים ותנאי השימוש"}}},t="validationStatusChanged",n="touchedStatusChanged",o="cl-";function r(e){return o+e}function i(e){return"cl-"+e}class s{static size(e){return{width:this.width(e),height:this.height(e)}}static width(e){return e=e||document,Math.max(e.documentElement.clientWidth,e.defaultView.innerWidth||0)}static height(e){return e=e||document,Math.max(e.documentElement.clientHeight,e.defaultView.innerHeight||0)}static scrollbarWidth(e){return(e=e||document).defaultView.innerWidth-e.documentElement.clientWidth}}var a=[];for(var l in{transparent:"#0000"})a.push(l);var c="\\s*([.\\d%]+)\\s*",p="\\("+[c,c,c]+"(?:,\\s*([.\\d]+)\\s*)?\\)",d="(?:rgb)a?",h="("+a.join("|")+")";function u(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}RegExp(d+p,"i"),RegExp([h,"(?:#([a-f0-9]{3,8}))",d+p,"(?:hsl)a?"+p].join("|"),"gi");var m=Array.prototype.concat,g=Array.prototype.slice,b=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var r=e[n];u(r)?t=m.call(t,g.call(r)):t.push(r)}return t};b.wrap=function(e){return function(){return e(b(arguments))}};const f=b;var y={},v=Object.hasOwnProperty,E=Object.create(null);for(var O in y)v.call(y,O)&&(E[y[O]]=O);var S={to:{},get:{}};function k(e,t,n){return Math.min(Math.max(t,e),n)}S.get=function(e){var t,n;return"hsl"===e.substring(0,3).toLowerCase()?(t=S.get.hsl(e),n="hsl"):(t=S.get.rgb(e),n="rgb"),t?{model:n,value:t}:null},S.get.rgb=function(e){if(!e)return null;var t,n,o,r=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(t.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)r[n]=parseInt(t[n]+t[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(t[n+1],0);t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:v.call(y,t[1])?((r=y[t[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}for(n=0;n<3;n++)r[n]=k(r[n],0,255);return r[3]=k(r[3],0,1),r},S.get.hsl=function(e){if(!e)return null;var t=e.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(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,k(parseFloat(t[2]),0,100),k(parseFloat(t[3]),0,100),k(isNaN(n)?1:n,0,1)]}return null},S.to.rgb=function(){var e=f(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},S.to.hsl=function(){var e=f(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};const T=S,x={},C={};for(const e of Object.keys(x))C[x[e]]=e;const R={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const e of Object.keys(R)){if(!("channels"in R[e]))throw new Error("missing channels property: "+e);if(!("labels"in R[e]))throw new Error("missing channel labels property: "+e);if(R[e].labels.length!==R[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=R[e];delete R[e].channels,delete R[e].labels,Object.defineProperty(R[e],"channels",{value:t}),Object.defineProperty(R[e],"labels",{value:n})}R.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,o=e[2]/255,r=Math.min(t,n,o),i=Math.max(t,n,o),s=i-r;let a,l;i===r?a=0:t===i?a=(n-o)/s:n===i?a=2+(o-t)/s:o===i&&(a=4+(t-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(r+i)/2;return l=i===r?0:c<=.5?s/(i+r):s/(2-i-r),[a,100*l,100*c]},R.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,o=e[2]/100;let r,i,s;if(0===n)return s=255*o,[s,s,s];r=o<.5?o*(1+n):o+n-o*n;const a=2*o-r,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(r-a)*i:2*i<1?r:3*i<2?a+(r-a)*(2/3-i)*6:a,l[e]=255*s;return l};const A=R;function w(e,t){return function(n){return t(e(n))}}function I(e,t){const n=[t[e].parent,e];let o=A[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)n.unshift(t[r].parent),o=w(A[t[r].parent][r],o),r=t[r].parent;return o.conversion=n,o}const _={};Object.keys(A).forEach((e=>{_[e]={},Object.defineProperty(_[e],"channels",{value:A[e].channels}),Object.defineProperty(_[e],"labels",{value:A[e].labels});const t=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(A);for(let n=t.length,o=0;o<n;o++)e[t[o]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),o=Object.keys(A[e]);for(let r=o.length,i=0;i<r;i++){const r=o[i],s=t[r];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,n.unshift(r))}}return t}(e),n={},o=Object.keys(t);for(let e=o.length,r=0;r<e;r++){const e=o[r];null!==t[e].parent&&(n[e]=I(e,t))}return n}(e);Object.keys(t).forEach((n=>{const o=t[n];_[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const o=e(t);if("object"==typeof o)for(let e=o.length,t=0;t<e;t++)o[t]=Math.round(o[t]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}(o),_[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(o)}))}));const L=_,P=["keyword","gray","hex"],N={};for(const e of Object.keys(L))N[[...L[e].labels].sort().join("")]=e;const j={};function M(e,t){if(!(this instanceof M))return new M(e,t);if(t&&t in P&&(t=null),t&&!(t in L))throw new Error("Unknown model: "+t);let n,o;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof M)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=T.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,o=L[this.model].channels,this.color=t.value.slice(0,o),this.valpha="number"==typeof t.value[o]?t.value[o]:1}else if(e.length>0){this.model=t||"rgb",o=L[this.model].channels;const n=Array.prototype.slice.call(e,0,o);this.color=B(n,o),this.valpha="number"==typeof e[o]?e[o]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const o=t.sort().join("");if(!(o in N))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=N[o];const{labels:r}=L[this.model],i=[];for(n=0;n<r.length;n++)i.push(e[r[n]]);this.color=B(i)}if(j[this.model])for(o=L[this.model].channels,n=0;n<o;n++){const e=j[this.model][n];e&&(this.color[n]=e(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(e){let t=this.model in T.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return T.to[t.model](n)},round(e){return e=Math.max(e||0,0),new M([...this.color.map(U(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new M([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t}};for(const e of Object.keys(L)){if(P.includes(e))continue;const{channels:t}=L[e];M.prototype[e]=function(...t){return this.model===e?new M(this):t.length>0?new M(t,e):new M([...D(L[this.model][e].raw(this.color)),this.valpha],e)},M[e]=function(...n){let o=n[0];return"number"==typeof o&&(o=B(n,t)),new M(o,e)}}function U(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function D(e){return Array.isArray(e)?e:[e]}function B(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}const F=M;function z(e,t){Object.keys(t).forEach((n=>{e.style[n]=t[n]}))}function W(e,t,n){const o=function(e,t){const n=getComputedStyle(e)[t]||e.style.getPropertyValue(t);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(t,n);if(o){const t=F(o).alpha(.5).string();return e.classList.add("focus-outline-defined"),e.style.setProperty("--clFocusOutline",`3px solid ${t}`),t}return null}function $(e){const{width:t,height:n}=e.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:s}=window.getComputedStyle(e);return{width:t+parseInt(i,10)+parseInt(s,10),height:n+parseInt(r,10)+parseInt(o,10)}}function H(e,t,n,o,r){switch(e.position){case"top":return{left:`${G(t,n,o,r)}px`,top:e.availableSpaceAboveTriggerElem-e.contentHeight-e.verticalOffset+"px"};case"bottom":return{left:`${G(t,n,o,r)}px`,bottom:e.availableSpaceBelowTriggerElem-e.contentHeight-e.verticalOffset+"px"};case"left":return{left:e.availableSpaceToTheLeftSideOfTheTrigger-t.width-e.contentWidth-e.horizontalOffset+"px",top:`${V(0,e)}px`};case"right":return{right:e.availableSpaceToTheRightSideOfTheTrigger-e.contentWidth-e.horizontalOffset+"px",top:`${V(0,e)}px`}}}function G(e,t,n,o){let r=n?e.x+e.width/2-t.width/2:e.x;return r<0&&(r=0),r+t.width>s.width(o)&&(r-=r+t.width-s.width(o)),r}function V(e,t){let n=t.availableSpaceAboveTriggerElem;return t.contentHeight>t.availableSpaceBelowTriggerElem&&(n-=t.contentHeight-t.availableSpaceBelowTriggerElem),n}function Q(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((e=>e.remove())),t.querySelectorAll("*").forEach((e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((t=>e.removeAttribute(t))),Array.from(e.attributes).forEach((t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)})),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}})),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}const K="cl-tooltip-text-styles",q=`\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 Z(e,t,n,o){let r;o=o||document,e.classList.add("invalid"),t.style.visibility="visible",t.onmouseenter=()=>{(function(e){if((e=e||document).head.querySelector(`#${K}`))return;const t=document.createElement("style");t.setAttribute("id",K),Q({element:t,html:q}),e.head.appendChild(t)})(o),r=function(e){const t="cl-overlay-tooltip-text",n=document.getElementById(t)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==e&&(n.textContent=e,n.style=null),n.id||(n.id=t),n}(n),o.body.append(r),r.style.visibility="visible",function(e){const{triggerElement:t,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=e,i=function(e,t,n,o,r,i){const a=function(e,t,n,o,r){const i=function(e,t,n,o){const r=s.width(o),{right:i}=e.getBoundingClientRect(),a=r-n-i-s.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:$(t).width,availableSpaceToTheLeftSideOfTheTrigger:i-n,availableSpaceToTheRightSideOfTheTrigger:a}}(e,t,n,r),a=function(e,t,n,o){const r=s.height(o),{top:i,bottom:a}=e.getBoundingClientRect();return{verticalOffset:n,contentHeight:$(t).height,availableSpaceAboveTriggerElem:i-n,availableSpaceBelowTriggerElem:r-a-n}}(e,t,n,r);let l="undefined";const c={bottom:a.availableSpaceBelowTriggerElem>=a.contentHeight,top:a.availableSpaceAboveTriggerElem>=a.contentHeight,right:i.availableSpaceToTheRightSideOfTheTrigger>=i.contentWidth,left:i.availableSpaceToTheLeftSideOfTheTrigger>=i.contentWidth};if(c.top?l="top":c.bottom?l="bottom":c.right?l="right":c.left&&(l="left"),c[o]&&(l=o),"undefined"===l){const e=Math.max(a.availableSpaceBelowTriggerElem,a.availableSpaceAboveTriggerElem,i.availableSpaceToTheRightSideOfTheTrigger,i.availableSpaceToTheLeftSideOfTheTrigger);e===a.availableSpaceBelowTriggerElem?l="bottom":e===a.availableSpaceAboveTriggerElem?l="top":e===i.availableSpaceToTheRightSideOfTheTrigger?l="right":e===i.availableSpaceToTheLeftSideOfTheTrigger&&(l="left")}return Object.assign(Object.assign(Object.assign({},a),i),{position:l})}(e,t,n,o,i=i||document);return function(e,t){const{marginBottom:n,marginTop:o}=window.getComputedStyle(t);if("top"===e.position)z(t,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),z(t,{"margin-bottom":"0px"});else if("bottom"===e.position)z(t,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),z(t,{"margin-top":"0px"});else{const e=(parseInt(n,10)+parseInt(o,10))/2+"px";z(t,{"margin-top":e,"margin-bottom":e})}}(a,t),{coordinates:H(a,e.getBoundingClientRect(),t.getBoundingClientRect(),r,i),position:a.position}}(t,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",i.position),z(n,i.coordinates)}({triggerElement:t,tooltipElement:r,htmlDocumentObject:o})},t.onmouseleave=()=>{r&&(r.remove(),function(e){const t=(e=e||document).head.querySelector(`#${K}`);t&&t.remove()}(o))}}function X(e){return[e.getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter((e=>!!e))}function J(e,t){return t.reduce(((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null}),null)}const Y="VIEW",ee="MODULE",te="CONTAINER",ne="INPUT",oe="BUTTON",re="CONSENT",ie="COLUMN",se="SUBSCRIBE_CONTACT",ae="REQUEST",le="SHOW_WIDGET",ce="OPEN_LINK",pe="CLOSE_WIDGET";class de{static sortActions(e){const t={[pe]:-1,[ce]:-2,[le]:1,[se]:2,[ae]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort(((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0))}constructor(e,t){this.config=e,this.actions=de.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const o=n(),r=o.getAttribute(i("id"));this.listener=e=>{const t=e.composedPath().filter((e=>e instanceof HTMLElement&&e.getAttribute(i("type"))));let n=0;for(;t[n]&&t[n].getAttribute(i("id"))!==r;){let e=t[n].getAttribute(i("type"));if(de.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((e=>{e.addEventListener("click",this.listener)}))}async execute(){var e,t,n,o;try{for(var r,i=!0,s=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}(this.eventsQueue);!(e=(r=await s.next()).done);){o=r.value,i=!1;try{const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}finally{i=!0}}}catch(e){t={error:e}}finally{try{i||e||!(n=s.return)||await n.call(s)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((e=>{e.removeEventListener("click",this.listener)})),this.targetElements=[])}}de.IGNORING_VIEW_ENTRY_TYPES=[oe,re,ne];const he="CLICK",ue="COMPONENT_EVENT";class me{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){this.componentEmitterListener=t.on(this.config.eventName,(()=>{this.actions.forEach((t=>t.execute(e.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class ge{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map((e=>this.actionFactory.get(e)));switch(t.forEach((e=>this.actionRegister.register(e))),e.type){case he:return new de(e,t);case ue:return new me(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class be{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class fe{constructor(){this.listeners=fe.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach((o=>o(t,e,n))),Object.values(this.listeners["*"]).forEach((o=>o(t,e,n)))}on(e,t){const n=be.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=fe.createDefaultListenersState()}}fe.createDefaultListenersState=()=>({"*":{}});const ye=(e,t,n,o)=>{const{addEventListenerBase:r,addEventListener:i}=EventTarget.prototype;(r||i).call(e,t,n,o)};class ve{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class Ee{static extract(e){const t=e.views.map((e=>{const t=e.children.map((e=>e.type===ee?Object.assign(Object.assign({},e),Ee.moduleToContainerParams):e));return Object.assign(Object.assign({},e),{children:t})}));return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}Ee.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class Oe extends fe{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",(({isMobileEnv:e})=>{this._isMobile=e,this.emit(Oe.changeEventName,this._isMobile)}))}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Oe.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(Oe.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Oe.changeEventName="CHANGE";class Se{static set(e,t){const n=e[Se.accumulatorPropertyName]||{};e[Se.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[Se.accumulatorPropertyName]).forEach((n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""}))}}Se.accumulatorPropertyName="clStyleAttributes";const ke="CONTENT_LOCKER";class Te{static applyHostStyles(e,t,n=null,o){var r,i,s;const a=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((e=>"CLICK"===e.type));a&&(null===(s=a.actions)||void 0===s?void 0:s.length)&&(t.style.cursor="pointer"),e!==Y&&e!==te&&e!==ie||(t.style.display=o===ke&&e===Y?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class xe{static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}class Ce{constructor(e,t,n,o,r,i){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach((n=>{var o,r,i,s,a;const l=null===(r=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===r?void 0:r.find((e=>e.element===n)),c=(null===(i=t.styles)||void 0===i?void 0:i.find((e=>e.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),d=this.parseBackground(p);d.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:d.url,inlineSvgString:null,positionOptions:d.positionOptions})})),Promise.all([...this.envUrlMaps[e].entries()].map((([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((e=>e.text())).then((o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{this._applyHostElementBackground(this.envUrlMaps[e].get("host"),this.getSharedCb().cssVars)})).catch((e=>{console.error(e),xe.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)}))}on(){return this.subscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(e=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),e)})),this}_applyHostElementBackground(e,t){e&&(this.hostElement.style.background=this._buildBackgroundUrl(e,t))}_buildBackgroundUrl(e,t){const n=e.inlineSvgString.trim().replace("var(--cl-schema-accent)",t["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}off(){var e;null===(e=this.subscription)||void 0===e||e.off()}}const Re=new class{execute(e,t,n=null,o,r){const i={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,i)}};function Ae(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{})}class we{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,(e=>"_"+e)).toUpperCase()}}class Ie{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const _e="COMPONENT_RESOURCES_LOADED",Le="FAILED_TO_LOAD_COMPONENT_RESOURCE";class Pe{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(_e,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Le,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new Ie(this.onCounterStateUpdate)}}}const Ne=(...e)=>{let t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:[]})),{});return{get:e=>t[e],clear:()=>Ne(...e)}},je=Ne,Me="props",Ue="shared",De="environment";function Be(e,t,n,o){const r=e=>{let i=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return i&&(o&&"function"==typeof o?o(i.getAttribute(t)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,t))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(e)}const Fe="SUBMIT";function ze(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach((n=>{"element"!==n&&"classes"!==n&&(t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?e[n]=Object.assign(Object.assign({},e[n]||{}),t[n]):e[n]=t[n])})),e):e}function We(e,t,n){var o;return null===(o=e[t])||void 0===o?void 0:o.find((e=>e.element===n))}class $e extends Event{constructor(e,t,n){super(e,n),this.detail={},Object.defineProperty(this,"detail",{value:t})}}class He extends HTMLElement{constructor(){var e,t;super(),this.construct=()=>{let e;const t=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 s=new $e("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:t,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(s),e=s.detail.props,Object.assign(this,e),this.observers=je(Me,Ue,De),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach((e=>null==e?void 0:e.off()))}},this.state=new ve,this.componentEventEmitter=new fe,this.componentResourceManager=new Pe(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 ge(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(e=>{this.model.props=e,this.observers.get(Me).forEach((t=>t(this.prevProps,e))),this.prevProps=e;const t=this.getHostElement(),n=i("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(e=>{Object.assign(this.model,e)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(Ue).forEach((e=>e(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Ce(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Re),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Oe.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(De).forEach((t=>t(this.prevEnvironment,e))),this.prevEnvironment=e})))},this.attachHandlers=()=>{this.getHandlers().map((e=>this._handlerFactory.get(e))).map((e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((e=>e()))},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.postpone()))},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.release()))},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(Me).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(Ue).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(De).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((e=>!e.hasAttribute(i("component"))))],this.getElement=(e,t)=>this.getElements().find((n=>t?n.getAttribute(i("element"))===e&&n.id===t:n.getAttribute(i("element"))===e)),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;e=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach((e=>{const t=e.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===t&&(ze(n,e),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===t&&(ze(n,e),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))})),n}(e,t);const o=i("type"),r="element-styles";let s=this.getRootElement().querySelector(`style[${o}="${r}"]`);s||(s=document.createElement("style"),s.setAttribute(o,r),this.getRootElement().appendChild(s)),Q({element:s,html:""}),n.forEach((t=>{let n=t.getAttribute(i("element"));const o=this.getEnvironment();let r=We(e,o,n);if(r){if(this.resizeListener.isMobile()){const t=We(e,"desktop",n);t&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),r.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(r),s)}})),this._addLinkColor(s,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var o,r;const s=[];"host"===(t=He._resolveTogglableStylesForElementModel(t)).element&&(Te.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let a=t.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const e=new Image;e.src=l[1],ye(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),ye(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),"UPDATING"===this.services.config.getConfig("entryModuleType")&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},t),{styleAttributes:Ae(t.styleAttributes,s)});if(Se.set(e,c),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let o=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),r=`flip-up-animation-${t.element}`;let i=this.getRootElement().querySelector(`#${r}`);i||(i=document.createElement("style"),i.id=r,e.appendChild(i)),Q({element:i,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},t.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,t.element,o,`:not(.${i("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this._fixMarginOverflow=e=>{const t=this.getParentComponent(),n=t&&("flex"===t.style.display||"inline-flex"===t.style.display),o="host",r=e.getAttribute(i("element"))===o;if(!n||!r)return;const s=this.getProps(),a=this.getEnvironment(),{styleAttributes:l}=We(s.adaptiveStyles,a,o)||{};if(!l)return;const c=l.marginLeft||l.marginRight,p="100%"===l.width;if(c&&p){const t=(parseFloat(l.marginLeft)||0)+(parseFloat(l.marginRight)||0);t&&setTimeout((()=>{e.style.width=`calc(100% - ${t}px)`}))}},this.applySharedClassesToElementModel=e=>function(e,t){let n=e;return(n.classes||"").split(" ").filter((e=>e.startsWith(o))).forEach((e=>{var o;let r=null===(o=t.textClasses)||void 0===o?void 0:o[e];r&&(r.styleAttributes.fontFamily||(r.isHeader&&t.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.headerFontFamily})})),!r.isHeader&&t.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:t.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:t.textFontFamily})})),n}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,o="",r)=>{const s=Object.keys(n).reduce(((e,t)=>e+` ${we.camelCaseToDashCase(t)}: ${n[t]}${r?" !important;":";"}`),"");Q({element:e,html:`[${i("element")}="${t}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{Q({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,r,i;t.linkColor&&Q({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&Q({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=t.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=t.linkParams)||void 0===i?void 0:i.removeUnderline)&&Q({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,t)=>{Array.from(e.classList).filter((e=>e!==r("hovered")&&e!==r("focused"))).forEach((t=>{t.startsWith(o)&&e.classList.remove(t)}));const n=((e.getAttribute("class")||"")+" "+t.classes).trim();e.setAttribute("class",n)},this.getParentComponent=()=>Be(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(i("path"));return e&&1===e.split(",").length?this.parentNode:Be(this.parentNode,i("path"),void 0,(e=>e&&1===e.split(",").length))},this.getWidgetLanguages=()=>X(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>J(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.addContextRecord=()=>{var e;const t=this.getModel();this.services.context.addRecord(t.id,{recordKey:t.id,id:t.props.control.name,label:this.getContextRecordLabel(t.props),value:t.props.control.defaultValue||"",viewIndex:null===(e=t.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(t.props)}})},this.getContextRecordLabel=e=>{var t,n;const o=e.control.name;if(["email","first_name","last_name"].includes(o))return o.toUpperCase();if(e.content.label&&(null===(n=null===(t=e.adaptiveStyles.desktop.find((e=>"label"===e.element)))||void 0===t?void 0:t.params)||void 0===n?void 0:n.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return e.content.placeholder?this.capitalizeFirstLetter(e.content.placeholder):e.control.integrationName?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{switch(e.control.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find((e=>e.category===Fe));n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:ae}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>this.getProps().handlers&&this.getProps().handlers.length?[...this.getProps().handlers]:[],this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.define)||void 0===e?void 0:e.manifest)||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}static _resolveTogglableStylesForElementModel(e){const t=Object.assign({},e);return Object.keys(t).forEach((e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=He._resolveTogglableStyles(t[e]))})),t}static _resolveTogglableStyles(e){const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach((e=>{e in t&&(t[e]=t[n]?t[e]:o)})),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t}}const Ge=Symbol("required");var Ve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function Qe(){}const Ke="pending",qe="valid",Ze="invalid";class Xe extends He{constructor(){super(...arguments),this._createControl=(e={},...t)=>{var{element:n}=e,o=Ve(e,["element"]);const r=this.getProps(),i=this.getModel(),s=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),a=this.services.form,l=[s,n,...t];return a.hasControl(r.control.name)?a.updateControl(...l):a.registerControl(...l)},this.createControlWithValidation=(e=[],t={})=>{var{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=Qe,invalidCallback:i=Qe,pendingCallback:s=Qe,elementToListen:a=n,validationMap:l={},listenStatusChange:c=!0}=t,p=Ve(t,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!e||!Array.isArray(e))throw new Error("Validators should be an array");const d=this.getProps().control.validation,h=l[null==d?void 0:d.validator],u=e.some((e=>e[Ge])),m=!!(null==d?void 0:d.required),g=m||u,b=[...e];m&&!u&&b.unshift(function(e="REQUIRED"){const t=t=>{let n;switch(typeof t){case"string":n=t&&t.length>0;break;case"boolean":n=t;break;case"number":n=!isNaN(t);break;default:n=!!t}return{isValid:n,errorKey:n?null:e}};return t[Ge]=!0,t}()),h&&b.push(h);const f=this._prepareAsyncValidators(b),y=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:y,element:a,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:s},p)),y},this._prepareAsyncValidators=(e=[])=>e.reduce(((e,t,n)=>"function"!=typeof t?(console.warn(`Validator ${n} should be a function, so it will be skipped`),e):(e[`custom_${n}`]=async(...e)=>{const n=await Promise.resolve(t(...e));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},e)),{}),this._handleControlStatusChange=e=>{e.control.on(t,(t=>{this._handleValidationStatus(e,t)})),e.control.on(n,(()=>{let t=Ke;switch(!0){case e.control.pending:t=Ke;break;case e.control.valid:t=qe;break;default:t=Ze}this._handleValidationStatus(e,t)}))},this._handleValidationStatus=(e,t)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:s,errorMessageMapper:a,pendingCallback:l}=e,c=this.services.config,p=this.manifest.i18n;switch(t){case qe:(function(e,t){e.classList.remove("invalid"),t.style.visibility="hidden"})(o,r),i&&i();break;case Ze:if(n.touched){const e=n.getErrorKeys();if(!e)break;const t=e[0];let i=function(e,t,n){const o=J(t,X(e)).translations,r=Object.keys(o).find((e=>e.includes(n)));return r?o[r]:n}(c,p,t);a&&(i=a(t,i)),Z(o,r,i,this.htmlDocumentObject),s&&s()}break;case Ke:n.touched&&(function(e,t){t.style.visibility="hidden",e.classList.contains("invalid")&&e.classList.remove("invalid")}(o,r),l&&l())}}}}const Je=new Map;Je.set("checkboxSize","inputSize"),Je.set("checkboxToTextGapSize","inputToTextGapSize");const Ye=Je;function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(n),!0).forEach((function(t){lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ct(o.key),o)}}function rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rt=function(){return!!e})()}function it(){return it="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=st(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},it.apply(null,arguments)}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function at(e,t){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},at(e,t)}function lt(e,t,n){return(t=ct(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var pt=function(){function t(){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return lt(n=function(e,t,n){return t=st(t),function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rt()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"manifest",e),lt(n,"defaultCheckmarkStyleAttributes",{inputSize:"22px",inputToTextGapSize:"13px",selectedBackground:"rgb(255,255,255)",defaultBackground:"rgb(255,255,255)",backdropFilter:"none"}),lt(n,"updateCheckmark",(function(e){var t,o=n.getRootElement().querySelector(".checkmark");e?(o.classList.add("checkmark-checked"),t=n.getCheckmarkStyleAttributes("selectedBackground")):(o.classList.remove("checkmark-checked"),t=n.getCheckmarkStyleAttributes("defaultBackground")),o.style.background="".concat(t),o.style["backdrop-filter"]=n.getCheckmarkStyleAttributes("backdropFilter")})),lt(n,"getInputAdaptiveStyles",(function(){var e=n.getProps(),t=n.getEnvironment();return e.adaptiveStyles[t].filter((function(e){return"input"===e.element}))})),lt(n,"getCheckmarkStyleAttributes",(function(e){var t=n.getInputAdaptiveStyles();return t.length&&t[0].markerStyleAttributes?e?t[0].markerStyleAttributes[e]:t[0].markerStyleAttributes:t.length&&t[0].checkmarkStyleAttributes?e?t[0].checkmarkStyleAttributes[e]:t[0].checkmarkStyleAttributes.checkboxSize||t[0].checkmarkStyleAttributes.inputSize?t[0].checkmarkStyleAttributes:nt({inputSize:"22px",inputToTextGapSize:"16px"},t[0].checkmarkStyleAttributes):e?n.defaultCheckmarkStyleAttributes[e]:n.defaultCheckmarkStyleAttributes})),lt(n,"registerLabelControl",(function(e){var t=n.getProps(),o="".concat(t.control.name,"_label");if(!n.services.form.hasControl(o)){var r={name:o,defaultValue:e};n.services.form.registerControl(nt(nt({},r),{},{componentId:n.getModel().id,viewIdx:n.getModel().path[0]}),null)}})),lt(n,"setStylesVariables",(function(e){var t=n.getCheckmarkStyleAttributes();Object.keys(t).forEach((function(n){var o=Ye.get(n)||n;e.style.setProperty("--".concat(o),t[n])}))})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&at(e,t)}(t,Xe),n=t,o=[{key:"connectedCallback",value:function(){var e,n,o,r=this;(e=t,n=this,"function"==typeof(o=it(st(1&3?e.prototype:e),"connectedCallback",n))?function(e){return o.apply(n,e)}:o)([]),this.getRootElement().innerHTML+="\n ".concat('\n<style>\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n flex-direction: row;\n}\n\n.input-with-tooltip {\n position: relative;\n display: flex;\n align-items: baseline;\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\ninput {\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n width: 24px;\n height: 24px;\n padding: 0 10px;\n margin: 0;\n}\n\n/* The container */\n.checkmark-container {\n display: block;\n position: relative;\n height: 25px;\n width: 25px;\n cursor: pointer;\n font-size: 22px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n/* Hide the browser\'s default checkbox */\n.checkmark-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n/* Create a custom checkbox */\n.checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 2px;\n}\n\n.checkmark:after {\n content: "";\n position: absolute;\n display: none;\n}\n\n.checkmark-checked:after {\n display: block;\n}\n\n.checkmark-container .checkmark:after {\n width: 9px;\n height: 14px;\n border: solid #000000;\n border-width: 0 3px 3px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.label {\n margin: auto auto auto var(--inputToTextGapSize, 18px);\n flex: 1;\n height: auto;\n min-height: 10px;\n}\n\ninput:focus ~ .checkmark.focus-outline-defined {\n outline: var(--clFocusOutline);\n}\n\n</style>\n ','\n <div class="main-container">\n <div class="label-with-input-container">\n <div class="input-with-tooltip">\n <label class="checkmark-container">\n <input type="checkbox"\n name="fname">\n <span cl-element="input" class="checkmark"></span>\n </label>\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 cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n </div>\n </div>\n </div>\n ');var i=this.getRootElement(),s=i.querySelector(".checkmark"),a=this.createControlWithValidation([],{element:i.querySelector("input"),validCallback:function(){s.classList.contains("invalid")&&s.classList.remove("invalid")},invalidCallback:function(){s.classList.contains("invalid")||s.classList.add("invalid")}});a.on("valueChanged",(function(e){r.updateCheckmark(e)})),this.updateCheckmark(!!a.getValue()),this.observeProps((function(e,t){r.applyAutoAdaptiveStyles(t.adaptiveStyles),Q({element:r.getRootElement().querySelector(".label"),html:t.content.label}),r.registerLabelControl(t.content.label),r.setStylesVariables(r.getHostElement());var n=r.getRootElement().querySelector(".checkmark-container");n.style.width=r.getCheckmarkStyleAttributes("inputSize"),n.style.height=r.getCheckmarkStyleAttributes("inputSize"),function(e){let t;const n=e,o=["transparent","initial"];e&&(e.style.borderColor&&!o.includes(e.style.borderColor)&&(parseFloat(e.style.borderWidth)||parseFloat(e.style.borderBottomWidth))&&(t=W(n,e,"borderColor")),!t&&e.style.getPropertyValue("--borderBottomColor")&&!o.includes(e.style.getPropertyValue("--borderBottomColor"))&&parseFloat(e.style.getPropertyValue("--borderBottomWidth"))&&(t=W(n,e,"--borderBottomColor")),t||!e.style.backgroundColor||o.includes(e.style.backgroundColor)||(t=W(n,e,"backgroundColor")),t||!e.style.color||o.includes(e.style.color)||(t=W(n,e,"color")),t||n.classList.remove("focus-outline-defined"))}(r.getElement("input"))}))}}],o&&ot(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}();lt(pt,"define",{name:"sys-consent",model:e.name,manifest:e});export{pt as default};window.clComponentClass_SysConsentComponent=pt;
1
+ const e={DESKTOP:"desktop",MOBILE:"mobile"},t="cl-";function n(e){return t+e}function o(e){return"cl-"+e}function r(e,t,n){var o;return null===(o=e[t])||void 0===o?void 0:o.find((e=>e.element===n))}function i(e=[]){return e.map((e=>Object.assign(Object.assign({},e),{styleAttributes:Object.assign({},e.styleAttributes)})))}const s={name:"SysConsentComponent",componentType:"CONSENT",version:"1.0.0",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:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{height:{hide:!0}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"label",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"label",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!0}]},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_DEFAULT_TITLE",property:"defaultBackground"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_SELECTED_TITLE",property:"selectedBackground"}},{type:"CONTROL",name:"BORDERS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BOX_SHADOW",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"label",isLineSpaceAvailable:!0,isTextTransformAvailable:!0}]},{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"label",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!0}]},{type:"CONTROL",name:"MULTIPLE_INPUT_SIZE",element:"input",params:{inputType:"CHECKBOX"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_DEFAULT_TITLE",property:"defaultBackground"}},{type:"CONTROL",name:"BACKGROUND",element:"input",elementProp:"markerStyleAttributes",params:{label:"DOCUMENT_CHECKBOX_BACKGROUND_SELECTED_TITLE",property:"selectedBackground"}},{type:"CONTROL",name:"BORDERS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BOX_SHADOW",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"input"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]}]},events:{dispatch:[],listen:[]},i18nPropPaths:["content,label"],i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"INSERT_BLOCK",params:[{element:"text",label:"DOCUMENT_TEXT",isLinkAvailable:!0,origin:!1}]}]},i18n:{en:{"control,validation,validationErrors,REQUIRED":"Accept consent to subscribe","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ru:{"control,validation,validationErrors,REQUIRED":"Примите соглашение для подписки","content,label":'Я даю согласие на обработку своих персональных данных и ознакомлен с <a href="https://example.com/termsofuse" target="_blank">условиями использования сервиса</a>'},uk:{"control,validation,validationErrors,REQUIRED":"Прийміть угоду для підписки","content,label":'Я даю згоду на обробку своїх персональних даних та ознайомлений з <a href="https://example.com/termsofuse" target="_blank">умовами використання сервісу</a>'},es:{"control,validation,validationErrors,REQUIRED":"Aceptar el consentimiento para suscribirse","content,label":'Doy mi consentimiento para el procesamiento de mis datos personales y he leído y acepto los <a href="https://example.com/termsofuse" target="_blank">Términos de uso</a>'},de:{"control,validation,validationErrors,REQUIRED":"Zustimmung zum Abonnement akzeptieren","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},fr:{"control,validation,validationErrors,REQUIRED":"Accepter le consentement pour s'abonner","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},it:{"control,validation,validationErrors,REQUIRED":"Accetti il consenso per iscriversi","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},pt:{"control,validation,validationErrors,REQUIRED":"Aceitar consentimento para subscrever","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ro:{"control,validation,validationErrors,REQUIRED":"Acceptați consimțământul pentru abonare","content,label":'Sunt de acord cu prelucrarea datelor mele personale și am citit și accept <a href="https://example.com/termsofuse" target="_blank">Termenii de utilizare</a>'},bg:{"control,validation,validationErrors,REQUIRED":"Приемете съгласието, за да се абонирате","content,label":'Съгласен съм с обработката на личните ми данни и прочетох и приемам <a href="https://example.com/termsofuse" target="_blank">Условията за ползване</a>'},cs:{"control,validation,validationErrors,REQUIRED":"Pro odběr přijměte souhlas","content,label":'Souhlasím se zpracováním mých osobních údajů a přečetl jsem si a přijímám <a href="https://example.com/termsofuse" target="_blank">Podmínky použití</a>'},el:{"control,validation,validationErrors,REQUIRED":"Αποδέχεστε τη συναίνεση στην εγγραφή","content,label":'Συναινώ στην επεξεργασία των προσωπικών μου δεδομένων και έχω διαβάσει και αποδέχομαι τους <a href="https://example.com/termsofuse" target="_blank">Όρους Χρήσης</a>'},nl:{"control,validation,validationErrors,REQUIRED":"Accepteer toestemming om u te abonneren","content,label":'Jeg giver samtykke til behandlingen af mine personlige data, og jeg har læst og accepterer <a href="https://example.com/termsofuse" target="_blank">Brugervilkår</a>'},pl:{"control,validation,validationErrors,REQUIRED":"Wyraź zgodę, aby zasubskrybować","content,label":'Wyrażam zgodę na przetwarzanie moich danych osobowych oraz zapoznałem się i akceptuję <a href="https://example.com/termsofuse" target="_blank">Warunki użytkowania</a>'},sv:{"control,validation,validationErrors,REQUIRED":"Acceptera samtycke för att prenumerera","content,label":'Jag samtycker till behandlingen av mina personuppgifter och jag har läst och accepterar <a href="https://example.com/termsofuse" target="_blank">Användarvillkor</a>'},tr:{"control,validation,validationErrors,REQUIRED":"Abone olmak için onayı kabul edin","content,label":'Kişisel verilerimin işlenmesine izin veriyorum ve <a href="https://example.com/termsofuse" target="_blank">Kullanım Koşulları</a>\'nı okudum ve kabul ediyorum.'},ar:{"control,validation,validationErrors,REQUIRED":"قبول الموافقة على الاشتراك","content,label":'أوافق على معالجة بياناتي الشخصية وقد قرأت وأوافق على <a href="https://example.com/termsofuse" target="_blank"> شروط الاستخدام </a>'},zh:{"control,validation,validationErrors,REQUIRED":"接受同意订阅","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},da:{"control,validation,validationErrors,REQUIRED":"Accepter samtykke til at abonnere","content,label":'Jeg giver samtykke til behandlingen af ​​mine personoplysninger, og jeg har læst og accepterer <a href="https://example.com/termsofuse" target="_blank">Vilkår for brug</a>'},he:{"control,validation,validationErrors,REQUIRED":"קבלו הסכמה להירשם","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},fi:{"control,validation,validationErrors,REQUIRED":"Anna suostumus tilaukseen","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hi:{"control,validation,validationErrors,REQUIRED":"सदस्यता लेने के लिए सहमति स्वीकार करें","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hr:{"control,validation,validationErrors,REQUIRED":"Prihvatite privolu za pretplatu","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},hu:{"control,validation,validationErrors,REQUIRED":"Az előfizetéshez való hozzájárulás elfogadása","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},id:{"control,validation,validationErrors,REQUIRED":"Terima persetujuan untuk berlangganan","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ja:{"control,validation,validationErrors,REQUIRED":"サブスクリプションへの同意を承諾","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},ko:{"control,validation,validationErrors,REQUIRED":"구독하려면 동의 수락","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},no:{"control,validation,validationErrors,REQUIRED":"Godta samtykke for å abonnere","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sk:{"control,validation,validationErrors,REQUIRED":"Udeľte súhlas s odberom","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sl:{"control,validation,validationErrors,REQUIRED":"Sprejmite soglasje za naročnino","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},sr:{"control,validation,validationErrors,REQUIRED":"Prihvatite saglasnost za pretplatu","content,label":'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'}},props:{content:{label:'I consent to the processing of my personal data and I have read and I do accept <a href="https://example.com/termsofuse" target="_blank">Terms of Use</a>'},control:{name:"consentId",defaultValue:!1,validation:{required:!0,validationErrors:{REQUIRED:"Accept consent to subscribe"}}},adaptiveStyles:(a=[{element:"host",styleAttributes:{paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,width:"100%",minWidth:null,height:"auto",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1},classes:""},{element:"input",styleAttributes:{borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"1px",borderTopColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderBottomWidth:"1px",borderBottomColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderLeftWidth:"1px",borderLeftColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderRightWidth:"1px",borderRightColor:"var(--cl-schema-background-7, rgb(68, 68, 68))",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",boxShadow:"none"},markerStyleAttributes:{inputSize:"22px",inputToTextGapSize:"13px",defaultBackground:"rgb(255, 255, 255)",selectedBackground:"var(--cl-schema-primary, rgb(255, 255, 255))"},classes:""},{element:"label",styleAttributes:{color:"var(--cl-schema-text, rgb(68, 68, 68))",textAlign:"start",lineHeight:"120%",fontWeight:"400",fontSize:"14px",textShadow:"none"},classes:""}],Object.values(e).reduce(((e,t)=>Object.assign(e,{[t]:i(a)})),{[e.DESKTOP]:[],[e.MOBILE]:[]}))},metaDescription:{icon:"/SysConsentComponent/assets/img/consent-component-icon.svg",label:{en:"Data processing and terms of use",ru:"Обработка данных и условия использования",uk:"Обробка даних та умови використання",es:"Tratamiento de datos y condiciones de uso",fr:"Traitement des données et conditions d'utilisation",de:"Datenverarbeitung und Nutzungsbedingungen",it:"Trattamento dei dati e condizioni d'uso",pt:"Processamento de dados e termos de utilização",ro:"Prelucrarea datelor și condițiile de utilizare",bg:"Обработка на данни и условия за ползване",cs:"Zpracování dat a podmínky použití",el:"Επεξεργασία δεδομένων και όροι χρήσης",nl:"Gegevensverwerking en gebruiksvoorwaarden",pl:"Przetwarzanie danych i warunki użytkowania",sv:"Databehandling och användarvillkor",tr:"Veri işleme ve kullanım koşulları",ar:"معالجة البيانات وشروط الاستخدام",zh:"数据处理和使用条款",da:"Databehandling og brugsbetingelser",he:"עיבוד נתונים ותנאי השימוש"}}};var a;const l="validationStatusChanged",c="touchedStatusChanged";class p{static size(e){return{width:this.width(e),height:this.height(e)}}static width(e){return e=e||document,Math.max(e.documentElement.clientWidth,e.defaultView.innerWidth||0)}static height(e){return e=e||document,Math.max(e.documentElement.clientHeight,e.defaultView.innerHeight||0)}static scrollbarWidth(e){return(e=e||document).defaultView.innerWidth-e.documentElement.clientWidth}}var h=[];for(var d in{transparent:"#0000"})h.push(d);var u="\\s*([.\\d%]+)\\s*",m="\\("+[u,u,u]+"(?:,\\s*([.\\d]+)\\s*)?\\)",g="(?:rgb)a?",b="("+h.join("|")+")";function f(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}RegExp(g+m,"i"),RegExp([b,"(?:#([a-f0-9]{3,8}))",g+m,"(?:hsl)a?"+m].join("|"),"gi");var y=Array.prototype.concat,v=Array.prototype.slice,E=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var r=e[n];f(r)?t=y.call(t,v.call(r)):t.push(r)}return t};E.wrap=function(e){return function(){return e(E(arguments))}};const O=E;var k={},S=Object.hasOwnProperty,T=Object.create(null);for(var C in k)S.call(k,C)&&(T[k[C]]=C);var x={to:{},get:{}};function R(e,t,n){return Math.min(Math.max(t,e),n)}x.get=function(e){var t,n;return"hsl"===e.substring(0,3).toLowerCase()?(t=x.get.hsl(e),n="hsl"):(t=x.get.rgb(e),n="rgb"),t?{model:n,value:t}:null},x.get.rgb=function(e){if(!e)return null;var t,n,o,r=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var i=2*n;r[n]=parseInt(t.slice(i,i+2),16)}o&&(r[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)r[n]=parseInt(t[n]+t[n],16);o&&(r[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(t[n+1],0);t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:S.call(k,t[1])?((r=k[t[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?r[3]=.01*parseFloat(t[4]):r[3]=parseFloat(t[4]))}for(n=0;n<3;n++)r[n]=R(r[n],0,255);return r[3]=R(r[3],0,1),r},x.get.hsl=function(e){if(!e)return null;var t=e.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(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,R(parseFloat(t[2]),0,100),R(parseFloat(t[3]),0,100),R(isNaN(n)?1:n,0,1)]}return null},x.to.rgb=function(){var e=O(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},x.to.hsl=function(){var e=O(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};const A=x,w={},I={};for(const e of Object.keys(w))I[w[e]]=e;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:t}),Object.defineProperty(_[e],"labels",{value:n})}_.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,o=e[2]/255,r=Math.min(t,n,o),i=Math.max(t,n,o),s=i-r;let a,l;i===r?a=0:t===i?a=(n-o)/s:n===i?a=2+(o-t)/s:o===i&&(a=4+(t-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(r+i)/2;return l=i===r?0:c<=.5?s/(i+r):s/(2-i-r),[a,100*l,100*c]},_.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,o=e[2]/100;let r,i,s;if(0===n)return s=255*o,[s,s,s];r=o<.5?o*(1+n):o+n-o*n;const a=2*o-r,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(r-a)*i:2*i<1?r:3*i<2?a+(r-a)*(2/3-i)*6:a,l[e]=255*s;return l};const P=_;function L(e,t){return function(n){return t(e(n))}}function N(e,t){const n=[t[e].parent,e];let o=P[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)n.unshift(t[r].parent),o=L(P[t[r].parent][r],o),r=t[r].parent;return o.conversion=n,o}const j={};Object.keys(P).forEach((e=>{j[e]={},Object.defineProperty(j[e],"channels",{value:P[e].channels}),Object.defineProperty(j[e],"labels",{value:P[e].labels});const t=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(P);for(let n=t.length,o=0;o<n;o++)e[t[o]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),o=Object.keys(P[e]);for(let r=o.length,i=0;i<r;i++){const r=o[i],s=t[r];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,n.unshift(r))}}return t}(e),n={},o=Object.keys(t);for(let e=o.length,r=0;r<e;r++){const e=o[r];null!==t[e].parent&&(n[e]=N(e,t))}return n}(e);Object.keys(t).forEach((n=>{const o=t[n];j[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const o=e(t);if("object"==typeof o)for(let e=o.length,t=0;t<e;t++)o[t]=Math.round(o[t]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}(o),j[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(o)}))}));const M=j,U=["keyword","gray","hex"],D={};for(const e of Object.keys(M))D[[...M[e].labels].sort().join("")]=e;const B={};function F(e,t){if(!(this instanceof F))return new F(e,t);if(t&&t in U&&(t=null),t&&!(t in M))throw new Error("Unknown model: "+t);let n,o;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof F)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=A.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,o=M[this.model].channels,this.color=t.value.slice(0,o),this.valpha="number"==typeof t.value[o]?t.value[o]:1}else if(e.length>0){this.model=t||"rgb",o=M[this.model].channels;const n=Array.prototype.slice.call(e,0,o);this.color=$(n,o),this.valpha="number"==typeof e[o]?e[o]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const o=t.sort().join("");if(!(o in D))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=D[o];const{labels:r}=M[this.model],i=[];for(n=0;n<r.length;n++)i.push(e[r[n]]);this.color=$(i)}if(B[this.model])for(o=M[this.model].channels,n=0;n<o;n++){const e=B[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}F.prototype={toString(){return this.string()},string(e){let t=this.model in A.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return A.to[t.model](n)},round(e){return e=Math.max(e||0,0),new F([...this.color.map(z(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new F([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t}};for(const e of Object.keys(M)){if(U.includes(e))continue;const{channels:t}=M[e];F.prototype[e]=function(...t){return this.model===e?new F(this):t.length>0?new F(t,e):new F([...W(M[this.model][e].raw(this.color)),this.valpha],e)},F[e]=function(...n){let o=n[0];return"number"==typeof o&&(o=$(n,t)),new F(o,e)}}function z(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function W(e){return Array.isArray(e)?e:[e]}function $(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}const H=F;function G(e,t){Object.keys(t).forEach((n=>{e.style[n]=t[n]}))}function V(e,t,n){const o=function(e,t){const n=getComputedStyle(e)[t]||e.style.getPropertyValue(t);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(t,n);if(o){const t=H(o).alpha(.5).string();return e.classList.add("focus-outline-defined"),e.style.setProperty("--clFocusOutline",`3px solid ${t}`),t}return null}function Q(e){const{width:t,height:n}=e.getBoundingClientRect(),{marginBottom:o,marginTop:r,marginLeft:i,marginRight:s}=window.getComputedStyle(e);return{width:t+parseInt(i,10)+parseInt(s,10),height:n+parseInt(r,10)+parseInt(o,10)}}function K(e,t,n,o,r){switch(e.position){case"top":return{left:`${q(t,n,o,r)}px`,top:e.availableSpaceAboveTriggerElem-e.contentHeight-e.verticalOffset+"px"};case"bottom":return{left:`${q(t,n,o,r)}px`,bottom:e.availableSpaceBelowTriggerElem-e.contentHeight-e.verticalOffset+"px"};case"left":return{left:e.availableSpaceToTheLeftSideOfTheTrigger-t.width-e.contentWidth-e.horizontalOffset+"px",top:`${Z(0,e)}px`};case"right":return{right:e.availableSpaceToTheRightSideOfTheTrigger-e.contentWidth-e.horizontalOffset+"px",top:`${Z(0,e)}px`}}}function q(e,t,n,o){let r=n?e.x+e.width/2-t.width/2:e.x;return r<0&&(r=0),r+t.width>p.width(o)&&(r-=r+t.width-p.width(o)),r}function Z(e,t){let n=t.availableSpaceAboveTriggerElem;return t.contentHeight>t.availableSpaceBelowTriggerElem&&(n-=t.contentHeight-t.availableSpaceBelowTriggerElem),n}function X(e){const{element:t,html:n,appendHtml:o}=e,r=function(e){if(null==e)return"";if("string"!=typeof e)return String(e);if(""===e)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(e))return e;const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((e=>e.remove())),t.querySelectorAll("*").forEach((e=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((t=>e.removeAttribute(t))),Array.from(e.attributes).forEach((t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)})),"A"===e.tagName||"AREA"===e.tagName){const t=e.getAttribute("href");t&&(t.startsWith("javascript:")||t.startsWith("data:"))&&e.removeAttribute("href")}if("IMG"===e.tagName||"IFRAME"===e.tagName){const t=e.getAttribute("src");t&&(t.startsWith("javascript:")||t.startsWith("data:text/html"))&&e.removeAttribute("src")}if("FORM"===e.tagName){const t=e.getAttribute("action");t&&t.startsWith("javascript:")&&e.removeAttribute("action")}})),t.body.innerHTML}(n);o?t.innerHTML+=r:t.innerHTML=r}const J="cl-tooltip-text-styles",Y=`\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 ee(e,t,n,o){let r;o=o||document,e.classList.add("invalid"),t.style.visibility="visible",t.onmouseenter=()=>{(function(e){if((e=e||document).head.querySelector(`#${J}`))return;const t=document.createElement("style");t.setAttribute("id",J),X({element:t,html:Y}),e.head.appendChild(t)})(o),r=function(e){const t="cl-overlay-tooltip-text",n=document.getElementById(t)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==e&&(n.textContent=e,n.style=null),n.id||(n.id=t),n}(n),o.body.append(r),r.style.visibility="visible",function(e){const{triggerElement:t,tooltipElement:n,offset:o=10,htmlDocumentObject:r}=e,i=function(e,t,n,o,r,i){const s=function(e,t,n,o,r){const i=function(e,t,n,o){const r=p.width(o),{right:i}=e.getBoundingClientRect(),s=r-n-i-p.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:Q(t).width,availableSpaceToTheLeftSideOfTheTrigger:i-n,availableSpaceToTheRightSideOfTheTrigger:s}}(e,t,n,r),s=function(e,t,n,o){const r=p.height(o),{top:i,bottom:s}=e.getBoundingClientRect();return{verticalOffset:n,contentHeight:Q(t).height,availableSpaceAboveTriggerElem:i-n,availableSpaceBelowTriggerElem:r-s-n}}(e,t,n,r);let a="undefined";const l={bottom:s.availableSpaceBelowTriggerElem>=s.contentHeight,top:s.availableSpaceAboveTriggerElem>=s.contentHeight,right:i.availableSpaceToTheRightSideOfTheTrigger>=i.contentWidth,left:i.availableSpaceToTheLeftSideOfTheTrigger>=i.contentWidth};if(l.top?a="top":l.bottom?a="bottom":l.right?a="right":l.left&&(a="left"),l[o]&&(a=o),"undefined"===a){const e=Math.max(s.availableSpaceBelowTriggerElem,s.availableSpaceAboveTriggerElem,i.availableSpaceToTheRightSideOfTheTrigger,i.availableSpaceToTheLeftSideOfTheTrigger);e===s.availableSpaceBelowTriggerElem?a="bottom":e===s.availableSpaceAboveTriggerElem?a="top":e===i.availableSpaceToTheRightSideOfTheTrigger?a="right":e===i.availableSpaceToTheLeftSideOfTheTrigger&&(a="left")}return Object.assign(Object.assign(Object.assign({},s),i),{position:a})}(e,t,n,o,i=i||document);return function(e,t){const{marginBottom:n,marginTop:o}=window.getComputedStyle(t);if("top"===e.position)G(t,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),G(t,{"margin-bottom":"0px"});else if("bottom"===e.position)G(t,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),G(t,{"margin-top":"0px"});else{const e=(parseInt(n,10)+parseInt(o,10))/2+"px";G(t,{"margin-top":e,"margin-bottom":e})}}(s,t),{coordinates:K(s,e.getBoundingClientRect(),t.getBoundingClientRect(),r,i),position:s.position}}(t,n,o,"top",!0,r);n.setAttribute("cl-tooltip-position",i.position),G(n,i.coordinates)}({triggerElement:t,tooltipElement:r,htmlDocumentObject:o})},t.onmouseleave=()=>{r&&(r.remove(),function(e){const t=(e=e||document).head.querySelector(`#${J}`);t&&t.remove()}(o))}}function te(e){return[e.getConfig("appearanceLanguage"),e.getConfig("browserLanguage"),"en"].filter((e=>!!e))}function ne(e,t){return t.reduce(((t,n)=>{if(t)return t;const o=function(e,t){if(!e)return null;if(t[e])return{translations:t[e],language:e};const n=function(e){return e.includes("-")?e.split("-")[0].toLowerCase():e.includes("_")?e.split("_")[0].toLowerCase():e}(e);return t[n]?{translations:t[n],language:n}:null}(n,e);return o||null}),null)}const oe="VIEW",re="MODULE",ie="CONTAINER",se="INPUT",ae="BUTTON",le="CONSENT",ce="COLUMN",pe="SUBSCRIBE_CONTACT",he="REQUEST",de="SHOW_WIDGET",ue="OPEN_LINK",me="CLOSE_WIDGET";class ge{static sortActions(e){const t={[me]:-1,[ue]:-2,[de]:1,[pe]:2,[he]:3},n=e=>void 0!==t[e.type]?t[e.type]:0;return[...e].sort(((e,t)=>n(e)>n(t)?-1:n(e)<n(t)?1:0))}constructor(e,t){this.config=e,this.actions=ge.sortActions(t),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(e,t,n){this.state=e;const r=n(),i=r.getAttribute(o("id"));this.listener=e=>{const t=e.composedPath().filter((e=>e instanceof HTMLElement&&e.getAttribute(o("type"))));let n=0;for(;t[n]&&t[n].getAttribute(o("id"))!==i;){let e=t[n].getAttribute(o("type"));if(ge.IGNORING_VIEW_ENTRY_TYPES.includes(e))return;n++}this.eventsQueue.push({event:e}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((r.shadowRoot||r).querySelectorAll(this.config.relativeSelector)):[r],this.targetElements.forEach((e=>{e.addEventListener("click",this.listener)}))}async execute(){var e,t,n,o;try{for(var r,i=!0,s=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}(this.eventsQueue);!(e=(r=await s.next()).done);){o=r.value,i=!1;try{const{event:e}=o;for(const t of this.actions)if(!await t.execute(this.state.getState(),e))break}finally{i=!0}}}catch(e){t={error:e}}finally{try{i||e||!(n=s.return)||await n.call(s)}finally{if(t)throw t.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((e=>{e.removeEventListener("click",this.listener)})),this.targetElements=[])}}ge.IGNORING_VIEW_ENTRY_TYPES=[ae,le,se];const be="CLICK",fe="COMPONENT_EVENT";class ye{constructor(e,t){this.config=e,this.actions=t,this.componentEmitterListener=null}activate(e,t,n){this.componentEmitterListener=t.on(this.config.eventName,(()=>{this.actions.forEach((t=>t.execute(e.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class ve{constructor(e,t){this.actionFactory=e,this.actionRegister=t}get(e){const t=e.actions.map((e=>this.actionFactory.get(e)));switch(t.forEach((e=>this.actionRegister.register(e))),e.type){case be:return new ge(e,t);case fe:return new ye(e,t);default:throw new Error(`Not supported handler type ${e.type}`)}}}class Ee{static generate(){let e,t="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=Math.floor(16*Math.random()).toString(16).toUpperCase(),t+=e;return t}}class Oe{constructor(){this.listeners=Oe.createDefaultListenersState()}emit(e,t,n=null){const o=this.listeners[e];o&&Object.values(o).forEach((o=>o(t,e,n))),Object.values(this.listeners["*"]).forEach((o=>o(t,e,n)))}on(e,t){const n=Ee.generate(),o=this.listeners[e];return o?o[n]=t:this.listeners[e]={[n]:t},{off:()=>{var t,o;(null===(o=null===(t=this.listeners)||void 0===t?void 0:t[e])||void 0===o?void 0:o[n])&&delete this.listeners[e][n]}}}destroy(){this.listeners=Oe.createDefaultListenersState()}}Oe.createDefaultListenersState=()=>({"*":{}});const ke=(e,t,n,o)=>{const{addEventListenerBase:r,addEventListener:i}=EventTarget.prototype;(r||i).call(e,t,n,o)};class Se{constructor(e){this.state=e||{}}getState(){return this.state}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}destroy(){}}class Te{static extract(e){const t=e.views.map((e=>{const t=e.children.map((e=>e.type===re?Object.assign(Object.assign({},e),Te.moduleToContainerParams):e));return Object.assign(Object.assign({},e),{children:t})}));return Object.assign(Object.assign({},e),{views:t})}static sort(e,t){return e.index>t.index?1:-1}static reIndex(e,t){return Object.assign(Object.assign({},e),{index:t+e.index})}}Te.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class Ce extends Oe{constructor(e,t){super(),this.config=t,this.handleMobileBreakpoint(e.getShared().mobileBreakpointWidth),e.on("ENVIRONMENT_UPDATE",(({isMobileEnv:e})=>{this._isMobile=e,this.emit(Ce.changeEventName,this._isMobile)}))}handleMobileBreakpoint(e){this.mobileBreakpointWidth=e;const t=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${t})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(Ce.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(e){this._isMobile=e.matches,this.emit(Ce.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}Ce.changeEventName="CHANGE";class xe{static set(e,t){const n=e[xe.accumulatorPropertyName]||{};e[xe.accumulatorPropertyName]=Object.assign(Object.assign({},n),t.styleAttributes),Object.keys(e[xe.accumulatorPropertyName]).forEach((n=>{n.includes("--")?e.style.setProperty(n,t.styleAttributes[n]||""):e.style[n]=t.styleAttributes[n]?t.styleAttributes[n]:""}))}}xe.accumulatorPropertyName="clStyleAttributes";const Re="CONTENT_LOCKER";class Ae{static applyHostStyles(e,t,n=null,o){var r,i,s;const a=null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find((e=>"CLICK"===e.type));a&&(null===(s=a.actions)||void 0===s?void 0:s.length)&&(t.style.cursor="pointer"),e!==oe&&e!==ie&&e!==ce||(t.style.display=o===Re&&e===oe?"flex":"inline-flex",t.style.position="relative"),t.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(e=""){this.styles=`${this.styles} ${e}`}getStyles(){return this.styles}}class we{static log(e){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(e)):console.error(e)}}class Ie{constructor(e,t,n,o,r,i){this.hostElement=t,this.documentModel=e,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=r,this.httpClient=i,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(e){const t=String(e||"");if(t.includes("url")){const[e,n]=t.split("(")[1].split(")");return{url:e.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(e){const t=this.getPropsCb();return t.backgroundDynamicInlineSVGElements[e].forEach((n=>{var o,r,i,s,a;const l=null===(r=null===(o=t.adaptiveStyles)||void 0===o?void 0:o[e])||void 0===r?void 0:r.find((e=>e.element===n)),c=(null===(i=t.styles)||void 0===i?void 0:i.find((e=>e.element===n)))||{},p=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(a=null==l?void 0:l.styleAttributes)||void 0===a?void 0:a.background),h=this.parseBackground(p);h.url&&this.envUrlMaps[e].set(n,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})})),Promise.all([...this.envUrlMaps[e].entries()].map((([t,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((e=>e.text())).then((o=>{this.envUrlMaps[e].set(t,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var t;this._applyHostElementBackground(this.envUrlMaps[e].get("host"),null===(t=this.getSharedCb().theme)||void 0===t?void 0:t.schema)})).catch((e=>{console.error(e),we.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${e}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(e=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),e.schema)})),this}_applyHostElementBackground(e,t={}){e&&(this.hostElement.style.background=this._buildBackgroundUrl(e,t))}_buildBackgroundUrl(e,t){const n=e.inlineSvgString.trim().replace("var(--cl-schema-accent)",t.accent);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${e.positionOptions}`}}const _e=new class{execute(e,t,n=null,o,r){const i={method:t,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:r};return n&&(i.body="string"==typeof n?n:JSON.stringify(n)),fetch(e,i)}};function Pe(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{})}class Le{static camelCaseToDashCase(e){return e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))}static camelCaseToUpperSnakeCase(e){return e.replace(/[A-Z]/g,(e=>"_"+e)).toUpperCase()}}class Ne{constructor(e){this._count=0,this.onUpdateCb=e}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const je="COMPONENT_RESOURCES_LOADED",Me="FAILED_TO_LOAD_COMPONENT_RESOURCE";class Ue{constructor(e,t,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=e=>{0===e&&this.systemEventEmitter.emit(je,this.componentId)},this.onResourceLoadFailure=e=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Me,`Failed to load: ${e}`):this.counters.pending.decrement()},this.componentId=e,this.systemEventEmitter=t,this.isStaticEntryModule=n,this.counters={pending:new Ne(this.onCounterStateUpdate)}}}const De=(...e)=>{let t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:[]})),{});return{get:e=>t[e],clear:()=>De(...e)}},Be=De,Fe="props",ze="shared",We="environment";function $e(e,t,n,o){const r=e=>{let i=e instanceof DocumentFragment||(null==e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?e.host:e;return i&&(o&&"function"==typeof o?o(i.getAttribute(t)):(null===(s=null==i?void 0:i.getAttribute)||void 0===s?void 0:s.call(i,t))===n)?i:i&&i.parentNode&&r(i.parentNode)||null;var s};return r(e)}const He="SUBMIT";function Ge(e,t){return t?(e.classes=`${e.classes||""} ${t.classes||""}`.trim(),Object.keys(t).forEach((n=>{"element"!==n&&"classes"!==n&&(t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?e[n]=Object.assign(Object.assign({},e[n]||{}),t[n]):e[n]=t[n])})),e):e}class Ve extends Event{constructor(e,t,n){super(e,n),this.detail={},Object.defineProperty(this,"detail",{value:t})}}class Qe extends HTMLElement{constructor(){var e,i;super(),this.construct=()=>{let e;const t=this.getAttribute(o("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const r=n.closest(`[${o("widget-id")}]`);let i;r&&(i=r.getAttribute(o("widget-id")));let s=new Ve("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(o("path")),id:t,widgetId:i},{bubbles:!0,composed:!0});this.dispatchEvent(s),e=s.detail.props,Object.assign(this,e),this.observers=Be(Fe,ze,We),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(e){this.subscriptions.push(e)}off(){this.subscriptions.forEach((e=>null==e?void 0:e.off()))}},this.state=new Se,this.componentEventEmitter=new Oe,this.componentResourceManager=new Ue(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 ve(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(e=>{this.model.props=e,this.observers.get(Fe).forEach((t=>t(this.prevProps,e))),this.prevProps=e;const t=this.getHostElement(),n=o("floating");e.floating&&!t.getAttribute(n)?t.setAttribute(n,"true"):!e.floating&&t.getAttribute(n)&&t.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(e=>{Object.assign(this.model,e)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ze).forEach((e=>e(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Ie(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),_e),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(Ce.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const e=this.getEnvironment();this.observers.get(We).forEach((t=>t(this.prevEnvironment,e))),this.prevEnvironment=e})))},this.attachHandlers=()=>{this.getHandlers().map((e=>this._handlerFactory.get(e))).map((e=>()=>e.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((e=>e()))},this.postponeHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.postpone()))},this.releaseHandlers=()=>{var e;null===(e=this.handlers)||void 0===e||e.forEach((e=>e.release()))},this.getProps=()=>{var e;return null===(e=this.getModel())||void 0===e?void 0:e.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=e=>{this.observers.get(Fe).push(e),e(null,this.prevProps)},this.observeShared=e=>{this.observers.get(ze).push(e),e(this.getShared())},this.observeEnvironment=e=>{this.observers.get(We).push(e),e(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${o("element")}]`)).filter((e=>!e.hasAttribute(o("component"))))],this.getElement=(e,t)=>this.getElements().find((n=>t?n.getAttribute(o("element"))===e&&n.id===t:n.getAttribute(o("element"))===e)),this.applyAutoAdaptiveStyles=(e,t)=>{if(!e&&!t)return;const n=this.getElements();if(!n.length)return;e=function(e,t){if(!t)return e||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(e||{desktop:[],mobile:[]}));return t.forEach((e=>{const t=e.element;let o=!1,r=!1;n.desktop&&n.desktop.forEach((n=>{n.element===t&&(Ge(n,e),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===t&&(Ge(n,e),r=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(e))),!r&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(e)))})),n}(e,t);const i=o("type"),s="element-styles";let a=this.getRootElement().querySelector(`style[${i}="${s}"]`);a||(a=document.createElement("style"),a.setAttribute(i,s),this.getRootElement().appendChild(a)),X({element:a,html:""}),n.forEach((t=>{let n=t.getAttribute(o("element"));const i=this.getEnvironment();let s=r(e,i,n);if(s){if(this.resizeListener.isMobile()){const t=r(e,"desktop",n);t&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),s.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(s),a)}})),this._addLinkColor(a,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(e,t={})=>{if(!e||!e.style)return!1;for(const[n,o]of Object.entries(t))e.style[n]=o;return!0},this.applyStylesToElement=(e,t,n)=>{var r,i;const s=[];"host"===(t=Qe._resolveTogglableStylesForElementModel(t)).element&&(Ae.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.desktop)||"mobile"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let a=t.styleAttributes.background,l=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&l){this.componentResourceManager.getPending().increment();const e=new Image;e.src=l[1],ke(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),ke(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),"UPDATING"===this.services.config.getConfig("entryModuleType")&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},t),{styleAttributes:Pe(t.styleAttributes,s)});if(xe.set(e,c),this._setClassAttributes(e,t),n){if(t.hoverStyleAttributes){let r=Object.assign({},t.hoverStyleAttributes);if("FILL_UP"===t.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const n=e.tagName.toLowerCase(),o=`flip-up-animation-${t.element}`;let i=this.getRootElement().querySelector(`#${o}`);i||(i=document.createElement("style"),i.id=o,e.appendChild(i)),X({element:i,html:`\n ${n}::before {\n content: '';\n background: ${r.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),r=Object.assign(Object.assign({},t.hoverStyleAttributes),{background:"transparent",position:"relative"})}r.borderTopWidth&&"0px"!==r.borderTopWidth||delete r.borderTopColor,r.borderBottomWidth&&"0px"!==r.borderBottomWidth||delete r.borderBottomColor,r.borderLeftWidth&&"0px"!==r.borderLeftWidth||delete r.borderLeftColor,r.borderRightWidth&&"0px"!==r.borderRightWidth||delete r.borderRightColor,this._addStylesToStyleElement(n,t.element,r,`:not(.${o("no-hover")}):hover`,!0)}t.placeholderStyleAttributes&&this._addStylesToStyleElement(n,t.element,t.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(e,t,n)}},this._fixMarginOverflow=e=>{const t=this.getParentComponent(),n=t&&("flex"===t.style.display||"inline-flex"===t.style.display),i="host",s=e.getAttribute(o("element"))===i;if(!n||!s)return;const a=this.getProps(),l=this.getEnvironment(),{styleAttributes:c}=r(a.adaptiveStyles,l,i)||{};if(!c)return;const p=c.marginLeft||c.marginRight,h="100%"===c.width;if(p&&h){const t=(parseFloat(c.marginLeft)||0)+(parseFloat(c.marginRight)||0);t&&setTimeout((()=>{e.style.width=`calc(100% - ${t}px)`}))}},this.applySharedClassesToElementModel=e=>function(e,n){let o=e;return(o.classes||"").split(" ").filter((e=>e.startsWith(t))).forEach((e=>{var t;let r=null===(t=n.textClasses)||void 0===t?void 0:t[e];r&&(r.styleAttributes.fontFamily||(r.isHeader&&n.headerFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.headerFontFamily})})),!r.isHeader&&n.textFontFamily&&(r=Object.assign(Object.assign({},r),{styleAttributes:Object.assign(Object.assign({},r.styleAttributes),{fontFamily:n.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),r.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),r.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:n.textFontFamily})})),o}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(e,t,n,r="",i)=>{const s=Object.keys(n).reduce(((e,t)=>e+` ${Le.camelCaseToDashCase(t)}: ${n[t]}${i?" !important;":";"}`),"");X({element:e,html:`[${o("element")}="${t}"]${r} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(e,t)=>{X({element:e,html:`[cl-type] {font-family:${t.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(e,t)=>{var n,o,r,i;t.linkColor&&X({element:e,html:`a {color: ${t.linkColor}}, a:visited {color: ${t.linkColor}}`,appendHtml:!0}),(null===(n=t.linkParams)||void 0===n?void 0:n.color)&&X({element:e,html:`a {color: ${null===(o=t.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(r=t.linkParams)||void 0===r?void 0:r.color}}`,appendHtml:!0}),(null===(i=t.linkParams)||void 0===i?void 0:i.removeUnderline)&&X({element:e,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(e,o)=>{Array.from(e.classList).filter((e=>e!==n("hovered")&&e!==n("focused"))).forEach((n=>{n.startsWith(t)&&e.classList.remove(n)}));const r=((e.getAttribute("class")||"")+" "+o.classes).trim();e.setAttribute("class",r)},this.getParentComponent=()=>$e(this.parentNode,o("element"),"host"),this.getWidgetContainerNode=()=>{const e=null==this?void 0:this.getAttribute(o("path"));return e&&1===e.split(",").length?this.parentNode:$e(this.parentNode,o("path"),void 0,(e=>e&&1===e.split(",").length))},this.getWidgetLanguages=()=>te(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=e=>ne(e,this.getWidgetLanguages()),this.stylesAppliedToElement=(e,t,n)=>{},this.updateContext=()=>{var e;const t=this.getModel();this.services.context.updateRecord(t.id,{label:this.getContextRecordLabel(t.props),viewIndex:null===(e=t.path)||void 0===e?void 0:e[0]})},this.addContextRecord=()=>{var e;const t=this.getModel();this.services.context.addRecord(t.id,{recordKey:t.id,id:t.props.control.name,label:this.getContextRecordLabel(t.props),value:t.props.control.defaultValue||"",viewIndex:null===(e=t.path)||void 0===e?void 0:e[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(t.props)}})},this.getContextRecordLabel=e=>{var t,n;const o=e.control.name;if(["email","first_name","last_name"].includes(o))return o.toUpperCase();if(e.content.label&&(null===(n=null===(t=e.adaptiveStyles.desktop.find((e=>"label"===e.element)))||void 0===t?void 0:t.params)||void 0===n?void 0:n.enabled)){const t=(new DOMParser).parseFromString(e.content.label,"text/html");return this.capitalizeFirstLetter(t.body.textContent||"")}return e.content.placeholder?this.capitalizeFirstLetter(e.content.placeholder):e.control.integrationName?this.capitalizeFirstLetter(e.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),this.getContextRecordExampleValue=e=>{switch(e.control.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(e)}},this.completeSubmitAction=e=>{const t=e||{},n=this.services.actionRegister.getRegisteredActions().find((e=>e.category===He));n?null==n||n.execute(void 0,void 0,!0,t):this.services.actionFactory.get({type:he}).execute(void 0,void 0,!0,t)},this.getHandlers=()=>this.getProps().handlers&&this.getProps().handlers.length?[...this.getProps().handlers]:[],this.assets=(e="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${e?`/${e}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(e=this.define)||void 0===e?void 0:e.manifest)||(null===(i=this.constructor.define)||void 0===i?void 0:i.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var e;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(e=this.mergeTagsProcessor)||void 0===e||e.destroy()}static _resolveTogglableStylesForElementModel(e){const t=Object.assign({},e);return Object.keys(t).forEach((e=>{e.toLowerCase().includes("styleattributes")&&(t[e]=Qe._resolveTogglableStyles(t[e]))})),t}static _resolveTogglableStyles(e){const t=Object.assign({},e),n=(e,n,o)=>{n in t&&(e.forEach((e=>{e in t&&(t[e]=t[n]?t[e]:o)})),delete t[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),t}}const Ke=Symbol("required");var qe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function Ze(){}const Xe="pending",Je="valid",Ye="invalid";class et extends Qe{constructor(){super(...arguments),this._createControl=(e={},...t)=>{var{element:n}=e,o=qe(e,["element"]);const r=this.getProps(),i=this.getModel(),s=Object.assign(Object.assign(Object.assign({},r.control),{componentId:i.id,viewIdx:i.path[0]}),o),a=this.services.form,l=[s,n,...t];return a.hasControl(r.control.name)?a.updateControl(...l):a.registerControl(...l)},this.createControlWithValidation=(e=[],t={})=>{var{element:n=this.getElement("input"),tooltipElement:o=this.getRootElement().querySelector(".input-tooltip"),validCallback:r=Ze,invalidCallback:i=Ze,pendingCallback:s=Ze,elementToListen:a=n,validationMap:l={},listenStatusChange:c=!0}=t,p=qe(t,["element","tooltipElement","validCallback","invalidCallback","pendingCallback","elementToListen","validationMap","listenStatusChange"]);if(o&&(o.style.visibility="hidden"),!e||!Array.isArray(e))throw new Error("Validators should be an array");const h=this.getProps().control.validation,d=l[null==h?void 0:h.validator],u=e.some((e=>e[Ke])),m=!!(null==h?void 0:h.required),g=m||u,b=[...e];m&&!u&&b.unshift(function(e="REQUIRED"){const t=t=>{let n;switch(typeof t){case"string":n=t&&t.length>0;break;case"boolean":n=t;break;case"number":n=!isNaN(t);break;default:n=!!t}return{isValid:n,errorKey:n?null:e}};return t[Ke]=!0,t}()),d&&b.push(d);const f=this._prepareAsyncValidators(b),y=this._createControl({element:n,validation:{validator:"custom",required:g}},void 0,f);return c&&this._handleControlStatusChange(Object.assign({control:y,element:a,tooltipElement:o,configService:this.services.config,i18n:this.manifest.i18n,validCallback:r,invalidCallback:i,pendingCallback:s},p)),y},this._prepareAsyncValidators=(e=[])=>e.reduce(((e,t,n)=>"function"!=typeof t?(console.warn(`Validator ${n} should be a function, so it will be skipped`),e):(e[`custom_${n}`]=async(...e)=>{const n=await Promise.resolve(t(...e));return"object"==typeof n&&"isValid"in n?Object.assign(Object.assign({},n),{errorKey:n.isValid?null:n.errorKey}):{isValid:!1,errorKey:"INVALID_VALIDATOR_RESPONSE"}},e)),{}),this._handleControlStatusChange=e=>{e.control.on(l,(t=>{this._handleValidationStatus(e,t)})),e.control.on(c,(()=>{let t=Xe;switch(!0){case e.control.pending:t=Xe;break;case e.control.valid:t=Je;break;default:t=Ye}this._handleValidationStatus(e,t)}))},this._handleValidationStatus=(e,t)=>{const{control:n,element:o,tooltipElement:r,validCallback:i,invalidCallback:s,errorMessageMapper:a,pendingCallback:l}=e,c=this.services.config,p=this.manifest.i18n;switch(t){case Je:(function(e,t){e.classList.remove("invalid"),t.style.visibility="hidden"})(o,r),i&&i();break;case Ye:if(n.touched){const e=n.getErrorKeys();if(!e)break;const t=e[0];let i=function(e,t,n){const o=ne(t,te(e)).translations,r=Object.keys(o).find((e=>e.includes(n)));return r?o[r]:n}(c,p,t);a&&(i=a(t,i)),ee(o,r,i,this.htmlDocumentObject),s&&s()}break;case Xe:n.touched&&(function(e,t){t.style.visibility="hidden",e.classList.contains("invalid")&&e.classList.remove("invalid")}(o,r),l&&l())}}}}const tt=new Map;tt.set("checkboxSize","inputSize"),tt.set("checkboxToTextGapSize","inputToTextGapSize");const nt=tt;function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function st(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,dt(o.key),o)}}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(at=function(){return!!e})()}function lt(){return lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ct(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},lt.apply(null,arguments)}function ct(e){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ct(e)}function pt(e,t){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pt(e,t)}function ht(e,t,n){return(t=dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dt(e){var t=function(e){if("object"!=ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ot(t)?t:t+""}var ut=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return ht(t=function(e,t,n){return t=ct(t),function(e,t){if(t&&("object"==ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,at()?Reflect.construct(t,n||[],ct(e).constructor):t.apply(e,n))}(this,e,[].concat(o)),"manifest",s),ht(t,"defaultCheckmarkStyleAttributes",{inputSize:"22px",inputToTextGapSize:"13px",selectedBackground:"rgb(255,255,255)",defaultBackground:"rgb(255,255,255)",backdropFilter:"none"}),ht(t,"updateCheckmark",(function(e){var n,o=t.getRootElement().querySelector(".checkmark");e?(o.classList.add("checkmark-checked"),n=t.getCheckmarkStyleAttributes("selectedBackground")):(o.classList.remove("checkmark-checked"),n=t.getCheckmarkStyleAttributes("defaultBackground")),o.style.background="".concat(n),o.style["backdrop-filter"]=t.getCheckmarkStyleAttributes("backdropFilter")})),ht(t,"getInputAdaptiveStyles",(function(){var e=t.getProps(),n=t.getEnvironment();return e.adaptiveStyles[n].filter((function(e){return"input"===e.element}))})),ht(t,"getCheckmarkStyleAttributes",(function(e){var n=t.getInputAdaptiveStyles();return n.length&&n[0].markerStyleAttributes?e?n[0].markerStyleAttributes[e]:n[0].markerStyleAttributes:n.length&&n[0].checkmarkStyleAttributes?e?n[0].checkmarkStyleAttributes[e]:n[0].checkmarkStyleAttributes.checkboxSize||n[0].checkmarkStyleAttributes.inputSize?n[0].checkmarkStyleAttributes:it({inputSize:"22px",inputToTextGapSize:"16px"},n[0].checkmarkStyleAttributes):e?t.defaultCheckmarkStyleAttributes[e]:t.defaultCheckmarkStyleAttributes})),ht(t,"registerLabelControl",(function(e){var n=t.getProps(),o="".concat(n.control.name,"_label");if(!t.services.form.hasControl(o)){var r={name:o,defaultValue:e};t.services.form.registerControl(it(it({},r),{},{componentId:t.getModel().id,viewIdx:t.getModel().path[0]}),null)}})),ht(t,"setStylesVariables",(function(e){var n=t.getCheckmarkStyleAttributes();Object.keys(n).forEach((function(t){var o=nt.get(t)||t;e.style.setProperty("--".concat(o),n[t])}))})),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pt(e,t)}(e,et),t=e,n=[{key:"connectedCallback",value:function(){var t=this;!function(e,t,n){var o=lt(ct(e.prototype),"connectedCallback",n);return"function"==typeof o?function(e){return o.apply(n,e)}:o}(e,0,this)([]),this.getRootElement().innerHTML+="\n ".concat('\n<style>\n.main-container {\n height: 100%;\n}\n\n.label-with-input-container {\n height: 100%;\n display: flex;\n flex-direction: row;\n}\n\n.input-with-tooltip {\n position: relative;\n display: flex;\n align-items: baseline;\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\ninput {\n -moz-appearance:none;\n -webkit-appearance:none;\n -o-appearance:none;\n width: 24px;\n height: 24px;\n padding: 0 10px;\n margin: 0;\n}\n\n/* The container */\n.checkmark-container {\n display: block;\n position: relative;\n height: 25px;\n width: 25px;\n cursor: pointer;\n font-size: 22px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n/* Hide the browser\'s default checkbox */\n.checkmark-container input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n/* Create a custom checkbox */\n.checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--inputSize, 22px);\n width: var(--inputSize, 22px);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 2px;\n}\n\n.checkmark:after {\n content: "";\n position: absolute;\n display: none;\n}\n\n.checkmark-checked:after {\n display: block;\n}\n\n.checkmark-container .checkmark:after {\n width: 9px;\n height: 14px;\n border: solid #000000;\n border-width: 0 3px 3px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.label {\n margin: auto auto auto var(--inputToTextGapSize, 18px);\n flex: 1;\n height: auto;\n min-height: 10px;\n}\n\ninput:focus ~ .checkmark.focus-outline-defined {\n outline: var(--clFocusOutline);\n}\n\n</style>\n ','\n <div class="main-container">\n <div class="label-with-input-container">\n <div class="input-with-tooltip">\n <label class="checkmark-container">\n <input type="checkbox"\n name="fname">\n <span cl-element="input" class="checkmark"></span>\n </label>\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 cl-element="label"\n cl-inline-edit="content, label"\n class="label">\n </div>\n </div>\n </div>\n </div>\n ');var n=this.getRootElement(),o=n.querySelector(".checkmark"),r=this.createControlWithValidation([],{element:n.querySelector("input"),validCallback:function(){o.classList.contains("invalid")&&o.classList.remove("invalid")},invalidCallback:function(){o.classList.contains("invalid")||o.classList.add("invalid")}});r.on("valueChanged",(function(e){t.updateCheckmark(e)})),this.updateCheckmark(!!r.getValue()),this.observeProps((function(e,n){t.applyAutoAdaptiveStyles(n.adaptiveStyles),X({element:t.getRootElement().querySelector(".label"),html:n.content.label}),t.registerLabelControl(n.content.label),t.setStylesVariables(t.getHostElement());var o=t.getRootElement().querySelector(".checkmark-container");o.style.width=t.getCheckmarkStyleAttributes("inputSize"),o.style.height=t.getCheckmarkStyleAttributes("inputSize"),function(e){let t;const n=e,o=["transparent","initial"];e&&(e.style.borderColor&&!o.includes(e.style.borderColor)&&(parseFloat(e.style.borderWidth)||parseFloat(e.style.borderBottomWidth))&&(t=V(n,e,"borderColor")),!t&&e.style.getPropertyValue("--borderBottomColor")&&!o.includes(e.style.getPropertyValue("--borderBottomColor"))&&parseFloat(e.style.getPropertyValue("--borderBottomWidth"))&&(t=V(n,e,"--borderBottomColor")),t||!e.style.backgroundColor||o.includes(e.style.backgroundColor)||(t=V(n,e,"backgroundColor")),t||!e.style.color||o.includes(e.style.color)||(t=V(n,e,"color")),t||n.classList.remove("focus-outline-defined"))}(t.getElement("input"))}))}}],n&&st(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();ht(ut,"define",{name:"sys-consent",model:s.name,manifest:s});export{ut as default};window.clComponentClass_SysConsentComponent=ut;