import{J as n,j as i,ak as l}from"./vendor-mui-core-B5XNUjey.js";import{j as d,r as c}from"./vendor-react-CUXIiAnY.js";import{V as u,b as h}from"./vendor-ux-BX9dSNUy.js";import g from"./index-Ccjxs0wr.js";import"./vendor-utils-CFxoplqC.js";import"./vendor-hooks-U4TTuKG0.js";import"./lottie-web-4koyQiv_.js";import"./index-Dijoh4El.js";import"./vendor-arcblock-D4Rvz_D3.js";import"./confirm-BIsS5xyi.js";import"./index-DBs9Ljax.js";import"./session-DUT2afHJ.js";import"./did-address-Qmm0nyiR.js";import"./empty-spinner-0EAHJWBW.js";import"./bundle-avatar-CfVy3gda.js";import"./shorten-label-DhOty_4j.js";import"./list-header-BQo9L_6R.js";import"./click-to-copy-DXHOGoUP.js";import"./question-mark-circle.svg-DK9nTUDZ.js";import"./useSetState-cWrp7qoX.js";import"./engine-Cx3nUUOw.js";import"./api-Cjc501Es.js";import"./vendor-mui-x-DtPl0qBm.js";import"./react-beautiful-dnd.esm-Cvsu51oI.js";import"./raf-schd.esm-JNUhxcps.js";import"./wait-connect-CCXiMHZY.js";import"./get-safe-url-pZvXlaJu.js";import"./item-Bpf_gGYt.js";import"./delete-confirm-DSQSBte5.js";import"./index-BOiRUuPB.js";import"./index-Dnont80V.js";import"./index-CIvZ7HIX.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function T(){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{T as default};
