/home/preegmxb/bricks.theoriginalsstudios.com/wp-content/themes/bricks/assets/js/gutenberg.min.js
function bricksAdminGutenbergEditWithBricks(){var t=document.querySelector("#wp-admin-bar-edit_with_bricks a");t||((t=document.createElement("a")).id="wp-admin-bar-edit_with_bricks",t.href=window.bricksData.builderEditLink,t.innerText=window.bricksData.i18n.editWithBricks),wp.data.subscribe((function(){setTimeout((function(){var e=document.querySelector(".edit-post-header-toolbar");if(e&&e instanceof HTMLElement&&!e.querySelector("#toolbar-edit_with_bricks")){var i=document.createElement("a");i.id="toolbar-edit_with_bricks",i.classList.add("button"),i.classList.add("button-primary"),i.innerText=t.innerText,i.href=t.href,e.append(i),i.addEventListener("click",(function(t){t.preventDefault();var e=wp.data.select("core/editor").getEditedPostAttribute("title"),i=wp.data.select("core/editor").getCurrentPostId();e||wp.data.dispatch("core/editor").editPost({title:"Bricks #"+i}),wp.data.dispatch("core/editor").savePost();var r=function(t){setTimeout((function(){wp.data.select("core/editor").isSavingPost()||wp.data.select("core/editor").isAutosavingPost()?r(t):window.location.href=t}),400)};r(t.target.href)}))}}),1)}))}document.addEventListener("DOMContentLoaded",(function(t){bricksAdminGutenbergEditWithBricks()}));