(()=>{"use strict";const e={n:t=>{const i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{if(Array.isArray(i))for(var r=0;r<i.length;){var o=i[r++],s=i[r++];e.o(t,o)?0===s&&r++:0===s?Object.defineProperty(t,o,{enumerable:!0,value:i[r++]}):Object.defineProperty(t,o,{enumerable:!0,get:s})}else for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:(e,t)=>Object.hasOwn(e,t)},t=window.wp.apiFetch;var i=e.n(t);const r=window.wp.data,o={Tablet:"1024px",Mobile:"768px"},s=()=>(0,r.select)("core/editor")?.getDeviceType?.()||(0,r.select)("core/edit-post")?.__experimentalGetPreviewDeviceType?.()||"Desktop",n=e=>{const t=document.querySelector('iframe[name="editor-canvas"]');if(!t)return;const i=t.closest(".editor-resizable-editor"),r=i||t;i&&(t.style.width="",t.style.marginLeft="",t.style.marginRight=""),"Tablet"===e||"Mobile"===e?(r.style.width=o[e],r.style.marginLeft="auto",r.style.marginRight="auto"):(r.style.width="100%",r.style.marginLeft="",r.style.marginRight="")};i()({path:"/axcelersblocks/v1/device-settings"}).then(e=>{e?.devices?.tablet?.width&&(o.Tablet=e.devices.tablet.width),e?.devices?.mobile?.width&&(o.Mobile=e.devices.mobile.width);const t=s();window.requestAnimationFrame(()=>n(t)),window.setTimeout(()=>n(t),150)}).catch(()=>{});let a=null;(0,r.subscribe)(()=>{const e=s();e!==a&&(a=e,window.requestAnimationFrame(()=>n(e)),window.setTimeout(()=>n(e),150))})})();