const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./EditorSidebar.css"])))=>i.map(i=>d[i]);
import{_ as R}from"./preload-helper-xg4QBr_M.js";const v=()=>{var i,a,p,s,t,d,l;const e=[(i=window==null?void 0:window.proRankSidebar)==null?void 0:i.pluginUrl,(a=window==null?void 0:window.prorankSeo)==null?void 0:a.pluginUrl,(p=window==null?void 0:window.prorankSeoAdmin)==null?void 0:p.pluginUrl,(s=window==null?void 0:window.prorankSeoEditor)==null?void 0:s.pluginUrl,(t=window==null?void 0:window.proRankSEO)==null?void 0:t.pluginUrl,(d=window==null?void 0:window.proRankSeoAdmin)==null?void 0:d.pluginUrl];for(const n of e)if(typeof n=="string"&&n.length>0)return n;if(typeof document=="undefined")return"";const c=document.getElementsByTagName("script");for(let n=0;n<c.length;n+=1){const r=((l=c[n])==null?void 0:l.src)||"";if(r&&r.includes("/wp-content/plugins/")&&r.includes("/build/")&&r.includes("/prorank"))return r.replace(/\?.*$/,"").replace(/\/build\/[^/]+$/,"/")}return""},h=v(),E=h?`${h.replace(/\/+$/,"")}/assets/images/favicon.png`:"";let f=!1;const L=(e,c=50)=>{let i=0;const a=()=>{var n,r,w,u,k,m,g,o,b,P,S;i++;const p=(r=(n=window.wp)==null?void 0:n.plugins)==null?void 0:r.registerPlugin,s=!((w=window.wp)!=null&&w.editor)&&((k=(u=window.wp)==null?void 0:u.editPost)==null?void 0:k.PluginSidebar),t=((g=(m=window.wp)==null?void 0:m.editor)==null?void 0:g.PluginSidebar)||s,d=(b=(o=window.wp)==null?void 0:o.i18n)==null?void 0:b.__,l=(S=(P=window.wp)==null?void 0:P.element)==null?void 0:S.createElement;if(p&&t&&d&&l){e();return}i<c?setTimeout(a,100):console.warn("[ProRank SEO] WordPress sidebar dependencies not available after timeout")};a()},y=()=>{var g;if(f)return;const{createElement:e,lazy:c,Suspense:i,Fragment:a}=window.wp.element,{registerPlugin:p,getPlugin:s}=window.wp.plugins,{__:t=o=>o}=((g=window.wp)==null?void 0:g.i18n)||{},{Spinner:d}=window.wp.components;if(s&&s("prorank-seo-sidebar")){f=!0;return}const l=window.wp.editor||{},n=window.wp.editor?{}:window.wp.editPost||{},r=l.PluginSidebar||n.PluginSidebar,w=l.PluginSidebarMoreMenuItem||n.PluginSidebarMoreMenuItem;if(!r){console.warn("[ProRank SEO] PluginSidebar components not available");return}const u=({size:o=24})=>E?e("img",{src:E,width:o,height:o,alt:"ProRank SEO",style:{display:"block"}}):e("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M12 2L4 6.5V17.5L12 22L20 17.5V6.5L12 2Z",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M8 15V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),e("path",{d:"M12 15V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),e("path",{d:"M16 15V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),k=c(()=>R(()=>import("./EditorSidebar-eCRr9Rwn.js"),__vite__mapDeps([0]),import.meta.url).catch(o=>(console.error("[ProRank SEO] Failed to load EditorSidebar:",o),{default:()=>e("div",{style:{padding:"16px",color:"#856404",background:"#fff3cd"}},t("Failed to load sidebar. Please refresh.","prorank-seo"))}))),m=e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"20px",gap:"10px"}},d&&e(d,null),e("span",null,t("Loading...","prorank-seo")));p("prorank-seo-sidebar",{icon:e(u,{size:20}),render:()=>e(a,null,w?e(w,{target:"prorank-seo-sidebar",icon:e(u,{size:20})},t("ProRank SEO","prorank-seo")):null,e(r,{name:"prorank-seo-sidebar",title:t("ProRank SEO","prorank-seo"),icon:e(u,{size:20}),className:"prorank-plugin-sidebar",isPinnable:!0},e(i,{fallback:m},e(k,null))))}),f=!0};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{L(y)}):L(y);
