1import{a as U}from"./chunk-MJO25K6H.js";import{a as j}from"./chunk-6AT5A2BN.js";import{j as H}from"./chunk-5VBVN4XO.js";import{f as F}from"./chunk-UYODVI7O.js";import{c as R,f as L,k as W,w as G}from"./chunk-3KLM56HX.js";import{c as K}from"./chunk-MOXDLQT4.js";import"./chunk-VLJ55T5Q.js";import"./chunk-ZACTTJ4S.js";import{c as q,e as N}from"./chunk-EKU7OH35.js";import"./chunk-V2PPMFND.js";import{Da as w,Db as h,Ha as S,Ib as P,Lb as A,Mb as E,Nb as r,Ob as o,Pb as M,Tb as v,Vb as C,Wb as m,ba as u,db as n,fc as a,gc as s,hc as g,kc as B,kd as z,lc as T,ma as f,mc as D,md as V,na as y,pb as I,pc as k,uc as c,vb as b,vc as p,wc as O}from"./chunk-5SAOKRHL.js";import{g as x}from"./chunk-NZN5XTIE.js";var J=t=>({store:t}),Q=t=>({word:t}),X=(t,d)=>d.type;function Y(t,d){t&1&&(r(0,"p",2),a(1),o()),t&2&&(n(),s(d))}function Z(t,d){if(t&1){let e=v();r(0,"li")(1,"label",11)(2,"input",12),C("change",function(i){let _=f(e).$implicit,$=m();return y($.toggle(_,i))}),o(),r(3,"span")(4,"strong"),a(5),c(6,"translate"),o(),r(7,"small"),a(8),c(9,"translate"),o()()()()}if(t&2){let e=d.$implicit,l=m();n(2),h("checked",e.granted)("disabled",l.store.busy()),n(3),s(p(6,4,"account.privacy.type."+e.type)),n(3),s(p(9,6,"account.privacy.hint."+e.type))}}function ee(t,d){t&1&&(r(0,"p",8),a(1),c(2,"translate"),o()),t&2&&(n(),s(p(2,1,"account.privacy.deleteDone")))}function te(t,d){if(t&1){let e=v();r(0,"div",9)(1,"p"),a(2),c(3,"translate"),o(),r(4,"label"),a(5),c(6,"translate"),r(7,"input",13),D("ngModelChange",function(i){f(e);let _=m();return T(_.typed,i)||(_.typed=i),y(i)}),o()(),r(8,"button",14),C("click",function(){f(e);let i=m();return y(i.confirmDelete())}),a(9),c(10,"translate"),o()()}if(t&2){let e=m();n(2),s(p(3,5,"account.privacy.confirmIntro")),n(3),g(" ",O(6,7,"account.privacy.confirmType",k(12,Q,e.word()))," "),n(2),B("ngModel",e.typed),n(),h("disabled",e.store.busy()||e.typed.trim().toUpperCase()!==e.word()),n(),g(" ",p(10,10,"account.privacy.confirmCta")," ")}}function ne(t,d){t&1&&(r(0,"p",8),a(1),c(2,"translate"),o()),t&2&&(n(),s(p(2,1,"account.privacy.deleteSent")))}function ie(t,d){if(t&1){let e=v();r(0,"button",15),C("click",function(){f(e);let i=m();return y(i.requestDelete())}),a(1),c(2,"translate"),o()}if(t&2){let e=m();h("disabled",e.store.busy()),n(),g(" ",p(2,2,"account.privacy.deleteCta")," ")}}var ye=(()=>{class t{constructor(){this.store=u(U),this.requested=w(!1),this.deleted=w(!1),this.token=w(null),this.typed="",this.auth=u(j),this.route=u(F),this.nav=u(H),this.site=u(K),this.platformId=u(S)}editable(){return this.store.consents().filter(e=>e.type==="MARKETING"||e.type==="PROFILING")}word(){return"BORRAR"}storeName(){return this.site.effective()?.name||""}ngOnInit(){return x(this,null,function*(){V(this.platformId)&&(this.token.set(this.route.snapshot.queryParamMap.get("borrar")),yield this.store.loadConsents())})}toggle(e,l){return x(this,null,function*(){let i=l.target.checked;yield this.store.setConsent(e.type,i)})}exportData(){return x(this,null,function*(){yield this.store.exportData()})}requestDelete(){return x(this,null,function*(){this.requested.set(yield this.store.requestDeletion())})}confirmDelete(){return x(this,null,function*(){let e=this.token();!e||!(yield this.store.confirmDeletion(e))||(this.deleted.set(!0),this.auth.clearSession(),this.store.reset(),yield this.nav.go("/"))})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=I({type:t,selectors:[["wr-account-privacy"]],decls:32,vars:27,consts:[[1,"wr-acpr"],[1,"wr-acpr__title"],["role","alert",1,"wr-acpr__err"],[1,"wr-acpr__sub"],[1,"wr-acpr__consents"],[1,"wr-acpr__sep"],[1,"wr-acpr__hint"],["type","button",1,"wr-acpr__ghost",3,"click","disabled"],["role","status",1,"wr-acpr__ok"],[1,"wr-acpr__danger"],["type","button",1,"wr-acpr__link","is-danger",3,"disabled"],[1,"wr-acpr__check"],["type","checkbox",3,"change","checked","disabled"],["name","confirm",3,"ngModelChange","ngModel"],["type","button",1,"wr-acpr__danger-cta",3,"click","disabled"],["type","button",1,"wr-acpr__link","is-danger",3,"click","disabled"]],template:function(l,i){if(l&1&&(r(0,"section",0)(1,"h2",1),a(2),c(3,"translate"),o(),b(4,Y,2,1,"p",2),r(5,"h3",3),a(6),c(7,"translate"),o(),r(8,"ul",4),A(9,Z,
110,8,"li",null,X),o(),M(11,"hr",5),r(12,"h3",3),a(13),c(14,"translate"),o(),r(15,"p",6),a(16),c(17,"translate"),o(),r(18,"button",7),C("click",function(){return i.exportData()}),a(19),c(20,"translate"),o(),M(21,"hr",5),r(22,"h3",3),a(23),c(24,"translate"),o(),r(25,"p",6),a(26),c(27,"translate"),o(),b(28,ee,3,3,"p",8)(29,te,11,14,"div",9)(30,ne,3,3,"p",8)(31,ie,3,4,"button",10),o()),l&2){let _;n(2),s(p(3,10,"account.privacy.title")),n(2),P((_=i.store.error())?4:-1,_),n(2),s(p(7,12,"account.privacy.consents")),n(3),E(i.editable()),n(4),s(p(14,14,"account.privacy.export")),n(3),s(p(17,16,"account.privacy.exportHint")),n(2),h("disabled",i.store.busy()),n(),g(" ",p(20,18,"account.privacy.exportCta")," "),n(4),s(p(24,20,"account.privacy.delete")),n(3),g(" ",O(27,22,"account.privacy.deleteHint",k(25,J,i.storeName()))," "),n(2),P(i.deleted()?28:i.token()?29:i.requested()?30:31)}},dependencies:[z,G,R,L,W,N,q],styles:[".wr-acpr[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;max-width:560px;align-items:flex-start}.wr-acpr__title[_ngcontent-%COMP%]{font-size:18px;margin:0;font-family:var(--wr-font-heading, inherit)}.wr-acpr__sub[_ngcontent-%COMP%]{font-size:15px;margin:0}.wr-acpr__hint[_ngcontent-%COMP%]{font-size:13px;opacity:.7;margin:0;line-height:1.5}.wr-acpr__sep[_ngcontent-%COMP%]{border:0;border-top:1px solid color-mix(in srgb,currentColor 12%,transparent);margin:6px 0;width:100%}.wr-acpr__consents[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;width:100%}.wr-acpr__check[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:flex-start;cursor:pointer}.wr-acpr__check[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:3px;accent-color:var(--wr-primary, #004793)}.wr-acpr__check[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;font-size:14px}.wr-acpr__check[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.65;font-size:12px;line-height:1.4}.wr-acpr__ghost[_ngcontent-%COMP%]{background:none;color:inherit;font-family:inherit;font-size:14px;cursor:pointer;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:9px;padding:9px 15px}.wr-acpr__ghost[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.wr-acpr__link[_ngcontent-%COMP%]{background:none;border:0;padding:0;font-family:inherit;font-size:14px;cursor:pointer;text-decoration:underline}.wr-acpr__link.is-danger[_ngcontent-%COMP%]{color:#b42318}.wr-acpr__danger[_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,#b42318 40%,transparent);background:color-mix(in srgb,#b42318 7%,transparent);border-radius:12px;padding:16px;width:100%;display:flex;flex-direction:column;gap:12px}.wr-acpr__danger[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.wr-acpr__danger[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.wr-acpr__danger[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,currentColor 20%,transparent);border-radius:9px;padding:10px 12px;font-size:15px;font-family:inherit;color:inherit;background:var(--wr-surface, #fff)}.wr-acpr__danger-cta[_ngcontent-%COMP%]{align-self:flex-start;border:0;border-radius:9px;padding:10px 18px;background:#b42318;color:#fff;font-family:inherit;font-weight:700;font-size:14px;cursor:pointer}.wr-acpr__danger-cta[disabled][_ngcontent-%COMP%]{opacity:.45;cursor:default}.wr-acpr__err[_ngcontent-%COMP%]{background:#fdecea;color:#a4291c;border-radius:10px;padding:11px 13px;font-size:14px;margin:0}.wr-acpr__ok[_ngcontent-%COMP%]{background:#e7f6ec;color:#14713c;border-radius:10px;padding:11px 13px;font-size:14px;margin:0}"],changeDetection:0})}}return t})();export{ye as AccountPrivacyComponent};
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.