1import{S as me,i as pe,a as de,c as z,t as L,h as R,p as A,x as V,A as j,W as _e,X as ne,Y as se,d,F,Z as ie,j as he,k as ge,n as w,o as _,q as k,r as b,u as H,w as T,G as O,y as v,z as C,H as W,aT as Z,D as le,_ as D,R as G,B as X,a2 as ue}from"./index-BhuTsbqy.js";import{G as oe}from"./GLabel-CBcjoLJ4.js";import{G as be}from"./GForm-20ium-Vm.js";import{R as ve}from"./RGPD-Dg9EFmVn.js";import{E as $e}from"./EmailInput-CruwHLOx.js";import"./CMAColors-BcxhgR_3.js";import{n as ke,a as we}from"./alarmas-CLzlM83_.js";import"./core-BcPUBYCp.js";function ae(l){let e,n;return{c(){e=v("img"),this.h()},l(t){e=b(t,"IMG",{src:!0,width:!0,alt:!0}),this.h()},h(){le(e.src,n=l[0].elementosPromocion[0].valorElemento)||k(e,"src",n),k(e,"width","100%"),k(e,"alt","")},m(t,s){w(t,e,s)},p(t,s){s&1&&!le(e.src,n=t[0].elementosPromocion[0].valorElemento)&&k(e,"src",n)},d(t){t&&d(e)}}}function Ee(l){let e,n=`<b>Además te damos un 5% de descuento</b> <img src="/img/icons/hands-up.svg" width="20px" alt="hands-up"/> <img src="/img/icons/hands-up.svg" width="20px" alt="hands-up"/> <img src="/img/icons/hands-up.svg" width="20px" alt="hands-up"/> 2 para tu próximo pedido online`;return{c(){e=v("p"),e.innerHTML=n},l(t){e=b(t,"P",{"data-svelte-h":!0}),G(e)!=="svelte-1s5ay7p"&&(e.innerHTML=n)},m(t,s){w(t,e,s)},p:X,d(t){t&&d(e)}}}function Pe(l){let e,n=l[0]?.elementosPromocion[3].valorElemento+"",t;return{c(){e=v("p"),t=W(n),this.h()},l(s){e=b(s,"P",{class:!0});var o=H(e);t=O(o,n),o.forEach(d),this.h()},h(){k(e,"class","accent-text f-w-6")},m(s,o){w(s,e,o),_(e,t)},p(s,o){o&1&&n!==(n=s[0]?.elementosPromocion[3].valorElemento+"")&&F(t,n)},d(s){s&&d(e)}}}function Te(l){let e,n=re(l[0].elementosPromocion[5]?.valorElemento)+"",t,s,o,m;return{c(){e=v("div"),t=W(n),s=C(),o=v("b"),m=W(l[6]),this.h()},l(i){e=b(i,"DIV",{class:!0});var r=H(e);t=O(r,n),s=T(r),o=b(r,"B",{});var p=H(o);m=O(p,l[6]),p.forEach(d),r.forEach(d),this.h()},h(){k(e,"class","info-box success py-4")},m(i,r){w(i,e,r),_(e,t),_(e,s),_(e,o),_(o,m)},p(i,r){r&1&&n!==(n=re(i[0].elementosPromocion[5]?.valorElemento)+"")&&F(t,n),r&64&&F(m,i[6])},i:X,o:X,d(i){i&&d(e)}}}function Ce(l){let e,n,t="SUSCRIBIRME";return{c(){e=v("div"),n=v("button"),n.textContent=t,this.h()},l(s){e=b(s,"DIV",{});var o=H(e);n=b(o,"BUTTON",{class:!0,type:!0,"data-svelte-h":!0}),G(n)!=="svelte-wcxfu0"&&(n.textContent=t),o.forEach(d),this.h()},h(){k(n,"class","btn accent"),k(n,"type","submit"),D(n,"loading",l[5])},m(s,o){w(s,e,o),_(e,n)},p(s,o){o&32&&D(n,"loading",s[5])},i:X,o:X,d(s){s&&d(e)}}}function ye(l){let e,n=`Por favor, marca las casillas de la Newsletter que queires recibir 3 <img src="/img/icons/feliz.svg" width="20px" alt="feliz"/> <img src="/img/icons/books.svg" width="20px" alt="book"/> 4 (marca las dos si quieres recibir todo 5 <img src="/img/icons/guinar.svg" width="20px" alt="guinar"/> 6 )`,t,s,o,m,i,r,p,E="SUSCRIBIRME",y;return o=new oe({props:{$$slots:{default:[Me]},$$scope:{ctx:l}}}),i=new oe({props:{$$slots:{default:[Ie]},$$scope:{ctx:l}}}),{c(){e=v("p"),e.innerHTML=n,t=C(),s=v("div"),j(o.$$.fragment),m=C(),j(i.$$.fragment),r=C(),p=v("button"),p.textContent=E,this.h()},l(c){e=b(c,"P",{"data-svelte-h":!0}),G(e)!=="svelte-1k3uox2"&&(e.innerHTML=n),t=T(c),s=b(c,"DIV",{class:!0});var u=H(s);V(o.$$.fragment,u),m=T(u),V(i.$$.fragment,u),r=T(u),p=b(u,"BUTTON",{class:!0,type:!0,"data-svelte-h":!0}),G(p)!=="svelte-1rsns6n"&&(p.textContent=E),u.forEach(d),this.h()},h(){k(p,"class","g-btn brand mr-auto"),k(p,"type","submit"),D(p,"disabled",!l[3]&&!l[4]),D(p,"loading",l[5]),k(s,"class","d-grid gap-3 mb-4")},m(c,u){w(c,e,u),w(c,t,u),w(c,s,u),A(o,s,null),_(s,m),A(i,s,null),_(s,r),_(s,p),y=!0},p(c,u){const I={};u&131080&&(I.$$scope={dirty:u,ctx:c}),o.$set(I);const S={};u&131088&&(S.$$scope={dirty:u,ctx:c}),i.$set(S),(!y||u&24)&&D(p,"disabled",!c[3]&&!c[4]),(!y||u&32)&&D(p,"loading",c[5])},i(c){y||(R(o.$$.fragment,c),R(i.$$.fragment,c),y=!0)},o(c){L(o.$$.fragment,c),L(i.$$.fragment,c),y=!1},d(c){c&&(d(e),d(t),d(s)),z(o),z(i)}}}function Me(l){let e,n,t,s=`<b>Newsletter:</b> Recibe todas las novedades, descuentos en tÃtulos, eventos, promociones, fechas importantes, 7 premios y mucho más`,o,m;return{c(){e=v("input"),n=C(),t=v("p"),t.innerHTML=s,this.h()},l(i){e=b(i,"INPUT",{type:!0}),n=T(i),t=b(i,"P",{"data-svelte-h":!0}),G(t)!=="svelte-1284p30"&&(t.innerHTML=s),this.h()},h(){k(e,"type","checkbox")}
7,m(i,r){w(i,e,r),e.checked=l[3],w(i,n,r),w(i,t,r),o||(m=ue(e,"change",l[12]),o=!0)},p(i,r){r&8&&(e.checked=i[3])},d(i){i&&(d(e),d(n),d(t)),o=!1,m()}}}function Ie(l){let e,n,t,s="<b>Tagus Today:</b> Los mejores eBooks cada dÃa a un precio irresistible, ¡solo duran 24 horas!",o,m;return{c(){e=v("input"),n=C(),t=v("p"),t.innerHTML=s,this.h()},l(i){e=b(i,"INPUT",{type:!0}),n=T(i),t=b(i,"P",{"data-svelte-h":!0}),G(t)!=="svelte-1favwj1"&&(t.innerHTML=s),this.h()},h(){k(e,"type","checkbox")},m(i,r){w(i,e,r),e.checked=l[4],w(i,n,r),w(i,t,r),o||(m=ue(e,"change",l[13]),o=!0)},p(i,r){r&16&&(e.checked=i[4])},d(i){i&&(d(e),d(n),d(t)),o=!1,m()}}}function Se(l){let e,n,t,s,o,m,i,r,p,E,y,c,u,I,S,h,g,q,P,$=l[0]?.elementosPromocion[0]&&ae(l);function K(a,f){return a[0]?.elementosPromocion[3]?Pe:Ee}let Y=K(l),M=Y(l);function ce(a){l[10](a)}let Q={disabled:!!l[6]};l[1]!==void 0&&(Q.email=l[1]),E=new $e({props:Q}),ne.push(()=>se(E,"email",ce));function fe(a){l[11](a)}let x={type:6,origen:"newsletter"};l[2]!==void 0&&(x.rgpd=l[2]),u=new ve({props:x}),ne.push(()=>se(u,"rgpd",fe));const ee=[ye,Ce,Te],N=[];function te(a,f){return a[0]?a[6]?a[6]?2:-1:1:0}return~(h=te(l))&&(g=N[h]=ee[h](l)),{c(){e=v("div"),$&&$.c(),n=C(),t=v("h1"),s=W(l[8]),o=C(),m=v("p"),i=W(l[7]),r=C(),M.c(),p=C(),j(E.$$.fragment),c=C(),j(u.$$.fragment),S=C(),g&&g.c(),q=C(),this.h()},l(a){e=b(a,"DIV",{class:!0});var f=H(e);$&&$.l(f),n=T(f),t=b(f,"H1",{class:!0});var B=H(t);s=O(B,l[8]),B.forEach(d),o=T(f),m=b(f,"P",{});var U=H(m);i=O(U,l[7]),U.forEach(d),r=T(f),M.l(f),p=T(f),V(E.$$.fragment,f),c=T(f),V(u.$$.fragment,f),S=T(f),g&&g.l(f),q=T(f),f.forEach(d),this.h()},h(){k(t,"class","f-serif"),k(e,"class","newsletter container d-grid gap-4")},m(a,f){w(a,e,f),$&&$.m(e,null),_(e,n),_(e,t),_(t,s),_(e,o),_(e,m),_(m,i),_(e,r),M.m(e,null),_(e,p),A(E,e,null),_(e,c),A(u,e,null),_(e,S),~h&&N[h].m(e,null),_(e,q),P=!0},p(a,f){a[0]?.elementosPromocion[0]?$?$.p(a,f):($=ae(a),$.c(),$.m(e,n)):$&&($.d(1),$=null),(!P||f&256)&&F(s,a[8]),(!P||f&128)&&F(i,a[7]),Y===(Y=K(a))&&M?M.p(a,f):(M.d(1),M=Y(a),M&&(M.c(),M.m(e,p)));const B={};f&64&&(B.disabled=!!a[6]),!y&&f&2&&(y=!0,B.email=a[1],ie(()=>y=!1)),E.$set(B);const U={};!I&&f&4&&(I=!0,U.rgpd=a[2],ie(()=>I=!1)),u.$set(U);let J=h;h=te(a),h===J?~h&&N[h].p(a,f):(g&&(he(),L(N[J],1,1,()=>{N[J]=null}),ge()),~h?(g=N[h],g?g.p(a,f):(g=N[h]=ee[h](a),g.c()),R(g,1),g.m(e,q)):g=null)},i(a){P||(R(E.$$.fragment,a),R(u.$$.fragment,a),R(g),P=!0)},o(a){L(E.$$.fragment,a),L(u.$$.fragment,a),L(g),P=!1},d(a){a&&d(e),$&&$.d(),M.d(),z(E),z(u),~h&&N[h].d()}}}function Ne(l){let e,n;return e=new be({props:{onsubmit:l[9],$$slots:{default:[Se]},$$scope:{ctx:l}}}),{c(){j(e.$$.fragment)},l(t){V(e.$$.fragment,t)},m(t,s){A(e,t,s),n=!0},p(t,[s]){const o={};s&131583&&(o.$$scope={dirty:s,ctx:t}),e.$set(o)},i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){L(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function re(l){return l.replace(/\[(.*?)\]/,"")}function He(l,e,n){let t,s,o;_e(async()=>{n(0,o=await ke())});let m="",i={},r=Z!=="Spain",p=Z!=="Spain";const E={Spain:8,Mexico:39,Colombia:42},y={Spain:33,Mexico:40,Colombia:43};let c=!1,u="";async function I(){n(5,c=!0);const P={email:m,rgpd:i};r&&(P.novedades=E[Z]),p&&(P.tagusToday=y[Z]),n(6,u=await we(P)),n(5,c=!1)}function S(P){m=P,n(1,m)}function h(P){i=P,n(2,i)}function g(){r=this.checked,n(3,r)}function q(){p=this.checked,n(4,p)}return l.$$.update=()=>{l.$$.dirty&1&&n(8,t=o?.elementosPromocion[1]?.valorElemento||"SuscrÃbete a nuestra Newsletter"),l.$$.dirty&1&&n(7,s=o?.elementosPromocion[2]?.valorElemento||`¡Entérate antes que nadie! Te avisaremos de todas las novedades, próximos lanzamientos, noticias, promociones 8 y mucho más en nuestra Newsletter.`)},[o,m,i,r,p,c,u,s,t,I,S,h,g,q]}class Ae extends me{constructor(e){super(),pe(this,e,He,Ne,de,{})}}export{Ae as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.