관리-도구
편집 파일: App.b2imjdmx.js
import{v as p,o as i,c as v,C as d,l as u,x as A,t as h,a as c,k as _,b as m,G,E as te,K as Kt,L as Vt,g as Te,y as _o,M as Ft,n as $e,Y as yo,h as fo,H as yt,F as de,J as Re,m as Pe,T as Fe,f as be,u as C,q as pe}from"./runtime-dom.esm-bundler.h3clfjuw.js";/* empty css */import{b as $,i as ne,a as ze,e as W,u as ue,ag as Ze,G as Xe,E as Nt,a7 as De,M as Ie,ah as So,aa as Je,g as we,v as ko,ai as vo,Z as bo,d as wo,r as Gt,K as Co,f as zt,N as Po,A as Ke,aj as qt,P as jt,C as Qe,t as Eo,n as To}from"./index.nsvc8vqf.js";import{a as xo,C as Ao,u as Lo}from"./LicenseKeyBar.n8bctwdg.js";import{a as Ee}from"./allowed.kmy7i7t2.js";import{g as Ne,r as _t}from"./params.k8e95b6q.js";import{C as Ce,a as et,S as ft,f as St,c as kt,e as Io,b as vt,d as rt,h as Mo}from"./Caret.hnvbzqgq.js";import{G as fe,P as Oo,F as Do,d as Bo,S as Ro,O as Ho}from"./constants.fxxegv78.js";import{C as Se}from"./SettingsRow.1l1umqn0.js";import{B as Uo}from"./Checkbox.fww0datn.js";import{G as Ko,a as Vo}from"./Row.o0q8mn7y.js";import"./translations.lf9cwm9a.js";import{_ as I}from"./_plugin-vue_export-helper.oebm7xum.js";import{_ as n,a as D}from"./default-i18n.hohxoesu.js";import{C as Me}from"./Tabs.4r8l6r8o.js";import{C as xe}from"./Index.fywmukpg.js";import{u as bt}from"./MaxCounts.dcyuh1uu.js";import{u as wt}from"./Tags.oypvqhpf.js";import{o as nt,r as Fo,p as No,q as Go,T as Wt,t as it}from"./postSlug.cemx0kwk.js";import{S as $t}from"./Ellipse.mhzh8c2h.js";import{d as at}from"./debounce.paenkskr.js";import{T as zo,g as qo}from"./helpers.fdpg7vgg.js";import{t as Lt}from"./toFinite.cbuzojxe.js";import{u as Yt}from"./TruSeoScore.oj10wjxw.js";import{C as ke}from"./Tooltip.jx4casvt.js";import{S as jo}from"./Statistics.l9vto0az.js";import{S as tt,a as Ct,g as lt,h as Wo,j as $o,k as Yo,m as Zo,n as Xo,o as Jo,p as Qo,q as es,r as ts,s as os,t as ss,u as rs,v as ns,w as is,x as as,y as ls,z as cs,A as ds,C as us,D as ps,e as ms,E as hs,F as gs}from"./index.h076fivy.js";import{S as Pt}from"./Plus.e1tf1dpc.js";import{S as ot}from"./Eye.jbr17b06.js";import{B as Zt}from"./RadioToggle.h9afcyfi.js";import{C as _s}from"./GoogleSearchPreview.o1cj6y7p.js";import{C as Et}from"./HtmlTagsEditor.k0zlm7pg.js";import{T as ys}from"./Slide.dop8j51m.js";import{C as fs}from"./ProBadge.ab6jhp8x.js";import{p as It}from"./popup.by9shv56.js";import{l as Be}from"./license.bcd45a0t.js";import{S as Ss,a as ks}from"./Mobile.livanyta.js";import{u as vs}from"./vue3-apexcharts.n0h2b4pa.js";import{_ as bs}from"./ConnectCta.fpg4jfxp.js";import{C as Ge}from"./Blur.f3nyx4yc.js";import{C as Tt}from"./Index.lvccx76i.js";import{G as Ye}from"./Graph.dm4w1ra9.js";import{u as Xt}from"./WpTable.qh17xjl6.js";import{C as Jt}from"./Table.jd7cflkg.js";import{R as Qt}from"./RequiredPlans.e7ak5151.js";import{a as eo}from"./addons.foby19s7.js";import{u as ws}from"./PostTypes.d1dx9z99.js";import{S as to}from"./External.lyui8nzf.js";import{S as Cs,a as Ps,b as Es}from"./InternalOutbound.gq4sspcu.js";import{u as oo}from"./Image.g0jgwvuo.js";import{t as so}from"./Editor.k6y9ox0q.js";import{C as Ts}from"./FacebookPreview.mpw3lfil.js";import{C as ro}from"./ImageUploader.j9of4s9e.js";import{C as xs}from"./TwitterPreview.nwjqs262.js";import{S as no}from"./Settings.cshbxeez.js";import{a as io,S as As}from"./Build.mjaxpub4.js";import{L as Ls}from"./Redirects.ngf9mprt.js";import{U as Is,S as Ms}from"./Upsell.j5qfjr6p.js";var Os=Math.floor,Ds=Math.random;function Bs(o,e){return o+Os(Ds()*(e-o+1))}var Rs=parseFloat,Hs=Math.min,Us=Math.random;function Ks(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=Lt(o),e===void 0?(e=o,o=0):e=Lt(e)),o>e){var t=o;o=e,e=t}if(r||o%1||e%1){var s=Us();return Hs(o+s*(e-o+Rs("1e-"+((s+"").length-1))),e)}return Bs(o,e)}const ee="all-in-one-seo-pack",Vs={setup(){return{postEditorStore:$()}},components:{BaseCheckbox:Uo,GridColumn:Ko,GridRow:Vo},data(){return{strings:{useDefaultSettings:n("Use Default Settings",ee),robotsMeta:n("Robots meta:",ee),maxSnippet:n("Max Snippet",ee),maxVideoPreview:n("Max Video Preview",ee),maxImagePreview:n("Max Image Preview",ee),standard:n("Standard",ee),none:n("None",ee),large:n("Large",ee),noindex:n("No Index",ee),nofollow:n("No Follow",ee),noarchive:n("No Archive",ee),notranslate:n("No Translate",ee),noimageindex:n("No Image Index",ee),nosnippet:n("No Snippet",ee),noodp:n("No ODP",ee)}}},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}}},Fs={class:"aioseo-robots-meta"},Ns={key:0,class:"global-robots-settings aioseo-description"},Gs={class:"robots-meta-title"},zs={class:"global-robots-settings-options"},qs={key:0,class:"aioseo-description max-snippet"},js={class:"aioseo-description max-video-preview"},Ws={key:1,class:"aioseo-description max-image-preview"};function $s(o,e,r,t,s,a){const g=p("base-toggle"),l=p("base-checkbox"),y=p("grid-column"),E=p("grid-row"),b=p("base-input"),x=p("base-select");return i(),v("div",Fs,[d(g,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=S=>t.postEditorStore.currentPost.default=S),e[1]||(e[1]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?m("",!0):(i(),v("div",Ns,[c("span",Gs,h(s.strings.robotsMeta),1),d(E,{class:"settings"},{default:u(()=>[t.postEditorStore.currentPost.isHomePage?m("",!0):(i(),_(y,{key:0,xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=S=>t.postEditorStore.currentPost.noindex=S),e[3]||(e[3]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=S=>t.postEditorStore.currentPost.nofollow=S),e[5]||(e[5]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=S=>t.postEditorStore.currentPost.noarchive=S),e[7]||(e[7]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=S=>t.postEditorStore.currentPost.notranslate=S),e[9]||(e[9]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=S=>t.postEditorStore.currentPost.noimageindex=S),e[11]||(e[11]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=S=>t.postEditorStore.currentPost.nosnippet=S),e[13]||(e[13]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),d(y,{xl:"3",md:"4",sm:"6"},{default:u(()=>[d(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=S=>t.postEditorStore.currentPost.noodp=S),e[15]||(e[15]=S=>t.postEditorStore.isDirty=!0)]},{default:u(()=>[A(h(s.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),c("div",zs,[t.postEditorStore.currentPost.nosnippet?m("",!0):(i(),v("div",qs,[c("span",null,h(s.strings.maxSnippet),1),d(b,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=S=>t.postEditorStore.currentPost.maxSnippet=S),e[17]||(e[17]=S=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),c("div",js,[c("span",null,h(s.strings.maxVideoPreview),1),d(b,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=S=>t.postEditorStore.currentPost.maxVideoPreview=S),e[19]||(e[19]=S=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?m("",!0):(i(),v("div",Ws,[c("span",null,h(s.strings.maxImagePreview),1),d(x,{size:"medium",options:a.imagePreviewOptions,modelValue:a.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=S=>a.saveImagePreview(S.value))},null,8,["options","modelValue"])]))])]))])}const Ys=I(Vs,[["render",$s]]),ce="all-in-one-seo-pack",Zs={setup(){return{licenseStore:ne(),optionsStore:ze(),postEditorStore:$()}},components:{CoreAlert:Ce,CoreSettingsRow:Se,CoreSingleRobotsMeta:Ys},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:n("Advanced",ce),robotsSetting:n("Robots Setting",ce),robotsToggle:n("Use Default Settings",ce),canonicalUrl:n("Canonical URL",ce),placeholder:n("Enter a URL to change the default Canonical URL",ce),priorityScore:n("Priority Score",ce),priority:n("Priority",ce),frequency:n("Frequency",ce),priorityFrequencyUpsell:D(n("Priority Score is a %1$s feature. %2$s",ce),"PRO",W.getUpsellLink("post-advanced",fe.learnMore,"priority-frequency",!0)),keywords:n("Keywords",ce),tagPlaceholder:n("Press enter to create a keyword",ce)}}},computed:{getPriorityOptions(){return[{label:n("default",ce),value:"default"}].concat(Oo)},getFrequencyOptions(){return[{label:n("default",ce),value:"default"}].concat(Do)}},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}}},Xs={class:"aioseo-tab-content aioseo-post-advanced"},Js={class:"selectbox-row"},Qs={class:"select"},er=c("div",{class:"separator"},[c("span"),A(" - ")],-1),tr={class:"select"},or=["innerHTML"];function sr(o,e,r,t,s,a){const g=p("core-single-robots-meta"),l=p("core-settings-row"),y=p("base-input"),E=p("base-select"),b=p("core-alert");return i(),v("div",Xs,[d(l,{id:"aioseo-post-robots-setting",name:s.strings.robotsSetting,align:""},{content:u(()=>[d(g)]),_:1},8,["name"]),d(l,{id:"aioseo-post-canonical-url",name:s.strings.canonicalUrl,align:""},{content:u(()=>[d(y,{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)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),d(l,{name:s.strings.priorityScore,align:""},{content:u(()=>[c("div",Js,[c("div",Qs,[c("span",null,h(s.strings.priority),1),d(E,{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"])]),er,c("div",tr,[c("span",null,h(s.strings.frequency),1),d(E,{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(),_(b,{key:0,class:"inline-upsell",type:"blue"},{default:u(()=>[c("div",{innerHTML:s.strings.priorityFrequencyUpsell},null,8,or)]),_:1})):m("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(i(),_(l,{key:0,name:s.strings.keywords,align:""},{content:u(()=>[d(E,{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 rr=I(Zs,[["render",sr]]),nr={setup(){return{licenseStore:ne(),rootStore:ue()}},components:{CoreApiBar:xo,CoreLicenseKeyBar:Ao}};function ir(o,e,r,t,s,a){const g=p("core-api-bar"),l=p("core-license-key-bar");return i(),v("div",null,[t.rootStore.pong?m("",!0):(i(),_(g,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(i(),_(l,{key:1})):m("",!0)])}const ao=I(nr,[["render",ir]]),ar={emits:["next","previous"],setup(){return{truSeoHighlighterStore:Ze()}},components:{SvgEllipse:$t,SvgCaret:et,SvgClose:ft},data(){return{error:this.truSeoHighlighterStore.highlightAnalyzerHasError,order:this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1,total:this.truSeoHighlighterStore.highlightMarks.length}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},lr=o=>(Kt("data-v-6d6404ce"),o=o(),Vt(),o),cr={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},dr={class:"tru-seo-highlight-popover__count"},ur=lr(()=>c("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),pr={class:"tru-seo-highlight-popover__nav"},mr=["disabled"],hr=["disabled"],gr={class:"tru-seo-highlight-popover__close"};function _r(o,e,r,t,s,a){const g=p("svg-ellipse"),l=p("svg-caret"),y=p("svg-close");return i(),v("div",cr,[c("div",{class:G(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":s.error}])},[d(g,{width:"8"})],2),c("div",dr,[c("span",null,h(s.order)+"/"+h(s.total),1)]),ur,c("div",pr,[c("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:s.order===1,onClick:e[0]||(e[0]=te(E=>o.$emit("previous"),["stop","exact"]))},[d(l,{width:"20"})],8,mr),c("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:s.order===s.total,onClick:e[1]||(e[1]=te(E=>o.$emit("next"),["stop","exact"]))},[d(l,{width:"20"})],8,hr)]),c("div",gr,[c("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=te((...E)=>a.close&&a.close(...E),["stop","exact"]))},[d(y,{width:"10"})],32)])])}const yr=I(ar,[["render",_r],["__scopeId","data-v-6d6404ce"]]),fr=()=>{var R,U,z,B;const o=Te(null),e=Te({}),r=Xe(),t=Nt(),s=(U=(R=window==null?void 0:window.wp)==null?void 0:R.data)==null?void 0:U.select("core/block-editor"),a=(B=(z=window==null?void 0:window.wp)==null?void 0:z.data)==null?void 0:B.select("core/edit-post"),g=Te(null),l=Ze(),y=f=>{var w,L,M,H,K,O;let P="content";(L=(w=f.block)==null?void 0:w.attributes)!=null&&L.caption?P="caption":(H=(M=f.block)==null?void 0:M.attributes)!=null&&H.value?P="value":(O=(K=f.block)==null?void 0:K.attributes)!=null&&O.citation&&(P="citation"),l.dispatchAnnotations.__experimentalAddAnnotation({id:f.id,range:f.range,source:l.source,blockClientId:f.block.clientId,richTextIdentifier:P})},E=(f,P)=>{if(!P)return!1;!P.hasFocus()&&r&&P.focus();let w=P.selection.win.getSelection();w.selectAllChildren(f.parent);const L=w.toString().length;if(f.range.end<L)for(let M=f.range.end;M<L;M++)w.modify("extend","backward","character");if(0<f.range.start){w=Fo(w);for(let M=f.range.start;0<M;M--)w.modify("extend","forward","character")}P.undoManager.ignore(()=>{P.annotator.annotate(l.source,{uid:f.id})}),w.empty()},b=()=>{if(l.clearHighlightPopover(),l.sanitizeHighlightMarks(),!l.activeMark)return!1;const f=yo({name:"TruSeoHighlightPopover",render(){return fo(yr,{onNext(){J(1)},onPrevious(){J(-1)}})}}),P=Go(),w=new ResizeObserver(at(ie,750)),L=k("wrapper");if(!L)return!1;L.parentElement.appendChild(P),f.mount(P),w.observe(k("wrapper"),{box:"border-box"}),l.highlightPopover.app=f,l.highlightPopover.node=P,l.highlightPopover.observer=w,ie()},x=()=>{l.toggleHighlightAnalyzer(null),l.allowHighlighting=!1},S=({block:f,node:P})=>{var L,M,H,K;let w="";return P?w=P.outerText.replace(/\n\n/g,` `):f&&(w=((L=f==null?void 0:f.attributes)==null?void 0:L.content)||((M=f==null?void 0:f.attributes)==null?void 0:M.caption)||((H=f==null?void 0:f.attributes)==null?void 0:H.value)||((K=f==null?void 0:f.attributes)==null?void 0:K.citation)||"",w=w.replace(/<br[^>]*>/gi,` `),w=So(w)),No(w)},k=f=>{var P;if(f==="closest-relative")return nt({element:k("wrapper").parentElement,property:"position",value:"relative"});if(f==="navigable")return nt({element:k("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(f==="wrapper")return document.getElementById("content_ifr");if(f==="first-block")return((P=g.value.getBody())==null?void 0:P.firstElementChild)||{}}if(r){if(f==="wrapper")return document.querySelector(".editor-styles-wrapper");if(f==="first-block"){const w=s.getBlocks()[0];return document.getElementById(`block-${w==null?void 0:w.clientId}`)||{}}}},T=()=>{var f;for(const P of s.getBlocks()||[]){if(P.name==="core/freeform"){const w=window.tinymce.get(`editor-${P.clientId}`),L=((f=w.getBody())==null?void 0:f.children)||[];if(!L.length)continue;ge(w);for(const M of L)_e({block:P,node:M});continue}_e({block:P,node:null})}for(const[P,w]of Object.entries(l.highlightMarks))V(w.parent,parseInt(P)===l.highlightMarks.length-1),w.block.name==="core/freeform"?E(w,window.tinymce.get(`editor-${w.block.clientId}`)):y(w)},Y=()=>{var P;const f=((P=g.value.getBody())==null?void 0:P.children)||[];if(!f.length)return!1;ge(g.value);for(const w of f)_e({block:null,node:w});for(const[w,L]of Object.entries(l.highlightMarks))V(L.parent,parseInt(w)===l.highlightMarks.length-1),E(L,g.value)},J=f=>{const P=l.highlightMarks.findIndex(w=>w.active);if(!l.highlightMarks[P+f])return!1;l.allowScrolling=!0,l.highlightMarks[P].active=!1,l.highlightMarks[P+f].active=!0,b()},me=f=>{var H,K;const P=()=>{f.preventDefault(),f.clipboardData.setData("text/html",window.getSelection().toString())},w=window.getSelection()||{};if(!(w!=null&&w.rangeCount))return!1;const L=((H=f.clipboardData)==null?void 0:H.getData("text/html"))||"";if(L&&L.indexOf(l.source)!==-1)return P(),!1;const M=w.getRangeAt(0)||{};for(const O of Object.values(((K=M==null?void 0:M.cloneContents())==null?void 0:K.children)||[]))if(Object.values((O==null?void 0:O.classList)||[]).some(X=>X.endsWith(l.source)))return P(),!1},he=f=>{var H,K;const P=(O,X)=>{O.collapse(X.firstChild,X.firstChild.length),O.deleteFromDocument()};if(["Delete","Backspace"].indexOf(f.key)===-1)return!1;const w=window.getSelection()||null;if(!(w!=null&&w.toString()))return!1;const L=((H=w==null?void 0:w.anchorNode)==null?void 0:H.parentElement)||null,M=((K=w==null?void 0:w.anchorNode)==null?void 0:K.nextElementSibling)||null;Object.values((L==null?void 0:L.classList)||[]).some(O=>O.endsWith(l.source))?P(w,L):Object.values((M==null?void 0:M.classList)||[]).some(O=>O.endsWith(l.source))&&P(w,M)},oe=()=>{var P;o.value=new MutationObserver(w=>{let L=!1;for(const M of w)for(const H of(M==null?void 0:M.removedNodes)||[])(l.highlightMarks.some(K=>H.isEqualNode(K.parent))||Object.values((H==null?void 0:H.classList)||[]).some(K=>K.endsWith(l.source)))&&(L=!0);L&&ve()});const f=(P=k("first-block"))==null?void 0:P.parentElement;if(typeof f!="object")return!1;o.value.observe(f,{attributes:!1,childList:!0,subtree:!0})},V=(f,P=!1)=>{const w=(M,H)=>{var K;H.disconnect();for(const O of M){if(Object.values(((K=O==null?void 0:O.target)==null?void 0:K.classList)||[]).some(X=>X.endsWith(l.source))){ae(O.target);continue}for(const X of(O==null?void 0:O.addedNodes)||[])if(Object.values((X==null?void 0:X.classList)||[]).some(le=>le.endsWith(l.source))){ae(X);break}}P&&$e().then(()=>at(b,250)())};if(typeof(f==null?void 0:f.parentElement)!="object")return!1;new MutationObserver(w).observe(f,{attributes:!0,childList:!0,subtree:!0})},Z=()=>{const f=P=>{var w,L,M;for(const H of P){if((H==null?void 0:H.type)!=="attributes")continue;if(!nt({element:(w=k("wrapper"))==null?void 0:w.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||r&&(a.getEditorMode()!=="visual"||s.getBlockMode((L=s.getSelectedBlock())==null?void 0:L.clientId)==="html")||t&&(He(),((M=document.getElementById("content"))==null?void 0:M.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return x(),!1;l.allowHighlighting=!0}};l.wpBodyContentObserver=new MutationObserver(at(f,250)),l.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},ge=f=>{f.annotator.register(l.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${l.source}`]})})},ie=(f=[])=>{var le;if(!l.activeMark||!l.highlightPopover.node)return!1;for(const go of f)if(JSON.stringify(go.contentRect)===JSON.stringify(e))return!1;f.length&&(e.value=((le=f[0])==null?void 0:le.contentRect)||e,l.allowScrolling=!1);const P=l.activeMark.node.getBoundingClientRect(),w=k("wrapper").getBoundingClientRect(),L=k("closest-relative").getBoundingClientRect(),M=k("first-block").getBoundingClientRect(),[H,K]=[140,32];let O=P.top,X=M.left-L.left;H<X?(l.highlightPopover.node.style.top=O-L.top+"px",l.highlightPopover.node.style.transform="translate(-105%, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(O=O-K-L.top,O=t?O+w.top:O,X=t?X+w.left:X,l.highlightPopover.node.style.top=O+"px",l.highlightPopover.node.style.transform="translate(0, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),l.highlightPopover.node.style.left=X+"px",F()},ve=()=>{var f;window.removeEventListener("copy",me),window.removeEventListener("keyup",he),(f=o.value)==null||f.disconnect(),l.clearAll(),$e().then(()=>{if(!l.highlightSentences)return l.toggleHighlightAnalyzer(null),!1;r&&T(),t&&Y(),oe(),window.addEventListener("copy",me),window.addEventListener("keyup",he)})},F=()=>{$e().then(()=>{var w,L,M,H;if(!l.allowScrolling)return!1;l.activeMark.node.scrollIntoView();let f=k("navigable"),P=f.scrollTop-60;t&&(P-=((L=(w=document.querySelector("#wp-content-editor-tools"))==null?void 0:w.getBoundingClientRect())==null?void 0:L.height)||0,P-=((H=(M=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:M.getBoundingClientRect())==null?void 0:H.height)||0),f.isEqualNode(document.documentElement)&&(f=window),f.scrollTo({top:P}),l.allowScrolling=!1})},ae=f=>{const P=l.highlightMarks.findIndex(w=>f.hasAttribute("data-mce-annotation-uid")?f.dataset.mceAnnotationUid.indexOf(w.id)!==-1:f.id.indexOf(w.id)!==-1);P!==-1&&(l.highlightMarks[P].node=f,f.style.backgroundColor="#cce0ff")},_e=({block:f,node:P})=>{const w=S({block:f,node:P});if(w)for(const[L,M]of Object.entries(l.highlightSentences||{})){const H=new RegExp(Ie(M),"g");let K;for(;(K=H.exec(w))!==null&&!l.highlightMarks.find(le=>le.sentenceIndex===L);){const O={start:K.index,end:K.index+K[0].length||1};l.highlightMarks.find(le=>P?(le.range.start===O.start||le.range.end===O.end)&&le.parent.isEqualNode(P):(le.range.start===O.start||le.range.end===O.end)&&le.block.clientId===f.clientId)||l.highlightMarks.push({id:Ks(1,999999999),range:O,block:f,parent:P||document.getElementById(`block-${f.clientId}`),node:null,active:l.highlightMarks.length===0,sentenceIndex:L})}}if(f)for(const L of(f==null?void 0:f.innerBlocks)||[])_e({block:L,node:null})},He=()=>{if(g.value)return!1;const f=window.setInterval(()=>{var P;if(g.value=((P=window==null?void 0:window.tinymce)==null?void 0:P.get("content"))||null,!g.value)return!1;window.clearInterval(f),g.value.dom.addStyle(` span.annotation-text.annotation-text-${l.source} { background-color: #CCE0FF; border-radius: 4px; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},Ue=(f,P)=>{const w=JSON.stringify(f),L=JSON.stringify(P);w!==L&&ve()};return _o(()=>{var P;l.wpBodyContentObserver&&((P=l.wpBodyContentObserver)==null||P.disconnect());const f=window.setInterval(()=>{typeof k("wrapper")=="object"&&(window.clearInterval(f),Z())},1e3)}),Ft(()=>{if((De()||!r&&!t)&&(l.enabled=!1),r&&(!l.dispatchAnnotations||!s||!a)&&(l.enabled=!1),!l.enabled)return!1}),{watchHighlightSentences:Ue}},Sr="all-in-one-seo-pack",kr={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Je()}},components:{CoreTooltip:ke,SvgPencil:St,SvgStatistics:jo,SvgTrash:tt},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:n("Delete",Sr)}}},computed:{scoreClass(){return 80<this.score?"score-green":50<this.score?"score-orange":1<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}}},vr={class:"aioseo-keyphrase-tag"},br={key:0,class:"aioseo-edit-keyphrase-tag"},wr=["value"];function Cr(o,e,r,t,s,a){const g=p("svg-pencil"),l=p("svg-statistics"),y=p("svg-trash"),E=p("core-tooltip");return i(),v("div",vr,[c("span",{class:G(["aioseo-add-keyphrase-tag",s.edit?"hidden":""])},[c("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=b=>a.toggleKeyphrasesPanel(r.index))},h(r.keyphrase),1),c("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=b=>a.editKeyphraseEv(r.index))},[d(g)]),c("a",{href:"#",onClick:e[2]||(e[2]=te(b=>t.keywordRankTrackerStore.modalOpenPostEdit=!0,["prevent","exact"])),class:"btn-keyword-rank-tracker"},[d(l,{width:"20"})]),c("span",{class:G(["keyphrase-score",a.scoreClass]),onClick:e[3]||(e[3]=b=>a.toggleKeyphrasesPanel(r.index))},h(r.score)+"/100",3)],2),s.edit?(i(),v("span",br,[c("input",{value:r.keyphrase,onBlur:e[4]||(e[4]=(...b)=>a.closeEdit&&a.closeEdit(...b)),onKeydown:e[5]||(e[5]=yt((...b)=>a.pressEnter&&a.pressEnter(...b),["enter"]))},null,40,wr),c("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=b=>a.deleteKeyphraseEv(r.index))},[d(E,{type:"action"},{tooltip:u(()=>[A(h(s.strings.delete),1)]),default:u(()=>[d(y)]),_:1})])])):m("",!0)])}const lo=I(kr,[["render",Cr]]),Pr={},Er={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Tr=c("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),xr=[Tr];function Ar(o,e){return i(),v("svg",Er,xr)}const Lr=I(Pr,[["render",Ar]]),Mt="all-in-one-seo-pack",Ir={setup(){return{truSeoHighlighterStore:Ze()}},components:{CoreTooltip:ke,SvgEye:ot,SvgEyeFilled:Lr},props:{analyzer:String},data(){return{strings:{highlightSections:n("Highlight sections in the Editor",Mt),highlightingIsDisabled:n("Highlighting is disabled for current view",Mt)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Mr=["disabled"];function Or(o,e,r,t,s,a){const g=p("svg-eye"),l=p("core-tooltip"),y=p("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(i(),v("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=te(E=>a.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==r.analyzer?(i(),_(l,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:u(()=>[A(h(t.truSeoHighlighterStore.allowHighlighting?s.strings.highlightSections:s.strings.highlightingIsDisabled),1)]),default:u(()=>[d(g,{width:"16",height:"16"})]),_:1},8,["offset"])):(i(),_(y,{key:1,width:"16",height:"16"}))],8,Mr)):m("",!0)}const Dr=I(Ir,[["render",Or]]),Br={components:{SvgCaret:et,SvgCircleCheck:kt,SvgCircleClose:Io,TruSeoToggleHighlighter:Dr},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(o){o.target.parentElement.classList.toggle("toggled")}}},Rr={class:"aioseo-analysis-detail"},Hr={key:0},Ur={class:"title__text"},Kr={class:"description"};function Vr(o,e,r,t,s,a){const g=p("svg-circle-check"),l=p("svg-circle-close"),y=p("tru-seo-toggle-highlighter"),E=p("svg-caret");return i(),v("ul",Rr,[(i(!0),v(de,null,Re(r.analysisItems,(b,x)=>{var S;return i(),v(de,{key:x},[b.title?(i(),v("li",Hr,[c("p",{class:G(["title",b.error===0?"toggled":""])},[b.error===0?(i(),_(g,{key:0,width:"16"})):m("",!0),b.error===1?(i(),_(l,{key:1,width:"16"})):m("",!0),c("span",Ur,h(b.title),1),(S=b==null?void 0:b.highlightSentences)!=null&&S.length?(i(),_(y,{key:2,analyzer:x},null,8,["analyzer"])):m("",!0),d(E,{width:"16",role:"button",onClick:te(a.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),c("p",Kr,h(b.description),1)])):m("",!0)],64)}),128))])}const st=I(Br,[["render",Vr]]),qe="all-in-one-seo-pack",Fr={setup(){return{licenseStore:ne(),postEditorStore:$(),rootStore:ue(),truSeo:new Wt}},components:{CoreAlert:Ce,CoreKeyphrase:lo,CoreLoader:vt,SvgCirclePlus:Pt,metaboxAnalysisDetail:st},data(){return{selectedKeyphrase:0,strings:{additional:n("Additional Keyphrases",qe),addKeyphrase:n("Add Additional Keyphrases",qe),keyphraseDocumentation:n("Improve your SEO rankings with additional keyphrases.",qe),upsell:D(n("Additional Keyphrases are a %1$s feature. %2$s",qe),"PRO",W.getUpsellLink("post-settings",fe.learnMore,"additional-keywords",!0))}}},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 r;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium");if(e.value){const t={keyphrase:e.value,score:0},s=this.postEditorStore.currentPost.keyphrases.additional.push(t),a=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(r=a[s])==null||r.click(),this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},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})}}},Nr={class:"additional-keyphrases-panel"},Gr={key:0},zr={class:"analysis-wrapper"},qr={class:"aioseo-description additional-keyphrases-description"},jr=["innerHTML"];function Wr(o,e,r,t,s,a){const g=p("core-keyphrase"),l=p("core-loader"),y=p("metaboxAnalysisDetail"),E=p("base-input"),b=p("svg-circle-plus"),x=p("base-button"),S=p("core-alert");return i(),v("div",Nr,[t.postEditorStore.currentPost.keyphrases.additional&&t.postEditorStore.currentPost.keyphrases.additional.length&&t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),v("div",Gr,[(i(!0),v(de,null,Re(t.postEditorStore.currentPost.keyphrases.additional,(k,T)=>(i(),_(g,{key:T,index:T,keyphrase:k.keyphrase,score:k.score,onSaved:a.onSaved,onDeleted:a.onDeleted,onSelectedKeyphrase:a.onSelectedKeyphrase,class:G(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===T?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),c("div",zr,[t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(l,{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(),_(E,{key:1,size:"medium",class:G(`add-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:yt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),_(x,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:u(()=>[d(b,{width:"14",height:"14"}),A(" "+h(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.rootStore.isPro||!t.licenseStore.license.isActive?(i(),v(de,{key:3},[c("div",qr,h(s.strings.keyphraseDocumentation),1),d(S,{class:"inline-upsell",type:"blue"},{default:u(()=>[c("div",{innerHTML:s.strings.upsell},null,8,jr)]),_:1})],64)):m("",!0)])}const $r=I(Fr,[["render",Wr],["__scopeId","data-v-76e100c0"]]),Yr=""+window.__aioseoDynamicImportPreload__("images/open-ai.ofcdxr9l.png"),Q="all-in-one-seo-pack",Zr={setup(){return{getAssetUrl:qo,settingsStore:we(),links:W}},components:{CoreModal:xe},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:Yr,strings:{upgradeToPro:n("Unlock AI Generator",Q),learnMoreLink:D('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',W.getUpsellUrl("post-settings","general","open-ai"),n("Learn more about all the features",Q),W.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?D(n("Generate New SEO %1$s",Q),n("Title",Q)):D(n("Generate New SEO %1$s",Q),n("Description",Q))},ctaHeaderTitle(){return this.type==="title"?D(n("Generating SEO %1$s is a Pro Feature",Q),n("Titles",Q)):D(n("Generating SEO %1$s is a Pro Feature",Q),n("Descriptions",Q))},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.",Q),n("titles",Q),n("title",Q)):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.",Q),n("meta descriptions",Q),n("description",Q))}}},Xr={class:"cta"},Jr=["src"],Qr={class:"bottom"},en={class:"title"},tn=["innerHTML"];function on(o,e,r,t,s,a){const g=p("base-button"),l=p("core-modal");return i(),_(l,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=y=>t.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:u(()=>[A(h(a.headerTitle),1)]),body:u(()=>[c("div",Xr,[c("img",{src:t.getAssetUrl(s.OpenAiImage),alt:"open-ai-upsell"},null,8,Jr),c("div",Qr,[c("div",null,[c("p",en,h(a.ctaHeaderTitle),1),c("p",null,h(a.ctaDescription),1)]),c("div",null,[d(g,{type:"green",size:"medium",tag:"a",href:t.links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:u(()=>[A(h(s.strings.upgradeToPro),1)]),_:1},8,["href"]),c("span",{innerHTML:s.strings.learnMoreLink},null,8,tn)])])])]),_:1})}const sn=I(Zr,[["render",on]]),rn={},nn={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},an=c("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),ln=[an];function cn(o,e){return i(),v("svg",nn,ln)}const dn=I(rn,[["render",cn]]),un="all-in-one-seo-pack",pn={setup(){return{settingsStore:we()}},components:{AiModal:sn,CoreTooltip:ke,SvgAiRobot:dn},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:n("Use AI Generator",un)}}}},mn={class:"aioseo-ai-generator"};function hn(o,e,r,t,s,a){const g=p("svg-ai-robot"),l=p("core-tooltip"),y=p("ai-modal");return i(),v("div",mn,[d(l,{type:"action",offset:"-30px,0"},{tooltip:u(()=>[A(h(s.strings.useAiGenerator),1)]),default:u(()=>[c("button",{type:"button",onClick:e[1]||(e[1]=E=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[d(g,{onClick:e[0]||(e[0]=E=>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 gn=I(pn,[["render",hn]]),_n={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,strings:t}=Yt();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,settingsStore:we(),strings:t}},components:{CoreTooltip:ke,SvgCaret:et,SvgCircleCheck:kt,SvgCircleQuestionMark:Ct,SvgEllipse:$t,TransitionSlide:ys},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)}},yn={class:"aioseo-card aioseo-sidebar-card"},fn={class:"text"},Sn={key:0,class:"content"},kn={key:1,class:"content"};function vn(o,e,r,t,s,a){const g=p("svg-ellipse"),l=p("svg-circle-check"),y=p("svg-circle-question-mark"),E=p("core-tooltip"),b=p("svg-caret"),x=p("transition-slide");return i(),v("div",yn,[r.hideHeader?m("",!0):(i(),v("div",{key:0,class:"header",onClick:e[0]||(e[0]=S=>t.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[c("div",fn,[Pe(o.$slots,"header",{},()=>[A(h(r.headerText),1)]),r.focusScore>=0?Pe(o.$slots,"alt",{key:0},()=>[r.focusScore!==null?(i(),v("span",{key:0,class:G(["card-score",t.getScoreClass(r.focusScore)])},h(r.focusScore)+"/100 ",3)):m("",!0)]):m("",!0),r.trueSeoScore>=0?Pe(o.$slots,"alt",{key:1},()=>[c("span",{class:G(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(i(),_(g,{key:0,width:"6"})):m("",!0),r.trueSeoScore===0?(i(),_(l,{key:1,width:"12"})):m("",!0),A(" "+h(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):m("",!0),o.$slots.tooltip?(i(),_(E,{key:2},{tooltip:u(()=>[Pe(o.$slots,"tooltip")]),default:u(()=>[d(y)]),_:3})):m("",!0)]),r.toggles&&t.settingsStore.settings.toggledCards?(i(),_(b,{key:0,class:G({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:u(()=>[o.$slots["before-tabs"]?(i(),v("div",Sn,[Pe(o.$slots,"before-tabs")])):m("",!0),Pe(o.$slots,"tabs"),o.$slots.default?(i(),v("div",kn,[Pe(o.$slots,"default")])):m("",!0)]),_:3},8,["active"])):m("",!0)])}const bn=I(_n,[["render",vn]]),wn={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,g=s.y===0?0:s.y/e,l=a*this.width,y=r-g*r+this.strokeWidth;return`${l},${y}`}).join(" ");return`0,${r+this.strokeWidth} `+t+` ${this.width},${r+this.strokeWidth}`}}},Cn=["width","height","viewBox"],Pn=["fill","points"],En=["stroke","strokeWidth","points"];function Tn(o,e,r,t,s,a){return i(),v("svg",{width:r.width,height:r.height,viewBox:a.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[c("polygon",{fill:r.fillColor,points:a.polylinePoints},null,8,Pn),c("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:a.polylinePoints},null,8,En)],8,Cn)}const xn=I(wn,[["render",Tn]]),An={},Ln={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},In=c("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),Mn=c("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),On=[In,Mn];function Dn(o,e){return i(),v("svg",Ln,On)}const Bn=I(An,[["render",Dn]]),N="all-in-one-seo-pack",Rn={setup(){return{connectStore:ko(),licenseStore:ne(),optionsStore:ze(),postEditorStore:$(),rootStore:ue(),semrushStore:vo(),truSeo:new Wt}},components:{CoreAlert:Ce,CoreKeyphrase:lo,CoreLoader:vt,CoreModal:xe,CoreTooltip:ke,SvgAreaChart:xn,SvgCircleCheck:kt,SvgCirclePlus:Pt,SvgLogoSemrush:Bn,SvgTrash:tt,metaboxAnalysisDetail:st},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:{value:"US",label:"United States of America - US"},strings:{modalTitle:D(n("Additional Keyphrases by %1$s",N),"Semrush"),addKeyphrase:n("Add Focus Keyphrase",N),getAdditionalKeyphrases:n("Get Additional Keyphrases",N),showResultsFor:n("Show Results For:",N),keyphrase:n("Keyphrase",N),volume:n("Volume",N),trend:n("Trend",N),addAdditionalKeyphrase:n("Add Keyphrase",N),removeAdditionalKeyphrase:n("Remove Keyphrase",N),noResults:n("No results",N),upsell:D(n("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",N),"Semrush","<strong>AIOSEO Pro</strong>",W.getUpsellLink("semrush-keywords",fe.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.",N),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:n("To use this feature, first add a focus keyphrase.",N),focusKeyphrase:n("Focus Keyphrase",N),delete:n("Delete",N),semrushTooltip:D(n("Get Additional Keyphrases with %1$s!",N),"Semrush"),semrushTooltipLicenseKey:D(n("%1$sA valid license key is required%2$s in order to connect with %3$s.",N),'<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.",N),"Semrush"),inOrderToUpgradeSemrush:D(n("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",N),W.getUpsellLink("semrush-pricing",fe.learnMore,"semrushPricing",!0))}}},watch:{semrushCountry:{deep:!0,handler(){this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?n("You have exceeded the limit for requests. Please try again later.",N):n("An error occurred while fetching keyphrases. Please try again later.",N)},semrushDatabase(){return Bo.map(o=>(o.value==="GB"&&(o.value="UK",o.label="United Kingdom"),o.value==="KR"&&(o.label="South Korea"),o)).filter(o=>Ro.includes(o.value.toLowerCase())).map(o=>(o.label=o.label+" - "+o.value.toUpperCase(),o))}},methods:{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){It(o,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(o){It(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(){this.loadingResults=!0,this.semrushStore.getKeyphrases(this.semrushCountry.value).then(()=>{this.loadingResults=!1}).catch(o=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(o.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 g={};try{const l=new URL(t.url);g=Ne(l.search)}catch{}this.completedCallback(g).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 80<o?"score-green":50<o?"score-orange":1<o?"score-red":"score-none"},async addAdditionalKeyphrase(o,e){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(){const o=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&o.push(this.semrushStore.refresh())}},Hn={class:"aioseo-focus-keyphrase-panel"},Un={class:"disabled-button gray medium"},Kn={class:"disabled-button gray"},Vn=["innerHTML"],Fn={class:"aioseo-modal-content has-padding"},Nn={class:"aioseo-settings-row"},Gn={class:"settings-name"},zn={class:"name"},qn={class:"results"},jn={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Wn={class:"keyphrases-header"},$n={class:"keyphrase"},Yn={class:"keyphrase-volume"},Zn={class:"keyphrase-trend"},Xn={key:0,class:"keyphrase-actions"},Jn={class:"keyphrases-rows"},Qn={class:"keyphrase"},ei={class:"keyphrase-volume"},ti={class:"keyphrase-trend"},oi={key:0,class:"keyphrase-actions"},si={key:0,class:"focus-keyphrase"},ri={key:1},ni={key:1,class:"remove-keyphrase"},ii=["onClick"],ai={key:1,class:"keyphrase-row"},li=["colspan"],ci={key:1},di={class:"semrush-logo"},ui={class:"semrush-upsell"},pi=["innerHTML"],mi=["innerHTML"];function hi(o,e,r,t,s,a){const g=p("base-input"),l=p("svg-circle-plus"),y=p("base-button"),E=p("core-tooltip"),b=p("core-keyphrase"),x=p("core-loader"),S=p("metaboxAnalysisDetail"),k=p("core-alert"),T=p("base-select"),Y=p("svg-area-chart"),J=p("svg-circle-check"),me=p("svg-trash"),he=p("svg-logo-semrush"),oe=p("core-modal");return i(),v("div",Hn,[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(g,{key:0,size:"medium",class:G(`add-focus-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:yt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),c("div",{class:G(`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:u(()=>[d(l,{width:"14",height:"14"}),A(" "+h(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(E,{key:1},{tooltip:u(()=>[c("span",null,h(s.strings.semrushGetAdditionalKeyphrases)+" "+h(s.strings.pleaseAddFocusKeyphrase),1)]),default:u(()=>[c("div",Un,[d(l,{width:"14",height:"14"}),A(" "+h(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0)],2),t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(b,{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(),_(S,{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(),_(E,{key:4},{tooltip:u(()=>[c("span",{innerHTML:s.strings.semrushTooltipLicenseKey},null,8,Vn)]),default:u(()=>[c("div",Kn,[d(l,{width:"14",height:"14"}),A(" "+h(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(),_(E,{key:5,disabled:!s.showSemrushTooltip||t.rootStore.isPro,"force-show":s.showSemrushTooltip&&!t.rootStore.isPro},{tooltip:u(()=>[c("span",null,h(s.strings.semrushTooltip),1)]),default:u(()=>[d(y,{class:"add-keyphrase gray medium",onClick:a.getAdditionalKeyphrases},{default:u(()=>[d(l,{width:"14",height:"14"}),A(" "+h(s.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):m("",!0),d(oe,{show:s.semrushShowModal,onClose:e[1]||(e[1]=V=>s.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:u(()=>[A(h(s.strings.modalTitle),1)]),body:u(()=>[c("div",Fn,[t.licenseStore.isUnlicensed?(i(),_(k,{key:0,type:"blue",innerHTML:s.strings.upsell},null,8,["innerHTML"])):m("",!0),c("div",Nn,[c("div",Gn,[c("div",zn,h(s.strings.showResultsFor),1)]),d(T,{class:"semrush-country-selector",size:"medium",options:a.semrushDatabase,placeholder:s.strings.selectPriceIndicator,modelValue:s.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=V=>s.semrushCountry=V)},null,8,["options","placeholder","modelValue"])]),c("div",qn,[c("table",jn,[c("thead",null,[c("tr",Wn,[c("th",$n,h(s.strings.keyphrase),1),c("th",Yn,h(s.strings.volume),1),c("th",Zn,h(s.strings.trend),1),t.licenseStore.isUnlicensed?m("",!0):(i(),v("th",Xn))])]),c("tbody",Jn,[t.semrushStore.results.length&&!s.loadingResults?(i(!0),v(de,{key:0},Re(t.semrushStore.results,(V,Z)=>(i(),v("tr",{class:G(["keyphrase-row",{even:Z%2===0}]),key:Z},[c("td",Qn,h(V[0]),1),c("td",ei,h(V[1]),1),c("td",ti,[d(Y,{width:66,height:24,data:a.transformTrendDataToChartPoints(V[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),t.licenseStore.isUnlicensed?m("",!0):(i(),v("td",oi,[V[0]===t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),v("div",si,[d(J),A(" "+h(s.strings.focusKeyphrase),1)])):m("",!0),V[0]!==t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),v("div",ri,[Z!==s.removingAdditionalKeyphrase&&(Z===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(V[0]))?(i(),_(y,{key:0,type:"gray",size:"medium",onClick:ge=>a.addAdditionalKeyphrase(V[0],Z),loading:Z===s.addingAdditionalKeyphrase},{default:u(()=>[A(h(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):m("",!0),a.getAdditionalKeyphrase(V[0])&&Z!==s.addingAdditionalKeyphrase&&(Z===s.removingAdditionalKeyphrase||a.hasAdditionalKeyphrase(V[0]))?(i(),v("div",ni,[c("span",{class:G(["keyphrase-score",a.scoreClass(a.getAdditionalKeyphrase(V[0]).score)]),onClick:ge=>a.goToAdditionalKeyphrase(V[0])},h(a.getAdditionalKeyphrase(V[0]).score)+"/100",11,ii),d(E,{type:"action"},{tooltip:u(()=>[A(h(s.strings.delete),1)]),default:u(()=>[d(me,{onClick:ge=>a.removeAdditionalKeyphrase(V[0],Z)},null,8,["onClick"])]),_:2},1024)])):m("",!0)])):m("",!0)]))],2))),128)):m("",!0),!t.semrushStore.results.length||s.loadingResults?(i(),v("tr",ai,[c("td",{colspan:t.licenseStore.isUnlicensed?3:4,class:"no-results"},[c("div",null,[s.loadingResults?(i(),_(x,{key:0,dark:""})):m("",!0),!s.loadingResults&&!t.semrushStore.error?(i(),v("span",ci,h(s.strings.noResults),1)):m("",!0),t.semrushStore.error&&!t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),_(k,{key:2,type:"red"},{default:u(()=>[A(h(a.semrushError),1)]),_:1})):m("",!0),t.semrushStore.error&&t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),v(de,{key:3},[c("div",di,[d(he)]),c("div",ui,[c("span",null,[c("strong",{innerHTML:s.strings.youHaveExceededSemrush},null,8,pi)]),A(" "+h(" ")+" "),c("span",{innerHTML:s.strings.inOrderToUpgradeSemrush},null,8,mi)])],64)):m("",!0)])],8,li)])):m("",!0)])])])])]),_:1},8,["show"])])}const gi=I(Rn,[["render",hi]]),je="all-in-one-seo-pack",_i={setup(){return{postEditorStore:$(),rootStore:ue()}},components:{CoreAlert:Ce,CoreMainTabs:Me,metaboxAnalysisDetail:st},data(){return{initTab:"basic",tabs:[{slug:"basic",name:n("Basic SEO",je)},{slug:"title",name:n("Title",je)},{slug:"readability",name:n("Readability",je)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){if(!Xe()||!["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.",je),o,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},yi={class:"page-analysis-panel"},fi=["innerHTML"];function Si(o,e,r,t,s,a){const g=p("core-alert"),l=p("core-main-tabs"),y=p("metaboxAnalysisDetail");return i(),v("div",yi,[a.pageBuilderAlert?(i(),_(g,{key:0,type:"yellow"},{default:u(()=>[c("span",{innerHTML:a.pageBuilderAlert},null,8,fi)]),_:1})):m("",!0),d(l,{tabs:a.parseTabs,showSaveButton:!1,active:s.initTab,internal:"",onChanged:e[0]||(e[0]=E=>a.processChangeTab(E))},null,8,["tabs","active"]),d(Fe,{mode:"out-in"},{default:u(()=>[t.postEditorStore.currentPost.page_analysis?(i(),_(y,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[s.initTab]},null,8,["analysisItems"])):m("",!0)]),_:1})])}const ki=I(_i,[["render",Si]]),We="all-in-one-seo-pack",vi={emits:["changeTab"],setup(){return{licenseStore:ne(),postEditorStore:$(),hasRequiredFeature:Be.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:fe,links:W}},components:{CoreAlert:Ce},data(){return{license:Be,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",We),linkingRecommendations:n("internal linking recommendations in Link Assistant.",We),upsell:D(n("Cornerstone Content is a %1$s feature. %2$s",We),"PRO",W.getUpsellLink("post-settings-general",fe.learnMore,"cornerstone-content",!0)),markAsCornerstone:n("Mark as Cornerstone",We)}}}},bi={class:"cornerstone-content-panel"},wi={class:"cornerstone-content-text"},Ci=["innerHTML"],Pi=["innerHTML"];function Ei(o,e,r,t,s,a){const g=p("base-toggle"),l=p("core-alert");return i(),v("div",bi,[c("p",wi,[c("span",null,h(s.strings.description),1),c("a",{href:"#",onClick:e[0]||(e[0]=te(y=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},h(s.strings.linkingRecommendations),1),c("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Ci)]),d(g,{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:u(()=>[A(h(s.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(i(),_(l,{key:0,class:"inline-upsell",type:"blue"},{default:u(()=>[c("div",{innerHTML:s.strings.upsell},null,8,Pi)]),_:1})):m("",!0)])}const Ti=I(vi,[["render",Ei]]),q="all-in-one-seo-pack",xi={emits:["changeTab"],setup(){const{parseTags:o}=wt({separator:void 0}),{maxRecommendedCount:e}=bt(),{watchHighlightSentences:r}=fr(),{runAnalysis:t,strings:s}=Yt();return{composableStrings:s,licenseStore:ne(),maxRecommendedCount:e,optionsStore:ze(),parseTags:o,postEditorStore:$(),rootStore:ue(),runAnalysis:t,seoPreviewStore:bo(),settingsStore:we(),tagsStore:wo(),truSeoHighlighterStore:Ze(),watchHighlightSentences:r}},components:{AdditionalKeyphrases:$r,AiGenerator:gn,BaseRadioToggle:Zt,CoreAlert:Ce,CoreGoogleSearchPreview:_s,CoreHtmlTagsEditor:Et,CoreSettingsRow:Se,CoreSidebarCard:bn,CoreTooltip:ke,CoreProBadge:fs,FocusKeyphrase:gi,MetaboxAnalysisDetail:st,PageAnalysis:ki,CornerstoneContent:Ti,SvgCircleQuestionMark:Ct,SvgDesktop:Ss,SvgMobile:ks,SvgPencil:St},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:Be,allowed:Ee,isPageBuilderEditor:De,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Gt(this.composableStrings,{pageName:n("General",q),serpPreview:n("SERP Preview",q),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.",q),editSnippet:n("Edit Snippet",q),clickToAddTitle:n("Click on the tags below to insert variables into your title.",q),metaDescription:n("Meta Description",q),clickToAddDescription:n("Click on the tags below to insert variables into your meta description.",q),cornerstoneContent:n("Cornerstone Content",q),focusKeyphrase:n("Focus Keyphrase",q),additionalKeyphrases:n("Additional Keyphrases",q),pageAnalysis:n("Page Analysis",q),basicSeo:n("Basic SEO",q),title:n("Title",q),readability:n("Readability",q),lookingForMetaKeywords:n("Looking for meta keywords?",q),goToAdvancedTab:n("Go to the Advanced tab to add/edit meta keywords",q),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.",q),"AIOSEO",W.getPlainLink(n("Search Appearance > Advanced",q),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",q),W.getDocLink(fe.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){rt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){rt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(o,e){rt(()=>this.watchHighlightSentences(o,e))}},computed:{title(){return D(n("%1$s Title",q),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return it()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&Ee("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return it()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&Ee("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return it()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&Ee("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 Co()?"-15px,0":De()?"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)})}},Ai={class:"aioseo-tab-content aioseo-post-general"},Li=["innerHTML"],Ii=["innerHTML"],Mi=["innerHTML"],Oi={key:0},Di=["innerHTML"],Bi=["innerHTML"];function Ri(o,e,r,t,s,a){const g=p("svg-circle-question-mark"),l=p("core-tooltip"),y=p("svg-desktop"),E=p("svg-mobile"),b=p("base-radio-toggle"),x=p("core-google-search-preview"),S=p("svg-pencil"),k=p("base-button"),T=p("core-settings-row"),Y=p("ai-generator"),J=p("core-html-tags-editor"),me=p("core-alert"),he=p("core-pro-badge"),oe=p("cornerstone-content"),V=p("focus-keyphrase"),Z=p("additional-keyphrases"),ge=p("page-analysis"),ie=p("core-sidebar-card"),ve=p("metabox-analysis-detail");return i(),v("div",Ai,[s.allowed("aioseo_page_general_settings")?(i(),_(T,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:u(()=>[c("div",null,[c("span",null,h(s.strings.serpPreview),1),d(l,{offset:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:u(()=>[A(h(s.strings.serpPreviewDocumentation),1)]),default:u(()=>[d(g)]),_:1},8,["offset"])]),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(b,{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:u(()=>[d(y)]),mobile:u(()=>[d(E)]),_:1},8,["modelValue","onUpdate:modelValue"])):m("",!0)]),content:u(()=>{var F,ae,_e;return[d(x,{"focus-keyphrase":((_e=(ae=(F=t.postEditorStore.currentPost)==null?void 0:F.keyphrases)==null?void 0:ae.focus)==null?void 0:_e.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(),_(k,{key:0,class:"edit-snippet gray small",onClick:a.editSnippetEv},{default:u(()=>[d(S),A(" "+h(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(),_(T,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:a.title,key:s.titleKey},{content:u(()=>[d(J,{modelValue:t.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=F=>t.postEditorStore.currentPost.title=F),e[2]||(e[2]=F=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=F=>s.titleCount=F.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":u(()=>[A(h(s.strings.clickToAddTitle),1)]),"append-button":u(()=>[t.postEditorStore.currentPost.postType&&!s.isPageBuilderEditor()?(i(),_(Y,{key:0,type:"title"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,60)},null,8,Li)]),_:1},8,["name"])):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(T,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:s.strings.metaDescription,key:s.descriptionKey},{content:u(()=>[a.showAutogenerateDescriptionsAlert?(i(),_(me,{key:0,type:"yellow"},{default:u(()=>[c("span",{innerHTML:s.strings.autogenerateDescriptionsAlert},null,8,Ii)]),_:1})):m("",!0),d(J,{modelValue:t.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=F=>t.postEditorStore.currentPost.description=F),e[5]||(e[5]=F=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=F=>s.descriptionCount=F.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":u(()=>[A(h(s.strings.clickToAddDescription),1)]),"append-button":u(()=>[t.postEditorStore.currentPost.postType&&!s.isPageBuilderEditor()?(i(),_(Y,{key:0,type:"description"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,160)},null,8,Mi)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="metabox"&&t.postEditorStore.currentPost.context==="post"&&t.postEditorStore.currentPost.postType!=="attachment"&&!s.isPageBuilderEditor()?(i(),_(T,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:u(()=>[A(h(s.strings.cornerstoneContent)+" ",1),t.licenseStore.isUnlicensed?(i(),_(he,{key:0})):m("",!0)]),content:u(()=>[d(oe,{onChangeTab:e[6]||(e[6]=F=>o.$emit("changeTab",F))})]),_:1})):m("",!0),a.displayTruSeoMetaboxCard?(i(),v(de,{key:4},[t.optionsStore.options.searchAppearance.advanced.useKeywords&&t.optionsStore.options.searchAppearance.advanced.keywordsLooking?(i(),v("div",Oi,[d(me,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:a.hideKeywordsLooking},{default:u(()=>[A(h(s.strings.lookingForMetaKeywords)+" ",1),c("a",{href:"#",onClick:e[7]||(e[7]=te(F=>o.$emit("changeTab","advanced"),["prevent"]))},h(s.strings.goToAdvancedTab),1),c("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=te(F=>o.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):m("",!0),d(T,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:u(()=>[c("span",null,h(s.strings.focusKeyphrase),1),d(l,{offset:"25px,0"},{tooltip:u(()=>[c("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Di)]),default:u(()=>[d(g)]),_:1})]),content:u(()=>[d(V)]),_:1}),d(T,{name:s.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:u(()=>[d(Z)]),_:1},8,["name"])],64)):m("",!0),a.displayTruSeoMetaboxCard&&t.postEditorStore.currentPost.page_analysis?(i(),_(T,{key:5,name:s.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:u(()=>[d(ge)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="sidebar"&&!s.isPageBuilderEditor()&&r.parentComponentContext!=="modal"?(i(),_(ie,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":s.strings.cornerstoneContent},{default:u(()=>[d(oe,{onChangeTab:e[9]||(e[9]=F=>o.$emit("changeTab",F))})]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ie,{key:7,slug:"focus",focusScore:a.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:u(()=>[c("span",null,h(s.strings.focusKeyphrase),1),d(l,{offset:a.getFocusKeyphraseTooltipOffset()},{tooltip:u(()=>[c("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Bi)]),default:u(()=>[d(g)]),_:1},8,["offset"])]),default:u(()=>[d(V)]),_:1},8,["focusScore"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ie,{key:8,slug:"additional","header-text":s.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:u(()=>[d(Z)]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ie,{key:9,slug:"basicseo","header-text":s.strings.basicSeo,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:u(()=>[d(ve,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ie,{key:10,slug:"title","header-text":s.strings.title,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:u(()=>[d(ve,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ie,{key:11,slug:"readability","header-text":s.strings.readability,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:u(()=>[d(ve,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0)])}const co=I(xi,[["render",Ri]]),Le="all-in-one-seo-pack",Hi={emits:[],setup(){const o=Je(),e="searchStatisticsKeywordRankTracker",r="keyword-rank-tracker-keywords-table",{orderBy:t,orderDir:s,pageNumber:a,processAdditionalFilters:g,processChangeItemsPerPage:l,processFilterTable:y,processPagination:E,processSearch:b,processSort:x,searchTerm:S,wpTableKey:k,wpTableLoading:T}=Xt({changeItemsPerPageSlug:e,fetchData:o.fetchKeywords,tableId:r});return{GLOBAL_STRINGS:fe,changeItemsPerPageSlug:e,keywordRankTrackerStore:o,orderBy:t,orderDir:s,pageNumber:a,processAdditionalFilters:g,processChangeItemsPerPage:l,processFilterTable:y,processPagination:E,processSearch:b,processSort:x,rootStore:ue(),searchTerm:S,settingsStore:we(),tableId:r,wpTableKey:k,wpTableLoading:T}},components:{CoreLoader:vt,CoreTooltip:ke,CoreWpTable:Jt,Graph:Ye,SvgEye:ot},props:{keywords:Object},data(){return{selectedRows:null,btnTrackingLoading:[],strings:{openInKeywordRankTracker:n("Open in Keyword Rank Tracker",Le),position:n("Position",Le),openInKrt:n("Open in Keyword Rank Tracker",Le)}}},computed:{tableBulkOptions(){return[{label:fe.delete,value:"delete"},{label:this.strings.addToGroup,value:"assignGroup"}]},tableColumns(){return[{slug:"name",label:n("Keyword",Le),sortable:!0,sortDir:this.orderBy==="name"?this.orderDir:"asc",sorted:this.orderBy==="name"},{slug:"position",label:n("Position",Le),sortable:!0,sortDir:this.orderBy==="position"?this.orderDir:"asc",sorted:this.orderBy==="position",width:"100px"},{slug:"history",label:n("Position History",Le),width:"150px"},{slug:"tracking",label:n("Tracking",Le),width:"100px"},{slug:"view",label:"",width:"40px"}]}},methods:{formatRowStatistic(o,e){var t;let r=((t=o.statistics)==null?void 0:t[e])??"";switch(e){case"position":r=r!==""?Math.round(r).toFixed(0):r;break}return r},positionHistorySeries(o){var e;return(e=o.statistics)!=null&&e.history?[{name:this.strings.position,data:o.statistics.history.map(r=>({x:r.date,y:r.position,label:r.position}))}]:[]},viewUrl(o){return this.rootStore.aioseo.urls.aio.searchStatistics+`&search=${o.name}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`},async toggleTracking(o,e,r){this.btnTrackingLoading[e]=!0,o.tracking=!o.tracking;try{o.id?await this.keywordRankTrackerStore.deleteKeywords([o.id]):await this.keywordRankTrackerStore.insertKeywords({keywords:[o.name]}),await this.keywordRankTrackerStore.fetchKeywords().then(()=>{this.keywordRankTrackerStore.maybeFetchStatistics({context:"keywords"})})}catch(t){o.tracking=!r,console.error(t)}finally{this.btnTrackingLoading=[]}}}},Ui={class:"post-title"},Ki={key:1},Vi={key:1},Fi={class:"tracking"},Ni={key:0,class:"btn-view"},Gi=["href"];function zi(o,e,r,t,s,a){const g=p("core-loader"),l=p("graph"),y=p("base-toggle"),E=p("svg-eye"),b=p("core-tooltip"),x=p("core-wp-table");return i(),_(x,{ref:"table",id:t.tableId,"additional-filters":[],"bulk-options":a.tableBulkOptions,columns:a.tableColumns,filters:[],"initial-items-per-page":t.settingsStore.settings.tablePagination[t.changeItemsPerPageSlug],"initial-page-number":t.pageNumber,"initial-search-term":t.searchTerm,key:t.wpTableKey,loading:t.wpTableLoading,rows:r.keywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:t.processFilterTable,onPaginate:t.processPagination,onProcessAdditionalFilters:t.processAdditionalFilters,onProcessBulkAction:S=>({}),onProcessChangeItemsPerPage:t.processChangeItemsPerPage,onSearch:t.processSearch,onSortColumn:t.processSort},{name:u(({row:S})=>[c("div",Ui,[c("b",null,h(S.name),1)])]),position:u(({row:S})=>[S.statistics===null?(i(),_(g,{key:0,dark:""})):(i(),v("div",Ki,h(a.formatRowStatistic(S,"position")),1))]),history:u(({row:S})=>[S.statistics===null?(i(),_(g,{key:0,dark:""})):(i(),v("div",Vi,[a.positionHistorySeries(S).length?(i(),_(l,{key:0,series:a.positionHistorySeries(S),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:k=>parseFloat(k).toFixed(2)}}}},null,8,["series","chart-overrides"])):m("",!0)]))]),tracking:u(({row:S,index:k})=>[c("div",Fi,[s.btnTrackingLoading[k]?(i(),_(g,{key:0,dark:""})):m("",!0),d(y,{modelValue:S.tracking,"onUpdate:modelValue":[T=>S.tracking=T,T=>a.toggleTracking(S,k,T)],disabled:!!s.btnTrackingLoading[k]},null,8,["modelValue","onUpdate:modelValue","disabled"])])]),view:u(({row:S})=>[S.id?(i(),v("div",Ni,[c("a",{href:a.viewUrl(S),target:"_blank"},[d(b,{type:"action",offset:"-80px,0"},{tooltip:u(()=>[A(h(s.strings.openInKrt),1)]),default:u(()=>[d(E)]),_:1})],8,Gi)])):m("",!0)]),_:1},8,["id","bulk-options","columns","initial-items-per-page","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}const ct=I(Hi,[["render",zi]]),qi={class:"keyword-rank-tracker-container"},ji=["innerHTML"],Wi={class:"keyword-rank-tracker-container__card"},$i={class:"keyword-rank-tracker-container__card__header"},Yi={class:"keyword-rank-tracker-container__card__body"},Zi=["innerHTML"],Xi={class:"keyword-rank-tracker-container__card"},Ji={class:"keyword-rank-tracker-container__card__header"},Qi={class:"keyword-rank-tracker-container__card__body"},ea=["innerHTML"],ta={class:"keyword-rank-tracker-container__card"},oa={class:"keyword-rank-tracker-container__card__header"},sa={class:"keyword-rank-tracker-container__card__body"},ra={__name:"KeywordRankTracker",setup(o){const e="all-in-one-seo-pack",r=Je(),t=ne(),s=ue(),a=zt(),g=W.getDocLink(n("Learn More",e),"keywordRankTracker",!0),l={...vs().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)},y=be(()=>({rows:r.keywords.all.rows.slice(0,3).map(b=>({...b,tracking:!0}))})),E=be(()=>{var S;const b={};for(const k of y.value.rows)(S=k==null?void 0:k.statistics)!=null&&S.history&&(b[k.name]=k);const x=[];for(const k in b)x.push({name:k,data:b[k].statistics.history.map(T=>({x:T.date,y:T.position}))});return x});return(b,x)=>(i(),v("div",null,[C(a).shouldShowSampleReports?(i(),v(de,{key:0},[c("div",qi,[c("div",null,[c("span",null,h(l.withAioseo),1),A(),c("span",{innerHTML:C(g)},null,8,ji)]),c("div",Wi,[c("div",$i,h(l.keywordPositions),1),c("div",Yi,[d(C(Ye),{height:320,series:E.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:S=>parseFloat(S).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),d(C(ct),{keywords:y.value},null,8,["keywords"])]),C(a).shouldShowSampleReports?m("",!0):(i(),v(de,{key:0},[d(C(Ge),{class:"keyword-rank-tracker-container"},{default:u(()=>[c("div",null,[c("span",null,h(l.withAioseo),1),A(),c("span",{innerHTML:C(g)},null,8,Zi)]),c("div",Xi,[c("div",Ji,h(l.keywordPositions),1),c("div",Qi,[d(C(Ye),{height:320,series:E.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:S=>parseFloat(S).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),d(C(ct),{keywords:y.value},null,8,["keywords"])]),_:1}),d(C(bs))],64))],64)):(i(),v(de,{key:1},[C(a).shouldShowSampleReports?m("",!0):(i(),_(C(Ge),{key:0,class:"keyword-rank-tracker-container"},{default:u(()=>[c("div",null,[c("span",null,h(l.withAioseo),1),A(),c("span",{innerHTML:C(g)},null,8,ea)]),c("div",ta,[c("div",oa,h(l.keywordPositions),1),c("div",sa,[d(C(Ye),{height:320,series:E.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:S=>parseFloat(S).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),d(C(ct),{keywords:y.value},null,8,["keywords"])]),_:1})),C(a).shouldShowSampleReports?m("",!0):(i(),_(C(Tt),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:C(a).showSampleReports,"cta-link":C(W).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),"button-text":l.ctaButtonText,"second-button-text":l.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":C(W).getUpsellUrl("search-statistics","keyword-rank-tracker",C(s).isPro?"pricing":"liteUpgrade"),"feature-list":[l.feature1,l.feature2,l.feature3,l.feature4],"align-top":"","hide-bonus":!C(t).isUnlicensed},{"header-text":u(()=>[A(h(l.ctaHeader),1)]),description:u(()=>[d(C(Qt),{"core-feature":["search-statistics"]}),A(" "+h(l.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))]))}},Ot=I(ra,[["__scopeId","data-v-8b446db1"]]),na={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=ne(),s=zt(),a=e,g={headerTitle:n("Keyword Performance Tracking",r)},l=be(()=>Be.hasCoreFeature("search-statistics")&&!s.isConnected||s.unverifiedSite);return(y,E)=>(i(),_(C(xe),{show:o.modalOpen,onClose:E[0]||(E[0]=b=>a("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:u(()=>[A(h(g.headerTitle),1)]),body:u(()=>[c("div",{class:G(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":C(s).shouldShowSampleReports}])},[!C(t).isUnlicensed&&C(Be).hasCoreFeature("search-statistics","keyword-rank-tracker")&&!l.value?(i(),_(C(Ot),{key:0})):(i(),_(C(Ot),{key:1}))],2)]),_:1},8,["show"]))}},ia={},aa={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},la=c("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),ca=[la];function da(o,e){return i(),v("svg",aa,ca)}const xt=I(ia,[["render",da]]),dt="all-in-one-seo-pack",ua={setup(){return{postEditorStore:$()}},components:{CoreSettingsRow:Se,SvgRightArrowShort:xt},data(){return{strings:{title:n("Link Assistant",dt),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.",dt),button:n("Open Link Assistant",dt)}}}},pa={class:"aioseo-link-assistant-sidebar"},ma={class:"aioseo-sidebar-content-title"};function ha(o,e,r,t,s,a){const g=p("svg-right-arrow-short"),l=p("base-button"),y=p("core-settings-row");return i(),v("div",pa,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:u(()=>[c("div",ma,h(s.strings.title),1),c("p",null,h(s.strings.description),1),d(l,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=E=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:u(()=>[d(g),A(" "+h(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const ga=I(ua,[["render",ha]]),_a=()=>{const o=(e,r)=>{const t=Ie(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 g=o(a.innerBlocks,r);g&&(s=g)}),s};return{findTargetBlock:o}},ye="all-in-one-seo-pack",ya=(o={})=>{const{emit:e,linkType:r,linksReport:t,metabox:s,pageNumber:a,post:g,postIndex:l,postReport:y,refreshTable:E=()=>{},wpTableLoading:b}=o,x=Te(""),S="linkAssistantPostsReport",k=Te([]),T=Te(!1),Y=be(()=>{if(!s)return g.links[r].rows;const R=a.value===1?0:(a.value-1)*10;return g.links[r].rows.slice(R,R+10)}),J={frontPage:n("Front Page",ye),deleteLink:n("Delete Link",ye)},me={areYouSureSingle:n("Are you sure you want to delete this link?",ye),areYouSureMultiple:n("Are you sure you want to delete these links?",ye),areYouSureAll:n("Are you sure you want to delete all links?",ye),actionCannotBeUndone:n("This action cannot be undone.",ye),yesSingle:n("Yes, I want to delete this link",ye),yesMultiple:n("Yes, I want to delete these links",ye),yesAll:n("Yes, I want to delete all links",ye),noChangedMind:n("No, I changed my mind",ye)},he=[{label:n("Delete",ye),value:"delete"}],oe=Po(),V=$(),Z=R=>{window.aioseoBus.$emit("updatingLinks",!0);const U={...R,additionalFilters:{postId:g.ID||V.currentPost.id,postIndex:l,type:r}};return oe[y?"fetchPostReport":"fetchLinksReportInner"](U).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},ge=R=>{window.location.href=`#/post-report?postId=${g.ID}&postIndex=${l}&initialTab=${R}`},ie=({action:R,selectedRows:U})=>{!U.length||!R||(x.value=R,k.value=U,T.value=!0)},ve=()=>{if(T.value=!1,!!k.value.length){if(typeof k.value=="number"){F(k.value);return}if(s&&r!=="inboundInternal"){Ue(k.value).forEach(U=>{ae(U)});return}window.aioseoBus.$emit("updatingLinks",!0),oe.linksBulk({postIndex:l,postId:g.ID||V.currentPost.id,action:x.value,linkType:r,linkIds:k.value,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),E()})}},F=R=>{const U=g.links[r].rows[R].id;if(U){if(s&&r!=="inboundInternal"){ae(R);return}window.aioseoBus.$emit("updatingLinks",!0),oe.linkDelete({postIndex:l,postId:g.ID||V.currentPost.id,linkId:U,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),E()})}},ae=R=>{Xe()&&(window.aioseoBus.$emit("updatingLinks",!1),_e(R),window.aioseoBus.$emit("updatingLinks",!1)),Nt()&&He(R)},_e=R=>{const U=V.currentPost.linkAssistant.links[r].rows[R];if(!U)return;window.aioseoBus.$emit("updatingLinks",!0);const z=Ie(U.anchor.trim()),B=U.phrase_html.trim(),f=Ie(B),P=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:w}=_a(),L=w(P,B);if(!L){window.aioseoBus.$emit("updatingLinks",!1);return}const M=window.wp.data.select("core/block-editor").getBlock(L);if(!M){window.aioseoBus.$emit("updatingLinks",!1);return}let H=new RegExp(`(<t?a[^<>]*>)(.*)?(${z})(.*)?(</t?a[^<>]*>)`,"i");const K=B.replace(H,"$2$3$4");H=new RegExp(`${f}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(L,{content:M.attributes.content.replace(H,K)}).then(()=>{g.links[r].rows.splice(R,1)}).catch(O=>{console.error(`Couldn delete link with type "${r}" and index ${R}:`,O)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},He=R=>{var K;const U=V.currentPost.linkAssistant.links[r].rows[R];if(!U||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let z="",B=null,f=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(B=window.tinyMCE.get("content"),z=B.getContent({format:"raw"})):(f=document.querySelector("textarea#content"),z=f?f.value:""),!z){window.aioseoBus.$emit("updatingLinks",!1);return}let P=U.phrase_html.trim();B||(P=P.replace(/(\sdata-mce-href=".*")/gi,""));const w=Ie(U.anchor.trim());let L=new RegExp(`(<t?a[^<>]*>)(.*)?(${w})(.*)?(</t?a[^<>]*>)`,"i");const M=P.replace(L,"$2$3$4"),H=Ie(P);L=new RegExp(`${H}`,"i"),z=z.replace(L,M),B?B.setContent(z):f.value=z,g.links[r].rows.splice(R,1),(K=oe.postSettingsUpdate({postContent:z}))==null||K.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},Ue=R=>{let U,z=[];return Array.isArray(R)&&(U=R.map(Number)),U&&g.links[r].rows.forEach((B,f)=>{U.includes(B.id)&&z.push(f)}),R==="all"&&(z=g.links[r].rows.map((B,f)=>f)),z.sort(function(B,f){return f-B})};return Ft(()=>{window.aioseoBus.$on("updatingLinks",R=>{b.value=R}),a.value=oe.postReport[r].totals.page}),{bulkOptions:he,changeItemsPerPageSlug:S,doBulkAction:ve,fetchData:Z,maybeDoBulkAction:ie,modalStrings:me,openPostReport:ge,rows:Y,selectedRows:k,showModal:T,strings:J}},fa={emits:["closeModal","doBulkAction"],components:{CoreModal:xe,SvgClose:ft},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}}},Sa={class:"aioseo-modal-body"},ka=["innerHTML"];function va(o,e,r,t,s,a){const g=p("svg-close"),l=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]=E=>o.$emit("closeModal",!0))},{body:u(()=>[c("div",Sa,[c("button",{class:"close",onClick:e[1]||(e[1]=te(E=>o.$emit("closeModal",!0),["stop"]))},[d(g,{onClick:e[0]||(e[0]=E=>o.$emit("closeModal",!0))})]),c("h3",null,h(a.areYouSure),1),c("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,ka),d(l,{type:"blue",size:"medium",onClick:e[2]||(e[2]=E=>o.$emit("doBulkAction",E))},{default:u(()=>[A(h(a.confirmation),1)]),_:1}),d(l,{type:"gray",size:"medium",onClick:e[3]||(e[3]=E=>o.$emit("closeModal",!0))},{default:u(()=>[A(h(r.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const ba=I(fa,[["render",va]]),wa={components:{CoreTooltip:ke},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=Ke.decode(this.anchor),e=Ie(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return Ke.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return Ke.decode(this.stripTags(this.getPart(2)))},lastPart(){return Ke.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const r=Ke.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()}}},Ca={class:"phrase"},Pa={key:0,class:"first"},Ea=["href"],Ta={key:2},xa={class:"anchor"},Aa={key:3,class:"last"};function La(o,e,r,t,s,a){const g=p("core-tooltip");return i(),v("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=l=>o.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=l=>o.$emit("mouseLeave"))},[c("span",Ca,[a.firstPart?(i(),v("span",Pa,h(a.firstPart),1)):m("",!0),r.tooltip?(i(),_(g,{key:1,type:"action"},{tooltip:u(()=>[c("a",{class:"tooltip-url",href:r.url,target:"_blank"},h(r.url),9,Ea)]),default:u(()=>[c("span",{class:"anchor",onClick:e[0]||(e[0]=(...l)=>a.maybeOpenLink&&a.maybeOpenLink(...l))},h(a.linkAnchor),1)]),_:1})):m("",!0),r.tooltip?m("",!0):(i(),v("div",Ta,[c("span",xa,h(a.linkAnchor),1)])),a.lastPart?(i(),v("span",Aa,h(a.lastPart),1)):m("",!0)]),Pe(o.$slots,"icons")],32)}const Ia=I(wa,[["render",La]]),Ma={},Oa={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Da=c("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),Ba=[Da];function Ra(o,e){return i(),v("svg",Oa,Ba)}const At=I(Ma,[["render",Ra]]),Ha={key:0},Ua={key:0,class:"row-actions"},Ka={class:"view"},Va=["href"],Fa={class:"edit"},Na=["href"],Ga={key:0,class:"links-bottom"},za={class:"links-bottom-left"},qa={key:1},ja={class:"links-bottom-right"},Wa="inboundInternal",Dt="aioseo-post-report-inbound-internal",$a={__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=ue(),s=we(),a=o,g=e,l=Te(1),y=Te(!1),{bulkOptions:E,changeItemsPerPageSlug:b,doBulkAction:x,fetchData:S,maybeDoBulkAction:k,modalStrings:T,openPostReport:Y,rows:J,selectedRows:me,showModal:he,strings:oe}=ya({emit:g,linkType:Wa,linksReport:a.linksReport,metabox:a.metabox,pageNumber:l,post:a.post,postIndex:a.postIndex,postReport:a.postReport,refreshTable:()=>ve(),wpTableLoading:y}),{editPost:V,viewPost:Z}=ws(),{processChangeItemsPerPage:ge,processFetchTableData:ie,refreshTable:ve,wpTableKey:F}=Xt({changeItemsPerPageSlug:b,fetchData:S,pageNumber:l,tableId:Dt,wpTableLoading:y}),ae=Gt(oe,{deleteAllLinks:D(n("Delete All %1$s Links",r),n("Inbound Internal",r)),outboundSuggestions:D(n("%1$s Link Suggestions",r),n("Inbound",r))}),_e=be(()=>[{slug:"post_title",label:n("Post Title",r)},{slug:"phrase",label:n("Phrase",r)},{slug:"delete",width:"50px"}]),He=be(()=>D(n("See All %1$s %2$s Links",r),a.post.links.inboundInternal.totals.total,n("Inbound Internal",r))),Ue=R=>{l.value=R,!a.metabox&&(y.value=!0,ie().then(()=>y.value=!1))};return(R,U)=>{const z=p("base-button");return i(),v("div",null,[(i(),_(C(Jt),{id:Dt,key:C(F),class:G({"link-assistant-inner-table":!o.postReport}),columns:_e.value,loading:y.value,rows:C(J),totals:o.post.links.inboundInternal.totals,"bulk-options":C(E),"initial-items-per-page":C(s).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":l.value,"show-pagination":!o.linksReport,"show-search":!1,"show-table-footer":o.postReport,"show-items-per-page":"",onPaginate:Ue,onProcessBulkAction:C(k),onProcessChangeItemsPerPage:C(ge)},{post_title:u(({row:B})=>{var f,P;return[c("span",null,[A(h(B.context.postTitle)+" ",1),((P=(f=B.context)==null?void 0:f.permalink)==null?void 0:P.replace(/\/$/,""))===C(t).aioseo.urls.home?(i(),v("span",Ha,"("+h(C(ae).frontPage)+")",1)):m("",!0)]),B.context?(i(),v("div",Ua,[c("span",Ka,[c("a",{href:B.context.permalink,target:"_blank"},h(C(Z)(B.context.postType.singular)),9,Va),A(" | ")]),c("span",Fa,[c("a",{href:B.context.editLink,target:"_blank"},h(C(V)(B.context.postType.singular)),9,Na)])])):m("",!0)]}),phrase:u(({row:B})=>[d(C(Ia),{phrase:B.phrase,phraseHtml:B.phrase_html||"",anchor:B.anchor,url:B.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:u(({row:B})=>[d(C(ke),{type:"action"},{tooltip:u(()=>[A(h(C(ae).deleteLink),1)]),default:u(()=>[d(C(tt),{onClick:f=>C(k)({action:"delete",selectedRows:[B.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(),v("div",Ga,[c("div",za,[o.post.links.inboundInternal.rows.length?(i(),_(z,{key:0,type:"blue",tag:"button",onClick:U[0]||(U[0]=B=>g("openSuggestions"))},{default:u(()=>[d(C(At)),A(" "+h(C(ae).outboundSuggestions),1)]),_:1})):m("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(i(),v("div",qa,[d(C(to)),c("a",{class:"link-view",href:"#",onClick:U[1]||(U[1]=te(B=>C(Y)("inbound-internal"),["prevent"]))},h(He.value),1)])):m("",!0)]),c("div",ja,[o.post.links.inboundInternal.rows.length?(i(),v("a",{key:0,class:"link-delete",onClick:U[2]||(U[2]=te(B=>C(k)({action:"delete",selectedRows:"all"}),["prevent"]))},h(C(ae).deleteAllLinks),1)):m("",!0)])])),d(C(ba),{show:C(he),selectedRows:C(me),strings:C(T),onDoBulkAction:C(x),onCloseModal:U[3]||(U[3]=B=>he.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},se="all-in-one-seo-pack",Ya={setup(){return{licenseStore:ne(),postEditorStore:$(),rootStore:ue(),links:W}},components:{CoreAlert:Ce,CoreBlur:Ge,CoreMainTabs:Me,CoreModal:xe,Cta:Tt,LinkAssistantInboundInternal:$a,LinksSideBar:ga,SvgLinkAffiliate:Cs,SvgLinkExternal:to,SvgLinkInternalInbound:Ps,SvgLinkInternalOutbound:Es,SvgLinkSuggestion:At,RequiredPlans:Qt},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",se),ctaHeader:D(n("Link Assistant is a %1$s Feature",se),"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.",se),thisFeatureRequires:n("This feature requires one of the following plans:",se),linkOpportunities:n("Actionable Link Suggestions",se),orphanedPosts:n("See Orphaned Posts",se),affiliateLinks:n("See Affiliate Links",se),domainReports:n("Top Domain Reports",se)}}},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",se))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:D("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,n("Outbound Internal",se))},{slug:"affiliate",icon:"svg-link-affiliate",name:D("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,n("Affiliate",se))},{slug:"external",icon:"svg-link-external",name:D("%1$s %2$s",this.mockedPostData.links.external.totals.total,n("External",se))},{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",se))}]},modalHeader(){return D(n('Links & Suggestions for "%1$s"',se),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},Za={class:"aioseo-tab-content aioseo-link-assistant"},Xa={key:0};function Ja(o,e,r,t,s,a){const g=p("core-main-tabs"),l=p("link-assistant-inbound-internal"),y=p("core-blur"),E=p("required-plans"),b=p("cta"),x=p("core-modal"),S=p("links-side-bar");return i(),v("div",Za,[o.$root.$data.screenContext==="metabox"?(i(),v("div",Xa,[d(y,null,{default:u(()=>[d(g,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":u(({tab:k})=>[(i(),_(pe(k.icon),{class:G([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(b,{"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":u(()=>[A(h(s.strings.ctaHeader),1)]),description:u(()=>[d(E,{addon:"aioseo-link-assistant"}),A(" "+h(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]=k=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:u(()=>[A(h(a.modalHeader),1)]),body:u(()=>[d(y,null,{default:u(()=>[d(g,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":u(({tab:k})=>[(i(),_(pe(k.icon),{class:G([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(b,{"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":u(()=>[A(h(s.strings.ctaHeader),1)]),description:u(()=>[d(E,{addon:"aioseo-link-assistant"}),A(" "+h(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(S,{key:1})):m("",!0)])}const Bt=I(Ya,[["render",Ja]]),Qa={};function el(o,e){return i(),v("div")}const tl=I(Qa,[["render",el]]),ol={setup(){return{addons:eo,licenseStore:ne()}},components:{Links:Bt,LinksActivate:tl,LinksLite:Bt},props:{parentComponentContext:String}},sl={class:"aioseo-tab-content aioseo-link-assistant"};function rl(o,e,r,t,s,a){const g=p("Links",!0),l=p("LinksLite"),y=p("LinksActivate");return i(),v("div",sl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(l,{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 nl=I(ol,[["render",rl]]),Ve="all-in-one-seo-pack",uo=()=>{const o=be(()=>[{groupLabel:n("Default",Ve),options:[{label:n("Default Object Type (Set in Social Networks)",Ve),value:"default"}]}].concat(Ho)),e=[{label:n("Default (Set under Social Networks)",Ve),value:"default"},{label:n("Summary",Ve),value:"summary"},{label:n("Summary with Large Image",Ve),value:"summary_large_image"}];return{getObjectTypeLabelByOption:s=>{let a="";return o.value.forEach(g=>{const l=g.options.find(y=>y.value===s);l&&(a=(l==null?void 0:l.label)||"")}),a},getTwitterCardLabelByOption:s=>{var a;return((a=e.find(g=>g.value===s))==null?void 0:a.label)||""},objectTypeOptions:o,twitterCardOptions:e}},j="all-in-one-seo-pack",il={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,setImageUrl:a}=oo(),{maxRecommendedCount:g}=bt(),{objectTypeOptions:l}=uo(),{parseTags:y}=wt({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,maxRecommendedCount:g,objectTypeOptions:l,optionsStore:ze(),parseTags:y,postEditorStore:$(),rootStore:ue(),setImageUrl:a}},components:{CoreAlert:Ce,CoreFacebookPreview:Ts,CoreHtmlTagsEditor:Et,CoreImageUploader:ro,CoreSettingsRow:Se},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:so,titleCount:0,descriptionCount:0,strings:{tabName:n("Facebook Preview",j),imageSource:n("Image Source",j),customFieldsName:n("Custom Field Name",j),video:n("Video URL",j),width:n("Width",j),height:n("Height",j),facebookObjectType:n("Object Type",j),facebookImage:n("Facebook Image",j),facebookTitle:n("Facebook Title",j),facebookDescription:n("Facebook Description",j),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.",j),clickToAddSiteName:n("Click on the tags below to insert variables into your site name.",j),clickToAddHomePageDescription:n("Click on the tags below to insert variables into your meta description.",j),articleSection:n("Article Section",j),articleTags:n("Article Tags",j),tagPlaceholder:n("Press enter to create an article tag",j),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",j),n("Open Graph",j),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",j)))}}},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(){const o=this.postEditorStore.currentPost.context==="term"?"taxonomies":"postTypes";return this.postEditorStore.currentPost.og_object_type==="article"||this.postEditorStore.currentPost.og_object_type==="default"&&this.optionsStore.dynamicOptions.social.facebook.general[o][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType].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)}},al={class:"tab-facebook"},ll={id:"aioseo-post-settings-facebook"},cl=["innerHTML"],dl=["innerHTML"];function ul(o,e,r,t,s,a){const g=p("core-alert"),l=p("core-facebook-preview"),y=p("core-settings-row"),E=p("core-html-tags-editor"),b=p("base-select"),x=p("base-input"),S=p("core-image-uploader");return i(),v("div",al,[d(y,{class:"snippet-preview-row"},{name:u(()=>[c("span",null,h(s.strings.tabName),1)]),content:u(()=>[t.optionsStore.options.social.facebook.general.enable?m("",!0):(i(),_(g,{key:0,class:"facebook-disabled-warning",innerHTML:s.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),d(l,{description:a.previewDescription,image:t.imageUrl,loading:t.loading,title:a.previewTitle},null,8,["description","image","loading","title"])]),_:1}),c("div",ll,[d(y,{name:s.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:u(()=>[d(E,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=k=>t.postEditorStore.currentPost.og_title=k),e[2]||(e[2]=k=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=k=>s.titleCount=k.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":u(()=>[A(h(s.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,95)},null,8,cl)]),_:1},8,["name"]),d(y,{name:s.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:u(()=>[d(E,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=k=>t.postEditorStore.currentPost.og_description=k),e[5]||(e[5]=k=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=k=>s.descriptionCount=k.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":u(()=>[A(h(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,dl)]),_:1},8,["name"]),d(y,{class:"facebook-image-source",name:s.strings.imageSource,align:""},{content:u(()=>[d(b,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=k=>a.saveImageType(k.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:u(()=>[d(x,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=k=>t.postEditorStore.currentPost.og_image_custom_fields=k),e[8]||(e[8]=k=>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:u(()=>[d(S,{description:s.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=k=>t.postEditorStore.currentPost.og_image_custom_url=k)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(y,{class:"facebook-video",name:s.strings.video,align:""},{content:u(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=k=>t.postEditorStore.currentPost.og_video=k)},null,8,["modelValue"])]),_:1},8,["name"]),d(y,{class:"facebook-object-type",name:s.strings.facebookObjectType,align:""},{content:u(()=>[d(b,{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]=k=>a.setObjectType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),a.shouldShowArticleSection?(i(),_(y,{key:2,name:s.strings.articleSection,align:""},{content:u(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=k=>t.postEditorStore.currentPost.og_article_section=k)},null,8,["modelValue"])]),_:1},8,["name"])):m("",!0),a.shouldShowArticleSection?(i(),_(y,{key:3,name:s.strings.articleTags,align:""},{content:u(()=>[d(b,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=k=>t.postEditorStore.currentPost.og_article_tags=k),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])])}const pl=I(il,[["render",ul]]),re="all-in-one-seo-pack",ml={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,setImageUrl:s}=oo(),{maxRecommendedCount:a}=bt(),{twitterCardOptions:g}=uo(),{parseTags:l}=wt({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,maxRecommendedCount:a,optionsStore:ze(),parseTags:l,postEditorStore:$(),rootStore:ue(),setImageUrl:s,twitterCardOptions:g}},components:{CoreAlert:Ce,CoreHtmlTagsEditor:Et,CoreImageUploader:ro,CoreSettingsRow:Se,CoreTwitterPreview:xs},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:so,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:n("X (Twitter) Preview",re),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.",re),useFB:n("Use Data from Facebook Tab",re),imageSource:n("Image Source",re),customFieldsName:n("Custom Field Name",re),twitterImage:n("X Image",re),twitterTitle:n("X Title",re),twitterDescription:n("X Description",re),twitterCardType:n("X Card Type",re),minimumSizeSummary:n("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",re),minimumSizeSummaryWithLarge:n("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",re),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",re),n("X (Twitter)",re),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",re)))}}},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)}},hl={class:"tab-twitter"},gl={id:"aioseo-post-settings-twitter"},_l=["innerHTML"],yl=["innerHTML"];function fl(o,e,r,t,s,a){const g=p("core-alert"),l=p("core-twitter-preview"),y=p("core-settings-row"),E=p("base-toggle"),b=p("core-html-tags-editor"),x=p("base-select"),S=p("base-input"),k=p("core-image-uploader");return i(),v("div",hl,[d(y,{class:"snippet-preview-row"},{name:u(()=>[c("span",null,h(s.strings.twitterPreview),1)]),description:u(()=>[c("i",null,h(s.strings.twitterPreviewDescription),1)]),content:u(()=>[t.optionsStore.options.social.twitter.general.enable?m("",!0):(i(),_(g,{key:0,class:"twitter-disabled-warning",innerHTML:s.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),d(l,{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}),c("div",gl,[d(y,{name:s.strings.useFB,class:"use-facebook"},{content:u(()=>[d(E,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=T=>t.postEditorStore.currentPost.twitter_use_og=T),e[1]||(e[1]=T=>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:u(()=>[d(b,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=T=>t.postEditorStore.currentPost.twitter_title=T),e[4]||(e[4]=T=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=T=>s.titleCount=T.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"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,70)},null,8,_l)]),_: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:u(()=>[d(b,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=T=>t.postEditorStore.currentPost.twitter_description=T),e[7]||(e[7]=T=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=T=>s.descriptionCount=T.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":u(()=>[A(h(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),c("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,yl)]),_: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:u(()=>[d(x,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=T=>a.saveTwitterImageType(T.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:u(()=>[d(S,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=T=>t.postEditorStore.currentPost.twitter_image_custom_fields=T),e[10]||(e[10]=T=>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:u(()=>[d(k,{description:a.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=T=>t.postEditorStore.currentPost.twitter_image_custom_url=T)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(y,{class:"twitter-card-type",name:s.strings.twitterCardType,align:""},{content:u(()=>[d(x,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:a.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=T=>a.cardSelect(T.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Sl=I(ml,[["render",fl]]),ut="all-in-one-seo-pack",kl={setup(){return{postEditorStore:$(),settingsStore:we()}},components:{CoreSettingsRow:Se,SvgPencil:St},data(){return{strings:{title:n("Social Media",ut),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.",ut),editSnippet:n("Preview & Edit",ut)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},vl={class:"aioseo-sidebar-content-title"};function bl(o,e,r,t,s,a){const g=p("svg-pencil"),l=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:u(()=>[c("div",vl,h(s.strings.title),1),c("p",null,h(s.strings.sidebarCopy),1),d(l,{class:"open-social-modal gray small",onClick:a.openModalEv},{default:u(()=>[d(g),A(" "+h(s.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):m("",!0)}const wl=I(kl,[["render",bl]]),pt="all-in-one-seo-pack",Cl={setup(){return{postEditorStore:$(),settingsStore:we()}},components:{BaseRadioToggle:Zt,CoreMainTabs:Me,CoreSettingsRow:Se,Facebook:pl,Twitter:Sl,SocialSideBar:wl},props:{parentComponentContext:String},data(){return{strings:{pageName:n("Social",pt)},tabs:[{slug:"facebook",name:n("Facebook",pt)},{slug:"twitter",name:n("X (Twitter)",pt)}]}},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(){Ne()["social-tab"]&&(this.processChangeTab(Ne()["social-tab"]),setTimeout(()=>{_t("social-tab")},500))}},Pl={class:"aioseo-tab-content aioseo-post-social"};function El(o,e,r,t,s,a){const g=p("core-main-tabs"),l=p("core-settings-row"),y=p("social-side-bar");return i(),v("div",Pl,[o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(l,{key:0,"no-border":""},{content:u(()=>[d(g,{tabs:s.tabs,showSaveButton:!1,active:a.initTab,internal:"",onChanged:e[0]||(e[0]=E=>a.processChangeTab(E)),disableMobile:""},null,8,["tabs","active"])]),_:1})):m("",!0),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(Fe,{key:1,name:"route-fade",mode:"out-in"},{default:u(()=>[(i(),_(pe(a.initTab)))]),_:1})):m("",!0),r.parentComponentContext!=="modal"?(i(),_(y,{key:2})):m("",!0)])}const po=I(Cl,[["render",El]]),mt="all-in-one-seo-pack",Tl={setup(){return{settingsStore:we()}},components:{CoreMainTabs:Me,CoreSettingsRow:Se,General:co,Social:po,SvgSettings:no,SvgShare:io},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=>Ee(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},xl={class:"aioseo-modal-content"},Al={class:"mobile-radio-buttons"},Ll={class:"component-wrapper"};function Il(o,e,r,t,s,a){const g=p("core-main-tabs");return i(),v("div",xl,[c("div",Al,[d(g,{tabs:a.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=l=>a.processChangeTab(l))},null,8,["tabs","active"])]),c("div",Ll,[d(Fe,{name:"route-fade",mode:"out-in"},{default:u(()=>[(i(),_(pe(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Ml=I(Tl,[["render",Il]]),ht="all-in-one-seo-pack",Ol={setup(){return{postEditorStore:$()}},components:{CoreSettingsRow:Se,SvgRightArrowShort:xt},data(){return{strings:{title:n("Redirects",ht),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.",ht),button:n("Open Redirects",ht)}}}},Dl={class:"aioseo-redirects-sidebar"},Bl={class:"aioseo-sidebar-content-title"};function Rl(o,e,r,t,s,a){const g=p("svg-right-arrow-short"),l=p("base-button"),y=p("core-settings-row");return i(),v("div",Dl,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-redirects-copy"},{content:u(()=>[c("div",Bl,h(s.strings.title),1),c("p",null,h(s.strings.description),1),d(l,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=E=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:u(()=>[d(g),A(" "+h(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const Hl=I(Ol,[["render",Rl],["__scopeId","data-v-1754537e"]]),Ul="all-in-one-seo-pack",Kl={setup(){return{postEditorStore:$()}},components:{CoreModal:xe,RedirectsSideBar:Hl,RedirectsLite:Ls},props:{parentComponentContext:String},data(){return{strings:{modalHeader:n("Redirects",Ul)}}}},Vl={class:"bd"};function Fl(o,e,r,t,s,a){const g=p("redirects-lite"),l=p("core-modal"),y=p("redirects-side-bar");return i(),v("div",null,[o.$root.$data.screenContext==="metabox"?(i(),_(g,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),d(l,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=E=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:u(()=>[A(h(s.strings.modalHeader),1)]),body:u(()=>[c("div",Vl,[d(g,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(y,{key:1})):m("",!0)])}const Rt=I(Kl,[["render",Fl]]),Nl={};function Gl(o,e){return i(),v("div")}const zl=I(Nl,[["render",Gl]]),ql={setup(){return{addons:eo,licenseStore:ne()}},components:{Redirects:Rt,RedirectsActivate:zl,RedirectsLite:Rt},props:{parentComponentContext:String}},jl={class:"aioseo-tab-content"};function Wl(o,e,r,t,s,a){const g=p("Redirects",!0),l=p("RedirectsLite"),y=p("RedirectsActivate");return i(),v("div",jl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(l,{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 $l=I(ql,[["render",Wl]]),Yl={class:"graph-container"},Zl={class:"graph"},Xl={class:"left"},Jl=["title"],Ql={class:"right action-buttons"},mo={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",r=o,{childGraphs:t,graphs:s}=qt(),a=be(()=>{var S,k,T,Y;if(r.customGraph)return n("Custom Schema",e)+" - "+r.graph.graphName;if(r.defaultGraph)return y(r.defaultGraph);if((S=r.graph)!=null&&S.label)return r.graph.label;const b=(T=(k=r.graph)==null?void 0:k.slug)==null?void 0:T.toLowerCase();return((Y=s.find(J=>J.slug===b))==null?void 0:Y.label)||n("Parsing Block Data...",e)}),g=be(()=>{if(r.customGraph)return lt;if(r.defaultGraph){const b=l(r.defaultGraph);return b?E(b):lt}return E(r.graph.slug)}),l=b=>{Object.entries(t).forEach(S=>{const k=S[0];S[1].forEach(T=>{b===T.childGraphName&&(b=k)})});let x="";return s.forEach(S=>{S.graphName===b&&(x=S.slug)}),x},y=b=>{let x="",S=b;return Object.entries(t).forEach(k=>{const T=k[0];k[1].forEach(Y=>{x||b===Y.childGraphName&&(x=T,S=Y.label,s.forEach(J=>{J.graphName===T&&(x=J.label)}))})}),x?x+" - "+S+" "+n("(Default)",e):b+" "+n("(Default)",e)},E=b=>{switch(b){case"article":return ps;case"book":return us;case"car":return ds;case"course":return cs;case"dataset":return ls;case"event":return as;case"faq-page":return is;case"fact-check":return ns;case"how-to":return rs;case"job-posting":return ss;case"movie":return os;case"music":return ts;case"person":return es;case"product":return Qo;case"product-review":return Jo;case"recipe":return Xo;case"service":return Zo;case"software-application":return Yo;case"video":return $o;case"web-page":return Wo;default:return lt}};return(b,x)=>(i(),v("div",Yl,[c("div",Zl,[c("div",Xl,[(i(),_(pe(g.value))),c("span",{title:a.value},h(a.value),9,Jl)]),c("div",Ql,[Pe(b.$slots,"buttons")])])]))}},ec={class:"title"},tc=["innerHTML"],oc={class:"schema-templates"},sc={class:"main"},rc={class:"schema-catalog"},nc={class:"graphs"},ic={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:r}=qt(),t=ue(),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),W.getDocLink(fe.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)],g=[{slug:"schema-templates",icon:ms,name:n("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:hs,name:n("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:gs,name:n("Schema Validation",e),component:"validation"}],l=[{slug:"schema-catalog",name:n("Schema Catalog",e)},{slug:"your-templates",name:n("Your Templates",e)}];return(y,E)=>{const b=p("base-input"),x=p("base-button");return i(),_(C(xe),{classes:["aioseo-post-schema-modal-cta"],onClose:E[0]||(E[0]=S=>y.$emit("close"))},{headerTitle:u(()=>[c("div",ec,h(s.schemaGenerator),1),d(C(ke),null,{tooltip:u(()=>[c("span",{innerHTML:s.headerTooltip},null,8,tc)]),default:u(()=>[d(C(Ct))]),_:1})]),body:u(()=>[d(C(Ge),null,{default:u(()=>[d(C(Me),{tabs:g,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":u(({tab:S})=>[(i(),_(pe(S.icon)))]),_:1}),c("div",oc,[d(C(Me),{tabs:l,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":u(({tab:S})=>[(i(),_(pe(S.icon)))]),_:1}),c("div",sc,[d(b,{class:"search",size:"medium",prependIcon:"search",placeholder:s.searchSchema},null,8,["placeholder"]),c("div",rc,[c("div",nc,[(i(!0),v(de,null,Re(C(r),(S,k)=>(i(),_(C(mo),{key:S.graphName+k,graph:S},{buttons:u(()=>[d(x,{class:"small",type:"gray"},{default:u(()=>[d(C(Pt))]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),d(C(Tt),{"cta-link":C(W).getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":s.ctaButtonText,"learn-more-link":C(W).getUpsellUrl("schema-generator",null,C(t).isPro?"pricing":"liteUpgrade"),"feature-list":a},{"header-text":u(()=>[A(h(s.ctaHeader),1)]),description:u(()=>[A(h(s.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},Oe="all-in-one-seo-pack",ac={setup(){return{postEditorStore:$(),GLOBAL_STRINGS:fe,links:W}},components:{CoreAlert:Ce,CoreSettingsRow:Se,CoreTooltip:ke,CtaModal:ic,GraphCard:mo,SvgEye:ot},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.",Oe),noGraphs:n("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",Oe),schemaInUse:n("Schema In Use",Oe),generateSchema:n("Generate Schema",Oe),validateSchema:n("Validate Schema",Oe),defaultGraphTooltip:n("This is the default graph for this post type. All data for this graph will be automatically generated.",Oe)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return De()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},lc={class:"graphs"},cc={key:0,class:"sidebar-description"},dc={class:"description"},uc=["innerHTML"],pc=["innerHTML"],mc={class:"buttons"};function hc(o,e,r,t,s,a){const g=p("svg-eye"),l=p("base-button"),y=p("core-tooltip"),E=p("graph-card"),b=p("core-alert"),x=p("cta-modal"),S=p("core-settings-row");return i(),v("div",{class:G(["aioseo-tab-content aioseo-post-schema",[{sidebar:a.isSidebar}]])},[d(S,{name:s.strings.schemaInUse},{content:u(()=>[c("div",lc,[a.isSidebar?(i(),v("div",cc,[c("p",dc,h(s.strings.sidebarDescription),1),c("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,uc)])):m("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(E,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:u(()=>[d(y,{offset:a.getDefaultSchemaTooltipOffset()},{tooltip:u(()=>[c("span",{innerHTML:s.strings.defaultGraphTooltip},null,8,pc)]),default:u(()=>[d(l,{class:"small no-hover",type:"gray"},{default:u(()=>[d(g)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):m("",!0)]),c("div",mc,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(b,{key:0,class:"no-graphs",type:"yellow"},{default:u(()=>[A(h(s.strings.noGraphs),1)]),_:1})):m("",!0),d(l,{class:"medium",type:"blue",onClick:e[0]||(e[0]=k=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:u(()=>[A(h(s.strings.generateSchema),1)]),_:1}),d(l,{class:"medium",type:"gray",onClick:e[1]||(e[1]=k=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:u(()=>[A(h(s.strings.validateSchema),1)]),_:1})]),d(x,{show:!a.isSidebar&&s.modalOpenMetabox,onClose:e[2]||(e[2]=k=>s.modalOpenMetabox=!1)},null,8,["show"]),d(x,{show:a.isSidebar&&s.modalOpenSidebar,onClose:e[3]||(e[3]=k=>s.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const Ht=I(ac,[["render",hc]]),gc={setup(){return{licenseStore:ne()}},components:{Schema:Ht,SchemaLite:Ht},props:{parentComponentContext:String}},_c={class:"aioseo-post-schema-view"};function yc(o,e,r,t,s,a){const g=p("schema",!0),l=p("schema-lite");return i(),v("div",_c,[t.licenseStore.isUnlicensed?m("",!0):(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const fc=I(gc,[["render",yc]]),ho=o=>(Kt("data-v-20175fdb"),o=o(),Vt(),o),Sc={class:"aioseo-seo-revision-list-item"},kc={class:"aioseo-seo-revision-list-item__author"},vc={class:"aioseo-seo-revision-list-item__author__avatar"},bc={class:"aioseo-seo-revision-list-item__author__name"},wc=ho(()=>c("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Cc={class:"aioseo-seo-revision-list-item__action"},Pc=ho(()=>c("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Ec={class:"aioseo-seo-revision-list-item__action__view"},Tc={class:"aioseo-seo-revision-list-item__action__delete"},xc={__name:"ListItem",setup(o){const{currentUser:e}=jt(Qe());return(r,t)=>(i(),v("div",Sc,[c("div",kc,[c("span",vc,[d(C(Is),{src:C(e).avatar.url,size:C(e).avatar.size},null,8,["src","size"])]),c("span",bc,h(C(Eo)(C(e).display_name,30)),1)]),wc,c("div",Cc,[Pc,c("span",Ec,[d(C(ot),{width:"18"})]),c("span",Tc,[d(C(tt),{width:"18"})])])]))}},Ac=I(xc,[["__scopeId","data-v-20175fdb"]]),Lc={components:{SeoRevisionListItem:Ac}},Ic={class:"aioseo-seo-revisions-list"};function Mc(o,e,r,t,s,a){const g=p("seo-revision-list-item");return i(),v("div",Ic,[(i(),v(de,null,Re(13,l=>d(g,{key:"seo-revision-list-item-"+l})),64))])}const Oc=I(Lc,[["render",Mc],["__scopeId","data-v-7b502c37"]]),gt="all-in-one-seo-pack",Dc={setup(){return{seoRevisionsStore:Qe()}},components:{CoreBlur:Ge,CoreModal:xe,CoreSettingsRow:Se,SeoRevisionsList:Oc,SeoRevisionsUpsell:Ms,SvgRightArrowShort:xt},data(){return{strings:{button:n("Open SEO Revisions",gt),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.",gt),seoRevisions:n("SEO Revisions",gt)}}}},Bc={key:0,class:"aioseo-seo-revisions-metabox"},Rc={key:1,class:"aioseo-seo-revisions-sidebar"},Hc={class:"aioseo-seo-revisions-sidebar__modal-body"},Uc={class:"description"};function Kc(o,e,r,t,s,a){const g=p("seo-revisions-list"),l=p("core-blur"),y=p("seo-revisions-upsell"),E=p("core-modal"),b=p("svg-right-arrow-short"),x=p("base-button"),S=p("core-settings-row");return o.$root.$data.screenContext==="metabox"?(i(),v("div",Bc,[d(l,null,{default:u(()=>[d(g)]),_:1}),d(y,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(i(),v("div",Rc,[d(E,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=k=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:u(()=>[A(h(s.strings.seoRevisions),1)]),body:u(()=>[c("div",Hc,[d(l,null,{default:u(()=>[d(g)]),_:1}),d(y,{"parent-component-context":"modal"})])]),_:1},8,["show"]),d(S,{align:""},{name:u(()=>[A(h(s.strings.seoRevisions),1)]),description:u(()=>[c("p",Uc,h(s.strings.description),1)]),content:u(()=>[d(x,{class:"gray small",onClick:e[1]||(e[1]=te(k=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:u(()=>[d(b,{width:"10"}),A(" "+h(s.strings.button),1)]),_:1})]),_:1})])):m("",!0)}const Ut=I(Dc,[["render",Kc],["__scopeId","data-v-eda67d56"]]),Vc={setup(){return{licenseStore:ne()}},components:{SeoRevisions:Ut,SeoRevisionsLite:Ut},props:{parentComponentContext:String},data(){return{license:Be}}},Fc={class:"aioseo-seo-revisions aioseo-tab-content"};function Nc(o,e,r,t,s,a){const g=p("seo-revisions",!0),l=p("seo-revisions-lite");return i(),v("div",Fc,[!t.licenseStore.isUnlicensed&&s.license.hasCoreFeature("seo-revisions")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Gc=I(Vc,[["render",Nc],["__scopeId","data-v-463f2e4b"]]),zc={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=jt(Qe()),r=be(()=>99<e.value?"99+":e.value);return(t,s)=>C(e)?(i(),v("span",{key:0,class:G(["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<C(e)}])},h(r.value),3)):m("",!0)}},qc={},jc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},Wc=c("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),$c=[Wc];function Yc(o,e){return i(),v("svg",jc,$c)}const Zc=I(qc,[["render",Yc]]),Xc={},Jc={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},Qc=c("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),ed=[Qc];function td(o,e){return i(),v("svg",Jc,ed)}const od=I(Xc,[["render",td]]),sd={},rd={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},nd=c("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),id=[nd];function ad(o,e){return i(),v("svg",rd,id)}const ld=I(sd,[["render",ad]]),cd={},dd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},ud=c("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),pd=[ud];function md(o,e){return i(),v("svg",dd,pd)}const hd=I(cd,[["render",md]]),Ae="all-in-one-seo-pack",gd={setup(){const o=Qe(),e=Te(!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 $e(),window.wp.data.subscribe(()=>{e.value||r()})};return{keywordRankTrackerStore:Je(),licenseStore:ne(),postEditorStore:$(),redirectsStore:To(),rootStore:ue(),seoRevisionsStore:o,settingsStore:we(),watchObjectRevisionsOnSavePost:t}},components:{Advanced:rr,Alert:ao,CoreMainTabs:Me,CoreModal:xe,General:co,KeywordRankTracker:na,LinkAssistant:nl,ModalContent:Ml,Redirects:$l,Schema:fc,SeoRevisions:Gc,SeoRevisionsCountBadge:zc,Social:po,SvgBackup:Zc,SvgBuild:As,SvgCaret:et,SvgCircleInformationSolid:od,SvgClose:ft,SvgLinkSuggestion:At,SvgReceipt:ld,SvgRedirectCrossedArrows:hd,SvgSettings:no,SvgShare:io},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:n("Preview Snippet Editor",Ae)},activeMainSidebarTab:"",isPageBuilderEditor:De}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Mo(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",Ae)},{slug:"social",icon:"svg-share",name:n("Social",Ae)},{slug:"schema",icon:"svg-receipt",name:n("Schema",Ae)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:n("Redirects",Ae),warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:n("SEO Revisions",Ae),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:n("Advanced",Ae)}];return!this.rootStore.aioseo.integration&&!De()&&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",Ae)}),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"&&Ee(this.getTabPermission(o.slug))):this.tabs.filter(o=>Ee(this.getTabPermission(o.slug))?!0:o.slug==="general"&&(Ee("aioseo_page_analysis")||Ee(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=Ne()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{_t("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]})}),this.$root.$data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=Ne()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{_t("aioseo-tab")},500);break}},beforeMount(){const o=document.querySelector(".interface-complementary-area__pin-unpin-item");o&&o!==null&&(o.style.display="block")},mounted(){Xe()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},_d={class:"aioseo-app aioseo-post-settings"},yd={key:0,class:"aioseo-sidepanel"},fd=["onClick"],Sd={class:"name"},kd={key:0,class:"aioseo-tab-title"};function vd(o,e,r,t,s,a){const g=p("core-main-tabs"),l=p("svg-circle-information-solid"),y=p("svg-caret"),E=p("svg-close"),b=p("alert"),x=p("modal-content"),S=p("core-modal"),k=p("keyword-rank-tracker");return i(),v("div",_d,[o.$root.$data.screenContext!=="sidebar"?(i(),_(g,{key:0,tabs:a.getTabs,showSaveButton:!1,active:s.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=T=>a.processChangeTab(T))},{"var-tab-icon":u(({tab:T})=>[(i(),_(pe(T.icon),{class:G([{warning:T.warning}])},null,8,["class"])),(i(),_(pe(T.badge)))]),_:1},8,["tabs","active"])):m("",!0),d(Fe,{name:"route-fade",mode:"out-in"},{default:u(()=>[o.$root.$data.screenContext==="sidebar"&&s.activeTab===null?(i(),v("div",yd,[(i(!0),v(de,null,Re(a.getTabs,(T,Y)=>(i(),v("a",{key:Y,class:"aioseo-sidepanel-button",href:"#",onClick:te(J=>a.processChangeTab(T.slug),["prevent"])},[(i(),_(pe(T.icon),{class:"icon"})),c("div",Sd,h(T.name),1),(i(),_(pe(T.badge))),T.warning?(i(),_(l,{key:0,width:"15",height:"15"})):m("",!0),d(y)],8,fd))),128))])):m("",!0)]),_:1}),d(Fe,{name:"route-fade",mode:"out-in"},{default:u(()=>[s.activeTab?(i(),v("div",{key:s.activeTab,class:G(["aioseo-tab",{"is-page-builder":!!t.rootStore.aioseo.integration}])},[o.$root.$data.screenContext==="sidebar"?(i(),v("div",kd,[c("span",null,h(a.getTabName(s.activeTab)),1),d(E,{onClick:e[1]||(e[1]=T=>a.processChangeTab(null))})])):m("",!0),o.$root.$data.screenContext==="sidebar"?(i(),_(b,{key:1})):m("",!0),(i(),_(pe(s.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=T=>a.processChangeTab(T))},null,32))],2)):m("",!0)]),_:1}),d(S,{show:t.postEditorStore.currentPost.modalOpen&&o.$root.$data.screenContext==="sidebar",onClose:a.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:u(()=>[A(h(s.strings.modalTitle),1)]),body:u(()=>[d(x)]),_:1},8,["show","onClose"]),d(k,{"modal-open":t.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=T=>t.keywordRankTrackerStore.modalOpenPostEdit=T)},null,8,["modal-open"])])}const bd=I(gd,[["render",vd]]),Tu={__name:"App",setup(o){Lo({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const e=$();return(r,t)=>(i(),v("div",{onClick:t[0]||(t[0]=te(()=>{},["stop"])),id:"main-settings-cont"},[r.$root.$data.screenContext!=="sidebar"?(i(),_(C(ao),{key:0})):m("",!0),C(e).currentPost.id?(i(),_(C(bd),{key:1})):m("",!0)]))}};export{Tu as _};