Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
superstepsgroup.com
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
Editing: blocks.23885817.js
import{f,u as h}from"./js/app-core.b862f9c8.js";import{l as d}from"./js/vendor-lodash.d3ad8b99.js";import"./js/vendor-vue-ui.f00a1236.js";import"./js/vendor-other.7b559694.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)}
Save
Cancel