Sid Gifari File Manager
🏠Root
/
home
/
ailwtbdh
/
superstepsgroup.com
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
js
/
Editing: Index.b2e6727b.js
import{f as r,i as d,j as i,aq as m,Q as v,M as f,a0 as u,T as b,O as T,ad as M,U as l,P as H,R as g,ae as S,u as z,r as Z,S as $,v as O,B as W,a4 as K,at as rt,aF as ct}from"./vendor-vue-ui.f00a1236.js";import{e as lt,c as E,q as dt,b1 as tt,b as q,h as et,d as U,bj as ut,O as ft,y as ot,X as mt,g as gt,r as _t,C as pt,A as ht}from"./app-core.b862f9c8.js";/* empty css */import{C as vt,u as yt}from"./Tabs.37afc36c.js";import{C as bt}from"./Index.3967c277.js";import{C as St,G as kt,_ as Ct}from"./Header.e6764b45.js";import{C as Nt,a as wt}from"./LicenseKeyBar.7c3c080c.js";import{S as Dt}from"./Logo.76a62e7a.js";import{S as it}from"./Close.de45e465.js";import{_ as L}from"./_plugin-vue_export-helper.eefbdd86.js";import{S as Tt}from"./Support.09cb5ade.js";import{_ as c,a as B}from"./vendor-other.7b559694.js";import{_ as st,C as Lt}from"./Button.6c09d515.js";import{u as Pt}from"./Url.2a5968be.js";import{S as nt,a as X}from"./Pencil.1ca5815a.js";import{S as At}from"./Exclamation.2e91b03a.js";import{S as Bt}from"./Gear.25f22448.js";import{T as R}from"./Slide.805812ec.js";import{m as It}from"./vendor-lodash.d3ad8b99.js";const Mt={},Ut={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-description"};function Ht(e,t){return r(),d("svg",Ut,[...t[0]||(t[0]=[i("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"currentColor"},null,-1)])])}const xt=L(Mt,[["render",Ht]]),Ot={},zt={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-folder-open"};function Et(e,t){return r(),d("svg",zt,[...t[0]||(t[0]=[i("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",fill:"currentColor"},null,-1)])])}const qt=L(Ot,[["render",Et]]),C="all-in-one-seo-pack",Rt={setup(){return{licenseStore:et(),rootStore:q(),helpPanelStore:tt(),settingsStore:dt(),links:E}},components:{CoreApiBar:wt,CoreLicenseKeyBar:Nt,CoreUpgradeBar:St,SvgAioseoLogo:Dt,SvgClose:it,SvgDescription:xt,SvgFolderOpen:qt,SvgSupport:Tt},data(){return{searchItem:null,strings:{close:c("Close",C),search:c("Search",C),viewAll:c("View All",C),docs:c("Docs",C),viewDocumentation:c("View Documentation",C),browseDocumentation:B(c("Browse documentation, reference material, and tutorials for %1$s.",C),"AIOSEO"),viewAllDocumentation:c("View All Documentation",C),getSupport:c("Get Support",C),submitTicket:c("Submit a ticket and our world class support team will be in touch soon.",C),submitSupportTicket:c("Submit a Support Ticket",C),upgradeToPro:c("Upgrade to Pro",C)}}},computed:{filteredDocs(){return this.searchItem!==""?Object.values(this.helpPanelStore.docs).filter(e=>this.searchItem!==null?e.title.toLowerCase().includes(this.searchItem.toLowerCase()):null):null}},methods:{inputSearch:function(e){lt(()=>{this.searchItem=e},1e3)},toggleSection:function(e){e.target.parentNode.parentNode.classList.toggle("opened")},toggleDocs:function(e){e.target.previousSibling.classList.toggle("opened"),e.target.style.display="none"},toggleModal(){document.getElementById("aioseo-help-modal").classList.toggle("visible"),document.body.classList.toggle("modal-open")},getCategoryDocs(e){return Object.values(this.helpPanelStore.docs).filter(t=>t.categories.flat().includes(e)?t:null)}}},Vt={id:"aioseo-help-modal",class:"aioseo-help"},jt={class:"aioseo-help-header"},Gt={class:"logo"},Ft=["href"],Yt=["title"],Wt={class:"help-content"},Kt={id:"aioseo-help-search"},Xt={id:"aioseo-help-result"},Qt={class:"aioseo-help-docs"},Jt={class:"icon"},Zt=["href"],$t={id:"aioseo-help-categories"},te={class:"aioseo-help-categories-toggle"},ee={class:"folder-open"},oe={class:"title"},ie={class:"aioseo-help-docs"},se={class:"icon"},ne=["href"],ae={class:"aioseo-help-additional-docs"},re={class:"icon"},ce=["href"],le={id:"aioseo-help-footer"},de={class:"aioseo-help-footer-block"},ue=["href"],fe={class:"aioseo-help-footer-block"},me=["href"];function ge(e,t,a,o,s,n){const h=m("core-upgrade-bar"),p=m("core-license-key-bar"),_=m("core-api-bar"),y=m("svg-aioseo-logo"),x=m("svg-close"),V=m("base-input"),I=m("svg-description"),j=m("svg-folder-open"),A=m("base-button"),at=m("svg-support");return r(),d("div",Vt,[!o.rootStore.isPro&&o.settingsStore.settings.showUpgradeBar&&o.rootStore.pong?(r(),v(h,{key:0})):f("",!0),o.rootStore.isPro&&o.licenseStore.isUnlicensed&&o.rootStore.pong?(r(),v(p,{key:1})):f("",!0),o.rootStore.pong?f("",!0):(r(),v(_,{key:2})),i("div",jt,[i("div",Gt,[o.licenseStore.isUnlicensed?(r(),d("a",{key:0,href:o.links.utmUrl("header-logo"),target:"_blank"},[u(y,{id:"aioseo-help-logo"})],8,Ft)):f("",!0),o.licenseStore.isUnlicensed?f("",!0):(r(),v(y,{key:1,id:"aioseo-help-logo"}))]),i("div",{id:"aioseo-help-close",title:s.strings.close,onClick:t[0]||(t[0]=b((...N)=>n.toggleModal&&n.toggleModal(...N),["stop"]))},[u(x)],8,Yt)]),i("div",Wt,[i("div",Kt,[u(V,{type:"text",size:"medium",placeholder:s.strings.search,"onUpdate:modelValue":t[1]||(t[1]=N=>n.inputSearch(N))},null,8,["placeholder"])]),i("div",Xt,[i("ul",Qt,[(r(!0),d(T,null,M(n.filteredDocs,(N,P)=>(r(),d("li",{key:P},[i("span",Jt,[u(I)]),i("a",{href:o.links.utmUrl("help-panel-doc","",N.url),rel:"noopener noreferrer",target:"_blank"},l(N.title),9,Zt)]))),128))])]),i("div",$t,[i("ul",te,[(r(!0),d(T,null,M(o.helpPanelStore.categories,(N,P)=>(r(),d("li",{key:P,class:H(["aioseo-help-category",{opened:P==="getting-started"}])},[i("header",{onClick:t[2]||(t[2]=b(w=>n.toggleSection(w),["stop"]))},[i("span",ee,[u(j)]),i("span",oe,l(N),1),t[4]||(t[4]=i("span",{class:"dashicons dashicons-arrow-right-alt2"},null,-1))]),i("ul",ie,[(r(!0),d(T,null,M(n.getCategoryDocs(P).slice(0,5),(w,G)=>(r(),d("li",{key:G},[i("span",se,[u(I)]),i("a",{href:o.links.utmUrl("help-panel-doc","",w.url),rel:"noopener noreferrer",target:"_blank"},l(w.title),9,ne)]))),128)),i("div",ae,[(r(!0),d(T,null,M(n.getCategoryDocs(P).slice(5,n.getCategoryDocs(P).length),(w,G)=>(r(),d("li",{key:G},[i("span",re,[u(I)]),i("a",{href:o.links.utmUrl("help-panel-doc","",w.url),rel:"noopener noreferrer",target:"_blank"},l(w.title),9,ce)]))),128))]),n.getCategoryDocs(P).length>=5?(r(),v(A,{key:0,class:"aioseo-help-docs-viewall gray medium",onClick:t[3]||(t[3]=b(w=>n.toggleDocs(w),["stop"]))},{default:g(()=>[S(l(s.strings.viewAll)+" "+l(N)+" "+l(s.strings.docs),1)]),_:2},1024)):f("",!0)])],2))),128))])]),i("div",le,[i("div",de,[i("a",{href:o.links.utmUrl("help-panel-all-docs","","https://aioseo.com/docs/"),rel:"noopener noreferrer",target:"_blank"},[u(I),i("h3",null,l(s.strings.viewDocumentation),1),i("p",null,l(s.strings.browseDocumentation),1),u(A,{class:"aioseo-help-docs-viewall gray small"},{default:g(()=>[S(l(s.strings.viewAllDocumentation),1)]),_:1})],8,ue)]),i("div",fe,[i("a",{href:!o.rootStore.isPro||!o.licenseStore.license.isActive?o.links.getUpsellUrl("help-panel","get-support","liteUpgrade"):o.links.utmUrl("help-panel-support","","https://aioseo.com/account/support/"),rel:"noopener noreferrer",target:"_blank"},[u(at),i("h3",null,l(s.strings.getSupport),1),i("p",null,l(s.strings.submitTicket),1),o.rootStore.isPro&&o.licenseStore.license.isActive?(r(),v(A,{key:0,class:"aioseo-help-docs-support blue small"},{default:g(()=>[S(l(s.strings.submitSupportTicket),1)]),_:1})):f("",!0),!o.rootStore.isPro||!o.licenseStore.license.isActive?(r(),v(A,{key:1,class:"aioseo-help-docs-support green small"},{default:g(()=>[S(l(s.strings.upgradeToPro),1)]),_:1})):f("",!0)],8,me)])])])])}const _e=L(Rt,[["render",ge]]),F="all-in-one-seo-pack",pe=()=>{const e={notifications:c("Notifications",F),newNotifications:c("New Notifications",F),activeNotifications:c("Active Notifications",F)},t=Z(!1),a=U(),o=z(()=>t.value?a.dismissedNotificationsCount:a.activeNotificationsCount),s=z(()=>t.value?a.dismissedNotifications:a.activeNotifications),n=z(()=>t.value?e.notifications:e.newNotifications);return{dismissed:t,notificationTitle:n,notifications:s,notificationsCount:o,strings:e}},he=""+window.__aioseoDynamicImportPreload__("images/dannie-detective.b4823250.png"),ve="all-in-one-seo-pack",ye={emits:["dismissed-notification"],setup(){const{button1Loading:e,button2Loading:t,getHref:a,getTagType:o,getTarget:s,processButtonClick:n}=Pt();return{button1Loading:e,button2Loading:t,getHref:a,getTagType:o,getTarget:s,notificationsStore:U(),processButtonClick:n,sanitizeString:ft}},components:{BaseButton:st,SvgCircleCheck:X,SvgCircleClose:nt,SvgCircleExclamation:At,SvgGear:Bt,TransitionSlide:R},props:{notification:{type:Object,required:!0}},data(){return{active:!0,strings:{dismiss:c("Dismiss",ve)}}},computed:{getIcon(){switch(this.notification.type){case"warning":return"svg-circle-exclamation";case"error":return"svg-circle-close";case"info":return"svg-gear";default:return"svg-circle-check"}},getDate(){return ut(this.notification.start)}},methods:{processDismissNotification(){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug]),this.$emit("dismissed-notification")},getButtonType(e){switch(this.notification.notification_name){case"search-console-site-not-connected":case"search-console-site-not-verified":case"email-reports-enable-reminder":return e===1?"blue":"gray";default:return"gray"}}}},be={class:"icon"},Se={class:"body"},ke={class:"title"},Ce={class:"date"},Ne=["innerHTML"],we={class:"actions"};function De(e,t,a,o,s,n){const h=m("base-button"),p=m("transition-slide");return r(),v(p,{class:H(["aioseo-notification",[`aioseo-notification-${a.notification.notification_name}`]]),active:s.active},{default:g(()=>[i("div",null,[i("div",be,[(r(),v($(n.getIcon),{class:H(a.notification.type)},null,8,["class"]))]),i("div",Se,[i("div",ke,[i("div",null,l(o.sanitizeString(a.notification.title)),1),i("div",Ce,l(n.getDate),1)]),i("div",{class:"notification-content",innerHTML:a.notification.content},null,8,Ne),i("div",we,[a.notification.button1_label&&a.notification.button1_action?(r(),v(h,{key:0,size:"small",type:n.getButtonType(1),class:"aioseo-button1",tag:o.getTagType(a.notification.button1_action),href:o.getHref(a.notification.button1_action),target:o.getTarget(a.notification.button1_action),onClick:t[0]||(t[0]=_=>o.processButtonClick(a.notification.button1_action,1)),loading:o.button1Loading},{default:g(()=>[S(l(a.notification.button1_label),1)]),_:1},8,["type","tag","href","target","loading"])):f("",!0),a.notification.button2_label&&a.notification.button2_action?(r(),v(h,{key:1,size:"small",type:n.getButtonType(2),class:"aioseo-button2",tag:o.getTagType(a.notification.button2_action),href:o.getHref(a.notification.button2_action),target:o.getTarget(a.notification.button2_action),onClick:t[1]||(t[1]=_=>o.processButtonClick(a.notification.button2_action,2)),loading:o.button2Loading},{default:g(()=>[S(l(a.notification.button2_label),1)]),_:1},8,["type","tag","href","target","loading"])):f("",!0),a.notification.dismissed?f("",!0):(r(),d("a",{key:2,href:"#",class:"dismiss",onClick:t[2]||(t[2]=b((..._)=>n.processDismissNotification&&n.processDismissNotification(..._),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["class","active"])}const Te=L(ye,[["render",De]]),k="all-in-one-seo-pack",Le={emits:["dismissed-notification"],setup(){return{licenseStore:et(),notificationsStore:U(),optionsStore:ot(),rootStore:q()}},components:{SvgCircleCheck:X,TransitionSlide:R},props:{notification:{type:Object,required:!0}},data(){return{step:1,active:!0,strings:{dismiss:c("Dismiss",k),yesILoveIt:c("Yes, I love it!",k),notReally:c("Not Really...",k),okYouDeserveIt:c("Ok, you deserve it",k),nopeMaybeLater:c("Nope, maybe later",k),giveFeedback:c("Give feedback",k),noThanks:c("No thanks",k)}}},computed:{title(){switch(this.step){case 2:return c("That's Awesome!",k);case 3:return c("Help us improve",k);default:return B(c("Are you enjoying %1$s?",k),"AIOSEO")}},content(){switch(this.step){case 2:return c("Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?",k);case 3:return B(c("We're sorry to hear you aren't enjoying %1$s. We would love a chance to improve. Could you take a minute and let us know what we can do better?",k),"All in One SEO");default:return""}},feedbackUrl(){const e=this.rootStore.isPro?"pro":"lite";return E.utmUrl("notification-review-notice",this.rootStore.aioseo.version,"https://aioseo.com/plugin-feedback/?wpf7528_24="+encodeURIComponent(this.rootStore.aioseo.urls.home)+"&wpf7528_27="+e+"&wpf7528_28="+this.rootStore.aioseo.version)}},methods:{processDismissNotification(e=!1){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug+(e?"-delay":"")]),this.$emit("dismissed-notification")}}},Pe={class:"icon"},Ae={class:"body"},Be={class:"title"},Ie=["innerHTML"],Me={class:"actions"};function Ue(e,t,a,o,s,n){const h=m("svg-circle-check"),p=m("base-button"),_=m("transition-slide");return r(),v(_,{class:"aioseo-notification",active:s.active},{default:g(()=>[i("div",null,[i("div",Pe,[u(h,{class:"success"})]),i("div",Ae,[i("div",Be,[i("div",null,l(n.title),1)]),i("div",{class:"notification-content",innerHTML:n.content},null,8,Ie),i("div",Me,[s.step===1?(r(),d(T,{key:0},[u(p,{size:"small",type:"blue",onClick:t[0]||(t[0]=b(y=>s.step=2,["stop"]))},{default:g(()=>[S(l(s.strings.yesILoveIt),1)]),_:1}),u(p,{size:"small",type:"gray",onClick:t[1]||(t[1]=b(y=>s.step=3,["stop"]))},{default:g(()=>[S(l(s.strings.notReally),1)]),_:1})],64)):f("",!0),s.step===2?(r(),d(T,{key:1},[u(p,{tag:"a",href:"https://aioseo.com/aioseo-wordpress-rating",size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[2]||(t[2]=y=>n.processDismissNotification(!1))},{default:g(()=>[S(l(s.strings.okYouDeserveIt),1)]),_:1}),u(p,{size:"small",type:"gray",onClick:t[3]||(t[3]=b(y=>n.processDismissNotification(!0),["stop","prevent"]))},{default:g(()=>[S(l(s.strings.nopeMaybeLater),1)]),_:1})],64)):f("",!0),s.step===3?(r(),d(T,{key:2},[u(p,{tag:"a",href:n.feedbackUrl,size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[4]||(t[4]=y=>n.processDismissNotification(!1))},{default:g(()=>[S(l(s.strings.giveFeedback),1)]),_:1},8,["href"]),u(p,{size:"small",type:"gray",onClick:t[5]||(t[5]=b(y=>n.processDismissNotification(!1),["stop","prevent"]))},{default:g(()=>[S(l(s.strings.noThanks),1)]),_:1})],64)):f("",!0),a.notification.dismissed?f("",!0):(r(),d("a",{key:3,class:"dismiss",href:"#",onClick:t[6]||(t[6]=b(y=>n.processDismissNotification(!1),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["active"])}const He=L(Le,[["render",Ue]]),D="all-in-one-seo-pack",xe={emits:["dismissed-notification"],setup(){return{notificationsStore:U()}},components:{BaseButton:st,SvgCircleCheck:X,TransitionSlide:R},props:{notification:{type:Object,required:!0}},data(){return{active:!0,strings:{dismiss:c("Dismiss",D),yesILoveIt:c("Yes, I love it!",D),notReally:c("Not Really...",D),okYouDeserveIt:c("Ok, you deserve it",D),nopeMaybeLater:c("Nope, maybe later",D),giveFeedback:c("Give feedback",D),noThanks:c("No thanks",D)}}},computed:{title(){return B(c("Are you enjoying %1$s?",D),"AIOSEO")},content(){return B(c("Hey, we noticed you have been using %1$s for some time - that’s awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?",D),"<strong>All in One SEO</strong>")}},methods:{processDismissNotification(e=!1){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug+(e?"-delay":"")]),this.$emit("dismissed-notification")}}},Oe={class:"icon"},ze={class:"body"},Ee={class:"title"},qe=["innerHTML"],Re={class:"actions"};function Ve(e,t,a,o,s,n){const h=m("svg-circle-check"),p=m("base-button"),_=m("transition-slide");return r(),v(_,{class:"aioseo-notification",active:s.active},{default:g(()=>[i("div",null,[i("div",Oe,[u(h,{class:"success"})]),i("div",ze,[i("div",Ee,[i("div",null,l(n.title),1)]),i("div",{class:"notification-content",innerHTML:n.content},null,8,qe),i("div",Re,[u(p,{tag:"a",href:"https://aioseo.com/aioseo-wordpress-rating",size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[0]||(t[0]=y=>n.processDismissNotification(!1))},{default:g(()=>[S(l(s.strings.okYouDeserveIt),1)]),_:1}),u(p,{size:"small",type:"gray",onClick:t[1]||(t[1]=b(y=>n.processDismissNotification(!0),["stop","prevent"]))},{default:g(()=>[S(l(s.strings.nopeMaybeLater),1)]),_:1}),a.notification.dismissed?f("",!0):(r(),d("a",{key:0,class:"dismiss",href:"#",onClick:t[2]||(t[2]=b(y=>n.processDismissNotification(!1),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["active"])}const je=L(xe,[["render",Ve]]),Ge={class:"icon"},Fe={class:"body"},Ye={class:"title"},We=["innerHTML"],Ke={class:"actions"},Xe={__name:"UnlicensedAddons",props:{notification:{type:Object,required:!0}},setup(e){const t="all-in-one-seo-pack",a=e,o=q(),s=Z(!0),n={title:B(c("%1$s Addons Not Configured Properly",t),"AIOSEO"),learnMore:c("Learn More",t),upgrade:c("Upgrade",t)},h=z(()=>{let p="<ul>";return a.notification.addons.forEach(_=>{p+="<li><strong>AIOSEO - "+_.name+"</strong></li>"}),p+="</ul>",a.notification.message+p});return(p,_)=>{const y=m("base-button");return r(),v(O(R),{class:"aioseo-notification",active:s.value},{default:g(()=>[i("div",null,[i("div",Ge,[u(O(nt),{class:"error"})]),i("div",Fe,[i("div",Ye,[i("div",null,l(n.title),1)]),i("div",{class:"notification-content",innerHTML:h.value},null,8,We),i("div",Ke,[u(y,{size:"small",type:"green",tag:"a",href:O(E).getUpsellUrl("notification-unlicensed-addons",null,O(o).isPro?"pricing":"liteUpgrade"),target:"_blank"},{default:g(()=>[S(l(n.upgrade),1)]),_:1},8,["href"])])])])]),_:1},8,["active"])}}},Y="all-in-one-seo-pack",Qe={emits:["toggle-dismissed","dismissed-notification"],components:{CoreNotification:Te,NotificationsReview:He,NotificationsReview2:je,NotificationsUnlicensedAddons:Xe},props:{dismissedCount:{type:Number,required:!0},notifications:{type:Array,required:!0}},data(){return{dannieDetectiveImg:he,strings:{greatScott:c("Great Scott! Where'd they all go?",Y),noNewNotifications:c("You have no new notifications.",Y),seeDismissed:c("See Dismissed Notifications",Y)}}},methods:{getAssetUrl:mt}},Je={class:"aioseo-notification-cards"},Ze={key:"no-notifications"},$e={class:"no-notifications"},to=["src"],eo={class:"great-scott"},oo={class:"no-new-notifications"};function io(e,t,a,o,s,n){return r(),d("div",Je,[a.notifications.length?(r(!0),d(T,{key:0},M(a.notifications,h=>(r(),v($(h.component?h.component:"core-notification"),{key:h.slug,notification:h,ref_for:!0,ref:"notification",onDismissedNotification:t[0]||(t[0]=p=>e.$emit("dismissed-notification"))},null,40,["notification"]))),128)):f("",!0),a.notifications.length?f("",!0):(r(),d("div",Ze,[W(e.$slots,"no-notifications",{},()=>[i("div",$e,[i("img",{alt:"Dannie the Detective",src:n.getAssetUrl(s.dannieDetectiveImg)},null,8,to),i("div",eo,l(s.strings.greatScott),1),i("div",oo,l(s.strings.noNewNotifications),1),a.dismissedCount?(r(),d("a",{key:0,href:"#",class:"dismiss",onClick:t[1]||(t[1]=b(h=>e.$emit("toggle-dismissed"),["stop","prevent"]))},l(s.strings.seeDismissed),1)):f("",!0)])])]))])}const so=L(Qe,[["render",io]]),Q="all-in-one-seo-pack",no={setup(){const{dismissed:e,notificationTitle:t,notifications:a,notificationsCount:o,strings:s}=pe();return{composableStrings:s,dismissed:e,notificationsStore:U(),notificationTitle:t,notifications:a,notificationsCount:o}},components:{CoreNotificationCards:so,SvgClose:it},data(){return{maxNotifications:Number.MAX_SAFE_INTEGER,currentPage:0,totalPages:1,strings:It(this.composableStrings,{dismissedNotifications:c("Dismissed Notifications",Q),dismissAll:c("Dismiss All",Q)})}},watch:{"notificationsStore.showNotifications"(e){e?(this.currentPage=0,this.setMaxNotifications(),this.addBodyClass()):this.removeBodyClass()},dismissed(){this.setMaxNotifications()},notifications(){this.setMaxNotifications()}},computed:{filteredNotifications(){return[...this.notifications].splice(this.currentPage===0?0:this.currentPage*this.maxNotifications,this.maxNotifications)},pages(){if(typeof this.totalPages!="number"||!isFinite(this.totalPages)||0>=this.totalPages)return 1;const e=[];for(let t=0;t<this.totalPages;t++)e.push({number:t+1});return e}},methods:{escapeListener(e){e.key==="Escape"&&this.notificationsStore.showNotifications&&this.notificationsStore.toggleNotifications()},addBodyClass(){document.body.classList.add("aioseo-show-notifications")},removeBodyClass(){document.body.classList.remove("aioseo-show-notifications")},documentClick(e){if(!this.notificationsStore.showNotifications)return;const t=e&&e.target?e.target:null,a=document.querySelector("#wp-admin-bar-aioseo-notifications");if(a&&(a===t||a.contains(t)))return;const o=document.querySelector("#toplevel_page_aioseo .wp-first-item"),s=document.querySelector("#toplevel_page_aioseo .wp-first-item .aioseo-menu-notification-indicator");if(o&&o.contains(s)&&(o===t||o.contains(t)))return;const n=this.$refs["aioseo-notifications"];n&&(n===t||n.contains(t))||this.notificationsStore.toggleNotifications()},notificationsLinkClick(e){e.preventDefault(),this.notificationsStore.toggleNotifications()},processDismissAllNotifications(){const e=[];this.notifications.forEach(t=>{e.push(t.slug)}),this.notificationsStore.dismissNotifications(e).then(()=>{this.setMaxNotifications()})},setMaxNotifications(){const e=this.currentPage;this.currentPage=0,this.totalPages=1,this.maxNotifications=Number.MAX_SAFE_INTEGER,this.$nextTick(async()=>{const a=Array.from(document.querySelectorAll(".notification-menu .aioseo-notification")).map(s=>{const n=window.getComputedStyle?getComputedStyle(s,null):s.currentStyle,h=parseInt(n.marginTop)||0,p=parseInt(n.marginBottom)||0;return s.offsetHeight+h+p}),o=document.querySelector(".notification-menu .aioseo-notification-cards");if(o&&0<a.length){let s=0,n=0;for(const h of a){if(n+=h,n>o.offsetHeight)break;s++}this.maxNotifications=s||1,isFinite(s)&&0<s&&(this.totalPages=Math.ceil(a.length/s))}this.currentPage=e>this.totalPages-1?this.totalPages-1:e})}},mounted(){document.addEventListener("keydown",this.escapeListener),document.addEventListener("mousedown",this.documentClick);const e=document.querySelector("#wp-admin-bar-aioseo-notifications .ab-item");e&&e.addEventListener("mousedown",this.notificationsLinkClick);const t=document.querySelector("#toplevel_page_aioseo .wp-first-item"),a=document.querySelector("#toplevel_page_aioseo .wp-first-item .aioseo-menu-notification-indicator");t&&a&&t.addEventListener("mousedown",this.notificationsLinkClick)}},ao={class:"aioseo-notifications",ref:"aioseo-notifications"},ro={key:0,class:"notification-menu"},co={class:"notification-header"},lo={class:"new-notifications"},uo={class:"dismissed-notifications"},fo={key:0,class:"notification-footer"},mo={class:"pagination"},go=["onClick"],_o={key:0,class:"dismiss-all"};function po(e,t,a,o,s,n){const h=m("svg-close"),p=m("core-notification-cards");return r(),d("div",ao,[u(K,{name:"notifications-slide"},{default:g(()=>[o.notificationsStore.showNotifications?(r(),d("div",ro,[i("div",co,[i("span",lo,"("+l(o.notificationsCount)+") "+l(o.notificationTitle),1),i("div",uo,[!o.dismissed&&o.notificationsStore.dismissedNotificationsCount?(r(),d("a",{key:0,href:"#",onClick:t[0]||(t[0]=b(_=>o.dismissed=!0,["stop","prevent"]))},l(s.strings.dismissedNotifications),1)):f("",!0),o.dismissed&&o.notificationsStore.dismissedNotificationsCount?(r(),d("a",{key:1,href:"#",onClick:t[1]||(t[1]=b(_=>o.dismissed=!1,["stop","prevent"]))},l(s.strings.activeNotifications),1)):f("",!0)]),i("div",{onClick:t[2]||(t[2]=b((..._)=>o.notificationsStore.toggleNotifications&&o.notificationsStore.toggleNotifications(..._),["stop"]))},[u(h)])]),u(p,{class:"notification-cards",notifications:n.filteredNotifications,dismissedCount:o.notificationsStore.dismissedNotificationsCount,onToggleDismissed:t[3]||(t[3]=_=>o.dismissed=!o.dismissed)},null,8,["notifications","dismissedCount"]),s.totalPages>1||!o.dismissed&&o.notifications.length?(r(),d("div",fo,[i("div",mo,[s.totalPages>1?(r(!0),d(T,{key:0},M(n.pages,(_,y)=>(r(),d("div",{class:H(["page-number",{active:_.number===1+s.currentPage}]),key:y,onClick:b(x=>s.currentPage=_.number-1,["stop"])},l(_.number),11,go))),128)):f("",!0)]),o.dismissed?f("",!0):(r(),d("div",_o,[o.notifications.length?(r(),d("a",{key:0,href:"#",class:"dismiss",onClick:t[4]||(t[4]=b((..._)=>n.processDismissAllNotifications&&n.processDismissAllNotifications(..._),["stop","prevent"]))},l(s.strings.dismissAll),1)):f("",!0)]))])):f("",!0)])):f("",!0)]),_:1}),u(K,{name:"notifications-fade"},{default:g(()=>[o.notificationsStore.showNotifications?(r(),d("div",{key:0,onClick:t[5]||(t[5]=(..._)=>o.notificationsStore.toggleNotifications&&o.notificationsStore.toggleNotifications(..._)),class:"overlay"})):f("",!0)]),_:1})],512)}const ho=L(no,[["render",po]]),J="all-in-one-seo-pack",vo={setup(){const e=rt(),{processSaveChanges:t}=yt();return{helpPanelStore:tt(),notificationsStore:U(),optionsStore:ot(),processSaveChanges:t,rootStore:q(),route:e}},components:{CoreAlert:bt,CoreHeader:Ct,CoreHelp:_e,CoreLoader:Lt,CoreMainTabs:vt,CoreNotifications:ho,GridContainer:kt},props:{pageName:{type:String,required:!0},showTabs:{type:Boolean,default(){return!0}},showSaveButton:{type:Boolean,default(){return!0}},excludeTabs:{type:Array,default(){return[]}},containerClasses:{type:Array,default(){return[]}},disableTabs:{type:Boolean,default(){return!1}}},data(){return{tabsKey:0,isNavigating:!1,strings:{saveChanges:c("Save Changes",J)}}},watch:{excludeTabs(){this.tabsKey+=1},$route(){this.isNavigating=!0,setTimeout(()=>{this.isNavigating=!1},300)}},computed:{tabs(){return this.$router.options.routes.filter(e=>e.name&&e.meta&&e.meta.name).filter(e=>pt(e.meta.access)).filter(e=>!e.meta.license||ht.hasMinimumLevel(e.meta.license)).filter(e=>!(e.meta.display==="lite"&&this.rootStore.isPro||e.meta.display==="pro"&&!this.rootStore.isPro)).filter(e=>!this.excludeTabs.includes(e.name)).map(e=>({slug:e.name,name:e.meta.name,url:{name:e.name},access:e.meta.access,label:e.meta.label}))},shouldShowSaveButton(){if(this.$route&&this.$route.name){const e=this.$router.options.routes.find(t=>t.name===this.$route.name);if(e&&e.meta&&e.meta.hideSaveButton)return!1}return this.showSaveButton},errorSaving(){const e=this.roootStore.isPro?"https://aioseo.com/plugin/pro-support":"https://aioseo.com/plugin/lite-support";return B(c("Oops! It looks like an error occurred while saving the changes. Please try again or %1$scontact our support team%2$s.",J),'<a href="'+E.utmUrl("error-saving",this.rootStore.aioseo.page,e)+'" target="_blank">',"</a>")}},mounted(){gt().notifications&&(this.notificationsStore.showNotifications||this.notificationsStore.toggleNotifications(),setTimeout(()=>{_t("notifications")},500)),this.notificationsStore.force&&this.notificationsStore.active.length&&(this.notificationsStore.force=!1,this.notificationsStore.toggleNotifications())}},yo={class:"aioseo-main"},bo=["innerHTML"],So={class:"aioseo-tab-content"},ko={class:"aioseo-loading-placeholder"},Co={key:2,class:"save-changes"};function No(e,t,a,o,s,n){const h=m("core-notifications"),p=m("core-header"),_=m("core-alert"),y=m("core-main-tabs"),x=m("core-loader"),V=m("base-button"),I=m("grid-container"),j=m("core-help");return r(),d("div",null,[u(h),i("div",yo,[u(p,{"page-name":a.pageName},null,8,["page-name"]),u(I,{class:H(a.containerClasses)},{default:g(()=>[o.optionsStore.saveError?(r(),v(_,{key:0,type:"red"},{default:g(()=>[i("div",{innerHTML:n.errorSaving},null,8,bo)]),_:1})):f("",!0),a.showTabs?(r(),v(y,{key:s.tabsKey,tabs:n.tabs,showSaveButton:n.shouldShowSaveButton,"disable-tabs":a.disableTabs},{extra:g(()=>[W(e.$slots,"extra",{},void 0,!0)]),_:3},8,["tabs","showSaveButton","disable-tabs"])):f("",!0),i("div",So,[(r(),v(ct,{onPending:t[0]||(t[0]=A=>s.isNavigating=!0),onResolve:t[1]||(t[1]=A=>s.isNavigating=!1)},{default:g(()=>[u(K,{name:"route-fade",mode:"out-in"},{default:g(()=>[W(e.$slots,"default",{},void 0,!0)]),_:3})]),fallback:g(()=>[i("div",ko,[u(x,{dark:""})])]),_:3}))]),n.shouldShowSaveButton&&!s.isNavigating?(r(),d("div",Co,[u(V,{type:"blue",size:"medium",loading:o.rootStore.loading,onClick:t[2]||(t[2]=A=>o.processSaveChanges(o.route.name))},{default:g(()=>[S(l(s.strings.saveChanges),1)]),_:1},8,["loading"])])):f("",!0)]),_:3},8,["class"])]),o.helpPanelStore.docs&&Object.keys(o.helpPanelStore.docs).length?(r(),v(j,{key:0})):f("",!0)])}const Go=L(vo,[["render",No],["__scopeId","data-v-63348784"]]);export{Go as C,so as a,pe as u};
Save
Cancel