@claspo/components 1.1.20-theme.36 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SysButtonComponent/SysButtonComponent.js +1 -1
- package/SysCalendarComponent/SysCalendarComponent.js +1 -1
- package/SysCheckboxListComponent/SysCheckboxListComponent.js +1 -1
- package/SysColumnComponent/SysColumnComponent.js +1 -1
- package/SysColumnsComponent/SysColumnsComponent.js +1 -1
- package/SysConsentComponent/SysConsentComponent.js +1 -1
- package/SysContainerComponent/SysContainerComponent.js +1 -1
- package/SysCountdownTimerComponent/SysCountdownTimerComponent.js +1 -1
- package/SysDateComponent/SysDateComponent.js +1 -1
- package/SysDropdownInputComponent/SysDropdownInputComponent.js +1 -1
- package/SysImageComponent/SysImageComponent.js +1 -1
- package/SysInAppColumnsComponent/SysInAppColumnsComponent.js +1 -1
- package/SysInputComponent/SysInputComponent.js +1 -1
- package/SysPhoneInputComponent/SysPhoneInputComponent.js +1 -1
- package/SysPromoCodeComponent/SysPromoCodeComponent.js +1 -1
- package/SysRadioGroupComponent/SysRadioGroupComponent.js +1 -1
- package/SysSlideComponent/SysSlideComponent.js +1 -1
- package/SysSliderComponent/SysSliderComponent.js +1 -1
- package/SysSocialComponent/SysSocialComponent.js +1 -1
- package/SysTextAreaComponent/SysTextAreaComponent.js +1 -1
- package/SysTextComponent/SysTextComponent.js +1 -1
- package/SysVideoComponent/SysVideoComponent.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=(t,e,n,i)=>{const o=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=o;(s||r).call(t,e,n,i)},e={name:"SysImageComponent",componentType:"IMAGE",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{rotation:{elementProp:"styleAttributes",element:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"ROTATION",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{rotation:{elementProp:"styleAttributes",element:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"ROTATION",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"RADIO_BUTTONS",elementProp:"styleAttributes",elementSubProp:"objectFit",element:"image",params:{label:"DOCUMENT_IMAGE",options:[{label:"DOCUMENT_IMAGE_RESIZE_COVER",value:"cover"},{label:"DOCUMENT_IMAGE_RESIZE_CONTAIN",value:"contain"},{label:"DOCUMENT_IMAGE_RESIZE_NONE",value:"none"}]},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"IMAGE_SOURCES",element:"image",propPath:["control","imageSource"]},{type:"CONTROL",name:"FLOATING_COMPONENT_POSITION",element:"host",elementProp:"styleAttributes",displayCondition:"return sdk.component.getProps().floating ? !sdk.component.getProps().control.positioning : false;",params:{label:"DOCUMENT_POSITION"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_DESKTOP"}},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"image",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"MARGIN"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"RADIO_BUTTONS",elementProp:"styleAttributes",elementSubProp:"objectFit",element:"image",params:{label:"DOCUMENT_IMAGE",options:[{label:"DOCUMENT_IMAGE_RESIZE_COVER",value:"cover"},{label:"DOCUMENT_IMAGE_RESIZE_CONTAIN",value:"contain"},{label:"DOCUMENT_IMAGE_RESIZE_NONE",value:"none"}]},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"IMAGE_SOURCES",element:"image",propPath:["control","imageSource"]},{type:"CONTROL",name:"FLOATING_COMPONENT_POSITION",element:"host",elementProp:"styleAttributes",displayCondition:"return sdk.component.getProps().floating ? !sdk.component.getProps().control.positioning : false;",params:{label:"DOCUMENT_POSITION"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE"},displayCondition:"return sdk.appConfig.modelType !== 'RESPONSIVE'"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"image",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"MARGIN"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],events:{dispatch:[],listen:[]},props:{control:{imageSource:{url:""}},adaptiveStyles:{desktop:[{element:"host",styleAttributes:{width:"150px",minWidth:"150px",height:"auto",minHeight:null,paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,display:"block"},classes:""},{element:"image",styleAttributes:{background:"transparent",objectFit:"cover",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:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},classes:""}],mobile:[{element:"host",styleAttributes:{width:"150px",minWidth:"150px",height:"auto",minHeight:null,paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,display:"block"},classes:""},{element:"image",styleAttributes:{background:"transparent",objectFit:"cover",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:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},classes:""}]}},metaDescription:{icon:"/SysImageComponent/assets/img/image-component-icon.svg",label:{en:"Image",ru:"Изображение",uk:"Зображення",es:"Imagen",fr:"Menu déroulant",de:"Bild",it:"Immagine",pt:"Imagem",ro:"Imagine",bg:"Изображение",cs:"Obrázek",el:"Εικόνα",nl:"Afbeelding",pl:"Obraz",sv:"Bild",tr:"Resim",ar:"الصورة",zh:"图像",da:"Billede",he:"תמונה",fi:"Kuva",hi:"इमेज ",hr:"Slika",hu:"Kép",id:"Gambar",ja:"画像",ko:"이미지",no:"Bilde",sk:"Obrázok",sl:"Slika",sr:"Slika"}},waitForResourcesLoad:!0,resourcesPropPaths:[["control","imageSource","url"]]},n="cl-";function i(t){return n+t}function o(t){return"cl-"+t}const s="VIEW",r="MODULE",l="CONTAINER",a="INPUT",c="BUTTON",d="CONSENT",u="COLUMN";var p,h;(h=p||(p={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",h.REQUEST="REQUEST",h.DISPATCH_EVENT="DISPATCH_EVENT",h.GO_TO_VIEW="GO_TO_VIEW",h.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",h.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",h.SHOW_WIDGET="SHOW_WIDGET",h.OPEN_LINK="OPEN_LINK",h.CLOSE_WIDGET="CLOSE_WIDGET",h.CLICK="CLICK";const m=p;var g,y;class E{static sortActions(t){const e={[m.CLOSE_WIDGET]:-1,[m.OPEN_LINK]:-2,[m.SHOW_WIDGET]:1,[m.SUBSCRIBE_CONTACT]:2,[m.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=E.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const i=n(),s=i.getAttribute(o("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(o("type"))));let n=0;for(;e[n]&&e[n].getAttribute(o("id"))!==s;){let t=e[n].getAttribute(o("type"));if(E.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((i.shadowRoot||i).querySelectorAll(this.config.relativeSelector)):[i],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,i;try{for(var o,s=!0,r=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={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,o){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,o,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(o=await r.next()).done);s=!0){i=o.value,s=!1;const{event:t}=i;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{s||t||!(n=r.return)||await n.call(r)}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=[])}}E.IGNORING_VIEW_ENTRY_TYPES=[c,d,a],(y=g||(g={})).CLICK="CLICK",y.COMPONENT_EVENT="COMPONENT_EVENT";class b{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 O{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 g.CLICK:return new E(t,e);case g.COMPONENT_EVENT:return new b(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class v{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 f{constructor(){this.listeners=f.createDefaultListenersState()}emit(t,e,n=null){const i=this.listeners[t];i&&Object.values(i).forEach((i=>i(e,t,n))),Object.values(this.listeners["*"]).forEach((i=>i(e,t,n)))}on(t,e){const n=v.generate(),i=this.listeners[t];return i?i[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,i;(null===(i=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===i?void 0:i[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=f.createDefaultListenersState()}}f.createDefaultListenersState=()=>({"*":{}});const T=f;class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class A{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===r?Object.assign(Object.assign({},t),A.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 C,R,N,I,_,P,L,M,x,D,w,k,U;A.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(R=C||(C={})).VIEW="VIEW",R.CONTAINER="CONTAINER",R.TEXT="TEXT",R.INPUT="INPUT",R.BUTTON="BUTTON",R.IMAGE="IMAGE",R.CONSENT="CONSENT",R.COUNTDOWN_TIMER="COUNTDOWN_TIMER",R.PROMO_CODE="PROMO_CODE",R.MULTIPLE_INPUT="MULTIPLE_INPUT",R.VIDEO="VIDEO",R.SLIDER="SLIDER",R.SLIDE="SLIDE",R.SOCIAL="SOCIAL",R.COLUMNS="COLUMNS",R.COLUMN="COLUMN",R.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(N||(N={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(_||(_={})),(P||(P={})).ACCENT="accent",function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(L||(L={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(M||(M={})),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"}(x||(x={})),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"}(D||(D={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(w||(w={})),(U=k||(k={})).BEFORE="BEFORE",U.AFTER="AFTER",U.INSIDE="INSIDE",U.INSTEAD="INSTEAD";class B extends T{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(B.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(B.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(B.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}B.changeEventName="CHANGE";const j=B;class F{static set(t,e){const n=t[F.accumulatorPropertyName]||{};t[F.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[F.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}F.accumulatorPropertyName="clStyleAttributes";const G=F;var W;!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"}(W||(W={}));class H{static applyHostStyles(t,e,n=null,i){var o,r,a;const c=null===(r=null===(o=null==n?void 0:n.props)||void 0===o?void 0:o.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==s&&t!==l&&t!==u||(e.style.display=i===W.CONTENT_LOCKER&&t===s?"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 V{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class ${constructor(t,e,n,i,o,s){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=i,this.getEnvCb=o,this.httpClient=s,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var i,o,s,r,l;const a=null===(o=null===(i=e.adaptiveStyles)||void 0===i?void 0:i[t])||void 0===o?void 0:o.find((t=>t.element===n)),c=(null===(s=e.styles)||void 0===s?void 0:s.find((t=>t.element===n)))||{},d=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.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((i=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:i}))}))))).then((()=>{var e;this._applyHostElementBackground(this.envUrlMaps[t].get("host"),null===(e=this.getSharedCb().theme)||void 0===e?void 0:e.schema)})).catch((t=>{console.error(t),V.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim();let i=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]);i=i.replace(`var(--${function(t){return`cl-schema-${t}`}(n)})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(i)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const K=new class{execute(t,e="GET",n=null,i,o){const s={method:e,headers:Object.assign({"Content-Type":"text/plain"},i||{}),credentials:"same-origin",body:null,signal:o};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,s)}};function z(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Q{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Z{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 Y;!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.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(Y||(Y={}));const q=Y;class X{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(q.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(q.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 Z(this.onCounterStateUpdate)}}}const J=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>J(...t)}},tt=J,et="props",nt="shared",it="environment";function ot(t,e,n,i){const o=t=>{let s=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return s&&(i&&"function"==typeof i?i(s.getAttribute(e)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,e))===n)?s:s&&s.parentNode&&o(s.parentNode)||null;var r};return o(t)}const st="SUBMIT";function rt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const i=e[n];i&&"object"==typeof i&&!Array.isArray(i)?t[n]=Object.assign(Object.assign({},t[n]||{}),i):t[n]=i})),t):t}function lt(t,e,n){var i;return null===(i=null==t?void 0:t[e])||void 0===i?void 0:i.find((t=>t.element===n))}function at(t){const{element:e,html:n,appendHtml:i}=t,o=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);i?e.innerHTML+=o:e.innerHTML=o}class ct extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var dt;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(dt||(dt={}));class ut extends HTMLElement{constructor(){var e;super(),this.construct=()=>{let t;const e=this.getAttribute(o("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const i=n.closest(`[${o("widget-id")}]`);let s;i&&(s=i.getAttribute(o("widget-id")));let r=new ct("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(o("path")),id:e,widgetId:s},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=tt(et,nt,it),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new S({}),this.componentEventEmitter=new T,this.componentResourceManager=new X(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new O(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(et).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=o("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(nt).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new $(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),K),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(j.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(it).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===dt.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===dt.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(et).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(nt).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(it).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${o("element")}]`)).filter((t=>!t.hasAttribute(o("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(o("element"))===t&&n.id===e:n.getAttribute(o("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const i=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 i=!1,o=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(rt(n,t),i=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(rt(n,t),o=!0)})),!i&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!o&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),s=o("type"),r="element-styles";let l=this.getRootElement().querySelector(`style[${s}="${r}"]`);l||(l=document.createElement("style"),l.setAttribute(s,r),this.getRootElement().appendChild(l)),at({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(o("element"));const n=this.getEnvironment();let s=lt(i,n,e);if(s){if(this.resizeListener.isMobile()){const t=lt(i,"desktop",e);t&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),s.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(s),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,i]of Object.entries(e))t.style[n]=i;return!0},this.applyStylesToElement=(e,n,i)=>{var s,r;const l=[];"host"===(n=ut._resolveTogglableStylesForElementModel(n)).element&&(H.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(s=this.model.props.backgroundDynamicInlineSVGElements)||void 0===s?void 0:s.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),l.push("background")));let a=n.styleAttributes.background,c=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&c){this.componentResourceManager.getPending().increment();const e=new Image;e.src=c[1],t(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),t(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const d=Object.assign(Object.assign({},n),{styleAttributes:z(n.styleAttributes,l)});if(G.set(e,d),this._setClassAttributes(e,n),i){if(n.hoverStyleAttributes){let t=Object.assign({},n.hoverStyleAttributes);if("FILL_UP"===n.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const i=e.tagName.toLowerCase(),o=`flip-up-animation-${n.element}`;let s=this.getRootElement().querySelector(`#${o}`);s||(s=document.createElement("style"),s.id=o,e.appendChild(s)),at({element:s,html:`\n ${i}::before {\n content: '';\n background: ${t.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${i}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),t=Object.assign(Object.assign({},n.hoverStyleAttributes),{background:"transparent",position:"relative"})}t.borderTopWidth&&"0px"!==t.borderTopWidth||delete t.borderTopColor,t.borderBottomWidth&&"0px"!==t.borderBottomWidth||delete t.borderBottomColor,t.borderLeftWidth&&"0px"!==t.borderLeftWidth||delete t.borderLeftColor,t.borderRightWidth&&"0px"!==t.borderRightWidth||delete t.borderRightColor,this._addStylesToStyleElement(i,n.element,t,`:not(.${o("no-hover")}):hover`,!0)}n.placeholderStyleAttributes&&this._addStylesToStyleElement(i,n.element,n.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(i,this.getShared()),this.stylesAppliedToElement(e,n,i)}},this.applySharedClassesToElementModel=t=>function(t,e){let i=t;return(i.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let o=null===(n=e.textClasses)||void 0===n?void 0:n[t];o&&(o.styleAttributes.fontFamily||(o.isHeader&&e.headerFontFamily&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.headerFontFamily})})),!o.isHeader&&e.textFontFamily&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})}))),i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),o.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},i.placeholderStyleAttributes),o.placeholderStyleAttributes)}))})),i.styleAttributes.fontFamily||(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})})),i}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,i="",s)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${Q.camelCaseToDashCase(e)}: ${n[e]}${s?" !important;":";"}`),"");at({element:t,html:`[${o("element")}="${e}"]${i} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{at({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,i,o,s;e.linkColor&&at({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)&&at({element:t,html:`a {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}, a:visited {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}`,appendHtml:!0}),(null===(s=e.linkParams)||void 0===s?void 0:s.removeUnderline)&&at({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!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const o=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",o)},this.getParentComponent=()=>ot(this.parentNode,o("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(o("path"));return t&&1===t.split(",").length?this.parentNode:ot(this.parentNode,o("path"),void 0,(t=>t&&1===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 i=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 i||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,i,o,s,r;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===(o=null===(i=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===i?void 0:i.params)||void 0===o?void 0:o.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(s=t.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===st));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:m.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===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}ut._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=ut._resolveTogglableStyles(e[t]))})),e},ut._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,i)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:i)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const pt=ut;function ht(t){return ht="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},ht(t)}function mt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ft(i.key),i)}}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function yt(t,e,n,i){var o=Et(bt(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Et(){return Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=bt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Et.apply(null,arguments)}function bt(t){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(t)}function Ot(t,e){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ot(t,e)}function vt(t,e,n){return(e=ft(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ft(t){var e=function(t){if("object"!=ht(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ht(e)?e:e+""}var Tt={TOP:"top",CENTER:"center",BOTTOM:"bottom"},St={LEFT:"left",CENTER:"center",RIGHT:"right"},At={FIXED:"fixed",STICKY:"sticky"},Ct=function(){function e(){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),vt(n=function(t,e,n){return e=bt(e),function(t,e){if(e&&("object"==ht(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,gt()?Reflect.construct(e,n||[],bt(t).constructor):e.apply(t,n))}(this,e),"applyStylesRespectingRelativePositioning",(function(){var t=n.processPositioningStyles(n.getProps());n.originalApplyAutoAdaptiveStyles(t),n.fixFloatingImageSize(t)})),vt(n,"recalculateStylesAfterImageLoad",(function(){n.resourcesLoadedListener=n.services.eventEmitter.on("VIEW_COMPONENT_RESOURCES_LOADED",(function(){requestAnimationFrame((function(){n.applyAdaptiveStyles(n.getProps())}))}))})),vt(n,"_getHostNewDimensionsWithStyles",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.getHostElement();return["height","width","minHeight","minWidth","maxHeight","maxWidth","display"].forEach((function(n){t[n]?e.style[n]=t[n]:e.style[n]&&(e.style[n]="")})),{width:e.offsetWidth,height:e.offsetHeight}})),vt(n,"processPositioningStyles",(function(t){var e,i,o=t.adaptiveStyles;if(((null===(e=t.control)||void 0===e?void 0:e.positioningMode)||At.FIXED)===At.FIXED)return o;var s=n.getEnvironment(),r=(null===(i=t.control)||void 0===i||null===(i=i.positioning)||void 0===i?void 0:i[s])||{},l=(null==r?void 0:r.diff)||{};if(!Boolean("x"in l&&"y"in l))return o;var a=lt(o,s,"host").styleAttributes,c=n._getHostNewDimensionsWithStyles(a),d=c.width,u=c.height,p=z(a,["left","right","top","bottom"]),h=d/2,m=l.x-h;r.horizontalPosition===St.LEFT?(p.left="".concat(m,"px"),p.right="auto"):r.horizontalPosition===St.RIGHT?(p.right="".concat(-d-m,"px"),p.left="auto"):(p.left="calc(50% + ".concat(m,"px)"),p.right="auto");var g=u/2,y=l.y-g;return r.verticalPosition===Tt.TOP?(p.top="".concat(y,"px"),p.bottom="auto"):r.verticalPosition===Tt.BOTTOM?(p.bottom="".concat(-u-y,"px"),p.top="auto"):(p.top="calc(50% + ".concat(y,"px)"),p.bottom="auto"),function(t,e,n,i={}){return Object.assign(Object.assign({},t),{[e]:t[e].map((t=>t.element===n?Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},i)}):t))})}(o,s,"host",p)})),vt(n,"deleteElementIfPresent",(function(t,e){var n=t.querySelector(e);n&&n.remove()})),vt(n,"upsertSvg",(function(t,e){var i=t.querySelector("svg");return i&&i.getAttribute("inline-svg-url")===e?Promise.resolve():(i&&n.deleteElementIfPresent(n.getRootElement(),".svgOverflowContainer"),fetch(e).then((function(t){return t.text()})).then((function(i){var o=document.createElement("template"),s=document.createElement("div");s.style.overflow="hidden",s.style.width="100%",s.style.height="inherit",s.classList.add("svgOverflowContainer"),o.append(s),o.firstChild.innerHTML=i.trim();var r=o.firstChild,l=r.querySelector("svg");return l.setAttribute("cl-element","image"),l.setAttribute("inline-svg-url",e),n.componentResourceManager.getPending().decrement(),t.append(r),t})).catch((function(e){console.error(e),n.upsertImage(t,null)})))})),vt(n,"upsertImage",(function(e,i){var o=e.querySelector("img");if(o)return o.src=i,t(o,"load",(function(){n.componentResourceManager.getPending().decrement()})),t(o,"error",(function(){n.componentResourceManager.onResourceLoadFailure(o.src)})),Promise.resolve();var s=new Image;return s.setAttribute("cl-element","image"),s.src=i,t(s,"load",(function(){n.componentResourceManager.getPending().decrement()})),t(s,"error",(function(){n.componentResourceManager.onResourceLoadFailure(s.src)})),e.append(s),Promise.resolve()})),vt(n,"applyAdaptiveStyles",(function(t){var e;n.applyAutoAdaptiveStyles(t.adaptiveStyles);var i=n.getEnvironment(),o=t.adaptiveStyles[i],s=o.find((function(t){return"host"===t.element})),r=o.find((function(t){return"image"===t.element})),l=n.getElement("image"),a={cover:"xMidYMid slice",contain:"xMidYMid meet",none:""},c=l&&"svg"===l.nodeName,d=(null==r||null===(e=r.styleAttributes)||void 0===e?void 0:e.objectFit)&&a.hasOwnProperty(r.styleAttributes.objectFit);if(c&&d)if(l.setAttribute("preserveAspectRatio",a[r.styleAttributes.objectFit]),"none"===r.styleAttributes.objectFit)l.setAttribute("width",l.viewBox.baseVal.width+"px"),l.setAttribute("height",l.viewBox.baseVal.height+"px");else{var u=l.viewBox.baseVal.width/l.viewBox.baseVal.height;if("auto"!==s.styleAttributes.width&&"auto"!==s.styleAttributes.height)return l.setAttribute("height","100%"),void l.setAttribute("width","100%");if("auto"===s.styleAttributes.width&&"auto"===s.styleAttributes.height)return l.setAttribute("width",l.viewBox.baseVal.width+"px"),void l.setAttribute("height",l.viewBox.baseVal.height+"px");"auto"===s.styleAttributes.width&&(l.setAttribute("height","100%"),"100%"!==s.styleAttributes.height&&"calc(100% - 0px)"!==s.styleAttributes.height&&l.setAttribute("width","".concat(Math.round(parseInt(s.styleAttributes.height,10)*u),"px"))),"auto"===s.styleAttributes.height&&(l.setAttribute("width","100%"),"100%"!==s.styleAttributes.width&&"calc(100% - 0px)"!==s.styleAttributes.width&&l.setAttribute("height","".concat(Math.round(parseInt(s.styleAttributes.width,10)/u),"px")))}})),vt(n,"fixFloatingImageSize",(function(t){var e=n.getElement("image");e&&((n.getModel().floating||n.getProps().floating)&&"auto"===lt(t,n.getEnvironment(),"host").styleAttributes.width?e.style.width="":e.style.width="100%")})),n.originalApplyAutoAdaptiveStyles=n.applyAutoAdaptiveStyles,n.applyAutoAdaptiveStyles=n.applyStylesRespectingRelativePositioning,n.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n transform: rotate(var(--rotation, 0deg));\n }\n \n img {\n display: block;\n max-height: inherit;\n height: inherit;\n min-height: inherit;\n }\n </style>\n ",'\n <img cl-element="image" draggable="false" alt="">\n '),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e)}(e,pt),function(t,e){return e&&mt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"disconnectedCallback",value:function(){var t;yt(e,"disconnectedCallback",this,3)([]),null===(t=this.resourcesLoadedListener)||void 0===t||t.off()}},{key:"connectedCallback",value:function(){var t=this;yt(e,"connectedCallback",this,3)([]),this.componentResourceManager.getPending().increment(),this.recalculateStylesAfterImageLoad(),this.observeProps((function(e,n){var i;t.applyAutoAdaptiveStyles(n.adaptiveStyles);var o=t.getElement("image");null!==(i=n.control)&&void 0!==i&&i.imageSource.url&&o&&"src"in o&&(o.src=n.control.imageSource.url);var s=n.control.imageSource.url,r=e&&e.control.imageSource.url,l=String(n.control.imageSource.url).endsWith(".svg")?n.control.imageSource.url:null,a=e&&String(e.control.imageSource.url).endsWith(".svg")?e.control.imageSource.url:null;if(l){if(l===a)return void t.applyAdaptiveStyles(n);t.deleteElementIfPresent(t.getRootElement(),"img"),t.upsertSvg(t.getRootElement(),l).then((function(){t.applyAdaptiveStyles(n)}))}else if(s){if(s===r)return void t.applyAdaptiveStyles(n);t.deleteElementIfPresent(t.getRootElement(),".svgOverflowContainer"),t.upsertImage(t.getRootElement(),s).then((function(){t.applyAdaptiveStyles(n)}))}else t.deleteElementIfPresent(t.getRootElement(),".svgOverflowContainer"),t.upsertImage(t.getRootElement(),t.assets("img/image-placeholder.svg")).then((function(){t.applyAdaptiveStyles(n)}))}))}}])}();vt(Ct,"define",{name:"sys-image",model:e.name,manifest:e});export{St as HorizontalPosition,At as PositioningModes,Tt as VerticalPosition,Ct as default};window.clComponentClass_SysImageComponent=Ct;
|
|
1
|
+
const t=(t,e,n,i)=>{const s=EventTarget.prototype,{addEventListenerBase:o,addEventListener:r}=s;(o||r).call(t,e,n,i)},e={name:"SysImageComponent",componentType:"IMAGE",version:"1.0.0",contextMenuModel:[{type:"CONTROL",name:"COMPONENT_OPERATIONS"},{type:"CONTROL",name:"BRING_BACK_FORWARD",element:"host",elementProp:"styleAttributes",elementSubProp:"zIndex"},{type:"CONTROL",name:"FOCUS_PARENT_COMPONENT"}],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{rotation:{elementProp:"styleAttributes",element:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"ROTATION",elementProp:"styleAttributes",element:"host"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{rotation:{elementProp:"styleAttributes",element:"host"}}},{type:"CONTROL",name:"MARGIN",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"CONTAINER_PADDING",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"ROTATION",elementProp:"styleAttributes",element:"host"}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"RADIO_BUTTONS",elementProp:"styleAttributes",elementSubProp:"objectFit",element:"image",params:{label:"DOCUMENT_IMAGE",options:[{label:"DOCUMENT_IMAGE_RESIZE_COVER",value:"cover"},{label:"DOCUMENT_IMAGE_RESIZE_CONTAIN",value:"contain"},{label:"DOCUMENT_IMAGE_RESIZE_NONE",value:"none"}]},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"IMAGE_SOURCES",element:"image",propPath:["control","imageSource"]},{type:"CONTROL",name:"FLOATING_COMPONENT_POSITION",element:"host",elementProp:"styleAttributes",displayCondition:"return sdk.component.getProps().floating ? !sdk.component.getProps().control.positioning : false;",params:{label:"DOCUMENT_POSITION"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_DESKTOP"}},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"image",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"MARGIN"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"RADIO_BUTTONS",elementProp:"styleAttributes",elementSubProp:"objectFit",element:"image",params:{label:"DOCUMENT_IMAGE",options:[{label:"DOCUMENT_IMAGE_RESIZE_COVER",value:"cover"},{label:"DOCUMENT_IMAGE_RESIZE_CONTAIN",value:"contain"},{label:"DOCUMENT_IMAGE_RESIZE_NONE",value:"none"}]},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"IMAGE_SOURCES",element:"image",propPath:["control","imageSource"]},{type:"CONTROL",name:"FLOATING_COMPONENT_POSITION",element:"host",elementProp:"styleAttributes",displayCondition:"return sdk.component.getProps().floating ? !sdk.component.getProps().control.positioning : false;",params:{label:"DOCUMENT_POSITION"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"DISPLAY",elementProp:"styleAttributes",elementSubProp:"display",element:"host",params:{label:"DOCUMENT_DISPLAY_ON_MOBILE"},displayCondition:"return sdk.appConfig.modelType !== 'RESPONSIVE'"},{type:"CONTROL",name:"BORDER_RADIUS",elementProp:"styleAttributes",element:"image",syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",displayCondition:"return !sdk.component.getProps().floating;",params:{indentationType:"MARGIN"},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1},displayCondition:"return sdk.widgetType !== 'TEASER'"}]},i18nPropPaths:["handlers,[id],actions,[id],params,link","handlers,[id],actions,[id],params,customData"],events:{dispatch:[],listen:[]},props:{control:{imageSource:{url:""}},adaptiveStyles:{desktop:[{element:"host",styleAttributes:{width:"150px",minWidth:"150px",height:"auto",minHeight:null,paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,display:"block"},classes:""},{element:"image",styleAttributes:{background:"transparent",objectFit:"cover",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:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},classes:""}],mobile:[{element:"host",styleAttributes:{width:"150px",minWidth:"150px",height:"auto",minHeight:null,paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,display:"block"},classes:""},{element:"image",styleAttributes:{background:"transparent",objectFit:"cover",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:"0px",borderTopRightRadius:"0px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},classes:""}]}},metaDescription:{icon:"/SysImageComponent/assets/img/image-component-icon.svg",label:{en:"Image",ru:"Изображение",uk:"Зображення",es:"Imagen",fr:"Menu déroulant",de:"Bild",it:"Immagine",pt:"Imagem",ro:"Imagine",bg:"Изображение",cs:"Obrázek",el:"Εικόνα",nl:"Afbeelding",pl:"Obraz",sv:"Bild",tr:"Resim",ar:"الصورة",zh:"图像",da:"Billede",he:"תמונה",fi:"Kuva",hi:"इमेज ",hr:"Slika",hu:"Kép",id:"Gambar",ja:"画像",ko:"이미지",no:"Bilde",sk:"Obrázok",sl:"Slika",sr:"Slika"}},waitForResourcesLoad:!0,resourcesPropPaths:[["control","imageSource","url"]],syncEnabled:!0,stylesImitationEnabled:!0},n="cl-";function i(t){return n+t}function s(t){return"cl-"+t}const o="VIEW",r="MODULE",l="CONTAINER",a="INPUT",c="BUTTON",d="CONSENT",u="COLUMN";var p,h;(h=p||(p={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",h.REQUEST="REQUEST",h.DISPATCH_EVENT="DISPATCH_EVENT",h.GO_TO_VIEW="GO_TO_VIEW",h.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",h.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",h.SHOW_WIDGET="SHOW_WIDGET",h.OPEN_LINK="OPEN_LINK",h.CLOSE_WIDGET="CLOSE_WIDGET",h.CLICK="CLICK";const m=p;var g,y;class E{static sortActions(t){const e={[m.CLOSE_WIDGET]:-1,[m.OPEN_LINK]:-2,[m.SHOW_WIDGET]:1,[m.SUBSCRIBE_CONTACT]:2,[m.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=E.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const i=n(),o=i.getAttribute(s("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(s("type"))));let n=0;for(;e[n]&&e[n].getAttribute(s("id"))!==o;){let t=e[n].getAttribute(s("type"));if(E.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((i.shadowRoot||i).querySelectorAll(this.config.relativeSelector)):[i],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,i;try{for(var s,o=!0,r=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={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,s){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,s,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(s=await r.next()).done);o=!0){i=s.value,o=!1;const{event:t}=i;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{o||t||!(n=r.return)||await n.call(r)}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=[])}}E.IGNORING_VIEW_ENTRY_TYPES=[c,d,a],(y=g||(g={})).CLICK="CLICK",y.COMPONENT_EVENT="COMPONENT_EVENT";class b{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 O{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 g.CLICK:return new E(t,e);case g.COMPONENT_EVENT:return new b(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class v{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 f{constructor(){this.listeners=f.createDefaultListenersState()}emit(t,e,n=null){const i=this.listeners[t];i&&Object.values(i).forEach((i=>i(e,t,n))),Object.values(this.listeners["*"]).forEach((i=>i(e,t,n)))}on(t,e){const n=v.generate(),i=this.listeners[t];return i?i[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,i;(null===(i=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===i?void 0:i[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=f.createDefaultListenersState()}}f.createDefaultListenersState=()=>({"*":{}});const T=f;class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class A{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===r?Object.assign(Object.assign({},t),A.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 C,R,N,I,_,P,L,M,x,D,w,k;A.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(R=C||(C={})).VIEW="VIEW",R.CONTAINER="CONTAINER",R.TEXT="TEXT",R.INPUT="INPUT",R.BUTTON="BUTTON",R.IMAGE="IMAGE",R.CONSENT="CONSENT",R.COUNTDOWN_TIMER="COUNTDOWN_TIMER",R.PROMO_CODE="PROMO_CODE",R.MULTIPLE_INPUT="MULTIPLE_INPUT",R.VIDEO="VIDEO",R.SLIDER="SLIDER",R.SLIDE="SLIDE",R.SOCIAL="SOCIAL",R.COLUMNS="COLUMNS",R.COLUMN="COLUMN",R.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",(N||(N={})).CLICK="CLICK",function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(_||(_={})),function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(P||(P={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(L||(L={})),function(t){t.SLIDE_TO_TOP="SLIDE_TO_TOP",t.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",t.SLIDE_TO_LEFT="SLIDE_TO_LEFT",t.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(M||(M={})),function(t){t.PULSE="PULSE",t.VIBRATE="VIBRATE",t.WOBBLE="WOBBLE",t.SHAKE="SHAKE",t.JELLO="JELLO",t.BOUNCE="BOUNCE",t.BLINK="BLINK",t.FLICKER="FLICKER",t.PING="PING"}(x||(x={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(D||(D={})),(k=w||(w={})).BEFORE="BEFORE",k.AFTER="AFTER",k.INSIDE="INSIDE",k.INSTEAD="INSTEAD";class U extends T{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(U.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(U.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(U.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}U.changeEventName="CHANGE";const B=U;class j{static set(t,e){const n=t[j.accumulatorPropertyName]||{};t[j.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[j.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}j.accumulatorPropertyName="clStyleAttributes";const F=j;var G;!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"}(G||(G={}));class W{static applyHostStyles(t,e,n=null,i){var s,r,a;const c=null===(r=null===(s=null==n?void 0:n.props)||void 0===s?void 0:s.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==o&&t!==l&&t!==u||(e.style.display=i===G.CONTENT_LOCKER&&t===o?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class H{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class V{constructor(t,e,n,i,s,o){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=i,this.getEnvCb=s,this.httpClient=o,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var i,s,o,r,l;const a=null===(s=null===(i=e.adaptiveStyles)||void 0===i?void 0:i[t])||void 0===s?void 0:s.find((t=>t.element===n)),c=(null===(o=e.styles)||void 0===o?void 0:o.find((t=>t.element===n)))||{},d=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.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((i=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:i}))}))))).then((()=>{this._applyHostElementBackground(this.envUrlMaps[t].get("host"),this.getSharedCb().cssVars)})).catch((t=>{console.error(t),H.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const $=new class{execute(t,e="GET",n=null,i,s){const o={method:e,headers:Object.assign({"Content-Type":"text/plain"},i||{}),credentials:"same-origin",body:null,signal:s};return n&&(o.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,o)}};function K(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class z{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 Q{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 Z;!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.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(Z||(Z={}));const Y=Z;class q{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Y.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Y.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 Q(this.onCounterStateUpdate)}}}const X=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>X(...t)}},J=X,tt="props",et="shared",nt="environment";function it(t,e,n,i){const s=t=>{let o=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return o&&(i&&"function"==typeof i?i(o.getAttribute(e)):(null===(r=null==o?void 0:o.getAttribute)||void 0===r?void 0:r.call(o,e))===n)?o:o&&o.parentNode&&s(o.parentNode)||null;var r};return s(t)}const st="SUBMIT";function ot(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const i=e[n];i&&"object"==typeof i&&!Array.isArray(i)?t[n]=Object.assign(Object.assign({},t[n]||{}),i):t[n]=i})),t):t}function rt(t,e,n){var i;return null===(i=null==t?void 0:t[e])||void 0===i?void 0:i.find((t=>t.element===n))}function lt(t){const{element:e,html:n,appendHtml:i}=t,s=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);i?e.innerHTML+=s:e.innerHTML=s}class at extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}var ct;!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ct||(ct={}));class dt extends HTMLElement{constructor(){var e;super(),this.construct=()=>{let t;const e=this.getAttribute(s("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const i=n.closest(`[${s("widget-id")}]`);let o;i&&(o=i.getAttribute(s("widget-id")));let r=new at("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(s("path")),id:e,widgetId:o},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=J(tt,et,nt),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new S({}),this.componentEventEmitter=new T,this.componentResourceManager=new q(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new O(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(tt).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=s("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(et).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new V(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),$),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(B.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(nt).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===ct.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ct.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(tt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(et).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(nt).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${s("element")}]`)).filter((t=>!t.hasAttribute(s("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute(s("element"))===t&&n.id===e:n.getAttribute(s("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const i=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 i=!1,s=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(ot(n,t),i=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(ot(n,t),s=!0)})),!i&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!s&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),o=s("type"),r="element-styles";let l=this.getRootElement().querySelector(`style[${o}="${r}"]`);l||(l=document.createElement("style"),l.setAttribute(o,r),this.getRootElement().appendChild(l)),lt({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute(s("element"));const n=this.getEnvironment();let o=rt(i,n,e);if(o){if(this.resizeListener.isMobile()){const t=rt(i,"desktop",e);t&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),o.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(o),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,i]of Object.entries(e))t.style[n]=i;return!0},this.applyStylesToElement=(e,n,i)=>{var o,r;const l=[];"host"===(n=dt._resolveTogglableStylesForElementModel(n)).element&&(W.applyHostStyles(this.model.type,e,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.desktop)||"mobile"===this.getEnvironment()&&(null===(r=this.model.props.backgroundDynamicInlineSVGElements)||void 0===r?void 0:r.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),l.push("background")));let a=n.styleAttributes.background,c=a&&a.match(/url\("([^"]*)"\)/);if(this.manifest.waitForResourcesLoad&&c){this.componentResourceManager.getPending().increment();const e=new Image;e.src=c[1],t(e,"load",(()=>{this.componentResourceManager.getPending().decrement()})),t(e,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(e.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const d=Object.assign(Object.assign({},n),{styleAttributes:K(n.styleAttributes,l)});if(F.set(e,d),this._setClassAttributes(e,n),i){if(n.hoverStyleAttributes){let t=Object.assign({},n.hoverStyleAttributes);if("FILL_UP"===n.hoverAnimationType){e.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",e.style.overflow="hidden";const i=e.tagName.toLowerCase(),s=`flip-up-animation-${n.element}`;let o=this.getRootElement().querySelector(`#${s}`);o||(o=document.createElement("style"),o.id=s,e.appendChild(o)),lt({element:o,html:`\n ${i}::before {\n content: '';\n background: ${t.background};\n position: absolute;\n left: 0;\n top: ${e.getBoundingClientRect().height}px;\n height: ${e.getBoundingClientRect().height}px;\n width: 100%;\n z-index: -10;\n }\n ${i}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),t=Object.assign(Object.assign({},n.hoverStyleAttributes),{background:"transparent",position:"relative"})}t.borderTopWidth&&"0px"!==t.borderTopWidth||delete t.borderTopColor,t.borderBottomWidth&&"0px"!==t.borderBottomWidth||delete t.borderBottomColor,t.borderLeftWidth&&"0px"!==t.borderLeftWidth||delete t.borderLeftColor,t.borderRightWidth&&"0px"!==t.borderRightWidth||delete t.borderRightColor,this._addStylesToStyleElement(i,n.element,t,`:not(.${s("no-hover")}):hover`,!0)}n.placeholderStyleAttributes&&this._addStylesToStyleElement(i,n.element,n.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(i,this.getShared()),this.stylesAppliedToElement(e,n,i)}},this.applySharedClassesToElementModel=t=>function(t,e){let i=t;return(i.classes||"").split(" ").filter((t=>t.startsWith(n))).forEach((t=>{var n;let s=null===(n=e.textClasses)||void 0===n?void 0:n[t];s&&(s.styleAttributes.fontFamily||(s.isHeader&&e.headerFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.headerFontFamily})})),!s.isHeader&&e.textFontFamily&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:e.textFontFamily})}))),i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),s.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},i.placeholderStyleAttributes),s.placeholderStyleAttributes)}))})),i.styleAttributes.fontFamily||(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})})),i}(t,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,i="",o)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${z.camelCaseToDashCase(e)}: ${n[e]}${o?" !important;":";"}`),"");lt({element:t,html:`[${s("element")}="${e}"]${i} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{lt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,i,s,o;e.linkColor&<({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)&<({element:t,html:`a {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}, a:visited {color: ${null===(s=e.linkParams)||void 0===s?void 0:s.color}}`,appendHtml:!0}),(null===(o=e.linkParams)||void 0===o?void 0:o.removeUnderline)&<({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!==i("hovered")&&t!==i("focused"))).forEach((e=>{e.startsWith(n)&&t.classList.remove(e)}));const s=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",s)},this.getParentComponent=()=>it(this.parentNode,s("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(s("path"));return t&&1===t.split(",").length?this.parentNode:it(this.parentNode,s("path"),void 0,(t=>t&&1===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 i=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 i||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,i,s,o,r;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===(s=null===(i=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===i?void 0:i.params)||void 0===s?void 0:s.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(o=t.content)||void 0===o?void 0:o.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.integrationName)?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{var e;switch(null===(e=t.control)||void 0===e?void 0:e.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},n=this.services.actionRegister.getRegisteredActions().find((t=>t.category===st));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:m.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===(e=this.constructor.define)||void 0===e?void 0:e.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}dt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=dt._resolveTogglableStyles(e[t]))})),e},dt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,i)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:i)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const ut=dt;function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function ht(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vt(i.key),i)}}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}function gt(t,e,n,i){var s=yt(Et(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof s?function(t){return s.apply(n,t)}:s}function yt(){return yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Et(t)););return t}(t,e);if(i){var s=Object.getOwnPropertyDescriptor(i,e);return s.get?s.get.call(arguments.length<3?t:n):s.value}},yt.apply(null,arguments)}function Et(t){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Et(t)}function bt(t,e){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bt(t,e)}function Ot(t,e,n){return(e=vt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vt(t){var e=function(t){if("object"!=pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pt(e)?e:e+""}var ft={TOP:"top",CENTER:"center",BOTTOM:"bottom"},Tt={LEFT:"left",CENTER:"center",RIGHT:"right"},St={FIXED:"fixed",STICKY:"sticky"},At=function(){function e(){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ot(n=function(t,e,n){return e=Et(e),function(t,e){if(e&&("object"==pt(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,mt()?Reflect.construct(e,n||[],Et(t).constructor):e.apply(t,n))}(this,e),"applyStylesRespectingRelativePositioning",(function(){var t=n.processPositioningStyles(n.getProps());n.originalApplyAutoAdaptiveStyles(t),n.fixFloatingImageSize(t)})),Ot(n,"recalculateStylesAfterImageLoad",(function(){n.resourcesLoadedListener=n.services.eventEmitter.on("VIEW_COMPONENT_RESOURCES_LOADED",(function(){requestAnimationFrame((function(){n.applyAdaptiveStyles(n.getProps())}))}))})),Ot(n,"_getHostNewDimensionsWithStyles",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.getHostElement();return["height","width","minHeight","minWidth","maxHeight","maxWidth","display"].forEach((function(n){t[n]?e.style[n]=t[n]:e.style[n]&&(e.style[n]="")})),{width:e.offsetWidth,height:e.offsetHeight}})),Ot(n,"processPositioningStyles",(function(t){var e,i,s=t.adaptiveStyles;if(((null===(e=t.control)||void 0===e?void 0:e.positioningMode)||St.FIXED)===St.FIXED)return s;var o=n.getEnvironment(),r=(null===(i=t.control)||void 0===i||null===(i=i.positioning)||void 0===i?void 0:i[o])||{},l=(null==r?void 0:r.diff)||{};if(!Boolean("x"in l&&"y"in l))return s;var a=rt(s,o,"host").styleAttributes,c=n._getHostNewDimensionsWithStyles(a),d=c.width,u=c.height,p=K(a,["left","right","top","bottom"]),h=d/2,m=l.x-h;r.horizontalPosition===Tt.LEFT?(p.left="".concat(m,"px"),p.right="auto"):r.horizontalPosition===Tt.RIGHT?(p.right="".concat(-d-m,"px"),p.left="auto"):(p.left="calc(50% + ".concat(m,"px)"),p.right="auto");var g=u/2,y=l.y-g;return r.verticalPosition===ft.TOP?(p.top="".concat(y,"px"),p.bottom="auto"):r.verticalPosition===ft.BOTTOM?(p.bottom="".concat(-u-y,"px"),p.top="auto"):(p.top="calc(50% + ".concat(y,"px)"),p.bottom="auto"),function(t,e,n,i={}){return Object.assign(Object.assign({},t),{[e]:t[e].map((t=>t.element===n?Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},i)}):t))})}(s,o,"host",p)})),Ot(n,"deleteElementIfPresent",(function(t,e){var n=t.querySelector(e);n&&n.remove()})),Ot(n,"upsertSvg",(function(t,e){var i=t.querySelector("svg");return i&&i.getAttribute("inline-svg-url")===e?Promise.resolve():(i&&n.deleteElementIfPresent(n.getRootElement(),".svgOverflowContainer"),fetch(e).then((function(t){return t.text()})).then((function(i){var s=document.createElement("template"),o=document.createElement("div");o.style.overflow="hidden",o.style.width="100%",o.style.height="inherit",o.classList.add("svgOverflowContainer"),s.append(o),s.firstChild.innerHTML=i.trim();var r=s.firstChild,l=r.querySelector("svg");return l.setAttribute("cl-element","image"),l.setAttribute("inline-svg-url",e),n.componentResourceManager.getPending().decrement(),t.append(r),t})).catch((function(e){console.error(e),n.upsertImage(t,null)})))})),Ot(n,"upsertImage",(function(e,i){var s=e.querySelector("img");if(s)return s.src=i,t(s,"load",(function(){n.componentResourceManager.getPending().decrement()})),t(s,"error",(function(){n.componentResourceManager.onResourceLoadFailure(s.src)})),Promise.resolve();var o=new Image;return o.setAttribute("cl-element","image"),o.src=i,t(o,"load",(function(){n.componentResourceManager.getPending().decrement()})),t(o,"error",(function(){n.componentResourceManager.onResourceLoadFailure(o.src)})),e.append(o),Promise.resolve()})),Ot(n,"applyAdaptiveStyles",(function(t){var e;n.applyAutoAdaptiveStyles(t.adaptiveStyles);var i=n.getEnvironment(),s=t.adaptiveStyles[i],o=s.find((function(t){return"host"===t.element})),r=s.find((function(t){return"image"===t.element})),l=n.getElement("image"),a={cover:"xMidYMid slice",contain:"xMidYMid meet",none:""},c=l&&"svg"===l.nodeName,d=(null==r||null===(e=r.styleAttributes)||void 0===e?void 0:e.objectFit)&&a.hasOwnProperty(r.styleAttributes.objectFit);if(c&&d)if(l.setAttribute("preserveAspectRatio",a[r.styleAttributes.objectFit]),"none"===r.styleAttributes.objectFit)l.setAttribute("width",l.viewBox.baseVal.width+"px"),l.setAttribute("height",l.viewBox.baseVal.height+"px");else{var u=l.viewBox.baseVal.width/l.viewBox.baseVal.height;if("auto"!==o.styleAttributes.width&&"auto"!==o.styleAttributes.height)return l.setAttribute("height","100%"),void l.setAttribute("width","100%");if("auto"===o.styleAttributes.width&&"auto"===o.styleAttributes.height)return l.setAttribute("width",l.viewBox.baseVal.width+"px"),void l.setAttribute("height",l.viewBox.baseVal.height+"px");"auto"===o.styleAttributes.width&&(l.setAttribute("height","100%"),"100%"!==o.styleAttributes.height&&"calc(100% - 0px)"!==o.styleAttributes.height&&l.setAttribute("width","".concat(Math.round(parseInt(o.styleAttributes.height,10)*u),"px"))),"auto"===o.styleAttributes.height&&(l.setAttribute("width","100%"),"100%"!==o.styleAttributes.width&&"calc(100% - 0px)"!==o.styleAttributes.width&&l.setAttribute("height","".concat(Math.round(parseInt(o.styleAttributes.width,10)/u),"px")))}})),Ot(n,"fixFloatingImageSize",(function(t){var e=n.getElement("image");e&&((n.getModel().floating||n.getProps().floating)&&"auto"===rt(t,n.getEnvironment(),"host").styleAttributes.width?e.style.width="":e.style.width="100%")})),n.originalApplyAutoAdaptiveStyles=n.applyAutoAdaptiveStyles,n.applyAutoAdaptiveStyles=n.applyStylesRespectingRelativePositioning,n.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n transform: rotate(var(--rotation, 0deg));\n }\n \n img {\n display: block;\n max-height: inherit;\n height: inherit;\n min-height: inherit;\n }\n </style>\n ",'\n <img cl-element="image" draggable="false" alt="">\n '),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e)}(e,ut),function(t,e){return e&&ht(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"disconnectedCallback",value:function(){var t;gt(e,"disconnectedCallback",this,3)([]),null===(t=this.resourcesLoadedListener)||void 0===t||t.off()}},{key:"connectedCallback",value:function(){var t=this;gt(e,"connectedCallback",this,3)([]),this.componentResourceManager.getPending().increment(),this.recalculateStylesAfterImageLoad(),this.observeProps((function(e,n){var i;t.applyAutoAdaptiveStyles(n.adaptiveStyles);var s=t.getElement("image");null!==(i=n.control)&&void 0!==i&&i.imageSource.url&&s&&"src"in s&&(s.src=n.control.imageSource.url);var o=n.control.imageSource.url,r=e&&e.control.imageSource.url,l=String(n.control.imageSource.url).endsWith(".svg")?n.control.imageSource.url:null,a=e&&String(e.control.imageSource.url).endsWith(".svg")?e.control.imageSource.url:null;if(l){if(l===a)return void t.applyAdaptiveStyles(n);t.deleteElementIfPresent(t.getRootElement(),"img"),t.upsertSvg(t.getRootElement(),l).then((function(){t.applyAdaptiveStyles(n)}))}else if(o){if(o===r)return void t.applyAdaptiveStyles(n);t.deleteElementIfPresent(t.getRootElement(),".svgOverflowContainer"),t.upsertImage(t.getRootElement(),o).then((function(){t.applyAdaptiveStyles(n)}))}else t.deleteElementIfPresent(t.getRootElement(),".svgOverflowContainer"),t.upsertImage(t.getRootElement(),t.assets("img/image-placeholder.svg")).then((function(){t.applyAdaptiveStyles(n)}))}))}}])}();Ot(At,"define",{name:"sys-image",model:e.name,manifest:e});export{Tt as HorizontalPosition,St as PositioningModes,ft as VerticalPosition,At as default};window.clComponentClass_SysImageComponent=At;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={32:(t,e,n)=>{n.d(e,{A:()=>o});const o={name:"SysColumnsComponent",componentType:"COLUMNS",version:"1.0.0",contextMenuModel:[],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"],minValue:50},height:{options:["fixed","fill","hug"],minValue:50}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},props:{styles:[{element:"host",styleAttributes:{}}],adaptiveStyles:(0,n(521).Q4)([{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"50px",height:"auto",gap:"10px"}}]),isResponsive:!0},metaDescription:{icon:"/SysColumnsComponent/assets/img/columns-component-icon.svg",label:{en:"Columns",ru:"Колонки",uk:"Колонки",es:"Columns",fr:"Columns",de:"Columns",it:"Columns",pt:"Columns",ro:"Columns",bg:"Columns",cs:"Columns",el:"Columns",nl:"Columns",pl:"Columns",sv:"Columns",tr:"Columns",ar:"Columns",zh:"Columns",da:"Columns",he:"Columns",fi:"Columns",hi:"Columns",hr:"Columns",hu:"Columns",id:"Columns",ja:"Columns",ko:"Columns",no:"Columns",sk:"Columns",sl:"Columns",sr:"Columns"},defaultPreset:"50%-50%"},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]]}},360:(t,e,n)=>{n.d(e,{_N:()=>o,vi:()=>s,yU:()=>i});const o={SYSTEM_CLASS_PREFIX:"cl-",SYSTEM_ATTRIBUTE_PREFIX:"cl-"};function i(t){return o.SYSTEM_CLASS_PREFIX+t}function s(t){return o.SYSTEM_ATTRIBUTE_PREFIX+t}},390:(t,e,n)=>{n.d(e,{P:()=>o});const o={DESKTOP:"desktop",MOBILE:"mobile"};o.MOBILE},521:(t,e,n)=>{n.d(e,{MW:()=>a,Q4:()=>l,xK:()=>s});var o=n(390),i=n(360);function s(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 r(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function l(t){return Object.values(o.P).reduce(((e,n)=>Object.assign(e,{[n]:r(t)})),{desktop:[],mobile:[]})}function a(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(i._N.SYSTEM_CLASS_PREFIX))).forEach((t=>{var o;let i=null===(o=e.textClasses)||void 0===o?void 0:o[t];i&&(i.styleAttributes.fontFamily||(i.isHeader&&e.headerFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.headerFontFamily})})),!i.isHeader&&e.textFontFamily&&(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),i.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),i.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}},565:(t,e,n)=>{n.d(e,{A:()=>At});var o=n(32),i=n(360);const s="VIEW",r="MODULE",l="CONTAINER",a="INPUT",c="BUTTON",u="CONSENT",p="COLUMN";var h,d;(d=h||(h={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",d.REQUEST="REQUEST",d.DISPATCH_EVENT="DISPATCH_EVENT",d.GO_TO_VIEW="GO_TO_VIEW",d.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",d.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",d.SHOW_WIDGET="SHOW_WIDGET",d.OPEN_LINK="OPEN_LINK",d.CLOSE_WIDGET="CLOSE_WIDGET",d.CLICK="CLICK";const m=h;var y,E;class O{static sortActions(t){const e={[m.CLOSE_WIDGET]:-1,[m.OPEN_LINK]:-2,[m.SHOW_WIDGET]:1,[m.SUBSCRIBE_CONTACT]:2,[m.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=O.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(),s=o.getAttribute((0,i.vi)("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute((0,i.vi)("type"))));let n=0;for(;e[n]&&e[n].getAttribute((0,i.vi)("id"))!==s;){let t=e[n].getAttribute((0,i.vi)("type"));if(O.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,s=!0,r=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 r.next()).done);s=!0){o=i.value,s=!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{s||t||!(n=r.return)||await n.call(r)}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=[])}}O.IGNORING_VIEW_ENTRY_TYPES=[c,u,a],(E=y||(y={})).CLICK="CLICK",E.COMPONENT_EVENT="COMPONENT_EVENT";class g{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 b{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 y.CLICK:return new O(t,e);case y.COMPONENT_EVENT:return new g(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class f{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 v{constructor(){this.listeners=v.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=f.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=v.createDefaultListenersState()}}v.createDefaultListenersState=()=>({"*":{}});const T=v,C=(t,e,n,o)=>{const i=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=i;(s||r).call(t,e,n,o)};class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class _{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===r?Object.assign(Object.assign({},t),_.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var N,A,R,I,L,P,M,w,D,j,k,U,W;_.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(A=N||(N={})).VIEW="VIEW",A.CONTAINER="CONTAINER",A.TEXT="TEXT",A.INPUT="INPUT",A.BUTTON="BUTTON",A.IMAGE="IMAGE",A.CONSENT="CONSENT",A.COUNTDOWN_TIMER="COUNTDOWN_TIMER",A.PROMO_CODE="PROMO_CODE",A.MULTIPLE_INPUT="MULTIPLE_INPUT",A.VIDEO="VIDEO",A.SLIDER="SLIDER",A.SLIDE="SLIDE",A.SOCIAL="SOCIAL",A.COLUMNS="COLUMNS",A.COLUMN="COLUMN",A.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",function(t){t.CLICK="CLICK"}(R||(R={})),function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(L||(L={})),function(t){t.ACCENT="accent"}(P||(P={})),function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(M||(M={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(w||(w={})),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"}(k||(k={})),(W=U||(U={})).BEFORE="BEFORE",W.AFTER="AFTER",W.INSIDE="INSIDE",W.INSTEAD="INSTEAD";const x="ENVIRONMENT_UPDATE";class V extends T{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on(x,(({isMobileEnv:t})=>{this._isMobile=t,this.emit(V.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(V.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(V.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}V.changeEventName="CHANGE";const B=V;class F{static set(t,e){const n=t[F.accumulatorPropertyName]||{};t[F.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[F.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}F.accumulatorPropertyName="clStyleAttributes";const G=F;var H;!function(t){t.BUILT_IN="BUILT_IN",t.DETACHED="DETACHED",t.FLOATING_BOX="FLOATING_BOX",t.FLOATING_BAR="FLOATING_BAR",t.LAUNCHER="LAUNCHER",t.CONTENT_LOCKER="CONTENT_LOCKER"}(H||(H={}));class ${static applyHostStyles(t,e,n=null,o){var i,r,a;const c=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));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==s&&t!==l&&t!==p||(e.style.display=o===H.CONTENT_LOCKER&&t===s?"flex":"inline-flex",e.style.position="relative"),e.style.boxSizing="border-box"}constructor(){this.styles="/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"}setStyles(t=""){this.styles=`${this.styles} ${t}`}getStyles(){return this.styles}}class K{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class Q{constructor(t,e,n,o,i,s){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=o,this.getEnvCb=i,this.httpClient=s,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var o,i,s,r,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===(s=e.styles)||void 0===s?void 0:s.find((t=>t.element===n)))||{},u=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),p=this.parseBackground(u);p.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:p.url,inlineSvgString:null,positionOptions:p.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((o=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:o}))}))))).then((()=>{var e;this._applyHostElementBackground(this.envUrlMaps[t].get("host"),null===(e=this.getSharedCb().theme)||void 0===e?void 0:e.schema)})).catch((t=>{console.error(t),K.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("THEME_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t.schema)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(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]);o=o.replace(`var(--${function(t){return`cl-schema-${t}`}(n)})`,e[n])})),`url('data:image/svg+xml,${encodeURIComponent(o)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const X=new class{execute(t,e="GET",n=null,o,i){const s={method:e,headers:Object.assign({"Content-Type":"text/plain"},o||{}),credentials:"same-origin",body:null,signal:i};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,s)}};function z(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class Y{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 q{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 Z;!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.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(Z||(Z={}));const J=Z;class tt{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(J.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(J.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 q(this.onCounterStateUpdate)}}}const et=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>et(...t)}},nt=et,ot="props",it="shared",st="environment";function rt(t,e,n,o){const i=t=>{let s=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return s&&(o&&"function"==typeof o?o(s.getAttribute(e)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,e))===n)?s:s&&s.parentNode&&i(s.parentNode)||null;var r};return i(t)}const lt="SUBMIT";function at(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const o=e[n];o&&"object"==typeof o&&!Array.isArray(o)?t[n]=Object.assign(Object.assign({},t[n]||{}),o):t[n]=o})),t):t}var ct,ut=n(521);function pt(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 ht extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(ct||(ct={}));class dt extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute((0,i.vi)("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const o=n.closest(`[${(0,i.vi)("widget-id")}]`);let s;o&&(s=o.getAttribute((0,i.vi)("widget-id")));let r=new ht("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute((0,i.vi)("path")),id:e,widgetId:s},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=nt(ot,it,st),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new S({}),this.componentEventEmitter=new T,this.componentResourceManager=new tt(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new b(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(ot).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=(0,i.vi)("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(it).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new Q(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),X),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(B.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(st).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===ct.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===ct.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(ot).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(it).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(st).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${(0,i.vi)("element")}]`)).filter((t=>!t.hasAttribute((0,i.vi)("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute((0,i.vi)("element"))===t&&n.id===e:n.getAttribute((0,i.vi)("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&&(at(n,t),o=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(at(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=(0,i.vi)("type"),r="element-styles";let l=this.getRootElement().querySelector(`style[${s}="${r}"]`);l||(l=document.createElement("style"),l.setAttribute(s,r),this.getRootElement().appendChild(l)),pt({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute((0,i.vi)("element"));const n=this.getEnvironment();let s=(0,ut.xK)(o,n,e);if(s){if(this.resizeListener.isMobile()){const t=(0,ut.xK)(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),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,o]of Object.entries(e))t.style[n]=o;return!0},this.applyStylesToElement=(t,e,n)=>{var o,s;const r=[];"host"===(e=dt._resolveTogglableStylesForElementModel(e)).element&&($.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===(s=this.model.props.backgroundDynamicInlineSVGElements)||void 0===s?void 0:s.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.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:z(e.styleAttributes,r)});if(G.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 s=this.getRootElement().querySelector(`#${i}`);s||(s=document.createElement("style"),s.id=i,t.appendChild(s)),pt({element:s,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(.${(0,i.vi)("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=>{const e=this.documentModel.getShared();return(0,ut.MW)(t,e)},this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,o="",s)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${Y.camelCaseToDashCase(e)}: ${n[e]}${s?" !important;":";"}`),"");pt({element:t,html:`[${(0,i.vi)("element")}="${e}"]${o} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{pt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,o,i,s;e.linkColor&&pt({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)&&pt({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===(s=e.linkParams)||void 0===s?void 0:s.removeUnderline)&&pt({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!==(0,i.yU)("hovered")&&t!==(0,i.yU)("focused"))).forEach((e=>{e.startsWith(i._N.SYSTEM_CLASS_PREFIX)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>rt(this.parentNode,(0,i.vi)("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute((0,i.vi)("path"));return t&&1===t.split(",").length?this.parentNode:rt(this.parentNode,(0,i.vi)("path"),void 0,(t=>t&&1===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,s,r;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===(s=t.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.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===lt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:m.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()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}dt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=dt._resolveTogglableStyles(e[t]))})),e},dt._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 mt=dt,yt=()=>{const t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation;if(e)return e.type.includes("portrait")?"PORTRAIT":"LANDSCAPE";if(void 0!==window.orientation){if(0===window.orientation||180===window.orientation)return"PORTRAIT";if(90===window.orientation||-90===window.orientation)return"LANDSCAPE"}return"PORTRAIT"},Et=()=>/iPhone/i.test(navigator.userAgent)||/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;class Ot extends T{constructor(t,e){var n;super(),this.documentModel=t,this._orientation=null!==(n=e.config.defaultOrientation)&&void 0!==n?n:yt(),this.documentModel.on(x,(t=>{t.orientation&&(this._orientation=t.orientation,this.emit(Ot.changeEventName,this._orientation))})),this.handleOrientationChangeBound=this.handleOrientationChange.bind(this),this.addOrientationChangeListener()}isPortrait(){return"PORTRAIT"===this._orientation}handleOrientationChange(t){var e,n;this._orientation=null!==(n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.orientation)&&void 0!==n?n:yt(),this.emit(Ot.changeEventName,this._orientation)}addOrientationChangeListener(){!Et()&&window.screen.orientation?window.screen.orientation.addEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.addEventListener("orientationchange",this.handleOrientationChangeBound)}removeOrientationChangeListener(){!Et()&&window.screen.orientation?window.screen.orientation.removeEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.removeEventListener("orientationchange",this.handleOrientationChangeBound)}destroy(){super.destroy(),this.removeOrientationChangeListener()}}Ot.changeEventName="CHANGE";const gt=Ot;function bt(t){return bt="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},bt(t)}function ft(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Nt(o.key),o)}}function vt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vt=function(){return!!t})()}function Tt(){return Tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var o=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ct(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}},Tt.apply(null,arguments)}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function St(t,e){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},St(t,e)}function _t(t,e,n){return(e=Nt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){var e=function(t){if("object"!=bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bt(e)?e:e+""}var At=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),_t(t=function(t,e,n){return e=Ct(e),function(t,e){if(e&&("object"==bt(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,vt()?Reflect.construct(e,n||[],Ct(t).constructor):e.apply(t,n))}(this,e),"manifest",o.A),_t(t,"updateResponsiveStyles",(function(){t.getProps().isResponsive&&"mobile"===t.getEnvironment()&&t.mobileDeviceOrientationListener.isPortrait()?t.getRootElement().querySelector(".columns-container").style.flexDirection="column":t.getRootElement().querySelector(".columns-container").style.flexDirection="row"})),t.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n position: relative;\n min-width: 50px;\n min-height: 50px; \n display:flex;\n }\n\n .columns-container {\n height: auto;\n min-height: 50px; \n width: 100%;\n min-width: 50px;\n display: flex;\n gap: inherit;\n }\n </style>\n ","\n <div ").concat((0,i.vi)("render-outlet"),' class="columns-container"></div>\n '),t}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&&St(t,e)}(e,t),function(t,e){return e&&ft(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"connectedCallback",value:function(){var t=this;!function(t,e,n){var o=Tt(Ct(t.prototype),"connectedCallback",n);return"function"==typeof o?function(t){return o.apply(n,t)}:o}(e,0,this)([]),this.observeProps((function(e,n){t.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),t.updateResponsiveStyles()})),this.observeEnvironment((function(e,n){t.updateResponsiveStyles()})),this.subscriptions.push(this.mobileDeviceOrientationListener.on(gt.changeEventName,(function(){t.updateResponsiveStyles()})))}}])}(mt);_t(At,"define",{name:"sys-columns",model:o.A.name,manifest:o.A})}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o=n(565),i=n(32);function s(t){return s="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},s(t)}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return(e=function(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const c=l(l({},i.A),{},{props:l(l({},i.A.props),{},{isResponsive:!1})});function u(t){return u="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},u(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function m(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y,E,O,g=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,n){return e=h(e),function(t,e){if(e&&("object"==u(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,p()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}(this,t,arguments)}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&&d(t,e)}(t,o.A),e=t,Object.defineProperty(e,"prototype",{writable:!1}),e;var e}();y=g,E="define",O={name:"sys-columns",model:c.name,manifest:c},(E=m(E))in y?Object.defineProperty(y,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):y[E]=O;export{g as default};window.clComponentClass_SysInAppColumnsComponent=g;
|
|
1
|
+
var t={32:(t,e,n)=>{n.d(e,{A:()=>i});const i={name:"SysColumnsComponent",componentType:"COLUMNS",version:"1.0.0",contextMenuModel:[],floatingControlsModel:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host",params:{mode:"horizontal"}},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",elementProp:"styleAttributes",element:"host",params:{width:{minValue:50},height:{minValue:50}}},{type:"CONTROL",name:"CONTAINER_PADDING",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}"},{type:"CONTROL",name:"PARENT_ALIGNMENT",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"COLUMNS_PROPORTIONS",propPath:["content","size"],params:{parent:!0}}]}],propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"],minValue:50},height:{options:["fixed","fill","hug"],minValue:50}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"},syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"SIZE",element:"host",elementProp:"styleAttributes",params:{width:{options:["fixed","fill","hug"]},height:{options:["fixed","fill","hug"]}},displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"COLUMNS",elementProp:"styleAttributes",element:"host"},{type:"CONTROL",name:"SWITCH",propPath:["isResponsive"],params:{label:"ADAPTIVE_COLUMNS",boldLabel:!0}},{type:"CONTROL",name:"BACKGROUND",elementProp:"styleAttributes",element:"host",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'",syncSelectOptions:["SAME_TYPE_CROSS_ENV_WHILE_VALUES_MATCH",null]},{type:"CONTROL",name:"BACKDROP_FILTER",propPath:["styles","[element=host]","styleAttributes"],syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDERS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BOX_SHADOW",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"BORDER_RADIUS",propPath:["styles","[element=host]","styleAttributes"],displayCondition:"return sdk.component.type === 'VIEW' ? sdk.layoutType !== 'CONTENT_LOCKER' : true",syncSelectDisplayCondition:"return sdk.component.type === 'VIEW'"},{type:"CONTROL",name:"INDENTATION",propPathCondition:"return sdk.component.type === 'VIEW' ? {element: 'host', elementProp: 'styleAttributes'} : {propPath: ['styles', '[element=host]', 'styleAttributes']}",params:{indentationType:"PADDING"}},{type:"CONTROL",name:"SWITCH",propPath:["styles","[element=host]","styleAttributes","overflow"],params:{label:"DOCUMENT_OVERFLOW_TITLE",boldLabel:!0,description:"DOCUMENT_OVERFLOW_ENABLED_DESCRIPTION",getValueMapper:{undefined:!1,"":!1,visible:!1,hidden:!0},setValueMapper:{true:"hidden",false:"visible"}},syncSelectDisplayCondition:"return sdk.widgetType !== 'TEASER'"}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},props:{styles:[{element:"host",styleAttributes:{}}],adaptiveStyles:(0,n(521).Q4)([{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:"50px",height:"auto",gap:"10px"}}]),isResponsive:!0},metaDescription:{icon:"/SysColumnsComponent/assets/img/columns-component-icon.svg",label:{en:"Columns",ru:"Колонки",uk:"Колонки",es:"Columns",fr:"Columns",de:"Columns",it:"Columns",pt:"Columns",ro:"Columns",bg:"Columns",cs:"Columns",el:"Columns",nl:"Columns",pl:"Columns",sv:"Columns",tr:"Columns",ar:"Columns",zh:"Columns",da:"Columns",he:"Columns",fi:"Columns",hi:"Columns",hr:"Columns",hu:"Columns",id:"Columns",ja:"Columns",ko:"Columns",no:"Columns",sk:"Columns",sl:"Columns",sr:"Columns"},defaultPreset:"50%-50%"},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"]],syncEnabled:!0,stylesImitationEnabled:!0}},360:(t,e,n)=>{n.d(e,{_N:()=>i,vi:()=>s,yU:()=>o});const i={SYSTEM_CLASS_PREFIX:"cl-",SYSTEM_ATTRIBUTE_PREFIX:"cl-"};function o(t){return i.SYSTEM_CLASS_PREFIX+t}function s(t){return i.SYSTEM_ATTRIBUTE_PREFIX+t}},390:(t,e,n)=>{n.d(e,{P:()=>i});const i={DESKTOP:"desktop",MOBILE:"mobile"};i.MOBILE},521:(t,e,n)=>{n.d(e,{MW:()=>a,Q4:()=>l,xK:()=>s});var i=n(390),o=n(360);function s(t,e,n){var i;return null===(i=null==t?void 0:t[e])||void 0===i?void 0:i.find((t=>t.element===n))}function r(t=[]){return t.map((t=>Object.assign(Object.assign({},t),{styleAttributes:Object.assign({},t.styleAttributes)})))}function l(t){return Object.values(i.P).reduce(((e,n)=>Object.assign(e,{[n]:r(t)})),{desktop:[],mobile:[]})}function a(t,e){let n=t;return(n.classes||"").split(" ").filter((t=>t.startsWith(o._N.SYSTEM_CLASS_PREFIX))).forEach((t=>{var i;let o=null===(i=e.textClasses)||void 0===i?void 0:i[t];o&&(o.styleAttributes.fontFamily||(o.isHeader&&e.headerFontFamily&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.headerFontFamily})})),!o.isHeader&&e.textFontFamily&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},o.styleAttributes),{fontFamily:e.textFontFamily})}))),n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),o.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},n.placeholderStyleAttributes),o.placeholderStyleAttributes)}))})),n.styleAttributes.fontFamily||(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:e.textFontFamily})})),n}},955:(t,e,n)=>{n.d(e,{A:()=>Nt});var i=n(32),o=n(360);const s="VIEW",r="MODULE",l="CONTAINER",a="INPUT",c="BUTTON",u="CONSENT",p="COLUMN";var d,h;(h=d||(d={})).SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",h.REQUEST="REQUEST",h.DISPATCH_EVENT="DISPATCH_EVENT",h.GO_TO_VIEW="GO_TO_VIEW",h.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",h.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",h.SHOW_WIDGET="SHOW_WIDGET",h.OPEN_LINK="OPEN_LINK",h.CLOSE_WIDGET="CLOSE_WIDGET",h.CLICK="CLICK";const m=d;var y,E;class O{static sortActions(t){const e={[m.CLOSE_WIDGET]:-1,[m.OPEN_LINK]:-2,[m.SHOW_WIDGET]:1,[m.SUBSCRIBE_CONTACT]:2,[m.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=O.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,n){this.state=t;const i=n(),s=i.getAttribute((0,o.vi)("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute((0,o.vi)("type"))));let n=0;for(;e[n]&&e[n].getAttribute((0,o.vi)("id"))!==s;){let t=e[n].getAttribute((0,o.vi)("type"));if(O.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;n++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((i.shadowRoot||i).querySelectorAll(this.config.relativeSelector)):[i],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,n,i;try{for(var o,s=!0,r=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={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,o){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,o,(e=t[n](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(o=await r.next()).done);s=!0){i=o.value,s=!1;const{event:t}=i;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}}catch(t){e={error:t}}finally{try{s||t||!(n=r.return)||await n.call(r)}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=[])}}O.IGNORING_VIEW_ENTRY_TYPES=[c,u,a],(E=y||(y={})).CLICK="CLICK",E.COMPONENT_EVENT="COMPONENT_EVENT";class g{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 b{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 y.CLICK:return new O(t,e);case y.COMPONENT_EVENT:return new g(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class f{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 v{constructor(){this.listeners=v.createDefaultListenersState()}emit(t,e,n=null){const i=this.listeners[t];i&&Object.values(i).forEach((i=>i(e,t,n))),Object.values(this.listeners["*"]).forEach((i=>i(e,t,n)))}on(t,e){const n=f.generate(),i=this.listeners[t];return i?i[n]=e:this.listeners[t]={[n]:e},{off:()=>{var e,i;(null===(i=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===i?void 0:i[n])&&delete this.listeners[t][n]}}}destroy(){this.listeners=v.createDefaultListenersState()}}v.createDefaultListenersState=()=>({"*":{}});const T=v,C=(t,e,n,i)=>{const o=EventTarget.prototype,{addEventListenerBase:s,addEventListener:r}=o;(s||r).call(t,e,n,i)};class S{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class _{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===r?Object.assign(Object.assign({},t),_.moduleToContainerParams):t));return Object.assign(Object.assign({},t),{children:e})}));return Object.assign(Object.assign({},t),{views:e})}static sort(t,e){return t.index>e.index?1:-1}static reIndex(t,e){return Object.assign(Object.assign({},t),{index:e+t.index})}}var N,A,R,I,L,P,M,w,D,j,k,U;_.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"},(A=N||(N={})).VIEW="VIEW",A.CONTAINER="CONTAINER",A.TEXT="TEXT",A.INPUT="INPUT",A.BUTTON="BUTTON",A.IMAGE="IMAGE",A.CONSENT="CONSENT",A.COUNTDOWN_TIMER="COUNTDOWN_TIMER",A.PROMO_CODE="PROMO_CODE",A.MULTIPLE_INPUT="MULTIPLE_INPUT",A.VIDEO="VIDEO",A.SLIDER="SLIDER",A.SLIDE="SLIDE",A.SOCIAL="SOCIAL",A.COLUMNS="COLUMNS",A.COLUMN="COLUMN",A.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING",function(t){t.CLICK="CLICK"}(R||(R={})),function(t){t.SHOW_WIDGET="SHOW_WIDGET",t.OPEN_LINK="OPEN_LINK",t.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",t.REQUEST="REQUEST",t.CLOSE_WIDGET="CLOSE_WIDGET",t.GO_TO_VIEW="GO_TO_VIEW",t.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",t.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",t.CLICK="CLICK"}(I||(I={})),function(t){t.SELF="_self",t.BLANK="_blank"}(L||(L={})),function(t){t.TOP="TOP",t.CENTER="CENTER",t.BOTTOM="BOTTOM"}(P||(P={})),function(t){t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT"}(M||(M={})),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"}(w||(w={})),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"}(D||(D={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(j||(j={})),(U=k||(k={})).BEFORE="BEFORE",U.AFTER="AFTER",U.INSIDE="INSIDE",U.INSTEAD="INSTEAD";const W="ENVIRONMENT_UPDATE";class x extends T{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on(W,(({isMobileEnv:t})=>{this._isMobile=t,this.emit(x.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(x.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(x.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}x.changeEventName="CHANGE";const V=x;class B{static set(t,e){const n=t[B.accumulatorPropertyName]||{};t[B.accumulatorPropertyName]=Object.assign(Object.assign({},n),e.styleAttributes),Object.keys(t[B.accumulatorPropertyName]).forEach((n=>{n.includes("--")?t.style.setProperty(n,e.styleAttributes[n]||""):t.style[n]=e.styleAttributes[n]?e.styleAttributes[n]:""}))}}B.accumulatorPropertyName="clStyleAttributes";const F=B;var G;!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"}(G||(G={}));class H{static applyHostStyles(t,e,n=null,i){var o,r,a;const c=null===(r=null===(o=null==n?void 0:n.props)||void 0===o?void 0:o.handlers)||void 0===r?void 0:r.find((t=>"CLICK"===t.type));c&&(null===(a=c.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==s&&t!==l&&t!==p||(e.style.display=i===G.CONTENT_LOCKER&&t===s?"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 ${static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class K{constructor(t,e,n,i,o,s){this.hostElement=e,this.documentModel=t,this.getSharedCb=n,this.getPropsCb=i,this.getEnvCb=o,this.httpClient=s,this.subscription=null,this.envUrlMaps={desktop:new Map,mobile:new Map}}parseBackground(t){const e=String(t||"");if(e.includes("url")){const[t,n]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:n.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((n=>{var i,o,s,r,l;const a=null===(o=null===(i=e.adaptiveStyles)||void 0===i?void 0:i[t])||void 0===o?void 0:o.find((t=>t.element===n)),c=(null===(s=e.styles)||void 0===s?void 0:s.find((t=>t.element===n)))||{},u=(null===(r=null==c?void 0:c.styleAttributes)||void 0===r?void 0:r.background)||(null===(l=null==a?void 0:a.styleAttributes)||void 0===l?void 0:l.background),p=this.parseBackground(u);p.url&&this.envUrlMaps[t].set(n,{originalSVGResourceURL:p.url,inlineSvgString:null,positionOptions:p.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,n])=>this.httpClient.execute(n.originalSVGResourceURL).then((t=>t.text())).then((i=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},n),{inlineSvgString:i}))}))))).then((()=>{this._applyHostElementBackground(this.envUrlMaps[t].get("host"),this.getSharedCb().cssVars)})).catch((t=>{console.error(t),$.log(`Failed to load/apply backgroundDynamicInlineSVGElements[${this.getPropsCb().backgroundDynamicInlineSVGElements}] ${t}`)}))}on(){return this.subscription=this.documentModel.on("COLOR_SCHEMA_UPDATE",(t=>{this._applyHostElementBackground(this.envUrlMaps[this.getEnvCb()].get("host"),t)})),this}_applyHostElementBackground(t,e){t&&e&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const n=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e["cl-schema-accent"]);return`url('data:image/svg+xml,${encodeURIComponent(n)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const Q=new class{execute(t,e="GET",n=null,i,o){const s={method:e,headers:Object.assign({"Content-Type":"text/plain"},i||{}),credentials:"same-origin",body:null,signal:o};return n&&(s.body="string"==typeof n?n:JSON.stringify(n)),fetch(t,s)}};function X(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]})),{})}class z{static camelCaseToDashCase(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}static camelCaseToUpperSnakeCase(t){return t.replace(/[A-Z]/g,(t=>"_"+t)).toUpperCase()}}class Y{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}var q;!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.EXECUTE_ACTION_BY_PREDICATE="EXECUTE_ACTION_BY_PREDICATE"}(q||(q={}));const Z=q;class J{constructor(t,e,n){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(Z.COMPONENT_RESOURCES_LOADED,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(Z.FAILED_TO_LOAD_COMPONENT_RESOURCE,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=n,this.counters={pending:new Y(this.onCounterStateUpdate)}}}const tt=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>tt(...t)}},et=tt,nt="props",it="shared",ot="environment";function st(t,e,n,i){const o=t=>{let s=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return s&&(i&&"function"==typeof i?i(s.getAttribute(e)):(null===(r=null==s?void 0:s.getAttribute)||void 0===r?void 0:r.call(s,e))===n)?s:s&&s.parentNode&&o(s.parentNode)||null;var r};return o(t)}const rt="SUBMIT";function lt(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((n=>{if("element"===n||"classes"===n)return;const i=e[n];i&&"object"==typeof i&&!Array.isArray(i)?t[n]=Object.assign(Object.assign({},t[n]||{}),i):t[n]=i})),t):t}var at,ct=n(521);function ut(t){const{element:e,html:n,appendHtml:i}=t,o=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);i?e.innerHTML+=o:e.innerHTML=o}class pt extends Event{constructor(t,e,n){super(t,n),this.detail={},Object.defineProperty(this,"detail",{value:e})}}!function(t){t.STATIC="STATIC",t.UPDATING="UPDATING"}(at||(at={}));class dt extends HTMLElement{constructor(){var t;super(),this.construct=()=>{let t;const e=this.getAttribute((0,o.vi)("id")),n=this.getWidgetContainerNode();if(!n)throw new Error("Widget container not found in construct");const i=n.closest(`[${(0,o.vi)("widget-id")}]`);let s;i&&(s=i.getAttribute((0,o.vi)("widget-id")));let r=new pt("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute((0,o.vi)("path")),id:e,widgetId:s},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=et(nt,it,ot),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new S({}),this.componentEventEmitter=new T,this.componentResourceManager=new J(this.model.id,this.services.eventEmitter,this.isStaticRenderMode()),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new b(this._actionFactory,this.services.actionRegister),this.prevProps=this.model.props,this.prevEnvironment=this.getEnvironment(),this.documentModel.on(`COMPONENT_PROPS_UPDATE_${this.model.id}`,(t=>{this.model.props=t,this.observers.get(nt).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),n=(0,o.vi)("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(it).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new K(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),Q),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(V.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(ot).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.isStaticRenderMode=()=>this.services.config.getConfig("renderMode")===at.STATIC,this.isUpdatingRenderMode=()=>this.services.config.getConfig("renderMode")===at.UPDATING,this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(nt).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(it).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(ot).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${(0,o.vi)("element")}]`)).filter((t=>!t.hasAttribute((0,o.vi)("component"))))],this.getElement=(t,e)=>this.getElements().find((n=>e?n.getAttribute((0,o.vi)("element"))===t&&n.id===e:n.getAttribute((0,o.vi)("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const n=this.getElements();if(!n.length)return;const i=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 i=!1,o=!1;n.desktop&&n.desktop.forEach((n=>{n.element===e&&(lt(n,t),i=!0)})),n.mobile&&n.mobile.forEach((n=>{n.element===e&&(lt(n,t),o=!0)})),!i&&n.desktop&&n.desktop.push(JSON.parse(JSON.stringify(t))),!o&&n.mobile&&n.mobile.push(JSON.parse(JSON.stringify(t)))})),n}(t,e),s=(0,o.vi)("type"),r="element-styles";let l=this.getRootElement().querySelector(`style[${s}="${r}"]`);l||(l=document.createElement("style"),l.setAttribute(s,r),this.getRootElement().appendChild(l)),ut({element:l,html:""}),n.forEach((t=>{let e=t.getAttribute((0,o.vi)("element"));const n=this.getEnvironment();let s=(0,ct.xK)(i,n,e);if(s){if(this.resizeListener.isMobile()){const t=(0,ct.xK)(i,"desktop",e);t&&(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},t.styleAttributes),s.styleAttributes)}))}this.applyStylesToElement(t,this.applySharedClassesToElementModel(s),l)}})),this._addLinkColor(l,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[n,i]of Object.entries(e))t.style[n]=i;return!0},this.applyStylesToElement=(t,e,n)=>{var i,s;const r=[];"host"===(e=dt._resolveTogglableStylesForElementModel(e)).element&&(H.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(i=this.model.props.backgroundDynamicInlineSVGElements)||void 0===i?void 0:i.desktop)||"mobile"===this.getEnvironment()&&(null===(s=this.model.props.backgroundDynamicInlineSVGElements)||void 0===s?void 0:s.mobile))&&(this.colorSchemaListener.apply(this.getEnvironment()),r.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:X(e.styleAttributes,r)});if(F.set(t,c),this._setClassAttributes(t,e),n){if(e.hoverStyleAttributes){let i=Object.assign({},e.hoverStyleAttributes);if("FILL_UP"===e.hoverAnimationType){t.style.boxShadow="inset 0px 0px 0px 0px rgb(0, 0, 0, 0)",t.style.overflow="hidden";const n=t.tagName.toLowerCase(),o=`flip-up-animation-${e.element}`;let s=this.getRootElement().querySelector(`#${o}`);s||(s=document.createElement("style"),s.id=o,t.appendChild(s)),ut({element:s,html:`\n ${n}::before {\n content: '';\n background: ${i.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 `}),i=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}i.borderTopWidth&&"0px"!==i.borderTopWidth||delete i.borderTopColor,i.borderBottomWidth&&"0px"!==i.borderBottomWidth||delete i.borderBottomColor,i.borderLeftWidth&&"0px"!==i.borderLeftWidth||delete i.borderLeftColor,i.borderRightWidth&&"0px"!==i.borderRightWidth||delete i.borderRightColor,this._addStylesToStyleElement(n,e.element,i,`:not(.${(0,o.vi)("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=>{const e=this.documentModel.getShared();return(0,ct.MW)(t,e)},this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,n,i="",s)=>{const r=Object.keys(n).reduce(((t,e)=>t+` ${z.camelCaseToDashCase(e)}: ${n[e]}${s?" !important;":";"}`),"");ut({element:t,html:`[${(0,o.vi)("element")}="${e}"]${i} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{ut({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var n,i,o,s;e.linkColor&&ut({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(n=e.linkParams)||void 0===n?void 0:n.color)&&ut({element:t,html:`a {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}, a:visited {color: ${null===(o=e.linkParams)||void 0===o?void 0:o.color}}`,appendHtml:!0}),(null===(s=e.linkParams)||void 0===s?void 0:s.removeUnderline)&&ut({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!==(0,o.yU)("hovered")&&t!==(0,o.yU)("focused"))).forEach((e=>{e.startsWith(o._N.SYSTEM_CLASS_PREFIX)&&t.classList.remove(e)}));const n=((t.getAttribute("class")||"")+" "+e.classes).trim();t.setAttribute("class",n)},this.getParentComponent=()=>st(this.parentNode,(0,o.vi)("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute((0,o.vi)("path"));return t&&1===t.split(",").length?this.parentNode:st(this.parentNode,(0,o.vi)("path"),void 0,(t=>t&&1===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 i=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 i||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,i,o,s,r;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===(o=null===(i=null===(n=t.adaptiveStyles)||void 0===n?void 0:n.desktop.find((t=>"label"===t.element)))||void 0===i?void 0:i.params)||void 0===o?void 0:o.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(null===(s=t.content)||void 0===s?void 0:s.placeholder)?this.capitalizeFirstLetter(t.content.placeholder):(null===(r=t.control)||void 0===r?void 0:r.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===rt));n?null==n||n.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:m.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()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}}dt._resolveTogglableStylesForElementModel=t=>{const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=dt._resolveTogglableStyles(e[t]))})),e},dt._resolveTogglableStyles=t=>{const e=Object.assign({},t),n=(t,n,i)=>{n in e&&(t.forEach((t=>{t in e&&(e[t]=e[n]?e[t]:i)})),delete e[n])};return n(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),n(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e};const ht=dt,mt=()=>{const t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation;if(e)return e.type.includes("portrait")?"PORTRAIT":"LANDSCAPE";if(void 0!==window.orientation){if(0===window.orientation||180===window.orientation)return"PORTRAIT";if(90===window.orientation||-90===window.orientation)return"LANDSCAPE"}return"PORTRAIT"},yt=()=>/iPhone/i.test(navigator.userAgent)||/iPad/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;class Et extends T{constructor(t,e){var n;super(),this.documentModel=t,this._orientation=null!==(n=e.config.defaultOrientation)&&void 0!==n?n:mt(),this.documentModel.on(W,(t=>{t.orientation&&(this._orientation=t.orientation,this.emit(Et.changeEventName,this._orientation))})),this.handleOrientationChangeBound=this.handleOrientationChange.bind(this),this.addOrientationChangeListener()}isPortrait(){return"PORTRAIT"===this._orientation}handleOrientationChange(t){var e,n;this._orientation=null!==(n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.orientation)&&void 0!==n?n:mt(),this.emit(Et.changeEventName,this._orientation)}addOrientationChangeListener(){!yt()&&window.screen.orientation?window.screen.orientation.addEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.addEventListener("orientationchange",this.handleOrientationChangeBound)}removeOrientationChangeListener(){!yt()&&window.screen.orientation?window.screen.orientation.removeEventListener("change",this.handleOrientationChangeBound):"orientation"in window&&window.removeEventListener("orientationchange",this.handleOrientationChangeBound)}destroy(){super.destroy(),this.removeOrientationChangeListener()}}Et.changeEventName="CHANGE";const Ot=Et;function gt(t){return gt="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},gt(t)}function bt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_t(i.key),i)}}function ft(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ft=function(){return!!t})()}function vt(){return vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Tt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},vt.apply(null,arguments)}function Tt(t){return Tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tt(t)}function Ct(t,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ct(t,e)}function St(t,e,n){return(e=_t(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t){var e=function(t){if("object"!=gt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gt(e)?e:e+""}var Nt=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),St(t=function(t,e,n){return e=Tt(e),function(t,e){if(e&&("object"==gt(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,ft()?Reflect.construct(e,n||[],Tt(t).constructor):e.apply(t,n))}(this,e),"manifest",i.A),St(t,"updateResponsiveStyles",(function(){t.getProps().isResponsive&&"mobile"===t.getEnvironment()&&t.mobileDeviceOrientationListener.isPortrait()?t.getRootElement().querySelector(".columns-container").style.flexDirection="column":t.getRootElement().querySelector(".columns-container").style.flexDirection="row"})),t.getRootElement().innerHTML="\n ".concat("\n <style>\n :host {\n position: relative;\n min-width: 50px;\n min-height: 50px; \n display:flex;\n }\n\n .columns-container {\n height: auto;\n min-height: 50px; \n width: 100%;\n min-width: 50px;\n display: flex;\n gap: inherit;\n }\n </style>\n ","\n <div ").concat((0,o.vi)("render-outlet"),' class="columns-container"></div>\n '),t}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&&Ct(t,e)}(e,t),function(t,e){return e&&bt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"connectedCallback",value:function(){var t=this;!function(t,e,n){var i=vt(Tt(t.prototype),"connectedCallback",n);return"function"==typeof i?function(t){return i.apply(n,t)}:i}(e,0,this)([]),this.observeProps((function(e,n){t.applyAutoAdaptiveStyles(n.adaptiveStyles,n.styles),t.updateResponsiveStyles()})),this.observeEnvironment((function(e,n){t.updateResponsiveStyles()})),this.subscriptions.push(this.mobileDeviceOrientationListener.on(Ot.changeEventName,(function(){t.updateResponsiveStyles()})))}}])}(ht);St(Nt,"define",{name:"sys-columns",model:i.A.name,manifest:i.A})}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=n(955),o=n(32);function s(t){return s="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},s(t)}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return(e=function(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const c=l(l({},o.A),{},{props:l(l({},o.A.props),{},{isResponsive:!1}),syncEnabled:!0,stylesImitationEnabled:!0});function u(t){return u="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},u(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function m(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y,E,O,g=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,n){return e=d(e),function(t,e){if(e&&("object"==u(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,p()?Reflect.construct(e,n||[],d(t).constructor):e.apply(t,n))}(this,t,arguments)}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&&h(t,e)}(t,i.A),e=t,Object.defineProperty(e,"prototype",{writable:!1}),e;var e}();y=g,E="define",O={name:"sys-columns",model:c.name,manifest:c},(E=m(E))in y?Object.defineProperty(y,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):y[E]=O;export{g as default};window.clComponentClass_SysInAppColumnsComponent=g;
|