const t=window.wp||{};typeof t.data<"u"&&t.data.subscribe(function(){const o=t.data.select("core/editor"),r=t.data.select("core/notices").getNotices(),n=o?.getCurrentPostAttribute("aioseo_notices");o?.isSavingPost()&&!o.isAutosavingPost()&&n&&n.forEach(s=>{!s.message||r.find(e=>e.id===s.options.id)||(s.message=s.message.replace(/(<([^>]+)>)/gi,""),s.options?.actions&&s.options.actions.map(e=>(e?.target==="_blank"&&(e.onClickUrl=e.url,e.onClick=function(a){a.preventDefault(),window.open(e.onClickUrl),t.data.dispatch("core/notices").removeNotice(s.options.id)},delete e.url,delete e.target),e?.class&&(e.className=e.class,delete e.class),e)),t.data.dispatch("core/notices").createNotice(s.status||"warning",s.message,s.options||[]),window.aioseoBus&&window.aioseoBus.$emit("wp-core-notice-created"))})});
