.ql-editor").html()),function(e){if("wpdiscuz-subscribe-form"==e.attr("id"))return;var t=e.find(".wc_comment"),a=t.val().trim().replace(/
<\/p>/g,"\n").replace(/
(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.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 "),t.val(a)}(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 ie(){e("html, body").css("scroll-behavior","unset")}function de(){e("html").css("scroll-behavior",P),e("body").css("scroll-behavior",H)}function se(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function ce(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(),Q(),e(window).scroll((function(){Q()}))),wpdiscuzAjaxObj.setLoadMoreVisibility=$,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",(function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=ee(Z(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var n=new FormData;n.append("action","wpdVoteOnComment"),n.append("commentId",o),n.append("voteType",a),_e(v,!0,n).done((function(n){if(e(t).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){if("total"===n.data.buttonsStyle){var i=e("#comment-"+o+" .wpd-comment-footer .wpd-vote-result"),d=n.data.votes;i.text(n.data.votesHumanReadable),i.attr("title",d),i.removeClass("wpd-up wpd-down"),d>0&&i.addClass("wpd-up"),d<0&&i.addClass("wpd-down")}else{var s=e("#comment-"+o+" .wpd-comment-footer .wpd-vote-result-like"),c=e("#comment-"+o+" .wpd-comment-footer .wpd-vote-result-dislike");s.text(n.data.likeCountHumanReadable),s.attr("title",n.data.likeCount),c.text(n.data.dislikeCountHumanReadable),c.attr("title",n.data.dislikeCount),parseInt(n.data.likeCount)>0?s.addClass("wpd-up"):s.removeClass("wpd-up"),parseInt(n.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e("#comment-"+o+" .wpd-comment-footer .wpd-vote-up"),r=e("#comment-"+o+" .wpd-comment-footer .wpd-vote-down");p.removeClass("wpd-up"),r.removeClass("wpd-down"),n.data.curUserReaction>0?p.addClass("wpd-up"):n.data.curUserReaction<0&&r.addClass("wpd-down")}else n.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error");he(n,o,a)}else console.log(n);e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(a,o,n){console.log(n),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e(document).on("click","body",(function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()})),e("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",(function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpd-load-comments").parents(".wpd-load-more-submit-wrap").remove(),e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var n=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",n||""),_e(v,!0,o).done((function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),$(t,!1),R=1),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}})),window.onhashchange=function(){Y(!1)},1!=m&&Y(!1),e("body").on("click",".wpdiscuz-readmore",(function(){var t=Z(e(this)),a=ee(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),_e(v,!0,o).done((function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").replaceWith(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),he(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e("body").on("change",".wpd-required-group",(function(){0!==e("input:checked",this).length?e("input",e(this)).prop("required",!1):e("input",e(this)).prop("required",!0)})),e("body").on("click",".wpdiscuz-spoiler",(function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")})),e("body").on("click",".wpd-tools",(function(){var t=e(".wpd-tools-actions",e(this));t.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})})),e("body").on("mouseleave",".wpd-comment-right",(function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})})),e("body").on("click",".wpd_stick_btn",(function(){var t=ee(Z(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),_e(v,!0,a).done((function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e("body").on("click",".wpd_close_btn",(function(){var t=ee(Z(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),_e(v,!0,a).done((function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",(function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&o.append("sorting",n),o.append("lastParentId",0),o.append("offset",0),R=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),_e(v,!1,o).done((function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),$(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),he(a)),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e("body").on("click",".wpdf-reacted.wpd_not_clicked",(function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),_e(v,!1,a).done((function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"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("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),he(a),ie(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-D},1e3,de))})).fail((function(a,o,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")}))})),e("body").on("click",".wpdf-hottest.wpd_not_clicked",(function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),_e(v,!1,a).done((function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),he(a),ie(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-D},1e3,de))})).fail((function(a,o,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")}))})),e("body").on("click",".wpd-filter-view-all",(function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")})),e("body").on("click",".wpd-follow-link.wpd_not_clicked",(function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=ee(Z(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),_e(v,!0,o).done((function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data.code],a.data.code,t),"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass),he(a)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,t),"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(a,o,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),ce(),e("body").on("keyup",".wc_email",(function(){ce(e(this))})),C&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover((function(){e(this).addClass("wpd-bubble-hover")}),(function(){e(this).removeClass("wpd-bubble-hover")})),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout((function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover");const t=wpdiscuzAjaxObj.bubbleHintShowOnce?"/":location.href;wpdiscuzAjaxObj.bubbleHintCookieExpires&&parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10);Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),path:t}),setTimeout((function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),1e3*O)}),1e3*k),"content_left"===I)if(e(".entry-content").length){var pe=(re=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?re:25;e("#wpd-bubble-wrapper").css({left:pe+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){pe=(re=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?re:25;e("#wpd-bubble-wrapper").css({left:pe+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var re;pe=(re=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?re:25;e("#wpd-bubble-wrapper").css({left:pe+"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"===I?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===I&&(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(){ie(),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(){de(),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"),Y(!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()),_e(v,!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})),J(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&&(ie(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,de)),he(t)),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(e,t,a){console.log(a)}))}}))}if((C&&y||s)&&(t||!t&&p)&&setTimeout((function t(){if(x&&Math.ceil(Date.now()/1e3)-S>Math.floor(c/1e3/2))return setTimeout(t,c),console.log("You are not interacted with the website, the request has been blocked!"),!1;e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:d,lastId:l,visibleCommentIds:oe()}}).done((function(a){if(!L)if("object"==typeof a){if(a.commentIDsToRemove.forEach((function(t){e("[id^=wpd-comm-"+t+"]").remove()})),a.ids.length){s&&function(){var t=new FormData;t.append("action","wpdUpdateAutomatically"),t.append("loadLastCommentId",r),t.append("visibleCommentIds",oe()),_e(v,!1,t).done((function(t){L||"object"==typeof t&&t.success&&(J(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),r=t.data.loadLastCommentId)})).fail((function(e,t,a){console.log(a)}))}(),a.ids=a.ids.filter((function(t){if(!e("#comment-"+t).length)return t}));var o=5e3;l=parseInt(a.ids[a.ids.length-1]),M=M.concat(a.ids),A&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=a.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")}a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(a.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(a.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",a.all_comments_count))}else console.log(a);setTimeout(t,c)})).fail((function(e,a,o){console.log(o),setTimeout(t,c)}))}),c),e(".wpd-inline-form-wrapper").length){var le=new FormData;le.append("action","wpdGetInlineCommentForm"),_e(v,!1,le).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"),fe()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)})).fail((function(e,t,a){console.log(a)}))}function me(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function we(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ue(){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&&a<300&&("blink"===T?(t.addClass("wpd-blink"),setTimeout((function(){t.removeClass("wpd-blink")}),3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),fe(t.siblings(".wpd-inline-form-wrapper"))))}))}function fe(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>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().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>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 be(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=Z(t);o=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),a=t.parents("#wpdiscuz-edit-form")}if(o&&a){var i=t.val().length,d=e(".wpd-editor-char-counter",a),s=o-i;d.html(s),s<=10?d.addClass("error"):d.removeClass("error")}}function he(t,a,o,n){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,(function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,n):"function"==typeof window[t.data.callbackFunctions[e]]?window[t.data.callbackFunctions[e]](t,a,o,n):console.log(t.data.callbackFunctions[e]+" is not a function")}))}function _e(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",d);var n=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],(function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](o,t,a))}));var i=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return console.log(i),e.ajax({type:"POST",url:i,data:o,contentType:!1,processData:!1})}e(document).on("click","body",(function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){we();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&a.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),fe(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()})),e("body").on("click",".wpd-inline-submit.wpd_not_clicked",(function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",me(o)),e.each(e("input, textarea",o),(function(t,a){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(a).attr("name"),e(a).val()):n.append(e(a).attr("name"),e(a).val())})),_e(v,!0,n).done((function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),we();var n=parseInt(t.data.newCount),i=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");i.text(n),n?i.addClass("wpd-has-comments"):i.removeClass("wpd-has-comments"),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e(".wpd-thread-info").html(t.data.allCommentsCountBeforeThreadsHtml),e(".wpd-thread-info").attr("data-comments-count",t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").replaceWith(t.data.allCommentsCountBubbleHtml),t.data.message&&se(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,a),"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}})),e("body").on("keydown",".wpd-form",(function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")})),e("body").on("keydown","#wpdiscuz-edit-form",(function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")})),e("body").on("keydown",".wpd-inline-comment-content",(function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")})),e("body").on("click",".wpd-inline-icon-count.wpd-has-comments",(function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",me(t)),_e(v,!0,a).done((function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,t),"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),e("body").on("click",".wpd-view-all-inline-comments",(function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),ie(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-D},1e3,de)})),e("body").on("click",".wpd-feedback-content-link",(function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ie(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-(D+6)},1e3,(function(){de(),e("#wpd-inline-"+a).addClass("wpd-active")}))})),"scroll_open"!==T&&"blink"!==T||(ue(),e(window).on("scroll",ue)),e("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",(function(){if(parseInt(w)&&!confirm(wpdiscuzAjaxObj.wc_confirm_rate_edit))return!1;var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),_e(v,!0,t).done((function(t){"object"==typeof t?(t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data),"error"),he(t)):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("submit","#wpdiscuz-subscribe-form",(function(t){t.preventDefault();var a=e(this);const o=e("#wpdiscuz_subscription_button",a);if(a[0].checkValidity()&&(d=a,s=!0,"2.0"===n&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",d).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",d).val().length?(s=!1,e(".wpdiscuz-recaptcha",d).css("border","1px solid red")):"2.0"===n&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",d).length&&e(".wpdiscuz-recaptcha",d).css("border","none"),s)&&o.hasClass("wpd_not_clicked")){o.removeClass("wpd_not_clicked");var i=new FormData;i.append("action","wpdAddSubscription"),e("*",a).each((function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())})),_e(v,!0,i).done((function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout((function(){location.reload(!0)}),3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),L=!1,o.addClass("wpd_not_clicked")})).fail((function(t,a,n){console.log(n),o.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)}))}var d,s})),e("body").on("click",".wpd-unsubscribe",(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),_e(v,!0,a).done((function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout((function(){location.reload(!0)}),3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),L=!1})).fail((function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))})),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=_e}));var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(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.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
/* Colorbox */
!function(t,e,i){var o,n,r,h,a,s,l,c,d,g,f,u,p,m,w,v,y,x,b,T,C,H,k,W,E,I,M,L,R,S,K,P,B,O={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},_="colorbox",j="cbox",D=j+"Element",F=j+"_open",N=j+"_load",z=j+"_complete",A=j+"_cleanup",q=j+"_closed",U=j+"_purge",$=t(""),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 i<0?e+i:i}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():X())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function it(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?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("
"),function(){var e,o,n,r=P.prep,h=++Q;R=!0,M=!1,rt(U),rt(N),C.get("onLoad"),C.h=C.get("height")?tt(C.get("height"),"y")-W-H:C.get("innerHeight")&&tt(C.get("innerHeight"),"y"),C.w=C.get("width")?tt(C.get("width"),"x")-E-k:C.get("innerWidth")&&tt(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=tt(C.get("maxWidth"),"x")-E-k,C.mw=C.w&&C.w").hide().insertBefore(a),$.one(U,function(){n.replaceWith(a)}),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):et(C,e)?(e=it(C,e),M=C.get("createImg"),t(M).addClass(j+"Photo").on("error."+j,function(){r(V(G,"Error").html(C.get("imgError")))}).one("load",function(){h===Q&&setTimeout(function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).on("click."+j,function(){P.next()})),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)},1)}),M.src=e):e&&u.load(e,C.get("data"),function(e,i){h===Q&&r("error"===i?V(G,"Error").html(C.get("xhrError")):t(this).contents())})}()}}function st(){n||(B=!1,g=t(i),n=V(G).attr({id:_,class:!1===t.support.opacity?j+"IE":"",role:"dialog",tabindex:"-1"}).hide(),o=V(G,"Overlay").hide(),p=t([V(G,"LoadingOverlay")[0],V(G,"LoadingGraphic")[0]]),r=V(G,"Wrapper"),h=V(G,"Content").append(m=V(G,"Title"),w=V(G,"Current"),x=t('').attr({id:j+"Previous"}),y=t('').attr({id:j+"Next"}),v=t('').attr({id:j+"Slideshow"}),p),b=t('').attr({id:j+"Close"}),r.append(V(G).append(V(G,"TopLeft"),a=V(G,"TopCenter"),V(G,"TopRight")),V(G,!1,"clear:left").append(s=V(G,"MiddleLeft"),h,l=V(G,"MiddleRight")),V(G,!1,"clear:left").append(V(G,"BottomLeft"),c=V(G,"BottomCenter"),V(G,"BottomRight"))).find("div div").css({float:"left"}),u=V(G,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),T=y.add(x).add(w).add(v)),e.body&&!n.parent().length&&t(e.body).append(o,n.append(r,u))}function lt(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),at(this))}return!!n&&(B||(B=!0,y.on("click",function(){P.next()}),x.on("click",function(){P.prev()}),b.on("click",function(){P.close()}),o.on("click",function(){C.get("overlayClose")&&P.close()}),t(e).on("keydown."+j,function(t){var e=t.keyCode;L&&C.get("escKey")&&27===e&&(t.preventDefault(),P.close()),L&&C.get("arrowKey")&&d[1]&&!t.altKey&&(37===e?(t.preventDefault(),x.trigger("click")):39===e&&(t.preventDefault(),y.trigger("click")))}),"function"==typeof t.fn.on?t(e).on("click."+j,"."+D,i):t("."+D).live("click."+j,i)),!0)}t[_]||(t(st),(P=t.fn[_]=t[_]=function(e,i){var o=this;return e=e||{},"function"==typeof o&&(o=t(""),e.open=!0),o[0]?(st(),lt()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,_)||{};t.data(this,_,t.extend(i,e))}).addClass(D),new Y(o[0],e).get("open")&&at(o[0])),o):o}).position=function(e,i){var o,d,f,u=0,p=0,m=n.offset();function w(){a[0].style.width=c[0].style.width=h[0].style.width=parseInt(n[0].style.width,10)-k+"px",h[0].style.height=s[0].style.height=l[0].style.height=parseInt(n[0].style.height,10)-H+"px"}if(g.off("resize."+j),n.css({top:-9e4,left:-9e4}),d=g.scrollTop(),f=g.scrollLeft(),C.get("fixed")?(m.top-=d,m.left-=f,n.css({position:"fixed"})):(u=d,p=f,n.css({position:"absolute"})),!1!==C.get("right")?p+=Math.max(g.width()-C.w-E-k-tt(C.get("right"),"x"),0):!1!==C.get("left")?p+=tt(C.get("left"),"x"):p+=Math.round(Math.max(g.width()-C.w-E-k,0)/2),!1!==C.get("bottom")?u+=Math.max(X()-C.h-W-H-tt(C.get("bottom"),"y"),0):!1!==C.get("top")?u+=tt(C.get("top"),"y"):u+=Math.round(Math.max(X()-C.h-W-H,0)/2),n.css({top:m.top,left:m.left,visibility:"visible"}),r[0].style.width=r[0].style.height="9999px",o={width:C.w+E+k,height:C.h+W+H,top:u,left:p},e){var v=0;t.each(o,function(t){o[t]===J[t]||(v=e)}),e=v}J=o,e||n.css(o),n.dequeue().animate(o,{duration:e||0,complete:function(){w(),R=!1,r[0].style.width=C.w+E+k+"px",r[0].style.height=C.h+W+H+"px",C.get("reposition")&&setTimeout(function(){g.on("resize."+j,P.position)},1),"function"==typeof i&&i()},step:w})},P.resize=function(t){var e;L&&((t=t||{}).width&&(C.w=tt(t.width,"x")-E-k),t.innerWidth&&(C.w=tt(t.innerWidth,"x")),f.css({width:C.w}),t.height&&(C.h=tt(t.height,"y")-W-H),t.innerHeight&&(C.h=tt(t.innerHeight,"y")),t.innerHeight||t.height||(e=f.scrollTop(),f.css({height:"auto"}),C.h=f.height()),f.css({height:C.h}),e&&f.scrollTop(e),P.position("none"===C.get("transition")?0:C.get("speed")))},P.prep=function(i){if(L){var o,r="none"===C.get("transition")?0:C.get("speed");f.remove(),(f=V(G,"LoadedContent").append(i)).hide().appendTo(u.show()).css({width:(C.w=C.w||f.width(),C.w=C.mw&&C.mw1?("string"==typeof C.get("current")&&w.html(C.get("current").replace("{current}",I+1).replace("{total}",h)).show(),y[C.get("loop")||I40&&(a=e.substring(e.length-40),a="..."+a),a}if(e("body").on("click","#wpdcom .wmu-upload-wrap",(function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0)})),e(document).delegate(".wmu-add-files","change",(function(){const a=e(this),n=a.closest(".wpd_comm_form"),i=a[0].files?a[0].files:[];i.length&&(e(".wmu-action-wrap .wmu-tabs",n).html(""),e.each(i,(function(e,a){let i=a.type,c={id:"",icon:"",fullname:a.name,shortname:o(a.name),type:""};if(i.match(/^image/)){if(c.type="images",window.FileReader){const e=new FileReader;e.readAsDataURL(a),e.onloadend=function(){c.icon=this.result,c.shortname="",t(n,c)}}}else i.match(/^video/)||i.match(/^audio/)?(c.type="videos",c.icon=wpdiscuzAjaxObj.wmuIconVideo,t(n,c)):(c.type="files",c.icon=wpdiscuzAjaxObj.wmuIconFile,t(n,c))})))})),e("body").on("click",".wmu-attachment-delete",(function(t){if(confirm(wpdiscuzAjaxObj.wmuPhraseConfirmDelete)){const t=e(this),o=t.data("wmu-attachment"),n=new FormData;n.append("action","wmuDeleteAttachment"),n.append("attachmentId",o),wpdiscuzAjaxObj.getAjaxObj(a,!0,n).done((function(a){if(a.success){var o=t.parents(".wmu-comment-attachments");t.parent(".wmu-attachment").remove(),e(".wmu-attached-images *",o).length||e(".wmu-attached-images",o).remove(),e(".wmu-attached-videos *",o).length||e(".wmu-attached-videos",o).remove(),e(".wmu-attached-files *",o).length||e(".wmu-attached-files",o).remove()}else a.data.errorCode?wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data.errorCode],a.data.errorCode,o),"error",3e3):a.data.error&&wpdiscuzAjaxObj.setCommentMessage(a.data.error,"error",3e3);e("#wpdiscuz-loading-bar").fadeOut(250)})).fail((function(a,t,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}else console.log("canceled")})),parseInt(wpdiscuzAjaxObj.wmuIsLightbox)){function n(){e(".wmu-lightbox").colorbox({maxHeight:"95%",maxWidth:"95%",rel:"wmu-lightbox",fixed:!0})}n(),wpdiscuzAjaxObj.wmuAddLightBox=n}wpdiscuzAjaxObj.wmuHideAll=function(a,t){"object"==typeof a?a.success?(e(".wmu-tabs",t).addClass("wmu-hide"),e(".wmu-preview",t).remove(),e(".wmu-attached-data-info",t).remove()):console.log(a.data):console.log(a)}}));
/* Lity */
!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,require("jquery")):e.lity=t(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=e.document,i=t(e),r=t.Deferred,o=t("html"),a=[],l="aria-hidden",s="lity-"+l,d='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',c={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,r,o;try{i=t(e)}catch(e){return!1}if(!i.length)return!1;return r=t(''),o=i.hasClass("lity-hide"),n.element().one("lity:remove",function(){r.before(i).remove(),o&&!i.closest(".lity-content").length&&i.addClass("lity-hide")}),i.removeClass("lity-hide").after(r)},youtube:function(e){var n=f.exec(e);if(!n)return!1;return k(x(e,w("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},b(n[5]||"")))))},vimeo:function(e){var n=y.exec(e);if(!n)return!1;return k(x(e,w("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},b(n[4]||"")))))},googlemaps:function(e){var t=v.exec(e);if(!t)return!1;return k(x(e,w("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=p.exec(e);if(!n)return!1;0!==e.indexOf("http")&&(e="https:"+e);return k(x(e,w("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},b(n[4]||"")))))},iframe:k},template:''},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t('
'),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return''}function E(){return n.documentElement.clientHeight?.9*n.documentElement.clientHeight:Math.round(.9*i.height())}function j(e){var t,i,r,o=z();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&(t=e,i=o.element().find(d),r=i.index(n.activeElement),t.shiftKey&&r<=0?(i.get(i.length-1).focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i.get(0).focus(),t.preventDefault())))}function D(){t.each(a,function(e,t){t.resize()})}function z(){return 0===a.length?null:a[0]}function T(e,d,u,f){var y,v,p,m,b,w,x,C,k,z,T,O=this,q=!1,W=!1;d=t.extend({},c,d),v=t(d.template),O.element=function(){return v},O.opener=function(){return u},O.options=t.proxy(g,O,d),O.handlers=t.proxy(g,O,d.handlers),O.resize=function(){q&&!W&&p.css("max-height",E()+"px").trigger("lity:resize",[O])},O.close=function(){if(q&&!W){var e;W=!0,(e=O).element().attr(l,"true"),1===a.length&&(o.removeClass("lity-active"),i.off({resize:D,keydown:j})),((a=t.grep(a,function(t){return e!==t})).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each(function(){var e=t(this),n=e.data(s);n?e.attr(l,n):e.removeAttr(l),e.removeData(s)});var d=r();if(f&&(n.activeElement===v[0]||t.contains(v[0],n.activeElement)))try{f.focus()}catch(e){}return p.trigger("lity:close",[O]),v.removeClass("lity-opened").addClass("lity-closed"),h(p.add(v)).always(function(){p.trigger("lity:remove",[O]),v.remove(),v=void 0,d.resolve()}),d.promise()}},m=e,b=O,w=d.handlers,x=d.handler,k="inline",z=t.extend({},w),x&&z[x]?(C=z[x](m,b),k=x):(t.each(["inline","iframe"],function(e,t){delete z[t],z[t]=w[t]}),t.each(z,function(e,t){return!t||!(!t.test||t.test(m,b))||(!1!==(C=t(m,b))?(k=e,!1):void 0)})),y={handler:k,content:C||""},v.attr(l,"false").addClass("lity-loading lity-opened lity-"+y.handler).appendTo("body").focus().on("click","[data-lity-close]",function(e){t(e.target).is("[data-lity-close]")&&O.close()}).trigger("lity:open",[O]),T=O,1===a.unshift(T)&&(o.addClass("lity-active"),i.on({resize:D,keydown:j})),t("body > *").not(T.element()).addClass("lity-hidden").each(function(){var e=t(this);void 0===e.data(s)&&e.data(s,e.attr(l)||null)}).attr(l,"true"),t.when(y.content).always(function(e){p=t(e).css("max-height",E()+"px"),v.find(".lity-loader").each(function(){var e=t(this);h(e).always(function(){e.remove()})}),v.removeClass("lity-loading").find(".lity-content").empty().append(p),q=!0,p.trigger("lity:ready",[O])})}function O(e,i,r){e.preventDefault?(e.preventDefault(),e=(r=t(this)).data("lity-target")||r.attr("rel")||r.attr("src")):r=t(r);var o=new T(e,t.extend({},r.data("lity-options")||r.data("lity"),i),r,n.activeElement);if(!e.preventDefault)return o}return C.test=function(e){return u.test(e)},O.version="2.2.2",O.options=t.proxy(g,O,c),O.handlers=t.proxy(g,O,c.handlers),O.current=z,t(n).on("click.lity","[data-wpd-lity]",O),O});
/* My Content and Settings */
jQuery(document).ready(function(e){var n=0,t=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),d=parseInt(wpdiscuzUCObj.additionalTab);e("body").on("click",".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links",function(e){e.preventDefault()}),e("body").on("click",".wpd-info.wpd-not-clicked",function(n){var a=e(this);a.removeClass("wpd-not-clicked");var o,i,s,l,c=new FormData;return c.append("action","wpdGetInfo"),o=a,i=c,l=(s=e(".fas",o)).attr("class"),s.removeClass(),s.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(t||d,!1,i).done(function(n){o.addClass("wpd-not-clicked"),s.removeClass(),s.addClass(l),n&&(e("#wpdUserContentInfo").html(n),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))}),!1}),e("body").on("click",".wpd-list-item",function(){var n=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var a=e(this);if(e("#wpdUserContentInfo #"+n).text().length)a.addClass("wpd-active"),e("#wpdUserContentInfo #"+n).addClass("wpd-active");else{var o=new FormData;o.append("action",a.attr("data-action")),o.append("page",0),e("#wpdUserContentInfo #"+n).addClass("wpd-active"),e("#wpdUserContentInfo #"+n).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(t||d,!0,o).done(function(t){t&&(e("#wpdUserContentInfo #"+n).css("text-align",""),a.addClass("wpd-active"),e("#wpdUserContentInfo #"+n).html(t)),e("#wpdiscuz-loading-bar").hide()})}}),e("body").on("click",".wpd-page-link.wpd-not-clicked",function(n){var a=e(this);a.removeClass("wpd-not-clicked");var o=a.data("wpd-page"),i=e(".wpd-active .wpd-pagination .wpd-action").val(),s=new FormData;s.append("action",i),s.append("page",o),wpdiscuzAjaxObj.getAjaxObj(t||d,!0,s).done(function(n){a.addClass("wpd-not-clicked"),n&&e(".wpd-content-item.wpd-active").html(n),e("#wpdiscuz-loading-bar").hide()})}),e("body").on("click",".wpd-delete-content.wpd-not-clicked",function(){var a=e(this),o=parseInt(a.data("wpd-content-id"));if(!isNaN(o)){var i=a.data("wpd-delete-action");if("wpdDeleteComment"===i&&!confirm(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzUCObj.msgConfirmDeleteComment,"wc_confirm_comment_delete",a)))return!1;if("wpdCancelSubscription"===i&&!confirm(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzUCObj.msgConfirmCancelSubscription,"wc_confirm_cancel_subscription",a)))return!1;if("wpdCancelFollow"===i&&!confirm(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzUCObj.msgConfirmCancelFollow,"wc_confirm_cancel_follow",a)))return!1;var s=e("i",a),l=s.attr("class"),c=e(".wpd-wrapper .wpd-page-number").val(),p=e(".wpd-content-item.wpd-active").children(".wpd-item").length;a.removeClass("wpd-not-clicked"),s.removeClass().addClass("fas fa-pulse fa-spinner"),1===p&&c>0&&(c-=1);var r=new FormData;r.append("id",o),r.append("page",c),r.append("action",i),wpdiscuzAjaxObj.getAjaxObj(t||d,!1,r).done(function(t){a.addClass("wpd-not-clicked"),s.removeClass().addClass(l),e(".wpd-content-item.wpd-active").html(t),n=1})}}),e("body").on("click","[data-lity-close]",function(t){e(t.target).is("[data-lity-close]")&&n&&window.location.reload(!0)}),e("body").on("click",".wpd-user-email-delete-links.wpd-not-clicked",function(){var n=e(this);n.removeClass("wpd-not-clicked"),e(".wpd-loading",n).addClass("wpd-show");var a=new FormData;a.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(t||d,!1,a).done(function(t){n.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e("body").on("click",".wpd-user-settings-button.wpd-not-clicked",function(){var n=e(this);n.removeClass("wpd-not-clicked");var a=n.data("wpd-delete-action");if("deleteCookies"!==a){n.find(".wpd-loading").addClass("wpd-show");var o=new FormData;o.append("action","wpdGuestAction"),o.append("guestAction",a),wpdiscuzAjaxObj.getAjaxObj(t||d,!1,o).done(function(t){n.addClass("wpd-not-clicked"),n.find(".wpd-loading").removeClass("wpd-show");try{var d=e.parseJSON(t);n.after(d.message);var a=n.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(d.code)&&(n.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(o){console.log(o)}})}else(function e(){for(var n=document.cookie.split(";"),t=0;t-1?d.substr(0,a):d;Cookies.remove(o.trim())}location.reload(!0)})()})});
/* Social */
function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(!parseInt(wpdiscuzAjaxObj.fbUseOAuth2)&&parseInt(wpdiscuzAjaxObj.enableFbLogin)||parseInt(wpdiscuzAjaxObj.enableFbShare))&&wpdiscuzAjaxObj.facebookAppID&&(function(e,s,n){var a,o=e.getElementsByTagName(s)[0];!e.getElementById(n)&&((a=e.createElement(s)).id=n,a.src="//connect.facebook.net/en_US/sdk.js",o.parentNode.insertBefore(a,o))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v7.0"})}),jQuery(document).ready(function(e){(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e("body").on("click",".wpd-comment-share .fa-facebook-f",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var s,n="";function a(e,s){var n,a="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?o(e,n=t.authResponse.accessToken,a=t.authResponse.userID,s):FB.login(function(t){"connected"===t.status&&o(e,n=t.authResponse.accessToken,a=t.authResponse.userID,s)},{scope:"public_profile,email"})}):o(e,n,a,s)}function o(s,n,a,o){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:a,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){(function s(n,a){try{var o=e.parseJSON(n),i=o.code,r=o.message,c=o.url;200===parseInt(i)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(r,"error")}catch(d){console.log(d)}t(a,0)})(s,o)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e("body").on("click","#wpdcom .wpd-social-login .wpdiscuz-login-button",function(){var s,o,t,i,r=e(this).parents(".wpd-social-login");t=n=(s=e(this),o="",s.hasClass("wpdsn-fb")&&(o="facebook"),s.hasClass("wpdsn-insta")&&(o="instagram"),s.hasClass("wpdsn-gg")&&(o="google"),s.hasClass("wpdsn-ds")&&(o="disqus"),s.hasClass("wpdsn-wp")&&(o="wordpress"),s.hasClass("wpdsn-tw")&&(o="twitter"),s.hasClass("wpdsn-vk")&&(o="vk"),s.hasClass("wpdsn-ok")&&(o="ok"),s.hasClass("wpdsn-linked")&&(o="linkedin"),s.hasClass("wpdsn-yandex")&&(o="yandex"),s.hasClass("wpdsn-mailru")&&(o="mailru"),s.hasClass("wpdsn-weixin")&&(o="wechat"),s.hasClass("wpdsn-weibo")&&(o="weibo"),s.hasClass("wpdsn-qq")&&(o="qq"),s.hasClass("wpdsn-baidu")&&(o="baidu"),s.hasClass("wpdsn-telegram")&&(o="telegram"),o),i=r,1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?a(t,i):i.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}),e("body").on("click","#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),a(n,s))});var i=function e(){var s,n="",a=/[#\?\&]tgAuthResult=([A-Za-z0-9\-_=]*)$/;try{if(s=(n=location.hash.toString()).match(a)){location.hash=n.replace(a,"");var o=s[1]||"",t=(o=o.replace(/-/g,"+").replace(/_/g,"/")).length%4;return t>1&&(o+=Array(5-t).join("=")),JSON.parse(window.atob(o))}}catch(i){console.log(i)}return!1}();i&&(e("#wpdiscuz-loading-bar").show(),e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_login_callback",provider:"telegram",user:i}}).done(function(s){console.log(s),s.success?location.reload(!0):(wpdiscuzAjaxObj.setCommentMessage(s.data,"error"),e("#wpdiscuz-loading-bar").fadeOut(250))}).fail(function(s,n,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}))});