@claspo/components 1.10.1 → 1.10.2-ctx.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}function r(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function s(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}const l={name:"SysButtonComponent",componentType:"BUTTON",version:"1.0.0",contextMenuModel:e([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:e([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"button"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"ICON",propPath:["styles","[element=button]","styleAttributes"],params:{visibleDisplayValue:"block"},hideSyncSelect:!0},{type:"CONTROL",name:"TEXT_VISIBILITY",elementSubProp:"--textDisplay",elementProp:"styleAttributes",element:"button",params:{visibleDisplayValue:"inline"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"HOVER_ANIMATION",propPath:["styles","[element=button]","hoverStyleAttributes"],params:{animationTypeProp:{propPath:["styles","[element=button]","hoverAnimationType"]}}},{type:"CONTROL",name:"LOOP_ANIMATION",propPath:["styles","[element=button]"],params:{label:"LOOP_ANIMATION_LABEL"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"button",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"NPS_ACTIONS",propPath:["content"],params:{syncContentComponentName:"SysNetPromoterScoreComponent"},displayCondition:function(t){var e,n,o;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent"]))||void 0===e?void 0:e.length)&&0===(null===(n=t.documentUtils.findComponentsByNames([t.componentView],["SysFeedbackComponent"]))||void 0===n?void 0:n.length)&&(null===(o=t.component.getProps().handlers)||void 0===o||null===(o=o.find((function(t){return"CLICK"===t.type})))||void 0===o||null===(o=o.actions)||void 0===o?void 0:o.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))}},{type:"CONTROL",name:"FEEDBACK_ACTIONS",propPath:["content"],params:{syncContentComponentName:"SysFeedbackComponent"},displayCondition:function(t){var e,n,o;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&0===(null===(n=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent"]))||void 0===n?void 0:n.length)&&(null===(o=t.component.getProps().handlers)||void 0===o||null===(o=o.find((function(t){return"CLICK"===t.type})))||void 0===o||null===(o=o.actions)||void 0===o?void 0:o.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))}},{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0,hideSubmitActionCondition:function(t){var e,n;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&(null===(n=t.component.getProps().handlers)||void 0===n||null===(n=n.find((function(t){return"CLICK"===t.type})))||void 0===n||null===(n=n.actions)||void 0===n?void 0:n.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))},hideGoToViewActionCondition:function(t){var e,n;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&(null===(n=t.component.getProps().handlers)||void 0===n||null===(n=n.find((function(t){return"CLICK"===t.type})))||void 0===n||null===(n=n.actions)||void 0===n?void 0:n.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))},showTitleCondition:function(t){var e;return 0===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)},showRunGameActionCondition:function(t){var e;return 0!==(null===(e=t.documentUtils.getExternalStartGamingComponents([t.componentView],t.manifests))||void 0===e?void 0:e.length)}}}]},autoContrast:[{slave:{element:"button",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"button",elementProp:"styleAttributes",elementSubProp:"background"},enabledPropPath:["content","textContrastEnabled"]}],keepGeneralTabOpenUntilInteracted:!0,events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["content,text","handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],i18n:{en:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"At least one field is required: email or phone number","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Something went wrong. Please try again later"},ru:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Хотя бы одно из полей должно быть заполнено: Email или Номер телефона","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Что-то пошло не так. Пожалуйста, попробуйте позже"},uk:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Хоча б одне з полів має бути заповнене: Email або Номер телефону","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Щось пішло не так. Будь ласка, спробуйте пізніше"},es:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Necesita, como mínimo, un campo obligatorio: email o número de teléfono","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Algo salió mal. Por favor, inténtalo de nuevo más tarde"},de:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Mindestens ein Feld ist erforderlich: E-Mail-Adresse oder Telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Etwas ist schiefgelaufen. Bitte versuchen Sie es später erneut"},fr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Au moins un champ est obligatoire : courriel ou numéro de téléphone","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Une erreur s'est produite. Veuillez réessayer plus tard"},it:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Almeno un campo è obbligatorio: email o numero di telefono","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Qualcosa è andato storto. Riprova più tardi"},pt:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"É necessário pelo menos um campo: email ou número de telefone","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Algo deu errado. Por favor, tente novamente mais tarde"},ro:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Cel puțin un câmp este obligatoriu: e-mail sau număr de telefon","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Ceva nu a funcționat. Vă rugăm să încercați din nou mai târziu"},bg:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Изисква се поне едно поле: имейл или телефонен номер","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Нещо се обърка. Моля, опитайте отново по-късно"},cs:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Je vyžadováno alespoň jedno pole: e-mail nebo telefonní číslo","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Něco se pokazilo. Zkuste to prosím znovu později"},el:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Απαιτείται τουλάχιστον ένα πεδίο: ηλεκτρονική διεύθυνση ή τηλέφωνο","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα"},nl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Er is minimaal één veld vereist: e-mail of telefoonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Er is iets misgegaan. Probeer het later opnieuw"},pl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Wymagane jest co najmniej jedno pole: adres e-mail lub numer telefonu","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Coś poszło nie tak. Spróbuj ponownie później"},sv:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Minst ett fält krävs: e-post eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Något gick fel. Försök igen senare"},tr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"En az bir alan gereklidir: e-posta veya telefon numarası","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Bir şeyler ters gitti. Lütfen daha sonra tekrar deneyin"},ar:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"مطلوب حقل واحد على الأقل: البريد الإلكتروني أو رقم الهاتف","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"حدث خطأ ما. يرجى المحاولة مرة أخرى لاحقًا"},zh:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"至少一个字段为必填:电子邮箱或电话号码","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"出了点问题。请稍后再试"},da:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Mindst ét felt er påkrævet: e-mail eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Noget gik galt. Prøv venligst igen senere"},he:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"נדרש לפחות שדה אחד: אימייל או מספר טלפון","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"משהו השתבש. אנא נסה שוב מאוחר יותר"},fi:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Vähintään yksi kenttä vaaditaan: sähköposti tai puhelinnumero","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Jotain meni pieleen. Yritä myöhemmin uudelleen"},hi:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"कम से कम एक फ़ील्ड आवश्यक है: ईमेल या फ़ोन नंबर","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"कुछ गलत हो गया। कृपया बाद में पुनः प्रयास करें"},hr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Potrebno je ispuniti barem jedno polje: e-mail ili telefonski broj","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Nešto je pošlo po zlu. Pokušajte ponovno kasnije"},hu:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Legalább egy mező kitöltése kötelező: e-mail vagy telefonszám.","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Valami hiba történt. Kérjük, próbálja újra később"},id:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Setidaknya satu bidang wajib diisi: email atau nomor telepon","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Terjadi kesalahan. Silakan coba lagi nanti"},ja:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"少なくとも1つのフィールドが必須です:メールアドレスまたは電話番号","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"問題が発生しました。後でもう一度お試しください"},ko:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"최소 한 칸 필수 입력: 이메일 또는 전화번호","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"문제가 발생했습니다. 나중에 다시 시도해 주세요"},no:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Minst ett felt er obligatorisk: e-post eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Noe gikk galt. Vennligst prøv igjen senere"},sk:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Aspoň jedno pole je povinné: e-mail alebo telefónne číslo","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Niečo sa pokazilo. Skúste to znova neskôr"},sl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Vsaj eno polje je obvezno: e-poštni naslov ali telefonska številka","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Nekaj je šlo narobe. Poskusite znova pozneje"},sr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Najmanje jedno polje je obavezno: e-pošta ili broj telefona","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Нешто је пошло наопако. Покушајте поново касније"}},props:{styles:[{element:"button",styleAttributes:{background:"var(--cl-schema-accent, rgb(0, 0, 0))","--iconDisplay":"none","--iconSize":"20px","--iconOrder":"-1","--iconDistanceToText":"15px","--iconURL":"",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"200px",borderTopRightRadius:"200px",borderBottomLeftRadius:"200px",borderBottomRightRadius:"200px",boxShadow:"none"},hoverStyleAttributes:{background:"rgba(0, 0, 0, 0.2)"},classes:"cl-loop-animation-PULSE"}],adaptiveStyles:(a=[{element:"host",styleAttributes:{width:"auto",minWidth:null,height:"35px",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1}},{element:"button",styleAttributes:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center",flexDirection:"row",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"16px",textShadow:"none","--textDisplay":"inline"},classes:"cl-text-class-button"}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:s(a)})),{desktop:[],mobile:[]})),content:{text:"Subscribe",textContrastEnabled:!0}},metaDescription:{icon:"/SysButtonComponent/assets/img/component-icon.svg",label:{en:"Button",ru:"Кнопка",uk:"Кнопка",es:"Botón",fr:"Bouton",de:"Schaltfläche",it:"Pulsante",pt:"Botão",ro:"Buton",bg:"Копче",cs:"Tlačítko",el:"Πλήκτρο",nl:"Knop",pl:"Przycisk",sv:"Knapp",tr:"Buton",ar:"الزِّر",zh:"按钮",da:"Knap",he:"כפתור",fi:"Painike",hi:"बटन",hr:"Gumb",hu:"Gomb",id:"Tombol",ja:"ボタン",ko:"버튼",no:"Knapp",sk:"Tlačidlo",sl:"Gumb",sr:"Dugme"}},syncEnabled:!0,stylesImitationEnabled:!0};var a;const c="VIEW",d="MODULE",u="CONTAINER",h="INPUT",p="BUTTON",m="CONSENT",E="COLUMN";var g,v;(v=g||(g={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",v.REQUEST="REQUEST",v.DISPATCH_EVENT="DISPATCH_EVENT",v.GO_TO_VIEW="GO_TO_VIEW",v.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",v.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",v.SHOW_WIDGET="SHOW_WIDGET",v.OPEN_LINK="OPEN_LINK",v.CLOSE_WIDGET="CLOSE_WIDGET",v.CLICK="CLICK";const b=g;var f,y;class S{static sortActions(t){const e={[b.CLOSE_WIDGET]:-1,[b.OPEN_LINK]:-2,[b.SHOW_WIDGET]:1,[b.SUBSCRIBE_CONTACT]:2,[b.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=S.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(S.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,r=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await s.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}S.IGNORING_VIEW_ENTRY_TYPES=[p,m,h],(y=f||(f={})).CLICK="CLICK",y.COMPONENT_EVENT="COMPONENT_EVENT";class O{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class T{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case f.CLICK:return new S(t,e);case f.COMPONENT_EVENT:return new O(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class _{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class I{constructor(){this.listeners=I.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=_.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=I.createDefaultListenersState()}}I.createDefaultListenersState=()=>({"*":{}});const R=I,C=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class A{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class L{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===d?Object.assign(Object.assign({},t),L.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var N,x,P,U,M,w,B,D,k,j,F,H,W;L.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(x=N||(N={})).VIEW="VIEW",x.CONTAINER="CONTAINER",x.TEXT="TEXT",x.INPUT="INPUT",x.BUTTON="BUTTON",x.IMAGE="IMAGE",x.CONSENT="CONSENT",x.COUNTDOWN_TIMER="COUNTDOWN_TIMER",x.PROMO_CODE="PROMO_CODE",x.MULTIPLE_INPUT="MULTIPLE_INPUT",x.VIDEO="VIDEO",x.SLIDER="SLIDER",x.SLIDE="SLIDE",x.SOCIAL="SOCIAL",x.COLUMNS="COLUMNS",x.COLUMN="COLUMN",x.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(P||(P={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(U||(U={})),function(t){t.SELF="_self",t.BLANK="_blank"}(M||(M={})),(w||(w={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(B||(B={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(D||(D={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(k||(k={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(j||(j={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(F||(F={})),(W=H||(H={})).BEFORE="BEFORE",W.AFTER="AFTER",W.INSIDE="INSIDE",W.INSTEAD="INSTEAD";class Q{static removeNode(t,e){const n=this.getParentPath(e),o=e[e.length-1],i=this.getNodeByPath(t,n);if(i&&i.children&&i.path){const t=i.children.splice(o,1)[0];return t.prevPath=e,t.path=null,Q.reIndex(i,i.path),t}{const n=t.splice(o,1)[0];return n.prevPath=e,n.path=null,t.forEach(((t,e)=>{t.path=[e],Q.reIndex(t,t.path)})),n}}static insertNode(t,e,n,o){const i=Q.getPathToInsert(e,o,n,t),r=o===H.INSIDE?e:this.getParentPath(i),s=this.getNodeByPath(n,r),l=i[i.length-1];return s&&s.children&&s.path?(s.children.splice(l,0,t),Q.reIndex(s,s.path),t):(n.splice(l,0,t),n.forEach(((t,e)=>{t.path=[e],Q.reIndex(t,t.path)})),t)}static moveNode(t,e,n,o){const i=Q.getNodeByPath(t,n);if(!i)return;const r=Q.removeNode(t,e),s=Q.getNodeById(t,i.id);s&&s.path&&Q.insertNode(r,s.path,t,o)}static iterateDepthFirst(t,e){return V(t,e)}static reIndex(t,e){t.path=e,t.children&&t.children.forEach(((t,n)=>{Q.reIndex(t,e.concat(n))}))}static getRelativePath(t){return t.slice(1,t.length)}static getParentPath(t){return t.slice(0,-1)}static getNodeByPath(t,e){let n=t;for(let t=0;t<e.length;t++){if(t===e.length-1)return n[e[t]]||null;if(!n[e[t]]||!n[e[t]].children)return null;n=n[e[t]].children}return null}static getNodeById(t,e){let n=null;for(let o=0;o<t.length;o++){const i=t[o];if(n)break;if(i.id===e){n=i;break}i.children&&i.children.length&&(n=this.getNodeById(i.children,e))}return n}static getPathToInsert(t,e,n,o){var i,r;let s;const l=t[t.length-1];switch(e){case H.BEFORE:s=t;break;case H.AFTER:s=t.slice(),s[t.length-1]=l+1;break;case H.INSIDE:{const e=Q.getNodeByPath(n,t),o=null!==(r=null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&void 0!==r?r:0;s=t.concat([o]);break}case H.INSTEAD:{const e=null==o?void 0:o.prevPath;s=(null==e?void 0:e.at(-1))<=l?[...t.slice(0,-1),l+1]:t;break}default:s=t}return s}static getNodeOnClickData(t){let e=[],n={};return Q.iterateDepthFirst(t,(t=>{var o,i,r,s;const l=null===(r=null===(i=null===(o=t.props)||void 0===o?void 0:o.handlers)||void 0===i?void 0:i.find((t=>t.type===P.CLICK)))||void 0===r?void 0:r.actions;(null==l?void 0:l.length)&&(e=[...e,...l]),Object.keys((null===(s=t.props)||void 0===s?void 0:s.content)||{}).filter((t=>["detractor","passive","promoter"].includes(t))).map((e=>{var n;return((null===(n=t.props)||void 0===n?void 0:n.content)||{})[e]||null})).filter((t=>t)).forEach((t=>n[t]=t))})),{actions:e,npsViewIds:Object.keys(n)}}}function V(t,e){t.children&&t.children.forEach((t=>V(t,e))),e(t)}class G extends R{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(G.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(G.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(G.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}G.changeEventName="CHANGE";const $=G;class z{static set(t,e){const n=t[z.accumulatorPropertyName]||{};t[z.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[z.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}z.accumulatorPropertyName="clStyleAttributes";const K=z;var q;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(q||(q={}));class X{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==c&&t!==u&&t!==E||(e.style.display=o===q.CONTENT_LOCKER&&t===c?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class J{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Z{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(r=e.styles)||void 0===r?void 0:r.find((t=>t.element===n)))||{},d=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(d);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),J.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const Y=new class{execute(t,e="GET",n=null,o,i){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function tt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class et{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class nt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var ot;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(ot||(ot={}));const it=ot;class rt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(it.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(it.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new nt(this.onCounterStateUpdate)}}}const st=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>st(...t)}},lt=st,at="props",ct="shared",dt="environment";function ut(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const ht="SUBMIT";function pt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function mt(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class Et extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var gt;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(gt||(gt={}));class vt extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let s=new Et("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=lt(at,ct,dt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new A({}),this.componentEventEmitter=new R,this.componentResourceManager=new rt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new T(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(at).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ct).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Z(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Y),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on($.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(dt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",(()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",(()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===gt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===gt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(at).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ct).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(dt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(pt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(pt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),s=i("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${s}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(s,l),this.getRootElement().appendChild(a)),mt({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let s=r(o,n,e);if(s){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);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=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,r;const s=[];"host"===(e=vt._resolveTogglableStylesForElementModel(e)).element&&(X.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],C(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),C(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:tt(e.styleAttributes,s)});if(K.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),mt({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${et.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");mt({element:t,html:`[${i("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{mt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&mt({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&mt({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&mt({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>ut(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ut(this.parentNode,i("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===ht));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:b.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}));const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}vt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=vt._resolveTogglableStyles(e[t]))})),e},vt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const bt=vt;function ft(t,e){let n=0;return t?(Q.iterateDepthFirst(t,(t=>{e===t.name&&n++})),n):n}var yt=[];for(var St in{transparent:"#0000"})yt.push(St);var Ot="\\s*([.\\d%]+)\\s*",Tt="\\("+[Ot,Ot,Ot]+"(?:,\\s*([.\\d]+)\\s*)?\\)",_t="(?:rgb)a?",It="("+yt.join("|")+")";function Rt(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(_t+Tt,"i"),RegExp([It,"(?:#([a-f0-9]{3,8}))",_t+Tt,"(?:hsl)a?"+Tt].join("|"),"gi");var Ct=Array.prototype.concat,At=Array.prototype.slice,Lt=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];Rt(i)?e=Ct.call(e,At.call(i)):e.push(i)}return e};Lt.wrap=function(t){return function(){return t(Lt(arguments))}};const Nt=Lt;var xt={},Pt=Object.hasOwnProperty,Ut=Object.create(null);for(var Mt in xt)Pt.call(xt,Mt)&&(Ut[xt[Mt]]=Mt);var wt={to:{},get:{}};function Bt(t,e,n){return Math.min(Math.max(e,t),n)}wt.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=wt.get.hsl(t),n="hsl"):(e=wt.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},wt.get.rgb=function(t){if(!t)return null;var e,n,o,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Pt.call(xt,e[1])?((i=xt[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Bt(i[n],0,255);return i[3]=Bt(i[3],0,1),i},wt.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,Bt(parseFloat(e[2]),0,100),Bt(parseFloat(e[3]),0,100),Bt(isNaN(n)?1:n,0,1)]}return null},wt.to.rgb=function(){var t=Nt(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},wt.to.hsl=function(){var t=Nt(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const Dt=wt,kt={},jt={};for(const t of Object.keys(kt))jt[kt[t]]=t;const Ft={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(Ft)){if(!("channels"in Ft[t]))throw new Error("missing channels property: "+t);if(!("labels"in Ft[t]))throw new Error("missing channel labels property: "+t);if(Ft[t].labels.length!==Ft[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=Ft[t];delete Ft[t].channels,delete Ft[t].labels,Object.defineProperty(Ft[t],"channels",{value:e}),Object.defineProperty(Ft[t],"labels",{value:n})}Ft.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),s=r-i;let l,a;r===i?l=0:e===r?l=(n-o)/s:n===r?l=2+(o-e)/s:o===r&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[l,100*a,100*c]},Ft.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const l=2*o-i,a=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,a[t]=255*s;return a};const Ht=Ft;function Wt(t,e){return function(n){return e(t(n))}}function Qt(t,e){const n=[e[t].parent,t];let o=Ht[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=Wt(Ht[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const Vt={};Object.keys(Ht).forEach((t=>{Vt[t]={},Object.defineProperty(Vt[t],"channels",{value:Ht[t].channels}),Object.defineProperty(Vt[t],"labels",{value:Ht[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(Ht);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(Ht[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],s=e[i];-1===s.distance&&(s.distance=e[t].distance+1,s.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=Qt(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];Vt[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),Vt[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const Gt=Vt,$t=["keyword","gray","hex"],zt={};for(const t of Object.keys(Gt))zt[[...Gt[t].labels].sort().join("")]=t;const Kt={};function qt(t,e){if(!(this instanceof qt))return new qt(t,e);if(e&&e in $t&&(e=null),e&&!(e in Gt))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof qt)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=Dt.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=Gt[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=Gt[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=Zt(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in zt))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=zt[o];const{labels:i}=Gt[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=Zt(r)}if(Kt[this.model])for(o=Gt[this.model].channels,n=0;n<o;n++){const t=Kt[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}qt.prototype={toString(){return this.string()},string(t){let e=this.model in Dt.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return Dt.to[e.model](n)},round(t){return t=Math.max(t||0,0),new qt([...this.color.map(Xt(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new qt([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(Gt)){if($t.includes(t))continue;const{channels:e}=Gt[t];qt.prototype[t]=function(...e){return this.model===t?new qt(this):e.length>0?new qt(e,t):new qt([...Jt(Gt[this.model][t].raw(this.color)),this.valpha],t)},qt[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=Zt(n,e)),new qt(o,t)}}function Xt(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function Jt(t){return Array.isArray(t)?t:[t]}function Zt(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const Yt=qt;function te(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function ee(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=Yt(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}class ne{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}function oe(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(s,10),height:n+parseInt(i,10)+parseInt(o,10)}}function ie(t,e,n,o,i){switch(t.position){case"top":return{left:`${re(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${re(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${se(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${se(0,t)}px`}}}function re(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>ne.width(o)&&(i-=i+e.width-ne.width(o)),i}function se(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const le="cl-tooltip-text-styles",ae=`\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 ce(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${le}`))return;const e=document.createElement("style");e.setAttribute("id",le),mt({element:e,html:ae}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=function(t,e,n,o,i,r){const s=function(t,e,n,o,i){const r=function(t,e,n,o){const i=ne.width(o),{right:r}=t.getBoundingClientRect(),s=i-n-r-ne.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:oe(e).width,availableSpaceToTheLeftSideOfTheTrigger:r-n,availableSpaceToTheRightSideOfTheTrigger:s}}(t,e,n,i),s=function(t,e,n,o){const i=ne.height(o),{top:r,bottom:s}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:oe(e).height,availableSpaceAboveTriggerElem:r-n,availableSpaceBelowTriggerElem:i-s-n}}(t,e,n,i);let l="undefined";const a={bottom:s.availableSpaceBelowTriggerElem>=s.contentHeight,top:s.availableSpaceAboveTriggerElem>=s.contentHeight,right:r.availableSpaceToTheRightSideOfTheTrigger>=r.contentWidth,left:r.availableSpaceToTheLeftSideOfTheTrigger>=r.contentWidth};if(a.top?l="top":a.bottom?l="bottom":a.right?l="right":a.left&&(l="left"),o&&a[o]&&(l=o),"undefined"===l){const t=Math.max(s.availableSpaceBelowTriggerElem,s.availableSpaceAboveTriggerElem,r.availableSpaceToTheRightSideOfTheTrigger,r.availableSpaceToTheLeftSideOfTheTrigger);t===s.availableSpaceBelowTriggerElem?l="bottom":t===s.availableSpaceAboveTriggerElem?l="top":t===r.availableSpaceToTheRightSideOfTheTrigger?l="right":t===r.availableSpaceToTheLeftSideOfTheTrigger&&(l="left")}return Object.assign(Object.assign(Object.assign({},s),r),{position:l})}(t,e,n,o,r=r||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)te(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),te(e,{"margin-bottom":"0px"});else if("bottom"===t.position)te(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),te(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";te(e,{"margin-top":t,"margin-bottom":t})}}(s,e),{coordinates:ie(s,t.getBoundingClientRect(),e.getBoundingClientRect(),i,r),position:s.position}}(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),te(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${le}`);e&&e.remove()}(o))})}function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function ue(t){return function(t){if(Array.isArray(t))return he(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return he(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function pe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,ye(o.key),o)}}function me(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(me=function(){return!!t})()}function Ee(t,e,n,o){var i=ge(ve(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function ge(){return ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ve(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ge.apply(null,arguments)}function ve(t){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ve(t)}function be(t,e){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},be(t,e)}function fe(t,e,n){return(e=ye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ye(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}var Se=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fe(e=function(t,e,n){return e=ve(e),function(t,e){if(e&&("object"==de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,me()?Reflect.construct(e,n||[],ve(t).constructor):e.apply(t,n))}(this,t),"showPendingLoader",(function(){var t=e.getRootElement().querySelector(".main-container"),n=null==t?void 0:t.querySelector(".button-asyncLoader");t&&n&&(n.style.color=e.getRootElement().querySelector("button").style.color,t.classList.remove("cl-button-success"),t.classList.add("cl-button-loading"))})),fe(e,"hidePendingLoader",(function(){var t;null===(t=e.getRootElement().querySelector(".main-container"))||void 0===t||t.classList.remove("cl-button-loading")})),fe(e,"showSuccessIcon",(function(){var t=e.getRootElement().querySelector(".main-container"),n=null==t?void 0:t.querySelector(".button-success-icon");t&&n&&(n.style.color=e.getRootElement().querySelector("button").style.color,t.classList.add("cl-button-success"))})),fe(e,"hideSuccessIcon",(function(){var t;null===(t=e.getRootElement().querySelector(".main-container"))||void 0===t||t.classList.remove("cl-button-success")})),fe(e,"hideErrorTooltip",(function(){e.getRootElement().querySelector(".input-tooltip").style.visibility="hidden"})),fe(e,"updateButtonTextNode",(function(t){mt({element:e.getRootElement().querySelector(".editable-text"),html:t.content.text})})),fe(e,"mapStyleControlValuesToInnerButtonContent",(function(){var t=e.getRootElement().querySelector("button"),n=e.getRootElement().querySelector(".editable-text");t&&n&&(e.mapAlignValueToButtonContent(t),n.style.minWidth="20px",n.style.width="max-content",n.style.minHeight=t.style.fontSize,n.style.textAlign=t.style.textAlign,n.style.lineHeight=t.style.lineHeight,n.style.fontWeight=t.style.fontWeight,n.style.fontSize=t.style.fontSize,n.style.textShadow=t.style.textShadow,n.style.textTransform=t.style.textTransform,n.style.letterSpacing=t.style.letterSpacing,n.style.fontFamily=t.style.fontFamily)})),fe(e,"mapAlignValueToButtonContent",(function(t){"center"===t.style.textAlign&&(t.style.alignItems="center",t.style.justifyContent="center"),"start"===t.style.textAlign&&(t.style.alignItems="column"===t.style.flexDirection?"flex-start":"center",t.style.justifyContent="column"===t.style.flexDirection?"center":"flex-start"),"end"===t.style.textAlign&&(t.style.alignItems="column"===t.style.flexDirection?"flex-end":"center",t.style.justifyContent="column"===t.style.flexDirection?"center":"flex-end")})),fe(e,"createIconNode",(function(t){if(!t.querySelector(".icon")){var e=document.createElement("p");e.classList.add("icon"),t.appendChild(e)}})),fe(e,"showErrorTooltip",(function(t){var n=e.getRootElement().querySelector(".main-container"),o=n.querySelector(".input-tooltip"),i=e.getTranslationsMap(e.manifest.i18n).translations,r=Object.keys(i).find((function(e){return e.includes(t)}));ce(n,o,r?i[r]:t,e.htmlDocumentObject)})),fe(e,"getHandlers",(function(){var t,n,o,i,r=e.getProps().handlers&&e.getProps().handlers.length?ue(e.getProps().handlers):[],s=e.getModel();if(void 0===(null==s||null===(t=s.path)||void 0===t?void 0:t[0])||!e.documentModel)return r;var l=e.documentModel.getView(s.path[0]),a=null===(n=r)||void 0===n?void 0:n.find((function(t){return t.type===f.CLICK}));if(!a)return r;var c=null===(o=a.actions)||void 0===o?void 0:o.some((function(t){return[b.REQUEST,b.SUBSCRIBE_CONTACT].includes(t.type)}));return 1===ft(l,"SysFeedbackComponent")+ft(l,"SysNetPromoterScoreComponent")&&c?(a.actions=null===(i=a.actions)||void 0===i?void 0:i.filter((function(t){return![b.GO_TO_VIEW,b.GO_TO_PREVIOUS_VIEW,b.GO_TO_NEXT_VIEW].includes(t.type)})),r=[].concat(ue(r.filter((function(t){return t.type!==f.CLICK}))),[a])):r})),fe(e,"manifest",l),fe(e,"invalidListener",void 0),fe(e,"validListener",void 0),fe(e,"submitStartedListener",void 0),fe(e,"submitFinishedListener",void 0),fe(e,"submitErrorWithoutViewListener",void 0),fe(e,"stylesUpdateObserver",void 0),e.getRootElement().innerHTML="\n<style>".concat("\n.main-container {\n position: relative;\n display: flex;\n width: 100%;\n height: inherit;\n}\n\nbutton {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n outline: none;\n min-height: 20px;\n display: flex;\n align-items: center;\n flex-direction: row;\n gap: var(--iconDistanceToText, 15px);\n z-index: 0;\n position: relative;\n}\n\n.editable-text {\n display: var(--textDisplay, 'inline');\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\n.icon {\n display: var(--iconDisplay, none);\n width: var(--iconSize, 20px);\n height: var(--iconSize, 20px);\n order: var(--iconOrder, -1);\n background: var(--iconURL);\n margin-top: 0px;\n margin-bottom: 0px;\n background-size: cover;\n}\n\nbutton.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n\n.button-asyncLoader {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n z-index: 1;\n pointer-events: none;\n}\n\n.main-container.cl-button-loading .button-asyncLoader {\n display: block;\n}\n\n.button-success-icon {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 22px;\n height: 22px;\n margin: -11px 0 0 -11px;\n z-index: 1;\n pointer-events: none;\n}\n\n.button-success-icon svg {\n width: 22px;\n height: 22px;\n}\n\n.main-container.cl-button-success .button-success-icon {\n display: block;\n}\n\n.main-container.cl-button-loading .editable-text,\n.main-container.cl-button-loading .icon,\n.main-container.cl-button-success .editable-text,\n.main-container.cl-button-success .icon {\n visibility: hidden;\n}\n\n.button-asyncLoader .spinner--icon {\n width: 20px;\n height: 20px;\n transform-origin: center;\n animation: cl-button-spinner-rotate 0.8s linear infinite;\n}\n\n.button-asyncLoader .spinner--icon .path {\n stroke: currentColor;\n stroke-linecap: round;\n stroke-dasharray: 24 32;\n}\n\n@keyframes cl-button-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n",'</style>\n<div class="main-container">\n <button cl-element="button">\n <div class="editable-text" cl-inline-edit="content, text"></div>\n </button>\n\n <span class="button-asyncLoader" aria-hidden="true">\n <svg class="spinner--icon" viewBox="0 0 18 18" aria-hidden="true">\n <circle class="path" cx="9" cy="9" r="5" fill="none" stroke-width="2"></circle>\n </svg>\n </span>\n\n <span class="button-success-icon" aria-hidden="true">\n <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="2"></circle>\n <path d="M7 12.5L10.5 16L17 8.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>\n </span>\n\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>'),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&be(t,e)}(t,bt),function(t,e){return e&&pe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Ee(t,"connectedCallback",this,3)([]),this.stylesUpdateObserver=new MutationObserver(this.mapStyleControlValuesToInnerButtonContent.bind(this)),this.stylesUpdateObserver.observe(this.getRootElement().querySelector("button"),{attributes:!0,childList:!1,subtree:!1});var n=this.getElement("button");if(n.addEventListener("click",(function(t){e.services.trackingService.send("FormButtonClick_[Name]")})),this.getProps().handlers){var o=this.getProps().handlers.find((function(t){return"CLICK"===t.type}));if(o&&o.actions){var i=o.actions.find((function(t){return"SUBSCRIBE_CONTACT"===t.type})),r=o.actions.find((function(t){return"REQUEST"===t.type}));i&&(this.invalidListener=this.services.eventEmitter.on("SET_SUBSCRIBE_CONTACT_BUTTON_AS_INVALID",(function(){e.showErrorTooltip("EMAIL_OR_PHONE_IS_REQUIRED")})),this.validListener=this.services.eventEmitter.on("SET_SUBSCRIBE_CONTACT_BUTTON_AS_VALID",(function(){e.hideErrorTooltip()}))),(i||r)&&(this.submitStartedListener=this.services.eventEmitter.on("SUBMIT_REQUEST_STARTED",(function(){n.disabled=!0,e.hideErrorTooltip(),e.hideSuccessIcon(),e.showPendingLoader()})),this.submitFinishedListener=this.services.eventEmitter.on("SUBMIT_REQUEST_FINISHED",(function(t){e.hidePendingLoader(),null!=t&&t.success?e.showSuccessIcon():n.disabled=!1})),this.submitErrorWithoutViewListener=this.services.eventEmitter.on("SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",(function(){e.showErrorTooltip("SUBMIT_REQUEST_FAILED")})))}}this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=ee(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=ee(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=ee(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=ee(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("button")),e.mapStyleControlValuesToInnerButtonContent();var o=e.getRootElement().querySelector("button");e.updateButtonTextNode(n),e.createIconNode(o)}))}},{key:"disconnectedCallback",value:function(){var e;Ee(t,"disconnectedCallback",this,3)([]),this.invalidListener&&this.invalidListener.off(),this.validListener&&this.validListener.off(),this.submitStartedListener&&this.submitStartedListener.off(),this.submitFinishedListener&&this.submitFinishedListener.off(),this.submitErrorWithoutViewListener&&this.submitErrorWithoutViewListener.off(),null===(e=this.stylesUpdateObserver)||void 0===e||e.disconnect()}}])}();fe(Se,"define",{name:"sys-button",model:l.name,manifest:l});export{Se as default};window.clComponentClass_SysButtonComponent=Se;
|
|
1
|
+
const t={DESKTOP:"desktop",MOBILE:"mobile"};function e(e){return Object.values(t).map((t=>({type:"GROUP",propPath:["adaptiveStyles",t],children:e})))}const n="cl-";function o(t){return n+t}function i(t){return"cl-"+t}function r(t,e,n){var o;return null===(o=null==t?void 0:t[e])||void 0===o?void 0:o.find((t=>t.element===n))}function s(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}const l={name:"SysButtonComponent",componentType:"BUTTON",version:"1.0.0",contextMenuModel:e([{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}]),floatingControlsModel:e([{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"}]),propertyPaneModel:{content:e([{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}}},{type:"CONTROL",name:"TEXT_PARAMS",params:[{element:"button"}]},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"ICON",propPath:["styles","[element=button]","styleAttributes"],params:{visibleDisplayValue:"block"},hideSyncSelect:!0},{type:"CONTROL",name:"TEXT_VISIBILITY",elementSubProp:"--textDisplay",elementProp:"styleAttributes",element:"button",params:{visibleDisplayValue:"inline"}},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=button]","styleAttributes"]},{type:"CONTROL",name:"HOVER_ANIMATION",propPath:["styles","[element=button]","hoverStyleAttributes"],params:{animationTypeProp:{propPath:["styles","[element=button]","hoverAnimationType"]}}},{type:"CONTROL",name:"LOOP_ANIMATION",propPath:["styles","[element=button]"],params:{label:"LOOP_ANIMATION_LABEL"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"button",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",params:{indentationType:"MARGIN"}}]),general:[{type:"CONTROL",name:"NPS_ACTIONS",propPath:["content"],params:{syncContentComponentName:"SysNetPromoterScoreComponent"},displayCondition:function(t){var e,n,o;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent"]))||void 0===e?void 0:e.length)&&0===(null===(n=t.documentUtils.findComponentsByNames([t.componentView],["SysFeedbackComponent"]))||void 0===n?void 0:n.length)&&(null===(o=t.component.getProps().handlers)||void 0===o||null===(o=o.find((function(t){return"CLICK"===t.type})))||void 0===o||null===(o=o.actions)||void 0===o?void 0:o.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))}},{type:"CONTROL",name:"FEEDBACK_ACTIONS",propPath:["content"],params:{syncContentComponentName:"SysFeedbackComponent"},displayCondition:function(t){var e,n,o;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&0===(null===(n=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent"]))||void 0===n?void 0:n.length)&&(null===(o=t.component.getProps().handlers)||void 0===o||null===(o=o.find((function(t){return"CLICK"===t.type})))||void 0===o||null===(o=o.actions)||void 0===o?void 0:o.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))}},{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0,hideSubmitActionCondition:function(t){var e,n;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&(null===(n=t.component.getProps().handlers)||void 0===n||null===(n=n.find((function(t){return"CLICK"===t.type})))||void 0===n||null===(n=n.actions)||void 0===n?void 0:n.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))},hideGoToViewActionCondition:function(t){var e,n;return 1===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)&&(null===(n=t.component.getProps().handlers)||void 0===n||null===(n=n.find((function(t){return"CLICK"===t.type})))||void 0===n||null===(n=n.actions)||void 0===n?void 0:n.some((function(t){return["REQUEST","SUBSCRIBE_CONTACT"].includes(t.type)})))},showTitleCondition:function(t){var e;return 0===(null===(e=t.documentUtils.findComponentsByNames([t.componentView],["SysNetPromoterScoreComponent","SysFeedbackComponent"]))||void 0===e?void 0:e.length)},showRunGameActionCondition:function(t){var e;return 0!==(null===(e=t.documentUtils.getExternalStartGamingComponents([t.componentView],t.manifests))||void 0===e?void 0:e.length)}}}]},autoContrast:[{slave:{element:"button",elementProp:"styleAttributes",elementSubProp:"color"},master:{element:"button",elementProp:"styleAttributes",elementSubProp:"background"},enabledPropPath:["content","textContrastEnabled"]}],keepGeneralTabOpenUntilInteracted:!0,events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["content,text","handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],i18n:{en:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"At least one field is required: email or phone number","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Something went wrong. Please try again later"},ru:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Хотя бы одно из полей должно быть заполнено: Email или Номер телефона","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Что-то пошло не так. Пожалуйста, попробуйте позже"},uk:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Хоча б одне з полів має бути заповнене: Email або Номер телефону","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Щось пішло не так. Будь ласка, спробуйте пізніше"},es:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Necesita, como mínimo, un campo obligatorio: email o número de teléfono","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Algo salió mal. Por favor, inténtalo de nuevo más tarde"},de:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Mindestens ein Feld ist erforderlich: E-Mail-Adresse oder Telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Etwas ist schiefgelaufen. Bitte versuchen Sie es später erneut"},fr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Au moins un champ est obligatoire : courriel ou numéro de téléphone","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Une erreur s'est produite. Veuillez réessayer plus tard"},it:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Almeno un campo è obbligatorio: email o numero di telefono","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Qualcosa è andato storto. Riprova più tardi"},pt:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"É necessário pelo menos um campo: email ou número de telefone","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Algo deu errado. Por favor, tente novamente mais tarde"},ro:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Cel puțin un câmp este obligatoriu: e-mail sau număr de telefon","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Ceva nu a funcționat. Vă rugăm să încercați din nou mai târziu"},bg:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Изисква се поне едно поле: имейл или телефонен номер","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Нещо се обърка. Моля, опитайте отново по-късно"},cs:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Je vyžadováno alespoň jedno pole: e-mail nebo telefonní číslo","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Něco se pokazilo. Zkuste to prosím znovu později"},el:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Απαιτείται τουλάχιστον ένα πεδίο: ηλεκτρονική διεύθυνση ή τηλέφωνο","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Κάτι πήγε στραβά. Παρακαλώ δοκιμάστε ξανά αργότερα"},nl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Er is minimaal één veld vereist: e-mail of telefoonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Er is iets misgegaan. Probeer het later opnieuw"},pl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Wymagane jest co najmniej jedno pole: adres e-mail lub numer telefonu","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Coś poszło nie tak. Spróbuj ponownie później"},sv:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Minst ett fält krävs: e-post eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Något gick fel. Försök igen senare"},tr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"En az bir alan gereklidir: e-posta veya telefon numarası","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Bir şeyler ters gitti. Lütfen daha sonra tekrar deneyin"},ar:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"مطلوب حقل واحد على الأقل: البريد الإلكتروني أو رقم الهاتف","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"حدث خطأ ما. يرجى المحاولة مرة أخرى لاحقًا"},zh:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"至少一个字段为必填:电子邮箱或电话号码","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"出了点问题。请稍后再试"},da:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Mindst ét felt er påkrævet: e-mail eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Noget gik galt. Prøv venligst igen senere"},he:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"נדרש לפחות שדה אחד: אימייל או מספר טלפון","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"משהו השתבש. אנא נסה שוב מאוחר יותר"},fi:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Vähintään yksi kenttä vaaditaan: sähköposti tai puhelinnumero","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Jotain meni pieleen. Yritä myöhemmin uudelleen"},hi:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"कम से कम एक फ़ील्ड आवश्यक है: ईमेल या फ़ोन नंबर","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"कुछ गलत हो गया। कृपया बाद में पुनः प्रयास करें"},hr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Potrebno je ispuniti barem jedno polje: e-mail ili telefonski broj","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Nešto je pošlo po zlu. Pokušajte ponovno kasnije"},hu:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Legalább egy mező kitöltése kötelező: e-mail vagy telefonszám.","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Valami hiba történt. Kérjük, próbálja újra később"},id:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Setidaknya satu bidang wajib diisi: email atau nomor telepon","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Terjadi kesalahan. Silakan coba lagi nanti"},ja:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"少なくとも1つのフィールドが必須です:メールアドレスまたは電話番号","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"問題が発生しました。後でもう一度お試しください"},ko:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"최소 한 칸 필수 입력: 이메일 또는 전화번호","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"문제가 발생했습니다. 나중에 다시 시도해 주세요"},no:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Minst ett felt er obligatorisk: e-post eller telefonnummer","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Noe gikk galt. Vennligst prøv igjen senere"},sk:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Aspoň jedno pole je povinné: e-mail alebo telefónne číslo","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Niečo sa pokazilo. Skúste to znova neskôr"},sl:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Vsaj eno polje je obvezno: e-poštni naslov ali telefonska številka","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Nekaj je šlo narobe. Poskusite znova pozneje"},sr:{"control,validation,validationErrors,EMAIL_OR_PHONE_IS_REQUIRED":"Najmanje jedno polje je obavezno: e-pošta ili broj telefona","control,validation,validationErrors,SUBMIT_REQUEST_FAILED":"Нешто је пошло наопако. Покушајте поново касније"}},props:{styles:[{element:"button",styleAttributes:{background:"var(--cl-schema-accent, rgb(0, 0, 0))","--iconDisplay":"none","--iconSize":"20px","--iconOrder":"-1","--iconDistanceToText":"15px","--iconURL":"",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderTopWidth:"0px",borderTopColor:"rgb(0, 0, 0)",borderBottomWidth:"0px",borderBottomColor:"rgb(0, 0, 0)",borderLeftWidth:"0px",borderLeftColor:"rgb(0, 0, 0)",borderRightWidth:"0px",borderRightColor:"rgb(0, 0, 0)",borderTopLeftRadius:"200px",borderTopRightRadius:"200px",borderBottomLeftRadius:"200px",borderBottomRightRadius:"200px",boxShadow:"none"},hoverStyleAttributes:{background:"rgba(0, 0, 0, 0.2)"},classes:"cl-loop-animation-PULSE"}],adaptiveStyles:(a=[{element:"host",styleAttributes:{width:"auto",minWidth:null,height:"35px",minHeight:"35px",marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1}},{element:"button",styleAttributes:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center",flexDirection:"row",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"20px",paddingRight:"20px",_paddingEnabled:!0,color:"rgba(255, 255, 255, 1)",textAlign:"center",lineHeight:"120%",fontWeight:"700",fontSize:"16px",textShadow:"none","--textDisplay":"inline"},classes:"cl-text-class-button"}],Object.values(t).reduce(((t,e)=>Object.assign(t,{[e]:s(a)})),{desktop:[],mobile:[]})),content:{text:"Subscribe",textContrastEnabled:!0}},metaDescription:{icon:"/SysButtonComponent/assets/img/component-icon.svg",label:{en:"Button",ru:"Кнопка",uk:"Кнопка",es:"Botón",fr:"Bouton",de:"Schaltfläche",it:"Pulsante",pt:"Botão",ro:"Buton",bg:"Копче",cs:"Tlačítko",el:"Πλήκτρο",nl:"Knop",pl:"Przycisk",sv:"Knapp",tr:"Buton",ar:"الزِّر",zh:"按钮",da:"Knap",he:"כפתור",fi:"Painike",hi:"बटन",hr:"Gumb",hu:"Gomb",id:"Tombol",ja:"ボタン",ko:"버튼",no:"Knapp",sk:"Tlačidlo",sl:"Gumb",sr:"Dugme"}},syncEnabled:!0,stylesImitationEnabled:!0};var a;const c="VIEW",d="MODULE",u="CONTAINER",h="INPUT",p="BUTTON",m="CONSENT",E="COLUMN";var g,v;(v=g||(g={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",v.REQUEST="REQUEST",v.DISPATCH_EVENT="DISPATCH_EVENT",v.GO_TO_VIEW="GO_TO_VIEW",v.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",v.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",v.SHOW_WIDGET="SHOW_WIDGET",v.OPEN_LINK="OPEN_LINK",v.CLOSE_WIDGET="CLOSE_WIDGET",v.CLICK="CLICK";const b=g;var f,y;class S{static sortActions(t){const e={[b.CLOSE_WIDGET]:-1,[b.OPEN_LINK]:-2,[b.SHOW_WIDGET]:1,[b.SUBSCRIBE_CONTACT]:2,[b.REQUEST]:3},n=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>n(t)>n(e)?-1:n(t)<n(e)?1:0))}constructor(t,e){this.config=t,this.actions=S.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const o=n(),r=o.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let n=0;for(;e[n]&&e[n].getAttribute(i("id"))!==r;){let t=e[n].getAttribute(i("type"));if(S.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((o.shadowRoot||o).querySelectorAll(this.config.relativeSelector)):[o],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,o;try{for(var i,r=!0,s=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(n){e[n]=t[n]&&function(e){return new Promise((function(o,i){!function(t,e,n,o){Promise.resolve(o).then((function(e){t({value:e,done:n})}),e)}(o,i,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(i=await s.next()).done);r=!0){o=i.value,r=!1;const{event:t}=o;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{r||t||!(n=s.return)||await n.call(s)}finally{if(e)throw e.error}}this.eventsQueue=[]}postpone(){this.postponed=!0}release(){this.postponed=!1,this.execute()}destroy(){this.listener&&this.targetElements.length&&(this.targetElements.forEach((t=>{t.removeEventListener("click",this.listener)})),this.targetElements=[])}}S.IGNORING_VIEW_ENTRY_TYPES=[p,m,h],(y=f||(f={})).CLICK="CLICK",y.COMPONENT_EVENT="COMPONENT_EVENT";class O{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,n){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class T{constructor(t,e){this.actionFactory=t,this.actionRegister=e}get(t){const e=t.actions.map((t=>this.actionFactory.get(t)));switch(e.forEach((t=>this.actionRegister.register(t))),t.type){case f.CLICK:return new S(t,e);case f.COMPONENT_EVENT:return new O(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class _{static generate(){let t,e="";for(let n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class I{constructor(){this.listeners=I.createDefaultListenersState()}emit(t,e,n=null){const o=this.listeners[t];o&&Object.values(o).forEach((o=>o(e,t,n))),Object.values(this.listeners["*"]).forEach((o=>o(e,t,n)))}on(t,e){const n=_.generate(),o=this.listeners[t];return o?o[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,o;(null===(o=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===o?void 0:o[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=I.createDefaultListenersState()}}I.createDefaultListenersState=()=>({"*":{}});const R=I,C=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:r,addEventListener:s}=i;(r||s).call(t,e,n,o)};class A{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class L{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===d?Object.assign(Object.assign({},t),L.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var N,x,P,U,M,w,B,k,D,j,F,H,W;L.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(x=N||(N={})).VIEW="VIEW",x.CONTAINER="CONTAINER",x.TEXT="TEXT",x.INPUT="INPUT",x.BUTTON="BUTTON",x.IMAGE="IMAGE",x.CONSENT="CONSENT",x.COUNTDOWN_TIMER="COUNTDOWN_TIMER",x.PROMO_CODE="PROMO_CODE",x.MULTIPLE_INPUT="MULTIPLE_INPUT",x.VIDEO="VIDEO",x.SLIDER="SLIDER",x.SLIDE="SLIDE",x.SOCIAL="SOCIAL",x.COLUMNS="COLUMNS",x.COLUMN="COLUMN",x.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(P||(P={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(U||(U={})),function(t){t.SELF="_self",t.BLANK="_blank"}(M||(M={})),(w||(w={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(B||(B={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(k||(k={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(D||(D={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(j||(j={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(F||(F={})),(W=H||(H={})).BEFORE="BEFORE",W.AFTER="AFTER",W.INSIDE="INSIDE",W.INSTEAD="INSTEAD";class Q{static removeNode(t,e){const n=this.getParentPath(e),o=e[e.length-1],i=this.getNodeByPath(t,n);if(i&&i.children&&i.path){const t=i.children.splice(o,1)[0];return t.prevPath=e,t.path=null,Q.reIndex(i,i.path),t}{const n=t.splice(o,1)[0];return n.prevPath=e,n.path=null,t.forEach(((t,e)=>{t.path=[e],Q.reIndex(t,t.path)})),n}}static insertNode(t,e,n,o){const i=Q.getPathToInsert(e,o,n,t),r=o===H.INSIDE?e:this.getParentPath(i),s=this.getNodeByPath(n,r),l=i[i.length-1];return s&&s.children&&s.path?(s.children.splice(l,0,t),Q.reIndex(s,s.path),t):(n.splice(l,0,t),n.forEach(((t,e)=>{t.path=[e],Q.reIndex(t,t.path)})),t)}static moveNode(t,e,n,o){const i=Q.getNodeByPath(t,n);if(!i)return;const r=Q.removeNode(t,e),s=Q.getNodeById(t,i.id);s&&s.path&&Q.insertNode(r,s.path,t,o)}static iterateDepthFirst(t,e){return V(t,e)}static reIndex(t,e){t.path=e,t.children&&t.children.forEach(((t,n)=>{Q.reIndex(t,e.concat(n))}))}static getRelativePath(t){return t.slice(1,t.length)}static getParentPath(t){return t.slice(0,-1)}static getNodeByPath(t,e){let n=t;for(let t=0;t<e.length;t++){if(t===e.length-1)return n[e[t]]||null;if(!n[e[t]]||!n[e[t]].children)return null;n=n[e[t]].children}return null}static getNodeById(t,e){let n=null;for(let o=0;o<t.length;o++){const i=t[o];if(n)break;if(i.id===e){n=i;break}i.children&&i.children.length&&(n=this.getNodeById(i.children,e))}return n}static getPathToInsert(t,e,n,o){var i,r;let s;const l=t[t.length-1];switch(e){case H.BEFORE:s=t;break;case H.AFTER:s=t.slice(),s[t.length-1]=l+1;break;case H.INSIDE:{const e=Q.getNodeByPath(n,t),o=null!==(r=null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&void 0!==r?r:0;s=t.concat([o]);break}case H.INSTEAD:{const e=null==o?void 0:o.prevPath;s=(null==e?void 0:e.at(-1))<=l?[...t.slice(0,-1),l+1]:t;break}default:s=t}return s}static getNodeOnClickData(t){let e=[],n={};return Q.iterateDepthFirst(t,(t=>{var o,i,r,s;const l=null===(r=null===(i=null===(o=t.props)||void 0===o?void 0:o.handlers)||void 0===i?void 0:i.find((t=>t.type===P.CLICK)))||void 0===r?void 0:r.actions;(null==l?void 0:l.length)&&(e=[...e,...l]),Object.keys((null===(s=t.props)||void 0===s?void 0:s.content)||{}).filter((t=>["detractor","passive","promoter"].includes(t))).map((e=>{var n;return((null===(n=t.props)||void 0===n?void 0:n.content)||{})[e]||null})).filter((t=>t)).forEach((t=>n[t]=t))})),{actions:e,npsViewIds:Object.keys(n)}}}function V(t,e){t.children&&t.children.forEach((t=>V(t,e))),e(t)}class G extends R{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(G.changeEventName,this._isMobile)}))}handleMobileBreakpoint(t){this.mobileBreakpointWidth=t;const e=Number.isInteger(this.mobileBreakpointWidth)?`${this.mobileBreakpointWidth}px`:this.mobileBreakpointWidth;this.mediaQueryList=window.matchMedia(`(max-width: ${e})`),this.mediaQueryList.addListener(this.listener.bind(this)),this._isMobile=this.mediaQueryList.matches,this.emit(G.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(G.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}G.changeEventName="CHANGE";const $=G;class z{static set(t,e){const n=t[z.accumulatorPropertyName]||{};t[z.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[z.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}z.accumulatorPropertyName="clStyleAttributes";const K=z;var q;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(q||(q={}));class X{static applyHostStyles(t,e,n=null,o){var i,r,s;const l=null===(r=null===(i=null==n?void 0:n.props)||void 0===i?void 0:i.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));l&&(null===(s=l.actions)||void 0===s?void 0:s.length)&&(e.style.cursor="pointer"),t!==c&&t!==u&&t!==E||(e.style.display=o===q.CONTENT_LOCKER&&t===c?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class J{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Z{constructor(t,e,n,o,i,r){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=r,this.schemaSubscription=null,this.themeSubscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,r,s,l;const a=null===(i=null===(o=e.adaptiveStyles)||void 0===o?void 0:o[t])||void 0===i?void 0:i.find((t=>t.element===n)),c=(null===(r=e.styles)||void 0===r?void 0:r.find((t=>t.element===n)))||{},d=(null===(s=null==c?void 0:c.styleAttributes)||void 0===s?void 0:s.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),u=this.parseBackground(d);u.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:u.url,inlineSvgString:null,positionOptions:u.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;const n=this.getSharedCb();return Object.keys((null===(e=n.theme)||void 0===e?void 0:e.schema)||{}).length>0?this._applyHostElementBackgroundFromTheme(this.envUrlMaps[t].get("host"),n.theme.schema):this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[t].get("host"),n.cssVars)})).catch((t=>{console.error(t),J.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.schemaSubscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackgroundFromCssVars(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this.themeSubscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackgroundFromTheme(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackgroundFromCssVars(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromCssVars(t,e))}_applyHostElementBackgroundFromTheme(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrlFromTheme(t,e))}_buildBackgroundUrlFromCssVars(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}_buildBackgroundUrlFromTheme(t,e){const n=t.inlineSvgString.trim();let o=n;return[...n.matchAll(/var\(--cl-schema-([^)]+)\)/g)].forEach((t=>{const n=function(t=""){return t.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}(t[1]);var i;o=o.replace(`var(--${i=n,`cl-schema-${i}`})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t,e;null===(t=this.schemaSubscription)||void 0===t||t.off(),null===(e=this.themeSubscription)||void 0===e||e.off()}}const Y=new class{execute(t,e="GET",n=null,o,i){const r={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(r.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,r)}};function tt(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class et{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class nt{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var ot;!function(t){t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.COMPONENT_RESOURCES_LOADED="COMPONENT_RESOURCES_LOADED",t.FAILED_TO_LOAD_COMPONENT_RESOURCE="FAILED_TO_LOAD_COMPONENT_RESOURCE",t.SUBMIT_REQUEST_STARTED="SUBMIT_REQUEST_STARTED",t.SUBMIT_REQUEST_FINISHED="SUBMIT_REQUEST_FINISHED",t.SUBMIT_REQUEST_ERROR_WITHOUT_VIEW="SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",t.PROMO_CODE_SHOWN="PROMO_CODE_SHOWN"}(ot||(ot={}));const it=ot;class rt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(it.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(it.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new nt(this.onCounterStateUpdate)}}}const st=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>st(...t)}},lt=st,at="props",ct="shared",dt="environment";function ut(t,e,n,o){const i=t=>{let r=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return r&&(o&&"function"==typeof o?o(r.getAttribute(e)):(null===(s=null==r?void 0:r.getAttribute)||void 0===s?void 0:s.call(r,e))===n)?r:r&&r.parentNode&&i(r.parentNode)||null;var s};return i(t)}const ht="SUBMIT";function pt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}function mt(t){const{element:e,html:n,appendHtml:o}=t,i=function(t){if(null==t)return"";if("string"!=typeof t)return String(t);if(""===t)return"";if(!/<\/?([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>/.test(t))return t;const e=(new DOMParser).parseFromString(t,"text/html");return e.querySelectorAll('script, style, link[rel="stylesheet"], meta[http-equiv]').forEach((t=>t.remove())),e.querySelectorAll("*").forEach((t=>{if(["onclick","onload","onerror","onmouseover","onfocus","onblur","onkeyup","onkeydown","onchange","onsubmit","onmouseenter","onmouseleave","onmouseout","oncontextmenu","ondrag","ondrop"].forEach((e=>t.removeAttribute(e))),Array.from(t.attributes).forEach((e=>{e.name.startsWith("on")&&t.removeAttribute(e.name)})),"A"===t.tagName||"AREA"===t.tagName){const e=t.getAttribute("href");e&&(e.startsWith("javascript:")||e.startsWith("data:"))&&t.removeAttribute("href")}if("IMG"===t.tagName||"IFRAME"===t.tagName){const e=t.getAttribute("src");e&&(e.startsWith("javascript:")||e.startsWith("data:text/html"))&&t.removeAttribute("src")}if("FORM"===t.tagName){const e=t.getAttribute("action");e&&e.startsWith("javascript:")&&t.removeAttribute("action")}})),e.body.innerHTML}(n);o?e.innerHTML+=i:e.innerHTML=i}class Et extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var gt;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(gt||(gt={}));class vt extends HTMLElement{constructor(){var t;super(),this.skipGameBlur=!0,this.construct=()=>{let t;const e=this.getAttribute(i("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${i("widget-id")}]`);let r;o&&(r=o.getAttribute(i("widget-id")));let s=new Et("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:r},{bubbles:!0,composed:!0});this.dispatchEvent(s),t=s.detail.props,Object.assign(this,t),this.observers=lt(at,ct,dt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new A({}),this.componentEventEmitter=new R,this.componentResourceManager=new rt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new T(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(at).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=i("floating");t.floating&&!e.getAttribute(n)?e.setAttribute(n,"true"):!t.floating&&e.getAttribute(n)&&e.removeAttribute(n)})),this.documentModel.on(`COMPONENT_UPDATE_${this.model.id}`,(t=>{Object.assign(this.model,t)})),this.documentModel.on("SHARED_UPDATE_ALL",(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles),this.observers.get(ct).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Z(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Y),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on($.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(dt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_READY_TO_PLAY",(()=>{this.skipGameBlur||this.getHostElement().classList.add("cl-game-spotlight-component")}))),this.subscriptions.push(this.services.eventEmitter.on("GAME_PHASE_COMPLETED",(()=>{this.skipGameBlur||this.getHostElement().classList.remove("cl-game-spotlight-component")})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===gt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===gt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(at).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(ct).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(dt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(i("element"))===t&&n.id===e:n.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const o=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const n=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let o=!1,i=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(pt(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(pt(n,t),i=!0)})),!o&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!i&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),s=i("type"),l="element-styles";let a=this.getRootElement().querySelector(`style[${s}="${l}"]`);a||(a=document.createElement("style"),a.setAttribute(s,l),this.getRootElement().appendChild(a)),mt({element:a,html:""}),n.forEach((t=>{let e=t.getAttribute(i("element"));const n=this.getEnvironment();let s=r(o,n,e);if(s){if(this.resizeListener.isMobile()){const t=r(o,"desktop",e);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=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,r;const s=[];"host"===(e=vt._resolveTogglableStylesForElementModel(e)).element&&(X.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),s.push("background")));let l=e.styleAttributes.background,a=l&&l.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&a){this.componentResourceManager.getPending().increment();const t=new Image;t.src=a[1],C(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),C(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:tt(e.styleAttributes,s)});if(K.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let o=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let r=this.getRootElement().querySelector(`#${i}`);r||(r=document.createElement("style"),r.id=i,t.appendChild(r)),mt({element:r,html:`\n ${n}::before {\n content: '';\n background: ${o.background};\n position: absolute;\n left: 0;\n top: ${t.getBoundingClientRect().height}px;\n height: ${t.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${n}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),o=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}o.borderTopWidth&&"0px"!==o.borderTopWidth||delete o.borderTopColor,o.borderBottomWidth&&"0px"!==o.borderBottomWidth||delete o.borderBottomColor,o.borderLeftWidth&&"0px"!==o.borderLeftWidth||delete o.borderLeftColor,o.borderRightWidth&&"0px"!==o.borderRightWidth||delete o.borderRightColor,this._addStylesToStyleElement(n,e.element,o,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(n,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(n,this.getShared()),this.stylesAppliedToElement(t,e,n)}},this.applySharedClassesToElementModel=t=>function(t,e){let o=t;return(o.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let i=null===(n=e.textClasses)||void 0===n?void 0:n[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},o.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),o.styleAttributes.fontFamily||(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})})),o}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",r)=>{const s=Object.keys(n).reduce(((t,e)=>t+` ${et.camelCaseToDashCase(e)}: ${n[e]}${r?" !important;":";"}`),"");mt({element:t,html:`[${i("element")}="${e}"]${o} { ${s} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{mt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,r;e.linkColor&&mt({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&mt({element:t,html:`a {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}, a:visited {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}`,appendHtml:!0}),(null===(r=e.linkParams)||void 0===r?void 0:r.removeUnderline)&&mt({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(t,e)=>{Array.from(t.classList).filter((t=>t!==o("hovered")&&t!==o("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const i=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",i)},this.getParentComponent=()=>ut(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return 1===(null==t?void 0:t.split(",").length)?this.parentNode:ut(this.parentNode,i("path"),void 0,(t=>1===(null==t?void 0:t.split(",").length)))},this.getWidgetLanguages=()=>function(t){return[t.getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t))}(this.services.config),this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,n)=>{if(e)return e;const o=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const n=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[n]?{translations:e[n],language:n}:null}(n,t);return o||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,n)=>{},this.updateContext=()=>{var t;const e=this.getModel();this.services.context.updateRecord(e.id,{label:this.getContextRecordLabel(e.props),viewIndex:null===(t=e.path)||void 0===t?void 0:t[0]})},this.addContextRecord=()=>{var t;const e=this.getModel();this.services.context.addRecord(e.id,{recordKey:e.id,id:e.props.control.name,label:this.getContextRecordLabel(e.props),value:e.props.control.defaultValue||"",viewIndex:null===(t=e.path)||void 0===t?void 0:t[0],sourceId:"FORM",initialData:{fallbackValue:"",exampleValue:this.getContextRecordExampleValue(e.props)}})},this.getContextRecordLabel=t=>{var e,n,o,i,r,s;const l=t.control.name;if(["email","first_name","last_name"].includes(l))return l.toUpperCase();if((null===(e=t.content)||void 0===e?void 0:e.label)&&(null===(i=null===(o=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===o?void 0:o.params)||void 0===i?void 0:i.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(r=t.content)||void 0===r?void 0:r.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(s=t.control)||void 0===s?void 0:s.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===ht));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:b.REQUEST}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>{var t;return(null===(t=this.getProps())||void 0===t?void 0:t.handlers)&&this.getProps().handlers.length?[...this.getProps().handlers]:[]},this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(t=this.constructor.define)||void 0===t?void 0:t.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}));const t=document.createElement("style");t.textContent='\n :host(.cl-game-spotlight-component)::after {\n content: "";\n position: absolute;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: visible;\n \n backdrop-filter: blur(4px);\n \n inset: -30px;\n mask-image: \n linear-gradient(to bottom, transparent, grey 30px, grey calc(100% - 30px), transparent),\n linear-gradient(to right, transparent, grey 30px, grey calc(100% - 30px), transparent);\n mask-composite: intersect;\n -webkit-mask-composite: source-in; /* for Chrome/Safari */\n \n transition: opacity 0.35s ease;\n pointer-events: auto;\n }\n ',this.getRootElement().prepend(t)}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}vt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=vt._resolveTogglableStyles(e[t]))})),e},vt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,o)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:o)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const bt=vt;function ft(t,e){let n=0;return t?(Q.iterateDepthFirst(t,(t=>{e===t.name&&n++})),n):n}var yt=[];for(var St in{transparent:"#0000"})yt.push(St);var Ot="\\s*([.\\d%]+)\\s*",Tt="\\("+[Ot,Ot,Ot]+"(?:,\\s*([.\\d]+)\\s*)?\\)",_t="(?:rgb)a?",It="("+yt.join("|")+")";function Rt(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}RegExp(_t+Tt,"i"),RegExp([It,"(?:#([a-f0-9]{3,8}))",_t+Tt,"(?:hsl)a?"+Tt].join("|"),"gi");var Ct=Array.prototype.concat,At=Array.prototype.slice,Lt=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var i=t[n];Rt(i)?e=Ct.call(e,At.call(i)):e.push(i)}return e};Lt.wrap=function(t){return function(){return t(Lt(arguments))}};const Nt=Lt;var xt={},Pt=Object.hasOwnProperty,Ut=Object.create(null);for(var Mt in xt)Pt.call(xt,Mt)&&(Ut[xt[Mt]]=Mt);var wt={to:{},get:{}};function Bt(t,e,n){return Math.min(Math.max(e,t),n)}wt.get=function(t){var e,n;return"hsl"===t.substring(0,3).toLowerCase()?(e=wt.get.hsl(t),n="hsl"):(e=wt.get.rgb(t),n="rgb"),e?{model:n,value:e}:null},wt.get.rgb=function(t){if(!t)return null;var e,n,o,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=e[2],e=e[1],n=0;n<3;n++){var r=2*n;i[n]=parseInt(e.slice(r,r+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Pt.call(xt,e[1])?((i=xt[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Bt(i[n],0,255);return i[3]=Bt(i[3],0,1),i},wt.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,Bt(parseFloat(e[2]),0,100),Bt(parseFloat(e[3]),0,100),Bt(isNaN(n)?1:n,0,1)]}return null},wt.to.rgb=function(){var t=Nt(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},wt.to.hsl=function(){var t=Nt(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};const kt=wt,Dt={},jt={};for(const t of Object.keys(Dt))jt[Dt[t]]=t;const Ft={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"}};Math.pow(6/29,3);for(const t of Object.keys(Ft)){if(!("channels"in Ft[t]))throw new Error("missing channels property: "+t);if(!("labels"in Ft[t]))throw new Error("missing channel labels property: "+t);if(Ft[t].labels.length!==Ft[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=Ft[t];delete Ft[t].channels,delete Ft[t].labels,Object.defineProperty(Ft[t],"channels",{value:e}),Object.defineProperty(Ft[t],"labels",{value:n})}Ft.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),s=r-i;let l,a;r===i?l=0:e===r?l=(n-o)/s:n===r?l=2+(o-e)/s:o===r&&(l=4+(e-n)/s),l=Math.min(60*l,360),l<0&&(l+=360);const c=(i+r)/2;return a=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[l,100*a,100*c]},Ft.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const l=2*o-i,a=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?l+6*(i-l)*r:2*r<1?i:3*r<2?l+(i-l)*(2/3-r)*6:l,a[t]=255*s;return a};const Ht=Ft;function Wt(t,e){return function(n){return e(t(n))}}function Qt(t,e){const n=[e[t].parent,t];let o=Ht[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),o=Wt(Ht[e[i].parent][i],o),i=e[i].parent;return o.conversion=n,o}const Vt={};Object.keys(Ht).forEach((t=>{Vt[t]={},Object.defineProperty(Vt[t],"channels",{value:Ht[t].channels}),Object.defineProperty(Vt[t],"labels",{value:Ht[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(Ht);for(let n=e.length,o=0;o<n;o++)t[e[o]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(Ht[t]);for(let i=o.length,r=0;r<i;r++){const i=o[r],s=e[i];-1===s.distance&&(s.distance=e[t].distance+1,s.parent=t,n.unshift(i))}}return e}(t),n={},o=Object.keys(e);for(let t=o.length,i=0;i<t;i++){const t=o[i];null!==e[t].parent&&(n[t]=Qt(t,e))}return n}(t);Object.keys(e).forEach((n=>{const o=e[n];Vt[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e<t;e++)o[e]=Math.round(o[e]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}(o),Vt[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));const Gt=Vt,$t=["keyword","gray","hex"],zt={};for(const t of Object.keys(Gt))zt[[...Gt[t].labels].sort().join("")]=t;const Kt={};function qt(t,e){if(!(this instanceof qt))return new qt(t,e);if(e&&e in $t&&(e=null),e&&!(e in Gt))throw new Error("Unknown model: "+e);let n,o;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof qt)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=kt.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,o=Gt[this.model].channels,this.color=e.value.slice(0,o),this.valpha="number"==typeof e.value[o]?e.value[o]:1}else if(t.length>0){this.model=e||"rgb",o=Gt[this.model].channels;const n=Array.prototype.slice.call(t,0,o);this.color=Zt(n,o),this.valpha="number"==typeof t[o]?t[o]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const o=e.sort().join("");if(!(o in zt))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=zt[o];const{labels:i}=Gt[this.model],r=[];for(n=0;n<i.length;n++)r.push(t[i[n]]);this.color=Zt(r)}if(Kt[this.model])for(o=Gt[this.model].channels,n=0;n<o;n++){const t=Kt[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}qt.prototype={toString(){return this.string()},string(t){let e=this.model in kt.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return kt.to[e.model](n)},round(t){return t=Math.max(t||0,0),new qt([...this.color.map(Xt(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new qt([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e}};for(const t of Object.keys(Gt)){if($t.includes(t))continue;const{channels:e}=Gt[t];qt.prototype[t]=function(...e){return this.model===t?new qt(this):e.length>0?new qt(e,t):new qt([...Jt(Gt[this.model][t].raw(this.color)),this.valpha],t)},qt[t]=function(...n){let o=n[0];return"number"==typeof o&&(o=Zt(n,e)),new qt(o,t)}}function Xt(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function Jt(t){return Array.isArray(t)?t:[t]}function Zt(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}const Yt=qt;function te(t,e){Object.keys(e).forEach((n=>{t.style[n]=e[n]}))}function ee(t,e,n){const o=function(t,e){const n=getComputedStyle(t)[e]||t.style.getPropertyValue(e);if(n&&n.includes("rgb")&&(!(n.split("rgb").length>2)||n.includes("#")))return n}(e,n);if(o){const e=Yt(o).alpha(.5).string();return t.classList.add("focus-outline-defined"),t.style.setProperty("--clFocusOutline",`3px solid ${e}`),e}return null}class ne{static size(t){return{width:this.width(t),height:this.height(t)}}static width(t){var e;const n=t||document;return Math.max(n.documentElement.clientWidth,(null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)}static height(t){var e;const n=t||document;return Math.max(n.documentElement.clientHeight,(null===(e=n.defaultView)||void 0===e?void 0:e.innerHeight)||0)}static scrollbarWidth(t){var e;const n=t||document;return((null===(e=n.defaultView)||void 0===e?void 0:e.innerWidth)||0)-n.documentElement.clientWidth}}function oe(t){const{width:e,height:n}=t.getBoundingClientRect(),{marginBottom:o,marginTop:i,marginLeft:r,marginRight:s}=window.getComputedStyle(t);return{width:e+parseInt(r,10)+parseInt(s,10),height:n+parseInt(i,10)+parseInt(o,10)}}function ie(t,e,n,o,i){switch(t.position){case"top":return{left:`${re(e,n,o,i)}px`,top:t.availableSpaceAboveTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"bottom":return{left:`${re(e,n,o,i)}px`,bottom:t.availableSpaceBelowTriggerElem-t.contentHeight-t.verticalOffset+"px"};case"left":return{left:t.availableSpaceToTheLeftSideOfTheTrigger-e.width-t.contentWidth-t.horizontalOffset+"px",top:`${se(0,t)}px`};case"right":return{right:t.availableSpaceToTheRightSideOfTheTrigger-t.contentWidth-t.horizontalOffset+"px",top:`${se(0,t)}px`}}}function re(t,e,n,o){let i=n?t.x+t.width/2-e.width/2:t.x;return i<0&&(i=0),i+e.width>ne.width(o)&&(i-=i+e.width-ne.width(o)),i}function se(t,e){let n=e.availableSpaceAboveTriggerElem;return e.contentHeight>e.availableSpaceBelowTriggerElem&&(n-=e.contentHeight-e.availableSpaceBelowTriggerElem),n}const le="cl-tooltip-text-styles",ae=`\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 ce(t,e,n,o){o=o||document;let i=null;t&&(t.classList.add("invalid"),t.setAttribute("aria-invalid","true")),e&&(e.style.visibility="visible"),e&&(e.onmouseenter=()=>{(function(t){if((t=t||document).head.querySelector(`#${le}`))return;const e=document.createElement("style");e.setAttribute("id",le),mt({element:e,html:ae}),t.head.appendChild(e)})(o),i=function(t){const e="cl-overlay-tooltip-text",n=document.getElementById(e)||document.createElement("div");return n.classList.add("cl-tooltip-text"),n.textContent!==t&&(n.textContent=t,n.style=null),n.id||(n.id=e),n}(n),o.body.append(i),i.style.visibility="visible",function(t){const{triggerElement:e,tooltipElement:n,offset:o=10,htmlDocumentObject:i}=t,r=function(t,e,n,o,i,r){const s=function(t,e,n,o,i){const r=function(t,e,n,o){const i=ne.width(o),{right:r}=t.getBoundingClientRect(),s=i-n-r-ne.scrollbarWidth(o);return{horizontalOffset:n,contentWidth:oe(e).width,availableSpaceToTheLeftSideOfTheTrigger:r-n,availableSpaceToTheRightSideOfTheTrigger:s}}(t,e,n,i),s=function(t,e,n,o){const i=ne.height(o),{top:r,bottom:s}=t.getBoundingClientRect();return{verticalOffset:n,contentHeight:oe(e).height,availableSpaceAboveTriggerElem:r-n,availableSpaceBelowTriggerElem:i-s-n}}(t,e,n,i);let l="undefined";const a={bottom:s.availableSpaceBelowTriggerElem>=s.contentHeight,top:s.availableSpaceAboveTriggerElem>=s.contentHeight,right:r.availableSpaceToTheRightSideOfTheTrigger>=r.contentWidth,left:r.availableSpaceToTheLeftSideOfTheTrigger>=r.contentWidth};if(a.top?l="top":a.bottom?l="bottom":a.right?l="right":a.left&&(l="left"),o&&a[o]&&(l=o),"undefined"===l){const t=Math.max(s.availableSpaceBelowTriggerElem,s.availableSpaceAboveTriggerElem,r.availableSpaceToTheRightSideOfTheTrigger,r.availableSpaceToTheLeftSideOfTheTrigger);t===s.availableSpaceBelowTriggerElem?l="bottom":t===s.availableSpaceAboveTriggerElem?l="top":t===r.availableSpaceToTheRightSideOfTheTrigger?l="right":t===r.availableSpaceToTheLeftSideOfTheTrigger&&(l="left")}return Object.assign(Object.assign(Object.assign({},s),r),{position:l})}(t,e,n,o,r=r||document);return function(t,e){const{marginBottom:n,marginTop:o}=window.getComputedStyle(e);if("top"===t.position)te(e,{"margin-top":`${parseInt(o,10)+parseInt(n,10)}px`}),te(e,{"margin-bottom":"0px"});else if("bottom"===t.position)te(e,{"margin-bottom":`${parseInt(n,10)+parseInt(o,10)}px`}),te(e,{"margin-top":"0px"});else{const t=(parseInt(n,10)+parseInt(o,10))/2+"px";te(e,{"margin-top":t,"margin-bottom":t})}}(s,e),{coordinates:ie(s,t.getBoundingClientRect(),e.getBoundingClientRect(),i,r),position:s.position}}(e,n,o,"top",!0,i);n.setAttribute("cl-tooltip-position",r.position),te(n,r.coordinates)}({triggerElement:e,tooltipElement:i,htmlDocumentObject:o})},e.onmouseleave=()=>{i&&(i.remove(),function(t){const e=(t=t||document).head.querySelector(`#${le}`);e&&e.remove()}(o))})}function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function ue(t){return function(t){if(Array.isArray(t))return he(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return he(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function pe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,ye(o.key),o)}}function me(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(me=function(){return!!t})()}function Ee(t,e,n,o){var i=ge(ve(1&o?t.prototype:t),e,n);return 2&o&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function ge(){return ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ve(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ge.apply(null,arguments)}function ve(t){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ve(t)}function be(t,e){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},be(t,e)}function fe(t,e,n){return(e=ye(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ye(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}var Se=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fe(e=function(t,e,n){return e=ve(e),function(t,e){if(e&&("object"==de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,me()?Reflect.construct(e,n||[],ve(t).constructor):e.apply(t,n))}(this,t),"showPendingLoader",(function(){var t=e.getRootElement().querySelector(".main-container"),n=null==t?void 0:t.querySelector(".button-asyncLoader");t&&n&&(n.style.color=e.getRootElement().querySelector("button").style.color,t.classList.remove("cl-button-success"),t.classList.add("cl-button-loading"))})),fe(e,"hidePendingLoader",(function(){var t;null===(t=e.getRootElement().querySelector(".main-container"))||void 0===t||t.classList.remove("cl-button-loading")})),fe(e,"showSuccessIcon",(function(){var t=e.getRootElement().querySelector(".main-container"),n=null==t?void 0:t.querySelector(".button-success-icon");t&&n&&(n.style.color=e.getRootElement().querySelector("button").style.color,t.classList.add("cl-button-success"))})),fe(e,"hideSuccessIcon",(function(){var t;null===(t=e.getRootElement().querySelector(".main-container"))||void 0===t||t.classList.remove("cl-button-success")})),fe(e,"hideErrorTooltip",(function(){e.getRootElement().querySelector(".input-tooltip").style.visibility="hidden"})),fe(e,"updateButtonTextNode",(function(t){mt({element:e.getRootElement().querySelector(".editable-text"),html:t.content.text})})),fe(e,"mapStyleControlValuesToInnerButtonContent",(function(){var t=e.getRootElement().querySelector("button"),n=e.getRootElement().querySelector(".editable-text");t&&n&&(e.mapAlignValueToButtonContent(t),n.style.minWidth="20px",n.style.width="max-content",n.style.minHeight=t.style.fontSize,n.style.textAlign=t.style.textAlign,n.style.lineHeight=t.style.lineHeight,n.style.fontWeight=t.style.fontWeight,n.style.fontSize=t.style.fontSize,n.style.textShadow=t.style.textShadow,n.style.textTransform=t.style.textTransform,n.style.letterSpacing=t.style.letterSpacing,n.style.fontFamily=t.style.fontFamily)})),fe(e,"mapAlignValueToButtonContent",(function(t){"center"===t.style.textAlign&&(t.style.alignItems="center",t.style.justifyContent="center"),"start"===t.style.textAlign&&(t.style.alignItems="column"===t.style.flexDirection?"flex-start":"center",t.style.justifyContent="column"===t.style.flexDirection?"center":"flex-start"),"end"===t.style.textAlign&&(t.style.alignItems="column"===t.style.flexDirection?"flex-end":"center",t.style.justifyContent="column"===t.style.flexDirection?"center":"flex-end")})),fe(e,"createIconNode",(function(t){if(!t.querySelector(".icon")){var e=document.createElement("p");e.classList.add("icon"),t.appendChild(e)}})),fe(e,"showErrorTooltip",(function(t){var n=e.getRootElement().querySelector(".main-container"),o=n.querySelector(".input-tooltip"),i=e.getTranslationsMap(e.manifest.i18n).translations,r=Object.keys(i).find((function(e){return e.includes(t)}));ce(n,o,r?i[r]:t,e.htmlDocumentObject)})),fe(e,"getHandlers",(function(){var t,n,o,i,r=e.getProps().handlers&&e.getProps().handlers.length?ue(e.getProps().handlers):[],s=e.getModel();if(void 0===(null==s||null===(t=s.path)||void 0===t?void 0:t[0])||!e.documentModel)return r;var l=e.documentModel.getView(s.path[0]),a=null===(n=r)||void 0===n?void 0:n.find((function(t){return t.type===f.CLICK}));if(!a)return r;var c=null===(o=a.actions)||void 0===o?void 0:o.some((function(t){return[b.REQUEST,b.SUBSCRIBE_CONTACT].includes(t.type)}));return 1===ft(l,"SysFeedbackComponent")+ft(l,"SysNetPromoterScoreComponent")&&c?(a.actions=null===(i=a.actions)||void 0===i?void 0:i.filter((function(t){return![b.GO_TO_VIEW,b.GO_TO_PREVIOUS_VIEW,b.GO_TO_NEXT_VIEW].includes(t.type)})),r=[].concat(ue(r.filter((function(t){return t.type!==f.CLICK}))),[a])):r})),fe(e,"manifest",l),fe(e,"invalidListener",void 0),fe(e,"validListener",void 0),fe(e,"submitStartedListener",void 0),fe(e,"submitFinishedListener",void 0),fe(e,"submitErrorWithoutViewListener",void 0),fe(e,"stylesUpdateObserver",void 0),e.getRootElement().innerHTML="\n<style>".concat("\n.main-container {\n position: relative;\n display: flex;\n width: 100%;\n height: inherit;\n}\n\nbutton {\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n outline: none;\n min-height: 20px;\n display: flex;\n align-items: center;\n flex-direction: row;\n gap: var(--iconDistanceToText, 15px);\n z-index: 0;\n position: relative;\n}\n\n.editable-text {\n display: var(--textDisplay, 'inline');\n}\n\n.input-tooltip {\n visibility: hidden;\n position: absolute;\n right: -10px;\n top: -10px;\n z-index: 1;\n border-radius: 100%;\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n}\n\n.icon {\n display: var(--iconDisplay, none);\n width: var(--iconSize, 20px);\n height: var(--iconSize, 20px);\n order: var(--iconOrder, -1);\n background: var(--iconURL);\n margin-top: 0px;\n margin-bottom: 0px;\n background-size: cover;\n}\n\nbutton.focus-outline-defined:focus {\n outline: var(--clFocusOutline);\n}\n\n.button-asyncLoader {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n z-index: 1;\n pointer-events: none;\n}\n\n.main-container.cl-button-loading .button-asyncLoader {\n display: block;\n}\n\n.button-success-icon {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 22px;\n height: 22px;\n margin: -11px 0 0 -11px;\n z-index: 1;\n pointer-events: none;\n}\n\n.button-success-icon svg {\n width: 22px;\n height: 22px;\n}\n\n.main-container.cl-button-success .button-success-icon {\n display: block;\n}\n\n/* Once the success checkmark is shown the button is disabled and final, so\n suppress hover feedback. Removing pointer interaction stops the SDK :hover\n rules and the FILL_UP hover animation from matching, which keeps the button\n visually static while the checkmark is displayed. */\n.main-container.cl-button-success button {\n pointer-events: none;\n}\n\n.main-container.cl-button-loading .editable-text,\n.main-container.cl-button-loading .icon,\n.main-container.cl-button-success .editable-text,\n.main-container.cl-button-success .icon {\n visibility: hidden;\n}\n\n.button-asyncLoader .spinner--icon {\n width: 20px;\n height: 20px;\n transform-origin: center;\n animation: cl-button-spinner-rotate 0.8s linear infinite;\n}\n\n.button-asyncLoader .spinner--icon .path {\n stroke: currentColor;\n stroke-linecap: round;\n stroke-dasharray: 24 32;\n}\n\n@keyframes cl-button-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n",'</style>\n<div class="main-container">\n <button cl-element="button">\n <div class="editable-text" cl-inline-edit="content, text"></div>\n </button>\n\n <span class="button-asyncLoader" aria-hidden="true">\n <svg class="spinner--icon" viewBox="0 0 18 18" aria-hidden="true">\n <circle class="path" cx="9" cy="9" r="5" fill="none" stroke-width="2"></circle>\n </svg>\n </span>\n\n <span class="button-success-icon" aria-hidden="true">\n <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="2"></circle>\n <path d="M7 12.5L10.5 16L17 8.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>\n </span>\n\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>'),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&be(t,e)}(t,bt),function(t,e){return e&&pe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"connectedCallback",value:function(){var e=this;Ee(t,"connectedCallback",this,3)([]),this.stylesUpdateObserver=new MutationObserver(this.mapStyleControlValuesToInnerButtonContent.bind(this)),this.stylesUpdateObserver.observe(this.getRootElement().querySelector("button"),{attributes:!0,childList:!1,subtree:!1});var n=this.getElement("button");if(n.addEventListener("click",(function(t){e.services.trackingService.send("FormButtonClick_[Name]")})),this.getProps().handlers){var o=this.getProps().handlers.find((function(t){return"CLICK"===t.type}));if(o&&o.actions){var i=o.actions.find((function(t){return"SUBSCRIBE_CONTACT"===t.type})),r=o.actions.find((function(t){return"REQUEST"===t.type}));i&&(this.invalidListener=this.services.eventEmitter.on("SET_SUBSCRIBE_CONTACT_BUTTON_AS_INVALID",(function(){e.showErrorTooltip("EMAIL_OR_PHONE_IS_REQUIRED")})),this.validListener=this.services.eventEmitter.on("SET_SUBSCRIBE_CONTACT_BUTTON_AS_VALID",(function(){e.hideErrorTooltip()}))),(i||r)&&(this.submitStartedListener=this.services.eventEmitter.on("SUBMIT_REQUEST_STARTED",(function(){n.disabled=!0,e.hideErrorTooltip(),e.hideSuccessIcon(),e.showPendingLoader()})),this.submitFinishedListener=this.services.eventEmitter.on("SUBMIT_REQUEST_FINISHED",(function(t){e.hidePendingLoader(),null!=t&&t.success?e.showSuccessIcon():n.disabled=!1})),this.submitErrorWithoutViewListener=this.services.eventEmitter.on("SUBMIT_REQUEST_ERROR_WITHOUT_VIEW",(function(){e.showErrorTooltip("SUBMIT_REQUEST_FAILED")})))}}this.observeProps((function(t,n){e.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),function(t){let e=null;const n=t,o=["transparent","initial"];t&&(t.style.borderColor&&!o.includes(t.style.borderColor)&&(parseFloat(t.style.borderWidth)||parseFloat(t.style.borderBottomWidth))&&(e=ee(n,t,"borderColor")),!e&&t.style.getPropertyValue("--borderBottomColor")&&!o.includes(t.style.getPropertyValue("--borderBottomColor"))&&parseFloat(t.style.getPropertyValue("--borderBottomWidth"))&&(e=ee(n,t,"--borderBottomColor")),e||!t.style.backgroundColor||o.includes(t.style.backgroundColor)||(e=ee(n,t,"backgroundColor")),e||!t.style.color||o.includes(t.style.color)||(e=ee(n,t,"color")),e||n.classList.remove("focus-outline-defined"))}(e.getElement("button")),e.mapStyleControlValuesToInnerButtonContent();var o=e.getRootElement().querySelector("button");e.updateButtonTextNode(n),e.createIconNode(o)}))}},{key:"disconnectedCallback",value:function(){var e;Ee(t,"disconnectedCallback",this,3)([]),this.invalidListener&&this.invalidListener.off(),this.validListener&&this.validListener.off(),this.submitStartedListener&&this.submitStartedListener.off(),this.submitFinishedListener&&this.submitFinishedListener.off(),this.submitErrorWithoutViewListener&&this.submitErrorWithoutViewListener.off(),null===(e=this.stylesUpdateObserver)||void 0===e||e.disconnect()}}])}();fe(Se,"define",{name:"sys-button",model:l.name,manifest:l});export{Se as default};window.clComponentClass_SysButtonComponent=Se;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claspo/components",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2-ctx.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rm -rf out",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@claspo/common": "7.3.0",
|
|
22
|
-
"@claspo/renderer": "18.7.
|
|
22
|
+
"@claspo/renderer": "18.7.5-ctx.10"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/core": "^7.27.4",
|
|
@@ -97,6 +97,14 @@ button.focus-outline-defined:focus {
|
|
|
97
97
|
display: block;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/* Once the success checkmark is shown the button is disabled and final, so
|
|
101
|
+
suppress hover feedback. Removing pointer interaction stops the SDK :hover
|
|
102
|
+
rules and the FILL_UP hover animation from matching, which keeps the button
|
|
103
|
+
visually static while the checkmark is displayed. */
|
|
104
|
+
.main-container.cl-button-success button {
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
100
108
|
.main-container.cl-button-loading .editable-text,
|
|
101
109
|
.main-container.cl-button-loading .icon,
|
|
102
110
|
.main-container.cl-button-success .editable-text,
|