Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/DatabaseTools.5f312c02.js.tar

xbodynamge/dev/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/DatabaseTools.5f312c02.js000064400000027716151143274770027477 0ustar00homeimport{u as z,c as H,a as q,m as E}from"./index.4fea5b8a.js";import{l as P}from"./license.ae04185d.js";import{u as j}from"./Network.eb4407d5.js";import{C as N}from"./Card.9a64d2e2.js";import{u as F}from"./ToolsSettings.9dc45d4f.js";import{B as G}from"./Checkbox.d4a94670.js";import{C as Y,S as J}from"./Caret.7cc96622.js";import{C as K}from"./Index.6b9f2f83.js";import{C as U}from"./SettingsRow.70a7af04.js";import{G as Q,a as W}from"./Row.c7b7fb90.js";import"./translations.d159963e.js";import{v as i,o as a,c as k,H as n,l as r,k as S,x as u,t as d,b as g,a as h,G as X,N as Z,J as $,K as A}from"./runtime-dom.esm-bundler.baf35205.js";import{_ as T}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as V}from"./ToolsStore.81d292fb.js";import{_ as s,s as B}from"./default-i18n.20001971.js";import{S as ee}from"./Checkmark.b35299d3.js";import{C as oe}from"./Blur.601d8ea8.js";import{C as te}from"./Index.a6ae6538.js";import{R as se}from"./RequiredPlans.8c29f2e8.js";import"./helpers.114e9c35.js";import"./upperFirst.eafa5318.js";import"./toString.bbd66337.js";import"./Tooltip.70b51a50.js";import"./index.7fee6f1a.js";import"./Slide.1db617da.js";import"./addons.e13ca687.js";import"./allowed.269a2007.js";import"./constants.a8a14dc3.js";const b="all-in-one-seo-pack",re={setup(){const{toolsSettings:t}=F();return{rootStore:z(),toolsSettings:t,toolsStore:V()}},components:{BaseCheckbox:G,CoreAlert:Y,CoreModal:K,CoreSettingsRow:U,GridColumn:Q,GridRow:W,SvgClose:J},props:{site:Object},data(){return{showSuccess:!1,showModal:!1,loading:!1,options:{},strings:{selectSettings:s("Select Settings",b),selectSettingsToReset:s("Select settings that you would like to reset:",b),resetSelectedSettings:s("Reset Selected Settings to Default",b),resetSuccess:s("Your settings have been reset successfully!",b),areYouSureReset:s("Are you sure you want to reset the selected settings to default?",b),actionCannotBeUndone:B(s("This action cannot be undone. Before taking this action, we recommend that you make a %1$sfull website backup first%2$s.",b),"<strong>","</strong>"),yesIHaveBackup:s("Yes, I have a backup and want to reset the settings",b),noBackup:s("No, I need to make a backup",b),allSettings:B(s("All %1$s Settings",b),"AIOSEO")}}},computed:{canReset(){if(this.rootStore.aioseo.data.isNetworkAdmin&&!this.site)return!1;const t=[];return Object.keys(this.options).forEach(o=>{t.push(this.options[o])}),!t.some(o=>o)}},methods:{noMakeBackup(){this.rootStore.navigate.scroll="aioseo-backup-settings",this.rootStore.navigate.highlight="aioseo-backup-settings",this.$router.push({name:"import-export"})},processResetSettings(){const t=[];this.options.all?this.toolsSettings.filter(o=>o.value!=="all").forEach(o=>{t.push(o.value)}):Object.keys(this.options).forEach(o=>{this.options[o]&&t.push(o)}),this.loading=!0,this.toolsStore.resetSettings({payload:t,siteId:this.site?this.site.blog_id:null}).then(()=>{this.showModal=!1,this.loading=!1,this.showSuccess=!0,this.options={},setTimeout(()=>{this.showSuccess=!1},5e3)})}}},ne={class:"aioseo-core-reset-settings"},ie={class:"reset-settings"},ae=h("br",null,null,-1),le=h("br",null,null,-1),ce={class:"aioseo-modal-body"},de=["innerHTML"];function ue(t,o,x,l,e,c){const w=i("core-alert"),_=i("base-checkbox"),C=i("grid-column"),v=i("grid-row"),L=i("base-button"),R=i("core-settings-row"),y=i("svg-close"),D=i("core-modal");return a(),k("div",ne,[n(R,{name:e.strings.selectSettings,class:"no-border"},{content:r(()=>[e.showSuccess?(a(),S(w,{key:0,class:"reset-success",type:"green"},{default:r(()=>[u(d(e.strings.resetSuccess),1)]),_:1})):g("",!0),h("div",ie,[u(d(e.strings.selectSettingsToReset)+" ",1),ae,le,n(v,{class:"settings"},{default:r(()=>[n(C,null,{default:r(()=>[n(_,{size:"medium",modelValue:e.options.all,"onUpdate:modelValue":o[0]||(o[0]=p=>e.options.all=p),disabled:l.rootStore.aioseo.data.isNetworkAdmin&&!x.site},{default:r(()=>[u(d(e.strings.allSettings),1)]),_:1},8,["modelValue","disabled"])]),_:1}),(a(!0),k(X,null,Z(l.toolsSettings,(p,I)=>(a(),S(C,{key:I,xl:"3",md:"4",sm:"6"},{default:r(()=>[e.options.all?g("",!0):(a(),S(_,{key:0,size:"medium",modelValue:e.options[p.value],"onUpdate:modelValue":O=>e.options[p.value]=O,disabled:l.rootStore.aioseo.data.isNetworkAdmin&&!x.site},{default:r(()=>[u(d(p.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])),p.value!=="all"&&e.options.all?(a(),S(_,{key:1,size:"medium",modelValue:!0,disabled:""},{default:r(()=>[u(d(p.label),1)]),_:2},1024)):g("",!0)]),_:2},1024))),128))]),_:1}),n(L,{type:"gray",size:"medium",onClick:o[1]||(o[1]=p=>e.showModal=!0),disabled:c.canReset},{default:r(()=>[u(d(e.strings.resetSelectedSettings),1)]),_:1},8,["disabled"])])]),_:1},8,["name"]),n(D,{show:e.showModal,"no-header":"",onClose:o[4]||(o[4]=p=>e.showModal=!1),classes:["aioseo-core-reset-settings-modal"]},{body:r(()=>[h("div",ce,[h("button",{class:"close",onClick:o[3]||(o[3]=$(p=>e.showModal=!1,["stop"]))},[n(y,{onClick:o[2]||(o[2]=p=>e.showModal=!1)})]),h("h3",null,d(e.strings.areYouSureReset),1),h("div",{class:"reset-description",innerHTML:e.strings.actionCannotBeUndone},null,8,de),n(L,{type:"blue",size:"medium",onClick:c.processResetSettings,loading:e.loading},{default:r(()=>[u(d(e.strings.yesIHaveBackup),1)]),_:1},8,["onClick","loading"]),n(L,{type:"gray",size:"medium",onClick:c.noMakeBackup},{default:r(()=>[u(d(e.strings.noBackup),1)]),_:1},8,["onClick"])])]),_:1},8,["show"])])}const M=T(re,[["render",ue]]),f="all-in-one-seo-pack",ge={setup(){const{getSites:t,getUniqueSiteId:o}=j();return{optionsStore:H(),rootStore:z(),toolsStore:V(),getSites:t,getUniqueSiteId:o}},components:{CoreCard:N,CoreResetSettings:M,CoreSettingsRow:U,SvgCheckmark:ee},data(){return{site:null,selectedSite:null,clearedLogs:{redirectLogs:!1,logs404:!1},loadingLog:null,strings:{selectSite:s("Select Site",f),resetRestoreSettings:s("Reset / Restore Settings",f),logs:s("Logs",f),cleared:s("Cleared",f),logs404:s("404 Logs",f),clear404Logs:s("Clear 404 Logs",f),redirectLogs:s("Redirect Logs",f),clearRedirectLogs:s("Clear Redirect Logs",f),logsTooltip:s(`Log sizes may fluctuate and not always be 100% accurate since the results can be cached. Also after clearing a log, it may not show as "0" since database tables also include additional information such as indexes that we don't clear.`,f)}}},watch:{site(t){this.selectedSite=this.rootStore.aioseo.data.network.sites.sites.find(o=>this.getUniqueSiteId(o)===t.value)}},computed:{canReset(){const t=[];return Object.keys(this.options).forEach(o=>{t.push(this.options[o])}),!t.some(o=>o)},showLogs(){var t,o;return!this.rootStore.aioseo.data.isNetworkAdmin&&(((t=this.rootStore.aioseo.data.logSizes)==null?void 0:t.redirectLogs)||((o=this.rootStore.aioseo.data.logSizes)==null?void 0:o.logs404))},sites(){return this.getSites.filter(t=>!t.parentDomain).map(t=>({value:this.getUniqueSiteId(t),label:`${t.domain}${t.path}`}))}},methods:{getSizeClass(t){let o="green";return 262144e3<t?o="orange":1073741274<t&&(o="red"),o},processClearLog(t){this.loadingLog=t,this.toolsStore.clearLog(t).then(()=>{this.loadingLog=null,this.clearedLogs[t]=!0})},disabledLog(t){return!this.rootStore.aioseo.data.logSizes[t].original||this.clearedLogs[t]}}},me={class:"aioseo-tools-database-tools"},_e={key:0},pe={key:1},he={class:"log-size"},Se={key:0},be={key:1},fe={class:"log-size"};function ke(t,o,x,l,e,c){const w=i("base-select"),_=i("core-settings-row"),C=i("core-reset-settings"),v=i("core-card"),L=i("svg-checkmark"),R=i("base-button");return a(),k("div",me,[n(v,{slug:"databaseTools","header-text":e.strings.resetRestoreSettings},{default:r(()=>[l.rootStore.aioseo.data.isNetworkAdmin?(a(),S(_,{key:0,name:e.strings.selectSite},{content:r(()=>[n(w,{size:"medium",modelValue:e.site,"onUpdate:modelValue":o[0]||(o[0]=y=>e.site=y),options:c.sites},null,8,["modelValue","options"])]),_:1},8,["name"])):g("",!0),n(C,{site:e.selectedSite},null,8,["site"])]),_:1},8,["header-text"]),c.showLogs?(a(),S(v,{key:0,slug:"databaseToolsLogs","header-text":e.strings.logs},{tooltip:r(()=>[u(d(e.strings.logsTooltip),1)]),default:r(()=>[l.rootStore.aioseo.data.logSizes.logs404?(a(),S(_,{key:0,name:e.strings.logs404,align:""},{content:r(()=>[n(R,{class:"clear-log",type:"gray",size:"medium",loading:e.loadingLog==="logs404",disabled:c.disabledLog("logs404"),onClick:o[1]||(o[1]=y=>c.processClearLog("logs404"))},{default:r(()=>[c.disabledLog("logs404")?(a(),k("span",_e,[n(L),u(" "+d(e.strings.cleared),1)])):g("",!0),c.disabledLog("logs404")?g("",!0):(a(),k("span",pe,d(e.strings.clear404Logs),1))]),_:1},8,["loading","disabled"]),h("div",he,[h("span",{class:A(["size-dot",c.getSizeClass(l.rootStore.aioseo.data.logSizes.logs404.original)])},null,2),u(" "+d(l.rootStore.aioseo.data.logSizes.logs404.readable),1)])]),_:1},8,["name"])):g("",!0),l.rootStore.aioseo.data.logSizes.redirectLogs?(a(),S(_,{key:1,name:e.strings.redirectLogs,align:""},{content:r(()=>[n(R,{class:"clear-log",type:"gray",size:"medium",loading:e.loadingLog==="redirectLogs",disabled:c.disabledLog("redirectLogs"),onClick:o[2]||(o[2]=y=>c.processClearLog("redirectLogs"))},{default:r(()=>[c.disabledLog("redirectLogs")?(a(),k("span",Se,[n(L),u(" "+d(e.strings.cleared),1)])):g("",!0),c.disabledLog("redirectLogs")?g("",!0):(a(),k("span",be,d(e.strings.clearRedirectLogs),1))]),_:1},8,["loading","disabled"]),h("div",fe,[h("span",{class:A(["size-dot",c.getSizeClass(l.rootStore.aioseo.data.logSizes.redirectLogs.original)])},null,2),u(" "+d(l.rootStore.aioseo.data.logSizes.redirectLogs.readable),1)])]),_:1},8,["name"])):g("",!0)]),_:1},8,["header-text"])):g("",!0)])}const Le=T(ge,[["render",ke]]),m="all-in-one-seo-pack",we={setup(){return{rootStore:z()}},components:{RequiredPlans:se,CoreBlur:oe,CoreCard:N,CoreResetSettings:M,CoreSettingsRow:U,Cta:te},data(){return{links:q,strings:{selectSite:s("Select Site",m),resetRestoreSettings:s("Reset / Restore Settings",m),logs:s("Logs",m),cleared:s("Cleared",m),logs404:s("404 Logs",m),clear404Logs:s("Clear 404 Logs",m),redirectLogs:s("Redirect Logs",m),clearRedirectLogs:s("Clear Redirect Logs",m),logsTooltip:s(`Log sizes may fluctuate and not always be 100% accurate since the results can be cached. Also after clearing a log, it may not show as "0" since database tables also include additional information such as indexes that we don't clear.`,m),ctaHeader:B(s("Network Tools is a %1$s Feature",m),"PRO"),ctaButtonText:s("Unlock Network Tools",m),networkDatabaseToolsDescription:s("Unlock network-level tools to manage all your sites from one easy-to-use location. Migrate data or create backups without the need to visit each dashboard.",m)}}}},ye={class:"aioseo-tools-database-tools-lite"};function Ce(t,o,x,l,e,c){const w=i("base-select"),_=i("core-settings-row"),C=i("core-reset-settings"),v=i("core-blur"),L=i("required-plans"),R=i("cta"),y=i("core-card");return a(),k("div",ye,[n(y,{slug:"databaseTools","header-text":e.strings.resetRestoreSettings},{default:r(()=>[n(v,null,{default:r(()=>[n(_,{name:e.strings.selectSite},{content:r(()=>[n(w,{size:"medium",modelValue:{value:"",label:""},options:[]})]),_:1},8,["name"]),n(C)]),_:1}),n(R,{"cta-link":e.links.getPricingUrl("network-tools","database-tools"),"button-text":e.strings.ctaButtonText,"learn-more-link":e.links.getUpsellUrl("network-tools","database-tools",l.rootStore.isPro?"pricing":"liteUpgrade")},{"header-text":r(()=>[u(d(e.strings.ctaHeader),1)]),description:r(()=>[n(L,{"core-feature":["tools","network-tools-database"]}),u(" "+d(e.strings.networkDatabaseToolsDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1},8,["header-text"])])}const ve=T(we,[["render",Ce]]),Re={setup(){return{licenseStore:E(),rootStore:z()}},components:{DatabaseTools:Le,LiteDatabaseTools:ve},data(){return{license:P}}};function xe(t,o,x,l,e,c){const w=i("database-tools",!0),_=i("lite-database-tools");return a(),k("div",null,[!l.rootStore.aioseo.data.isNetworkAdmin||!l.licenseStore.isUnlicensed&&e.license.hasCoreFeature("tools","network-tools-database")?(a(),S(w,{key:0})):g("",!0),l.rootStore.aioseo.data.isNetworkAdmin&&(l.licenseStore.isUnlicensed||!e.license.hasCoreFeature("tools","network-tools-database"))?(a(),S(_,{key:1})):g("",!0)])}const to=T(Re,[["render",xe]]);export{to as default};
namtation/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/DatabaseTools.5f312c02.js000064400000027716151144360410030677 0ustar00home/xbodynamgeimport{u as z,c as H,a as q,m as E}from"./index.4fea5b8a.js";import{l as P}from"./license.ae04185d.js";import{u as j}from"./Network.eb4407d5.js";import{C as N}from"./Card.9a64d2e2.js";import{u as F}from"./ToolsSettings.9dc45d4f.js";import{B as G}from"./Checkbox.d4a94670.js";import{C as Y,S as J}from"./Caret.7cc96622.js";import{C as K}from"./Index.6b9f2f83.js";import{C as U}from"./SettingsRow.70a7af04.js";import{G as Q,a as W}from"./Row.c7b7fb90.js";import"./translations.d159963e.js";import{v as i,o as a,c as k,H as n,l as r,k as S,x as u,t as d,b as g,a as h,G as X,N as Z,J as $,K as A}from"./runtime-dom.esm-bundler.baf35205.js";import{_ as T}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as V}from"./ToolsStore.81d292fb.js";import{_ as s,s as B}from"./default-i18n.20001971.js";import{S as ee}from"./Checkmark.b35299d3.js";import{C as oe}from"./Blur.601d8ea8.js";import{C as te}from"./Index.a6ae6538.js";import{R as se}from"./RequiredPlans.8c29f2e8.js";import"./helpers.114e9c35.js";import"./upperFirst.eafa5318.js";import"./toString.bbd66337.js";import"./Tooltip.70b51a50.js";import"./index.7fee6f1a.js";import"./Slide.1db617da.js";import"./addons.e13ca687.js";import"./allowed.269a2007.js";import"./constants.a8a14dc3.js";const b="all-in-one-seo-pack",re={setup(){const{toolsSettings:t}=F();return{rootStore:z(),toolsSettings:t,toolsStore:V()}},components:{BaseCheckbox:G,CoreAlert:Y,CoreModal:K,CoreSettingsRow:U,GridColumn:Q,GridRow:W,SvgClose:J},props:{site:Object},data(){return{showSuccess:!1,showModal:!1,loading:!1,options:{},strings:{selectSettings:s("Select Settings",b),selectSettingsToReset:s("Select settings that you would like to reset:",b),resetSelectedSettings:s("Reset Selected Settings to Default",b),resetSuccess:s("Your settings have been reset successfully!",b),areYouSureReset:s("Are you sure you want to reset the selected settings to default?",b),actionCannotBeUndone:B(s("This action cannot be undone. Before taking this action, we recommend that you make a %1$sfull website backup first%2$s.",b),"<strong>","</strong>"),yesIHaveBackup:s("Yes, I have a backup and want to reset the settings",b),noBackup:s("No, I need to make a backup",b),allSettings:B(s("All %1$s Settings",b),"AIOSEO")}}},computed:{canReset(){if(this.rootStore.aioseo.data.isNetworkAdmin&&!this.site)return!1;const t=[];return Object.keys(this.options).forEach(o=>{t.push(this.options[o])}),!t.some(o=>o)}},methods:{noMakeBackup(){this.rootStore.navigate.scroll="aioseo-backup-settings",this.rootStore.navigate.highlight="aioseo-backup-settings",this.$router.push({name:"import-export"})},processResetSettings(){const t=[];this.options.all?this.toolsSettings.filter(o=>o.value!=="all").forEach(o=>{t.push(o.value)}):Object.keys(this.options).forEach(o=>{this.options[o]&&t.push(o)}),this.loading=!0,this.toolsStore.resetSettings({payload:t,siteId:this.site?this.site.blog_id:null}).then(()=>{this.showModal=!1,this.loading=!1,this.showSuccess=!0,this.options={},setTimeout(()=>{this.showSuccess=!1},5e3)})}}},ne={class:"aioseo-core-reset-settings"},ie={class:"reset-settings"},ae=h("br",null,null,-1),le=h("br",null,null,-1),ce={class:"aioseo-modal-body"},de=["innerHTML"];function ue(t,o,x,l,e,c){const w=i("core-alert"),_=i("base-checkbox"),C=i("grid-column"),v=i("grid-row"),L=i("base-button"),R=i("core-settings-row"),y=i("svg-close"),D=i("core-modal");return a(),k("div",ne,[n(R,{name:e.strings.selectSettings,class:"no-border"},{content:r(()=>[e.showSuccess?(a(),S(w,{key:0,class:"reset-success",type:"green"},{default:r(()=>[u(d(e.strings.resetSuccess),1)]),_:1})):g("",!0),h("div",ie,[u(d(e.strings.selectSettingsToReset)+" ",1),ae,le,n(v,{class:"settings"},{default:r(()=>[n(C,null,{default:r(()=>[n(_,{size:"medium",modelValue:e.options.all,"onUpdate:modelValue":o[0]||(o[0]=p=>e.options.all=p),disabled:l.rootStore.aioseo.data.isNetworkAdmin&&!x.site},{default:r(()=>[u(d(e.strings.allSettings),1)]),_:1},8,["modelValue","disabled"])]),_:1}),(a(!0),k(X,null,Z(l.toolsSettings,(p,I)=>(a(),S(C,{key:I,xl:"3",md:"4",sm:"6"},{default:r(()=>[e.options.all?g("",!0):(a(),S(_,{key:0,size:"medium",modelValue:e.options[p.value],"onUpdate:modelValue":O=>e.options[p.value]=O,disabled:l.rootStore.aioseo.data.isNetworkAdmin&&!x.site},{default:r(()=>[u(d(p.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])),p.value!=="all"&&e.options.all?(a(),S(_,{key:1,size:"medium",modelValue:!0,disabled:""},{default:r(()=>[u(d(p.label),1)]),_:2},1024)):g("",!0)]),_:2},1024))),128))]),_:1}),n(L,{type:"gray",size:"medium",onClick:o[1]||(o[1]=p=>e.showModal=!0),disabled:c.canReset},{default:r(()=>[u(d(e.strings.resetSelectedSettings),1)]),_:1},8,["disabled"])])]),_:1},8,["name"]),n(D,{show:e.showModal,"no-header":"",onClose:o[4]||(o[4]=p=>e.showModal=!1),classes:["aioseo-core-reset-settings-modal"]},{body:r(()=>[h("div",ce,[h("button",{class:"close",onClick:o[3]||(o[3]=$(p=>e.showModal=!1,["stop"]))},[n(y,{onClick:o[2]||(o[2]=p=>e.showModal=!1)})]),h("h3",null,d(e.strings.areYouSureReset),1),h("div",{class:"reset-description",innerHTML:e.strings.actionCannotBeUndone},null,8,de),n(L,{type:"blue",size:"medium",onClick:c.processResetSettings,loading:e.loading},{default:r(()=>[u(d(e.strings.yesIHaveBackup),1)]),_:1},8,["onClick","loading"]),n(L,{type:"gray",size:"medium",onClick:c.noMakeBackup},{default:r(()=>[u(d(e.strings.noBackup),1)]),_:1},8,["onClick"])])]),_:1},8,["show"])])}const M=T(re,[["render",ue]]),f="all-in-one-seo-pack",ge={setup(){const{getSites:t,getUniqueSiteId:o}=j();return{optionsStore:H(),rootStore:z(),toolsStore:V(),getSites:t,getUniqueSiteId:o}},components:{CoreCard:N,CoreResetSettings:M,CoreSettingsRow:U,SvgCheckmark:ee},data(){return{site:null,selectedSite:null,clearedLogs:{redirectLogs:!1,logs404:!1},loadingLog:null,strings:{selectSite:s("Select Site",f),resetRestoreSettings:s("Reset / Restore Settings",f),logs:s("Logs",f),cleared:s("Cleared",f),logs404:s("404 Logs",f),clear404Logs:s("Clear 404 Logs",f),redirectLogs:s("Redirect Logs",f),clearRedirectLogs:s("Clear Redirect Logs",f),logsTooltip:s(`Log sizes may fluctuate and not always be 100% accurate since the results can be cached. Also after clearing a log, it may not show as "0" since database tables also include additional information such as indexes that we don't clear.`,f)}}},watch:{site(t){this.selectedSite=this.rootStore.aioseo.data.network.sites.sites.find(o=>this.getUniqueSiteId(o)===t.value)}},computed:{canReset(){const t=[];return Object.keys(this.options).forEach(o=>{t.push(this.options[o])}),!t.some(o=>o)},showLogs(){var t,o;return!this.rootStore.aioseo.data.isNetworkAdmin&&(((t=this.rootStore.aioseo.data.logSizes)==null?void 0:t.redirectLogs)||((o=this.rootStore.aioseo.data.logSizes)==null?void 0:o.logs404))},sites(){return this.getSites.filter(t=>!t.parentDomain).map(t=>({value:this.getUniqueSiteId(t),label:`${t.domain}${t.path}`}))}},methods:{getSizeClass(t){let o="green";return 262144e3<t?o="orange":1073741274<t&&(o="red"),o},processClearLog(t){this.loadingLog=t,this.toolsStore.clearLog(t).then(()=>{this.loadingLog=null,this.clearedLogs[t]=!0})},disabledLog(t){return!this.rootStore.aioseo.data.logSizes[t].original||this.clearedLogs[t]}}},me={class:"aioseo-tools-database-tools"},_e={key:0},pe={key:1},he={class:"log-size"},Se={key:0},be={key:1},fe={class:"log-size"};function ke(t,o,x,l,e,c){const w=i("base-select"),_=i("core-settings-row"),C=i("core-reset-settings"),v=i("core-card"),L=i("svg-checkmark"),R=i("base-button");return a(),k("div",me,[n(v,{slug:"databaseTools","header-text":e.strings.resetRestoreSettings},{default:r(()=>[l.rootStore.aioseo.data.isNetworkAdmin?(a(),S(_,{key:0,name:e.strings.selectSite},{content:r(()=>[n(w,{size:"medium",modelValue:e.site,"onUpdate:modelValue":o[0]||(o[0]=y=>e.site=y),options:c.sites},null,8,["modelValue","options"])]),_:1},8,["name"])):g("",!0),n(C,{site:e.selectedSite},null,8,["site"])]),_:1},8,["header-text"]),c.showLogs?(a(),S(v,{key:0,slug:"databaseToolsLogs","header-text":e.strings.logs},{tooltip:r(()=>[u(d(e.strings.logsTooltip),1)]),default:r(()=>[l.rootStore.aioseo.data.logSizes.logs404?(a(),S(_,{key:0,name:e.strings.logs404,align:""},{content:r(()=>[n(R,{class:"clear-log",type:"gray",size:"medium",loading:e.loadingLog==="logs404",disabled:c.disabledLog("logs404"),onClick:o[1]||(o[1]=y=>c.processClearLog("logs404"))},{default:r(()=>[c.disabledLog("logs404")?(a(),k("span",_e,[n(L),u(" "+d(e.strings.cleared),1)])):g("",!0),c.disabledLog("logs404")?g("",!0):(a(),k("span",pe,d(e.strings.clear404Logs),1))]),_:1},8,["loading","disabled"]),h("div",he,[h("span",{class:A(["size-dot",c.getSizeClass(l.rootStore.aioseo.data.logSizes.logs404.original)])},null,2),u(" "+d(l.rootStore.aioseo.data.logSizes.logs404.readable),1)])]),_:1},8,["name"])):g("",!0),l.rootStore.aioseo.data.logSizes.redirectLogs?(a(),S(_,{key:1,name:e.strings.redirectLogs,align:""},{content:r(()=>[n(R,{class:"clear-log",type:"gray",size:"medium",loading:e.loadingLog==="redirectLogs",disabled:c.disabledLog("redirectLogs"),onClick:o[2]||(o[2]=y=>c.processClearLog("redirectLogs"))},{default:r(()=>[c.disabledLog("redirectLogs")?(a(),k("span",Se,[n(L),u(" "+d(e.strings.cleared),1)])):g("",!0),c.disabledLog("redirectLogs")?g("",!0):(a(),k("span",be,d(e.strings.clearRedirectLogs),1))]),_:1},8,["loading","disabled"]),h("div",fe,[h("span",{class:A(["size-dot",c.getSizeClass(l.rootStore.aioseo.data.logSizes.redirectLogs.original)])},null,2),u(" "+d(l.rootStore.aioseo.data.logSizes.redirectLogs.readable),1)])]),_:1},8,["name"])):g("",!0)]),_:1},8,["header-text"])):g("",!0)])}const Le=T(ge,[["render",ke]]),m="all-in-one-seo-pack",we={setup(){return{rootStore:z()}},components:{RequiredPlans:se,CoreBlur:oe,CoreCard:N,CoreResetSettings:M,CoreSettingsRow:U,Cta:te},data(){return{links:q,strings:{selectSite:s("Select Site",m),resetRestoreSettings:s("Reset / Restore Settings",m),logs:s("Logs",m),cleared:s("Cleared",m),logs404:s("404 Logs",m),clear404Logs:s("Clear 404 Logs",m),redirectLogs:s("Redirect Logs",m),clearRedirectLogs:s("Clear Redirect Logs",m),logsTooltip:s(`Log sizes may fluctuate and not always be 100% accurate since the results can be cached. Also after clearing a log, it may not show as "0" since database tables also include additional information such as indexes that we don't clear.`,m),ctaHeader:B(s("Network Tools is a %1$s Feature",m),"PRO"),ctaButtonText:s("Unlock Network Tools",m),networkDatabaseToolsDescription:s("Unlock network-level tools to manage all your sites from one easy-to-use location. Migrate data or create backups without the need to visit each dashboard.",m)}}}},ye={class:"aioseo-tools-database-tools-lite"};function Ce(t,o,x,l,e,c){const w=i("base-select"),_=i("core-settings-row"),C=i("core-reset-settings"),v=i("core-blur"),L=i("required-plans"),R=i("cta"),y=i("core-card");return a(),k("div",ye,[n(y,{slug:"databaseTools","header-text":e.strings.resetRestoreSettings},{default:r(()=>[n(v,null,{default:r(()=>[n(_,{name:e.strings.selectSite},{content:r(()=>[n(w,{size:"medium",modelValue:{value:"",label:""},options:[]})]),_:1},8,["name"]),n(C)]),_:1}),n(R,{"cta-link":e.links.getPricingUrl("network-tools","database-tools"),"button-text":e.strings.ctaButtonText,"learn-more-link":e.links.getUpsellUrl("network-tools","database-tools",l.rootStore.isPro?"pricing":"liteUpgrade")},{"header-text":r(()=>[u(d(e.strings.ctaHeader),1)]),description:r(()=>[n(L,{"core-feature":["tools","network-tools-database"]}),u(" "+d(e.strings.networkDatabaseToolsDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1},8,["header-text"])])}const ve=T(we,[["render",Ce]]),Re={setup(){return{licenseStore:E(),rootStore:z()}},components:{DatabaseTools:Le,LiteDatabaseTools:ve},data(){return{license:P}}};function xe(t,o,x,l,e,c){const w=i("database-tools",!0),_=i("lite-database-tools");return a(),k("div",null,[!l.rootStore.aioseo.data.isNetworkAdmin||!l.licenseStore.isUnlicensed&&e.license.hasCoreFeature("tools","network-tools-database")?(a(),S(w,{key:0})):g("",!0),l.rootStore.aioseo.data.isNetworkAdmin&&(l.licenseStore.isUnlicensed||!e.license.hasCoreFeature("tools","network-tools-database"))?(a(),S(_,{key:1})):g("",!0)])}const to=T(Re,[["render",xe]]);export{to as default};