!function(){"use strict";var t,a={n:function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},d:function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:function(t,a){return Object.prototype.hasOwnProperty.call(t,a)}},e=jQuery,n=a.n(e),i=lodash,r=wp.apiFetch,o=a.n(r);function s(t,a,e){return n().ajax({url:rankMath.ajaxurl,type:e||"POST",dataType:"json",data:n().extend(!0,{action:"rank_math_"+t,security:rankMath.security},a)})}function c(t,a,e,i){a=a||"error",i=i||!1;var r=n()('

'+t+"

").hide();e.next(".notice").remove(),e.after(r),r.slideDown(),n()(document).trigger("wp-updates-notice-added"),i&&setTimeout((function(){r.fadeOut((function(){r.remove()}))}),i)}(t=n())((function(){window.rankMathOptions={init:function(){this.preview(),this.misc(),this.scCache(),rankMathAdmin.variableInserter(),this.searchEngine.init(),this.addressFormat(),this.siteMap(),this.robotsEvents(),this.proRedirect(),this.contentAI(),this.localSEO(),this.htmlSitemap()},searchEngine:{init:function(){t("#setting-panel-analytics").addClass("exclude"),this.form=t(".rank-math-search-options"),this.wrap=this.form.closest(".rank-math-wrap-settings"),this.input=this.form.find("input"),this.tabs=this.wrap.find(".rank-math-tabs"),this.panels=this.wrap.find(".rank-math-tab:not(.exclude)"),this.ids=["general","titles","sitemap"],this.indexes={},this.buildIndex(),this.events()},events:function(){var a=this,e=a.tabs.find(">.rank-math-tabs-navigation"),n=t('
');a.tabs.find(">.rank-math-tabs-content").prepend(''),a.form.append(n),n.hide().empty();var r=(0,i.debounce)((function(t){a.wrap.addClass("searching"),a.searchIndexes(t,n)}),300);a.form.on("click",".clear-search",(function(t){t.preventDefault(),a.input.val(""),a.clearSearch(e)})),this.ids.forEach((function(t){n.append(a.indexes[t])})),a.input.on("input",(function(){if(""===a.input.val())return a.clearSearch(e,n),!1;r(a.input.val().toLowerCase())})),n.on("click",".cmb-row",(function(){var a=t(this),e=window.location.origin+window.location.pathname+"?page=rank-math-options-"+a.data("settings-id")+"#"+a.closest(".dropdown-tab").data("id");e===window.location.href?window.location.reload():window.location=e}));var o=t(".rank-math-search-options, .rank-math-search-options *, .rank-math-search-dropdown, .rank-math-search-dropdown *");t("body").on("click",(function(a){t(a.target).is(o)||n.hide()}))},searchIndexes:function(a,e){if(!(1>a.trim().length)){e.find(".dropdown-tab").each((function(){var a=t(this);"setting-panel-analytics"===a.attr("data-id")&&a.css("display","none")}));var n=e.find(".cmb-row"),i=0;n.hide().each((function(){var e=t(this);e.text().trim().toLowerCase().includes(a)&&(e.show(),++i)})),e.show(),e.toggleClass("empty",0===i)}},clearSearch:function(a,e){e=e||!1,this.wrap.removeClass("searching search-no-results"),t(">a.active",a).trigger("click"),e?e.hide():(t(".cmb-row").show(),t(".rank-math-cmb-dependency",".cmb-form, .rank-math-metabox-wrap").each((function(){rankMathAdmin.loopDependencies(t(this))})))},buildIndex:function(){var a=window.localStorage.getItem("rank-math-option-search-index"),e=void 0===a||a!==rankMath.version;this.ids.forEach((function(a){this.getIndex(a,e),this.indexes[a]=t(window.localStorage.getItem("rank-math-option-"+a+"-index"))}),this),e&&window.localStorage.setItem("rank-math-option-search-index",rankMath.version)},getIndex:function(a,e){e&&t("
").load(rankMath.adminurl+"?page=rank-math-options-"+a,(function(e,n){if("error"!==n){var i=t(e).find(".rank-math-tabs-content");i.find(".rank-math-tab").each((function(){var a=t(this);a.removeClass().addClass("dropdown-tab"),a.attr("data-id",a.attr("id")),a.removeAttr("id"),a.find(".rank-math-notice").remove(),a.find(".rank-math-desc").remove(),a.find("input, select, textarea").remove()})),i.find(".rank-math-tab").removeClass().addClass("dropdown-tab").removeAttr("id"),i.find(".cmb-row").each((function(){var e=t(this);e.attr("data-settings-id",a),(e.hasClass("cmb-type-title")||e.hasClass("cmb-type-notice")||e.hasClass("rank-math-notice")||e.hasClass("rank-math-desc")||e.hasClass("rank-math-exclude-from-search"))&&e.remove(),e.find(".cmb-td").children(":not(.cmb2-metabox-description)").remove(),e.find("label,.cmb2-metabox-description").unwrap(),e.removeAttr("data-fieldtype")})),i=i.html().replace(/(\r\n\t|\n|\r\t)/gm,""),window.localStorage.setItem("rank-math-option-"+a+"-index",i)}}))}},scCache:function(){t(".console-cache-delete").on("click",(function(a){a.preventDefault();var e=t(this),n=e.data("days"),i=-1===n?rankMath.confirmClearImportedData:rankMath.confirmClear90DaysCache;window.confirm(i+" "+rankMath.confirmAction)&&(e.prop("disabled",!0),s("analytics_delete_cache",{days:n},"GET").always((function(){e.prop("disabled",!1)})).done((function(a){a&&a.success&&(c(rankMath.feedbackCacheDeleted,"success",t("h1",".rank-math-wrap-settings")),t(".rank-math-console-db-info").remove(),e.closest(".cmb-td").append(a.message))})))}));var a=t("#console_caching_control");t(".console-cache-update-manually").on("click",(function(e){e.preventDefault();var n=t(this),i=a.val();n.prop("disabled",!0),s("analytic_start_fetching",{days:i},"GET").done((function(a){a&&a.success?(c(a.message,"success",t("h1.page-title")),n.text("Fetching in Progress"),t(".cancel-fetch").prop("disabled",!1)):c("Unable to update cache due to: "+a.error,"error",t("h1.page-title"))}))})),t(".cancel-fetch").on("click",(function(a){a.preventDefault(),t(this).prop("disabled",!0),s("analytic_cancel_fetching",{},"GET").done((function(t){t&&t.success&&window.location.reload()}))}))},addressFormat:function(){var a=t("input[type=text], textarea",".rank-math-address-format");if(a.length){a.attr("autocomplete","off"),a.wrap('
');var e=t("body"),n=a.parent(".rank-math-variables-wrap");n.append('');var i=t("