1(window.webpackJsonp=window.webpackJsonp||[]).push([[3,46],{U9r6:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i("ofXK"),s=i("TEn/"),o=i("fXoL");let n=(()=>{class t{}return t.\u0275mod=o.Kb({type:t}),t.\u0275inj=o.Jb({factory:function(e){return new(e||t)},imports:[[r.b,s.kb]]}),t})()},VYmf:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var r=i("mrSG"),s=i("A1Tq"),o=i("wDu7"),n=i("tk/3"),c=i("fXoL");let a=(()=>{class t{constructor(t,e){this.httpService=t,this.appdataService=e,this.BUDDYPRESS_RESTBASE_V1="wp-json/buddypress/v1/",this.APPCOMMUNITY_RESTBASE_V2="wp-json/ap-bp/v2/"}getActivities(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity",t,e?{Authorization:"Bearer "+e.access_token}:{})}))}getActivity(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity/"+t,{display_comments:"threaded"},e?{Authorization:"Bearer "+e.access_token}:{})}))}favoriteActivity(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity/"+t+"/favorite",r=e?{Authorization:"Bearer "+e.access_token}:{};return yield this.httpService.post(i,{context:"edit"},r)}))}flagActivity(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=(yield this.appdataService.getAppdata()).wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"activity/"+t,r=e?{Authorization:"Bearer "+e.access_token}:{};return yield this.httpService.post(i,{action:"activity_flag"},r)}))}commentActivity(t,e,i,s){return Object(r.a)(this,void 0,void 0,(function*(){const r=yield this.appdataService.getAppdata();return this.httpService.post(r.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity",{content:t,type:"activity_comment",primary_item_id:e,secondary_item_id:i},s?{Authorization:"Bearer "+s.access_token}:{})}))}createActivity(t,e,i,s=null){return Object(r.a)(this,void 0,void 0,(function*(){const r=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity",o={context:"edit",user_id:e,component:"activity",type:"activity_update",content:t};return s&&Object.assign(o,{primary_item_id:parseInt(s),component:"groups"}),this.httpService.post(r,o,i?{Authorization:"Bearer "+i.access_token}:{})}))}createActivityWithMedia(t,e,i,s,o=null){return Object(r.a)(this,void 0,void 0,(function*(){const r=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"activity";let c;return c=o?(new n.c).set("context","edit").set("user_id",i).set("component","activity").set("type","activity_update").set("content",t).set("primary_item_id",o).set("component","groups"):(new n.c).set("context","edit").set("user_id",i).set("component","activity").set("type","activity_update").set("content",t),this.httpService.postWithFormData(r,c,e,s?{Authorization:"Bearer "+s.access_token}:{})}))}getMembers(t){return Object(r.a)(this,void 0,void 0,(function*(){const e=yield this.appdataService.getAppdata();return this.httpService.get(e.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"members",t)}))}getFriends(t){return Object(r.a)(this,void 0,void 0,(function*(){const e=yield this.appdataService.getAppdata();return this.httpService.get(e.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"members",{context:"view",user_id:t,per_page:99})}))}getMember(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"members/"+t,e?{user_id:e.user_id}:{},e?{Authorization:"Bearer "+e.access_token}:{})}))}updateMemberAvatar(t,e,i){return Object(r.a)(this,void 0,void 0,(function*(){const r=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"members/"+e+"/avatar",s=new n.c;return this.httpService.postWithFormData(r,s,t,i?{Authorization:"Bearer "+i.access_token}:{})}))}getNotifications(t){return Object(r.a)(this,void 0,void 0,(function*(){const e=yield this.appdataService.getAppdata();return this.httpService.get(e.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"notifications",{},t?{Authorization:"Bearer "+t.access_token}:{})}))}changeNotificationToNotNew(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.put(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"notifications/"+t,{context:"edit",is_new:0},e?{Authorization:"Bearer "+e.access_token}:{})}))}addFriend(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.post(i.wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"friends/"+t,{},e?{Authorization:"Bearer "+e.access_token}:{})}))}removeFriend(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.delete(i.wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"friends/"+t,e?{Authorization:"Bearer "+e.access_token}:{})}))}acceptFriendship(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.post(i.wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"friends/requests/accept/"+t,{},e?{Authorization:"Bearer "+e.access_token}:{})}))}rejectFriendship(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.post(i.wordpress_url+this.APPCOMMUNITY_RESTBASE_V2+"friends/requests/reject/"+t,{},e?{Authorization:"Bearer "+e.access_token}:{})}))}getGroups(t,e=null){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"groups",t,e?{Authorization:"Bearer "+e.access_token}:{})}))}
1getGroupDetails(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"groups/"+t;let r={context:"edit"};return e&&Object.assign(r,{user_id:e.user_id}),this.httpService.get(i,r,e?{Authorization:"Bearer "+e.access_token}:{})}))}getGroupMembers(t,e=null,i={}){return Object(r.a)(this,void 0,void 0,(function*(){const r=(yield this.appdataService.getAppdata()).wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"groups/"+t+"/members";return e&&Object.assign(i,{user_id:e.user_id}),this.httpService.get(r,i,e?{Authorization:"Bearer "+e.access_token}:{})}))}joinPublicGroup(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.post(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"groups/"+t+"/members",{context:"view"},e?{Authorization:"Bearer "+e.access_token}:{})}))}requestGroupMembership(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.post(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"groups/membership-requests",{context:"edit",group_id:t},e?{Authorization:"Bearer "+e.access_token}:{})}))}getMessages(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"messages",t,e?{Authorization:"Bearer "+e.access_token}:{})}))}createMessage(t,e,i,s){return Object(r.a)(this,void 0,void 0,(function*(){const r=yield this.appdataService.getAppdata();return this.httpService.post(r.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"messages",{context:"edit",subject:t,message:e,recipients:i},s?{Authorization:"Bearer "+s.access_token}:{})}))}getThread(t,e){return Object(r.a)(this,void 0,void 0,(function*(){const i=yield this.appdataService.getAppdata();return this.httpService.get(i.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"messages/"+t,{},e?{Authorization:"Bearer "+e.access_token}:{})}))}replyMessage(t,e,i,s){return Object(r.a)(this,void 0,void 0,(function*(){const r=yield this.appdataService.getAppdata();return this.httpService.postWithUrlencoded(r.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"messages",{context:"edit",recipients:e,id:t,message:i},s?{Authorization:"Bearer "+s.access_token}:{})}))}replyMessageWithImage(t,e,i,s){return Object(r.a)(this,void 0,void 0,(function*(){const e=(yield this.appdataService.getAppdata()).wordpress_url+"wp-json/ap-bp/v1/messages/send",r=(new n.c).set("user_id",s.user_id
1).set("recipients",s.user_id).set("thread_id",t.toString()).set("token",s.token);return this.httpService.postWithFormData(e,r,i)}))}getXprofileFields(t){return Object(r.a)(this,void 0,void 0,(function*(){const e=yield this.appdataService.getAppdata();return this.httpService.get(e.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"xprofile/fields",{context:"view",fetch_field_data:!0},t?{Authorization:"Bearer "+t.access_token}:{})}))}updateXprofileFields(t,e,i){return Object(r.a)(this,void 0,void 0,(function*(){const r=yield this.appdataService.getAppdata();return this.httpService.post(r.wordpress_url+this.BUDDYPRESS_RESTBASE_V1+"xprofile/"+e+"/data/"+i.user_id,{context:"edit",value:t},i?{Authorization:"Bearer "+i.access_token}:{})}))}}return t.\u0275fac=function(e){return new(e||t)(c.Tb(s.a),c.Tb(o.a))},t.\u0275prov=c.Ib({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},tXxH:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var r=i("fXoL"),s=i("jhN1");let o=(()=>{class t{constructor(t){this._sanitizer=t}transform(t){return this._sanitizer.bypassSecurityTrustHtml(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(s.b))},t.\u0275pipe=r.Lb({name:"sanitizeHtml",type:t,pure:!0}),t})()},xy9e:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var r=i("ofXK"),s=i("3Pt+"),o=i("TEn/"),n=i("sYmb"),c=i("fXoL");let a=(()=>{class t{}return t.\u0275mod=c.Kb({type:t}),t.\u0275inj=c.Jb({factory:function(e){return new(e||t)},imports:[[r.b,s.e,s.l,o.kb,n.c.forChild()]]}),t})()},z9XI:function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var r=i("mrSG"),s=i("3Pt+"),o=i("gZlD"),n=i("VYmf"),c=i("8lHB"),a=i("fXoL"),d=i("TEn/"),p=i("ofXK"),u=i("sYmb");function h(t,e){if(1&t&&(a.Pb(0,"ion-select-option",13),a.wc(1),a.Ob()),2&t){const t=e.$implicit;a.gc("value",t.id),a.Bb(1),a.yc(" ",t.name," ")}}function l(t,e){if(1&t&&(a.Pb(0,"ion-select",11),a.cc(1,"translate"),a.cc(2,"translate"),a.cc(3,"translate"),a.vc(4,h,2,2,"ion-select-option",12),a.Ob()),2&t){const t=a.bc(2);a.hc("placeholder",a.dc(1,4,"To")),a.hc("okText",a.dc(2,6,"OK")),a.hc("cancelText",a.dc(3,8,"Cancel")),a.Bb(4),a.gc("ngForOf",t.friends)}}function v(t,e){if(1&t){const t=a.Qb();a.Pb(0,"form",5),a.Pb(1,"ion-card"),a.Pb(2,"ion-card-content"),a.vc(3,l,5,10,"ion-select",6),a.Nb(4,"ion-input",7),a.cc(5,"translate"),a.Nb(6,"ion-textarea",8),a.cc(7,"translate"),a.Ob(),a.Ob(),a.Pb(8,"div",9),a.Pb(9,"ion-button",10),a.Xb("click",(function(e){return a.oc(t),a.bc().addMessage()})),a.wc(10),a.cc(11,"translate"),a.Ob(),a.Ob(),a.Ob()}if(2&t){const t=a.bc();a.gc("formGroup",t.form),a.Bb(3),a.gc("ngIf",t.friends),a.Bb(1),a.hc("placeholder",a.dc(5,6,"Subject")),a.Bb(2),a.hc("placeholder",a.dc(7,8,"Your message")),a.Bb(3),a.gc("disabled",!t.isValid),a.Bb(1),a.yc(" ",a.dc(11,10,"Send message")," ")}}function S(t,e){if(1&t){const t=a.Qb();a.Pb(0,"ion-card"),a.Pb(1,"ion-card-content",9),a.Pb(2,"h2"),a.wc(3),a.cc(4,"translate"),a.Ob(),a.Pb(5,"ion-button",14),a.Xb("click",(function(e){return a.oc(t),a.bc().login()})),a.wc(6),a.cc(7,"translate"),a.Ob(),a.Ob(),a.Ob()}2&t&&(a.Bb(3),a.yc(" ",a.dc(4,2,"Login to post a reply.")," "),a.Bb(3),a.yc(" ",a.dc(7,4,"Login")," "))}let b=(()=>{class t{constructor(t,e,i,r,s,o,n){this.formBuilder=t,this.modalController=e,this.loadingController=i,this.loginService=r,this.buddypressService=s,this.toastController=o,this.ngZone=n,this.isLoggedIn=!0}ngOnInit(){this._initializeForm(),this._loadPage()}_loadPage(){return Object(r.a)(this,void 0,void 0,(function*(){try{this._loadRecipientList()}catch(t){console.error(t)}}))}_loadRecipientList(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.loginService.getLoginData();t?(this.friends=[],this.recipientId?this.friends.push({id:this.recipientId,name:this.recipientName}):(yield this.buddypressService.getFriends(t.user_id)).forEach(t=>{this.friends.push({id:t.id,name:t.name})})):this.isLoggedIn=!1}))}_initializeForm(){this.form=this.formBuilder.group({recipient:[this.recipientId,s.m.required],subject:["",s.m.required],message:["",s.m.required]}),this.formSubscription=this.form.valueChanges.subscribe(t=>{this.ngZone.run(()=>{this.isValid=!(!this.form.valid||""===t.subject.trim()||""===t.message.trim())})})}dismiss(){this.modalController.dismiss({closed:"canceled"})}addMessage(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.loadingController.create({showBackdrop:!1});if(yield t.present(),this.form.valid){const t=yield this.loginService.getLoginData();if(t)try{yield this.buddypressService.createMessage(this.form.value.subject,this.form.value.message,[t.user_id,this.form.value.recipient],t),this.modalController.dismiss({closed:"completed"})}catch(e){this._presentToast(e.error.message)}else this._openLoginModal()}yield t.dismiss()}))}_openLoginModal(){return Object(r.a)(this,void 0,void 0,(function*(){(yield this.modalController.create({component:c.a,swipeToClose:!0})).present()}
1))}_presentToast(t){return Object(r.a)(this,void 0,void 0,(function*(){(yield this.toastController.create({message:t,duration:3e3,position:"bottom"})).present()}))}login(){this._openLoginModal()}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Mb(s.b),a.Mb(d.ob),a.Mb(d.mb),a.Mb(o.a),a.Mb(n.a),a.Mb(d.wb),a.Mb(a.z))},t.\u0275cmp=a.Gb({type:t,selectors:[["app-bp-message-add-modal"]],inputs:{recipientId:"recipientId",recipientName:"recipientName"},decls:11,vars:5,consts:[["slot","end"],[3,"click"],["slot","icon-only","name","close"],[3,"formGroup",4,"ngIf"],[4,"ngIf"],[3,"formGroup"],["formControlName","recipient",3,"placeholder","okText","cancelText",4,"ngIf"],["formControlName","subject",3,"placeholder"],["formControlName","message",3,"placeholder"],[1,"ion-text-center"],[3,"disabled","click"],["formControlName","recipient",3,"placeholder","okText","cancelText"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["size","small",3,"click"]],template:function(t,e){1&t&&(a.Pb(0,"ion-header"),a.Pb(1,"ion-toolbar"),a.Pb(2,"ion-title"),a.wc(3),a.cc(4,"translate"),a.Ob(),a.Pb(5,"ion-buttons",0),a.Pb(6,"ion-button",1),a.Xb("click",(function(t){return e.dismiss()})),a.Nb(7,"ion-icon",2),a.Ob(),a.Ob(),a.Ob(),a.Ob(),a.Pb(8,"ion-content"),a.vc(9,v,12,12,"form",3),a.vc(10,S,8,6,"ion-card",4),a.Ob()),2&t&&(a.Bb(3),a.xc(a.dc(4,3,"Message")),a.Bb(6),a.gc("ngIf",e.form),a.Bb(1),a.gc("ngIf",!e.isLoggedIn))},directives:[d.w,d.jb,d.hb,d.k,d.j,d.x,d.r,p.k,s.n,s.i,s.d,d.l,d.m,d.B,d.vb,s.h,s.c,d.fb,d.V,d.ub,p.j,d.W],pipes:[u.d],styles:["ion-card[_ngcontent-%COMP%]{--background:#fff}ion-card[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{--padding-start:0px}ion-card[_ngcontent-%COMP%] ion-card-content[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{margin-top:10px}"]}),t})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.