PageSourceSearch

https://www.comunio.co.uk/_next/static/chunks/pages/game/settings/account/premium/cancel-ceb35a4f8dabbcaf.js

js comunio.co.uk collected 2026-10-05 19:32:33 UTC 4,507 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8561],{58300:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/game/settings/account/premium/cancel",function(){return t(70863)}])},70863:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>T,default:()=>P});var n=t(37876),a=t(33778),l=t.n(a),i=t(40445),u=t(33952),c=t(47809),r=t(14232),p=t(88923),m=t(96342),o=t(28574),_=t(76761),E=t(62965),A=t(99592),C=t(19639),N=t(17743),d=t(5243),T=!0;let P=(0,u.r)(({config:e})=>{let{t:s}=(0,p.Bd)(),{user:t}=(0,m.u)(),{updateUserParam:a}=(0,m.u)(),u=(0,r.useMemo)(()=>c.E.fetch(),[]),[o,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{o||_("desktop"===u?l().contentDesktop:"")},[o,u]);let[T,P]=(0,r.useState)(null),[D,S]=(0,r.useState)(null),[f,L]=(0,r.useState)(null),[h,y]=(0,r.useState)(null),[x,g]=(0,r.useState)(null),[I,U]=(0,r.useState)(!1),[j,k]=(0,r.useState)(null),[B,Y]=(0,r.useState)("");(0,r.useEffect)(()=>{if(t&&!T){let e,n,a,l;S(O(t.expires-28,s)),L(O(t.expires+14,s)),y(O(t.expires,s)),g(O(t.expires+1,s)),U(t&&t.isPremium&&!t.isPlusTmp&&!t.accountCancelled&&t.expires-28>=1),P((n=(e="BASIC"===t.type||"BASIC"!==t.type&&t.expires>=28)?t.type:"PRO"===t.type?t.leagueType:t.type,a=e?"BEFORE":"AFTER",l="","PRO"===t.type&&("PRO_SEPARATELY"!==t.leagueType||"PRO_SEPARATELY"===t.leagueType&&"BEFORE"===a)&&(l="_"+(t.isLeader?"LEADER":"NO_LEADER")),"CANCEL_ACCOUNT_INFO_"+n+l+"_"+a+"_DEADLINE_PARAGRAPH_0"))}},[t,T,s]);let v=e=>{e&&("click"===e.type||"Enter"===e.key)&&R(t).then(()=>{a("accountCancelled",!0),U(!1),k({type:"success",message:s("SUCCESS",{ns:"hint"}),posY:328})}).catch(e=>{Y(function(e,s){var t;let n,a=e?.response?.status??e?.status;if(t=e,n=t?.response?.data?.message,[n?.key,n?.message,n?.msg,n?.translate].filter(Boolean).map(e=>`${e}`.trim().toLowerCase()).some(e=>e.includes("user is no community admin")))return s("CANCEL_PREMIUM_ABO",{ns:"setup"});if(e?.code==="ERR_NETWORK")return s("NETWORK_DISCONNECTED",{ns:"hint"});if(a>=500)return s("SORRY_TRY_AGAIN",{ns:"hint"});let l=e?.response?.data?.message;for(let t of[l?.key,l?.message,l?.msg,l?.translate,"string"==typeof l?l:null,e?.response?.data?.msg,e?.response?.data?.error_description,e?.message].filter(Boolean)){let e=s(t,{ns:"setup",defaultValue:""});if(e)return e;let n=s(t,{ns:"premium",defaultValue:""});if(n)return n;let a=s(t,{ns:"hint",defaultValue:""});if(a)return a}return s("SORRY_TRY_AGAIN",{ns:"hint"})}(e,s))})},M=(0,r.useMemo)(()=>s("titles.SETUP_ACCOUNTDETAILS_PREMIUM_CANCEL",{ns:"seo"}),[s]);return!!e&&(0,n.jsxs)(i.A,{config:e,children:[(0,n.jsx)(N.A,{title:M,noDescription:!0}),(0,n.jsx)(d.A,{isOpen:!!B,onClose:()=>Y(""),headline:B,body:null}),!!t&&null!==o&&!!T&&(0,n.jsxs)("div",{className:`${l().settings} ${o}`,children:[(0,n.jsx)(E.A,{deviceType:u,pageName:s("CANCEL_PREMIUM_ACCOUNT",{ns:"setup"})}),(0,n.jsxs)("div",{className:`${l().contentWrapper} ${l().handlePremiumAccount}`,children:[(0,n.jsx)("div",{className:l().toastBlock,children:j&&(0,n.jsx)(C.A,{posX:"auto",posY:"auto",type:j.type,message:j.message,clearToastData:()=>{k(null)},className:l().playersToast})}),(0,n.jsxs)("div",{className:l().handlePremiumAccountContent,children:[(0,n.jsxs)("div",{className:l().mainTitle,children:[s("CANCEL_ACCOUNT",{ns:"setup",ACCOUNT_TYPE:t.type})," "]}),t&&t.isPremium&&!t.isPlusTmp&&!t.accountCancelled&&(0,n.jsx)("p",{className:l().mainDescription,id:"id1",children:s(`${T}1`,{CANCELLATION_DATE:D,ns:"premium"})}),t&&t.isPremium&&!t.isPlusTmp&&!t.accountCancelled&&(0,n.jsx)("p",{className:l().mainDescription,id:"id2",children:s(`${T}2`,{DELETION_DATE:f,ns:"premium"})}),t&&t.isPremium&&!t.isPlusTmp&&t.accountCancelled&&(0,n.jsx)("p",{className:l().mainDescription,children:s("PLUS"===t.type?"PLUS_ACCOUNT_CANCELLED_INFO":"PRO_ACCOUNT_CANCELLED_INFO",{EXPIRATION_DATE:h,FIRST_DAY_AFTER_EXPIRATION_DATE:x,ns:"setup"})}),(t&&t.isBasic||t.isPlusTmp)&&(0,n.jsx)("p",{className:l().mainDescription,children:s("NO_PREMIUM_ACCOUNT",{ns:"premium"})}),I&&(0,n.jsx)("div",{className:l().cancelBlock,children:(0,n.jsx)("div",{className:l().mainButtonContainer,children:(0,n.jsx)(A.A,{enabled:!0,className:l().saveButton,labelClassName:l().button_label,label:s("PLUS"===t.type?"CANCEL_PLUS_PLAYER":"CANCEL_PRO_PLAYER",{ns:"setup"}),onClick:v,onKeyUp:v})})})]})]})]})]})});async function R(e){return _.A.cancelPremiumAccount(e)}function O(e,s){return o.A.localizedDate(new Date().setDate(new Date().getDate()+e),"DATE_PADDED_SHORT",s
1)}}},e=>{e.O(0,[4121,2076,636,8792],()=>e(e.s=58300)),_N_E=e.O()}]);

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.