1!function(t,e){"use strict";e.Public={uploader:null,init:function(){var i=jQuery.extend({},e.Activity_Uploader);this.uploader=i.config("uwp_group_upload_image","uwp_activity_image_row",5,"uwp_gp_activity_image"),t(document).on("click",".uwp_group_join_btn",this.joinGroup.bind(this)).on("submit","#uwp_group_post_form",this.postActivity.bind(this)).on("click",".remove-group-activity",this.removeActivity.bind(this)).on("click",".load-more-activity",this.loadMoreActivity.bind(this)).on("click",".group-activity-comment",this.groupActivityComment.bind(this)).on("click",".view-comments-reply",this.viewCommentsReply.bind(this)).on("submit",".uwp-group-activity-comment",this.submitActivityComment.bind(this)).on("click",".comment-reply-link-group",this.commentReplyLinkGroup.bind(this)).on("click",".uwp_group_delete_btn",this.deleteGroup.bind(this)).on("click",".activity-more-action-btn",this.activityMoreActionBtn.bind(this)).on("click","a.report-group-activity",this.reportGroupActivity.bind(this)).on("change","input[name='group_activity_report']",this.groupActivityReport.bind(this)).on("click",".uwp-group-activity-report-submit",this.groupActivityReportSubmit.bind(this)).on("click",".keep-report-group-activity",this.keepReportGroupActivity.bind(this)).on("click",".group-create-new-rule",this.groupCreateNewRule.bind(this)).on("keyup","#uwp_group_rule_title",this.keyupGroupRuleTitle.bind(this)).on("keyup","#uwp_group_rule_description",this.keyupGroupRuleDescription.bind(this)).on("click",".uwp-group-create-rule-submit",this.createRuleSubmit.bind(this)).on("click",".group-edit-rule-action",this.editRuleAction.bind(this)).on("click",".group-delete-rule-action",this.deleteRuleAction.bind(this)).on("click",".uwp-group-join-with-rule-btn",this.joinWithRuleBtn.bind(this)).on("change","#group_join_rule_agree",this.groupJoinRuleAgree.bind(this)).on("click",".group-join-rule-submit",this.groupJoinRuleSubmit.bind(this)),t(".uwp-group-reply-link a.comment-reply-link-group").attr("href","javascript:void(0);"),t('.uwp-group-privacy-radio label input[type="radio"]').on("change",(function(){if(t(this).is(":checked")){var e=t(this).val();t(".hide-group-description").hide(),t("#"+e+"_group_description").slideToggle()}})).change()},joinGroup:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("type"),r=i.data("user_id"),a=i.data("group_id"),u=i.hasClass("btn-block"),n=i.data("is_detail");uwp_groups_ajax("process_group",(function(t,e){if(e.is_hidden)location.reload();else if(n)location.reload();else{var o=i.parent("div");o.html(e.group_action_html),e.members_count&&o.parent("div").find(".group-member-count").html(e.members_count)}}),{user_id:r,group_id:a,type:o,in_group_loop:u},{method:"POST"})},postActivity:function(e){e.preventDefault();const i=this,o=t(e.currentTarget),r=o.attr("id"),a=t("#uwp_group_gid").val(),u=(t("#uwp_group_uid").val(),t("#uwp_group_form_submit"));var n=t.trim(t("#uwp_group_form_message").val());if(t("#wp-uwp_group_form_message-wrap").hasClass("tmce-active")&&(n=tinyMCE.activeEditor.getContent()),!n)return void t("#uwp_group_form_message").focus().val("").selectRange(0,0);uwp_groups_button_status(u,"loading");const p=o.serializeObject();uwp_groups_ajax("activity_process",(function(e,o){uwp_groups_button_status(u,"reset"),t("#uwp_group_activities_"+a).length&&(t("#uwp_group_activities_"+a).hasClass("uwp-group-no-activity")&&(t("#uwp_group_activities_"+a).removeClass("d-none uwp-group-no-activity"),t("#uwp_group_activities_"+a).html("").html('<ul class="group-activity-items row m-0 list-unstyled">')),t("#uwp_group_activities_"+a+" ul").html("").html(o.html),o.load_more&&(t("#uwp_group_activities_"+a+" .activity-load-more").remove(),t("#uwp_group_activities_"+a).append(o.load_more))),t("#uwp_group_form_message").val(""),t("#wp-uwp_group_form_message-wrap").hasClass("tmce-active")&&tinyMCE.activeEditor.setContent(""),t("#"+r+" .uwp-attachment-upload-files ul.uwp-attachment-list").html(""),i.uploader.splice(),t("#uwp_group_form_submit i").remove(),aui_init_lightbox_embed()}),p,{method:"POST"})},removeActivity:function(i){i.preventDefault();const o=t(i.currentTarget);var r=o.attr("data-activity-id"),a=o.attr("data-gid");aui_confirm(e.i18n.deleteActivity,e.confirm,e.cancel).then((e=>{e&&uwp_groups_ajax("delete_activity",(function(e,i){t("#uwp_group_activities_"+a).length&&(i.status&&t("li#activity_item_"+r).fadeOut().remove(),0===t("#uwp_group_activities_"+a+" ul li").length&&t("#uwp_group_activities_"+a).addClass("d-none uwp-group-no-activity")),t("#uwp_group_form_message").val("")}
1),{group_id:a,activity_id:r},{method:"POST"})}))},loadMoreActivity:function(e){e.preventDefault();const i=t(e.currentTarget);var o=i.attr("data-gid"),r=i.attr("data-paged"),a=i.attr("data-search");uwp_groups_button_status(i,"loading"),uwp_groups_ajax("more_activity",(function(e,r){uwp_groups_button_status(i,"reset"),t("#uwp_group_activities_"+o).length&&(t("#uwp_group_activities_"+o+" ul").append(r.html),i.attr("data-paged",r.next_page),i.children("i").remove(),r.load_more||i.hide()),t("#uwp_group_form_message").val("")}),{group_id:o,uwpas:a,paged:r},{method:"POST"})},groupActivityComment:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.attr("data-activity-id");i.hasClass("active")?(i.removeClass("active"),t("#activity_comment_form_"+o).addClass("d-none")):(i.addClass("active"),t("#activity_comment_form_"+o).removeClass("d-none"),t("#uwp_group_activity_comment_"+o+" #comment").focus().val("").selectRange(0,0))},viewCommentsReply:function(e){e.preventDefault();const i=t(e.currentTarget).data("comment-id");t("li#li-comment-"+i).next().slideToggle()},submitActivityComment:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.attr("id"),r=t("#"+o+" button#submit"),a=i.serializeObject();uwp_groups_button_status(r,"loading"),uwp_groups_ajax("activity_comment",(function(e,i){uwp_groups_button_status(r,"reset"),i.is_error?alert(i.message):(t("#uwp_group_activity_comment_"+i.activity_id+" textarea#comment").val(""),t("li#activity_item_"+i.activity_id+" .activity-action .group-activity-comment span.comment-count").html("").html(i.comment_count),t("#activity_comment_form_"+i.activity_id+" .activity-comment-lists").html("").html(i.comment_list),i.comment_count>0&&t("#activity_comment_form_"+i.activity_id+" .activity-comment-lists").removeClass("no-comments"),t("#"+o+" .uwp-attachment-upload-files ul.uwp-attachment-list").html(""),t("#li-comment-"+i.comment_id).length>0&&t("html, body").animate({scrollTop:t("#li-comment-"+i.comment_id).offset().top-80},1e3,(function(){}))),t("#"+o+" button.submit span").remove()}),a,{method:"POST"})},commentReplyLinkGroup:function(e){e.preventDefault();const i=t(e.currentTarget);var o=i.attr("data-commentid"),r=i.attr("data-postid");t("#uwp_group_activity_comment_"+r+" .form-submit #comment_parent").val(o),t("#uwp_group_activity_comment_"+r+" #comment").focus().val("").selectRange(0,0),t("html, body").animate({scrollTop:t("#uwp_group_activity_comment_"+r).offset().top-80},1e3,(function(){}))},deleteGroup:function(i){i.preventDefault();const o=t(i.currentTarget);var r=o.data("user_id"),a=o.data("group_id");aui_confirm(e.i18n.deleteGroup,e.confirm,e.cancel).then((t=>{t&&uwp_groups_ajax("delete_group",(function(t,e){e.groups_permalink&&window.location.replace(e.groups_permalink)}),{user_id:r,group_id:a},{method:"POST"})}))},activityMoreActionBtn:function(e){e.preventDefault();const i=t(e.currentTarget);i.hasClass("active")?i.removeClass("active"):i.addClass("active"),i.next().slideToggle()},reportGroupActivity:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("group_id"),r=i.data("activity_id"),a=i.data("member_id");t(".uwp-activity-report-group-modal").remove(),aui_modal("","","","","","modal-lg"),uwp_groups_ajax("activity_report_popup",(function(e,i){jQuery("#aui-modal .modal-content").html(i),t(".uwp-group-activity-report-submit").prop("disabled",!0)}),{group_id:o,activity_id:r,user_id:a},{method:"POST"})},groupActivityReport:function(e){const i=[];t("input[name='group_activity_report']:checked").each((function(){i.push(t(this).val())})),t.isArray(i)&&i.length>0?t(".uwp-group-activity-report-submit").prop("disabled",!1):t(".uwp-group-activity-report-submit").prop("disabled",!0)},groupActivityReportSubmit:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("group_id"),r=i.data("activity_id"),a=i.data("member_id");let u=[];t("input[name='group_activity_report']:checked").each((function(){u.push(t(this).val())})),t.isArray(u)&&u.length>0&&uwp_groups_ajax("activity_report_submit",(function(t,e){location.reload()}),{group_id:o,activity_id:r,user_id:a,report_tag:u},{method:"POST"})},keepReportGroupActivity:function(e){e.preventDefault();const i=t(e.currentTarget);var o=i.data("group_id"),r=i.data("activity_id"),a=i.data("member_id");uwp_groups_ajax("keep_group_activity_report",(function(t,e){location.reload()}),{group_id:o,activity_id:r,user_id:a},{method:"POST"})},groupCreateNewRule:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("gid"),r=i.data("uid");t(".uwp-group-create-rule-modal").remove(),aui_modal("","","","","","modal
1-md"),uwp_groups_ajax("create_rule_popup",(function(t,e){jQuery("#aui-modal .modal-content").html(e)}),{group_id:o,user_id:r,type:"create"},{method:"POST"})},keyupGroupRuleTitle:function(e){const i=t(e.currentTarget),o=parseInt(t(".rule-title-length").attr("data-length")),r=i.val(),a=r.length;r.length>0?r.length>o?i.val(r.substring(0,o)):t(".rule-title-length").html(o-a):t(".rule-title-length").html(o)},keyupGroupRuleDescription:function(e){const i=t(e.currentTarget),o=parseInt(t(".rule-description-length").attr("data-length")),r=i.val(),a=r.length;r.length>0?r.length>o?i.val(r.substring(0,o)):t(".rule-description-length").html(o-a):t(".rule-description-length").html(o)},createRuleSubmit:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("group_id"),r=i.data("user_id"),a=i.data("type"),u=i.data("rule_id"),n=(i.data("nonce"),t("#uwp_group_rule_title").val()),p=t("#uwp_group_rule_description").val();""!==n&&""!==p?(t(".group-rules-html-wrap .common-rule-input").removeClass("error"),uwp_groups_ajax("create_rule",(function(e,i){if(t(".rule-notification").html("").html(i.message).show().delay(1500).fadeOut(),"edit"===i.action_type)setTimeout((function(){t(".uwp-modal-close").trigger("click")}),2e3);else{t("#uwp_group_rule_title").val(""),t("#uwp_group_rule_description").val("");var o=parseInt(t(".rule-title-length").attr("data-length")),r=parseInt(t(".rule-description-length").attr("data-length"));t(".rule-title-length").html(o),t(".rule-description-length").html(r)}}),{group_id:o,user_id:r,type:a,rule_id:u,rule_title:n,rule_description:p},{method:"POST"})):(t(".group-rules-html-wrap .common-rule-input").addClass("error"),""!==n&&t(".group-rules-html-wrap .rule-title.common-rule-input").removeClass("error"),""!==p&&t(".group-rules-html-wrap .rule-desc.common-rule-input").removeClass("error"))},editRuleAction:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("gid"),r=i.data("uid"),a=i.data("rule_id");t(".uwp-group-create-rule-modal").remove(),aui_modal("","","","","","modal-lg"),uwp_groups_ajax("create_rule_popup",(function(t,e){jQuery("#aui-modal .modal-content").html(e)}
1),{group_id:o,user_id:r,rule_id:a,type:"edit"},{method:"POST"})},deleteRuleAction:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("gid"),r=i.data("uid"),a=i.data("rule_id");uwp_groups_ajax("delete_rule",(function(e,i){t(".uwp-group-rules-class .common-group-widget-content").html(i.rule_html)}),{group_id:o,user_id:r,rule_id:a},{method:"POST"})},joinWithRuleBtn:function(e){e.preventDefault();const i=t(e.currentTarget),o=i.data("type"),r=i.data("group_id"),a=i.data("user_id"),u=i.data("is_detail");t(".uwp-group-join-rule-modal").remove(),aui_modal("","","","","","modal-lg"),uwp_groups_ajax("join_rule_popup",(function(e,i){jQuery("#aui-modal .modal-content").html(i.rule_html),t(".group-join-rule-submit").prop("disabled",!0)}),{type:o,group_id:r,user_id:a,is_detail:u},{method:"POST"})},groupJoinRuleAgree:function(e){!0===t(e.currentTarget).prop("checked")?(t(".group-join-rule-submit").prop("disabled",!1),t(".group-join-rule-action span.error").html("")):t(".group-join-rule-submit").prop("disabled",!0)},groupJoinRuleSubmit:function(i){i.preventDefault();const o=t(i.currentTarget),r=o.data("type"),a=o.data("user_id"),u=o.data("group_id"),n=o.hasClass("btn-block");!0===t("#group_join_rule_agree").prop("checked")?(t(".group-join-rule-action span.error").html(""),uwp_groups_ajax("process_group",(function(t,e){location.reload()}),{user_id:a,group_id:u,type:r,in_group_loop:n},{method:"POST"})):t(".group-join-rule-action span.error").html(e.i18n.fieldRequired).show()}},e.Activity_Uploader={extensions:"jpg,jpeg,gif,png",container:"",maxFiles:1,removedFiles:[],browseButton:null,count:0,uploader:null,config:function(i,o,r,a){if(this.browseButton=i,t("#"+i).length)return this.container=o,this.maxFiles=r||1,this.count=t("#"+o).find(".uwp-attachment-list > li").length,this.uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:this.browseButton,container:this.container,multipart:!0,multipart_params:{uwp_groups_nonce:e.nonces.uwp_groups_activity_upload_file,action:"uwp_groups_activity_upload_file"},max_file_count:1,multi_selection:!1,urlstream_upload:!0,file_data_name:"uwp_file",max_file_size:e.plupload.maxFileSize+"kb",url:e.plupload.url+"&type="+a,filters:[{title:"Allowed Files",extensions:this.extensions}]}),this.uploader.bind("Init",t.proxy(this,"init")),this.uploader.bind("FilesAdded",t.proxy(this,"added")),this.uploader.bind("QueueChanged",t.proxy(this,"upload")),this.uploader.bind("UploadProgress",t.proxy(this,"progress")),this.uploader.bind("Error",t.proxy(this,"error")),this.uploader.bind("FileUploaded",t.proxy(this,"uploaded")),this.uploader.init(),t("#"+o).on("click","a.attachment-delete",t.proxy(this.removeAttachment,this)),this.uploader},init:function(e,i){this.showHide(),t("#"+this.container).prepend('<div class="uwp-file-warning small text-danger"></div>')},showHide:function(){if(this.count>=this.max)return this.count>this.max&&t("#"+this.container+" .uwp-file-warning").html(e.plupload.warning),void t("#"+this.browseButton).hide();t("#"+this.container+" .uwp-file-warning").html(""),t("#"+this.browseButton).show()},added:function(e,i){var o=t("#"+this.container).parent().find(".uwp-form-action");this.showHide(),t.each(i,(function(t,e){o.append('<div class="upload-item d-inline-block mx-2 my-0" id="'+e.id+'"><i class="fas fa-circle-notch fa-spin mr-1 me-1"></i>'+e.name+" ("+plupload.formatSize(e.size)+")</div>")})),e.refresh(),e.start()},upload:function(e){this.count=e.files.length-this.removedFiles.length,this.showHide(),t("#"+this.container).parent().find(":submit").prop("disabled",!0)},progress:function(t,e){},error:function(i,o){t("#"+this.container).find("#"+o.file.id).remove();var r="";switch(o.code){case-600:r=e.plupload.sizeError;break;case-601:r=e.plupload.typeError;break;default:r=o.message}t("#"+this.container).parent().find(".uwp-form-action").find(".upload-item").remove(),alert(r),this.count-=1,this.showHide(),this.uploader.refresh()},uploaded:function(e,i,o){(o=JSON.parse(o.response),console.log(this.container),t("#"+i.id).remove(),o.success)?t("#"+this.container).find(".uwp-attachment-list").append(o.data):(alert(o.data),this.count-=1,this.showHide());t("#"+this.container).parent().find(":submit").prop("disabled",!1)},removeAttachment:function(i){i.preventDefault();var o=this,r=t(i.currentTarget);aui_confirm(e.i18n.confirmMsg,e.confirm,e.cancel).then((t=>{if(t){const t={attach_id:r.data("attach_id")};this.removedFiles.push(t),uwp_groups_ajax("activity_upload_delete",(function(t,e){r.parent().parent().remove(),o.count-=1,o.showHide(),o.uploader.refresh()}),t,{method:"POST"})}}))}},t.fn.selectRange=function(t,e){return e||(e=t),this.each((function(){if(this.setSelectionRange)this.focus(),this.setSelectionRange(t,e);else if(this.createTextRange){var i=this.createTextRange();i.collapse(!0),i.moveEnd("character",e),i.moveStart("character",t),i.select()}}))},t(document).ready((()=>{e.Public.init()}))}(jQuery,UWP_Group);
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.