PageSourceSearch

https://www.todamateria.com.br/layout/assets/dist/js/delete-account-button.DkFCKoXn.js

js todamateria.com.br collected 2026-10-02 03:07:46 UTC 3,670 bytes, 2 lines download raw bytes

1var u=Object.freeze,m=Object.defineProperty;var c=(t,e)=>u(m(t,"raw",{value:u(e||t.slice())}));import{i as g,E as f,x as d,n as b,r as C}from"./funnel-tracker.CkzWyQni.js";import{t as A}from"./google-cookies._NJ-L9_Q.js";import{e as S}from"./query.6GE6ClqT.js";import{A as _}from"./auth-controller.PeK-ejBR.js";import{S as v}from"./auth-cookies.Cq4KilpJ.js";import{r as D}from"./analytics.NKZguT3Y.js";import"./_commonjsHelpers.CqkleIqs.js";import"./analytics.Yss8y0c9.js";import"./persisted-redux-controller.CClxSLXV.js";import"./analytics.Bbc7X71t.js";var L=Object.defineProperty,k=Object.getOwnPropertyDescriptor,r=(t,e,s,n)=>{for(var o=n>1?void 0:n?k(e,s):e,l=t.length-1,a;l>=0;l--)(a=t[l])&&(o=(n?a(e,s,o):a(o))||o);return n&&o&&L(e,s,o),o},h,p;let i=class extends g{constructor(){super(...arguments),this.authController=new _(this),this.buttonSelector=""}createRenderRoot(){return this}get button(){return this.buttonSelector?document.querySelector(this.buttonSelector):null}get isLogged(){return this.authController.isLogged}get hasActiveServiceSubscription(){var e;const t=(e=this.authController.subscriptionState)==null?void 0:e.current;return(t==null?void 0:t.isServiceManaged)===!0&&(t==null?void 0:t.state)===v.ACTIVE}get isLoading(){var t,e;return(e=(t=this.authController.deleteAccountStatus(this.deleteAccountRequestId))==null?void 0:t.isLoading)!=null?e:!1}get requestCompleted(){var t,e;return(e=(t=this.authController.deleteAccountStatus(this.deleteAccountRequestId))==null?void 0:t.completed)!=null?e:!1}connectedCallback(){var t;super.connectedCallback(),(t=this.button)==null||t.addEventListener("click",this._handleButtonClicked.bind(this))}disconnectedCallback(){var t;(t=this.button)==null||t.removeEventListener("click",this._handleButtonClicked.bind(this)),super.disconnectedCallback()}firstUpdated(t){var e;super.firstUpdated(t),(e=this.button)==null||e.toggleAttribute("disabled",!1)}_handleButtonClicked(){this.isLoading||(this.confirmDialog.showModal(),this.confirmDialog.addEventListener("click",this._handleModalClick.bind(this)))}_handleDismiss(){this.confirmDialog.close()}_handleModalClick(t){const e=this.confirmDialog.getBoundingClientRect();(t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom)&&this._handleDismiss()}_handleDeleteAccount(){this._handleDismiss();const{requestId:t}=this.authController.deleteAccount();this.deleteAccountRequestId=t}update(t){var e;super.update(t),this.authController.initialized&&(this.isLogged||(this.requestCompleted&&D(),window.location.replace("".concat(window.location.origin,"/"))),(e=this.button)==null||e.classList.toggle("loading",this.isLoading))}render(){return d(p||(p=c(['\n      <slot></slot>\n      <dialog id="confirm-dialog" class="dialog-modal">\n        <h2>Excluir Conta</h2>\n        <p>Tem certeza que deseja excluir sua conta?</p>\n        ','\n        <button class="form-button" @click=','>Cancelar</button>\n        <button class="form-button form-button--danger" @click="','">Sim</button>\n      </dialog>\n    '])),this.hasActiveServiceSubscription?d(h||(h=c(['<p class="delete-account-warning">\n              Ao excluir a conta, a sua assinatura ativa será cancelada. Você mantém o acesso até ao fim do período já pago; depois disso, para voltar a ter o TM Plus precisará de assinar novamente.\n            </p>']))):f,this._handleDismiss,this._handleDeleteAccount)}};r([b()],i.prototype,"buttonSelector",2);r([C()],i.prototype,"deleteAccountRequestId",2);r([S("#confirm-dialog")],i.prototype,"confirmDialog",2);i=r([A("delete-account-button")],i);export{i as DeleteAccountButton};
2//# sourceMappingURL=delete-account-button.DkFCKoXn.js.map

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.