(function(factory){var registeredInModuleLoader=false;if(typeof define==='function'&&define.amd){define(factory);registeredInModuleLoader=true}if(typeof exports==='object'){module.exports=factory();registeredInModuleLoader=true}if(!registeredInModuleLoader){var OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=OldCookies;return api}}}(function(){function extend(){var i=0;var result={};for(;i (.*?)/g,"$1\n");o=(o=(o=(o=o.replace(/]*>/g," $3 ")).replace(/]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),a.val(o)}}(t),e.each(o,function(){e("input",this).prop("required",!1),0===e("input:checked",this).length?e("input",e(this)).prop("required",!0):e(".wpd-field-invalid",this).remove()})}function ea(){e("html, body").css("scroll-behavior","unset")}function eo(){e("html").css("scroll-behavior",j),e("body").css("scroll-behavior",S)}function en(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function ed(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==i||f||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),B(),e(window).scroll(function(){B()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var t,a=e(this);e(a).removeClass("wpd_not_clicked");var o=Y(a),n=J(o);t=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",n),d.append("voteType",t),eh(C,!0,d).done(function(o){if(e(a).addClass("wpd_not_clicked"),"object"==typeof o){if(o.success){if("total"===o.data.buttonsStyle){var d=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result"),i=o.data.votes;d.text(o.data.votesHumanReadable),d.attr("title",i),d.removeClass("wpd-up wpd-down"),i>0&&d.addClass("wpd-up"),i0?s.addClass("wpd-up"):s.removeClass("wpd-up"),0>parseInt(o.data.dislikeCount)?c.addClass("wpd-down"):c.removeClass("wpd-down")}var r=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-up"),p=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-down");r.removeClass("wpd-up"),p.removeClass("wpd-down"),o.data.curUserReaction>0?r.addClass("wpd-up"):o.data.curUserReaction25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){var ei=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120,es=ei>25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ei=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120,es=ei>25?ei:25;e("#wpd-bubble-wrapper").css({left:es+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===E?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===E&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("body").on("click","#wpd-bubble-add-message-close",function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("body").on("click","#wpd-bubble",function(){ea(),e("#tab-title-reviews").length&&e("#tab-title-reviews a").trigger("click"),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-(D+28)},1e3,function(){eo(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").trigger("focus")})}),e("body").on("click","#wpd-bubble-comment-close",function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("body").on("click","#wpd-bubble-comment-reply-link a",function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),N(!0);var a=t.match(/#comment\-(\d+)/);M=M.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(M.length),0==M.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("body").on("click","#wpd-bubble-count",function(){if(M.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",M.join()),eh(C,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),X(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),M=[],e(".wpd-new-loaded-comment").length&&(ea(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,eo)),eu(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}function ec(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:m,visibleCommentIds:ee()}}).done(function(t){if(!R){if("object"==typeof t){if(t.commentIDsToRemove.forEach(function(t){e("[id^=wpd-comm-"+t+"]").remove()}),t.ids.length){if(c){var a;(a=new FormData).append("action","wpdUpdateAutomatically"),a.append("loadLastCommentId",l),a.append("visibleCommentIds",ee()),eh(C,!1,a).done(function(t){!R&&"object"==typeof t&&t.success&&(X(t),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e(".wpd-thread-info").html(t.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(t.data.wc_all_comments_count_bubble_html),l=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})}t.ids=t.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;m=parseInt(t.ids[t.ids.length-1]),M=M.concat(t.ids),O&&t.commentText&&(e("#wpd-bubble-author-avatar").html(t.avatar),e("#wpd-bubble-author-name").html(t.authorName),e("#wpd-bubble-comment-date span").html(t.commentDate),e("#wpd-bubble-comment-text").html(t.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",t.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=t.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(n),e("#wpd-bubble-count").addClass("wpd-new-comments")}t.all_comments_count=parseInt(t.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(t.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(t.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.all_comments_count))}else console.log(t)}setTimeout(ec,r)}).fail(function(e,t,a){console.log(a),setTimeout(ec,r)})}if((k&&z||c)&&(a||!a&&p)&&setTimeout(ec,r),e(".wpd-inline-form-wrapper").length){var er=new FormData;er.append("action","wpdGetInlineCommentForm"),eh(C,!1,er).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),ew()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ep(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else var a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function el(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function em(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;t.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&a>0&&adocument.body.clientWidth-10){t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10));var a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);a>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().leftdocument.body.clientWidth-10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ef(t){var a,o=0;if(t.parents(".wpd_main_comm_form").length)o=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),a=t.parents(".wpd_main_comm_form");else if(t.parents(".wpd-secondary-form-wrapper").length)o=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),a=t.parents(".wpd-secondary-form-wrapper");else if(t.parents("#wpdiscuz-edit-form").length){var n=Y(t);o=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),a=t.parents("#wpdiscuz-edit-form")}if(o&&a){var d=t.val().length,i=e(".wpd-editor-char-counter",a),s=o-d;i.html(s),s=0&&a"),G="div",Q=0,J={};function V(i,o,n){var r=e.createElement(i);return o&&(r.id=j+o),n&&(r.style.cssText=n),t(r)}function X(){return i.innerHeight?i.innerHeight:t(i).height()}function Y(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==O[e]&&(this.cache[e]=O[e])),this.cache[e]},this.get=function(t){var e=this.value(t);return"function"==typeof e?e.call(this.el,this):e}}function Z(t){var e=d.length,i=(I+t)%e;return i1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function ot(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.trigger("focus"))}function nt(t){nt.str!==t&&(n.add(o).removeClass(nt.str).addClass(t),nt.str=t)}function rt(i){t(e).trigger(i),$.triggerHandler(i)}var ht=function(){var t,e,i=j+"Slideshow_",o="click."+j;function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(P.next,C.get("slideshowSpeed")))}function a(){v.html(C.get("slideshowStop")).off(o).one(o,s),$.on(z,h).on(N,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),$.off(z,h).off(N,r),v.html(C.get("slideshowStart")).off(o).one(o,function(){P.next(),a()}),n.removeClass(i+"on").addClass(i+"off")}function l(){t=!1,v.hide(),r(),$.off(z,h).off(N,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||($.off(A,l),l()):C.get("slideshow")&&d[1]&&(t=!0,$.one(A,l),C.get("slideshowAuto")?a():s(),v.show())}}();function at(r){var g,w;if(!S){if(g=t(r).data(_),C=new Y(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t("."+D).filter(function(){return new Y(this,t.data(this,_)).get("rel")===w}),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=R=!0,nt(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),f=V(G,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(f),H=a.height()+c.height()+h.outerHeight(!0)-h.height(),k=s.width()+l.width()+h.outerWidth(!0)-h.width(),W=f.outerHeight(!0),E=f.outerWidth(!0);var v=tt(C.get("initialWidth"),"x"),y=tt(C.get("initialHeight"),"y"),x=C.get("maxWidth"),B=C.get("maxHeight");C.w=Math.max((!1!==x?Math.min(v,tt(x,"x")):v)-E-k,0),C.h=Math.max((!1!==B?Math.min(y,tt(B,"y")):y)-W-H,0),f.css({width:"",height:C.h}),P.position(),rt(F),C.get("onOpen"),T.add(m).hide(),n.trigger("focus"),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",ot,!0),$.one(q,function(){e.removeEventListener("focus",ot,!0)})),C.get("returnFocus")&&$.one(q,function(){t(C.el).trigger("focus")})}var O=parseFloat(C.get("opacity"));o.css({opacity:O==O?O:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?b.html(C.get("close")).appendTo(h):b.appendTo("
")+".
.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?o="wpdiscuz-message-success":"warning"===t[n]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("").addClass(o).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(a instanceof Array?a[n]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,a){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(o){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[o]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[o]](e,t,a))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,a=wpdiscuzAjaxObj.is_user_logged_in,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!a,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&a,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var f=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),u=wpdiscuzAjaxObj.storeCommenterData,h=parseInt(wpdiscuzAjaxObj.wmuEnabled),b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.enableBubble),z=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),x=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),_=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,O=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),E=wpdiscuzAjaxObj.bubbleLocation,T=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,I=[],L=[],M=[],R=!1,F=1,j=e("html").css("scroll-behavior"),S=e("body").css("scroll-behavior");if(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(t){var a=e(".wpd-form").not(":hidden");if(a.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var o=0;o
"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(e){e.preventDefault()}),e("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a,o,n,d,i=Y(e(this),0),s=e(this),c=e(".fas",s);!s.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&v?(a=i,o=t,n=J(a),d=new FormData,d.append("action","wpdShowReplies"),d.append("commentId",n),eh(C,!0,d).done(function(t){o.addClass("wpd_not_clicked"),"object"==typeof t&&t.success&&(e("#wpd-comm-"+a).replaceWith(t.data.comment_list),e("#wpd-comm-"+a+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+a+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+a+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),eu(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,n){console.log(n),o.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})):e("#wpd-comm-"+i+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(c.removeClass("fa-chevron-up"),c.addClass("fa-chevron-down"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(c.removeClass("fa-chevron-down"),c.addClass("fa-chevron-up"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e("body").on("mouseenter",".wpd-new-loaded-comment",function(){e(this).removeClass("wpd-new-loaded-comment")}),e("body").on("click",".wpd-sbs-toggle",function(){e(".wpdiscuz-subscribe-bar").slideToggle(y)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!a&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&e("#wpdiscuz-subscribe-form").length&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),et(e(this),""),t.preventDefault())})):"3.0"===d&&e("body").on("click","#wpdiscuz_subscription_button",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");et(a,""),t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.trigger("submit")},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(o){console.log(o),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+o.message,"error")}})),(o||n)&&"2.0"===d){var P=e(window).width(),q=e("#wpdcom").width();q>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),q>=940&&q=810&&q=730&&q=610&&q650&&(q>=510&&q=470&&q0&&t.data.new_comment_id){var a=new FormData;a.append("action","wpdRedirect"),a.append("commentId",t.data.new_comment_id),eh(C,!0,a).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),b&&g?(n=a.data,d=n.comment_author_email,i=n.comment_author,s=n.comment_author_url,null==u?(Cookies.set("comment_author_email_"+$,d),Cookies.set("comment_author_"+$,i),s.length&&Cookies.set("comment_author_url_"+$,s)):(u=parseInt(u),Cookies.set("comment_author_email_"+$,d,{expires:u,path:"/"}),Cookies.set("comment_author_"+$,i,{expires:u,path:"/"}),s.length&&Cookies.set("comment_author_url_"+$,s,{expires:u,path:"/"})),e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").prop("checked",!0)):g||e(".wpd-cookies-checkbox").prop("checked",!1),t.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]):ef(t.find(".wc_comment")),U(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){ea(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-D},1e3,eo)},c),eu(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,t),"error"),eu(a,t))}else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),R=!1}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function U(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&0>t.comment_author_email.indexOf("@example.com")&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function A(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var t=e(this),i=1,s=e(this).parents("form");if("true"===s.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",s),"warning");return}if(s.hasClass("wpd_main_comm_form")||(i=(c=e(this).parents(".wpd-comment"),r=c.attr("class").split(" "),p="",e.each(r,function(e,t){"wpd_comment_level"===Q(t,!1)&&(p=Q(t,!0))}),parseInt(p)+1)),et(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.on("submit",function(e){e.preventDefault()}),s[0].checkValidity()&&(l=s,m=!0,"2.0"===d&&e("input[name=wc_captcha]",l).length&&!e("input[name=wc_captcha]",l).val().length?(m=!1,e(".wpdiscuz-recaptcha",l).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",l).length&&e(".wpdiscuz-recaptcha",l).css("border","none"),m)){R=!0,function t(a){e(".wpd-agreement-checkbox",a).each(function(){e(this).hasClass("wpd_agreement_hide")&&b&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+$,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var c,r,p,l,m,w=new FormData;if(w.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&w.append(this.name+"",e(this).val().trim()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&w.append(this.name+"",e(this).val())}),w.append("wpd_comment_depth",i),wpdiscuzAjaxObj.wpdiscuz_zs&&w.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length?e(".wpd-cookies-checkbox",s).prop("checked")||(g=!1):a&&(g=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){w.append("g-recaptcha-response",e),H(s,w,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(f){console.log(f),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+f.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else H(s,w,t)}(function e(t){if((o||n)&&"2.0"===d){var a=J(t);grecaptcha.reset(L[a])}})(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}),e("body").on("click",".wpd_editable_comment",function(){t&&e(".wpdiscuz-edit-form-wrap").length&&A(Y(e(".wpdiscuz-edit-form-wrap"),0),t);var a=e(this),o=Y(a,0),n=J(o),d=new FormData;d.append("action","wpdEditComment"),d.append("commentId",n),t=e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-text").get(0),eh(C,!0,d).done(function(t){if("object"==typeof t){if(t.success){if(e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(t.data.html),wpdiscuzLoadRichEditor){var n=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+o);n.clipboard.dangerouslyPasteHTML(0,t.data.content),n.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+o).val(t.data.content),ef(e("#wc-textarea-edit_"+o));e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,a),"error")}else console.log(t);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wc_save_edited_comment",function(){var t=e(this),a=Y(t),o=J(a),n=e("#wpd-comm-"+a+" #wpdiscuz-edit-form");if(et(n,"#wpd-editor-edit_"+a),n.on("submit",function(e){e.preventDefault()}),n[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",o),e(":input",n).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),("checkbox"===this.type||"radio"===this.type)&&e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),eh(C,!0,d).done(function(n){"object"==typeof n?(console.log("aaaa"),n.success?(A(a,n.data.message),n.data.comment_approved_html&&e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-subheader").append(n.data.comment_approved_html),n.data.lastEdited&&(e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(n.data.lastEdited).insertAfter("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),n.data.twitterShareLink&&e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",n.data.twitterShareLink),n.data.whatsappShareLink&&e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",n.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+a)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),eu(n,o)):wpdiscuzAjaxObj.setCommentMessage(n,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wc_cancel_edit",function(){var a=Y(e(this));A(a,t),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+a)}),!f&&w&&(F=0,1==w?setTimeout(function(){V(!0)},500):e("body").on("click",".wpd-load-comments",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),V(!0)})),e("body").on("click",".wpd-load-more-submit",function(){var t=e(this),a="wpd-loaded";t.hasClass(a)&&V(!1,t,a,"wpd-loading")});var W=!1;function B(){var t=document.getElementById("wpdiscuzHasMoreComments"),a=0;t&&(a=t.dataset.is_show_load_more);var o=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,n=e(window).height()+e(window).scrollTop();o&&n&&100*n/o>=80&&!1===W&&1==a&&(W=!0,V(!1,e(".wpd-load-more-submit")))}function V(t,a,o,n){a&&(a.toggleClass(o),a.toggleClass(n));var d=new FormData;d.append("action","wpdLoadMoreComments");var s=e(".wpdiscuz-sort-button-active").attr("data-sorting");s&&d.append("sorting",s),d.append("offset",F),d.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),d.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");d.append("wpdType",c||""),eh(C,!t||1!=w,d).done(function(d){"object"==typeof d&&d.success&&(F++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(d.data.comment_list),K(d,t&&2!==i),W=!1,d.data.loadLastCommentId&&(l=d.data.loadLastCommentId),eu(d),t&&N(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))}).fail(function(t,d,i){console.log(i),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))})}function K(t,a){var o,n=document.getElementById("wpdiscuzHasMoreComments");if(!1==t.data.is_show_load_more)n&&(n.dataset.is_show_load_more=0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else{if(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==i&&e(".wpdiscuz-comment-pagination").show(),n&&(n.dataset.is_show_load_more=1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),t.data.comments_left>0){if(!e(".wpd-load-more-submit .wpd-comments-left").length){let d=e("");d.addClass("wpd-comments-left"),e(".wpd-load-more-submit").append(d)}e(".wpd-load-more-submit .wpd-comments-left").text(t.data.comments_left_text)}}eu(t)}function N(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ea(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-D},1e3,eo),t&&G(o)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",o),eh(C,!0,n).done(function(a){"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),eu(a),ea(),e("html, body").animate({scrollTop:e("#comment-"+o).offset().top-D},1e3,eo),t&&G(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function G(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function X(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o
/g,"\n").replace(/