@claspo/components 1.2.0-theme.13 → 1.2.0-theme.16
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="cl-";function e(e){return t+e}function s(t){return"cl-"+t}const i="VIEW",n="MODULE",o="CONTAINER",r="INPUT",l="BUTTON",a="CONSENT",c="COLUMN",d="SUBSCRIBE_CONTACT",h="REQUEST",p="SHOW_WIDGET",u="OPEN_LINK",m="CLOSE_WIDGET";class g{static sortActions(t){const e={[m]:-1,[u]:-2,[p]:1,[d]:2,[h]:3},s=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>s(t)>s(e)?-1:s(t)<s(e)?1:0))}constructor(t,e){this.config=t,this.actions=g.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,i){this.state=t;const n=i(),o=n.getAttribute(s("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(s("type"))));let i=0;for(;e[i]&&e[i].getAttribute(s("id"))!==o;){let t=e[i].getAttribute(s("type"));if(g.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;i++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((n.shadowRoot||n).querySelectorAll(this.config.relativeSelector)):[n],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,s,i;try{for(var n,o=!0,r=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,s=t[Symbol.asyncIterator];return s?s.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(s){e[s]=t[s]&&function(e){return new Promise((function(i,n){!function(t,e,s,i){Promise.resolve(i).then((function(e){t({value:e,done:s})}),e)}(i,n,(e=t[s](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(n=await r.next()).done);){i=n.value,o=!1;try{const{event:t}=i;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{o=!0}}}catch(t){e={error:t}}finally{try{o||t||!(s=r.return)||await s.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=[])}}g.IGNORING_VIEW_ENTRY_TYPES=[l,a,r];const b="CLICK",y="COMPONENT_EVENT";class f{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,s){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 v{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 b:return new g(t,e);case y:return new f(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class E{static generate(){let t,e="";for(let s=0;s<32;s++)8!==s&&12!==s&&16!==s&&20!==s||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class S{constructor(){this.listeners=S.createDefaultListenersState()}emit(t,e,s=null){const i=this.listeners[t];i&&Object.values(i).forEach((i=>i(e,t,s))),Object.values(this.listeners["*"]).forEach((i=>i(e,t,s)))}on(t,e){const s=E.generate(),i=this.listeners[t];return i?i[s]=e:this.listeners[t]={[s]:e},{off:()=>{var e,i;(null===(i=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===i?void 0:i[s])&&delete this.listeners[t][s]}}}destroy(){this.listeners=S.createDefaultListenersState()}}S.createDefaultListenersState=()=>({"*":{}});const O=(t,e,s,i)=>{const{addEventListenerBase:n,addEventListener:o}=EventTarget.prototype;(n||o).call(t,e,s,i)};class A{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class C{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===n?Object.assign(Object.assign({},t),C.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})}}C.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class x extends S{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({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";class R{static set(t,e){const s=t[R.accumulatorPropertyName]||{};t[R.accumulatorPropertyName]=Object.assign(Object.assign({},s),e.styleAttributes),Object.keys(t[R.accumulatorPropertyName]).forEach((s=>{s.includes("--")?t.style.setProperty(s,e.styleAttributes[s]||""):t.style[s]=e.styleAttributes[s]?e.styleAttributes[s]:""}))}}R.accumulatorPropertyName="clStyleAttributes";const T="CONTENT_LOCKER";class L{static applyHostStyles(t,e,s=null,n){var r,l,a;const d=null===(l=null===(r=null==s?void 0:s.props)||void 0===r?void 0:r.handlers)||void 0===l?void 0:l.find((t=>"CLICK"===t.type));d&&(null===(a=d.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==i&&t!==o&&t!==c||(e.style.display=n===T&&t===i?"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 P{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}class N{constructor(t,e,s,i,n,o){this.hostElement=e,this.documentModel=t,this.getSharedCb=s,this.getPropsCb=i,this.getEnvCb=n,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,s]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:s.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((s=>{var i,n,o,r,l;const a=null===(n=null===(i=e.adaptiveStyles)||void 0===i?void 0:i[t])||void 0===n?void 0:n.find((t=>t.element===s)),c=(null===(o=e.styles)||void 0===o?void 0:o.find((t=>t.element===s)))||{},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),h=this.parseBackground(d);h.url&&this.envUrlMaps[t].set(s,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,s])=>this.httpClient.execute(s.originalSVGResourceURL).then((t=>t.text())).then((i=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},s),{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),P.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&&(this.hostElement.style.background=this._buildBackgroundUrl(t,e))}_buildBackgroundUrl(t,e){const s=t.inlineSvgString.trim().replace("var(--cl-schema-accent)",e.accent);return`url('data:image/svg+xml,${encodeURIComponent(s)}')${t.positionOptions}`}}const _=new class{execute(t,e,s=null,i,n){const o={method:e,headers:Object.assign({"Content-Type":"text/plain"},i||{}),credentials:"same-origin",body:null,signal:n};return s&&(o.body="string"==typeof s?s:JSON.stringify(s)),fetch(t,o)}};function w(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,s)=>Object.assign(Object.assign({},e),{[s]:t[s]})),{})}class M{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 j{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const k="COMPONENT_RESOURCES_LOADED",F="FAILED_TO_LOAD_COMPONENT_RESOURCE";class I{constructor(t,e,s){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(k,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit(F,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=s,this.counters={pending:new j(this.onCounterStateUpdate)}}}const D=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>D(...t)}},U=D,B="props",W="shared",$="environment";function H(t,e,s,i){const n=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))===s)?o:o&&o.parentNode&&n(o.parentNode)||null;var r};return n(t)}const G="SUBMIT";function V(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((s=>{"element"!==s&&"classes"!==s&&(e[s]&&"object"==typeof e[s]&&!Array.isArray(e[s])?t[s]=Object.assign(Object.assign({},t[s]||{}),e[s]):t[s]=e[s])})),t):t}function z(t,e,s){var i;return null===(i=t[e])||void 0===i?void 0:i.find((t=>t.element===s))}function Q(t){const{element:e,html:s,appendHtml:i}=t,n=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}(s);i?e.innerHTML+=n:e.innerHTML=n}class q extends Event{constructor(t,e,s){super(t,s),this.detail={},Object.defineProperty(this,"detail",{value:e})}}class J extends HTMLElement{constructor(){var i,n;super(),this.construct=()=>{let t;const e=this.getAttribute(s("id")),i=this.getWidgetContainerNode();if(!i)throw new Error("Widget container not found in construct");const n=i.closest(`[${s("widget-id")}]`);let o;n&&(o=n.getAttribute(s("widget-id")));let r=new q("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=U(B,W,$),this.subscriptions=new class{constructor(){this.subscriptions=[]}push(t){this.subscriptions.push(t)}off(){this.subscriptions.forEach((t=>null==t?void 0:t.off()))}},this.state=new A,this.componentEventEmitter=new S,this.componentResourceManager=new I(this.model.id,this.services.eventEmitter,"STATIC"===this.services.config.getConfig("entryModuleType")),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new v(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(B).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),i=s("floating");t.floating&&!e.getAttribute(i)?e.setAttribute(i,"true"):!t.floating&&e.getAttribute(i)&&e.removeAttribute(i)})),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(W).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new N(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(x.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get($).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(B).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(W).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get($).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((i=>e?i.getAttribute(s("element"))===t&&i.id===e:i.getAttribute(s("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const i=this.getElements();if(!i.length)return;t=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const s=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let i=!1,n=!1;s.desktop&&s.desktop.forEach((s=>{s.element===e&&(V(s,t),i=!0)})),s.mobile&&s.mobile.forEach((s=>{s.element===e&&(V(s,t),n=!0)})),!i&&s.desktop&&s.desktop.push(JSON.parse(JSON.stringify(t))),!n&&s.mobile&&s.mobile.push(JSON.parse(JSON.stringify(t)))})),s}(t,e);const n=s("type"),o="element-styles";let r=this.getRootElement().querySelector(`style[${n}="${o}"]`);r||(r=document.createElement("style"),r.setAttribute(n,o),this.getRootElement().appendChild(r)),Q({element:r,html:""}),i.forEach((e=>{let i=e.getAttribute(s("element"));const n=this.getEnvironment();let o=z(t,n,i);if(o){if(this.resizeListener.isMobile()){const e=z(t,"desktop",i);e&&(o=Object.assign(Object.assign({},o),{styleAttributes:Object.assign(Object.assign({},e.styleAttributes),o.styleAttributes)}))}this.applyStylesToElement(e,this.applySharedClassesToElementModel(o),r)}})),this._addLinkColor(r,this.getShared())},this.registerComponentResourceManagement=()=>{this.viewResourceManager.registerComponent(this.model.id,this.componentResourceManager)},this.applyStyles=(t,e={})=>{if(!t||!t.style)return!1;for(const[s,i]of Object.entries(e))t.style[s]=i;return!0},this.applyStylesToElement=(t,e,i)=>{var n,o;const r=[];"host"===(e=J._resolveTogglableStylesForElementModel(e)).element&&(L.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(n=this.model.props.backgroundDynamicInlineSVGElements)||void 0===n?void 0:n.desktop)||"mobile"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.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],O(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),O(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),"UPDATING"===this.services.config.getConfig("entryModuleType")&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:w(e.styleAttributes,r)});if(R.set(t,c),this._setClassAttributes(t,e),i){if(e.hoverStyleAttributes){let n=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 s=t.tagName.toLowerCase(),i=`flip-up-animation-${e.element}`;let o=this.getRootElement().querySelector(`#${i}`);o||(o=document.createElement("style"),o.id=i,t.appendChild(o)),Q({element:o,html:`\n ${s}::before {\n content: '';\n background: ${n.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 ${s}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),n=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}n.borderTopWidth&&"0px"!==n.borderTopWidth||delete n.borderTopColor,n.borderBottomWidth&&"0px"!==n.borderBottomWidth||delete n.borderBottomColor,n.borderLeftWidth&&"0px"!==n.borderLeftWidth||delete n.borderLeftColor,n.borderRightWidth&&"0px"!==n.borderRightWidth||delete n.borderRightColor,this._addStylesToStyleElement(i,e.element,n,`:not(.${s("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(i,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(i,this.getShared()),this.stylesAppliedToElement(t,e,i)}},this._fixMarginOverflow=t=>{const e=this.getParentComponent(),i=e&&("flex"===e.style.display||"inline-flex"===e.style.display),n="host",o=t.getAttribute(s("element"))===n;if(!i||!o)return;const r=this.getProps(),l=this.getEnvironment(),{styleAttributes:a}=z(r.adaptiveStyles,l,n)||{};if(!a)return;const c=a.marginLeft||a.marginRight,d="100%"===a.width;if(c&&d){const e=(parseFloat(a.marginLeft)||0)+(parseFloat(a.marginRight)||0);e&&setTimeout((()=>{t.style.width=`calc(100% - ${e}px)`}))}},this.applySharedClassesToElementModel=e=>function(e,s){let i=e;return(i.classes||"").split(" ").filter((e=>e.startsWith(t))).forEach((t=>{var e;let n=null===(e=s.textClasses)||void 0===e?void 0:e[t];n&&(n.styleAttributes.fontFamily||(n.isHeader&&s.headerFontFamily&&(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:s.headerFontFamily})})),!n.isHeader&&s.textFontFamily&&(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:s.textFontFamily})}))),i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),n.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},i.placeholderStyleAttributes),n.placeholderStyleAttributes)}))})),i.styleAttributes.fontFamily||(i=Object.assign(Object.assign({},i),{styleAttributes:Object.assign(Object.assign({},i.styleAttributes),{fontFamily:s.textFontFamily})})),i}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,i,n="",o)=>{const r=Object.keys(i).reduce(((t,e)=>t+` ${M.camelCaseToDashCase(e)}: ${i[e]}${o?" !important;":";"}`),"");Q({element:t,html:`[${s("element")}="${e}"]${n} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{Q({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var s,i,n,o;e.linkColor&&Q({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(s=e.linkParams)||void 0===s?void 0:s.color)&&Q({element:t,html:`a {color: ${null===(i=e.linkParams)||void 0===i?void 0:i.color}}, a:visited {color: ${null===(n=e.linkParams)||void 0===n?void 0:n.color}}`,appendHtml:!0}),(null===(o=e.linkParams)||void 0===o?void 0:o.removeUnderline)&&Q({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(s,i)=>{Array.from(s.classList).filter((t=>t!==e("hovered")&&t!==e("focused"))).forEach((e=>{e.startsWith(t)&&s.classList.remove(e)}));const n=((s.getAttribute("class")||"")+" "+i.classes).trim();s.setAttribute("class",n)},this.getParentComponent=()=>H(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:H(this.parentNode,s("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>{return[(t=this.services.config).getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t));var t},this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,s)=>{if(e)return e;const i=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const s=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[s]?{translations:e[s],language:s}:null}(s,t);return i||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,s)=>{},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,s;const i=t.control.name;if(["email","first_name","last_name"].includes(i))return i.toUpperCase();if(t.content.label&&(null===(s=null===(e=t.adaptiveStyles.desktop.find((t=>"label"===t.element)))||void 0===e?void 0:e.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 t.content.placeholder?this.capitalizeFirstLetter(t.content.placeholder):t.control.integrationName?this.capitalizeFirstLetter(t.control.integrationName).replace(new RegExp("_","g")," "):void 0},this.capitalizeFirstLetter=t=>t.charAt(0).toUpperCase()+t.slice(1),this.getContextRecordExampleValue=t=>{switch(t.control.name){case"email":return"myemail@example.com";case"first_name":return"Maria";case"last_name":return"Taylor";default:return this.getContextRecordLabel(t)}},this.completeSubmitAction=t=>{const e=t||{},s=this.services.actionRegister.getRegisteredActions().find((t=>t.category===G));s?null==s||s.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:h}).execute(void 0,void 0,!0,e)},this.getHandlers=()=>this.getProps().handlers&&this.getProps().handlers.length?[...this.getProps().handlers]:[],this.assets=(t="")=>`${this.services.config.getConfig("staticResourcesUrl").replace(/\/$/,"")}/${this.manifest.name}/assets${t?`/${t}`:""}`,this.attachShadow({mode:"open"}),this.manifest=this.manifest||(null===(i=this.define)||void 0===i?void 0:i.manifest)||(null===(n=this.constructor.define)||void 0===n?void 0:n.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=J._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),s=(t,s,i)=>{s in e&&(t.forEach((t=>{t in e&&(e[t]=e[s]?e[t]:i)})),delete e[s])};return s(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),s(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const K={name:"SysSlideComponent",componentType:"SLIDE",version:"1.0.0",focusParentOnClick:!0,preventDraggable:!0,propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0,params:{indentationType:"PADDING"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0,params:{indentationType:"PADDING"}}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["handlers,[id],actions,[id],params,link"],props:{content:{name:null},styles:[{element:"host",styleAttributes:{background:"#FFFFFF"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{display:"inline-flex",position:"relative",width:"100%",minWidth:null,height:"auto",minHeight:null,overflow:"hidden",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"20px",paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,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",boxShadow:"none"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:null,height:"auto",minHeight:null,overflow:"hidden",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"20px",paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,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",boxShadow:"none"},classes:""}]}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"],["styles","styleAttributes","background"]],metaDescription:{label:{en:"Slide",ru:"Слайд",uk:"Слайд",es:"Diapositiva",fr:"Diapositive",de:"Slide",it:"Slide",pt:"Diapositivo",ro:"Slide",bg:"Слайд",cs:"Slide",el:"Slide",nl:"Slide",pl:"Slajd",sv:"Slide",tr:"Slide",ar:"Slide",zh:"Slide",da:"Slide",he:"Slide",fi:"Slide",hi:"Slide",hr:"Slide",hu:"Slide",id:"Slide",ja:"Slide",ko:"Slide",no:"Slide",sk:"Slide",sl:"Slide",sr:"Slide"}}};function Y(t){return Y="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},Y(t)}function Z(t,e){for(var s=0;s<e.length;s++){var i=e[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,nt(i.key),i)}}function X(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(X=function(){return!!t})()}function tt(){return tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,s){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=et(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:s):n.value}},tt.apply(null,arguments)}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}function it(t,e,s){return(e=nt(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function nt(t){var e=function(t){if("object"!=Y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=Y(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Y(e)?e:e+""}var ot=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),it(e=function(t,e,s){return e=et(e),function(t,e){if(e&&("object"==Y(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,X()?Reflect.construct(e,s||[],et(t).constructor):e.apply(t,s))}(this,t),"manifest",K),e.getRootElement().innerHTML="\n <style>\n :host {\n position: relative;\n flex: 0 0 100%;\n min-width: 20px;\n min-height: 20px;\n }\n </style>\n ",e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}(t,J),e=t,s=[{key:"connectedCallback",value:function(){var e,s,i,n=this;(e=t,s=this,"function"==typeof(i=tt(et(1&3?e.prototype:e),"connectedCallback",s))?function(t){return i.apply(s,t)}:i)([]),this.observeProps((function(t,e){n.applyAutoAdaptiveStyles(e.adaptiveStyles,e.styles)}))}}],s&&Z(e.prototype,s),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,s}();it(ot,"define",{name:"sys-slide",model:K.name,manifest:K});export{ot as default};window.clComponentClass_SysSlideComponent=ot;
|
|
1
|
+
const t="cl-";function e(e){return t+e}function i(t){return"cl-"+t}const s="VIEW",n="MODULE",o="CONTAINER",r="INPUT",l="BUTTON",a="CONSENT",c="COLUMN",d="SUBSCRIBE_CONTACT",h="REQUEST",u="SHOW_WIDGET",p="OPEN_LINK",m="CLOSE_WIDGET";class g{static sortActions(t){const e={[m]:-1,[p]:-2,[u]:1,[d]:2,[h]:3},i=t=>void 0!==e[t.type]?e[t.type]:0;return[...t].sort(((t,e)=>i(t)>i(e)?-1:i(t)<i(e)?1:0))}constructor(t,e){this.config=t,this.actions=g.sortActions(e),this.listener=null,this.targetElements=[],this.eventsQueue=[],this.state=null,this.postponed=!1}activate(t,e,s){this.state=t;const n=s(),o=n.getAttribute(i("id"));this.listener=t=>{const e=t.composedPath().filter((t=>t instanceof HTMLElement&&t.getAttribute(i("type"))));let s=0;for(;e[s]&&e[s].getAttribute(i("id"))!==o;){let t=e[s].getAttribute(i("type"));if(g.IGNORING_VIEW_ENTRY_TYPES.includes(t))return;s++}this.eventsQueue.push({event:t}),this.postponed||this.execute()},this.targetElements=this.config.relativeSelector?Array.from((n.shadowRoot||n).querySelectorAll(this.config.relativeSelector)):[n],this.targetElements.forEach((t=>{t.addEventListener("click",this.listener)}))}async execute(){var t,e,i,s;try{for(var n,o=!0,r=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(i){e[i]=t[i]&&function(e){return new Promise((function(s,n){!function(t,e,i,s){Promise.resolve(s).then((function(e){t({value:e,done:i})}),e)}(s,n,(e=t[i](e)).done,e.value)}))}}}(this.eventsQueue);!(t=(n=await r.next()).done);){s=n.value,o=!1;try{const{event:t}=s;for(const e of this.actions)if(!await e.execute(this.state.getState(),t))break}finally{o=!0}}}catch(t){e={error:t}}finally{try{o||t||!(i=r.return)||await i.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=[])}}g.IGNORING_VIEW_ENTRY_TYPES=[l,a,r];const b="CLICK",y="COMPONENT_EVENT";class f{constructor(t,e){this.config=t,this.actions=e,this.componentEmitterListener=null}activate(t,e,i){this.componentEmitterListener=e.on(this.config.eventName,(()=>{this.actions.forEach((e=>e.execute(t.getState(),this.config.params)))}))}destroy(){this.componentEmitterListener&&this.componentEmitterListener.off()}}class v{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 b:return new g(t,e);case y:return new f(t,e);default:throw new Error(`Not supported handler type ${t.type}`)}}}class E{static generate(){let t,e="";for(let i=0;i<32;i++)8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),t=Math.floor(16*Math.random()).toString(16).toUpperCase(),e+=t;return e}}class S{constructor(){this.listeners=S.createDefaultListenersState()}emit(t,e,i=null){const s=this.listeners[t];s&&Object.values(s).forEach((s=>s(e,t,i))),Object.values(this.listeners["*"]).forEach((s=>s(e,t,i)))}on(t,e){const i=E.generate(),s=this.listeners[t];return s?s[i]=e:this.listeners[t]={[i]:e},{off:()=>{var e,s;(null===(s=null===(e=this.listeners)||void 0===e?void 0:e[t])||void 0===s?void 0:s[i])&&delete this.listeners[t][i]}}}destroy(){this.listeners=S.createDefaultListenersState()}}S.createDefaultListenersState=()=>({"*":{}});const O=(t,e,i,s)=>{const n=EventTarget.prototype,{addEventListenerBase:o,addEventListener:r}=n;(o||r).call(t,e,i,s)};class T{constructor(t){this.state=t||{}}getState(){return this.state}setState(t){this.state=Object.assign(Object.assign({},this.state),t)}destroy(){}}class C{static extract(t){const e=t.views.map((t=>{const e=t.children.map((t=>t.type===n?Object.assign(Object.assign({},t),C.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})}}C.moduleToContainerParams={name:"SysContainerComponent",version:"1.0.0"};class A extends S{constructor(t,e){super(),this.config=e,this.handleMobileBreakpoint(t.getShared().mobileBreakpointWidth),t.on("ENVIRONMENT_UPDATE",(({isMobileEnv:t})=>{this._isMobile=t,this.emit(A.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(A.changeEventName,this._isMobile)}isMobile(){return this.config.forceMobileEnv||this._isMobile}listener(t){this._isMobile=t.matches,this.emit(A.changeEventName,this._isMobile)}destroy(){super.destroy(),this.mediaQueryList.removeListener(this.listener.bind(this))}}A.changeEventName="CHANGE";class R{static set(t,e){const i=t[R.accumulatorPropertyName]||{};t[R.accumulatorPropertyName]=Object.assign(Object.assign({},i),e.styleAttributes),Object.keys(t[R.accumulatorPropertyName]).forEach((i=>{i.includes("--")?t.style.setProperty(i,e.styleAttributes[i]||""):t.style[i]=e.styleAttributes[i]?e.styleAttributes[i]:""}))}}R.accumulatorPropertyName="clStyleAttributes";const L="CONTENT_LOCKER";class x{static applyHostStyles(t,e,i=null,n){var r,l,a;const d=null===(l=null===(r=null==i?void 0:i.props)||void 0===r?void 0:r.handlers)||void 0===l?void 0:l.find((t=>"CLICK"===t.type));d&&(null===(a=d.actions)||void 0===a?void 0:a.length)&&(e.style.cursor="pointer"),t!==s&&t!==o&&t!==c||(e.style.display=n===L&&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 N{static log(t){window.scriptLog09u8y9?scriptLog09u8y9("ERROR","RUNTIME_ERROR",new Error(t)):console.error(t)}}var _,P,M,w,j,k,I;(_||(_={})).ACCENT="accent",(M=P||(P={})).TOP="TOP",M.CENTER="CENTER",M.BOTTOM="BOTTOM",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"}(j||(j={})),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"}(k||(k={})),function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(I||(I={}));class F{constructor(t,e,i,s,n,o){this.hostElement=e,this.documentModel=t,this.getSharedCb=i,this.getPropsCb=s,this.getEnvCb=n,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,i]=e.split("(")[1].split(")");return{url:t.replace(/['"]+/g,""),positionOptions:i.replace(";","")}}return{url:null,positionOptions:null}}apply(t){const e=this.getPropsCb();return e.backgroundDynamicInlineSVGElements[t].forEach((i=>{var s,n,o,r,l;const a=null===(n=null===(s=e.adaptiveStyles)||void 0===s?void 0:s[t])||void 0===n?void 0:n.find((t=>t.element===i)),c=(null===(o=e.styles)||void 0===o?void 0:o.find((t=>t.element===i)))||{},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),h=this.parseBackground(d);h.url&&this.envUrlMaps[t].set(i,{originalSVGResourceURL:h.url,inlineSvgString:null,positionOptions:h.positionOptions})})),Promise.all([...this.envUrlMaps[t].entries()].map((([e,i])=>this.httpClient.execute(i.originalSVGResourceURL).then((t=>t.text())).then((s=>{this.envUrlMaps[t].set(e,Object.assign(Object.assign({},i),{inlineSvgString:s}))}))))).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),N.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 i=t.inlineSvgString.trim().replace(`var(--cl-schema-${_.ACCENT})`,e[_.ACCENT]);return`url('data:image/svg+xml,${encodeURIComponent(i)}')${t.positionOptions}`}off(){var t;null===(t=this.subscription)||void 0===t||t.off()}}const B=new class{execute(t,e="GET",i=null,s,n){const o={method:e,headers:Object.assign({"Content-Type":"text/plain"},s||{}),credentials:"same-origin",body:null,signal:n};return i&&(o.body="string"==typeof i?i:JSON.stringify(i)),fetch(t,o)}};function D(t,e){return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,i)=>Object.assign(Object.assign({},e),{[i]:t[i]})),{})}class U{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 W{constructor(t){this._count=0,this.onUpdateCb=t}increment(){this._count++,this.onUpdateCb(this.count())}decrement(){this._count>0&&this._count--,this.onUpdateCb(this.count())}count(){return this._count}}const H="COMPONENT_RESOURCES_LOADED",$="FAILED_TO_LOAD_COMPONENT_RESOURCE";class G{constructor(t,e,i){this.getPending=()=>this.counters.pending,this.onCounterStateUpdate=t=>{0===t&&this.systemEventEmitter.emit(H,this.componentId)},this.onResourceLoadFailure=t=>{this.isStaticEntryModule?this.systemEventEmitter.emit($,`Failed to load: ${t}`):this.counters.pending.decrement()},this.componentId=t,this.systemEventEmitter=e,this.isStaticEntryModule=i,this.counters={pending:new W(this.onCounterStateUpdate)}}}const V=(...t)=>{let e=t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:[]})),{});return{get:t=>e[t],clear:()=>V(...t)}},z=V,K="props",J="shared",Q="environment";function q(t,e,i,s){const n=t=>{let o=t instanceof DocumentFragment||(null==t?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?t.host:t;return o&&(s&&"function"==typeof s?s(o.getAttribute(e)):(null===(r=null==o?void 0:o.getAttribute)||void 0===r?void 0:r.call(o,e))===i)?o:o&&o.parentNode&&n(o.parentNode)||null;var r};return n(t)}const Y="SUBMIT";function Z(t,e){return e?(t.classes=`${t.classes||""} ${e.classes||""}`.trim(),Object.keys(e).forEach((i=>{if("element"===i||"classes"===i)return;const s=e[i];s&&"object"==typeof s&&!Array.isArray(s)?t[i]=Object.assign(Object.assign({},t[i]||{}),s):t[i]=s})),t):t}function X(t,e,i){var s;return null===(s=null==t?void 0:t[e])||void 0===s?void 0:s.find((t=>t.element===i))}function tt(t){const{element:e,html:i,appendHtml:s}=t,n=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}(i);s?e.innerHTML+=n:e.innerHTML=n}class et extends Event{constructor(t,e,i){super(t,i),this.detail={},Object.defineProperty(this,"detail",{value:e})}}const it="STATIC",st="UPDATING";class nt extends HTMLElement{constructor(){var s,n;super(),this.construct=()=>{let t;const e=this.getAttribute(i("id")),s=this.getWidgetContainerNode();if(!s)throw new Error("Widget container not found in construct");const n=s.closest(`[${i("widget-id")}]`);let o;n&&(o=n.getAttribute(i("widget-id")));let r=new et("cl-props-request",{nodeName:this.nodeName,path:this.getAttribute(i("path")),id:e,widgetId:o},{bubbles:!0,composed:!0});this.dispatchEvent(r),t=r.detail.props,Object.assign(this,t),this.observers=z(K,J,Q),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 T({}),this.componentEventEmitter=new S,this.componentResourceManager=new G(this.model.id,this.services.eventEmitter,this.isStaticRenderMode),this.mergeTagsProcessor=this.services.mergeTagsProcessorFactory.create(),this._actionFactory=this.services.actionFactory,this._handlerFactory=new v(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(K).forEach((e=>e(this.prevProps,t))),this.prevProps=t;const e=this.getHostElement(),s=i("floating");t.floating&&!e.getAttribute(s)?e.setAttribute(s,"true"):!t.floating&&e.getAttribute(s)&&e.removeAttribute(s)})),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(J).forEach((t=>t(this.getShared())))})),this.model.props.backgroundDynamicInlineSVGElements&&(this.colorSchemaListener=new F(this.documentModel,this.getHostElement(),(()=>this.getShared()),(()=>this.model.props),(()=>this.getEnvironment()),B),this.colorSchemaListener.apply(this.getEnvironment()).then((()=>{this.subscriptions.push(this.colorSchemaListener.on())}))),this.prevProps.adaptiveStyles&&this.subscriptions.push(this.resizeListener.on(A.changeEventName,(()=>{this.applyAutoAdaptiveStyles(this.prevProps.adaptiveStyles,this.prevProps.styles);const t=this.getEnvironment();this.observers.get(Q).forEach((e=>e(this.prevEnvironment,t))),this.prevEnvironment=t})))},this.attachHandlers=()=>{this.getHandlers().map((t=>this._handlerFactory.get(t))).map((t=>()=>t.activate(this.state,this.componentEventEmitter,this.getHostElement.bind(this)))).forEach((t=>t()))},this.postponeHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.postpone()))},this.releaseHandlers=()=>{var t;null===(t=this.handlers)||void 0===t||t.forEach((t=>t.release()))},this.getProps=()=>{var t;return null===(t=this.getModel())||void 0===t?void 0:t.props},this.getShared=()=>this.documentModel.getShared(),this.getEnvironment=()=>this.resizeListener.isMobile()?"mobile":"desktop",this.getRootElement=()=>this.shadowRoot?this.shadowRoot:this,this.getHostElement=()=>this,this.observeProps=t=>{this.observers.get(K).push(t),t(null,this.prevProps)},this.observeShared=t=>{this.observers.get(J).push(t),t(this.getShared())},this.observeEnvironment=t=>{this.observers.get(Q).push(t),t(null,this.getEnvironment())},this.getElements=()=>[this.getHostElement(),...Array.from(this.getRootElement().querySelectorAll(`[${i("element")}]`)).filter((t=>!t.hasAttribute(i("component"))))],this.getElement=(t,e)=>this.getElements().find((s=>e?s.getAttribute(i("element"))===t&&s.id===e:s.getAttribute(i("element"))===t)),this.applyAutoAdaptiveStyles=(t,e)=>{if(!t&&!e)return;const s=this.getElements();if(!s.length)return;const n=function(t,e){if(!e)return t||{desktop:[],mobile:[]};const i=JSON.parse(JSON.stringify(t||{desktop:[],mobile:[]}));return e.forEach((t=>{const e=t.element;let s=!1,n=!1;i.desktop&&i.desktop.forEach((i=>{i.element===e&&(Z(i,t),s=!0)})),i.mobile&&i.mobile.forEach((i=>{i.element===e&&(Z(i,t),n=!0)})),!s&&i.desktop&&i.desktop.push(JSON.parse(JSON.stringify(t))),!n&&i.mobile&&i.mobile.push(JSON.parse(JSON.stringify(t)))})),i}(t,e),o=i("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)),tt({element:l,html:""}),s.forEach((t=>{let e=t.getAttribute(i("element"));const s=this.getEnvironment();let o=X(n,s,e);if(o){if(this.resizeListener.isMobile()){const t=X(n,"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[i,s]of Object.entries(e))t.style[i]=s;return!0},this.applyStylesToElement=(t,e,s)=>{var n,o;const r=[];"host"===(e=nt._resolveTogglableStylesForElementModel(e)).element&&(x.applyHostStyles(this.model.type,t,null,this.layoutType),("desktop"===this.getEnvironment()&&(null===(n=this.model.props.backgroundDynamicInlineSVGElements)||void 0===n?void 0:n.desktop)||"mobile"===this.getEnvironment()&&(null===(o=this.model.props.backgroundDynamicInlineSVGElements)||void 0===o?void 0:o.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],O(t,"load",(()=>{this.componentResourceManager.getPending().decrement()})),O(t,"error",(()=>{this.componentResourceManager.onResourceLoadFailure(t.src),this.isUpdatingRenderMode&&this.componentResourceManager.getPending().decrement()}))}const c=Object.assign(Object.assign({},e),{styleAttributes:D(e.styleAttributes,r)});if(R.set(t,c),this._setClassAttributes(t,e),s){if(e.hoverStyleAttributes){let n=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 i=t.tagName.toLowerCase(),s=`flip-up-animation-${e.element}`;let o=this.getRootElement().querySelector(`#${s}`);o||(o=document.createElement("style"),o.id=s,t.appendChild(o)),tt({element:o,html:`\n ${i}::before {\n content: '';\n background: ${n.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 ${i}:hover::before {\n top: 0;\n transition: 0.3s;\n }\n `}),n=Object.assign(Object.assign({},e.hoverStyleAttributes),{background:"transparent",position:"relative"})}n.borderTopWidth&&"0px"!==n.borderTopWidth||delete n.borderTopColor,n.borderBottomWidth&&"0px"!==n.borderBottomWidth||delete n.borderBottomColor,n.borderLeftWidth&&"0px"!==n.borderLeftWidth||delete n.borderLeftColor,n.borderRightWidth&&"0px"!==n.borderRightWidth||delete n.borderRightColor,this._addStylesToStyleElement(s,e.element,n,`:not(.${i("no-hover")}):hover`,!0)}e.placeholderStyleAttributes&&this._addStylesToStyleElement(s,e.element,e.placeholderStyleAttributes,"::placeholder"),this._addFontStylesToStyleElement(s,this.getShared()),this.stylesAppliedToElement(t,e,s)}},this.applySharedClassesToElementModel=e=>function(e,i){let s=e;return(s.classes||"").split(" ").filter((e=>e.startsWith(t))).forEach((t=>{var e;let n=null===(e=i.textClasses)||void 0===e?void 0:e[t];n&&(n.styleAttributes.fontFamily||(n.isHeader&&i.headerFontFamily&&(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:i.headerFontFamily})})),!n.isHeader&&i.textFontFamily&&(n=Object.assign(Object.assign({},n),{styleAttributes:Object.assign(Object.assign({},n.styleAttributes),{fontFamily:i.textFontFamily})}))),s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),n.styleAttributes),placeholderStyleAttributes:Object.assign(Object.assign({},s.placeholderStyleAttributes),n.placeholderStyleAttributes)}))})),s.styleAttributes.fontFamily||(s=Object.assign(Object.assign({},s),{styleAttributes:Object.assign(Object.assign({},s.styleAttributes),{fontFamily:i.textFontFamily})})),s}(e,this.documentModel.getShared()),this.getModel=()=>this.model,this._addStylesToStyleElement=(t,e,s,n="",o)=>{const r=Object.keys(s).reduce(((t,e)=>t+` ${U.camelCaseToDashCase(e)}: ${s[e]}${o?" !important;":";"}`),"");tt({element:t,html:`[${i("element")}="${e}"]${n} { ${r} }`,appendHtml:!0})},this._addFontStylesToStyleElement=(t,e)=>{tt({element:t,html:`[cl-type] {font-family:${e.textFontFamily||"inherit"}}`,appendHtml:!0})},this._addLinkColor=(t,e)=>{var i,s,n,o;e.linkColor&&tt({element:t,html:`a {color: ${e.linkColor}}, a:visited {color: ${e.linkColor}}`,appendHtml:!0}),(null===(i=e.linkParams)||void 0===i?void 0:i.color)&&tt({element:t,html:`a {color: ${null===(s=e.linkParams)||void 0===s?void 0:s.color}}, a:visited {color: ${null===(n=e.linkParams)||void 0===n?void 0:n.color}}`,appendHtml:!0}),(null===(o=e.linkParams)||void 0===o?void 0:o.removeUnderline)&&tt({element:t,html:"a {text-decoration: none}, a:visited {text-decoration: none}",appendHtml:!0})},this._setClassAttributes=(i,s)=>{Array.from(i.classList).filter((t=>t!==e("hovered")&&t!==e("focused"))).forEach((e=>{e.startsWith(t)&&i.classList.remove(e)}));const n=((i.getAttribute("class")||"")+" "+s.classes).trim();i.setAttribute("class",n)},this.getParentComponent=()=>q(this.parentNode,i("element"),"host"),this.getWidgetContainerNode=()=>{const t=null==this?void 0:this.getAttribute(i("path"));return t&&1===t.split(",").length?this.parentNode:q(this.parentNode,i("path"),void 0,(t=>t&&1===t.split(",").length))},this.getWidgetLanguages=()=>{return[(t=this.services.config).getConfig("appearanceLanguage"),t.getConfig("browserLanguage"),"en"].filter((t=>!!t));var t},this.getPreferredWidgetLanguage=()=>this.getWidgetLanguages()[0],this.getTranslationsMap=t=>function(t,e){return e.reduce(((e,i)=>{if(e)return e;const s=function(t,e){if(!t)return null;if(e[t])return{translations:e[t],language:t};const i=function(t){return t.includes("-")?t.split("-")[0].toLowerCase():t.includes("_")?t.split("_")[0].toLowerCase():t}(t);return e[i]?{translations:e[i],language:i}:null}(i,t);return s||null}),null)}(t,this.getWidgetLanguages()),this.stylesAppliedToElement=(t,e,i)=>{},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,i,s,n,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===(n=null===(s=null===(i=t.adaptiveStyles)||void 0===i?void 0:i.desktop.find((t=>"label"===t.element)))||void 0===s?void 0:s.params)||void 0===n?void 0:n.enabled)){const e=(new DOMParser).parseFromString(t.content.label,"text/html");return this.capitalizeFirstLetter(e.body.textContent||"")}return(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||{},i=this.services.actionRegister.getRegisteredActions().find((t=>t.category===Y));i?null==i||i.execute(void 0,void 0,!0,e):this.services.actionFactory.get({type:h}).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===(s=this.define)||void 0===s?void 0:s.manifest)||(null===(n=this.constructor.define)||void 0===n?void 0:n.manifest)}connectedCallback(){this.construct(),this.registerComponentResourceManagement(),Promise.resolve().then((()=>{this.attachHandlers()}))}disconnectedCallback(){var t;this.observers.clear(),this.subscriptions.off(),this.state.destroy(),this.componentEventEmitter.destroy(),null===(t=this.mergeTagsProcessor)||void 0===t||t.destroy()}get isStaticRenderMode(){return this.services.config.getConfig("renderMode")===it}get isUpdatingRenderMode(){return this.services.config.getConfig("renderMode")===st}static _resolveTogglableStylesForElementModel(t){const e=Object.assign({},t);return Object.keys(e).forEach((t=>{t.toLowerCase().includes("styleattributes")&&(e[t]=nt._resolveTogglableStyles(e[t]))})),e}static _resolveTogglableStyles(t){const e=Object.assign({},t),i=(t,i,s)=>{i in e&&(t.forEach((t=>{t in e&&(e[t]=e[i]?e[t]:s)})),delete e[i])};return i(["marginTop","marginBottom","marginLeft","marginRight"],"_marginEnabled","0px"),i(["paddingTop","paddingBottom","paddingLeft","paddingRight"],"_paddingEnabled","0px"),e}}const ot={name:"SysSlideComponent",componentType:"SLIDE",version:"1.0.0",focusParentOnClick:!0,preventDraggable:!0,propertyPaneModel:{content:[{type:"GROUP",propPath:["adaptiveStyles","desktop"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0,params:{indentationType:"PADDING"}}]},{type:"GROUP",propPath:["adaptiveStyles","mobile"],children:[{type:"CONTROL",name:"ALIGNMENT",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0},{type:"CONTROL",name:"BACKGROUND",propPath:["styles","[element=host]","styleAttributes"],hideSyncSelect:!0},{type:"CONTROL",name:"INDENTATION",elementProp:"styleAttributes",element:"host",hideSyncSelect:!0,params:{indentationType:"PADDING"}}]}],general:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!0}}]},events:{dispatch:[],listen:[]},i18nPropertyPaneModel:{content:[{type:"CONTROL",name:"ACTIONS",propPath:["handlers"],params:{origin:!1}}]},i18nPropPaths:["handlers,[id],actions,[id],params,link"],props:{content:{name:null},styles:[{element:"host",styleAttributes:{background:"#FFFFFF"},classes:""}],adaptiveStyles:{desktop:[{element:"host",styleAttributes:{display:"inline-flex",position:"relative",width:"100%",minWidth:null,height:"auto",minHeight:null,overflow:"hidden",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"20px",paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,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",boxShadow:"none"},classes:""}],mobile:[{element:"host",styleAttributes:{position:"relative",width:"100%",minWidth:null,height:"auto",minHeight:null,overflow:"hidden",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"20px",paddingTop:"0px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",_paddingEnabled:!1,marginTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",_marginEnabled:!1,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",boxShadow:"none"},classes:""}]}},waitForResourcesLoad:!0,resourcesPropPaths:[["adaptiveStyles",":ENV","styleAttributes","background"],["styles","styleAttributes","background"]],metaDescription:{label:{en:"Slide",ru:"Слайд",uk:"Слайд",es:"Diapositiva",fr:"Diapositive",de:"Slide",it:"Slide",pt:"Diapositivo",ro:"Slide",bg:"Слайд",cs:"Slide",el:"Slide",nl:"Slide",pl:"Slajd",sv:"Slide",tr:"Slide",ar:"Slide",zh:"Slide",da:"Slide",he:"Slide",fi:"Slide",hi:"Slide",hr:"Slide",hu:"Slide",id:"Slide",ja:"Slide",ko:"Slide",no:"Slide",sk:"Slide",sl:"Slide",sr:"Slide"}}};function rt(t){return rt="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},rt(t)}function lt(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,pt(s.key),s)}}function at(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(at=function(){return!!t})()}function ct(){return ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var s=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=dt(t)););return t}(t,e);if(s){var n=Object.getOwnPropertyDescriptor(s,e);return n.get?n.get.call(arguments.length<3?t:i):n.value}},ct.apply(null,arguments)}function dt(t){return dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dt(t)}function ht(t,e){return ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ht(t,e)}function ut(t,e,i){return(e=pt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function pt(t){var e=function(t){if("object"!=rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=rt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rt(e)?e:e+""}var mt=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ut(e=function(t,e,i){return e=dt(e),function(t,e){if(e&&("object"==rt(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,at()?Reflect.construct(e,i||[],dt(t).constructor):e.apply(t,i))}(this,t),"manifest",ot),e.getRootElement().innerHTML="\n <style>\n :host {\n position: relative;\n flex: 0 0 100%;\n min-width: 20px;\n min-height: 20px;\n }\n </style>\n ",e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ht(t,e)}(t,nt),e=t,i=[{key:"connectedCallback",value:function(){var e=this;!function(t,e,i){var s=ct(dt(t.prototype),"connectedCallback",i);return"function"==typeof s?function(t){return s.apply(i,t)}:s}(t,0,this)([]),this.observeProps((function(t,i){e.applyAutoAdaptiveStyles(i.adaptiveStyles,i.styles)}))}}],i&<(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();ut(mt,"define",{name:"sys-slide",model:ot.name,manifest:ot});export{mt as default};window.clComponentClass_SysSlideComponent=mt;
|