OwlCyberSecurity - MANAGER
Edit File: App.f301db0c.js
import{n as Ge,v as p,o as i,c as k,C as d,l,x as T,t as g,a as u,k as _,b as m,G as J,E as pe,K as jt,L as Wt,g as we,y as Co,M as $t,Y as Po,h as Eo,H as kt,u as S,F as Ce,J as Ke,m as Te,T as ze,f as ke,D as xo,q as Se}from"./runtime-dom.esm-bundler.5c3c7d72.js";/* empty css */import{d as Yt,e as Q,b as Ae,h as nt,l as Z,k as _e,u as ye,A as Ye,y as Zt,X as He,Z as Ze,_ as To,j as xe,G as Ao,p as Xt,E as Lo,i as Jt,I as Io,w as Ve,J as Qt,x as Xe,n as Mo}from"./index.7377ee90.js";import{a as Oo,C as Do,u as Bo}from"./LicenseKeyBar.6bd51ab4.js";import{a as Le}from"./allowed.783682a3.js";import{g as qe,r as ft}from"./params.af7ed354.js";import{C as ve,a as Je,S as vt,f as bt,c as Qe,e as Ro,b as Oe,d as it,h as Ho}from"./Caret.a21d4ca8.js";import{A as eo,B as to,t as oo,C as at,D as Uo,E as Ko,T as so,a as wt,j as lt,F as ro,i as Vo}from"./helpers.77f11e73.js";import{G as Ee,P as Fo,F as No,d as Go,S as zo,O as qo}from"./constants.a8a14dc3.js";import{C as Pe}from"./SettingsRow.ac18ea66.js";import{B as jo}from"./Checkbox.6db0b9ed.js";import{G as Wo,a as $o}from"./Row.df38a5f6.js";import"./translations.d159963e.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as n,s as D}from"./default-i18n.20001971.js";import{u as Yo}from"./Url.4b1a190e.js";import{C as Be}from"./Tabs.dfb0f423.js";import{C as Ie}from"./Index.65753742.js";import{u as Ct}from"./MaxCounts.7c38e980.js";import{e as De}from"./regex.8a6101c0.js";import{C as fe}from"./Tooltip.73441134.js";import{S as Pt}from"./Ellipse.e3ae0692.js";import{S as je}from"./Eye.8dc261a7.js";import{d as ct}from"./debounce.f7a8b998.js";import{V as Zo,j as Xo}from"./helpers.53868b98.js";import{t as Ot}from"./toFinite.b0a886e7.js";import{u as Et}from"./TruSeoScore.c2cb3af7.js";import{S as Jo}from"./Statistics.2cff8c0a.js";import{S as et,a as xt,h as dt,j as Qo,k as es,m as ts,n as os,o as ss,p as rs,q as ns,r as is,s as as,t as ls,u as cs,v as ds,w as us,x as ps,y as hs,z as gs,A as ms,C as _s,D as ys,E as fs,e as Ss,F as ks,G as vs}from"./index.b359096c.js";import{S as Tt}from"./Plus.426117bd.js";import{B as no}from"./RadioToggle.333e7750.js";import{C as bs}from"./GoogleSearchPreview.20f2aafb.js";import{C as At}from"./HtmlTagsEditor.ede971bf.js";import{T as ws}from"./Slide.39c07c03.js";import{C as Cs}from"./ProBadge.751e0b85.js";import{u as Ps,p as Dt}from"./popup.295e1402.js";import{D as Bt}from"./datetime.f197aeae.js";import{l as Ue}from"./license.bf6b339a.js";import{S as Es,a as xs}from"./Mobile.ada2591a.js";import{u as Ts,S as io}from"./Settings.574d9242.js";import{u as As}from"./vue3-apexcharts.57b6886c.js";import{u as Ls}from"./GoogleSearchConsole.7c2baff3.js";import{_ as Is}from"./ConnectCta.19af70d9.js";import{C as tt}from"./Blur.edde4939.js";import{C as Lt}from"./Index.a76253da.js";import{G as St}from"./Graph.2a1bc9e6.js";import{u as ao}from"./WpTable.fe7d7cc2.js";import{n as Ms}from"./numbers.9fc174f3.js";import{C as lo}from"./Table.6c816200.js";import{R as co}from"./RequiredPlans.7b1460e1.js";import{a as uo}from"./addons.e43aad76.js";import{u as Os}from"./PostTypes.dafa8837.js";import{S as po}from"./External.3b8c2917.js";import{S as Ds,a as Bs,b as Rs}from"./InternalOutbound.8d129cbf.js";import{u as ho}from"./Image.988a2406.js";import{t as go}from"./Editor.9cb3bfe8.js";import{C as Hs}from"./FacebookPreview.d2f6223e.js";import{C as mo}from"./ImageUploader.831f991b.js";import{C as Us}from"./TwitterPreview.287098f1.js";import{a as _o,S as Ks}from"./Build.b598c742.js";import{L as Vs}from"./Redirects.5370bf63.js";import{U as Fs,S as Ns}from"./Upsell.fa5d5a67.js";var Gs=Math.floor,zs=Math.random;function qs(o,e){return o+Gs(zs()*(e-o+1))}var js=parseFloat,Ws=Math.min,$s=Math.random;function Ys(o,e,r){if(r&&typeof r!="boolean"&&Zo(o,e,r)&&(e=r=void 0),r===void 0&&(typeof e=="boolean"?(r=e,e=void 0):typeof o=="boolean"&&(r=o,o=void 0)),o===void 0&&e===void 0?(o=0,e=1):(o=Ot(o),e===void 0?(e=o,o=0):e=Ot(e)),o>e){var t=o;o=e,e=t}if(r||o%1||e%1){var s=$s();return Ws(o+s*(e-o+js("1e-"+((s+"").length-1))),e)}return qs(o,e)}const ot=Yt("TruSeoHighlighterStore",{state:()=>{var o,e;return{allowScrolling:!1,allowHighlighting:!0,dispatchAnnotations:((e=(o=window==null?void 0:window.wp)==null?void 0:o.data)==null?void 0:e.dispatch("core/annotations"))||null,enabled:!0,highlightAnalyzer:null,highlightMarks:[],highlightPopover:{},source:"aioseo-tru-seo-highlighter",wpBodyContentObserver:null}},getters:{highlightAnalysis(){var t,s;const e=((s=(t=Q().currentPost)==null?void 0:t.page_analysis)==null?void 0:s.analysis)||{};return(Object.values(e).flat().find(a=>!!a[this.highlightAnalyzer])||{})[this.highlightAnalyzer]||{}},highlightAnalyzerHasError(){var o;return!!((o=this.highlightAnalysis)!=null&&o.error)},highlightSentences(){var e;let o=[];return Array.isArray((e=this.highlightAnalysis)==null?void 0:e.highlightSentences)&&(o=this.highlightAnalysis.highlightSentences.flat().map(r=>(r=r.replace(/&[a-zA-Z0-9#]{2,};$/,""),r=r.replace(/<br[^>]*>/gi,` `),r=eo(r),to(r))).filter(r=>!!r.trim())),o.length?o:null},activeMark(){return this.highlightMarks.length?this.highlightMarks.find(o=>o.active&&o.node):null}},actions:{clearHighlightPopover(){var o,e,r;(o=this.highlightPopover)!=null&&o.observer&&this.highlightPopover.observer.disconnect(),(e=this.highlightPopover)!=null&&e.node&&this.highlightPopover.node.remove(),(r=this.highlightPopover)!=null&&r.app&&this.highlightPopover.app.unmount(),this.highlightPopover={}},clearAnnotations(){var o,e;if(typeof((o=this.dispatchAnnotations)==null?void 0:o.__experimentalRemoveAnnotationsBySource)=="function"&&this.dispatchAnnotations.__experimentalRemoveAnnotationsBySource(this.source),typeof((e=window==null?void 0:window.tinymce)==null?void 0:e.editors)=="object")for(const r of window.tinymce.editors){const t=r.selection.win.getSelection(),s=Object.values(r.annotator.getAll(this.source)).flat();for(const a of Object.values(s))r.undoManager.ignore(()=>{t.selectAllChildren(a),t.setPosition(a,0),r.annotator.remove(this.source)})}this.highlightMarks=[]},clearAll(){this.clearHighlightPopover(),this.clearAnnotations()},sanitizeHighlightMarks(){this.highlightMarks=this.highlightMarks.filter(o=>!!o.node),this.highlightMarks.length&&!this.highlightMarks.find(o=>!!o.active)&&(this.highlightMarks[0].active=!0)},toggleHighlightAnalyzer(o){if(this.allowScrolling=!0,this.highlightAnalyzer===o)return this.highlightAnalyzer=null,!1;this.highlightAnalyzer=null,Ge().then(()=>{this.highlightAnalyzer=o})}}}),Rt="all-in-one-seo-pack",Zs=Yt("SemrushStore",{state:()=>({results:[],error:null}),getters:{expired:()=>{const o=Ae();if(!o.internalOptions.integrations.semrush.expires)return!0;const e=Bt.now(),r=Bt.fromMillis(parseInt(o.internalOptions.integrations.semrush.expires*1e3,10));return e>=r},hasValidTokens:o=>{const e=Ae();return!o.expired&&!!e.internalOptions.integrations.semrush.accessToken&&!!e.internalOptions.integrations.semrush.refreshToken}},actions:{getKeyphrases(o){this.error=null;const e=Q();return nt.post(Z.restUrl("integration/semrush/keyphrases")).send({keyphrase:e.currentPost.keyphrases.focus.keyphrase,database:o}).then(r=>{if(r.body.keyphrases.status===403){this.error=r.body.keyphrases.error;return}this.results=r.body.keyphrases.data.rows}).catch(r=>{var t,s,a,h,c,y;if(this.results=[],!((s=(t=r==null?void 0:r.response)==null?void 0:t.body)!=null&&s.message)&&!((a=r==null?void 0:r.response)!=null&&a.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=((c=(h=r==null?void 0:r.response)==null?void 0:h.body)==null?void 0:c.message)||((y=r==null?void 0:r.response)==null?void 0:y.message)})},authenticate(o){return this.error=null,nt.post(Z.restUrl("integration/semrush/authenticate")).send({code:o}).then(e=>{const r=Ae();r.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:e.body.semrush},{root:!0}),r.internalOptions.integrations.semrush=e.body.semrush}).catch(e=>{var r,t;if(!((t=(r=e==null?void 0:e.response)==null?void 0:r.body)!=null&&t.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=e.response.body.message})},refresh(){return nt.post(Z.restUrl("integration/semrush/refresh")).then(o=>{const e=Ae();e.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:o.body.semrush},{root:!0}),e.internalOptions.integrations.semrush=o.body.semrush})}}}),ue="all-in-one-seo-pack",Xs={setup(){return{postEditorStore:Q()}},components:{BaseCheckbox:jo,GridColumn:Wo,GridRow:$o},data(){return{strings:{useDefaultSettings:n("Use Default Settings",ue),robotsMeta:n("Robots meta:",ue),maxSnippet:n("Max Snippet",ue),maxVideoPreview:n("Max Video Preview",ue),maxImagePreview:n("Max Image Preview",ue),standard:n("Standard",ue),none:n("None",ue),large:n("Large",ue),noindex:n("No Index",ue),nofollow:n("No Follow",ue),noarchive:n("No Archive",ue),notranslate:n("No Translate",ue),noimageindex:n("No Image Index",ue),nosnippet:n("No Snippet",ue),noodp:n("No ODP",ue)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(o){return this.imagePreviewOptions.find(e=>e.value===o)},saveImagePreview(o){this.postEditorStore.currentPost.maxImagePreview=o,this.postEditorStore.isDirty=!0}}},Js={class:"aioseo-robots-meta"},Qs={key:0,class:"global-robots-settings aioseo-description"},er={class:"robots-meta-title"},tr={class:"global-robots-settings-options"},or={key:0,class:"aioseo-description max-snippet"},sr={class:"aioseo-description max-video-preview"},rr={key:1,class:"aioseo-description max-image-preview"};function nr(o,e,r,t,s,a){const h=p("base-toggle"),c=p("base-checkbox"),y=p("grid-column"),v=p("grid-row"),P=p("base-input"),x=p("base-select");return i(),k("div",Js,[d(h,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=C=>t.postEditorStore.currentPost.default=C),e[1]||(e[1]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?m("",!0):(i(),k("div",Qs,[u("span",er,g(s.strings.robotsMeta),1),d(v,{class:"settings"},{default:l(()=>[t.postEditorStore.currentPost.isHomePage?m("",!0):(i(),_(y,{key:0,xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=C=>t.postEditorStore.currentPost.noindex=C),e[3]||(e[3]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=C=>t.postEditorStore.currentPost.nofollow=C),e[5]||(e[5]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=C=>t.postEditorStore.currentPost.noarchive=C),e[7]||(e[7]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=C=>t.postEditorStore.currentPost.notranslate=C),e[9]||(e[9]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=C=>t.postEditorStore.currentPost.noimageindex=C),e[11]||(e[11]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=C=>t.postEditorStore.currentPost.nosnippet=C),e[13]||(e[13]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=C=>t.postEditorStore.currentPost.noodp=C),e[15]||(e[15]=C=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(g(s.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",tr,[t.postEditorStore.currentPost.nosnippet?m("",!0):(i(),k("div",or,[u("span",null,g(s.strings.maxSnippet),1),d(P,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=C=>t.postEditorStore.currentPost.maxSnippet=C),e[17]||(e[17]=C=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",sr,[u("span",null,g(s.strings.maxVideoPreview),1),d(P,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=C=>t.postEditorStore.currentPost.maxVideoPreview=C),e[19]||(e[19]=C=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?m("",!0):(i(),k("div",rr,[u("span",null,g(s.strings.maxImagePreview),1),d(x,{size:"medium",options:a.imagePreviewOptions,modelValue:a.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=C=>a.saveImagePreview(C.value))},null,8,["options","modelValue"])]))])]))])}const ir=M(Xs,[["render",nr]]),he="all-in-one-seo-pack",ar={setup(){const{decodeUrl:o}=Yo();return{licenseStore:_e(),optionsStore:Ae(),postEditorStore:Q(),rootStore:ye(),decodeUrl:o}},components:{CoreAlert:ve,CoreSettingsRow:Pe,CoreSingleRobotsMeta:ir},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:n("Advanced",he),robotsSetting:n("Robots Setting",he),robotsToggle:n("Use Default Settings",he),canonicalUrl:n("Canonical URL",he),validUrl:n("Please enter a valid URL.",he),placeholder:n("Enter a URL to change the default Canonical URL",he),priorityScore:n("Priority Score",he),priority:n("Priority",he),frequency:n("Frequency",he),priorityFrequencyUpsell:D(n("Priority Score is a %1$s feature. %2$s",he),"PRO",Z.getUpsellLink("post-advanced",Ee.learnMore,"priority-frequency",!0)),keywords:n("Keywords",he),tagPlaceholder:n("Press enter to create a keyword",he)},error:!1}},computed:{getPriorityOptions(){return[{label:n("default",he),value:"default"}].concat(Fo)},getFrequencyOptions(){return[{label:n("default",he),value:"default"}].concat(No)}},methods:{getPriority(o){return o=o!=="default"?parseFloat(o):o,this.getPriorityOptions.find(e=>e.value===o)},savePriority(o){this.postEditorStore.currentPost.priority=o,this.postEditorStore.isDirty=!0},getFrequency(o){return this.getFrequencyOptions.find(e=>e.value===o)},saveFrequency(o){this.postEditorStore.currentPost.frequency=o,this.postEditorStore.isDirty=!0},inputEventDecodeUrl(o){const e=o.target.value;this.postEditorStore.currentPost.canonicalUrl="",this.postEditorStore.currentPost.canonicalUrl=this.decodeUrl(e)}}},lr={class:"aioseo-tab-content aioseo-post-advanced"},cr={class:"selectbox-row"},dr={class:"select"},ur=u("div",{class:"separator"},[u("span"),T(" - ")],-1),pr={class:"select"},hr=["innerHTML"];function gr(o,e,r,t,s,a){const h=p("core-single-robots-meta"),c=p("core-settings-row"),y=p("base-input"),v=p("core-alert"),P=p("base-select");return i(),k("div",lr,[d(c,{id:"aioseo-post-robots-setting",name:s.strings.robotsSetting,align:""},{content:l(()=>[d(h)]),_:1},8,["name"]),d(c,{id:"aioseo-post-canonical-url",name:s.strings.canonicalUrl,align:""},{content:l(()=>[d(y,{ref:"canonicalUrlInput",type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=x=>t.postEditorStore.currentPost.canonicalUrl=x),e[1]||(e[1]=x=>t.postEditorStore.isDirty=!0)],onInput:a.inputEventDecodeUrl},null,8,["placeholder","modelValue","onInput"]),s.error?(i(),_(v,{key:0,class:"cannonical-url-error",type:"red",size:"small"},{default:l(()=>[T(g(s.strings.validUrl),1)]),_:1})):m("",!0)]),_:1},8,["name"]),d(c,{name:s.strings.priorityScore,align:""},{content:l(()=>[u("div",cr,[u("div",dr,[u("span",null,g(s.strings.priority),1),d(P,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getPriorityOptions,modelValue:t.licenseStore.isUnlicensed?a.getPriority("default"):a.getPriority(t.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=x=>t.licenseStore.isUnlicensed?null:a.savePriority(x.value))},null,8,["disabled","options","modelValue"])]),ur,u("div",pr,[u("span",null,g(s.strings.frequency),1),d(P,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getFrequencyOptions,modelValue:t.licenseStore.isUnlicensed?a.getFrequency("default"):a.getFrequency(t.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=x=>t.licenseStore.isUnlicensed?null:a.saveFrequency(x.value))},null,8,["disabled","options","modelValue"])])]),t.licenseStore.isUnlicensed?(i(),_(v,{key:0,class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.priorityFrequencyUpsell},null,8,hr)]),_:1})):m("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(i(),_(c,{key:0,name:s.strings.keywords,align:""},{content:l(()=>[d(P,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.keywords||[],modelValue:t.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=x=>t.postEditorStore.currentPost.keywords=x),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])}const mr=M(ar,[["render",gr]]),_r={setup(){return{licenseStore:_e(),rootStore:ye()}},components:{CoreApiBar:Oo,CoreLicenseKeyBar:Do}};function yr(o,e,r,t,s,a){const h=p("core-api-bar"),c=p("core-license-key-bar");return i(),k("div",null,[t.rootStore.pong?m("",!0):(i(),_(h,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(i(),_(c,{key:1})):m("",!0)])}const yo=M(_r,[["render",yr]]),fr={emits:["next","previous"],setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgCaret:Je,SvgClose:vt,SvgEllipse:Pt,SvgEye:je},computed:{total(){return this.truSeoHighlighterStore.highlightMarks.length},error(){return this.truSeoHighlighterStore.highlightAnalyzerHasError},order(){return this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1},showSentence(){var o;return((o=this.truSeoHighlighterStore.activeMark)==null?void 0:o.sentence.length)&&this.truSeoHighlighterStore.activeMark.annotatorSelector==="block"},sentences(){const o=[];let e=1;return this.truSeoHighlighterStore.highlightMarks.forEach(r=>{r.node.isSameNode(this.truSeoHighlighterStore.activeMark.node)&&(o.push(`<strong>(${e})</strong> ${r.sentence}`),e++)}),oo(o.join(" "),1e3," [...]")}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},Sr=o=>(jt("data-v-aa3e0f58"),o=o(),Wt(),o),kr={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},vr={key:0,class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--sentence"},br={class:"tru-seo-highlight-popover__sentence"},wr=["innerHTML"],Cr={class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--main"},Pr={class:"tru-seo-highlight-popover__count"},Er=Sr(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),xr={class:"tru-seo-highlight-popover__nav"},Tr=["disabled"],Ar=["disabled"],Lr={class:"tru-seo-highlight-popover__close"};function Ir(o,e,r,t,s,a){const h=p("svg-eye"),c=p("core-tooltip"),y=p("svg-ellipse"),v=p("svg-caret"),P=p("svg-close");return i(),k("div",kr,[a.showSentence?(i(),k("div",vr,[u("div",br,[d(c,{offset:"120px,0"},{tooltip:l(()=>[u("span",{innerHTML:a.sentences},null,8,wr)]),default:l(()=>[d(h,{width:"16",height:"16"})]),_:1})])])):m("",!0),u("div",Cr,[u("div",{class:J(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":a.error}])},[d(y,{width:"8"})],2),u("div",Pr,[u("span",null,g(a.order)+"/"+g(a.total),1)]),Er,u("div",xr,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:a.order===1,onClick:e[0]||(e[0]=pe(x=>o.$emit("previous"),["stop","exact"]))},[d(v,{width:"20"})],8,Tr),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:a.order===a.total,onClick:e[1]||(e[1]=pe(x=>o.$emit("next"),["stop","exact"]))},[d(v,{width:"20"})],8,Ar)]),u("div",Lr,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=pe((...x)=>a.close&&a.close(...x),["stop","exact"]))},[d(P,{width:"10"})],32)])])])}const Mr=M(fr,[["render",Ir],["__scopeId","data-v-aa3e0f58"]]),Or=()=>{var O,H,te,U;const o=we(null),e=we({}),r=Ye(),t=Zt(),s=(H=(O=window==null?void 0:window.wp)==null?void 0:O.data)==null?void 0:H.select("core/block-editor"),a=(U=(te=window==null?void 0:window.wp)==null?void 0:te.data)==null?void 0:U.select("core/edit-post"),h=we(null),c=ot(),y=async(f,w="range")=>{var I,V,R,N,j,Y;let E="content";(V=(I=f.block)==null?void 0:I.attributes)!=null&&V.caption?E="caption":(N=(R=f.block)==null?void 0:R.attributes)!=null&&N.value?E="value":(Y=(j=f.block)==null?void 0:j.attributes)!=null&&Y.citation&&(E="citation"),f.annotatorSelector=w;const L=w==="block"?{selector:w,source:c.source,blockClientId:f.block.clientId}:{selector:w,id:f.id,range:f.range,source:c.source,blockClientId:f.block.clientId,richTextIdentifier:E};return c.dispatchAnnotations.__experimentalAddAnnotation(L)},v=(f,w)=>{if(!w)return!1;!w.hasFocus()&&r&&w.focus();let E=w.selection.win.getSelection();E.selectAllChildren(f.parent);const L=E.toString().length;if(f.range.end<L)for(let I=f.range.end;I<L;I++)E.modify("extend","backward","character");if(0<f.range.start){E=Uo(E);for(let I=f.range.start;0<I;I--)E.modify("extend","forward","character")}w.undoManager.ignore(()=>{w.annotator.annotate(c.source,{uid:f.id})}),E.empty()},P=()=>{if(c.clearHighlightPopover(),c.sanitizeHighlightMarks(),!c.activeMark)return!1;const f=Po({name:"TruSeoHighlightPopover",render(){return Eo(Mr,{onNext(){K(1)},onPrevious(){K(-1)}})}}),w=Ko(),E=new ResizeObserver(ct(ne,750)),L=b("wrapper");if(!L)return!1;L.parentElement.appendChild(w),f.mount(w),E.observe(b("wrapper"),{box:"border-box"}),c.highlightPopover.app=f,c.highlightPopover.node=w,c.highlightPopover.observer=E,ne()},x=()=>{c.toggleHighlightAnalyzer(null),c.allowHighlighting=!1},C=({block:f,node:w})=>{var E,L,I,V;try{let R="";return w?R=w.outerText.replace(/\n\n/g,` `):f&&(R=((E=f==null?void 0:f.attributes)==null?void 0:E.content)||((L=f==null?void 0:f.attributes)==null?void 0:L.caption)||((I=f==null?void 0:f.attributes)==null?void 0:I.value)||((V=f==null?void 0:f.attributes)==null?void 0:V.citation)||"",f.name==="core/table"&&(R=(f==null?void 0:f.originalContent)||""),R=R.replace(/<br[^>]*>/gi,` `),R=to(R)),eo(R)}catch{return""}},b=f=>{var w;if(f==="closest-relative")return at({element:b("wrapper").parentElement,property:"position",value:"relative"});if(f==="navigable")return at({element:b("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(f==="wrapper")return document.getElementById("content_ifr");if(f==="first-block")return((w=h.value.getBody())==null?void 0:w.firstElementChild)||{}}if(r){if(f==="wrapper")return document.querySelector(".editor-styles-wrapper");if(f==="first-block"){const E=s.getBlocks()[0];return document.getElementById(`block-${E==null?void 0:E.clientId}`)||{}}}},A=()=>{var f;for(const w of s.getBlocks()||[]){if(w.name==="core/freeform"){const E=window.tinymce.get(`editor-${w.clientId}`),L=((f=E.getBody())==null?void 0:f.children)||[];if(!L.length)continue;le(E);for(const I of L)ee({block:w,node:I});continue}ee({block:w,node:null})}c.highlightMarks.forEach(async(w,E)=>{const L=E===c.highlightMarks.length-1;B(w.parent,L),w.block.name==="core/freeform"?v(w,window.tinymce.get(`editor-${w.block.clientId}`)):(await y(w),L&&setTimeout(()=>{var I;(I=c.highlightMarks.at(-1))==null||I.parent.classList.add("is-hovered")},100))})},z=()=>{var w;const f=((w=h.value.getBody())==null?void 0:w.children)||[];if(!f.length)return!1;le(h.value);for(const E of f)ee({block:null,node:E});c.highlightMarks.forEach((E,L)=>{B(E.parent,L===c.highlightMarks.length-1),v(E,h.value)})},K=f=>{const w=c.highlightMarks.findIndex(E=>E.active);if(!c.highlightMarks[w+f])return!1;c.allowScrolling=!0,c.highlightMarks[w].active=!1,c.highlightMarks[w+f].active=!0,P()},se=f=>{var V,R;const w=()=>{f.preventDefault(),f.clipboardData.setData("text/html",window.getSelection().toString())},E=window.getSelection()||{};if(!(E!=null&&E.rangeCount))return!1;const L=((V=f.clipboardData)==null?void 0:V.getData("text/html"))||"";if(L&&L.indexOf(c.source)!==-1)return w(),!1;const I=E.getRangeAt(0)||{};for(const N of Object.values(((R=I==null?void 0:I.cloneContents())==null?void 0:R.children)||[]))if(Object.values((N==null?void 0:N.classList)||[]).some(j=>j.endsWith(c.source)))return w(),!1},ae=f=>{var V,R;const w=(N,j)=>{N.collapse(j.firstChild,j.firstChild.length),N.deleteFromDocument()};if(["Delete","Backspace"].indexOf(f.key)===-1)return!1;const E=window.getSelection()||null;if(!(E!=null&&E.toString()))return!1;const L=((V=E==null?void 0:E.anchorNode)==null?void 0:V.parentElement)||null,I=((R=E==null?void 0:E.anchorNode)==null?void 0:R.nextElementSibling)||null;Object.values((L==null?void 0:L.classList)||[]).some(N=>N.endsWith(c.source))?w(E,L):Object.values((I==null?void 0:I.classList)||[]).some(N=>N.endsWith(c.source))&&w(E,I)},re=()=>{var w;o.value=new MutationObserver(E=>{let L=!1;for(const I of E)for(const V of(I==null?void 0:I.removedNodes)||[])(c.highlightMarks.some(R=>V.isEqualNode(R.parent))||Object.values((V==null?void 0:V.classList)||[]).some(R=>R.endsWith(c.source)))&&(L=!0);L&&de()});const f=(w=b("first-block"))==null?void 0:w.parentElement;if(typeof f!="object")return!1;o.value.observe(f,{attributes:!1,childList:!0,subtree:!0})},B=(f,w=!1)=>{const E=(I,V)=>{var R,N;V.disconnect();for(const j of I){if((R=j==null?void 0:j.target)!=null&&R.classList.contains("is-hovered"))break;if(Object.values(((N=j==null?void 0:j.target)==null?void 0:N.classList)||[]).some(Y=>Y.endsWith(c.source))){G(j.target);continue}for(const Y of(j==null?void 0:j.addedNodes)||[])if(Object.values((Y==null?void 0:Y.classList)||[]).some(rt=>rt.endsWith(c.source))){G(Y);break}}w&&c.highlightMarks.forEach(async(j,Y)=>{j.node||(B(j.parent),await y(j,"block")),Y===c.highlightMarks.length-1&&(await Ge(),ct(P,250)())})};if(typeof(f==null?void 0:f.parentElement)!="object")return!1;new MutationObserver(E).observe(f,{attributes:!0,childList:!0,subtree:!0})},W=()=>{const f=w=>{var E,L,I;for(const V of w){if((V==null?void 0:V.type)!=="attributes")continue;if(!at({element:(E=b("wrapper"))==null?void 0:E.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||r&&(a.getEditorMode()!=="visual"||s.getBlockMode((L=s.getSelectedBlock())==null?void 0:L.clientId)==="html")||t&&($(),((I=document.getElementById("content"))==null?void 0:I.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return x(),!1;c.allowHighlighting=!0}};c.wpBodyContentObserver=new MutationObserver(ct(f,250)),c.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},le=f=>{f.annotator.register(c.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${c.source}`]})})},ne=(f=[])=>{var Y;if(!c.activeMark||!c.highlightPopover.node)return!1;for(const rt of f)if(JSON.stringify(rt.contentRect)===JSON.stringify(e))return!1;f.length&&(e.value=((Y=f[0])==null?void 0:Y.contentRect)||e,c.allowScrolling=!1);const w=c.activeMark.node.getBoundingClientRect(),E=b("wrapper").getBoundingClientRect(),L=b("closest-relative").getBoundingClientRect(),I=b("first-block").getBoundingClientRect(),[V,R]=[140,32];let N=w.top,j=I.left-L.left;V<j?(c.highlightPopover.node.style.top=N-L.top+"px",c.highlightPopover.node.style.transform="translate(-105%, 0)",c.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(N=N-R-L.top,N=t?N+E.top:N,j=t?j+E.left:j,c.highlightPopover.node.style.top=N+"px",c.highlightPopover.node.style.transform="translate(0, 0)",c.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),c.highlightPopover.node.style.left=j+"px",q()},de=()=>{var f;window.removeEventListener("copy",se),window.removeEventListener("keyup",ae),(f=o.value)==null||f.disconnect(),c.clearAll(),Ge().then(()=>{if(!c.highlightSentences)return c.toggleHighlightAnalyzer(null),!1;r&&A(),t&&z(),re(),window.addEventListener("copy",se),window.addEventListener("keyup",ae)})},q=()=>{Ge().then(()=>{var E,L,I,V;if(!c.allowScrolling)return!1;c.activeMark.node.scrollIntoView();let f=b("navigable"),w=f.scrollTop-60;t&&(w-=((L=(E=document.querySelector("#wp-content-editor-tools"))==null?void 0:E.getBoundingClientRect())==null?void 0:L.height)||0,w-=((V=(I=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:I.getBoundingClientRect())==null?void 0:V.height)||0),f.isEqualNode(document.documentElement)&&(f=window),f.scrollTo({top:w}),c.allowScrolling=!1})},G=f=>{const w=[];c.highlightMarks.forEach((E,L)=>{if(f.hasAttribute("data-mce-annotation-uid")&&f.dataset.mceAnnotationUid.indexOf(E.id)!==-1){w.push(L);return}if(f.classList.contains(`is-annotated-by-${c.source}`)&&E.block.clientId===f.dataset.block){w.push(L);return}f.id.indexOf(E.id)!==-1&&w.push(L)}),w.length&&w.forEach(E=>{c.highlightMarks[E].node=f})},ee=({block:f,node:w})=>{const E=C({block:f,node:w});if(E)for(const[L,I]of Object.entries(c.highlightSentences||{})){const V=new RegExp(De(I),"g");let R;for(;(R=V.exec(E))!==null&&!c.highlightMarks.find(Y=>Y.sentenceIndex===L);){const N={start:R.index,end:R.index+R[0].length||1};c.highlightMarks.find(Y=>w?(Y.range.start===N.start||Y.range.end===N.end)&&Y.parent.isSameNode(w):(Y.range.start===N.start||Y.range.end===N.end)&&Y.block.clientId===f.clientId)||c.highlightMarks.push({id:Ys(1,999999999),range:N,block:f,parent:w||document.getElementById(`block-${f.clientId}`),active:c.highlightMarks.length===0,sentenceIndex:L,sentence:I,node:null,annotatorSelector:null})}}if(f)for(const L of(f==null?void 0:f.innerBlocks)||[])ee({block:L,node:null})},$=()=>{if(h.value)return!1;const f=window.setInterval(()=>{var w;if(h.value=((w=window==null?void 0:window.tinymce)==null?void 0:w.get("content"))||null,!h.value)return!1;window.clearInterval(f),h.value.dom.addStyle(` span.annotation-text.annotation-text-${c.source} { background-color: #CCE0FF; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},F=(f,w)=>{const E=JSON.stringify(f),L=JSON.stringify(w);E!==L&&de()};return Co(()=>{var w;c.wpBodyContentObserver&&((w=c.wpBodyContentObserver)==null||w.disconnect());const f=window.setInterval(()=>{typeof b("wrapper")=="object"&&(window.clearInterval(f),W())},1e3)}),$t(()=>{(He()||!r&&!t)&&(c.enabled=!1),r&&(!c.dispatchAnnotations||!s||!a)&&(c.enabled=!1)}),{watchHighlightSentences:F}},Dr="all-in-one-seo-pack",Br={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Ze()}},components:{CoreTooltip:fe,SvgPencil:bt,SvgStatistics:Jo,SvgTrash:et},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:n("Delete",Dr)}}},computed:{scoreClass(){return 79<this.score?"score-green":49<this.score?"score-orange":0<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(o){this.edit=!0,this.$emit("selectedKeyphrase",o)},deleteKeyphraseEv(o){this.edit=!1,this.$emit("deleted",o)},toggleKeyphrasesPanel(o){this.$emit("selectedKeyphrase",o)},closeEdit(o){var t;const e=(t=o.target)==null?void 0:t.value.trim(),r=this.index;e?(this.edit=!1,this.$emit("saved",{index:r,value:e})):this.deleteKeyphraseEv(r)},pressEnter(o){o.preventDefault(),o.target.blur(),this.edit=!1}}},Rr={class:"aioseo-keyphrase-tag"},Hr={key:0,class:"aioseo-edit-keyphrase-tag"},Ur=["value"];function Kr(o,e,r,t,s,a){const h=p("svg-pencil"),c=p("svg-statistics"),y=p("svg-trash"),v=p("core-tooltip");return i(),k("div",Rr,[u("span",{class:J(["aioseo-add-keyphrase-tag",s.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=P=>a.toggleKeyphrasesPanel(r.index))},g(r.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=P=>a.editKeyphraseEv(r.index))},[d(h)]),u("a",{href:"#",onClick:e[2]||(e[2]=pe(P=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:!0}),["prevent","exact"])),class:"btn-keyword-rank-tracker"},[d(c,{width:"20"})]),u("span",{class:J(["keyphrase-score",a.scoreClass]),onClick:e[3]||(e[3]=P=>a.toggleKeyphrasesPanel(r.index))},g(r.score)+"/100",3)],2),s.edit?(i(),k("span",Hr,[u("input",{value:r.keyphrase,onBlur:e[4]||(e[4]=(...P)=>a.closeEdit&&a.closeEdit(...P)),onKeydown:e[5]||(e[5]=kt((...P)=>a.pressEnter&&a.pressEnter(...P),["enter"]))},null,40,Ur),u("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=P=>a.deleteKeyphraseEv(r.index))},[d(v,{type:"action"},{tooltip:l(()=>[T(g(s.strings.delete),1)]),default:l(()=>[d(y)]),_:1})])])):m("",!0)])}const fo=M(Br,[["render",Kr]]),Vr={},Fr={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Nr=u("path",{d:"M8.0018 8.57162C8.78938 8.57162 9.45817 8.29596 10.0082 7.74465C10.5582 7.19335 10.8332 6.5239 10.8332 5.73632C10.8332 4.94874 10.5575 4.27995 10.0062 3.72995C9.4549 3.17995 8.78546 2.90495 7.99787 2.90495C7.21029 2.90495 6.5415 3.1806 5.9915 3.73191C5.4415 4.28322 5.1665 4.95266 5.1665 5.74025C5.1665 6.52783 5.44216 7.19661 5.99347 7.74661C6.54477 8.29662 7.21422 8.57162 8.0018 8.57162ZM7.99592 7.60495C7.47631 7.60495 7.03595 7.42309 6.67484 7.05937C6.31373 6.69563 6.13317 6.25396 6.13317 5.73436C6.13317 5.21475 6.31503 4.77439 6.67875 4.41328C7.04249 4.05217 7.48415 3.87161 8.00375 3.87161C8.52337 3.87161 8.96373 4.05348 9.32484 4.4172C9.68595 4.78093 9.8665 5.2226 9.8665 5.7422C9.8665 6.26181 9.68464 6.70217 9.32092 7.06328C8.95719 7.42439 8.51552 7.60495 7.99592 7.60495ZM7.99984 10.7383C6.37762 10.7383 4.91095 10.2772 3.59984 9.35495C2.28873 8.43273 1.31095 7.22717 0.666504 5.73828C1.31095 4.24939 2.28873 3.04384 3.59984 2.12161C4.91095 1.19939 6.37762 0.738281 7.99984 0.738281C9.62206 0.738281 11.0887 1.19939 12.3998 2.12161C13.7109 3.04384 14.6887 4.24939 15.3332 5.73828C14.6887 7.22717 13.7109 8.43273 12.3998 9.35495C11.0887 10.2772 9.62206 10.7383 7.99984 10.7383Z",fill:"currentColor"},null,-1),Gr=[Nr];function zr(o,e){return i(),k("svg",Fr,Gr)}const qr=M(Vr,[["render",zr]]),Ht="all-in-one-seo-pack",jr={setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgEye:je,SvgEyeFilled:qr},props:{analyzer:String},data(){return{strings:{highlightSections:n("Highlight sections in the Editor",Ht),highlightingIsDisabled:n("Highlighting is disabled for current view",Ht)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Wr=["disabled"];function $r(o,e,r,t,s,a){const h=p("svg-eye"),c=p("core-tooltip"),y=p("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(i(),k("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=pe(v=>a.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==r.analyzer?(i(),_(c,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:l(()=>[T(g(t.truSeoHighlighterStore.allowHighlighting?s.strings.highlightSections:s.strings.highlightingIsDisabled),1)]),default:l(()=>[d(h,{width:"16",height:"16"})]),_:1},8,["offset"])):(i(),_(y,{key:1,width:"16",height:"16"}))],8,Wr)):m("",!0)}const Yr=M(jr,[["render",$r]]),Zr={class:"aioseo-analysis-detail"},Xr={key:0,class:"detail detail--pl-0"},Jr={key:0,class:"detail"},Qr={class:"title__text"},en={class:"description"},st={__name:"MetaboxAnalysisDetail",props:{analysisItems:{type:Object}},setup(o){const r={switchToVisualEditor:n("TruSEO cannot analyze the post while you are using the Code Editor. Please switch back to the Visual Editor to view your results.","all-in-one-seo-pack")},t=s=>{s.target.parentElement.classList.toggle("toggled")};return(s,a)=>(i(),k("ul",Zr,[S(To)()?(i(),k("li",Xr,[d(S(ve),{type:"yellow"},{default:l(()=>[T(g(r.switchToVisualEditor),1)]),_:1})])):(i(!0),k(Ce,{key:1},Ke(o.analysisItems,(h,c)=>{var y;return i(),k(Ce,{key:c},[h.title?(i(),k("li",Jr,[u("p",{class:J(["title",h.error===0?"toggled":""])},[h.error===0?(i(),_(S(Qe),{key:0,width:"16"})):m("",!0),h.error===1?(i(),_(S(Ro),{key:1,width:"16"})):m("",!0),u("span",Qr,g(h.title),1),(y=h==null?void 0:h.highlightSentences)!=null&&y.length?(i(),_(S(Yr),{key:2,analyzer:c},null,8,["analyzer"])):m("",!0),d(S(Je),{width:"16",role:"button",onClick:pe(t,["stop"])})],2),u("p",en,g(h.description),1)])):m("",!0)],64)}),128))]))}},Fe="all-in-one-seo-pack",tn={setup(){return{licenseStore:_e(),postEditorStore:Q(),rootStore:ye(),truSeo:new so}},components:{CoreAlert:ve,CoreKeyphrase:fo,CoreLoader:Oe,CoreTooltip:fe,SvgCirclePlus:Tt,metaboxAnalysisDetail:st},data(){return{selectedKeyphrase:0,strings:{additional:n("Additional Keyphrases",Fe),addKeyphrase:n("Add Additional Keyphrases",Fe),keyphraseDocumentation:n("Improve your SEO rankings with additional keyphrases.",Fe),upsell:D(n("Additional Keyphrases are a %1$s feature. %2$s",Fe),"PRO",Z.getUpsellLink("post-settings",Ee.learnMore,"additional-keywords",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",Fe),this.postEditorStore.currentPost.maxAdditionalKeyphrases)}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(o){this.selectedKeyphrase=o},onSaved(o){const{index:e,value:r}=o;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=r,this.postEditorStore.currentPost.keyphrases.additional[e].score=0,this.postEditorStore.currentPost.loading.additional[e]=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),this.selectedKeyphrase=e},onDeleted(o){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(o,1),this.postEditorStore.currentPost.keyphrases.additional=null,setTimeout(()=>{this.postEditorStore.currentPost.keyphrases.additional=e,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},300)},addKeyphraseEv(){var t,s,a;if(this.postEditorStore.currentPost.maxAdditionalKeyphrases<=((s=(t=this.postEditorStore.currentPost.keyphrases)==null?void 0:t.additional)==null?void 0:s.length))return;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();if(r){const h={keyphrase:r,score:0},c=this.postEditorStore.currentPost.keyphrases.additional.push(h),y=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(a=y[c])==null||a.click(),this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),this.selectedKeyphrase=c-1}},pressEnter(o){const e=document.getElementById("add-additional-keyphrase");o.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((o,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}},mounted(){var o;this.selectedKeyphrase=((o=this.postEditorStore.currentPost.keyphrases.additional)==null?void 0:o.length)-1}},on={class:"additional-keyphrases-panel"},sn={key:0},rn={class:"analysis-wrapper"},nn={class:"aioseo-description additional-keyphrases-description"},an=["innerHTML"];function ln(o,e,r,t,s,a){var A,z,K,se,ae,re;const h=p("core-keyphrase"),c=p("core-loader"),y=p("metaboxAnalysisDetail"),v=p("base-input"),P=p("svg-circle-plus"),x=p("base-button"),C=p("core-tooltip"),b=p("core-alert");return i(),k("div",on,[t.postEditorStore.currentPost.keyphrases.additional&&((z=(A=t.postEditorStore.currentPost.keyphrases)==null?void 0:A.additional)!=null&&z.length)&&t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),k("div",sn,[(i(!0),k(Ce,null,Ke(t.postEditorStore.currentPost.keyphrases.additional,(B,W)=>(i(),_(h,{key:W,index:W,keyphrase:B.keyphrase,score:B.score,onSaved:a.onSaved,onDeleted:a.onDeleted,onSelectedKeyphrase:a.onSelectedKeyphrase,class:J(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===W?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",rn,[t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(c,{key:0,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(y,{key:1,analysisItems:t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].analysis},null,8,["analysisItems"])):m("",!0)])])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),_(v,{key:1,size:"medium",class:J(`add-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.postEditorStore.currentPost.maxAdditionalKeyphrases>((se=(K=t.postEditorStore.currentPost.keyphrases)==null?void 0:K.additional)==null?void 0:se.length)?(i(),_(x,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:l(()=>[d(P,{width:"14",height:"14"}),T(" "+g(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.postEditorStore.currentPost.maxAdditionalKeyphrases<=((re=(ae=t.postEditorStore.currentPost.keyphrases)==null?void 0:ae.additional)==null?void 0:re.length)?(i(),_(C,{key:3},{tooltip:l(()=>[u("span",null,g(s.strings.maxAmountReached),1)]),default:l(()=>[d(x,{id:"add-additional-keyphrase",class:"add-keyphrase gray medium",disabled:!0,onClick:a.addKeyphraseEv},{default:l(()=>[d(P,{width:"14",height:"14"}),T(" "+g(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])]),_:1})):m("",!0),!t.rootStore.isPro||!t.licenseStore.license.isActive?(i(),k(Ce,{key:4},[u("div",nn,g(s.strings.keyphraseDocumentation),1),d(b,{class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.upsell},null,8,an)]),_:1})],64)):m("",!0)])}const cn=M(tn,[["render",ln],["__scopeId","data-v-0e42cb5e"]]),dn=""+window.__aioseoDynamicImportPreload__("images/open-ai.eed9a73c.png"),ce="all-in-one-seo-pack",un={setup(){return{getAssetUrl:Xo,settingsStore:xe(),links:Z}},components:{CoreModal:Ie},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:dn,strings:{upgradeToPro:n("Unlock AI Generator",ce),learnMoreLink:D('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',Z.getUpsellUrl("post-settings","general","open-ai"),n("Learn more about all the features",ce),Z.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?D(n("Generate New SEO %1$s",ce),n("Title",ce)):D(n("Generate New SEO %1$s",ce),n("Description",ce))},ctaHeaderTitle(){return this.type==="title"?D(n("Generating SEO %1$s is a Pro Feature",ce),n("Titles",ce)):D(n("Generating SEO %1$s is a Pro Feature",ce),n("Descriptions",ce))},ctaDescription(){return this.type==="title"?D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",ce),n("titles",ce),n("title",ce)):D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",ce),n("meta descriptions",ce),n("description",ce))}}},pn={class:"cta"},hn=["src"],gn={class:"bottom"},mn={class:"title"},_n=["innerHTML"];function yn(o,e,r,t,s,a){const h=p("base-button"),c=p("core-modal");return i(),_(c,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=y=>t.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:l(()=>[T(g(a.headerTitle),1)]),body:l(()=>[u("div",pn,[u("img",{src:t.getAssetUrl(s.OpenAiImage),alt:"open-ai-upsell"},null,8,hn),u("div",gn,[u("div",null,[u("p",mn,g(a.ctaHeaderTitle),1),u("p",null,g(a.ctaDescription),1)]),u("div",null,[d(h,{type:"green",size:"medium",tag:"a",href:t.links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:l(()=>[T(g(s.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:s.strings.learnMoreLink},null,8,_n)])])])]),_:1})}const fn=M(un,[["render",yn]]),Sn={},kn={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},vn=u("path",{d:"M2.23351 8.73334C1.73351 8.73334 1.31129 8.55996 0.966845 8.2132C0.622412 7.86644 0.450195 7.44537 0.450195 6.95C0.450195 6.45464 0.623579 6.03357 0.970345 5.6868C1.31709 5.34005 1.73815 5.16667 2.23351 5.16667V2.89999C2.23351 2.63332 2.33351 2.39999 2.53351 2.19999C2.73351 1.99999 2.96685 1.89999 3.23351 1.89999H6.21686C6.21686 1.39999 6.39024 0.977765 6.737 0.63332C7.08376 0.288876 7.50483 0.116653 8.0002 0.116653C8.49556 0.116653 8.91663 0.290037 9.2634 0.636803C9.61015 0.983559 9.78353 1.40462 9.78353 1.89999H12.7669C13.0335 1.89999 13.2669 1.99999 13.4669 2.19999C13.6669 2.39999 13.7669 2.63332 13.7669 2.89999V5.16667C14.2669 5.16667 14.6891 5.34005 15.0335 5.6868C15.378 6.03357 15.5502 6.45464 15.5502 6.95C15.5502 7.44537 15.3768 7.86644 15.0301 8.2132C14.6833 8.55996 14.2622 8.73334 13.7669 8.73334V12.2167C13.7669 12.4834 13.6669 12.7167 13.4669 12.9167C13.2669 13.1167 13.0335 13.2167 12.7669 13.2167H3.23351C2.96685 13.2167 2.73351 13.1167 2.53351 12.9167C2.33351 12.7167 2.23351 12.4834 2.23351 12.2167V8.73334ZM5.77731 7.01015C5.97615 7.01015 6.14416 6.94024 6.28136 6.80042C6.41856 6.66061 6.48716 6.48971 6.48716 6.28774C6.48716 6.08577 6.41726 5.91619 6.27745 5.77899C6.13762 5.64179 5.9683 5.57319 5.76946 5.57319C5.57063 5.57319 5.40104 5.64283 5.2607 5.78212C5.12036 5.92141 5.0502 6.09414 5.0502 6.3003C5.0502 6.49914 5.12167 6.66715 5.26463 6.80435C5.40758 6.94155 5.57848 7.01015 5.77731 7.01015ZM10.2309 7.01015C10.4298 7.01015 10.5994 6.94024 10.7397 6.80042C10.88 6.66061 10.9502 6.48971 10.9502 6.28774C10.9502 6.08577 10.8787 5.91619 10.7358 5.77899C10.5928 5.64179 10.4219 5.57319 10.2231 5.57319C10.0242 5.57319 9.85623 5.64283 9.71903 5.78212C9.58183 5.92141 9.51323 6.09414 9.51323 6.3003C9.51323 6.49914 9.58313 6.66715 9.72295 6.80435C9.86277 6.94155 10.0321 7.01015 10.2309 7.01015ZM5.30383 10.25H10.6966V9.14637H5.30383V10.25ZM3.55383 11.8964H12.4466V3.2203H3.55383V11.8964Z",fill:"currentColor"},null,-1),bn=[vn];function wn(o,e){return i(),k("svg",kn,bn)}const Cn=M(Sn,[["render",wn]]),Pn="all-in-one-seo-pack",En={setup(){return{settingsStore:xe()}},components:{AiModal:fn,CoreTooltip:fe,SvgAiRobot:Cn},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:n("Use AI Generator",Pn)}}}},xn={class:"aioseo-ai-generator"};function Tn(o,e,r,t,s,a){const h=p("svg-ai-robot"),c=p("core-tooltip"),y=p("ai-modal");return i(),k("div",xn,[d(c,{type:"action",offset:"-30px,0"},{tooltip:l(()=>[T(g(s.strings.useAiGenerator),1)]),default:l(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=v=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[d(h,{onClick:e[0]||(e[0]=v=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))})])]),_:1}),d(y,{show:t.settingsStore.modals.aiGenerator===r.type,type:r.type},null,8,["show","type"])])}const An=M(En,[["render",Tn]]),Ln={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,strings:t}=Et();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,settingsStore:xe(),strings:t}},components:{CoreTooltip:fe,SvgCaret:Je,SvgCircleCheck:Qe,SvgCircleQuestionMark:xt,SvgEllipse:Pt,TransitionSlide:ws},props:{slug:{type:String,required:!0},headerText:String,focusScore:Number,trueSeoScore:Number,toggles:{type:Boolean,default(){return!0}},hideHeader:Boolean,noSlide:Boolean,saveToggleStatus:{type:Boolean,default(){return!0}}},watch:{"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.openCard(o.card)}}},methods:{openCard(o){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:o})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},In={class:"aioseo-card aioseo-sidebar-card"},Mn={class:"text"},On={key:0,class:"content"},Dn={key:1,class:"content"};function Bn(o,e,r,t,s,a){const h=p("svg-ellipse"),c=p("svg-circle-check"),y=p("svg-circle-question-mark"),v=p("core-tooltip"),P=p("svg-caret"),x=p("transition-slide");return i(),k("div",In,[r.hideHeader?m("",!0):(i(),k("div",{key:0,class:"header",onClick:e[0]||(e[0]=C=>t.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[u("div",Mn,[Te(o.$slots,"header",{},()=>[T(g(r.headerText),1)]),r.focusScore>=0?Te(o.$slots,"alt",{key:0},()=>[r.focusScore!==null?(i(),k("span",{key:0,class:J(["card-score",t.getScoreClass(r.focusScore)])},g(r.focusScore)+"/100 ",3)):m("",!0)]):m("",!0),r.trueSeoScore>=0?Te(o.$slots,"alt",{key:1},()=>[u("span",{class:J(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(i(),_(h,{key:0,width:"6"})):m("",!0),r.trueSeoScore===0?(i(),_(c,{key:1,width:"12"})):m("",!0),T(" "+g(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):m("",!0),o.$slots.tooltip?(i(),_(v,{key:2},{tooltip:l(()=>[Te(o.$slots,"tooltip")]),default:l(()=>[d(y)]),_:3})):m("",!0)]),r.toggles&&t.settingsStore.settings.toggledCards?(i(),_(P,{key:0,class:J({rotated:!t.settingsStore.settings.toggledCards[r.slug]})},null,8,["class"])):m("",!0)])),t.settingsStore.settings.toggledCards||r.noSlide?(i(),_(x,{key:1,active:t.settingsStore.settings.toggledCards[r.slug]&&r.toggles||r.noSlide},{default:l(()=>[o.$slots["before-tabs"]?(i(),k("div",On,[Te(o.$slots,"before-tabs")])):m("",!0),Te(o.$slots,"tabs"),o.$slots.default?(i(),k("div",Dn,[Te(o.$slots,"default")])):m("",!0)]),_:3},8,["active"])):m("",!0)])}const Rn=M(Ln,[["render",Bn]]),Hn={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const o=Math.max(...this.data.map(s=>s.x)),e=Math.max(...this.data.map(s=>s.y)),r=this.height-this.strokeWidth,t=this.data.map(s=>{const a=s.x===0?0:s.x/o,h=s.y===0?0:s.y/e,c=a*this.width,y=r-h*r+this.strokeWidth;return`${c},${y}`}).join(" ");return`0,${r+this.strokeWidth} `+t+` ${this.width},${r+this.strokeWidth}`}}},Un=["width","height","viewBox"],Kn=["fill","points"],Vn=["stroke","strokeWidth","points"];function Fn(o,e,r,t,s,a){return i(),k("svg",{width:r.width,height:r.height,viewBox:a.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:r.fillColor,points:a.polylinePoints},null,8,Kn),u("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:a.polylinePoints},null,8,Vn)],8,Un)}const Nn=M(Hn,[["render",Fn]]),Gn={},zn={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},qn=u("path",{d:"M108.808 8.212c0-2.579-1.586-4.456-4.628-4.456h-9.826v13.37h3.227v-4.563h3.822l3.742 4.562h3.637v-.29l-3.637-4.351c2.288-.463 3.663-2.13 3.663-4.272zm-4.985 1.653h-6.229V6.533h6.229c1.15 0 1.891.608 1.891 1.666 0 1.084-.714 1.666-1.891 1.666zM157.593 3.756h-3.029v5.078h-8.133V3.756h-3.266v13.383h3.266v-5.277h8.133v5.277h3.029V3.756zM85.72 3.756l-3.598 11.253h-.198l-3.61-11.253H72.56v13.383h3.081V6.149h.185l3.597 10.99h4.96l3.61-10.99h.185v10.99h3.174V3.756h-5.634zM50.57 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.687-1.31 3.464-1.31 2.46 0 4.721.53 6.692 1.482V4.787c-1.97-.939-4.153-1.402-6.864-1.402-3.808 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.642 3.861 1.124.12 3.028.291 4.364.397 1.454.12 1.878.569 1.878 1.23 0 .913-1.019 1.468-3.597 1.468-2.619 0-5.277-.86-7.168-2.063v3.081c1.521 1.019 4.14 1.878 7.062 1.878 4.152 0 6.824-1.6 6.824-4.47.026-2.168-1.402-3.478-4.682-3.821zM57.393 3.756v13.383h12.47V14.4h-9.389v-2.71h9.23V8.978h-9.23V6.493h9.39V3.756H57.392zM136.487 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.688-1.31 3.465-1.31 2.459 0 4.721.53 6.691 1.482V4.787c-1.97-.939-4.152-1.402-6.863-1.402-3.809 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.641 3.861 1.124.12 3.029.291 4.364.397 1.455.12 1.878.569 1.878 1.23 0 .913-1.018 1.468-3.597 1.468-2.618 0-5.276-.86-7.167-2.063v3.081c1.52 1.019 4.139 1.878 7.061 1.878 4.153 0 6.824-1.6 6.824-4.47.027-2.168-1.402-3.478-4.681-3.821zM121.742 3.756v6.85c0 2.592-1.574 4.02-3.941 4.02-2.38 0-3.941-1.402-3.941-4.06v-6.81h-3.213v6.506c0 4.853 3.028 7.26 7.207 7.26 4.007 0 7.115-2.301 7.115-7.101V3.756h-3.227z",fill:"#020202"},null,-1),jn=u("path",{d:"M30.19 10.368c0 .648-.33.753-1.15.753-.872 0-1.031-.145-1.124-.806-.172-1.68-1.309-3.108-3.213-3.267-.608-.052-.754-.277-.754-1.031 0-.7.106-1.031.648-1.031 3.306.013 5.594 2.67 5.594 5.382zm4.814 0C35.004 5.329 31.593 0 23.711 0H8.054c-.318 0-.516.159-.516.45 0 .158.119.304.225.383.568.45 1.415.952 2.525 1.508 1.085.542 1.931.899 2.777 1.243.357.145.49.304.49.502 0 .278-.199.45-.582.45H.543c-.371 0-.543.238-.543.476 0 .198.066.37.238.542 1.005 1.058 2.618 2.328 4.96 3.796a71.557 71.557 0 006.611 3.636c.344.159.45.344.45.542-.013.225-.185.41-.582.41h-5.7c-.317 0-.502.172-.502.437 0 .145.119.33.278.476 1.295 1.177 3.372 2.46 6.136 3.636C15.579 20.061 19.32 21 23.526 21c7.974 0 11.478-5.964 11.478-10.632zm-10.407 7.445c-4.073 0-7.485-3.32-7.485-7.458 0-4.074 3.399-7.353 7.485-7.353 4.179 0 7.458 3.266 7.458 7.353-.013 4.139-3.28 7.458-7.458 7.458z",fill:"#FF642D"},null,-1),Wn=[qn,jn];function $n(o,e){return i(),k("svg",zn,Wn)}const Yn=M(Gn,[["render",$n]]),X="all-in-one-seo-pack",Zn={setup(){return{connectStore:Ps(),licenseStore:_e(),optionsStore:Ae(),postEditorStore:Q(),rootStore:ye(),semrushStore:Zs(),truSeo:new so}},components:{CoreAlert:ve,CoreKeyphrase:fo,CoreLoader:Oe,CoreModal:Ie,CoreTooltip:fe,SvgAreaChart:Nn,SvgCircleCheck:Qe,SvgCirclePlus:Tt,SvgLogoSemrush:Yn,SvgTrash:et,metaboxAnalysisDetail:st},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:null,settingsStore:xe(),strings:{modalTitle:D(n("Additional Keyphrases by %1$s",X),"Semrush"),addKeyphrase:n("Add Focus Keyphrase",X),getAdditionalKeyphrases:n("Get Additional Keyphrases",X),showResultsFor:n("Show Results For:",X),keyphrase:n("Keyphrase",X),volume:n("Volume",X),trend:n("Trend",X),addAdditionalKeyphrase:n("Add Keyphrase",X),removeAdditionalKeyphrase:n("Remove Keyphrase",X),noResults:n("No results",X),upsell:D(n("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",X),"Semrush","<strong>AIOSEO Pro</strong>",Z.getUpsellLink("semrush-keywords",Ee.learnMore,null,!0)),semrushGetAdditionalKeyphrases:D(n("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",X),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:n("To use this feature, first add a focus keyphrase.",X),focusKeyphrase:n("Focus Keyphrase",X),delete:n("Delete",X),semrushTooltip:D(n("Get Additional Keyphrases with %1$s!",X),"Semrush"),semrushTooltipLicenseKey:D(n("%1$sA valid license key is required%2$s in order to connect with %3$s.",X),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:D(n("You have exceeded the number of requests allowed by your %1$s plan.",X),"Semrush"),inOrderToUpgradeSemrush:D(n("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",X),Z.getUpsellLink("semrush-pricing",Ee.learnMore,"semrushPricing",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",X),this.postEditorStore.currentPost.maxAdditionalKeyphrases)}}},watch:{semrushCountry:{deep:!0,handler(){this.settingsStore.changeSemrushCountry(this.semrushCountry),this.getKeyphrases()}}},computed:{semrushError(){var o;return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?n("You have exceeded the limit for requests. Please try again later.",X):((o=this.semrushStore)==null?void 0:o.error)||n("An error occurred while fetching keyphrases. Please try again later.",X)}},methods:{semrushDatabase(){return JSON.parse(JSON.stringify(Go)).map(e=>(e.value==="GB"&&(e.value="UK",e.label="United Kingdom"),e.value==="KR"&&(e.label="South Korea"),e)).filter(e=>zo.includes(e.value.toLowerCase())).map(e=>(e.label=e.label+" - "+e.value.toUpperCase(),e))},getAdditionalKeyphrases(){if(this.showSemrushTooltip=!1,!this.connectStore.isConnected){this.openConnectPopup(this.rootStore.aioseo.urls.connect+"&semrush=true");return}if(!this.semrushStore.hasValidTokens){this.openPopup("https://oauth.semrush.com/auth/login?client_id=aioseo&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Faioseo%2Fsuccess&ref=2190331110&response_type=code&scope=user.id");return}this.openModal()},transformTrendDataToChartPoints(o){return o.split(",").map((r,t)=>({x:t,y:parseFloat(r)}))},openConnectPopup(o){Dt(o,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(o){Dt(o,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(o){return this.semrushStore.authenticate(o.code)},completedConnectCallback(o){return this.connectStore.saveConnectToken(o.token)},openModal(){this.semrushShowModal=!0,!this.semrushStore.error&&this.getKeyphrases()},getKeyphrases(){var o,e,r;(r=(e=(o=this.postEditorStore.currentPost)==null?void 0:o.keyphrases)==null?void 0:e.focus)!=null&&r.keyphrase&&(this.loadingResults=!0,this.semrushStore.getKeyphrases(this.semrushCountry.value).then(()=>{this.loadingResults=!1}).catch(t=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(t.message)}))},closedCallback(o){o&&this.openModal()},closedConnectCallback(o){if(o){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(o,e,r){const{data:t,source:s,origin:a}=o;if(!(a!=="https://oauth.semrush.com"||e!==s)){if(t.type==="semrush:oauth:success"){window.removeEventListener("message",r,!1);let h={};try{const c=new URL(t.url);h=qe(c.search)}catch{}this.completedCallback(h).then(()=>{e.close(),e=null,this.closedCallback(!0)})}t.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",r,!1),e=null,this.closedCallback())}},onSaved(o){const{value:e}=o;this.postEditorStore.currentPost.keyphrases.focus.keyphrase=e,this.postEditorStore.currentPost.loading.focus=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},onDeleted(){this.postEditorStore.currentPost.keyphrases.focus.keyphrase="",this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},addKeyphraseEv(){const e=document.getElementsByClassName(`add-focus-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();r&&(this.postEditorStore.currentPost.keyphrases.focus={keyphrase:r,score:0,analysis:{}},this.postEditorStore.currentPost.loading.focus=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}))},hasAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(r=>r.keyphrase.toLowerCase()===o).length},getAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(r=>r.keyphrase.toLowerCase()===o)},scoreClass(o){return 79<o?"score-green":49<o?"score-orange":0<o?"score-red":"score-none"},async addAdditionalKeyphrase(o,e){var a,h;if(this.postEditorStore.currentPost.maxAdditionalKeyphrases<=((h=(a=this.postEditorStore.currentPost.keyphrases)==null?void 0:a.additional)==null?void 0:h.length))return;this.addingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.push({keyphrase:o,score:0}),s=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=r,this.postEditorStore.isDirty=!0,await this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),await this.$nextTick(),s[t]&&s[t].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases,r=e.findIndex(t=>t.keyphrase.toLowerCase()===o);if(r!==-1){const t=document.getElementsByClassName("keyphrase-name");t[r+1]&&t[r+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(o,e){this.removingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.findIndex(s=>s.keyphrase.toLowerCase()===o);if(t!==-1){r.splice(t,1),this.postEditorStore.currentPost.keyphrases.additional=r;const s=document.getElementsByClassName("keyphrase-name");s[0]&&s[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(o){o.target.parentElement.classList.toggle("toggled")},pressEnter(o){const e=document.getElementById("add-focus-keyphrase");o.preventDefault(),e.click()}},mounted(){var e;const o=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&o.push(this.semrushStore.refresh()),this.semrushCountry={value:this.settingsStore.settings.semrushCountry,label:(e=this.semrushDatabase().find(r=>r.value===this.settingsStore.settings.semrushCountry))==null?void 0:e.label}}},Xn={class:"aioseo-focus-keyphrase-panel"},Jn={class:"disabled-button gray medium"},Qn={class:"disabled-button gray"},ei=["innerHTML"],ti={class:"aioseo-modal-content has-padding"},oi={class:"aioseo-settings-row"},si={class:"settings-name"},ri={class:"name"},ni={class:"results"},ii={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},ai={class:"keyphrases-header"},li={class:"keyphrase"},ci={class:"keyphrase-volume"},di={class:"keyphrase-trend"},ui={key:0,class:"keyphrase-actions"},pi={class:"keyphrases-rows"},hi={class:"keyphrase"},gi={class:"keyphrase-volume"},mi={class:"keyphrase-trend"},_i={key:0,class:"keyphrase-actions"},yi={key:0,class:"focus-keyphrase"},fi={key:1},Si={key:2,class:"remove-keyphrase"},ki=["onClick"],vi={key:1,class:"keyphrase-row"},bi=["colspan"],wi={key:1},Ci={class:"semrush-logo"},Pi={class:"semrush-upsell"},Ei=["innerHTML"],xi=["innerHTML"];function Ti(o,e,r,t,s,a){const h=p("base-input"),c=p("svg-circle-plus"),y=p("base-button"),v=p("core-tooltip"),P=p("core-keyphrase"),x=p("core-loader"),C=p("metaboxAnalysisDetail"),b=p("core-alert"),A=p("base-select"),z=p("svg-area-chart"),K=p("svg-circle-check"),se=p("svg-trash"),ae=p("svg-logo-semrush"),re=p("core-modal");return i(),k("div",Xn,[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(h,{key:0,size:"medium",class:J(`add-focus-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),u("div",{class:J(`add-focus-keyphrase-${o.$root.$data.screenContext}-button`)},[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(y,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:l(()=>[d(c,{width:"14",height:"14"}),T(" "+g(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(v,{key:1},{tooltip:l(()=>[u("span",null,g(s.strings.semrushGetAdditionalKeyphrases)+" "+g(s.strings.pleaseAddFocusKeyphrase),1)]),default:l(()=>[u("div",Jn,[d(c,{width:"14",height:"14"}),T(" "+g(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0)],2),t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(P,{key:1,index:0,keyphrase:t.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:t.postEditorStore.currentPost.keyphrases.focus.score,onSaved:a.onSaved,onDeleted:a.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):m("",!0),t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus?(i(),_(x,{key:2,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(C,{key:3,analysisItems:t.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.rootStore.isPro&&t.licenseStore.isUnlicensed?(i(),_(v,{key:4},{tooltip:l(()=>[u("span",{innerHTML:s.strings.semrushTooltipLicenseKey},null,8,ei)]),default:l(()=>[u("div",Qn,[d(c,{width:"14",height:"14"}),T(" "+g(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.rootStore.isPro||!t.licenseStore.isUnlicensed)?(i(),_(v,{key:5,disabled:!s.showSemrushTooltip||t.rootStore.isPro,"force-show":s.showSemrushTooltip&&!t.rootStore.isPro},{tooltip:l(()=>[u("span",null,g(s.strings.semrushTooltip),1)]),default:l(()=>[d(y,{class:"add-keyphrase gray medium",onClick:a.getAdditionalKeyphrases},{default:l(()=>[d(c,{width:"14",height:"14"}),T(" "+g(s.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):m("",!0),d(re,{show:s.semrushShowModal,onClose:e[1]||(e[1]=B=>s.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:l(()=>[T(g(s.strings.modalTitle),1)]),body:l(()=>[u("div",ti,[t.licenseStore.isUnlicensed?(i(),_(b,{key:0,type:"blue",innerHTML:s.strings.upsell},null,8,["innerHTML"])):m("",!0),u("div",oi,[u("div",si,[u("div",ri,g(s.strings.showResultsFor),1)]),d(A,{class:"semrush-country-selector",size:"medium",options:a.semrushDatabase(),placeholder:s.strings.selectPriceIndicator,modelValue:s.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=B=>s.semrushCountry=B)},null,8,["options","placeholder","modelValue"])]),u("div",ni,[u("table",ii,[u("thead",null,[u("tr",ai,[u("th",li,g(s.strings.keyphrase),1),u("th",ci,g(s.strings.volume),1),u("th",di,g(s.strings.trend),1),t.licenseStore.isUnlicensed?m("",!0):(i(),k("th",ui))])]),u("tbody",pi,[t.semrushStore.results.length&&!s.loadingResults?(i(!0),k(Ce,{key:0},Ke(t.semrushStore.results,(B,W)=>{var le,ne,de,q;return i(),k("tr",{class:J(["keyphrase-row",{even:W%2===0}]),key:W},[u("td",hi,g(B[0]),1),u("td",gi,g(B[1]),1),u("td",mi,[d(z,{width:66,height:24,data:a.transformTrendDataToChartPoints(B[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),t.licenseStore.isUnlicensed?m("",!0):(i(),k("td",_i,[B[0]===t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),k("div",yi,[d(K),T(" "+g(s.strings.focusKeyphrase),1)])):m("",!0),B[0]!==t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),k("div",fi,[W!==s.removingAdditionalKeyphrase&&(W===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(B[0]))&&t.postEditorStore.currentPost.maxAdditionalKeyphrases>((ne=(le=t.postEditorStore.currentPost.keyphrases)==null?void 0:le.additional)==null?void 0:ne.length)?(i(),_(y,{key:0,type:"gray",size:"medium",onClick:G=>a.addAdditionalKeyphrase(B[0],W),loading:W===s.addingAdditionalKeyphrase},{default:l(()=>[T(g(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):m("",!0),W!==s.removingAdditionalKeyphrase&&(W===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(B[0]))&&t.postEditorStore.currentPost.maxAdditionalKeyphrases<=((q=(de=t.postEditorStore.currentPost.keyphrases)==null?void 0:de.additional)==null?void 0:q.length)?(i(),_(v,{key:1},{tooltip:l(()=>[u("span",null,g(s.strings.maxAmountReached),1)]),default:l(()=>[d(y,{type:"gray",size:"medium",disabled:!0,onClick:G=>a.addAdditionalKeyphrase(B[0],W),loading:W===s.addingAdditionalKeyphrase},{default:l(()=>[T(g(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])]),_:2},1024)):m("",!0),a.getAdditionalKeyphrase(B[0])&&W!==s.addingAdditionalKeyphrase&&(W===s.removingAdditionalKeyphrase||a.hasAdditionalKeyphrase(B[0]))?(i(),k("div",Si,[u("span",{class:J(["keyphrase-score",a.scoreClass(a.getAdditionalKeyphrase(B[0]).score)]),onClick:G=>a.goToAdditionalKeyphrase(B[0])},g(a.getAdditionalKeyphrase(B[0]).score)+"/100",11,ki),d(v,{type:"action"},{tooltip:l(()=>[T(g(s.strings.delete),1)]),default:l(()=>[d(se,{onClick:G=>a.removeAdditionalKeyphrase(B[0],W)},null,8,["onClick"])]),_:2},1024)])):m("",!0)])):m("",!0)]))],2)}),128)):m("",!0),!t.semrushStore.results.length||s.loadingResults?(i(),k("tr",vi,[u("td",{colspan:t.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[s.loadingResults?(i(),_(x,{key:0,dark:""})):m("",!0),!s.loadingResults&&!t.semrushStore.error?(i(),k("span",wi,g(s.strings.noResults),1)):m("",!0),t.semrushStore.error&&!t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),_(b,{key:2,type:"red"},{default:l(()=>[T(g(a.semrushError),1)]),_:1})):m("",!0),t.semrushStore.error&&t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),k(Ce,{key:3},[u("div",Ci,[d(ae)]),u("div",Pi,[u("span",null,[u("strong",{innerHTML:s.strings.youHaveExceededSemrush},null,8,Ei)]),T(" "+g(" ")+" "),u("span",{innerHTML:s.strings.inOrderToUpgradeSemrush},null,8,xi)])],64)):m("",!0)])],8,bi)])):m("",!0)])])])])]),_:1},8,["show"])])}const Ai=M(Zn,[["render",Ti]]),We="all-in-one-seo-pack",Li={setup(){const{getErrorClass:o,getErrorDisplay:e,strings:r}=Et();return{postEditorStore:Q(),rootStore:ye(),getErrorClass:o,getErrorDisplay:e,strings:r}},components:{CoreAlert:ve,CoreMainTabs:Be,metaboxAnalysisDetail:st,SvgEllipse:Pt,SvgCircleCheck:Qe},data(){return{initTab:"basic",tabs:[{slug:"basic",name:n("Basic SEO",We)},{slug:"title",name:n("Title",We)},{slug:"readability",name:n("Readability",We)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){if(!Ye()||!["elementor","divi"].includes(this.rootStore.aioseo.integration))return!1;const o=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return D(n("We have detected that you are currently using the %1$s Page Builder. Please click %2$shere%3$s to use the %1$s editor for a most accurate result.",We),o,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},Ii={class:"page-analysis-panel"},Mi=["innerHTML"];function Oi(o,e,r,t,s,a){const h=p("core-alert"),c=p("svg-ellipse"),y=p("svg-circle-check"),v=p("core-main-tabs"),P=p("metaboxAnalysisDetail");return i(),k("div",Ii,[a.pageBuilderAlert?(i(),_(h,{key:0,type:"yellow"},{default:l(()=>[u("span",{innerHTML:a.pageBuilderAlert},null,8,Mi)]),_:1})):m("",!0),d(v,{tabs:a.parseTabs,showSaveButton:!1,active:s.initTab,internal:"",onChanged:e[0]||(e[0]=x=>a.processChangeTab(x))},{"after-label":l(({tab:x})=>[x.errorCount>=0?(i(),k("span",{key:0,class:J(["tab-score",t.getErrorClass(t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors)])},[0<t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors?(i(),_(c,{key:0,width:"6"})):m("",!0),t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors===0?(i(),_(y,{key:1,width:"12"})):m("",!0),T(" "+g(t.getErrorDisplay(t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors)),1)],2)):m("",!0)]),_:1},8,["tabs","active"]),d(ze,{mode:"out-in"},{default:l(()=>[t.postEditorStore.currentPost.page_analysis?(i(),_(P,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[s.initTab]},null,8,["analysisItems"])):m("",!0)]),_:1})])}const Di=M(Li,[["render",Oi]]),$e="all-in-one-seo-pack",Bi={emits:["changeTab"],setup(){return{licenseStore:_e(),postEditorStore:Q(),hasRequiredFeature:Ue.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:Ee,links:Z}},components:{CoreAlert:ve},data(){return{license:Ue,strings:{description:n("Cornerstone content refers to the most important and informative articles or pages on your website that serve as the foundation for your content strategy. AIOSEO uses cornerstone content for",$e),linkingRecommendations:n("internal linking recommendations in Link Assistant.",$e),upsell:D(n("Cornerstone Content is a %1$s feature. %2$s",$e),"PRO",Z.getUpsellLink("post-settings-general",Ee.learnMore,"cornerstone-content",!0)),markAsCornerstone:n("Mark as Cornerstone",$e)}}}},Ri={class:"cornerstone-content-panel"},Hi={class:"cornerstone-content-text"},Ui=["innerHTML"],Ki=["innerHTML"];function Vi(o,e,r,t,s,a){const h=p("base-toggle"),c=p("core-alert");return i(),k("div",Ri,[u("p",Hi,[u("span",null,g(s.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=pe(y=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},g(s.strings.linkingRecommendations),1),u("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Ui)]),d(h,{modelValue:t.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=y=>t.postEditorStore.currentPost.pillar_content=y),e[2]||(e[2]=y=>t.postEditorStore.isDirty=!0)],disabled:!t.hasRequiredFeature},{default:l(()=>[T(g(s.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(i(),_(c,{key:0,class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.upsell},null,8,Ki)]),_:1})):m("",!0)])}const Fi=M(Bi,[["render",Vi]]),oe="all-in-one-seo-pack",Ni={emits:["changeTab"],setup(){const{parseTags:o}=wt({separator:void 0}),{maxRecommendedCount:e}=Ct(),{watchHighlightSentences:r}=Or(),{runAnalysis:t,strings:s}=Et();return{composableStrings:s,licenseStore:_e(),maxRecommendedCount:e,optionsStore:Ae(),parseTags:o,postEditorStore:Q(),rootStore:ye(),runAnalysis:t,seoPreviewStore:Ts(),settingsStore:xe(),tagsStore:Ao(),truSeoHighlighterStore:ot(),watchHighlightSentences:r}},components:{AdditionalKeyphrases:cn,AiGenerator:An,BaseRadioToggle:no,CoreAlert:ve,CoreGoogleSearchPreview:bs,CoreHtmlTagsEditor:At,CoreSettingsRow:Pe,CoreSidebarCard:Rn,CoreTooltip:fe,CoreProBadge:Cs,FocusKeyphrase:Ai,MetaboxAnalysisDetail:st,PageAnalysis:Di,CornerstoneContent:Fi,SvgCircleQuestionMark:xt,SvgDesktop:Es,SvgMobile:xs,SvgPencil:bt},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:Ue,allowed:Le,isPageBuilderEditor:He,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Xt(this.composableStrings,{pageName:n("General",oe),serpPreview:n("SERP Preview",oe),serpPreviewDocumentation:n("SERP: Search Engine Results Page preview. Your site's potential appearance in Google search results. Final display may vary, but this preview closely resembles it.",oe),editSnippet:n("Edit Snippet",oe),clickToAddTitle:n("Click on the tags below to insert variables into your title.",oe),metaDescription:n("Meta Description",oe),clickToAddDescription:n("Click on the tags below to insert variables into your meta description.",oe),cornerstoneContent:n("Cornerstone Content",oe),focusKeyphrase:n("Focus Keyphrase",oe),additionalKeyphrases:n("Additional Keyphrases",oe),pageAnalysis:n("Page Analysis",oe),basicSeo:n("Basic SEO",oe),title:n("Title",oe),readability:n("Readability",oe),lookingForMetaKeywords:n("Looking for meta keywords?",oe),goToAdvancedTab:n("Go to the Advanced tab to add/edit meta keywords",oe),autogenerateDescriptionsAlert:D(n("Warning: You have disabled Autogenerate Descriptions and are using the default description format. %1$s will not output a description unless you enter a custom one. You can enable Autogenerate Descriptions under %2$s.",oe),"AIOSEO",Z.getPlainLink(n("Search Appearance > Advanced",oe),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:D(n("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",oe),Z.getDocLink(Ee.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(o,e){it(()=>this.watchHighlightSentences(o,e))}},computed:{title(){return D(n("%1$s Title",oe),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return lt()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},isForum(){return this.rootStore.aioseo.data.isBBPressActive&&(this.postEditorStore.currentPost.postType==="forum"||this.postEditorStore.currentPost.postType==="topic"||this.postEditorStore.currentPost.postType==="reply")},focusKeyphraseScore(){return this.postEditorStore.currentPost.keyphrases.focus.keyphrase?this.postEditorStore.currentPost.keyphrases.focus.score:null},showAutogenerateDescriptionsAlert(){return this.optionsStore.internalOptions.internal.deprecatedOptions.includes("autogenerateDescriptions")?(this.postEditorStore.currentPost.context==="post"?this.optionsStore.dynamicOptions.searchAppearance.postTypes[this.postEditorStore.currentPost.postType].metaDescription:this.optionsStore.dynamicOptions.searchAppearance.taxonomies[this.postEditorStore.currentPost.termType].metaDescription)===this.postEditorStore.currentPost.description&&!this.optionsStore.options.deprecated.searchAppearance.advanced.autogenerateDescriptions:!1}},methods:{hideKeywordsLooking(){this.optionsStore.options.searchAppearance.advanced.keywordsLooking=!1,this.optionsStore.saveChanges()},isMobilePreviewEv(o){this.postEditorStore.changeGeneralPreview(o)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.currentPost.modalOpen=!0},getDefaultTags(o){switch(o){case"title":return this.postEditorStore.currentPost.context==="post"?["post_title","separator_sa","site_title"]:["taxonomy_title","separator_sa","site_title"];case"description":return this.postEditorStore.currentPost.context==="post"?this.postEditorStore.currentPost.postType==="attachment"?["attachment_caption","separator_sa","site_title"]:this.postEditorStore.currentPost.postType==="product"?["post_excerpt","post_content"]:["post_excerpt","post_content","separator_sa"]:["taxonomy_title","separator_sa","taxonomy_description"]}},getFocusKeyphraseTooltipOffset(){return Lo()?"-15px,0":He()?"35px,0":"0,0"}},mounted(){this.keyphrases=this.postEditorStore.currentPost.keyphrases,this.postEditorStore.currentPost.context==="post"&&!this.postEditorStore.currentPost.keyphrases.length&&(this.selectedKeyphrase=-1),window.aioseoBus.$on("updateTitleKey",()=>{this.titleKey="title"+Math.random(0,999)}),window.aioseoBus.$on("updateDescriptionKey",()=>{this.descriptionKey="description"+Math.random(0,999)})}},Gi={class:"aioseo-tab-content aioseo-post-general"},zi=["innerHTML"],qi=["innerHTML"],ji=["innerHTML"],Wi={key:0},$i=["innerHTML"],Yi=["innerHTML"];function Zi(o,e,r,t,s,a){const h=p("svg-circle-question-mark"),c=p("core-tooltip"),y=p("svg-desktop"),v=p("svg-mobile"),P=p("base-radio-toggle"),x=p("core-google-search-preview"),C=p("svg-pencil"),b=p("base-button"),A=p("core-settings-row"),z=p("ai-generator"),K=p("core-html-tags-editor"),se=p("core-alert"),ae=p("core-pro-badge"),re=p("cornerstone-content"),B=p("focus-keyphrase"),W=p("additional-keyphrases"),le=p("page-analysis"),ne=p("core-sidebar-card"),de=p("metabox-analysis-detail");return i(),k("div",Gi,[s.allowed("aioseo_page_general_settings")?(i(),_(A,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:l(()=>[u("div",null,[u("span",null,g(s.strings.serpPreview),1),d(c,{offset:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:l(()=>[T(g(s.strings.serpPreviewDocumentation),1)]),default:l(()=>[d(h)]),_:1},8,["offset"])]),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(P,{key:0,modelValue:t.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":a.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:l(()=>[d(y)]),mobile:l(()=>[d(v)]),_:1},8,["modelValue","onUpdate:modelValue"])):m("",!0)]),content:l(()=>{var q,G,ee;return[d(x,{"focus-keyphrase":((ee=(G=(q=t.postEditorStore.currentPost)==null?void 0:q.keyphrases)==null?void 0:G.focus)==null?void 0:ee.keyphrase)??"",device:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"||t.postEditorStore.currentPost.generalMobilePrev?"mobile":"desktop",url:t.tagsStore.liveTags.permalink,title:t.parseTags(t.postEditorStore.currentPost.title||t.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),description:t.parseTags(t.postEditorStore.currentPost.description||t.postEditorStore.currentPost.tags.description||"#post_content"),"rich-results":t.seoPreviewStore.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext!=="modal"?(i(),_(b,{key:0,class:"edit-snippet gray small",onClick:a.editSnippetEv},{default:l(()=>[d(C),T(" "+g(s.strings.editSnippet),1)]),_:1},8,["onClick"])):m("",!0)]}),_:1})):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(A,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:a.title,key:s.titleKey},{content:l(()=>[d(K,{modelValue:t.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=q=>t.postEditorStore.currentPost.title=q),e[2]||(e[2]=q=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=q=>s.titleCount=q.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":a.getDefaultTags("title")},{"tags-description":l(()=>[T(g(s.strings.clickToAddTitle),1)]),"append-button":l(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"title"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,60)},null,8,zi)]),_:1},8,["name"])):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(A,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:s.strings.metaDescription,key:s.descriptionKey},{content:l(()=>[a.showAutogenerateDescriptionsAlert?(i(),_(se,{key:0,type:"yellow"},{default:l(()=>[u("span",{innerHTML:s.strings.autogenerateDescriptionsAlert},null,8,qi)]),_:1})):m("",!0),d(K,{modelValue:t.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=q=>t.postEditorStore.currentPost.description=q),e[5]||(e[5]=q=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=q=>s.descriptionCount=q.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":a.getDefaultTags("description")},{"tags-description":l(()=>[T(g(s.strings.clickToAddDescription),1)]),"append-button":l(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"description"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,160)},null,8,ji)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="metabox"&&t.postEditorStore.currentPost.context==="post"&&!["attachment","web-story"].includes(t.postEditorStore.currentPost.postType)&&!s.isPageBuilderEditor()?(i(),_(A,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:l(()=>[T(g(s.strings.cornerstoneContent)+" ",1),t.licenseStore.isUnlicensed?(i(),_(ae,{key:0})):m("",!0)]),content:l(()=>[d(re,{onChangeTab:e[6]||(e[6]=q=>o.$emit("changeTab",q))})]),_:1})):m("",!0),a.displayTruSeoMetaboxCard?(i(),k(Ce,{key:4},[t.optionsStore.options.searchAppearance.advanced.useKeywords&&t.optionsStore.options.searchAppearance.advanced.keywordsLooking?(i(),k("div",Wi,[d(se,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:a.hideKeywordsLooking},{default:l(()=>[T(g(s.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=pe(q=>o.$emit("changeTab","advanced"),["prevent"]))},g(s.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=pe(q=>o.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):m("",!0),d(A,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:l(()=>[u("span",null,g(s.strings.focusKeyphrase),1),d(c,{offset:"25px,0"},{tooltip:l(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,$i)]),default:l(()=>[d(h)]),_:1})]),content:l(()=>[d(B)]),_:1}),d(A,{name:s.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:l(()=>[d(W)]),_:1},8,["name"])],64)):m("",!0),a.displayTruSeoMetaboxCard&&t.postEditorStore.currentPost.page_analysis?(i(),_(A,{key:5,name:s.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:l(()=>[d(le)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="sidebar"&&!s.isPageBuilderEditor()&&r.parentComponentContext!=="modal"?(i(),_(ne,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":s.strings.cornerstoneContent},{default:l(()=>[d(re,{onChangeTab:e[9]||(e[9]=q=>o.$emit("changeTab",q))})]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ne,{key:7,slug:"focus",focusScore:a.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:l(()=>[u("span",null,g(s.strings.focusKeyphrase),1),d(c,{offset:"-10px,0"},{tooltip:l(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Yi)]),default:l(()=>[d(h)]),_:1})]),default:l(()=>[d(B)]),_:1},8,["focusScore"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ne,{key:8,slug:"additional","header-text":s.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:l(()=>[d(W)]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:9,slug:"basicseo","header-text":s.strings.basicSeo,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:10,slug:"title","header-text":s.strings.title,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:11,slug:"readability","header-text":s.strings.readability,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0)])}const So=M(Ni,[["render",Zi]]),Xi={class:"post-title"},Ji={key:1},Qi={key:1},ea={key:1},ta={key:1},oa={key:1},sa={key:0,class:"btn-view"},ra=["href"],Ut="keyword-rank-tracker-keywords-table",Kt={__name:"KeywordsTable",props:{paginatedKeywords:Object,itemsPerPage:Number},setup(o){const e="all-in-one-seo-pack",r=Ze(),t=ye(),s={position:n("Position",e),openInKrt:n("Open in Keyword Rank Tracker",e)},a=[{label:Ee.delete,value:"delete"},{label:s.addToGroup,value:"assignGroup"}],h=o,c=we(null),y=we([]),{orderBy:v,orderDir:P,pageNumber:x,processAdditionalFilters:C,processChangeItemsPerPage:b,processFilterTable:A,processPagination:z,processSearch:K,processSort:se,searchTerm:ae,wpTableKey:re,wpTableLoading:B}=ao({fetchData:r.fetchKeywords,tableId:Ut,tableRef:c.value,resultsPerPage:h.itemsPerPage}),W=ke(()=>[{slug:"name",label:n("Keyword",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:v.value==="name"?P.value:"asc",sorted:v.value==="name"},{slug:"clicks",label:n("Clicks",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:v.value==="clicks"?P.value:"asc",sorted:v.value==="clicks",width:"80px"},{slug:"ctr",label:n("CTR",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:v.value==="ctr"?P.value:"asc",sorted:v.value==="ctr",width:"68px"},{slug:"impressions",label:n("Impressions",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:v.value==="impressions"?P.value:"asc",sorted:v.value==="impressions",width:"110px"},{slug:"position",label:n("Position",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:v.value==="position"?P.value:"asc",sorted:v.value==="position",width:"90px"},{slug:"history",label:n("Position History",e),width:"140px"},{slug:"tracking",label:n("Tracking",e),width:"85px"},{slug:"view",label:"",width:"40px"}]),le=(G,ee)=>{var F;let $=((F=G.statistics)==null?void 0:F[ee])??"";switch(ee){case"ctr":$=$!==""?parseFloat($)+"%":$;break;case"clicks":case"impressions":$=$!==""?Ms.compactNumber($):$;break;case"position":$=$!==""?Math.round($).toFixed(0):$;break}return $},ne=G=>{var ee;return(ee=G.statistics)!=null&&ee.history?[{name:s.position,data:G.statistics.history.map($=>({x:$.date,y:$.position,label:$.position}))}]:[]},de=G=>t.aioseo.urls.aio.searchStatistics+`&search=${encodeURIComponent(G.name)}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`,q=async(G,ee)=>{y.value[ee]=!0;try{G.id?await r.deleteKeywords([G.id]):await r.insertKeywords({keywords:[G.name]}).then(()=>{G.tracking=!0}).catch(()=>{G.tracking=!1}),await r.fetchKeywords({rows:h.paginatedKeywords.rows}).then(()=>{r.maybeFetchStatistics({context:"keywords"})})}catch($){console.error($)}finally{y.value=[]}};return(G,ee)=>{const $=p("base-toggle");return i(),_(S(lo),{ref_key:"table",ref:c,id:Ut,"additional-filters":[],"bulk-options":a,columns:W.value,filters:[],"initial-items-per-page":100,"initial-page-number":S(x),"initial-search-term":S(ae),key:S(re),loading:S(B),rows:o.paginatedKeywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:S(A),onPaginate:S(z),onProcessAdditionalFilters:S(C),onProcessBulkAction:F=>({}),onProcessChangeItemsPerPage:S(b),onSearch:S(K),onSortColumn:S(se)},{name:l(({row:F})=>[u("div",Xi,[u("b",null,g(F.name),1)])]),clicks:l(({row:F})=>[F.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",Ji,g(le(F,"clicks")),1))]),ctr:l(({row:F})=>[F.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",Qi,g(le(F,"ctr")),1))]),impressions:l(({row:F})=>[F.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",ea,g(le(F,"impressions")),1))]),position:l(({row:F})=>[F.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",ta,g(le(F,"position")),1))]),history:l(({row:F})=>[F.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",oa,[ne(F).length?(i(),_(S(St),{key:0,series:ne(F),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:O=>parseFloat(O).toFixed(2)}}}},null,8,["series","chart-overrides"])):m("",!0)]))]),tracking:l(({row:F,index:O})=>[y.value[O]?(i(),_(S(Oe),{key:0,dark:""})):m("",!0),d($,{modelValue:F.tracking,"onUpdate:modelValue":[H=>F.tracking=H,H=>q(F,O,H)],disabled:!!y.value[O]},null,8,["modelValue","onUpdate:modelValue","disabled"])]),view:l(({row:F})=>[F.id?(i(),k("div",sa,[u("a",{href:de(F),target:"_blank"},[d(S(fe),{type:"action",offset:"-80px,0"},{tooltip:l(()=>[T(g(s.openInKrt),1)]),default:l(()=>[d(S(je))]),_:1})],8,ra)])):m("",!0)]),_:1},8,["columns","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},na={key:0,class:"keyword-rank-tracker-container"},ia=["innerHTML"],aa={class:"keyword-rank-tracker-container__card"},la={class:"keyword-rank-tracker-container__card__header"},ca={class:"keyword-rank-tracker-container__card__body"},da=["innerHTML"],ua={class:"keyword-rank-tracker-container__card"},pa={class:"keyword-rank-tracker-container__card__header"},ha={class:"keyword-rank-tracker-container__card__body"},ut="320px",ga={__name:"KeywordRankTracker",setup(o){xo(b=>({af7a239a:ut}));const e="all-in-one-seo-pack",r=Ze(),t=_e(),s=ye(),a=Jt(),h=Z.getDocLink(n("Learn More",e),"keywordRankTracker",!0),{connect:c,loading:y}=Ls(),v={...As().strings,withAioseo:n("Below you can track how your page is performing in search results based on your keyword(s).",e),keywordPositions:n("Keyword Positions",e),sampleDataAlert:n("Sample data is available for you to explore. Connect your site to Google Search Console to receive insights on how content is being discovered. Identify areas for improvement and drive traffic to your website.",e),connectToGsc:n("Connect to Google Search Console",e),unlockSs:n("Unlock Search Statistics",e)},P=ke(()=>!t.isUnlicensed&&Ue.hasCoreFeature("search-statistics")&&(!a.isConnected||a.unverifiedSite)),x=ke(()=>({rows:r.keywords.all.rows.slice(0,3).map(b=>({...b,tracking:!0}))})),C=ke(()=>{var z;const b={};for(const K of x.value.rows)(z=K==null?void 0:K.statistics)!=null&&z.history&&(b[K.name]=K);const A=[];for(const K in b)A.push({name:K,data:b[K].statistics.history.map(se=>({x:se.date,y:se.position}))});return A});return(b,A)=>{const z=p("base-button");return i(),k("div",null,[S(a).shouldShowSampleReports?(i(),k("div",na,[d(S(ve),{type:"yellow"},{default:l(()=>[u("span",null,g(v.sampleDataAlert),1),u("div",null,[P.value?(i(),_(z,{key:0,type:"green",size:"small",onClick:S(c),loading:S(y)},{default:l(()=>[T(g(v.connectToGsc),1)]),_:1},8,["onClick","loading"])):(i(),_(z,{key:1,tag:"a",href:S(Z).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),target:"_blank",type:"green",size:"small",loading:S(y)},{default:l(()=>[T(g(v.unlockSs),1)]),_:1},8,["href","loading"]))])]),_:1}),u("div",null,[u("span",null,g(v.withAioseo),1),T(),u("span",{innerHTML:S(h)},null,8,ia)]),u("div",aa,[u("div",la,g(v.keywordPositions),1),u("div",ca,[d(S(St),{height:parseInt(ut),series:C.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:K=>parseFloat(K).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(S(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])])):(i(),k(Ce,{key:1},[d(S(tt),{class:"keyword-rank-tracker-container"},{default:l(()=>[u("div",null,[u("span",null,g(v.withAioseo),1),T(),u("span",{innerHTML:S(h)},null,8,da)]),u("div",ua,[u("div",pa,g(v.keywordPositions),1),u("div",ha,[d(S(St),{height:parseInt(ut),series:C.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:K=>parseFloat(K).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(S(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])]),_:1}),P.value?(i(),_(S(Is),{key:0})):(i(),_(S(Lt),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:S(a).showSampleReports,"cta-link":S(Z).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),"button-text":v.ctaButtonText,"second-button-text":v.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":S(Z).getUpsellUrl("search-statistics","keyword-rank-tracker",S(s).isPro?"pricing":"liteUpgrade"),"feature-list":[v.feature1,v.feature2,v.feature3,v.feature4],"align-top":"","hide-bonus":!S(t).isUnlicensed},{"header-text":l(()=>[T(g(v.ctaHeader),1)]),description:l(()=>[d(S(co),{"core-feature":["search-statistics"]}),T(" "+g(v.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))])}}},Vt=M(ga,[["__scopeId","data-v-cfc6c999"]]),ma={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=_e(),s=Jt(),a=e,h={headerTitle:n("Keyword Performance Tracking",r)},c=ke(()=>s.isConnected&&!s.unverifiedSite);return(y,v)=>(i(),_(S(Ie),{show:o.modalOpen,onClose:v[0]||(v[0]=P=>a("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:l(()=>[T(g(h.headerTitle),1)]),body:l(()=>[u("div",{class:J(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":S(s).shouldShowSampleReports}])},[!S(t).isUnlicensed&&S(Ue).hasCoreFeature("search-statistics","keyword-rank-tracker")&&c.value?(i(),_(S(Vt),{key:0})):(i(),_(S(Vt),{key:1}))],2)]),_:1},8,["show"]))}},_a={},ya={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},fa=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),Sa=[fa];function ka(o,e){return i(),k("svg",ya,Sa)}const It=M(_a,[["render",ka]]),pt="all-in-one-seo-pack",va={setup(){return{postEditorStore:Q()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Link Assistant",pt),description:n("Here you can view an overview of your existing links as well as find suggestions for new internal links. Click on the button below to view the Link Assistant panel.",pt),button:n("Open Link Assistant",pt)}}}},ba={class:"aioseo-link-assistant-sidebar"},wa={class:"aioseo-sidebar-content-title"};function Ca(o,e,r,t,s,a){const h=p("svg-right-arrow-short"),c=p("base-button"),y=p("core-settings-row");return i(),k("div",ba,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:l(()=>[u("div",wa,g(s.strings.title),1),u("p",null,g(s.strings.description),1),d(c,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=v=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:l(()=>[d(h),T(" "+g(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const Pa=M(va,[["render",Ca]]),Ea=()=>{const o=(e,r)=>{const t=De(r);let s=null;return e.forEach(a=>{if(s||!a.attributes)return;if(a.attributes.content&&a.attributes.content.search(t)!==-1){s=a.clientId;return}if(!a.innerBlocks)return;const h=o(a.innerBlocks,r);h&&(s=h)}),s};return{findTargetBlock:o}},be="all-in-one-seo-pack",xa=(o={})=>{const{emit:e,linkType:r,linksReport:t,metabox:s,pageNumber:a,post:h,postIndex:c,postReport:y,refreshTable:v=()=>{},wpTableLoading:P}=o,x=we(""),C="linkAssistantPostsReport",b=we([]),A=we(!1),z=ke(()=>{if(!s)return h.links[r].rows;const O=a.value===1?0:(a.value-1)*10;return h.links[r].rows.slice(O,O+10)}),K={frontPage:n("Front Page",be),deleteLink:n("Delete Link",be)},se={areYouSureSingle:n("Are you sure you want to delete this link?",be),areYouSureMultiple:n("Are you sure you want to delete these links?",be),areYouSureAll:n("Are you sure you want to delete all links?",be),actionCannotBeUndone:n("This action cannot be undone.",be),yesSingle:n("Yes, I want to delete this link",be),yesMultiple:n("Yes, I want to delete these links",be),yesAll:n("Yes, I want to delete all links",be),noChangedMind:n("No, I changed my mind",be)},ae=[{label:n("Delete",be),value:"delete"}],re=Io(),B=Q(),W=O=>{window.aioseoBus.$emit("updatingLinks",!0);const H={...O,additionalFilters:{postId:h.ID||B.currentPost.id,postIndex:c,type:r}};return re[y?"fetchPostReport":"fetchLinksReportInner"](H).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},le=O=>{window.location.href=`#/post-report?postId=${h.ID}&postIndex=${c}&initialTab=${O}`},ne=({action:O,selectedRows:H})=>{!H.length||!O||(x.value=O,b.value=H,A.value=!0)},de=()=>{if(A.value=!1,!!b.value.length){if(typeof b.value=="number"){q(b.value);return}if(s&&r!=="inboundInternal"){F(b.value).forEach(H=>{G(H)});return}window.aioseoBus.$emit("updatingLinks",!0),re.linksBulk({postIndex:c,postId:h.ID||B.currentPost.id,action:x.value,linkType:r,linkIds:b.value,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),v()})}},q=O=>{const H=h.links[r].rows[O].id;if(H){if(s&&r!=="inboundInternal"){G(O);return}window.aioseoBus.$emit("updatingLinks",!0),re.linkDelete({postIndex:c,postId:h.ID||B.currentPost.id,linkId:H,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),v()})}},G=O=>{Ye()&&(window.aioseoBus.$emit("updatingLinks",!1),ee(O),window.aioseoBus.$emit("updatingLinks",!1)),Zt()&&$(O)},ee=O=>{const H=B.currentPost.linkAssistant.links[r].rows[O];if(!H)return;window.aioseoBus.$emit("updatingLinks",!0);const te=De(H.anchor.trim()),U=H.phrase_html.trim(),f=De(U),w=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:E}=Ea(),L=E(w,U);if(!L){window.aioseoBus.$emit("updatingLinks",!1);return}const I=window.wp.data.select("core/block-editor").getBlock(L);if(!I){window.aioseoBus.$emit("updatingLinks",!1);return}let V=new RegExp(`(<t?a[^<>]*>)(.*)?(${te})(.*)?(</t?a[^<>]*>)`,"i");const R=U.replace(V,"$2$3$4");V=new RegExp(`${f}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(L,{content:I.attributes.content.replace(V,R)}).then(()=>{h.links[r].rows.splice(O,1)}).catch(N=>{console.error(`Couldn delete link with type "${r}" and index ${O}:`,N)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},$=O=>{var R;const H=B.currentPost.linkAssistant.links[r].rows[O];if(!H||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let te="",U=null,f=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(U=window.tinyMCE.get("content"),te=U.getContent({format:"raw"})):(f=document.querySelector("textarea#content"),te=f?f.value:""),!te){window.aioseoBus.$emit("updatingLinks",!1);return}let w=H.phrase_html.trim();U||(w=w.replace(/(\sdata-mce-href=".*")/gi,""));const E=De(H.anchor.trim());let L=new RegExp(`(<t?a[^<>]*>)(.*)?(${E})(.*)?(</t?a[^<>]*>)`,"i");const I=w.replace(L,"$2$3$4"),V=De(w);L=new RegExp(`${V}`,"i"),te=te.replace(L,I),U?U.setContent(te):f.value=te,h.links[r].rows.splice(O,1),(R=re.postSettingsUpdate({postContent:te}))==null||R.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},F=O=>{let H,te=[];return Array.isArray(O)&&(H=O.map(Number)),H&&h.links[r].rows.forEach((U,f)=>{H.includes(U.id)&&te.push(f)}),O==="all"&&(te=h.links[r].rows.map((U,f)=>f)),te.sort(function(U,f){return f-U})};return $t(()=>{window.aioseoBus.$on("updatingLinks",O=>{P.value=O}),a.value=re.postReport[r].totals.page}),{bulkOptions:ae,changeItemsPerPageSlug:C,doBulkAction:de,fetchData:W,maybeDoBulkAction:ne,modalStrings:se,openPostReport:le,rows:z,selectedRows:b,showModal:A,strings:K}},Ta={emits:["closeModal","doBulkAction"],components:{CoreModal:Ie,SvgClose:vt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0},show:Boolean},computed:{areYouSure(){return this.selectedRows==="all"?this.strings.areYouSureAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.areYouSureMultiple:this.strings.areYouSureSingle},confirmation(){return this.selectedRows==="all"?this.strings.yesAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.yesMultiple:this.strings.yesSingle}}},Aa={class:"aioseo-modal-body"},La=["innerHTML"];function Ia(o,e,r,t,s,a){const h=p("svg-close"),c=p("base-button"),y=p("core-modal");return i(),_(y,{show:r.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=v=>o.$emit("closeModal",!0))},{body:l(()=>[u("div",Aa,[u("button",{class:"close",onClick:e[1]||(e[1]=pe(v=>o.$emit("closeModal",!0),["stop"]))},[d(h,{onClick:e[0]||(e[0]=v=>o.$emit("closeModal",!0))})]),u("h3",null,g(a.areYouSure),1),u("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,La),d(c,{type:"blue",size:"medium",onClick:e[2]||(e[2]=v=>o.$emit("doBulkAction",v))},{default:l(()=>[T(g(a.confirmation),1)]),_:1}),d(c,{type:"gray",size:"medium",onClick:e[3]||(e[3]=v=>o.$emit("closeModal",!0))},{default:l(()=>[T(g(r.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const Ma=M(Ta,[["render",Ia]]),Oa={components:{CoreTooltip:fe},props:{phrase:{type:String,required:!0},phraseHtml:{type:String,required:!0},anchor:{type:String,required:!0},url:{type:String,required:!0},tooltip:{type:Boolean,required:!1,default:!0},clickableAnchor:{type:Boolean,default(){return!1}}},computed:{partPattern(){const o=Ve.decode(this.anchor),e=De(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return Ve.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return Ve.decode(this.stripTags(this.getPart(2)))},lastPart(){return Ve.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const r=Ve.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return r?r[o]:""},stripTags(o,e=!1){return o=o.replace(/<br\s?\/?>/gi," "),e?o.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):o.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},Da={class:"phrase"},Ba={key:0,class:"first"},Ra=["href"],Ha={key:2},Ua={class:"anchor"},Ka={key:3,class:"last"};function Va(o,e,r,t,s,a){const h=p("core-tooltip");return i(),k("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=c=>o.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=c=>o.$emit("mouseLeave"))},[u("span",Da,[a.firstPart?(i(),k("span",Ba,g(a.firstPart),1)):m("",!0),r.tooltip?(i(),_(h,{key:1,type:"action"},{tooltip:l(()=>[u("a",{class:"tooltip-url",href:r.url,target:"_blank"},g(r.url),9,Ra)]),default:l(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...c)=>a.maybeOpenLink&&a.maybeOpenLink(...c))},g(a.linkAnchor),1)]),_:1})):m("",!0),r.tooltip?m("",!0):(i(),k("div",Ha,[u("span",Ua,g(a.linkAnchor),1)])),a.lastPart?(i(),k("span",Ka,g(a.lastPart),1)):m("",!0)]),Te(o.$slots,"icons")],32)}const Fa=M(Oa,[["render",Va]]),Na={},Ga={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},za=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.66699 7.43742H4.33366C2.95866 7.43742 1.83366 6.31242 1.83366 4.93742C1.83366 3.56242 2.95866 2.43742 4.33366 2.43742H7.66699V0.770752H4.33366C2.03366 0.770752 0.166992 2.63742 0.166992 4.93742C0.166992 7.23742 2.03366 9.10408 4.33366 9.10408H7.66699V7.43742ZM12.667 0.770752H9.33366V2.43742H12.667C14.042 2.43742 15.167 3.56242 15.167 4.93742C15.167 6.31242 14.042 7.43742 12.667 7.43742H9.33366V9.10408H12.667C14.967 9.10408 16.8337 7.23742 16.8337 4.93742C16.8337 2.63742 14.967 0.770752 12.667 0.770752ZM11.8337 4.10409H5.16699V5.77075H11.8337V4.10409Z",fill:"currentColor"},null,-1),qa=[za];function ja(o,e){return i(),k("svg",Ga,qa)}const Mt=M(Na,[["render",ja]]),Wa={key:0},$a={key:0,class:"row-actions"},Ya={class:"view"},Za=["href"],Xa={class:"edit"},Ja=["href"],Qa={key:0,class:"links-bottom"},el={class:"links-bottom-left"},tl={key:1},ol={class:"links-bottom-right"},sl="inboundInternal",Ft="aioseo-post-report-inbound-internal",rl={__name:"InboundInternal",props:{post:{type:Object,required:!0},postIndex:{type:Number,required:!1},postId:{type:Number,required:!1},linksReport:{type:Boolean,default(){return!1}},postReport:{type:Boolean,default(){return!1}},metabox:{type:Boolean,default(){return!1}}},emits:["linksUpdated","openSuggestions"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=ye(),s=xe(),a=o,h=e,c=we(1),y=we(!1),{bulkOptions:v,changeItemsPerPageSlug:P,doBulkAction:x,fetchData:C,maybeDoBulkAction:b,modalStrings:A,openPostReport:z,rows:K,selectedRows:se,showModal:ae,strings:re}=xa({emit:h,linkType:sl,linksReport:a.linksReport,metabox:a.metabox,pageNumber:c,post:a.post,postIndex:a.postIndex,postReport:a.postReport,refreshTable:()=>de(),wpTableLoading:y}),{editPost:B,viewPost:W}=Os(),{processChangeItemsPerPage:le,processFetchTableData:ne,refreshTable:de,wpTableKey:q}=ao({changeItemsPerPageSlug:P,fetchData:C,pageNumber:c,tableId:Ft,wpTableLoading:y}),G=Xt(re,{deleteAllLinks:D(n("Delete All %1$s Links",r),n("Inbound Internal",r)),outboundSuggestions:D(n("%1$s Link Suggestions",r),n("Inbound",r))}),ee=ke(()=>[{slug:"post_title",label:n("Post Title",r)},{slug:"phrase",label:n("Phrase",r)},{slug:"delete",width:"50px"}]),$=ke(()=>D(n("See All %1$s %2$s Links",r),a.post.links.inboundInternal.totals.total,n("Inbound Internal",r))),F=O=>{c.value=O,!a.metabox&&(y.value=!0,ne().then(()=>y.value=!1))};return(O,H)=>{const te=p("base-button");return i(),k("div",null,[(i(),_(S(lo),{id:Ft,key:S(q),class:J({"link-assistant-inner-table":!o.postReport}),columns:ee.value,loading:y.value,rows:S(K),totals:o.post.links.inboundInternal.totals,"bulk-options":S(v),"initial-items-per-page":S(s).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":c.value,"show-pagination":!o.linksReport,"show-search":!1,"show-table-footer":o.postReport,"show-items-per-page":"",onPaginate:F,onProcessBulkAction:S(b),onProcessChangeItemsPerPage:S(le)},{post_title:l(({row:U})=>{var f,w;return[u("span",null,[T(g(U.context.postTitle)+" ",1),((w=(f=U.context)==null?void 0:f.permalink)==null?void 0:w.replace(/\/$/,""))===S(t).aioseo.urls.home?(i(),k("span",Wa,"("+g(S(G).frontPage)+")",1)):m("",!0)]),U.context?(i(),k("div",$a,[u("span",Ya,[u("a",{href:U.context.permalink,target:"_blank"},g(S(W)(U.context.postType.singular)),9,Za),T(" | ")]),u("span",Xa,[u("a",{href:U.context.editLink,target:"_blank"},g(S(B)(U.context.postType.singular)),9,Ja)])])):m("",!0)]}),phrase:l(({row:U})=>[d(S(Fa),{phrase:U.phrase,phraseHtml:U.phrase_html||"",anchor:U.anchor,url:U.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:l(({row:U})=>[d(S(fe),{type:"action"},{tooltip:l(()=>[T(g(S(G).deleteLink),1)]),default:l(()=>[d(S(et),{onClick:f=>S(b)({action:"delete",selectedRows:[U.id]})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onProcessBulkAction","onProcessChangeItemsPerPage"])),o.postReport?m("",!0):(i(),k("div",Qa,[u("div",el,[o.post.links.inboundInternal.rows.length?(i(),_(te,{key:0,type:"blue",tag:"button",onClick:H[0]||(H[0]=U=>h("openSuggestions"))},{default:l(()=>[d(S(Mt)),T(" "+g(S(G).outboundSuggestions),1)]),_:1})):m("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(i(),k("div",tl,[d(S(po)),u("a",{class:"link-view",href:"#",onClick:H[1]||(H[1]=pe(U=>S(z)("inbound-internal"),["prevent"]))},g($.value),1)])):m("",!0)]),u("div",ol,[o.post.links.inboundInternal.rows.length?(i(),k("a",{key:0,class:"link-delete",onClick:H[2]||(H[2]=pe(U=>S(b)({action:"delete",selectedRows:"all"}),["prevent"]))},g(S(G).deleteAllLinks),1)):m("",!0)])])),d(S(Ma),{show:S(ae),selectedRows:S(se),strings:S(A),onDoBulkAction:S(x),onCloseModal:H[3]||(H[3]=U=>ae.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},ge="all-in-one-seo-pack",nl={setup(){return{licenseStore:_e(),postEditorStore:Q(),rootStore:ye(),links:Z}},components:{CoreAlert:ve,CoreBlur:tt,CoreMainTabs:Be,CoreModal:Ie,Cta:Lt,LinkAssistantInboundInternal:rl,LinksSideBar:Pa,SvgLinkAffiliate:Ds,SvgLinkExternal:po,SvgLinkInternalInbound:Bs,SvgLinkInternalOutbound:Rs,SvgLinkSuggestion:Mt,RequiredPlans:co},props:{parentComponentContext:String},data(){return{activeTab:"inbound-internal",activeSuggestionTab:"suggestions-inbound",mockedPostData:{links:{inboundInternal:{rows:[{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"AIOSEO also allows you to create video sitemaps and comes with tons of different SEO tools.",anchor:"video sitemaps",url:"#",context:{postTitle:"How to Create WordPress Image Sitemap",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"You may also want to check out how to name your image files for SEO in WordPress and write alt text for images.",anchor:"how to name your image files for SEO in WordPress",url:"#",context:{postTitle:"What’s the Best Image Format for Your Website?",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"To learn more, please check out our post on image SEO: how to best optimize your images in WordPress. ",anchor:"image SEO",url:"#",context:{postTitle:"How to Write Alt Text for Images for SEO",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"So let’s now move on to showing you exactly how easy it is to import and export redirects using the best redirect plugin for WordPress.",anchor:"best redirect plugin for WordPress",url:"#",context:{postTitle:"How to Easily Import and Export Redirects in WordPress",permalink:"#",editLink:"#",postType:{singular:"Post"}}}],totals:{total:6}},outboundInternal:{totals:{total:12}},affiliate:{totals:{total:8}},external:{totals:{total:24}},suggestionsInbound:{totals:{total:9}},suggestionsOutbound:{totals:{total:9}}}},strings:{ctaButtonText:n("Unlock Link Assistant",ge),ctaHeader:D(n("Link Assistant is a %1$s Feature",ge),"PRO"),linkAssistantDescription:n("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",ge),thisFeatureRequires:n("This feature requires one of the following plans:",ge),linkOpportunities:n("Actionable Link Suggestions",ge),orphanedPosts:n("See Orphaned Posts",ge),affiliateLinks:n("See Affiliate Links",ge),domainReports:n("Top Domain Reports",ge)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:D("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,n("Inbound Internal",ge))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:D("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,n("Outbound Internal",ge))},{slug:"affiliate",icon:"svg-link-affiliate",name:D("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,n("Affiliate",ge))},{slug:"external",icon:"svg-link-external",name:D("%1$s %2$s",this.mockedPostData.links.external.totals.total,n("External",ge))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:D("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,n("Link Suggestions",ge))}]},modalHeader(){return D(n('Links & Suggestions for "%1$s"',ge),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},il={class:"aioseo-tab-content aioseo-link-assistant"},al={key:0};function ll(o,e,r,t,s,a){const h=p("core-main-tabs"),c=p("link-assistant-inbound-internal"),y=p("core-blur"),v=p("required-plans"),P=p("cta"),x=p("core-modal"),C=p("links-side-bar");return i(),k("div",il,[o.$root.$data.screenContext==="metabox"?(i(),k("div",al,[d(y,null,{default:l(()=>[d(h,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:b})=>[(i(),_(Se(b.icon),{class:J([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(c,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(P,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":l(()=>[T(g(s.strings.ctaHeader),1)]),description:l(()=>[d(v,{addon:"aioseo-link-assistant"}),T(" "+g(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):m("",!0),d(x,{show:t.postEditorStore.currentPost.linkAssistant.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=b=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:l(()=>[T(g(a.modalHeader),1)]),body:l(()=>[d(y,null,{default:l(()=>[d(h,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:b})=>[(i(),_(Se(b.icon),{class:J([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(c,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(P,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":l(()=>[T(g(s.strings.ctaHeader),1)]),description:l(()=>[d(v,{addon:"aioseo-link-assistant"}),T(" "+g(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(C,{key:1})):m("",!0)])}const Nt=M(nl,[["render",ll]]),cl={};function dl(o,e){return i(),k("div")}const ul=M(cl,[["render",dl]]),pl={setup(){return{addons:uo,licenseStore:_e()}},components:{Links:Nt,LinksActivate:ul,LinksLite:Nt},props:{parentComponentContext:String}},hl={class:"aioseo-tab-content aioseo-link-assistant"};function gl(o,e,r,t,s,a){const h=p("Links",!0),c=p("LinksLite"),y=p("LinksActivate");return i(),k("div",hl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-link-assistant")&&t.addons.canActivate("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(y,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const ml=M(pl,[["render",gl]]),Ne="all-in-one-seo-pack",ko=()=>{const o=ke(()=>[{groupLabel:n("Default",Ne),options:[{label:n("Default Object Type (Set in Social Networks)",Ne),value:"default"}]}].concat(qo)),e=[{label:n("Default (Set under Social Networks)",Ne),value:"default"},{label:n("Summary",Ne),value:"summary"},{label:n("Summary with Large Image",Ne),value:"summary_large_image"}];return{getObjectTypeLabelByOption:s=>{let a="";return o.value.forEach(h=>{const c=h.options.find(y=>y.value===s);c&&(a=(c==null?void 0:c.label)||"")}),a},getTwitterCardLabelByOption:s=>{var a;return((a=e.find(h=>h.value===s))==null?void 0:a.label)||""},objectTypeOptions:o,twitterCardOptions:e}},ie="all-in-one-seo-pack",_l={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,setImageUrl:a}=ho(),{maxRecommendedCount:h}=Ct(),{objectTypeOptions:c}=ko(),{parseTags:y}=wt({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,maxRecommendedCount:h,objectTypeOptions:c,optionsStore:Ae(),parseTags:y,postEditorStore:Q(),rootStore:ye(),setImageUrl:a}},components:{CoreAlert:ve,CoreFacebookPreview:Hs,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,strings:{tabName:n("Facebook Preview",ie),imageSource:n("Image Source",ie),customFieldsName:n("Custom Field Name",ie),video:n("Video URL",ie),width:n("Width",ie),height:n("Height",ie),facebookObjectType:n("Object Type",ie),facebookImage:n("Facebook Image",ie),facebookTitle:n("Facebook Title",ie),facebookDescription:n("Facebook Description",ie),minimumSize:n("Minimum size: 200px x 200px, ideal ratio 1.91:1, 5MB max. (eg: 1640px x 856px or 3280px x 1712px for Retina screens). JPG, PNG, WEBP and GIF formats only.",ie),clickToAddSiteName:n("Click on the tags below to insert variables into your site name.",ie),clickToAddHomePageDescription:n("Click on the tags below to insert variables into your meta description.",ie),articleSection:n("Article Section",ie),articleTags:n("Article Tags",ie),tagPlaceholder:n("Press enter to create an article tag",ie),facebookDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",ie),n("Open Graph",ie),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",n("Go to Social Networks",ie)))}}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){return this.parseTags(this.postEditorStore.currentPost.og_title||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){return this.parseTags(this.postEditorStore.currentPost.og_description||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},shouldShowArticleSection(){var e;const o=this.postEditorStore.currentPost.context==="term"?"taxonomies":"postTypes";return this.postEditorStore.currentPost.og_object_type==="article"||this.postEditorStore.currentPost.og_object_type==="default"&&((e=this.optionsStore.dynamicOptions.social.facebook.general[o][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType])==null?void 0:e.objectType)==="article"}},methods:{scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveImageType(o){this.postEditorStore.currentPost.og_image_type=o,this.postEditorStore.isDirty=!0},getObjectTypeOptions(o){let e=null;return this.objectTypeOptions.forEach(r=>{const t=r.options.find(s=>s.value===o);t&&(e=t)}),e},setObjectType(o){this.postEditorStore.currentPost.og_object_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.og_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("facebook")}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},yl={class:"tab-facebook"},fl={id:"aioseo-post-settings-facebook"},Sl=["innerHTML"],kl=["innerHTML"];function vl(o,e,r,t,s,a){const h=p("core-alert"),c=p("core-facebook-preview"),y=p("core-settings-row"),v=p("core-html-tags-editor"),P=p("base-select"),x=p("base-input"),C=p("core-image-uploader");return i(),k("div",yl,[d(y,{class:"snippet-preview-row"},{name:l(()=>[u("span",null,g(s.strings.tabName),1)]),content:l(()=>[t.optionsStore.options.social.facebook.general.enable?m("",!0):(i(),_(h,{key:0,class:"facebook-disabled-warning",innerHTML:s.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),d(c,{description:a.previewDescription,image:t.imageUrl,loading:t.loading,title:a.previewTitle},null,8,["description","image","loading","title"])]),_:1}),u("div",fl,[d(y,{name:s.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:l(()=>[d(v,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=b=>t.postEditorStore.currentPost.og_title=b),e[2]||(e[2]=b=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=b=>s.titleCount=b.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":l(()=>[T(g(s.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,95)},null,8,Sl)]),_:1},8,["name"]),d(y,{name:s.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:l(()=>[d(v,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=b=>t.postEditorStore.currentPost.og_description=b),e[5]||(e[5]=b=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=b=>s.descriptionCount=b.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[T(g(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,kl)]),_:1},8,["name"]),d(y,{class:"facebook-image-source",name:s.strings.imageSource,align:""},{content:l(()=>[d(P,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=b=>a.saveImageType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.og_image_type==="custom"?(i(),_(y,{key:0,name:s.strings.customFieldsName,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=b=>t.postEditorStore.currentPost.og_image_custom_fields=b),e[8]||(e[8]=b=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),t.postEditorStore.currentPost.og_image_type==="custom_image"?(i(),_(y,{key:1,class:"facebook-image",name:s.strings.facebookImage},{content:l(()=>[d(C,{description:s.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=b=>t.postEditorStore.currentPost.og_image_custom_url=b)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(y,{class:"facebook-video",name:s.strings.video,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=b=>t.postEditorStore.currentPost.og_video=b)},null,8,["modelValue"])]),_:1},8,["name"]),d(y,{class:"facebook-object-type",name:s.strings.facebookObjectType,align:""},{content:l(()=>[d(P,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:a.getObjectTypeOptions(t.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=b=>a.setObjectType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),a.shouldShowArticleSection?(i(),_(y,{key:2,name:s.strings.articleSection,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=b=>t.postEditorStore.currentPost.og_article_section=b)},null,8,["modelValue"])]),_:1},8,["name"])):m("",!0),a.shouldShowArticleSection?(i(),_(y,{key:3,name:s.strings.articleTags,align:""},{content:l(()=>[d(P,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=b=>t.postEditorStore.currentPost.og_article_tags=b),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])])}const bl=M(_l,[["render",vl]]),me="all-in-one-seo-pack",wl={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,setImageUrl:s}=ho(),{maxRecommendedCount:a}=Ct(),{twitterCardOptions:h}=ko(),{parseTags:c}=wt({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,maxRecommendedCount:a,optionsStore:Ae(),parseTags:c,postEditorStore:Q(),rootStore:ye(),setImageUrl:s,twitterCardOptions:h}},components:{CoreAlert:ve,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe,CoreTwitterPreview:Us},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:n("X (Twitter) Preview",me),twitterPreviewDescription:n("X cards by default will use the data defined below. If no data is set, X will instead pick up the data set on the Facebook tab.",me),useFB:n("Use Data from Facebook Tab",me),imageSource:n("Image Source",me),customFieldsName:n("Custom Field Name",me),twitterImage:n("X Image",me),twitterTitle:n("X Title",me),twitterDescription:n("X Description",me),twitterCardType:n("X Card Type",me),minimumSizeSummary:n("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",me),minimumSizeSummaryWithLarge:n("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",me),twitterDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",me),n("X (Twitter)",me),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",n("Go to Social Networks",me)))}}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_title?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(o||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_description?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(o||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},previewImage(){return this.postEditorStore.currentPost.twitter_use_og||!this.imageUrl?this.facebookImageUrl:this.imageUrl},twitterImageUploaderDescription(){return this.postEditorStore.currentPost.twitter_card==="summary"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary"?this.strings.minimumSizeSummary:this.postEditorStore.currentPost.twitter_card==="summary_large_image"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?this.strings.minimumSizeSummaryWithLarge:""}},methods:{getCardOptions(o){return this.twitterCardOptions.find(e=>e.value===o)},cardSelect(o){this.postEditorStore.currentPost.twitter_card=o,this.postEditorStore.isDirty=!0},scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveTwitterImageType(o){this.postEditorStore.currentPost.twitter_image_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.twitter_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(o){o.social==="facebook"&&(this.facebookImageUrl=o.image)}},mounted(){window.aioseoBus.$on("updateSocialImagePreview",this.updateImagePreview),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate),this.scrollToElement(),this.setImageUrl("facebook").then(()=>{this.setImageUrl("twitter")})},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate),window.aioseoBus.$off("updateSocialImagePreview",this.updateImagePreview)}},Cl={class:"tab-twitter"},Pl={id:"aioseo-post-settings-twitter"},El=["innerHTML"],xl=["innerHTML"];function Tl(o,e,r,t,s,a){const h=p("core-alert"),c=p("core-twitter-preview"),y=p("core-settings-row"),v=p("base-toggle"),P=p("core-html-tags-editor"),x=p("base-select"),C=p("base-input"),b=p("core-image-uploader");return i(),k("div",Cl,[d(y,{class:"snippet-preview-row"},{name:l(()=>[u("span",null,g(s.strings.twitterPreview),1)]),description:l(()=>[u("i",null,g(s.strings.twitterPreviewDescription),1)]),content:l(()=>[t.optionsStore.options.social.twitter.general.enable?m("",!0):(i(),_(h,{key:0,class:"twitter-disabled-warning",innerHTML:s.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),d(c,{card:t.postEditorStore.currentPost.twitter_card,description:a.previewDescription,image:a.previewImage,loading:t.loading,title:a.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),u("div",Pl,[d(y,{name:s.strings.useFB,class:"use-facebook"},{content:l(()=>[d(v,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=A=>t.postEditorStore.currentPost.twitter_use_og=A),e[1]||(e[1]=A=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:0,name:s.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:l(()=>[d(P,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=A=>t.postEditorStore.currentPost.twitter_title=A),e[4]||(e[4]=A=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=A=>s.titleCount=A.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,70)},null,8,El)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:1,name:s.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:l(()=>[d(P,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=A=>t.postEditorStore.currentPost.twitter_description=A),e[7]||(e[7]=A=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=A=>s.descriptionCount=A.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[T(g(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,xl)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:2,class:"twitter-image-source",name:s.strings.imageSource,align:""},{content:l(()=>[d(x,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=A=>a.saveTwitterImageType(A.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom"?(i(),_(y,{key:3,class:"twitter-custom-field",name:s.strings.customFieldsName,align:""},{content:l(()=>[d(C,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=A=>t.postEditorStore.currentPost.twitter_image_custom_fields=A),e[10]||(e[10]=A=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom_image"?(i(),_(y,{key:4,class:"twitter-image",name:s.strings.twitterImage},{content:l(()=>[d(b,{description:a.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=A=>t.postEditorStore.currentPost.twitter_image_custom_url=A)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(y,{class:"twitter-card-type",name:s.strings.twitterCardType,align:""},{content:l(()=>[d(x,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:a.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=A=>a.cardSelect(A.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Al=M(wl,[["render",Tl]]),ht="all-in-one-seo-pack",Ll={setup(){return{postEditorStore:Q(),settingsStore:xe()}},components:{CoreSettingsRow:Pe,SvgPencil:bt},data(){return{strings:{title:n("Social Media",ht),sidebarCopy:n("Here you can view and edit the thumbnail, title and description that will be displayed when your site is shared on social media. Click on the button below to view and edit the preview.",ht),editSnippet:n("Preview & Edit",ht)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},Il={class:"aioseo-sidebar-content-title"};function Ml(o,e,r,t,s,a){const h=p("svg-pencil"),c=p("base-button"),y=p("core-settings-row");return o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,name:s.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:l(()=>[u("div",Il,g(s.strings.title),1),u("p",null,g(s.strings.sidebarCopy),1),d(c,{class:"open-social-modal gray small",onClick:a.openModalEv},{default:l(()=>[d(h),T(" "+g(s.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):m("",!0)}const Ol=M(Ll,[["render",Ml]]),gt="all-in-one-seo-pack",Dl={setup(){return{postEditorStore:Q(),settingsStore:xe()}},components:{BaseRadioToggle:no,CoreMainTabs:Be,CoreSettingsRow:Pe,Facebook:bl,Twitter:Al,SocialSideBar:Ol},props:{parentComponentContext:String},data(){return{strings:{pageName:n("Social",gt)},tabs:[{slug:"facebook",name:n("Facebook",gt)},{slug:"twitter",name:n("X (Twitter)",gt)}]}},computed:{initTab:function(){let o=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(o=this.settingsStore.metaBoxTabs.socialModal),o}},methods:{processChangeTab(o){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:o}):this.settingsStore.changeTabSettings({setting:"social",value:o})}},mounted(){qe()["social-tab"]&&(this.processChangeTab(qe()["social-tab"]),setTimeout(()=>{ft("social-tab")},500))}},Bl={class:"aioseo-tab-content aioseo-post-social"};function Rl(o,e,r,t,s,a){const h=p("core-main-tabs"),c=p("core-settings-row"),y=p("social-side-bar");return i(),k("div",Bl,[o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(c,{key:0,"no-border":""},{content:l(()=>[d(h,{tabs:s.tabs,showSaveButton:!1,active:a.initTab,internal:"",onChanged:e[0]||(e[0]=v=>a.processChangeTab(v)),disableMobile:""},null,8,["tabs","active"])]),_:1})):m("",!0),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(ze,{key:1,name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(Se(a.initTab)))]),_:1})):m("",!0),r.parentComponentContext!=="modal"?(i(),_(y,{key:2})):m("",!0)])}const vo=M(Dl,[["render",Rl]]),mt="all-in-one-seo-pack",Hl={setup(){return{settingsStore:xe()}},components:{CoreMainTabs:Be,CoreSettingsRow:Pe,General:So,Social:vo,SvgSettings:io,SvgShare:_o},data(){return{strings:{pageName:n("Modal Content",mt)},tabs:[{slug:"general",icon:"svg-settings",name:n("General",mt)},{slug:"social",icon:"svg-share",name:n("Social",mt)}]}},computed:{getTabs(){return this.tabs.filter(o=>Le(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},Ul={class:"aioseo-modal-content"},Kl={class:"mobile-radio-buttons"},Vl={class:"component-wrapper"};function Fl(o,e,r,t,s,a){const h=p("core-main-tabs");return i(),k("div",Ul,[u("div",Kl,[d(h,{tabs:a.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=c=>a.processChangeTab(c))},null,8,["tabs","active"])]),u("div",Vl,[d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(Se(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Nl=M(Hl,[["render",Fl]]),_t="all-in-one-seo-pack",Gl={setup(){return{postEditorStore:Q()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Redirects",_t),description:n("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",_t),button:n("Open Redirects",_t)}}}},zl={class:"aioseo-redirects-sidebar"},ql={class:"aioseo-sidebar-content-title"};function jl(o,e,r,t,s,a){const h=p("svg-right-arrow-short"),c=p("base-button"),y=p("core-settings-row");return i(),k("div",zl,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-redirects-copy"},{content:l(()=>[u("div",ql,g(s.strings.title),1),u("p",null,g(s.strings.description),1),d(c,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=v=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:l(()=>[d(h),T(" "+g(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const Wl=M(Gl,[["render",jl],["__scopeId","data-v-1754537e"]]),$l="all-in-one-seo-pack",Yl={setup(){return{postEditorStore:Q()}},components:{CoreModal:Ie,RedirectsSideBar:Wl,RedirectsLite:Vs},props:{parentComponentContext:String},data(){return{strings:{modalHeader:n("Redirects",$l)}}}},Zl={class:"bd"};function Xl(o,e,r,t,s,a){const h=p("redirects-lite"),c=p("core-modal"),y=p("redirects-side-bar");return i(),k("div",null,[o.$root.$data.screenContext==="metabox"?(i(),_(h,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),d(c,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=v=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:l(()=>[T(g(s.strings.modalHeader),1)]),body:l(()=>[u("div",Zl,[d(h,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(y,{key:1})):m("",!0)])}const Gt=M(Yl,[["render",Xl]]),Jl={};function Ql(o,e){return i(),k("div")}const ec=M(Jl,[["render",Ql]]),tc={setup(){return{addons:uo,licenseStore:_e()}},components:{Redirects:Gt,RedirectsActivate:ec,RedirectsLite:Gt},props:{parentComponentContext:String}},oc={class:"aioseo-tab-content"};function sc(o,e,r,t,s,a){const h=p("Redirects",!0),c=p("RedirectsLite"),y=p("RedirectsActivate");return i(),k("div",oc,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-redirects")&&t.addons.canActivate("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(y,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const rc=M(tc,[["render",sc]]),nc={class:"graph-container"},ic={class:"graph"},ac={class:"left"},lc=["title"],cc={class:"right action-buttons"},bo={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",r=o,{childGraphs:t,graphs:s}=ro(),a=ke(()=>{var C,b,A,z;if(r.customGraph)return n("Custom Schema",e)+" - "+r.graph.graphName;if(r.defaultGraph)return y(r.defaultGraph);if((C=r.graph)!=null&&C.label)return r.graph.label;const P=(A=(b=r.graph)==null?void 0:b.slug)==null?void 0:A.toLowerCase();return((z=s.find(K=>K.slug===P))==null?void 0:z.label)||n("Parsing Block Data...",e)}),h=ke(()=>{if(r.customGraph)return dt;if(r.defaultGraph){const P=c(r.defaultGraph);return P?v(P):dt}return v(r.graph.slug)}),c=P=>{Object.entries(t).forEach(C=>{const b=C[0];C[1].forEach(A=>{P===A.childGraphName&&(P=b)})});let x="";return s.forEach(C=>{C.graphName===P&&(x=C.slug)}),x},y=P=>{let x="",C=P;return Object.entries(t).forEach(b=>{const A=b[0];b[1].forEach(z=>{x||P===z.childGraphName&&(x=A,C=z.label,s.forEach(K=>{K.graphName===A&&(x=K.label)}))})}),x?x+" - "+C+" "+n("(Default)",e):P+" "+n("(Default)",e)},v=P=>{switch(P){case"article":return fs;case"book":return ys;case"car":return _s;case"course":return ms;case"dataset":return gs;case"event":return hs;case"faq-page":return ps;case"fact-check":return us;case"how-to":return ds;case"job-posting":return cs;case"movie":return ls;case"music":return as;case"person":return is;case"product":return ns;case"product-review":return rs;case"recipe":return ss;case"service":return os;case"software-application":return ts;case"video":return es;case"web-page":return Qo;default:return dt}};return(P,x)=>(i(),k("div",nc,[u("div",ic,[u("div",ac,[(i(),_(Se(h.value))),u("span",{title:a.value},g(a.value),9,lc)]),u("div",cc,[Te(P.$slots,"buttons")])])]))}},dc={class:"title"},uc=["innerHTML"],pc={class:"schema-templates"},hc={class:"main"},gc={class:"schema-catalog"},mc={class:"graphs"},_c={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:r}=ro(),t=ye(),s={schemaGenerator:n("Schema Generator",e),headerTooltip:D(n("Use our powerful Schema Generator to configure Schema Markup for your content. Search Engines use structured data to better understand what your site is about as well as to display rich snippets in search results. %1$s",e),Z.getDocLink(Ee.learnMore,"schema",!0)),searchSchema:n("Search Schema",e),ctaDescription:n("Easily generate unlimited schema markup for your content to help you rank higher in search results. Our schema validator ensures your schema works out of the box.",e),ctaButtonText:n("Unlock Schema Generator",e),ctaHeader:D(n("Schema Generator is a %1$s Feature",e),"PRO")},a=[n("Unlimited Schema",e),n("Validate with Google",e),n("Increase Rankings",e),n("Additional Schema Types",e)],h=[{slug:"schema-templates",icon:Ss,name:n("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:ks,name:n("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:vs,name:n("Schema Validation",e),component:"validation"}],c=[{slug:"schema-catalog",name:n("Schema Catalog",e)},{slug:"your-templates",name:n("Your Templates",e)}];return(y,v)=>{const P=p("base-input"),x=p("base-button");return i(),_(S(Ie),{classes:["aioseo-post-schema-modal-cta"],onClose:v[0]||(v[0]=C=>y.$emit("close"))},{headerTitle:l(()=>[u("div",dc,g(s.schemaGenerator),1),d(S(fe),null,{tooltip:l(()=>[u("span",{innerHTML:s.headerTooltip},null,8,uc)]),default:l(()=>[d(S(xt))]),_:1})]),body:l(()=>[d(S(tt),null,{default:l(()=>[d(S(Be),{tabs:h,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":l(({tab:C})=>[(i(),_(Se(C.icon)))]),_:1}),u("div",pc,[d(S(Be),{tabs:c,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":l(({tab:C})=>[(i(),_(Se(C.icon)))]),_:1}),u("div",hc,[d(P,{class:"search",size:"medium",prependIcon:"search",placeholder:s.searchSchema},null,8,["placeholder"]),u("div",gc,[u("div",mc,[(i(!0),k(Ce,null,Ke(S(r),(C,b)=>(i(),_(S(bo),{key:C.graphName+b,graph:C},{buttons:l(()=>[d(x,{class:"small",type:"gray"},{default:l(()=>[d(S(Tt))]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),d(S(Lt),{"cta-link":S(Z).getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":s.ctaButtonText,"learn-more-link":S(Z).getUpsellUrl("schema-generator",null,S(t).isPro?"pricing":"liteUpgrade"),"feature-list":a},{"header-text":l(()=>[T(g(s.ctaHeader),1)]),description:l(()=>[T(g(s.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},Re="all-in-one-seo-pack",yc={setup(){return{postEditorStore:Q(),GLOBAL_STRINGS:Ee,links:Z}},components:{CoreAlert:ve,CoreSettingsRow:Pe,CoreTooltip:fe,CtaModal:_c,GraphCard:bo,SvgEye:je},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:n("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",Re),noGraphs:n("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",Re),schemaInUse:n("Schema In Use",Re),generateSchema:n("Generate Schema",Re),validateSchema:n("Validate Schema",Re),defaultGraphTooltip:n("This is the default graph for this post type. All data for this graph will be automatically generated.",Re)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return He()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},fc={class:"graphs"},Sc={key:0,class:"sidebar-description"},kc={class:"description"},vc=["innerHTML"],bc=["innerHTML"],wc={class:"buttons"};function Cc(o,e,r,t,s,a){const h=p("svg-eye"),c=p("base-button"),y=p("core-tooltip"),v=p("graph-card"),P=p("core-alert"),x=p("cta-modal"),C=p("core-settings-row");return i(),k("div",{class:J(["aioseo-tab-content aioseo-post-schema",[{sidebar:a.isSidebar}]])},[d(C,{name:s.strings.schemaInUse},{content:l(()=>[u("div",fc,[a.isSidebar?(i(),k("div",Sc,[u("p",kc,g(s.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,vc)])):m("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(v,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:l(()=>[d(y,{offset:a.getDefaultSchemaTooltipOffset()},{tooltip:l(()=>[u("span",{innerHTML:s.strings.defaultGraphTooltip},null,8,bc)]),default:l(()=>[d(c,{class:"small no-hover",type:"gray"},{default:l(()=>[d(h)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):m("",!0)]),u("div",wc,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(P,{key:0,class:"no-graphs",type:"yellow"},{default:l(()=>[T(g(s.strings.noGraphs),1)]),_:1})):m("",!0),d(c,{class:"medium",type:"blue",onClick:e[0]||(e[0]=b=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:l(()=>[T(g(s.strings.generateSchema),1)]),_:1}),d(c,{class:"medium",type:"gray",onClick:e[1]||(e[1]=b=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:l(()=>[T(g(s.strings.validateSchema),1)]),_:1})]),d(x,{show:!a.isSidebar&&s.modalOpenMetabox,onClose:e[2]||(e[2]=b=>s.modalOpenMetabox=!1)},null,8,["show"]),d(x,{show:a.isSidebar&&s.modalOpenSidebar,onClose:e[3]||(e[3]=b=>s.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const zt=M(yc,[["render",Cc]]),Pc={setup(){return{licenseStore:_e()}},components:{Schema:zt,SchemaLite:zt},props:{parentComponentContext:String}},Ec={class:"aioseo-post-schema-view"};function xc(o,e,r,t,s,a){const h=p("schema",!0),c=p("schema-lite");return i(),k("div",Ec,[t.licenseStore.isUnlicensed?m("",!0):(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const Tc=M(Pc,[["render",xc]]),wo=o=>(jt("data-v-20175fdb"),o=o(),Wt(),o),Ac={class:"aioseo-seo-revision-list-item"},Lc={class:"aioseo-seo-revision-list-item__author"},Ic={class:"aioseo-seo-revision-list-item__author__avatar"},Mc={class:"aioseo-seo-revision-list-item__author__name"},Oc=wo(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Dc={class:"aioseo-seo-revision-list-item__action"},Bc=wo(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Rc={class:"aioseo-seo-revision-list-item__action__view"},Hc={class:"aioseo-seo-revision-list-item__action__delete"},Uc={__name:"ListItem",setup(o){const{currentUser:e}=Qt(Xe());return(r,t)=>(i(),k("div",Ac,[u("div",Lc,[u("span",Ic,[d(S(Fs),{src:S(e).avatar.url,size:S(e).avatar.size},null,8,["src","size"])]),u("span",Mc,g(S(oo)(S(e).display_name,30)),1)]),Oc,u("div",Dc,[Bc,u("span",Rc,[d(S(je),{width:"18"})]),u("span",Hc,[d(S(et),{width:"18"})])])]))}},Kc=M(Uc,[["__scopeId","data-v-20175fdb"]]),Vc={components:{SeoRevisionListItem:Kc}},Fc={class:"aioseo-seo-revisions-list"};function Nc(o,e,r,t,s,a){const h=p("seo-revision-list-item");return i(),k("div",Fc,[(i(),k(Ce,null,Ke(13,c=>d(h,{key:"seo-revision-list-item-"+c})),64))])}const Gc=M(Vc,[["render",Nc],["__scopeId","data-v-7b502c37"]]),yt="all-in-one-seo-pack",zc={setup(){return{seoRevisionsStore:Xe()}},components:{CoreBlur:tt,CoreModal:Ie,CoreSettingsRow:Pe,SeoRevisionsList:Gc,SeoRevisionsUpsell:Ns,SvgRightArrowShort:It},data(){return{strings:{button:n("Open SEO Revisions",yt),description:n("With our powerful revisions feature for all your SEO data, never lose the exact SEO title or description (and more!) that helped you rank higher in search results and restore it back in a single click.",yt),seoRevisions:n("SEO Revisions",yt)}}}},qc={key:0,class:"aioseo-seo-revisions-metabox"},jc={key:1,class:"aioseo-seo-revisions-sidebar"},Wc={class:"aioseo-seo-revisions-sidebar__modal-body"},$c={class:"description"};function Yc(o,e,r,t,s,a){const h=p("seo-revisions-list"),c=p("core-blur"),y=p("seo-revisions-upsell"),v=p("core-modal"),P=p("svg-right-arrow-short"),x=p("base-button"),C=p("core-settings-row");return o.$root.$data.screenContext==="metabox"?(i(),k("div",qc,[d(c,null,{default:l(()=>[d(h)]),_:1}),d(y,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(i(),k("div",jc,[d(v,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=b=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:l(()=>[T(g(s.strings.seoRevisions),1)]),body:l(()=>[u("div",Wc,[d(c,null,{default:l(()=>[d(h)]),_:1}),d(y,{"parent-component-context":"modal"})])]),_:1},8,["show"]),d(C,{align:""},{name:l(()=>[T(g(s.strings.seoRevisions),1)]),description:l(()=>[u("p",$c,g(s.strings.description),1)]),content:l(()=>[d(x,{class:"gray small",onClick:e[1]||(e[1]=pe(b=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:l(()=>[d(P,{width:"10"}),T(" "+g(s.strings.button),1)]),_:1})]),_:1})])):m("",!0)}const qt=M(zc,[["render",Yc],["__scopeId","data-v-eda67d56"]]),Zc={setup(){return{licenseStore:_e()}},components:{SeoRevisions:qt,SeoRevisionsLite:qt},props:{parentComponentContext:String},data(){return{license:Ue}}},Xc={class:"aioseo-seo-revisions aioseo-tab-content"};function Jc(o,e,r,t,s,a){const h=p("seo-revisions",!0),c=p("seo-revisions-lite");return i(),k("div",Xc,[!t.licenseStore.isUnlicensed&&s.license.hasCoreFeature("seo-revisions")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Qc=M(Zc,[["render",Jc],["__scopeId","data-v-463f2e4b"]]),ed={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=Qt(Xe()),r=ke(()=>99<e.value?"99+":e.value);return(t,s)=>S(e)?(i(),k("span",{key:0,class:J(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":t.$root.$data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":t.$root.$data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<S(e)}])},g(r.value),3)):m("",!0)}},td={},od={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},sd=u("path",{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"},null,-1),rd=[sd];function nd(o,e){return i(),k("svg",od,rd)}const id=M(td,[["render",nd]]),ad={},ld={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},cd=u("path",{d:"M7.00016 0.833334C3.32016 0.833334 0.333496 3.82 0.333496 7.5C0.333496 11.18 3.32016 14.1667 7.00016 14.1667C10.6802 14.1667 13.6668 11.18 13.6668 7.5C13.6668 3.82 10.6802 0.833334 7.00016 0.833334ZM7.66683 10.8333H6.3335V9.5H7.66683V10.8333ZM7.66683 8.16667H6.3335V4.16667H7.66683V8.16667Z",fill:"currentColor"},null,-1),dd=[cd];function ud(o,e){return i(),k("svg",ld,dd)}const pd=M(ad,[["render",ud]]),hd={},gd={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},md=u("path",{d:"M11 1.83325L10 0.833252L9 1.83325L8 0.833252L7 1.83325L6 0.833252L5 1.83325L4 0.833252L3 1.83325L2 0.833252L1 1.83325L0 0.833252V14.1666L1 13.1666L2 14.1666L3 13.1666L4 14.1666L5 13.1666L6 14.1666L7 13.1666L8 14.1666L9 13.1666L10 14.1666L11 13.1666L12 14.1666V0.833252L11 1.83325ZM1.33333 12.2266V2.77328H10.6667V12.2266H1.33333ZM10 10.8333V9.49992H2V10.8333H10ZM10 6.83325V8.16659H2V6.83325H10ZM10 5.49992V4.16658H2V5.49992H10Z",fill:"currentColor"},null,-1),_d=[md];function yd(o,e){return i(),k("svg",gd,_d)}const fd=M(hd,[["render",yd]]),Sd={},kd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},vd=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.26625 4.7737L1.73375 0.249954L0.5 1.4837L5.02375 6.00745L6.26625 4.7737ZM9.6875 0.249954L11.4725 2.03495L0.5 13.0162L1.73375 14.25L12.715 3.27745L14.5 5.06245V0.249954H9.6875ZM8.74251 9.71747L9.97626 8.48372L12.715 11.2225L14.5 9.43746V14.25H9.68751L11.4813 12.4562L8.74251 9.71747Z",fill:"currentColor"},null,-1),bd=[vd];function wd(o,e){return i(),k("svg",kd,bd)}const Cd=M(Sd,[["render",wd]]),Me="all-in-one-seo-pack",Pd={setup(){const o=Xe(),e=we(!1),r=()=>{window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()&&(e.value=!0,setTimeout(()=>{o.fetch().finally(()=>{e.value=!1})},2500))},t=async()=>{await Ge(),window.wp.data.subscribe(()=>{e.value||r()})};return{keywordRankTrackerStore:Ze(),licenseStore:_e(),postEditorStore:Q(),redirectsStore:Mo(),rootStore:ye(),seoRevisionsStore:o,settingsStore:xe(),watchObjectRevisionsOnSavePost:t}},components:{Advanced:mr,Alert:yo,CoreMainTabs:Be,CoreModal:Ie,General:So,KeywordRankTracker:ma,LinkAssistant:ml,ModalContent:Nl,Redirects:rc,Schema:Tc,SeoRevisions:Qc,SeoRevisionsCountBadge:ed,Social:vo,SvgBackup:id,SvgBuild:Ks,SvgCaret:Je,SvgCircleInformationSolid:pd,SvgClose:vt,SvgLinkSuggestion:Mt,SvgReceipt:fd,SvgRedirectCrossedArrows:Cd,SvgSettings:io,SvgShare:_o},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:n("Preview Snippet Editor",Me)},activeMainSidebarTab:"",isPageBuilderEditor:He}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Ho(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(o){this.activeTab!=="general"&&this.maybeResetActiveTab(o)},"postEditorStore.currentPost.linkAssistant.modalOpen"(o){this.maybeResetActiveTab(o)},"postEditorStore.currentPost.redirects.modalOpen"(o){this.maybeResetActiveTab(o)},"seoRevisionsStore.modalOpenSidebar"(o){this.maybeResetActiveTab(o)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.activeMainSidebarTab!==o.tab&&(this.activeMainSidebarTab=o.tab,this.processChangeTab(o.tab))}}},computed:{tabs(){var e;const o=[{slug:"general",icon:"svg-settings",name:n("General",Me)},{slug:"social",icon:"svg-share",name:n("Social",Me)},{slug:"schema",icon:"svg-receipt",name:n("Schema",Me)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:n("Redirects",Me),warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:n("SEO Revisions",Me),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:n("Advanced",Me)}];return!this.rootStore.aioseo.integration&&!He()&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&o.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:n("Link Assistant",Me)}),o},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(o=>o.slug!=="schema"&&Le(this.getTabPermission(o.slug))):this.tabs.filter(o=>Le(this.getTabPermission(o.slug))?!0:o.slug==="general"&&(Le("aioseo_page_analysis")||Le(this.getTabPermission(o.slug))))}},methods:{async processChangeTab(o){if(o!==null&&typeof o=="object"){this.processChangeTab(o.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:o.main,value:o.sub})});return}switch(this.$root.$data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const r=o===null?"sticky":"static";e.style.position=r});break;default:this.activeTab=o,this.settingsStore.changeTabSettings({setting:"main",value:o});break}if(this.$root.$data.screenContext==="sidebar"&&this.activeTab!==o)switch(this.activeTab=o,await this.$nextTick(),o){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0);break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&(this.postEditorStore.currentPost.linkAssistant.modalOpen=!0);break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&(this.postEditorStore.currentPost.redirects.modalOpen=!0);break;case"seoRevisions":await this.$nextTick(),!this.seoRevisionsStore.modalOpenSidebar&&(this.licenseStore.isUnlicensed||this.seoRevisionsStore.itemsLimit===0)&&(this.seoRevisionsStore.modalOpenSidebar=!0);break}},maybeResetActiveTab(o){o||this.$root.$data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.currentPost.modalOpen=!1},getTabPermission(o){const e=this.tabs.find(r=>r.slug===o);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(o){const e=this.tabs.find(r=>r.slug===o);return e==null?void 0:e.name}},created(){switch(this.modal=qe()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{ft("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",o=>{Object.keys(o).forEach(e=>{this.postEditorStore.currentPost[e]=o[e]}),o!=null&&o.primary_term&&Vo()}),this.$root.$data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=qe()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{ft("aioseo-tab")},500);break}},beforeMount(){const o=document.querySelector(".interface-complementary-area__pin-unpin-item");o&&o!==null&&(o.style.display="block")},mounted(){Ye()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},Ed={class:"aioseo-app aioseo-post-settings"},xd={key:0,class:"aioseo-sidepanel"},Td=["onClick"],Ad={class:"name"},Ld={key:0,class:"aioseo-tab-title"};function Id(o,e,r,t,s,a){const h=p("core-main-tabs"),c=p("svg-circle-information-solid"),y=p("svg-caret"),v=p("svg-close"),P=p("alert"),x=p("modal-content"),C=p("core-modal"),b=p("keyword-rank-tracker");return i(),k("div",Ed,[o.$root.$data.screenContext!=="sidebar"?(i(),_(h,{key:0,tabs:a.getTabs,showSaveButton:!1,active:s.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=A=>a.processChangeTab(A))},{"var-tab-icon":l(({tab:A})=>[(i(),_(Se(A.icon),{class:J([{warning:A.warning}])},null,8,["class"])),(i(),_(Se(A.badge)))]),_:1},8,["tabs","active"])):m("",!0),d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[o.$root.$data.screenContext==="sidebar"&&s.activeTab===null?(i(),k("div",xd,[(i(!0),k(Ce,null,Ke(a.getTabs,(A,z)=>(i(),k("a",{key:z,class:"aioseo-sidepanel-button",href:"#",onClick:pe(K=>a.processChangeTab(A.slug),["prevent"])},[(i(),_(Se(A.icon),{class:"icon"})),u("div",Ad,g(A.name),1),(i(),_(Se(A.badge))),A.warning?(i(),_(c,{key:0,width:"15",height:"15"})):m("",!0),d(y)],8,Td))),128))])):m("",!0)]),_:1}),d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[s.activeTab?(i(),k("div",{key:s.activeTab,class:J(["aioseo-tab",{"is-page-builder":!!t.rootStore.aioseo.integration}])},[o.$root.$data.screenContext==="sidebar"?(i(),k("div",Ld,[u("span",null,g(a.getTabName(s.activeTab)),1),d(v,{onClick:e[1]||(e[1]=A=>a.processChangeTab(null))})])):m("",!0),o.$root.$data.screenContext==="sidebar"?(i(),_(P,{key:1})):m("",!0),(i(),_(Se(s.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=A=>a.processChangeTab(A))},null,32))],2)):m("",!0)]),_:1}),d(C,{show:t.postEditorStore.currentPost.modalOpen&&o.$root.$data.screenContext==="sidebar",onClose:a.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:l(()=>[T(g(s.strings.modalTitle),1)]),body:l(()=>[d(x)]),_:1},8,["show","onClose"]),d(b,{"modal-open":t.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=A=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:A}))},null,8,["modal-open"])])}const Md=M(Pd,[["render",Id]]),Fu={__name:"App",setup(o){Bo({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const e=Q();return(r,t)=>(i(),k("div",{onClick:t[0]||(t[0]=pe(()=>{},["stop"])),id:"main-settings-cont"},[r.$root.$data.screenContext!=="sidebar"?(i(),_(S(yo),{key:0})):m("",!0),S(e).currentPost.id?(i(),_(S(Md),{key:1})):m("",!0)]))}};export{Fu as _};