관리-도구
편집 파일: posts-table.96eb1db3.js
import{o,c as h,a as l,v as g,k as u,b as r,l as a,x as c,t as i,C as p,E as m,m as st,G as B,Y as U,h as O}from"./js/runtime-dom.esm-bundler.6789c400.js";import{l as it}from"./js/index.3eb8f806.js";import{l as ot}from"./js/index.ee8124c6.js";import{l as nt}from"./js/index.1ca84f0e.js";import{b as H,u as Z,i as lt,r as j,h as I,l as D,c as F}from"./js/index.20192476.js";import{a as rt}from"./js/allowed.f428d9c9.js";import{u as G}from"./js/TruSeoScore.c8bdf339.js";import{t as q,q as at,i as ct}from"./js/postTitle.d67eb903.js";import{l as z}from"./js/license.37048367.js";import{_ as Q,b as X,f as Y}from"./js/Caret.662da1f3.js";import{C as J}from"./js/HtmlTagsEditor.4c8f78eb.js";import{_ as dt}from"./js/ScoreButton.e2a31604.js";import{C as K}from"./js/Tooltip.b6b45c85.js";import{_ as pt}from"./js/IndexStatus.d0fe7619.js";import{S as ut}from"./js/LogoGear.29bd352d.js";import{_ as A}from"./js/_plugin-vue_export-helper.249dac1d.js";import"./js/translations.12335a6a.js";import{_ as y}from"./js/default-i18n.54b5d8cd.js";/* empty css */import"./js/helpers.f95d5840.js";import"./js/metabox.dc73facf.js";import"./js/cleanForSlug.f9ffe7db.js";import"./js/toString.1401d490.js";import"./js/_baseTrim.940c51cf.js";import"./js/_stringToArray.08127ca9.js";import"./js/_baseSet.32e7a763.js";import"./js/regex.f8017116.js";import"./js/upperFirst.96c04516.js";import"./js/Editor.5a453aa4.js";import"./js/isEqual.51bf23f5.js";import"./js/_baseIsEqual.6bc92395.js";import"./js/_getTag.8dc22eac.js";import"./js/_baseClone.e959332d.js";import"./js/_arrayEach.f4f00336.js";import"./js/UnfilteredHtml.4ebe3c5f.js";import"./js/constants.2019bcb3.js";import"./js/CheckSolid.9e151b0e.js";const mt={},ht={viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-headline-analyzer"},gt=l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5448 1.76771H14.6665V1.79272L10.5448 4.61008V1.76771ZM5.46515 8.08232V1.76779H1.34351V4.8899L1.34378 4.71192L5.42731 8.10819L5.46515 8.08232ZM1.34351 11.4568L5.46515 14.2652V15.0999H1.34351V11.4568ZM10.5448 10.8851L14.6665 8.14027V15.0982H10.5448V10.8851Z",fill:"currentColor"},null,-1),_t=l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.46515 8.05739L5.42731 8.08325L1.34378 4.68698L1.34351 4.86412V1.76779H5.46515V8.05739ZM5.46515 14.2083L1.34351 11.3998V15.0999H5.46515V14.2083ZM10.5448 10.8281L14.6665 8.08332V15.0982H10.5448V10.8281ZM14.6665 1.76778L10.5448 4.58515V1.76771H14.6665V1.76778Z",fill:"currentColor"},null,-1),ft=l("path",{d:"M5.42725 9.45857L14.6665 3.14303V6.76487L5.46703 12.8912L1.33325 10.0745L1.34372 6.06231L5.42725 9.45857Z",fill:"currentColor"},null,-1),wt=[gt,_t,ft];function yt(e,s){return o(),h("svg",ht,wt)}const vt=A(mt,[["render",yt]]),b="all-in-one-seo-pack",Tt={setup(){const{runAnalysis:e,strings:s}=G();return{composableStrings:s,optionsStore:H(),rootStore:Z(),runAnalysis:e,searchStatisticsStore:lt()}},components:{BaseButton:Q,CoreHtmlTagsEditor:J,CoreLoader:X,CoreScoreButton:dt,CoreTooltip:K,IndexStatus:pt,SvgAioseoLogoGear:ut,SvgHeadlineAnalyzer:vt,SvgPencil:Y},props:{post:Object,posts:Array},data(){return{allowed:rt,postId:null,columnName:null,value:null,title:null,titleParsed:null,postDescription:null,descriptionParsed:null,imageTitle:null,imageAltTag:null,showEditTitle:!1,showEditDescription:!1,showEditImageTitle:!1,showEditImageAltTag:!1,showTruSeo:!1,isSpecialPage:!1,inspectionResult:!1,inspectionResultLoading:!0,postLoading:!1,strings:j(this.composableStrings,{title:y("Title",b),description:y("Description",b),imageTitle:y("Image Title",b),imageAltTag:y("Image Alt Tag",b),saveChanges:y("Save Changes",b),discardChanges:y("Discard Changes",b),truSeoScore:y("TruSEO Score",b),headlineScore:y("Headline Score",b)}),license:z}},computed:{showIndexStatus(){var f,t,n;if(!this.rootStore.isPro||!z.hasCoreFeature("search-statistics","index-status"))return!1;const e=!this.searchStatisticsStore.unverifiedSite,s=typeof((n=(t=(f=this.optionsStore.internalOptions.internal)==null?void 0:f.searchStatistics)==null?void 0:t.profile)==null?void 0:n.key)=="string",d=this.allowed("aioseo_search_statistics_settings");return e&&s&&d},showHeadlineAnalyzer(){return this.rootStore.aioseo.data.isClassicEditorActive||this.post.postType==="product"?!1:this.optionsStore.options.advanced.headlineAnalyzer}},methods:{save(){this.showEditTitle=!1,this.showEditDescription=!1,this.post.title=this.title,this.post.description=this.postDescription,this.postLoading=!0,I.post(D.restUrl("posts-list/update-details-column")).send({postId:this.post.id,title:this.post.title,description:this.post.description}).then(e=>{this.titleParsed=e.body.title,this.descriptionParsed=e.body.description,this.post.titleParsed=e.body.title,this.post.descriptionParsed=e.body.description,this.$root.$data.screen.base!=="upload"&&this.runAnalysis(this.post.id)}).catch(e=>{console.error(`Unable to update post with ID ${this.post.id}: ${e}`)}).finally(()=>{this.postLoading=!1})},saveImage(){this.showEditImageTitle=!1,this.showEditImageAltTag=!1,this.post.title=this.title,this.post.description=this.postDescription,this.post.imageTitle=this.imageTitle,this.post.imageAltTag=this.imageAltTag,I.post(D.restUrl("posts-list/update-details-column")).send({postId:this.post.id,isMedia:!0,title:this.post.title,description:this.post.description,imageTitle:this.post.imageTitle,imageAltTag:this.post.imageAltTag}).then(()=>{}).catch(e=>{console.error(`Unable to update attachment with ID ${this.post.id}: ${e}`)})},cancel(){this.value=this.post.value,this.showEditTitle=!1,this.showEditDescription=!1,this.showEditImageTitle=!1,this.showEditImageAltTag=!1},editTitle(){this.showEditTitle=!0},editDescription(){this.showEditDescription=!0},editImageTitle(){this.showEditImageTitle=!0},editImageAlt(){this.showEditImageAltTag=!0},truncate:q,updatePostTitle(e,s){const d=document.getElementById(`post-${e}`);if(!d)return;const f=d.getElementsByClassName("title")[0].getElementsByTagName("a")[0];if(!f)return;const t=f.getElementsByTagName("span")[0];f.innerText=s,f.prepend(t)},updateInspectionResult(e){const{inspectionResult:s,inspectionResultLoading:d}=e;this.inspectionResult=s,this.inspectionResultLoading=d}},mounted(){this.postId=this.post.id,this.columnName=this.post.columnName,this.value=this.post.value,this.imageTitle=this.post.imageTitle,this.imageAltTag=this.post.imageAltTag,this.isSpecialPage=this.post.isSpecialPage,this.title=this.post.title||this.post.defaultTitle,this.titleParsed=this.post.titleParsed,this.postDescription=this.post.description||this.post.defaultDescription,this.descriptionParsed=this.post.descriptionParsed,this.inspectionResult=this.post.inspectionResult,this.inspectionResultLoading=this.post.inspectionResultLoading,this.post.reload&&this.save(),window.aioseoBus.$on("updateInspectionResult"+this.postId,this.updateInspectionResult)},beforeUnmount(){window.aioseoBus.$off("updateInspectionResult"+this.postId,this.updateInspectionResult)},async created(){this.showTruSeo=at()}},Ct={key:0,class:"edit-row scores"},kt={class:"edit-row edit-title"},bt={key:0},St=l("strong",null,":",-1),Et={key:1,class:"edit-row"},It={class:"edit-row edit-description"},Dt=["id"],At=l("strong",null,":",-1),Pt={key:2,class:"edit-row"},Lt={class:"edit-row edit-image-title"},Vt=["id"],xt=l("strong",null,":",-1),Nt={key:3,class:"edit-row"},Rt={class:"edit-row edit-image-alt"},zt=["id"],Mt=l("strong",null,":",-1),Bt={key:4,class:"edit-row"};function Ut(e,s,d,f,t,n){var N,R;const v=g("index-status"),C=g("svg-headline-analyzer"),T=g("core-score-button"),_=g("core-tooltip"),w=g("svg-aioseo-logo-gear"),E=g("core-loader"),P=g("svg-pencil"),L=g("core-html-tags-editor"),k=g("base-button");return o(),h("div",{class:B(["aioseo-details-column",{editing:t.showEditTitle||t.showEditDescription||t.showEditImageTitle||t.showEditImageAltTag}])},[l("div",null,[e.$root.$data.screen.base==="edit"&&!t.isSpecialPage?(o(),h("div",Ct,[n.showIndexStatus?(o(),u(v,{key:0,result:(N=t.inspectionResult)==null?void 0:N.indexStatusResult,"result-link":(R=t.inspectionResult)==null?void 0:R.inspectionResultLink,loading:t.inspectionResultLoading,viewable:d.post.isPostVisible,"tooltip-offset":"-150px,0"},null,8,["result","result-link","loading","viewable"])):r("",!0),n.showHeadlineAnalyzer?(o(),u(_,{key:1,type:"action"},{tooltip:a(()=>[c(i(t.strings.headlineScore),1)]),default:a(()=>[p(T,{score:d.post.headlineScore,postId:t.postId},{icon:a(()=>[p(C)]),_:1},8,["score","postId"])]),_:1})):r("",!0),t.showTruSeo&&t.allowed("aioseo_page_analysis")?(o(),u(_,{key:2,type:"action"},{tooltip:a(()=>[c(i(t.strings.truSeoScore),1)]),default:a(()=>[p(T,{score:d.post.value,postId:t.postId},{icon:a(()=>[p(w)]),_:1},8,["score","postId"])]),_:1})):r("",!0)])):r("",!0),l("div",null,[t.allowed("aioseo_page_general_settings")?(o(),u(_,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditTitle},{tooltip:a(()=>[l("strong",null,i(t.strings.title)+":",1),c(" "+i(t.titleParsed),1)]),default:a(()=>[l("div",kt,[l("strong",null,i(t.strings.title),1),t.showEditTitle?r("",!0):(o(),h("span",bt,[St,c(" "+i(n.truncate(t.titleParsed,100)),1)])),t.postLoading?(o(),u(E,{key:1,dark:""})):r("",!0),t.showEditTitle?r("",!0):(o(),u(P,{key:2,class:"pencil-icon",onClick:m(n.editTitle,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):r("",!0)]),t.showEditTitle?(o(),h("div",Et,[p(L,{modelValue:t.title,"onUpdate:modelValue":s[0]||(s[0]=S=>t.title=S),"line-numbers":!1,single:"","tags-context":"postTitle",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["post_title"]},null,8,["modelValue"]),p(k,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(k,{type:"blue",size:"small",onClick:m(n.save,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0),l("div",null,[t.allowed("aioseo_page_general_settings")?(o(),u(_,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditDescription},{tooltip:a(()=>[l("strong",null,i(t.strings.description)+":",1),c(" "+i(n.truncate(t.descriptionParsed)),1)]),default:a(()=>[l("div",It,[l("strong",null,i(t.strings.description),1),t.showEditDescription?r("",!0):(o(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[At,c(" "+i(n.truncate(t.descriptionParsed)),1)],8,Dt)),t.postLoading?(o(),u(E,{key:1,dark:""})):r("",!0),t.showEditDescription?r("",!0):(o(),u(P,{key:2,class:"pencil-icon",onClick:m(n.editDescription,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):r("",!0)]),t.showEditDescription?(o(),h("div",Pt,[p(L,{modelValue:t.postDescription,"onUpdate:modelValue":s[1]||(s[1]=S=>t.postDescription=S),"line-numbers":!1,"tags-context":"postDescription",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["post_excerpt"]},null,8,["modelValue"]),p(k,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(k,{type:"blue",size:"small",onClick:m(n.save,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0),st(e.$slots,"default"),l("div",null,[e.$root.$data.screen.base==="upload"&&d.post.showMedia?(o(),u(_,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditImageTitle},{tooltip:a(()=>[l("strong",null,i(t.strings.imageTitle)+":",1),c(" "+i(t.imageTitle),1)]),default:a(()=>[l("div",Lt,[l("strong",null,i(t.strings.imageTitle),1),t.showEditImageTitle?r("",!0):(o(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[xt,c(" "+i(t.imageTitle),1)],8,Vt)),t.showEditImageTitle?r("",!0):(o(),u(P,{key:1,class:"pencil-icon",onClick:m(n.editImageTitle,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):r("",!0)]),t.showEditImageTitle?(o(),h("div",Nt,[p(L,{modelValue:t.imageTitle,"onUpdate:modelValue":s[2]||(s[2]=S=>t.imageTitle=S),"line-numbers":!1,single:"","tags-context":"attachmentTitle",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["image_title"]},null,8,["modelValue"]),p(k,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(k,{type:"blue",size:"small",onClick:m(n.saveImage,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0),l("div",null,[e.$root.$data.screen.base==="upload"&&d.post.showMedia?(o(),u(_,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditImageAltTag},{tooltip:a(()=>[l("strong",null,i(t.strings.imageAltTag)+":",1),c(" "+i(t.imageAltTag),1)]),default:a(()=>[l("div",Rt,[l("strong",null,i(t.strings.imageAltTag),1),t.showEditImageAltTag?r("",!0):(o(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[Mt,c(" "+i(t.imageAltTag),1)],8,zt)),t.showEditImageAltTag?r("",!0):(o(),u(P,{key:1,class:"pencil-icon",onClick:m(n.editImageAlt,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):r("",!0)]),t.showEditImageAltTag?(o(),h("div",Bt,[p(L,{modelValue:t.imageAltTag,"onUpdate:modelValue":s[3]||(s[3]=S=>t.imageAltTag=S),"line-numbers":!1,single:"","tags-context":"attachmentDescription",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["alt_tag"]},null,8,["modelValue"]),p(k,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(k,{type:"blue",size:"small",onClick:m(n.saveImage,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0)])],2)}const Ot=A(Tt,[["render",Ut]]),Ht={components:{CorePostColumn:Ot},props:{post:Object}};function Zt(e,s,d,f,t,n){const v=g("core-post-column");return o(),u(v,{post:d.post},null,8,["post"])}const M=A(Ht,[["render",Zt]]),jt={setup(){return{rootStore:Z()}},components:{PostColumn:M,PostColumnLite:M},props:{post:Object}},Ft={class:"aioseo-app"};function Gt(e,s,d,f,t,n){const v=g("PostColumn"),C=g("PostColumnLite");return o(),h("div",Ft,[f.rootStore.isPro?(o(),u(v,{key:0,post:d.post},null,8,["post"])):r("",!0),f.rootStore.isPro?r("",!0):(o(),u(C,{key:1,post:d.post},null,8,["post"]))])}const qt=A(jt,[["render",Gt]]),V="all-in-one-seo-pack",Qt={setup(){const{strings:e}=G();return{composableStrings:e}},components:{BaseButton:Q,CoreHtmlTagsEditor:J,CoreLoader:X,CoreTooltip:K,SvgPencil:Y},props:{term:Object,terms:Array,index:Number},data(){return{termId:null,columnName:null,title:null,titleParsed:null,termDescription:null,descriptionParsed:null,showEditTitle:!1,showEditDescription:!1,showTruSeo:!1,termLoading:!1,strings:j(this.composableStrings,{title:y("Title",V),description:y("Description",V),saveChanges:y("Save Changes",V),discardChanges:y("Discard Changes",V)})}},methods:{save(){this.showEditTitle=!1,this.showEditDescription=!1,this.term.title=this.title,this.term.description=this.termDescription,this.termLoading=!0,I.post(D.restUrl("terms-list/update-details-column")).send({termId:this.term.id,title:this.term.title,description:this.term.description}).then(e=>{this.titleParsed=e.body.title,this.descriptionParsed=e.body.description,this.term.titleParsed=e.body.title,this.term.descriptionParsed=e.body.description}).catch(e=>{console.error(`Unable to update term with ID ${this.term.id}: ${e}`)}).finally(()=>{this.termLoading=!1})},cancel(){this.showEditTitle=!1,this.showEditDescription=!1},editTitle(){this.showEditTitle=!0},editDescription(){this.showEditDescription=!0},truncate:q},mounted(){this.termId=this.term.id,this.columnName=this.term.columnName,this.title=this.term.title,this.titleParsed=this.term.titleParsed,this.termDescription=this.term.description,this.descriptionParsed=this.term.descriptionParsed,this.term.reload&&this.save()},async created(){this.showTruSeo=ct()}},Xt={class:"aioseo-app"},Yt={class:"edit-row edit-title"},Jt={key:0},Kt=l("strong",null,":",-1),Wt={key:0,class:"edit-row"},$t={class:"edit-row edit-description"},te={key:0},ee=l("strong",null,":",-1),se={key:1,class:"edit-row"};function ie(e,s,d,f,t,n){const v=g("core-loader"),C=g("svg-pencil"),T=g("core-tooltip"),_=g("core-html-tags-editor"),w=g("base-button");return o(),h("div",Xt,[l("div",{class:B(["aioseo-details-column",{editing:t.showEditTitle||t.showEditDescription}])},[l("div",null,[l("div",null,[p(T,{class:"aioseo-details-column__tooltip"},{tooltip:a(()=>[l("strong",null,i(t.strings.title)+":",1),c(" "+i(t.titleParsed),1)]),default:a(()=>[l("div",Yt,[l("strong",null,i(t.strings.title),1),t.showEditTitle?r("",!0):(o(),h("span",Jt,[Kt,c(" "+i(n.truncate(t.titleParsed,100)),1)])),t.termLoading?(o(),u(v,{key:1,dark:""})):r("",!0),t.showEditTitle?r("",!0):(o(),u(C,{key:2,class:"pencil-icon",onClick:m(n.editTitle,["prevent"])},null,8,["onClick"]))])]),_:1})]),t.showEditTitle?(o(),h("div",Wt,[p(_,{modelValue:t.title,"onUpdate:modelValue":s[0]||(s[0]=E=>t.title=E),"line-numbers":!1,single:"","tags-context":"taxonomyTitle",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["taxonomy_title"]},null,8,["modelValue"]),p(w,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(w,{type:"blue",size:"small",onClick:m(n.save,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0),l("div",null,[p(T,{class:"aioseo-details-column__tooltip"},{tooltip:a(()=>[l("strong",null,i(t.strings.description)+":",1),c(" "+i(t.descriptionParsed),1)]),default:a(()=>[l("div",$t,[l("strong",null,i(t.strings.description),1),t.showEditDescription?r("",!0):(o(),h("span",te,[ee,c(" "+i(n.truncate(t.descriptionParsed)),1)])),t.termLoading?(o(),u(v,{key:1,dark:""})):r("",!0),t.showEditDescription?r("",!0):(o(),u(C,{key:2,class:"pencil-icon",onClick:m(n.editDescription,["prevent"])},null,8,["onClick"]))])]),_:1})]),t.showEditDescription?(o(),h("div",se,[p(_,{modelValue:t.termDescription,"onUpdate:modelValue":s[1]||(s[1]=E=>t.termDescription=E),"line-numbers":!1,"tags-context":"taxonomyDescription",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["taxonomy_description"]},null,8,["modelValue"]),p(w,{type:"gray",size:"small",onClick:m(n.cancel,["prevent"])},{default:a(()=>[c(i(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(w,{type:"blue",size:"small",onClick:m(n.save,["prevent"])},{default:a(()=>[c(i(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):r("",!0)])],2)])}const oe=A(Qt,[["render",ie]]);F();const W=e=>(e=it(e),e=ot(e),e=nt(e),F(e),e),$=e=>{const s=document.getElementById(e);s!=null&&s.__vue_app__&&s.__vue_app__.unmount()},tt=e=>{$(`${e.columnName}-${e.id}`),W(U({name:"Standalone/PostsTable/"+e.id,data(){return{screen:window.aioseo.screen}},render:()=>O(qt)},{post:e})).mount(`#${e.columnName}-${e.id}`)},et=e=>{if(!e)return;const s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name","aioseo-has-details-column"),s.setAttribute("value",!0),e.append(s)};window.aioseo.posts&&0<window.aioseo.posts.length&&I.post(D.restUrl("posts-list/load-details-column")).send({ids:window.aioseo.posts.map(e=>e.id)}).then(e=>{window.aioseo.posts=window.aioseo.posts.map(s=>({...s,...e.body.posts.find(d=>d.id===s.id)})),window.aioseo.posts.forEach(s=>{tt(s)})});const x=e=>{$(`${e.columnName}-${e.id}`),W(U({name:"Standalone/TermsTable/"+e.id,data(){return{screen:window.aioseo.screen}},render:()=>O(oe)},{term:e})).mount(`#${e.columnName}-${e.id}`)};window.aioseo.terms&&0<window.aioseo.terms.length&&window.aioseo.posts.length===0&&I.post(D.restUrl("terms-list/load-details-column")).send({ids:window.aioseo.terms.map(e=>e.id)}).then(e=>{window.aioseo.terms=window.aioseo.terms.map(s=>({...s,...e.body.terms.find(d=>d.id===s.id)})),window.aioseo.terms.forEach(s=>{x(s)})});et(document.querySelector("#inline-edit div"));et(document.getElementById("addtag"));(function(e){e(document).on("ajaxComplete",(s,d,f)=>{var v,C;const t=new URLSearchParams(f.data),n=t==null?void 0:t.get("action");if(!(!t||!n)){if(n==="inline-save"){const{post_ID:T}=Object.fromEntries(t.entries()),_=window.aioseo.posts.find(w=>w.id===parseInt(T));tt({..._,reload:!0})}if(n==="inline-save-tax"){const{tax_ID:T}=Object.fromEntries(t.entries()),_=window.aioseo.terms.find(w=>w.id===parseInt(T));x({..._,reload:!0})}if(n==="add-tag"){const T=e(d.responseXML).find("term_id").text(),_=e(d.responseXML).find("term taxonomy").text(),w=H();x({id:parseInt(T),columnName:"aioseo-details",title:(v=w.dynamicOptions.searchAppearance.taxonomies[_])==null?void 0:v.title,description:(C=w.dynamicOptions.searchAppearance.taxonomies[_])==null?void 0:C.metaDescription,reload:!0})}}})})(window.jQuery);