{"version":3,"file":"application-2b73eece.js","sources":["../../../app/components/bundle_components/section_wrapper_component.js","../../../app/components/static_components/footer_component.js","../../../app/components/static_components/header_component.js"],"sourcesContent":["// Pass backend variables to js variables\n/**\n * VARIABLES AND FUNCTIONS THAT NEED INITIATION\n */\nlet windowSize = window.innerWidth\nlet breakpoint = 992;\nlet dynamicImages = true\n\n\n\n/**\n * EVENT LISTENERS\n */\n\n// Execute something on 575 breakpoint (mobile to desktop and vice versa)\n\nif (dynamicImages) {\n setBackgrounds();\n window.addEventListener('resize', function(event) {\n if ((windowSize > breakpoint && window.innerWidth <= breakpoint) || (windowSize <= breakpoint && window.innerWidth > breakpoint)) {\n setBackgrounds();\n }\n windowSize = window.innerWidth;\n }, true);\n\n /**\n * FUNCTIONS\n */\n\n // Get Sections Data and check if it has a background image\n function setBackgrounds() {\n let images = document.querySelectorAll(\".responsive-background-image\");\n\n let isMobile = window.innerWidth <= breakpoint\n\n\n images.forEach(image => {\n image.src = isMobile ? addSizeMobile(image.src) : removeSizeMobile(image.src)\n console.log(image.src);\n });\n\n }\n\n function addSizeMobile(imageUrl) {\n console.log(imageUrl);\n if(imageUrl.includes(\"-mobile\")) return;\n return imageUrl + '-mobile';\n }\n\n function removeSizeMobile(imageUrl) {\n return imageUrl.replace('-mobile', '');\n }\n}","// Para empujar hacia arriba el footer, cuando el botón de whatsapp está abajo\n\nfunction updateFooterMargin() {\n const button = document.getElementById('whatsapp-button');\n if (button) {\n const buttonHeight = button.getBoundingClientRect().height;\n document.documentElement.style.setProperty('--whatsapp-button-height', `${buttonHeight}px`);\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", updateFooterMargin);\nwindow.addEventListener('resize',updateFooterMargin);","\nfunction handleResize() {\n const windowWidth = window.innerWidth;\n\n const resolutionThreshold = 1199;\n\n let offCanvasTag = document.querySelector('.offcanvas.offcanvas-start');\n let offCanvasBackdropTag = document.querySelector('.offcanvas-backdrop');\n\n if (windowWidth > resolutionThreshold) {\n if (offCanvasTag && offCanvasBackdropTag) {\n if (offCanvasTag.classList.contains(\"show\")) {\n offCanvasTag.classList.remove('show');\n offCanvasBackdropTag.classList.remove('show');\n body.style.overflow = '';\n }\n }\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", handleResize);\nwindow.addEventListener('resize', handleResize);\n\n// Tener siempre la altura de la navbar en una custom property\n\nfunction updateHeaderHeight() {\n const header = document.getElementById('header');\n if (header) {\n const headerHeight = header.getBoundingClientRect().height;\n document.documentElement.style.setProperty('--header-height', `${headerHeight}px`);\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n setTimeout(updateHeaderHeight, 500); // Adjust the delay (1000 milliseconds = 1 second)\n window.addEventListener('resize', updateHeaderHeight);\n});"],"names":["windowSize","breakpoint","setBackgrounds","images","isMobile","image","addSizeMobile","removeSizeMobile","imageUrl","event","updateFooterMargin","button","buttonHeight","handleResize","windowWidth","resolutionThreshold","offCanvasTag","offCanvasBackdropTag","updateHeaderHeight","header","headerHeight"],"mappings":"AAIA,IAAIA,EAAa,OAAO,WACpBC,EAAa,IAWE,CAcjB,IAASC,EAAT,UAA0B,CACxB,IAAIC,EAAS,SAAS,iBAAiB,8BAA8B,EAEjEC,EAAW,OAAO,YAAcH,EAGpCE,EAAO,QAAQE,GAAS,CACtBA,EAAM,IAAMD,EAAWE,EAAcD,EAAM,GAAG,EAAIE,EAAiBF,EAAM,GAAG,EAC5E,QAAQ,IAAIA,EAAM,GAAG,CAC3B,CAAK,CAEF,EAEQC,EAAT,SAAuBE,EAAU,CAE/B,GADA,QAAQ,IAAIA,CAAQ,EACjB,CAAAA,EAAS,SAAS,SAAS,EAC9B,OAAOA,EAAW,SACnB,EAEQD,EAAT,SAA0BC,EAAU,CAClC,OAAOA,EAAS,QAAQ,UAAW,EAAE,CACtC,EArBQ,IAAAN,IAaAI,IAMAC,IAhCTL,IACA,OAAO,iBAAiB,SAAU,SAASO,EAAO,EAC3CT,EAAaC,GAAc,OAAO,YAAcA,GAAgB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