import{J as n,j as i,ak as l}from"./vendor-mui-core-CKKG_1TN.js";import{m as d,r as c}from"./vendor-react-CTtPmzVP.js";import{V as u,a_ as h}from"./vendor-ux-DjXlxcvL.js";import g from"./index-BvB9yPsA.js";import"./vendor-utils-CUs2ebe7.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";import"./index-BEfIUbZC.js";import"./vendor-arcblock-BCP2x3BR.js";import"./confirm-D6AvlbAp.js";import"./index-DBs9Ljax.js";import"./session-Cin9Rizr.js";import"./did-address-Cq16cwTy.js";import"./empty-spinner-BClWI15N.js";import"./bundle-avatar-1zs0l21j.js";import"./shorten-label-DXFyDHDr.js";import"./list-header-wJF4c6BN.js";import"./click-to-copy-Dk6ZAJOw.js";import"./question-mark-circle.svg-GhTaklFN.js";import"./useSetState-L-f8mSga.js";import"./engine-DOYgeVKF.js";import"./api-B24x7kOD.js";import"./vendor-mui-x-DHGvg6Bj.js";import"./react-beautiful-dnd.esm-BwIgGfYj.js";import"./raf-schd.esm-XXBRsnmf.js";import"./wait-connect-TKbZWSFd.js";import"./get-safe-url-DxqVk96E.js";import"./item-BabsiwzU.js";import"./delete-confirm-BLy-Oo1o.js";import"./index-BnOC3Ium.js";import"./index-oucqu2vy.js";import"./index-D-O_eFad.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function O(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{O as default};
