OwlCyberSecurity - MANAGER
Edit File: Main.e84ea1f1.js
import{u as I}from"./vue-router.2f910c93.js";import{u as x,b as $,l as U}from"./index.506b73e8.js";import Y from"./BadBotBlocker.da2336d9.js";import{C as H}from"./Index.65ac5966.js";import W from"./DatabaseTools.1b754203.js";import{C as z,S as K}from"./Caret.a21d4ca8.js";import{C as P}from"./Card.d0e52e4a.js";import{C as F}from"./Tabs.95165f45.js";import{C as G}from"./Index.6c8fd7fc.js";import{C as q}from"./Upload.728df59b.js";import{C as J}from"./SettingsRow.ac18ea66.js";import{B as j}from"./Checkbox.6db0b9ed.js";import{G as Q,a as X}from"./Row.df38a5f6.js";import"./translations.d159963e.js";import{_ as y}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as w,s as v}from"./default-i18n.20001971.js";import{v as l,o as i,c as g,C as p,l as u,F as L,J as O,k as h,x as A,t as m,a as d,b as S,u as M,q as T,E as Z,f as E}from"./runtime-dom.esm-bundler.5c3c7d72.js";import{D as ee}from"./datetime.f197aeae.js";import{u as N}from"./ToolsStore.c2012596.js";import oe from"./HtaccessEditor.29b0e820.js";import te from"./ImportExport.296e364d.js";import se from"./RobotsEditor.f073cb32.js";import ne from"./SystemStatus.377b405d.js";import ie from"./WpCode.3ec78517.js";import{u as re}from"./RobotsTxt.e408a904.js";import"./helpers.53868b98.js";import"./Textarea.97983cdc.js";import"./Tooltip.73441134.js";import"./index.b359096c.js";import"./Slide.39c07c03.js";import"./license.857c8098.js";import"./upperFirst.2cd99bdd.js";import"./_stringToArray.f9ddb970.js";import"./toString.f0787db8.js";import"./allowed.90fca9f9.js";/* empty css */import"./params.af7ed354.js";import"./Header.e1357a46.js";import"./addons.9611ac49.js";import"./LicenseKeyBar.e4dded7c.js";import"./ScrollTo.81bea8a7.js";import"./LogoGear.cb664d3b.js";import"./AnimatedNumber.f1ad3fb5.js";import"./numbers.9fc174f3.js";import"./Logo.6c9d2b19.js";import"./Support.e867db75.js";import"./date.a0d85d51.js";import"./constants.a8a14dc3.js";import"./Url.9d3a2412.js";import"./Exclamation.22e53a8b.js";import"./Gear.bd4e1565.js";import"./Network.4592662a.js";import"./ToolsSettings.558927fa.js";import"./Checkmark.e40641dd.js";import"./Blur.edde4939.js";import"./Index.a76253da.js";import"./RequiredPlans.2a42646b.js";import"./ProBadge.751e0b85.js";import"./Information.13e8cece.js";import"./Editor.590cac0d.js";import"./isEqual.96d3394c.js";import"./_baseIsEqual.aba7ca44.js";import"./_getTag.1e50d0c4.js";import"./_baseClone.f4be2bb9.js";import"./_arrayEach.6af5abac.js";import"./Plus.426117bd.js";import"./History.aa855293.js";import"./Refresh.a1841ba6.js";import"./Radio.7b47f2fa.js";import"./Download.17eb5e1f.js";import"./regex.8a6101c0.js";import"./vuedraggable.umd.7f7b0bb2.js";import"./UnwantedBots.e8003e33.js";import"./RadioToggle.333e7750.js";import"./Ellipse.e3ae0692.js";import"./External.c9d4f255.js";import"./Row.2a867ba6.js";const ae="all-in-one-seo-pack",le={emits:["update"],setup(){return{rootStore:x()}},components:{BaseCheckbox:j,GridColumn:Q,GridRow:X},props:{loading:Boolean,disabled:Boolean},data(){return{options:{},strings:{updateOptions:w("Update Options",ae)}}},mounted(){this.rootStore.aioseo.deprecatedOptions.forEach(o=>{o.enabled&&(this.options[o.value]=!0)})}},ce={class:"aioseo-deprecated-options"},de=d("br",null,null,-1),ue=d("br",null,null,-1),pe=d("br",null,null,-1);function me(o,t,s,a,e,r){const c=l("base-checkbox"),_=l("grid-column"),b=l("grid-row"),k=l("base-button");return i(),g("div",ce,[p(b,{class:"settings"},{default:u(()=>[(i(!0),g(L,null,O(a.rootStore.aioseo.deprecatedOptions,(f,C)=>(i(),h(_,{key:C,xl:"6",sm:"12"},{default:u(()=>[p(c,{size:"medium",modelValue:e.options[f.value],"onUpdate:modelValue":D=>e.options[f.value]=D,disabled:s.disabled},{default:u(()=>[A(m(f.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1024))),128))]),_:1}),de,p(k,{type:"blue",size:"medium",onClick:t[0]||(t[0]=f=>o.$emit("update",e.options)),loading:s.loading,disabled:s.disabled},{default:u(()=>[A(m(e.strings.updateOptions),1)]),_:1},8,["loading","disabled"]),ue,pe])}const ge=y(le,[["render",me]]),he={setup(){return{optionsStore:$()}},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}]}}},_e={class:"v3-migration-info aioseo-description"},be={class:"info-items"},fe={key:0},we={key:1};function Ae(o,t,s,a,e,r){return i(),g("div",_e,[d("ul",be,[(i(!0),g(L,null,O(r.infoItems,(c,_)=>(i(),g("li",{key:_},[c.value?(i(),g("span",fe,m(c.label),1)):S("",!0),c.value?(i(),g("span",we,m(c.value),1)):S("",!0)]))),128))])])}const ke=y(he,[["render",Ae]]),ve={class:"aioseo-writing-assistant"},Se={__name:"WritingAssistant",setup(o){const t=N(),s="all-in-one-seo-pack",a={resetLogins:w("Reset SEOBoost Logins",s)};let e=!1;const r=()=>{confirm(w("Are you sure you want to reset SEOBoost logins?",s))&&(e=!0,t.doTask({action:"aioseo-reset-seoboost-logins"}).finally(()=>{alert(w("SEOBoost logins have been reset.",s)),e=!1}))};return(c,_)=>{const b=l("base-button");return i(),g("div",ve,[p(b,{type:"blue",size:"medium",onClick:r,loading:M(e),disabled:M(e)},{default:u(()=>[A(m(a.resetLogins),1)]),_:1},8,["loading","disabled"])])}}},ye={setup(){return{rootStore:x(),toolsStore:N()}},components:{CoreAlert:z,CoreCard:P,CoreMainTabs:F,CoreModal:G,CoreNetworkSiteSelector:q,CoreSettingsRow:J,DeprecatedOptions:ge,MigrationInfo:ke,WritingAssistant:Se,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:U.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 o=v('<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:v("To speed up the image scan, go to %1$s and run the <code>aioseo_image_sitemap_scan</code> action.",o),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:v("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.",o),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(o=>o.slug===this.activeTab)}},methods:{isActionDisabled(o){return this.rootStore.aioseo.data.isNetworkAdmin?this.site.blog_id?this.site.blog_id==="network"&&o.network?!1:this.site.blog_id==="network"&&!o.network:!0:!1},isLoading(o){return!!this.doingAction[o.slug]},getSelectedActionObject(o){let t=null;return this.actions.forEach(s=>{const a=s.options.find(e=>e.value===o);a&&(t=a)}),t},maybeDoAction(o,t){if(this.currentAction=o,o.showModal){this.showAreYouSureModal=!0;return}this.doAction(t)},doAction(o){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:o}).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 o=-1;if(this.rootStore.aioseo.data.v3Options&&(o=this.tabs.findIndex(s=>s.slug.toLowerCase()==="migrations"),o!==-1)){const s=v('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions);this.tabs[o].actions.push({label:"Rerun V3 Migration",slug:"restart-v3-migration",shortDescription:"This action restarts the migration from V3 to V4.",longDescription:v("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(o=this.tabs.findIndex(a=>a.slug.toLowerCase()===s.slug.toLowerCase()),o!==-1){this.tabs[o].actions=this.tabs[o].actions.concat(s.actions);return}this.tabs.push(s)})}},Ce={class:"aioseo-tools-debug"},De={key:0,class:"aioseo-settings-row"},Me={class:"select-site"},Te=["innerHTML"],xe=["innerHTML"],Le=["innerHTML"],Oe={class:"aioseo-modal-body"},Be=["innerHTML"];function Ee(o,t,s,a,e,r){const c=l("core-network-site-selector"),_=l("core-alert"),b=l("core-main-tabs"),k=l("base-button"),f=l("core-settings-row"),C=l("svg-close"),D=l("core-modal"),R=l("core-card");return i(),g("div",Ce,[p(R,{slug:"debug","header-text":e.strings.cardLabel},{default:u(()=>[a.rootStore.aioseo.data.isNetworkAdmin?(i(),g("div",De,[d("div",Me,m(e.strings.selectSite),1),p(c,{onSelectedSite:t[0]||(t[0]=n=>e.site=n),"show-network":""})])):S("",!0),p(_,{type:"yellow"},{default:u(()=>[d("div",null,m(e.strings.alertWarning),1),d("div",{innerHTML:e.alertLink},null,8,Te)]),_:1}),(i(),h(b,{internal:"",key:e.tabsKey,tabs:r.tabs,active:e.activeTab,showSaveButton:!1,onChanged:t[1]||(t[1]=n=>e.activeTab=n)},null,8,["tabs","active"])),(i(!0),g(L,null,O(r.activeTabObject.actions,(n,V)=>(i(),h(f,{key:e.activeTab+V,name:n.label,align:""},{content:u(()=>[n.component?(i(),h(T(n.component),{key:0,onUpdate:B=>r.maybeDoAction(n,B),loading:e.doingAction[n.slug],disabled:r.isActionDisabled(n)},null,40,["onUpdate","loading","disabled"])):(i(),h(k,{type:"blue",size:"medium",onClick:B=>r.maybeDoAction(n),loading:e.doingAction[n.slug],key:e.doingActionKey,disabled:r.isActionDisabled(n)},{default:u(()=>[A(m(e.strings.buttonLabel),1)]),_:2},1032,["onClick","loading","disabled"])),d("div",{class:"aioseo-description",innerHTML:n.shortDescription},null,8,xe),d("div",{class:"aioseo-description",innerHTML:n.longDescription},null,8,Le),n.infoComponent?(i(),h(T(n.infoComponent),{key:2})):S("",!0)]),_:2},1032,["name"]))),128)),p(D,{show:e.showAreYouSureModal,"no-header":"",onClose:t[5]||(t[5]=n=>e.showAreYouSureModal=!1),classes:["aioseo-debug-modal"]},{body:u(()=>[d("div",Oe,[d("button",{class:"close",onClick:t[3]||(t[3]=Z(n=>e.showAreYouSureModal=!1,["stop"]))},[p(C,{onClick:t[2]||(t[2]=n=>e.showAreYouSureModal=!1)})]),d("h3",null,m(r.areYouSureTitle),1),d("div",{class:"description",innerHTML:e.strings.cannotBeUndone},null,8,Be),p(k,{type:"blue",size:"medium",onClick:r.doAction},{default:u(()=>[A(m(e.strings.yesDoAction),1)]),_:1},8,["onClick"]),p(k,{type:"gray",size:"medium",onClick:t[4]||(t[4]=n=>e.showAreYouSureModal=!1)},{default:u(()=>[A(m(e.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])]),_:1},8,["header-text"])])}const Ne=y(ye,[["render",Ee]]),Re={components:{Debug:Ne}};function Ve(o,t,s,a,e,r){const c=l("debug",!0);return i(),h(c)}const Ie=y(Re,[["render",Ve]]),lt={__name:"Main",setup(o){const t=x(),s=I(),a=E(()=>{switch(s.name){case"bad-bot-blocker":return Y;case"database-tools":return W;case"debug":return Ie;case"htaccess-editor":return oe;case"import-export":return te;case"system-status":return ne;case"wp-code":return ie;default:return se}});re();const e="all-in-one-seo-pack",r=E(()=>s.name!=="system-status"&&s.name!=="import-export"&&s.name!=="database-tools"&&s.name!=="debug"&&s.name!=="wp-code"),c={pageName:t.aioseo.data.isNetworkAdmin?w("Network Tools",e):w("Tools",e)};return(_,b)=>(i(),h(M(H),{"page-name":c.pageName,"show-save-button":r.value},{default:u(()=>[(i(),h(T(a.value)))]),_:1},8,["page-name","show-save-button"]))}};export{lt as default};