@everymatrix/general-about-us 1.85.16 → 1.85.18
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.
|
@@ -57,6 +57,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
57
57
|
* @param {string} clientStylingUrl The URL of the style content
|
|
58
58
|
*/
|
|
59
59
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
60
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
61
|
+
|
|
60
62
|
const url = new URL(clientStylingUrl);
|
|
61
63
|
|
|
62
64
|
fetch(url.href)
|
|
@@ -53,6 +53,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
53
53
|
* @param {string} clientStylingUrl The URL of the style content
|
|
54
54
|
*/
|
|
55
55
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
56
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
57
|
+
|
|
56
58
|
const url = new URL(clientStylingUrl);
|
|
57
59
|
|
|
58
60
|
fetch(url.href)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as n}from"./index-86b7910e.js";const i={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."}};function o(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function r(e,t){const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const s=class{constructor(n){e(this,n),this.handleClick=(e,t,n,i)=>{window.postMessage({type:"NavigateTo",path:e,target:t,locations:n,externalLink:i||!1},window.location.href),"function"==typeof gtag&>ag("event","GeneralAboutUs",{context:"AboutUsContent"})},this.setImage=e=>{let t="";switch(this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,n=screen.availHeight;if(e.includes("iphone"))return"mobile";if(e.includes("android")){if(n>t&&t<800)return"mobile";if(t>n&&n<800)return"tablet"}return"desktop"}(),this.device){case"mobile":t=e.imageMobile;break;case"tablet":t=e.imageTablet;break;case"desktop":t=e.imageDesktop}return t},this.formatTitle=(e,n)=>{let i,o;if(["zh","ja","th"].includes(n))i=e.substring(0,1),o=e.substring(1);else{const t=e.split(" ");i=t.shift(),o=t.join(" ")}return t("div",{class:"Title"},t("span",{class:"FirstWord"},i," "),t("span",null,o))},this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.hasErrors=!1,this.isLoading=!0,this.device=""}watchEndpoint(e,t){e&&e!=t&&this.cmsEndpoint&&this.getAboutUs()}handleClientStylingChange(e,t){e!=t&&o(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getAboutUs()}componentDidLoad(){this.device=function(){const e=navigator.userAgent.toLowerCase();let t="";return t=e.includes("android")||e.includes("iphone")||e.includes("ipad")?function(){const e=screen.availWidth;return e<600?"mobile":e>=600&&e<1100?"tablet":void 0}():"desktop",t}(),this.stylingContainer&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getAboutUs(){let e=new URL(`${this.cmsEndpoint}/${this.language}/homepage`);return e.searchParams.append("env",this.cmsEnv),e.searchParams.append("userRoles",this.userRoles),e.searchParams.append("device",(()=>{const e=(()=>{let e=window.navigator.userAgent.toLocaleLowerCase();return e.includes("android/i")?"android":e.includes("iphone/i")?"iPhone":e.includes("ipad/i")||e.includes("ipod/i")?"iPad":"PC"})();if(e)return"PC"===e?"dk":"mtWeb"})()),new Promise(((t,n)=>{this.isLoading=!0,fetch(e.href).then((e=>e.json())).then((e=>{const n=["title","description","images","button","externalLink","targetType","locations"],i=Object.entries(e).filter((([e])=>n.includes(e))).reduce(((e,[t,n])=>(e[t]=n,e)),{});this.aboutUsData=i,t(i)})).catch((e=>{console.error(e),this.hasErrors=!0,n(e)})).finally((()=>{this.isLoading=!1}))}))}render(){var e,n,o,r,s,a;return t("div",{key:"e7953832b9bc914b0fb770695c3550912e9e6406",ref:e=>this.stylingContainer=e},this.hasErrors?t("div",{class:"AboutUsError"},t("div",{class:"ErrorInfo"},i[void 0!==(a=this.language)&&a in i?a:"en"].error)):this.isLoading?t("div",{class:"LoadingSkeleton"},t("ui-skeleton",{structure:"title",height:"60px",widget:"150px"}),t("ui-skeleton",{structure:"text",rows:"3",height:"16px",width:"60%"}),t("ui-skeleton",{structure:"rectangle",width:"100px",height:"40px"})):t("div",{class:"AboutUsWrapper"},t("div",{class:"ItemImage"},t("div",{class:"ForegroundImage",style:{background:`linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),\n linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),\n url(${this.setImage(null===(e=this.aboutUsData)||void 0===e?void 0:e.images)}) no-repeat center center / cover`}}),t("img",{class:"BackgroundImage",src:this.setImage(this.aboutUsData.images),alt:"image"}),t("div",{class:"ItemDetails"},this.formatTitle(null===(n=this.aboutUsData)||void 0===n?void 0:n.title,this.language),t("div",{class:"Description",innerHTML:null===(o=this.aboutUsData)||void 0===o?void 0:o.description}),t("button",{class:"Button",onClick:()=>{var e,t,n,i,o;return this.handleClick(null===(t=null===(e=this.aboutUsData)||void 0===e?void 0:e.button)||void 0===t?void 0:t.buttonUrl,null===(n=this.aboutUsData)||void 0===n?void 0:n.targetType,null===(i=this.aboutUsData)||void 0===i?void 0:i.locations,null===(o=this.aboutUsData)||void 0===o?void 0:o.externalLink)}},null===(s=null===(r=this.aboutUsData)||void 0===r?void 0:r.button)||void 0===s?void 0:s.buttonText,t("img",{src:"data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==",alt:"right chevron",class:"Chevron"}))))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};s.style=":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 10px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n background-color: transparent;\n width: unset;\n margin-bottom: 0;\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 10px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}\n.LoadingSkeleton {\n display: flex;\n flex-direction: column;\n padding: 40px;\n gap: 15px;\n height: 250px;\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n overflow: hidden;\n}";const a=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};a.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{s as general_about_us,a as ui_skeleton}
|
|
1
|
+
import{r as e,h as t,H as n}from"./index-86b7910e.js";const i={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."}};function r(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function o(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const s=class{constructor(n){e(this,n),this.handleClick=(e,t,n,i)=>{window.postMessage({type:"NavigateTo",path:e,target:t,locations:n,externalLink:i||!1},window.location.href),"function"==typeof gtag&>ag("event","GeneralAboutUs",{context:"AboutUsContent"})},this.setImage=e=>{let t="";switch(this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,n=screen.availHeight;if(e.includes("iphone"))return"mobile";if(e.includes("android")){if(n>t&&t<800)return"mobile";if(t>n&&n<800)return"tablet"}return"desktop"}(),this.device){case"mobile":t=e.imageMobile;break;case"tablet":t=e.imageTablet;break;case"desktop":t=e.imageDesktop}return t},this.formatTitle=(e,n)=>{let i,r;if(["zh","ja","th"].includes(n))i=e.substring(0,1),r=e.substring(1);else{const t=e.split(" ");i=t.shift(),r=t.join(" ")}return t("div",{class:"Title"},t("span",{class:"FirstWord"},i," "),t("span",null,r))},this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.hasErrors=!1,this.isLoading=!0,this.device=""}watchEndpoint(e,t){e&&e!=t&&this.cmsEndpoint&&this.getAboutUs()}handleClientStylingChange(e,t){e!=t&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getAboutUs()}componentDidLoad(){this.device=function(){const e=navigator.userAgent.toLowerCase();let t="";return t=e.includes("android")||e.includes("iphone")||e.includes("ipad")?function(){const e=screen.availWidth;return e<600?"mobile":e>=600&&e<1100?"tablet":void 0}():"desktop",t}(),this.stylingContainer&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getAboutUs(){let e=new URL(`${this.cmsEndpoint}/${this.language}/homepage`);return e.searchParams.append("env",this.cmsEnv),e.searchParams.append("userRoles",this.userRoles),e.searchParams.append("device",(()=>{const e=(()=>{let e=window.navigator.userAgent.toLocaleLowerCase();return e.includes("android/i")?"android":e.includes("iphone/i")?"iPhone":e.includes("ipad/i")||e.includes("ipod/i")?"iPad":"PC"})();if(e)return"PC"===e?"dk":"mtWeb"})()),new Promise(((t,n)=>{this.isLoading=!0,fetch(e.href).then((e=>e.json())).then((e=>{const n=["title","description","images","button","externalLink","targetType","locations"],i=Object.entries(e).filter((([e])=>n.includes(e))).reduce(((e,[t,n])=>(e[t]=n,e)),{});this.aboutUsData=i,t(i)})).catch((e=>{console.error(e),this.hasErrors=!0,n(e)})).finally((()=>{this.isLoading=!1}))}))}render(){var e,n,r,o,s,a;return t("div",{key:"e7953832b9bc914b0fb770695c3550912e9e6406",ref:e=>this.stylingContainer=e},this.hasErrors?t("div",{class:"AboutUsError"},t("div",{class:"ErrorInfo"},i[void 0!==(a=this.language)&&a in i?a:"en"].error)):this.isLoading?t("div",{class:"LoadingSkeleton"},t("ui-skeleton",{structure:"title",height:"60px",widget:"150px"}),t("ui-skeleton",{structure:"text",rows:"3",height:"16px",width:"60%"}),t("ui-skeleton",{structure:"rectangle",width:"100px",height:"40px"})):t("div",{class:"AboutUsWrapper"},t("div",{class:"ItemImage"},t("div",{class:"ForegroundImage",style:{background:`linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),\n linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),\n url(${this.setImage(null===(e=this.aboutUsData)||void 0===e?void 0:e.images)}) no-repeat center center / cover`}}),t("img",{class:"BackgroundImage",src:this.setImage(this.aboutUsData.images),alt:"image"}),t("div",{class:"ItemDetails"},this.formatTitle(null===(n=this.aboutUsData)||void 0===n?void 0:n.title,this.language),t("div",{class:"Description",innerHTML:null===(r=this.aboutUsData)||void 0===r?void 0:r.description}),t("button",{class:"Button",onClick:()=>{var e,t,n,i,r;return this.handleClick(null===(t=null===(e=this.aboutUsData)||void 0===e?void 0:e.button)||void 0===t?void 0:t.buttonUrl,null===(n=this.aboutUsData)||void 0===n?void 0:n.targetType,null===(i=this.aboutUsData)||void 0===i?void 0:i.locations,null===(r=this.aboutUsData)||void 0===r?void 0:r.externalLink)}},null===(s=null===(o=this.aboutUsData)||void 0===o?void 0:o.button)||void 0===s?void 0:s.buttonText,t("img",{src:"data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==",alt:"right chevron",class:"Chevron"}))))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};s.style=":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 10px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n background-color: transparent;\n width: unset;\n margin-bottom: 0;\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 10px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}\n.LoadingSkeleton {\n display: flex;\n flex-direction: column;\n padding: 40px;\n gap: 15px;\n height: 250px;\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n overflow: hidden;\n}";const a=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};a.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{s as general_about_us,a as ui_skeleton}
|