cas-ds-web-components 1.2.72 → 1.2.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Tv=Object.defineProperty;var Iv=(b,J,J1)=>J in b?Tv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Iv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.
|
|
1
|
+
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Tv=Object.defineProperty;var Iv=(b,J,J1)=>J in b?Tv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Iv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.77",dependencies:{},main:"./index.js",module:"./index.mjs",typings:"./index.d.ts",private:!0};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -11878,7 +11878,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11878
11878
|
// img {
|
|
11879
11879
|
// filter: none;
|
|
11880
11880
|
// }
|
|
11881
|
-
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=o=>{this.setAttribute("darkMode",o.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const o=this.disableMode==="true";this.darkMode==="true"&&!o&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(l){!localStorage.getItem("theme")&&!o&&(l.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!
|
|
11881
|
+
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=o=>{this.setAttribute("darkMode",o.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const o=this.disableMode==="true";this.darkMode==="true"&&!o&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(l){!localStorage.getItem("theme")&&!o&&(l.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!1,endDate:"2024-06-25T04:57:00Z",Title:"Alert",Icono:"4",Contenido:'<div><div role="presentation" data-qa="message_content"><div><div data-qa="message-text"><div data-qa="block-kit-renderer"><div><div dir="auto"><div><p class="mb-0"><strong></strong><strong></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong>¡Importante!</strong> En este momento, la visualización de exámenes no está disponible en Mi Alemana Go. Sin embargo, puedes hacerlo <a href="https://mipaginadesalud.alemana.cl/wps/portal/mpdsvp/">aqui</a>.</p></div></div></div></div></div></div></div></div><div role="group"><div role="group" aria-label="Acciones en torno a un mensaje" data-qa="message-actions"></div></div><a href="https://www.google.com"></a>',startDate:"2024-06-24T14:14:07Z",Provider:"dynamicProvider121"}};{const{showAlert:t,alert:e}=C;if(t){if(console.log(e),!e||!e.enabled)return!1;let o=new Date,a=new Date(e==null?void 0:e.startDate),l=new Date(e==null?void 0:e.endDate);if(o>a&&o<l)this.showAlert=t,this.alert={title:e==null?void 0:e.Titulo,text:e==null?void 0:e.Contenido,active:e==null?void 0:e.enabled},console.log("Alerta activa"),this.delay(200).then(()=>this.handleSpaces());else return!1;this.requestUpdate()}}}async delay(C){return new Promise(t=>setTimeout(t,C))}async handleSpaces(){var a,l,h;const C=this.shadowRoot.querySelector("cas-header-taxonomy"),t=(a=this.shadowRoot.querySelector("cas-header-head"))==null?void 0:a.getClientRects()[0].height,e=(l=this.shadowRoot.querySelector("cas-header-pre-head"))==null?void 0:l.getClientRects()[0].height,o=(h=this.shadowRoot.querySelector("cas-header-taxonomy"))==null?void 0:h.getClientRects()[0].height;if(this.showAlert){const n=this.shadowRoot.querySelector("cas-alert");n==null||n.addEventListener("close",()=>{this.showAlert=!1,this.spaceHeight=t+e+o,C.style.top=`${t+e}px`,this.requestUpdate()});const r=n==null?void 0:n.getClientRects()[0].height;this.type!==t1.HOME?this.spaceHeight=t+r:(this.spaceHeight=t+e+o+r,C.style.top=`${t+e+r}px`)}else this.type!==t1.HOME?this.spaceHeight=t:(this.spaceHeight=t+e+o,C.style.top=`${t+e}px`);this.requestUpdate()}async firstUpdated(){const C=this.disableMode==="true",{theme:t}=Fp(this.darkMode);this.theme=C?"light":t,this.defaultDarkMode(),this.handleEvents(),await this.handleAlert(),await this.delay(200),this.handleSpaces()}render(){const{alert:C,type:t,bookingBox:e,theme:o}=this,a=e==="true";return M`
|
|
11882
11882
|
<header class="container ${this.type}" data-theme=${o} style="height: ${this.spaceHeight}px">
|
|
11883
11883
|
${this.showAlert?M`<cas-alert
|
|
11884
11884
|
showCloseButton
|
|
@@ -12054,7 +12054,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12054
12054
|
text-decoration: none;
|
|
12055
12055
|
}
|
|
12056
12056
|
}
|
|
12057
|
-
`,VC=[{section:"Nosotros",items:[{name:"Nuestra clínica",url:"https://www.clinicaalemana.cl/nuestra-clinica/bienvenida"},{name:"Sostenibilidad",url:"https://www.clinicaalemana.cl/sostenibilidad/home"},{name:"Sitios relacionados",url:"https://www.clinicaalemana.cl/nuestra-clinica/sitios-web-relacionados"}]},{section:"Información normativa",items:[{name:"Indicadores clínicos",url:"https://www.clinicaalemana.cl/nuestra-clinica/indicadores-clinicos"},{name:"Derechos y deberes",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/derechos_y_deberes"},{name:"Ley de Urgencia",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_de_urgencia"},{name:"Ley 21.309",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_21_309"},{name:"Patologías GES",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/patologias_ges"},{name:"Ley Dominga",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Dominga"},{name:"Ley Ricarte Soto",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Ricarte_Soto"},{name:"Reglamento interno de funcionamiento",url:"https://www.clinicaalemana.cl/reglamento-interno-de-funcionamiento"},{name:"Términos y condiciones",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/terminos_y_condiciones"}]},{section:"Información de interés",items:[{name:"Pago y cuentas",url:"https://centrodeayuda.clinicaalemana.cl/pagos_y_cuentas"},{name:"Covid-19",url:"https://centrodeayuda.clinicaalemana.cl/covid_19"},{name:"Documentos de salud",url:"https://centrodeayuda.clinicaalemana.cl/documentos_de_salud"},{name:"Servicios digitales",url:"https://centrodeayuda.clinicaalemana.cl/servicios_digitales"},{name:"Servicios y atenciones",url:"https://centrodeayuda.clinicaalemana.cl/servicios_y_atenciones"},{name:"Reclamos y denuncias",url:"https://centrodeayuda.clinicaalemana.cl/reclamos_y_denuncias"}]},{section:"Ubicaciones",items:[{name:"Clínicas",url:"https://www.clinicaalemana.cl/sucursales/clinicas"},{name:"Centros médicos",url:"https://www.clinicaalemana.cl/sucursales/centros-medicos"},{name:"Tomas de muestras",url:"https://www.clinicaalemana.cl/sucursales/toma-de-muestras"}]},{section:"Te ayudamos",items:[{name:"Mesa Central <br>+56 2 2210 1111",url:"tel:+56222101111",icon:"flat-phone"},{name:"Reserva de hora <br>+56 2
|
|
12057
|
+
`,VC=[{section:"Nosotros",items:[{name:"Nuestra clínica",url:"https://www.clinicaalemana.cl/nuestra-clinica/bienvenida"},{name:"Sostenibilidad",url:"https://www.clinicaalemana.cl/sostenibilidad/home"},{name:"Sitios relacionados",url:"https://www.clinicaalemana.cl/nuestra-clinica/sitios-web-relacionados"}]},{section:"Información normativa",items:[{name:"Indicadores clínicos",url:"https://www.clinicaalemana.cl/nuestra-clinica/indicadores-clinicos"},{name:"Derechos y deberes",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/derechos_y_deberes"},{name:"Ley de Urgencia",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_de_urgencia"},{name:"Ley 21.309",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_21_309"},{name:"Patologías GES",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/patologias_ges"},{name:"Ley Dominga",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Dominga"},{name:"Ley Ricarte Soto",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Ricarte_Soto"},{name:"Reglamento interno de funcionamiento",url:"https://www.clinicaalemana.cl/reglamento-interno-de-funcionamiento"},{name:"Términos y condiciones",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/terminos_y_condiciones"}]},{section:"Información de interés",items:[{name:"Pago y cuentas",url:"https://centrodeayuda.clinicaalemana.cl/pagos_y_cuentas"},{name:"Covid-19",url:"https://centrodeayuda.clinicaalemana.cl/covid_19"},{name:"Documentos de salud",url:"https://centrodeayuda.clinicaalemana.cl/documentos_de_salud"},{name:"Servicios digitales",url:"https://centrodeayuda.clinicaalemana.cl/servicios_digitales"},{name:"Servicios y atenciones",url:"https://centrodeayuda.clinicaalemana.cl/servicios_y_atenciones"},{name:"Reclamos y denuncias",url:"https://centrodeayuda.clinicaalemana.cl/reclamos_y_denuncias"}]},{section:"Ubicaciones",items:[{name:"Clínicas",url:"https://www.clinicaalemana.cl/sucursales/clinicas"},{name:"Centros médicos",url:"https://www.clinicaalemana.cl/sucursales/centros-medicos"},{name:"Tomas de muestras",url:"https://www.clinicaalemana.cl/sucursales/toma-de-muestras"}]},{section:"Te ayudamos",items:[{name:"Mesa Central <br>+56 2 2210 1111",url:"tel:+56222101111",icon:"flat-phone"},{name:"Reserva de hora <br>+56 2 2910 1700",url:"tel:+56229101700",icon:"flat-phone"},{name:"Rescate de emergencia <br>+56 2 2910 9911",url:"tel:+56229109911",icon:"flat-phone"}]}],qp=[{name:"instagram",icon:"flat-instagram",url:"https://www.instagram.com/clinicaalemanadesantiago/"},{name:"linkedin",icon:"flat-linkedin",url:"https://www.linkedin.com/company/clinica-alemana-de-santiago"},{name:"x",icon:"flat-x",url:"https://twitter.com/clinicaalemana"},{name:"facebook",icon:"flat-facebook",url:"https://www.facebook.com/Clinicaalemanadesantiago/"},{name:"spotify",icon:"flat-spotifySolid",url:"https://open.spotify.com/user/8001v856hnvkpq7ytrik14qlg"},{name:"youtube",icon:"flat-youtubeSolid",url:"https://www.youtube.com/channel/UCVTx7AHcRM8auQ68PLDwrjA"}];class A3 extends f{constructor(){super()}updated(){const C=this.shadowRoot.querySelectorAll("section");C.forEach(t=>{const e=t.querySelector(".top"),o=t.querySelector(".list");e.addEventListener("click",()=>{C.forEach(a=>{a.querySelector(".list").classList.remove("active"),a.querySelector("cas-icon").classList.remove("active")}),o.classList.toggle("active"),e.querySelector("cas-icon").classList.toggle("active")})})}render(){const C=t=>{const{section:e,items:o}=t;return M`<section>
|
|
12058
12058
|
<div class="top">
|
|
12059
12059
|
<cas-text variant="headline3">${e}</cas-text>
|
|
12060
12060
|
<cas-icon name="flat-chevronDown" size="20"></cas-icon>
|
package/build/cas-footer.js
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
text-decoration: none;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
`,pe=[{section:"Nosotros",items:[{name:"Nuestra clínica",url:"https://www.clinicaalemana.cl/nuestra-clinica/bienvenida"},{name:"Sostenibilidad",url:"https://www.clinicaalemana.cl/sostenibilidad/home"},{name:"Sitios relacionados",url:"https://www.clinicaalemana.cl/nuestra-clinica/sitios-web-relacionados"}]},{section:"Información normativa",items:[{name:"Indicadores clínicos",url:"https://www.clinicaalemana.cl/nuestra-clinica/indicadores-clinicos"},{name:"Derechos y deberes",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/derechos_y_deberes"},{name:"Ley de Urgencia",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_de_urgencia"},{name:"Ley 21.309",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_21_309"},{name:"Patologías GES",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/patologias_ges"},{name:"Ley Dominga",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Dominga"},{name:"Ley Ricarte Soto",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Ricarte_Soto"},{name:"Reglamento interno de funcionamiento",url:"https://www.clinicaalemana.cl/reglamento-interno-de-funcionamiento"},{name:"Términos y condiciones",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/terminos_y_condiciones"}]},{section:"Información de interés",items:[{name:"Pago y cuentas",url:"https://centrodeayuda.clinicaalemana.cl/pagos_y_cuentas"},{name:"Covid-19",url:"https://centrodeayuda.clinicaalemana.cl/covid_19"},{name:"Documentos de salud",url:"https://centrodeayuda.clinicaalemana.cl/documentos_de_salud"},{name:"Servicios digitales",url:"https://centrodeayuda.clinicaalemana.cl/servicios_digitales"},{name:"Servicios y atenciones",url:"https://centrodeayuda.clinicaalemana.cl/servicios_y_atenciones"},{name:"Reclamos y denuncias",url:"https://centrodeayuda.clinicaalemana.cl/reclamos_y_denuncias"}]},{section:"Ubicaciones",items:[{name:"Clínicas",url:"https://www.clinicaalemana.cl/sucursales/clinicas"},{name:"Centros médicos",url:"https://www.clinicaalemana.cl/sucursales/centros-medicos"},{name:"Tomas de muestras",url:"https://www.clinicaalemana.cl/sucursales/toma-de-muestras"}]},{section:"Te ayudamos",items:[{name:"Mesa Central <br>+56 2 2210 1111",url:"tel:+56222101111",icon:"flat-phone"},{name:"Reserva de hora <br>+56 2
|
|
166
|
+
`,pe=[{section:"Nosotros",items:[{name:"Nuestra clínica",url:"https://www.clinicaalemana.cl/nuestra-clinica/bienvenida"},{name:"Sostenibilidad",url:"https://www.clinicaalemana.cl/sostenibilidad/home"},{name:"Sitios relacionados",url:"https://www.clinicaalemana.cl/nuestra-clinica/sitios-web-relacionados"}]},{section:"Información normativa",items:[{name:"Indicadores clínicos",url:"https://www.clinicaalemana.cl/nuestra-clinica/indicadores-clinicos"},{name:"Derechos y deberes",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/derechos_y_deberes"},{name:"Ley de Urgencia",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_de_urgencia"},{name:"Ley 21.309",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/ley_21_309"},{name:"Patologías GES",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/patologias_ges"},{name:"Ley Dominga",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Dominga"},{name:"Ley Ricarte Soto",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/Ley_Ricarte_Soto"},{name:"Reglamento interno de funcionamiento",url:"https://www.clinicaalemana.cl/reglamento-interno-de-funcionamiento"},{name:"Términos y condiciones",url:"https://centrodeayuda.clinicaalemana.cl/terminos_legales/terminos_y_condiciones"}]},{section:"Información de interés",items:[{name:"Pago y cuentas",url:"https://centrodeayuda.clinicaalemana.cl/pagos_y_cuentas"},{name:"Covid-19",url:"https://centrodeayuda.clinicaalemana.cl/covid_19"},{name:"Documentos de salud",url:"https://centrodeayuda.clinicaalemana.cl/documentos_de_salud"},{name:"Servicios digitales",url:"https://centrodeayuda.clinicaalemana.cl/servicios_digitales"},{name:"Servicios y atenciones",url:"https://centrodeayuda.clinicaalemana.cl/servicios_y_atenciones"},{name:"Reclamos y denuncias",url:"https://centrodeayuda.clinicaalemana.cl/reclamos_y_denuncias"}]},{section:"Ubicaciones",items:[{name:"Clínicas",url:"https://www.clinicaalemana.cl/sucursales/clinicas"},{name:"Centros médicos",url:"https://www.clinicaalemana.cl/sucursales/centros-medicos"},{name:"Tomas de muestras",url:"https://www.clinicaalemana.cl/sucursales/toma-de-muestras"}]},{section:"Te ayudamos",items:[{name:"Mesa Central <br>+56 2 2210 1111",url:"tel:+56222101111",icon:"flat-phone"},{name:"Reserva de hora <br>+56 2 2910 1700",url:"tel:+56229101700",icon:"flat-phone"},{name:"Rescate de emergencia <br>+56 2 2910 9911",url:"tel:+56229109911",icon:"flat-phone"}]}],ni=[{name:"instagram",icon:"flat-instagram",url:"https://www.instagram.com/clinicaalemanadesantiago/"},{name:"linkedin",icon:"flat-linkedin",url:"https://www.linkedin.com/company/clinica-alemana-de-santiago"},{name:"x",icon:"flat-x",url:"https://twitter.com/clinicaalemana"},{name:"facebook",icon:"flat-facebook",url:"https://www.facebook.com/Clinicaalemanadesantiago/"},{name:"spotify",icon:"flat-spotifySolid",url:"https://open.spotify.com/user/8001v856hnvkpq7ytrik14qlg"},{name:"youtube",icon:"flat-youtubeSolid",url:"https://www.youtube.com/channel/UCVTx7AHcRM8auQ68PLDwrjA"}];/**
|
|
167
167
|
* @license
|
|
168
168
|
* Copyright 2017 Google LLC
|
|
169
169
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/build/cas-header.js
CHANGED
|
@@ -11878,7 +11878,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11878
11878
|
// img {
|
|
11879
11879
|
// filter: none;
|
|
11880
11880
|
// }
|
|
11881
|
-
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=i=>{this.setAttribute("darkMode",i.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const i=this.disableMode==="true";this.darkMode==="true"&&!i&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(a){!localStorage.getItem("theme")&&!i&&(a.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!
|
|
11881
|
+
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=i=>{this.setAttribute("darkMode",i.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const i=this.disableMode==="true";this.darkMode==="true"&&!i&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(a){!localStorage.getItem("theme")&&!i&&(a.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!1,endDate:"2024-06-25T04:57:00Z",Title:"Alert",Icono:"4",Contenido:'<div><div role="presentation" data-qa="message_content"><div><div data-qa="message-text"><div data-qa="block-kit-renderer"><div><div dir="auto"><div><p class="mb-0"><strong></strong><strong></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong>¡Importante!</strong> En este momento, la visualización de exámenes no está disponible en Mi Alemana Go. Sin embargo, puedes hacerlo <a href="https://mipaginadesalud.alemana.cl/wps/portal/mpdsvp/">aqui</a>.</p></div></div></div></div></div></div></div></div><div role="group"><div role="group" aria-label="Acciones en torno a un mensaje" data-qa="message-actions"></div></div><a href="https://www.google.com"></a>',startDate:"2024-06-24T14:14:07Z",Provider:"dynamicProvider121"}};{const{showAlert:t,alert:e}=C;if(t){if(console.log(e),!e||!e.enabled)return!1;let i=new Date,l=new Date(e==null?void 0:e.startDate),a=new Date(e==null?void 0:e.endDate);if(i>l&&i<a)this.showAlert=t,this.alert={title:e==null?void 0:e.Titulo,text:e==null?void 0:e.Contenido,active:e==null?void 0:e.enabled},console.log("Alerta activa"),this.delay(200).then(()=>this.handleSpaces());else return!1;this.requestUpdate()}}}async delay(C){return new Promise(t=>setTimeout(t,C))}async handleSpaces(){var l,a,n;const C=this.shadowRoot.querySelector("cas-header-taxonomy"),t=(l=this.shadowRoot.querySelector("cas-header-head"))==null?void 0:l.getClientRects()[0].height,e=(a=this.shadowRoot.querySelector("cas-header-pre-head"))==null?void 0:a.getClientRects()[0].height,i=(n=this.shadowRoot.querySelector("cas-header-taxonomy"))==null?void 0:n.getClientRects()[0].height;if(this.showAlert){const h=this.shadowRoot.querySelector("cas-alert");h==null||h.addEventListener("close",()=>{this.showAlert=!1,this.spaceHeight=t+e+i,C.style.top=`${t+e}px`,this.requestUpdate()});const r=h==null?void 0:h.getClientRects()[0].height;this.type!==q.HOME?this.spaceHeight=t+r:(this.spaceHeight=t+e+i+r,C.style.top=`${t+e+r}px`)}else this.type!==q.HOME?this.spaceHeight=t:(this.spaceHeight=t+e+i,C.style.top=`${t+e}px`);this.requestUpdate()}async firstUpdated(){const C=this.disableMode==="true",{theme:t}=Uc(this.darkMode);this.theme=C?"light":t,this.defaultDarkMode(),this.handleEvents(),await this.handleAlert(),await this.delay(200),this.handleSpaces()}render(){const{alert:C,type:t,bookingBox:e,theme:i}=this,l=e==="true";return u`
|
|
11882
11882
|
<header class="container ${this.type}" data-theme=${i} style="height: ${this.spaceHeight}px">
|
|
11883
11883
|
${this.showAlert?u`<cas-alert
|
|
11884
11884
|
showCloseButton
|