Sid Gifari File Manager
🏠 Root
/
home
/
caldereriajp
/
www
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: App.f3e1672e.js
/* empty css */import{k as T,e as K,c as ot,u as q,f as G,o as oe,T as ie,s as pt,d as re,U as ne,n as Tt,B as tt,t as ae,E as xt,b as At,m as le}from"./links.96235554.js";import{a as U}from"./allowed.d054e5c0.js";import{g as et,r as ut}from"./params.597cd0f5.js";import{e as nt,b as ht,S as _t,c as ce,C as Lt,d as kt,a as Mt,f as de}from"./Caret.7f04b0aa.js";import{O as ue}from"./SeoRevisions.fd5dbff2.js";import{C as N,b as at,S as mt,g as pe,h as he,i as _e,a as me,j as ge,k as ye,m as fe,n as Se,o as be,c as ve,p as ke,q as we,r as Ce,s as $e,t as Pe,u as Ee,v as Te,w as xe,x as Ae,y as Le,z as Me,A as Ie,D as Ve}from"./index.c885ab17.js";import{r as a,o as i,c as m,e as c,w as l,g as b,t as p,a as d,d as _,b as u,n as x,H as gt,F as R,h as W,f as O,j as st,i as z,C as M,u as H,K as De,L as Be,k as Re}from"./vue.runtime.esm-bundler.a49acf4f.js";import{_ as S}from"./_plugin-vue_export-helper.bd508f36.js";/* empty css *//* empty css */import{_ as V}from"./default-i18n.cc9dbff0.js";import"./constants.c7984802.js";import{J as It}from"./JsonValues.870a4901.js";/* empty css */import{C as B}from"./SettingsRow.5de01aba.js";import{B as Oe}from"./Checkbox.fc67f607.js";import{G as He,a as Ue}from"./Row.85168b37.js";import{C as Ke,a as Ge,S as Ne}from"./LicenseKeyBar.42b79cab.js";import{S as Fe,C as Q}from"./Tabs.b92dcfbe.js";import{C as j}from"./Portal.72ce36ea.js";import{u as Vt,T as Dt}from"./TruSeoScore.25c11e71.js";import{t as dt}from"./postContent.314c716d.js";import{M as yt}from"./MaxCounts.12b45bab.js";import{S as ze}from"./SaveChanges.dad94bb3.js";import{T as ft}from"./Tags.37458114.js";import{C as F}from"./Tooltip.c031cb66.js";import{S as X}from"./Plus.aa60dda7.js";import{n as qe}from"./isArrayLikeObject.3ade28da.js";import{B as We}from"./Editor.29931065.js";import{C as lt}from"./Blur.f2dbe3c4.js";import{B as Bt}from"./RadioToggle.366d0fc8.js";import{C as je}from"./GoogleSearchPreview.c9eff603.js";import{C as St}from"./HtmlTagsEditor.e6d6fa05.js";import{T as Ye}from"./Slide.f53bd663.js";import{p as wt}from"./popup.b60b699f.js";import{a as Rt}from"./addons.8f1a852a.js";import{C as Ot}from"./Index.86dc50d3.js";import{W as Ze}from"./WpTable.cbf26363.js";import{C as Je}from"./Table.9ab1ff6b.js";import{P as Qe}from"./PostTypes.9ab32454.js";import{C as Xe}from"./Index.9d3d0eb4.js";import{a as Ht,S as ts,b as es,c as ss}from"./InternalOutbound.d0ac4a34.js";import{R as os}from"./RequiredPlans.cbd60891.js";import{I as Ut,a as Kt,U as Gt}from"./Image.8dc068b7.js";import{t as Nt}from"./tags.7148445d.js";import{B as Ft}from"./Img.0e297167.js";import{C as is}from"./FacebookPreview.1d9f18ba.js";import{C as rs}from"./TwitterPreview.fe4140a7.js";import{S as zt}from"./Settings.aa220ff8.js";import{a as qt,S as ns}from"./Build.e4149d45.js";import{R as as}from"./Redirects.79b051e9.js";import{S as Wt}from"./Eye.5a8f97a6.js";import{l as ls}from"./license.2537a586.js";import{t as cs}from"./html.671743b1.js";import{U as ds}from"./UserAvatar.374a3d02.js";import{S as us}from"./Upsell.e927e0a2.js";const ps={computed:{objectTypeOptions(){return[{groupLabel:this.$t.__("Default",this.$td),options:[{label:this.$t.__("Default Object Type (Set in Social Networks)",this.$td),value:"default"}]}].concat(this.$constants.OG_TYPE_OPTIONS)}},methods:{getObjectTypeLabelByOption(t){let e="";return this.objectTypeOptions.forEach(r=>{const s=r.options.find(o=>o.value===t);s&&(e=(s==null?void 0:s.label)||"")}),e}}},hs={computed:{twitterCardOptions(){return[{label:this.$t.__("Default (Set under Social Networks)",this.$td),value:"default"},{label:this.$t.__("Summary",this.$td),value:"summary"},{label:this.$t.__("Summary with Large Image",this.$td),value:"summary_large_image"}]}},methods:{getTwitterCardLabelByOption(t){var e;return((e=this.twitterCardOptions.find(r=>r.value===t))==null?void 0:e.label)||""}}};const _s={setup(){return{postEditorStore:T()}},components:{BaseCheckbox:Oe,GridColumn:He,GridRow:Ue},data(){return{strings:{useDefaultSettings:this.$t.__("Use Default Settings",this.$td),robotsMeta:this.$t.__("Robots meta:",this.$td),maxSnippet:this.$t.__("Max Snippet",this.$td),maxVideoPreview:this.$t.__("Max Video Preview",this.$td),maxImagePreview:this.$t.__("Max Image Preview",this.$td),standard:this.$t.__("Standard",this.$td),none:this.$t.__("None",this.$td),large:this.$t.__("Large",this.$td),noindex:this.$t.__("No Index",this.$td),nofollow:this.$t.__("No Follow",this.$td),noarchive:this.$t.__("No Archive",this.$td),notranslate:this.$t.__("No Translate",this.$td),noimageindex:this.$t.__("No Image Index",this.$td),nosnippet:this.$t.__("No Snippet",this.$td),noodp:this.$t.__("No ODP",this.$td)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(t){return this.imagePreviewOptions.find(e=>e.value===t)},saveImagePreview(t){this.postEditorStore.currentPost.maxImagePreview=t,this.postEditorStore.isDirty=!0}}},ms={class:"aioseo-robots-meta"},gs={key:0,class:"global-robots-settings aioseo-description"},ys={class:"robots-meta-title"},fs={class:"global-robots-settings-options"},Ss={key:0,class:"aioseo-description max-snippet"},bs={class:"aioseo-description max-video-preview"},vs={key:1,class:"aioseo-description max-image-preview"};function ks(t,e,r,s,o,n){const g=a("base-toggle"),h=a("base-checkbox"),f=a("grid-column"),y=a("grid-row"),C=a("base-input"),k=a("base-select");return i(),m("div",ms,[c(g,{modelValue:s.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=v=>s.postEditorStore.currentPost.default=v),e[1]||(e[1]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),s.postEditorStore.currentPost.default?u("",!0):(i(),m("div",gs,[d("span",ys,p(o.strings.robotsMeta),1),c(y,{class:"settings"},{default:l(()=>[s.postEditorStore.currentPost.isHomePage?u("",!0):(i(),_(f,{key:0,xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=v=>s.postEditorStore.currentPost.noindex=v),e[3]||(e[3]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=v=>s.postEditorStore.currentPost.nofollow=v),e[5]||(e[5]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=v=>s.postEditorStore.currentPost.noarchive=v),e[7]||(e[7]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=v=>s.postEditorStore.currentPost.notranslate=v),e[9]||(e[9]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=v=>s.postEditorStore.currentPost.noimageindex=v),e[11]||(e[11]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=v=>s.postEditorStore.currentPost.nosnippet=v),e[13]||(e[13]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),c(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[c(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=v=>s.postEditorStore.currentPost.noodp=v),e[15]||(e[15]=v=>s.postEditorStore.isDirty=!0)]},{default:l(()=>[b(p(o.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),d("div",fs,[s.postEditorStore.currentPost.nosnippet?u("",!0):(i(),m("div",Ss,[d("span",null,p(o.strings.maxSnippet),1),c(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=v=>s.postEditorStore.currentPost.maxSnippet=v),e[17]||(e[17]=v=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),d("div",bs,[d("span",null,p(o.strings.maxVideoPreview),1),c(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=v=>s.postEditorStore.currentPost.maxVideoPreview=v),e[19]||(e[19]=v=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),s.postEditorStore.currentPost.noimageindex?u("",!0):(i(),m("div",vs,[d("span",null,p(o.strings.maxImagePreview),1),c(k,{size:"medium",options:n.imagePreviewOptions,modelValue:n.getImagePreview(s.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=v=>n.saveImagePreview(v.value))},null,8,["options","modelValue"])]))])]))])}const ws=S(_s,[["render",ks]]);const Cs={setup(){return{licenseStore:K(),optionsStore:ot(),postEditorStore:T()}},components:{CoreAlert:N,CoreSettingsRow:B,CoreSingleRobotsMeta:ws},mixins:[It],props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:this.$t.__("Advanced",this.$td),robotsSetting:this.$t.__("Robots Setting",this.$td),robotsToggle:this.$t.__("Use Default Settings",this.$td),canonicalUrl:this.$t.__("Canonical URL",this.$td),placeholder:this.$t.__("Enter a URL to change the default Canonical URL",this.$td),priorityScore:this.$t.__("Priority Score",this.$td),priority:this.$t.__("Priority",this.$td),frequency:this.$t.__("Frequency",this.$td),priorityFrequencyUpsell:this.$t.sprintf(this.$t.__("This feature is only for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("post-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"priority-frequency",!0)),keywords:this.$t.__("Keywords",this.$td),tagPlaceholder:this.$t.__("Press enter to create a keyword",this.$td)}}},computed:{getPriorityOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.PRIORITY_OPTIONS)},getFrequencyOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.FREQUENCY_OPTIONS)}},methods:{getPriority(t){return this.getPriorityOptions.find(e=>e.value===t)},savePriority(t){this.postEditorStore.currentPost.priority=t,this.postEditorStore.isDirty=!0},getFrequency(t){return this.getFrequencyOptions.find(e=>e.value===t)},saveFrequency(t){this.postEditorStore.currentPost.frequency=t,this.postEditorStore.isDirty=!0}}},$s={class:"aioseo-tab-content aioseo-post-advanced"},Ps={class:"selectbox-row"},Es={class:"select"},Ts=d("div",{class:"separator"},[d("span"),b(" - ")],-1),xs={class:"select"},As=["innerHTML"];function Ls(t,e,r,s,o,n){const g=a("core-single-robots-meta"),h=a("core-settings-row"),f=a("base-input"),y=a("base-select"),C=a("core-alert");return i(),m("div",$s,[c(h,{id:"aioseo-post-robots-setting",name:o.strings.robotsSetting,align:""},{content:l(()=>[c(g)]),_:1},8,["name"]),c(h,{id:"aioseo-post-canonical-url",name:o.strings.canonicalUrl,align:""},{content:l(()=>[c(f,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=k=>s.postEditorStore.currentPost.canonicalUrl=k),e[1]||(e[1]=k=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),c(h,{name:o.strings.priorityScore,align:""},{content:l(()=>[d("div",Ps,[d("div",Es,[d("span",null,p(o.strings.priority),1),c(y,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:n.getPriorityOptions,modelValue:s.licenseStore.isUnlicensed?n.getPriority("default"):n.getPriority(s.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=k=>s.licenseStore.isUnlicensed?null:n.savePriority(k.value))},null,8,["disabled","options","modelValue"])]),Ts,d("div",xs,[d("span",null,p(o.strings.frequency),1),c(y,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:n.getFrequencyOptions,modelValue:s.licenseStore.isUnlicensed?n.getFrequency("default"):n.getFrequency(s.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=k=>s.licenseStore.isUnlicensed?null:n.saveFrequency(k.value))},null,8,["disabled","options","modelValue"])])]),s.licenseStore.isUnlicensed?(i(),_(C,{key:0,class:"inline-upsell",type:"blue"},{default:l(()=>[d("div",{innerHTML:o.strings.priorityFrequencyUpsell},null,8,As)]),_:1})):u("",!0)]),_:1},8,["name"]),s.optionsStore.options.searchAppearance.advanced.useKeywords?(i(),_(h,{key:0,name:o.strings.keywords,align:""},{content:l(()=>[c(y,{multiple:"",taggable:"",options:t.getJsonValue(s.postEditorStore.currentPost.keywords)||[],modelValue:t.getJsonValue(s.postEditorStore.currentPost.keywords)||[],"onUpdate:modelValue":e[4]||(e[4]=k=>s.postEditorStore.currentPost.keywords=t.setJsonValue(k)),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):u("",!0)])}const Ms=S(Cs,[["render",Ls]]),Is={setup(){return{licenseStore:K(),rootStore:q()}},components:{CoreApiBar:Ke,CoreLicenseKeyBar:Ge}};function Vs(t,e,r,s,o,n){const g=a("core-api-bar"),h=a("core-license-key-bar");return i(),m("div",null,[s.rootStore.pong?u("",!0):(i(),_(g,{key:0})),t.$isPro&&s.licenseStore.isUnlicensed&&s.rootStore.pong?(i(),_(h,{key:1})):u("",!0)])}const jt=S(Is,[["render",Vs]]);const Ds={emits:["selectedKeyphrase","deleted","saved"],components:{CoreTooltip:F,SvgPencil:nt,SvgTrash:at},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:this.$t.__("Delete",this.$td)}}},computed:{scoreClass(){return 80<this.score?"score-green":50<this.score?"score-orange":1<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(t){this.edit=!0,this.$emit("selectedKeyphrase",t)},deleteKeyphraseEv(t){this.edit=!1,this.$emit("deleted",t)},toggleKeyphrasesPanel(t){this.$emit("selectedKeyphrase",t)},closeEdit(t){const e=t.target.value,r=this.index;this.$emit("saved",{index:r,value:e}),this.edit=!1},pressEnter(t){t.preventDefault(),t.target.blur(),this.edit=!1}}},Bs={class:"aioseo-keyphrase-tag"},Rs={key:0,class:"aioseo-edit-keyphrase-tag"},Os=["value"];function Hs(t,e,r,s,o,n){const g=a("svg-pencil"),h=a("svg-trash"),f=a("core-tooltip");return i(),m("div",Bs,[d("span",{class:x(["aioseo-add-keyphrase-tag",o.edit?"hidden":""])},[d("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=y=>n.toggleKeyphrasesPanel(r.index))},p(r.keyphrase),1),d("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=y=>n.editKeyphraseEv(r.index))},[c(g)]),d("span",{class:x(["keyphrase-score",n.scoreClass]),onClick:e[2]||(e[2]=y=>n.toggleKeyphrasesPanel(r.index))},p(r.score)+"/100",3)],2),o.edit?(i(),m("span",Rs,[d("input",{value:r.keyphrase,onBlur:e[3]||(e[3]=(...y)=>n.closeEdit&&n.closeEdit(...y)),onKeydown:e[4]||(e[4]=gt((...y)=>n.pressEnter&&n.pressEnter(...y),["enter"]))},null,40,Os),d("span",{class:"keyphrase-delete",onClick:e[5]||(e[5]=y=>n.deleteKeyphraseEv(r.index))},[c(f,{type:"action"},{tooltip:l(()=>[b(p(o.strings.delete),1)]),default:l(()=>[c(h)]),_:1})])])):u("",!0)])}const Yt=S(Ds,[["render",Hs]]);const Us={components:{SvgCaret:ht,SvgCircleCheck:_t,SvgCircleClose:ce},props:{analysisItems:{type:Object}},data(){return{strings:{delete:this.$t.__("Delete",this.$td)}}},methods:{toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")}}},Ks={class:"aioseo-analysis-detail"},Gs={key:0},Ns={class:"description"};function Fs(t,e,r,s,o,n){const g=a("svg-circle-check"),h=a("svg-circle-close"),f=a("svg-caret");return i(),m("ul",Ks,[(i(!0),m(R,null,W(r.analysisItems,(y,C)=>(i(),m(R,{key:C},[y.title?(i(),m("li",Gs,[d("p",{class:x(["title",y.error===0?"toggled":""])},[y.error===0?(i(),_(g,{key:0,width:"12"})):u("",!0),y.error===1?(i(),_(h,{key:1,width:"12"})):u("",!0),b(" "+p(y.title)+" ",1),c(f,{width:"16",onClick:n.toggleDescriptionEv},null,8,["onClick"])],2),d("p",Ns,p(y.description),1)])):u("",!0)],64))),128))])}const ct=S(Us,[["render",Fs]]);const zs={setup(){return{licenseStore:K(),postEditorStore:T()}},components:{CoreAlert:N,CoreKeyphrase:Yt,CoreLoader:Lt,SvgCirclePlus:X,metaboxAnalysisDetail:ct},data(){return{selectedKeyphrase:0,strings:{additional:this.$t.__("Additional Keyphrases",this.$td),addKeyphrase:this.$t.__("Add Additional Keyphrases",this.$td),keyphraseDocumentation:this.$t.__("Improve your SEO rankings with additional keyphrases.",this.$td),upSell:this.$t.sprintf(this.$t.__("Multiple Keyphrases is a %1$s feature. %2$s",this.$td),"Pro",this.$links.getUpsellLink("seo-settings",this.$t.__("Click here to get",this.$td)+" AIOSEO Pro","additional-keyphrases",!0))}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(t){this.selectedKeyphrase=t},onSaved(t){const{index:e,value:r}=t;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(t){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(t,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 s={keyphrase:e.value,score:0},o=this.postEditorStore.currentPost.keyphrases.additional.push(s),n=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(r=n[o])==null||r.click(),this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},pressEnter(t){const e=document.getElementById("add-additional-keyphrase");t.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((t,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}}},qs={class:"additional-keyphrases-panel"},Ws={key:0},js={class:"analysis-wrapper"},Ys={class:"aioseo-description additional-keyphrases-description"},Zs=["innerHTML"];function Js(t,e,r,s,o,n){const g=a("core-keyphrase"),h=a("core-loader"),f=a("metaboxAnalysisDetail"),y=a("base-input"),C=a("svg-circle-plus"),k=a("base-button"),v=a("core-alert");return i(),m("div",qs,[s.postEditorStore.currentPost.keyphrases.additional&&s.postEditorStore.currentPost.keyphrases.additional.length&&t.$isPro&&s.licenseStore.license.isActive?(i(),m("div",Ws,[(i(!0),m(R,null,W(s.postEditorStore.currentPost.keyphrases.additional,(w,E)=>(i(),_(g,{key:E,index:E,keyphrase:w.keyphrase,score:w.score,onSaved:n.onSaved,onDeleted:n.onDeleted,onSelectedKeyphrase:n.onSelectedKeyphrase,class:x(["aioseo-keyphrase-tag additional-keyphrase",o.selectedKeyphrase===E?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),d("div",js,[s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(i(),_(h,{key:0,class:"analysis-loading",dark:""})):u("",!0),!s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(i(),_(f,{key:1,analysisItems:s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].analysis},null,8,["analysisItems"])):u("",!0)])])):u("",!0),t.$isPro&&s.licenseStore.license.isActive?(i(),_(y,{key:1,size:"medium",class:x(`add-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:gt(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):u("",!0),t.$isPro&&s.licenseStore.license.isActive?(i(),_(k,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:l(()=>[c(C,{width:"14",height:"14"}),b(" "+p(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):u("",!0),!t.$isPro||!s.licenseStore.license.isActive?(i(),m(R,{key:3},[d("div",Ys,p(o.strings.keyphraseDocumentation),1),c(v,{class:"inline-upsell",type:"yellow"},{default:l(()=>[d("div",{innerHTML:o.strings.upSell},null,8,Zs)]),_:1})],64)):u("",!0)])}const Qs=S(zs,[["render",Js],["__scopeId","data-v-4b2a0651"]]),Xs=""+window.__aioseoDynamicImportPreload__("images/open-ai.d02756ab.png");const to={setup(){return{settingsStore:G()}},components:{BaseEditor:We,CoreBlur:lt,CoreModalPortal:j,SvgCirclePlus:X},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:Xs,suggestions:{title:["21 Amazing Blog Design Examples to Inspire Your Creativity","Create a Good First Impression with 21 Amazing Blog Design Examples","Create a Good First Impression: 21 Amazing Blog Design Examples to Spark Your Creativity","Create a Good First Impression With 21 Eye-Catching Blog Design Examples","Create a First Impression with 21 Eye-Catching Blog Design Examples"]},strings:{upgradeToPro:this.$t.__("Upgrade to Pro Today",this.$td),learnMoreLink:this.$t.sprintf('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',this.$links.getUpsellUrl("post-settings","general","open-ai"),this.$t.__("Learn more about all the features",this.$td),this.$links.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generate New SEO Post %1$s",this.$td),this.$t.__("Title",this.$td)):this.$t.sprintf(this.$t.__("Generate New SEO Post %1$s",this.$td),this.$t.__("Description",this.$td))},ctaHeaderTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generating SEO Post %1$s is a Pro Feature",this.$td),this.$t.__("Titles",this.$td)):this.$t.sprintf(this.$t.__("Generating SEO Post %1$s is a Pro Feature",this.$td),this.$t.__("Descriptions",this.$td))},ctaDescription(){return this.type==="title"?this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("titles",this.$td),this.$t.__("title",this.$td)):this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("meta descriptions",this.$td),this.$t.__("description",this.$td))},methods:{getAssetUrl:qe}}},eo={class:"aioseo-ai-unlicensed-modal"},so={class:"list"},oo={class:"suggestions"},io={type:"button",disabled:""},ro={class:"cta"},no=["src"],ao={class:"bottom"},lo={class:"title"},co=["innerHTML"];function uo(t,e,r,s,o,n){const g=a("svg-circle-plus"),h=a("base-editor"),f=a("core-blur"),y=a("base-button"),C=a("core-modal-portal");return i(),_(C,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=k=>s.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:l(()=>[b(p(n.headerTitle),1)]),body:l(()=>[d("div",eo,[c(f,null,{default:l(()=>[d("div",so,[d("div",oo,[(i(!0),m(R,null,W(o.suggestions.title,(k,v)=>(i(),m("div",{class:"suggestion",key:v},[c(h,{ref_for:!0,ref:"editor",value:k,single:"",disabled:""},{"append-button":l(()=>[d("button",io,[c(g)])]),_:2},1032,["value"])]))),128))])])]),_:1})]),d("div",ro,[d("img",{src:t.getAssetUrl(o.OpenAiImage),alt:"open-ai-upsell"},null,8,no),d("div",ao,[d("div",null,[d("p",lo,p(n.ctaHeaderTitle),1),d("p",null,p(n.ctaDescription),1)]),d("div",null,[c(y,{type:"green",size:"medium",tag:"a",href:t.$links.getPricingUrl("post-settings","general","open-ai")},{default:l(()=>[b(p(o.strings.upgradeToPro),1)]),_:1},8,["href"]),d("span",{innerHTML:o.strings.learnMoreLink},null,8,co)])])])]),_:1})}const po=S(to,[["render",uo]]),ho={},_o={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},mo=d("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),go=[mo];function yo(t,e){return i(),m("svg",_o,go)}const fo=S(ho,[["render",yo]]);const So={setup(){return{settingsStore:G()}},components:{AiModal:po,CoreTooltip:F,SvgAiRobot:fo},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:this.$t.__("Use AI Generator",this.$td)}}}},bo={class:"aioseo-ai-generator"};function vo(t,e,r,s,o,n){const g=a("svg-ai-robot"),h=a("core-tooltip"),f=a("ai-modal");return i(),m("div",bo,[c(h,{type:"action",offset:"-30px,0"},{tooltip:l(()=>[b(p(o.strings.useAiGenerator),1)]),default:l(()=>[d("button",{type:"button",onClick:e[1]||(e[1]=y=>s.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[c(g,{onClick:e[0]||(e[0]=y=>s.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))})])]),_:1}),s.settingsStore.modals.aiGenerator===r.type?(i(),_(f,{key:0,type:r.type},null,8,["type"])):u("",!0)])}const ko=S(So,[["render",vo]]);const wo={setup(){const{strings:t}=Vt();return{settingsStore:G(),strings:t}},components:{CoreTooltip:F,SvgCaret:ht,SvgCircleCheck:_t,SvgCircleQuestionMark:mt,SvgEllipse:Fe,TransitionSlide:Ye},mixins:[Dt],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(t){this.$root._data.screenContext==="sidebar"&&this.openCard(t.card)}}},methods:{openCard(t){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:t})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},Co={class:"aioseo-card aioseo-sidebar-card"},$o={class:"text"},Po={key:0,class:"content"},Eo={key:1,class:"content"};function To(t,e,r,s,o,n){const g=a("svg-ellipse"),h=a("svg-circle-check"),f=a("svg-circle-question-mark"),y=a("core-tooltip"),C=a("svg-caret"),k=a("transition-slide");return i(),m("div",Co,[r.hideHeader?u("",!0):(i(),m("div",{key:0,class:"header",onClick:e[0]||(e[0]=v=>s.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[d("div",$o,[O(t.$slots,"header",{},()=>[b(p(r.headerText),1)]),r.focusScore>=0?O(t.$slots,"alt",{key:0},()=>[r.focusScore!==null?(i(),m("span",{key:0,class:x(["card-score",t.getScoreClass(r.focusScore)])},p(r.focusScore)+"/100 ",3)):u("",!0)]):u("",!0),r.trueSeoScore>=0?O(t.$slots,"alt",{key:1},()=>[d("span",{class:x(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(i(),_(g,{key:0,width:"6"})):u("",!0),r.trueSeoScore===0?(i(),_(h,{key:1,width:"12"})):u("",!0),b(" "+p(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):u("",!0),t.$slots.tooltip?(i(),_(y,{key:2},{tooltip:l(()=>[O(t.$slots,"tooltip")]),default:l(()=>[c(f)]),_:3})):u("",!0)]),r.toggles&&s.settingsStore.settings.toggledCards?(i(),_(C,{key:0,class:x({rotated:!s.settingsStore.settings.toggledCards[r.slug]})},null,8,["class"])):u("",!0)])),s.settingsStore.settings.toggledCards||r.noSlide?(i(),_(k,{key:1,active:s.settingsStore.settings.toggledCards[r.slug]&&r.toggles||r.noSlide},{default:l(()=>[t.$slots["before-tabs"]?(i(),m("div",Po,[O(t.$slots,"before-tabs")])):u("",!0),O(t.$slots,"tabs"),t.$slots.default?(i(),m("div",Eo,[O(t.$slots,"default")])):u("",!0)]),_:3},8,["active"])):u("",!0)])}const xo=S(wo,[["render",To]]),Ao={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const t=Math.max(...this.data.map(o=>o.x)),e=Math.max(...this.data.map(o=>o.y)),r=this.height-this.strokeWidth,s=this.data.map(o=>{const n=o.x===0?0:o.x/t,g=o.y===0?0:o.y/e,h=n*this.width,f=r-g*r+this.strokeWidth;return`${h},${f}`}).join(" ");return`0,${r+this.strokeWidth} `+s+` ${this.width},${r+this.strokeWidth}`}}},Lo=["width","height","viewBox"],Mo=["fill","points"],Io=["stroke","strokeWidth","points"];function Vo(t,e,r,s,o,n){return i(),m("svg",{width:r.width,height:r.height,viewBox:n.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[d("polygon",{fill:r.fillColor,points:n.polylinePoints},null,8,Mo),d("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:n.polylinePoints},null,8,Io)],8,Lo)}const Do=S(Ao,[["render",Vo]]),Bo={},Ro={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},Oo=d("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),Ho=d("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),Uo=[Oo,Ho];function Ko(t,e){return i(),m("svg",Ro,Uo)}const Go=S(Bo,[["render",Ko]]);const No={setup(){return{connectStore:oe(),licenseStore:K(),optionsStore:ot(),postEditorStore:T(),rootStore:q(),semrushStore:ie()}},components:{CoreAlert:N,CoreKeyphrase:Yt,CoreLoader:Lt,CoreModalPortal:j,CoreTooltip:F,SvgAreaChart:Do,SvgCircleCheck:_t,SvgCirclePlus:X,SvgLogoSemrush:Go,SvgTrash:at,metaboxAnalysisDetail:ct},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:{value:"US",label:"United States of America - US"},strings:{modalTitle:this.$t.sprintf(this.$t.__("Additional Keyphrases by %1$s",this.$td),"Semrush"),addKeyphrase:this.$t.__("Add Focus Keyphrase",this.$td),getAdditionalKeyphrases:this.$t.__("Get Additional Keyphrases",this.$td),showResultsFor:this.$t.__("Show Results For:",this.$td),keyphrase:this.$t.__("Keyphrase",this.$td),volume:this.$t.__("Volume",this.$td),trend:this.$t.__("Trend",this.$td),addAdditionalKeyphrase:this.$t.__("Add Keyphrase",this.$td),removeAdditionalKeyphrase:this.$t.__("Remove Keyphrase",this.$td),noResults:this.$t.__("No results",this.$td),upsell:this.$t.sprintf(this.$t.__("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",this.$td),"Semrush","<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("semrush-keywords",this.$constants.GLOBAL_STRINGS.learnMore,null,!0)),semrushGetAdditionalKeyphrases:this.$t.sprintf(this.$t.__("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",this.$td),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:this.$t.__("To use this feature, first add a focus keyphrase.",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),delete:this.$t.__("Delete",this.$td),semrushTooltip:this.$t.sprintf(this.$t.__("Get Additional Keyphrases with %1$s!",this.$td),"Semrush"),semrushTooltipLicenseKey:this.$t.sprintf(this.$t.__("%1$sA valid license key is required%2$s in order to connect with %3$s.",this.$td),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:this.$t.sprintf(this.$t.__("You have exceeded the number of requests allowed by your %1$s plan.",this.$td),"Semrush"),inOrderToUpgradeSemrush:this.$t.sprintf(this.$t.__("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",this.$td),this.$links.getUpsellLink("semrush-pricing",this.$constants.GLOBAL_STRINGS.learnMore,"semrushPricing",!0))}}},watch:{semrushCountry:{deep:!0,handler(){this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?this.$t.__("You have exceeded the limit for requests. Please try again later.",this.$td):this.$t.__("An error occurred while fetching keyphrases. Please try again later.",this.$td)},semrushDatabase(){return this.$constants.COUNTRY_LIST.map(t=>(t.value==="GB"&&(t.value="UK",t.label="United Kingdom"),t.value==="KR"&&(t.label="South Korea"),t)).filter(t=>this.$constants.SEMRUSH_DATABASE.includes(t.value.toLowerCase())).map(t=>(t.label=t.label+" - "+t.value.toUpperCase(),t))}},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(t){return t.split(",").map((r,s)=>({x:s,y:parseFloat(r)}))},openConnectPopup(t){wt(t,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(t){wt(t,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(t){return this.semrushStore.authenticate(t.code)},completedConnectCallback(t){return this.connectStore.saveConnectToken(t.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(t=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(t.message)})},closedCallback(t){t&&this.openModal()},closedConnectCallback(t){if(t){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(t,e,r){const{data:s,source:o,origin:n}=t;if(!(n!=="https://oauth.semrush.com"||e!==o)){if(s.type==="semrush:oauth:success"){window.removeEventListener("message",r,!1);let g={};try{const h=new URL(s.url);g=et(h.search)}catch{}this.completedCallback(g).then(()=>{e.close(),e=null,this.closedCallback(!0)})}s.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",r,!1),e=null,this.closedCallback())}},onSaved(t){const{value:e}=t;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=null,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");if(e.value){const r={keyphrase:e.value,score:0,analysis:{}};this.postEditorStore.currentPost.keyphrases.focus=r,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(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(r=>r.keyphrase.toLowerCase()===t).length},getAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(r=>r.keyphrase.toLowerCase()===t)},scoreClass(t){return 80<t?"score-green":50<t?"score-orange":1<t?"score-red":"score-none"},async addAdditionalKeyphrase(t,e){this.addingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,s=r.push({keyphrase:t,score:0}),o=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(),o[s]&&o[s].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases,r=e.findIndex(s=>s.keyphrase.toLowerCase()===t);if(r!==-1){const s=document.getElementsByClassName("keyphrase-name");s[r+1]&&s[r+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(t,e){this.removingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,s=r.findIndex(o=>o.keyphrase.toLowerCase()===t);if(s!==-1){r.splice(s,1),this.postEditorStore.currentPost.keyphrases.additional=r;const o=document.getElementsByClassName("keyphrase-name");o[0]&&o[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")},pressEnter(t){const e=document.getElementById("add-focus-keyphrase");t.preventDefault(),e.click()}},mounted(){const t=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&t.push(this.semrushStore.refresh())}},Fo={class:"aioseo-focus-keyphrase-panel"},zo={class:"disabled-button gray medium"},qo={class:"disabled-button gray"},Wo=["innerHTML"],jo={class:"aioseo-modal-content has-padding"},Yo={class:"aioseo-settings-row"},Zo={class:"settings-name"},Jo={class:"name"},Qo={class:"results"},Xo={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},ti={class:"keyphrases-header"},ei={class:"keyphrase"},si={class:"keyphrase-volume"},oi={class:"keyphrase-trend"},ii={key:0,class:"keyphrase-actions"},ri={class:"keyphrases-rows"},ni={class:"keyphrase"},ai={class:"keyphrase-volume"},li={class:"keyphrase-trend"},ci={key:0,class:"keyphrase-actions"},di={key:0,class:"focus-keyphrase"},ui={key:1},pi={key:1,class:"remove-keyphrase"},hi=["onClick"],_i={key:1,class:"keyphrase-row"},mi=["colspan"],gi={key:1},yi={class:"semrush-logo"},fi={class:"semrush-upsell"},Si=["innerHTML"],bi=["innerHTML"];function vi(t,e,r,s,o,n){const g=a("base-input"),h=a("svg-circle-plus"),f=a("base-button"),y=a("core-tooltip"),C=a("core-keyphrase"),k=a("core-loader"),v=a("metaboxAnalysisDetail"),w=a("core-alert"),E=a("base-select"),$=a("svg-area-chart"),P=a("svg-circle-check"),Y=a("svg-trash"),it=a("svg-logo-semrush"),rt=a("core-modal-portal");return i(),m("div",Fo,[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(g,{key:0,size:"medium",class:x(`add-focus-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:gt(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):u("",!0),d("div",{class:x(`add-focus-keyphrase-${this.$root._data.screenContext}-button`)},[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(f,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:l(()=>[c(h,{width:"14",height:"14"}),b(" "+p(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):u("",!0),!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(y,{key:1},{tooltip:l(()=>[d("span",null,p(o.strings.semrushGetAdditionalKeyphrases)+" "+p(o.strings.pleaseAddFocusKeyphrase),1)]),default:l(()=>[d("div",zo,[c(h,{width:"14",height:"14"}),b(" "+p(o.strings.getAdditionalKeyphrases),1)])]),_:1})):u("",!0)],2),s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(C,{key:1,index:0,keyphrase:s.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:s.postEditorStore.currentPost.keyphrases.focus.score,onSaved:n.onSaved,onDeleted:n.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):u("",!0),s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus?(i(),_(k,{key:2,class:"analysis-loading",dark:""})):u("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(v,{key:3,analysisItems:s.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):u("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.$isPro&&s.licenseStore.isUnlicensed?(i(),_(y,{key:4},{tooltip:l(()=>[d("span",{innerHTML:o.strings.semrushTooltipLicenseKey},null,8,Wo)]),default:l(()=>[d("div",qo,[c(h,{width:"14",height:"14"}),b(" "+p(o.strings.getAdditionalKeyphrases),1)])]),_:1})):u("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.$isPro||!s.licenseStore.isUnlicensed)?(i(),_(y,{key:5,disabled:!o.showSemrushTooltip||t.$isPro,"force-show":o.showSemrushTooltip&&!t.$isPro},{tooltip:l(()=>[d("span",null,p(o.strings.semrushTooltip),1)]),default:l(()=>[c(f,{class:"add-keyphrase gray medium",onClick:n.getAdditionalKeyphrases},{default:l(()=>[c(h,{width:"14",height:"14"}),b(" "+p(o.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):u("",!0),o.semrushShowModal?(i(),_(rt,{key:6,onClose:e[1]||(e[1]=A=>o.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:l(()=>[b(p(o.strings.modalTitle),1)]),body:l(()=>[d("div",jo,[s.licenseStore.isUnlicensed?(i(),_(w,{key:0,type:"blue",innerHTML:o.strings.upsell},null,8,["innerHTML"])):u("",!0),d("div",Yo,[d("div",Zo,[d("div",Jo,p(o.strings.showResultsFor),1)]),c(E,{class:"semrush-country-selector",size:"medium",options:n.semrushDatabase,placeholder:o.strings.selectPriceIndicator,modelValue:o.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=A=>o.semrushCountry=A)},null,8,["options","placeholder","modelValue"])]),d("div",Qo,[d("table",Xo,[d("thead",null,[d("tr",ti,[d("th",ei,p(o.strings.keyphrase),1),d("th",si,p(o.strings.volume),1),d("th",oi,p(o.strings.trend),1),s.licenseStore.isUnlicensed?u("",!0):(i(),m("th",ii))])]),d("tbody",ri,[s.semrushStore.results.length&&!o.loadingResults?(i(!0),m(R,{key:0},W(s.semrushStore.results,(A,L)=>(i(),m("tr",{class:x(["keyphrase-row",{even:L%2===0}]),key:L},[d("td",ni,p(A[0]),1),d("td",ai,p(A[1]),1),d("td",li,[c($,{width:66,height:24,data:n.transformTrendDataToChartPoints(A[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.licenseStore.isUnlicensed?u("",!0):(i(),m("td",ci,[A[0]===s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),m("div",di,[c(P),b(" "+p(o.strings.focusKeyphrase),1)])):u("",!0),A[0]!==s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),m("div",ui,[L!==o.removingAdditionalKeyphrase&&(L===o.addingAdditionalKeyphrase||!n.hasAdditionalKeyphrase(A[0]))?(i(),_(f,{key:0,type:"gray",size:"medium",onClick:Z=>n.addAdditionalKeyphrase(A[0],L),loading:L===o.addingAdditionalKeyphrase},{default:l(()=>[b(p(o.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):u("",!0),n.getAdditionalKeyphrase(A[0])&&L!==o.addingAdditionalKeyphrase&&(L===o.removingAdditionalKeyphrase||n.hasAdditionalKeyphrase(A[0]))?(i(),m("div",pi,[d("span",{class:x(["keyphrase-score",n.scoreClass(n.getAdditionalKeyphrase(A[0]).score)]),onClick:Z=>n.goToAdditionalKeyphrase(A[0])},p(n.getAdditionalKeyphrase(A[0]).score)+"/100",11,hi),c(y,{type:"action"},{tooltip:l(()=>[b(p(o.strings.delete),1)]),default:l(()=>[c(Y,{onClick:Z=>n.removeAdditionalKeyphrase(A[0],L)},null,8,["onClick"])]),_:2},1024)])):u("",!0)])):u("",!0)]))],2))),128)):u("",!0),!s.semrushStore.results.length||o.loadingResults?(i(),m("tr",_i,[d("td",{colspan:s.licenseStore.isUnlicensed?3:4,class:"no-results"},[d("div",null,[o.loadingResults?(i(),_(k,{key:0,dark:""})):u("",!0),!o.loadingResults&&!s.semrushStore.error?(i(),m("span",gi,p(o.strings.noResults),1)):u("",!0),s.semrushStore.error&&!s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),_(w,{key:2,type:"red"},{default:l(()=>[b(p(n.semrushError),1)]),_:1})):u("",!0),s.semrushStore.error&&s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),m(R,{key:3},[d("div",yi,[c(it)]),d("div",fi,[d("span",null,[d("strong",{innerHTML:o.strings.youHaveExceededSemrush},null,8,Si)]),b(" "+p(" ")+" "),d("span",{innerHTML:o.strings.inOrderToUpgradeSemrush},null,8,bi)])],64)):u("",!0)])],8,mi)])):u("",!0)])])])])]),_:1})):u("",!0)])}const ki=S(No,[["render",vi]]);const wi={setup(){return{postEditorStore:T(),rootStore:q()}},components:{CoreAlert:N,CoreMainTabs:Q,metaboxAnalysisDetail:ct},data(){return{initTab:"basic",tabs:[{slug:"basic",name:this.$t.__("Basic SEO",this.$td)},{slug:"title",name:this.$t.__("Title",this.$td)},{slug:"readability",name:this.$t.__("Readability",this.$td)}]}},computed:{pageBuilderAlert(){if(!pt()||this.rootStore.aioseo.integration==="")return!1;const t=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return this.$t.sprintf(this.$t.__("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.",this.$td),t,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(t){this.initTab=t}},mounted(){this.tabs.map(t=>(t.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[t.slug].errors,t))}},Ci={class:"page-analysis-panel"},$i=["innerHTML"];function Pi(t,e,r,s,o,n){const g=a("core-alert"),h=a("core-main-tabs"),f=a("metaboxAnalysisDetail");return i(),m("div",Ci,[n.pageBuilderAlert?(i(),_(g,{key:0,type:"yellow"},{default:l(()=>[d("span",{innerHTML:n.pageBuilderAlert},null,8,$i)]),_:1})):u("",!0),c(h,{tabs:o.tabs,showSaveButton:!1,active:this.initTab,internal:"",onChanged:e[0]||(e[0]=y=>n.processChangeTab(y))},null,8,["tabs","active"]),c(st,{mode:"out-in"},{default:l(()=>[s.postEditorStore.currentPost.page_analysis?(i(),_(f,{key:0,analysisItems:s.postEditorStore.currentPost.page_analysis.analysis[this.initTab]},null,8,["analysisItems"])):u("",!0)]),_:1})])}const Ei=S(wi,[["render",Pi]]),Ti={},xi={width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-desktop"},Ai=d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.50004 0.666504H17.5C18.4167 0.666504 19.1667 1.4165 19.1667 2.33317V12.3332C19.1667 13.2498 18.4167 13.9998 17.5 13.9998H11.6667V15.6665H13.3334V17.3332H6.66671V15.6665H8.33337V13.9998H2.50004C1.58337 13.9998 0.833374 13.2498 0.833374 12.3332V2.33317C0.833374 1.4165 1.58337 0.666504 2.50004 0.666504ZM2.50004 12.3332H17.5V2.33317H2.50004V12.3332Z",fill:"currentColor"},null,-1),Li=[Ai];function Mi(t,e){return i(),m("svg",xi,Li)}const Zt=S(Ti,[["render",Mi]]),Ii={},Vi={width:"12",height:"20",viewBox:"0 0 12 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-mobile"},Di=d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.72767 0.833496L10.061 0.841829C10.9777 0.841829 11.7277 1.5835 11.7277 2.50016V17.5002C11.7277 18.4168 10.9777 19.1668 10.061 19.1668H1.72767C0.811003 19.1668 0.0693359 18.4168 0.0693359 17.5002V2.50016C0.0693359 1.5835 0.811003 0.833496 1.72767 0.833496ZM1.72763 15.8335H10.061V4.16683H1.72763V15.8335Z",fill:"currentColor"},null,-1),Bi=[Di];function Ri(t,e){return i(),m("svg",Vi,Bi)}const Jt=S(Ii,[["render",Ri]]);const Oi={setup(){const{strings:t}=Vt();return{optionsStore:ot(),postEditorStore:T(),rootStore:q(),settingsStore:G(),tagsStore:re(),composableStrings:t}},emits:["changeTab"],mixins:[yt,ze,ft,Dt],components:{AdditionalKeyphrases:Qs,AiGenerator:ko,BaseRadioToggle:Bt,CoreAlert:N,CoreGoogleSearchPreview:je,CoreHtmlTagsEditor:St,CoreSettingsRow:B,CoreSidebarCard:xo,CoreTooltip:F,FocusKeyphrase:ki,MetaboxAnalysisDetail:ct,PageAnalysis:Ei,SvgCircleQuestionMark:mt,SvgDesktop:Zt,SvgMobile:Jt,SvgPencil:nt},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{allowed:U,separator:void 0,isPageBuilderEditor:ne,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Tt(this.composableStrings,{pageName:this.$t.__("General",this.$td),snippetPreview:this.$t.__("Snippet Preview",this.$td),editSnippet:this.$t.__("Edit Snippet",this.$td),clickToAddTitle:this.$t.__("Click on the tags below to insert variables into your title.",this.$td),metaDescription:this.$t.__("Meta Description",this.$td),clickToAddDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),pillarContent:this.$t.__("Pillar Content",this.$td),pillarContentCopy:this.$t.__("Cornerstone content should be the most important and extensive articles on your site.",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),additionalKeyphrases:this.$t.__("Additional Keyphrases",this.$td),pageAnalysis:this.$t.__("Page Analysis",this.$td),basicSeo:this.$t.__("Basic SEO",this.$td),title:this.$t.__("Title",this.$td),readability:this.$t.__("Readability",this.$td),lookingForMetaKeywords:this.$t.__("Looking for meta keywords?",this.$td),goToAdvancedTab:this.$t.__("Go to the Advanced tab to add/edit meta keywords",this.$td),keyphraseDocumentation:this.$t.sprintf(this.$t.__("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){kt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){kt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)}},computed:{title(){return this.$t.sprintf(this.$t.__("%1$s Title",this.$td),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return dt()&&this.$root._data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.postEditorStore.currentPost.postType!=="attachment"&&this.parentComponentContext!=="modal"&&U("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return dt()&&this.$root._data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&U("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return dt()&&this.$root._data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&U("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!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}},methods:{hideKeywordsLooking(){this.optionsStore.options.searchAppearance.advanced.keywordsLooking=!1,this.optionsStore.saveChanges()},isMobilePreviewEv(t){this.postEditorStore.changeGeneralPreview(t)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.openModal(!0)},getDefaultTags(t){switch(t){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"]}}},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)})}},Hi={class:"aioseo-tab-content aioseo-post-general"},Ui=["innerHTML"],Ki=["innerHTML"],Gi={key:4},Ni=["innerHTML"],Fi=["innerHTML"];function zi(t,e,r,s,o,n){const g=a("svg-desktop"),h=a("svg-mobile"),f=a("base-radio-toggle"),y=a("core-settings-row"),C=a("core-google-search-preview"),k=a("svg-pencil"),v=a("base-button"),w=a("ai-generator"),E=a("core-html-tags-editor"),$=a("core-alert"),P=a("svg-circle-question-mark"),Y=a("core-tooltip"),it=a("focus-keyphrase"),rt=a("additional-keyphrases"),A=a("page-analysis"),L=a("core-sidebar-card"),Z=a("metabox-analysis-detail");return i(),m("div",Hi,[o.allowed("aioseo_page_general_settings")?(i(),_(y,{key:0,class:"mobile-radio-buttons"},{content:l(()=>[t.$root._data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(f,{key:0,modelValue:s.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":n.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:l(()=>[c(g)]),mobile:l(()=>[c(h)]),_:1},8,["modelValue","onUpdate:modelValue"])):u("",!0)]),_:1})):u("",!0),o.allowed("aioseo_page_general_settings")?(i(),_(y,{key:1,name:o.strings.snippetPreview,class:"snippet-preview-row"},{content:l(()=>[c(C,{title:t.parseTags(s.postEditorStore.currentPost.title||s.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),separator:s.optionsStore.options.searchAppearance.global.separator,description:t.parseTags(s.postEditorStore.currentPost.description||s.postEditorStore.currentPost.tags.description||"#post_content"),class:x({ismobile:s.postEditorStore.currentPost.generalMobilePrev})},{domain:l(()=>[b(p(s.tagsStore.liveTags.permalink),1)]),_:1},8,["title","separator","description","class"]),t.$root._data.screenContext==="sidebar"&&r.parentComponentContext!=="modal"?(i(),_(v,{key:0,class:"edit-snippet gray small",onClick:n.editSnippetEv},{default:l(()=>[c(k),b(" "+p(o.strings.editSnippet),1)]),_:1},8,["onClick"])):u("",!0)]),_:1},8,["name"])):u("",!0),(t.$root._data.screenContext==="metabox"||r.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(i(),_(y,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:n.title,key:o.titleKey},{content:l(()=>[c(E,{modelValue:s.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=I=>s.postEditorStore.currentPost.title=I),e[2]||(e[2]=I=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=I=>t.updateCount(I,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("title")},{"tags-description":l(()=>[b(p(o.strings.clickToAddTitle),1)]),"append-button":l(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(i(),_(w,{key:0,type:"title"})):u("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,60)},null,8,Ui)]),_:1},8,["name"])):u("",!0),(t.$root._data.screenContext==="metabox"||r.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(i(),_(y,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:o.strings.metaDescription,key:o.descriptionKey},{content:l(()=>[c(E,{modelValue:s.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=I=>s.postEditorStore.currentPost.description=I),e[5]||(e[5]=I=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=I=>t.updateCount(I,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("description")},{"tags-description":l(()=>[b(p(o.strings.clickToAddDescription),1)]),"append-button":l(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(i(),_(w,{key:0,type:"description"})):u("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,160)},null,8,Ki)]),_:1},8,["name"])):u("",!0),n.displayTruSeoMetaboxCard&&s.optionsStore.options.searchAppearance.advanced.useKeywords&&s.optionsStore.options.searchAppearance.advanced.keywordsLooking?(i(),m("div",Gi,[c($,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:n.hideKeywordsLooking},{default:l(()=>[b(p(o.strings.lookingForMetaKeywords)+" ",1),d("a",{href:"#",onClick:e[6]||(e[6]=z(I=>t.$emit("changeTab","advanced"),["prevent"]))},p(o.strings.goToAdvancedTab),1),d("a",{class:"no-underline",href:"#",onClick:e[7]||(e[7]=z(I=>t.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):u("",!0),n.displayTruSeoMetaboxCard?(i(),_(y,{key:5,class:"snippet-focus-keyphrase-row",align:""},{name:l(()=>[b(p(o.strings.focusKeyphrase)+" ",1),c(Y,null,{tooltip:l(()=>[d("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Ni)]),default:l(()=>[c(P)]),_:1})]),content:l(()=>[c(it)]),_:1})):u("",!0),n.displayTruSeoMetaboxCard?(i(),_(y,{key:6,name:o.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:l(()=>[c(rt)]),_:1},8,["name"])):u("",!0),n.displayTruSeoMetaboxCard&&s.postEditorStore.currentPost.page_analysis?(i(),_(y,{key:7,name:o.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:l(()=>[c(A)]),_:1},8,["name"])):u("",!0),n.displayTruSeoSidebarKeyphraseCard?(i(),_(L,{key:8,slug:"focus",focusScore:n.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:l(()=>[d("span",null,p(o.strings.focusKeyphrase),1),c(Y,null,{tooltip:l(()=>[d("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Fi)]),default:l(()=>[c(P)]),_:1})]),default:l(()=>[c(it)]),_:1},8,["focusScore"])):u("",!0),n.displayTruSeoSidebarKeyphraseCard?(i(),_(L,{key:9,slug:"additional","header-text":o.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:l(()=>[c(rt)]),_:1},8,["header-text"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(i(),_(L,{key:10,slug:"basicseo","header-text":o.strings.basicSeo,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:l(()=>[c(Z,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(i(),_(L,{key:11,slug:"title","header-text":o.strings.title,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:l(()=>[c(Z,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(i(),_(L,{key:12,slug:"readability","header-text":o.strings.readability,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:l(()=>[c(Z,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0)])}const Qt=S(Oi,[["render",zi]]),qi={},Wi={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},ji=d("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),Yi=[ji];function Zi(t,e){return i(),m("svg",Wi,Yi)}const bt=S(qi,[["render",Zi]]);const Ji={setup(){return{postEditorStore:T()}},components:{CoreSettingsRow:B,SvgRightArrowShort:bt},data(){return{strings:{title:this.$t.__("Link Assistant",this.$td),description:this.$t.__("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.",this.$td),button:this.$t.__("Open Link Assistant",this.$td)}}}},Qi={class:"aioseo-link-assistant-sidebar"},Xi={class:"aioseo-sidebar-content-title"};function tr(t,e,r,s,o,n){const g=a("svg-right-arrow-short"),h=a("base-button"),f=a("core-settings-row");return i(),m("div",Qi,[t.$root._data.screenContext==="sidebar"?(i(),_(f,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:l(()=>[d("div",Xi,p(o.strings.title),1),d("p",null,p(o.strings.description),1),c(h,{class:"open-link-assistant-modal gray small",onClick:s.postEditorStore.toggleLinkAssistantModal},{default:l(()=>[c(g),b(" "+p(o.strings.button),1)]),_:1},8,["onClick"])]),_:1})):u("",!0)])}const er=S(Ji,[["render",tr]]),D="all-in-one-seo-pack",sr=()=>{const t={frontPage:V("Front Page",D),deleteLink:V("Delete Link",D)},e={areYouSureSingle:V("Are you sure you want to delete this link?",D),areYouSureMultiple:V("Are you sure you want to delete these links?",D),areYouSureAll:V("Are you sure you want to delete all links?",D),actionCannotBeUndone:V("This action cannot be undone.",D),yesSingle:V("Yes, I want to delete this link",D),yesMultiple:V("Yes, I want to delete these links",D),yesAll:V("Yes, I want to delete all links",D),noChangedMind:V("No, I changed my mind",D)};return{bulkOptions:[{label:V("Delete",D),value:"delete"}],modalStrings:e,strings:t}},J=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),or={methods:{findTargetBlock(t,e){const r=J(e);let s=null;return t.forEach(o=>{if(s||!o.attributes)return;if(o.attributes.content&&o.attributes.content.search(r)!==-1){s=o.clientId;return}if(!o.innerBlocks)return;const n=this.findTargetBlock(o.innerBlocks,e);n&&(s=n)}),s}}},ir={emits:["updatingLinks","linksUpdated"],mixins:[or],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}}},beforeMount(){window.aioseoBus.$on("updatingLinks",e=>{this.wpTableLoading=e});const t=tt();this.pageNumber=this.linkType?t.postReport[this.linkType].totals.page:1},data(){return{changeItemsPerPageSlug:"linkAssistantPostsReport",action:"",showModal:!1,selectedRows:[]}},computed:{rows(){if(!this.metabox)return this.post.links[this.linkType].rows;const t=this.pageNumber===1?0:(this.pageNumber-1)*10;return this.post.links[this.linkType].rows.slice(t,t+10)}},methods:{fetchData(t){const e=T();window.aioseoBus.$emit("updatingLinks",!0);const r={...t,additionalFilters:{postId:this.post.ID||e.currentPost.id,postIndex:this.postIndex,type:this.linkType}},s=tt(),o=this.postReport?"fetchPostReport":"fetchLinksReportInner";return s[o](r).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},openPostReport(t){window.location.href=`#/post-report?postId=${this.postId}&postIndex=${this.postIndex}&initialTab=${t}`},maybeDoBulkAction({action:t,selectedRows:e}){e===!1||!t||(this.action=t,this.selectedRows=e,this.showModal=!0)},doBulkAction(){if(this.showModal=!1,this.selectedRows===!1||typeof this.selectedRows>"u")return;if(typeof this.selectedRows=="number"){this.doDeleteLink(this.selectedRows);return}if(this.metabox&&this.linkType!=="inboundInternal"){this.idsToIndexes(this.selectedRows).forEach(s=>{this.editorRemoveLink(s)});return}window.aioseoBus.$emit("updatingLinks",!0);const t=tt(),e=T();t.linksBulk({postIndex:this.postIndex,postId:this.post.ID||e.currentPost.id,action:this.action,linkType:this.linkType,linkIds:this.selectedRows,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},doDeleteLink(t){const e=this.post.links[this.linkType].rows[t].id;if(!e)return;if(this.metabox&&this.linkType!=="inboundInternal"){this.editorRemoveLink(t);return}window.aioseoBus.$emit("updatingLinks",!0);const r=tt(),s=T();r.linkDelete({postIndex:this.postIndex,postId:this.post.ID||s.currentPost.id,linkId:e,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},editorRemoveLink(t){pt()&&(window.aioseoBus.$emit("updatingLinks",!1),this.blockEditorRemoveLink(t),window.aioseoBus.$emit("updatingLinks",!1)),ae()&&this.classicEditorRemoveLink(t)},blockEditorRemoveLink(t){const r=T().currentPost.linkAssistant.links[this.linkType].rows[t];if(!r)return;window.aioseoBus.$emit("updatingLinks",!0);const s=J(r.anchor.trim()),o=r.phrase_html.trim(),n=J(o),g=window.wp.data.select("core/block-editor").getBlocks(),h=this.findTargetBlock(g,o);if(!h){window.aioseoBus.$emit("updatingLinks",!1);return}const f=window.wp.data.select("core/block-editor").getBlock(h);if(!f){window.aioseoBus.$emit("updatingLinks",!1);return}let y=new RegExp(`(<t?a[^<>]*>)(.*)?(${s})(.*)?(</t?a[^<>]*>)`,"i");const C=o.replace(y,"$2$3$4");y=new RegExp(`${n}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(h,{content:f.attributes.content.replace(y,C)}).then(()=>{this.post.links[this.linkType].rows.splice(t,1)}).catch(k=>{console.error(`Couldn delete link with type "${this.linkType}" and index ${t}:`,k)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},classicEditorRemoveLink(t){const r=T().currentPost.linkAssistant.links[this.linkType].rows[t];if(!r||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let s="",o=null,n=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(o=window.tinyMCE.get("content"),s=o.getContent({format:"raw"})):(n=document.querySelector("textarea#content"),s=n?n.value:""),!s){window.aioseoBus.$emit("updatingLinks",!1);return}let g=r.phrase_html.trim();o||(g=g.replace(/(\sdata-mce-href=".*")/gi,""));const h=J(r.anchor.trim());let f=new RegExp(`(<t?a[^<>]*>)(.*)?(${h})(.*)?(</t?a[^<>]*>)`,"i");const y=g.replace(f,"$2$3$4"),C=J(g);f=new RegExp(`${C}`,"i"),s=s.replace(f,y),o?o.setContent(s):n.value=s,this.post.links[this.linkType].rows.splice(t,1),tt().postSettingsUpdate({postContent:s}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},idsToIndexes(t){let e,r=[];return Array.isArray(t)&&(e=t.map(Number)),e&&this.post.links[this.linkType].rows.forEach((s,o)=>{e.includes(s.id)&&r.push(o)}),t==="all"&&(r=this.post.links[this.linkType].rows.map((s,o)=>o)),r.sort(function(s,o){return o-s})}}};const rr={emits:["closeModal","doBulkAction"],components:{CoreModal:Xe,SvgClose:Mt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0}},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}}},nr={class:"aioseo-modal-body"},ar=["innerHTML"];function lr(t,e,r,s,o,n){const g=a("svg-close"),h=a("base-button"),f=a("core-modal");return i(),_(f,{class:"aioseo-confirmation-modal","no-header":""},{body:l(()=>[d("div",nr,[d("button",{class:"close",onClick:e[1]||(e[1]=z(y=>t.$emit("closeModal",!0),["stop"]))},[c(g,{onClick:e[0]||(e[0]=y=>t.$emit("closeModal",!0))})]),d("h3",null,p(n.areYouSure),1),d("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,ar),c(h,{type:"blue",size:"medium",onClick:e[2]||(e[2]=y=>t.$emit("doBulkAction",y))},{default:l(()=>[b(p(n.confirmation),1)]),_:1}),c(h,{type:"gray",size:"medium",onClick:e[3]||(e[3]=y=>t.$emit("closeModal",!0))},{default:l(()=>[b(p(r.strings.noChangedMind),1)]),_:1})])]),_:1})}const cr=S(rr,[["render",lr]]);const dr={components:{CoreTooltip:F},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 t=J(this.anchor);return new RegExp(`(.*)(<t?a[^>]*>.*${t}.*</t?a>)(.*)`,"i")},firstPart(){return this.stripTags(this.getPart(1))},linkAnchor(){return this.stripTags(this.getPart(2))},lastPart(){return this.stripTags(this.getPart(3))}},methods:{getPart(t){const e=this.phraseHtml.match(this.partPattern);return e?e[t]:""},stripTags(t){return t.replace(/(<([^>]+)>)/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},ur={class:"phrase"},pr={class:"first"},hr=["href"],_r={key:1},mr={class:"anchor"},gr={class:"last"};function yr(t,e,r,s,o,n){const g=a("core-tooltip");return i(),m("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=h=>t.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=h=>t.$emit("mouseLeave"))},[d("span",ur,[d("span",pr,p(n.firstPart),1),r.tooltip?(i(),_(g,{key:0,type:"action"},{tooltip:l(()=>[d("a",{class:"tooltip-url",href:r.url,target:"_blank"},p(r.url),9,hr)]),default:l(()=>[d("span",{class:"anchor",onClick:e[0]||(e[0]=(...h)=>n.maybeOpenLink&&n.maybeOpenLink(...h))},p(n.linkAnchor),1)]),_:1})):u("",!0),r.tooltip?u("",!0):(i(),m("div",_r,[d("span",mr,p(n.linkAnchor),1)])),d("span",gr,p(n.lastPart),1)]),O(t.$slots,"icons")],32)}const fr=S(dr,[["render",yr]]),Sr={},br={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},vr=d("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),kr=[vr];function wr(t,e){return i(),m("svg",br,kr)}const vt=S(Sr,[["render",wr]]),Cr={setup(){const{strings:t,modalStrings:e,bulkOptions:r}=sr();return{rootStore:q(),settingsStore:G(),composableStrings:t,bulkOptions:r,modalStrings:e}},emits:["openSuggestions"],components:{CoreTooltip:F,CoreWpTable:Je,LinkAssistantConfirmationModal:cr,LinkAssistantPhrase:fr,SvgLinkExternal:Ht,SvgLinkSuggestion:vt,SvgTrash:at},mixins:[ir,Qe,Ze],data(){return{tableId:"aioseo-post-report-inbound-internal",linkType:"inboundInternal",strings:Tt(this.composableStrings,{deleteAllLinks:this.$t.sprintf(this.$t.__("Delete All %1$s Links",this.$td),this.$t.__("Inbound Internal",this.$td)),outboundSuggestions:this.$t.sprintf(this.$t.__("%1$s Link Suggestions",this.$td),this.$t.__("Inbound",this.$td))})}},computed:{columns(){return[{slug:"post_title",label:this.$t.__("Post Title",this.$td)},{slug:"phrase",label:this.$t.__("Phrase",this.$td)},{slug:"delete",width:"50px"}]},seeAllLinks(){return this.$t.sprintf(this.$t.__("See All %1$s %2$s Links",this.$td),this.post.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))}},methods:{maybeViewPost(t){var e,r;this.viewPost(((r=(e=t.context)==null?void 0:e.postType)==null?void 0:r.singular)||"Post")},maybeEditPost(t){var e,r;this.editPost(((r=(e=t.context)==null?void 0:e.postType)==null?void 0:r.singular)||"Post")},processPagination(t){this.pageNumber=t,!this.metabox&&(this.wpTableLoading=!0,this.processFetchTableData().then(()=>this.wpTableLoading=!1))}}},$r={key:0},Pr={key:0,class:"row-actions"},Er={class:"view"},Tr=["href"],xr={class:"edit"},Ar=["href"],Lr={key:0,class:"links-bottom"},Mr={class:"links-bottom-left"},Ir={key:1},Vr={class:"links-bottom-right"};function Dr(t,e,r,s,o,n){const g=a("link-assistant-phrase"),h=a("svg-trash"),f=a("core-tooltip"),y=a("core-wp-table"),C=a("svg-link-suggestion"),k=a("base-button"),v=a("svg-link-external"),w=a("link-assistant-confirmation-modal");return i(),m("div",null,[(i(),_(y,{"bulk-options":s.bulkOptions,class:x({"link-assistant-inner-table":!t.postReport}),columns:n.columns,id:o.tableId,"initial-items-per-page":s.settingsStore.settings.tablePagination.linkAssistantPostsReport,"initial-page-number":t.pageNumber,key:t.wpTableKey,loading:t.wpTableLoading,rows:t.rows,"show-pagination":!t.linksReport,"show-search":!1,"show-table-footer":t.postReport,totals:t.post.links.inboundInternal.totals,"show-items-per-page":"",onPaginate:n.processPagination,onProcessBulkAction:t.maybeDoBulkAction,onProcessChangeItemsPerPage:t.processChangeItemsPerPage},{post_title:l(({row:E})=>[d("span",null,[b(p(E.context.postTitle)+" ",1),E.context.permalink.replace(/\/$/,"")===s.rootStore.aioseo.urls.home?(i(),m("span",$r,"("+p(o.strings.frontPage)+")",1)):u("",!0)]),E.context?(i(),m("div",Pr,[d("span",Er,[d("a",{href:E.context.permalink,target:"_blank"},p(n.maybeViewPost(E)),9,Tr),b(" | ")]),d("span",xr,[d("a",{href:E.context.editLink,target:"_blank"},p(n.maybeEditPost(E)),9,Ar)])])):u("",!0)]),phrase:l(({row:E})=>[c(g,{phrase:E.phrase,phraseHtml:E.phrase_html||"",anchor:E.anchor,url:E.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:l(({index:E})=>[c(f,{type:"action"},{tooltip:l(()=>[b(p(o.strings.deleteLink),1)]),default:l(()=>[c(h,{onClick:$=>t.maybeDoBulkAction({action:"delete",selectedRows:E})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["bulk-options","class","columns","id","initial-items-per-page","initial-page-number","loading","rows","show-pagination","show-table-footer","totals","onPaginate","onProcessBulkAction","onProcessChangeItemsPerPage"])),t.postReport?u("",!0):(i(),m("div",Lr,[d("div",Mr,[t.post.links.inboundInternal.rows.length?(i(),_(k,{key:0,type:"blue",tag:"button",onClick:e[0]||(e[0]=E=>t.$emit("openSuggestions"))},{default:l(()=>[c(C),b(" "+p(o.strings.outboundSuggestions),1)]),_:1})):u("",!0),t.post.links.inboundInternal.totals.total>5&&t.linksReport?(i(),m("div",Ir,[c(v),d("a",{class:"link-view",href:"#",onClick:e[1]||(e[1]=z(E=>t.openPostReport("inbound-internal"),["prevent"]))},p(n.seeAllLinks),1)])):u("",!0)]),d("div",Vr,[t.post.links.inboundInternal.rows.length?(i(),m("a",{key:0,class:"link-delete",onClick:e[2]||(e[2]=z(E=>t.maybeDoBulkAction({action:"delete",selectedRows:"all"}),["prevent"]))},p(o.strings.deleteAllLinks),1)):u("",!0)])])),t.showModal?(i(),_(w,{key:1,selectedRows:t.selectedRows,strings:s.modalStrings,onDoBulkAction:t.doBulkAction,onCloseModal:e[3]||(e[3]=E=>t.showModal=!1)},null,8,["selectedRows","strings","onDoBulkAction"])):u("",!0)])}const Br=S(Cr,[["render",Dr]]),Rr={setup(){return{postEditorStore:T()}},components:{CoreAlert:N,CoreBlur:lt,CoreMainTabs:Q,CoreModalPortal:j,Cta:Ot,LinkAssistantInboundInternal:Br,LinksSideBar:er,SvgLinkAffiliate:ts,SvgLinkExternal:Ht,SvgLinkInternalInbound:es,SvgLinkInternalOutbound:ss,SvgLinkSuggestion:vt,RequiredPlans:os},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:"#"}},{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:"#"}},{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:"#"}},{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:"#"}},{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:"#"}},{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:"#"}}],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:this.$t.sprintf(this.$t.__("Upgrade to %1$s and Unlock Link Assistant",this.$td),"Pro"),ctaHeader:this.$t.sprintf(this.$t.__("Link Assistant is only available for licensed %1$s %2$s users.",this.$td),"AIOSEO","Pro"),linkAssistantDescription:this.$t.__("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",this.$td),thisFeatureRequires:this.$t.__("This feature requires one of the following plans:",this.$td),linkOpportunities:this.$t.__("Actionable Link Suggestions",this.$td),orphanedPosts:this.$t.__("See Orphaned Posts",this.$td),affiliateLinks:this.$t.__("See Affiliate Links",this.$td),domainReports:this.$t.__("Top Domain Reports",this.$td)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,this.$t.__("Outbound Internal",this.$td))},{slug:"affiliate",icon:"svg-link-affiliate",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,this.$t.__("Affiliate",this.$td))},{slug:"external",icon:"svg-link-external",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.external.totals.total,this.$t.__("External",this.$td))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,this.$t.__("Link Suggestions",this.$td))}]},modalHeader(){return this.$t.sprintf(this.$t.__('Links & Suggestions for "%1$s"',this.$td),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},Or={class:"aioseo-tab-content aioseo-link-assistant"},Hr={key:0};function Ur(t,e,r,s,o,n){const g=a("core-main-tabs"),h=a("link-assistant-inbound-internal"),f=a("core-blur"),y=a("required-plans"),C=a("cta"),k=a("core-modal-portal"),v=a("links-side-bar");return i(),m("div",Or,[t.$root._data.screenContext==="metabox"?(i(),m("div",Hr,[c(f,null,{default:l(()=>[c(g,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:w})=>[(i(),_(M(w.icon),{class:x([{warning:w.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(i(),_(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):u("",!0)]),_:1}),c(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox","home"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks]},{"header-text":l(()=>[b(p(o.strings.ctaHeader),1)]),description:l(()=>[c(y,{addon:"aioseo-link-assistant"}),b(" "+p(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])])):u("",!0),s.postEditorStore.currentPost.linkAssistant.modalOpen&&t.$root._data.screenContext==="sidebar"?(i(),_(k,{key:1,classes:["aioseo-link-assistant-modal"],onClose:s.postEditorStore.toggleLinkAssistantModal},{headerTitle:l(()=>[b(p(n.modalHeader),1)]),body:l(()=>[c(f,null,{default:l(()=>[c(g,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:w})=>[(i(),_(M(w.icon),{class:x([{warning:w.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(i(),_(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):u("",!0)]),_:1}),c(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox","home"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks]},{"header-text":l(()=>[b(p(o.strings.ctaHeader),1)]),description:l(()=>[c(y,{addon:"aioseo-link-assistant"}),b(" "+p(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1},8,["onClose"])):u("",!0),this.parentComponentContext!=="modal"?(i(),_(v,{key:2})):u("",!0)])}const Ct=S(Rr,[["render",Ur]]),Kr={};function Gr(t,e){return i(),m("div")}const Nr=S(Kr,[["render",Gr]]);const Fr={setup(){return{addons:Rt,licenseStore:K()}},components:{Links:Ct,LinksActivate:Nr,LinksLite:Ct},props:{parentComponentContext:String}},zr={class:"aioseo-tab-content aioseo-link-assistant"};function qr(t,e,r,s,o,n){const g=a("Links",!0),h=a("LinksLite"),f=a("LinksActivate");return i(),m("div",zr,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(h,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-link-assistant")&&s.addons.canActivate("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const Wr=S(Fr,[["render",qr]]);const jr={setup(){return{optionsStore:ot(),postEditorStore:T(),rootStore:q()}},components:{BaseImg:Ft,CoreAlert:N,CoreFacebookPreview:is,CoreHtmlTagsEditor:St,CoreSettingsRow:B,SvgCirclePlus:X},mixins:[Ut,Kt,It,yt,ft,Gt,ps],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:Nt,separator:void 0,titleCount:0,descriptionCount:0,strings:{tabName:this.$t.__("Facebook Preview",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),video:this.$t.__("Video URL",this.$td),width:this.$t.__("Width",this.$td),height:this.$t.__("Height",this.$td),facebookObjectType:this.$t.__("Object Type",this.$td),facebookImage:this.$t.__("Facebook Image",this.$td),facebookTitle:this.$t.__("Facebook Title",this.$td),facebookDescription:this.$t.__("Facebook Description",this.$td),uploadOrSelectImage:this.$t.__("Upload or Select Image",this.$td),pasteYourImageUrl:this.$t.__("Paste your image URL or select a new image",this.$td),minimumSize:this.$t.__("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.",this.$td),remove:this.$t.__("Remove",this.$td),clickToAddSiteName:this.$t.__("Click on the tags below to insert variables into your site name.",this.$td),clickToAddHomePageDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),articleSection:this.$t.__("Article Section",this.$td),articleTags:this.$t.__("Article Tags",this.$td),tagPlaceholder:this.$t.__("Press enter to create an article tag",this.$td),facebookDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("Open Graph",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",this.$t.__("Go to Social Networks",this.$td)))}}},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 t=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[t][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType].objectType==="article"}},methods:{scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveImageType(t){this.postEditorStore.currentPost.og_image_type=t,this.postEditorStore.isDirty=!0},getObjectTypeOptions(t){let e=null;return this.objectTypeOptions.forEach(r=>{const s=r.options.find(o=>o.value===t);s&&(e=s)}),e},setObjectType(t){this.postEditorStore.currentPost.og_object_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.og_image_custom_url=t,this.postEditorStore.savePostState()}},watch:{"postEditorStore.currentPost.og_image_type"(){this.setImageUrl()},"postEditorStore.currentPost.og_image_custom_url"(){this.setImageUrl()}},mounted(){this.scrollToElement()}},Yr={class:"tab-facebook"},Zr={id:"aioseo-post-settings-facebook"},Jr=["innerHTML"],Qr=["innerHTML"],Xr={class:"facebook-image-upload"},tn={class:"aioseo-description"};function en(t,e,r,s,o,n){const g=a("core-alert"),h=a("core-settings-row"),f=a("core-facebook-preview"),y=a("core-html-tags-editor"),C=a("base-select"),k=a("base-input"),v=a("svg-circle-plus"),w=a("base-button"),E=a("base-img");return i(),m("div",Yr,[c(h,{noBorder:"",noVerticalMargin:""},{content:l(()=>[s.optionsStore.options.social.facebook.general.enable?u("",!0):(i(),_(g,{key:0,class:"facebook-disabled-warning",innerHTML:o.strings.facebookDisabled,type:"red"},null,8,["innerHTML"]))]),_:1}),c(h,{name:o.strings.tabName},{content:l(()=>[c(f,{class:x({ismobilecard:s.postEditorStore.currentPost.socialMobilePreview}),description:n.previewDescription,image:t.imageUrl,loading:t.loading,title:n.previewTitle},null,8,["class","description","image","loading","title"])]),_:1},8,["name"]),d("div",Zr,[c(h,{name:o.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:l(()=>[c(y,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=$=>s.postEditorStore.currentPost.og_title=$),e[2]||(e[2]=$=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=$=>t.updateCount($,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":l(()=>[b(p(o.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,95)},null,8,Jr)]),_:1},8,["name"]),c(h,{name:o.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:l(()=>[c(y,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=$=>s.postEditorStore.currentPost.og_description=$),e[5]||(e[5]=$=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=$=>t.updateCount($,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[b(p(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,Qr)]),_:1},8,["name"]),c(h,{class:"facebook-image-source",name:o.strings.imageSource,align:""},{content:l(()=>[c(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=$=>n.saveImageType($.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.og_image_type==="custom"?(i(),_(h,{key:0,name:o.strings.customFieldsName,align:""},{content:l(()=>[c(k,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=$=>s.postEditorStore.currentPost.og_image_custom_fields=$),e[8]||(e[8]=$=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):u("",!0),s.postEditorStore.currentPost.og_image_type==="custom_image"?(i(),_(h,{key:1,class:"facebook-image",name:o.strings.facebookImage},{content:l(()=>[d("div",Xr,[c(k,{size:"medium",modelValue:s.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":[e[9]||(e[9]=$=>s.postEditorStore.currentPost.og_image_custom_url=$),e[10]||(e[10]=$=>s.postEditorStore.isDirty=!0)],placeholder:o.strings.pasteYourImageUrl},null,8,["modelValue","placeholder"]),c(w,{class:"insert-image",onClick:e[11]||(e[11]=$=>t.openUploadModal("facebookImage",n.updateImage)),size:"medium",type:"black"},{default:l(()=>[c(v),b(" "+p(o.strings.uploadOrSelectImage),1)]),_:1}),c(w,{class:"remove-image",onClick:e[12]||(e[12]=$=>s.postEditorStore.currentPost.og_image_custom_url=null),size:"medium",type:"gray"},{default:l(()=>[b(p(o.strings.remove),1)]),_:1})]),d("div",tn,p(o.strings.minimumSize),1),c(E,{src:s.postEditorStore.currentPost.og_image_custom_url},null,8,["src"])]),_:1},8,["name"])):u("",!0),c(h,{class:"facebook-video",name:o.strings.video,align:""},{content:l(()=>[c(k,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[13]||(e[13]=$=>s.postEditorStore.currentPost.og_video=$)},null,8,["modelValue"])]),_:1},8,["name"]),c(h,{class:"facebook-object-type",name:o.strings.facebookObjectType,align:""},{content:l(()=>[c(C,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:n.getObjectTypeOptions(s.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[14]||(e[14]=$=>n.setObjectType($.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),n.shouldShowArticleSection?(i(),_(h,{key:2,name:o.strings.articleSection,align:""},{content:l(()=>[c(k,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[15]||(e[15]=$=>s.postEditorStore.currentPost.og_article_section=$)},null,8,["modelValue"])]),_:1},8,["name"])):u("",!0),n.shouldShowArticleSection?(i(),_(h,{key:3,name:o.strings.articleTags,align:""},{content:l(()=>[c(C,{multiple:"",taggable:"",options:t.getJsonValue(s.postEditorStore.currentPost.og_article_tags)||[],modelValue:t.getJsonValue(s.postEditorStore.currentPost.og_article_tags)||[],"onUpdate:modelValue":e[16]||(e[16]=$=>s.postEditorStore.currentPost.og_article_tags=t.setJsonValue($)),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):u("",!0)])])}const sn=S(jr,[["render",en]]);const on={setup(){return{optionsStore:ot(),postEditorStore:T(),rootStore:q()}},components:{BaseImg:Ft,CoreAlert:N,CoreHtmlTagsEditor:St,CoreSettingsRow:B,CoreTwitterPreview:rs,SvgCirclePlus:X},mixins:[Ut,Kt,yt,ft,Gt,hs],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:Nt,separator:void 0,titleCount:0,descriptionCount:0,strings:{twitterPreview:this.$t.__("Twitter Preview",this.$td),useFB:this.$t.__("Use Data from Facebook Tab",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),twitterImage:this.$t.__("Twitter Image",this.$td),twitterTitle:this.$t.__("Twitter Title",this.$td),twitterDescription:this.$t.__("Twitter Description",this.$td),twitterCardType:this.$t.__("Twitter Card Type",this.$td),pasteYourImageUrl:this.$t.__("Paste your image URL or select a new image",this.$td),uploadOrSelectImage:this.$t.__("Upload or Select Image",this.$td),remove:this.$t.__("Remove",this.$td),minimumSizeSummary:this.$t.__("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),minimumSizeSummaryWithLarge:this.$t.__("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),twitterDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("Twitter",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",this.$t.__("Go to Social Networks",this.$td)))}}},computed:{previewTitle(){const t=this.postEditorStore.currentPost.twitter_use_og?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(t||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const t=this.postEditorStore.currentPost.twitter_use_og?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(t||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")}},methods:{getCardOptions(t){return this.twitterCardOptions.find(e=>e.value===t)},cardSelect(t){this.postEditorStore.currentPost.twitter_card=t,this.postEditorStore.isDirty=!0},scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveTwitterImageType(t){this.postEditorStore.currentPost.twitter_image_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.twitter_image_custom_url=t,this.postEditorStore.savePostState()}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.setImageUrl()},"postEditorStore.currentPost.twitter_image_type"(){this.setImageUrl()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.setImageUrl()}},mounted(){this.scrollToElement()}},rn={class:"tab-twitter"},nn={id:"aioseo-post-settings-twitter"},an=["innerHTML"],ln=["innerHTML"],cn={class:"twitter-image-upload"},dn={class:"aioseo-description"},un={key:0},pn={key:1};function hn(t,e,r,s,o,n){const g=a("core-alert"),h=a("core-settings-row"),f=a("core-twitter-preview"),y=a("base-toggle"),C=a("core-html-tags-editor"),k=a("base-select"),v=a("base-input"),w=a("svg-circle-plus"),E=a("base-button"),$=a("base-img");return i(),m("div",rn,[c(h,{noBorder:"",noVerticalMargin:""},{content:l(()=>[s.optionsStore.options.social.twitter.general.enable?u("",!0):(i(),_(g,{key:0,class:"twitter-disabled-warning",innerHTML:o.strings.twitterDisabled,type:"red"},null,8,["innerHTML"]))]),_:1}),c(h,{name:o.strings.twitterPreview},{content:l(()=>[c(f,{card:s.postEditorStore.currentPost.twitter_card,class:x({ismobilecard:s.postEditorStore.currentPost.socialMobilePreview}),description:n.previewDescription,image:t.imageUrl,loading:t.loading,title:n.previewTitle},null,8,["card","class","description","image","loading","title"])]),_:1},8,["name"]),d("div",nn,[c(h,{name:o.strings.useFB,class:"use-facebook"},{content:l(()=>[c(y,{modelValue:s.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=P=>s.postEditorStore.currentPost.twitter_use_og=P),e[1]||(e[1]=P=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(i(),_(h,{key:0,name:o.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:l(()=>[c(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=P=>s.postEditorStore.currentPost.twitter_title=P),e[4]||(e[4]=P=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=P=>t.updateCount(P,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,70)},null,8,an)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(i(),_(h,{key:1,name:o.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:l(()=>[c(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=P=>s.postEditorStore.currentPost.twitter_description=P),e[7]||(e[7]=P=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=P=>t.updateCount(P,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[b(p(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),d("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,ln)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(i(),_(h,{key:2,class:"twitter-image-source",name:o.strings.imageSource,align:""},{content:l(()=>[c(k,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=P=>n.saveTwitterImageType(P.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom"?(i(),_(h,{key:3,class:"twitter-custom-field",name:o.strings.customFieldsName,align:""},{content:l(()=>[c(v,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=P=>s.postEditorStore.currentPost.twitter_image_custom_fields=P),e[10]||(e[10]=P=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):u("",!0),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom_image"?(i(),_(h,{key:4,class:"twitter-image",name:o.strings.twitterImage},{content:l(()=>[d("div",cn,[c(v,{size:"medium",modelValue:s.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":[e[11]||(e[11]=P=>s.postEditorStore.currentPost.twitter_image_custom_url=P),e[12]||(e[12]=P=>s.postEditorStore.isDirty=!0)],placeholder:o.strings.pasteYourImageUrl},null,8,["modelValue","placeholder"]),c(E,{class:"insert-image",onClick:e[13]||(e[13]=P=>t.openUploadModal("twitterImage",n.updateImage)),size:"medium",type:"black"},{default:l(()=>[c(w),b(" "+p(o.strings.uploadOrSelectImage),1)]),_:1}),c(E,{class:"remove-image",onClick:e[14]||(e[14]=P=>s.postEditorStore.currentPost.twitter_image_custom_url=null),size:"medium",type:"gray"},{default:l(()=>[b(p(o.strings.remove),1)]),_:1})]),d("div",dn,[s.postEditorStore.currentPost.twitter_card==="summary"||s.postEditorStore.currentPost.twitter_card==="default"&&s.optionsStore.options.social.twitter.general.defaultCardType==="summary"?(i(),m("span",un,p(o.strings.minimumSizeSummary),1)):u("",!0),s.postEditorStore.currentPost.twitter_card==="summary_large_image"||s.postEditorStore.currentPost.twitter_card==="default"&&s.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?(i(),m("span",pn,p(o.strings.minimumSizeSummaryWithLarge),1)):u("",!0)]),c($,{src:s.postEditorStore.currentPost.twitter_image_custom_url},null,8,["src"])]),_:1},8,["name"])):u("",!0),c(h,{class:"twitter-card-type",name:o.strings.twitterCardType,align:""},{content:l(()=>[c(k,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:n.getCardOptions(s.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[15]||(e[15]=P=>n.cardSelect(P.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const _n=S(on,[["render",hn]]);const mn={setup(){return{postEditorStore:T(),settingsStore:G()}},components:{CoreSettingsRow:B,SvgPencil:nt},data(){return{strings:{title:this.$t.__("Social Media",this.$td),sidebarCopy:this.$t.__("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.",this.$td),editSnippet:this.$t.__("Preview & Edit",this.$td)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.openModal(!0)}}},gn={class:"aioseo-sidebar-content-title"};function yn(t,e,r,s,o,n){const g=a("svg-pencil"),h=a("base-button"),f=a("core-settings-row");return t.$root._data.screenContext==="sidebar"?(i(),_(f,{key:0,name:o.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:l(()=>[d("div",gn,p(o.strings.title),1),d("p",null,p(o.strings.sidebarCopy),1),c(h,{class:"open-social-modal gray small",onClick:n.openModalEv},{default:l(()=>[c(g),b(" "+p(o.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):u("",!0)}const fn=S(mn,[["render",yn]]);const Sn={setup(){return{postEditorStore:T(),settingsStore:G()}},components:{BaseRadioToggle:Bt,CoreMainTabs:Q,CoreSettingsRow:B,Facebook:sn,Twitter:_n,SocialSideBar:fn,SvgDesktop:Zt,SvgMobile:Jt},props:{parentComponentContext:String},data(){return{strings:{pageName:this.$t.__("Social",this.$td)},tabs:[{slug:"facebook",name:this.$t.__("Facebook",this.$td)},{slug:"twitter",name:this.$t.__("Twitter",this.$td)}]}},computed:{initTab:function(){let t=this.settingsStore.metaBoxTabs.social;return et()["social-tab"]&&(t=et()["social-tab"],ut("social-tab")),this.parentComponentContext==="modal"&&(t=this.settingsStore.metaBoxTabs.socialModal),t}},methods:{isMobilePreviewEv(t){this.postEditorStore.changeSocialPreview(t)},processChangeTab(t){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:t}):this.settingsStore.changeTabSettings({setting:"social",value:t})}}},bn={class:"aioseo-tab-content aioseo-post-social"};function vn(t,e,r,s,o,n){const g=a("core-main-tabs"),h=a("svg-desktop"),f=a("svg-mobile"),y=a("base-radio-toggle"),C=a("core-settings-row"),k=a("social-side-bar");return i(),m("div",bn,[c(C,{class:"mobile-radio-buttons"},{content:l(()=>[c(g,{tabs:o.tabs,showSaveButton:!1,active:n.initTab,internal:"",onChanged:e[0]||(e[0]=v=>n.processChangeTab(v))},null,8,["tabs","active"]),t.$root._data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(y,{key:0,modelValue:s.postEditorStore.currentPost.socialMobilePreview,"onUpdate:modelValue":n.isMobilePreviewEv,name:"previewSocialIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:l(()=>[c(h)]),mobile:l(()=>[c(f)]),_:1},8,["modelValue","onUpdate:modelValue"])):u("",!0)]),_:1}),c(st,{name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(M(n.initTab)))]),_:1}),this.parentComponentContext!=="modal"?(i(),_(k,{key:0})):u("",!0)])}const Xt=S(Sn,[["render",vn]]);const kn={setup(){return{settingsStore:G()}},components:{CoreMainTabs:Q,CoreSettingsRow:B,General:Qt,Social:Xt,SvgSettings:zt,SvgShare:qt},data(){return{strings:{pageName:this.$t.__("Modal Content",this.$td)},tabs:[{slug:"general",icon:"svg-settings",name:"General"},{slug:"social",icon:"svg-share",name:"Social"}]}},computed:{getTabs(){return this.tabs.filter(t=>U(`aioseo_page_${t.slug}_settings`))}},methods:{processChangeTab(t){this.settingsStore.changeTabSettings({setting:"modal",value:t})}}},wn={class:"aioseo-modal-content"},Cn={class:"mobile-radio-buttons"},$n={class:"component-wrapper"};function Pn(t,e,r,s,o,n){const g=a("core-main-tabs");return i(),m("div",wn,[d("div",Cn,[c(g,{tabs:n.getTabs,showSaveButton:!1,active:s.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=h=>n.processChangeTab(h))},null,8,["tabs","active"])]),d("div",$n,[c(st,{name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(M(s.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const En=S(kn,[["render",Pn]]);const Tn={setup(){return{postEditorStore:T()}},components:{CoreSettingsRow:B,SvgRightArrowShort:bt},data(){return{strings:{title:this.$t.__("Redirects",this.$td),description:this.$t.__("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",this.$td),button:this.$t.__("Open Redirects",this.$td)}}}},xn={class:"aioseo-redirects-sidebar"},An={class:"aioseo-sidebar-content-title"};function Ln(t,e,r,s,o,n){const g=a("svg-right-arrow-short"),h=a("base-button"),f=a("core-settings-row");return i(),m("div",xn,[t.$root._data.screenContext==="sidebar"?(i(),_(f,{key:0,class:"snippet-description-row open-redirects-copy"},{content:l(()=>[d("div",An,p(o.strings.title),1),d("p",null,p(o.strings.description),1),c(h,{class:"open-redirects-modal gray small",onClick:s.postEditorStore.toggleRedirectsModal},{default:l(()=>[c(g),b(" "+p(o.strings.button),1)]),_:1},8,["onClick"])]),_:1})):u("",!0)])}const Mn=S(Tn,[["render",Ln],["__scopeId","data-v-042691c3"]]),In={setup(){return{postEditorStore:T()}},components:{CoreModalPortal:j,RedirectsSideBar:Mn,RedirectsLite:as},props:{parentComponentContext:String},data(){return{strings:{modalHeader:this.$t.__("Redirects",this.$td)}}}},Vn={class:"bd"};function Dn(t,e,r,s,o,n){const g=a("redirects-lite"),h=a("core-modal-portal"),f=a("redirects-side-bar");return i(),m("div",null,[t.$root._data.screenContext==="metabox"?(i(),_(g,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),s.postEditorStore.currentPost.redirects.modalOpen&&t.$root._data.screenContext==="sidebar"?(i(),_(h,{key:1,classes:["aioseo-redirects","modal"],onClose:s.postEditorStore.toggleRedirectsModal},{headerTitle:l(()=>[b(p(o.strings.modalHeader),1)]),body:l(()=>[d("div",Vn,[c(g,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["onClose"])):u("",!0),this.parentComponentContext!=="modal"?(i(),_(f,{key:2})):u("",!0)])}const $t=S(In,[["render",Dn]]),Bn={};function Rn(t,e){return i(),m("div")}const On=S(Bn,[["render",Rn]]),Hn={setup(){return{addons:Rt,licenseStore:K()}},components:{Redirects:$t,RedirectsActivate:On,RedirectsLite:$t},props:{parentComponentContext:String}},Un={class:"aioseo-tab-content"};function Kn(t,e,r,s,o,n){const g=a("Redirects",!0),h=a("RedirectsLite"),f=a("RedirectsActivate");return i(),m("div",Un,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-redirects")?(i(),_(h,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-redirects")&&s.addons.canActivate("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(i(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const Gn=S(Hn,[["render",Kn]]),Nn={};function Fn(t,e){return i(),m("div")}const zn=S(Nn,[["render",Fn]]),qn={};function Wn(t,e){return i(),m("div")}const jn=S(qn,[["render",Wn]]),Yn={};function Zn(t,e){return i(),m("div")}const Jn=S(Yn,[["render",Zn]]),Qn={};function Xn(t,e){return i(),m("div")}const ta=S(Qn,[["render",Xn]]),ea={};function sa(t,e){return i(),m("div")}const oa=S(ea,[["render",sa]]),ia={};function ra(t,e){return i(),m("div")}const na=S(ia,[["render",ra]]),aa={};function la(t,e){return i(),m("div")}const ca=S(aa,[["render",la]]),da={};function ua(t,e){return i(),m("div")}const pa=S(da,[["render",ua]]),ha={};function _a(t,e){return i(),m("div")}const ma=S(ha,[["render",_a]]),ga={};function ya(t,e){return i(),m("div")}const fa=S(ga,[["render",ya]]),Sa={};function ba(t,e){return i(),m("div")}const va=S(Sa,[["render",ba]]),ka={};function wa(t,e){return i(),m("div")}const Ca=S(ka,[["render",wa]]),$a={};function Pa(t,e){return i(),m("div")}const Ea=S($a,[["render",Pa]]),Ta={};function xa(t,e){return i(),m("div")}const Aa=S(Ta,[["render",xa]]),La={};function Ma(t,e){return i(),m("div")}const Ia=S(La,[["render",Ma]]),Va={};function Da(t,e){return i(),m("div")}const Ba=S(Va,[["render",Da]]),Ra={};function Oa(t,e){return i(),m("div")}const Ha=S(Ra,[["render",Oa]]),Ua={};function Ka(t,e){return i(),m("div")}const Ga=S(Ua,[["render",Ka]]),Na={},Fa={viewBox:"0 0 11 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-trash"},za=d("path",{d:"M8.0013 4V10.6667H2.66797V4H8.0013ZM7.0013 0H3.66797L3.0013 0.666667H0.667969V2H10.0013V0.666667H7.66797L7.0013 0ZM9.33463 2.66667H1.33464V10.6667C1.33464 11.4 1.93464 12 2.66797 12H8.0013C8.73464 12 9.33463 11.4 9.33463 10.6667V2.66667Z",fill:"currentColor"},null,-1),qa=[za];function Wa(t,e){return i(),m("svg",Fa,qa)}const ja=S(Na,[["render",Wa]]),Ya={},Za={class:"aioseo-web-page",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},Ja=d("path",{d:"M3.6666 10.3H8.24994V9.3H3.6666V10.3ZM3.6666 7.5H10.3499V6.5H3.6666V7.5ZM3.6666 4.68333H10.3499V3.68333H3.6666V4.68333ZM2.08327 13.2333C1.72771 13.2333 1.41938 13.1028 1.15827 12.8417C0.897157 12.5806 0.766602 12.2722 0.766602 11.9167V2.08333C0.766602 1.71667 0.897157 1.40278 1.15827 1.14167C1.41938 0.880556 1.72771 0.75 2.08327 0.75H11.9166C12.2833 0.75 12.5972 0.880556 12.8583 1.14167C13.1194 1.40278 13.2499 1.71667 13.2499 2.08333V11.9167C13.2499 12.2722 13.1194 12.5806 12.8583 12.8417C12.5972 13.1028 12.2833 13.2333 11.9166 13.2333H2.08327ZM2.08327 11.9167H11.9166V2.08333H2.08327V11.9167ZM2.08327 2.08333V11.9167V2.08333Z",fill:"currentColor"},null,-1),Qa=[Ja];function Xa(t,e){return i(),m("svg",Za,Qa)}const tl=S(Ya,[["render",Xa]]),te={components:{Article:zn,Book:jn,Course:Jn,Dataset:ta,Event:oa,FAQPage:na,FactCheck:ca,HowTo:pa,JobPosting:ma,Movie:fa,Music:va,Person:Ca,Product:Ea,Recipe:Aa,Service:Ia,SoftwareApplication:Ba,Video:Ha,WebPage:Ga,SvgArticle:pe,SvgBook:he,SvgCircleQuestionMark:mt,SvgCustomSchema:_e,SvgCopy:me,SvgCourse:ge,SvgDataset:ye,SvgEvent:fe,SvgFaqPage:Se,SvgFactCheck:be,SvgFile:ve,SvgFileEdit:ke,SvgGoogleSmall:we,SvgHowTo:Ce,SvgJobPosting:$e,SvgMovie:Pe,SvgMusic:Ee,SvgPencil:nt,SvgPerson:Te,SvgProduct:xe,SvgRecipe:Ae,SvgService:Le,SvgSoftwareApplication:Me,SvgTerminal:Ie,SvgTrash:ja,SvgVideo:Ve,SvgWebPage:tl},data(){return{graphs:[{slug:"article",graphName:"Article",label:this.$t.__("Article",this.$td)},{slug:"book",graphName:"Book",label:this.$t.__("Book",this.$td)},{slug:"course",graphName:"Course",label:this.$t.__("Course",this.$td)},{slug:"dataset",graphName:"Dataset",label:this.$t.__("Dataset",this.$td)},{slug:"event",graphName:"Event",label:this.$t.__("Event",this.$td)},{slug:"faq-page",graphName:"FAQPage",label:this.$t.__("FAQ",this.$td)},{slug:"fact-check",graphName:"FactCheck",label:this.$t.__("Fact Check",this.$td)},{slug:"how-to",graphName:"HowTo",label:this.$t.__("How To",this.$td)},{slug:"job-posting",graphName:"JobPosting",label:this.$t.__("Job Posting",this.$td)},{slug:"movie",graphName:"Movie",label:this.$t.__("Movie",this.$td)},{slug:"music",graphName:"Music",label:this.$t.__("Music",this.$td)},{slug:"person",graphName:"Person",label:this.$t.__("Person",this.$td)},{slug:"product",graphName:"Product",label:this.$t.__("Product",this.$td)},{slug:"recipe",graphName:"Recipe",label:this.$t.__("Recipe",this.$td)},{slug:"service",graphName:"Service",label:this.$t.__("Service",this.$td)},{slug:"software-application",graphName:"SoftwareApplication",label:this.$t.__("Software",this.$td)},{slug:"video",graphName:"Video",label:this.$t.__("Video",this.$td)},{slug:"web-page",graphName:"WebPage",label:this.$t.__("Web Page",this.$td)}],childGraphs:{Article:[{childGraphName:"BlogPosting",label:this.$t.__("Blog Post",this.$td)},{childGraphName:"NewsArticle",label:this.$t.__("News Article",this.$td)}],Music:[{childGraphName:"MusicAlbum",label:this.$t.__("Music Album",this.$td)},{childGraphName:"MusicGroup",label:this.$t.__("Music Group",this.$td)}],WebPage:[{childGraphName:"WebPage",label:this.$t.__("Web Page",this.$td)},{childGraphName:"AboutPage",label:this.$t.__("About Page",this.$td)},{childGraphName:"CheckoutPage",label:this.$t.__("Checkout Page",this.$td)},{childGraphName:"CollectionPage",label:this.$t.__("Collection Page",this.$td)},{childGraphName:"ContactPage",label:this.$t.__("Contact Page",this.$td)},{childGraphName:"ItemPage",label:this.$t.__("Item Page",this.$td)},{childGraphName:"MedicalPage",label:this.$t.__("Medical Page",this.$td)},{childGraphName:"ProfilePage",label:this.$t.__("Profile Page",this.$td)},{childGraphName:"RealEstateListing",label:this.$t.__("Real Estate Listing",this.$td)},{childGraphName:"SearchResultsPage",label:this.$t.__("Search Results Page",this.$td)}]}}},methods:{getParentGraphName(t){let e="";return Object.entries(this.childGraphs).forEach(r=>{const s=r[0];r[1].forEach(o=>{e||t===o.childGraphName&&(e=s)})}),e||t}}};const el={mixins:[te],props:{graph:Object,customGraph:Boolean,defaultGraph:String},computed:{graphLabel(){if(this.customGraph)return this.$t.__("Custom Schema",this.$td)+" - "+this.graph.graphName;if(this.defaultGraph)return this.formatDefaultGraphName(this.defaultGraph);if(this.graph.label)return this.graph.label;const t=this.graph.slug.toLowerCase();return this.graphs.find(e=>e.slug===t).label},graphIcon(){if(this.customGraph)return"svg-custom-schema";if(this.defaultGraph){const t=this.getParentGraphSlug(this.defaultGraph);return t?"svg-"+t:"svg-custom-schema"}return"svg-"+this.graph.slug}},methods:{getParentGraphSlug(t){Object.entries(this.childGraphs).forEach(r=>{const s=r[0];r[1].forEach(o=>{t===o.childGraphName&&(t=s)})});let e="";return this.graphs.forEach(r=>{r.graphName===t&&(e=r.slug)}),e},formatDefaultGraphName(t){let e="",r=t;return Object.entries(this.childGraphs).forEach(s=>{const o=s[0];s[1].forEach(n=>{e||t===n.childGraphName&&(e=o,r=n.label,this.graphs.forEach(g=>{g.graphName===o&&(e=g.label)}))})}),e?e+" - "+r+" "+this.$t.__("(Default)",this.$td):t+" "+this.$t.__("(Default)",this.$td)}}},sl={class:"graph-container"},ol={class:"graph"},il={class:"left"},rl=["title"],nl={class:"right action-buttons"};function al(t,e,r,s,o,n){return i(),m("div",sl,[d("div",ol,[d("div",il,[(i(),_(M(n.graphIcon))),d("span",{title:n.graphLabel},p(n.graphLabel),9,rl)]),d("div",nl,[O(t.$slots,"buttons")])])])}const ee=S(el,[["render",al]]);const ll={emits:["close"],mixins:[te],components:{CoreBlur:lt,CoreMainTabs:Q,CoreModalPortal:j,CoreTooltip:F,Cta:Ot,GraphCard:ee,SvgCirclePlus:X},data(){return{strings:{schemaGenerator:this.$t.__("Schema Generator",this.$td),headerTooltip:this.$t.sprintf(this.$t.__("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",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)),searchSchema:this.$t.__("Search Schema",this.$td),ctaDescription:this.$t.__("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.",this.$td),ctaButtonText:this.$t.__("Upgrade to Pro and Unlock Schema Generator",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Schema Generator is only available for licensed %1$s %2$s users.",this.$td),"AIOSEO","Pro")},features:[this.$t.__("Unlimited Schema",this.$td),this.$t.__("Validate with Google",this.$td),this.$t.__("Increase Rankings",this.$td),this.$t.__("Additional Schema Types",this.$td)],tabs:[{slug:"schema-templates",icon:"svg-file",name:this.$t.__("Schema Templates",this.$td),component:"templates"},{slug:"custom-schema",icon:"svg-file-edit",name:this.$t.__("Custom Schema",this.$td),component:"custom"},{slug:"schema-validation",icon:"svg-terminal",name:this.$t.__("Schema Validation",this.$td),component:"validation"}],templatesTabs:[{slug:"schema-catalog",name:this.$t.__("Schema Catalog",this.$td)},{slug:"your-templates",name:this.$t.__("Your Templates",this.$td)}]}}},cl={class:"title"},dl=["innerHTML"],ul={class:"schema-templates"},pl={class:"main"},hl={class:"schema-catalog"},_l={class:"graphs"};function ml(t,e,r,s,o,n){const g=a("svg-circle-question-mark"),h=a("core-tooltip"),f=a("core-main-tabs"),y=a("base-input"),C=a("svg-circle-plus"),k=a("base-button"),v=a("graph-card"),w=a("core-blur"),E=a("cta"),$=a("core-modal-portal");return i(),_($,{classes:["aioseo-post-schema-modal-cta"],onClose:e[0]||(e[0]=P=>t.$emit("close"))},{headerTitle:l(()=>[d("div",cl,p(o.strings.schemaGenerator),1),c(h,null,{tooltip:l(()=>[d("span",{innerHTML:o.strings.headerTooltip},null,8,dl)]),default:l(()=>[c(g)]),_:1})]),body:l(()=>[c(w,null,{default:l(()=>[c(f,{tabs:o.tabs,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":l(({tab:P})=>[(i(),_(M(P.icon)))]),_:1},8,["tabs"]),d("div",ul,[c(f,{tabs:o.templatesTabs,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":l(({tab:P})=>[(i(),_(M(P.icon)))]),_:1},8,["tabs"]),d("div",pl,[c(y,{class:"search",size:"medium",prependIcon:"search",placeholder:o.strings.searchSchema},null,8,["placeholder"]),d("div",hl,[d("div",_l,[(i(!0),m(R,null,W(t.graphs,(P,Y)=>(i(),_(v,{key:P.graphName+Y,graph:P},{buttons:l(()=>[c(k,{class:"small",type:"gray"},{default:l(()=>[c(C)]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),c(E,{"cta-link":t.$links.getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("schema-generator",null,"home"),"feature-list":o.features},{"header-text":l(()=>[b(p(o.strings.ctaHeader),1)]),description:l(()=>[b(p(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const gl=S(ll,[["render",ml]]);const yl={setup(){return{postEditorStore:T()}},components:{CoreAlert:N,CoreSettingsRow:B,CoreTooltip:F,CtaModal:gl,GraphCard:ee,SvgEye:Wt},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:this.$t.__("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",this.$td),noGraphs:this.$t.__("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",this.$td),schemaInUse:this.$t.__("Schema In Use",this.$td),generateSchema:this.$t.__("Generate Schema",this.$td),validateSchema:this.$t.__("Validate Schema",this.$td),defaultGraphTooltip:this.$t.__("This is the default graph for this post type. All data for this graph will be automatically generated.",this.$td)}}},computed:{isSidebar(){return this.$root._data.screenContext==="sidebar"}}},fl={class:"graphs"},Sl={key:0,class:"sidebar-description"},bl={class:"description"},vl=["innerHTML"],kl=["innerHTML"],wl={class:"buttons"};function Cl(t,e,r,s,o,n){const g=a("svg-eye"),h=a("base-button"),f=a("core-tooltip"),y=a("graph-card"),C=a("core-alert"),k=a("cta-modal"),v=a("core-settings-row");return i(),m("div",{class:x(["aioseo-tab-content aioseo-post-schema",[{sidebar:n.isSidebar}]])},[c(v,{name:o.strings.schemaInUse},{content:l(()=>[d("div",fl,[n.isSidebar?(i(),m("div",Sl,[d("p",bl,p(o.strings.sidebarDescription),1),d("p",{class:"description",innerHTML:t.$links.getDocLink(t.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,vl)])):u("",!0),s.postEditorStore.currentPost.schema.defaultGraph&&s.postEditorStore.currentPost.schema.defaultGraph!=="none"?(i(),_(y,{key:1,defaultGraph:s.postEditorStore.currentPost.schema.defaultGraph},{buttons:l(()=>[c(f,{offset:n.isSidebar?"-70px,0":"0,0"},{tooltip:l(()=>[d("span",{innerHTML:o.strings.defaultGraphTooltip},null,8,kl)]),default:l(()=>[c(h,{class:"small no-hover",type:"gray"},{default:l(()=>[c(g)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):u("",!0)]),d("div",wl,[!s.postEditorStore.currentPost.schema.defaultGraph||s.postEditorStore.currentPost.schema.defaultGraph==="none"?(i(),_(C,{key:0,class:"no-graphs",type:"yellow"},{default:l(()=>[b(p(o.strings.noGraphs),1)]),_:1})):u("",!0),c(h,{class:"medium",type:"blue",onClick:e[0]||(e[0]=w=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:l(()=>[b(p(o.strings.generateSchema),1)]),_:1}),c(h,{class:"medium",type:"gray",onClick:e[1]||(e[1]=w=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:l(()=>[b(p(o.strings.validateSchema),1)]),_:1})]),!n.isSidebar&&o.modalOpenMetabox?(i(),_(k,{key:0,onClose:e[2]||(e[2]=w=>o.modalOpenMetabox=!1)})):u("",!0),n.isSidebar&&o.modalOpenSidebar?(i(),_(k,{key:1,onClose:e[3]||(e[3]=w=>o.modalOpenSidebar=!1)})):u("",!0)]),_:1},8,["name"])],2)}const Pt=S(yl,[["render",Cl]]),$l={setup(){return{licenseStore:K()}},components:{Schema:Pt,SchemaLite:Pt},props:{parentComponentContext:String}},Pl={class:"aioseo-post-schema-view"};function El(t,e,r,s,o,n){const g=a("schema",!0),h=a("schema-lite");return i(),m("div",Pl,[s.licenseStore.isUnlicensed?u("",!0):(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),s.licenseStore.isUnlicensed?(i(),_(h,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const Tl=S($l,[["render",El]]);const se=t=>(De("data-v-20175fdb"),t=t(),Be(),t),xl={class:"aioseo-seo-revision-list-item"},Al={class:"aioseo-seo-revision-list-item__author"},Ll={class:"aioseo-seo-revision-list-item__author__avatar"},Ml={class:"aioseo-seo-revision-list-item__author__name"},Il=se(()=>d("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Vl={class:"aioseo-seo-revision-list-item__action"},Dl=se(()=>d("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Bl={class:"aioseo-seo-revision-list-item__action__view"},Rl={class:"aioseo-seo-revision-list-item__action__delete"},Ol={__name:"ListItem",setup(t){const{currentUser:e}=xt(At());return(r,s)=>(i(),m("div",xl,[d("div",Al,[d("span",Ll,[c(H(ds),{src:H(e).avatar.url,size:H(e).avatar.size},null,8,["src","size"])]),d("span",Ml,p(H(cs)(H(e).display_name,30)),1)]),Il,d("div",Vl,[Dl,d("span",Bl,[c(H(Wt),{width:"18"})]),d("span",Rl,[c(H(at),{width:"18"})])])]))}},Hl=S(Ol,[["__scopeId","data-v-20175fdb"]]);const Ul={components:{SeoRevisionListItem:Hl}},Kl={class:"aioseo-seo-revisions-list"};function Gl(t,e,r,s,o,n){const g=a("seo-revision-list-item");return i(),m("div",Kl,[(i(),m(R,null,W(13,h=>c(g,{key:"seo-revision-list-item-"+h})),64))])}const Nl=S(Ul,[["render",Gl],["__scopeId","data-v-7b502c37"]]);const Fl={components:{CoreBlur:lt,CoreModalPortal:j,CoreSettingsRow:B,SeoRevisionsList:Nl,SeoRevisionsUpsell:us,SvgRightArrowShort:bt},data(){return{modalOpenSidebar:!1,strings:{button:this.$t.__("Open SEO Revisions",this.$td),description:this.$t.__("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.",this.$td),seoRevisions:this.$t.__("SEO Revisions",this.$td)}}}},zl={key:0,class:"aioseo-seo-revisions-metabox"},ql={key:1,class:"aioseo-seo-revisions-sidebar"},Wl={class:"aioseo-seo-revisions-sidebar__modal-body"},jl={class:"description"};function Yl(t,e,r,s,o,n){const g=a("seo-revisions-list"),h=a("core-blur"),f=a("seo-revisions-upsell"),y=a("core-modal-portal"),C=a("svg-right-arrow-short"),k=a("base-button"),v=a("core-settings-row");return t.$root._data.screenContext==="metabox"?(i(),m("div",zl,[c(h,null,{default:l(()=>[c(g)]),_:1}),c(f,{"parent-component-context":"metabox"})])):t.$root._data.screenContext==="sidebar"?(i(),m("div",ql,[o.modalOpenSidebar?(i(),_(y,{key:0,classes:[],onClose:e[0]||(e[0]=w=>o.modalOpenSidebar=!1)},{headerTitle:l(()=>[b(p(o.strings.seoRevisions),1)]),body:l(()=>[d("div",Wl,[c(h,null,{default:l(()=>[c(g)]),_:1}),c(f,{"parent-component-context":"modal"})])]),_:1})):u("",!0),c(v,{align:""},{name:l(()=>[b(p(o.strings.seoRevisions),1)]),description:l(()=>[d("p",jl,p(o.strings.description),1)]),content:l(()=>[c(k,{class:"gray small",onClick:e[1]||(e[1]=z(w=>o.modalOpenSidebar=!0,["stop","exact"]))},{default:l(()=>[c(C,{width:"10"}),b(" "+p(o.strings.button),1)]),_:1})]),_:1})])):u("",!0)}const Et=S(Fl,[["render",Yl],["__scopeId","data-v-0fc252e0"]]);const Zl={setup(){return{licenseStore:K()}},data(){return{license:ls}},components:{SeoRevisions:Et,SeoRevisionsLite:Et},props:{parentComponentContext:String}},Jl={class:"aioseo-seo-revisions aioseo-tab-content"};function Ql(t,e,r,s,o,n){const g=a("seo-revisions",!0),h=a("seo-revisions-lite");return i(),m("div",Jl,[!s.licenseStore.isUnlicensed&&o.license.hasCoreFeature("seo-revisions")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(i(),_(h,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Xl=S(Zl,[["render",Ql],["__scopeId","data-v-5e3c402f"]]);const tc={__name:"CountBadge",setup(t){const{itemsTotalCount:e}=xt(At()),r=Re(()=>99<e.value?"99+":e.value);return(s,o)=>H(e)?(i(),m("span",{key:0,class:x(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":s.$root._data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":s.$root._data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<H(e)}])},p(r.value),3)):u("",!0)}},ec={},sc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},oc=d("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),ic=[oc];function rc(t,e){return i(),m("svg",sc,ic)}const nc=S(ec,[["render",rc]]),ac={},lc={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},cc=d("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),dc=[cc];function uc(t,e){return i(),m("svg",lc,dc)}const pc=S(ac,[["render",uc]]),hc={},_c={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},mc=d("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),gc=[mc];function yc(t,e){return i(),m("svg",_c,gc)}const fc=S(hc,[["render",yc]]),Sc={},bc={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},vc=d("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),kc=[vc];function wc(t,e){return i(),m("svg",bc,kc)}const Cc=S(Sc,[["render",wc]]);const $c={setup(){return{licenseStore:K(),postEditorStore:T(),redirectsStore:le(),rootStore:q(),settingsStore:G()}},components:{Advanced:Ms,Alert:jt,CoreMainTabs:Q,CoreModalPortal:j,General:Qt,LinkAssistant:Wr,ModalContent:En,Redirects:Gn,Schema:Tl,SeoRevisions:Xl,SeoRevisionsCountBadge:tc,Social:Xt,SvgBackup:nc,SvgBuild:ns,SvgCaret:ht,SvgCircleInformationSolid:pc,SvgClose:Mt,SvgLinkSuggestion:vt,SvgReceipt:fc,SvgRedirectCrossedArrows:Cc,SvgSettings:zt,SvgShare:qt},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:this.$t.__("Preview Snippet Editor",this.$td)},activeMainSidebarTab:""}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){de(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(t){this.activeTab!=="general"&&this.maybeResetActiveTab(t)},"postEditorStore.currentPost.linkAssistant.modalOpen"(t){this.maybeResetActiveTab(t)},"postEditorStore.currentPost.redirects.modalOpen"(t){this.maybeResetActiveTab(t)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(t){this.$root._data.screenContext==="sidebar"&&this.activeMainSidebarTab!==t.tab&&(this.activeMainSidebarTab=t.tab,this.processChangeTab(t.tab))}}},computed:{tabs(){var e;const t=[{slug:"general",icon:"svg-settings",name:"General"},{slug:"social",icon:"svg-share",name:"Social"},{slug:"schema",icon:"svg-receipt",name:"Schema"},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:"Redirects",warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:"SEO Revisions",badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:"Advanced"}];return!this.rootStore.aioseo.integration&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&t.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:"Link Assistant"}),t},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(t=>t.slug!=="schema"&&U(this.getTabPermission(t.slug))):this.tabs.filter(t=>U(this.getTabPermission(t.slug))?!0:t.slug==="general"&&(U("aioseo_page_analysis")||U(this.getTabPermission(t.slug))))}},methods:{processChangeTab(t){switch(this.$root._data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const r=t===null?"sticky":"static";e.style.position=r});break;default:this.activeTab=t,this.settingsStore.changeTabSettings({setting:"main",value:t});break}if(this.$root._data.screenContext==="sidebar"&&this.activeTab!==t)switch(this.activeTab=t,t){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.openModal(!0));break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&this.postEditorStore.toggleLinkAssistantModal();break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&this.postEditorStore.toggleRedirectsModal();break}},maybeResetActiveTab(t){t||this.$root._data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.openModal(!1)},getTabPermission(t){const e=this.tabs.find(r=>r.slug===t);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(t){const e=this.tabs.find(r=>r.slug===t);return e==null?void 0:e.name}},mixins:[ue],created(){switch(this.modal=et()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.openModal(!0),setTimeout(()=>{ut("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",t=>{Object.keys(t).forEach(e=>{this.postEditorStore.currentPost[e]=t[e]})}),this.$root._data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=et()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{ut("aioseo-tab")},500);break}},beforeMount(){const t=document.querySelector(".interface-complementary-area__pin-unpin-item");t&&t!==null&&(t.style.display="block")},mounted(){var t,e;if(pt()&&typeof(((e=(t=window==null?void 0:window.wp)==null?void 0:t.data)==null?void 0:e.dispatch)||null)=="function"&&!this.licenseStore.isUnlicensed){const r=window.wp.data.dispatch("core/editor");this.watchObjectRevisionsOnSavePost(r)}}},Pc={class:"aioseo-app aioseo-post-settings"},Ec={key:0,class:"aioseo-sidepanel"},Tc=["onClick"],xc={class:"name"},Ac={key:0,class:"aioseo-tab-title"};function Lc(t,e,r,s,o,n){const g=a("core-main-tabs"),h=a("svg-circle-information-solid"),f=a("svg-caret"),y=a("svg-close"),C=a("alert"),k=a("modal-content"),v=a("core-modal-portal");return i(),m("div",Pc,[t.$root._data.screenContext!=="sidebar"?(i(),_(g,{key:0,tabs:n.getTabs,showSaveButton:!1,active:o.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=w=>n.processChangeTab(w))},{"var-tab-icon":l(({tab:w})=>[(i(),_(M(w.icon),{class:x([{warning:w.warning}])},null,8,["class"])),(i(),_(M(w.badge)))]),_:1},8,["tabs","active"])):u("",!0),c(st,{name:"route-fade",mode:"out-in"},{default:l(()=>[t.$root._data.screenContext==="sidebar"&&o.activeTab===null?(i(),m("div",Ec,[(i(!0),m(R,null,W(n.getTabs,(w,E)=>(i(),m("a",{key:E,class:"aioseo-sidepanel-button",href:"#",onClick:z($=>n.processChangeTab(w.slug),["prevent"])},[(i(),_(M(w.icon),{class:"icon"})),d("div",xc,p(w.name),1),(i(),_(M(w.badge))),w.warning?(i(),_(h,{key:0,width:"15",height:"15"})):u("",!0),c(f)],8,Tc))),128))])):u("",!0)]),_:1}),c(st,{name:"route-fade",mode:"out-in"},{default:l(()=>[o.activeTab?(i(),m("div",{key:o.activeTab,class:x(["aioseo-tab",{"is-page-builder":!!s.rootStore.aioseo.integration}])},[t.$root._data.screenContext==="sidebar"?(i(),m("div",Ac,[d("span",null,p(n.getTabName(o.activeTab)),1),c(y,{onClick:e[1]||(e[1]=w=>n.processChangeTab(null))})])):u("",!0),this.$root._data.screenContext==="sidebar"?(i(),_(C,{key:1})):u("",!0),(i(),_(M(o.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=w=>n.processChangeTab(w))},null,32))],2)):u("",!0)]),_:1}),s.postEditorStore.currentPost.modalOpen&&t.$root._data.screenContext==="sidebar"?(i(),_(v,{key:1,onClose:n.closeModal,classes:["aioseo-post-settings-modal"]},{headerTitle:l(()=>[b(p(o.strings.modalTitle),1)]),body:l(()=>[c(k)]),_:1},8,["onClose"])):u("",!0)])}const Mc=S($c,[["render",Lc]]);const Ic={setup(){return{postEditorStore:T()}},components:{Alert:jt,MainView:Mc},mixins:[Ne],data(){return{scrollContainer:".interface-interface-skeleton__content",scrollTimeout:1e3,ScrollAndHighlightTimeout:2e3}}};function Vc(t,e,r,s,o,n){const g=a("alert"),h=a("main-view");return i(),m("div",{onClick:e[0]||(e[0]=z(()=>{},["stop"]))},[this.$root._data.screenContext!=="sidebar"?(i(),_(g,{key:0})):u("",!0),s.postEditorStore.currentPost.id?(i(),_(h,{key:1})):u("",!0)])}const Od=S(Ic,[["render",Vc]]);export{Od as A};
Save
Cancel