(window["aioseopjsonp"]=window["aioseopjsonp"]||[]).push([["redirects-pro-RedirectsActivate-vue"],{"50f0":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"aioseo-redirects"},[i("core-card",{attrs:{slug:"addNewRedirection","header-text":t.strings.addNewRedirection}},[i("core-blur",[i("core-add-redirection",{attrs:{type:t.$constants.REDIRECT_TYPES[0].value,query:t.$constants.REDIRECT_QUERY_PARAMS[0].value,slash:t.options.redirectDefaults.ignoreSlash,case:t.options.redirectDefaults.ignoreCase}})],1)],1),i("core-blur",[i("base-wp-table",{attrs:{filters:t.filters,totals:t.totals.main,columns:t.columns,rows:[],"search-label":t.strings.searchUrls,"bulk-options":t.bulkOptions,"additional-filters":t.additionalFilters}})],1),i("cta",{attrs:{"cta-link":t.$aioseo.urls.aio.featureManager+"&aioseo-activate=aioseo-redirects","cta-button-action":"","cta-button-loading":t.activationLoading,"same-tab":"","button-text":t.strings.ctaButtonText,"learn-more-link":t.$links.getDocUrl("redirects"),"feature-list":[t.strings.serverRedirects,t.strings.automaticRedirects,t.strings.redirectMonitoring,t.strings.monitoring404,t.strings.fullSiteRedirects,t.strings.siteAliases]},on:{"cta-button-click":t.activateAddon},scopedSlots:t._u([{key:"header-text",fn:function(){return[t._v(" "+t._s(t.strings.ctaHeader)+" ")]},proxy:!0},{key:"description",fn:function(){return[t.failed?i("core-alert",{attrs:{type:"red"}},[t._v(" "+t._s(t.strings.activateError)+" ")]):t._e(),t._v(" "+t._s(t.strings.ctaDescription)+" ")]},proxy:!0},{key:"learn-more-text",fn:function(){return[t._v(" "+t._s(t.strings.learnMoreText)+" ")]},proxy:!0}])})],1)},r=[],a=i("5530"),n=(i("c740"),i("99af"),i("7db0"),i("4de4"),i("d3b7"),i("3ca3"),i("ddb0"),i("2f62")),o=i("9c0e"),l={mixins:[o["d"]],data:function(){return{strings:{addNewRedirection:this.$t.__("Add New Redirection",this.$td),searchUrls:this.$t.__("Search URLs",this.$td),ctaButtonText:this.$t.__("Activate Redirects",this.$tdPro),ctaHeader:this.$t.__("Enable Redirects on your Site",this.$tdPro),serverRedirects:this.$t.__("Fast Server Redirects",this.$td),automaticRedirects:this.$t.__("Automatic Redirects",this.$td),redirectMonitoring:this.$t.__("Redirect Monitoring",this.$td),monitoring404:this.$t.__("404 Monitoring",this.$td),fullSiteRedirects:this.$t.__("Full Site Redirects",this.$td),siteAliases:this.$t.__("Site Aliases",this.$td),ctaDescription:this.$t.__("Our Redirection Manager allows you to easily create and manage redirects for your broken links to avoid confusing search engines and users, as well as losing valuable backlinks. It even automatically sends users and search engines from your old URLs to your new ones.",this.$td)},bulkOptions:[{label:"",value:""}],failed:!1,activationLoading:!1}},computed:Object(a["a"])(Object(a["a"])(Object(a["a"])({},Object(n["e"])("redirects",["filters","totals","options"])),Object(n["e"])(["addons"])),{},{columns:function(){var t=[{slug:"source_url",label:this.$t.__("Source URL",this.$td)},{slug:"target_url",label:this.$t.__("Target URL",this.$td)},{slug:"hits",label:this.$t.__("Hits",this.$td),width:"97px"},{slug:"type",label:this.$t.__("Type",this.$td),width:"100px"},{slug:"group",label:this.$t.__("Group",this.$td),width:"150px"},{slug:"enabled",label:this.$constants.GLOBAL_STRINGS.enabled,width:"80px"}];if("server"===this.options.main.method){var e=t.findIndex((function(t){return"hits"===t.slug}));-1!==e&&this.$delete(t,e)}return t},additionalFilters:function(){return[{label:this.$t.__("Filter by Group",this.$td),name:"group",options:[{label:this.$t.__("All Groups",this.$td),value:"all"}].concat(this.$constants.REDIRECT_GROUPS)}]}}),methods:Object(a["a"])(Object(a["a"])(Object(a["a"])(Object(a["a"])({},Object(n["b"])("redirects",["filter","getRedirectOptions"])),Object(n["b"])(["installPlugins"])),Object(n["d"])(["updateAddon"])),{},{activateAddon:function(){var t=this;this.failed=!1,this.activationLoading=!0;var e=this.addons.find((function(t){return"aioseo-redirects"===t.sku}));this.installPlugins([{plugin:e.basename}]).then((function(i){if(t.activationLoading=!1,i.body.failed.length)t.failed=!0;else{var s=[t.filter({slug:"all"}),t.filter({slug:"logs"}),t.filter({slug:"404"}),t.getRedirectOptions()];Promise.all(s).then((function(){e.isActive=!0,t.updateAddon(e)}))}})).catch((function(){t.activationLoading=!1}))},getColumnLabel:function(t){return 0===t?this.$t.__("Pass through",this.$td):t}})},c=l,d=(i("d1fc"),i("2877")),u=Object(d["a"])(c,s,r,!1,null,null,null);e["default"]=u.exports},cdd4:function(t,e,i){},d1fc:function(t,e,i){"use strict";i("cdd4")}}]);