OwlCyberSecurity - MANAGER
Edit File: App.DDz-QOUh.js
/* empty css */import{B as rt,b as E,f as I,a as nt,u as q,ag as st,ah as me,F as dt,C as Nt,ai as _e,L as j,a8 as X,e as z,p as fe,aj as Se,_ as ye,d as ve,o as Gt,J as be,M as tt,y as et,ak as Ft,P as zt,t as ke,k as we}from"./links.Ce9S4kjc.js";import{a as F}from"./allowed.CMMScaL-.js";import{g as ot,r as kt}from"./params.B3T1WKlC.js";import{C as U,a as ht,S as wt,f as ut,c as Ct,e as Ce,b as qt,d as St,h as $e}from"./Caret.BthVBOwE.js";import{C as R}from"./SettingsRow.BwYvQArk.js";import{B as Ee}from"./Checkbox.CmdF-nFt.js";import{G as Pe,a as Te}from"./Row.DRnp1mVs.js";import{_ as y}from"./_plugin-vue_export-helper.BN1snXvA.js";import{v as a,o as r,c as _,B as l,l as c,C as b,t as g,a as d,k as f,b as u,G as P,E as L,K as Wt,L as jt,V as xe,h as Ae,H as $t,F as V,J,m as N,T as it,q as M,u as G,f as Le}from"./runtime-dom.esm-bundler.tPRhSV4q.js";import{C as He,a as Me,S as Ie}from"./ScrollAndHighlight.BHk77_UZ.js";import{C as Q}from"./Tabs.B_xDIDmi.js";import{C as W}from"./Index.hENYR9Tl.js";import{_ as O}from"./default-i18n.DXRQgkn2.js";import{u as Yt,T as Zt}from"./TruSeoScore.DmC22Awy.js";import{S as Be,a as Oe}from"./Mobile.CAgFd5PM.js";import{M as Et}from"./MaxCounts.DHV7qSQX.js";import{S as Xt,a as De}from"./Ellipse.Bp5Bh3uu.js";import{T as Pt}from"./Tags.BawQBqR0.js";import{r as Re,o as Ve,p as Ue,q as yt,t as vt}from"./postSlug.gaB5T-wi.js";import{d as bt}from"./debounce.CMPzYXJX.js";import{V as Ke,h as Ne}from"./helpers.CXsRrhc8.js";import{t as Ot}from"./toFinite.CI1EsaWS.js";import{C as K}from"./Tooltip.DhkkBQWW.js";import{S as pt,a as Tt,f as Ge,g as Fe,h as ze,i as qe,c as We,j as je,k as Ye,m as Ze,n as Xe,o as Je,e as Qe,p as ts,q as es,r as ss,s as os,t as is,u as rs,v as ns,w as as,x as ls,y as cs,z as ds,A as hs,C as us,D as ps,E as gs}from"./index.B6JTtDta.js";import{S as xt}from"./Plus.CG1QxokA.js";import{S as gt}from"./Eye.-Y-JbPGO.js";import{B as Jt}from"./RadioToggle.CaTwJt--.js";import{C as ms}from"./GoogleSearchPreview.xL31DpGm.js";import{C as At}from"./HtmlTagsEditor.D4eMyBCg.js";import{T as _s}from"./Slide.fjAuzpC8.js";import{C as fs}from"./ProBadge.CVd2ImKm.js";import{p as Dt}from"./popup.6pJEdp0g.js";import{l as ct}from"./license.4lyTI3li.js";import{a as Qt}from"./addons.DW40jBC1.js";import{C as Lt}from"./Blur.CvHKqkVq.js";import{C as te}from"./Index.Dq9-2wXY.js";import{W as Ss}from"./WpTable.aGv2G4lv.js";import{C as ys}from"./Table.vI2Sprsc.js";import{P as vs}from"./PostTypes.Cef6XkQ_.js";import{a as ee,S as bs,b as ks,c as ws}from"./InternalOutbound.DBUIpJG6.js";import{R as Cs}from"./RequiredPlans.DXcIqsat.js";import{I as se,a as oe}from"./Image.Bxp-IcnQ.js";import{t as ie}from"./Editor.CWmTV9I5.js";import{C as $s}from"./FacebookPreview.CssUhvMf.js";import{C as re}from"./ImageUploader.CfVg675m.js";import{C as Es}from"./TwitterPreview.-rsKgfEw.js";import{S as ne}from"./Settings.C7HOxLxG.js";import{a as ae,S as Ps}from"./Build.CdwmJXt2.js";import{R as Ts}from"./Redirects.BEcd2kXK.js";import{U as xs,S as As}from"./Upsell.CS0TthV2.js";var Ls=Math.floor,Hs=Math.random;function Ms(t,e){return t+Ls(Hs()*(e-t+1))}var Is=parseFloat,Bs=Math.min,Os=Math.random;function Ds(t,e,i){if(i&&typeof i!="boolean"&&Ke(t,e,i)&&(e=i=void 0),i===void 0&&(typeof e=="boolean"?(i=e,e=void 0):typeof t=="boolean"&&(i=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=Ot(t),e===void 0?(e=t,t=0):e=Ot(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var o=Os();return Bs(t+o*(e-t+Is("1e-"+((o+"").length-1))),e)}return Ms(t,e)}const Rs={data(){return{updatingSeoRevisions:!1}},methods:{updateSeoRevisions(){if(window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()){this.updatingSeoRevisions=!0;const t=this,e=rt();setTimeout(()=>{e.fetch().finally(()=>{t.updatingSeoRevisions=!1})},2500)}},async watchObjectRevisionsOnSavePost(){await this.$nextTick(),window.wp.data.subscribe(()=>{this.updatingSeoRevisions||this.updateSeoRevisions()})}}},Vs={setup(){return{postEditorStore:E()}},components:{BaseCheckbox:Ee,GridColumn:Pe,GridRow:Te},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}}},Us={class:"aioseo-robots-meta"},Ks={key:0,class:"global-robots-settings aioseo-description"},Ns={class:"robots-meta-title"},Gs={class:"global-robots-settings-options"},Fs={key:0,class:"aioseo-description max-snippet"},zs={class:"aioseo-description max-video-preview"},qs={key:1,class:"aioseo-description max-image-preview"};function Ws(t,e,i,s,o,n){const p=a("base-toggle"),h=a("base-checkbox"),m=a("grid-column"),S=a("grid-row"),C=a("base-input"),$=a("base-select");return r(),_("div",Us,[l(p,{modelValue:s.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=k=>s.postEditorStore.currentPost.default=k),e[1]||(e[1]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),s.postEditorStore.currentPost.default?u("",!0):(r(),_("div",Ks,[d("span",Ns,g(o.strings.robotsMeta),1),l(S,{class:"settings"},{default:c(()=>[s.postEditorStore.currentPost.isHomePage?u("",!0):(r(),f(m,{key:0,xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=k=>s.postEditorStore.currentPost.noindex=k),e[3]||(e[3]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=k=>s.postEditorStore.currentPost.nofollow=k),e[5]||(e[5]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=k=>s.postEditorStore.currentPost.noarchive=k),e[7]||(e[7]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=k=>s.postEditorStore.currentPost.notranslate=k),e[9]||(e[9]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=k=>s.postEditorStore.currentPost.noimageindex=k),e[11]||(e[11]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=k=>s.postEditorStore.currentPost.nosnippet=k),e[13]||(e[13]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),l(m,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=k=>s.postEditorStore.currentPost.noodp=k),e[15]||(e[15]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[b(g(o.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),d("div",Gs,[s.postEditorStore.currentPost.nosnippet?u("",!0):(r(),_("div",Fs,[d("span",null,g(o.strings.maxSnippet),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=k=>s.postEditorStore.currentPost.maxSnippet=k),e[17]||(e[17]=k=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),d("div",zs,[d("span",null,g(o.strings.maxVideoPreview),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=k=>s.postEditorStore.currentPost.maxVideoPreview=k),e[19]||(e[19]=k=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),s.postEditorStore.currentPost.noimageindex?u("",!0):(r(),_("div",qs,[d("span",null,g(o.strings.maxImagePreview),1),l($,{size:"medium",options:n.imagePreviewOptions,modelValue:n.getImagePreview(s.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=k=>n.saveImagePreview(k.value))},null,8,["options","modelValue"])]))])]))])}const js=y(Vs,[["render",Ws]]),Ys={setup(){return{licenseStore:I(),optionsStore:nt(),postEditorStore:E()}},components:{CoreAlert:U,CoreSettingsRow:R,CoreSingleRobotsMeta:js},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.__("Priority Score is a %1$s feature. %2$s",this.$td),"PRO",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 t=t!=="default"?parseFloat(t):t,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}}},Zs={class:"aioseo-tab-content aioseo-post-advanced"},Xs={class:"selectbox-row"},Js={class:"select"},Qs=d("div",{class:"separator"},[d("span"),b(" - ")],-1),to={class:"select"},eo=["innerHTML"];function so(t,e,i,s,o,n){const p=a("core-single-robots-meta"),h=a("core-settings-row"),m=a("base-input"),S=a("base-select"),C=a("core-alert");return r(),_("div",Zs,[l(h,{id:"aioseo-post-robots-setting",name:o.strings.robotsSetting,align:""},{content:c(()=>[l(p)]),_:1},8,["name"]),l(h,{id:"aioseo-post-canonical-url",name:o.strings.canonicalUrl,align:""},{content:c(()=>[l(m,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=$=>s.postEditorStore.currentPost.canonicalUrl=$),e[1]||(e[1]=$=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),l(h,{name:o.strings.priorityScore,align:""},{content:c(()=>[d("div",Xs,[d("div",Js,[d("span",null,g(o.strings.priority),1),l(S,{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]=$=>s.licenseStore.isUnlicensed?null:n.savePriority($.value))},null,8,["disabled","options","modelValue"])]),Qs,d("div",to,[d("span",null,g(o.strings.frequency),1),l(S,{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]=$=>s.licenseStore.isUnlicensed?null:n.saveFrequency($.value))},null,8,["disabled","options","modelValue"])])]),s.licenseStore.isUnlicensed?(r(),f(C,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[d("div",{innerHTML:o.strings.priorityFrequencyUpsell},null,8,eo)]),_:1})):u("",!0)]),_:1},8,["name"]),s.optionsStore.options.searchAppearance.advanced.useKeywords?(r(),f(h,{key:0,name:o.strings.keywords,align:""},{content:c(()=>[l(S,{multiple:"",taggable:"",options:s.postEditorStore.currentPost.keywords||[],modelValue:s.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=$=>s.postEditorStore.currentPost.keywords=$),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):u("",!0)])}const oo=y(Ys,[["render",so]]),io={setup(){return{licenseStore:I(),rootStore:q()}},components:{CoreApiBar:He,CoreLicenseKeyBar:Me}};function ro(t,e,i,s,o,n){const p=a("core-api-bar"),h=a("core-license-key-bar");return r(),_("div",null,[s.rootStore.pong?u("",!0):(r(),f(p,{key:0})),t.$isPro&&s.licenseStore.isUnlicensed&&s.rootStore.pong?(r(),f(h,{key:1})):u("",!0)])}const le=y(io,[["render",ro]]),no={setup(){return{truSeoHighlighterStore:st()}},emits:["next","previous"],components:{SvgEllipse:Xt,SvgCaret:ht,SvgClose:wt},data(){return{error:this.truSeoHighlighterStore.highlightAnalyzerHasError,order:this.truSeoHighlighterStore.highlightMarks.findIndex(t=>t.active)+1,total:this.truSeoHighlighterStore.highlightMarks.length}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},ao=t=>(Wt("data-v-966cf3f9"),t=t(),jt(),t),lo={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},co={class:"tru-seo-highlight-popover__count"},ho=ao(()=>d("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),uo={class:"tru-seo-highlight-popover__nav"},po=["disabled"],go=["disabled"],mo={class:"tru-seo-highlight-popover__close"};function _o(t,e,i,s,o,n){const p=a("svg-ellipse"),h=a("svg-caret"),m=a("svg-close");return r(),_("div",lo,[d("div",{class:P(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":o.error}])},[l(p,{width:"8"})],2),d("div",co,[d("span",null,g(o.order)+"/"+g(o.total),1)]),ho,d("div",uo,[d("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:o.order===1,onClick:e[0]||(e[0]=L(S=>t.$emit("previous"),["stop","exact"]))},[l(h,{width:"20"})],8,po),d("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:o.order===o.total,onClick:e[1]||(e[1]=L(S=>t.$emit("next"),["stop","exact"]))},[l(h,{width:"20"})],8,go)]),d("div",mo,[d("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=L((...S)=>n.close&&n.close(...S),["stop","exact"]))},[l(m,{width:"10"})],32)])])}const fo=y(no,[["render",_o],["__scopeId","data-v-966cf3f9"]]),So={setup(){return{truSeoHighlighterStore:st()}},computed:{...me(st)},data(){var t,e,i,s;return{editorObserver:null,editorWrapperRect:{},isBlockEditor:dt(),isClassicEditor:Nt(),tinymceEditor:null,selectBlockEditor:(e=(t=window==null?void 0:window.wp)==null?void 0:t.data)==null?void 0:e.select("core/block-editor"),selectEditPost:(s=(i=window==null?void 0:window.wp)==null?void 0:i.data)==null?void 0:s.select("core/edit-post")}},methods:{annotateBlock(t){var i,s,o,n,p,h;let e="content";(s=(i=t.block)==null?void 0:i.attributes)!=null&&s.caption?e="caption":(n=(o=t.block)==null?void 0:o.attributes)!=null&&n.value?e="value":(h=(p=t.block)==null?void 0:p.attributes)!=null&&h.citation&&(e="citation"),this.truSeoHighlighterStore.dispatchAnnotations.__experimentalAddAnnotation({id:t.id,range:t.range,source:this.truSeoHighlighterStore.source,blockClientId:t.block.clientId,richTextIdentifier:e})},annotateTinyMce(t,e){if(!e)return!1;!e.hasFocus()&&this.isBlockEditor&&e.focus();let i=e.selection.win.getSelection();i.selectAllChildren(t.parent);const s=i.toString().length;if(t.range.end<s)for(let o=t.range.end;o<s;o++)i.modify("extend","backward","character");if(0<t.range.start){i=Re(i);for(let o=t.range.start;0<o;o--)i.modify("extend","forward","character")}e.undoManager.ignore(()=>{e.annotator.annotate(this.truSeoHighlighterStore.source,{uid:t.id})}),i.empty()},appendHighlightPopover(){if(this.truSeoHighlighterStore.clearHighlightPopover(),this.truSeoHighlighterStore.sanitizeHighlightMarks(),!this.truSeoHighlighterStore.activeMark)return!1;const t=this,e=xe({name:"TruSeoHighlightPopover",render(){return Ae(fo,{onNext(){t.incrementActiveMark(1)},onPrevious(){t.incrementActiveMark(-1)}})}}),i=Ve(),s=new ResizeObserver(bt(this.repositionHighlightPopover,750)),o=this.getEditorNode("wrapper");if(!o)return!1;o.parentElement.appendChild(i),e.mount(i),s.observe(this.getEditorNode("wrapper"),{box:"border-box"}),this.truSeoHighlighterStore.highlightPopover.app=e,this.truSeoHighlighterStore.highlightPopover.node=i,this.truSeoHighlighterStore.highlightPopover.observer=s,this.repositionHighlightPopover()},disallowHighlighting(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),this.truSeoHighlighterStore.allowHighlighting=!1},formatBlockContent({block:t,node:e}){var s,o,n,p;let i="";return e?i=e.outerText.replace(/\n\n/g,` `):t&&(i=((s=t==null?void 0:t.attributes)==null?void 0:s.content)||((o=t==null?void 0:t.attributes)==null?void 0:o.caption)||((n=t==null?void 0:t.attributes)==null?void 0:n.value)||((p=t==null?void 0:t.attributes)==null?void 0:p.citation)||"",i=i.replace(/<br[^>]*>/gi,` `),i=_e(i)),Ue(i)},getEditorNode(t){var e;if(t==="closest-relative")return yt({element:this.getEditorNode("wrapper").parentElement,property:"position",value:"relative"});if(t==="navigable")return yt({element:this.getEditorNode("wrapper").parentElement,property:"overflow-y",value:"auto"});if(this.isClassicEditor){if(t==="wrapper")return document.getElementById("content_ifr");if(t==="first-block")return((e=this.tinymceEditor.getBody())==null?void 0:e.firstElementChild)||{}}if(this.isBlockEditor){if(t==="wrapper")return document.querySelector(".editor-styles-wrapper");if(t==="first-block"){const i=this.selectBlockEditor.getBlocks()[0];return document.getElementById(`block-${i==null?void 0:i.clientId}`)||{}}}},highlightBlockEditor(){var t;for(const e of this.selectBlockEditor.getBlocks()||[]){if(e.name==="core/freeform"){const i=window.tinymce.get(`editor-${e.clientId}`),s=((t=i.getBody())==null?void 0:t.children)||[];if(!s.length)continue;this.registerTinyMceAnnotator(i);for(const o of s)this.setHighlightMarks({block:e,node:o});continue}this.setHighlightMarks({block:e,node:null})}for(const[e,i]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(i.parent,parseInt(e)===this.truSeoHighlighterStore.highlightMarks.length-1),i.block.name==="core/freeform"?this.annotateTinyMce(i,window.tinymce.get(`editor-${i.block.clientId}`)):this.annotateBlock(i)},highlightClassicEditor(){var e;const t=((e=this.tinymceEditor.getBody())==null?void 0:e.children)||[];if(!t.length)return!1;this.registerTinyMceAnnotator(this.tinymceEditor);for(const i of t)this.setHighlightMarks({block:null,node:i});for(const[i,s]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(s.parent,parseInt(i)===this.truSeoHighlighterStore.highlightMarks.length-1),this.annotateTinyMce(s,this.tinymceEditor)},incrementActiveMark(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>i.active);if(!this.truSeoHighlighterStore.highlightMarks[e+t])return!1;this.truSeoHighlighterStore.allowScrolling=!0,this.truSeoHighlighterStore.highlightMarks[e].active=!1,this.truSeoHighlighterStore.highlightMarks[e+t].active=!0,this.appendHighlightPopover()},listenWindowCopy(t){var n,p;const e=()=>{t.preventDefault(),t.clipboardData.setData("text/html",window.getSelection().toString())},i=window.getSelection()||{};if(!(i!=null&&i.rangeCount))return!1;const s=((n=t.clipboardData)==null?void 0:n.getData("text/html"))||"";if(s&&s.indexOf(this.truSeoHighlighterStore.source)!==-1)return e(),!1;const o=i.getRangeAt(0)||{};for(const h of Object.values(((p=o==null?void 0:o.cloneContents())==null?void 0:p.children)||[]))if(Object.values((h==null?void 0:h.classList)||[]).some(m=>m.endsWith(this.truSeoHighlighterStore.source)))return e(),!1},listenWindowKeyup(t){var n,p;const e=(h,m)=>{h.collapse(m.firstChild,m.firstChild.length),h.deleteFromDocument()};if(["Delete","Backspace"].indexOf(t.key)===-1)return!1;const i=window.getSelection()||null;if(!(i!=null&&i.toString()))return!1;const s=((n=i==null?void 0:i.anchorNode)==null?void 0:n.parentElement)||null,o=((p=i==null?void 0:i.anchorNode)==null?void 0:p.nextElementSibling)||null;Object.values((s==null?void 0:s.classList)||[]).some(h=>h.endsWith(this.truSeoHighlighterStore.source))?e(i,s):Object.values((o==null?void 0:o.classList)||[]).some(h=>h.endsWith(this.truSeoHighlighterStore.source))&&e(i,o)},observeEditor(){var e;this.editorObserver=new MutationObserver(i=>{let s=!1;for(const o of i)for(const n of(o==null?void 0:o.removedNodes)||[])(this.truSeoHighlighterStore.highlightMarks.some(p=>n.isEqualNode(p.parent))||Object.values((n==null?void 0:n.classList)||[]).some(p=>p.endsWith(this.truSeoHighlighterStore.source)))&&(s=!0);s&&this.reset()});const t=(e=this.getEditorNode("first-block"))==null?void 0:e.parentElement;if(typeof t!="object")return!1;this.editorObserver.observe(t,{attributes:!1,childList:!0,subtree:!0})},observeMarkParent(t,e=!1){const i=(o,n)=>{var p;n.disconnect();for(const h of o){if(Object.values(((p=h==null?void 0:h.target)==null?void 0:p.classList)||[]).some(m=>m.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(h.target);continue}for(const m of(h==null?void 0:h.addedNodes)||[])if(Object.values((m==null?void 0:m.classList)||[]).some(S=>S.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(m);break}}e&&this.$nextTick().then(()=>bt(this.appendHighlightPopover,250)())};if(typeof(t==null?void 0:t.parentElement)!="object")return!1;new MutationObserver(i).observe(t,{attributes:!0,childList:!0,subtree:!0})},observeWpBodyContent(){const t=e=>{var i,s,o;for(const n of e){if((n==null?void 0:n.type)!=="attributes")continue;if(!yt({element:(i=this.getEditorNode("wrapper"))==null?void 0:i.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement))return this.disallowHighlighting(),!1;if(this.isBlockEditor&&(this.selectEditPost.getEditorMode()!=="visual"||this.selectBlockEditor.getBlockMode((s=this.selectBlockEditor.getSelectedBlock())==null?void 0:s.clientId)==="html"))return this.disallowHighlighting(),!1;if(this.isClassicEditor&&(this.setTinymceEditor(),((o=document.getElementById("content"))==null?void 0:o.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return this.disallowHighlighting(),!1;this.truSeoHighlighterStore.allowHighlighting=!0}};this.wpBodyContentObserver=new MutationObserver(bt(t,250)),this.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},registerTinyMceAnnotator(t){t.annotator.register(this.truSeoHighlighterStore.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${this.truSeoHighlighterStore.source}`]})})},repositionHighlightPopover(t=[]){var S;if(!this.truSeoHighlighterStore.activeMark||!this.truSeoHighlighterStore.highlightPopover.node)return!1;for(const C of t)if(JSON.stringify(C.contentRect)===JSON.stringify(this.editorWrapperRect))return!1;t.length&&(this.editorWrapperRect=((S=t[0])==null?void 0:S.contentRect)||this.editorWrapperRect,this.truSeoHighlighterStore.allowScrolling=!1);const e=this.truSeoHighlighterStore.activeMark.node.getBoundingClientRect(),i=this.getEditorNode("wrapper").getBoundingClientRect(),s=this.getEditorNode("closest-relative").getBoundingClientRect(),o=this.getEditorNode("first-block").getBoundingClientRect(),[n,p]=[140,32];let h=e.top,m=o.left-s.left;n<m?(this.truSeoHighlighterStore.highlightPopover.node.style.top=h-s.top+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(-105%, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(h=h-p-s.top,h=this.isClassicEditor?h+i.top:h,m=this.isClassicEditor?m+i.left:m,this.truSeoHighlighterStore.highlightPopover.node.style.top=h+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(0, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),this.truSeoHighlighterStore.highlightPopover.node.style.left=m+"px",this.scrollToHighlightMark()},reset(){var t;window.removeEventListener("copy",this.listenWindowCopy),window.removeEventListener("keyup",this.listenWindowKeyup),(t=this.editorObserver)==null||t.disconnect(),this.truSeoHighlighterStore.clearAll(),this.$nextTick().then(()=>{if(!this.truSeoHighlighterStore.highlightSentences)return this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),!1;this.isBlockEditor&&this.highlightBlockEditor(),this.isClassicEditor&&this.highlightClassicEditor(),this.observeEditor(),window.addEventListener("copy",this.listenWindowCopy),window.addEventListener("keyup",this.listenWindowKeyup)})},scrollToHighlightMark(){this.$nextTick().then(()=>{var i,s,o,n;if(!this.truSeoHighlighterStore.allowScrolling)return!1;this.truSeoHighlighterStore.activeMark.node.scrollIntoView();let t=this.getEditorNode("navigable"),e=t.scrollTop-60;this.isClassicEditor&&(e-=((s=(i=document.querySelector("#wp-content-editor-tools"))==null?void 0:i.getBoundingClientRect())==null?void 0:s.height)||0,e-=((n=(o=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:o.getBoundingClientRect())==null?void 0:n.height)||0),t.isEqualNode(document.documentElement)&&(t=window),t.scrollTo({top:e}),this.truSeoHighlighterStore.allowScrolling=!1})},setHighlightMarkNode(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>t.hasAttribute("data-mce-annotation-uid")?t.dataset.mceAnnotationUid.indexOf(i.id)!==-1:t.id.indexOf(i.id)!==-1);e!==-1&&(this.truSeoHighlighterStore.highlightMarks[e].node=t,t.style.backgroundColor="#cce0ff")},setHighlightMarks({block:t,node:e}){const i=this.formatBlockContent({block:t,node:e});if(i)for(const[s,o]of Object.entries(this.truSeoHighlighterStore.highlightSentences||{})){const n=new RegExp(j(o),"g");let p;for(;(p=n.exec(i))!==null&&!this.truSeoHighlighterStore.highlightMarks.find(S=>S.sentenceIndex===s);){const h={start:p.index,end:p.index+p[0].length||1};this.truSeoHighlighterStore.highlightMarks.find(S=>e?(S.range.start===h.start||S.range.end===h.end)&&S.parent.isEqualNode(e):(S.range.start===h.start||S.range.end===h.end)&&S.block.clientId===t.clientId)||this.truSeoHighlighterStore.highlightMarks.push({id:Ds(1,999999999),range:h,block:t,parent:e||document.getElementById(`block-${t.clientId}`),node:null,active:this.truSeoHighlighterStore.highlightMarks.length===0,sentenceIndex:s})}}if(t)for(const s of(t==null?void 0:t.innerBlocks)||[])this.setHighlightMarks({block:s,node:null})},setTinymceEditor(){if(this.tinymceEditor)return!1;const t=window.setInterval(()=>{var e;if(this.tinymceEditor=((e=window==null?void 0:window.tinymce)==null?void 0:e.get("content"))||null,!this.tinymceEditor)return!1;window.clearInterval(t),this.tinymceEditor.dom.addStyle(` span.annotation-text.annotation-text-${this.truSeoHighlighterStore.source} { background-color: #CCE0FF; border-radius: 4px; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},watchHighlightSentences(t,e){const i=JSON.stringify(t),s=JSON.stringify(e);i!==s&&this.reset()}},beforeMount(){if((X()||!this.isBlockEditor&&!this.isClassicEditor)&&(this.truSeoHighlighterStore.enabled=!1),this.isBlockEditor&&(!this.truSeoHighlighterStore.dispatchAnnotations||!this.selectBlockEditor||!this.selectEditPost)&&(this.truSeoHighlighterStore.enabled=!1),!this.truSeoHighlighterStore.enabled)return!1},mounted(){var e;this.wpBodyContentObserver&&((e=this.wpBodyContentObserver)==null||e.disconnect());const t=window.setInterval(()=>{typeof this.getEditorNode("wrapper")=="object"&&(window.clearInterval(t),this.observeWpBodyContent())},1e3)}},yo={emits:["selectedKeyphrase","deleted","saved"],components:{CoreTooltip:K,SvgPencil:ut,SvgTrash:pt},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){var s;const e=(s=t.target)==null?void 0:s.value.trim(),i=this.index;e?(this.edit=!1,this.$emit("saved",{index:i,value:e})):this.deleteKeyphraseEv(i)},pressEnter(t){t.preventDefault(),t.target.blur(),this.edit=!1}}},vo={class:"aioseo-keyphrase-tag"},bo={key:0,class:"aioseo-edit-keyphrase-tag"},ko=["value"];function wo(t,e,i,s,o,n){const p=a("svg-pencil"),h=a("svg-trash"),m=a("core-tooltip");return r(),_("div",vo,[d("span",{class:P(["aioseo-add-keyphrase-tag",o.edit?"hidden":""])},[d("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=S=>n.toggleKeyphrasesPanel(i.index))},g(i.keyphrase),1),d("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=S=>n.editKeyphraseEv(i.index))},[l(p)]),d("span",{class:P(["keyphrase-score",n.scoreClass]),onClick:e[2]||(e[2]=S=>n.toggleKeyphrasesPanel(i.index))},g(i.score)+"/100",3)],2),o.edit?(r(),_("span",bo,[d("input",{value:i.keyphrase,onBlur:e[3]||(e[3]=(...S)=>n.closeEdit&&n.closeEdit(...S)),onKeydown:e[4]||(e[4]=$t((...S)=>n.pressEnter&&n.pressEnter(...S),["enter"]))},null,40,ko),d("span",{class:"keyphrase-delete",onClick:e[5]||(e[5]=S=>n.deleteKeyphraseEv(i.index))},[l(m,{type:"action"},{tooltip:c(()=>[b(g(o.strings.delete),1)]),default:c(()=>[l(h)]),_:1})])])):u("",!0)])}const ce=y(yo,[["render",wo]]),Co={},$o={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Eo=d("path",{d:"M8.0018 8.57162C8.78938 8.57162 9.45817 8.29596 10.0082 7.74465C10.5582 7.19335 10.8332 6.5239 10.8332 5.73632C10.8332 4.94874 10.5575 4.27995 10.0062 3.72995C9.4549 3.17995 8.78546 2.90495 7.99787 2.90495C7.21029 2.90495 6.5415 3.1806 5.9915 3.73191C5.4415 4.28322 5.1665 4.95266 5.1665 5.74025C5.1665 6.52783 5.44216 7.19661 5.99347 7.74661C6.54477 8.29662 7.21422 8.57162 8.0018 8.57162ZM7.99592 7.60495C7.47631 7.60495 7.03595 7.42309 6.67484 7.05937C6.31373 6.69563 6.13317 6.25396 6.13317 5.73436C6.13317 5.21475 6.31503 4.77439 6.67875 4.41328C7.04249 4.05217 7.48415 3.87161 8.00375 3.87161C8.52337 3.87161 8.96373 4.05348 9.32484 4.4172C9.68595 4.78093 9.8665 5.2226 9.8665 5.7422C9.8665 6.26181 9.68464 6.70217 9.32092 7.06328C8.95719 7.42439 8.51552 7.60495 7.99592 7.60495ZM7.99984 10.7383C6.37762 10.7383 4.91095 10.2772 3.59984 9.35495C2.28873 8.43273 1.31095 7.22717 0.666504 5.73828C1.31095 4.24939 2.28873 3.04384 3.59984 2.12161C4.91095 1.19939 6.37762 0.738281 7.99984 0.738281C9.62206 0.738281 11.0887 1.19939 12.3998 2.12161C13.7109 3.04384 14.6887 4.24939 15.3332 5.73828C14.6887 7.22717 13.7109 8.43273 12.3998 9.35495C11.0887 10.2772 9.62206 10.7383 7.99984 10.7383Z",fill:"currentColor"},null,-1),Po=[Eo];function To(t,e){return r(),_("svg",$o,Po)}const xo=y(Co,[["render",To]]),Ao={setup(){return{truSeoHighlighterStore:st()}},components:{CoreTooltip:K,SvgEye:gt,SvgEyeFilled:xo},props:{analyzer:String},data(){return{strings:{highlightSections:this.$t.__("Highlight sections in the Editor",this.$td),highlightingIsDisabled:this.$t.__("Highlighting is disabled for current view",this.$td)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Lo=["disabled"];function Ho(t,e,i,s,o,n){const p=a("svg-eye"),h=a("core-tooltip"),m=a("svg-eye-filled");return s.truSeoHighlighterStore.enabled?(r(),_("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!s.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=L(S=>n.onClickBtnToggleHighlighter(),["stop","exact"]))},[s.truSeoHighlighterStore.highlightAnalyzer!==i.analyzer?(r(),f(h,{key:0,offset:t.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:c(()=>[b(g(s.truSeoHighlighterStore.allowHighlighting?o.strings.highlightSections:o.strings.highlightingIsDisabled),1)]),default:c(()=>[l(p,{width:"16",height:"16"})]),_:1},8,["offset"])):(r(),f(m,{key:1,width:"16",height:"16"}))],8,Lo)):u("",!0)}const Mo=y(Ao,[["render",Ho]]),Io={components:{SvgCaret:ht,SvgCircleCheck:Ct,SvgCircleClose:Ce,TruSeoToggleHighlighter:Mo},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")}}},Bo={class:"aioseo-analysis-detail"},Oo={key:0},Do={class:"title__text"},Ro={class:"description"};function Vo(t,e,i,s,o,n){const p=a("svg-circle-check"),h=a("svg-circle-close"),m=a("tru-seo-toggle-highlighter"),S=a("svg-caret");return r(),_("ul",Bo,[(r(!0),_(V,null,J(i.analysisItems,(C,$)=>{var k;return r(),_(V,{key:$},[C.title?(r(),_("li",Oo,[d("p",{class:P(["title",C.error===0?"toggled":""])},[C.error===0?(r(),f(p,{key:0,width:"16"})):u("",!0),C.error===1?(r(),f(h,{key:1,width:"16"})):u("",!0),d("span",Do,g(C.title),1),(k=C==null?void 0:C.highlightSentences)!=null&&k.length?(r(),f(m,{key:2,analyzer:$},null,8,["analyzer"])):u("",!0),l(S,{width:"16",role:"button",onClick:L(n.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),d("p",Ro,g(C.description),1)])):u("",!0)],64)}),128))])}const mt=y(Io,[["render",Vo]]),Uo={setup(){return{licenseStore:I(),postEditorStore:E()}},components:{CoreAlert:U,CoreKeyphrase:ce,CoreLoader:qt,SvgCirclePlus:xt,metaboxAnalysisDetail:mt},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.__("Additional Keyphrases are a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings",this.$constants.GLOBAL_STRINGS.learnMore,"additional-keywords",!0))}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(t){this.selectedKeyphrase=t},onSaved(t){const{index:e,value:i}=t;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=i,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 i;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,(i=n[o])==null||i.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})}}},Ko={class:"additional-keyphrases-panel"},No={key:0},Go={class:"analysis-wrapper"},Fo={class:"aioseo-description additional-keyphrases-description"},zo=["innerHTML"];function qo(t,e,i,s,o,n){const p=a("core-keyphrase"),h=a("core-loader"),m=a("metaboxAnalysisDetail"),S=a("base-input"),C=a("svg-circle-plus"),$=a("base-button"),k=a("core-alert");return r(),_("div",Ko,[s.postEditorStore.currentPost.keyphrases.additional&&s.postEditorStore.currentPost.keyphrases.additional.length&&t.$isPro&&s.licenseStore.license.isActive?(r(),_("div",No,[(r(!0),_(V,null,J(s.postEditorStore.currentPost.keyphrases.additional,(v,w)=>(r(),f(p,{key:w,index:w,keyphrase:v.keyphrase,score:v.score,onSaved:n.onSaved,onDeleted:n.onDeleted,onSelectedKeyphrase:n.onSelectedKeyphrase,class:P(["aioseo-keyphrase-tag additional-keyphrase",o.selectedKeyphrase===w?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),d("div",Go,[s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(r(),f(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?(r(),f(m,{key:1,analysisItems:s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].analysis},null,8,["analysisItems"])):u("",!0)])])):u("",!0),t.$isPro&&s.licenseStore.license.isActive?(r(),f(S,{key:1,size:"medium",class:P(`add-keyphrase-${this.$root.$data.screenContext}-input`),onKeydown:$t(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):u("",!0),t.$isPro&&s.licenseStore.license.isActive?(r(),f($,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:c(()=>[l(C,{width:"14",height:"14"}),b(" "+g(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):u("",!0),!t.$isPro||!s.licenseStore.license.isActive?(r(),_(V,{key:3},[d("div",Fo,g(o.strings.keyphraseDocumentation),1),l(k,{class:"inline-upsell",type:"blue"},{default:c(()=>[d("div",{innerHTML:o.strings.upsell},null,8,zo)]),_:1})],64)):u("",!0)])}const Wo=y(Uo,[["render",qo],["__scopeId","data-v-e5c5ea64"]]),jo=""+window.__aioseoDynamicImportPreload__("images/open-ai.Du2ac8yQ.png"),Yo={setup(){return{getAssetUrl:Ne,settingsStore:z()}},components:{CoreModal:W},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:jo,strings:{upgradeToPro:this.$t.__("Unlock AI Generator",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 %1$s",this.$td),this.$t.__("Title",this.$td)):this.$t.sprintf(this.$t.__("Generate New SEO %1$s",this.$td),this.$t.__("Description",this.$td))},ctaHeaderTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generating SEO %1$s is a Pro Feature",this.$td),this.$t.__("Titles",this.$td)):this.$t.sprintf(this.$t.__("Generating SEO %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))}}},Zo={class:"cta"},Xo=["src"],Jo={class:"bottom"},Qo={class:"title"},ti=["innerHTML"];function ei(t,e,i,s,o,n){const p=a("base-button"),h=a("core-modal");return r(),f(h,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=m=>s.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:c(()=>[b(g(n.headerTitle),1)]),body:c(()=>[d("div",Zo,[d("img",{src:s.getAssetUrl(o.OpenAiImage),alt:"open-ai-upsell"},null,8,Xo),d("div",Jo,[d("div",null,[d("p",Qo,g(n.ctaHeaderTitle),1),d("p",null,g(n.ctaDescription),1)]),d("div",null,[l(p,{type:"green",size:"medium",tag:"a",href:t.$links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:c(()=>[b(g(o.strings.upgradeToPro),1)]),_:1},8,["href"]),d("span",{innerHTML:o.strings.learnMoreLink},null,8,ti)])])])]),_:1})}const si=y(Yo,[["render",ei]]),oi={},ii={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},ri=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),ni=[ri];function ai(t,e){return r(),_("svg",ii,ni)}const li=y(oi,[["render",ai]]),ci={setup(){return{settingsStore:z()}},components:{AiModal:si,CoreTooltip:K,SvgAiRobot:li},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:this.$t.__("Use AI Generator",this.$td)}}}},di={class:"aioseo-ai-generator"};function hi(t,e,i,s,o,n){const p=a("svg-ai-robot"),h=a("core-tooltip"),m=a("ai-modal");return r(),_("div",di,[l(h,{type:"action",offset:"-30px,0"},{tooltip:c(()=>[b(g(o.strings.useAiGenerator),1)]),default:c(()=>[d("button",{type:"button",onClick:e[1]||(e[1]=S=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))},[l(p,{onClick:e[0]||(e[0]=S=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))})])]),_:1}),l(m,{show:s.settingsStore.modals.aiGenerator===i.type,type:i.type},null,8,["show","type"])])}const ui=y(ci,[["render",hi]]),pi={setup(){const{strings:t}=Yt();return{settingsStore:z(),strings:t}},components:{CoreTooltip:K,SvgCaret:ht,SvgCircleCheck:Ct,SvgCircleQuestionMark:Tt,SvgEllipse:Xt,TransitionSlide:_s},mixins:[Zt],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)}},gi={class:"aioseo-card aioseo-sidebar-card"},mi={class:"text"},_i={key:0,class:"content"},fi={key:1,class:"content"};function Si(t,e,i,s,o,n){const p=a("svg-ellipse"),h=a("svg-circle-check"),m=a("svg-circle-question-mark"),S=a("core-tooltip"),C=a("svg-caret"),$=a("transition-slide");return r(),_("div",gi,[i.hideHeader?u("",!0):(r(),_("div",{key:0,class:"header",onClick:e[0]||(e[0]=k=>s.settingsStore.toggleCard({slug:i.slug,shouldSave:i.saveToggleStatus}))},[d("div",mi,[N(t.$slots,"header",{},()=>[b(g(i.headerText),1)]),i.focusScore>=0?N(t.$slots,"alt",{key:0},()=>[i.focusScore!==null?(r(),_("span",{key:0,class:P(["card-score",t.getScoreClass(i.focusScore)])},g(i.focusScore)+"/100 ",3)):u("",!0)]):u("",!0),i.trueSeoScore>=0?N(t.$slots,"alt",{key:1},()=>[d("span",{class:P(["card-score",t.getErrorClass(i.trueSeoScore)])},[0<i.trueSeoScore?(r(),f(p,{key:0,width:"6"})):u("",!0),i.trueSeoScore===0?(r(),f(h,{key:1,width:"12"})):u("",!0),b(" "+g(t.getErrorDisplay(i.trueSeoScore)),1)],2)]):u("",!0),t.$slots.tooltip?(r(),f(S,{key:2},{tooltip:c(()=>[N(t.$slots,"tooltip")]),default:c(()=>[l(m)]),_:3})):u("",!0)]),i.toggles&&s.settingsStore.settings.toggledCards?(r(),f(C,{key:0,class:P({rotated:!s.settingsStore.settings.toggledCards[i.slug]})},null,8,["class"])):u("",!0)])),s.settingsStore.settings.toggledCards||i.noSlide?(r(),f($,{key:1,active:s.settingsStore.settings.toggledCards[i.slug]&&i.toggles||i.noSlide},{default:c(()=>[t.$slots["before-tabs"]?(r(),_("div",_i,[N(t.$slots,"before-tabs")])):u("",!0),N(t.$slots,"tabs"),t.$slots.default?(r(),_("div",fi,[N(t.$slots,"default")])):u("",!0)]),_:3},8,["active"])):u("",!0)])}const yi=y(pi,[["render",Si]]),vi={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)),i=this.height-this.strokeWidth,s=this.data.map(o=>{const n=o.x===0?0:o.x/t,p=o.y===0?0:o.y/e,h=n*this.width,m=i-p*i+this.strokeWidth;return`${h},${m}`}).join(" ");return`0,${i+this.strokeWidth} `+s+` ${this.width},${i+this.strokeWidth}`}}},bi=["width","height","viewBox"],ki=["fill","points"],wi=["stroke","strokeWidth","points"];function Ci(t,e,i,s,o,n){return r(),_("svg",{width:i.width,height:i.height,viewBox:n.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[d("polygon",{fill:i.fillColor,points:n.polylinePoints},null,8,ki),d("polyline",{fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:n.polylinePoints},null,8,wi)],8,bi)}const $i=y(vi,[["render",Ci]]),Ei={},Pi={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},Ti=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),xi=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),Ai=[Ti,xi];function Li(t,e){return r(),_("svg",Pi,Ai)}const Hi=y(Ei,[["render",Li]]),Mi={setup(){return{connectStore:fe(),licenseStore:I(),optionsStore:nt(),postEditorStore:E(),rootStore:q(),semrushStore:Se()}},components:{CoreAlert:U,CoreKeyphrase:ce,CoreLoader:qt,CoreModal:W,CoreTooltip:K,SvgAreaChart:$i,SvgCircleCheck:Ct,SvgCirclePlus:xt,SvgLogoSemrush:Hi,SvgTrash:pt,metaboxAnalysisDetail:mt},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((i,s)=>({x:s,y:parseFloat(i)}))},openConnectPopup(t){Dt(t,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(t){Dt(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,i){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",i,!1);let p={};try{const h=new URL(s.url);p=ot(h.search)}catch{}this.completedCallback(p).then(()=>{e.close(),e=null,this.closedCallback(!0)})}s.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",i,!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="",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"),i=e==null?void 0:e.value.trim();i&&(this.postEditorStore.currentPost.keyphrases.focus={keyphrase:i,score:0,analysis:{}},this.postEditorStore.currentPost.loading.focus=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}))},hasAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(i=>i.keyphrase.toLowerCase()===t).length},getAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(i=>i.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:i}=this.postEditorStore.currentPost.keyphrases,s=i.push({keyphrase:t,score:0}),o=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=i,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,i=e.findIndex(s=>s.keyphrase.toLowerCase()===t);if(i!==-1){const s=document.getElementsByClassName("keyphrase-name");s[i+1]&&s[i+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(t,e){this.removingAdditionalKeyphrase=e;const{additional:i}=this.postEditorStore.currentPost.keyphrases,s=i.findIndex(o=>o.keyphrase.toLowerCase()===t);if(s!==-1){i.splice(s,1),this.postEditorStore.currentPost.keyphrases.additional=i;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())}},Ii={class:"aioseo-focus-keyphrase-panel"},Bi={class:"disabled-button gray medium"},Oi={class:"disabled-button gray"},Di=["innerHTML"],Ri={class:"aioseo-modal-content has-padding"},Vi={class:"aioseo-settings-row"},Ui={class:"settings-name"},Ki={class:"name"},Ni={class:"results"},Gi={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Fi={class:"keyphrases-header"},zi={class:"keyphrase"},qi={class:"keyphrase-volume"},Wi={class:"keyphrase-trend"},ji={key:0,class:"keyphrase-actions"},Yi={class:"keyphrases-rows"},Zi={class:"keyphrase"},Xi={class:"keyphrase-volume"},Ji={class:"keyphrase-trend"},Qi={key:0,class:"keyphrase-actions"},tr={key:0,class:"focus-keyphrase"},er={key:1},sr={key:1,class:"remove-keyphrase"},or=["onClick"],ir={key:1,class:"keyphrase-row"},rr=["colspan"],nr={key:1},ar={class:"semrush-logo"},lr={class:"semrush-upsell"},cr=["innerHTML"],dr=["innerHTML"];function hr(t,e,i,s,o,n){const p=a("base-input"),h=a("svg-circle-plus"),m=a("base-button"),S=a("core-tooltip"),C=a("core-keyphrase"),$=a("core-loader"),k=a("metaboxAnalysisDetail"),v=a("core-alert"),w=a("base-select"),B=a("svg-area-chart"),A=a("svg-circle-check"),Y=a("svg-trash"),_t=a("svg-logo-semrush"),at=a("core-modal");return r(),_("div",Ii,[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),f(p,{key:0,size:"medium",class:P(`add-focus-keyphrase-${this.$root.$data.screenContext}-input`),onKeydown:$t(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):u("",!0),d("div",{class:P(`add-focus-keyphrase-${this.$root.$data.screenContext}-button`)},[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),f(m,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:c(()=>[l(h,{width:"14",height:"14"}),b(" "+g(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):u("",!0),!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),f(S,{key:1},{tooltip:c(()=>[d("span",null,g(o.strings.semrushGetAdditionalKeyphrases)+" "+g(o.strings.pleaseAddFocusKeyphrase),1)]),default:c(()=>[d("div",Bi,[l(h,{width:"14",height:"14"}),b(" "+g(o.strings.getAdditionalKeyphrases),1)])]),_:1})):u("",!0)],2),s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),f(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?(r(),f($,{key:2,class:"analysis-loading",dark:""})):u("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),f(k,{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?(r(),f(S,{key:4},{tooltip:c(()=>[d("span",{innerHTML:o.strings.semrushTooltipLicenseKey},null,8,Di)]),default:c(()=>[d("div",Oi,[l(h,{width:"14",height:"14"}),b(" "+g(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)?(r(),f(S,{key:5,disabled:!o.showSemrushTooltip||t.$isPro,"force-show":o.showSemrushTooltip&&!t.$isPro},{tooltip:c(()=>[d("span",null,g(o.strings.semrushTooltip),1)]),default:c(()=>[l(m,{class:"add-keyphrase gray medium",onClick:n.getAdditionalKeyphrases},{default:c(()=>[l(h,{width:"14",height:"14"}),b(" "+g(o.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):u("",!0),l(at,{show:o.semrushShowModal,onClose:e[1]||(e[1]=T=>o.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:c(()=>[b(g(o.strings.modalTitle),1)]),body:c(()=>[d("div",Ri,[s.licenseStore.isUnlicensed?(r(),f(v,{key:0,type:"blue",innerHTML:o.strings.upsell},null,8,["innerHTML"])):u("",!0),d("div",Vi,[d("div",Ui,[d("div",Ki,g(o.strings.showResultsFor),1)]),l(w,{class:"semrush-country-selector",size:"medium",options:n.semrushDatabase,placeholder:o.strings.selectPriceIndicator,modelValue:o.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=T=>o.semrushCountry=T)},null,8,["options","placeholder","modelValue"])]),d("div",Ni,[d("table",Gi,[d("thead",null,[d("tr",Fi,[d("th",zi,g(o.strings.keyphrase),1),d("th",qi,g(o.strings.volume),1),d("th",Wi,g(o.strings.trend),1),s.licenseStore.isUnlicensed?u("",!0):(r(),_("th",ji))])]),d("tbody",Yi,[s.semrushStore.results.length&&!o.loadingResults?(r(!0),_(V,{key:0},J(s.semrushStore.results,(T,H)=>(r(),_("tr",{class:P(["keyphrase-row",{even:H%2===0}]),key:H},[d("td",Zi,g(T[0]),1),d("td",Xi,g(T[1]),1),d("td",Ji,[l(B,{width:66,height:24,data:n.transformTrendDataToChartPoints(T[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.licenseStore.isUnlicensed?u("",!0):(r(),_("td",Qi,[T[0]===s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(r(),_("div",tr,[l(A),b(" "+g(o.strings.focusKeyphrase),1)])):u("",!0),T[0]!==s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(r(),_("div",er,[H!==o.removingAdditionalKeyphrase&&(H===o.addingAdditionalKeyphrase||!n.hasAdditionalKeyphrase(T[0]))?(r(),f(m,{key:0,type:"gray",size:"medium",onClick:lt=>n.addAdditionalKeyphrase(T[0],H),loading:H===o.addingAdditionalKeyphrase},{default:c(()=>[b(g(o.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):u("",!0),n.getAdditionalKeyphrase(T[0])&&H!==o.addingAdditionalKeyphrase&&(H===o.removingAdditionalKeyphrase||n.hasAdditionalKeyphrase(T[0]))?(r(),_("div",sr,[d("span",{class:P(["keyphrase-score",n.scoreClass(n.getAdditionalKeyphrase(T[0]).score)]),onClick:lt=>n.goToAdditionalKeyphrase(T[0])},g(n.getAdditionalKeyphrase(T[0]).score)+"/100",11,or),l(S,{type:"action"},{tooltip:c(()=>[b(g(o.strings.delete),1)]),default:c(()=>[l(Y,{onClick:lt=>n.removeAdditionalKeyphrase(T[0],H)},null,8,["onClick"])]),_:2},1024)])):u("",!0)])):u("",!0)]))],2))),128)):u("",!0),!s.semrushStore.results.length||o.loadingResults?(r(),_("tr",ir,[d("td",{colspan:s.licenseStore.isUnlicensed?3:4,class:"no-results"},[d("div",null,[o.loadingResults?(r(),f($,{key:0,dark:""})):u("",!0),!o.loadingResults&&!s.semrushStore.error?(r(),_("span",nr,g(o.strings.noResults),1)):u("",!0),s.semrushStore.error&&!s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(r(),f(v,{key:2,type:"red"},{default:c(()=>[b(g(n.semrushError),1)]),_:1})):u("",!0),s.semrushStore.error&&s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(r(),_(V,{key:3},[d("div",ar,[l(_t)]),d("div",lr,[d("span",null,[d("strong",{innerHTML:o.strings.youHaveExceededSemrush},null,8,cr)]),b(" "+g(" ")+" "),d("span",{innerHTML:o.strings.inOrderToUpgradeSemrush},null,8,dr)])],64)):u("",!0)])],8,rr)])):u("",!0)])])])])]),_:1},8,["show"])])}const ur=y(Mi,[["render",hr]]),pr={setup(){return{postEditorStore:E(),rootStore:q()}},components:{CoreAlert:U,CoreMainTabs:Q,metaboxAnalysisDetail:mt},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:{parseTabs(){return this.tabs.map(t=>(t.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[t.slug].errors,t))},pageBuilderAlert(){if(!dt()||!["elementor","divi"].includes(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}}},gr={class:"page-analysis-panel"},mr=["innerHTML"];function _r(t,e,i,s,o,n){const p=a("core-alert"),h=a("core-main-tabs"),m=a("metaboxAnalysisDetail");return r(),_("div",gr,[n.pageBuilderAlert?(r(),f(p,{key:0,type:"yellow"},{default:c(()=>[d("span",{innerHTML:n.pageBuilderAlert},null,8,mr)]),_:1})):u("",!0),l(h,{tabs:n.parseTabs,showSaveButton:!1,active:this.initTab,internal:"",onChanged:e[0]||(e[0]=S=>n.processChangeTab(S))},null,8,["tabs","active"]),l(it,{mode:"out-in"},{default:c(()=>[s.postEditorStore.currentPost.page_analysis?(r(),f(m,{key:0,analysisItems:s.postEditorStore.currentPost.page_analysis.analysis[this.initTab]},null,8,["analysisItems"])):u("",!0)]),_:1})])}const fr=y(pr,[["render",_r]]),Sr={setup(){return{licenseStore:I(),postEditorStore:E(),hasRequiredFeature:ct.hasCoreFeature("general","cornerstone-content")}},components:{CoreAlert:U},emits:["changeTab"],data(){return{license:ct,strings:{description:this.$t.__("Cornerstone content refers to the most important and informative articles or pages on your website that serve as the foundation for your content strategy. AIOSEO uses cornerstone content for",this.$td),linkingRecommendations:this.$t.__("internal linking recommendations in Link Assistant.",this.$td),upsell:this.$t.sprintf(this.$t.__("Cornerstone Content is a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings-general",this.$constants.GLOBAL_STRINGS.learnMore,"cornerstone-content",!0)),markAsCornerstone:this.$t.__("Mark as Cornerstone",this.$td)}}}},yr={class:"cornerstone-content-panel"},vr={class:"cornerstone-content-text"},br=["innerHTML"],kr=["innerHTML"];function wr(t,e,i,s,o,n){const p=a("base-toggle"),h=a("core-alert");return r(),_("div",yr,[d("p",vr,[d("span",null,g(o.strings.description),1),d("a",{href:"#",onClick:e[0]||(e[0]=L(m=>t.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},g(o.strings.linkingRecommendations),1),d("span",{innerHTML:this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,br)]),l(p,{modelValue:s.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=m=>s.postEditorStore.currentPost.pillar_content=m),e[2]||(e[2]=m=>s.postEditorStore.isDirty=!0)],disabled:!s.hasRequiredFeature},{default:c(()=>[b(g(o.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),s.licenseStore.isUnlicensed||!s.hasRequiredFeature?(r(),f(h,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[d("div",{innerHTML:o.strings.upsell},null,8,kr)]),_:1})):u("",!0)])}const Cr=y(Sr,[["render",wr]]),$r={setup(){const{strings:t}=Yt();return{licenseStore:I(),optionsStore:nt(),postEditorStore:E(),rootStore:q(),seoPreviewStore:ye(),settingsStore:z(),tagsStore:ve(),truSeoHighlighterStore:st(),composableStrings:t}},emits:["changeTab"],mixins:[Et,De,Pt,Zt,So],components:{AdditionalKeyphrases:Wo,AiGenerator:ui,BaseRadioToggle:Jt,CoreAlert:U,CoreGoogleSearchPreview:ms,CoreHtmlTagsEditor:At,CoreSettingsRow:R,CoreSidebarCard:yi,CoreTooltip:K,CoreProBadge:fs,FocusKeyphrase:ur,MetaboxAnalysisDetail:mt,PageAnalysis:fr,CornerstoneContent:Cr,SvgCircleQuestionMark:Tt,SvgDesktop:Be,SvgMobile:Oe,SvgPencil:ut},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:ct,allowed:F,separator:void 0,isPageBuilderEditor:X,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Gt(this.composableStrings,{pageName:this.$t.__("General",this.$td),serpPreview:this.$t.__("SERP Preview",this.$td),serpPreviewDocumentation:this.$t.__("SERP: Search Engine Results Page preview. Your site's potential appearance in Google search results. Final display may vary, but this preview closely resembles it.",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),cornerstoneContent:this.$t.__("Cornerstone Content",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),autogenerateDescriptionsAlert:this.$t.sprintf(this.$t.__("Warning: You have disabled Autogenerate Descriptions and are using the default description format. %1$s will not output a description unless you enter a custom one. You can enable Autogenerate Descriptions under %2$s.",this.$td),"AIOSEO",this.$links.getPlainLink(this.$t.__("Search Appearance > Advanced",this.$td),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),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"(){St(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){St(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(t,e){St(()=>this.watchHighlightSentences(t,e))}},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 vt()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&F("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return vt()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&F("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return vt()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&F("aioseo_page_analysis")&&!this.isForum},isForum(){return this.rootStore.aioseo.data.isBBPressActive&&(this.postEditorStore.currentPost.postType==="forum"||this.postEditorStore.currentPost.postType==="topic"||this.postEditorStore.currentPost.postType==="reply")},focusKeyphraseScore(){return this.postEditorStore.currentPost.keyphrases.focus.keyphrase?this.postEditorStore.currentPost.keyphrases.focus.score:null},showAutogenerateDescriptionsAlert(){return this.optionsStore.internalOptions.internal.deprecatedOptions.includes("autogenerateDescriptions")?(this.postEditorStore.currentPost.context==="post"?this.optionsStore.dynamicOptions.searchAppearance.postTypes[this.postEditorStore.currentPost.postType].metaDescription:this.optionsStore.dynamicOptions.searchAppearance.taxonomies[this.postEditorStore.currentPost.termType].metaDescription)===this.postEditorStore.currentPost.description&&!this.optionsStore.options.deprecated.searchAppearance.advanced.autogenerateDescriptions:!1}},methods:{hideKeywordsLooking(){this.optionsStore.options.searchAppearance.advanced.keywordsLooking=!1,this.optionsStore.saveChanges()},isMobilePreviewEv(t){this.postEditorStore.changeGeneralPreview(t)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.currentPost.modalOpen=!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"]}},getFocusKeyphraseTooltipOffset(){return be()?"-15px,0":X()?"35px,0":"0,0"}},mounted(){this.keyphrases=this.postEditorStore.currentPost.keyphrases,this.postEditorStore.currentPost.context==="post"&&!this.postEditorStore.currentPost.keyphrases.length&&(this.selectedKeyphrase=-1),window.aioseoBus.$on("updateTitleKey",()=>{this.titleKey="title"+Math.random(0,999)}),window.aioseoBus.$on("updateDescriptionKey",()=>{this.descriptionKey="description"+Math.random(0,999)})}},Er={class:"aioseo-tab-content aioseo-post-general"},Pr=["innerHTML"],Tr=["innerHTML"],xr=["innerHTML"],Ar={key:0},Lr=["innerHTML"],Hr=["innerHTML"];function Mr(t,e,i,s,o,n){const p=a("svg-circle-question-mark"),h=a("core-tooltip"),m=a("svg-desktop"),S=a("svg-mobile"),C=a("base-radio-toggle"),$=a("core-google-search-preview"),k=a("svg-pencil"),v=a("base-button"),w=a("core-settings-row"),B=a("ai-generator"),A=a("core-html-tags-editor"),Y=a("core-alert"),_t=a("core-pro-badge"),at=a("cornerstone-content"),T=a("focus-keyphrase"),H=a("additional-keyphrases"),lt=a("page-analysis"),Z=a("core-sidebar-card"),ft=a("metabox-analysis-detail");return r(),_("div",Er,[o.allowed("aioseo_page_general_settings")?(r(),f(w,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:c(()=>[d("div",null,[d("span",null,g(o.strings.serpPreview),1),l(h,{offset:t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:c(()=>[b(g(o.strings.serpPreviewDocumentation),1)]),default:c(()=>[l(p)]),_:1},8,["offset"])]),t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),f(C,{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:c(()=>[l(m)]),mobile:c(()=>[l(S)]),_:1},8,["modelValue","onUpdate:modelValue"])):u("",!0)]),content:c(()=>{var x,It,Bt;return[l($,{"focus-keyphrase":((Bt=(It=(x=s.postEditorStore.currentPost)==null?void 0:x.keyphrases)==null?void 0:It.focus)==null?void 0:Bt.keyphrase)??"",device:t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext==="metabox"||s.postEditorStore.currentPost.generalMobilePrev?"mobile":"desktop",url:s.tagsStore.liveTags.permalink,title:t.parseTags(s.postEditorStore.currentPost.title||s.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),description:t.parseTags(s.postEditorStore.currentPost.description||s.postEditorStore.currentPost.tags.description||"#post_content"),"rich-results":s.seoPreviewStore.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext!=="modal"?(r(),f(v,{key:0,class:"edit-snippet gray small",onClick:n.editSnippetEv},{default:c(()=>[l(k),b(" "+g(o.strings.editSnippet),1)]),_:1},8,["onClick"])):u("",!0)]}),_:1})):u("",!0),(t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(r(),f(w,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:n.title,key:o.titleKey},{content:c(()=>[l(A,{modelValue:s.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=x=>s.postEditorStore.currentPost.title=x),e[2]||(e[2]=x=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=x=>t.updateCount(x,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("title")},{"tags-description":c(()=>[b(g(o.strings.clickToAddTitle),1)]),"append-button":c(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(r(),f(B,{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,Pr)]),_:1},8,["name"])):u("",!0),(t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(r(),f(w,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:o.strings.metaDescription,key:o.descriptionKey},{content:c(()=>[n.showAutogenerateDescriptionsAlert?(r(),f(Y,{key:0,type:"yellow"},{default:c(()=>[d("span",{innerHTML:o.strings.autogenerateDescriptionsAlert},null,8,Tr)]),_:1})):u("",!0),l(A,{modelValue:s.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=x=>s.postEditorStore.currentPost.description=x),e[5]||(e[5]=x=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=x=>t.updateCount(x,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("description")},{"tags-description":c(()=>[b(g(o.strings.clickToAddDescription),1)]),"append-button":c(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(r(),f(B,{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,xr)]),_:1},8,["name"])):u("",!0),t.$root.$data.screenContext==="metabox"&&s.postEditorStore.currentPost.context==="post"&&s.postEditorStore.currentPost.postType!=="attachment"&&!o.isPageBuilderEditor()?(r(),f(w,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:c(()=>[b(g(o.strings.cornerstoneContent)+" ",1),s.licenseStore.isUnlicensed?(r(),f(_t,{key:0})):u("",!0)]),content:c(()=>[l(at,{onChangeTab:e[6]||(e[6]=x=>t.$emit("changeTab",x))})]),_:1})):u("",!0),n.displayTruSeoMetaboxCard?(r(),_(V,{key:4},[s.optionsStore.options.searchAppearance.advanced.useKeywords&&s.optionsStore.options.searchAppearance.advanced.keywordsLooking?(r(),_("div",Ar,[l(Y,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:n.hideKeywordsLooking},{default:c(()=>[b(g(o.strings.lookingForMetaKeywords)+" ",1),d("a",{href:"#",onClick:e[7]||(e[7]=L(x=>t.$emit("changeTab","advanced"),["prevent"]))},g(o.strings.goToAdvancedTab),1),d("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=L(x=>t.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):u("",!0),l(w,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:c(()=>[d("span",null,g(o.strings.focusKeyphrase),1),l(h,{offset:"25px,0"},{tooltip:c(()=>[d("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Lr)]),default:c(()=>[l(p)]),_:1})]),content:c(()=>[l(T)]),_:1}),l(w,{name:o.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:c(()=>[l(H)]),_:1},8,["name"])],64)):u("",!0),n.displayTruSeoMetaboxCard&&s.postEditorStore.currentPost.page_analysis?(r(),f(w,{key:5,name:o.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:c(()=>[l(lt)]),_:1},8,["name"])):u("",!0),t.$root.$data.screenContext==="sidebar"&&!o.isPageBuilderEditor()&&this.parentComponentContext!=="modal"?(r(),f(Z,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":o.strings.cornerstoneContent},{default:c(()=>[l(at,{onChangeTab:e[9]||(e[9]=x=>t.$emit("changeTab",x))})]),_:1},8,["header-text"])):u("",!0),n.displayTruSeoSidebarKeyphraseCard?(r(),f(Z,{key:7,slug:"focus",focusScore:n.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:c(()=>[d("span",null,g(o.strings.focusKeyphrase),1),l(h,{offset:n.getFocusKeyphraseTooltipOffset()},{tooltip:c(()=>[d("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Hr)]),default:c(()=>[l(p)]),_:1},8,["offset"])]),default:c(()=>[l(T)]),_:1},8,["focusScore"])):u("",!0),n.displayTruSeoSidebarKeyphraseCard?(r(),f(Z,{key:8,slug:"additional","header-text":o.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:c(()=>[l(H)]),_:1},8,["header-text"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),f(Z,{key:9,slug:"basicseo","header-text":o.strings.basicSeo,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:c(()=>[l(ft,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),f(Z,{key:10,slug:"title","header-text":o.strings.title,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:c(()=>[l(ft,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),f(Z,{key:11,slug:"readability","header-text":o.strings.readability,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:c(()=>[l(ft,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):u("",!0)])}const de=y($r,[["render",Mr]]),Ir={},Br={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},Or=d("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),Dr=[Or];function Rr(t,e){return r(),_("svg",Br,Dr)}const Ht=y(Ir,[["render",Rr]]),Vr={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:R,SvgRightArrowShort:Ht},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)}}}},Ur={class:"aioseo-link-assistant-sidebar"},Kr={class:"aioseo-sidebar-content-title"};function Nr(t,e,i,s,o,n){const p=a("svg-right-arrow-short"),h=a("base-button"),m=a("core-settings-row");return r(),_("div",Ur,[t.$root.$data.screenContext==="sidebar"?(r(),f(m,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:c(()=>[d("div",Kr,g(o.strings.title),1),d("p",null,g(o.strings.description),1),l(h,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:c(()=>[l(p),b(" "+g(o.strings.button),1)]),_:1})]),_:1})):u("",!0)])}const Gr=y(Vr,[["render",Nr]]),D="all-in-one-seo-pack",Fr=()=>{const t={frontPage:O("Front Page",D),deleteLink:O("Delete Link",D)},e={areYouSureSingle:O("Are you sure you want to delete this link?",D),areYouSureMultiple:O("Are you sure you want to delete these links?",D),areYouSureAll:O("Are you sure you want to delete all links?",D),actionCannotBeUndone:O("This action cannot be undone.",D),yesSingle:O("Yes, I want to delete this link",D),yesMultiple:O("Yes, I want to delete these links",D),yesAll:O("Yes, I want to delete all links",D),noChangedMind:O("No, I changed my mind",D)};return{bulkOptions:[{label:O("Delete",D),value:"delete"}],modalStrings:e,strings:t}},zr={methods:{findTargetBlock(t,e){const i=j(e);let s=null;return t.forEach(o=>{if(s||!o.attributes)return;if(o.attributes.content&&o.attributes.content.search(i)!==-1){s=o.clientId;return}if(!o.innerBlocks)return;const n=this.findTargetBlock(o.innerBlocks,e);n&&(s=n)}),s}}},qr={emits:["updatingLinks","linksUpdated"],mixins:[zr],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=E();window.aioseoBus.$emit("updatingLinks",!0);const i={...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](i).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.length||!t||(this.action=t,this.selectedRows=e,this.showModal=!0)},doBulkAction(){if(this.showModal=!1,this.selectedRows===!1||typeof this.selectedRows>"u"||!this.selectedRows.length)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=E();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 i=tt(),s=E();i.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){dt()&&(window.aioseoBus.$emit("updatingLinks",!1),this.blockEditorRemoveLink(t),window.aioseoBus.$emit("updatingLinks",!1)),Nt()&&this.classicEditorRemoveLink(t)},blockEditorRemoveLink(t){const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i)return;window.aioseoBus.$emit("updatingLinks",!0);const s=j(i.anchor.trim()),o=i.phrase_html.trim(),n=j(o),p=window.wp.data.select("core/block-editor").getBlocks(),h=this.findTargetBlock(p,o);if(!h){window.aioseoBus.$emit("updatingLinks",!1);return}const m=window.wp.data.select("core/block-editor").getBlock(h);if(!m){window.aioseoBus.$emit("updatingLinks",!1);return}let S=new RegExp(`(<t?a[^<>]*>)(.*)?(${s})(.*)?(</t?a[^<>]*>)`,"i");const C=o.replace(S,"$2$3$4");S=new RegExp(`${n}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(h,{content:m.attributes.content.replace(S,C)}).then(()=>{this.post.links[this.linkType].rows.splice(t,1)}).catch($=>{console.error(`Couldn delete link with type "${this.linkType}" and index ${t}:`,$)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},classicEditorRemoveLink(t){var k;const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i||!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 p=i.phrase_html.trim();o||(p=p.replace(/(\sdata-mce-href=".*")/gi,""));const h=j(i.anchor.trim());let m=new RegExp(`(<t?a[^<>]*>)(.*)?(${h})(.*)?(</t?a[^<>]*>)`,"i");const S=p.replace(m,"$2$3$4"),C=j(p);m=new RegExp(`${C}`,"i"),s=s.replace(m,S),o?o.setContent(s):n.value=s,this.post.links[this.linkType].rows.splice(t,1),(k=tt().postSettingsUpdate({postContent:s}))==null||k.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},idsToIndexes(t){let e,i=[];return Array.isArray(t)&&(e=t.map(Number)),e&&this.post.links[this.linkType].rows.forEach((s,o)=>{e.includes(s.id)&&i.push(o)}),t==="all"&&(i=this.post.links[this.linkType].rows.map((s,o)=>o)),i.sort(function(s,o){return o-s})}}},Wr={emits:["closeModal","doBulkAction"],components:{CoreModal:W,SvgClose:wt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0},show:Boolean},computed:{areYouSure(){return this.selectedRows==="all"?this.strings.areYouSureAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.areYouSureMultiple:this.strings.areYouSureSingle},confirmation(){return this.selectedRows==="all"?this.strings.yesAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.yesMultiple:this.strings.yesSingle}}},jr={class:"aioseo-modal-body"},Yr=["innerHTML"];function Zr(t,e,i,s,o,n){const p=a("svg-close"),h=a("base-button"),m=a("core-modal");return r(),f(m,{show:i.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=S=>t.$emit("closeModal",!0))},{body:c(()=>[d("div",jr,[d("button",{class:"close",onClick:e[1]||(e[1]=L(S=>t.$emit("closeModal",!0),["stop"]))},[l(p,{onClick:e[0]||(e[0]=S=>t.$emit("closeModal",!0))})]),d("h3",null,g(n.areYouSure),1),d("div",{class:"reset-description",innerHTML:i.strings.actionCannotBeUndone},null,8,Yr),l(h,{type:"blue",size:"medium",onClick:e[2]||(e[2]=S=>t.$emit("doBulkAction",S))},{default:c(()=>[b(g(n.confirmation),1)]),_:1}),l(h,{type:"gray",size:"medium",onClick:e[3]||(e[3]=S=>t.$emit("closeModal",!0))},{default:c(()=>[b(g(i.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const Xr=y(Wr,[["render",Zr]]),Jr={components:{CoreTooltip:K},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=et.decode(this.anchor),e=j(t);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return et.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return et.decode(this.stripTags(this.getPart(2)))},lastPart(){return et.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(t){const i=et.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return i?i[t]:""},stripTags(t,e=!1){return t=t.replace(/<br\s?\/?>/gi," "),e?t.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):t.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},Qr={class:"phrase"},tn={key:0,class:"first"},en=["href"],sn={key:2},on={class:"anchor"},rn={key:3,class:"last"};function nn(t,e,i,s,o,n){const p=a("core-tooltip");return r(),_("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",Qr,[n.firstPart?(r(),_("span",tn,g(n.firstPart),1)):u("",!0),i.tooltip?(r(),f(p,{key:1,type:"action"},{tooltip:c(()=>[d("a",{class:"tooltip-url",href:i.url,target:"_blank"},g(i.url),9,en)]),default:c(()=>[d("span",{class:"anchor",onClick:e[0]||(e[0]=(...h)=>n.maybeOpenLink&&n.maybeOpenLink(...h))},g(n.linkAnchor),1)]),_:1})):u("",!0),i.tooltip?u("",!0):(r(),_("div",sn,[d("span",on,g(n.linkAnchor),1)])),n.lastPart?(r(),_("span",rn,g(n.lastPart),1)):u("",!0)]),N(t.$slots,"icons")],32)}const an=y(Jr,[["render",nn]]),ln={},cn={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},dn=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),hn=[dn];function un(t,e){return r(),_("svg",cn,hn)}const Mt=y(ln,[["render",un]]),pn={setup(){const{strings:t,modalStrings:e,bulkOptions:i}=Fr();return{rootStore:q(),settingsStore:z(),composableStrings:t,bulkOptions:i,modalStrings:e}},emits:["openSuggestions"],components:{CoreTooltip:K,CoreWpTable:ys,LinkAssistantConfirmationModal:Xr,LinkAssistantPhrase:an,SvgLinkExternal:ee,SvgLinkSuggestion:Mt,SvgTrash:pt},mixins:[qr,vs,Ss],data(){return{tableId:"aioseo-post-report-inbound-internal",linkType:"inboundInternal",strings:Gt(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:{processPagination(t){this.pageNumber=t,!this.metabox&&(this.wpTableLoading=!0,this.processFetchTableData().then(()=>this.wpTableLoading=!1))}}},gn={key:0},mn={key:0,class:"row-actions"},_n={class:"view"},fn=["href"],Sn={class:"edit"},yn=["href"],vn={key:0,class:"links-bottom"},bn={class:"links-bottom-left"},kn={key:1},wn={class:"links-bottom-right"};function Cn(t,e,i,s,o,n){const p=a("link-assistant-phrase"),h=a("svg-trash"),m=a("core-tooltip"),S=a("core-wp-table"),C=a("svg-link-suggestion"),$=a("base-button"),k=a("svg-link-external"),v=a("link-assistant-confirmation-modal");return r(),_("div",null,[(r(),f(S,{id:o.tableId,key:t.wpTableKey,class:P({"link-assistant-inner-table":!t.postReport}),columns:n.columns,loading:t.wpTableLoading,rows:t.rows,totals:t.post.links.inboundInternal.totals,"bulk-options":s.bulkOptions,"initial-items-per-page":s.settingsStore.settings.tablePagination.linkAssistantPostsReport,"initial-page-number":t.pageNumber,"show-pagination":!t.linksReport,"show-search":!1,"show-table-footer":t.postReport,"show-items-per-page":"",onPaginate:n.processPagination,onProcessBulkAction:t.maybeDoBulkAction,onProcessChangeItemsPerPage:t.processChangeItemsPerPage},{post_title:c(({row:w})=>{var B,A;return[d("span",null,[b(g(w.context.postTitle)+" ",1),((A=(B=w.context)==null?void 0:B.permalink)==null?void 0:A.replace(/\/$/,""))===s.rootStore.aioseo.urls.home?(r(),_("span",gn,"("+g(o.strings.frontPage)+")",1)):u("",!0)]),w.context?(r(),_("div",mn,[d("span",_n,[d("a",{href:w.context.permalink,target:"_blank"},g(t.viewPost(w.context.postType.singular)),9,fn),b(" | ")]),d("span",Sn,[d("a",{href:w.context.editLink,target:"_blank"},g(t.editPost(w.context.postType.singular)),9,yn)])])):u("",!0)]}),phrase:c(({row:w})=>[l(p,{phrase:w.phrase,phraseHtml:w.phrase_html||"",anchor:w.anchor,url:w.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:c(({index:w})=>[l(m,{type:"action"},{tooltip:c(()=>[b(g(o.strings.deleteLink),1)]),default:c(()=>[l(h,{onClick:B=>t.maybeDoBulkAction({action:"delete",selectedRows:w})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["id","class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onPaginate","onProcessBulkAction","onProcessChangeItemsPerPage"])),t.postReport?u("",!0):(r(),_("div",vn,[d("div",bn,[t.post.links.inboundInternal.rows.length?(r(),f($,{key:0,type:"blue",tag:"button",onClick:e[0]||(e[0]=w=>t.$emit("openSuggestions"))},{default:c(()=>[l(C),b(" "+g(o.strings.outboundSuggestions),1)]),_:1})):u("",!0),t.post.links.inboundInternal.totals.total>5&&t.linksReport?(r(),_("div",kn,[l(k),d("a",{class:"link-view",href:"#",onClick:e[1]||(e[1]=L(w=>t.openPostReport("inbound-internal"),["prevent"]))},g(n.seeAllLinks),1)])):u("",!0)]),d("div",wn,[t.post.links.inboundInternal.rows.length?(r(),_("a",{key:0,class:"link-delete",onClick:e[2]||(e[2]=L(w=>t.maybeDoBulkAction({action:"delete",selectedRows:"all"}),["prevent"]))},g(o.strings.deleteAllLinks),1)):u("",!0)])])),l(v,{show:t.showModal,selectedRows:t.selectedRows,strings:s.modalStrings,onDoBulkAction:t.doBulkAction,onCloseModal:e[3]||(e[3]=w=>t.showModal=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}const $n=y(pn,[["render",Cn]]),En={setup(){return{licenseStore:I(),postEditorStore:E()}},components:{CoreAlert:U,CoreBlur:Lt,CoreMainTabs:Q,CoreModal:W,Cta:te,LinkAssistantInboundInternal:$n,LinksSideBar:Gr,SvgLinkAffiliate:bs,SvgLinkExternal:ee,SvgLinkInternalInbound:ks,SvgLinkInternalOutbound:ws,SvgLinkSuggestion:Mt,RequiredPlans:Cs},props:{parentComponentContext:String},data(){return{activeTab:"inbound-internal",activeSuggestionTab:"suggestions-inbound",mockedPostData:{links:{inboundInternal:{rows:[{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"AIOSEO also allows you to create video sitemaps and comes with tons of different SEO tools.",anchor:"video sitemaps",url:"#",context:{postTitle:"How to Create WordPress Image Sitemap",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"You may also want to check out how to name your image files for SEO in WordPress and write alt text for images.",anchor:"how to name your image files for SEO in WordPress",url:"#",context:{postTitle:"What’s the Best Image Format for Your Website?",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"To learn more, please check out our post on image SEO: how to best optimize your images in WordPress. ",anchor:"image SEO",url:"#",context:{postTitle:"How to Write Alt Text for Images for SEO",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"So let’s now move on to showing you exactly how easy it is to import and export redirects using the best redirect plugin for WordPress.",anchor:"best redirect plugin for WordPress",url:"#",context:{postTitle:"How to Easily Import and Export Redirects in WordPress",permalink:"#",editLink:"#",postType:{singular:"Post"}}}],totals:{total:6}},outboundInternal:{totals:{total:12}},affiliate:{totals:{total:8}},external:{totals:{total:24}},suggestionsInbound:{totals:{total:9}},suggestionsOutbound:{totals:{total:9}}}},strings:{ctaButtonText:this.$t.__("Unlock Link Assistant",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Link Assistant is a %1$s Feature",this.$td),"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"))}}},Pn={class:"aioseo-tab-content aioseo-link-assistant"},Tn={key:0};function xn(t,e,i,s,o,n){const p=a("core-main-tabs"),h=a("link-assistant-inbound-internal"),m=a("core-blur"),S=a("required-plans"),C=a("cta"),$=a("core-modal"),k=a("links-side-bar");return r(),_("div",Pn,[t.$root.$data.screenContext==="metabox"?(r(),_("div",Tn,[l(m,null,{default:c(()=>[l(p,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:v})=>[(r(),f(M(v.icon),{class:P([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(r(),f(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):u("",!0)]),_:1}),l(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",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":c(()=>[b(g(o.strings.ctaHeader),1)]),description:c(()=>[l(S,{addon:"aioseo-link-assistant"}),b(" "+g(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):u("",!0),l($,{show:s.postEditorStore.currentPost.linkAssistant.modalOpen&&t.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=v=>s.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:c(()=>[b(g(n.modalHeader),1)]),body:c(()=>[l(m,null,{default:c(()=>[l(p,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:v})=>[(r(),f(M(v.icon),{class:P([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(r(),f(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):u("",!0)]),_:1}),l(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",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":c(()=>[b(g(o.strings.ctaHeader),1)]),description:c(()=>[l(S,{addon:"aioseo-link-assistant"}),b(" "+g(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),this.parentComponentContext!=="modal"?(r(),f(k,{key:1})):u("",!0)])}const Rt=y(En,[["render",xn]]),An={};function Ln(t,e){return r(),_("div")}const Hn=y(An,[["render",Ln]]),Mn={setup(){return{addons:Qt,licenseStore:I()}},components:{Links:Rt,LinksActivate:Hn,LinksLite:Rt},props:{parentComponentContext:String}},In={class:"aioseo-tab-content aioseo-link-assistant"};function Bn(t,e,i,s,o,n){const p=a("Links",!0),h=a("LinksLite"),m=a("LinksActivate");return r(),_("div",In,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(r(),f(p,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-link-assistant")?(r(),f(h,{key:1,parentComponentContext:i.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")?(r(),f(m,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const On=y(Mn,[["render",Bn]]),Dn={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(i=>{const s=i.options.find(o=>o.value===t);s&&(e=(s==null?void 0:s.label)||"")}),e}}},Rn={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(i=>i.value===t))==null?void 0:e.label)||""}}},Vn={setup(){return{optionsStore:nt(),postEditorStore:E(),rootStore:q()}},components:{CoreAlert:U,CoreFacebookPreview:$s,CoreHtmlTagsEditor:At,CoreImageUploader:re,CoreSettingsRow:R},mixins:[se,oe,Et,Pt,Dn],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ie,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),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),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(i=>{const s=i.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()},handleImageUpdate(){this.setImageUrl("facebook")}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},Un={class:"tab-facebook"},Kn={id:"aioseo-post-settings-facebook"},Nn=["innerHTML"],Gn=["innerHTML"];function Fn(t,e,i,s,o,n){const p=a("core-alert"),h=a("core-facebook-preview"),m=a("core-settings-row"),S=a("core-html-tags-editor"),C=a("base-select"),$=a("base-input"),k=a("core-image-uploader");return r(),_("div",Un,[l(m,{class:"snippet-preview-row"},{name:c(()=>[d("span",null,g(o.strings.tabName),1)]),content:c(()=>[s.optionsStore.options.social.facebook.general.enable?u("",!0):(r(),f(p,{key:0,class:"facebook-disabled-warning",innerHTML:o.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),l(h,{description:n.previewDescription,image:t.imageUrl,loading:t.loading,title:n.previewTitle},null,8,["description","image","loading","title"])]),_:1}),d("div",Kn,[l(m,{name:o.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:c(()=>[l(S,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=v=>s.postEditorStore.currentPost.og_title=v),e[2]||(e[2]=v=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=v=>t.updateCount(v,"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":c(()=>[b(g(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,Nn)]),_:1},8,["name"]),l(m,{name:o.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:c(()=>[l(S,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=v=>s.postEditorStore.currentPost.og_description=v),e[5]||(e[5]=v=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=v=>t.updateCount(v,"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":c(()=>[b(g(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,Gn)]),_:1},8,["name"]),l(m,{class:"facebook-image-source",name:o.strings.imageSource,align:""},{content:c(()=>[l(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=v=>n.saveImageType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.og_image_type==="custom"?(r(),f(m,{key:0,name:o.strings.customFieldsName,align:""},{content:c(()=>[l($,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=v=>s.postEditorStore.currentPost.og_image_custom_fields=v),e[8]||(e[8]=v=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):u("",!0),s.postEditorStore.currentPost.og_image_type==="custom_image"?(r(),f(m,{key:1,class:"facebook-image",name:o.strings.facebookImage},{content:c(()=>[l(k,{description:o.strings.minimumSize,modelValue:s.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=v=>s.postEditorStore.currentPost.og_image_custom_url=v)},null,8,["description","modelValue"])]),_:1},8,["name"])):u("",!0),l(m,{class:"facebook-video",name:o.strings.video,align:""},{content:c(()=>[l($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=v=>s.postEditorStore.currentPost.og_video=v)},null,8,["modelValue"])]),_:1},8,["name"]),l(m,{class:"facebook-object-type",name:o.strings.facebookObjectType,align:""},{content:c(()=>[l(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[11]||(e[11]=v=>n.setObjectType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),n.shouldShowArticleSection?(r(),f(m,{key:2,name:o.strings.articleSection,align:""},{content:c(()=>[l($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=v=>s.postEditorStore.currentPost.og_article_section=v)},null,8,["modelValue"])]),_:1},8,["name"])):u("",!0),n.shouldShowArticleSection?(r(),f(m,{key:3,name:o.strings.articleTags,align:""},{content:c(()=>[l(C,{multiple:"",taggable:"",options:[],modelValue:s.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=v=>s.postEditorStore.currentPost.og_article_tags=v),"tag-placeholder":o.strings.tagPlaceholder},null,8,["modelValue","tag-placeholder"])]),_:1},8,["name"])):u("",!0)])])}const zn=y(Vn,[["render",Fn]]),qn={setup(){return{optionsStore:nt(),postEditorStore:E(),rootStore:q()}},components:{CoreAlert:U,CoreHtmlTagsEditor:At,CoreImageUploader:re,CoreSettingsRow:R,CoreTwitterPreview:Es},mixins:[se,oe,Et,Pt,Rn],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ie,separator:void 0,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:this.$t.__("X (Twitter) Preview",this.$td),twitterPreviewDescription:this.$t.__("X cards by default will use the data defined below. If no data is set, X will instead pick up the data set on the Facebook tab.",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.__("X Image",this.$td),twitterTitle:this.$t.__("X Title",this.$td),twitterDescription:this.$t.__("X Description",this.$td),twitterCardType:this.$t.__("X Card Type",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.__("X (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.twitter_title?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.twitter_description?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")},previewImage(){return this.postEditorStore.currentPost.twitter_use_og||!this.imageUrl?this.facebookImageUrl:this.imageUrl},twitterImageUploaderDescription(){return this.postEditorStore.currentPost.twitter_card==="summary"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary"?this.strings.minimumSizeSummary:this.postEditorStore.currentPost.twitter_card==="summary_large_image"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?this.strings.minimumSizeSummaryWithLarge:""}},methods:{getCardOptions(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()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(t){t.social==="facebook"&&(this.facebookImageUrl=t.image)}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},mounted(){window.aioseoBus.$on("updateSocialImagePreview",this.updateImagePreview),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate),this.scrollToElement(),this.setImageUrl("facebook").then(()=>{this.setImageUrl("twitter")})},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate),window.aioseoBus.$off("updateSocialImagePreview",this.updateImagePreview)}},Wn={class:"tab-twitter"},jn={id:"aioseo-post-settings-twitter"},Yn=["innerHTML"],Zn=["innerHTML"];function Xn(t,e,i,s,o,n){const p=a("core-alert"),h=a("core-twitter-preview"),m=a("core-settings-row"),S=a("base-toggle"),C=a("core-html-tags-editor"),$=a("base-select"),k=a("base-input"),v=a("core-image-uploader");return r(),_("div",Wn,[l(m,{class:"snippet-preview-row"},{name:c(()=>[d("span",null,g(o.strings.twitterPreview),1)]),description:c(()=>[d("i",null,g(o.strings.twitterPreviewDescription),1)]),content:c(()=>[s.optionsStore.options.social.twitter.general.enable?u("",!0):(r(),f(p,{key:0,class:"twitter-disabled-warning",innerHTML:o.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),l(h,{card:s.postEditorStore.currentPost.twitter_card,description:n.previewDescription,image:n.previewImage,loading:t.loading,title:n.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),d("div",jn,[l(m,{name:o.strings.useFB,class:"use-facebook"},{content:c(()=>[l(S,{modelValue:s.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=w=>s.postEditorStore.currentPost.twitter_use_og=w),e[1]||(e[1]=w=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(r(),f(m,{key:0,name:o.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:c(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=w=>s.postEditorStore.currentPost.twitter_title=w),e[4]||(e[4]=w=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=w=>t.updateCount(w,"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,Yn)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(r(),f(m,{key:1,name:o.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:c(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=w=>s.postEditorStore.currentPost.twitter_description=w),e[7]||(e[7]=w=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=w=>t.updateCount(w,"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":c(()=>[b(g(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,Zn)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?u("",!0):(r(),f(m,{key:2,class:"twitter-image-source",name:o.strings.imageSource,align:""},{content:c(()=>[l($,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=w=>n.saveTwitterImageType(w.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom"?(r(),f(m,{key:3,class:"twitter-custom-field",name:o.strings.customFieldsName,align:""},{content:c(()=>[l(k,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=w=>s.postEditorStore.currentPost.twitter_image_custom_fields=w),e[10]||(e[10]=w=>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"?(r(),f(m,{key:4,class:"twitter-image",name:o.strings.twitterImage},{content:c(()=>[l(v,{description:n.twitterImageUploaderDescription,modelValue:s.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=w=>s.postEditorStore.currentPost.twitter_image_custom_url=w)},null,8,["description","modelValue"])]),_:1},8,["name"])):u("",!0),l(m,{class:"twitter-card-type",name:o.strings.twitterCardType,align:""},{content:c(()=>[l($,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:n.getCardOptions(s.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=w=>n.cardSelect(w.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Jn=y(qn,[["render",Xn]]),Qn={setup(){return{postEditorStore:E(),settingsStore:z()}},components:{CoreSettingsRow:R,SvgPencil:ut},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.currentPost.modalOpen=!0}}},ta={class:"aioseo-sidebar-content-title"};function ea(t,e,i,s,o,n){const p=a("svg-pencil"),h=a("base-button"),m=a("core-settings-row");return t.$root.$data.screenContext==="sidebar"?(r(),f(m,{key:0,name:o.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:c(()=>[d("div",ta,g(o.strings.title),1),d("p",null,g(o.strings.sidebarCopy),1),l(h,{class:"open-social-modal gray small",onClick:n.openModalEv},{default:c(()=>[l(p),b(" "+g(o.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):u("",!0)}const sa=y(Qn,[["render",ea]]),oa={setup(){return{postEditorStore:E(),settingsStore:z()}},components:{BaseRadioToggle:Jt,CoreMainTabs:Q,CoreSettingsRow:R,Facebook:zn,Twitter:Jn,SocialSideBar:sa},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.__("X (Twitter)",this.$td)}]}},computed:{initTab:function(){let t=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(t=this.settingsStore.metaBoxTabs.socialModal),t}},mounted(){ot()["social-tab"]&&(this.processChangeTab(ot()["social-tab"]),setTimeout(()=>{kt("social-tab")},500))},methods:{processChangeTab(t){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:t}):this.settingsStore.changeTabSettings({setting:"social",value:t})}}},ia={class:"aioseo-tab-content aioseo-post-social"};function ra(t,e,i,s,o,n){const p=a("core-main-tabs"),h=a("core-settings-row"),m=a("social-side-bar");return r(),_("div",ia,[t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),f(h,{key:0,"no-border":""},{content:c(()=>[l(p,{tabs:o.tabs,showSaveButton:!1,active:n.initTab,internal:"",onChanged:e[0]||(e[0]=S=>n.processChangeTab(S)),disableMobile:""},null,8,["tabs","active"])]),_:1})):u("",!0),t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),f(it,{key:1,name:"route-fade",mode:"out-in"},{default:c(()=>[(r(),f(M(n.initTab)))]),_:1})):u("",!0),this.parentComponentContext!=="modal"?(r(),f(m,{key:2})):u("",!0)])}const he=y(oa,[["render",ra]]),na={setup(){return{settingsStore:z()}},components:{CoreMainTabs:Q,CoreSettingsRow:R,General:de,Social:he,SvgSettings:ne,SvgShare:ae},data(){return{strings:{pageName:this.$t.__("Modal Content",this.$td)},tabs:[{slug:"general",icon:"svg-settings",name:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)}]}},computed:{getTabs(){return this.tabs.filter(t=>F(`aioseo_page_${t.slug}_settings`))}},methods:{processChangeTab(t){this.settingsStore.changeTabSettings({setting:"modal",value:t})}}},aa={class:"aioseo-modal-content"},la={class:"mobile-radio-buttons"},ca={class:"component-wrapper"};function da(t,e,i,s,o,n){const p=a("core-main-tabs");return r(),_("div",aa,[d("div",la,[l(p,{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",ca,[l(it,{name:"route-fade",mode:"out-in"},{default:c(()=>[(r(),f(M(s.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const ha=y(na,[["render",da]]),ua={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:R,SvgRightArrowShort:Ht},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)}}}},pa={class:"aioseo-redirects-sidebar"},ga={class:"aioseo-sidebar-content-title"};function ma(t,e,i,s,o,n){const p=a("svg-right-arrow-short"),h=a("base-button"),m=a("core-settings-row");return r(),_("div",pa,[t.$root.$data.screenContext==="sidebar"?(r(),f(m,{key:0,class:"snippet-description-row open-redirects-copy"},{content:c(()=>[d("div",ga,g(o.strings.title),1),d("p",null,g(o.strings.description),1),l(h,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:c(()=>[l(p),b(" "+g(o.strings.button),1)]),_:1})]),_:1})):u("",!0)])}const _a=y(ua,[["render",ma],["__scopeId","data-v-cc3eda3b"]]),fa={setup(){return{postEditorStore:E()}},components:{CoreModal:W,RedirectsSideBar:_a,RedirectsLite:Ts},props:{parentComponentContext:String},data(){return{strings:{modalHeader:this.$t.__("Redirects",this.$td)}}}},Sa={class:"bd"};function ya(t,e,i,s,o,n){const p=a("redirects-lite"),h=a("core-modal"),m=a("redirects-side-bar");return r(),_("div",null,[t.$root.$data.screenContext==="metabox"?(r(),f(p,{key:0,noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),l(h,{show:s.postEditorStore.currentPost.redirects.modalOpen&&t.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=S=>s.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:c(()=>[b(g(o.strings.modalHeader),1)]),body:c(()=>[d("div",Sa,[l(p,{noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),this.parentComponentContext!=="modal"?(r(),f(m,{key:1})):u("",!0)])}const Vt=y(fa,[["render",ya]]),va={};function ba(t,e){return r(),_("div")}const ka=y(va,[["render",ba]]),wa={setup(){return{addons:Qt,licenseStore:I()}},components:{Redirects:Vt,RedirectsActivate:ka,RedirectsLite:Vt},props:{parentComponentContext:String}},Ca={class:"aioseo-tab-content"};function $a(t,e,i,s,o,n){const p=a("Redirects",!0),h=a("RedirectsLite"),m=a("RedirectsActivate");return r(),_("div",Ca,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(r(),f(p,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-redirects")?(r(),f(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-redirects")&&s.addons.canActivate("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(r(),f(m,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const Ea=y(wa,[["render",$a]]),Pa={};function Ta(t,e){return r(),_("div")}const xa=y(Pa,[["render",Ta]]),Aa={};function La(t,e){return r(),_("div")}const Ha=y(Aa,[["render",La]]),Ma={};function Ia(t,e){return r(),_("div")}const Ba=y(Ma,[["render",Ia]]),Oa={};function Da(t,e){return r(),_("div")}const Ra=y(Oa,[["render",Da]]),Va={};function Ua(t,e){return r(),_("div")}const Ka=y(Va,[["render",Ua]]),Na={};function Ga(t,e){return r(),_("div")}const Fa=y(Na,[["render",Ga]]),za={};function qa(t,e){return r(),_("div")}const Wa=y(za,[["render",qa]]),ja={};function Ya(t,e){return r(),_("div")}const Za=y(ja,[["render",Ya]]),Xa={};function Ja(t,e){return r(),_("div")}const Qa=y(Xa,[["render",Ja]]),tl={};function el(t,e){return r(),_("div")}const sl=y(tl,[["render",el]]),ol={};function il(t,e){return r(),_("div")}const rl=y(ol,[["render",il]]),nl={};function al(t,e){return r(),_("div")}const ll=y(nl,[["render",al]]),cl={};function dl(t,e){return r(),_("div")}const hl=y(cl,[["render",dl]]),ul={};function pl(t,e){return r(),_("div")}const gl=y(ul,[["render",pl]]),ml={};function _l(t,e){return r(),_("div")}const fl=y(ml,[["render",_l]]),Sl={};function yl(t,e){return r(),_("div")}const vl=y(Sl,[["render",yl]]),bl={};function kl(t,e){return r(),_("div")}const wl=y(bl,[["render",kl]]),Cl={};function $l(t,e){return r(),_("div")}const El=y(Cl,[["render",$l]]),Pl={};function Tl(t,e){return r(),_("div")}const xl=y(Pl,[["render",Tl]]),Al={};function Ll(t,e){return r(),_("div")}const Hl=y(Al,[["render",Ll]]),Ml={},Il={viewBox:"0 0 11 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-trash"},Bl=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),Ol=[Bl];function Dl(t,e){return r(),_("svg",Il,Ol)}const Rl=y(Ml,[["render",Dl]]),ue={components:{Article:xa,Book:Ha,Car:Ba,Course:Ra,Dataset:Ka,Event:Fa,FAQPage:Wa,FactCheck:Za,HowTo:Qa,JobPosting:sl,Movie:rl,Music:ll,Person:hl,Product:gl,ProductReview:fl,Recipe:vl,Service:wl,SoftwareApplication:El,Video:xl,WebPage:Hl,SvgArticle:Ge,SvgBook:Fe,SvgCar:ze,SvgCircleQuestionMark:Tt,SvgCustomSchema:qe,SvgCopy:We,SvgCourse:je,SvgDataset:Ye,SvgEvent:Ze,SvgEye:gt,SvgFaqPage:Xe,SvgFactCheck:Je,SvgFile:Qe,SvgFileEdit:ts,SvgGoogleSmall:es,SvgHowTo:ss,SvgJobPosting:os,SvgMovie:is,SvgMusic:rs,SvgPencil:ut,SvgPerson:ns,SvgProduct:as,SvgProductReview:ls,SvgRecipe:cs,SvgService:ds,SvgSoftwareApplication:hs,SvgTerminal:us,SvgTrash:Rl,SvgVideo:ps,SvgWebPage:gs}},Vl={mixins:[ue],props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(){const{childGraphs:t,graphs:e}=Ft();return{childGraphs:t,graphs:e}},computed:{graphLabel(){var i,s,o,n;if(this.customGraph)return this.$t.__("Custom Schema",this.$td)+" - "+this.graph.graphName;if(this.defaultGraph)return this.formatDefaultGraphName(this.defaultGraph);if((i=this.graph)!=null&&i.label)return this.graph.label;const t=(o=(s=this.graph)==null?void 0:s.slug)==null?void 0:o.toLowerCase();return((n=this.graphs.find(p=>p.slug===t))==null?void 0:n.label)||this.$t.__("Parsing Block Data...",this.$td)},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(i=>{const s=i[0];i[1].forEach(o=>{t===o.childGraphName&&(t=s)})});let e="";return this.graphs.forEach(i=>{i.graphName===t&&(e=i.slug)}),e},formatDefaultGraphName(t){let e="",i=t;return Object.entries(this.childGraphs).forEach(s=>{const o=s[0];s[1].forEach(n=>{e||t===n.childGraphName&&(e=o,i=n.label,this.graphs.forEach(p=>{p.graphName===o&&(e=p.label)}))})}),e?e+" - "+i+" "+this.$t.__("(Default)",this.$td):t+" "+this.$t.__("(Default)",this.$td)}}},Ul={class:"graph-container"},Kl={class:"graph"},Nl={class:"left"},Gl=["title"],Fl={class:"right action-buttons"};function zl(t,e,i,s,o,n){return r(),_("div",Ul,[d("div",Kl,[d("div",Nl,[(r(),f(M(n.graphIcon))),d("span",{title:n.graphLabel},g(n.graphLabel),9,Gl)]),d("div",Fl,[N(t.$slots,"buttons")])])])}const pe=y(Vl,[["render",zl]]),ql={emits:["close"],mixins:[ue],components:{CoreBlur:Lt,CoreMainTabs:Q,CoreModal:W,CoreTooltip:K,Cta:te,GraphCard:pe,SvgCirclePlus:xt},setup(){const{graphs:t}=Ft();return{graphs:t}},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.__("Unlock Schema Generator",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Schema Generator is a %1$s Feature",this.$td),"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)}]}}},Wl={class:"title"},jl=["innerHTML"],Yl={class:"schema-templates"},Zl={class:"main"},Xl={class:"schema-catalog"},Jl={class:"graphs"};function Ql(t,e,i,s,o,n){const p=a("svg-circle-question-mark"),h=a("core-tooltip"),m=a("core-main-tabs"),S=a("base-input"),C=a("svg-circle-plus"),$=a("base-button"),k=a("graph-card"),v=a("core-blur"),w=a("cta"),B=a("core-modal");return r(),f(B,{classes:["aioseo-post-schema-modal-cta"],onClose:e[0]||(e[0]=A=>t.$emit("close"))},{headerTitle:c(()=>[d("div",Wl,g(o.strings.schemaGenerator),1),l(h,null,{tooltip:c(()=>[d("span",{innerHTML:o.strings.headerTooltip},null,8,jl)]),default:c(()=>[l(p)]),_:1})]),body:c(()=>[l(v,null,{default:c(()=>[l(m,{tabs:o.tabs,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":c(({tab:A})=>[(r(),f(M(A.icon)))]),_:1},8,["tabs"]),d("div",Yl,[l(m,{tabs:o.templatesTabs,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":c(({tab:A})=>[(r(),f(M(A.icon)))]),_:1},8,["tabs"]),d("div",Zl,[l(S,{class:"search",size:"medium",prependIcon:"search",placeholder:o.strings.searchSchema},null,8,["placeholder"]),d("div",Xl,[d("div",Jl,[(r(!0),_(V,null,J(s.graphs,(A,Y)=>(r(),f(k,{key:A.graphName+Y,graph:A},{buttons:c(()=>[l($,{class:"small",type:"gray"},{default:c(()=>[l(C)]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),l(w,{"cta-link":t.$links.getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("schema-generator",null,t.$isPro?"pricing":"liteUpgrade"),"feature-list":o.features},{"header-text":c(()=>[b(g(o.strings.ctaHeader),1)]),description:c(()=>[b(g(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const tc=y(ql,[["render",Ql]]),ec={setup(){return{postEditorStore:E()}},components:{CoreAlert:U,CoreSettingsRow:R,CoreTooltip:K,CtaModal:tc,GraphCard:pe,SvgEye:gt},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"}},methods:{getDefaultSchemaTooltipOffset(){return X()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},sc={class:"graphs"},oc={key:0,class:"sidebar-description"},ic={class:"description"},rc=["innerHTML"],nc=["innerHTML"],ac={class:"buttons"};function lc(t,e,i,s,o,n){const p=a("svg-eye"),h=a("base-button"),m=a("core-tooltip"),S=a("graph-card"),C=a("core-alert"),$=a("cta-modal"),k=a("core-settings-row");return r(),_("div",{class:P(["aioseo-tab-content aioseo-post-schema",[{sidebar:n.isSidebar}]])},[l(k,{name:o.strings.schemaInUse},{content:c(()=>[d("div",sc,[n.isSidebar?(r(),_("div",oc,[d("p",ic,g(o.strings.sidebarDescription),1),d("p",{class:"description",innerHTML:t.$links.getDocLink(t.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,rc)])):u("",!0),s.postEditorStore.currentPost.schema.default.graphName&&s.postEditorStore.currentPost.schema.default.isEnabled?(r(),f(S,{key:1,defaultGraph:s.postEditorStore.currentPost.schema.default.graphName},{buttons:c(()=>[l(m,{offset:n.getDefaultSchemaTooltipOffset()},{tooltip:c(()=>[d("span",{innerHTML:o.strings.defaultGraphTooltip},null,8,nc)]),default:c(()=>[l(h,{class:"small no-hover",type:"gray"},{default:c(()=>[l(p)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):u("",!0)]),d("div",ac,[!s.postEditorStore.currentPost.schema.default.graphName||!s.postEditorStore.currentPost.schema.default.isEnabled?(r(),f(C,{key:0,class:"no-graphs",type:"yellow"},{default:c(()=>[b(g(o.strings.noGraphs),1)]),_:1})):u("",!0),l(h,{class:"medium",type:"blue",onClick:e[0]||(e[0]=v=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:c(()=>[b(g(o.strings.generateSchema),1)]),_:1}),l(h,{class:"medium",type:"gray",onClick:e[1]||(e[1]=v=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:c(()=>[b(g(o.strings.validateSchema),1)]),_:1})]),l($,{show:!n.isSidebar&&o.modalOpenMetabox,onClose:e[2]||(e[2]=v=>o.modalOpenMetabox=!1)},null,8,["show"]),l($,{show:n.isSidebar&&o.modalOpenSidebar,onClose:e[3]||(e[3]=v=>o.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const Ut=y(ec,[["render",lc]]),cc={setup(){return{licenseStore:I()}},components:{Schema:Ut,SchemaLite:Ut},props:{parentComponentContext:String}},dc={class:"aioseo-post-schema-view"};function hc(t,e,i,s,o,n){const p=a("schema",!0),h=a("schema-lite");return r(),_("div",dc,[s.licenseStore.isUnlicensed?u("",!0):(r(),f(p,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])),s.licenseStore.isUnlicensed?(r(),f(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):u("",!0)])}const uc=y(cc,[["render",hc]]),ge=t=>(Wt("data-v-20175fdb"),t=t(),jt(),t),pc={class:"aioseo-seo-revision-list-item"},gc={class:"aioseo-seo-revision-list-item__author"},mc={class:"aioseo-seo-revision-list-item__author__avatar"},_c={class:"aioseo-seo-revision-list-item__author__name"},fc=ge(()=>d("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Sc={class:"aioseo-seo-revision-list-item__action"},yc=ge(()=>d("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),vc={class:"aioseo-seo-revision-list-item__action__view"},bc={class:"aioseo-seo-revision-list-item__action__delete"},kc={__name:"ListItem",setup(t){const{currentUser:e}=zt(rt());return(i,s)=>(r(),_("div",pc,[d("div",gc,[d("span",mc,[l(G(xs),{src:G(e).avatar.url,size:G(e).avatar.size},null,8,["src","size"])]),d("span",_c,g(G(ke)(G(e).display_name,30)),1)]),fc,d("div",Sc,[yc,d("span",vc,[l(G(gt),{width:"18"})]),d("span",bc,[l(G(pt),{width:"18"})])])]))}},wc=y(kc,[["__scopeId","data-v-20175fdb"]]),Cc={components:{SeoRevisionListItem:wc}},$c={class:"aioseo-seo-revisions-list"};function Ec(t,e,i,s,o,n){const p=a("seo-revision-list-item");return r(),_("div",$c,[(r(),_(V,null,J(13,h=>l(p,{key:"seo-revision-list-item-"+h})),64))])}const Pc=y(Cc,[["render",Ec],["__scopeId","data-v-7b502c37"]]),Tc={setup(){return{seoRevisionsStore:rt()}},components:{CoreBlur:Lt,CoreModal:W,CoreSettingsRow:R,SeoRevisionsList:Pc,SeoRevisionsUpsell:As,SvgRightArrowShort:Ht},data(){return{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)}}}},xc={key:0,class:"aioseo-seo-revisions-metabox"},Ac={key:1,class:"aioseo-seo-revisions-sidebar"},Lc={class:"aioseo-seo-revisions-sidebar__modal-body"},Hc={class:"description"};function Mc(t,e,i,s,o,n){const p=a("seo-revisions-list"),h=a("core-blur"),m=a("seo-revisions-upsell"),S=a("core-modal"),C=a("svg-right-arrow-short"),$=a("base-button"),k=a("core-settings-row");return t.$root.$data.screenContext==="metabox"?(r(),_("div",xc,[l(h,null,{default:c(()=>[l(p)]),_:1}),l(m,{"parent-component-context":"metabox"})])):t.$root.$data.screenContext==="sidebar"?(r(),_("div",Ac,[l(S,{show:s.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=v=>s.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:c(()=>[b(g(o.strings.seoRevisions),1)]),body:c(()=>[d("div",Lc,[l(h,null,{default:c(()=>[l(p)]),_:1}),l(m,{"parent-component-context":"modal"})])]),_:1},8,["show"]),l(k,{align:""},{name:c(()=>[b(g(o.strings.seoRevisions),1)]),description:c(()=>[d("p",Hc,g(o.strings.description),1)]),content:c(()=>[l($,{class:"gray small",onClick:e[1]||(e[1]=L(v=>s.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:c(()=>[l(C,{width:"10"}),b(" "+g(o.strings.button),1)]),_:1})]),_:1})])):u("",!0)}const Kt=y(Tc,[["render",Mc],["__scopeId","data-v-3e031a88"]]),Ic={setup(){return{licenseStore:I()}},data(){return{license:ct}},components:{SeoRevisions:Kt,SeoRevisionsLite:Kt},props:{parentComponentContext:String}},Bc={class:"aioseo-seo-revisions aioseo-tab-content"};function Oc(t,e,i,s,o,n){const p=a("seo-revisions",!0),h=a("seo-revisions-lite");return r(),_("div",Bc,[!s.licenseStore.isUnlicensed&&o.license.hasCoreFeature("seo-revisions")?(r(),f(p,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):(r(),f(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"]))])}const Dc=y(Ic,[["render",Oc],["__scopeId","data-v-5e3c402f"]]),Rc={__name:"CountBadge",setup(t){const{itemsTotalCount:e}=zt(rt()),i=Le(()=>99<e.value?"99+":e.value);return(s,o)=>G(e)?(r(),_("span",{key:0,class:P(["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<G(e)}])},g(i.value),3)):u("",!0)}},Vc={},Uc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},Kc=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),Nc=[Kc];function Gc(t,e){return r(),_("svg",Uc,Nc)}const Fc=y(Vc,[["render",Gc]]),zc={},qc={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},Wc=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),jc=[Wc];function Yc(t,e){return r(),_("svg",qc,jc)}const Zc=y(zc,[["render",Yc]]),Xc={},Jc={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},Qc=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),td=[Qc];function ed(t,e){return r(),_("svg",Jc,td)}const sd=y(Xc,[["render",ed]]),od={},id={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},rd=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),nd=[rd];function ad(t,e){return r(),_("svg",id,nd)}const ld=y(od,[["render",ad]]),cd={setup(){return{licenseStore:I(),postEditorStore:E(),redirectsStore:we(),rootStore:q(),settingsStore:z(),seoRevisionsStore:rt()}},components:{Advanced:oo,Alert:le,CoreMainTabs:Q,CoreModal:W,General:de,LinkAssistant:On,ModalContent:ha,Redirects:Ea,Schema:uc,SeoRevisions:Dc,SeoRevisionsCountBadge:Rc,Social:he,SvgBackup:Fc,SvgBuild:Ps,SvgCaret:ht,SvgCircleInformationSolid:Zc,SvgClose:wt,SvgLinkSuggestion:Mt,SvgReceipt:sd,SvgRedirectCrossedArrows:ld,SvgSettings:ne,SvgShare:ae},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:this.$t.__("Preview Snippet Editor",this.$td)},activeMainSidebarTab:"",isPageBuilderEditor:X}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){$e(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)},"seoRevisionsStore.modalOpenSidebar"(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:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)},{slug:"schema",icon:"svg-receipt",name:this.$t.__("Schema",this.$td)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:this.$t.__("Redirects",this.$td),warning:0<this.redirectsStore.rows.filter(i=>!!i.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:this.$t.__("SEO Revisions",this.$td),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:this.$t.__("Advanced",this.$td)}];return!this.rootStore.aioseo.integration&&!X()&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&t.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:this.$t.__("Link Assistant",this.$td)}),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"&&F(this.getTabPermission(t.slug))):this.tabs.filter(t=>F(this.getTabPermission(t.slug))?!0:t.slug==="general"&&(F("aioseo_page_analysis")||F(this.getTabPermission(t.slug))))}},methods:{async processChangeTab(t){if(t!==null&&typeof t=="object"){this.processChangeTab(t.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:t.main,value:t.sub})});return}switch(this.$root.$data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const i=t===null?"sticky":"static";e.style.position=i});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,await this.$nextTick(),t){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0);break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&(this.postEditorStore.currentPost.linkAssistant.modalOpen=!0);break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&(this.postEditorStore.currentPost.redirects.modalOpen=!0);break;case"seoRevisions":await this.$nextTick(),!this.seoRevisionsStore.modalOpenSidebar&&(this.licenseStore.isUnlicensed||this.seoRevisionsStore.itemsLimit===0)&&(this.seoRevisionsStore.modalOpenSidebar=!0);break}},maybeResetActiveTab(t){t||this.$root.$data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.currentPost.modalOpen=!1},getTabPermission(t){const e=this.tabs.find(i=>i.slug===t);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(t){const e=this.tabs.find(i=>i.slug===t);return e==null?void 0:e.name}},mixins:[Rs],created(){switch(this.modal=ot()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{kt("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=ot()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{kt("aioseo-tab")},500);break}},beforeMount(){const t=document.querySelector(".interface-complementary-area__pin-unpin-item");t&&t!==null&&(t.style.display="block")},mounted(){dt()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},dd={class:"aioseo-app aioseo-post-settings"},hd={key:0,class:"aioseo-sidepanel"},ud=["onClick"],pd={class:"name"},gd={key:0,class:"aioseo-tab-title"};function md(t,e,i,s,o,n){const p=a("core-main-tabs"),h=a("svg-circle-information-solid"),m=a("svg-caret"),S=a("svg-close"),C=a("alert"),$=a("modal-content"),k=a("core-modal");return r(),_("div",dd,[t.$root.$data.screenContext!=="sidebar"?(r(),f(p,{key:0,tabs:n.getTabs,showSaveButton:!1,active:o.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=v=>n.processChangeTab(v))},{"var-tab-icon":c(({tab:v})=>[(r(),f(M(v.icon),{class:P([{warning:v.warning}])},null,8,["class"])),(r(),f(M(v.badge)))]),_:1},8,["tabs","active"])):u("",!0),l(it,{name:"route-fade",mode:"out-in"},{default:c(()=>[t.$root.$data.screenContext==="sidebar"&&o.activeTab===null?(r(),_("div",hd,[(r(!0),_(V,null,J(n.getTabs,(v,w)=>(r(),_("a",{key:w,class:"aioseo-sidepanel-button",href:"#",onClick:L(B=>n.processChangeTab(v.slug),["prevent"])},[(r(),f(M(v.icon),{class:"icon"})),d("div",pd,g(v.name),1),(r(),f(M(v.badge))),v.warning?(r(),f(h,{key:0,width:"15",height:"15"})):u("",!0),l(m)],8,ud))),128))])):u("",!0)]),_:1}),l(it,{name:"route-fade",mode:"out-in"},{default:c(()=>[o.activeTab?(r(),_("div",{key:o.activeTab,class:P(["aioseo-tab",{"is-page-builder":!!s.rootStore.aioseo.integration}])},[t.$root.$data.screenContext==="sidebar"?(r(),_("div",gd,[d("span",null,g(n.getTabName(o.activeTab)),1),l(S,{onClick:e[1]||(e[1]=v=>n.processChangeTab(null))})])):u("",!0),this.$root.$data.screenContext==="sidebar"?(r(),f(C,{key:1})):u("",!0),(r(),f(M(o.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=v=>n.processChangeTab(v))},null,32))],2)):u("",!0)]),_:1}),l(k,{show:s.postEditorStore.currentPost.modalOpen&&t.$root.$data.screenContext==="sidebar",onClose:n.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:c(()=>[b(g(o.strings.modalTitle),1)]),body:c(()=>[l($)]),_:1},8,["show","onClose"])])}const _d=y(cd,[["render",md]]),fd={setup(){return{postEditorStore:E()}},components:{Alert:le,MainView:_d},mixins:[Ie],data(){return{scrollContainer:".interface-interface-skeleton__content",scrollTimeout:1e3,ScrollAndHighlightTimeout:2e3}}};function Sd(t,e,i,s,o,n){const p=a("alert"),h=a("main-view");return r(),_("div",{onClick:e[0]||(e[0]=L(()=>{},["stop"])),id:"main-settings-cont"},[this.$root.$data.screenContext!=="sidebar"?(r(),f(p,{key:0})):u("",!0),s.postEditorStore.currentPost.id?(r(),f(h,{key:1})):u("",!0)])}const _h=y(fd,[["render",Sd]]);export{_h as P};