diff --git a/dist/fansubid/browser/794.775d16cd639a621b.js b/dist/fansubid/browser/794.775d16cd639a621b.js deleted file mode 100644 index af213ad60..000000000 --- a/dist/fansubid/browser/794.775d16cd639a621b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[794],{2794:(M,C,o)=>{o.r(C),o.d(C,{UserModule:()=>ee});var m=o(6895),l=o(1390),u=o(4006),U=o(7375),f=o(3170),g=o(6271),d=o(4249),D=o(2777),P=o(7355),w=o(210),_=o(6020),b=o(6436),p=o(4167),x=o(8613),T=o(2438),v=o(5934),t=o(4650),B=o(7009),Z=o(257),O=o(3e3),F=o(6382),G=o(8745),L=o(8058),q=o(8381),Q=o(8987),y=o(4859),H=o(3238),K=o(7392),E=o(6338),N=o(266),V=o(7567),j=o(8757),$=o(325);function z(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function W(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",32),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function X(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",34),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Terverifikasi"))}),t.qZA()}}function et(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Banned :: "+n.userBanned.reason))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","Banned :: ",e.userBanned.reason,"")}}function it(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.accountAge+" Years of Service"))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","",e.accountAge," Years of Service")}}function st(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Sharing is Caring"))}),t.qZA()}}function nt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",38),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Akun Private"))}),t.qZA()}}function ot(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",47),t._UZ(1,"img",48),t.TgZ(2,"a",49)(3,"span",50),t._uU(4),t.qZA(),t.TgZ(5,"span",51),t._uU(6),t.qZA()()()),2&i){const e=a.$implicit;t.MGl("routerLink","/fansub/",e.fansub_.slug,""),t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.fansub_.slug)}}function at(i,a){if(1&i&&(t.TgZ(0,"div",6)(1,"div",39)(2,"div",40)(3,"h2",41)(4,"b",42),t._uU(5,"Group Fansub"),t.qZA()()(),t.TgZ(6,"div",43)(7,"div",44)(8,"mat-selection-list",45),t.YNc(9,ot,7,4,"mat-list-option",46),t.qZA()()()()()),2&i){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function rt(i,a){if(1&i&&(t.TgZ(0,"button",52),t._UZ(1,"mat-icon",53),t._uU(2),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",e.userData.id," ")}}function lt(i,a){if(1&i&&(t.TgZ(0,"button",54),t._UZ(1,"mat-icon",55),t._uU(2),t.ALo(3,"date"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.xi3(3,1,e.userData.created_at,"d/M/yyyy, hh:mm:ss a z")," ")}}function ut(i,a){if(1&i&&(t.TgZ(0,"div",39),t._UZ(1,"app-material-expansion-panel",56),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function ct(i,a){1&i&&(t.TgZ(0,"div",39)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function pt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8),t.YNc(8,z,1,1,"mat-icon",9),t.YNc(9,W,1,1,"mat-icon",10),t.YNc(10,X,1,1,"mat-icon",11),t.YNc(11,tt,1,0,"mat-icon",12),t.YNc(12,et,1,1,"mat-icon",13),t.YNc(13,it,1,1,"mat-icon",14),t.YNc(14,st,1,0,"mat-icon",15),t.YNc(15,nt,1,0,"mat-icon",16),t.qZA(),t.YNc(16,at,10,2,"div",17),t.qZA()(),t.TgZ(17,"div",18)(18,"div",19)(19,"h1",20)(20,"b"),t._uU(21),t.qZA()()(),t.TgZ(22,"div",21),t.YNc(23,rt,3,1,"button",22),t.YNc(24,lt,4,4,"button",23),t.TgZ(25,"button",24),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.createMailbox())}),t._UZ(26,"mat-icon",25),t._uU(27),t.qZA()(),t.YNc(28,ut,2,1,"div",26),t.YNc(29,ct,3,0,"div",26),t.qZA()(),t.TgZ(30,"div",27)(31,"div",6)(32,"app-material-tab",28),t.NdJ("tableRowClicked",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.openBerkas(n))})("paginatorClicked",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onPaginatorClicked(n))})("serverSideFilter",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onServerSideFilter(n))})("serverSideOrder",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onServerSideOrder(n))}),t.qZA()()()(),t._UZ(33,"div",29)(34,"div",30),t.qZA()}if(2&i){const e=t.oxw();t.xp6(6),t.s9C("src",e.userData.image_url,t.LSH),t.xp6(2),t.Q6J("ngIf",e.userData.role===e.ADMIN),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.MODERATOR),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.FANSUBBER),t.xp6(1),t.Q6J("ngIf",e.userData.verified),t.xp6(1),t.Q6J("ngIf",e.userBanned),t.xp6(1),t.Q6J("ngIf",e.accountAge>0),t.xp6(1),t.Q6J("ngIf",e.count>0),t.xp6(1),t.Q6J("ngIf",e.userData.private),t.xp6(1),t.Q6J("ngIf",e.groupFansub.length>0),t.xp6(5),t.Oqu(e.userData.kartu_tanda_penduduk_.nama),t.xp6(2),t.Q6J("ngIf",e.userData.id),t.xp6(1),t.Q6J("ngIf",e.userData.created_at),t.xp6(3),t.AsE(" ",e.userData.username,"@",e.ENV.domain," "),t.xp6(1),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0),t.xp6(1),t.Udp("background-image","url("+e.userData.profile_.cover_url+")")}}let mt=(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I){this.snackBar=e,this.router=s,this.activatedRoute=n,this.gs=r,this.bs=c,this.fs=h,this.pi=A,this.us=k,this.ss=S,this.berkas=I,this.username="",this.userData=null,this.userBanned=null,this.groupFansub=[],this.berkasUser=[],this.allBerkasUserId=[],this.panelData=[],this.tabData=[{name:"Berkas",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsUser=null,this.subsBerkas=null,this.subsBanned=null,this.subsParam=null,this.subsGroupGet=null,this.subsTrusted=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}ngOnDestroy(){this.subsUser?.unsubscribe(),this.subsBerkas?.unsubscribe(),this.subsBanned?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsTrusted?.unsubscribe()}get ADMIN(){return d.yS.ADMIN}get MODERATOR(){return d.yS.MODERATOR}get FANSUBBER(){return d.yS.FANSUBBER}get accountAge(){return Math.abs(new Date(Date.now()-new Date(this.userData.created_at).getTime()).getUTCFullYear()-1970)}get ENV(){return v.N}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.username=e.username,this.bs.busy(),this.subsUser=this.us.getUserData(this.username).subscribe({next:s=>{this.gs.log("[USER_DETAIL_SUCCESS]",s),this.userData=s.result,this.pi.updatePageMetaData(this.userData.kartu_tanda_penduduk_.nama,this.userData.profile_.description,this.userData.username,this.userData.image_url,this.userData.username),this.bs.idle(),this.gs.isBrowser&&(this.panelData=[],this.panelData.push({title:"Tentang Saya",icon:"info",text:this.userData.profile_.description}),this.fs.initializeFab("edit",null,"Ubah Profil",`/user/${this.username}/edit`,!1),this.checkBanned(),this.getUserGroup(),this.getUserBerkas())},error:s=>{this.gs.log("[USER_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/"}})}})}})}checkBanned(){this.bs.busy(),this.subsBanned=this.us.checkBanned(this.userData.username).subscribe({next:e=>{this.gs.log("[USER_CHECK_BANNED_SUCCESS]",e),Object.keys(e.results[this.userData.username]).length>0&&(this.userBanned=e.results[this.userData.username]),this.bs.idle()},error:e=>{this.gs.log("[USER_CHECK_BANNED_ERROR]",e,"error"),this.bs.idle()}})}getUserBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.us.getUserBerkas(this.username,this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[USER_BERKAS_LIST_SUCCESS]",e),this.count=e.count,this.berkasUser=[];for(const s of e.results)this.allBerkasUserId.push(s.id),this.berkasUser.push({id:s.id,private:s.private,foto:s.user_.image_url,Proyek:s.project_type_.name,Tanggal:s.created_at,Kunjungan:s.view_count,Pemilik:s.user_.username,"Nama Berkas":s.name});this.tabData[0].data.row=this.berkasUser,this.allBerkasUserId.length>0&&this.checkTrusted(),this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_LIST_ERROR]",e,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted&&(this.subsTrusted.unsubscribe(),this.bs.idle()),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasUserId).subscribe({next:e=>{this.gs.log("[USER_BERKAS_TRUSTED_SUCCESS]",e);for(const s of this.berkasUser)s.trusted=e.results[s.id];this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_TRUSTED_ERROR]",e,"error"),this.bs.idle()}})}openBerkas(e){this.gs.log("[USER_BERKAS_LIST_CLICK_BERKAS]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}onPaginatorClicked(e){this.gs.log("[USER_BERKAS_LIST_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getUserBerkas()}onServerSideFilter(e){this.gs.log("[USER_BERKAS_LIST_ENTER_FILTER]",e),this.q=e,this.getUserBerkas()}onServerSideOrder(e){this.gs.log("[USER_BERKAS_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getUserBerkas()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}createMailbox(){this.router.navigate(["/create/mailbox"],{queryParams:{to:`${this.userData.username}@${v.N.domain}`}})}badgeClicked(e){this.snackBar.open(e,"Ok")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(B.ux),t.Y36(l.F0),t.Y36(l.gz),t.Y36(Z.U),t.Y36(O.z),t.Y36(F.r),t.Y36(G.Z),t.Y36(L.K),t.Y36(q.R),t.Y36(Q.A))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"profile-image",3,"src"],[1,"col-12","my-3"],["fontIcon","handyman","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","security","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","rate_review","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","verified","class","mx-1","matTooltip","Terverifikasi","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","lock","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","military_tech","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","volunteer_activism","class","mx-1","matTooltip","Sharing is Caring","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","sensor_occupied","class","mx-1","matTooltip","Akun Private","style","cursor: pointer;",3,"click",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"m-0","mt-auto"],[1,"row","p-3"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-4 text-truncate","matTooltip","Nomor ID Pengguna","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-8 text-truncate","matTooltip","Tanggal Bergabung","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","matTooltip","Alamat Surel","color","accent",1,"col","text-truncate",2,"overflow","hidden",3,"click"],["fontIcon","email",1,"me-1"],["class","row py-3",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],["fontIcon","handyman",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","security",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","rate_review",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","verified","matTooltip","Terverifikasi",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","lock",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","military_tech",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","volunteer_activism","matTooltip","Sharing is Caring",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","sensor_occupied","matTooltip","Akun Private",1,"mx-1",2,"cursor","pointer",3,"click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["type","button","mat-stroked-button","","matLine","","matTooltip","Nomor ID Pengguna","color","accent",1,"col-12","col-md-4","text-truncate",2,"overflow","hidden"],["fontIcon","accessibility_new",1,"me-1"],["type","button","mat-stroked-button","","matLine","","matTooltip","Tanggal Bergabung","color","accent",1,"col-12","col-md-8","text-truncate",2,"overflow","hidden"],["fontIcon","access_time",1,"me-1"],[3,"panelData"]],template:function(e,s){1&e&&t.YNc(0,pt,35,22,"div",0),2&e&&t.Q6J("ngIf",s.userData)},dependencies:[m.sg,m.O5,l.rH,y.lW,H.X2,K.Hw,E.eA,E.Ub,E.vS,N.gM,V.Q,j.H,$.Y,m.uU],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}.profile-image[_ngcontent-%COMP%]{width:50%}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}.profile-image[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})();var J=o(5861),_t=o(4425),Y=o(4137),gt=o(7845),dt=o(6781),ht=o(9731);let ft=(()=>{class i{constructor(e,s){this.api=e,this.gs=s}getUserApiKey(e){return this.api.getData(`/api-key?username=${e}`)}createApiKey(e){return this.api.postData("/api-key",e)}editApiKey(e,s){return this.api.putData(`/api-key/${e}`,s)}revokeApiKey(e){return this.api.deleteData(`/api-key/${e}`)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(ht.s),t.LFG(Z.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var bt=o(8020),xt=o(8616),vt=o(192),Ut=o(6766);function Tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",28),t.TgZ(2,"a",29),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.openComment(r))}),t.TgZ(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",31),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(4),t.Oqu(t.lcZ(5,2,e.created_at)),t.xp6(3),t.Oqu(e.comment)}}function Et(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Tt,8,4,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedKomentarData,0,5))}}function Ct(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",32),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",34),t._uU(7),t.qZA(),t.TgZ(8,"span",35),t._uU(9),t.qZA(),t.TgZ(10,"span",31),t._uU(11),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,5,e.created_at)),t.xp6(3),t.Oqu(e.type),t.xp6(2),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function At(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Ct,12,7,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedLikeDislikeData,0,5))}}function kt(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",36),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",35),t._uU(7),t.qZA(),t.TgZ(8,"span",31),t._uU(9),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,4,e.created_at)),t.xp6(3),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function St(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,kt,10,6,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedVisitData,0,5))}}function It(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",37),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw();return c.copyApiKey(r),t.KtG(c.editApiKey(r))}),t.TgZ(1,"p",38),t._uU(2," Nama :: "),t.TgZ(3,"span",39),t._uU(4),t.qZA()(),t.TgZ(5,"p",40),t._uU(6," Origin :: "),t.TgZ(7,"span",39),t._uU(8),t.qZA()(),t.TgZ(9,"p",41),t._uU(10," Key :: "),t.TgZ(11,"span",39),t._uU(12),t.qZA()(),t.TgZ(13,"a",17),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw();return n.stopPropagation(),t.KtG(h.revokeApiKey(c))}),t._UZ(14,"mat-icon",42),t._uU(15," Hapus Akses "),t.qZA()()}if(2&i){const e=a.$implicit;t.xp6(4),t.hij(" ",e.name," "),t.xp6(4),t.hij(" ",e.ip_domain," "),t.xp6(4),t.hij(" ",e.api_key," ")}}function Dt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.editSubDomain(r.fansub_))}),t._UZ(1,"img",47),t.TgZ(2,"a",48),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw(2);return n.stopPropagation(),t.KtG(h.revokeDns(c.fansub_))}),t._UZ(3,"mat-icon",42),t.qZA(),t.TgZ(4,"a",49)(5,"span",50),t._uU(6),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"span",39),t._uU(9),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(5),t.hij(" ",t.xi3(7,3,e.updated_at,"d-MM-y")," "),t.xp6(3),t.Oqu(e.fansub_.slug)}}function Zt(i,a){if(1&i&&(t.TgZ(0,"div",43)(1,"div",44)(2,"mat-selection-list",25),t.YNc(3,Dt,10,6,"mat-list-option",45),t.qZA()()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function yt(i,a){1&i&&t._UZ(0,"app-no-data",51)}let Rt=(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I,ie,se){this.clipboard=e,this.router=s,this.snackBar=n,this.as=r,this.ds=c,this.gs=h,this.fs=A,this.bs=k,this.us=S,this.fansub=I,this.aks=ie,this.wb=se,this.feedKomentarData=[],this.feedLikeDislikeData=[],this.feedVisitData=[],this.subsFeedKomentar=null,this.subsFeedLikeDislike=null,this.subsFeedVisit=null,this.subsGetApiKey=null,this.subsDialog=null,this.subsCreateApiKey=null,this.subsEditApiKey=null,this.subsRevokeApiKey=null,this.subsGroupGet=null,this.subsUpdateSubDomain=null,this.subsGetSubDomain=null,this.apiKey=[],this.groupFansub=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get ENV(){return v.N}ngOnInit(){this.gs.isBrowser&&(this.getUserFeedComment(),this.getUserFeedLikeDislike(),this.getUserFeedVisit(),this.getUserApiKey(),this.getUserGroup(),this.fs.initializeFab("arrow_forward",null,"Menuju Halaman Profile",`/user/${this.as.currentUserSubject?.value?.username}`,!1))}ngOnDestroy(){this.subsFeedKomentar?.unsubscribe(),this.subsFeedLikeDislike?.unsubscribe(),this.subsFeedVisit?.unsubscribe(),this.subsGetApiKey?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsCreateApiKey?.unsubscribe(),this.subsEditApiKey?.unsubscribe(),this.subsRevokeApiKey?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsUpdateSubDomain?.unsubscribe(),this.subsGetSubDomain?.unsubscribe()}getUserFeedComment(){this.bs.busy(),this.subsFeedKomentar=this.us.getUserFeedComment(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_COMMENT_SUCCESS]",e),this.feedKomentarData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_COMMENT_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedLikeDislike(){this.bs.busy(),this.subsFeedLikeDislike=this.us.getUserFeedLikeDislike(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_SUCCESS]",e),this.feedLikeDislikeData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedVisit(){this.bs.busy(),this.subsFeedVisit=this.us.getUserFeedVisit(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.feedVisitData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}getUserApiKey(){this.bs.busy(),this.subsGetApiKey=this.aks.getUserApiKey(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.apiKey=e.results[this.as.currentUserSubject?.value?.username],this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}copyApiKey(e){this.clipboard.copy(e.api_key)&&this.snackBar.open("API Key :: Telah Di Salin Pada Clipboard","Ok")}generateNewApiKey(){this.subsDialog=this.ds.openInputDialog({data:{title:"Tambah API Key Baru",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:`${this.as.currentUserSubject?.value?.username}_${Date.now()}`,inputValue:null,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:"example.com; 1.1.1.1; *",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:e=>{this.gs.log("[INPUT_DIALOG_CLOSED]",e),e&&(this.bs.busy(),this.subsCreateApiKey=this.aks.createApiKey({name:e.name,ip_domain:e.ip_domain}).subscribe({next:s=>{this.gs.log("[USER_CREATE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_CREATE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}editApiKey(e){this.subsDialog=this.ds.openInputDialog({data:{title:"Ubah API Key",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:e.name,inputValue:e.name,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:e.ip_domain,inputValue:e.ip_domain,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:s=>{this.gs.log("[INPUT_DIALOG_CLOSED]",s),s&&(this.bs.busy(),this.subsEditApiKey=this.aks.editApiKey(e.id,{name:s.name,ip_domain:s.ip_domain}).subscribe({next:n=>{this.gs.log("[USER_EDIT_APIKEY_SUCCESS]",n),this.bs.idle(),this.getUserApiKey()},error:n=>{this.gs.log("[USER_EDIT_APIKEY_ERROR]",n,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}revokeApiKey(e){var s=this;return(0,J.Z)(function*(){s.subsDialog=(yield s.ds.openKonfirmasiDialog(`Hapus API Key -- '${e.api_key}'`,`Apakah Yakin Akan Menghapus ${e.ip_domain} ?`,!1)).afterClosed().subscribe({next:n=>{s.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n&&(s.bs.busy(),s.subsRevokeApiKey=s.aks.revokeApiKey(e.id).subscribe({next:r=>{s.gs.log("[USER_REVOKE_APIKEY_SUCCESS]",r),s.bs.idle(),s.getUserApiKey()},error:r=>{s.gs.log("[USER_REVOKE_APIKEY_ERROR]",r,"error"),s.bs.idle(),s.getUserApiKey()}})),s.subsDialog.unsubscribe()}})})()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}editSubDomain(e){this.bs.busy(),this.subsGetSubDomain=this.fansub.getSubDomain(e.slug).subscribe({next:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_SUCCESS]",s),this.bs.idle();const n=s.result;this.subsDialog=this.ds.openInputDialog({data:{title:`Ubah CNAME / A Record IP v4 v6 :: '${e.slug}'`,input:{server_target:{inputLabel:"Server Target Domain IP Publik",inputPlaceholder:"127.0.0.1 | ghs.google.com | blablabla.id.repl.co",inputValue:n.dns_id.content,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger / Replit",inputPlaceholder:"blablabla-name | slug-fs",inputValue:n.dns_id_alt?.name,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger / Replit",inputPlaceholder:"blablabla-target.dv.googlehosted.com | replit-verify=blablabla",inputValue:n.dns_id_alt?.content,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger / Replit"}}).afterClosed().subscribe({next:r=>{this.gs.log("[INPUT_DIALOG_CLOSED]",r),r&&(this.bs.busy(),this.subsUpdateSubDomain=this.fansub.updateSubDomain(e.slug,{server_target:r.server_target,verification_name:r.verification_name,verification_target:r.verification_target}).subscribe({next:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_SUCCESS]",c),this.bs.idle(),this.getUserGroup()},error:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_ERROR]",c,"error"),this.bs.idle(),this.getUserGroup()}})),this.subsDialog.unsubscribe()}})},error:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_ERROR]",s,"error"),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:`Sepertinya Sub-Domain '${e.slug}' Belum Di Klaim`,htmlMessage:"Silahkan ambil sub-domain pada halaman fansub, ingin ke sana sekarang?",confirmText:"Ya",cancelText:"Tidak"},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n?this.router.navigateByUrl(`/fansub/${e.slug}`):this.getUserGroup(),this.subsDialog.unsubscribe()}})}})}openComment(e){this.router.navigate([e.path],{queryParams:{comment:e.id}})}openApiDocs(){this.wb.winboxOpenUri(`${v.N.baseUrl}/api`,"_self",!0)}revokeDns(e){var s=this;return(0,J.Z)(function*(){s.subsDialog=(yield s.ds.openKonfirmasiDialog(`Hapus Sub-Domain -- '${e.slug}'`,"Apakah Yakin Ingin Menghapus / Nonaktifkan Sub-Domain ?",!1)).afterClosed().subscribe({next:n=>{s.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n&&(s.bs.busy(),s.subsRevokeApiKey=s.fansub.revokeDomain(e.slug).subscribe({next:r=>{s.gs.log("[USER_REVOKE_DNS_SUCCESS]",r),s.bs.idle()},error:r=>{s.gs.log("[USER_REVOKE_DNS_ERROR]",r,"error"),s.bs.idle()}})),s.subsDialog.unsubscribe()}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_t.TU),t.Y36(l.F0),t.Y36(B.ux),t.Y36(Y.e),t.Y36(gt.x),t.Y36(Z.U),t.Y36(F.r),t.Y36(O.z),t.Y36(L.K),t.Y36(dt.T),t.Y36(ft),t.Y36(bt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-list"]],decls:65,vars:12,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["class","col-12",4,"ngIf","ngIfElse"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["matTooltip","Khusus Pengguna Terverifikasi",1,"text-bifeldy"],[1,"col-12","mb-2"],["mat-button","","color","accent","matTooltip","Buka Kotak Pesan","routerLink","/mailbox",1,"w-100"],["fontIcon","email",1,"me-1"],[1,"text-bifeldy",3,"matTooltip"],["mat-button","","color","accent",1,"w-100",3,"click"],["fontIcon","api",1,"me-1"],["fontIcon","webhook",1,"me-1"],["class","my-2 gradient-border",3,"click",4,"ngFor","ngForOf"],[1,"row","mt-4"],[1,"border-bottom-dotted"],["class","col-12 mb-2","style","max-height: 288px;",4,"ngIf","ngIfElse"],["noData",""],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning"],["fontIcon","volunteer_activism","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"routerLink"],[1,"me-3","text-success"],[1,"me-3","text-info"],["fontIcon","directions_run","mat-list-icon","",1,"ps-3"],[1,"my-2","gradient-border",3,"click"],[1,"ps-2","pe-2","pt-2","text-truncate","my-0"],[1,"text-success"],[1,"ps-2","pe-2","pt-0","text-truncate","my-0"],[1,"ps-2","pe-2","pb-2","text-truncate","my-0"],["fontIcon","delete_sweep",1,"me-1"],[1,"col-12","mb-2",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],["class","h-100",3,"click",4,"ngFor","ngForOf"],[1,"h-100",3,"click"],["matListAvatar","",2,"border-radius","0",3,"src"],["mat-button","","matListAvatar","","color","accent",2,"border-radius","0",3,"click"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"col-12","p-3"]],template:function(e,s){if(1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"span",6),t.NdJ("click",function(){return s.getUserFeedComment()}),t._uU(8," Refresh "),t.qZA(),t.TgZ(9,"b",7),t._uU(10,"Riwayat Komentar"),t.qZA()()(),t.YNc(11,Et,4,6,"div",8),t.qZA(),t.TgZ(12,"div",3)(13,"div",4)(14,"h2",5)(15,"span",6),t.NdJ("click",function(){return s.getUserFeedLikeDislike()}),t._uU(16," Refresh "),t.qZA(),t.TgZ(17,"b",7),t._uU(18,"Riwayat Like & Dislike"),t.qZA()()(),t.YNc(19,At,4,6,"div",8),t.qZA(),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"span",6),t.NdJ("click",function(){return s.getUserFeedVisit()}),t._uU(24," Refresh "),t.qZA(),t.TgZ(25,"b",7),t._uU(26,"Riwayat Kunjungan"),t.qZA()()(),t.YNc(27,St,4,6,"div",8),t.qZA()(),t.TgZ(28,"div",9)(29,"div",10)(30,"div",11)(31,"div",3)(32,"div",4)(33,"h2",5)(34,"b",12),t._uU(35,"Alamat Email"),t.qZA()()(),t.TgZ(36,"div",13)(37,"a",14),t._UZ(38,"mat-icon",15),t._uU(39),t.qZA()()(),t.TgZ(40,"div",3)(41,"div",4)(42,"h2",5)(43,"span",6),t.NdJ("click",function(){return s.getUserApiKey()}),t._uU(44," Refresh "),t.qZA(),t.TgZ(45,"b",16),t._uU(46,"API Key"),t.qZA()()(),t.TgZ(47,"div",13)(48,"a",17),t.NdJ("click",function(){return s.openApiDocs()}),t._UZ(49,"mat-icon",18),t._uU(50," Lihat API Endpoint "),t.qZA(),t.TgZ(51,"a",17),t.NdJ("click",function(){return s.generateNewApiKey()}),t._UZ(52,"mat-icon",19),t._uU(53," Buat API Key Baru "),t.qZA(),t.YNc(54,It,16,3,"div",20),t.qZA()(),t.TgZ(55,"div",21)(56,"div",4)(57,"h2",22)(58,"span",6),t.NdJ("click",function(){return s.getUserGroup()}),t._uU(59," Refresh "),t.qZA(),t.TgZ(60,"b",7),t._uU(61,"DNS Fansub"),t.qZA()()(),t.YNc(62,Zt,4,2,"div",23),t.qZA()()()()()(),t.YNc(63,yt,1,0,"ng-template",null,24,t.W1O)),2&e){const n=t.MAs(64);t.xp6(11),t.Q6J("ngIf",s.feedKomentarData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedLikeDislikeData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedVisitData.length>0)("ngIfElse",n),t.xp6(12),t.AsE(" '",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value.username,"@",s.ENV.domain,"' "),t.xp6(6),t.MGl("matTooltip","Aktivitas Terakhir :: ",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value._session_origin,""),t.xp6(9),t.Q6J("ngForOf",s.apiKey),t.xp6(8),t.Q6J("ngIf",s.groupFansub.length>0)("ngIfElse",n)}},dependencies:[m.sg,m.O5,l.yS,y.zs,K.Hw,E.eA,E.Nh,E.Ub,E.vS,N.gM,xt.t,vt.d,m.OU,m.uU,Ut.R]}),i})();var Pt=o(6925),wt=o(7902),Ot=o(8379),R=o(9549),Lt=o(4144),Kt=o(455),Nt=o(3626);function Mt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imagePhotoLimitExceeded)," !")}}function Bt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imagePhotoErrorText)}}function Ft(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",46)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitPhotoImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Tidak Boleh Kosong"),t.qZA())}function Yt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageCoverLimitExceeded)," !")}}function qt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageCoverErrorText)}}function Qt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitCoverImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Tidak Boleh Kosong"),t.qZA())}function Vt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function zt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"form",1),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),t._UZ(7,"img",8),t.TgZ(8,"mat-form-field",9)(9,"mat-label"),t._uU(10,"Profile Image"),t.qZA(),t.TgZ(11,"ngx-mat-file-input",10,11),t.NdJ("change",function(n){t.CHM(e);const r=t.MAs(12),c=t.oxw();return t.KtG(c.uploadPhotoImage(n,r))}),t.qZA(),t._UZ(13,"mat-icon",12),t.qZA(),t.TgZ(14,"mat-error",13)(15,"small"),t.YNc(16,Mt,3,3,"div",14),t.YNc(17,Bt,2,1,"div",14),t.qZA()()(),t.YNc(18,Ft,4,1,"div",15),t.TgZ(19,"div",16)(20,"mat-slide-toggle",17),t._uU(21," Jadikan Private, Sembunyikan Aktivitas "),t.qZA()(),t.TgZ(22,"div",18),t._uU(23," * Jika ingin mengubah "),t.TgZ(24,"i"),t._uU(25,"username"),t.qZA(),t._uU(26," silahkan menghubungi Admin menggunakan surel "),t.TgZ(27,"span",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.changeUname())}),t._uU(28),t.qZA()()()(),t.TgZ(29,"div",20),t._UZ(30,"div",21),t.TgZ(31,"div",22)(32,"mat-form-field",23)(33,"mat-label"),t._uU(34,"Nama Lengkap"),t.qZA(),t._UZ(35,"input",24)(36,"mat-icon",25),t.TgZ(37,"mat-error"),t.YNc(38,Jt,2,0,"div",14),t.YNc(39,Yt,2,0,"div",14),t.qZA()(),t.TgZ(40,"mat-form-field",26)(41,"mat-label"),t._uU(42,"Cover Image"),t.qZA(),t.TgZ(43,"ngx-mat-file-input",27,28),t.NdJ("change",function(n){t.CHM(e);const r=t.MAs(44),c=t.oxw();return t.KtG(c.uploadCoverImage(n,r))}),t.qZA(),t._UZ(45,"mat-icon",12),t.qZA(),t.TgZ(46,"mat-error",13)(47,"small"),t.YNc(48,Gt,3,3,"div",14),t.YNc(49,qt,2,1,"div",14),t.qZA()(),t.YNc(50,Qt,4,1,"div",29),t._UZ(51,"angular-editor",30),t.TgZ(52,"mat-form-field",31)(53,"mat-label"),t._uU(54,"Konfirmasi Kata Sandi"),t.qZA(),t._UZ(55,"input",32),t.TgZ(56,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(57,"mat-icon",34),t.qZA(),t.TgZ(58,"mat-error"),t.YNc(59,Ht,2,0,"div",14),t.YNc(60,Vt,2,0,"div",14),t.YNc(61,jt,2,0,"div",14),t.qZA()(),t.TgZ(62,"mat-form-field",31)(63,"mat-label"),t._uU(64,"Ubah Kata Sandi"),t.qZA(),t._UZ(65,"input",35),t.TgZ(66,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(67,"mat-icon",34),t.qZA(),t.TgZ(68,"mat-error"),t.YNc(69,$t,2,0,"div",14),t.YNc(70,zt,2,0,"div",14),t.qZA()()(),t.TgZ(71,"div",36)(72,"div",7)(73,"div",37),t._UZ(74,"div",38),t.TgZ(75,"div",39)(76,"a",40),t._UZ(77,"mat-icon",41),t._uU(78," Batal "),t.qZA()(),t.TgZ(79,"div",39)(80,"button",42),t._uU(81," Simpan "),t._UZ(82,"mat-icon",43),t.qZA()()()()()()()(),t._UZ(83,"div",44)(84,"div",45),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("formGroup",e.fg),t.xp6(7),t.s9C("src",e.image_photo,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imagePhotoLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imagePhotoErrorText),t.xp6(1),t.Q6J("ngIf",e.imagePhoto&&!e.fg.value.image_photo),t.xp6(10),t.AsE("",e.userData.username,"@",e.ENV.domain,""),t.xp6(4),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("nama").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("nama").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageCoverLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageCoverErrorText),t.xp6(1),t.Q6J("ngIf",e.imageCover&&!e.fg.value.image_cover),t.xp6(1),t.Q6J("config",e.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("old_password").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("new_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("new_password").hasError("pattern")),t.xp6(6),t.Q6J("disabled",e.submitted),t.xp6(4),t.Q6J("disabled",e.submitted||e.fg.invalid||!e.fg.dirty),t.xp6(3),t.Udp("background-image","url("+e.image_cover+")")}}const te=[{path:"",pathMatch:"full",component:Rt,canActivate:[D.t],data:{[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}},{path:":username",children:[{path:"",pathMatch:"full",component:mt},{path:"edit",component:(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I){this.router=e,this.activatedRoute=s,this.toast=n,this.bs=r,this.us=c,this.fb=h,this.imgbb=A,this.gs=k,this.as=S,this.cs=I,this.submitted=!1,this.username=null,this.userData=null,this.imagePhoto=null,this.imagePhotoErrorText=null,this.imagePhotoLimitExceeded=null,this.image_photo=null,this.image_photo_original=null,this.imageCover=null,this.imageCoverErrorText=null,this.imageCoverLimitExceeded=null,this.image_cover=null,this.image_cover_original=null,this.passwordHide=!0,this.photoImage=null,this.coverImage=null,this.subsUserDetail=null,this.subsImgbb1=null,this.subsImgbb2=null,this.subsUserUpdate=null,this.subsVerify=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return v.N}get GS(){return this.gs}togglePassword(){this.passwordHide=!this.passwordHide}ngOnDestroy(){this.subsUserDetail?.unsubscribe(),this.subsImgbb1?.unsubscribe(),this.subsImgbb2?.unsubscribe(),this.subsUserUpdate?.unsubscribe(),this.subsVerify?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.username=this.activatedRoute.snapshot.paramMap.get("username"),this.bs.busy(),this.subsUserDetail=this.us.getUserData(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_SUCCESS]",e),this.bs.idle(),this.as.currentUserSubject?.value?.id!==e.result.id?(this.toast.warning("Profile Ini Milik Orang Lain","Whoops!",null,!0),this.router.navigateByUrl(`/user/${this.username}`)):this.initForm(e.result)},error:e=>{this.gs.log("[USER_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/user/${this.username}`}})}}))}initForm(e){this.fg=this.fb.group({nama:[e.kartu_tanda_penduduk_.nama,[u.kI.required,u.kI.pattern(/^[a-zA-Z. ]+$/)]],description:[e.profile_.description,u.kI.compose([u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],old_password:[null,u.kI.compose([u.kI.required,u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],new_password:[null,u.kI.compose([u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],image_photo:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],image_cover:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],private:[e.private,u.kI.compose([u.kI.required])]}),this.image_photo=e.image_url,this.image_photo_original=this.image_photo,this.image_cover=e.profile_.cover_url,this.image_cover_original=this.image_cover,this.userData=e}uploadPhotoImage(e,s){this.photoImage=s,this.imagePhoto=null,this.imagePhotoLimitExceeded=null,this.imagePhotoErrorText=null,this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine();const n=e.target.files[0];try{const r=new FileReader;r.readAsDataURL(n),r.onload=c=>{if(this.gs.log("[IMAGE_PHOTO_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imagePhoto=n,this.image_photo=r.result.toString()},h.src=r.result.toString()}else this.imagePhoto=null,this.image_photo="/assets/img/form/image-error.png",this.imagePhotoLimitExceeded=g.t.fileSizeImageLimit,this.photoImage.clear(e)}}catch{this.imagePhoto=null,this.image_photo=this.image_photo_original,this.photoImage.clear(e)}}submitPhotoImage(){this.submitted=!0,this.subsImgbb1=this.imgbb.uploadImage({file:this.imagePhoto}).subscribe({next:e=>{this.gs.log("[IMAGE_PHOTO_SUCCESS]",e),this.fg.controls.image_photo.patchValue(e.result.url),this.fg.controls.image_photo.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_PHOTO_ERROR]",e,"error"),this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine(),this.submitted=!1,this.imagePhotoErrorText=e.result?.message||e.info}})}uploadCoverImage(e,s){this.coverImage=s,this.imageCover=null,this.imageCoverLimitExceeded=null,this.imageCoverErrorText=null,this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine();const n=e.target.files[0];try{const r=new FileReader;r.readAsDataURL(n),r.onload=c=>{if(this.gs.log("[IMAGE_COVER_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imageCover=n,this.image_cover=r.result.toString()},h.src=r.result.toString()}else this.imageCover=null,this.image_cover="/assets/img/form/image-error.png",this.imageCoverLimitExceeded=g.t.fileSizeImageLimit,this.coverImage.clear(e)}}catch{this.imageCover=null,this.image_cover=this.image_cover_original,this.coverImage.clear(e)}}submitCoverImage(){this.submitted=!0,this.subsImgbb2=this.imgbb.uploadImage({file:this.imageCover}).subscribe({next:e=>{this.gs.log("[IMAGE_COVER_SUCCESS]",e),this.fg.controls.image_cover.patchValue(e.result.url),this.fg.controls.image_cover.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_COVER_ERROR]",e,"error"),this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine(),this.submitted=!1,this.imageCoverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=this.gs.getDirtyValues(this.fg);if(e.old_password=this.cs.hashPassword(this.fg.value.old_password),"new_password"in e&&e.new_password&&(e.new_password=this.cs.hashPassword(this.fg.value.new_password)),this.gs.log("[USER_EDIT_DIRTY]",e),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsUserUpdate=this.us.updateUser(this.username,{...e}).subscribe({next:s=>{this.gs.log("[USER_EDIT_SUCCESS]",s),this.submitted=!1,this.bs.idle(),this.as.removeUser(),this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:n=>{this.gs.log("[VERIFY_LOGIN_SUCCESS]",n),this.bs.idle(),this.router.navigateByUrl(`/user/${this.username}`)},error:n=>{this.gs.log("[VERIFY_LOGIN_ERROR]",n,"error"),this.bs.idle(),this.as.removeUser(),this.router.navigateByUrl(`/user/${this.username}`)}})},error:s=>{this.gs.log("[USER_EDIT_ERROR]",s,"error"),this.submitted=!1,this.bs.idle()}})}changeUname(){this.router.navigate(["/create/mailbox"],{queryParams:{subject:"[ReqUName] Pengajuan Ganti Username",to:["bifeldy"].map(s=>`${s}@${v.N.domain}`).join(",")}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(l.F0),t.Y36(l.gz),t.Y36(Pt.k),t.Y36(O.z),t.Y36(L.K),t.Y36(u.QS),t.Y36(wt.X),t.Y36(Z.U),t.Y36(Y.e),t.Y36(Ot.$))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-edit"]],decls:1,vars:1,consts:[[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"accept","change"],["photoImage",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],[1,"col-12","p-3"],["formControlName","private","matTooltip","Hanya Tampilkan Informasi Profil"],[1,"col-12","p-3","text-warning"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"row","py-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","nama","placeholder","Nama Lengkap"],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["placeholder","Basic Input",1,"w-100",3,"accept","change"],["coverImage",""],["class","col-12 p-3",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","old_password","required","","placeholder","Password Sekarang","autocomplete","current-password",3,"type"],["type","button","mat-icon-button","","matSuffix","",3,"click"],[3,"fontIcon"],["matInput","","formControlName","new_password","placeholder","Isi Jika Ingin Ubah Password Baru","autocomplete","new-password",3,"type"],[1,"row"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],[1,"col-12","mb-4"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"]],template:function(e,s){1&e&&t.YNc(0,Wt,85,33,"form",0),2&e&&t.Q6J("ngIf",s.fg)},dependencies:[m.O5,l.yS,y.lW,y.zs,K.Hw,R.TO,R.KE,R.hX,R.R9,Lt.Nt,Kt.Rr,N.gM,u._Y,u.Fj,u.JJ,u.JL,u.Q7,u.sg,u.u,f.Yh,U.s6,Nt.$],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})(),canActivate:[D.t],data:{title:"User - Ubah Profil",description:"Halaman Pembaharuan Profil Pengguna",keywords:"Ubah Profil",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}}]}];let ee=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[m.ez,l.Bz.forChild(te),w.m,_.$,b.L,u.u5,u.UX,f.Ad,U.UM,p.b,x.F,P.T,T.d]}),i})()},7567:(M,C,o)=>{o.d(C,{Q:()=>w});var m=o(7084),l=o(4650),u=o(257),U=o(6895),f=o(7392),g=o(266);function d(_,b){if(1&_&&l._UZ(0,"h3",8),2&_){const p=l.oxw().$implicit;l.Q6J("innerHTML",p.text,l.oJD)}}function D(_,b){if(1&_&&(l.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),l._uU(4),l.qZA()(),l.TgZ(5,"mat-panel-description"),l._UZ(6,"mat-icon",6),l.qZA()(),l.YNc(7,d,1,1,"ng-template",7),l.qZA()),2&_){const p=b.$implicit,x=b.first,T=l.oxw(2);l.Q6J("expanded",T.GS.isDesktop&&x),l.xp6(3),l.s9C("matTooltip",p.tooltip),l.Q6J("matTooltipPosition","above"),l.xp6(1),l.hij(" ",p.title," "),l.xp6(2),l.Q6J("fontIcon",p.icon)}}function P(_,b){if(1&_&&(l.TgZ(0,"mat-accordion",1),l.YNc(1,D,8,5,"mat-expansion-panel",2),l.qZA()),2&_){const p=l.oxw();l.xp6(1),l.Q6J("ngForOf",p.panelData)}}let w=(()=>{class _{constructor(p){this.gs=p,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(p){this.gs.onResize(p,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return _.\u0275fac=function(p){return new(p||_)(l.Y36(u.U))},_.\u0275cmp=l.Xpm({type:_,selectors:[["app-material-expansion-panel"]],viewQuery:function(p,x){if(1&p&&l.Gf(m.pp,5),2&p){let T;l.iGM(T=l.CRH())&&(x.accordion=T.first)}},hostBindings:function(p,x){1&p&&l.NdJ("resize",function(v){return x.onResize(v)},!1,l.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto",3,"fontIcon"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(p,x){1&p&&l.YNc(0,P,2,1,"mat-accordion",0),2&p&&l.Q6J("ngIf",x.panelData.length>0)},dependencies:[U.sg,U.O5,m.pp,m.ib,m.yz,m.yK,m.u4,m.HS,f.Hw,g.gM]}),_})()},6020:(M,C,o)=>{o.d(C,{$:()=>U});var m=o(6895),l=o(210),u=o(4650);let U=(()=>{class f{}return f.\u0275fac=function(d){return new(d||f)},f.\u0275mod=u.oAB({type:f}),f.\u0275inj=u.cJS({imports:[m.ez,l.m]}),f})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/794.c52da69863349fa8.js b/dist/fansubid/browser/794.c52da69863349fa8.js new file mode 100644 index 000000000..9c2a37c02 --- /dev/null +++ b/dist/fansubid/browser/794.c52da69863349fa8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[794],{2794:(M,C,o)=>{o.r(C),o.d(C,{UserModule:()=>ee});var m=o(6895),l=o(1390),u=o(4006),U=o(7375),f=o(3170),g=o(6271),d=o(4249),D=o(2777),P=o(7355),w=o(210),_=o(6020),b=o(6436),p=o(4167),x=o(8613),T=o(2438),v=o(5934),t=o(4650),B=o(7009),Z=o(257),O=o(3e3),F=o(6382),G=o(8745),L=o(8058),q=o(8381),Q=o(8987),y=o(4859),H=o(3238),K=o(7392),E=o(6338),N=o(266),V=o(7567),j=o(8757),$=o(325);function z(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function W(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",32),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function X(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.userData.role))}),t.qZA()}if(2&i){const e=t.oxw(2);t.s9C("matTooltip",e.userData.role)}}function tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",34),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Terverifikasi"))}),t.qZA()}}function et(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Banned :: "+n.userBanned.reason))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","Banned :: ",e.userBanned.reason,"")}}function it(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked(n.accountAge+" Years of Service"))}),t.qZA()}if(2&i){const e=t.oxw(2);t.MGl("matTooltip","",e.accountAge," Years of Service")}}function st(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Sharing is Caring"))}),t.qZA()}}function nt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-icon",38),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.badgeClicked("Akun Private"))}),t.qZA()}}function ot(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",47),t._UZ(1,"img",48),t.TgZ(2,"a",49)(3,"span",50),t._uU(4),t.qZA(),t.TgZ(5,"span",51),t._uU(6),t.qZA()()()),2&i){const e=a.$implicit;t.MGl("routerLink","/fansub/",e.fansub_.slug,""),t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.fansub_.slug)}}function at(i,a){if(1&i&&(t.TgZ(0,"div",6)(1,"div",39)(2,"div",40)(3,"h2",41)(4,"b",42),t._uU(5,"Group Fansub"),t.qZA()()(),t.TgZ(6,"div",43)(7,"div",44)(8,"mat-selection-list",45),t.YNc(9,ot,7,4,"mat-list-option",46),t.qZA()()()()()),2&i){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function rt(i,a){if(1&i&&(t.TgZ(0,"button",52),t._UZ(1,"mat-icon",53),t._uU(2),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",e.userData.id," ")}}function lt(i,a){if(1&i&&(t.TgZ(0,"button",54),t._UZ(1,"mat-icon",55),t._uU(2),t.ALo(3,"date"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.xi3(3,1,e.userData.created_at,"d/M/yyyy, hh:mm:ss a z")," ")}}function ut(i,a){if(1&i&&(t.TgZ(0,"div",39),t._UZ(1,"app-material-expansion-panel",56),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function ct(i,a){1&i&&(t.TgZ(0,"div",39)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function pt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8),t.YNc(8,z,1,1,"mat-icon",9),t.YNc(9,W,1,1,"mat-icon",10),t.YNc(10,X,1,1,"mat-icon",11),t.YNc(11,tt,1,0,"mat-icon",12),t.YNc(12,et,1,1,"mat-icon",13),t.YNc(13,it,1,1,"mat-icon",14),t.YNc(14,st,1,0,"mat-icon",15),t.YNc(15,nt,1,0,"mat-icon",16),t.qZA(),t.YNc(16,at,10,2,"div",17),t.qZA()(),t.TgZ(17,"div",18)(18,"div",19)(19,"h1",20)(20,"b"),t._uU(21),t.qZA()()(),t.TgZ(22,"div",21),t.YNc(23,rt,3,1,"button",22),t.YNc(24,lt,4,4,"button",23),t.TgZ(25,"button",24),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.createMailbox())}),t._UZ(26,"mat-icon",25),t._uU(27),t.qZA()(),t.YNc(28,ut,2,1,"div",26),t.YNc(29,ct,3,0,"div",26),t.qZA()(),t.TgZ(30,"div",27)(31,"div",6)(32,"app-material-tab",28),t.NdJ("tableRowClicked",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.openBerkas(n))})("paginatorClicked",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onPaginatorClicked(n))})("serverSideFilter",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onServerSideFilter(n))})("serverSideOrder",function(n){t.CHM(e);const r=t.oxw();return t.KtG(r.onServerSideOrder(n))}),t.qZA()()()(),t._UZ(33,"div",29)(34,"div",30),t.qZA()}if(2&i){const e=t.oxw();t.xp6(6),t.s9C("src",e.userData.image_url,t.LSH),t.xp6(2),t.Q6J("ngIf",e.userData.role===e.ADMIN),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.MODERATOR),t.xp6(1),t.Q6J("ngIf",e.userData.role===e.FANSUBBER),t.xp6(1),t.Q6J("ngIf",e.userData.verified),t.xp6(1),t.Q6J("ngIf",e.userBanned),t.xp6(1),t.Q6J("ngIf",e.accountAge>0),t.xp6(1),t.Q6J("ngIf",e.count>0),t.xp6(1),t.Q6J("ngIf",e.userData.private),t.xp6(1),t.Q6J("ngIf",e.groupFansub.length>0),t.xp6(5),t.Oqu(e.userData.kartu_tanda_penduduk_.nama),t.xp6(2),t.Q6J("ngIf",e.userData.id),t.xp6(1),t.Q6J("ngIf",e.userData.created_at),t.xp6(3),t.AsE(" ",e.userData.username,"@",e.ENV.domain," "),t.xp6(1),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0),t.xp6(1),t.Udp("background-image","url("+e.userData.profile_.cover_url+")")}}let mt=(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I){this.snackBar=e,this.router=s,this.activatedRoute=n,this.gs=r,this.bs=c,this.fs=h,this.pi=A,this.us=k,this.ss=S,this.berkas=I,this.username="",this.userData=null,this.userBanned=null,this.groupFansub=[],this.berkasUser=[],this.allBerkasUserId=[],this.panelData=[],this.tabData=[{name:"Berkas",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsUser=null,this.subsBerkas=null,this.subsBanned=null,this.subsParam=null,this.subsGroupGet=null,this.subsTrusted=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}ngOnDestroy(){this.subsUser?.unsubscribe(),this.subsBerkas?.unsubscribe(),this.subsBanned?.unsubscribe(),this.subsParam?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsTrusted?.unsubscribe()}get ADMIN(){return d.yS.ADMIN}get MODERATOR(){return d.yS.MODERATOR}get FANSUBBER(){return d.yS.FANSUBBER}get accountAge(){return Math.abs(new Date(Date.now()-new Date(this.userData.created_at).getTime()).getUTCFullYear()-1970)}get ENV(){return v.N}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.username=e.username,this.bs.busy(),this.subsUser=this.us.getUserData(this.username).subscribe({next:s=>{this.gs.log("[USER_DETAIL_SUCCESS]",s),this.userData=s.result,this.pi.updatePageMetaData(this.userData.kartu_tanda_penduduk_.nama,this.userData.profile_.description,this.userData.username,this.userData.image_url,this.userData.username),this.bs.idle(),this.gs.isBrowser&&(this.panelData=[],this.panelData.push({title:"Tentang Saya",icon:"info",text:this.userData.profile_.description}),this.fs.initializeFab("edit",null,"Ubah Profil",`/user/${this.username}/edit`,!1),this.checkBanned(),this.getUserGroup(),this.getUserBerkas())},error:s=>{this.gs.log("[USER_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/"}})}})}})}checkBanned(){this.bs.busy(),this.subsBanned=this.us.checkBanned(this.userData.username).subscribe({next:e=>{this.gs.log("[USER_CHECK_BANNED_SUCCESS]",e),Object.keys(e.results[this.userData.username]).length>0&&(this.userBanned=e.results[this.userData.username]),this.bs.idle()},error:e=>{this.gs.log("[USER_CHECK_BANNED_ERROR]",e,"error"),this.bs.idle()}})}getUserBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.us.getUserBerkas(this.username,this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[USER_BERKAS_LIST_SUCCESS]",e),this.count=e.count,this.berkasUser=[];for(const s of e.results)this.allBerkasUserId.push(s.id),this.berkasUser.push({id:s.id,private:s.private,foto:s.user_.image_url,Proyek:s.project_type_.name,Tanggal:s.created_at,Kunjungan:s.view_count,Pemilik:s.user_.username,"Nama Berkas":s.name});this.tabData[0].data.row=this.berkasUser,this.allBerkasUserId.length>0&&this.checkTrusted(),this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_LIST_ERROR]",e,"error"),this.bs.idle()}})}checkTrusted(){this.bs.busy(),this.subsTrusted&&(this.subsTrusted.unsubscribe(),this.bs.idle()),this.subsTrusted=this.berkas.checkTrusted(this.allBerkasUserId).subscribe({next:e=>{this.gs.log("[USER_BERKAS_TRUSTED_SUCCESS]",e);for(const s of this.berkasUser)s.trusted=e.results[s.id];this.bs.idle()},error:e=>{this.gs.log("[USER_BERKAS_TRUSTED_ERROR]",e,"error"),this.bs.idle()}})}openBerkas(e){this.gs.log("[USER_BERKAS_LIST_CLICK_BERKAS]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}onPaginatorClicked(e){this.gs.log("[USER_BERKAS_LIST_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getUserBerkas()}onServerSideFilter(e){this.gs.log("[USER_BERKAS_LIST_ENTER_FILTER]",e),this.q=e,this.getUserBerkas()}onServerSideOrder(e){this.gs.log("[USER_BERKAS_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getUserBerkas()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_DETAIL_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}createMailbox(){this.router.navigate(["/create/mailbox"],{queryParams:{to:`${this.userData.username}@${v.N.domain}`}})}badgeClicked(e){this.snackBar.open(e,"Ok")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(B.ux),t.Y36(l.F0),t.Y36(l.gz),t.Y36(Z.U),t.Y36(O.z),t.Y36(F.r),t.Y36(G.Z),t.Y36(L.K),t.Y36(q.R),t.Y36(Q.A))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"profile-image",3,"src"],[1,"col-12","my-3"],["fontIcon","handyman","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","security","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","rate_review","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","verified","class","mx-1","matTooltip","Terverifikasi","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","lock","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","military_tech","class","mx-1","style","cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["fontIcon","volunteer_activism","class","mx-1","matTooltip","Sharing is Caring","style","cursor: pointer;",3,"click",4,"ngIf"],["fontIcon","sensor_occupied","class","mx-1","matTooltip","Akun Private","style","cursor: pointer;",3,"click",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"m-0","mt-auto"],[1,"row","p-3"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-4 text-truncate","matTooltip","Nomor ID Pengguna","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","class","col-12 col-md-8 text-truncate","matTooltip","Tanggal Bergabung","color","accent","style","overflow: hidden;",4,"ngIf"],["type","button","mat-stroked-button","","matLine","","matTooltip","Alamat Surel","color","accent",1,"col","text-truncate",2,"overflow","hidden",3,"click"],["fontIcon","email",1,"me-1"],["class","row py-3",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],["fontIcon","handyman",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","security",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","rate_review",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","verified","matTooltip","Terverifikasi",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","lock",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","military_tech",1,"mx-1",2,"cursor","pointer",3,"matTooltip","click"],["fontIcon","volunteer_activism","matTooltip","Sharing is Caring",1,"mx-1",2,"cursor","pointer",3,"click"],["fontIcon","sensor_occupied","matTooltip","Akun Private",1,"mx-1",2,"cursor","pointer",3,"click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["type","button","mat-stroked-button","","matLine","","matTooltip","Nomor ID Pengguna","color","accent",1,"col-12","col-md-4","text-truncate",2,"overflow","hidden"],["fontIcon","accessibility_new",1,"me-1"],["type","button","mat-stroked-button","","matLine","","matTooltip","Tanggal Bergabung","color","accent",1,"col-12","col-md-8","text-truncate",2,"overflow","hidden"],["fontIcon","access_time",1,"me-1"],[3,"panelData"]],template:function(e,s){1&e&&t.YNc(0,pt,35,22,"div",0),2&e&&t.Q6J("ngIf",s.userData)},dependencies:[m.sg,m.O5,l.rH,y.lW,H.X2,K.Hw,E.eA,E.Ub,E.vS,N.gM,V.Q,j.H,$.Y,m.uU],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}.profile-image[_ngcontent-%COMP%]{width:50%}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}.profile-image[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})();var J=o(5861),_t=o(4425),Y=o(4137),gt=o(7845),dt=o(6781),ht=o(9731);let ft=(()=>{class i{constructor(e,s){this.api=e,this.gs=s}getUserApiKey(e){return this.api.getData(`/api-key?username=${e}`)}createApiKey(e){return this.api.postData("/api-key",e)}editApiKey(e,s){return this.api.putData(`/api-key/${e}`,s)}revokeApiKey(e){return this.api.deleteData(`/api-key/${e}`)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(ht.s),t.LFG(Z.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var bt=o(8020),xt=o(8616),vt=o(192),Ut=o(6766);function Tt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",28),t.TgZ(2,"a",29),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.openComment(r))}),t.TgZ(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",31),t._uU(7),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(4),t.Oqu(t.lcZ(5,2,e.created_at)),t.xp6(3),t.Oqu(e.comment)}}function Et(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Tt,8,4,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedKomentarData,0,5))}}function Ct(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",32),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",34),t._uU(7),t.qZA(),t.TgZ(8,"span",35),t._uU(9),t.qZA(),t.TgZ(10,"span",31),t._uU(11),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,5,e.created_at)),t.xp6(3),t.Oqu(e.type),t.xp6(2),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function At(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,Ct,12,7,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedLikeDislikeData,0,5))}}function kt(i,a){if(1&i&&(t.TgZ(0,"mat-list-option",27),t._UZ(1,"mat-icon",36),t.TgZ(2,"a",33)(3,"span",30),t._uU(4),t.ALo(5,"dateAgo"),t.qZA(),t.TgZ(6,"span",35),t._uU(7),t.qZA(),t.TgZ(8,"span",31),t._uU(9),t.qZA()()()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("routerLink",e.berkas_?"/berkas/"+(null==e.berkas_?null:e.berkas_.id):e.fansub_?"/fansub/"+(null==e.fansub_?null:e.fansub_.slug):e.user_?"/user/"+(null==e.user_?null:e.user_.username):e.news_?"/news/"+(null==e.news_?null:e.news_.id):""),t.xp6(2),t.Oqu(t.lcZ(5,4,e.created_at)),t.xp6(3),t.Oqu(e.berkas_?"Berkas":e.fansub_?"Fansub":e.user_?"User":e.news_?"News":""),t.xp6(2),t.Oqu((null==e.berkas_?null:e.berkas_.name)||(null==e.fansub_?null:e.fansub_.name)||(null==e.user_||null==e.user_.kartu_tanda_penduduk_?null:e.user_.kartu_tanda_penduduk_.nama)||(null==e.news_?null:e.news_.title))}}function St(i,a){if(1&i&&(t.TgZ(0,"div",11)(1,"mat-selection-list",25),t.YNc(2,kt,10,6,"mat-list-option",26),t.ALo(3,"slice"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(3,2,e.feedVisitData,0,5))}}function It(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",37),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw();return c.copyApiKey(r),t.KtG(c.editApiKey(r))}),t.TgZ(1,"p",38),t._uU(2," Nama :: "),t.TgZ(3,"span",39),t._uU(4),t.qZA()(),t.TgZ(5,"p",40),t._uU(6," Origin :: "),t.TgZ(7,"span",39),t._uU(8),t.qZA()(),t.TgZ(9,"p",41),t._uU(10," Key :: "),t.TgZ(11,"span",39),t._uU(12),t.qZA()(),t.TgZ(13,"a",17),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw();return n.stopPropagation(),t.KtG(h.revokeApiKey(c))}),t._UZ(14,"mat-icon",42),t._uU(15," Hapus Akses "),t.qZA()()}if(2&i){const e=a.$implicit;t.xp6(4),t.hij(" ",e.name," "),t.xp6(4),t.hij(" ",e.ip_domain," "),t.xp6(4),t.hij(" ",e.api_key," ")}}function Dt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t.NdJ("click",function(){const r=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.editSubDomain(r.fansub_))}),t._UZ(1,"img",47),t.TgZ(2,"a",48),t.NdJ("click",function(n){const c=t.CHM(e).$implicit,h=t.oxw(2);return n.stopPropagation(),t.KtG(h.revokeDns(c.fansub_))}),t._UZ(3,"mat-icon",42),t.qZA(),t.TgZ(4,"a",49)(5,"span",50),t._uU(6),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"span",39),t._uU(9),t.qZA()()()}if(2&i){const e=a.$implicit;t.xp6(1),t.s9C("src",e.fansub_.image_url,t.LSH),t.xp6(5),t.hij(" ",t.xi3(7,3,e.updated_at,"d-MM-y")," "),t.xp6(3),t.Oqu(e.fansub_.slug)}}function Zt(i,a){if(1&i&&(t.TgZ(0,"div",43)(1,"div",44)(2,"mat-selection-list",25),t.YNc(3,Dt,10,6,"mat-list-option",45),t.qZA()()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.groupFansub)}}function yt(i,a){1&i&&t._UZ(0,"app-no-data",51)}let Rt=(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I,ie,se){this.clipboard=e,this.router=s,this.snackBar=n,this.as=r,this.ds=c,this.gs=h,this.fs=A,this.bs=k,this.us=S,this.fansub=I,this.aks=ie,this.wb=se,this.feedKomentarData=[],this.feedLikeDislikeData=[],this.feedVisitData=[],this.subsFeedKomentar=null,this.subsFeedLikeDislike=null,this.subsFeedVisit=null,this.subsGetApiKey=null,this.subsDialog=null,this.subsCreateApiKey=null,this.subsEditApiKey=null,this.subsRevokeApiKey=null,this.subsGroupGet=null,this.subsUpdateSubDomain=null,this.subsGetSubDomain=null,this.apiKey=[],this.groupFansub=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get ENV(){return v.N}ngOnInit(){this.gs.isBrowser&&(this.getUserFeedComment(),this.getUserFeedLikeDislike(),this.getUserFeedVisit(),this.getUserApiKey(),this.getUserGroup(),this.fs.initializeFab("arrow_forward",null,"Menuju Halaman Profile",`/user/${this.as.currentUserSubject?.value?.username}`,!1))}ngOnDestroy(){this.subsFeedKomentar?.unsubscribe(),this.subsFeedLikeDislike?.unsubscribe(),this.subsFeedVisit?.unsubscribe(),this.subsGetApiKey?.unsubscribe(),this.subsDialog?.unsubscribe(),this.subsCreateApiKey?.unsubscribe(),this.subsEditApiKey?.unsubscribe(),this.subsRevokeApiKey?.unsubscribe(),this.subsGroupGet?.unsubscribe(),this.subsUpdateSubDomain?.unsubscribe(),this.subsGetSubDomain?.unsubscribe()}getUserFeedComment(){this.bs.busy(),this.subsFeedKomentar=this.us.getUserFeedComment(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_COMMENT_SUCCESS]",e),this.feedKomentarData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_COMMENT_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedLikeDislike(){this.bs.busy(),this.subsFeedLikeDislike=this.us.getUserFeedLikeDislike(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_SUCCESS]",e),this.feedLikeDislikeData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_LIKEDISLIKE_ERROR]",e,"error"),this.bs.idle()}})}getUserFeedVisit(){this.bs.busy(),this.subsFeedVisit=this.us.getUserFeedVisit(this.as.currentUserSubject?.value?.username,"",1,5).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.feedVisitData=e.results,this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}getUserApiKey(){this.bs.busy(),this.subsGetApiKey=this.aks.getUserApiKey(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_FEED_VISIT_SUCCESS]",e),this.apiKey=e.results[this.as.currentUserSubject?.value?.username],this.bs.idle()},error:e=>{this.gs.log("[USER_FEED_VISIT_ERROR]",e,"error"),this.bs.idle()}})}copyApiKey(e){this.clipboard.copy(e.api_key)&&this.snackBar.open("API Key :: Telah Di Salin Pada Clipboard","Ok")}generateNewApiKey(){this.subsDialog=this.ds.openInputDialog({data:{title:"Tambah API Key Baru",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:`${this.as.currentUserSubject?.value?.username}_${Date.now()}`,inputValue:null,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:"example.com; 1.1.1.1; *",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:e=>{this.gs.log("[INPUT_DIALOG_CLOSED]",e),e&&(this.bs.busy(),this.subsCreateApiKey=this.aks.createApiKey({name:e.name,ip_domain:e.ip_domain}).subscribe({next:s=>{this.gs.log("[USER_CREATE_APIKEY_SUCCESS]",s),this.bs.idle(),this.getUserApiKey()},error:s=>{this.gs.log("[USER_CREATE_APIKEY_ERROR]",s,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}editApiKey(e){this.subsDialog=this.ds.openInputDialog({data:{title:"Ubah API Key",input:{name:{inputLabel:"Nama / Deskripsi",inputPlaceholder:e.name,inputValue:e.name,inputRequired:!0},ip_domain:{inputLabel:"Origin Tanpa http://",inputPlaceholder:e.ip_domain,inputValue:e.ip_domain,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Gunakan * Saja Untuk Perbolehkan Semua Dan Titik Koma ; Untuk Lebih Dari Satu"}}).afterClosed().subscribe({next:s=>{this.gs.log("[INPUT_DIALOG_CLOSED]",s),s&&(this.bs.busy(),this.subsEditApiKey=this.aks.editApiKey(e.id,{name:s.name,ip_domain:s.ip_domain}).subscribe({next:n=>{this.gs.log("[USER_EDIT_APIKEY_SUCCESS]",n),this.bs.idle(),this.getUserApiKey()},error:n=>{this.gs.log("[USER_EDIT_APIKEY_ERROR]",n,"error"),this.bs.idle(),this.getUserApiKey()}})),this.subsDialog.unsubscribe()}})}revokeApiKey(e){var s=this;return(0,J.Z)(function*(){s.subsDialog=(yield s.ds.openKonfirmasiDialog(`Hapus API Key -- '${e.api_key}'`,`Apakah Yakin Akan Menghapus ${e.ip_domain} ?`,!1)).afterClosed().subscribe({next:n=>{s.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n&&(s.bs.busy(),s.subsRevokeApiKey=s.aks.revokeApiKey(e.id).subscribe({next:r=>{s.gs.log("[USER_REVOKE_APIKEY_SUCCESS]",r),s.bs.idle(),s.getUserApiKey()},error:r=>{s.gs.log("[USER_REVOKE_APIKEY_ERROR]",r,"error"),s.bs.idle(),s.getUserApiKey()}})),s.subsDialog.unsubscribe()}})})()}getUserGroup(){this.bs.busy(),this.subsGroupGet=this.us.getUserGroup(this.as.currentUserSubject?.value?.username).subscribe({next:e=>{this.gs.log("[USER_GROUP_LIST_SUCCESS]",e),this.groupFansub=e.results.filter(s=>s.fansub_.dns_id),this.bs.idle()},error:e=>{this.gs.log("[USER_GROUP_LIST_ERROR]",e,"error"),this.bs.idle()}})}editSubDomain(e){this.bs.busy(),this.subsGetSubDomain=this.fansub.getSubDomain(e.slug).subscribe({next:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_SUCCESS]",s),this.bs.idle();const n=s.result;this.subsDialog=this.ds.openInputDialog({data:{title:`Ubah CNAME / A Record IP v4 v6 :: '${e.slug}'`,input:{server_target:{inputLabel:"Server Target Domain IP Publik",inputPlaceholder:"127.0.0.1 | ghs.google.com | blablabla.id.repl.co",inputValue:n.dns_id.content,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger / Replit",inputPlaceholder:"blablabla-name | slug-fs",inputValue:n.dns_id_alt?.name,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger / Replit",inputPlaceholder:"blablabla-target.dv.googlehosted.com | replit-verify=blablabla",inputValue:n.dns_id_alt?.content,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger / Replit"}}).afterClosed().subscribe({next:r=>{this.gs.log("[INPUT_DIALOG_CLOSED]",r),r&&(this.bs.busy(),this.subsUpdateSubDomain=this.fansub.updateSubDomain(e.slug,{server_target:r.server_target,verification_name:r.verification_name,verification_target:r.verification_target}).subscribe({next:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_SUCCESS]",c),this.bs.idle(),this.getUserGroup()},error:c=>{this.gs.log("[FANSUB_UPDATE_SUBDOMAIN_ERROR]",c,"error"),this.bs.idle(),this.getUserGroup()}})),this.subsDialog.unsubscribe()}})},error:s=>{this.gs.log("[USER_FANSUB_SUBDOMAIN_ERROR]",s,"error"),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:`Sepertinya Sub-Domain '${e.slug}' Belum Di Klaim`,htmlMessage:"Silahkan ambil sub-domain pada halaman fansub, ingin ke sana sekarang?",confirmText:"Ya",cancelText:"Tidak"},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n?this.router.navigateByUrl(`/fansub/${e.slug}`):this.getUserGroup(),this.subsDialog.unsubscribe()}})}})}openComment(e){this.router.navigate([e.path],{queryParams:{comment:e.id}})}openApiDocs(){this.wb.winboxOpenUri(`${v.N.baseUrl}/api`,"_self",!0)}revokeDns(e){var s=this;return(0,J.Z)(function*(){s.subsDialog=(yield s.ds.openKonfirmasiDialog(`Hapus Sub-Domain -- '${e.slug}'`,"Apakah Yakin Ingin Menghapus / Nonaktifkan Sub-Domain ?",!1)).afterClosed().subscribe({next:n=>{s.gs.log("[INFO_DIALOG_CLOSED]",n),!0===n&&(s.bs.busy(),s.subsRevokeApiKey=s.fansub.revokeDomain(e.slug).subscribe({next:r=>{s.gs.log("[USER_REVOKE_DNS_SUCCESS]",r),s.bs.idle()},error:r=>{s.gs.log("[USER_REVOKE_DNS_ERROR]",r,"error"),s.bs.idle()}})),s.subsDialog.unsubscribe()}})})()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_t.TU),t.Y36(l.F0),t.Y36(B.ux),t.Y36(Y.e),t.Y36(gt.x),t.Y36(Z.U),t.Y36(F.r),t.Y36(O.z),t.Y36(L.K),t.Y36(dt.T),t.Y36(ft),t.Y36(bt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-list"]],decls:65,vars:12,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["class","col-12",4,"ngIf","ngIfElse"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["matTooltip","Khusus Pengguna Terverifikasi",1,"text-bifeldy"],[1,"col-12","mb-2"],["mat-button","","color","accent","matTooltip","Buka Kotak Pesan","routerLink","/mailbox",1,"w-100"],["fontIcon","email",1,"me-1"],[1,"text-bifeldy",3,"matTooltip"],["mat-button","","color","accent",1,"w-100",3,"click"],["fontIcon","api",1,"me-1"],["fontIcon","webhook",1,"me-1"],["class","my-2 gradient-border",3,"click",4,"ngFor","ngForOf"],[1,"row","mt-4"],[1,"border-bottom-dotted"],["class","col-12 mb-2","style","max-height: 288px;",4,"ngIf","ngIfElse"],["noData",""],[3,"multiple"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],["fontIcon","add_comment","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning"],["fontIcon","volunteer_activism","mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"routerLink"],[1,"me-3","text-success"],[1,"me-3","text-info"],["fontIcon","directions_run","mat-list-icon","",1,"ps-3"],[1,"my-2","gradient-border",3,"click"],[1,"ps-2","pe-2","pt-2","text-truncate","my-0"],[1,"text-success"],[1,"ps-2","pe-2","pt-0","text-truncate","my-0"],[1,"ps-2","pe-2","pb-2","text-truncate","my-0"],["fontIcon","delete_sweep",1,"me-1"],[1,"col-12","mb-2",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],["class","h-100",3,"click",4,"ngFor","ngForOf"],[1,"h-100",3,"click"],["matListAvatar","",2,"border-radius","0",3,"src"],["mat-button","","matListAvatar","","color","accent",2,"border-radius","0",3,"click"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"col-12","p-3"]],template:function(e,s){if(1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"span",6),t.NdJ("click",function(){return s.getUserFeedComment()}),t._uU(8," Refresh "),t.qZA(),t.TgZ(9,"b",7),t._uU(10,"Riwayat Komentar"),t.qZA()()(),t.YNc(11,Et,4,6,"div",8),t.qZA(),t.TgZ(12,"div",3)(13,"div",4)(14,"h2",5)(15,"span",6),t.NdJ("click",function(){return s.getUserFeedLikeDislike()}),t._uU(16," Refresh "),t.qZA(),t.TgZ(17,"b",7),t._uU(18,"Riwayat Like & Dislike"),t.qZA()()(),t.YNc(19,At,4,6,"div",8),t.qZA(),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"span",6),t.NdJ("click",function(){return s.getUserFeedVisit()}),t._uU(24," Refresh "),t.qZA(),t.TgZ(25,"b",7),t._uU(26,"Riwayat Kunjungan"),t.qZA()()(),t.YNc(27,St,4,6,"div",8),t.qZA()(),t.TgZ(28,"div",9)(29,"div",10)(30,"div",11)(31,"div",3)(32,"div",4)(33,"h2",5)(34,"b",12),t._uU(35,"Alamat Email"),t.qZA()()(),t.TgZ(36,"div",13)(37,"a",14),t._UZ(38,"mat-icon",15),t._uU(39),t.qZA()()(),t.TgZ(40,"div",3)(41,"div",4)(42,"h2",5)(43,"span",6),t.NdJ("click",function(){return s.getUserApiKey()}),t._uU(44," Refresh "),t.qZA(),t.TgZ(45,"b",16),t._uU(46,"API Key"),t.qZA()()(),t.TgZ(47,"div",13)(48,"a",17),t.NdJ("click",function(){return s.openApiDocs()}),t._UZ(49,"mat-icon",18),t._uU(50," Lihat API Endpoint "),t.qZA(),t.TgZ(51,"a",17),t.NdJ("click",function(){return s.generateNewApiKey()}),t._UZ(52,"mat-icon",19),t._uU(53," Buat API Key Baru "),t.qZA(),t.YNc(54,It,16,3,"div",20),t.qZA()(),t.TgZ(55,"div",21)(56,"div",4)(57,"h2",22)(58,"span",6),t.NdJ("click",function(){return s.getUserGroup()}),t._uU(59," Refresh "),t.qZA(),t.TgZ(60,"b",7),t._uU(61,"DNS Fansub"),t.qZA()()(),t.YNc(62,Zt,4,2,"div",23),t.qZA()()()()()(),t.YNc(63,yt,1,0,"ng-template",null,24,t.W1O)),2&e){const n=t.MAs(64);t.xp6(11),t.Q6J("ngIf",s.feedKomentarData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedLikeDislikeData.length>0)("ngIfElse",n),t.xp6(8),t.Q6J("ngIf",s.feedVisitData.length>0)("ngIfElse",n),t.xp6(12),t.AsE(" '",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value.username,"@",s.ENV.domain,"' "),t.xp6(6),t.MGl("matTooltip","Aktivitas Terakhir :: ",null==s.AS.currentUserSubject||null==s.AS.currentUserSubject.value?null:s.AS.currentUserSubject.value._session_origin,""),t.xp6(9),t.Q6J("ngForOf",s.apiKey),t.xp6(8),t.Q6J("ngIf",s.groupFansub.length>0)("ngIfElse",n)}},dependencies:[m.sg,m.O5,l.yS,y.zs,K.Hw,E.eA,E.Nh,E.Ub,E.vS,N.gM,xt.t,vt.d,m.OU,m.uU,Ut.R]}),i})();var Pt=o(6925),wt=o(7902),Ot=o(8379),R=o(9549),Lt=o(4144),Kt=o(455),Nt=o(3626);function Mt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imagePhotoLimitExceeded)," !")}}function Bt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imagePhotoErrorText)}}function Ft(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",46)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitPhotoImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Tidak Boleh Kosong"),t.qZA())}function Yt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Gt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageCoverLimitExceeded)," !")}}function qt(i,a){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageCoverErrorText)}}function Qt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",47),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submitCoverImage())}),t._UZ(2,"mat-icon",48),t._uU(3," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Tidak Boleh Kosong"),t.qZA())}function Vt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function jt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Minimal 8 Huruf"),t.qZA())}function zt(i,a){1&i&&(t.TgZ(0,"div"),t._uU(1,"Password Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"form",1),t.NdJ("submit",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.onSubmit())}),t.TgZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),t._UZ(7,"img",8),t.TgZ(8,"mat-form-field",9)(9,"mat-label"),t._uU(10,"Profile Image"),t.qZA(),t.TgZ(11,"ngx-mat-file-input",10,11),t.NdJ("change",function(n){t.CHM(e);const r=t.MAs(12),c=t.oxw();return t.KtG(c.uploadPhotoImage(n,r))}),t.qZA(),t._UZ(13,"mat-icon",12),t.qZA(),t.TgZ(14,"mat-error",13)(15,"small"),t.YNc(16,Mt,3,3,"div",14),t.YNc(17,Bt,2,1,"div",14),t.qZA()()(),t.YNc(18,Ft,4,1,"div",15),t.TgZ(19,"div",16)(20,"mat-slide-toggle",17),t._uU(21," Jadikan Private, Sembunyikan Aktivitas "),t.qZA()(),t.TgZ(22,"div",18),t._uU(23," * Jika ingin mengubah "),t.TgZ(24,"i"),t._uU(25,"username"),t.qZA(),t._uU(26," silahkan menghubungi Admin menggunakan surel "),t.TgZ(27,"span",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.changeUname())}),t._uU(28),t.qZA()()()(),t.TgZ(29,"div",20),t._UZ(30,"div",21),t.TgZ(31,"div",22)(32,"mat-form-field",23)(33,"mat-label"),t._uU(34,"Nama Lengkap"),t.qZA(),t._UZ(35,"input",24)(36,"mat-icon",25),t.TgZ(37,"mat-error"),t.YNc(38,Jt,2,0,"div",14),t.YNc(39,Yt,2,0,"div",14),t.qZA()(),t.TgZ(40,"mat-form-field",26)(41,"mat-label"),t._uU(42,"Cover Image"),t.qZA(),t.TgZ(43,"ngx-mat-file-input",27,28),t.NdJ("change",function(n){t.CHM(e);const r=t.MAs(44),c=t.oxw();return t.KtG(c.uploadCoverImage(n,r))}),t.qZA(),t._UZ(45,"mat-icon",12),t.qZA(),t.TgZ(46,"mat-error",13)(47,"small"),t.YNc(48,Gt,3,3,"div",14),t.YNc(49,qt,2,1,"div",14),t.qZA()(),t.YNc(50,Qt,4,1,"div",29),t._UZ(51,"angular-editor",30),t.TgZ(52,"mat-form-field",31)(53,"mat-label"),t._uU(54,"Konfirmasi Kata Sandi"),t.qZA(),t._UZ(55,"input",32),t.TgZ(56,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(57,"mat-icon",34),t.qZA(),t.TgZ(58,"mat-error"),t.YNc(59,Ht,2,0,"div",14),t.YNc(60,Vt,2,0,"div",14),t.YNc(61,jt,2,0,"div",14),t.qZA()(),t.TgZ(62,"mat-form-field",31)(63,"mat-label"),t._uU(64,"Ubah Kata Sandi"),t.qZA(),t._UZ(65,"input",35),t.TgZ(66,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.togglePassword())}),t._UZ(67,"mat-icon",34),t.qZA(),t.TgZ(68,"mat-error"),t.YNc(69,$t,2,0,"div",14),t.YNc(70,zt,2,0,"div",14),t.qZA()()(),t.TgZ(71,"div",36)(72,"div",7)(73,"div",37),t._UZ(74,"div",38),t.TgZ(75,"div",39)(76,"a",40),t._UZ(77,"mat-icon",41),t._uU(78," Batal "),t.qZA()(),t.TgZ(79,"div",39)(80,"button",42),t._uU(81," Simpan "),t._UZ(82,"mat-icon",43),t.qZA()()()()()()()(),t._UZ(83,"div",44)(84,"div",45),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("formGroup",e.fg),t.xp6(7),t.s9C("src",e.image_photo,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imagePhotoLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imagePhotoErrorText),t.xp6(1),t.Q6J("ngIf",e.imagePhoto&&!e.fg.value.image_photo),t.xp6(10),t.AsE("",e.userData.username,"@",e.ENV.domain,""),t.xp6(4),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",e.fg.get("nama").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("nama").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(5),t.Q6J("ngIf",e.imageCoverLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageCoverErrorText),t.xp6(1),t.Q6J("ngIf",e.imageCover&&!e.fg.value.image_cover),t.xp6(1),t.Q6J("config",e.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("old_password").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("old_password").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("type",e.passwordHide?"password":"text"),t.xp6(2),t.Q6J("fontIcon",e.passwordHide?"visibility_off":"visibility"),t.xp6(2),t.Q6J("ngIf",e.fg.get("new_password").hasError("minlength")),t.xp6(1),t.Q6J("ngIf",e.fg.get("new_password").hasError("pattern")),t.xp6(6),t.Q6J("disabled",e.submitted),t.xp6(4),t.Q6J("disabled",e.submitted||e.fg.invalid||!e.fg.dirty),t.xp6(3),t.Udp("background-image","url("+e.image_cover+")")}}const te=[{path:"",pathMatch:"full",component:Rt,canActivate:[D.t],data:{[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}},{path:":username",children:[{path:"",pathMatch:"full",component:mt},{path:"edit",component:(()=>{class i{constructor(e,s,n,r,c,h,A,k,S,I){this.router=e,this.activatedRoute=s,this.toast=n,this.bs=r,this.us=c,this.fb=h,this.imgbb=A,this.gs=k,this.as=S,this.cs=I,this.submitted=!1,this.username=null,this.userData=null,this.imagePhoto=null,this.imagePhotoErrorText=null,this.imagePhotoLimitExceeded=null,this.image_photo=null,this.image_photo_original=null,this.imageCover=null,this.imageCoverErrorText=null,this.imageCoverLimitExceeded=null,this.image_cover=null,this.image_cover_original=null,this.passwordHide=!0,this.photoImage=null,this.coverImage=null,this.subsUserDetail=null,this.subsImgbb1=null,this.subsImgbb2=null,this.subsUserUpdate=null,this.subsVerify=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return v.N}get GS(){return this.gs}togglePassword(){this.passwordHide=!this.passwordHide}ngOnDestroy(){this.subsUserDetail?.unsubscribe(),this.subsImgbb1?.unsubscribe(),this.subsImgbb2?.unsubscribe(),this.subsUserUpdate?.unsubscribe(),this.subsVerify?.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.username=this.activatedRoute.snapshot.paramMap.get("username"),this.bs.busy(),this.subsUserDetail=this.us.getUserData(this.username).subscribe({next:e=>{this.gs.log("[USER_DETAIL_SUCCESS]",e),this.bs.idle(),this.as.currentUserSubject?.value?.id!==e.result.id?(this.toast.warning("Profile Ini Milik Orang Lain","Whoops!",null,!0),this.router.navigateByUrl(`/user/${this.username}`)):this.initForm(e.result)},error:e=>{this.gs.log("[USER_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/user/${this.username}`}})}}))}initForm(e){this.fg=this.fb.group({nama:[e.kartu_tanda_penduduk_.nama,[u.kI.required,u.kI.pattern(/^[a-zA-Z. ]+$/)]],description:[e.profile_.description,u.kI.compose([u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],old_password:[null,u.kI.compose([u.kI.required,u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],new_password:[null,u.kI.compose([u.kI.minLength(8),u.kI.pattern(g.t.regexEnglishKeyboardKeys)])],image_photo:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],image_cover:[null,u.kI.compose([u.kI.pattern(g.t.regexUrl)])],private:[e.private,u.kI.compose([u.kI.required])]}),this.image_photo=e.image_url,this.image_photo_original=this.image_photo,this.image_cover=e.profile_.cover_url,this.image_cover_original=this.image_cover,this.userData=e}uploadPhotoImage(e,s){this.photoImage=s,this.imagePhoto=null,this.imagePhotoLimitExceeded=null,this.imagePhotoErrorText=null,this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine();const n=e.target.files[0];try{const r=new FileReader;r.readAsDataURL(n),r.onload=c=>{if(this.gs.log("[IMAGE_PHOTO_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imagePhoto=n,this.image_photo=r.result.toString()},h.src=r.result.toString()}else this.imagePhoto=null,this.image_photo="/assets/img/form/image-error.png",this.imagePhotoLimitExceeded=g.t.fileSizeImageLimit,this.photoImage.clear(e)}}catch{this.imagePhoto=null,this.image_photo=this.image_photo_original,this.photoImage.clear(e)}}submitPhotoImage(){this.submitted=!0,this.subsImgbb1=this.imgbb.uploadImage({file:this.imagePhoto}).subscribe({next:e=>{this.gs.log("[IMAGE_PHOTO_SUCCESS]",e),this.fg.controls.image_photo.patchValue(e.result.url),this.fg.controls.image_photo.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_PHOTO_ERROR]",e,"error"),this.fg.controls.image_photo.patchValue(null),this.fg.controls.image_photo.markAsPristine(),this.submitted=!1,this.imagePhotoErrorText=e.result?.message||e.info}})}uploadCoverImage(e,s){this.coverImage=s,this.imageCover=null,this.imageCoverLimitExceeded=null,this.imageCoverErrorText=null,this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine();const n=e.target.files[0];try{const r=new FileReader;r.readAsDataURL(n),r.onload=c=>{if(this.gs.log("[IMAGE_COVER_SELECTED]",c),n.size<=g.t.fileSizeImageLimit){const h=this.gs.document.createElement("img");h.onload=()=>{this.imageCover=n,this.image_cover=r.result.toString()},h.src=r.result.toString()}else this.imageCover=null,this.image_cover="/assets/img/form/image-error.png",this.imageCoverLimitExceeded=g.t.fileSizeImageLimit,this.coverImage.clear(e)}}catch{this.imageCover=null,this.image_cover=this.image_cover_original,this.coverImage.clear(e)}}submitCoverImage(){this.submitted=!0,this.subsImgbb2=this.imgbb.uploadImage({file:this.imageCover}).subscribe({next:e=>{this.gs.log("[IMAGE_COVER_SUCCESS]",e),this.fg.controls.image_cover.patchValue(e.result.url),this.fg.controls.image_cover.markAsDirty(),this.submitted=!1},error:e=>{this.gs.log("[IMAGE_COVER_ERROR]",e,"error"),this.fg.controls.image_cover.patchValue(null),this.fg.controls.image_cover.markAsPristine(),this.submitted=!1,this.imageCoverErrorText=e.result?.message||e.info}})}onSubmit(){this.bs.busy();const e=this.gs.getDirtyValues(this.fg);if(e.old_password=this.cs.hashPassword(this.fg.value.old_password),"new_password"in e&&e.new_password&&(e.new_password=this.cs.hashPassword(this.fg.value.new_password)),this.gs.log("[USER_EDIT_DIRTY]",e),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsUserUpdate=this.us.updateUser(this.username,{...e}).subscribe({next:s=>{this.gs.log("[USER_EDIT_SUCCESS]",s),this.submitted=!1,this.bs.idle(),this.as.removeUser(),this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:n=>{this.gs.log("[VERIFY_LOGIN_SUCCESS]",n),this.bs.idle(),this.router.navigateByUrl(`/user/${this.username}`)},error:n=>{this.gs.log("[VERIFY_LOGIN_ERROR]",n,"error"),this.bs.idle(),this.as.removeUser(),this.router.navigateByUrl(`/user/${this.username}`)}})},error:s=>{this.gs.log("[USER_EDIT_ERROR]",s,"error"),this.submitted=!1,this.bs.idle()}})}changeUname(){this.router.navigate(["/create/mailbox"],{queryParams:{subject:"[ReqUName] Pengajuan Ganti Username",to:["bifeldy"].map(s=>`${s}@${v.N.domain}`).join(",")}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(l.F0),t.Y36(l.gz),t.Y36(Pt.k),t.Y36(O.z),t.Y36(L.K),t.Y36(u.QS),t.Y36(wt.X),t.Y36(Z.U),t.Y36(Y.e),t.Y36(Ot.$))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-user-edit"]],decls:1,vars:1,consts:[[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"container"],[1,"profile-info","align-items-center",2,"top","64px","position","relative"],[1,"row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"accept","change"],["photoImage",""],["fontIcon","image","matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],[1,"col-12","p-3"],["formControlName","private","matTooltip","Hanya Tampilkan Informasi Profil"],[1,"col-12","p-3","text-warning"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","profile-height-large"],[1,"row","py-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","nama","placeholder","Nama Lengkap"],["fontIcon","wysiwyg","matSuffix",""],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["placeholder","Basic Input",1,"w-100",3,"accept","change"],["coverImage",""],["class","col-12 p-3",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","old_password","required","","placeholder","Password Sekarang","autocomplete","current-password",3,"type"],["type","button","mat-icon-button","","matSuffix","",3,"click"],[3,"fontIcon"],["matInput","","formControlName","new_password","placeholder","Isi Jika Ingin Ubah Password Baru","autocomplete","new-password",3,"type"],[1,"row"],[1,"row","gy-3"],[1,"col","g-0"],[1,"col-12","col-md-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["fontIcon","undo",1,"me-1"],["type","submit","mat-flat-button","","color","accent",1,"w-100",3,"disabled"],["fontIcon","save",1,"ms-1"],[1,"profile-banner","profile-banner-1","align-items-center"],[1,"profile-banner","profile-banner-2","align-items-center"],[1,"col-12","mb-4"],["type","button","mat-raised-button","","color","primary",1,"w-100",3,"disabled","click"],["fontIcon","add_photo_alternate",1,"me-1"]],template:function(e,s){1&e&&t.YNc(0,Wt,85,33,"form",0),2&e&&t.Q6J("ngIf",s.fg)},dependencies:[m.O5,l.yS,y.lW,y.zs,K.Hw,R.TO,R.KE,R.hX,R.R9,Lt.Nt,Kt.Rr,N.gM,u._Y,u.Fj,u.JJ,u.JL,u.Q7,u.sg,u.u,f.Yh,U.s6,Nt.$],styles:[".profile-banner[_ngcontent-%COMP%]{height:192px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;opacity:.75}.profile-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.profile-banner-2[_ngcontent-%COMP%]{position:absolute;top:192px;left:0}.profile-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}@media only screen and (min-width: 769px){.profile-height-large[_ngcontent-%COMP%]{height:100px}}@media only screen and (max-width: 768px){.profile-image[_ngcontent-%COMP%]{padding-top:3rem}}"]}),i})(),canActivate:[D.t],data:{title:"User - Ubah Profil",description:"Halaman Pembaharuan Profil Pengguna",keywords:"Ubah Profil",[g.t.decoratorRoles]:[d.yS.ADMIN,d.yS.MODERATOR,d.yS.FANSUBBER,d.yS.USER]}}]}];let ee=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[m.ez,l.Bz.forChild(te),w.m,_.$,b.L,u.u5,u.UX,f.Ad,U.UM,p.b,x.F,P.T,T.d]}),i})()},7567:(M,C,o)=>{o.d(C,{Q:()=>w});var m=o(7084),l=o(4650),u=o(257),U=o(6895),f=o(7392),g=o(266);function d(_,b){if(1&_&&l._UZ(0,"h3",8),2&_){const p=l.oxw().$implicit;l.Q6J("innerHTML",p.text,l.oJD)}}function D(_,b){if(1&_&&(l.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),l._uU(4),l.qZA()(),l.TgZ(5,"mat-panel-description"),l._UZ(6,"mat-icon",6),l.qZA()(),l.YNc(7,d,1,1,"ng-template",7),l.qZA()),2&_){const p=b.$implicit,x=b.first,T=l.oxw(2);l.Q6J("expanded",T.GS.isDesktop&&x),l.xp6(3),l.s9C("matTooltip",p.tooltip),l.Q6J("matTooltipPosition","above"),l.xp6(1),l.hij(" ",p.title," "),l.xp6(2),l.Q6J("fontIcon",p.icon)}}function P(_,b){if(1&_&&(l.TgZ(0,"mat-accordion",1),l.YNc(1,D,8,5,"mat-expansion-panel",2),l.qZA()),2&_){const p=l.oxw();l.xp6(1),l.Q6J("ngForOf",p.panelData)}}let w=(()=>{class _{constructor(p){this.gs=p,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(p){this.gs.onResize(p,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return _.\u0275fac=function(p){return new(p||_)(l.Y36(u.U))},_.\u0275cmp=l.Xpm({type:_,selectors:[["app-material-expansion-panel"]],viewQuery:function(p,x){if(1&p&&l.Gf(m.pp,5),2&p){let T;l.iGM(T=l.CRH())&&(x.accordion=T.first)}},hostBindings:function(p,x){1&p&&l.NdJ("resize",function(v){return x.onResize(v)},!1,l.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto",3,"fontIcon"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(p,x){1&p&&l.YNc(0,P,2,1,"mat-accordion",0),2&p&&l.Q6J("ngIf",x.panelData.length>0)},dependencies:[U.sg,U.O5,m.pp,m.ib,m.yz,m.yK,m.u4,m.HS,f.Hw,g.gM]}),_})()},6020:(M,C,o)=>{o.d(C,{$:()=>U});var m=o(6895),l=o(210),u=o(4650);let U=(()=>{class f{}return f.\u0275fac=function(d){return new(d||f)},f.\u0275mod=u.oAB({type:f}),f.\u0275inj=u.cJS({imports:[m.ez,l.m]}),f})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/index.html b/dist/fansubid/browser/index.html index 8afd9e76f..7828df740 100644 --- a/dist/fansubid/browser/index.html +++ b/dist/fansubid/browser/index.html @@ -63,7 +63,7 @@ - + \ No newline at end of file diff --git a/dist/fansubid/browser/ngsw.json b/dist/fansubid/browser/ngsw.json index d382e9a1d..395d56eea 100644 --- a/dist/fansubid/browser/ngsw.json +++ b/dist/fansubid/browser/ngsw.json @@ -1,6 +1,6 @@ { "configVersion": 1, - "timestamp": 1700837111886, + "timestamp": 1700898279415, "index": "/index.html", "assetGroups": [ { @@ -35,7 +35,7 @@ "/757.ec54e670bedc9742.js", "/762.949745ff5cd4ffcf.js", "/772.ad33717dcabe158b.js", - "/794.775d16cd639a621b.js", + "/794.c52da69863349fa8.js", "/839.20303174f083f134.js", "/915.b159b1607e0bd0f3.js", "/960.1e1fe3434266e9a4.js", @@ -45,7 +45,7 @@ "/main.c94bc82478448a6c.js", "/manifest.webmanifest", "/polyfills.bbae203fdd01cf64.js", - "/runtime.3f87ddd4991d87a7.js", + "/runtime.4272471905afb49f.js", "/scripts.25bb5de51afc8a05.js", "/styles.cc219f76eabe7138.css" ], @@ -110,17 +110,17 @@ "/757.ec54e670bedc9742.js": "dd2c074ff41b513c64d64b10093ae3f37ff4a375", "/762.949745ff5cd4ffcf.js": "fda9cdfd99a7f4fb014673a1dc2c5ad7904c4e8d", "/772.ad33717dcabe158b.js": "f49a7512f871ddcb3f07d2e1d54d635baa8608f9", - "/794.775d16cd639a621b.js": "b1eeb1ba65491a9bb2f701d3eacd0f606dbb9784", + "/794.c52da69863349fa8.js": "a6aa6d697e37b37547f28acd6ec753cc3f8a9e4c", "/839.20303174f083f134.js": "e292b4f80ad556b47a0372c8178b004d0c903e16", "/915.b159b1607e0bd0f3.js": "e626a83abbe12f304b8779c256c596e35845d9c9", "/960.1e1fe3434266e9a4.js": "c649bd883373fc66f7e2781d27054b5da57413a3", "/common.d8bce617857151dd.js": "10c19c81531f40fb2eca2e15ba20582b306d467d", "/favicon.ico": "071facb8fab2e4b3493dcfbb0b02d7bd21bca97e", - "/index.html": "9d45ceb8b51e5227e85732fc0bab8ae86a22b57b", + "/index.html": "c1e4a9593adb9f7035f9171d2bdf0c1528094c3d", "/main.c94bc82478448a6c.js": "2ad152a434de3be618e33a9d6402f8d655e3a806", "/manifest.webmanifest": "eafb5426cdc9fd714787e5453af315b9972875a3", "/polyfills.bbae203fdd01cf64.js": "a59f17cf29cb649f708d7ec7aa6b7247712859e1", - "/runtime.3f87ddd4991d87a7.js": "b738482c9da56c9d568bfe9d716f414dc68482f0", + "/runtime.4272471905afb49f.js": "65304ac46eee6c662e8c9000febf201ad0d4d0ea", "/scripts.25bb5de51afc8a05.js": "61d71afde3d3c58daff9d6801601386596732294", "/styles.cc219f76eabe7138.css": "4c5a85052f050c876427947a8d75459753879403" }, diff --git a/dist/fansubid/browser/runtime.3f87ddd4991d87a7.js b/dist/fansubid/browser/runtime.4272471905afb49f.js similarity index 98% rename from dist/fansubid/browser/runtime.3f87ddd4991d87a7.js rename to dist/fansubid/browser/runtime.4272471905afb49f.js index 9dc2a04d2..3a1b01b76 100644 --- a/dist/fansubid/browser/runtime.3f87ddd4991d87a7.js +++ b/dist/fansubid/browser/runtime.4272471905afb49f.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var f=g[e];if(void 0!==f)return f.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(f,t,n,i)=>{if(!t){var a=1/0;for(d=0;d=i)&&Object.keys(r.O).every(p=>r.O[p](t[o]))?t.splice(o--,1):(s=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[t,n,i]},r.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return r.d(f,{a:f}),f},(()=>{var f,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,n){if(1&n&&(t=this(t)),8&n||"object"==typeof t&&t&&(4&n&&t.__esModule||16&n&&"function"==typeof t.then))return t;var i=Object.create(null);r.r(i);var d={};f=f||[null,e({}),e([]),e(e)];for(var a=2&n&&t;"object"==typeof a&&!~f.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(s=>d[s]=()=>t[s]);return d.default=()=>t,r.d(i,d),i}})(),r.d=(e,f)=>{for(var t in f)r.o(f,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:f[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((f,t)=>(r.f[t](e,f),f),[])),r.u=e=>(592===e?"common":e)+"."+{32:"82199a4b1cbab296",33:"2a928337349afe1e",58:"d36e64d2c0fbfd8e",108:"7567377a796fb78a",114:"2c43fdf80009a74d",146:"7c781f38e669c189",171:"daf779616dc4da37",219:"457d5819396687c5",268:"e1c5fa008dbc01c6",297:"aed9c801be7c40cf",375:"aa16d0ada4545a9a",469:"a163db3484aace42",471:"2bd617b04007985a",478:"5683ba250e0afaad",534:"4733a94ca596a8d9",580:"f4e6d4b6f4e83b28",592:"d8bce617857151dd",628:"b8bdb826fd1c3eac",635:"298e41091c702e30",650:"37453a8a19e9c5c9",734:"9d9e0ff13a23127f",750:"739b8058c2f54ada",757:"ec54e670bedc9742",762:"949745ff5cd4ffcf",772:"ad33717dcabe158b",794:"775d16cd639a621b",839:"20303174f083f134",915:"b159b1607e0bd0f3",960:"1e1fe3434266e9a4"}[e]+".js",r.miniCssF=e=>{},r.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),(()=>{var e={},f="fansubid:";r.l=(t,n,i,d)=>{if(e[t])e[t].push(n);else{var a,s;if(void 0!==i)for(var o=document.getElementsByTagName("script"),b=0;b{a.onerror=a.onload=null,clearTimeout(l);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(y=>y(p)),_)return _(p)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:f=>f},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(n,i)=>{var d=r.o(e,n)?e[n]:void 0;if(0!==d)if(d)i.push(d[2]);else if(666!=n){var a=new Promise((c,u)=>d=e[n]=[c,u]);i.push(d[2]=a);var s=r.p+r.u(n),o=new Error;r.l(s,c=>{if(r.o(e,n)&&(0!==(d=e[n])&&(e[n]=void 0),d)){var u=c&&("load"===c.type?"missing":c.type),l=c&&c.target&&c.target.src;o.message="Loading chunk "+n+" failed.\n("+u+": "+l+")",o.name="ChunkLoadError",o.type=u,o.request=l,d[1](o)}},"chunk-"+n,n)}else e[n]=0},r.O.j=n=>0===e[n];var f=(n,i)=>{var o,b,[d,a,s]=i,c=0;if(d.some(l=>0!==e[l])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(n&&n(i);c{"use strict";var e,v={},g={};function r(e){var f=g[e];if(void 0!==f)return f.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(f,t,n,i)=>{if(!t){var a=1/0;for(d=0;d=i)&&Object.keys(r.O).every(p=>r.O[p](t[o]))?t.splice(o--,1):(s=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[t,n,i]},r.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return r.d(f,{a:f}),f},(()=>{var f,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,n){if(1&n&&(t=this(t)),8&n||"object"==typeof t&&t&&(4&n&&t.__esModule||16&n&&"function"==typeof t.then))return t;var i=Object.create(null);r.r(i);var d={};f=f||[null,e({}),e([]),e(e)];for(var a=2&n&&t;"object"==typeof a&&!~f.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(s=>d[s]=()=>t[s]);return d.default=()=>t,r.d(i,d),i}})(),r.d=(e,f)=>{for(var t in f)r.o(f,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:f[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((f,t)=>(r.f[t](e,f),f),[])),r.u=e=>(592===e?"common":e)+"."+{32:"82199a4b1cbab296",33:"2a928337349afe1e",58:"d36e64d2c0fbfd8e",108:"7567377a796fb78a",114:"2c43fdf80009a74d",146:"7c781f38e669c189",171:"daf779616dc4da37",219:"457d5819396687c5",268:"e1c5fa008dbc01c6",297:"aed9c801be7c40cf",375:"aa16d0ada4545a9a",469:"a163db3484aace42",471:"2bd617b04007985a",478:"5683ba250e0afaad",534:"4733a94ca596a8d9",580:"f4e6d4b6f4e83b28",592:"d8bce617857151dd",628:"b8bdb826fd1c3eac",635:"298e41091c702e30",650:"37453a8a19e9c5c9",734:"9d9e0ff13a23127f",750:"739b8058c2f54ada",757:"ec54e670bedc9742",762:"949745ff5cd4ffcf",772:"ad33717dcabe158b",794:"c52da69863349fa8",839:"20303174f083f134",915:"b159b1607e0bd0f3",960:"1e1fe3434266e9a4"}[e]+".js",r.miniCssF=e=>{},r.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),(()=>{var e={},f="fansubid:";r.l=(t,n,i,d)=>{if(e[t])e[t].push(n);else{var a,s;if(void 0!==i)for(var o=document.getElementsByTagName("script"),b=0;b{a.onerror=a.onload=null,clearTimeout(l);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(y=>y(p)),_)return _(p)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:f=>f},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(n,i)=>{var d=r.o(e,n)?e[n]:void 0;if(0!==d)if(d)i.push(d[2]);else if(666!=n){var a=new Promise((c,u)=>d=e[n]=[c,u]);i.push(d[2]=a);var s=r.p+r.u(n),o=new Error;r.l(s,c=>{if(r.o(e,n)&&(0!==(d=e[n])&&(e[n]=void 0),d)){var u=c&&("load"===c.type?"missing":c.type),l=c&&c.target&&c.target.src;o.message="Loading chunk "+n+" failed.\n("+u+": "+l+")",o.name="ChunkLoadError",o.type=u,o.request=l,d[1](o)}},"chunk-"+n,n)}else e[n]=0},r.O.j=n=>0===e[n];var f=(n,i)=>{var o,b,[d,a,s]=i,c=0;if(d.some(l=>0!==e[l])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(n&&n(i);ckey in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__name=(target,value)=>__defProp(target,"name",{value,configurable:!0}),__publicField=(obj,key,value)=>(__defNormalProp(obj,"symbol"!=typeof key?key+"":key,value),value),__accessCheck=(obj,member,msg)=>{if(!member.has(obj))throw TypeError("Cannot "+msg)},__privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>{if(member.has(obj))throw TypeError("Cannot add the same private member more than once");member instanceof WeakSet?member.add(obj):member.set(obj,value)},__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);(()=>{var __webpack_modules__={88:(module2,__unused_webpack_exports2,__webpack_require__2)=>{var _a,__,_b,__2,_c,__3,_d,__4,_e,__5,_f,__6,_g,__7,_h,__8,_i,__9,_j,__10,_k,__11,_l,__12,_m,__13,_n,__14,_o,__15,_p,__16,_q,__17,_r,__18,_s,__19,_t,__20,_u,__21,_v,__22,_w,__23,_x,__24,_y,__25,__create=Object.create,__defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__name2=__name((target,value)=>__defProp2(target,"name",{value,configurable:!0}),"__name"),__export=__name((target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},"__export"),__copyProps=__name((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},"__copyProps"),__reExport=__name((target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),"__reExport"),__toESM=__name((mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},__copyProps(!isNodeMode&&mod&&mod.__esModule?target:__defProp2(target,"default",{value:mod,enumerable:!0}),mod)),"__toESM"),__toCommonJS=__name(mod=>__copyProps(__defProp2({},"__esModule",{value:!0}),mod),"__toCommonJS"),__decorateClass=__name((decorators,target,key,kind)=>{for(var decorator,result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i2=decorators.length-1;i2>=0;i2--)(decorator=decorators[i2])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),src_exports={};__export(src_exports,{ActionRowBuilder:()=>ActionRowBuilder,ApplicationCommandNumericOptionMinMaxValueMixin:()=>ApplicationCommandNumericOptionMinMaxValueMixin,ApplicationCommandOptionBase:()=>ApplicationCommandOptionBase,ApplicationCommandOptionChannelTypesMixin:()=>ApplicationCommandOptionChannelTypesMixin,ApplicationCommandOptionWithChoicesAndAutocompleteMixin:()=>ApplicationCommandOptionWithChoicesAndAutocompleteMixin,BaseSelectMenuBuilder:()=>BaseSelectMenuBuilder,ButtonBuilder:()=>ButtonBuilder,ChannelSelectMenuBuilder:()=>ChannelSelectMenuBuilder,ComponentAssertions:()=>Assertions_exports2,ComponentBuilder:()=>ComponentBuilder,ContextMenuCommandAssertions:()=>Assertions_exports6,ContextMenuCommandBuilder:()=>ContextMenuCommandBuilder,EmbedAssertions:()=>Assertions_exports,EmbedBuilder:()=>EmbedBuilder,MentionableSelectMenuBuilder:()=>MentionableSelectMenuBuilder,ModalAssertions:()=>Assertions_exports4,ModalBuilder:()=>ModalBuilder,RoleSelectMenuBuilder:()=>RoleSelectMenuBuilder,SelectMenuBuilder:()=>StringSelectMenuBuilder,SelectMenuOptionBuilder:()=>StringSelectMenuOptionBuilder,SharedNameAndDescription:()=>SharedNameAndDescription,SharedSlashCommandOptions:()=>SharedSlashCommandOptions,SlashCommandAssertions:()=>Assertions_exports5,SlashCommandAttachmentOption:()=>SlashCommandAttachmentOption,SlashCommandBooleanOption:()=>SlashCommandBooleanOption,SlashCommandBuilder:()=>SlashCommandBuilder,SlashCommandChannelOption:()=>SlashCommandChannelOption,SlashCommandIntegerOption:()=>SlashCommandIntegerOption,SlashCommandMentionableOption:()=>SlashCommandMentionableOption,SlashCommandNumberOption:()=>SlashCommandNumberOption,SlashCommandRoleOption:()=>SlashCommandRoleOption,SlashCommandStringOption:()=>SlashCommandStringOption,SlashCommandSubcommandBuilder:()=>SlashCommandSubcommandBuilder,SlashCommandSubcommandGroupBuilder:()=>SlashCommandSubcommandGroupBuilder,SlashCommandUserOption:()=>SlashCommandUserOption,StringSelectMenuBuilder:()=>StringSelectMenuBuilder,StringSelectMenuOptionBuilder:()=>StringSelectMenuOptionBuilder,TextInputAssertions:()=>Assertions_exports3,TextInputBuilder:()=>TextInputBuilder,UserSelectMenuBuilder:()=>UserSelectMenuBuilder,createComponentBuilder:()=>createComponentBuilder,disableValidators:()=>disableValidators,embedLength:()=>embedLength,enableValidators:()=>enableValidators,isValidationEnabled:()=>isValidationEnabled,normalizeArray:()=>normalizeArray,version:()=>version}),module2.exports=__toCommonJS(src_exports);var Assertions_exports={};__export(Assertions_exports,{RGBPredicate:()=>RGBPredicate,authorNamePredicate:()=>authorNamePredicate,colorPredicate:()=>colorPredicate,descriptionPredicate:()=>descriptionPredicate,embedAuthorPredicate:()=>embedAuthorPredicate,embedFieldPredicate:()=>embedFieldPredicate,embedFieldsArrayPredicate:()=>embedFieldsArrayPredicate,embedFooterPredicate:()=>embedFooterPredicate,fieldInlinePredicate:()=>fieldInlinePredicate,fieldLengthPredicate:()=>fieldLengthPredicate,fieldNamePredicate:()=>fieldNamePredicate,fieldValuePredicate:()=>fieldValuePredicate,footerTextPredicate:()=>footerTextPredicate,imageURLPredicate:()=>imageURLPredicate,timestampPredicate:()=>timestampPredicate,titlePredicate:()=>titlePredicate,urlPredicate:()=>urlPredicate,validateFieldLength:()=>validateFieldLength});var import_shapeshift=__webpack_require__2(36579),validate=!0;function enableValidators(){return validate=!0}function disableValidators(){return validate=!1}function isValidationEnabled(){return validate}__name(enableValidators,"enableValidators"),__name2(enableValidators,"enableValidators"),__name(disableValidators,"disableValidators"),__name2(disableValidators,"disableValidators"),__name(isValidationEnabled,"isValidationEnabled"),__name2(isValidationEnabled,"isValidationEnabled");var fieldNamePredicate=import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled),fieldValuePredicate=import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled),fieldInlinePredicate=import_shapeshift.s.boolean.optional,embedFieldPredicate=import_shapeshift.s.object({name:fieldNamePredicate,value:fieldValuePredicate,inline:fieldInlinePredicate}).setValidationEnabled(isValidationEnabled),embedFieldsArrayPredicate=embedFieldPredicate.array.setValidationEnabled(isValidationEnabled),fieldLengthPredicate=import_shapeshift.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);function validateFieldLength(amountAdding,fields){fieldLengthPredicate.parse((fields?.length??0)+amountAdding)}__name(validateFieldLength,"validateFieldLength"),__name2(validateFieldLength,"validateFieldLength");var authorNamePredicate=fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled),imageURLPredicate=import_shapeshift.s.string.url({allowedProtocols:["http:","https:","attachment:"]}).nullish.setValidationEnabled(isValidationEnabled),urlPredicate=import_shapeshift.s.string.url({allowedProtocols:["http:","https:"]}).nullish.setValidationEnabled(isValidationEnabled),embedAuthorPredicate=import_shapeshift.s.object({name:authorNamePredicate,iconURL:imageURLPredicate,url:urlPredicate}).setValidationEnabled(isValidationEnabled),RGBPredicate=import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled),colorPredicate=import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(16777215).or(import_shapeshift.s.tuple([RGBPredicate,RGBPredicate,RGBPredicate])).nullable.setValidationEnabled(isValidationEnabled),descriptionPredicate=import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable.setValidationEnabled(isValidationEnabled),footerTextPredicate=import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable.setValidationEnabled(isValidationEnabled),embedFooterPredicate=import_shapeshift.s.object({text:footerTextPredicate,iconURL:imageURLPredicate}).setValidationEnabled(isValidationEnabled),timestampPredicate=import_shapeshift.s.union(import_shapeshift.s.number,import_shapeshift.s.date).nullable.setValidationEnabled(isValidationEnabled),titlePredicate=fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);function normalizeArray(arr){return Array.isArray(arr[0])?arr[0]:arr}__name(normalizeArray,"normalizeArray"),__name2(normalizeArray,"normalizeArray");var EmbedBuilder=__name((_a=class{constructor(data={}){__publicField(this,"data"),this.data={...data},data.timestamp&&(this.data.timestamp=new Date(data.timestamp).toISOString())}addFields(...fields){const normalizedFields=normalizeArray(fields);return validateFieldLength(normalizedFields.length,this.data.fields),embedFieldsArrayPredicate.parse(normalizedFields),this.data.fields?this.data.fields.push(...normalizedFields):this.data.fields=normalizedFields,this}spliceFields(index,deleteCount,...fields){return validateFieldLength(fields.length-deleteCount,this.data.fields),embedFieldsArrayPredicate.parse(fields),this.data.fields?this.data.fields.splice(index,deleteCount,...fields):this.data.fields=fields,this}setFields(...fields){return this.spliceFields(0,this.data.fields?.length??0,...normalizeArray(fields)),this}setAuthor(options){return null===options?(this.data.author=void 0,this):(embedAuthorPredicate.parse(options),this.data.author={name:options.name,url:options.url,icon_url:options.iconURL},this)}setColor(color){if(colorPredicate.parse(color),Array.isArray(color)){const[red,green,blue]=color;return this.data.color=(red<<16)+(green<<8)+blue,this}return this.data.color=color??void 0,this}setDescription(description){return descriptionPredicate.parse(description),this.data.description=description??void 0,this}setFooter(options){return null===options?(this.data.footer=void 0,this):(embedFooterPredicate.parse(options),this.data.footer={text:options.text,icon_url:options.iconURL},this)}setImage(url){return imageURLPredicate.parse(url),this.data.image=url?{url}:void 0,this}setThumbnail(url){return imageURLPredicate.parse(url),this.data.thumbnail=url?{url}:void 0,this}setTimestamp(timestamp=Date.now()){return timestampPredicate.parse(timestamp),this.data.timestamp=timestamp?new Date(timestamp).toISOString():void 0,this}setTitle(title){return titlePredicate.parse(title),this.data.title=title??void 0,this}setURL(url){return urlPredicate.parse(url),this.data.url=url??void 0,this}toJSON(){return{...this.data}}},__=new WeakMap,__privateAdd(_a,__,__name2(_a,"EmbedBuilder")),_a),"EmbedBuilder");__reExport(src_exports,__webpack_require__2(12683),module2.exports);var Assertions_exports2={};__export(Assertions_exports2,{buttonLabelValidator:()=>buttonLabelValidator,buttonStyleValidator:()=>buttonStyleValidator,channelTypesValidator:()=>channelTypesValidator,customIdValidator:()=>customIdValidator,defaultValidator:()=>defaultValidator,disabledValidator:()=>disabledValidator,emojiValidator:()=>emojiValidator,jsonOptionValidator:()=>jsonOptionValidator,labelValueDescriptionValidator:()=>labelValueDescriptionValidator,minMaxValidator:()=>minMaxValidator,optionValidator:()=>optionValidator,optionsLengthValidator:()=>optionsLengthValidator,optionsValidator:()=>optionsValidator,placeholderValidator:()=>placeholderValidator,urlValidator:()=>urlValidator,validateRequiredButtonParameters:()=>validateRequiredButtonParameters,validateRequiredSelectMenuOptionParameters:()=>validateRequiredSelectMenuOptionParameters,validateRequiredSelectMenuParameters:()=>validateRequiredSelectMenuParameters});var import_shapeshift2=__webpack_require__2(36579),import_v10=__webpack_require__2(16791),StringSelectMenuOptionBuilder=__name((_b=class{constructor(data={}){this.data=data}setLabel(label){return this.data.label=labelValueDescriptionValidator.parse(label),this}setValue(value){return this.data.value=labelValueDescriptionValidator.parse(value),this}setDescription(description){return this.data.description=labelValueDescriptionValidator.parse(description),this}setDefault(isDefault=!0){return this.data.default=defaultValidator.parse(isDefault),this}setEmoji(emoji){return this.data.emoji=emojiValidator.parse(emoji),this}toJSON(){return validateRequiredSelectMenuOptionParameters(this.data.label,this.data.value),{...this.data}}},__2=new WeakMap,__privateAdd(_b,__2,__name2(_b,"StringSelectMenuOptionBuilder")),_b),"StringSelectMenuOptionBuilder"),customIdValidator=import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled),emojiValidator=import_shapeshift2.s.object({id:import_shapeshift2.s.string,name:import_shapeshift2.s.string,animated:import_shapeshift2.s.boolean}).partial.strict.setValidationEnabled(isValidationEnabled),disabledValidator=import_shapeshift2.s.boolean,buttonLabelValidator=import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled),buttonStyleValidator=import_shapeshift2.s.nativeEnum(import_v10.ButtonStyle),placeholderValidator=import_shapeshift2.s.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled),minMaxValidator=import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled),labelValueDescriptionValidator=import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled),jsonOptionValidator=import_shapeshift2.s.object({label:labelValueDescriptionValidator,value:labelValueDescriptionValidator,description:labelValueDescriptionValidator.optional,emoji:emojiValidator.optional,default:import_shapeshift2.s.boolean.optional}).setValidationEnabled(isValidationEnabled),optionValidator=import_shapeshift2.s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled),optionsValidator=optionValidator.array.lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled),optionsLengthValidator=import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);function validateRequiredSelectMenuParameters(options,customId){customIdValidator.parse(customId),optionsValidator.parse(options)}__name(validateRequiredSelectMenuParameters,"validateRequiredSelectMenuParameters"),__name2(validateRequiredSelectMenuParameters,"validateRequiredSelectMenuParameters");var defaultValidator=import_shapeshift2.s.boolean;function validateRequiredSelectMenuOptionParameters(label,value){labelValueDescriptionValidator.parse(label),labelValueDescriptionValidator.parse(value)}__name(validateRequiredSelectMenuOptionParameters,"validateRequiredSelectMenuOptionParameters"),__name2(validateRequiredSelectMenuOptionParameters,"validateRequiredSelectMenuOptionParameters");var channelTypesValidator=import_shapeshift2.s.nativeEnum(import_v10.ChannelType).array.setValidationEnabled(isValidationEnabled),urlValidator=import_shapeshift2.s.string.url({allowedProtocols:["http:","https:","discord:"]}).setValidationEnabled(isValidationEnabled);function validateRequiredButtonParameters(style,label,emoji,customId,url){if(url&&customId)throw new RangeError("URL and custom id are mutually exclusive");if(!label&&!emoji)throw new RangeError("Buttons must have a label and/or an emoji");if(style===import_v10.ButtonStyle.Link){if(!url)throw new RangeError("Link buttons must have a url")}else if(url)throw new RangeError("Non-link buttons cannot have a url")}__name(validateRequiredButtonParameters,"validateRequiredButtonParameters"),__name2(validateRequiredButtonParameters,"validateRequiredButtonParameters");var import_v1011=__webpack_require__2(16791),ComponentBuilder=__name((_c=class{constructor(data){__publicField(this,"data"),this.data=data}},__3=new WeakMap,__privateAdd(_c,__3,__name2(_c,"ComponentBuilder")),_c),"ComponentBuilder"),import_v1010=__webpack_require__2(16791),import_v102=__webpack_require__2(16791),ButtonBuilder=__name((_d=class extends ComponentBuilder{constructor(data){super({type:import_v102.ComponentType.Button,...data})}setStyle(style){return this.data.style=buttonStyleValidator.parse(style),this}setURL(url){return this.data.url=urlValidator.parse(url),this}setCustomId(customId){return this.data.custom_id=customIdValidator.parse(customId),this}setEmoji(emoji){return this.data.emoji=emojiValidator.parse(emoji),this}setDisabled(disabled=!0){return this.data.disabled=disabledValidator.parse(disabled),this}setLabel(label){return this.data.label=buttonLabelValidator.parse(label),this}toJSON(){return validateRequiredButtonParameters(this.data.style,this.data.label,this.data.emoji,this.data.custom_id,this.data.url),{...this.data}}},__4=new WeakMap,__privateAdd(_d,__4,__name2(_d,"ButtonBuilder")),_d),"ButtonBuilder"),import_v103=__webpack_require__2(16791),BaseSelectMenuBuilder=__name((_e=class extends ComponentBuilder{setPlaceholder(placeholder){return this.data.placeholder=placeholderValidator.parse(placeholder),this}setMinValues(minValues){return this.data.min_values=minMaxValidator.parse(minValues),this}setMaxValues(maxValues){return this.data.max_values=minMaxValidator.parse(maxValues),this}setCustomId(customId){return this.data.custom_id=customIdValidator.parse(customId),this}setDisabled(disabled=!0){return this.data.disabled=disabledValidator.parse(disabled),this}toJSON(){return customIdValidator.parse(this.data.custom_id),{...this.data}}},__5=new WeakMap,__privateAdd(_e,__5,__name2(_e,"BaseSelectMenuBuilder")),_e),"BaseSelectMenuBuilder"),ChannelSelectMenuBuilder=__name((_f=class extends BaseSelectMenuBuilder{constructor(data){super({...data,type:import_v103.ComponentType.ChannelSelect})}addChannelTypes(...types){var _a2;const normalizedTypes=normalizeArray(types);return(_a2=this.data).channel_types??(_a2.channel_types=[]),this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes)),this}setChannelTypes(...types){var _a2;const normalizedTypes=normalizeArray(types);return(_a2=this.data).channel_types??(_a2.channel_types=[]),this.data.channel_types.splice(0,this.data.channel_types.length,...channelTypesValidator.parse(normalizedTypes)),this}toJSON(){return customIdValidator.parse(this.data.custom_id),{...this.data}}},__6=new WeakMap,__privateAdd(_f,__6,__name2(_f,"ChannelSelectMenuBuilder")),_f),"ChannelSelectMenuBuilder"),import_v104=__webpack_require__2(16791),MentionableSelectMenuBuilder=__name((_g=class extends BaseSelectMenuBuilder{constructor(data){super({...data,type:import_v104.ComponentType.MentionableSelect})}},__7=new WeakMap,__privateAdd(_g,__7,__name2(_g,"MentionableSelectMenuBuilder")),_g),"MentionableSelectMenuBuilder"),import_v105=__webpack_require__2(16791),RoleSelectMenuBuilder=__name((_h=class extends BaseSelectMenuBuilder{constructor(data){super({...data,type:import_v105.ComponentType.RoleSelect})}},__8=new WeakMap,__privateAdd(_h,__8,__name2(_h,"RoleSelectMenuBuilder")),_h),"RoleSelectMenuBuilder"),import_v106=__webpack_require__2(16791),StringSelectMenuBuilder=__name((_i=class extends BaseSelectMenuBuilder{constructor(data){const{options,...initData}=data??{};super({...initData,type:import_v106.ComponentType.StringSelect}),__publicField(this,"options"),this.options=options?.map(option=>new StringSelectMenuOptionBuilder(option))??[]}addOptions(...options){const normalizedOptions=normalizeArray(options);return optionsLengthValidator.parse(this.options.length+normalizedOptions.length),this.options.push(...normalizedOptions.map(normalizedOption=>normalizedOption instanceof StringSelectMenuOptionBuilder?normalizedOption:new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)))),this}setOptions(...options){return this.spliceOptions(0,this.options.length,...options)}spliceOptions(index,deleteCount,...options){const normalizedOptions=normalizeArray(options),clone=[...this.options];return clone.splice(index,deleteCount,...normalizedOptions.map(normalizedOption=>normalizedOption instanceof StringSelectMenuOptionBuilder?normalizedOption:new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)))),optionsLengthValidator.parse(clone.length),this.options.splice(0,this.options.length,...clone),this}toJSON(){return validateRequiredSelectMenuParameters(this.options,this.data.custom_id),{...this.data,options:this.options.map(option=>option.toJSON())}}},__9=new WeakMap,__privateAdd(_i,__9,__name2(_i,"StringSelectMenuBuilder")),_i),"StringSelectMenuBuilder"),import_v107=__webpack_require__2(16791),UserSelectMenuBuilder=__name((_j=class extends BaseSelectMenuBuilder{constructor(data){super({...data,type:import_v107.ComponentType.UserSelect})}},__10=new WeakMap,__privateAdd(_j,__10,__name2(_j,"UserSelectMenuBuilder")),_j),"UserSelectMenuBuilder"),import_util=__webpack_require__2(19493),import_v109=__webpack_require__2(16791),import_fast_deep_equal=__toESM(__webpack_require__2(12559)),Assertions_exports3={};__export(Assertions_exports3,{labelValidator:()=>labelValidator,maxLengthValidator:()=>maxLengthValidator,minLengthValidator:()=>minLengthValidator,placeholderValidator:()=>placeholderValidator2,requiredValidator:()=>requiredValidator,textInputStyleValidator:()=>textInputStyleValidator,validateRequiredParameters:()=>validateRequiredParameters,valueValidator:()=>valueValidator});var import_shapeshift3=__webpack_require__2(36579),import_v108=__webpack_require__2(16791),textInputStyleValidator=import_shapeshift3.s.nativeEnum(import_v108.TextInputStyle),minLengthValidator=import_shapeshift3.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled),maxLengthValidator=import_shapeshift3.s.number.int.greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled),requiredValidator=import_shapeshift3.s.boolean,valueValidator=import_shapeshift3.s.string.lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled),placeholderValidator2=import_shapeshift3.s.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled),labelValidator=import_shapeshift3.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);function validateRequiredParameters(customId,style,label){customIdValidator.parse(customId),textInputStyleValidator.parse(style),labelValidator.parse(label)}__name(validateRequiredParameters,"validateRequiredParameters"),__name2(validateRequiredParameters,"validateRequiredParameters");var TextInputBuilder=__name((_k=class extends ComponentBuilder{constructor(data){super({type:import_v109.ComponentType.TextInput,...data})}setCustomId(customId){return this.data.custom_id=customIdValidator.parse(customId),this}setLabel(label){return this.data.label=labelValidator.parse(label),this}setStyle(style){return this.data.style=textInputStyleValidator.parse(style),this}setMinLength(minLength){return this.data.min_length=minLengthValidator.parse(minLength),this}setMaxLength(maxLength){return this.data.max_length=maxLengthValidator.parse(maxLength),this}setPlaceholder(placeholder){return this.data.placeholder=placeholderValidator2.parse(placeholder),this}setValue(value){return this.data.value=valueValidator.parse(value),this}setRequired(required=!0){return this.data.required=requiredValidator.parse(required),this}toJSON(){return validateRequiredParameters(this.data.custom_id,this.data.style,this.data.label),{...this.data}}equals(other){return(0,import_util.isJSONEncodable)(other)?(0,import_fast_deep_equal.default)(other.toJSON(),this.data):(0,import_fast_deep_equal.default)(other,this.data)}},__11=new WeakMap,__privateAdd(_k,__11,__name2(_k,"TextInputBuilder")),_k),"TextInputBuilder");function createComponentBuilder(data){if(data instanceof ComponentBuilder)return data;switch(data.type){case import_v1010.ComponentType.ActionRow:return new ActionRowBuilder(data);case import_v1010.ComponentType.Button:return new ButtonBuilder(data);case import_v1010.ComponentType.StringSelect:return new StringSelectMenuBuilder(data);case import_v1010.ComponentType.TextInput:return new TextInputBuilder(data);case import_v1010.ComponentType.UserSelect:return new UserSelectMenuBuilder(data);case import_v1010.ComponentType.RoleSelect:return new RoleSelectMenuBuilder(data);case import_v1010.ComponentType.MentionableSelect:return new MentionableSelectMenuBuilder(data);case import_v1010.ComponentType.ChannelSelect:return new ChannelSelectMenuBuilder(data);default:throw new Error(`Cannot properly serialize component type: ${data.type}`)}}__name(createComponentBuilder,"createComponentBuilder"),__name2(createComponentBuilder,"createComponentBuilder");var ActionRowBuilder=__name((_l=class extends ComponentBuilder{constructor({components,...data}={}){super({type:import_v1011.ComponentType.ActionRow,...data}),__publicField(this,"components"),this.components=components?.map(component=>createComponentBuilder(component))??[]}addComponents(...components){return this.components.push(...normalizeArray(components)),this}setComponents(...components){return this.components.splice(0,this.components.length,...normalizeArray(components)),this}toJSON(){return{...this.data,components:this.components.map(component=>component.toJSON())}}},__12=new WeakMap,__privateAdd(_l,__12,__name2(_l,"ActionRowBuilder")),_l),"ActionRowBuilder"),Assertions_exports4={};__export(Assertions_exports4,{componentsValidator:()=>componentsValidator,titleValidator:()=>titleValidator,validateRequiredParameters:()=>validateRequiredParameters2});var import_shapeshift4=__webpack_require__2(36579),titleValidator=import_shapeshift4.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled),componentsValidator=import_shapeshift4.s.instance(ActionRowBuilder).array.lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);function validateRequiredParameters2(customId,title,components){customIdValidator.parse(customId),titleValidator.parse(title),componentsValidator.parse(components)}__name(validateRequiredParameters2,"validateRequiredParameters2"),__name2(validateRequiredParameters2,"validateRequiredParameters");var ModalBuilder=__name((_m=class{constructor({components,...data}={}){__publicField(this,"data"),__publicField(this,"components",[]),this.data={...data},this.components=components?.map(component=>createComponentBuilder(component))??[]}setTitle(title){return this.data.title=titleValidator.parse(title),this}setCustomId(customId){return this.data.custom_id=customIdValidator.parse(customId),this}addComponents(...components){return this.components.push(...normalizeArray(components).map(component=>component instanceof ActionRowBuilder?component:new ActionRowBuilder(component))),this}setComponents(...components){return this.components.splice(0,this.components.length,...normalizeArray(components)),this}toJSON(){return validateRequiredParameters2(this.data.custom_id,this.data.title,this.components),{...this.data,components:this.components.map(component=>component.toJSON())}}},__13=new WeakMap,__privateAdd(_m,__13,__name2(_m,"ModalBuilder")),_m),"ModalBuilder"),Assertions_exports5={};__export(Assertions_exports5,{assertReturnOfBuilder:()=>assertReturnOfBuilder,localizationMapPredicate:()=>localizationMapPredicate,validateChoicesLength:()=>validateChoicesLength,validateDMPermission:()=>validateDMPermission,validateDefaultMemberPermissions:()=>validateDefaultMemberPermissions,validateDefaultPermission:()=>validateDefaultPermission,validateDescription:()=>validateDescription,validateLocale:()=>validateLocale,validateLocalizationMap:()=>validateLocalizationMap,validateMaxOptionsLength:()=>validateMaxOptionsLength,validateNSFW:()=>validateNSFW,validateName:()=>validateName,validateRequired:()=>validateRequired,validateRequiredParameters:()=>validateRequiredParameters3});var import_shapeshift5=__webpack_require__2(36579),import_v1012=__webpack_require__2(16791),namePredicate=import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);function validateName(name){namePredicate.parse(name)}__name(validateName,"validateName"),__name2(validateName,"validateName");var descriptionPredicate2=import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled),localePredicate=import_shapeshift5.s.nativeEnum(import_v1012.Locale);function validateDescription(description){descriptionPredicate2.parse(description)}__name(validateDescription,"validateDescription"),__name2(validateDescription,"validateDescription");var maxArrayLengthPredicate=import_shapeshift5.s.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);function validateLocale(locale){return localePredicate.parse(locale)}function validateMaxOptionsLength(options){maxArrayLengthPredicate.parse(options)}function validateRequiredParameters3(name,description,options){validateName(name),validateDescription(description),validateMaxOptionsLength(options)}__name(validateLocale,"validateLocale"),__name2(validateLocale,"validateLocale"),__name(validateMaxOptionsLength,"validateMaxOptionsLength"),__name2(validateMaxOptionsLength,"validateMaxOptionsLength"),__name(validateRequiredParameters3,"validateRequiredParameters3"),__name2(validateRequiredParameters3,"validateRequiredParameters");var booleanPredicate=import_shapeshift5.s.boolean;function validateDefaultPermission(value){booleanPredicate.parse(value)}function validateRequired(required){booleanPredicate.parse(required)}__name(validateDefaultPermission,"validateDefaultPermission"),__name2(validateDefaultPermission,"validateDefaultPermission"),__name(validateRequired,"validateRequired"),__name2(validateRequired,"validateRequired");var choicesLengthPredicate=import_shapeshift5.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);function validateChoicesLength(amountAdding,choices){choicesLengthPredicate.parse((choices?.length??0)+amountAdding)}function assertReturnOfBuilder(input,ExpectedInstanceOf){import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input)}__name(validateChoicesLength,"validateChoicesLength"),__name2(validateChoicesLength,"validateChoicesLength"),__name(assertReturnOfBuilder,"assertReturnOfBuilder"),__name2(assertReturnOfBuilder,"assertReturnOfBuilder");var localizationMapPredicate=import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v1012.Locale).map(locale=>[locale,import_shapeshift5.s.string.nullish]))).strict.nullish.setValidationEnabled(isValidationEnabled);function validateLocalizationMap(value){localizationMapPredicate.parse(value)}__name(validateLocalizationMap,"validateLocalizationMap"),__name2(validateLocalizationMap,"validateLocalizationMap");var dmPermissionPredicate=import_shapeshift5.s.boolean.nullish;function validateDMPermission(value){dmPermissionPredicate.parse(value)}__name(validateDMPermission,"validateDMPermission"),__name2(validateDMPermission,"validateDMPermission");var memberPermissionPredicate=import_shapeshift5.s.union(import_shapeshift5.s.bigint.transform(value=>value.toString()),import_shapeshift5.s.number.safeInt.transform(value=>value.toString()),import_shapeshift5.s.string.regex(/^\d+$/)).nullish;function validateDefaultMemberPermissions(permissions){return memberPermissionPredicate.parse(permissions)}function validateNSFW(value){booleanPredicate.parse(value)}__name(validateDefaultMemberPermissions,"validateDefaultMemberPermissions"),__name2(validateDefaultMemberPermissions,"validateDefaultMemberPermissions"),__name(validateNSFW,"validateNSFW"),__name2(validateNSFW,"validateNSFW");var import_ts_mixer6=__webpack_require__2(23457),import_v1024=__webpack_require__2(16791),import_ts_mixer5=__webpack_require__2(23457),SharedNameAndDescription=__name((_n=class{constructor(){__publicField(this,"name"),__publicField(this,"name_localizations"),__publicField(this,"description"),__publicField(this,"description_localizations")}setName(name){return validateName(name),Reflect.set(this,"name",name),this}setDescription(description){return validateDescription(description),Reflect.set(this,"description",description),this}setNameLocalization(locale,localizedName){this.name_localizations||Reflect.set(this,"name_localizations",{});const parsedLocale=validateLocale(locale);return null===localizedName?(this.name_localizations[parsedLocale]=null,this):(validateName(localizedName),this.name_localizations[parsedLocale]=localizedName,this)}setNameLocalizations(localizedNames){if(null===localizedNames)return Reflect.set(this,"name_localizations",null),this;Reflect.set(this,"name_localizations",{});for(const args2 of Object.entries(localizedNames))this.setNameLocalization(...args2);return this}setDescriptionLocalization(locale,localizedDescription){this.description_localizations||Reflect.set(this,"description_localizations",{});const parsedLocale=validateLocale(locale);return null===localizedDescription?(this.description_localizations[parsedLocale]=null,this):(validateDescription(localizedDescription),this.description_localizations[parsedLocale]=localizedDescription,this)}setDescriptionLocalizations(localizedDescriptions){if(null===localizedDescriptions)return Reflect.set(this,"description_localizations",null),this;Reflect.set(this,"description_localizations",{});for(const args2 of Object.entries(localizedDescriptions))this.setDescriptionLocalization(...args2);return this}},__14=new WeakMap,__privateAdd(_n,__14,__name2(_n,"SharedNameAndDescription")),_n),"SharedNameAndDescription"),import_v1013=__webpack_require__2(16791),ApplicationCommandOptionBase=__name((_o=class extends SharedNameAndDescription{constructor(){super(...arguments),__publicField(this,"required",!1)}setRequired(required){return validateRequired(required),Reflect.set(this,"required",required),this}runRequiredValidations(){validateRequiredParameters3(this.name,this.description,[]),validateLocalizationMap(this.name_localizations),validateLocalizationMap(this.description_localizations),validateRequired(this.required)}},__15=new WeakMap,__privateAdd(_o,__15,__name2(_o,"ApplicationCommandOptionBase")),_o),"ApplicationCommandOptionBase"),SlashCommandAttachmentOption=__name((_p=class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1013.ApplicationCommandOptionType.Attachment)}toJSON(){return this.runRequiredValidations(),{...this}}},__16=new WeakMap,__privateAdd(_p,__16,__name2(_p,"SlashCommandAttachmentOption")),_p),"SlashCommandAttachmentOption"),import_v1014=__webpack_require__2(16791),SlashCommandBooleanOption=__name((_q=class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1014.ApplicationCommandOptionType.Boolean)}toJSON(){return this.runRequiredValidations(),{...this}}},__17=new WeakMap,__privateAdd(_q,__17,__name2(_q,"SlashCommandBooleanOption")),_q),"SlashCommandBooleanOption"),import_v1016=__webpack_require__2(16791),import_ts_mixer=__webpack_require__2(23457),import_shapeshift6=__webpack_require__2(36579),import_v1015=__webpack_require__2(16791),allowedChannelTypes=[import_v1015.ChannelType.GuildText,import_v1015.ChannelType.GuildVoice,import_v1015.ChannelType.GuildCategory,import_v1015.ChannelType.GuildAnnouncement,import_v1015.ChannelType.AnnouncementThread,import_v1015.ChannelType.PublicThread,import_v1015.ChannelType.PrivateThread,import_v1015.ChannelType.GuildStageVoice,import_v1015.ChannelType.GuildForum],channelTypesPredicate=import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map(type=>import_shapeshift6.s.literal(type)))),ApplicationCommandOptionChannelTypesMixin=__name((_r=class{constructor(){__publicField(this,"channel_types")}addChannelTypes(...channelTypes){return void 0===this.channel_types&&Reflect.set(this,"channel_types",[]),this.channel_types.push(...channelTypesPredicate.parse(channelTypes)),this}},__18=new WeakMap,__privateAdd(_r,__18,__name2(_r,"ApplicationCommandOptionChannelTypesMixin")),_r),"ApplicationCommandOptionChannelTypesMixin"),SlashCommandChannelOption=__name(class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1016.ApplicationCommandOptionType.Channel)}toJSON(){return this.runRequiredValidations(),{...this}}},"SlashCommandChannelOption");__name2(SlashCommandChannelOption,"SlashCommandChannelOption"),SlashCommandChannelOption=__decorateClass([(0,import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin)],SlashCommandChannelOption);var import_shapeshift8=__webpack_require__2(36579),import_v1018=__webpack_require__2(16791),import_ts_mixer2=__webpack_require__2(23457),ApplicationCommandNumericOptionMinMaxValueMixin=__name((_s=class{constructor(){__publicField(this,"max_value"),__publicField(this,"min_value")}},__19=new WeakMap,__privateAdd(_s,__19,__name2(_s,"ApplicationCommandNumericOptionMinMaxValueMixin")),_s),"ApplicationCommandNumericOptionMinMaxValueMixin"),import_shapeshift7=__webpack_require__2(36579),import_v1017=__webpack_require__2(16791),stringPredicate=import_shapeshift7.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),numberPredicate=import_shapeshift7.s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY),choicesPredicate=import_shapeshift7.s.object({name:stringPredicate,name_localizations:localizationMapPredicate,value:import_shapeshift7.s.union(stringPredicate,numberPredicate)}).array,booleanPredicate2=import_shapeshift7.s.boolean,ApplicationCommandOptionWithChoicesAndAutocompleteMixin=__name((_t=class{constructor(){__publicField(this,"choices"),__publicField(this,"autocomplete"),__publicField(this,"type")}addChoices(...choices){if(choices.length>0&&this.autocomplete)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");choicesPredicate.parse(choices),void 0===this.choices&&Reflect.set(this,"choices",[]),validateChoicesLength(choices.length,this.choices);for(const{name,name_localizations,value}of choices)this.type===import_v1017.ApplicationCommandOptionType.String?stringPredicate.parse(value):numberPredicate.parse(value),this.choices.push({name,name_localizations,value});return this}setChoices(...choices){if(choices.length>0&&this.autocomplete)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");return choicesPredicate.parse(choices),Reflect.set(this,"choices",[]),this.addChoices(...choices),this}setAutocomplete(autocomplete){if(booleanPredicate2.parse(autocomplete),autocomplete&&Array.isArray(this.choices)&&this.choices.length>0)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");return Reflect.set(this,"autocomplete",autocomplete),this}},__20=new WeakMap,__privateAdd(_t,__20,__name2(_t,"ApplicationCommandOptionWithChoicesAndAutocompleteMixin")),_t),"ApplicationCommandOptionWithChoicesAndAutocompleteMixin"),numberValidator=import_shapeshift8.s.number.int,SlashCommandIntegerOption=__name(class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1018.ApplicationCommandOptionType.Integer)}setMaxValue(max){return numberValidator.parse(max),Reflect.set(this,"max_value",max),this}setMinValue(min){return numberValidator.parse(min),Reflect.set(this,"min_value",min),this}toJSON(){if(this.runRequiredValidations(),this.autocomplete&&Array.isArray(this.choices)&&this.choices.length>0)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");return{...this}}},"SlashCommandIntegerOption");__name2(SlashCommandIntegerOption,"SlashCommandIntegerOption"),SlashCommandIntegerOption=__decorateClass([(0,import_ts_mixer2.mix)(ApplicationCommandNumericOptionMinMaxValueMixin,ApplicationCommandOptionWithChoicesAndAutocompleteMixin)],SlashCommandIntegerOption);var import_v1019=__webpack_require__2(16791),SlashCommandMentionableOption=__name((_u=class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1019.ApplicationCommandOptionType.Mentionable)}toJSON(){return this.runRequiredValidations(),{...this}}},__21=new WeakMap,__privateAdd(_u,__21,__name2(_u,"SlashCommandMentionableOption")),_u),"SlashCommandMentionableOption"),import_shapeshift9=__webpack_require__2(36579),import_v1020=__webpack_require__2(16791),import_ts_mixer3=__webpack_require__2(23457),numberValidator2=import_shapeshift9.s.number,SlashCommandNumberOption=__name(class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1020.ApplicationCommandOptionType.Number)}setMaxValue(max){return numberValidator2.parse(max),Reflect.set(this,"max_value",max),this}setMinValue(min){return numberValidator2.parse(min),Reflect.set(this,"min_value",min),this}toJSON(){if(this.runRequiredValidations(),this.autocomplete&&Array.isArray(this.choices)&&this.choices.length>0)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");return{...this}}},"SlashCommandNumberOption");__name2(SlashCommandNumberOption,"SlashCommandNumberOption"),SlashCommandNumberOption=__decorateClass([(0,import_ts_mixer3.mix)(ApplicationCommandNumericOptionMinMaxValueMixin,ApplicationCommandOptionWithChoicesAndAutocompleteMixin)],SlashCommandNumberOption);var import_v1021=__webpack_require__2(16791),SlashCommandRoleOption=__name((_v=class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1021.ApplicationCommandOptionType.Role)}toJSON(){return this.runRequiredValidations(),{...this}}},__22=new WeakMap,__privateAdd(_v,__22,__name2(_v,"SlashCommandRoleOption")),_v),"SlashCommandRoleOption"),import_shapeshift10=__webpack_require__2(36579),import_v1022=__webpack_require__2(16791),import_ts_mixer4=__webpack_require__2(23457),minLengthValidator2=import_shapeshift10.s.number.greaterThanOrEqual(0).lessThanOrEqual(6e3),maxLengthValidator2=import_shapeshift10.s.number.greaterThanOrEqual(1).lessThanOrEqual(6e3),SlashCommandStringOption=__name(class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1022.ApplicationCommandOptionType.String),__publicField(this,"max_length"),__publicField(this,"min_length")}setMaxLength(max){return maxLengthValidator2.parse(max),Reflect.set(this,"max_length",max),this}setMinLength(min){return minLengthValidator2.parse(min),Reflect.set(this,"min_length",min),this}toJSON(){if(this.runRequiredValidations(),this.autocomplete&&Array.isArray(this.choices)&&this.choices.length>0)throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");return{...this}}},"SlashCommandStringOption");__name2(SlashCommandStringOption,"SlashCommandStringOption"),SlashCommandStringOption=__decorateClass([(0,import_ts_mixer4.mix)(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)],SlashCommandStringOption);var import_v1023=__webpack_require__2(16791),SlashCommandUserOption=__name((_w=class extends ApplicationCommandOptionBase{constructor(){super(...arguments),__publicField(this,"type",import_v1023.ApplicationCommandOptionType.User)}toJSON(){return this.runRequiredValidations(),{...this}}},__23=new WeakMap,__privateAdd(_w,__23,__name2(_w,"SlashCommandUserOption")),_w),"SlashCommandUserOption"),SharedSlashCommandOptions=__name((_x=class{constructor(){__publicField(this,"options")}addBooleanOption(input){return this._sharedAddOptionMethod(input,SlashCommandBooleanOption)}addUserOption(input){return this._sharedAddOptionMethod(input,SlashCommandUserOption)}addChannelOption(input){return this._sharedAddOptionMethod(input,SlashCommandChannelOption)}addRoleOption(input){return this._sharedAddOptionMethod(input,SlashCommandRoleOption)}addAttachmentOption(input){return this._sharedAddOptionMethod(input,SlashCommandAttachmentOption)}addMentionableOption(input){return this._sharedAddOptionMethod(input,SlashCommandMentionableOption)}addStringOption(input){return this._sharedAddOptionMethod(input,SlashCommandStringOption)}addIntegerOption(input){return this._sharedAddOptionMethod(input,SlashCommandIntegerOption)}addNumberOption(input){return this._sharedAddOptionMethod(input,SlashCommandNumberOption)}_sharedAddOptionMethod(input,Instance){const{options}=this;validateMaxOptionsLength(options);const result="function"==typeof input?input(new Instance):input;return assertReturnOfBuilder(result,Instance),options.push(result),this}},__24=new WeakMap,__privateAdd(_x,__24,__name2(_x,"SharedSlashCommandOptions")),_x),"SharedSlashCommandOptions"),SlashCommandSubcommandGroupBuilder=__name(class{constructor(){__publicField(this,"name"),__publicField(this,"description"),__publicField(this,"options",[])}addSubcommand(input){const{options}=this;validateMaxOptionsLength(options);const result="function"==typeof input?input(new SlashCommandSubcommandBuilder):input;return assertReturnOfBuilder(result,SlashCommandSubcommandBuilder),options.push(result),this}toJSON(){return validateRequiredParameters3(this.name,this.description,this.options),{type:import_v1024.ApplicationCommandOptionType.SubcommandGroup,name:this.name,name_localizations:this.name_localizations,description:this.description,description_localizations:this.description_localizations,options:this.options.map(option=>option.toJSON())}}},"SlashCommandSubcommandGroupBuilder");__name2(SlashCommandSubcommandGroupBuilder,"SlashCommandSubcommandGroupBuilder"),SlashCommandSubcommandGroupBuilder=__decorateClass([(0,import_ts_mixer5.mix)(SharedNameAndDescription)],SlashCommandSubcommandGroupBuilder);var SlashCommandSubcommandBuilder=__name(class{constructor(){__publicField(this,"name"),__publicField(this,"description"),__publicField(this,"options",[])}toJSON(){return validateRequiredParameters3(this.name,this.description,this.options),{type:import_v1024.ApplicationCommandOptionType.Subcommand,name:this.name,name_localizations:this.name_localizations,description:this.description,description_localizations:this.description_localizations,options:this.options.map(option=>option.toJSON())}}},"SlashCommandSubcommandBuilder");__name2(SlashCommandSubcommandBuilder,"SlashCommandSubcommandBuilder"),SlashCommandSubcommandBuilder=__decorateClass([(0,import_ts_mixer5.mix)(SharedNameAndDescription,SharedSlashCommandOptions)],SlashCommandSubcommandBuilder);var SlashCommandBuilder=__name(class{constructor(){__publicField(this,"name"),__publicField(this,"name_localizations"),__publicField(this,"description"),__publicField(this,"description_localizations"),__publicField(this,"options",[]),__publicField(this,"default_permission"),__publicField(this,"default_member_permissions"),__publicField(this,"dm_permission"),__publicField(this,"nsfw")}setDefaultPermission(value){return validateDefaultPermission(value),Reflect.set(this,"default_permission",value),this}setDefaultMemberPermissions(permissions){const permissionValue=validateDefaultMemberPermissions(permissions);return Reflect.set(this,"default_member_permissions",permissionValue),this}setDMPermission(enabled){return validateDMPermission(enabled),Reflect.set(this,"dm_permission",enabled),this}setNSFW(nsfw=!0){return validateNSFW(nsfw),Reflect.set(this,"nsfw",nsfw),this}addSubcommandGroup(input){const{options}=this;validateMaxOptionsLength(options);const result="function"==typeof input?input(new SlashCommandSubcommandGroupBuilder):input;return assertReturnOfBuilder(result,SlashCommandSubcommandGroupBuilder),options.push(result),this}addSubcommand(input){const{options}=this;validateMaxOptionsLength(options);const result="function"==typeof input?input(new SlashCommandSubcommandBuilder):input;return assertReturnOfBuilder(result,SlashCommandSubcommandBuilder),options.push(result),this}toJSON(){return validateRequiredParameters3(this.name,this.description,this.options),validateLocalizationMap(this.name_localizations),validateLocalizationMap(this.description_localizations),{...this,options:this.options.map(option=>option.toJSON())}}},"SlashCommandBuilder");__name2(SlashCommandBuilder,"SlashCommandBuilder"),SlashCommandBuilder=__decorateClass([(0,import_ts_mixer6.mix)(SharedSlashCommandOptions,SharedNameAndDescription)],SlashCommandBuilder);var Assertions_exports6={};__export(Assertions_exports6,{validateDMPermission:()=>validateDMPermission2,validateDefaultMemberPermissions:()=>validateDefaultMemberPermissions2,validateDefaultPermission:()=>validateDefaultPermission2,validateName:()=>validateName2,validateRequiredParameters:()=>validateRequiredParameters4,validateType:()=>validateType});var import_shapeshift11=__webpack_require__2(36579),import_v1025=__webpack_require__2(16791),namePredicate2=import_shapeshift11.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled),typePredicate=import_shapeshift11.s.union(import_shapeshift11.s.literal(import_v1025.ApplicationCommandType.User),import_shapeshift11.s.literal(import_v1025.ApplicationCommandType.Message)).setValidationEnabled(isValidationEnabled),booleanPredicate3=import_shapeshift11.s.boolean;function validateDefaultPermission2(value){booleanPredicate3.parse(value)}function validateName2(name){namePredicate2.parse(name)}function validateType(type){typePredicate.parse(type)}function validateRequiredParameters4(name,type){validateName2(name),validateType(type)}__name(validateDefaultPermission2,"validateDefaultPermission2"),__name2(validateDefaultPermission2,"validateDefaultPermission"),__name(validateName2,"validateName2"),__name2(validateName2,"validateName"),__name(validateType,"validateType"),__name2(validateType,"validateType"),__name(validateRequiredParameters4,"validateRequiredParameters4"),__name2(validateRequiredParameters4,"validateRequiredParameters");var dmPermissionPredicate2=import_shapeshift11.s.boolean.nullish;function validateDMPermission2(value){dmPermissionPredicate2.parse(value)}__name(validateDMPermission2,"validateDMPermission2"),__name2(validateDMPermission2,"validateDMPermission");var memberPermissionPredicate2=import_shapeshift11.s.union(import_shapeshift11.s.bigint.transform(value=>value.toString()),import_shapeshift11.s.number.safeInt.transform(value=>value.toString()),import_shapeshift11.s.string.regex(/^\d+$/)).nullish;function validateDefaultMemberPermissions2(permissions){return memberPermissionPredicate2.parse(permissions)}__name(validateDefaultMemberPermissions2,"validateDefaultMemberPermissions2"),__name2(validateDefaultMemberPermissions2,"validateDefaultMemberPermissions");var ContextMenuCommandBuilder=__name((_y=class{constructor(){__publicField(this,"name"),__publicField(this,"name_localizations"),__publicField(this,"type"),__publicField(this,"default_permission"),__publicField(this,"default_member_permissions"),__publicField(this,"dm_permission")}setName(name){return validateName2(name),Reflect.set(this,"name",name),this}setType(type){return validateType(type),Reflect.set(this,"type",type),this}setDefaultPermission(value){return validateDefaultPermission2(value),Reflect.set(this,"default_permission",value),this}setDefaultMemberPermissions(permissions){const permissionValue=validateDefaultMemberPermissions2(permissions);return Reflect.set(this,"default_member_permissions",permissionValue),this}setDMPermission(enabled){return validateDMPermission2(enabled),Reflect.set(this,"dm_permission",enabled),this}setNameLocalization(locale,localizedName){this.name_localizations||Reflect.set(this,"name_localizations",{});const parsedLocale=validateLocale(locale);return null===localizedName?(this.name_localizations[parsedLocale]=null,this):(validateName2(localizedName),this.name_localizations[parsedLocale]=localizedName,this)}setNameLocalizations(localizedNames){if(null===localizedNames)return Reflect.set(this,"name_localizations",null),this;Reflect.set(this,"name_localizations",{});for(const args2 of Object.entries(localizedNames))this.setNameLocalization(...args2);return this}toJSON(){return validateRequiredParameters4(this.name,this.type),validateLocalizationMap(this.name_localizations),{...this}}},__25=new WeakMap,__privateAdd(_y,__25,__name2(_y,"ContextMenuCommandBuilder")),_y),"ContextMenuCommandBuilder");function embedLength(data){return(data.title?.length??0)+(data.description?.length??0)+(data.fields?.reduce((prev,curr)=>prev+curr.name.length+curr.value.length,0)??0)+(data.footer?.text.length??0)+(data.author?.name.length??0)}__name(embedLength,"embedLength"),__name2(embedLength,"embedLength");var version="1.6.5"},16554:module2=>{"use strict";var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__defNormalProp2=__name((obj,key,value)=>key in obj?__defProp2(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,"__defNormalProp"),__name2=__name((target,value)=>__defProp2(target,"name",{value,configurable:!0}),"__name"),__export=__name((target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},"__export"),__copyProps=__name((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},"__copyProps"),__toCommonJS=__name(mod=>__copyProps(__defProp2({},"__esModule",{value:!0}),mod),"__toCommonJS"),__publicField2=__name((obj,key,value)=>(__defNormalProp2(obj,"symbol"!=typeof key?key+"":key,value),value),"__publicField"),src_exports={};__export(src_exports,{Collection:()=>Collection,default:()=>src_default}),module2.exports=__toCommonJS(src_exports);var _Collection=__name(class extends Map{ensure(key,defaultValueGenerator){if(this.has(key))return this.get(key);const defaultValue=defaultValueGenerator(key,this);return this.set(key,defaultValue),defaultValue}hasAll(...keys){return keys.every(k=>super.has(k))}hasAny(...keys){return keys.some(k=>super.has(k))}first(amount){if(typeof amount>"u")return this.values().next().value;if(amount<0)return this.last(-1*amount);amount=Math.min(this.size,amount);const iter=this.values();return Array.from({length:amount},()=>iter.next().value)}firstKey(amount){if(typeof amount>"u")return this.keys().next().value;if(amount<0)return this.lastKey(-1*amount);amount=Math.min(this.size,amount);const iter=this.keys();return Array.from({length:amount},()=>iter.next().value)}last(amount){const arr=[...this.values()];return typeof amount>"u"?arr[arr.length-1]:amount<0?this.first(-1*amount):amount?arr.slice(-amount):[]}lastKey(amount){const arr=[...this.keys()];return typeof amount>"u"?arr[arr.length-1]:amount<0?this.firstKey(-1*amount):amount?arr.slice(-amount):[]}at(index){return index=Math.floor(index),[...this.values()].at(index)}keyAt(index){return index=Math.floor(index),[...this.keys()].at(index)}random(amount){const arr=[...this.values()];return typeof amount>"u"?arr[Math.floor(Math.random()*arr.length)]:arr.length&&amount?Array.from({length:Math.min(amount,arr.length)},()=>arr.splice(Math.floor(Math.random()*arr.length),1)[0]):[]}randomKey(amount){const arr=[...this.keys()];return typeof amount>"u"?arr[Math.floor(Math.random()*arr.length)]:arr.length&&amount?Array.from({length:Math.min(amount,arr.length)},()=>arr.splice(Math.floor(Math.random()*arr.length),1)[0]):[]}reverse(){const entries=[...this.entries()].reverse();this.clear();for(const[key,value]of entries)this.set(key,value);return this}find(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));for(const[key,val]of this)if(fn2(val,key,this))return val}findKey(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));for(const[key,val]of this)if(fn2(val,key,this))return key}sweep(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));const previousSize=this.size;for(const[key,val]of this)fn2(val,key,this)&&this.delete(key);return previousSize-this.size}filter(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));const results=new this.constructor[Symbol.species];for(const[key,val]of this)fn2(val,key,this)&&results.set(key,val);return results}partition(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));const results=[new this.constructor[Symbol.species],new this.constructor[Symbol.species]];for(const[key,val]of this)fn2(val,key,this)?results[0].set(key,val):results[1].set(key,val);return results}flatMap(fn2,thisArg){const collections=this.map(fn2,thisArg);return(new this.constructor[Symbol.species]).concat(...collections)}map(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));const iter=this.entries();return Array.from({length:this.size},()=>{const[key,value]=iter.next().value;return fn2(value,key,this)})}mapValues(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));const coll=new this.constructor[Symbol.species];for(const[key,val]of this)coll.set(key,fn2(val,key,this));return coll}some(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));for(const[key,val]of this)if(fn2(val,key,this))return!0;return!1}every(fn2,thisArg){typeof thisArg<"u"&&(fn2=fn2.bind(thisArg));for(const[key,val]of this)if(!fn2(val,key,this))return!1;return!0}reduce(fn2,initialValue){let accumulator;if(typeof initialValue<"u"){accumulator=initialValue;for(const[key,val]of this)accumulator=fn2(accumulator,val,key,this);return accumulator}let first=!0;for(const[key,val]of this)first?(accumulator=val,first=!1):accumulator=fn2(accumulator,val,key,this);if(first)throw new TypeError("Reduce of empty collection with no initial value");return accumulator}each(fn2,thisArg){return this.forEach(fn2,thisArg),this}tap(fn2,thisArg){return typeof thisArg<"u"&&(fn2=fn2.bind(thisArg)),fn2(this),this}clone(){return new this.constructor[Symbol.species](this)}concat(...collections){const newColl=this.clone();for(const coll of collections)for(const[key,val]of coll)newColl.set(key,val);return newColl}equals(collection){if(!collection)return!1;if(this===collection)return!0;if(this.size!==collection.size)return!1;for(const[key,value]of this)if(!collection.has(key)||value!==collection.get(key))return!1;return!0}sort(compareFunction=_Collection.defaultSort){const entries=[...this.entries()];entries.sort((a,b2)=>compareFunction(a[1],b2[1],a[0],b2[0])),super.clear();for(const[k,v]of entries)super.set(k,v);return this}intersect(other){const coll=new this.constructor[Symbol.species];for(const[k,v]of other)this.has(k)&&Object.is(v,this.get(k))&&coll.set(k,v);return coll}difference(other){const coll=new this.constructor[Symbol.species];for(const[k,v]of other)this.has(k)||coll.set(k,v);for(const[k,v]of this)other.has(k)||coll.set(k,v);return coll}merge(other,whenInSelf,whenInOther,whenInBoth){const coll=new this.constructor[Symbol.species],keys=new Set([...this.keys(),...other.keys()]);for(const k of keys){const hasInSelf=this.has(k),hasInOther=other.has(k);if(hasInSelf&&hasInOther){const r=whenInBoth(this.get(k),other.get(k),k);r.keep&&coll.set(k,r.value)}else if(hasInSelf){const r=whenInSelf(this.get(k),k);r.keep&&coll.set(k,r.value)}else if(hasInOther){const r=whenInOther(other.get(k),k);r.keep&&coll.set(k,r.value)}}return coll}sorted(compareFunction=_Collection.defaultSort){return new this.constructor[Symbol.species](this).sort((av,bv,ak,bk)=>compareFunction(av,bv,ak,bk))}toJSON(){return[...this.values()]}static defaultSort(firstValue,secondValue){return Number(firstValue>secondValue)||Number(firstValue===secondValue)-1}static combineEntries(entries,combine){const coll=new _Collection;for(const[k,v]of entries)coll.has(k)?coll.set(k,combine(coll.get(k),v,k)):coll.set(k,v);return coll}},"_Collection"),Collection=_Collection;__name2(Collection,"Collection"),__publicField2(Collection,"default",_Collection);var src_default=Collection},12683:module2=>{"use strict";var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name2=__name((target,value)=>__defProp2(target,"name",{value,configurable:!0}),"__name"),__export=__name((target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},"__export"),__copyProps=__name((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},"__copyProps"),__toCommonJS=__name(mod=>__copyProps(__defProp2({},"__esModule",{value:!0}),mod),"__toCommonJS"),src_exports={};function escapeMarkdown(text,options={}){const{codeBlock:codeBlock2=!0,inlineCode:inlineCode2=!0,bold:bold2=!0,italic:italic2=!0,underline=!0,strikethrough:strikethrough2=!0,spoiler:spoiler2=!0,codeBlockContent=!0,inlineCodeContent=!0,escape:escape2=!0,heading=!1,bulletedList=!1,numberedList=!1,maskedLink=!1}=options;if(!codeBlockContent)return text.split("```").map((subString,index,array)=>index%2&&index!==array.length-1?subString:escapeMarkdown(subString,{inlineCode:inlineCode2,bold:bold2,italic:italic2,underline,strikethrough:strikethrough2,spoiler:spoiler2,inlineCodeContent,escape:escape2,heading,bulletedList,numberedList,maskedLink})).join(codeBlock2?"\\`\\`\\`":"```");if(!inlineCodeContent)return text.split(/(?<=^|[^`])`(?=[^`]|$)/g).map((subString,index,array)=>index%2&&index!==array.length-1?subString:escapeMarkdown(subString,{codeBlock:codeBlock2,bold:bold2,italic:italic2,underline,strikethrough:strikethrough2,spoiler:spoiler2,escape:escape2,heading,bulletedList,numberedList,maskedLink})).join(inlineCode2?"\\`":"`");let res=text;return escape2&&(res=escapeEscape(res)),inlineCode2&&(res=escapeInlineCode(res)),codeBlock2&&(res=escapeCodeBlock(res)),italic2&&(res=escapeItalic(res)),bold2&&(res=escapeBold(res)),underline&&(res=escapeUnderline(res)),strikethrough2&&(res=escapeStrikethrough(res)),spoiler2&&(res=escapeSpoiler(res)),heading&&(res=escapeHeading(res)),bulletedList&&(res=escapeBulletedList(res)),numberedList&&(res=escapeNumberedList(res)),maskedLink&&(res=escapeMaskedLink(res)),res}function escapeCodeBlock(text){return text.replaceAll("```","\\`\\`\\`")}function escapeInlineCode(text){return text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g,match=>2===match.length?"\\`\\`":"\\`")}function escapeItalic(text){let idx=0;const newText=text.replaceAll(/(?<=^|[^*])\*([^*]|\*\*|$)/g,(_,match)=>"**"===match?++idx%2?`\\*${match}`:`${match}\\*`:`\\*${match}`);return idx=0,newText.replaceAll(/(?<=^|[^_])(?)([^_]|__|$)/g,(_,match)=>"__"===match?++idx%2?`\\_${match}`:`${match}\\_`:`\\_${match}`)}function escapeBold(text){let idx=0;return text.replaceAll(/\*\*(\*)?/g,(_,match)=>match?++idx%2?`${match}\\*\\*`:`\\*\\*${match}`:"\\*\\*")}function escapeUnderline(text){let idx=0;return text.replaceAll(/(?)/g,(_,match)=>match?++idx%2?`${match}\\_\\_`:`\\_\\_${match}`:"\\_\\_")}function escapeStrikethrough(text){return text.replaceAll("~~","\\~\\~")}function escapeSpoiler(text){return text.replaceAll("||","\\|\\|")}function escapeEscape(text){return text.replaceAll("\\","\\\\")}function escapeHeading(text){return text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm,"$1$2$3\\$4")}function escapeBulletedList(text){return text.replaceAll(/^( *)([*-])( +)/gm,"$1\\$2$3")}function escapeNumberedList(text){return text.replaceAll(/^( *\d+)\./gm,"$1\\.")}function escapeMaskedLink(text){return text.replaceAll(/\[.+]\(.+\)/gm,"\\$&")}function codeBlock(language,content){return void 0===content?`\`\`\`\n${language}\n\`\`\``:`\`\`\`${language}\n${content}\n\`\`\``}function inlineCode(content){return`\`${content}\``}function italic(content){return`_${content}_`}function bold(content){return`**${content}**`}function underscore(content){return`__${content}__`}function strikethrough(content){return`~~${content}~~`}function quote(content){return`> ${content}`}function blockQuote(content){return`>>> ${content}`}function hideLinkEmbed(url){return`<${url}>`}function hyperlink(content,url,title){return title?`[${content}](${url} "${title}")`:`[${content}](${url})`}function spoiler(content){return`||${content}||`}function userMention(userId){return`<@${userId}>`}function channelMention(channelId){return`<#${channelId}>`}function roleMention(roleId){return`<@&${roleId}>`}function chatInputApplicationCommandMention(commandName,subcommandGroupName,subcommandName,commandId){return void 0!==commandId?``:void 0!==subcommandName?``:``}function formatEmoji(emojiId,animated=!1){return`<${animated?"a":""}:_:${emojiId}>`}function channelLink(channelId,guildId){return`https://discord.com/channels/${guildId??"@me"}/${channelId}`}function messageLink(channelId,messageId,guildId){return`${void 0===guildId?channelLink(channelId):channelLink(channelId,guildId)}/${messageId}`}function time(timeOrSeconds,style){return"number"!=typeof timeOrSeconds&&(timeOrSeconds=Math.floor((timeOrSeconds?.getTime()??Date.now())/1e3)),"string"==typeof style?``:``}__export(src_exports,{Faces:()=>Faces,TimestampStyles:()=>TimestampStyles,blockQuote:()=>blockQuote,bold:()=>bold,channelLink:()=>channelLink,channelMention:()=>channelMention,chatInputApplicationCommandMention:()=>chatInputApplicationCommandMention,codeBlock:()=>codeBlock,escapeBold:()=>escapeBold,escapeBulletedList:()=>escapeBulletedList,escapeCodeBlock:()=>escapeCodeBlock,escapeEscape:()=>escapeEscape,escapeHeading:()=>escapeHeading,escapeInlineCode:()=>escapeInlineCode,escapeItalic:()=>escapeItalic,escapeMarkdown:()=>escapeMarkdown,escapeMaskedLink:()=>escapeMaskedLink,escapeNumberedList:()=>escapeNumberedList,escapeSpoiler:()=>escapeSpoiler,escapeStrikethrough:()=>escapeStrikethrough,escapeUnderline:()=>escapeUnderline,formatEmoji:()=>formatEmoji,hideLinkEmbed:()=>hideLinkEmbed,hyperlink:()=>hyperlink,inlineCode:()=>inlineCode,italic:()=>italic,messageLink:()=>messageLink,quote:()=>quote,roleMention:()=>roleMention,spoiler:()=>spoiler,strikethrough:()=>strikethrough,time:()=>time,underscore:()=>underscore,userMention:()=>userMention}),module2.exports=__toCommonJS(src_exports),__name(escapeMarkdown,"escapeMarkdown"),__name2(escapeMarkdown,"escapeMarkdown"),__name(escapeCodeBlock,"escapeCodeBlock"),__name2(escapeCodeBlock,"escapeCodeBlock"),__name(escapeInlineCode,"escapeInlineCode"),__name2(escapeInlineCode,"escapeInlineCode"),__name(escapeItalic,"escapeItalic"),__name2(escapeItalic,"escapeItalic"),__name(escapeBold,"escapeBold"),__name2(escapeBold,"escapeBold"),__name(escapeUnderline,"escapeUnderline"),__name2(escapeUnderline,"escapeUnderline"),__name(escapeStrikethrough,"escapeStrikethrough"),__name2(escapeStrikethrough,"escapeStrikethrough"),__name(escapeSpoiler,"escapeSpoiler"),__name2(escapeSpoiler,"escapeSpoiler"),__name(escapeEscape,"escapeEscape"),__name2(escapeEscape,"escapeEscape"),__name(escapeHeading,"escapeHeading"),__name2(escapeHeading,"escapeHeading"),__name(escapeBulletedList,"escapeBulletedList"),__name2(escapeBulletedList,"escapeBulletedList"),__name(escapeNumberedList,"escapeNumberedList"),__name2(escapeNumberedList,"escapeNumberedList"),__name(escapeMaskedLink,"escapeMaskedLink"),__name2(escapeMaskedLink,"escapeMaskedLink"),__name(codeBlock,"codeBlock"),__name2(codeBlock,"codeBlock"),__name(inlineCode,"inlineCode"),__name2(inlineCode,"inlineCode"),__name(italic,"italic"),__name2(italic,"italic"),__name(bold,"bold"),__name2(bold,"bold"),__name(underscore,"underscore"),__name2(underscore,"underscore"),__name(strikethrough,"strikethrough"),__name2(strikethrough,"strikethrough"),__name(quote,"quote"),__name2(quote,"quote"),__name(blockQuote,"blockQuote"),__name2(blockQuote,"blockQuote"),__name(hideLinkEmbed,"hideLinkEmbed"),__name2(hideLinkEmbed,"hideLinkEmbed"),__name(hyperlink,"hyperlink"),__name2(hyperlink,"hyperlink"),__name(spoiler,"spoiler"),__name2(spoiler,"spoiler"),__name(userMention,"userMention"),__name2(userMention,"userMention"),__name(channelMention,"channelMention"),__name2(channelMention,"channelMention"),__name(roleMention,"roleMention"),__name2(roleMention,"roleMention"),__name(chatInputApplicationCommandMention,"chatInputApplicationCommandMention"),__name2(chatInputApplicationCommandMention,"chatInputApplicationCommandMention"),__name(formatEmoji,"formatEmoji"),__name2(formatEmoji,"formatEmoji"),__name(channelLink,"channelLink"),__name2(channelLink,"channelLink"),__name(messageLink,"messageLink"),__name2(messageLink,"messageLink"),__name(time,"time"),__name2(time,"time");var TimestampStyles={ShortTime:"t",LongTime:"T",ShortDate:"d",LongDate:"D",ShortDateTime:"f",LongDateTime:"F",RelativeTime:"R"},Faces=(Faces2=>(Faces2.Shrug="\xaf_(\u30c4)_/\xaf",Faces2.Tableflip="(\u256f\xb0\u25a1\xb0)\u256f\ufe35 \u253b\u2501\u253b",Faces2.Unflip="\u252c\u2500\u252c\u30ce( \xba _ \xba\u30ce)",Faces2))(Faces||{})},15693:(module2,__unused_webpack_exports2,__webpack_require__2)=>{"use strict";var _asyncToGenerator=__webpack_require__2(17156).default,__create=Object.create,__defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__defNormalProp2=__name((obj,key,value)=>key in obj?__defProp2(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,"__defNormalProp"),__name2=__name((target,value)=>__defProp2(target,"name",{value,configurable:!0}),"__name"),__commonJS=__name((cb,mod)=>__name(function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},"__require"),"__commonJS"),__export=__name((target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},"__export"),__copyProps=__name((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp2(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},"__copyProps"),__toESM=__name((mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},__copyProps(!isNodeMode&&mod&&mod.__esModule?target:__defProp2(target,"default",{value:mod,enumerable:!0}),mod)),"__toESM"),__toCommonJS=__name(mod=>__copyProps(__defProp2({},"__esModule",{value:!0}),mod),"__toCommonJS"),__publicField2=__name((obj,key,value)=>(__defNormalProp2(obj,"symbol"!=typeof key?key+"":key,value),value),"__publicField"),__accessCheck2=__name((obj,member,msg)=>{if(!member.has(obj))throw TypeError("Cannot "+msg)},"__accessCheck"),__privateGet2=__name((obj,member,getter)=>(__accessCheck2(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),"__privateGet"),__privateAdd2=__name((obj,member,value)=>{if(member.has(obj))throw TypeError("Cannot add the same private member more than once");member instanceof WeakSet?member.add(obj):member.set(obj,value)},"__privateAdd"),__privateSet2=__name((obj,member,value,setter)=>(__accessCheck2(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),"__privateSet"),require_package=__commonJS({"package.json"(exports2,module22){module22.exports={name:"@discordjs/rest",version:"0.4.0",description:"The REST API for discord.js",scripts:{build:"tsup && tsc --emitDeclarationOnly --incremental",test:"jest --pass-with-no-tests --collect-coverage",lint:"prettier --check . && eslint src __tests__ --ext mjs,js,ts",format:"prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",docs:"typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",prepublishOnly:"yarn build && yarn lint && yarn test",changelog:"git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'"},main:"./dist/index.js",module:"./dist/index.mjs",typings:"./dist/index.d.ts",exports:{import:"./dist/index.mjs",require:"./dist/index.js",types:"./dist/index.d.ts"},directories:{lib:"src",test:"__tests__"},files:["dist"],contributors:["Crawl ","Amish Shah ","SpaceEEC ","Vlad Frangu ","Antonio Roman "],license:"Apache-2.0",keywords:["discord","api","rest","discordapp","discordjs"],repository:{type:"git",url:"git+https://github.com/discordjs/discord.js.git"},bugs:{url:"https://github.com/discordjs/discord.js/issues"},homepage:"https://discord.js.org",dependencies:{"@discordjs/collection":"workspace:^","@sapphire/async-queue":"^1.3.1","@sapphire/snowflake":"^3.2.1","@types/node-fetch":"^2.6.1","discord-api-types":"^0.29.0","form-data":"^4.0.0","node-fetch":"^2.6.7",tslib:"^2.3.1"},devDependencies:{"@babel/core":"^7.17.9","@babel/plugin-proposal-decorators":"^7.17.9","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@discordjs/ts-docgen":"^0.4.1","@types/jest":"^27.4.1","@typescript-eslint/eslint-plugin":"^5.19.0","@typescript-eslint/parser":"^5.19.0","babel-plugin-const-enum":"^1.2.0","babel-plugin-transform-typescript-metadata":"^0.3.2",eslint:"^8.13.0","eslint-config-marine":"^9.4.1","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.26.0",jest:"^27.5.1",nock:"^13.2.4",prettier:"^2.6.2",tsup:"^5.12.5",typedoc:"^0.22.15",typescript:"^4.6.3"},engines:{node:">=16.9.0"},publishConfig:{access:"public"}}}}),src_exports={};__export(src_exports,{ALLOWED_EXTENSIONS:()=>ALLOWED_EXTENSIONS,ALLOWED_SIZES:()=>ALLOWED_SIZES,ALLOWED_STICKER_EXTENSIONS:()=>ALLOWED_STICKER_EXTENSIONS,CDN:()=>CDN,DefaultRestOptions:()=>DefaultRestOptions,DefaultUserAgent:()=>DefaultUserAgent,DiscordAPIError:()=>DiscordAPIError,HTTPError:()=>HTTPError,REST:()=>REST,RESTEvents:()=>RESTEvents,RateLimitError:()=>RateLimitError,RequestManager:()=>RequestManager,RequestMethod:()=>RequestMethod,makeURLSearchParams:()=>makeURLSearchParams}),module2.exports=__toCommonJS(src_exports);var import_v10=__webpack_require__2(50542),Package=require_package(),DefaultUserAgent=`DiscordBot (${Package.homepage}, ${Package.version})`,DefaultRestOptions={agent:{},api:"https://discord.com/api",cdn:"https://cdn.discordapp.com",headers:{},invalidRequestWarningInterval:0,globalRequestsPerSecond:50,offset:50,rejectOnRateLimit:null,retries:3,timeout:15e3,userAgentAppendix:`Node.js ${process.version}`,version:import_v10.APIVersion,hashSweepInterval:144e5,hashLifetime:864e5,handlerSweepInterval:36e5},RESTEvents=(RESTEvents2=>(RESTEvents2.Debug="restDebug",RESTEvents2.InvalidRequestWarning="invalidRequestWarning",RESTEvents2.RateLimited="rateLimited",RESTEvents2.Request="request",RESTEvents2.Response="response",RESTEvents2.HashSweep="hashSweep",RESTEvents2.HandlerSweep="handlerSweep",RESTEvents2))(RESTEvents||{}),ALLOWED_EXTENSIONS=["webp","png","jpg","jpeg","gif"],ALLOWED_STICKER_EXTENSIONS=["png","json"],ALLOWED_SIZES=[16,32,64,128,256,512,1024,2048,4096],CDN=__name(class{constructor(base=DefaultRestOptions.cdn){this.base=base}appAsset(clientId,assetHash,options){return this.makeURL(`/app-assets/${clientId}/${assetHash}`,options)}appIcon(clientId,iconHash,options){return this.makeURL(`/app-icons/${clientId}/${iconHash}`,options)}avatar(id,avatarHash,options){return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`,avatarHash,options)}banner(id,bannerHash,options){return this.dynamicMakeURL(`/banners/${id}/${bannerHash}`,bannerHash,options)}channelIcon(channelId,iconHash,options){return this.makeURL(`/channel-icons/${channelId}/${iconHash}`,options)}defaultAvatar(discriminator){return this.makeURL(`/embed/avatars/${discriminator}`,{extension:"png"})}discoverySplash(guildId,splashHash,options){return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`,options)}emoji(emojiId,extension){return this.makeURL(`/emojis/${emojiId}`,{extension})}guildMemberAvatar(guildId,userId,avatarHash,options){return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`,avatarHash,options)}icon(id,iconHash,options){return this.dynamicMakeURL(`/icons/${id}/${iconHash}`,iconHash,options)}roleIcon(roleId,roleIconHash,options){return this.makeURL(`/role-icons/${roleId}/${roleIconHash}`,options)}splash(guildId,splashHash,options){return this.makeURL(`/splashes/${guildId}/${splashHash}`,options)}sticker(stickerId,extension){return this.makeURL(`/stickers/${stickerId}`,{allowedExtensions:ALLOWED_STICKER_EXTENSIONS,extension:extension??"png"})}stickerPackBanner(bannerId,options){return this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`,options)}teamIcon(teamId,iconHash,options){return this.makeURL(`/team-icons/${teamId}/${iconHash}`,options)}guildScheduledEventCover(scheduledEventId,coverHash,options){return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`,options)}dynamicMakeURL(route,hash,{forceStatic=!1,...options}={}){return this.makeURL(route,!forceStatic&&hash.startsWith("a_")?{...options,extension:"gif"}:options)}makeURL(route,{allowedExtensions=ALLOWED_EXTENSIONS,extension="webp",size}={}){if(extension=String(extension).toLowerCase(),!allowedExtensions.includes(extension))throw new RangeError(`Invalid extension provided: ${extension}\nMust be one of: ${allowedExtensions.join(", ")}`);if(size&&!ALLOWED_SIZES.includes(size))throw new RangeError(`Invalid size provided: ${size}\nMust be one of: ${ALLOWED_SIZES.join(", ")}`);const url=new URL(`${this.base}${route}.${extension}`);return size&&url.searchParams.set("size",String(size)),url.toString()}},"CDN");function isErrorGroupWrapper(error){return Reflect.has(error,"_errors")}function isErrorResponse(error){return"string"==typeof Reflect.get(error,"message")}__name2(CDN,"CDN"),__name(isErrorGroupWrapper,"isErrorGroupWrapper"),__name2(isErrorGroupWrapper,"isErrorGroupWrapper"),__name(isErrorResponse,"isErrorResponse"),__name2(isErrorResponse,"isErrorResponse");var DiscordAPIError=__name(class extends Error{constructor(rawError,code2,status,method,url,bodyData){super(DiscordAPIError.getMessage(rawError)),this.rawError=rawError,this.code=code2,this.status=status,this.method=method,this.url=url,__publicField2(this,"requestBody"),this.requestBody={files:bodyData.files,json:bodyData.body}}get name(){return`${DiscordAPIError.name}[${this.code}]`}static getMessage(error){let flattened="";return"code"in error?(error.errors&&(flattened=[...this.flattenDiscordError(error.errors)].join("\n")),error.message&&flattened?`${error.message}\n${flattened}`:error.message||flattened||"Unknown Error"):error.error_description??"No Description"}static*flattenDiscordError(obj,key=""){if(isErrorResponse(obj))return yield`${key.length?`${key}[${obj.code}]`:`${obj.code}`}: ${obj.message}`.trim();for(const[k,v]of Object.entries(obj)){const nextKey=k.startsWith("_")?key:key?Number.isNaN(Number(k))?`${key}.${k}`:`${key}[${k}]`:k;if("string"==typeof v)yield v;else if(isErrorGroupWrapper(v))for(const error of v._errors)yield*this.flattenDiscordError(error,nextKey);else yield*this.flattenDiscordError(v,nextKey)}}},"DiscordAPIError");__name2(DiscordAPIError,"DiscordAPIError");var HTTPError=__name(class extends Error{constructor(message2,name,status,method,url,bodyData){super(message2),this.name=name,this.status=status,this.method=method,this.url=url,__publicField2(this,"requestBody"),this.requestBody={files:bodyData.files,json:bodyData.body}}},"HTTPError");__name2(HTTPError,"HTTPError");var RateLimitError=__name(class extends Error{constructor({timeToReset,limit,method,hash,url,route,majorParameter,global:global2}){super(),__publicField2(this,"timeToReset"),__publicField2(this,"limit"),__publicField2(this,"method"),__publicField2(this,"hash"),__publicField2(this,"url"),__publicField2(this,"route"),__publicField2(this,"majorParameter"),__publicField2(this,"global"),this.timeToReset=timeToReset,this.limit=limit,this.method=method,this.hash=hash,this.url=url,this.route=route,this.majorParameter=majorParameter,this.global=global2}get name(){return`${RateLimitError.name}[${this.route}]`}},"RateLimitError");__name2(RateLimitError,"RateLimitError");var import_node_events=__webpack_require__2(82361),import_node_http=__webpack_require__2(13685),import_node_https=__webpack_require__2(95687),import_collection=__toESM(__webpack_require__2(16554)),import_snowflake=__webpack_require__2(75618),import_form_data=__toESM(__webpack_require__2(65924)),import_promises=__webpack_require__2(68670),import_async_queue=__webpack_require__2(99073),import_node_fetch=__toESM(__webpack_require__2(79817));function serializeSearchParam(value){switch(typeof value){case"string":return value;case"number":case"bigint":case"boolean":return value.toString();case"object":return null===value?null:value instanceof Date?Number.isNaN(value.getTime())?null:value.toISOString():"function"==typeof value.toString&&value.toString!==Object.prototype.toString?value.toString():null;default:return null}}function makeURLSearchParams(options){const params=new URLSearchParams;if(!options)return params;for(const[key,value]of Object.entries(options)){const serialized=serializeSearchParam(value);null!==serialized&¶ms.append(key,serialized)}return params}function parseResponse(res){return res.headers.get("Content-Type")?.startsWith("application/json")?res.json():res.arrayBuffer()}function hasSublimit(bucketRoute,body,method){if("/channels/:id"===bucketRoute){if("object"!=typeof body||null===body||"patch"!==method)return!1;const castedBody=body;return["name","topic"].some(key=>Reflect.has(castedBody,key))}return!0}__name(serializeSearchParam,"serializeSearchParam"),__name2(serializeSearchParam,"serializeSearchParam"),__name(makeURLSearchParams,"makeURLSearchParams"),__name2(makeURLSearchParams,"makeURLSearchParams"),__name(parseResponse,"parseResponse"),__name2(parseResponse,"parseResponse"),__name(hasSublimit,"hasSublimit"),__name2(hasSublimit,"hasSublimit");var _asyncQueue,_sublimitedQueue,_sublimitPromise,_shiftSublimit,invalidCount=0,invalidCountResetTime=null,SequentialHandler=__name(class{constructor(manager,hash,majorParameter){this.manager=manager,this.hash=hash,this.majorParameter=majorParameter,__publicField2(this,"id"),__publicField2(this,"reset",-1),__publicField2(this,"remaining",1),__publicField2(this,"limit",1/0),__privateAdd2(this,_asyncQueue,new import_async_queue.AsyncQueue),__privateAdd2(this,_sublimitedQueue,null),__privateAdd2(this,_sublimitPromise,null),__privateAdd2(this,_shiftSublimit,!1),this.id=`${hash}:${majorParameter}`}get inactive(){return 0===__privateGet2(this,_asyncQueue).remaining&&(null===__privateGet2(this,_sublimitedQueue)||0===__privateGet2(this,_sublimitedQueue).remaining)&&!this.limited}get globalLimited(){return this.manager.globalRemaining<=0&&Date.now()rateLimitData.route.startsWith(route.toLowerCase()))))throw new RateLimitError(rateLimitData)})()}queueRequest(routeId,url,options,requestData){var _this3=this;return _asyncToGenerator(function*(){let queue=__privateGet2(_this3,_asyncQueue),queueType=0;if(__privateGet2(_this3,_sublimitedQueue)&&hasSublimit(routeId.bucketRoute,requestData.body,options.method)&&(queue=__privateGet2(_this3,_sublimitedQueue),queueType=1),yield queue.wait(),0===queueType)if(__privateGet2(_this3,_sublimitedQueue)&&hasSublimit(routeId.bucketRoute,requestData.body,options.method)){queue=__privateGet2(_this3,_sublimitedQueue);const wait=queue.wait();__privateGet2(_this3,_asyncQueue).shift(),yield wait}else __privateGet2(_this3,_sublimitPromise)&&(yield __privateGet2(_this3,_sublimitPromise).promise);try{return yield _this3.runRequest(routeId,url,options,requestData)}finally{queue.shift(),__privateGet2(_this3,_shiftSublimit)&&(__privateSet2(_this3,_shiftSublimit,!1),__privateGet2(_this3,_sublimitedQueue)?.shift()),0===__privateGet2(_this3,_sublimitedQueue)?.remaining&&(__privateGet2(_this3,_sublimitPromise)?.resolve(),__privateSet2(_this3,_sublimitedQueue,null))}})()}runRequest(routeId,url,options,requestData,retries=0){var _this4=this;return _asyncToGenerator(function*(){for(;_this4.limited;){const isGlobal=_this4.globalLimited;let limit2,timeout2,delay;isGlobal?(limit2=_this4.manager.options.globalRequestsPerSecond,timeout2=_this4.manager.globalReset+_this4.manager.options.offset-Date.now(),_this4.manager.globalDelay||(_this4.manager.globalDelay=_this4.globalDelayFor(timeout2)),delay=_this4.manager.globalDelay):(limit2=_this4.limit,timeout2=_this4.timeToReset,delay=(0,import_promises.setTimeout)(timeout2));const rateLimitData={timeToReset:timeout2,limit:limit2,method:options.method??"get",hash:_this4.hash,url,route:routeId.bucketRoute,majorParameter:_this4.majorParameter,global:isGlobal};_this4.manager.emit("rateLimited",rateLimitData),yield _this4.onRateLimit(rateLimitData),isGlobal?_this4.debug(`Global rate limit hit, blocking all requests for ${timeout2}ms`):_this4.debug(`Waiting ${timeout2}ms for rate limit to pass`),yield delay}(!_this4.manager.globalReset||_this4.manager.globalResetcontroller.abort(),_this4.manager.options.timeout).unref();let res;try{res=yield(0,import_node_fetch.default)(url,{...options,signal:controller.signal})}catch(error){if(error instanceof Error&&"AbortError"===error.name&&retries!==_this4.manager.options.retries)return yield _this4.runRequest(routeId,url,options,requestData,++retries);throw error}finally{clearTimeout(timeout)}_this4.manager.listenerCount("response")&&_this4.manager.emit("response",{method,path:routeId.original,route:routeId.bucketRoute,options,data:requestData,retries},res.clone());let retryAfter=0;const limit=res.headers.get("X-RateLimit-Limit"),remaining=res.headers.get("X-RateLimit-Remaining"),reset=res.headers.get("X-RateLimit-Reset-After"),hash=res.headers.get("X-RateLimit-Bucket"),retry=res.headers.get("Retry-After");if(_this4.limit=limit?Number(limit):1/0,_this4.remaining=remaining?Number(remaining):1,_this4.reset=reset?1e3*Number(reset)+Date.now()+_this4.manager.options.offset:Date.now(),retry&&(retryAfter=1e3*Number(retry)+_this4.manager.options.offset),hash&&hash!==_this4.hash)_this4.debug(["Received bucket hash update",` Old Hash : ${_this4.hash}`,` New Hash : ${hash}`].join("\n")),_this4.manager.hashes.set(`${method}:${routeId.bucketRoute}`,{value:hash,lastAccess:Date.now()});else if(hash){const hashData=_this4.manager.hashes.get(`${method}:${routeId.bucketRoute}`);hashData&&(hashData.lastAccess=Date.now())}let sublimitTimeout=null;if(retryAfter>0&&(res.headers.get("X-RateLimit-Global")?(_this4.manager.globalRemaining=0,_this4.manager.globalReset=Date.now()+retryAfter):_this4.localLimited||(sublimitTimeout=retryAfter)),(401===res.status||403===res.status||429===res.status)&&((!invalidCountResetTime||invalidCountResetTime0&&invalidCount%_this4.manager.options.invalidRequestWarningInterval==0&&_this4.manager.emit("invalidRequestWarning",{count:invalidCount,remainingTime:invalidCountResetTime-Date.now()})),res.ok)return parseResponse(res);if(429===res.status){const isGlobal=_this4.globalLimited;let limit2,timeout2;if(isGlobal?(limit2=_this4.manager.options.globalRequestsPerSecond,timeout2=_this4.manager.globalReset+_this4.manager.options.offset-Date.now()):(limit2=_this4.limit,timeout2=_this4.timeToReset),yield _this4.onRateLimit({timeToReset:timeout2,limit:limit2,method,hash:_this4.hash,url,route:routeId.bucketRoute,majorParameter:_this4.majorParameter,global:isGlobal}),_this4.debug(["Encountered unexpected 429 rate limit",` Global : ${isGlobal.toString()}`,` Method : ${method}`,` URL : ${url}`,` Bucket : ${routeId.bucketRoute}`,` Major parameter: ${routeId.majorParameter}`,` Hash : ${_this4.hash}`,` Limit : ${limit2}`,` Retry After : ${retryAfter}ms`," Sublimit : "+(sublimitTimeout?`${sublimitTimeout}ms`:"None")].join("\n")),sublimitTimeout){const firstSublimit=!__privateGet2(_this4,_sublimitedQueue);let resolve;firstSublimit&&(__privateSet2(_this4,_sublimitedQueue,new import_async_queue.AsyncQueue),__privateGet2(_this4,_sublimitedQueue).wait(),__privateGet2(_this4,_asyncQueue).shift()),__privateGet2(_this4,_sublimitPromise)?.resolve(),__privateSet2(_this4,_sublimitPromise,null),yield(0,import_promises.setTimeout)(sublimitTimeout,void 0,{ref:!1});const promise=new Promise(res2=>resolve=res2);__privateSet2(_this4,_sublimitPromise,{promise,resolve}),firstSublimit&&(yield __privateGet2(_this4,_asyncQueue).wait(),__privateSet2(_this4,_shiftSublimit,!0))}return _this4.runRequest(routeId,url,options,requestData,retries)}if(res.status>=500&&res.status<600){if(retries!==_this4.manager.options.retries)return _this4.runRequest(routeId,url,options,requestData,++retries);throw new HTTPError(res.statusText,res.constructor.name,res.status,method,url,requestData)}if(res.status>=400&&res.status<500){401===res.status&&requestData.auth&&_this4.manager.setToken(null);const data=yield parseResponse(res);throw new DiscordAPIError(data,"code"in data?data.code:data.error,res.status,method,url,requestData)}return null})()}},"SequentialHandler");__name2(SequentialHandler,"SequentialHandler"),_asyncQueue=new WeakMap,_sublimitedQueue=new WeakMap,_sublimitPromise=new WeakMap,_shiftSublimit=new WeakMap;var _token,RequestMethod=(RequestMethod2=>(RequestMethod2.Delete="delete",RequestMethod2.Get="get",RequestMethod2.Patch="patch",RequestMethod2.Post="post",RequestMethod2.Put="put",RequestMethod2))(RequestMethod||{}),_RequestManager=__name(class extends import_node_events.EventEmitter{constructor(options){super(),__publicField2(this,"globalRemaining"),__publicField2(this,"globalDelay",null),__publicField2(this,"globalReset",-1),__publicField2(this,"hashes",new import_collection.default),__publicField2(this,"handlers",new import_collection.default),__privateAdd2(this,_token,null),__publicField2(this,"hashTimer"),__publicField2(this,"handlerTimer"),__publicField2(this,"agent",null),__publicField2(this,"options"),this.options={...DefaultRestOptions,...options},this.options.offset=Math.max(0,this.options.offset),this.globalRemaining=this.options.globalRequestsPerSecond,this.setupSweepers()}setupSweepers(){const validateMaxInterval=__name2(interval=>{if(interval>144e5)throw new Error("Cannot set an interval greater than 4 hours")},"validateMaxInterval");0!==this.options.hashSweepInterval&&this.options.hashSweepInterval!==1/0&&(validateMaxInterval(this.options.hashSweepInterval),this.hashTimer=setInterval(()=>{const sweptHashes=new import_collection.default,currentDate=Date.now();this.hashes.sweep((v,k)=>{if(-1===v.lastAccess)return!1;const shouldSweep=Math.floor(currentDate-v.lastAccess)>this.options.hashLifetime;return shouldSweep&&sweptHashes.set(k,v),this.emit("restDebug",`Hash ${v.value} for ${k} swept due to lifetime being exceeded`),shouldSweep}),this.emit("hashSweep",sweptHashes)},this.options.hashSweepInterval).unref()),0!==this.options.handlerSweepInterval&&this.options.handlerSweepInterval!==1/0&&(validateMaxInterval(this.options.handlerSweepInterval),this.handlerTimer=setInterval(()=>{const sweptHandlers=new import_collection.default;this.handlers.sweep((v,k)=>{const{inactive}=v;return inactive&&sweptHandlers.set(k,v),this.emit("restDebug",`Handler ${v.id} for ${k} swept due to being inactive`),inactive}),this.emit("handlerSweep",sweptHandlers)},this.options.handlerSweepInterval).unref())}setToken(token){return __privateSet2(this,_token,token),this}queueRequest(request){var _this5=this;return _asyncToGenerator(function*(){const routeId=_RequestManager.generateRouteData(request.fullRoute,request.method),hash=_this5.hashes.get(`${request.method}:${routeId.bucketRoute}`)??{value:`Global(${request.method}:${routeId.bucketRoute})`,lastAccess:-1},handler=_this5.handlers.get(`${hash.value}:${routeId.majorParameter}`)??_this5.createHandler(hash.value,routeId.majorParameter),{url,fetchOptions}=_this5.resolveRequest(request);return handler.queueRequest(routeId,url,fetchOptions,{body:request.body,files:request.files,auth:!1!==request.auth})})()}createHandler(hash,majorParameter){const queue=new SequentialHandler(this,hash,majorParameter);return this.handlers.set(queue.id,queue),queue}resolveRequest(request){const{options}=this;this.agent??(this.agent=options.api.startsWith("https")?new import_node_https.Agent({...options.agent,keepAlive:!0}):new import_node_http.Agent({...options.agent,keepAlive:!0}));let query="";if(request.query){const resolvedQuery=request.query.toString();""!==resolvedQuery&&(query=`?${resolvedQuery}`)}const headers={...this.options.headers,"User-Agent":`${DefaultUserAgent} ${options.userAgentAppendix}`.trim()};if(!1!==request.auth){if(!__privateGet2(this,_token))throw new Error("Expected token to be set for this request, but none was present");headers.Authorization=`${request.authPrefix??"Bot"} ${__privateGet2(this,_token)}`}request.reason?.length&&(headers["X-Audit-Log-Reason"]=encodeURIComponent(request.reason));const url=`${options.api}${!1===request.versioned?"":`/v${options.version}`}${request.fullRoute}${query}`;let finalBody,additionalHeaders={};if(request.files?.length){const formData=new import_form_data.default;for(const[index,file2]of request.files.entries())formData.append(file2.key??`files[${index}]`,file2.data,file2.name);if(null!=request.body)if(request.appendToFormData)for(const[key,value]of Object.entries(request.body))formData.append(key,value);else formData.append("payload_json",JSON.stringify(request.body));finalBody=formData,additionalHeaders=formData.getHeaders()}else null!=request.body&&(request.passThroughBody?finalBody=request.body:(finalBody=JSON.stringify(request.body),additionalHeaders={"Content-Type":"application/json"}));return{url,fetchOptions:{agent:this.agent,body:finalBody,headers:{...request.headers??{},...additionalHeaders,...headers},method:request.method}}}clearHashSweeper(){clearInterval(this.hashTimer)}clearHandlerSweeper(){clearInterval(this.handlerTimer)}static generateRouteData(endpoint,method){const majorId=/^\/(?:channels|guilds|webhooks)\/(\d{16,19})/.exec(endpoint)?.[1]??"global",baseRoute=endpoint.replace(/\d{16,19}/g,":id").replace(/\/reactions\/(.*)/,"/reactions/:reaction");let exceptions="";if("delete"===method&&"/channels/:id/messages/:id"===baseRoute){const id=/\d{16,19}$/.exec(endpoint)[0],timestamp=import_snowflake.DiscordSnowflake.timestampFrom(id);Date.now()-timestamp>12096e5&&(exceptions+="/Delete Old Message")}return{majorParameter:majorId,bucketRoute:baseRoute+exceptions,original:endpoint}}},"_RequestManager"),RequestManager=_RequestManager;__name2(RequestManager,"RequestManager"),_token=new WeakMap;var import_node_events2=__webpack_require__2(82361),REST=__name(class extends import_node_events2.EventEmitter{constructor(options={}){super(),__publicField2(this,"cdn"),__publicField2(this,"requestManager"),this.cdn=new CDN(options.cdn??DefaultRestOptions.cdn),this.requestManager=new RequestManager(options).on("restDebug",this.emit.bind(this,"restDebug")).on("rateLimited",this.emit.bind(this,"rateLimited")).on("invalidRequestWarning",this.emit.bind(this,"invalidRequestWarning")).on("hashSweep",this.emit.bind(this,"hashSweep")),this.on("newListener",(name,listener)=>{("request"===name||"response"===name)&&this.requestManager.on(name,listener)}),this.on("removeListener",(name,listener)=>{("request"===name||"response"===name)&&this.requestManager.off(name,listener)})}setToken(token){return this.requestManager.setToken(token),this}get(fullRoute,options={}){return this.request({...options,fullRoute,method:"get"})}delete(fullRoute,options={}){return this.request({...options,fullRoute,method:"delete"})}post(fullRoute,options={}){return this.request({...options,fullRoute,method:"post"})}put(fullRoute,options={}){return this.request({...options,fullRoute,method:"put"})}patch(fullRoute,options={}){return this.request({...options,fullRoute,method:"patch"})}request(options){return this.requestManager.queueRequest(options)}},"REST");__name2(REST,"REST")},37694:(__unused_webpack_module,exports2)=>{"use strict";Object.defineProperty(exports2,"__esModule",{value:!0})},6392:function(__unused_webpack_module,exports2,__webpack_require__2){"use strict";var GatewayOpcodes2,GatewayCloseCodes2,GatewayIntentBits2,GatewayDispatchEvents2,__createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports3){for(var p2 in m)"default"!==p2&&!Object.prototype.hasOwnProperty.call(exports3,p2)&&__createBinding(exports3,m,p2)};Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.GatewayDispatchEvents=exports2.GatewayIntentBits=exports2.GatewayCloseCodes=exports2.GatewayOpcodes=exports2.GatewayVersion=void 0,__exportStar(__webpack_require__2(37694),exports2),exports2.GatewayVersion="10",(GatewayOpcodes2=exports2.GatewayOpcodes||(exports2.GatewayOpcodes={}))[GatewayOpcodes2.Dispatch=0]="Dispatch",GatewayOpcodes2[GatewayOpcodes2.Heartbeat=1]="Heartbeat",GatewayOpcodes2[GatewayOpcodes2.Identify=2]="Identify",GatewayOpcodes2[GatewayOpcodes2.PresenceUpdate=3]="PresenceUpdate",GatewayOpcodes2[GatewayOpcodes2.VoiceStateUpdate=4]="VoiceStateUpdate",GatewayOpcodes2[GatewayOpcodes2.Resume=6]="Resume",GatewayOpcodes2[GatewayOpcodes2.Reconnect=7]="Reconnect",GatewayOpcodes2[GatewayOpcodes2.RequestGuildMembers=8]="RequestGuildMembers",GatewayOpcodes2[GatewayOpcodes2.InvalidSession=9]="InvalidSession",GatewayOpcodes2[GatewayOpcodes2.Hello=10]="Hello",GatewayOpcodes2[GatewayOpcodes2.HeartbeatAck=11]="HeartbeatAck",(GatewayCloseCodes2=exports2.GatewayCloseCodes||(exports2.GatewayCloseCodes={}))[GatewayCloseCodes2.UnknownError=4e3]="UnknownError",GatewayCloseCodes2[GatewayCloseCodes2.UnknownOpcode=4001]="UnknownOpcode",GatewayCloseCodes2[GatewayCloseCodes2.DecodeError=4002]="DecodeError",GatewayCloseCodes2[GatewayCloseCodes2.NotAuthenticated=4003]="NotAuthenticated",GatewayCloseCodes2[GatewayCloseCodes2.AuthenticationFailed=4004]="AuthenticationFailed",GatewayCloseCodes2[GatewayCloseCodes2.AlreadyAuthenticated=4005]="AlreadyAuthenticated",GatewayCloseCodes2[GatewayCloseCodes2.InvalidSeq=4007]="InvalidSeq",GatewayCloseCodes2[GatewayCloseCodes2.RateLimited=4008]="RateLimited",GatewayCloseCodes2[GatewayCloseCodes2.SessionTimedOut=4009]="SessionTimedOut",GatewayCloseCodes2[GatewayCloseCodes2.InvalidShard=4010]="InvalidShard",GatewayCloseCodes2[GatewayCloseCodes2.ShardingRequired=4011]="ShardingRequired",GatewayCloseCodes2[GatewayCloseCodes2.InvalidAPIVersion=4012]="InvalidAPIVersion",GatewayCloseCodes2[GatewayCloseCodes2.InvalidIntents=4013]="InvalidIntents",GatewayCloseCodes2[GatewayCloseCodes2.DisallowedIntents=4014]="DisallowedIntents",(GatewayIntentBits2=exports2.GatewayIntentBits||(exports2.GatewayIntentBits={}))[GatewayIntentBits2.Guilds=1]="Guilds",GatewayIntentBits2[GatewayIntentBits2.GuildMembers=2]="GuildMembers",GatewayIntentBits2[GatewayIntentBits2.GuildBans=4]="GuildBans",GatewayIntentBits2[GatewayIntentBits2.GuildEmojisAndStickers=8]="GuildEmojisAndStickers",GatewayIntentBits2[GatewayIntentBits2.GuildIntegrations=16]="GuildIntegrations",GatewayIntentBits2[GatewayIntentBits2.GuildWebhooks=32]="GuildWebhooks",GatewayIntentBits2[GatewayIntentBits2.GuildInvites=64]="GuildInvites",GatewayIntentBits2[GatewayIntentBits2.GuildVoiceStates=128]="GuildVoiceStates",GatewayIntentBits2[GatewayIntentBits2.GuildPresences=256]="GuildPresences",GatewayIntentBits2[GatewayIntentBits2.GuildMessages=512]="GuildMessages",GatewayIntentBits2[GatewayIntentBits2.GuildMessageReactions=1024]="GuildMessageReactions",GatewayIntentBits2[GatewayIntentBits2.GuildMessageTyping=2048]="GuildMessageTyping",GatewayIntentBits2[GatewayIntentBits2.DirectMessages=4096]="DirectMessages",GatewayIntentBits2[GatewayIntentBits2.DirectMessageReactions=8192]="DirectMessageReactions",GatewayIntentBits2[GatewayIntentBits2.DirectMessageTyping=16384]="DirectMessageTyping",GatewayIntentBits2[GatewayIntentBits2.MessageContent=32768]="MessageContent",GatewayIntentBits2[GatewayIntentBits2.GuildScheduledEvents=65536]="GuildScheduledEvents",(GatewayDispatchEvents2=exports2.GatewayDispatchEvents||(exports2.GatewayDispatchEvents={})).ChannelCreate="CHANNEL_CREATE",GatewayDispatchEvents2.ChannelDelete="CHANNEL_DELETE",GatewayDispatchEvents2.ChannelPinsUpdate="CHANNEL_PINS_UPDATE",GatewayDispatchEvents2.ChannelUpdate="CHANNEL_UPDATE",GatewayDispatchEvents2.GuildBanAdd="GUILD_BAN_ADD",GatewayDispatchEvents2.GuildBanRemove="GUILD_BAN_REMOVE",GatewayDispatchEvents2.GuildCreate="GUILD_CREATE",GatewayDispatchEvents2.GuildDelete="GUILD_DELETE",GatewayDispatchEvents2.GuildEmojisUpdate="GUILD_EMOJIS_UPDATE",GatewayDispatchEvents2.GuildIntegrationsUpdate="GUILD_INTEGRATIONS_UPDATE",GatewayDispatchEvents2.GuildMemberAdd="GUILD_MEMBER_ADD",GatewayDispatchEvents2.GuildMemberRemove="GUILD_MEMBER_REMOVE",GatewayDispatchEvents2.GuildMembersChunk="GUILD_MEMBERS_CHUNK",GatewayDispatchEvents2.GuildMemberUpdate="GUILD_MEMBER_UPDATE",GatewayDispatchEvents2.GuildRoleCreate="GUILD_ROLE_CREATE",GatewayDispatchEvents2.GuildRoleDelete="GUILD_ROLE_DELETE",GatewayDispatchEvents2.GuildRoleUpdate="GUILD_ROLE_UPDATE",GatewayDispatchEvents2.GuildStickersUpdate="GUILD_STICKERS_UPDATE",GatewayDispatchEvents2.GuildUpdate="GUILD_UPDATE",GatewayDispatchEvents2.IntegrationCreate="INTEGRATION_CREATE",GatewayDispatchEvents2.IntegrationDelete="INTEGRATION_DELETE",GatewayDispatchEvents2.IntegrationUpdate="INTEGRATION_UPDATE",GatewayDispatchEvents2.InteractionCreate="INTERACTION_CREATE",GatewayDispatchEvents2.InviteCreate="INVITE_CREATE",GatewayDispatchEvents2.InviteDelete="INVITE_DELETE",GatewayDispatchEvents2.MessageCreate="MESSAGE_CREATE",GatewayDispatchEvents2.MessageDelete="MESSAGE_DELETE",GatewayDispatchEvents2.MessageDeleteBulk="MESSAGE_DELETE_BULK",GatewayDispatchEvents2.MessageReactionAdd="MESSAGE_REACTION_ADD",GatewayDispatchEvents2.MessageReactionRemove="MESSAGE_REACTION_REMOVE",GatewayDispatchEvents2.MessageReactionRemoveAll="MESSAGE_REACTION_REMOVE_ALL",GatewayDispatchEvents2.MessageReactionRemoveEmoji="MESSAGE_REACTION_REMOVE_EMOJI",GatewayDispatchEvents2.MessageUpdate="MESSAGE_UPDATE",GatewayDispatchEvents2.PresenceUpdate="PRESENCE_UPDATE",GatewayDispatchEvents2.StageInstanceCreate="STAGE_INSTANCE_CREATE",GatewayDispatchEvents2.StageInstanceDelete="STAGE_INSTANCE_DELETE",GatewayDispatchEvents2.StageInstanceUpdate="STAGE_INSTANCE_UPDATE",GatewayDispatchEvents2.Ready="READY",GatewayDispatchEvents2.Resumed="RESUMED",GatewayDispatchEvents2.ThreadCreate="THREAD_CREATE",GatewayDispatchEvents2.ThreadDelete="THREAD_DELETE",GatewayDispatchEvents2.ThreadListSync="THREAD_LIST_SYNC",GatewayDispatchEvents2.ThreadMembersUpdate="THREAD_MEMBERS_UPDATE",GatewayDispatchEvents2.ThreadMemberUpdate="THREAD_MEMBER_UPDATE",GatewayDispatchEvents2.ThreadUpdate="THREAD_UPDATE",GatewayDispatchEvents2.TypingStart="TYPING_START",GatewayDispatchEvents2.UserUpdate="USER_UPDATE",GatewayDispatchEvents2.VoiceServerUpdate="VOICE_SERVER_UPDATE",GatewayDispatchEvents2.VoiceStateUpdate="VOICE_STATE_UPDATE",GatewayDispatchEvents2.WebhooksUpdate="WEBHOOKS_UPDATE",GatewayDispatchEvents2.GuildScheduledEventCreate="GUILD_SCHEDULED_EVENT_CREATE",GatewayDispatchEvents2.GuildScheduledEventUpdate="GUILD_SCHEDULED_EVENT_UPDATE",GatewayDispatchEvents2.GuildScheduledEventDelete="GUILD_SCHEDULED_EVENT_DELETE",GatewayDispatchEvents2.GuildScheduledEventUserAdd="GUILD_SCHEDULED_EVENT_USER_ADD",GatewayDispatchEvents2.GuildScheduledEventUserRemove="GUILD_SCHEDULED_EVENT_USER_REMOVE"},6576:(__unused_webpack_module,exports2)=>{"use strict";Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.FormattingPatterns=void 0,exports2.FormattingPatterns={User:/<@(?\d{17,20})>/,UserWithNickname:/<@!(?\d{17,20})>/,UserWithOptionalNickname:/<@!?(?\d{17,20})>/,Channel:/<#(?\d{17,20})>/,Role:/<@&(?\d{17,20})>/,Emoji:/<(?a)?:(?\w{2,32}):(?\d{17,20})>/,AnimatedEmoji:/<(?a):(?\w{2,32}):(?\d{17,20})>/,StaticEmoji:/<:(?\w{2,32}):(?\d{17,20})>/,Timestamp:/-?\d{1,13})(:(?