1import{b as mo}from"./chunk-CYFGPURL.js";import{a as uo}from"./chunk-PY2X2NPU.js";import{b as Co,c as co,d as To}from"./chunk-EKHN3NGM.js";import{a as so}from"./chunk-7LUEXPK5.js";import{a as po,b as Mo}from"./chunk-4TL6DOKL.js";import{a as lo}from"./chunk-53IKWMJG.js";import{a as no,b as oo,c as io,d as ye,e as ro}from"./chunk-P7YZPKB2.js";import"./chunk-5GVXZ5ON.js";import"./chunk-G3L6OW7K.js";import"./chunk-UFPPYVMH.js";import"./chunk-YEN262T4.js";import"./chunk-4GM7L6JB.js";import{c as to}from"./chunk-XG2UEYRK.js";import{a as Nt}from"./chunk-LCNXNM6E.js";import"./chunk-O4DWGUCX.js";import{a as _o}from"./chunk-AWZKCMCZ.js";import{b as Jn,f as Kn,g as eo}from"./chunk-QMQZZIR5.js";import"./chunk-XGC7JZAU.js";import{a as pt}from"./chunk-MBPSVMMT.js";import{a as ao}from"./chunk-X2SRRTG5.js";import"./chunk-C4KUKUZD.js";import{a as Zn}from"./chunk-S7TSA3HI.js";import"./chunk-J3EEEQXE.js";import"./chunk-62ATBB34.js";import"./chunk-PVOHGV2Y.js";import{a as re}from"./chunk-LQVRZI54.js";import{a as Ln,b as kn}from"./chunk-JPHV47HI.js";import"./chunk-LNZJJ3KZ.js";import"./chunk-X3ZEAWQQ.js";import"./chunk-TWKGHEYL.js";import"./chunk-SGZLU3PA.js";import"./chunk-RBCASDJ4.js";import{a as Qn}from"./chunk-C726LWQF.js";import"./chunk-WMEOAIVO.js";import{b as _e}from"./chunk-EO7FPGTW.js";import"./chunk-GDFO7X2G.js";import"./chunk-I6M5NA5Y.js";import{c as jn}from"./chunk-Q6I3NOHV.js";import{a as J}from"./chunk-KIVJRE4O.js";import{d as zn,f as Mt,g as Vn,h as Wn,j as Hn,n as Bn,o as qn}from"./chunk-L7C23KC7.js";import"./chunk-VDA4PBJF.js";import"./chunk-YLZ34D6D.js";import"./chunk-QXVUYXIG.js";import{b as Z}from"./chunk-OR7MKCZD.js";import{a as xn}from"./chunk-5HFMNZQ2.js";import"./chunk-37BKZLLN.js";import"./chunk-ZME7CHSV.js";import"./chunk-OTKVWBE5.js";import"./chunk-LLCRV73S.js";import{a as Gn}from"./chunk-GJEJ67RH.js";import"./chunk-KEEUBRDB.js";import"./chunk-GGNTEXQL.js";import"./chunk-TALII272.js";import"./chunk-KLT2ZASF.js";import"./chunk-V3JZPFOE.js";import{c as wn}from"./chunk-PG4F5PSG.js";import"./chunk-CIVVPYF3.js";import{a as Dn,b as mt}from"./chunk-FZFWY5Y6.js";import{a as Xn}from"./chunk-EGEBNI4V.js";import{A as An,E as G,F as j,c as ct,g as w,h as H,o as Pe,p as B,w as q,x as Q,y as Nn,z as On}from"./chunk-EBOVR5NW.js";import{G as In,u as Un}from"./chunk-UME7L37K.js";import{a as ut}from"./chunk-R76LZEZS.js";import{$d as Sn,$f as dt,Ab as k,Af as it,B as Ke,Bb as z,C as nn,Ca as a,Cb as s,D as on,Db as V,Dc as oe,Eb as W,Ec as fe,Ef as Pn,Gb as O,Gd as mn,Hb as ln,Ib as C,Ic as ge,Jd as pn,Kd as Mn,Lh as Fn,Ma as N,Oh as x,Q as _n,Qb as Ae,Rb as Ee,Rg as y,S as rn,Sa as ne,Sb as Cn,Se as fn,Ta as at,Td as Tt,Te as Dt,Ud as Xt,Vc as lt,Vd as En,Xb as g,Xd as K,Y as an,Yb as h,Zb as Se,aa as l,ag as Rn,bc as le,bg as yn,cc as Ce,dc as ce,ed as Ct,ee as de,fa as E,fb as m,ga as S,gb as p,ge as ie,gf as gn,gh as hn,hh as v,i as Kt,ib as et,id as dn,j as _t,jb as tt,kb as nt,kc as cn,lb as T,lc as st,mb as i,mh as vn,n as en,nb as o,nh as Re,ob as d,pb as Gt,pd as un,qb as xt,qh as Yn,r as rt,ra as te,sb as ae,sc as Te,tb as se,tc as Lt,th as X,uc as ot,wc as Tn,wh as bn,x as tn,xh as $n,yb as R,za as sn}from"./chunk-HVCWS4IF.js";import{a as Zt,b as Jt,j as u,k as Oe}from"./chunk-KJ7W2O2B.js";var Ue=class Ue{};u(Ue,"\u0275fac",function(e){return new(e||Ue)();}),u(Ue,"\u0275cmp",N({type:Ue,selectors:[["my-account-abuses-list"]],decls:1,vars:0,consts:[["viewType","user"]],template:function(e,n){e&1&&d(0,"my-abuse-list-table",0);},dependencies:[no],encapsulation:2}));var Ot=Ue;var Ie=class Ie{authService=l(v);scopedTokensService=l(vn);videoService=l(jn);notifier=l(y);confirmService=l(Re);feedUrl;feedToken;baseURL=it.originServerUrl||window.location.origin;ngOnInit(){this.feedUrl=this.baseURL,this.scopedTokensService.getScopedTokens().subscribe({next:t=>this.regenApplications(t),error:t=>this.notifier.handleError(t)});}renewToken(){return Oe(this,null,function*(){(yield this.confirmService.confirm("Renewing the token will disallow previously configured clients from retrieving the feed until they use the new token. Proceed?","Renew token"))!==!1&&this.scopedTokensService.renewScopedTokens().subscribe({next:e=>{this.regenApplications(e),this.notifier.success("Token renewed. Update your client configuration accordingly.");},error:e=>this.notifier.handleError(e)});});}regenApplications(t){let e=this.authService.getUser(),n=this.videoService.getVideoSubscriptionFeedUrls(e.account.id,t.feedToken);this.feedUrl=this.baseURL+n.find(r=>r.format===En.RSS).url,this.feedToken=t.feedToken;}};u(Ie,"\u0275fac",function(e){return new(e||Ie)();}),u(Ie,"\u0275cmp",N({type:Ie,selectors:[["my-account-applications"]],decls:18,vars:8,consts:()=>{let t;t="Renew token";let e;e="SUBSCRIPTION FEED";let n;n=" Use third-party feed aggregators to retrieve the list of videos from channels you subscribed to. ";let r;r="Feed URL";
1let c;c="Feed Token";let M;return M="\u26A0\uFE0F Never share your feed token with anyone.",[e,n,r,c,M,[1,"pt-two-cols"],[1,"title-col"],[1,"applications-description"],[1,"content-col"],[1,"form-group"],["for","feed-url"],["inputId","feed-url",3,"value","withToggle","withCopy","show","readonly"],["for","feed-token"],["inputId","feed-token",3,"value","withCopy","readonly"],[1,"form-group-description"],["type","submit","value",t,1,"peertube-button","primary-button","mt-4",3,"click"]];},template:function(e,n){e&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),s(3,0),o(),i(4,"div",7),s(5,1),o()(),i(6,"div",8)(7,"div",9)(8,"label",10),s(9,2),o(),d(10,"my-input-text",11),o(),i(11,"div",9)(12,"label",12),s(13,3),o(),d(14,"my-input-text",13),i(15,"div",14),s(16,4),o()(),i(17,"input",15),O("click",function(){return n.renewToken();}),o()()()),e&2&&(a(10),T("value",n.feedUrl)("withToggle",!1)("withCopy",!0)("show",!0)("readonly",!0),a(4),T("value",n.feedToken)("withCopy",!0)("readonly",!0));},dependencies:[_e],styles:[".pt-two-cols[_ngcontent-%COMP%] .content-col[_ngcontent-%COMP%]{max-width:500px}"]}));var At=Ie;var he=class he{mode=0;};u(he,"\u0275fac",function(e){return new(e||he)();}),u(he,"\u0275cmp",N({type:he,selectors:[["my-account-blocklist"]],decls:1,vars:1,consts:[["key","MyAccountBlocklistComponent",3,"mode"]],template:function(e,n){e&1&&d(0,"my-generic-account-blocklist",0),e&2&&T("mode",n.mode);},dependencies:[oo],encapsulation:2}));var Et=he;var ve=class ve{mode=0;};u(ve,"\u0275fac",function(e){return new(e||ve)();}),u(ve,"\u0275cmp",N({type:ve,selectors:[["my-account-server-blocklist"]],decls:1,vars:1,consts:[["key","MyAccountServerBlocklistComponent",3,"mode"]],template:function(e,n){e&1&&d(0,"my-generic-server-blocklist",0),e&2&&T("mode",n.mode);},dependencies:[io],encapsulation:2}));var St=ve;var L=class L{authHttp=l(un);restExtractor=l(hn);server=l(X);listUserExports(t){let{userId:e}=t,n=L.BASE_USER_EXPORTS_URL+e+"/exports";return this.authHttp.get(n).pipe(Ke(r=>this.restExtractor.handleError(r)));}requestNewUserExport(t){let{userId:e,withVideoFiles:n}=t,r=L.BASE_USER_EXPORTS_URL+e+"/exports/request";return this.authHttp.post(r,{withVideoFiles:n}).pipe(Ke(c=>this.restExtractor.handleError(c)));}deleteUserExport(t){let{userId:e,userExportId:n}=t,r=L.BASE_USER_EXPORTS_URL+e+"/exports/"+n;return this.authHttp.delete(r).pipe(Ke(c=>this.restExtractor.handleError(c)));}getLatestImport(t){let{userId:e}=t,n=L.BASE_USER_IMPORTS_URL+e+"/imports/latest";return rt([this.authHttp.get(n),this.server.getServerLocale()]).pipe(en(([r,c])=>(r.state.label=gn(r.state.label,c),r)),Ke(r=>r.status===K.NOT_FOUND_404?_t(void 0):this.restExtractor.handleError(r)));}};u(L,"BASE_USER_EXPORTS_URL",it.apiUrl+"/api/v1/users/"),u(L,"BASE_USER_IMPORTS_URL",it.apiUrl+"/api/v1/users/"),u(L,"\u0275fac",function(e){return new(e||L)();}),u(L,"\u0275prov",an({token:L,factory:L.ɵfac}));var ee=L;function Oo(_,t){_&1&&(i(0,"p"),s(1,16),o());}function Ao(_,t){if(_&1&&(i(0,"div",24)(1,"div")(2,"strong"),g(3,"Latest import on:"),o(),g(4),Te(5,"ptDate"),o(),i(6,"div")(7,"strong"),g(8,"Latest import state:"),o(),g(9),o()()),_&2){let e=C(2);a(4),Se(" ",ot(5,2,e.latestImport.createdAt,"medium")," "),a(5),Se(" ",e.latestImport.state.label," ");}}function Eo(_,t){_&1&&(i(0,"my-alert",25),s(1,17),o());}function So(_,t){_&1&&(i(0,"my-alert",25),s(1,19),o());}function fo(_,t){if(_&1){let e=R();i(0,"my-upload-progress",26),O("cancelUpload",function(){E(e);let r=C(2);return S(r.cancelUpload());})("retry",function(){E(e);let r=C(2);return S(r.retryUpload());}),o(),m(1,So,2,0,"my-alert",25),i(2,"div",27)(3,"span"),s(4,18),o(),i(5,"input",28),O("change",function(r){E(e);let c=C(2);return S(c.onFileChange(r));}),o()();}if(_&2){let e=C(2);T("isUploading",e.uploadingArchive)("uploadPercents",e.uploadPercents)("error",e.error)("uploaded",e.archiveUploadFinished)("enableRetryAfterError",e.enableRetryAfterError),a(),p(e.archiveUploadFinished&&!e.error?1:-1),a(),T("hidden",e.uploadingArchive||e.archiveUploadFinished);}}function go(_,t){if(_&1&&(i(0,"p"),s(1,1),o(),i(2,"p"),k(3,2),d(4,"strong"),z(),o(),i(5,"p"),s(6,3),o(),i(7,"ul")(8,"li"),s(9,4),o(),i(10,"li"),s(11,5),o(),i(12,"li"),s(13,6),o(),i(14,"li"),s(15,7),o(),i(16,"li"),s(17,8),o(),i(18,"li"),s(19,9),o(),i(20,"li"),s(21,10),o(),i(22,"li"),s(23,11),o(),i(24,"li"),k(25,12),d(26,"strong"),z(),o()(),i(27,"p"),s(28,13),o(),i(29,"ul")(30,"li"),s(31,14),o(),i(32,"li"),s(33,15),o()(),m(34,Oo,2,0,"p"),m(35,Ao,10,5,"div",24),m(36,Eo,2,0,"my-alert",25)(37,fo,6,7)),_&2){let e=C();a(34),p(e.isEmailEnabled()?34:-1),a(),p(e.latestImport?35:-1),a(),p(e.hasPendingImport()?36:37);}}function Po(_,t){_&1&&(i(0,"p"),s(1,20),o());}var Ye=class Ye{authService=l(v);server=l(X);userImportExportService=l(ee);resumableUploadService=l(co);notifier=l(y);videoQuotaUsed=oe(void 0);uploadingArchive=!1;archiveUploadFinished=!1;error;enableRetryAfterError;uploadPercents=0;latestImport;fileToUpload;uploadServiceSubscription;alreadyRefreshedToken=!1;ngOnInit(){this.userImportExportService.getLatestImport({userId:this.authService.getUser().id}).subscribe(t=>this.latestImport=t),this.uploadServiceSubscription=this.resumableUploadService.events.subscribe(t=>this.onUploadOngoing(t));}
1ngOnDestroy(){this.resumableUploadService.disconnect(),this.uploadServiceSubscription&&this.uploadServiceSubscription.unsubscribe();}canDeactivate(){return{canDeactivate:!this.uploadingArchive,text:"Your archive file is not uploaded yet, are you sure you want to leave this page?"};}isImportEnabled(){return this.server.getHTMLConfig().import.users.enabled;}isEmailEnabled(){return this.server.getHTMLConfig().email.enabled;}onUploadOngoing(t){switch(t.status){case"error":{if(!this.alreadyRefreshedToken&&t.responseStatus===K.UNAUTHORIZED_401)return this.alreadyRefreshedToken=!0,this.refreshTokenAndRetryUpload();this.handleUploadError(yn(t));break;}case"cancelled":this.uploadingArchive=!1,this.uploadPercents=0,this.enableRetryAfterError=!1,this.error="";break;case"uploading":this.uploadPercents=t.progress;break;case"complete":this.archiveUploadFinished=!0,this.uploadPercents=100,this.uploadingArchive=!1;break;}}onFileChange(t){let e=t.target,n=e.files[0];if(!n)return;let r=this.authService.getUser();if(r.videoQuota!==-1&&this.videoQuotaUsed()+n.size>r.videoQuota){let c=new pt(),M=c.transform(n.size,0),P=c.transform(this.videoQuotaUsed(),0),$=c.transform(r.videoQuota,0);this.notifier.error("Cannot import this file as your video quota would be exceeded (import size: "+M+", used: "+P+", quota: "+$+")"),e.value="";return;}this.fileToUpload=n,this.uploadFile(n);}cancelUpload(){this.resumableUploadService.control({action:"cancel"});}retryUpload(){this.enableRetryAfterError=!1,this.error="",this.uploadFile(this.fileToUpload);}hasPendingImport(){if(!this.latestImport)return!1;let t=this.latestImport.state.id;return t===Xt.PENDING||t===Xt.PROCESSING;}uploadFile(t){this.resumableUploadService.handleFiles(t,{endpoint:`${ee.BASE_USER_IMPORTS_URL}${this.authService.getUser().id}/imports/import-resumable`,multiple:!1,maxChunkSize:this.server.getHTMLConfig().client.videos.resumableUpload.maxChunkSize,token:this.authService.getAccessToken(),uploaderClass:Co,retryConfig:Rn(),metadata:{filename:t.name}}),this.uploadingArchive=!0;}handleUploadError(t){this.uploadPercents=0,this.enableRetryAfterError=!0,this.error=dt({err:t,name:"archive",notifier:this.notifier,sticky:!1}),t.status===K.UNSUPPORTED_MEDIA_TYPE_415&&this.cancelUpload();}refreshTokenAndRetryUpload(){this.authService.refreshAccessToken().subscribe(()=>this.retryUpload());}};u(Ye,"\u0275fac",function(e){return new(e||Ye)();}),u(Ye,"\u0275cmp",N({type:Ye,selectors:[["my-account-import"]],inputs:{videoQuotaUsed:[1,"videoQuotaUsed"]},decls:7,vars:1,consts:()=>{let t;t="IMPORT";let e;e="You can import an archive created by another PeerTube website.";let n;n=" This is an "+"\uFFFD#4\uFFFD"+"import"+"\uFFFD/#4\uFFFD"+" tool and not a migration tool. It's the reason why data (like channels or videos) is duplicated and not moved from your previous PeerTube website. ";let r;r="The import process will automatically:";let c;c="Update your account metadata (display name, description, avatar...)";let M;M="Update your user settings (autoplay or P2P policy, notification settings...). It does not update your user email, username or password.";let P;P="Add accounts/servers in your mute list";let $;$="Add likes/dislikes";let U;U="Send a follow request to your subscriptions";let D;D="Create channels if they do not already exist";let I;I="Create playlists if they do not already exist";let F;F="Add watched videos in your video history";let ke;ke=""+"\uFFFD#26\uFFFD"+"If the archive contains video files"+"\uFFFD/#26\uFFFD"+", create videos if they do not already exist";let ze;ze="The following data objects are not imported:";let Ve;Ve="Comments";let We;We="Followers (accounts will need to re-follow your channels)";let He;He="An email will be sent when the import process is complete.";let Be;Be=" You can't re-import an archive because you already have an import that is currently being processed by PeerTube. ";let qe;qe="(extension: .zip)";let Qe;Qe="Select the file to import";let je;je="Select the archive file to import";let Ze;Ze="Upload completed. Your archive import will be processed as soon as possible.";let Je;return Je="User import is not enabled by your administrator.",[t,e,n,r,c,M,P,$,U,D,I,F,ke,ze,Ve,We,He,Be,je,Ze,Je,[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[1,"mb-3"],["type","primary"],[1,"d-block","mt-3","mb-3",3,"cancelUpload","retry","isUploading","uploadPercents","error","uploaded","enableRetryAfterError"],["ngbTooltip",qe,1,"button-file","primary-button","form-control",3,"hidden"],["aria-label",Qe,"accept",".zip","id","importfile","type","file",3,"change"]];},template:function(e,n){e&1&&(i(0,"div",21)(1,"div",22)(2,"h2"),s(3,0),o()(),i(4,"div",23),m(5,go,38,3)(6,Po,2,0,"p"),o()()),e&2&&(a(5),p(n.isImportEnabled()?5:6));},dependencies:[To,In,J,Nt],styles:[".button-file[_ngcontent-%COMP%]{width:max-content}my-alert[_ngcontent-%COMP%]{display:block;width:fit-content}"]}));var ft=Ye;var Ro=["exportModal"];function yo(_,t){_&1&&(i(0,"p"),s(1,18),o());}function Uo(_,t){if(_&1&&(g(0),Te(1,"bytes")),_&2){let e=C().$implicit;Se(" ",Lt(1,1,e.size)," ");}}function Io(_,t){if(_&1&&(g(0),Te(1,"ptDate")),_&2){let e=C().$implicit;Se(" ",ot(1,1,e.expiresOn,"medium")," ");}}function ho(_,t){if(_&1&&(i(0,"a",35),s(1,23),o()),_&2){let e=C().$implicit;T("href",e.privateDownloadUrl,sn);}}function vo(_,t){if(_&1&&(i(0,"tr")(1,"td"),g(2),Te(3,"ptDate"),o(),i(4,"td"),g(5),o(),i(6,"td"),m(7,Uo,2,3),o(),i(8,"td"),m(9,Io,2,4),o(),i(10,"td"),m(11,ho,2,1,"a",35),o()()),_&2){let e=t.$implicit;a(2),h(ot(3,5,e.createdAt,"medium")),a(3),h(e.state.label),a(2),p(e.size?7:-1),a(2),p(e.expiresOn?9:-1),a(2),p(e.privateDownloadUrl?11:-1);}}function Yo(_,t){if(_&1&&(i(0,"table")(1,"tr")(2,"th",34),s(3,19),o(),i(4,"th",34),s(5,20),o(),i(6,"th",34),s(7,21),o(),i(8,"th",34),s(9,22),o(),d(10,"th"),o(),tt(11,vo,12,8,"tr",null,et),o()),_&2){let e=C(2);a(11),nt(e.userExports);}}function bo(_,t){if(_&1){let e=R();i(0,"p"),s(1,2),o(),i(2,"ul")(3,"li"),s(4,3),o(),i(5,"li"),s(6,4),o(),i(7,"li"),s(8,5),o(),i(9,"li"),s(10,6),o(),i(11,"li"),s(12,7),o(),i(13,"li"),s(14,8),o(),i(15,"li"),s(16,9),o(),i(17,"li"),s(18,10),o(),i(19,"li"),s(20,11),o()(),i(21,"p"),s(22,12),o(),i(23,"ul")(24,"li"),s(25,13),o(),i(26,"li"),s(27,14),o(),i(28,"li"),s(29,15),o()(),i(30,"p"),k(31,16),d(32,"strong"),z(),o(),i(33,"p"),s(34,17),o(),m(35,yo,2,0,"p"),m(36,Yo,13,0,"table"),i(37,"div",32)(38,"input",33),O("click",function(){E(e);let r=C();return S(r.openNewArchiveModal());}),o()();}if(_&2){let e=C();a(35),p(e.isEmailEnabled()?35:-1),a(),p(e.userExports&&e.userExports.length!==0?36:-1),a(2),T("disabled",e.isRequestArchiveDisabled());}}function $o(_,t){_&1&&(i(0,"p"),s(1,24),o());}function Fo(_,t){_&1&&(i(0,"my-alert",41),s(1,27),o());}function wo(_,t){if(_&1&&(i(0,"my-alert",42),g(1),o()),_&2){let e=C(2);a(),h(e.errorInModal);}}function Go(_,t){if(_&1&&(i(0,"div"),k(1,28),d(2,"strong"),Te(3,"bytes"),z(),o()),_&2){let e=C(2);a(3),V(Lt(3,1,e.archiveWeightEstimation)),W(1);}}function xo(_,t){if(_&1){let e=R();i(0,"div",36)(1,"h4",37),s(2,25),o(),i(3,"button",38),O("click",function(){let r=E(e).close;return S(r());}),d(4,"my-global-icon",39),o()(),i(5,"div",40),m(6,Fo,2,0,"my-alert",41),m(7,wo,2,1,"my-alert",42),i(8,"my-peertube-checkbox",43),ce("ngModelChange",function(r){E(e);let c=C();return Ce(c.exportWithVideosFiles,r)||(c.exportWithVideosFiles=r),S(r);}),ae(9,44),i(10,"div"),s(11,26),o(),m(12,Go,4,3,"div"),se(),o()(),i(13,"div",45)(14,"input",46),O("click",function(){let r=E(e).close;return S(r());})("key.enter",function(){let r=E(e).close;return S(r());}),o(),i(15,"input",47),O("click",function(){E(e);let r=C();return S(r.requestNewArchive());}),o()();}if(_&2){let e=C();a(6),p(e.hasAlreadyACompletedArchive()?6:-1),a(),p(e.errorInModal?7:-1),a(),le("ngModel",e.exportWithVideosFiles),a(4),p(e.archiveWeightEstimation?12:-1);}}var be=class be{authService=l(v);server=l(X);userImportExportService=l(ee);modalService=l(Un);exportModal=fe("exportModal");videoQuotaUsed=oe(void 0);userExports=[];exportWithVideosFiles;errorInModal;archiveWeightEstimation;exportModalOpened;requestingArchive=!1;ngOnInit(){this.archiveWeightEstimation=this.videoQuotaUsed(),this.reloadUserExports();}isExportEnabled(){return this.server.getHTMLConfig().export.users.enabled;}isEmailEnabled(){return this.server.getHTMLConfig().email.enabled;}isRequestArchiveDisabled(){return this.userExports.some(t=>{let e=t.state.id;return e===Tt.PENDING||e===Tt.PROCESSING;});}hasAlreadyACompletedArchive(){return this.userExports.some(t=>t.state.id===Tt.COMPLETED);}openNewArchiveModal(){this.exportWithVideosFiles=!1,this.errorInModal=void 0,this.exportModalOpened=this.modalService.open(this.exportModal(),{centered:!0});}requestNewArchive(){if(this.requestingArchive)return;this.requestingArchive=!0;let t=_t(!0);this.userExports.length!==0&&(t=Kt(this.userExports.map(e=>e.id)).pipe(on(e=>this.userImportExportService.deleteUserExport({userId:this.getUserId(),userExportId:e})),nn())),t.pipe(_n(()=>this.userImportExportService.requestNewUserExport({withVideoFiles:this.exportWithVideosFiles,userId:this.getUserId()}))).subscribe({next:()=>{this.reloadUserExports(),this.exportModalOpened.close(),this.requestingArchive=!1;},error:e=>{if(this.requestingArchive=!1,e.body.code===Sn.MAX_USER_VIDEO_QUOTA_EXCEEDED_FOR_USER_EXPORT){this.errorInModal="Video files cannot be included in the export because you have exceeded the maximum video quota allowed by your administrator to export this archive.";return;}this.errorInModal=e.message;}});}reloadUserExports(){this.isExportEnabled()&&this.userImportExportService.listUserExports({userId:this.authService.getUser().id}).subscribe(({data:t})=>this.userExports=t);}
1getUserId(){return this.authService.getUser().id;}};u(be,"\u0275fac",function(e){return new(e||be)();}),u(be,"\u0275cmp",N({type:be,selectors:[["my-account-export"]],viewQuery:function(e,n){e&1&&Ae(n.exportModal,Ro,5),e&2&&Ee();},inputs:{videoQuotaUsed:[1,"videoQuotaUsed"]},decls:9,vars:1,consts:()=>{let t;t="EXPORT";let e;e="Request a new archive";let n;n="You can request an archive of your account containing:";let r;r="Your account settings with avatar file";let c;c="Your channels with banner and avatar files";let M;M="Your muted accounts and servers";let P;P="Your comments";let $;$="Your likes and dislikes";let U;U="Your subscriptions and followers";let D;D="Your video playlists with thumbnail files";let I;I="Your videos with thumbnail, caption files. Video files can also be included in the archive";let F;F="Your video history";let ke;ke="The exported data will contain multiple directories:";let ze;ze="A directory containing an export in ActivityPub format, readable by any compliant software";let Ve;Ve="A directory containing an export in custom PeerTube JSON format that can be used to re-import your account on another PeerTube instance";let We;We="A directory containing static files (thumbnails, avatars, video files etc.)";let He;He="Videos and playlists from collaborated channels, as well as your channel collaborators, "+"\uFFFD#32\uFFFD"+"will not"+"\uFFFD/#32\uFFFD"+" be included in the archive.";let Be;Be="You can only request one archive at a time.";let qe;qe="An email will be sent when the export archive is available.";let Qe;Qe="Date";let je;je="State";let Ze;Ze="Size";let Je;Je="Expires on";let f;f="Download your archive";let kt;kt="User export is not enabled by your administrator.";let zt;zt="Close this modal";let Vt;Vt="Include video files in archive file";let Wt;Wt="Cancel";let Ht;Ht="Request an archive";let Bt;Bt="Archive settings";let qt;qt="Including video files is required if you want to re-import your videos on another PeerTube website";let Qt;Qt=" You already have an active archive. Requesting a new export archive will remove the current one. ";let jt;return jt="If you include video files, the archive file will weigh "+"\uFFFD#2\uFFFD"+"approximately "+"\uFFFD0\uFFFD"+""+"\uFFFD/#2\uFFFD"+"",[["exportModal",""],t,n,r,c,M,P,$,U,D,I,F,ke,ze,Ve,We,He,Be,qe,Qe,je,Ze,Je,f,kt,Bt,qt,Qt,jt,[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[1,"mt-3"],["type","submit","value",e,1,"peertube-button","primary-button",3,"click","disabled"],["scope","column"],[1,"peertube-button-link","secondary-button",3,"href"],[1,"modal-header"],[1,"modal-title"],["title",zt,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["type","warning"],["type","danger"],["inputName","exportWithVideos","labelText",Vt,3,"ngModelChange","ngModel"],["ngProjectAs","description",5,["description"]],[1,"modal-footer","inputs"],["type","button","role","button","value",Wt,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",Ht,1,"peertube-button","primary-button",3,"click"]];},template:function(e,n){e&1&&(i(0,"div",29)(1,"div",30)(2,"h2"),s(3,1),o()(),i(4,"div",31),m(5,bo,39,3)(6,$o,2,0,"p"),o()(),at(7,xo,16,4,"ng-template",null,0,Tn)),e&2&&(a(5),p(n.isExportEnabled()?5:6));},dependencies:[ut,mt,G,w,Pe,J,Nt,pt],styles:["table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-inline-end:1rem}"]}));var gt=be;var Lo=["accountImport"],$e=class $e{userService=l(x);accountImport=fe("accountImport");videoQuotaUsed;ngOnInit(){this.userService.getMyVideoQuotaUsed().subscribe(t=>this.videoQuotaUsed=t.videoQuotaUsed);}canDeactivate(){return this.accountImport()?.canDeactivate()||{canDeactivate:!0};}};u($e,"\u0275fac",function(e){return new(e||$e)();}),u($e,"\u0275cmp",N({type:$e,selectors:[["my-account-import-export"]],viewQuery:function(e,n){e&1&&Ae(n.accountImport,Lo,5),e&2&&Ee();},decls:3,vars:2,consts:[["accountImport",""],[1,"d-block","mb-5",3,"videoQuotaUsed"],[3,"videoQuotaUsed"]],template:function(e,n){e&1&&d(0,"my-account-import",1,0)(2,"my-account-export",2),e&2&&(T("videoQuotaUsed",n.videoQuotaUsed),a(2),T("videoQuotaUsed",n.videoQuotaUsed));},dependencies:[ft,gt],encapsulation:2}));var Pt=$e;
1var Xo=["userNotification"];function Do(_,t){_&1&&(d(0,"my-global-icon",15),i(1,"span"),s(2,4),o());}function ko(_,t){_&1&&(d(0,"my-global-icon",16),i(1,"span"),s(2,5),o());}var Fe=class Fe{userNotification=fe("userNotification");_notificationSortType="createdAt";get notificationSortType(){return this.hasUnreadNotifications()?this._notificationSortType:"createdAt";}set notificationSortType(t){this._notificationSortType=t;}markAllAsRead(){this.userNotification().markAllAsRead();}hasUnreadNotifications(){return this.userNotification().notifications.filter(t=>t.payload.read===!1).length!==0;}onChangeSortColumn(){this.userNotification().changeSortColumn(this.notificationSortType);}};u(Fe,"\u0275fac",function(e){return new(e||Fe)();}),u(Fe,"\u0275cmp",N({type:Fe,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&Ae(n.userNotification,Xo,5),e&2&&Ee();},decls:17,vars:5,consts:()=>{let t;t="Newest first";let e;e="Unread first";let n;n="Notification preferences";let r;r="Mark all as read";let c;return c="All read",[["userNotification",""],t,e,n,r,c,[1,"header"],[1,"peertube-select-container","me-auto"],["aria-label","Sort by",1,"form-control",3,"ngModelChange","ngModel"],["value","createdAt"],["value","read",3,"disabled"],["routerLink","/my-account/settings","fragment","notifications",1,"peertube-button-link","secondary-button"],["iconName","cog","aria-hidden","true"],[1,"peertube-button","secondary-button",3,"click","disabled"],["inPopup","false"],["iconName","tick","aria-hidden","true"],["iconName","circle-tick","aria-hidden","true"]];},template:function(e,n){if(e&1){let r=R();i(0,"div",6)(1,"div",7)(2,"select",8),ce("ngModelChange",function(M){return E(r),Ce(n.notificationSortType,M)||(n.notificationSortType=M),S(M);}),O("ngModelChange",function(){return n.onChangeSortColumn();}),i(3,"option",9),s(4,1),o(),i(5,"option",10),s(6,2),o()()(),i(7,"a",11),d(8,"my-global-icon",12),i(9,"span"),s(10,3),o()(),i(11,"button",13),O("click",function(){return n.markAllAsRead();}),m(12,Do,3,0),m(13,ko,3,0),o()(),i(14,"div"),d(15,"my-user-notifications",14,0),o();}e&2&&(a(2),le("ngModel",n.notificationSortType),a(3),T("disabled",!n.hasUnreadNotifications()),a(6),T("disabled",!n.hasUnreadNotifications()),a(),p(n.hasUnreadNotifications()?12:-1),a(),p(n.hasUnreadNotifications()?-1:13));},dependencies:[Ct,Mn,ut,G,On,An,Nn,w,Pe,xn],styles:[".header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}"]}));var Rt=Fe;var zo=_=>({"input-error":_});function Vo(_,t){if(_&1&&(i(0,"my-alert",5),g(1),o()),_&2){let e=C();a(),h(e.error);}}function Wo(_,t){if(_&1&&(i(0,"my-alert",6),g(1),o()),_&2){let e=C();a(),h(e.success);}}function Ho(_,t){_&1&&(i(0,"div"),s(1,3),o());}function Bo(_,t){if(_&1){let e=R();i(0,"button",17),O("click",function(){E(e);let r=C(2);return S(r.resendVerificationEmail());}),s(1,4),o();}}function qo(_,t){if(_&1&&(i(0,"div",7)(1,"div"),k(2,2),d(3,"strong"),z(),o(),m(4,Ho,2,0,"div")(5,Bo,2,0,"button",16),o()),_&2){let e=C();a(3),V(e.user.pendingEmail),W(2),a(),p(e.verificationEmailSent?4:5);}}function Qo(_,t){if(_&1&&(i(0,"div",13),g(1),o()),_&2){let e=C();a(),h(e.formErrors["new-email"]);}}var me=class me extends re{formReactiveService=l(Z);authService=l(v);userService=l(x);serverService=l(X);verificationEmailSent=!1;error;success;user;ngOnInit(){this.buildForm({"new-email":zn,password:mo}),this.user=this.authService.getUser();}changeEmail(){this.error=null,this.success=null;let t=this.form.value.password,e=this.form.value["new-email"];rt([this.serverService.getConfig(),this.userService.changeEmail(t,e)]).pipe(rn(()=>this.authService.refreshUserInformation())).subscribe({next:([n])=>{this.form.reset(),n.signup.requiresEmailVerification?this.success="Please check your emails to verify your new email.":this.success="Email updated.";},error:n=>{if(n.status===K.UNAUTHORIZED_401){this.error="You current password is invalid.";return;}this.error=n.message;}});}resendVerificationEmail(){this.userService.askSendVerifyEmail(this.user.pendingEmail).subscribe({next:()=>{this.verificationEmailSent=!0;},error:t=>{this.error=t.message;}});}};u(me,"\u0275fac",(()=>{let t;return function(n){return(t||(t=te(me)))(n||me);};})()),u(me,"\u0275cmp",N({type:me,selectors:[["my-account-change-email"]],features:[ne],decls:15,vars:11,consts:()=>{let t;t="New email";let e;e="Current password";let n;n="Change email";let r;r="Change your email";let c;c=" Your current email is "+"\uFFFD#9\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#9\uFFFD"+"";let M;M=""+"\uFFFD#3\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#3\uFFFD"+" is awaiting email verification. ";let P;P="Email verification sent!";let $;return $="Resend your verification email",[r,c,M,P,$,["type","danger"],["type","success"],[1,"pending-email"],[1,"change-email",3,"ngSubmit","formGroup"],[1,"form-group"],["for","new-email"],[1,"form-group-description"],["type","email","id","new-email","placeholder",t,"formControlName","new-email",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["formControlName","password","inputId","password","placeholder",e,"autocomplete","current-password",3,"formError"],["type","submit","value",n,1,"peertube-button","primary-button",3,"disabled"],["type","button",1,"peertube-button-like-link"],["type","button",1,"peertube-button-like-link",3,"click"]];},template:function(e,n){e&1&&(m(0,Vo,2,1,"my-alert",5),m(1,Wo,2,1,"my-alert",6),m(2,qo,6,2,"div",7),i(3,"form",8),O("ngSubmit",function(){return n.changeEmail();}),i(4,"div",9)(5,"label",10),s(6,0),o(),i(7,"div",11),k(8,1),d(9,"strong"),z(),o(),d(10,"input",12),m(11,Qo,2,1,"div",13),o(),i(12,"div",9),d(13,"my-input-text",14),o(),d(14,"input",15),o()),e&2&&(p(n.error?0:-1),a(),p(n.success?1:-1),a(),p(n.user.pendingEmail?2:-1),a(),T("formGroup",n.form),a(6),V(n.user.email),W(8),a(),T("ngClass",st(9,zo,n.formErrors["new-email"])),a(),p(n.formErrors["new-email"]?11:-1),a(2),T("formError",n.formErrors.password),a(),T("disabled",!n.form.valid));},dependencies:[Ct,lt,G,B,ct,w,H,j,Q,q,_e,J],styles:["form[_ngcontent-%COMP%]{max-width:340px}my-input-text[_ngcontent-%COMP%]{display:block;width:100%}input[type=email][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=email][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=email][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=email][_ngcontent-%COMP%]:focus, input[type=email][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=email][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){input[type=email][_ngcontent-%COMP%]{width:100%}}.pending-email[_ngcontent-%COMP%]{margin-bottom:15px}"]}));var yt=me;function jo(_,t){if(_&1&&(i(0,"my-alert",1),g(1),o()),_&2){let e=C();a(),h(e.error);}}var pe=class pe extends re{formReactiveService=l(Z);notifier=l(y);authService=l(v);userService=l(x);serverService=l(X);error;user;ngOnInit(){let{minLength:t,maxLength:e}=this.serverService.getHTMLConfig().fieldsConstraints.users.password;this.buildForm({"current-password":Mt,"new-password":Wn(t,e),"new-confirmed-password":Hn}),this.user=this.authService.getUser();let n=this.form.get("new-confirmed-password");n.valueChanges.pipe(tn(r=>r!==this.form.value["new-password"])).subscribe(()=>n.setErrors({matchPassword:!0}));}changePassword(){let t=this.form.value["current-password"],e=this.form.value["new-password"];this.userService.changePassword(t,e).subscribe({next:()=>{this.notifier.success("Password updated."),this.form.reset(),this.error=null;},error:n=>{if(n.status===K.UNAUTHORIZED_401){this.error="You current password is invali
1d.";return;}this.error=n.message;}});}};u(pe,"\u0275fac",(()=>{let t;return function(n){return(t||(t=te(pe)))(n||pe);};})()),u(pe,"\u0275cmp",N({type:pe,selectors:[["my-account-change-password"]],features:[ne],decls:8,vars:6,consts:()=>{let t;t="Current password";let e;e="New password";let n;n="Confirm new password";let r;r="Change password";let c;return c="Change password",[c,["type","danger"],[3,"ngSubmit","formGroup"],["for","current-password"],["formControlName","current-password","inputId","current-password","placeholder",t,"autocomplete","current-password",3,"formError"],["formControlName","new-password","inputId","new-password","placeholder",e,"autocomplete","new-password",3,"formError"],["formControlName","new-confirmed-password","inputId","new-confirmed-password","placeholder",n,"autocomplete","new-password",3,"formError"],["type","submit","value",r,1,"mt-3","peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(m(0,jo,2,1,"my-alert",1),i(1,"form",2),O("ngSubmit",function(){return n.changePassword();}),i(2,"label",3),s(3,0),o(),d(4,"my-input-text",4)(5,"my-input-text",5)(6,"my-input-text",6)(7,"input",7),o()),e&2&&(p(n.error?0:-1),a(),T("formGroup",n.form),a(3),T("formError",n.formErrors["current-password"]),a(),T("formError",n.formErrors["new-password"]),a(),T("formError",n.formErrors["new-confirmed-password"]),a(),T("disabled",!n.form.valid));},dependencies:[G,B,w,H,j,Q,q,_e,J],styles:["form[_ngcontent-%COMP%]{max-width:340px}my-input-text[_ngcontent-%COMP%]{display:block;width:100%}my-input-text[_ngcontent-%COMP%] + my-input-text[_ngcontent-%COMP%]{margin-top:15px}"]}));var Ut=pe;var we=class we{authService=l(v);notifier=l(y);userService=l(x);confirmService=l(Re);redirectService=l(bn);user=oe(void 0);deleteMe(){return Oe(this,null,function*(){(yield this.confirmService.confirmWithExpectedInput("Are you sure you want to delete your account?"+"<br /><br />"+("This will delete all your data, including channels, videos, comments and you won't be able to create another user on this instance with \""+this.user().username+"\" username.")+"<br /><br />"+"Content cached by other servers and other third-parties might make longer to be deleted.","Type your username to confirm",this.user().username,"Delete your account","Delete my account"))!==!1&&this.userService.deleteMe().subscribe({next:()=>{this.notifier.success("Your account is deleted."),this.authService.logout(),this.redirectService.redirectToHomepage();},error:e=>this.notifier.handleError(e)});});}};u(we,"\u0275fac",function(e){return new(e||we)();}),u(we,"\u0275cmp",N({type:we,selectors:[["my-account-danger-zone"]],inputs:{user:[1,"user"]},decls:5,vars:0,consts:()=>{let t;t="Once you delete your account, there is no going back. You will be asked to confirm this action.";let e;return e="Delete your account",[t,e,[1,"delete-me"],[1,"peertube-button","danger-button",3,"click"]];},template:function(e,n){e&1&&(Gt(0,"div",2)(1,"p"),s(2,0),xt(),Gt(3,"button",3),ln("click",function(){return n.deleteMe();}),s(4,1),xt()());},encapsulation:2}));var It=we;function Zo(_,t){if(_&1&&(ae(0),k(1,0),d(2,"strong"),z(),se()),_&2){let e=C();a(2),V(e.user().email),W(1);}}function Jo(_,t){_&1&&(ae(0),s(1,1),se());}function Ko(_,t){_&1&&(ae(0),s(1,2),se());}var Me=class Me extends re{formReactiveService=l(Z);userService=l(x);notifier=l(y);user=ge(void 0);checkboxLabel;ngOnInit(){this.buildForm({"email-public":null}),this.form.patchValue({"email-public":this.user().emailPublic}),this.checkboxLabel="";}updateEmailPublic(){let t={emailPublic:this.form.value["email-public"]};this.userService.updateMyProfile(t).subscribe({next:()=>{t.emailPublic?this.notifier.success("Email is now public"):this.notifier.success("Email is now private"),this.user.update(e=>Jt(Zt({},e),{emailPublic:t.emailPublic}));},error:e=>this.notifier.handleError(e)});}};u(Me,"\u0275fac",(()=>{let t;return function(n){return(t||(t=te(Me)))(n||Me);};})()),u(Me,"\u0275cmp",N({type:Me,selectors:[["my-account-email-preferences"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},features:[ne],decls:9,vars:3,consts:()=>{let t;t="Save email settings";let e;e="Allow email "+"\uFFFD#2\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#2\uFFFD"+" to be publicly displayed";let n;n="Necessary to claim podcast RSS feeds.";let r;return r="\u26A0\uFE0F Your email cannot be used in podcast RSS feeds because it has not yet been verified.",[e,n,r,[3,"ngSubmit","formGroup"],[1,"form-group"],["inputName","email-public","formControlName","email-public"],["ptTemplate","label"],["ngProjectAs","de
1scription",5,["description"]],[1,"mb-0"],["type","submit","value",t,1,"peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(i(0,"form",3),O("ngSubmit",function(){return n.updateEmailPublic();}),i(1,"div",4)(2,"my-peertube-checkbox",5),at(3,Zo,3,1,"ng-template",6),ae(4,7),i(5,"p",8),m(6,Jo,2,0,"ng-container")(7,Ko,2,0,"ng-container"),o(),se(),o()(),d(8,"input",9),o()),e&2&&(T("formGroup",n.form),a(6),p(n.user().emailVerified?6:7),a(2),T("disabled",!n.form.valid));},dependencies:[G,B,w,H,j,Q,q,mt,Dn],encapsulation:2}));var ht=Me;function ei(_,t){_&1&&(i(0,"div"),s(1,2),o());}function ti(_,t){if(_&1){let e=R();i(0,"div")(1,"my-input-switch",5),ce("ngModelChange",function(r){E(e);let c=C(2).$implicit,M=C(4);return Ce(M.emailNotifications[c],r)||(M.emailNotifications[c]=r),S(r);}),O("ngModelChange",function(){E(e);let r=C(2).$implicit,c=C(4);return S(c.updateEmailSetting(r,c.emailNotifications[r]));}),o()();}if(_&2){let e=C(2).$implicit,n=C(4);a(),T("label",n.getEmailLabel(e))("inputName","email-notification-"+e),le("ngModel",n.emailNotifications[e]);}}function ni(_,t){if(_&1){let e=R();i(0,"div",4)(1,"div"),g(2),o(),i(3,"div")(4,"my-input-switch",5),ce("ngModelChange",function(r){E(e);let c=C().$implicit,M=C(4);return Ce(M.webNotifications[c],r)||(M.webNotifications[c]=r),S(r);}),O("ngModelChange",function(){E(e);let r=C().$implicit,c=C(4);return S(c.updateWebSetting(r,c.webNotifications[r]));}),o()(),m(5,ti,2,3,"div"),o();}if(_&2){let e=C().$implicit,n=C(4);a(2),h(n.labelNotifications[e]),a(2),T("label",n.getWebLabel(e))("inputName","web-notification-"+e),le("ngModel",n.webNotifications[e]),a(),p(n.emailEnabled?5:-1);}}function oi(_,t){if(_&1&&m(0,ni,6,5,"div",4),_&2){let e=t.$implicit,n=C(4);p(n.hasUserRight(e)?0:-1);}}function ii(_,t){if(_&1&&(i(0,"div",3)(1,"div"),s(2,0),o(),i(3,"div"),s(4,1),o(),m(5,ei,2,0,"div"),o(),tt(6,oi,1,1,null,null,et)),_&2){let e=C().$implicit,n=C(2);a(2),V(e.label),W(2),a(3),p(n.emailEnabled?5:-1),a(),nt(e.keys);}}function _i(_,t){if(_&1&&m(0,ii,8,2),_&2){let e=t.$implicit,n=C(2);p(n.hasNotificationsInGroup(e)?0:-1);}}function ri(_,t){if(_&1&&(i(0,"div"),tt(1,_i,1,1,null,null,et),o()),_&2){let e=C();a(),nt(e.notificationSettingGroups);}}var Ge=class Ge{userNotificationService=l(Gn);serverService=l(X);notifier=l(y);user=ge(void 0);notificationSettingGroups=[];emailNotifications={};webNotifications={};labelNotifications={};rightNotifications={};emailEnabled=!1;savePreferences=Pn(this.savePreferencesImpl.bind(this),500);constructor(){this.notificationSettingGroups=[{label:"Social",keys:["newVideoFromSubscription","newFollow","commentMention"]},{label:"Your videos",keys:["newCommentOnMyVideo","blacklistOnMyVideo","myVideoPublished","myVideoImportFinished","myVideoStudioEditionFinished","myVideoTranscriptionGenerated"]},{label:"Moderation",keys:["abuseStateChange","abuseNewMessage","abuseAsModerator","videoAutoBlacklistAsModerator","newUserRegistration"]},{label:"Administration",keys:["newInstanceFollower","autoInstanceFollowing","newPeerTubeVersion","newPluginVersion"]}],this.rightNotifications={abuseAsModerator:ie.MANAGE_ABUSES,videoAutoBlacklistAsModerator:ie.MANAGE_VIDEO_BLACKLIST,newUserRegistration:ie.MANAGE_USERS,newInstanceFollower:ie.MANAGE_SERVER_FOLLOW,autoInstanceFollowing:ie.MANAGE_CONFIGURATION,newPeerTubeVersion:ie.MANAGE_DEBUG,newPluginVersion:ie.MANAGE_DEBUG};}ngOnInit(){let t=this.serverService.getHTMLConfig();this.emailEnabled=t.email.enabled,this.labelNotifications={newVideoFromSubscription:"New video or live from your subscriptions",newCommentOnMyVideo:"New comment on your video",abuseAsModerator:"New abuse",videoAutoBlacklistAsModerator:"An automatically blocked video is awaiting review",blacklistOnMyVideo:"One of your video is blocked/unblocked",myVideoPublished:"Video published (after transcoding/scheduled update)",myVideoImportFinished:"Video import finished",newUserRegistration:"A new user registered on "+t.instance.name+"",newFollow:"You or one of your channels has a new follower",commentMention:"Someone mentioned you in video comments",newInstanceFollower:""+t.instance.name+" has a new follower",autoInstanceFollowing:""+t.instance.name+" automatically followed another platform",abuseNewMessage:"An abuse report received a new message",abuseStateChange:"One of your abuse reports has been accepted or rejected by moderators",newPeerTubeVersion:"A new PeerTube version is available",newPluginVersion:"One of your plugin/theme has a new available version",myVideoStudioEditionFinished:"Processing of edits has finished",myVideoTranscriptionGenerated:"The transcription of your video has been generated"},this.loadNotificationSettings();}hasUserRight(t){let e=this.rightNotifications[t];return e?this.user().hasRight(e):!0;}hasNotificationsInGroup(t){return t.keys.some(e=>this.hasUserRight(e));}getWebLabel(t){return`Toggle web notification for "${this.labelNotifications[t]}"`;}getEmailLabel(t){return`Toggle email notification for "${this.labelNotifications[t]}"`;}updateEmailSetting(t,e){this.user.update(n=>(n.notificationSettings[t]=e===!0?n.notificationSettings[t]|de.EMAIL:n.notificationSettings[t]&~de.EMAIL,n)),this.savePreferences();}updateWebSetting(t,e){this.user.update(n=>(n.notificationSettings[t]=e===!0?n.notificationSettings[t]|de.WEB:n.notificationSettings[t]&~de.WEB,n)),this.savePreferences();}savePreferencesImpl(){this.userNotificationService.updateNotificationSettings(this.user().notificationSettings).subscribe({next:()=>{this.notifier.success("Preferences saved",void 0,2e3);},error:t=>this.notifier.handleError(t)});}loadNotificationSettings(){for(let t of fn(this.user().notificationSettings)){let e=this.user().notificationSettings[t];this.emailNotifications[t]=!!(e&de.EMAIL),this.webNotifications[t]=!!(e&de.WEB);}}};u(Ge,"\u0275fac",function(e){return new(e||Ge)();}),u(Ge,"\u0275cmp",N({type:Ge,selectors:[["my-account-notification-preferences"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},decls:1,vars:1,consts:()=>{let t;t=""+"\uFFFD0\uFFFD"+"";let e;e="Web";let n;return n="Email",[t,e,n,[1,"header","notification-row"],[1,"small","notification-row"],[3,"ngModelChange","label","inputName","ngModel"]];},template:function(e,n){e&1&&m(0,ri,3,0,"div"),e&2&&p(n.webNotifications?0:-1);},dependencies:[po,G,w,Pe],styles:[".notification-row[_ngcontent-%COMP%]{display:flex;align-items:center;border-bottom:1px solid var(--bg-secondary-400)}.notification-row.header[_ngcontent-%COMP%]{font-weight:600;margin-top:10px}.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:10px}.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:350px}@media screen and (max-width:500px){.notification-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:auto;flex-grow:1}}"]}));var vt=Ge;var ai=_=>({"input-error":_});function si(_,t){if(_&1&&(i(0,"my-alert",4),g(1),o()),_&2){let e=C();a(),h(e.error);}}function li(_,t){if(_&1&&(i(0,"div",12),g(1),o()),_&2){let e=C();
1a(),h(e.formErrors["display-name"]);}}function Ci(_,t){if(_&1&&(i(0,"div",12),g(1),o()),_&2){let e=C();a(),h(e.formErrors.description);}}var Ne=class Ne extends re{formReactiveService=l(Z);notifier=l(y);userService=l(x);user=ge();error=null;ngOnInit(){this.buildForm({username:null,"display-name":Bn,description:qn}),this.form.controls.username.disable(),this.form.patchValue({username:this.user().username,"display-name":this.user().account.displayName,description:this.user().account.description});}get instanceHost(){return window.location.host;}updateMyProfile(){let t=this.form.value["display-name"],e=this.form.value.description||null;this.error=null,this.userService.updateMyProfile({displayName:t,description:e}).subscribe({next:()=>{this.user.update(n=>(n.account.displayName=t,n.account.description=e,n)),this.notifier.success("Profile updated.");},error:n=>this.error=n.message});}};u(Ne,"\u0275fac",(()=>{let t;return function(n){return(t||(t=te(Ne)))(n||Ne);};})()),u(Ne,"\u0275cmp",N({type:Ne,selectors:[["my-account-profile"]],inputs:{user:[1,"user"]},outputs:{user:"userChange"},features:[ne],decls:20,vars:11,consts:()=>{let t;t="Save profile";let e;e="Username";let n;n=" People can find you using @"+"\uFFFD0\uFFFD"+"@"+"\uFFFD1\uFFFD"+" ";let r;r="Display name";let c;return c="Description",[e,n,r,c,["type","danger"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","readonly","",1,"form-control"],[1,"form-group-description"],["for","display-name"],["type","text","id","display-name","formControlName","display-name",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText","supportRelMe","true"],["inputId","description","formControlName","description","markdownType","enhanced","withEmoji","true","withHtml","true",3,"formError"],["type","submit","value",t,1,"mt-3","peertube-button","primary-button",3,"disabled"]];},template:function(e,n){e&1&&(m(0,si,2,1,"my-alert",4),i(1,"form",5),O("ngSubmit",function(){return n.updateMyProfile();}),i(2,"div",6)(3,"label",7),s(4,0),o(),d(5,"input",8),i(6,"div",9),s(7,1),o()(),i(8,"div",6)(9,"label",10),s(10,2),o(),d(11,"input",11),m(12,li,2,1,"div",12),o(),i(13,"div",6)(14,"label",13),s(15,3),o(),d(16,"my-help",14)(17,"my-markdown-textarea",15),m(18,Ci,2,1,"div",12),o(),d(19,"input",16),o()),e&2&&(p(n.error?0:-1),a(),T("formGroup",n.form),a(6),V(n.user().username)(n.instanceHost),W(7),a(4),T("ngClass",st(9,ai,n.formErrors["display-name"])),a(),p(n.formErrors["display-name"]?12:-1),a(5),T("formError",n.formErrors.description),a(),p(n.formErrors.description?18:-1),a(),T("disabled",!n.form.valid));},dependencies:[G,B,ct,w,H,j,Q,q,lt,J,Xn,Zn],styles:["input#username[_ngcontent-%COMP%] + .muted[_ngcontent-%COMP%]{margin-top:5px}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{display:block;font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}textarea[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}textarea[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}textarea[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}textarea[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){textarea[_ngcontent-%COMP%]{width:100%}}textarea[_ngcontent-%COMP%]{color:var(--textarea-fg)!important;background-color:var(--textarea-bg)!important;height:150px;padding:var(--textarea-y-padding) var(--textarea-x-padding)}"]}));var Yt=Ne;var ci=()=>["/my-account/two-factor-auth"];function Ti(_,t){_&1&&(i(0,"p"),s(1,0),o(),i(2,"my-button",5),s(3,1),o()),_&2&&(a(2),T("ptRouterLink",cn(1,ci)));}function di(_,t){if(_&1){let e=R();i(0,"my-button",6),O("click",function(){E(e);let r=C();return S(r.disableTwoFactor());}),s(1,2),o();}}var xe=class xe{notifier=l(y);twoFactorService=l(ye);confirmService=l(Re);auth=l(v);user=oe(void 0);twoFactorEnabled=!1;ngOnInit(){this.twoFactorEnabled=this.user().twoFactorEnabled;}disableTwoFactor(){return Oe(this,null,function*(){let t="Are you sure you want to disable two factor authentication of your account?",{confirmed:e,password:n}=yield this.confirmService.confirmWithPassword({message:t,title:"Disable two factor"});e!==!1&&this.twoFactorService.disableTwoFactor({userId:this.user().id,currentPassword:n}).subscribe({next:()=>{this.twoFactorEnabled=!1,this.auth.refreshUserInformation(),this.notifier.success("Two factor authentication disabled");},error:r=>this.notifier.handleError(r)});});}};u(xe,"\u0275fac",function(e){return new(e||xe)();}),u(xe,"\u0275cmp",N({type:xe,selectors:[["my-account-two-factor-button"]],inputs:{user:[1,"user"]},decls:3,vars:2,consts:()=>{let t;t="Two factor authentication adds an additional layer of security to your account by requiring a numeric code from another device (most commonly mobile phones) when you log in.";let e;e="Enable two-factor authentication";let n;return n="Disable two-factor authentication",[t,e,n,[1,"two-factor"],["theme","primary"],["theme","primary",3,"ptRouterLink"],["theme","primary",3,"click"]];},template:function(e,n){e&1&&(i(0,"div",3),m(1,Ti,4,2),m(2,di,2,0,"my-button",4),o()),e&2&&(a(),p(n.twoFactorEnabled?-1:1),a(),p(n.twoFactorEnabled?2:-1));},dependencies:[wn],encapsulation:2}));var bt=xe;function ui(_,t){if(_&1){let e=R();i(0,"my-actor-avatar-edit",24),O("avatarChange",function(r){E(e);let c=C();return S(c.onAvatarChange(r));})("avatarDelete",function(){E(e);let r=C();return S(r.onAvatarDelete());}),o();}if(_&2){let e=C();T("avatars",e.user.account.avatars)("displayName",e.user.account.displayName)("username",e.user.username)("subscribers",e.user.account.followersCount);}}function mi(_,t){_&1&&(i(0,"div",17)(1,"div",13)(2,"h2"),s(3,9),o()(),i(4,"div",14),d(5,"my-account-change-password"),o()());}function pi(_,t){if(_&1&&(i(0,"div",17)(1,"div",13)(2,"h2"),s(3,10),o()(),i(4,"div",14),d(5,"my-account-two-factor-button",16),o()()),_&2){let e=C();a(5),T("user",e.user);}}function Mi(_,t){_&1&&d(0,"my-account-change-email");}var Le=class Le{viewportScroller=l(dn);userService=l(x);authService=l(v);notifier=l(y);user;lastScrollHash;get userInformationLoaded(){return this.authService.userInformationLoaded;}ngOnInit(){this.user=this.authService.getUser();}ngAfterViewChecked(){window.location.hash&&window.location.hash!==this.lastScrollHash&&(this.viewportScroller.scrollToAnchor(window.location.hash.replace("#","")),this.lastScrollHash=window.location.hash);}onAvatarChange(t){this.userService.changeAvatar(t).subscribe({next:e=>{this.notifier.success("Avatar changed."),this.user.updateAccountAvatar(e.avatars),this.user.account=Dt(this.user.account);},error:e=>dt({err:e,name:"avatar",notifier:this.notifier})});}onAvatarDelete(){this.userService.deleteAvatar().subscribe({next:()=>{this.notifier.success("Avatar deleted."),this.user.updateAccountAvatar(),this.user.account=Dt(this.user.account);},error:t=>this.notifier.error(t.message)});}};u(Le,"\u0275fac",function(e){return new(e||Le)();}),u(Le,"\u0275cmp",N({type:Le,selectors:[["my-account-settings"]],decls:54,vars:13,consts:()=>{let t;t="Settings";let e;e="PROFILE SETTINGS";let n;n="INTERFACE";let r;r="VIDEO SETTINGS";let c;c="NOTIFICATIONS";let M;M="ACCOUNT SESSIONS";let P;P="These are the devices currently logged in to your account.";let $;$="EMAIL";let U;U="DANGER ZONE";let D;D="PASSWORD";let I;return I="TWO-FACTOR AUTHENTICATION",[t,e,n,r,c,M,P,$,U,D,I,[1,"visually-hidden"],[1,"pt-two-cols","mt-3"],[1,"title-col"],[1,"content-col"],["actorType","account",1,"d-block","mb-3",3,"avatars","displayName","username","subscribers"],[3,"user"],[1,"pt-two-cols","mt-5"],["id","interface-settings",1,"anchor"],[3,"user","userInformationLoaded"],["id","video-settings",1,"anchor"],["id","notifications",1,"anchor"],[1,"d-block","mb-5",3,"user"],[1,"pt-title-danger"],["actorType","account",1,"d-block","mb-3",3,"avatarChange","avatarDelete","avatars","displayName","username","subscribers"]];},template:function(e,n){e&1&&(i(0,"h1",11),s(1,0),o(),i(2,"div",12)(3,"div",13)(4,"h2"),s(5,1),o()(),i(6,"div",14),m(7,ui,1,4,"my-actor-avatar-edit",15),d(8,"my-user-quota")(9,"my-account-profile",16),o()(),i(10,"div",17)(11,"div",13),d(12,"div",18),i(13,"h2"),s(14,2),o()(),i(15,"div",14),d(16,"my-user-interface-settings",19),o()(),i(17,"div",17)(18,"div",13),d(19,"div",20),i(20,"h2"),s(21,3),o()(),i(22,"div",14),d(23,"my-user-video-settings",19),o()(),i(24,"div",17)(25,"div",13),d(26,"div",21),i(27,"h2"),s(28,4),o()(),i(29,"div",14),d(30,"my-account-notification-preferences",16),o()(),m(31,mi,6,0,"div",17),m(32,pi,6,1,"div",17),i(33,"div",17)(34,"div",13)(35,"h2"),s(36,5),o()(),i(37,"div",14)(38,"p"),s(39,6),o(),d(40,"my-account-token-sessions",16),o()(),i(41,"div",17)(42,"div",13)(43,"h2"),s(44,7),o()(),i(45,"div",14),d(46,"my-account-email-preferences",22),m(47,Mi,1,0,"my-account-change-email"),o()(),i(48,"div",17)(49,"div",13)(50,"h2",23),s(51,8),o()(),i(52,"div",14),d(53,"my-account-danger-zone",16),o()()),e&2&&(a(7),p(n.user!=null&&n.user.account?7:-1),a(2),T("user",n.user),a(7),T("user",n.user)("userInformationLoaded",n.userInformationLoaded),a(7),T("user",n.user)("userInformationLoaded",n.userInformationLoaded),a(7),T("user",n.user),a(),p(n.user.pluginAuth===null?31:-1),a(),p(n.user.pluginAuth===null?32:-1),a(8),T("user",n.user),a(6),T("user",n.user),a(),p(n.user.pluginAuth===null?47:-1),a(6),T("user",n.user));},dependencies:[ao,uo,Yt,Ln,kn,vt,Ut,bt,ht,yt,It,ro],styles:[".content-col[_ngcontent-%COMP%]{max-width:800px}"]}));var $t=Le;function Ni(_,t){_&1&&(i(0,"div",7),s(1,0),o());}function Oi(_,t){if(_&1){let e=R();i(0,"form",10),O("ngSubmit",function(){E(e);let r=C(2);return S(r.requestTwoFactor());}),i(1,"label",11),s(2,1),o(),i(3,"div",12),s(4,2),o(),d(5,"my-input-text",13)(6,"input",14),o();}if(_&2){let e=C(2);T("formGroup",e.formPassword),a(5),T("formError",e.formErrorsPassword["current-password"]),a(),T("disabled",!e.formPassword.valid);}}function Ai(_,t){if(_&1){let e=R();i(0,"p"),s(1,3),o(),d(2,"qrcode",15),i(3,"div"),s(4,4),o(),i(5,"div",16),g(6),o(),i(7,"form",17),O("ngSubmit",function(){E(e);let r=C(2);return S(r.confirmTwoFactor());}),i(8,"label",18),s(9,5),o(),i(10,"div",12),s(11,6),o(),d(12,"my-input-text",19)(13,"input",20),o();}if(_&2){let e=C(2);a(2),T("qrdata",e.twoFactorURI)("width",256),a(4),h(e.twoFactorSecret),a(),T("formGroup",e.formOTP),a(5),T("show",!0)("formError",e.formErrorsOTP["otp-token"]),a(),T("disabled",!e.formOTP.valid);}}function Ei(_,t){if(_&1&&(i(0,"div",8),m(1,Oi,7,3,"form",9)(2,Ai,14,7),o()),_&2){let e=C();a(),p(e.step==="request"?1:e.step==="confirm"?2:-1);}}var Xe=class Xe{notifier=l(y);twoFactorService=l(ye);formReactiveService=l(Z);auth=l(v);router=l(pn);twoFactorAlreadyEnabled;step="request";twoFactorSecret;twoFactorURI;inPasswordStep=!0;formPassword;formErrorsPassword;formOTP;formErrorsOTP;user;requestToken;ngOnInit(){this.buildPasswordForm(),this.buildOTPForm(),this.user=this.auth.getUser(),this.twoFactorAlreadyEnabled=this.user.twoFactorEnabled;}requestTwoFactor(){this.twoFactorService.requestTwoFactor({userId:this.user.id,currentPassword:this.formPassword.value["current-password"]}).subscribe({next:({otpRequest:t})=>{this.requestToken=t.requestToken,this.twoFactorURI=t.uri,this.twoFactorSecret=t.secret.replace(/(.{4})/g,"$1 ").trim(),this.step="confirm";},error:t=>this.notifier.handleError(t)});}confirmTwoFactor(){this.twoFactorService.confirmTwoFactorRequest({userId:this.user.id,requestToken:this.requestToken,otpToken:this.formOTP.value["otp-token"]}).subscribe({next:()=>{this.notifier.success("Two factor authentication has been enabled."),this.auth.refreshUserInformation(),this.router.navigateByUrl("/my-account/settings");},error:t=>this.notifier.handleError(t)});}buildPasswordForm(){let{form:t,formErrors:e}=this.formReactiveService.buildForm({"current-password":Mt});this.formPassword=t,this.formErrorsPassword=e;}buildOTPForm(){let{form:t,formErrors:e}=this.formReactiveService.buildForm({"otp-token":Vn});this.formOTP=t,this.formErrorsOTP=e;}};u(Xe,"\u0275fac",function(e){return new(e||Xe)();}),u(Xe,"\u0275cmp",N({type:Xe,selectors:[["my-account-two-factor"]],decls:2,vars:2,consts:()=>{let t;t="Two factor authentication is already enabled.";let e;e="Current password";let n;n="Confirm";let r;r="Your password";
1let c;c="Confirm your password to enable two factor authentication";let M;M="Confirm";let P;P=" Scan this QR code into a TOTP app on your phone. This app will generate tokens that you will have to enter when logging in. ";let $;$="If you can't scan the QR code and need to enter it manually, here is the plain-text secret:";let U;U="Two-factor code";let D;return D="Enter the code generated by your authenticator app to confirm",[t,r,c,P,$,U,D,[1,"root","already-enabled"],[1,"root"],[3,"formGroup"],[3,"ngSubmit","formGroup"],["for","current-password"],[1,"form-group-description"],["formControlName","current-password","inputId","current-password","placeholder",e,"autocomplete","current-password",3,"formError"],["type","submit","value",n,1,"peertube-button","primary-button","mt-3",3,"disabled"],["level","Q",3,"qrdata","width"],[1,"secret-plain-text"],[1,"mt-3",3,"ngSubmit","formGroup"],["for","otp-token"],["formControlName","otp-token","inputId","otp-token","autocomplete","otp-token",3,"show","formError"],["type","submit","value",M,1,"peertube-button","primary-button","mt-3",3,"disabled"]];},template:function(e,n){e&1&&(m(0,Ni,2,0,"div",7),m(1,Ei,3,1,"div",8)),e&2&&(p(n.twoFactorAlreadyEnabled===!0?0:-1),a(),p(n.twoFactorAlreadyEnabled===!1?1:-1));},dependencies:[G,B,w,H,j,Q,q,_e,Mo],styles:[".root[_ngcontent-%COMP%]{max-width:600px}.secret-plain-text[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem}qrcode[_ngcontent-%COMP%]{display:inline-block;margin:auto}"]}));var Ft=Xe;var De=class De{pluginService=l(Fn);menuEntries=[];user;ngOnInit(){this.pluginService.ensurePluginsAreLoaded("my-account").then(()=>this.buildMenu());}buildMenu(){let t=this.pluginService.getAllRegisteredClientRoutesForParent("/my-account")||{};this.menuEntries=[{label:"Settings",routerLink:"/my-account/settings"},{label:"Notifications",routerLink:"/my-account/notifications"},{label:"Import/Export",routerLink:"/my-account/import-export"},{label:"Applications",routerLink:"/my-account/applications"},{label:"Moderation",routerLink:"/my-account/blocklist/accounts",children:[{label:"Muted accounts",routerLink:"/my-account/blocklist/accounts"},{label:"Muted servers",routerLink:"/my-account/blocklist/servers"},{label:"Abuse reports",routerLink:"/my-account/abuses"}]},...Object.values(t).map(e=>({label:e.menuItem?.label,routerLink:"/my-account/p/"+e.route}))];}};u(De,"\u0275fac",function(e){return new(e||De)();}),u(De,"\u0275cmp",N({type:De,selectors:[["my-account"]],decls:8,vars:1,consts:()=>{let t;t="My account";let e;return e="Skip the sub menu",[["myAccountContent",""],e,[1,"root"],[1,"margin-content"],["href","#my-account-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1",t,"h1Icon","cog",3,"menuEntries"],["tabindex","-1","id","my-account-content",1,"margin-content","pb-5","outline-0"]];},template:function(e,n){if(e&1){let r=R();i(0,"div",2)(1,"div",3)(2,"a",4),O("click",function(M){E(r);let P=Cn(6);return M.preventDefault(),S(P.focus());}),s(3,1),o(),d(4,"my-horizontal-menu",5),o(),i(5,"div",6,0),d(7,"router-outlet"),o()();}e&2&&(a(4),T("menuEntries",n.menuEntries));},dependencies:[Qn,mn],encapsulation:2}));var wt=De;var rl=[{path:"",component:wt,providers:[ee,ye,Jn,Kn,eo,_o,to],resolve:{user:so},canActivateChild:[$n],children:[{path:"",redirectTo:"settings",pathMatch:"full"},{path:"settings",component:$t,data:{meta:{title:"Account settings"}}},{path:"two-factor-auth",component:Ft,data:{meta:{title:"Two factor authentication"}}},{path:"video-channels",redirectTo:"/my-library/video-channels",pathMatch:"full"},{path:"video-playlists",redirectTo:"/my-library/video-playlists",pathMatch:"full"},{path:"video-playlists/create",redirectTo:"/my-library/video-playlists/create",pathMatch:"full"},{path:"video-playlists/:videoPlaylistId",redirectTo:"/my-library/video-playlists/:videoPlaylistId",pathMatch:"full"},{path:"video-playlists/update/:videoPlaylistId",redirectTo:"/my-library/video-playlists/update/:videoPlaylistId",pathMatch:"full"},{path:"videos",redirectTo:"/my-library/videos",pathMatch:"full"},{path:"video-imports",redirectTo:"/my-library/video-imports",pathMatch:"full"},{path:"subscriptions",redirectTo:"/my-library/subscriptions",pathMatch:"full"},{path:"ownership",redirectTo:"/my-library/ownership",pathMatch:"full"}
1,{path:"blocklist/accounts",component:Et,data:{meta:{title:"Muted accounts"}}},{path:"blocklist/servers",component:St,data:{meta:{title:"Muted servers"}}},{path:"history/videos",redirectTo:"/my-library/history/videos",pathMatch:"full"},{path:"notifications",component:Rt,data:{meta:{title:"Notifications"}}},{path:"abuses",component:Ot,data:{meta:{title:"My abuse reports"}}},{path:"applications",component:At,data:{meta:{title:"Applications"}}},{path:"videos/comments",redirectTo:"/my-library/videos/comments"},{path:"import-export",component:Pt,canDeactivate:[Yn],data:{meta:{title:"Import/Export"}}},{path:"watched-words/list",redirectTo:"/my-library/watched-words/list",pathMatch:"full"},{path:"auto-tag-policies",redirectTo:"/my-library/auto-tag-policies",pathMatch:"full"},{path:"p",children:[{path:"**",component:lo,data:{parentRoute:"/my-account",pluginScope:"my-account"}}]}]}];export{rl as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
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.