← Back
Editing: Main.249560bc.js
import{u as D,b as I,l as R,f as U}from"./index.44a18132.js";import Y from"./BadBotBlocker.3eee953a.js";import{C as H}from"./Index.b8f45ea3.js";import W from"./DatabaseTools.c0cb37a2.js";import{C as z,S as K}from"./Caret.c1ae0fd1.js";import{C as P}from"./Card.7e975fe9.js";import{C as F}from"./Tabs.f8a7d298.js";import{C as G}from"./Index.739df96e.js";import{C as q}from"./NetworkSiteSelector.a478e33a.js";import{C as J}from"./SettingsRow.74286c2c.js";import{B as j}from"./Checkbox.92023e1b.js";import{G as Q,a as X}from"./Row.eec044b7.js";import"./translations.d159963e.js";import{_ as S}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as A,s as m}from"./default-i18n.20001971.js";import{x as l,o as n,c as g,C as p,m as u,F as L,J as x,l as _,y as w,t as h,a as d,b as y,u as O,v as M,E as Z}from"./runtime-dom.esm-bundler.647fa2bb.js";import{D as ee}from"./datetime.f197aeae.js";import{u as E}from"./ToolsStore.6e3d9cfe.js";import oe from"./HtaccessEditor.3ef127ac.js";import te from"./ImportExport.80c8a262.js";import se from"./RobotsEditor.75faccd9.js";import ie from"./SystemStatus.433a2976.js";import ne from"./WpCode.4f4f718e.js";import"./helpers.a876ae70.js";import"./Textarea.33737614.js";import"./Tooltip.e09c91a9.js";import"./index.6b623118.js";import"./Slide.44995a8e.js";import"./vue-router.f667265d.js";import"./license.9147c6fd.js";import"./upperFirst.a182d36c.js";import"./_stringToArray.f9ddb970.js";import"./toString.98bc71ed.js";import"./allowed.180ff3d9.js";import"./deburr.27e5274e.js";/* empty css */import"./params.af7ed354.js";import"./Header.a599b1db.js";import"./addons.95e96e7e.js";import"./ScrollAndHighlight.beaaf011.js";import"./ScrollTo.81bea8a7.js";import"./LicenseKeyBar.1e135846.js";import"./LogoGear.a6d9ae06.js";import"./AnimatedNumber.a0d95d3c.js";import"./numbers.9fc174f3.js";import"./Logo.99f25797.js";import"./Support.37aa6d16.js";import"./date.b0ec3539.js";import"./constants.a9947cd8.js";import"./Url.d567dae5.js";import"./Exclamation.18010e5b.js";import"./Gear.3527950c.js";import"./Network.8b981791.js";import"./ToolsSettings.23de352b.js";import"./Checkmark.698adf91.js";import"./Blur.3966b67d.js";import"./Index.437acb26.js";import"./RequiredPlans.c0eaccf5.js";import"./ProBadge.80b96f47.js";import"./Information.a42d8b83.js";import"./Editor.438f3063.js";import"./isEqual.3170db16.js";import"./_baseIsEqual.8ba03ebb.js";import"./_getTag.f8104635.js";import"./_baseClone.5b0e3f7e.js";import"./_arrayEach.6af5abac.js";import"./_getAllKeysIn.d76c453c.js";import"./Plus.718d11aa.js";import"./History.4b7f5269.js";import"./Refresh.89130c5a.js";import"./Upload.28cf8cd5.js";import"./Radio.90d92f68.js";import"./Download.9ba651d1.js";import"./regex.8a6101c0.js";import"./vuedraggable.umd.d52fe980.js";import"./Ellipse.7c785d7f.js";import"./External.286ecb34.js";import"./Row.91384eb9.js";const re="all-in-one-seo-pack",ae={emits:["update"],setup(){return{rootStore:D()}},components:{BaseCheckbox:j,GridColumn:Q,GridRow:X},props:{loading:Boolean,disabled:Boolean},data(){return{options:{},strings:{updateOptions:A("Update Options",re)}}},mounted(){this.rootStore.aioseo.deprecatedOptions.forEach(e=>{e.enabled&&(this.options[e.value]=!0)})}},le={class:"aioseo-deprecated-options"},ce=d("br",null,null,-1),de=d("br",null,null,-1),ue=d("br",null,null,-1);function pe(e,t,s,r,o,a){const c=l("base-checkbox"),b=l("grid-column"),k=l("grid-row"),v=l("base-button");return n(),g("div",le,[p(k,{class:"settings"},{default:u(()=>[(n(!0),g(L,null,x(r.rootStore.aioseo.deprecatedOptions,(f,C)=>(n(),_(b,{key:C,xl:"6",sm:"12"},{default:u(()=>[p(c,{size:"medium",modelValue:o.options[f.value],"onUpdate:modelValue":T=>o.options[f.value]=T,disabled:s.disabled},{default:u(()=>[w(h(f.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1024))),128))]),_:1}),ce,p(v,{type:"blue",size:"medium",onClick:t[0]||(t[0]=f=>e.$emit("update",o.options)),loading:s.loading,disabled:s.disabled},{default:u(()=>[w(h(o.strings.updateOptions),1)]),_:1},8,["loading","disabled"]),de,ue])}const me=S(ae,[["render",pe]]),he={setup(){return{optionsStore:I()}},computed:{infoItems(){return[{label:"Migrated Version",value:this.optionsStore.internalOptions.internal.migratedVersion},{label:"First Activated",value:this.optionsStore.internalOptions.internal.firstActivated!==0?ee.fromMillis(this.optionsStore.internalOptions.internal.firstActivated*1e3).toFormat("MMMM d, yyyy"):!1}]}}},ge={class:"v3-migration-info aioseo-description"},_e={class:"info-items"},be={key:0},fe={key:1};function Ae(e,t,s,r,o,a){return n(),g("div",ge,[d("ul",_e,[(n(!0),g(L,null,x(a.infoItems,(c,b)=>(n(),g("li",{key:b},[c.value?(n(),g("span",be,h(c.label),1)):y("",!0),c.value?(n(),g("span",fe,h(c.value),1)):y("",!0)]))),128))])])}const we=S(he,[["render",Ae]]),ke={class:"aioseo-writing-assistant"},ve={__name:"WritingAssistant",setup(e){const t=E(),s="all-in-one-seo-pack",r={resetLogins:A("Reset SEOBoost Logins",s)};let o=!1;const a=()=>{confirm(A("Are you sure you want to reset SEOBoost logins?",s))&&(o=!0,t.doTask({action:"aioseo-reset-seoboost-logins"}).finally(()=>{alert(A("SEOBoost logins have been reset.",s)),o=!1}))};return(c,b)=>{const k=l("base-button");return n(),g("div",ke,[p(k,{type:"blue",size:"medium",onClick:a,loading:O(o),disabled:O(o)},{default:u(()=>[w(h(r.resetLogins),1)]),_:1},8,["loading","disabled"])])}}},Se={setup(){return{rootStore:D(),toolsStore:E()}},components:{CoreAlert:z,CoreCard:P,CoreMainTabs:F,CoreModal:G,CoreNetworkSiteSelector:q,CoreSettingsRow:J,DeprecatedOptions:me,MigrationInfo:we,WritingAssistant:ve,SvgClose:K},props:{extraActions:{type:Array,required:!1}},data(){return{site:{},tabsKey:0,doingActionKey:0,activeTab:"general",currentAction:"",showAreYouSureModal:!1,doingAction:[],strings:{selectSite:"Select Site",cardLabel:"Debug",selectLabel:"Select a Debug Action:",buttonLabel:"Run Action",alertWarning:"Before you run any action, please make sure that you have fully read the description and understand the consequences as these cannot be reverted.",cannotBeUndone:"This action cannot be undone.",yesDoAction:"Yes, run this action",noChangedMind:"No, I changed my mind"},alertLink:R.getPlainLink("Click here to open to the Scheduled Actions panel",this.rootStore.aioseo.urls.admin.scheduledActions,!0)}},computed:{areYouSureTitle(){return`Are you sure you want to run the "${this.currentAction.label}" action?`},tabs(){const e=m('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions),t=this.rootStore.aioseo.data.isNetworkAdmin?"<br><strong>NOTE: If no site is selected, this will clear the network cache.</strong>":"",s=this.rootStore.aioseo.data.isNetworkAdmin?"<br><strong>NOTE: If no site is selected, this will clear the network plugin updates transient.</strong>":"";return[{slug:"general",name:"General",actions:[{label:"Clear Cache",slug:"clear-cache",shortDescription:`This action deletes all records of the <code>aioseo_cache</code> table in the database.${t}`,longDescription:"",showModal:!1,network:!0},{label:"Clear Plugin Updates Transient",slug:"clear-plugin-updates-transient",shortDescription:`This action clears the plugin updates transient, which forces WordPress Core to check for plugin updates.${s}`,longDescription:"",showModal:!1,network:!0},{label:"Readd Capabilities",slug:"readd-capabilities",shortDescription:"This action will readd our capabilities (access permissions) for all users.",longDescription:"",showModal:!1},{label:"Reset Data",slug:"reset-data",shortDescription:"This action will <strong>delete</strong> all our custom tables and options.",longDescription:"",showModal:!0}]},{slug:"sitemap",name:"Sitemap",actions:[{label:"Clear Image Data",slug:"clear-image-data",shortDescription:"This action removes all image data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:m("To speed up the image scan, go to %1$s and run the <code>aioseo_image_sitemap_scan</code> action.",e),showModal:!1}]},{slug:"migrations",name:"Migrations",actions:[{label:"Rerun V4+ Migrations",slug:"rerun-migrations",shortDescription:"This action will rerun all update migrations since 4.0.0, excluding the V3 migration.",longDescription:"",showModal:!0}]},{slug:"old-issues",name:"Old Issues",actions:[{label:"Remove Duplicates",slug:"remove-duplicates",shortDescription:"This action will delete any duplicate records that are found in the <code>aioseo_posts</code> and <code>aioseo_terms</code> tables.",longDescription:"",showModal:!1},{label:"Unescape Data",slug:"unescape-data",shortDescription:"This action will clean <code>aioseo_posts</code> and <code>aioseo_term</code> records whose data is corrupted.",longDescription:m("The action will trigger a routine which runs in batches via Action Scheduler. It may take some time for this routine to complete, To speed up this process, go to %1$s and run the <code>aioseo_unslash_escaped_data_posts</code> or <code>aioseo_unslash_escaped_data_terms</code> action.",e),showModal:!1}]},{slug:"deprecated-options",name:"Deprecated Options",actions:[{label:"Deprecated Options",slug:"deprecated-options",shortDescription:"Enable or disable any options that have been deprecated in AIOSEO.",longDescription:"<strong>These options are not guaranteed to work and all support has been dropped.</strong>",showModal:!1,component:"deprecated-options"}]},{slug:"writing-assistant",name:"Writing Assistant",actions:[{label:"Writing Assistant",slug:"writing-assistant",shortDescription:"Resets all users SEOBoost logins.",longDescription:"",showModal:!1,component:"writing-assistant"}]}]},activeTabObject(){return this.tabs.find(e=>e.slug===this.activeTab)}},methods:{isActionDisabled(e){return this.rootStore.aioseo.data.isNetworkAdmin?this.site.blog_id?this.site.blog_id==="network"&&e.network?!1:this.site.blog_id==="network"&&!e.network:!0:!1},isLoading(e){return!!this.doingAction[e.slug]},getSelectedActionObject(e){let t=null;return this.actions.forEach(s=>{const r=s.options.find(o=>o.value===e);r&&(t=r)}),t},maybeDoAction(e,t){if(this.currentAction=e,e.showModal){this.showAreYouSureModal=!0;return}this.doAction(t)},doAction(e){this.doingAction[this.currentAction.slug]=!0,this.showAreYouSureModal=!1,this.doingActionKey++,this.toolsStore.doTask({action:this.currentAction.slug,siteId:this.site.blog_id||this.rootStore.aioseo.data.currentBlogId,data:e}).then(()=>{console.log(`Action "${this.currentAction.label}" has been completed.`)}).catch(t=>{console.error(`Action "${this.currentAction.label}" could not be completed: `,t)}).finally(()=>{this.doingAction[this.currentAction.slug]=!1,this.doingActionKey++})}},beforeMount(){var t;let e=-1;if(this.rootStore.aioseo.data.v3Options&&(e=this.tabs.findIndex(s=>s.slug.toLowerCase()==="migrations"),e!==-1)){const s=m('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions);this.tabs[e].actions.push({label:"Rerun V3 Migration",slug:"restart-v3-migration",shortDescription:"This action restarts the migration from V3 to V4.",longDescription:m("All settings will be migrated immediately. However, the post/term meta needs to be migrated via a routine which runs in batches via Action Scheduler. To speed up the post/term meta migration, go to %1$s and run the <code>aioseo_migrate_post_meta</code> or <code>aioseo_migrate_term_meta</code> action.",s),infoComponent:"MigrationInfo",showModal:!0})}(t=this.extraActions)!=null&&t.length&&this.extraActions.forEach(s=>{if(e=this.tabs.findIndex(r=>r.slug.toLowerCase()===s.slug.toLowerCase()),e!==-1){this.tabs[e].actions=this.tabs[e].actions.concat(s.actions);return}this.tabs.push(s)})}},ye={class:"aioseo-tools-debug"},De={key:0,class:"aioseo-settings-row"},Ce={class:"select-site"},Te=["innerHTML"],Me=["innerHTML"],Le=["innerHTML"],xe={class:"aioseo-modal-body"},$e=["innerHTML"];function Oe(e,t,s,r,o,a){const c=l("core-network-site-selector"),b=l("core-alert"),k=l("core-main-tabs"),v=l("base-button"),f=l("core-settings-row"),C=l("svg-close"),T=l("core-modal"),N=l("core-card");return n(),g("div",ye,[p(N,{slug:"debug","header-text":o.strings.cardLabel},{default:u(()=>[r.rootStore.aioseo.data.isNetworkAdmin?(n(),g("div",De,[d("div",Ce,h(o.strings.selectSite),1),p(c,{onSelectedSite:t[0]||(t[0]=i=>o.site=i),"show-network":""})])):y("",!0),p(b,{type:"yellow"},{default:u(()=>[d("div",null,h(o.strings.alertWarning),1),d("div",{innerHTML:o.alertLink},null,8,Te)]),_:1}),(n(),_(k,{internal:"",key:o.tabsKey,tabs:a.tabs,active:o.activeTab,showSaveButton:!1,onChanged:t[1]||(t[1]=i=>o.activeTab=i)},null,8,["tabs","active"])),(n(!0),g(L,null,x(a.activeTabObject.actions,(i,V)=>(n(),_(f,{key:o.activeTab+V,name:i.label,align:""},{content:u(()=>[i.component?(n(),_(M(i.component),{key:0,onUpdate:$=>a.maybeDoAction(i,$),loading:o.doingAction[i.slug],disabled:a.isActionDisabled(i)},null,40,["onUpdate","loading","disabled"])):(n(),_(v,{type:"blue",size:"medium",onClick:$=>a.maybeDoAction(i),loading:o.doingAction[i.slug],key:o.doingActionKey,disabled:a.isActionDisabled(i)},{default:u(()=>[w(h(o.strings.buttonLabel),1)]),_:2},1032,["onClick","loading","disabled"])),d("div",{class:"aioseo-description",innerHTML:i.shortDescription},null,8,Me),d("div",{class:"aioseo-description",innerHTML:i.longDescription},null,8,Le),i.infoComponent?(n(),_(M(i.infoComponent),{key:2})):y("",!0)]),_:2},1032,["name"]))),128)),p(T,{show:o.showAreYouSureModal,"no-header":"",onClose:t[5]||(t[5]=i=>o.showAreYouSureModal=!1),classes:["aioseo-debug-modal"]},{body:u(()=>[d("div",xe,[d("button",{class:"close",onClick:t[3]||(t[3]=Z(i=>o.showAreYouSureModal=!1,["stop"]))},[p(C,{onClick:t[2]||(t[2]=i=>o.showAreYouSureModal=!1)})]),d("h3",null,h(a.areYouSureTitle),1),d("div",{class:"description",innerHTML:o.strings.cannotBeUndone},null,8,$e),p(v,{type:"blue",size:"medium",onClick:a.doAction},{default:u(()=>[w(h(o.strings.yesDoAction),1)]),_:1},8,["onClick"]),p(v,{type:"gray",size:"medium",onClick:t[4]||(t[4]=i=>o.showAreYouSureModal=!1)},{default:u(()=>[w(h(o.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])]),_:1},8,["header-text"])])}const Be=S(Se,[["render",Oe]]),Ee={setup(){return{addonsStore:U(),rootStore:D()}},components:{Debug:Be},computed:{extraActions(){const e=m('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions),t=this.addonsStore.addons.find(o=>o.sku==="aioseo-video-sitemap"),s=this.addonsStore.addons.find(o=>o.sku==="aioseo-link-assistant"),r=[];return t.isActive&&r.push({slug:"sitemap",actions:[{label:"Clear Video Data",slug:"clear-video-data",shortDescription:"This action removes all video data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:m("To speed up the video scan, go to %1$s and run the <code>aioseo_video_sitemap_scan</code> action.",e),showModal:!1}]}),s.isActive&&r.push({slug:"link-assistant",name:"Link Assistant",actions:[{label:"Clear Data",slug:"link-assistant-clear-data",shortDescription:"This action removes all Link Assistant data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:m("The various Link Assistant scans can be sped up through the %1$s",e),showModal:!0},{label:"Clear Links",slug:"link-assistant-clear-links",shortDescription:"This action removes all link data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:m("To speed up the links scan, go to %1$s and run the <code>aioseo_link_assistant_links_scan</code> action.",e),showModal:!0},{label:"Clear Suggestions",slug:"link-assistant-clear-suggestions",shortDescription:"This action removes all link suggestion data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:m("To speed up the links scan, go to %1$s and run the <code>aioseo_link_assistant_link_suggestions_scan</code> action.",e),showModal:!0},{label:"Undismiss Suggestions",slug:"link-assistant-undismiss-suggestions",shortDescription:"This action removes the dismissed state from all suggestions, which makes them appear in the UI again.",longDescription:m("To speed up the video scan, go to %1$s and run the <code>aioseo_video_sitemap_scan</code> action.",e),showModal:!1}]}),r}}};function Ne(e,t,s,r,o,a){const c=l("debug",!0);return n(),_(c,{extraActions:a.extraActions},null,8,["extraActions"])}const Ve=S(Ee,[["render",Ne]]),B="all-in-one-seo-pack",Ie={setup(){return{rootStore:D()}},components:{BadBotBlocker:Y,CoreMain:H,DatabaseTools:W,Debug:Ve,HtaccessEditor:oe,ImportExport:te,RobotsEditor:se,SystemStatus:ie,WpCode:ne},data(){return{strings:{pageName:this.rootStore.aioseo.data.isNetworkAdmin?A("Network Tools",B):A("Tools",B)}}},computed:{showSaveButton(){return this.$route.name!=="system-status"&&this.$route.name!=="import-export"&&this.$route.name!=="database-tools"&&this.$route.name!=="debug"&&this.$route.name!=="wp-code"}}};function Re(e,t,s,r,o,a){const c=l("core-main");return n(),_(c,{"page-name":o.strings.pageName,"show-save-button":a.showSaveButton},{default:u(()=>[(n(),_(M(e.$route.name)))]),_:1},8,["page-name","show-save-button"])}const dt=S(Ie,[["render",Re]]);export{dt as default};
Save File
Cancel