const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./EditorSidebar.css"])))=>i.map(i=>d[i]);
import{_ as S}from"./preload-helper-xg4QBr_M.js";const E=()=>{var a,s,p,l,t,d,i;const e=[(a=window==null?void 0:window.proRankSidebar)==null?void 0:a.pluginUrl,(s=window==null?void 0:window.prorankSeo)==null?void 0:s.pluginUrl,(p=window==null?void 0:window.prorankSeoAdmin)==null?void 0:p.pluginUrl,(l=window==null?void 0:window.prorankSeoEditor)==null?void 0:l.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=((i=c[n])==null?void 0:i.src)||"";if(r&&r.includes("/wp-content/plugins/")&&r.includes("/build/")&&r.includes("/prorank"))return r.replace(/\?.*$/,"").replace(/\/build\/[^/]+$/,"/")}return""},m=E(),b=m?`${m.replace(/\/+$/,"")}/assets/images/favicon.png`:"";let f=!1;const h=(e,c=50)=>{let a=0;const s=()=>{var i,n,r,u,w,k,g,o;a++;const p=(n=(i=window.wp)==null?void 0:i.plugins)==null?void 0:n.registerPlugin,l=(u=(r=window.wp)==null?void 0:r.editor)==null?void 0:u.PluginSidebar,t=(k=(w=window.wp)==null?void 0:w.i18n)==null?void 0:k.__,d=(o=(g=window.wp)==null?void 0:g.element)==null?void 0:o.createElement;if(p&&l&&t&&d){e();return}a<c?setTimeout(s,100):console.warn("[ProRank SEO] WordPress sidebar dependencies not available after timeout")};s()},P=()=>{var g;if(f)return;const{createElement:e,lazy:c,Suspense:a,Fragment:s}=window.wp.element,{registerPlugin:p,getPlugin:l}=window.wp.plugins,{__:t=o=>o}=((g=window.wp)==null?void 0:g.i18n)||{},{Spinner:d}=window.wp.components;if(l&&l("prorank-seo-sidebar")){f=!0;return}const i=window.wp.editor||{},n=i.PluginSidebar,r=i.PluginSidebarMoreMenuItem;if(!n){console.warn("[ProRank SEO] PluginSidebar components not available");return}const u=({size:o=24})=>b?e("img",{src:b,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"})),w=c(()=>S(()=>import("./EditorSidebar-B0ARB6Q-.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"))}))),k=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(s,null,r?e(r,{target:"prorank-seo-sidebar",icon:e(u,{size:20})},t("ProRank SEO","prorank-seo")):null,e(n,{name:"prorank-seo-sidebar",title:t("ProRank SEO","prorank-seo"),icon:e(u,{size:20}),className:"prorank-plugin-sidebar",isPinnable:!0},e(a,{fallback:k},e(w,null))))}),f=!0};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{h(P)}):h(P);
