import{S as m}from"./LogoGear.49550bdb.js";import{x as f,o as d,c as _,a as c,C as $}from"./vue.runtime.esm-bundler.4a881941.js";import{_ as p}from"./_plugin-vue_export-helper.abeb2ae0.js";import{u as h}from"./links.125d59c9.js";import{g,r as u}from"./params.f0608262.js";const y={components:{SvgAioseoLogoGear:m},data(){return{strings:{boldText:this.$t.sprintf("<strong>%1$s %2$s</strong>","AIOSEO",this.$isPro?"Pro":""),linkText:this.$t.__("Click here to learn more",this.$td)}}},computed:{link(){return this.$t.sprintf('<strong><a href="%1$s" target="_blank" class="text-white">%2$s</a></strong>',this.$links.getDocUrl("restApi"),this.strings.linkText)},upgradeText(){return this.$t.sprintf(this.$t.__("%1$s relies on the WordPress Rest API and your site might have it disabled. %2$s.",this.$td),this.strings.boldText,this.link)}},mounted(){document.body.classList.add("aioseo-has-bar")},beforeUnmount(){document.body.classList.remove("aioseo-has-bar")}},v={class:"aioseo-api-bar"},x={class:"upgrade-text"},A=["innerHTML"];function T(t,s,e,r,n,o){const i=f("svg-aioseo-logo-gear");return d(),_("div",v,[c("div",x,[$(i),c("div",{innerHTML:o.upgradeText},null,8,A)])])}const B=p(y,[["render",T]]),b={};function S(t,s){return d(),_("div")}const w=p(b,[["render",S]]),E={setup(){return{rootStore:h()}},data(){return{running:!1}},watch:{"rootStore.navigate.scroll"(){this.running||(this.running=!0,this.scrollAndHighlight())},"rootStore.navigate.highlight"(){this.running||(this.running=!0,this.scrollAndHighlight())}},methods:{scrollAndHighlight(){var r,n;const t=h(),s=g()["aioseo-scroll"]||((r=history.state)==null?void 0:r.scroll)||t.navigate.scroll;s&&typeof s=="string"&&setTimeout(()=>{var o;this.$scrollTo(`#${s}`,{offset:-130,container:this.scrollContainer||"body"}),u("aioseo-scroll"),(o=history.state)==null||delete o.scroll,t.navigate.scroll=null,this.running=!1},this.scrollTimeout||500);const e=g()["aioseo-highlight"]||((n=history.state)==null?void 0:n.highlight)||t.navigate.highlight;if(e&&typeof e=="string"){const o=s?this.scrollAndHighlightTimeout||1500:this.highlightTimeout||500;setTimeout(()=>{var a;const i=document.querySelectorAll(`#${e.replace(/,/g,", #").replace(/%2C/ig,", #")}`);i.length&&i.forEach(l=>{l.classList.add("aioseo-row-highlight"),setTimeout(()=>{l.classList.remove("aioseo-row-highlight")},1500)}),u("aioseo-highlight"),(a=history.state)==null||delete a.highlight,t.navigate.highlight=null,this.running=!1},o)}}},mounted(){this.scrollAndHighlight()}};export{B as C,E as S,w as a};
