관리-도구
편집 파일: Tabs.4r8l6r8o.js
import{r as de,aP as pt,w as X,O as De,aZ as xe,i as vt,N as te,f as S,y as Fe,n as le,aX as je,p as ht,u as mt,b3 as bt,aS as yt,o as v,c as _,a as $,m as A,G as M,j as q,e as fe,g as w,X as gt,Q as Ve,k as V,l as x,B as wt,q as He,T as _t,v as P,R as St,C as D,F as K,J as ie,t as L,b as C,x as se,E as _e}from"./runtime-dom.esm-bundler.h3clfjuw.js";import{u as $t}from"./vue-router.mwhkjjlr.js";import{u as Ue,a as Ct,b as Tt,r as kt}from"./index.nsvc8vqf.js";import{u as Pt}from"./TruSeoScore.oj10wjxw.js";import{_ as Mt,a as Et,c as Ot}from"./Caret.hnvbzqgq.js";import{C as Lt}from"./ProBadge.ab6jhp8x.js";import{S as Nt}from"./Information.djrr3pec.js";import{S as Bt}from"./Ellipse.mhzh8c2h.js";import{T as zt}from"./Slide.dop8j51m.js";import"./translations.lf9cwm9a.js";import{_ as Rt}from"./_plugin-vue_export-helper.oebm7xum.js";import{_ as Se}from"./default-i18n.hohxoesu.js";const At=()=>({processSaveChanges:t=>{window.aioseoBus.$emit("saving-changes");const n=Ue();n.loading=!0;let o=!1,r=!1,i="saveChanges";setTimeout(()=>{o=!0,r&&(n.loading=!1)},1500);const a=Ct();t==="htaccess-editor"&&(i="saveHtaccess",a.htaccessError=null),n.aioseo.data.isNetworkAdmin&&t==="robots-editor"&&(i="saveNetworkRobots"),a[i]().then(l=>{l&&l.body.redirection||(o||t==="htaccess-editor"?n.loading=!1:r=!0,window.aioseoBus.$emit("changes-saved"))})}}),Xe={locks:{},zIndex:2e3,enableRipple:!0};de(Xe);var qe=de(Xe),Wt=Object.defineProperty,It=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,Ce=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jt=(e,t)=>{for(var n in t||(t={}))xt.call(t,n)&&Ce(e,n,t[n]);if($e)for(var n of $e(t))Ft.call(t,n)&&Ce(e,n,t[n]);return e},Vt=(e,t)=>It(e,Dt(t)),E=e=>typeof e=="string",Ht=e=>typeof e=="boolean",pe=e=>typeof e=="number",Ye=e=>pe(e)||E(e)&&/^[-+]?\d+$/.test(e),Ut=e=>Object.prototype.toString.call(e)==="[object Object]",Xt=e=>typeof e=="function",Ke=e=>Array.isArray(e),qt=e=>e===window,Yt=()=>ne()&&"ontouchstart"in window,ne=()=>typeof window<"u",Te=(e,t)=>{if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}},Kt=(...e)=>e.map(t=>{if(Ke(t)){const[n,o,r=null]=t;return n?o:r}return t}),Zt=()=>typeof globalThis<"u"?globalThis:ne()?window:typeof global<"u"?global:self,ce=e=>{const t=Zt();return t.requestAnimationFrame?t.requestAnimationFrame(e):t.setTimeout(e)},Gt=()=>new Promise(e=>{ce(e)}),Ze=()=>new Promise(e=>{ce(()=>{ce(e)})}),ve=e=>window.getComputedStyle(e),G=e=>{if(qt(e)){const t=e.innerWidth,n=e.innerHeight,o={x:0,y:0,top:0,left:0,right:t,bottom:n,width:t,height:n};return Vt(jt({},o),{toJSON:()=>o})}return e.getBoundingClientRect()},Jt=e=>{const t="scrollTop"in e?e.scrollTop:e.scrollY;return Math.max(t,0)},Qt=e=>{const t="scrollLeft"in e?e.scrollLeft:e.scrollX;return Math.max(t,0)};function F(e,...t){if(Ke(e))return e.map(n=>n(...t));if(e)return e(...t)}var Ge=e=>e==null?0:E(e)?(e=parseFloat(e),e=Number.isNaN(e)?0:e,e):Ht(e)?Number(e):e,en=(e,t,n)=>Math.min(n,Math.max(t,e)),tn=e=>nn(e).replace(e.charAt(0),e.charAt(0).toUpperCase()),nn=e=>e.replace(/-(\w)/g,(t,n)=>n.toUpperCase());function on(e){return t=>{const n=`${e}-${t}`,o=r=>r?r[0]==="$"?r.replace("$",e):r.startsWith("--")?`${n}${r}`:`${n}__${r}`:n;return{name:tn(n),n:o,classes:Kt}}}var rn=Object.defineProperty,J=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ke=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sn=(e,t)=>{for(var n in t||(t={}))Je.call(t,n)&&ke(e,n,t[n]);if(J)for(var n of J(t))Qe.call(t,n)&&ke(e,n,t[n]);return e},an=(e,t)=>{var n={};for(var o in e)Je.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&J)for(var o of J(e))t.indexOf(o)<0&&Qe.call(e,o)&&(n[o]=e[o]);return n};function et(e){let t=!1;Fe(()=>{e(),le(()=>{t=!0})}),je(()=>{t&&e()})}function ue(e,t,n,o={}){if(!ne())return;const{passive:r=!1,capture:i=!1}=o;let a=!1,l=!1;const s=f=>Xt(f)?f():mt(f),c=f=>{if(a||l)return;const b=s(f);b&&(b.addEventListener(t,n,{passive:r,capture:i}),a=!0)},d=f=>{if(!a||l)return;const b=s(f);b&&(b.removeEventListener(t,n,{capture:i}),a=!1)};let h;pt(e)&&(h=X(()=>e.value,(f,b)=>{d(b),c(f)}));const m=()=>{h==null||h(),d(e),l=!0};return et(()=>{c(e)}),De(()=>{d(e)}),xe(()=>{d(e)}),m}function ln(e){let t=!1;xe(()=>{t=!0,e()}),bt(()=>{t||e()})}function cn(e){const t=te();return e in t.provides}function un(e){if(!cn(e))return{index:null,parentProvider:null,bindParent:null};const n=vt(e),{childInstances:o,collect:r,clear:i}=n,a=an(n,["childInstances","collect","clear"]),l=te();return{index:S(()=>o.indexOf(l)),parentProvider:a,bindParent:d=>{Fe(()=>{le().then(()=>{r(l,d)})}),De(()=>{le().then(()=>{i(l,d)})})}}}function dn(e){const t=[],n=o=>{if(o!=null&&o.component){n(o==null?void 0:o.component.subTree);return}Array.isArray(o==null?void 0:o.children)&&o.children.forEach(r=>{yt(r)&&(t.push(r),n(r))})};return n(e),t}function fn(e){const t=te(),n=de([]),o=[],r=S(()=>n.length),i=()=>{const c=dn(t.subTree);n.sort((d,h)=>c.indexOf(d.vnode)-c.indexOf(h.vnode))},a=(c,d)=>{n.push(c),o.push(d),i()},l=(c,d)=>{Te(n,c),Te(o,d)};return{length:r,childProviders:o,bindChildren:c=>{ht(e,sn({childInstances:n,collect:a,clear:l},c))}}}function tt(e){ue(()=>window,"resize",e,{passive:!0}),ue(()=>window,"orientationchange",e,{passive:!0})}var pn=Object.defineProperty,vn=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Me=(e,t,n)=>t in e?pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yn=(e,t)=>{for(var n in t||(t={}))mn.call(t,n)&&Me(e,n,t[n]);if(Pe)for(var n of Pe(t))bn.call(t,n)&&Me(e,n,t[n]);return e},gn=(e,t)=>vn(e,hn(t));function ae(e,t){return Array.isArray(t)?t.reduce((n,o)=>(n[o]=e[o],n),{}):e[t]}function he(e,t){const n=e;return n.install=function(o){const{name:r}=e;r&&o.component(r,e)},n}function me(e,t){e.setPropsDefaults=function(n){Object.entries(n).forEach(([o,r])=>{const i=t[o];if(i!=null){if(Ut(i)){t[o]=gn(yn({},i),{default:r});return}t[o]={type:i,default:r}}})}}const oe=on("var");function H(e){return{type:[Function,Array],default:e}}function wn(e,t){return e===!1?null:(e===!0&&t&&(e=t),`var-elevation--${e}`)}var _n=Object.defineProperty,Sn=Object.defineProperties,$n=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,Oe=(e,t,n)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t)=>{for(var n in t||(t={}))Cn.call(t,n)&&Oe(e,n,t[n]);if(Ee)for(var n of Ee(t))Tn.call(t,n)&&Oe(e,n,t[n]);return e},kn=(e,t)=>Sn(e,$n(t));const{n:ot}=oe("ripple"),Le=250;function Pn(e){const{zIndex:t,position:n}=ve(e);e.style.overflow="hidden",e.style.overflowX="hidden",e.style.overflowY="hidden",n==="static"&&(e.style.position="relative"),t==="auto"&&(e.style.zIndex="1")}function Ne(e){return"touches"in e}function Mn(e,t){const{top:n,left:o}=G(e),{clientWidth:r,clientHeight:i}=e,a=Math.sqrt(r**2+i**2)/2,l=a*2,s=Ne(t)?t.touches[0].clientX-o:r/2,c=Ne(t)?t.touches[0].clientY-n:i/2,d=(r-a*2)/2,h=(i-a*2)/2,m=s-a,f=c-a;return{x:m,y:f,centerX:d,centerY:h,size:l}}function be(e){const t=this._ripple;if(t.removeRipple(),t.disabled||t.tasker||!qe.enableRipple)return;const n=()=>{t.tasker=null;const{x:o,y:r,centerX:i,centerY:a,size:l}=Mn(this,e),s=document.createElement("div");s.classList.add(ot()),s.style.opacity="0",s.style.transform=`translate(${o}px, ${r}px) scale3d(.3, .3, .3)`,s.style.width=`${l}px`,s.style.height=`${l}px`,t.color&&(s.style.backgroundColor=t.color),s.dataset.createdAt=String(performance.now()),Pn(this),this.appendChild(s),window.setTimeout(()=>{s.style.transform=`translate(${i}px, ${a}px) scale3d(1, 1, 1)`,s.style.opacity=".25"},20)};t.tasker=window.setTimeout(n,30)}function Q(){const e=this._ripple,t=()=>{const n=this.querySelectorAll(`.${ot()}`);if(!n.length)return;const o=n[n.length-1],r=Le-performance.now()+Number(o.dataset.createdAt);window.setTimeout(()=>{o.style.opacity="0",window.setTimeout(()=>{var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)},Le)},r)};e.tasker?window.setTimeout(t,30):t()}function rt(){if(!Yt()||!qe.enableRipple)return;const e=this._ripple;e.tasker&&window.clearTimeout(e.tasker),e.tasker=null}let ee=!1;function En(e){ee||!(e.key===" "||e.key==="Enter")||(be.call(this,e),ee=!0)}function Be(){ee&&(Q.call(this),ee=!1)}function On(e,t){var n;e._ripple=kn(nt({tasker:null},(n=t.value)!=null?n:{}),{removeRipple:Q.bind(e)}),e.addEventListener("touchstart",be,{passive:!0}),e.addEventListener("touchmove",rt,{passive:!0}),e.addEventListener("dragstart",Q,{passive:!0}),e.addEventListener("keydown",En),e.addEventListener("keyup",Be),e.addEventListener("blur",Be),document.addEventListener("touchend",e._ripple.removeRipple,{passive:!0}),document.addEventListener("touchcancel",e._ripple.removeRipple,{passive:!0}),document.addEventListener("dragend",e._ripple.removeRipple,{passive:!0})}function Ln(e){e.removeEventListener("touchstart",be),e.removeEventListener("touchmove",rt),e.removeEventListener("dragstart",Q),!(!e._ripple||!e._ripple.removeRipple)&&(document.removeEventListener("touchend",e._ripple.removeRipple),document.removeEventListener("touchcancel",e._ripple.removeRipple),document.removeEventListener("dragend",e._ripple.removeRipple))}function Nn(e,t){var n,o,r,i,a,l;const s={color:(n=t.value)==null?void 0:n.color,disabled:(o=t.value)==null?void 0:o.disabled};(s.color!==((r=e._ripple)==null?void 0:r.color)||s.disabled!==((i=e._ripple)==null?void 0:i.disabled))&&(e._ripple=nt({tasker:s.disabled?null:(a=e._ripple)==null?void 0:a.tasker,removeRipple:(l=e._ripple)==null?void 0:l.removeRipple},s))}const Bn={mounted:On,unmounted:Ln,updated:Nn,install(e){e.directive("ripple",this)}};var zn=Bn;function Rn(e,t){throw Error(`Varlet [${e}]: ${t}`)}function An(e){let t=e;for(;t&&!(!t.parentNode||(t=t.parentNode,t===document.body||t===document.documentElement));){const n=/(scroll|auto)/,{overflowY:o,overflow:r}=ve(t);if(n.test(o)||n.test(r))return t}return window}function Wn(){const{width:e,height:t}=G(window);return{vw:e,vh:t,vMin:Math.min(e,t),vMax:Math.max(e,t)}}const In=e=>E(e)&&e.endsWith("rem"),Dn=e=>E(e)&&e.endsWith("px")||pe(e),xn=e=>E(e)&&e.endsWith("vw"),Fn=e=>E(e)&&e.endsWith("vh"),jn=e=>E(e)&&e.endsWith("vmin"),Vn=e=>E(e)&&e.endsWith("vmax"),Hn=e=>{if(Ye(e))return Number(e);if(Dn(e))return+e.replace("px","");if(!ne())return 0;const{vw:t,vh:n,vMin:o,vMax:r}=Wn();if(xn(e))return+e.replace("vw","")*t/100;if(Fn(e))return+e.replace("vh","")*n/100;if(jn(e))return+e.replace("vmin","")*o/100;if(Vn(e))return+e.replace("vmax","")*r/100;if(In(e)){const i=+e.replace("rem",""),a=ve(document.documentElement).fontSize;return i*parseFloat(a)}return E(e)?Ge(e):0},Un=e=>{if(e!=null)return Ye(e)?`${e}px`:String(e)};function ze(e,{top:t=0,left:n=0,duration:o=300,animation:r}){const i=Date.now(),a=Jt(e),l=Qt(e);return new Promise(s=>{const c=()=>{const d=(Date.now()-i)/o;if(d<1){const h=a+(t-a)*r(d),m=l+(n-l)*r(d);e.scrollTo(m,h),requestAnimationFrame(c)}else e.scrollTo(n,t),s()};requestAnimationFrame(c)})}const Re=e=>e,U={offsetTop:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:10},cssMode:Boolean,disabled:Boolean,onScroll:H()};var Ae=(e,t,n)=>new Promise((o,r)=>{var i=s=>{try{l(n.next(s))}catch(c){r(c)}},a=s=>{try{l(n.throw(s))}catch(c){r(c)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});const{name:Xn,n:qn,classes:Yn}=oe("sticky");function Kn(e,t){return v(),_("div",{class:M(e.classes(e.n(),[e.enableCSSMode,e.n("--css-mode")])),ref:"stickyEl",style:q({zIndex:e.toNumber(e.zIndex),top:e.enableCSSMode?`${e.offsetTop}px`:void 0,width:e.enableFixedMode?e.fixedWidth:void 0,height:e.enableFixedMode?e.fixedHeight:void 0})},[$("div",{class:M(e.n("wrapper")),ref:"wrapperEl",style:q({zIndex:e.toNumber(e.zIndex),position:e.enableFixedMode?"fixed":void 0,width:e.enableFixedMode?e.fixedWrapperWidth:void 0,height:e.enableFixedMode?e.fixedWrapperHeight:void 0,left:e.enableFixedMode?e.fixedLeft:void 0,top:e.enableFixedMode?e.fixedTop:void 0})},[A(e.$slots,"default")],6)],6)}const it=fe({name:Xn,props:U,setup(e){const t=w(null),n=w(null),o=w(!1),r=w("0px"),i=w("0px"),a=w("auto"),l=w("auto"),s=w("auto"),c=w("auto"),d=S(()=>!e.disabled&&e.cssMode),h=S(()=>!e.disabled&&!e.cssMode&&o.value),m=S(()=>Hn(e.offsetTop));let f;X(()=>e.disabled,N),et(()=>Ae(this,null,function*(){yield Ze(),u(),g()})),ln(W),tt(N),ue(()=>window,"scroll",g);function b(){const{cssMode:T,disabled:I}=e;if(I)return;let B=0;if(f&&f!==window){const{top:p}=G(f);B=p}const z=n.value,R=t.value,{top:re,left:O}=G(R),Y=re-B;return Y<=m.value?(T||(a.value=`${R.offsetWidth}px`,l.value=`${R.offsetHeight}px`,r.value=`${B+m.value}px`,i.value=`${O}px`,s.value=`${z.offsetWidth}px`,c.value=`${z.offsetHeight}px`,o.value=!0),{offsetTop:m.value,isFixed:!0}):(o.value=!1,{offsetTop:Y,isFixed:!1})}function u(){f=An(t.value),f!==window&&f.addEventListener("scroll",g)}function g(){const T=b();T&&F(e.onScroll,T.offsetTop,T.isFixed)}function W(){!f||f===window||f.removeEventListener("scroll",g)}function N(){return Ae(this,null,function*(){o.value=!1,yield Gt(),b()})}return{stickyEl:t,wrapperEl:n,isFixed:o,offsetTop:m,fixedTop:r,fixedLeft:i,fixedWidth:a,fixedHeight:l,fixedWrapperWidth:s,fixedWrapperHeight:c,enableCSSMode:d,enableFixedMode:h,n:qn,classes:Yn,resize:N,toNumber:Ge}}});it.render=Kn;var ye=it;he(ye);me(ye,U);var Zn=ye;const st={name:[String,Number],disabled:Boolean,ripple:{type:Boolean,default:!0},onClick:H()},at=Symbol("TABS_BIND_TAB_KEY");function Gn(){const{childProviders:e,bindChildren:t,length:n}=fn(at);return{length:n,tabList:e,bindTabList:t}}function Jn(){const{parentProvider:e,bindParent:t,index:n}=un(at);return t||Rn("Tab","<var-tab/> must in <var-tabs/>"),{index:n,tabs:e,bindTabs:t}}const{name:Qn,n:Z,classes:eo}=oe("tab");function to(e,t){const n=gt("ripple");return Ve((v(),_("div",{class:M(e.classes(e.n(),e.n("$--box"),e.computeColorClass(),e.n(`--${e.itemDirection}`))),ref:"tabEl",style:q({color:e.computeColorStyle()}),onClick:t[0]||(t[0]=(...o)=>e.handleClick&&e.handleClick(...o))},[A(e.$slots,"default")],6)),[[n,{disabled:e.disabled||!e.ripple}]])}const lt=fe({name:Qn,directives:{Ripple:zn},props:st,setup(e){const t=w(null),n=S(()=>t.value),o=S(()=>e.name),r=S(()=>e.disabled),{index:i,tabs:a,bindTabs:l}=Jn(),{onTabClick:s,active:c,activeColor:d,inactiveColor:h,disabledColor:m,itemDirection:f,resize:b}=a,u={name:o,index:i,disabled:r,element:n};l(u),X(()=>[e.name,e.disabled],b);function g(){return e.name!=null?c.value===e.name:c.value===(i==null?void 0:i.value)}function W(){return e.disabled?m.value:g()?d.value:h.value}function N(){return e.disabled?Z("$-tab--disabled"):g()?Z("$-tab--active"):Z("$-tab--inactive")}function T(I){const{disabled:B,name:z,onClick:R}=e;B||(F(R,z??i.value,I),s(u))}return{tabEl:t,active:c,activeColor:d,inactiveColor:h,itemDirection:f,n:Z,classes:eo,computeColorStyle:W,computeColorClass:N,handleClick:T}}});lt.render=to;var ge=lt;he(ge);me(ge,st);var no=ge;const ct={active:{type:[String,Number],default:0},layoutDirection:{type:String,default:"horizontal"},itemDirection:{type:String,default:"horizontal"},fixedBottom:Boolean,activeColor:String,inactiveColor:String,disabledColor:String,color:String,indicatorColor:String,indicatorSize:[String,Number],elevation:{type:[Boolean,String,Number],default:!1},scrollable:{type:String,default:"auto"},indicatorPosition:{type:String,default:"normal"},safeArea:Boolean,sticky:Boolean,stickyCssMode:ae(U,"cssMode"),stickyZIndex:ae(U,"zIndex"),offsetTop:ae(U,"offsetTop"),onClick:H(),onChange:H(),"onUpdate:active":H()};var We=(e,t,n)=>new Promise((o,r)=>{var i=s=>{try{l(n.next(s))}catch(c){r(c)}},a=s=>{try{l(n.throw(s))}catch(c){r(c)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});const{name:oo,n:ro,classes:io}=oe("tabs");function so(e,t){return v(),V(He(e.sticky?e.n("$-sticky"):e.Transition),{ref:e.sticky?"stickyComponent":void 0,"css-mode":e.sticky?e.stickyCssMode:void 0,"offset-top":e.sticky?e.offsetTop:void 0,"z-index":e.sticky?e.stickyZIndex:void 0},{default:x(()=>[$("div",wt({class:e.classes(e.n(),e.n("$--box"),e.n(`--item-${e.itemDirection}`),e.n(`--layout-${e.layoutDirection}-padding`),e.formatElevation(e.elevation,4),[e.fixedBottom,e.n("--fixed-bottom")],[e.safeArea,e.n("--safe-area")]),style:{background:e.color}},e.$attrs),[$("div",{ref:"scrollerEl",class:M(e.classes(e.n("tab-wrap"),[e.localScrollable,e.n(`--layout-${e.layoutDirection}-scrollable`)],e.n(`--layout-${e.layoutDirection}`)))},[A(e.$slots,"default"),$("div",{class:M(e.classes(e.n("indicator"),e.n(`--layout-${e.layoutDirection}${e.indicatorPosition}-indicator`))),style:q({width:e.layoutDirection==="horizontal"?e.indicatorWidth:e.toSizeUnit(e.indicatorSize),height:e.layoutDirection==="horizontal"?e.toSizeUnit(e.indicatorSize):e.indicatorHeight,transform:e.layoutDirection==="horizontal"?`translateX(${e.indicatorX})`:`translateY(${e.indicatorY})`})},[$("div",{class:M(e.classes(e.n("indicator-inner"),e.n(`--layout-${e.layoutDirection}-indicator-inner`))),style:q({background:e.indicatorColor||e.activeColor})},null,6)],6)],2)],16)]),_:3},8,["css-mode","offset-top","z-index"])}const ut=fe({name:oo,components:{VarSticky:Zn},inheritAttrs:!1,props:ct,setup(e){const t=w("0px"),n=w("0px"),o=w("0px"),r=w("0px"),i=w(!1),a=w(null),l=S(()=>e.active),s=S(()=>e.activeColor),c=S(()=>e.inactiveColor),d=S(()=>e.disabledColor),h=S(()=>e.itemDirection),m=w(null),f=S(()=>e.indicatorPosition==="reverse"?"-reverse":""),{tabList:b,bindTabList:u,length:g}=Gn();u({active:l,activeColor:s,inactiveColor:c,disabledColor:d,itemDirection:h,resize:O,onTabClick:N}),X(()=>g.value,()=>We(this,null,function*(){yield Ze(),O()})),X(()=>[e.active,e.scrollable],O),je(O),tt(O);function N(p){var y;const k=(y=p.name.value)!=null?y:p.index.value,{active:j,onChange:dt,onClick:ft}=e;F(e["onUpdate:active"],k),F(ft,k),k!==j&&F(dt,k)}function T(){return b.find(({name:p})=>e.active===p.value)}function I(p){return b.find(({index:y})=>(p??e.active)===y.value)}function B(){if(g.value===0)return;const{active:p}=e;if(pe(p)){const y=en(p,0,g.value-1);return F(e["onUpdate:active"],y),I(y)}}function z(){i.value=e.scrollable==="always"||b.length>=5}function R({element:p}){const y=p.value;y&&(e.layoutDirection==="horizontal"?(t.value=`${y.offsetWidth}px`,o.value=`${y.offsetLeft}px`):(n.value=`${y.offsetHeight}px`,r.value=`${y.offsetTop}px`))}function re({element:p}){if(!i.value)return;const y=a.value,k=p.value;if(e.layoutDirection==="horizontal"){const j=k.offsetLeft+k.offsetWidth/2-y.offsetWidth/2;ze(y,{left:j,animation:Re})}else{const j=k.offsetTop+k.offsetHeight/2-y.offsetHeight/2;ze(y,{top:j,animation:Re})}}function O(){const p=T()||I()||B();!p||p.disabled.value||(z(),R(p),re(p))}function Y(){return We(this,null,function*(){e.sticky&&m.value&&(yield m.value.resize())})}return{stickyComponent:m,indicatorWidth:t,indicatorHeight:n,indicatorX:o,indicatorY:r,indicatorPosition:f,localScrollable:i,scrollerEl:a,Transition:_t,toSizeUnit:Un,n:ro,classes:io,resize:O,resizeSticky:Y,formatElevation:wn}}});ut.render=so;var we=ut;he(we);me(we,ct);var ao=we;const Ie="all-in-one-seo-pack",lo={emits:["changed"],setup(){var a,l;const e=te();let t={name:""};(l=(a=e==null?void 0:e.root)==null?void 0:a.data)!=null&&l.screenContext||(t=$t());const{processSaveChanges:n}=At(),{getErrorClass:o,getErrorDisplay:r,strings:i}=Pt();return{composableStrings:i,getErrorClass:o,getErrorDisplay:r,postEditorStore:Tt(),processSaveChanges:n,rootStore:Ue(),route:t}},components:{BaseButton:Mt,CoreProBadge:Lt,SvgCaret:Et,SvgCircleCheck:Ot,SvgCircleInformation:Nt,SvgEllipse:Bt,TransitionSlide:zt,VarTab:no,VarTabs:ao},props:{tabs:{type:Array,required:!0},skinnyTabs:Boolean,active:String,showSaveButton:{type:Boolean,default(){return!0}},internal:Boolean,disableMobile:Boolean},data(){return{buttonLoading:!1,showMobileMenu:!0,calculateWidth:!1,showMobileTabs:!1,strings:kt(this.composableStrings,{saveChanges:Se("Save Changes",Ie),new:Se("NEW!",Ie)})}},computed:{activeTab(){var e;return this.active?this.active:this.$route&&this.$route.name?this.$route.name:(e=this.tabs[0])==null?void 0:e.slug},filteredTabs(){return this.tabs.filter(e=>e.slug!==(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""))}},methods:{clickMobileTabs(e){this.$emit("changed",e),this.showMobileTabs=!1},maybeChangeTab(e){if(this.active){this.$emit("changed",e);return}const t=this.tabs.find(n=>n.slug===e);t&&this.$router.push(t.url)},getActiveTabName(){const e=this.tabs.find(t=>t.slug===(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""));return e?e.name:""},maybeShowMobileMenu(){if(window.matchMedia("(max-width: 782px)").matches&&!this.disableMobile){this.showMobileMenu=!0;return}let e=0;this.calculateWidth=!0,this.$nextTick(()=>{e=this.$refs["tabs-scroller"].offsetWidth,this.calculateWidth=!1;let t=0;const n=this.$refs["tabs-button"];if(n){const o=n.querySelector(".aioseo-button");t=o?o.scrollWidth:0}if(e+t>this.$refs["aioseo-tabs"].offsetWidth){this.showMobileMenu=!0;return}this.showMobileMenu=!1})},createRipple(e){const t=e.currentTarget,n=document.createElement("span"),o=Math.max(t.clientWidth,t.clientHeight),r=o/2,i=t.getBoundingClientRect();n.style.width=n.style.height=`${o}px`,n.style.left=`${e.clientX-(i.left+r)}px`,n.style.top=`${e.clientY-(i.top+r)}px`,n.classList.add("ripple");const a=t.getElementsByClassName("ripple")[0];a&&a.remove(),t.appendChild(n)}},beforeMount(){window.addEventListener("resize",this.maybeShowMobileMenu)},async mounted(){this.$nextTick(()=>{this.maybeShowMobileMenu();const e=this.$refs["aioseo-tabs"],t=e.querySelector(".var-tab--active"),n=e.querySelector(".var-tabs__indicator");if(!t||!n)return;setTimeout(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)},300),new MutationObserver(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)}).observe(n,{attributes:!0});const r=e.querySelectorAll(".var-tab");r.length&&r.forEach(i=>{i.addEventListener("click",this.createRipple)})})},beforeUnmount(){window.removeEventListener("resize",this.maybeShowMobileMenu)}},co={class:"tabs-scroller",ref:"tabs-scroller"},uo={class:"tab-label"},fo=["textContent"],po={key:1,class:"warning"},vo={key:0,class:"label pro-badge"},ho={key:1,class:"label new"},mo={key:0,class:"aioseo-mobile-tabs"},bo=$("span",{class:"tab-indicator"},null,-1),yo={class:"tab-links"},go={key:0,class:"new"},wo=["onClick"],_o={key:1,class:"button-right",ref:"tabs-button"},So={class:"tabs-extra"};function $o(e,t,n,o,r,i){const a=P("svg-ellipse"),l=P("svg-circle-check"),s=P("svg-circle-information"),c=P("core-pro-badge"),d=P("var-tab"),h=P("var-tabs"),m=P("svg-caret"),f=P("transition-slide"),b=P("base-button");return v(),_("div",{class:M(["aioseo-tabs",{internal:n.internal,skinny:n.skinnyTabs}]),ref:"aioseo-tabs"},[Ve($("div",co,[D(h,{active:i.activeTab,onClick:i.maybeChangeTab,ref:"var-tabs"},{default:x(()=>[(v(!0),_(K,null,ie(n.tabs,(u,g)=>(v(),V(d,{name:u.slug,key:g},{default:x(()=>[A(e.$slots,"var-tab",{tab:u},()=>[A(e.$slots,"var-tab-icon",{tab:u}),$("span",uo,L(u.name),1),u.errorCount>=0?(v(),_("span",{key:0,class:M(["tab-score",o.getErrorClass(o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors)])},[0<o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors?(v(),V(a,{key:0,width:"8"})):C("",!0),o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors===0?(v(),V(l,{key:1,width:"12"})):C("",!0),$("span",{textContent:L(o.getErrorDisplay(o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors))},null,8,fo)],2)):C("",!0),u.warning&&e.$root.$data.screenContext!=="sidebar"?(v(),_("span",po,[D(s,{width:"15",height:"15"})])):C("",!0),u.label?(v(),_(K,{key:2},[u.label==="pro"?(v(),_("span",vo,[D(c)])):C("",!0),u.label==="new"?(v(),_("span",ho,L(r.strings.new),1)):C("",!0)],64)):C("",!0)])]),_:2},1032,["name"]))),128))]),_:3},8,["active","onClick"])],512),[[St,!r.showMobileMenu||r.calculateWidth]]),r.showMobileMenu?(v(),_("div",mo,[$("div",{class:"active-tab",onClick:t[1]||(t[1]=u=>r.showMobileTabs=!r.showMobileTabs)},[$("div",null,[se(L(i.getActiveTabName())+" ",1),D(m,{onClick:t[0]||(t[0]=_e(u=>r.showMobileTabs=!r.showMobileTabs,["stop"])),class:M({rotated:!r.showMobileTabs})},null,8,["class"]),bo])]),D(f,{active:r.showMobileTabs,class:"tab-dropdown"},{default:x(()=>[$("div",yo,[n.active?C("",!0):(v(!0),_(K,{key:0},ie(i.filteredTabs,(u,g)=>(v(),V(He(n.active?"a":"router-link"),{key:g,to:u.url,onClick:t[2]||(t[2]=W=>r.showMobileTabs=!1)},{default:x(()=>[se(L(u.name)+" ",1),u.label==="new"?(v(),_("span",go,L(r.strings.new),1)):C("",!0)]),_:2},1032,["to"]))),128)),n.active?(v(!0),_(K,{key:1},ie(i.filteredTabs,(u,g)=>(v(),_("a",{href:"#",key:g,onClick:_e(W=>i.clickMobileTabs(u.slug),["prevent"])},L(u.name),9,wo))),128)):C("",!0)])]),_:1},8,["active"])])):C("",!0),n.showSaveButton?(v(),_("div",_o,[A(e.$slots,"button",{},()=>[D(b,{type:"blue",size:"medium",loading:o.rootStore.loading,onClick:t[3]||(t[3]=u=>o.processSaveChanges(o.route.name))},{default:x(()=>[se(L(r.strings.saveChanges),1)]),_:1},8,["loading"])])],512)):C("",!0),$("div",So,[A(e.$slots,"extra")])],2)}const Ao=Rt(lo,[["render",$o]]);export{Ao as C,At as u};