1"use strict";(self.webpackChunkPeerTube=self.webpackChunkPeerTube||[]).push([[7472],{67472:($,A,e)=>{e.d(A,{jT:()=>f.j,yC:()=>t.y});var f=e(63305),t=(e(82484),e(95390),e(24700))},95390:($,A,e)=>{e.d(A,{V:()=>B});var f=e(84099),N=e(91203),D=e(85036),t=e(20755),n=e(76521),P=e(76733),E=e(43226),m=e(99123),I=e(26754);function R(b,p){1&b&&(t.tHW(0,4,1),t._UZ(1,"span"),t.N_p())}function x(b,p){1&b&&(t.tHW(0,4,2),t._UZ(1,"span"),t.N_p())}function U(b,p){1&b&&(t.ynx(0),t.SDv(1,7),t.BQk())}function L(b,p){1&b&&(t.TgZ(0,"my-help"),t.YNc(1,U,2,0,"ng-template",6),t.qZA())}function y(b,p){1&b&&(t.ynx(0),t.SDv(1,8),t.BQk())}function F(b,p){1&b&&(t.TgZ(0,"my-help"),t.YNc(1,y,2,0,"ng-template",6),t.qZA())}let B=(()=>{var b;class p extends f.OI{constructor(u,S){super(),this.formReactiveService=u,this.notifier=S,this.interact=!1,this.showHelp=!1}ngOnInit(){this.buildForm({text:D.RJ})}onValidKey(){this.forceCheck(),this.form.valid&&this.formValidated()}formValidated(){let u=this.form.value.text||"";u=u.replace(/^@/,"");const[S,o]=u.split("@"),a=window.location.protocol;fetch(`${a}//${o}/.well-known/webfinger?resource=acct:${S}@${o}`).then(_=>_.json()).then(_=>{if(!_||!1===Array.isArray(_.links))throw new Error("Not links in webfinger response");const g=_.links.find(h=>h&&"string"==typeof h.template&&"http://ostatus.org/schema/1.0/subscribe"===h.rel);if(null!=g&&g.template.includes("{uri}"))return g.template.replace("{uri}",encodeURIComponent(this.uri));throw new Error("No subscribe template in webfinger response")}).then(window.open).catch(_=>{N.k.error(_),this.notifier.error("Cannot fetch information of this remote account")})}}return(b=p).\u0275fac=function(u){return new(u||b)(t.Y36(f.RL),t.Y36(n.d4))},b.\u0275cmp=t.Xpm({type:b,selectors:[["my-remote-subscribe"]],inputs:{uri:"uri",interact:"interact",showHelp:"showHelp"},features:[t.qOj],decls:9,vars:6,consts:function(){let M,u,S;return M="" + "\ufffd*5:1\ufffd\ufffd#1:1\ufffd" + "Remote subscribe" + "[\ufffd/#1:1\ufffd\ufffd/*5:1\ufffd|\ufffd/#1:2\ufffd\ufffd/*6:2\ufffd]" + "" + "\ufffd*6:2\ufffd\ufffd#1:2\ufffd" + "Remote interact" + "[\ufffd/#1:1\ufffd\ufffd/*5:1\ufffd|\ufffd/#1:2\ufffd\ufffd/*6:2\ufffd]" + "",M=t.Zx4(M),u=" You can subscribe to the channel via any ActivityPub-capable fediverse instance (PeerTube, Mastodon or Pleroma for example). ",S=" You can interact with this via any ActivityPub-capable fediverse instance (PeerTube, Mastodon or Pleroma for example). ",[["novalidate","",3,"formGroup","ngSubmit"],[1,"form-group"],["type","email","formControlName","text","placeholder","[email protected]",1,"form-control",3,"keyup.control.enter","keyup.meta.enter"],["type","submit",1,"btn","btn-sm","btn-remote-follow",3,"disabled"],M,[4,"ngIf"],["ptTemplate","customHtml"],u,S]},template:function(u,S){1&u&&(t.TgZ(0,"form",0),t.NdJ("ngSubmit",function(){return S.formValidated()}),t.TgZ(1,"div",1)(2,"input",2),t.NdJ("keyup.control.enter",function(){return S.onValidKey()})("keyup.meta.enter",function(){return S.onValidKey()}),t.qZA()(),t.TgZ(3,"button",3),t.tHW(4,4),t.YNc(5,R,2,0,"span",5),t.YNc(6,x,2,0,"span",5),t.N_p(),t.qZA(),t.YNc(7,L,2,0,"my-help",5),t.YNc(8,F,2,0,"my-help",5),t.qZA()),2&u&&(t.Q6J("formGroup",S.form),t.xp6(3),t.Q6J("disabled",!S.form.valid),t.xp6(2),t.Q6J("ngIf",!S.interact),t.xp6(1),t.Q6J("ngIf",S.interact),t.xp6(1),t.Q6J("ngIf",!S.interact&&S.showHelp),t.xp6(1),t.Q6J("ngIf",S.showHelp&&S.interact))},dependencies:[P.O5,E._Y,E.Fj,E.JJ,E.JL,E.sg,E.u,m.Y,I.I],styles:[".btn-remote-follow[_ngcontent-%COMP%]{line-height:23px;padding:4px 13px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px}.btn-remote-follow[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}.btn-remote-follow[_ngcontent-%COMP%]:focus, .btn-remote-follow.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}.btn-remote-follow[_ngcontent-%COMP%], .btn-remote-follow[_ngcontent-%COMP%]:active, .btn-remote-follow[_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}.btn-remote-follow[_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}.btn-remote-follow[disabled][_ngcontent-%COMP%], .btn-remote-follow.disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}.btn-remote-follow[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .btn-remote-follow[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .btn-remote-follow[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}"]}),p})()},24700:($,A,e)=>{e.d(A,{y:()=>n});var f=e(84099),N=e(16354),D=e(63305),t=e(20755);let n=(()=>{var P;class E{}return(P=E).\u0275fac=function(I){return new(I||P)},P.\u0275mod=t.oAB({type:P}),P.\u0275inj=t.cJS({providers:[D.j],imports:[N.n,f.hA]}),E})()},82484:($,A,e)=>{e.d(A,{h:()=>j});var f=e(30319),N=e(45623),D=e(45047),t=e(3508),n=e(20755),P=e(76521),E=e(63305),m=e(83473),I=e(76733),R=e(80839),x=e(95390),U=e(38141);function L(s,d){1&s&&(n.ynx(0),n.SDv(1,18),n.BQk())}
1function y(s,d){if(1&s&&(n.TgZ(0,"span"),n._uU(1),n.ynx(2),n.SDv(3,20),n.BQk(),n.qZA()),2&s){const r=n.oxw(3);n.xp6(1),n.AsE("",r.subscribeStatus(!0).length,"/",r.subscribed.size," ")}}function F(s,d){if(1&s&&(n.ynx(0),n.TgZ(1,"span"),n.SDv(2,19),n.qZA(),n.YNc(3,y,4,2,"span",10),n.BQk()),2&s){const r=n.oxw(2);n.xp6(3),n.Q6J("ngIf",r.isAtLeastOneChannelSubscribed)}}function B(s,d){if(1&s&&(n.TgZ(0,"span",21),n._uU(1),n.ALo(2,"myNumberFormatter"),n.qZA()),2&s){const r=n.oxw(2);n.xp6(1),n.hij(" ",n.lcZ(2,1,r.videoChannels[0].followersCount)," ")}}const b=function(s){return{"extra-text":s}};function p(s,d){if(1&s&&(n.TgZ(0,"span",16),n.YNc(1,L,2,0,"ng-container",10),n.YNc(2,F,4,1,"ng-container",10),n.qZA(),n.YNc(3,B,3,3,"span",17)),2&s){const r=n.oxw();n.Q6J("ngClass",n.VKq(4,b,r.isAtLeastOneChannelSubscribed)),n.xp6(1),n.Q6J("ngIf",r.isSingleSubscribe),n.xp6(1),n.Q6J("ngIf",!r.isSingleSubscribe),n.xp6(1),n.Q6J("ngIf",!r.isBigButton&&r.displayFollowers&&r.videoChannels.length>1&&0!==r.videoChannel.followersCount)}}function M(s,d){}function u(s,d){if(1&s){const r=n.EpF();n.TgZ(0,"button",24),n.NdJ("click",function(){n.CHM(r);const i=n.oxw(2);return n.KtG(i.subscribe())}),n.YNc(1,M,0,0,"ng-template",25),n.qZA()}if(2&s){n.oxw(2);const r=n.MAs(2);n.xp6(1),n.Q6J("ngTemplateOutlet",r)}}function S(s,d){if(1&s){const r=n.EpF();n.TgZ(0,"button",26),n.NdJ("click",function(){n.CHM(r);const i=n.oxw(2);return n.KtG(i.unsubscribe())}),n.ynx(1),n.SDv(2,27),n.BQk(),n.qZA()}if(2&s){const r=n.oxw(2);n.xp6(2),n.pQV(r.account+""),n.QtT(2)}}function o(s,d){if(1&s&&(n.YNc(0,u,2,1,"button",22),n.YNc(1,S,3,1,"button",23)),2&s){const r=n.oxw();n.Q6J("ngIf",!r.isAllChannelsSubscribed),n.xp6(1),n.Q6J("ngIf",r.isAllChannelsSubscribed)}}function a(s,d){1&s&&n.GkF(0)}function _(s,d){1&s&&n.GkF(0)}function g(s,d){1&s&&(n.TgZ(0,"span"),n.SDv(1,28),n.qZA())}function h(s,d){1&s&&(n.TgZ(0,"span"),n.SDv(1,29),n.qZA())}function C(s,d){if(1&s&&(n.TgZ(0,"button",30)(1,"div",31),n.SDv(2,32),n.qZA(),n._UZ(3,"my-remote-subscribe",33),n.qZA()),2&s){const r=n.oxw();n.xp6(3),n.Q6J("showHelp",!0)("uri",r.uri)}}const O=function(s,d,r){return{"subscribe-button":s,"unsubscribe-button":d,big:r}};let j=(()=>{var s;class d{constructor(l,i,c,v,w){this.authService=l,this.redirectService=i,this.notifier=c,this.userSubscriptionService=v,this.videoService=w,this.displayFollowers=!1,this.size="normal",this.subscribed=new Map}get handle(){return this.account?this.account.nameWithHost:this.videoChannel.name+"@"+this.videoChannel.host}get channelHandle(){return this.getChannelHandler(this.videoChannel)}get uri(){return this.account?this.account.url:this.videoChannels[0].url}get rssUri(){return(this.account?this.videoService.getAccountFeedUrls(this.account.id).find(i=>i.format===t.E1.RSS):this.videoService.getVideoChannelFeedUrls(this.videoChannels[0].id).find(i=>i.format===t.E1.RSS)).url}get videoChannel(){return this.videoChannels[0]}get isAllChannelsSubscribed(){return this.subscribeStatus(!0).length===this.videoChannels.length}get isAtLeastOneChannelSubscribed(){return this.subscribeStatus(!0).length>0}get isBigButton(){return this.isUserLoggedIn()&&this.videoChannels.length>1&&this.isAtLeastOneChannelSubscribed}get isSingleSubscribe(){return!this.account}ngOnInit(){this.loadSubscribedStatus()}ngOnChanges(){this.ngOnInit()}subscribe(){return this.isUserLoggedIn()?this.localSubscribe():this.gotoLogin()}localSubscribe(){const l=this.subscribeStatus(!1),i=this.videoChannels.map(c=>this.getChannelHandler(c)).filter(c=>l.includes(c)).map(c=>this.userSubscriptionService.addSubscription(c));(0,f.D)(i).subscribe({next:()=>{this.notifier.success(this.account?"Subscribed to all current channels of " + this.account.displayName + ". You will be notified of all their new videos.":"Subscribed to " + this.videoChannels[0].displayName + ". You will be notified of all their new videos.","Subscribed")},error:c=>this.notifier.error(c.message)})}unsubscribe(){this.isUserLoggedIn()&&this.localUnsubscribe()}localUnsubscribe(){const l=this.subscribeStatus(!0),i=this.videoChannels.map(c=>this.getChannelHandler(c)).filter(c=>l.includes(c)).map(c=>this.userSubscriptionService.deleteSubscription(c));(0,N.z)(...i).subscribe({complete:()=>{this.notifier.success(this.account?"Unsubscribed from all channels of " + this.account.nameWithHost + "":"Unsubscribed from " + this.videoChannels[0].nameWithHost + "","Unsubscribed")},error:c=>this.notifier.error(c.message)})}isUserLoggedIn(){return this.authService.isLoggedIn()}gotoLogin(){this.redirectService.redirectToLogin()}subscribeStatus(l){const i=[];for(const[c,v]of this.subscribed.entries())v===l&&i.push(c);return i}isSubscribedToAll(){return Array.from(this.subscribed.values()).every(l=>!0===l)}isRemoteSubscribeAvailable(){return this.isSingleSubscribe&&!this.isUserLoggedIn()}getChannelHandler(l){return l.name+"@"+l.host}loadSubscribedStatus(){if(this.isUserLoggedIn())for(const l of this.videoChannels){const i=this.getChannelHandler(l);this.subscribed.set(i,!1),(0,D.T)(this.userSubscriptionService.listenToSubscriptionCacheChange(i),this.userSubscriptionService.doesSubscriptionExist(i)).subscribe({next:c=>this.subscribed.set(i,c),error:c=>this.notifier.error(c.message)})}}}return(s=d).\u0275fac=function(l){return new(l||s)(n.Y36(P.e8),n.Y36(P.VH),n.Y36(P.d4),n.Y36(E.j),n.Y36(m.kI))},s.\u0275cmp=n.Xpm({type:s,selectors:[["my-subscribe-button"]],inputs:{account:"account",videoChannels:"videoChannels",displayFollowers:"displayFollowers",size:"size"},features:[n.TTD],decls:21,vars:13,consts:function(){let r,l,i,c,v,w,K,G,H,Z,W,Y;return r="Multiple ways to subscribe to the current channel",l="Open subscription dropdown",i="Using an ActivityPub account",c="Using a syndication feed",v="Subscribe via RSS",w="Subscribe",K="Subscribe to all channels",G="channels subscribed",H="{VAR_SELECT, select, undefined {Unsubscribe} other {Unsubscribe from all channels}}",H=n.Zx4(H,{VAR_SELECT:"\ufffd0\ufffd"}),Z="Subscribe with an account on this instance",W="Subscribe with your local account",Y="Subscribe with a remote account:",[["role","group",1,"btn-group-subscribe","btn-group",3,"ngClass"],["userLoggedOut",""],["userLoggedIn",""],[4,"ngIf","ngIfThe
1n"],["ngbDropdown","","autoClose","outside","placement","bottom-right bottom-left bottom auto","role","group","aria-label",r,1,"btn-group"],["ngbDropdownToggle","","aria-label",l,1,"btn","dropdown-toggle-split","last-in-group"],["ngbDropdownMenu","",1,"dropdown-menu"],[1,"dropdown-header"],i,[1,"dropdown-item",3,"click"],[4,"ngIf"],["class","dropdown-item dropdown-item-neutral",4,"ngIf"],[1,"dropdown-divider"],c,["target","_blank",1,"dropdown-item",3,"href"],v,[3,"ngClass"],["class","followers-count",4,"ngIf"],w,K,G,[1,"followers-count"],["type","button","class","btn",3,"click",4,"ngIf"],["type","button","class","btn","role","button",3,"click",4,"ngIf"],["type","button",1,"btn",3,"click"],[3,"ngTemplateOutlet"],["type","button","role","button",1,"btn",3,"click"],H,Z,W,[1,"dropdown-item","dropdown-item-neutral"],[1,"mb-1"],Y,[3,"showHelp","uri"]]},template:function(l,i){if(1&l&&(n.TgZ(0,"div",0),n.YNc(1,p,4,6,"ng-template",null,1,n.W1O),n.YNc(3,o,2,2,"ng-template",null,2,n.W1O),n.YNc(5,a,1,0,"ng-container",3),n.TgZ(6,"div",4)(7,"button",5),n.YNc(8,_,1,0,"ng-container",3),n.qZA(),n.TgZ(9,"div",6)(10,"h6",7),n.SDv(11,8),n.qZA(),n.TgZ(12,"button",9),n.NdJ("click",function(){return i.subscribe()}),n.YNc(13,g,2,0,"span",10),n.YNc(14,h,2,0,"span",10),n.qZA(),n.YNc(15,C,4,2,"button",11),n._UZ(16,"div",12),n.TgZ(17,"h6",7),n.SDv(18,13),n.qZA(),n.TgZ(19,"a",14),n.SDv(20,15),n.qZA()()()()),2&l){const c=n.MAs(2),v=n.MAs(4);n.Q6J("ngClass",n.kEZ(9,O,!i.isAllChannelsSubscribed,i.isAllChannelsSubscribed,i.isBigButton)),n.xp6(5),n.Q6J("ngIf",i.isUserLoggedIn())("ngIfThen",v),n.xp6(3),n.Q6J("ngIf",!i.isUserLoggedIn())("ngIfThen",c),n.xp6(5),n.Q6J("ngIf",!i.isUserLoggedIn()),n.xp6(1),n.Q6J("ngIf",i.isUserLoggedIn()),n.xp6(1),n.Q6J("ngIf",i.isRemoteSubscribeAvailable()),n.xp6(4),n.Q6J("href",i.rssUri,n.LSH)}},dependencies:[I.mk,I.O5,I.tP,R.jt,R.iD,R.Vi,x.V,U.m],styles:[".btn-group-subscribe[_ngcontent-%COMP%]{line-height:23px;border:0;font-weight:600;border-radius:3px!important;text-align:center;cursor:pointer;font-size:15px;padding:0}.btn-group-subscribe[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-inline-end:.25rem;margin-inline-start:.25rem}.btn-group-subscribe[_ngcontent-%COMP%] button.dropdown-toggle[_ngcontent-%COMP%]{font-size:15px;line-height:1.2}.btn-group-subscribe[_ngcontent-%COMP%]:not(.big){white-space:nowrap}.btn-group-subscribe.big[_ngcontent-%COMP%]{height:35px}.btn-group-subscribe.big[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:first-child{width:-webkit-max-content;width:max-content;min-width:175px}.btn-group-subscribe.big[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .extra-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{line-height:80%}.btn-group-subscribe.big[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .extra-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(:first-child){font-size:75%}.btn-group-subscribe[_ngcontent-%COMP%] > .dropdown[_ngcontent-%COMP%] > .dropdown-toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding-inline-end:.3125rem}.btn-group-subscribe[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{padding-inline-end:.25rem}.btn-group-subscribe[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%] + .dropdown[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{padding-inline-start:.125rem}.btn-group-subscribe[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%] + .dropdown[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:after{position:relative;top:1px}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{font-weight:600}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus, .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem var(--mainColorLightest)}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:active, .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{color:#fff;background-color:var(--mainColor)}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{color:#fff;background-color:var(--mainHoverColor)}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[disabled][_ngcontent-%COMP%], .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn.disabled[_ngcontent-%COMP%]{cursor:default;color:#fff;background-color:var(--inputBorderColor)}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:#fff}.btn-group-subscribe.subscribe-button[_ngcontent-%COMP%] span.followers-count[_ngcontent-%COMP%]{padding-inline-start:.3125rem}.btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{background-color:var(--greyBackgroun
1dColor);color:var(--greyForegroundColor);font-weight:600}.btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn.focus-visible[_ngcontent-%COMP%]{box-shadow:0 0 0 .2rem #5858580d}.btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:active, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[disabled][_ngcontent-%COMP%], .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn.disabled[_ngcontent-%COMP%]{color:var(--greyForegroundColor);background-color:var(--greySecondaryBackgroundColor)}.btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[disabled][_ngcontent-%COMP%], .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn.disabled[_ngcontent-%COMP%]{cursor:default}.btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .feather, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .material, .btn-group-subscribe.unsubscribe-button[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] my-global-icon[_ngcontent-%COMP%] .misc{color:var(--greyForegroundColor)}.btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{cursor:default}.btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer}@media screen and (max-width: 500px){.btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%]{white-space:normal}}.btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] .dropdown-item-neutral[_ngcontent-%COMP%]{cursor:default}.btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] .dropdown-item-neutral[_ngcontent-%COMP%]:hover, .btn-group-subscribe[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] .dropdown-item-neutral[_ngcontent-%COMP%]:focus{background-color:inherit}.btn-group-subscribe[_ngcontent-%COMP%] form{padding:.25rem 1rem}.btn-group-subscribe[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{line-height:23px;font-size:15px;padding:3px 15px;display:inline-block;width:100%;max-width:100%;color:var(--inputForegroundColor);background-color:var(--inputBackgroundColor);border:1px solid var(--inputBorderColor);border-radius:3px}.btn-group-subscribe[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--inputPlaceholderColor)}.btn-group-subscribe[_ngcontent-%COMP%] input[readonly][_ngcontent-%COMP%]{opacity:.7}@media screen and (max-width: calc(100% + 40px)){.btn-group-subscribe[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}}.extra-text[_ngcontent-%COMP%]{display:flex;flex-direction:column}.extra-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{line-height:75%}.extra-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(:first-child){font-size:60%;text-align:start}"]}),d})()},63305:($,A,e)=>{e.d(A,{j:()=>u});var p,f=e(58794),D=e(35484),t=e(78748),n=e(45047),P=e(71209),E=e(92425),m=e(17560),I=e(84787),R=e(31570),x=e(55333),U=e(2939),L=e(26007),y=e(83473),F=e(20553),B=e(20755),b=e(76521);const M=f("peertube:subscriptions:UserSubscriptionService");class u{constructor(o,a,_,g){this.authHttp=o,this.restExtractor=a,this.videoService=_,this.restService=g,this.existsSubject=new D.t(1),this.myAccountSubscriptionCache={},this.myAccountSubscriptionCacheObservable={},this.myAccountSubscriptionCacheSubject=new t.x,this.existsObservable=(0,n.T)((0,L.f8)({time:500,notifierObservable:this.existsSubject,bulkGet:this.doSubscriptionsExist.bind(this)}).pipe((0,E.U)(h=>h.response)),this.myAccountSubscriptionCacheSubject)}listFollowers(o){const{pagination:a,nameWithHost:_,search:g}=o;let h=`${u.BASE_ACCOUNTS_URL}/${_}/followers`,C=new U.LE;if(C=this.restService.addRestGetParams(C,this.restService.componentToRestPagination(a),"-createdAt"),g){const O=this.restService.parseQueryStringFilter(g,{channel:{prefix:"channel:"}});O.channel&&(h=`${u.BASE_VIDEO_CHANNELS_URL}/${O.channel}
1/followers`),C=this.restService.addObjectParams(C,{search:O.search})}return this.authHttp.get(h,{params:C}).pipe((0,m.K)(O=>this.restExtractor.handleError(O)))}getUserSubscriptionVideos(o){const{videoPagination:a,sort:_,skipCount:g}=o,h=this.restService.componentToRestPagination(a);let C=new U.LE;return C=this.restService.addRestGetParams(C,h,_),g&&(C=C.set("skipCount",g+"")),this.authHttp.get(u.BASE_USER_SUBSCRIPTIONS_URL+"/videos",{params:C}).pipe((0,I.w)(O=>this.videoService.extractVideos(O)),(0,m.K)(O=>this.restExtractor.handleError(O)))}deleteSubscription(o){return this.authHttp.delete(u.BASE_USER_SUBSCRIPTIONS_URL+"/"+o).pipe((0,R.b)(()=>{this.myAccountSubscriptionCache[o]=!1,this.myAccountSubscriptionCacheSubject.next(this.myAccountSubscriptionCache)}),(0,m.K)(_=>this.restExtractor.handleError(_)))}addSubscription(o){return this.authHttp.post(u.BASE_USER_SUBSCRIPTIONS_URL,{uri:o}).pipe((0,R.b)(()=>{this.myAccountSubscriptionCache[o]=!0,this.myAccountSubscriptionCacheSubject.next(this.myAccountSubscriptionCache)}),(0,m.K)(g=>this.restExtractor.handleError(g)))}listSubscriptions(o){const{pagination:a,search:_}=o,g=u.BASE_USER_SUBSCRIPTIONS_URL,h=this.restService.componentToRestPagination(a);let C=new U.LE;return C=this.restService.addRestGetParams(C,h),_&&(C=C.append("search",_)),this.authHttp.get(g,{params:C}).pipe((0,E.U)(O=>y.B1.extractVideoChannels(O)),(0,m.K)(O=>this.restExtractor.handleError(O)))}listenToMyAccountSubscriptionCacheSubject(){return this.myAccountSubscriptionCacheSubject.asObservable()}listenToSubscriptionCacheChange(o){if(o in this.myAccountSubscriptionCacheObservable)return this.myAccountSubscriptionCacheObservable[o];const a=this.existsObservable.pipe((0,x.h)(_=>void 0!==_[o]),(0,E.U)(_=>_[o]));return this.myAccountSubscriptionCacheObservable[o]=a,a}doesSubscriptionExist(o){return M("Running subscription check for %d.",o),o in this.myAccountSubscriptionCache?(M("Found cache for %d.",o),(0,P.of)(this.myAccountSubscriptionCache[o])):(this.existsSubject.next(o),M("Fetching from network for %d.",o),this.existsObservable.pipe((0,x.h)(a=>void 0!==a[o]),(0,E.U)(a=>a[o]),(0,R.b)(a=>this.myAccountSubscriptionCache[o]=a)))}doSubscriptionsExist(o){const a=u.BASE_USER_SUBSCRIPTIONS_URL+"/exist";let _=new U.LE;return _=this.restService.addObjectParams(_,{uris:o}),this.authHttp.get(a,{params:_}).pipe((0,R.b)(g=>{this.myAccountSubscriptionCache={...this.myAccountSubscriptionCache,...g}}),(0,m.K)(g=>this.restExtractor.handleError(g)))}}(p=u).BASE_USER_SUBSCRIPTIONS_URL=F.N.apiUrl+"/api/v1/users/me/subscriptions",p.BASE_VIDEO_CHANNELS_URL=F.N.apiUrl+"/api/v1/video-channels",p.BASE_ACCOUNTS_URL=F.N.apiUrl+"/api/v1/accounts",p.\u0275fac=function(o){return new(o||p)(B.LFG(U.eN),B.LFG(b.DI),B.LFG(y.kI),B.LFG(b.vg))},p.\u0275prov=B.Yz7({token:p,factory:p.\u0275fac})}}]);
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.