").addClass("yoast-measure yoast-import-failure").html(n);s.after(p)}function k(t){S(t,"import")}function T(t){S(t,"cleanup")}function C(t){g.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.importing_endpoints.aioseo,D).then(P).catch(k))}function M(t){m.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.cleanup_endpoints.aioseo,A).then(E).catch(T))}function q(t){var e,n,s,a=t.closest("form").find("input[type=submit]");t.on("change",(function(){""!==(e=i()(this).find("option:selected").attr("value"))?(a.prop("disabled",!1),t===g&&(n=Object(o.sprintf)(window.yoastImportData.assets.replacing_texts.select_header,i()(this).find("option:selected").text()),s=e===l?window.yoastImportData.assets.replacing_texts.plugins.aioseo:window.yoastImportData.assets.replacing_texts.plugins.other,n+="
",s.forEach((function(t){n+="- "+t.data_name+"
"+t.data_note+" "})),n+="
",I.html(n))):a.prop("disabled",!0)}))}i()((function(){u=i()("[name='clean_external']"),u.val(window.yoastImportData.assets.replacing_texts.cleanup_button),m=i()("[name='clean_external_plugin']"),f=i()(u).parents("form:first"),h=i()("[name='import_external']"),g=i()("[name='import_external_plugin']"),w=i()(h).parents("form:first"),w.after(i()("
").html("
"+window.yoastImportData.assets.note+""+window.yoastImportData.assets.cleanup_after_import_msg)),y=i()("
![]()
").addClass("yoast-import-spinner").attr("src",window.yoastImportData.assets.spinner).css({display:"inline-block","margin-left":"10px","vertical-align":"middle"}).hide(),_=i()("
").html(window.yoastImportData.assets.loading_msg_import).css({"margin-left":"5px","vertical-align":"middle"}).hide(),x=i()("").html(window.yoastImportData.assets.loading_msg_cleanup).css({"margin-left":"5px","vertical-align":"middle"}).hide(),b=i()("").addClass("dashicons dashicons-yes-alt yoast-import-success-mark").css({"margin-left":"10px","vertical-align":"middle",color:"green"}).hide(),I=i()(".yoast-import-explanation"),I.html(window.yoastImportData.assets.replacing_texts.import_explanation),v=i()(".yoast-cleanup-explanation"),v.html(window.yoastImportData.assets.replacing_texts.cleanup_explanation),g&&(q(g),g.append("").trigger("change")),m&&(q(m),m.append("").trigger("change")),w&&w.on("submit",C),f&&f.on("submit",M),i()(b).insertAfter([h,u]),i()(_).insertAfter(h),i()(x).insertAfter(u),i()(y).insertAfter([h,u])}))},4:function(t,e){t.exports=window.lodash},94:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e,n,s,i){super(t),this.name="RequestError",this.url=e,this.method=n,this.statusCode=s,this.stackTrace=i}}}});