var p=Object.defineProperty,m=Object.defineProperties;var d=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var l=(e,s,t)=>s in e?p(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,o=(e,s)=>{for(var t in s||(s={}))f.call(s,t)&&l(e,t,s[t]);if(n)for(var t of n(s))h.call(s,t)&&l(e,t,s[t]);return e},c=(e,s)=>m(e,d(s));import{n as _,V as g}from"./js/vueComponentNormalizer.87056a83.js";import"./js/index.652636d3.js";import{a as v,e as b,m as a,s as y}from"./js/index.8900b7f9.js";import{C as P}from"./js/Card.f0350b06.js";import{C as I}from"./js/SocialProfiles.c8717b2c.js";import{S as $}from"./js/LogoGear.0c3dd5e3.js";import{e as w}from"./js/elemLoaded.b1f6e29c.js";import"./js/client.94d919c5.js";import"./js/_commonjsHelpers.f40d732e.js";import"./js/default-i18n.abde8d59.js";import"./js/constants.7cd698f2.js";import"./js/isArrayLikeObject.a4a9229a.js";import"./js/Tooltip.3ec20ff5.js";import"./js/QuestionMark.83ebd18e.js";import"./js/Slide.f5d21606.js";import"./js/Checkbox.5873a8d2.js";import"./js/Checkmark.e7547654.js";import"./js/Textarea.d161fc2e.js";import"./js/Index.476ddbfd.js";import"./js/SettingsRow.eb71f07b.js";import"./js/Row.13b6f3f1.js";var C=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{attrs:{id:"aioseo-user-profile-tab"}},[t("div",{staticClass:"navigation-bar"},e._l(e.tabs,function(i,r){return t("a",{key:r,class:{active:r===e.activeTabIndex},attrs:{href:"#"},on:{click:function(F){return e.setActiveTab(r)}}},[i.svg?t(i.svg,{tag:"component"}):e._e(),e._v(" "+e._s(i.label)+" ")],1)}),0),e.activeTabObject.slug==="social-profiles"?t("CoreCard",{attrs:{slug:"userProfiles","header-text":e.strings.socialProfiles,"no-slide":"",toggles:!1}},[t("div",{staticClass:"aioseo-settings-row aioseo-section-description"},[e._v(" "+e._s(e.strings.description)+" ")]),t("CoreSocialProfiles",{attrs:{userProfiles:e.userProfile.profiles},on:{updated:function(i){return e.updateHiddenInputField(i)}}})],1):e._e()],1)},E=[];const T={components:{CoreCard:P,CoreSocialProfiles:I,SvgLogoGear:$},data(){return{activeTabIndex:0,strings:{socialProfiles:"Social Profiles",description:"To let search engines know which profiles are associated with this user, enter them below:"}}},methods:{setActiveTab(e){const s=this.activeTabIndex;switch(this.activeTabIndex=e,this.activeTabObject.slug){case"personal-options":document.getElementById("your-profile").childNodes.forEach(t=>{t.style&&(t.style.display="block")});break;case"social-profiles":document.getElementById("your-profile").childNodes.forEach(t=>{t.id==="aioseo-user-profile-tab"||t.className==="submit"||!t.style||(t.style.display="none")});break;case"customer-data":this.activeTabIndex=s,window.location.href=this.$aioseo.urls.home+"/wp-admin/admin.php?page=followup-emails-reports&tab=reportuser_view&email="+encodeURIComponent(this.userProfile.userData.user_email)+"&user_id="+this.userProfile.userData.ID;break}},updateHiddenInputField(e){document.getElementById("aioseo-user-social-profiles").value=JSON.stringify(e)}},computed:c(o({},v(["userProfile","options"])),{tabs(){const e=[{label:"Personal Options",slug:"personal-options"},{label:"Social Profiles",slug:"social-profiles",svg:"svg-logo-gear"}];return this.userProfile.isWooCommerceFollowupEmailsActive&&e.push({label:"Customer Data",slug:"customer-data"}),e},activeTabObject(){return this.tabs[this.activeTabIndex]}}),created(){this.$store.state.loaded||b({}),this.$set(this.$store.state,"userProfile",a(o({},this.$store.state.userProfile),o({},this.$aioseo.userProfile))),this.$set(this.$store.state,"options",a(o({},this.$store.state.options),o({},this.$aioseo.options))),this.$set(this.$store.state,"settings",a(o({},this.$store.state.settings),o({},this.$aioseo.settings))),this.updateHiddenInputField(this.userProfile.profiles)},mounted(){const e=new URLSearchParams(window.location.search);e&&e.get("social-profiles")&&this.setActiveTab(1)}},u={};var x=_(T,C,E,!1,A,null,null,null);function A(e){for(let s in u)this[s]=u[s]}var S=function(){return x.exports}();const L=()=>{const e=document.getElementById("your-profile");if(!e)return;const s=document.createElement("div");s.id="aioseo-user-profile-tab";const t=document.createElement("input");t.id="aioseo-user-social-profiles",t.name="aioseo-user-social-profiles",t.type="hidden",e.prepend(t),e.prepend(s)},k=()=>{new g({store:y,render:e=>e(S)}).$mount("#aioseo-user-profile-tab")};w("#your-profile","profilePageLoaded");document.addEventListener("animationstart",function(e){e.animationName==="profilePageLoaded"&&(L(),k())});
