@abtnode/blocklet-services 1.16.39-beta-20250221-133434-22e84449 → 1.16.39-beta-20250222-094928-e54632fa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/assets/{Add-udgpbcQ-.js → Add-D5aJYF-w.js} +1 -1
  2. package/dist/assets/{ArrowDropDown-CP8sFDTn.js → ArrowDropDown-Cl8c24xY.js} +1 -1
  3. package/dist/assets/{CheckCircle-CL1MZKeF.js → CheckCircle-C8i0xLNv.js} +1 -1
  4. package/dist/assets/{ChevronLeft-Dxe-8OAb.js → ChevronLeft-BCqszL0Z.js} +1 -1
  5. package/dist/assets/{ChevronRight-Jj-tneRk.js → ChevronRight-B-QUfWQJ.js} +1 -1
  6. package/dist/assets/{DeleteOutline-B2EIRfvm.js → DeleteOutline-CRGsqlBB.js} +1 -1
  7. package/dist/assets/{Done-BmN-n4Md.js → Done-JsgXq87T.js} +1 -1
  8. package/dist/assets/{Download-T0esN2Wf.js → Download-D8FYfZjb.js} +1 -1
  9. package/dist/assets/{Error-DxGYBrX_.js → Error-CBK0TIhk.js} +1 -1
  10. package/dist/assets/{Google-C8v_Y3AW.js → Google-B-PtsEiN.js} +1 -1
  11. package/dist/assets/{InfoOutlined-BoujVod4.js → InfoOutlined-DXbe7-Vo.js} +1 -1
  12. package/dist/assets/{Launch-mtPFLcSN.js → Launch-C0WU9j27.js} +1 -1
  13. package/dist/assets/{LaunchOutlined-BqUlBjUr.js → LaunchOutlined-BqIvI1Me.js} +1 -1
  14. package/dist/assets/{Loop-Cxat_C59.js → Loop-BQEttF_G.js} +1 -1
  15. package/dist/assets/{MoreHoriz-DVyDe-n2.js → MoreHoriz-B7JSMM__.js} +1 -1
  16. package/dist/assets/{PlayArrow-CbK5B-2U.js → PlayArrow-DisvYm5k.js} +1 -1
  17. package/dist/assets/{ViewList-B-1WiukK.js → ViewList-BXtBGGyL.js} +1 -1
  18. package/dist/assets/{access-control-DFyNDuUU.js → access-control-CHcoAvOI.js} +1 -1
  19. package/dist/assets/{actions-DHK1GfXI.js → actions-1ozfktYK.js} +1 -1
  20. package/dist/assets/{add-component-core-vkvnRJpn.js → add-component-core-DUCI1k0g.js} +1 -1
  21. package/dist/assets/{add-resource-CTeUMZhV.js → add-resource-CrWGj-vL.js} +1 -1
  22. package/dist/assets/{addon-DrUHZbxW.js → addon-Crm5Vlr1.js} +1 -1
  23. package/dist/assets/{analytics-BnE3HnyH.js → analytics-COHAoW1P.js} +1 -1
  24. package/dist/assets/{audit-logs-DDZXYPO2.js → audit-logs-kFhZOUsJ.js} +1 -1
  25. package/dist/assets/{base32-Bg7zWLHM.js → base32-Gx8S-X9Y.js} +1 -1
  26. package/dist/assets/{branding-GXnswdtg.js → branding-DWwsUSwn.js} +2 -2
  27. package/dist/assets/{bundle-avatar-kmTWjmMZ.js → bundle-avatar-DZAhgQge.js} +1 -1
  28. package/dist/assets/{button-CImZba-M.js → button-DklX5vfm.js} +1 -1
  29. package/dist/assets/{click-to-copy-SPoXGjhb.js → click-to-copy-D4eMUY2Y.js} +1 -1
  30. package/dist/assets/{complete-DCu0ecH1.js → complete-Bk6neZ6g.js} +1 -1
  31. package/dist/assets/{component-D9VIwsjz.js → component-BddYxBoS.js} +1 -1
  32. package/dist/assets/{config-BqevGx2X.js → config-BLMVw_7t.js} +1 -1
  33. package/dist/assets/{config-BQu2I3z_.js → config-CKSNoSqf.js} +1 -1
  34. package/dist/assets/{config-navigation-C6p-GCJ-.js → config-navigation-B8D15rni.js} +3 -3
  35. package/dist/assets/{config-space-BVsaPZS_.js → config-space-DsOEvFAI.js} +1 -1
  36. package/dist/assets/{confirm-BckBMOcL.js → confirm-B3CehVfh.js} +1 -1
  37. package/dist/assets/{connect-Bk35jyN7.js → connect-BFxfmoDy.js} +1 -1
  38. package/dist/assets/{connect-D0XKtcMb.js → connect-EfireciW.js} +1 -1
  39. package/dist/assets/{connect-to-BWpqHCU5.js → connect-to-DHOAMvIW.js} +1 -1
  40. package/dist/assets/{dashboard-DJwyQ0IN.js → dashboard-kggzA59O.js} +3 -3
  41. package/dist/assets/{delete-confirm-C4GbidLm.js → delete-confirm-d-OlwIQw.js} +1 -1
  42. package/dist/assets/{did-address-DsaXravU.js → did-address-C1Gnyot5.js} +1 -1
  43. package/dist/assets/{domain-B6CfBBp6.js → domain-CvFfaIN6.js} +1 -1
  44. package/dist/assets/{domain-action-card-B8cJWHEv.js → domain-action-card-B79yRdQ6.js} +1 -1
  45. package/dist/assets/domains-CoLKQx_U.js +1 -0
  46. package/dist/assets/{email-CK1jC5WM.js → email-eWqmZSiB.js} +1 -1
  47. package/dist/assets/{exchange-passport-D6VbniS0.js → exchange-passport-DupfOJy6.js} +1 -1
  48. package/dist/assets/{form-text-input-DFFNKfWp.js → form-text-input-Vd1x-3r7.js} +1 -1
  49. package/dist/assets/{fuel-Co3GBMd3.js → fuel-Wkpigcex.js} +1 -1
  50. package/dist/assets/{fullpage-DmUrgaXO.js → fullpage-YYyCExL1.js} +1 -1
  51. package/dist/assets/{get-safe-url-B9KuIPHY.js → get-safe-url-BUeJ9nhL.js} +1 -1
  52. package/dist/assets/{get-safe-url-Dg8FOTjG.js → get-safe-url-uAWmJaE7.js} +1 -1
  53. package/dist/assets/{home-BgCLYfoO.js → home-dPt3qe4k.js} +1 -1
  54. package/dist/assets/{iframe-BfCk9odl.js → iframe-DJUrVJrV.js} +1 -1
  55. package/dist/assets/{index-C2h3b3qO.js → index-B0KY0nDh.js} +1 -1
  56. package/dist/assets/{index-rP3b0CME.js → index-BFOp3JOz.js} +1 -1
  57. package/dist/assets/{index--F_W58cR.js → index-BMe5Qmpg.js} +1 -1
  58. package/dist/assets/{index-sLkJpR5o.js → index-BUl0-fVJ.js} +1 -1
  59. package/dist/assets/{index-Cj538gfs.js → index-BZltOpLK.js} +1 -1
  60. package/dist/assets/{index-B_f-vCCz.js → index-BqmuG2xd.js} +1 -1
  61. package/dist/assets/{index-8MMKiUTa.js → index-CI3zUsid.js} +4 -4
  62. package/dist/assets/{index-dSbx-_M8.js → index-CZS5amkm.js} +1 -1
  63. package/dist/assets/{index-Bf_1EkYS.js → index-Cr2DFHMx.js} +1 -1
  64. package/dist/assets/{index-DkbuxwZE.js → index-DA8zLg5u.js} +1 -1
  65. package/dist/assets/{index-BNAfDqcG.js → index-DOASFqSG.js} +1 -1
  66. package/dist/assets/{index-3h3nnFcB.js → index-DQ_gp9FQ.js} +1 -1
  67. package/dist/assets/{index-CmBEz5CL.js → index-DwTE_KjA.js} +3 -3
  68. package/dist/assets/{index-QGwREoo6.js → index-b2WEDrup.js} +3 -3
  69. package/dist/assets/{index-EgZ4xTuy.js → index-f-SHhhMn.js} +1 -1
  70. package/dist/assets/{invitation-Bfoc9rG-.js → invitation-BRP-CdYl.js} +1 -1
  71. package/dist/assets/{invite-B4jXTxxv.js → invite-B55Onb_m.js} +1 -1
  72. package/dist/assets/{issue-passport-CVA5upUB.js → issue-passport-Cd9Bbx0V.js} +1 -1
  73. package/dist/assets/{item-0J8MTdrM.js → item-B3EOOrSZ.js} +1 -1
  74. package/dist/assets/{layout-C7WJ00Ek.js → layout-CUY8Pv_q.js} +1 -1
  75. package/dist/assets/{list-C8W2Ztkh.js → list-Txvm-nIG.js} +1 -1
  76. package/dist/assets/{list-header-uzHBSbhH.js → list-header-Cb6_-8qZ.js} +1 -1
  77. package/dist/assets/{localization-BwFYCZgc.js → localization-eKoK3nKh.js} +1 -1
  78. package/dist/assets/{log-ByF4DLgp.js → log-pFG8Bdb0.js} +1 -1
  79. package/dist/assets/{login-D6E1Agab.js → login-CPtrXcco.js} +1 -1
  80. package/dist/assets/{login-oauth-callback-DWJMHw0r.js → login-oauth-callback-BfA4R326.js} +1 -1
  81. package/dist/assets/{logo-uploader-C3tOoZU0.js → logo-uploader-DmrsGrvc.js} +3 -3
  82. package/dist/assets/{lost-passport-DZ3RaG1P.js → lost-passport-R0QZBlPx.js} +1 -1
  83. package/dist/assets/{open-window-C8DmGGiK.js → open-window-DSwWREEC.js} +1 -1
  84. package/dist/assets/{overview-B-qeY9_9.js → overview-DRqGFwLE.js} +1 -1
  85. package/dist/assets/{page-header-DPKBfrCy.js → page-header-Bb6Nvnno.js} +1 -1
  86. package/dist/assets/{permission-BY2FbqNx.js → permission-BOXdugm0.js} +1 -1
  87. package/dist/assets/{preferences-jbp_hJW_.js → preferences-BYn4pHhY.js} +1 -1
  88. package/dist/assets/{publish-resource-CbEvZdTB.js → publish-resource-vuv3Ki3A.js} +1 -1
  89. package/dist/assets/{react-beautiful-dnd.esm-CKGqjrko.js → react-beautiful-dnd.esm-B29sb4Ur.js} +1 -1
  90. package/dist/assets/{relative-time-B24G13wp.js → relative-time-DnufzEIK.js} +1 -1
  91. package/dist/assets/sdk-CzVXemwI.js +1 -0
  92. package/dist/assets/{session-CXP_o5z6.js → session-Cbe0QivC.js} +1 -1
  93. package/dist/assets/{setup-D5Yfz51I.js → setup-Bt7ys8xh.js} +3 -3
  94. package/dist/assets/{start-BWeZ83st.js → start-BwanYA1E.js} +1 -1
  95. package/dist/assets/{step-actions-CQPEoZDr.js → step-actions-BsBz5Rj2.js} +1 -1
  96. package/dist/assets/{studio-Bm45YPri.js → studio-ByYBPBMO.js} +1 -1
  97. package/dist/assets/{switch-control-0xvudC3P.js → switch-control-DsmPki3h.js} +1 -1
  98. package/dist/assets/{traffic-C3au13Oz.js → traffic-DJKD2aYa.js} +1 -1
  99. package/dist/assets/{transfer-D-pSYMoH.js → transfer-lf2RaAnA.js} +1 -1
  100. package/dist/assets/{unsubscribe-CHbAL1If.js → unsubscribe-Dnf9ENon.js} +1 -1
  101. package/dist/assets/{useLocalStorage-grucDLLp.js → useLocalStorage-C6K1MfKS.js} +1 -1
  102. package/dist/assets/{user-center-DzUOMtVD.js → user-center-uxUOuBkD.js} +1 -1
  103. package/dist/assets/{util-DUNQVVoO.js → util-DLJJLuoV.js} +1 -1
  104. package/dist/assets/{util-DB9FK0S1.js → util-OT81aO9n.js} +1 -1
  105. package/dist/assets/{vendor-arcblock-BCYov1AG.js → vendor-arcblock-MU05F41R.js} +111 -111
  106. package/dist/assets/{wrap-locale-cIg_86o_.js → wrap-locale-D7D-LqDZ.js} +1 -1
  107. package/dist/index.html +2 -2
  108. package/dist/service-worker.js +1 -1
  109. package/package.json +29 -29
  110. package/dist/assets/domains-C5wVrtkN.js +0 -1
  111. package/dist/assets/sdk-CdIjci-y.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CmBEz5CL.js","assets/vendor-arcblock-BCYov1AG.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-BWT1QT-d.js","assets/vendor-hooks-ZnvK17j8.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-QGwREoo6.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
- import{r as w,k as St,l as st,L as ce,f as Qn,h as Yn,i as dt}from"./vendor-react-D-afvo_7.js";import{a1 as he,j as t,t as Be,a3 as u,aM as Vo,E as d,a4 as de,I as oe,T as O,bU as Wo,D as rt,aa as ae,ax as Zn,bL as Xe,ad as Uo,aN as Je,bq as xt,x as Z,a2 as Ze,P as Fo,G as Ho,v as It,$ as Go,ar as Xo,al as ue,ah as Kn,ab as Jo,r as Qo,bK as es,K as Ve,y as Yo,M as Y,ac as je,aL as ts,L as os,z as ns,bn as ss,aC as Zo,aB as Ke,bt as rs,bu as ls,bV as is,bW as cs,aP as Ko,bH as as,bN as ds,bx as us,by as ut}from"./vendor-mui-core-BWT1QT-d.js";import{z as me,C as _e,h as re,a6 as ps,f as fo,_ as en,ae as ho}from"./index-QGwREoo6.js";import{a0 as be,b as X,e as Q,a3 as Ae,ad as tn,aW as on,ab as nn,_ as fs,aX as Dt,j as U,n as hs,aY as ms,aZ as bs,z as xs,aE as ne,a_ as gs,aq as ks,aO as Ie,a8 as Tt,a$ as ye,aj as js,ao as ys}from"./vendor-arcblock-BCYov1AG.js";import{d as _t}from"./Add-udgpbcQ-.js";import{d as vs}from"./Error-DxGYBrX_.js";import{C as Pt}from"./confirm-BckBMOcL.js";import{u as lt}from"./session-CXP_o5z6.js";import{W as mo}from"./did-address-DsaXravU.js";import{E as We,D as bo,C as xo,P as go}from"./react-beautiful-dnd.esm-CKGqjrko.js";import{B as Lt}from"./bundle-avatar-kmTWjmMZ.js";import{S as pe}from"./shorten-label-CRTt8ftG.js";import{T as ws,x as ie,G as qt,C as sn}from"./vendor-utils-5TjOM6td.js";import{d as Cs}from"./Download-T0esN2Wf.js";import{C as rn}from"./click-to-copy-SPoXGjhb.js";import{d as Rs}from"./QuestionMarkCircle-CVX4b3Jp.js";import{u as Ss}from"./vendor-hooks-ZnvK17j8.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as $t}from"./index-DoZ2YM4T.js";import{E as Nt}from"./index-CV3ZYUK0.js";import{p as et}from"./index-DkbuxwZE.js";import"./api-K65cLqol.js";import{d as Is}from"./ChevronRight-Jj-tneRk.js";import{T as Ds,a as Ts}from"./vendor-mui-x-VJmvJUkN.js";import{d as ko}from"./DeleteOutline-B2EIRfvm.js";import{c as _s,A as ln,u as Ps,S as Ls,U as qs,a as pt,b as cn,n as $s,e as Ns,f as jo,g as As,h as Es}from"./item-0J8MTdrM.js";import{d as Ms}from"./ArrowDropDown-CP8sFDTn.js";import{f as De}from"./format-error-C0Ke3VXF.js";import{d as Os}from"./Launch-mtPFLcSN.js";import{M as zs}from"./index-DdqHlWJ9.js";import{r as Bs}from"./index-B33NNRC0.js";import{d as Vs}from"./Done-BmN-n4Md.js";import"./raf-schd.esm-Cxhj8umC.js";import"./delete-confirm-C4GbidLm.js";import"./get-safe-url-B9KuIPHY.js";var At={},Ws=he;Object.defineProperty(At,"__esModule",{value:!0});var an=At.default=void 0,Us=Ws(be()),Fs=t;an=At.default=(0,Us.default)((0,Fs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var Et={},Hs=he;Object.defineProperty(Et,"__esModule",{value:!0});var dn=Et.default=void 0,Gs=Hs(be()),Xs=t;dn=Et.default=(0,Gs.default)((0,Xs.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Mt={},Js=he;Object.defineProperty(Mt,"__esModule",{value:!0});var un=Mt.default=void 0,Qs=Js(be()),Ys=t;un=Mt.default=(0,Qs.default)((0,Ys.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ot({did:e,projectId:o,title:n,logo:r,describe:s}){const l=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=w.useState(!1),f=Be(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Vo,{sx:{borderRadius:1},src:l}),t.jsxs(u,{children:[t.jsx(pe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(pe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Ot.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function zt({initUrl:e}){const o=St(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:i}=me(),{api:l}=lt(),[a,c]=w.useState(!0),{blocklet:f}=_e(),[h,k]=w.useState(null),[x,p]=w.useState(!1),j=Be(m=>m.breakpoints.down("xl")),{componentDid:v=""}=st(),[I,g]=w.useState(null),b=()=>{i.getProjects({input:{did:f.meta.did,componentDid:v,tenantScope:n}}).then(m=>{const y=(m==null?void 0:m.projects)||[];c(!1),g(y)}).catch(m=>{c(!1),U.error(m.message)})},C=()=>{o(`${X.UNOWNED_DID}/create/none`,{replace:!0})},_=m=>{k(m)},T=()=>{c(!1),p(!0)},D=()=>{p(!1),k(null)},$=m=>{U.error(m.message),p(!1),k(null)},R=m=>{if(!(m!=null&&m.deleted)){U.error("Delete project failed");return}b(),p(!1),k(null)},A=(m,y,L)=>{let z=m==null?void 0:m.trim();return z?(z=hs.toAddress(z).toLocaleLowerCase(),L.some((B,S)=>{const P=y[S];return P&&B.searchable&&B.display!=="excluded"&&B.display!=="false"&&P.toLocaleLowerCase().includes(z)})):!0};if(w.useEffect(()=>{b()},[]),!I&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(We,{})});if(!I)return null;if(!I.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(Ae,{onClick:C,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const q=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:m=>{const y=I[m];return t.jsx(ce,{to:`${y.id}`,children:t.jsx(Ot,{did:f.meta.did,projectId:y.id,logo:y.blockletLogo,title:y.blockletTitle,describe:y.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:m=>m?t.jsx(tn,{type:"success",children:m}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:m=>m?t.jsx(mo,{size:14,compact:!0,responsive:!1,did:m}):null}},j||v?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:m=>m?t.jsx(mo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${m}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:m}):null}},j||v?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:m=>{const y=(f.children||[]).find(L=>L.meta.did===m);return y?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Lt,{size:14,blocklet:y,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:y.meta.title})]},m):""}}},j||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:m=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(pe,{children:m})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:m=>t.jsx(on,{value:Number(m),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:m=>{const y=I[m];return t.jsxs(u,{display:"flex",children:[t.jsx(ce,{to:`${y.id}/new-release/${y.lastReleaseId}`,children:t.jsx(de,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(an,{style:{fontSize:18}})})})}),!!y.lastReleaseId&&t.jsx(de,{title:r("blocklet.publish.viewLastRelease",{name:y.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(ce,{style:{display:"flex"},to:`${y.id}/view/${y.lastReleaseId}`,children:t.jsx(dn,{sx:{fontSize:18}})})})}),t.jsx(de,{title:r("blocklet.publish.delete",{name:y.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>_(y),children:t.jsx(nn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),E=x?t.jsx(fs,{open:!0,popup:!0,onClose:D,action:"check-has-project-id",locale:s,checkFn:l.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:R,onError:$,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(de,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(un,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(Ae,{onClick:C,variant:"contained",children:[t.jsx(_t,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Dt,{className:"main-table",locale:s,data:I,columns:q,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:A}}),h&&t.jsx(Pt,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:T,onCancel:()=>k(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(m=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(vs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(O,{component:"span",variant:"inherit",color:"text.secondary",children:m})]}))})}),E]})}zt.propTypes={initUrl:d.object};zt.defaultProps={initUrl:null};var Bt={},Zs=he;Object.defineProperty(Bt,"__esModule",{value:!0});var pn=Bt.default=void 0,Ks=Zs(be()),yo=t;pn=Bt.default=(0,Ks.default)([(0,yo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,yo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function er(){var $;const{t:e,locale:o}=Q(),{projectId:n}=st(),{api:r}=me(),[s,i]=w.useState(!0),{blocklet:l}=_e(),a=Be(R=>R.breakpoints.down("md")),[c,f]=w.useState(null),[h,k]=w.useState(null),[x,p]=w.useState(null),j=($=window.env)==null?void 0:$.serverEndpoint,v=()=>{r.getReleases({input:{did:l.meta.did,projectId:n}}).then(R=>{const A=(R==null?void 0:R.releases)||[];i(!1),f(A)}).catch(R=>{i(!1),U.error(R.message)})},I=()=>{r.doBatchQuery({getProject:{input:{did:l.meta.did,projectId:n}},getReleases:{input:{did:l.meta.did,projectId:n}}}).then(R=>{k(R.getProject.project||{}),f(R.getReleases.releases||[]),i(!1)}).catch(R=>{i(!1),U.error(R.message)})};w.useEffect(()=>{I()},[]);const[g,b]=w.useState(""),C=()=>{i(!1);const R=x.id;r.deleteRelease({input:{did:l.meta.did,projectId:n,releaseId:R}}).then(()=>{i(!1),v(),U.success(e("common.removeSuccess")),p(null)}).catch(A=>{i(!1),U.error(A.message)})},_=R=>{p(R)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(We,{})});if(!c)return null;const T=t.jsxs(Wo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(ce,{to:"..",children:e("common.blockletStudio")}),t.jsx(O,{color:"text.primary",children:t.jsx(pe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(ce,{to:"create/none",children:t.jsx(Ae,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const D=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:R=>{const A=c[R];return t.jsx(ce,{to:`view/${A.id}`,children:t.jsx(Ot,{did:l.meta.did,projectId:h.id,logo:A.blockletLogo,title:A.blockletVersion,describe:A.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:R=>{const A=c[R];return t.jsx(O,{className:"note",children:A.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:R=>t.jsx(tn,{type:R==="published"?"success":"warning",children:R==="published"?"Released":ws(R)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:R=>{const A=c[R];return A.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(on,{value:Number(A.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:R=>{var L;const A=c[R];let q="",E="";const m=A.status==="published";if(m){const z=ie(j,`/api/project/${l.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),B=new URL(j);B.pathname=ie(B.pathname,"/launch-blocklet/agreement"),B.searchParams.set("blocklet_meta_url",z),q=B.href,E=ie(`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${l.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const y=(L=h.blockletComponents)!=null&&L.some(z=>z.included)||A.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[m&&y==="pack"&&t.jsx(de,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:q,target:"_blank",rel:"noreferrer",children:t.jsx(pn,{sx:{fontSize:18}})})})}),m&&t.jsx(de,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:E,children:t.jsx(Cs,{sx:{fontSize:18}})})})}),t.jsx(de,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>_(A),children:t.jsx(nn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(tr,{children:[t.jsxs(u,{className:"header",children:[T,t.jsxs(u,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(Ae,{variant:"outlined",onClick:()=>{const R=ie(j,`/api/project/${l.meta.did}/${n}/blocklet.json`);b(R)},children:e("blocklet.publish.copyInstallUrl")}),t.jsx(ce,{to:"new-release/none",children:t.jsxs(Ae,{variant:"contained",children:[t.jsx(_t,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]})]}),t.jsx(rt,{fullWidth:!0,maxWidth:"sm",open:g,onClose:()=>b(""),children:t.jsxs(u,{sx:{py:5,px:4,wordBreak:"break-all"},children:[t.jsx(O,{variant:"h6",sx:{mb:2},children:e("blocklet.publish.installResourceTip")}),t.jsx(rn,{children:g}),t.jsxs(O,{sx:{mt:2},children:[e("blocklet.publish.installResourceTip2"),t.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/how-to-use-install-url",target:"_blank",rel:"noreferrer",children:e("blocklet.publish.installResourceHelp")})]})]})}),t.jsx(Dt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&t.jsx(Pt,{title:e(`${e("common.delete")} ${x.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:C,onCancel:()=>p(null)})]})}const tr=ae(u)`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DwTE_KjA.js","assets/vendor-arcblock-MU05F41R.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-BWT1QT-d.js","assets/vendor-hooks-ZnvK17j8.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-b2WEDrup.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
+ import{r as w,k as St,l as st,L as ce,f as Qn,h as Yn,i as dt}from"./vendor-react-D-afvo_7.js";import{a1 as he,j as t,t as Be,a3 as u,aM as Vo,E as d,a4 as de,I as oe,T as O,bU as Wo,D as rt,aa as ae,ax as Zn,bL as Xe,ad as Uo,aN as Je,bq as xt,x as Z,a2 as Ze,P as Fo,G as Ho,v as It,$ as Go,ar as Xo,al as ue,ah as Kn,ab as Jo,r as Qo,bK as es,K as Ve,y as Yo,M as Y,ac as je,aL as ts,L as os,z as ns,bn as ss,aC as Zo,aB as Ke,bt as rs,bu as ls,bV as is,bW as cs,aP as Ko,bH as as,bN as ds,bx as us,by as ut}from"./vendor-mui-core-BWT1QT-d.js";import{z as me,C as _e,h as re,a6 as ps,f as fo,_ as en,ae as ho}from"./index-b2WEDrup.js";import{a0 as be,b as X,e as Q,a3 as Ae,ad as tn,aW as on,ab as nn,_ as fs,aX as Dt,j as U,n as hs,aY as ms,aZ as bs,z as xs,aE as ne,a_ as gs,aq as ks,aO as Ie,a8 as Tt,a$ as ye,aj as js,ao as ys}from"./vendor-arcblock-MU05F41R.js";import{d as _t}from"./Add-D5aJYF-w.js";import{d as vs}from"./Error-CBK0TIhk.js";import{C as Pt}from"./confirm-B3CehVfh.js";import{u as lt}from"./session-Cbe0QivC.js";import{W as mo}from"./did-address-C1Gnyot5.js";import{E as We,D as bo,C as xo,P as go}from"./react-beautiful-dnd.esm-B29sb4Ur.js";import{B as Lt}from"./bundle-avatar-DZAhgQge.js";import{S as pe}from"./shorten-label-CRTt8ftG.js";import{T as ws,x as ie,G as qt,C as sn}from"./vendor-utils-5TjOM6td.js";import{d as Cs}from"./Download-D8FYfZjb.js";import{C as rn}from"./click-to-copy-D4eMUY2Y.js";import{d as Rs}from"./QuestionMarkCircle-CVX4b3Jp.js";import{u as Ss}from"./vendor-hooks-ZnvK17j8.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as $t}from"./index-DoZ2YM4T.js";import{E as Nt}from"./index-CV3ZYUK0.js";import{p as et}from"./index-DA8zLg5u.js";import"./api-K65cLqol.js";import{d as Is}from"./ChevronRight-B-QUfWQJ.js";import{T as Ds,a as Ts}from"./vendor-mui-x-VJmvJUkN.js";import{d as ko}from"./DeleteOutline-CRGsqlBB.js";import{c as _s,A as ln,u as Ps,S as Ls,U as qs,a as pt,b as cn,n as $s,e as Ns,f as jo,g as As,h as Es}from"./item-B3EOOrSZ.js";import{d as Ms}from"./ArrowDropDown-Cl8c24xY.js";import{f as De}from"./format-error-C0Ke3VXF.js";import{d as Os}from"./Launch-C0WU9j27.js";import{M as zs}from"./index-DdqHlWJ9.js";import{r as Bs}from"./index-B33NNRC0.js";import{d as Vs}from"./Done-JsgXq87T.js";import"./raf-schd.esm-Cxhj8umC.js";import"./delete-confirm-d-OlwIQw.js";import"./get-safe-url-uAWmJaE7.js";var At={},Ws=he;Object.defineProperty(At,"__esModule",{value:!0});var an=At.default=void 0,Us=Ws(be()),Fs=t;an=At.default=(0,Us.default)((0,Fs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var Et={},Hs=he;Object.defineProperty(Et,"__esModule",{value:!0});var dn=Et.default=void 0,Gs=Hs(be()),Xs=t;dn=Et.default=(0,Gs.default)((0,Xs.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Mt={},Js=he;Object.defineProperty(Mt,"__esModule",{value:!0});var un=Mt.default=void 0,Qs=Js(be()),Ys=t;un=Mt.default=(0,Qs.default)((0,Ys.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ot({did:e,projectId:o,title:n,logo:r,describe:s}){const l=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=w.useState(!1),f=Be(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Vo,{sx:{borderRadius:1},src:l}),t.jsxs(u,{children:[t.jsx(pe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(pe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Ot.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function zt({initUrl:e}){const o=St(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:i}=me(),{api:l}=lt(),[a,c]=w.useState(!0),{blocklet:f}=_e(),[h,k]=w.useState(null),[x,p]=w.useState(!1),j=Be(m=>m.breakpoints.down("xl")),{componentDid:v=""}=st(),[I,g]=w.useState(null),b=()=>{i.getProjects({input:{did:f.meta.did,componentDid:v,tenantScope:n}}).then(m=>{const y=(m==null?void 0:m.projects)||[];c(!1),g(y)}).catch(m=>{c(!1),U.error(m.message)})},C=()=>{o(`${X.UNOWNED_DID}/create/none`,{replace:!0})},_=m=>{k(m)},T=()=>{c(!1),p(!0)},D=()=>{p(!1),k(null)},$=m=>{U.error(m.message),p(!1),k(null)},R=m=>{if(!(m!=null&&m.deleted)){U.error("Delete project failed");return}b(),p(!1),k(null)},A=(m,y,L)=>{let z=m==null?void 0:m.trim();return z?(z=hs.toAddress(z).toLocaleLowerCase(),L.some((B,S)=>{const P=y[S];return P&&B.searchable&&B.display!=="excluded"&&B.display!=="false"&&P.toLocaleLowerCase().includes(z)})):!0};if(w.useEffect(()=>{b()},[]),!I&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(We,{})});if(!I)return null;if(!I.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(Ae,{onClick:C,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const q=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:m=>{const y=I[m];return t.jsx(ce,{to:`${y.id}`,children:t.jsx(Ot,{did:f.meta.did,projectId:y.id,logo:y.blockletLogo,title:y.blockletTitle,describe:y.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:m=>m?t.jsx(tn,{type:"success",children:m}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:m=>m?t.jsx(mo,{size:14,compact:!0,responsive:!1,did:m}):null}},j||v?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:m=>m?t.jsx(mo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${m}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:m}):null}},j||v?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:m=>{const y=(f.children||[]).find(L=>L.meta.did===m);return y?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Lt,{size:14,blocklet:y,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:y.meta.title})]},m):""}}},j||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:m=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(pe,{children:m})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:m=>t.jsx(on,{value:Number(m),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:m=>{const y=I[m];return t.jsxs(u,{display:"flex",children:[t.jsx(ce,{to:`${y.id}/new-release/${y.lastReleaseId}`,children:t.jsx(de,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(an,{style:{fontSize:18}})})})}),!!y.lastReleaseId&&t.jsx(de,{title:r("blocklet.publish.viewLastRelease",{name:y.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(ce,{style:{display:"flex"},to:`${y.id}/view/${y.lastReleaseId}`,children:t.jsx(dn,{sx:{fontSize:18}})})})}),t.jsx(de,{title:r("blocklet.publish.delete",{name:y.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>_(y),children:t.jsx(nn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),E=x?t.jsx(fs,{open:!0,popup:!0,onClose:D,action:"check-has-project-id",locale:s,checkFn:l.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:R,onError:$,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(de,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(un,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(Ae,{onClick:C,variant:"contained",children:[t.jsx(_t,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Dt,{className:"main-table",locale:s,data:I,columns:q,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:A}}),h&&t.jsx(Pt,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:T,onCancel:()=>k(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(m=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(vs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(O,{component:"span",variant:"inherit",color:"text.secondary",children:m})]}))})}),E]})}zt.propTypes={initUrl:d.object};zt.defaultProps={initUrl:null};var Bt={},Zs=he;Object.defineProperty(Bt,"__esModule",{value:!0});var pn=Bt.default=void 0,Ks=Zs(be()),yo=t;pn=Bt.default=(0,Ks.default)([(0,yo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,yo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function er(){var $;const{t:e,locale:o}=Q(),{projectId:n}=st(),{api:r}=me(),[s,i]=w.useState(!0),{blocklet:l}=_e(),a=Be(R=>R.breakpoints.down("md")),[c,f]=w.useState(null),[h,k]=w.useState(null),[x,p]=w.useState(null),j=($=window.env)==null?void 0:$.serverEndpoint,v=()=>{r.getReleases({input:{did:l.meta.did,projectId:n}}).then(R=>{const A=(R==null?void 0:R.releases)||[];i(!1),f(A)}).catch(R=>{i(!1),U.error(R.message)})},I=()=>{r.doBatchQuery({getProject:{input:{did:l.meta.did,projectId:n}},getReleases:{input:{did:l.meta.did,projectId:n}}}).then(R=>{k(R.getProject.project||{}),f(R.getReleases.releases||[]),i(!1)}).catch(R=>{i(!1),U.error(R.message)})};w.useEffect(()=>{I()},[]);const[g,b]=w.useState(""),C=()=>{i(!1);const R=x.id;r.deleteRelease({input:{did:l.meta.did,projectId:n,releaseId:R}}).then(()=>{i(!1),v(),U.success(e("common.removeSuccess")),p(null)}).catch(A=>{i(!1),U.error(A.message)})},_=R=>{p(R)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(We,{})});if(!c)return null;const T=t.jsxs(Wo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(ce,{to:"..",children:e("common.blockletStudio")}),t.jsx(O,{color:"text.primary",children:t.jsx(pe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(ce,{to:"create/none",children:t.jsx(Ae,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const D=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:R=>{const A=c[R];return t.jsx(ce,{to:`view/${A.id}`,children:t.jsx(Ot,{did:l.meta.did,projectId:h.id,logo:A.blockletLogo,title:A.blockletVersion,describe:A.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:R=>{const A=c[R];return t.jsx(O,{className:"note",children:A.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:R=>t.jsx(tn,{type:R==="published"?"success":"warning",children:R==="published"?"Released":ws(R)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:R=>{const A=c[R];return A.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(on,{value:Number(A.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:R=>{var L;const A=c[R];let q="",E="";const m=A.status==="published";if(m){const z=ie(j,`/api/project/${l.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),B=new URL(j);B.pathname=ie(B.pathname,"/launch-blocklet/agreement"),B.searchParams.set("blocklet_meta_url",z),q=B.href,E=ie(`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${l.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const y=(L=h.blockletComponents)!=null&&L.some(z=>z.included)||A.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[m&&y==="pack"&&t.jsx(de,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:q,target:"_blank",rel:"noreferrer",children:t.jsx(pn,{sx:{fontSize:18}})})})}),m&&t.jsx(de,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:E,children:t.jsx(Cs,{sx:{fontSize:18}})})})}),t.jsx(de,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>_(A),children:t.jsx(nn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(tr,{children:[t.jsxs(u,{className:"header",children:[T,t.jsxs(u,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(Ae,{variant:"outlined",onClick:()=>{const R=ie(j,`/api/project/${l.meta.did}/${n}/blocklet.json`);b(R)},children:e("blocklet.publish.copyInstallUrl")}),t.jsx(ce,{to:"new-release/none",children:t.jsxs(Ae,{variant:"contained",children:[t.jsx(_t,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]})]}),t.jsx(rt,{fullWidth:!0,maxWidth:"sm",open:g,onClose:()=>b(""),children:t.jsxs(u,{sx:{py:5,px:4,wordBreak:"break-all"},children:[t.jsx(O,{variant:"h6",sx:{mb:2},children:e("blocklet.publish.installResourceTip")}),t.jsx(rn,{children:g}),t.jsxs(O,{sx:{mt:2},children:[e("blocklet.publish.installResourceTip2"),t.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/how-to-use-install-url",target:"_blank",rel:"noreferrer",children:e("blocklet.publish.installResourceHelp")})]})]})}),t.jsx(Dt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&t.jsx(Pt,{title:e(`${e("common.delete")} ${x.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:C,onCancel:()=>p(null)})]})}const tr=ae(u)`
3
3
  .header {
4
4
  display: flex;
5
5
  align-items: center;
@@ -129,7 +129,7 @@ import{r as w,k as St,l as st,L as ce,f as Qn,h as Yn,i as dt}from"./vendor-reac
129
129
  background: #fff;
130
130
  z-index: 10;
131
131
  }
132
- `;var Jt={},fr=he;Object.defineProperty(Jt,"__esModule",{value:!0});var gt=Jt.default=void 0,hr=fr(be()),mr=t;gt=Jt.default=(0,hr.default)((0,mr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");const wo="lastWantToConnectStoreId";function br(e){var a,c;const[o,n]=w.useState(null),{session:r}=lt(),s=w.useCallback(f=>{n(f),localStorage.setItem(wo,f==null?void 0:f.id)},[n]),i=w.useMemo(()=>{var x,p,j,v;const f=localStorage.getItem(wo),h=f?(((x=e==null?void 0:e.settings)==null?void 0:x.storeList)||[]).find(I=>I.id===f):null;if(h)return h;let k=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(I=>{var g;return!(I.id!==X.BLOCKLET_STORE.id||I.scope&&I.scope!=="studio"&&I.scope!==((g=r==null?void 0:r.user)==null?void 0:g.did))});return k||(k=(v=(j=e==null?void 0:e.settings)==null?void 0:j.storeList)==null?void 0:v[0]),k},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(c=r==null?void 0:r.user)==null?void 0:c.did]);return[o||i||{},s]}const ht={};async function xn(e,{interval:o=1e3,maxDuration:n=120*1e3,intervalFirst:r=4e3,timerKey:s=""}){ht[s]&&clearTimeout(ht[s]),await new Promise(a=>setTimeout(a,r));const i=Date.now(),l=async(a,c)=>{try{const f=await e();a(f)}catch(f){Date.now()-i>n?c(f):s?ht[s]=setTimeout(()=>l(a,c),o):setTimeout(()=>l(a,c),o)}};return new Promise(l)}function xr(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function gr(e,{did:o,projectId:n,messageId:r}){return xn(async()=>{var i;const s=await e.getProject({input:{did:o,projectId:n,messageId:r}});if(!((i=s==null?void 0:s.project)!=null&&i.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid},{timerKey:"connect-studio"})}function kr(e,{did:o,projectId:n,storeId:r}){return xn(async()=>{var l,a;const s=await e.getProject({input:{did:o,projectId:n,messageId:""}});if(!((a=(l=s==null?void 0:s.project)==null?void 0:l.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(c=>c.storeId===r))throw new Error("Connected store not found")},{timerKey:`connect-store-${r}`})}const gn=({fromBlocklet:e,nodeInfo:o,blocklet:n,userDid:r})=>{var l,a;const s=e?(l=n==null?void 0:n.meta)==null?void 0:l.did:o==null?void 0:o.did;let i=e?((a=n==null?void 0:n.settings)==null?void 0:a.storeList)||[]:(o==null?void 0:o.blockletRegistryList)||[];return Array.isArray(i)||(i=[]),i=i.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===r),{teamDid:s,storeList:i}};function Qt({blocklet:e,store:o={},onChangeStore:n,onClick:r,disabled:s,loading:i,componentDid:l}){var m,y,L;const{t:a}=Q(),{session:c}=lt(),{api:f,info:h,inService:k}=me(),x=_e(),[p,j]=w.useState(!1),v=w.useRef(null),[I,g]=w.useState(!1),[b,C]=w.useState(null),_=z=>{n(z),j(!1)},T=()=>{j(!p)},D=z=>{v.current&&v.current.contains(z.target)||j(!1)},$=()=>{g(!0)},R=()=>{g(!1)},A=async()=>{var z;if(b)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:b.url,projectId:"",scope:b.scope||"studio"}}),await((z=x==null?void 0:x.actions)==null?void 0:z.refreshBlocklet())}catch(B){U.error(`Remove Blocklet Store Error: ${De(B)}`)}finally{C(null)}},{storeList:q}=gn({fromBlocklet:k,blocklet:e,nodeInfo:h,componentDid:l,userDid:(m=c==null?void 0:c.user)==null?void 0:m.did}),E=(y=e==null?void 0:e.meta)==null?void 0:y.did;return t.jsxs(t.Fragment,{children:[t.jsxs(xt,{disabled:s,ref:v,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[t.jsxs(Z,{onClick:r,children:[i&&t.jsx(Ze,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${o.name||""}`]}),t.jsx(Z,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:t.jsx(Ms,{})})]}),t.jsx(Fo,{sx:{zIndex:10},open:p,anchorEl:v.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:z})=>t.jsx(Ho,{...z,style:{transformOrigin:"center top"},children:t.jsx(It,{children:t.jsx(Go,{onClickAway:D,children:t.jsxs(Xo,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[q==null?void 0:q.map(B=>{var S;return t.jsxs(ue,{selected:B.id===(o==null?void 0:o.id),sx:{height:56},onClick:()=>_(B),children:[t.jsxs(u,{children:[t.jsx(pe,{sx:{fontSize:"16px"},maxLength:24,children:B.name}),t.jsx(pe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:B.url})]}),_s({store:B,userDid:(S=c==null?void 0:c.user)==null?void 0:S.did})&&t.jsx(oe,{sx:{ml:1},onClick:P=>{P.preventDefault(),P.stopPropagation(),C(B)},children:t.jsx(ne,{icon:"ic:outline-delete"})})]},B.url)}),t.jsx(Kn,{}),t.jsxs(ue,{onClick:$,children:[t.jsx(_t,{font:!0}),t.jsx(O,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),I&&t.jsx(ln,{hiddenChildren:!0,open:!0,onClose:R,teamDid:E,storeList:q,scope:"studio",onAdd:(L=x==null?void 0:x.actions)==null?void 0:L.refreshBlocklet}),b&&t.jsx(Pt,{displayError:!0,title:`${a("common.delete")} ${b.name}`,description:a("blocklet.publish.deleteStoreTip",{name:b.name}),confirm:a("common.confirm"),onConfirm:A,onCancel:()=>C(null)})]})}Qt.propTypes={store:d.object,blocklet:d.object,onChangeStore:d.func.isRequired,onClick:d.func.isRequired,loading:d.bool.isRequired,disabled:d.bool.isRequired,componentDid:d.string.isRequired,projectType:d.string.isRequired,getData:d.func.isRequired};Qt.defaultProps={store:null,blocklet:null};var fe=w;const Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,it=(e,o,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),c=s.pop(),f={provider:s.length>0?s[0]:r,prefix:c,name:a};return o&&!Qe(f)?null:f}const i=s[0],l=i.split("-");if(l.length>1){const a={provider:r,prefix:l.shift(),name:l.join("-")};return o&&!Qe(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return o&&!Qe(a,n)?null:a}return null},Qe=(e,o)=>e?!!((e.provider===""||e.provider.match(Ee))&&(o&&e.prefix===""||e.prefix.match(Ee))&&e.name.match(Ee)):!1,kn=Object.freeze({left:0,top:0,width:16,height:16}),tt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yt=Object.freeze({...kn,...tt}),kt=Object.freeze({...Yt,body:"",hidden:!1});function jr(e,o){const n={};!e.hFlip!=!o.hFlip&&(n.hFlip=!0),!e.vFlip!=!o.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(o.rotate||0))%4;return r&&(n.rotate=r),n}function Co(e,o){const n=jr(e,o);for(const r in kt)r in tt?r in e&&!(r in n)&&(n[r]=tt[r]):r in o?n[r]=o[r]:r in e&&(n[r]=e[r]);return n}function yr(e,o){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function i(l){if(n[l])return s[l]=[];if(!(l in s)){s[l]=null;const a=r[l]&&r[l].parent,c=a&&i(a);c&&(s[l]=[a].concat(c))}return s[l]}return Object.keys(n).concat(Object.keys(r)).forEach(i),s}function vr(e,o,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function l(a){i=Co(r[a]||s[a],i)}return l(o),n.forEach(l),Co(e,i)}function jn(e,o){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{o(s,null),n.push(s)});const r=yr(e);for(const s in r){const i=r[s];i&&(o(s,vr(e,s,i)),n.push(s))}return n}const wr={provider:"",aliases:{},not_found:{},...kn};function mt(e,o){for(const n in o)if(n in e&&typeof e[n]!=typeof o[n])return!1;return!0}function yn(e){if(typeof e!="object"||e===null)return null;const o=e;if(typeof o.prefix!="string"||!e.icons||typeof e.icons!="object"||!mt(e,wr))return null;const n=o.icons;for(const s in n){const i=n[s];if(!s.match(Ee)||typeof i.body!="string"||!mt(i,kt))return null}const r=o.aliases||Object.create(null);for(const s in r){const i=r[s],l=i.parent;if(!s.match(Ee)||typeof l!="string"||!n[l]&&!r[l]||!mt(i,kt))return null}return o}const Ro=Object.create(null);function Cr(e,o){return{provider:e,prefix:o,icons:Object.create(null),missing:new Set}}function ve(e,o){const n=Ro[e]||(Ro[e]=Object.create(null));return n[o]||(n[o]=Cr(e,o))}function Zt(e,o){return yn(o)?jn(o,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Rr(e,o,n){try{if(typeof n.body=="string")return e.icons[o]={...n},!0}catch{}return!1}let Oe=!1;function vn(e){return typeof e=="boolean"&&(Oe=e),Oe}function Sr(e){const o=typeof e=="string"?it(e,!0,Oe):e;if(o){const n=ve(o.provider,o.prefix),r=o.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Ir(e,o){const n=it(e,!0,Oe);if(!n)return!1;const r=ve(n.provider,n.prefix);return Rr(r,n.name,o)}function Dr(e,o){if(typeof e!="object")return!1;if(typeof o!="string"&&(o=e.provider||""),Oe&&!o&&!e.prefix){let s=!1;return yn(e)&&(e.prefix="",jn(e,(i,l)=>{l&&Ir(i,l)&&(s=!0)})),s}const n=e.prefix;if(!Qe({provider:o,prefix:n,name:"a"}))return!1;const r=ve(o,n);return!!Zt(r,e)}const wn=Object.freeze({width:null,height:null}),Cn=Object.freeze({...wn,...tt}),Tr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function So(e,o,n){if(o===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*o*n)/n;if(typeof e!="string")return e;const r=e.split(Tr);if(r===null||!r.length)return e;const s=[];let i=r.shift(),l=_r.test(i);for(;;){if(l){const a=parseFloat(i);isNaN(a)?s.push(i):s.push(Math.ceil(a*o*n)/n)}else s.push(i);if(i=r.shift(),i===void 0)return s.join("");l=!l}}const Pr=e=>e==="unset"||e==="undefined"||e==="none";function Lr(e,o){const n={...Yt,...e},r={...Cn,...o},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(j=>{const v=[],I=j.hFlip,g=j.vFlip;let b=j.rotate;I?g?b+=2:(v.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),v.push("scale(-1 1)"),s.top=s.left=0):g&&(v.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),v.push("scale(1 -1)"),s.top=s.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=s.height/2+s.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:C=s.width/2+s.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(s.left!==s.top&&(C=s.left,s.left=s.top,s.top=C),s.width!==s.height&&(C=s.width,s.width=s.height,s.height=C)),v.length&&(i='<g transform="'+v.join(" ")+'">'+i+"</g>")});const l=r.width,a=r.height,c=s.width,f=s.height;let h,k;l===null?(k=a===null?"1em":a==="auto"?f:a,h=So(k,c/f)):(h=l==="auto"?c:l,k=a===null?So(h,f/c):a==="auto"?f:a);const x={},p=(j,v)=>{Pr(v)||(x[j]=v.toString())};return p("width",h),p("height",k),x.viewBox=s.left.toString()+" "+s.top.toString()+" "+c.toString()+" "+f.toString(),{attributes:x,body:i}}const qr=/\sid="(\S+)"/g,$r="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Nr=0;function Ar(e,o=$r){const n=[];let r;for(;r=qr.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const l=typeof o=="function"?o(i):o+(Nr++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+l+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const jt=Object.create(null);function Er(e,o){jt[e]=o}function yt(e){return jt[e]||jt[""]}function Kt(e){let o;if(typeof e.resources=="string")o=[e.resources];else if(o=e.resources,!(o instanceof Array)||!o.length)return null;return{resources:o,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const eo=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],Ye=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?Ye.push(Ne.shift()):Ye.push(Ne.pop());eo[""]=Kt({resources:["https://api.iconify.design"].concat(Ye)});function Mr(e,o){const n=Kt(o);return n===null?!1:(eo[e]=n,!0)}function to(e){return eo[e]}const Or=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Io=Or();function zr(e,o){const n=to(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(l=>{s=Math.max(s,l.length)});const i=o+".json?icons=";r=n.maxURL-s-n.path.length-i.length}return r}function Br(e){return e===404}const Vr=(e,o,n)=>{const r=[],s=zr(e,o),i="icons";let l={type:i,provider:e,prefix:o,icons:[]},a=0;return n.forEach((c,f)=>{a+=c.length+1,a>=s&&f>0&&(r.push(l),l={type:i,provider:e,prefix:o,icons:[]},a=c.length),l.icons.push(c)}),r.push(l),r};function Wr(e){if(typeof e=="string"){const o=to(e);if(o)return o.path}return"/"}const Ur=(e,o,n)=>{if(!Io){n("abort",424);return}let r=Wr(o.provider);switch(o.type){case"icons":{const i=o.prefix,a=o.icons.join(","),c=new URLSearchParams({icons:a});r+=i+".json?"+c.toString();break}case"custom":{const i=o.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;Io(e+r).then(i=>{const l=i.status;if(l!==200){setTimeout(()=>{n(Br(l)?"abort":"next",l)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},Fr={prepare:Vr,send:Ur};function Hr(e){const o={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const i=s.provider,l=s.prefix,a=s.name,c=n[i]||(n[i]=Object.create(null)),f=c[l]||(c[l]=ve(i,l));let h;a in f.icons?h=o.loaded:l===""||f.missing.has(a)?h=o.missing:h=o.pending;const k={provider:i,prefix:l,name:a};h.push(k)}),o}function Rn(e,o){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==o))})}function Gr(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const o=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!o.length)return;let n=!1;const r=e.provider,s=e.prefix;o.forEach(i=>{const l=i.icons,a=l.pending.length;l.pending=l.pending.filter(c=>{if(c.prefix!==s)return!0;const f=c.name;if(e.icons[f])l.loaded.push({provider:r,prefix:s,name:f});else if(e.missing.has(f))l.missing.push({provider:r,prefix:s,name:f});else return n=!0,!0;return!1}),l.pending.length!==a&&(n||Rn([e],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}let Xr=0;function Jr(e,o,n){const r=Xr++,s=Rn.bind(null,n,r);if(!o.pending.length)return s;const i={id:r,icons:o,callback:e,abort:s};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),s}function Qr(e,o=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?it(s,o,n):s;i&&r.push(i)}),r}var Yr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Zr(e,o,n,r){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let l;if(e.random){let D=e.resources.slice(0);for(l=[];D.length>1;){const $=Math.floor(Math.random()*D.length);l.push(D[$]),D=D.slice(0,$).concat(D.slice($+1))}l=l.concat(D)}else l=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let c="pending",f=0,h,k=null,x=[],p=[];typeof r=="function"&&p.push(r);function j(){k&&(clearTimeout(k),k=null)}function v(){c==="pending"&&(c="aborted"),j(),x.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),x=[]}function I(D,$){$&&(p=[]),typeof D=="function"&&p.push(D)}function g(){return{startTime:a,payload:o,status:c,queriesSent:f,queriesPending:x.length,subscribe:I,abort:v}}function b(){c="failed",p.forEach(D=>{D(void 0,h)})}function C(){x.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),x=[]}function _(D,$,R){const A=$!=="success";switch(x=x.filter(q=>q!==D),c){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if($==="abort"){h=R,b();return}if(A){h=R,x.length||(l.length?T():b());return}if(j(),C(),!e.random){const q=e.resources.indexOf(D.resource);q!==-1&&q!==e.index&&(e.index=q)}c="completed",p.forEach(q=>{q(R)})}function T(){if(c!=="pending")return;j();const D=l.shift();if(D===void 0){if(x.length){k=setTimeout(()=>{j(),c==="pending"&&(C(),b())},e.timeout);return}b();return}const $={status:"pending",resource:D,callback:(R,A)=>{_($,R,A)}};x.push($),f++,k=setTimeout(T,e.rotate),n(D,o,$.callback)}return setTimeout(T),g}function Sn(e){const o={...Yr,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function s(a,c,f){const h=Zr(o,a,c,(k,x)=>{r(),f&&f(k,x)});return n.push(h),h}function i(a){return n.find(c=>a(c))||null}return{query:s,find:i,setIndex:a=>{o.index=a},getIndex:()=>o.index,cleanup:r}}function Do(){}const bt=Object.create(null);function Kr(e){if(!bt[e]){const o=to(e);if(!o)return;const n=Sn(o),r={config:o,redundancy:n};bt[e]=r}return bt[e]}function el(e,o,n){let r,s;if(typeof e=="string"){const i=yt(e);if(!i)return n(void 0,424),Do;s=i.send;const l=Kr(e);l&&(r=l.redundancy)}else{const i=Kt(e);if(i){r=Sn(i);const l=e.resources?e.resources[0]:"",a=yt(l);a&&(s=a.send)}}return!r||!s?(n(void 0,424),Do):r.query(o,s,n)().abort}const To="iconify2",ze="iconify",In=ze+"-count",_o=ze+"-version",Dn=36e5,tl=168;function vt(e,o){try{return e.getItem(o)}catch{}}function oo(e,o,n){try{return e.setItem(o,n),!0}catch{}}function Po(e,o){try{e.removeItem(o)}catch{}}function wt(e,o){return oo(e,In,o.toString())}function Ct(e){return parseInt(vt(e,In))||0}const ct={local:!0,session:!0},Tn={local:new Set,session:new Set};let no=!1;function ol(e){no=e}let Ge=typeof window>"u"?{}:window;function _n(e){const o=e+"Storage";try{if(Ge&&Ge[o]&&typeof Ge[o].length=="number")return Ge[o]}catch{}ct[e]=!1}function Pn(e,o){const n=_n(e);if(!n)return;const r=vt(n,_o);if(r!==To){if(r){const a=Ct(n);for(let c=0;c<a;c++)Po(n,ze+c.toString())}oo(n,_o,To),wt(n,0);return}const s=Math.floor(Date.now()/Dn)-tl,i=a=>{const c=ze+a.toString(),f=vt(n,c);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&o(h,a))return!0}catch{}Po(n,c)}};let l=Ct(n);for(let a=l-1;a>=0;a--)i(a)||(a===l-1?(l--,wt(n,l)):Tn[e].add(a))}function Ln(){if(!no){ol(!0);for(const e in ct)Pn(e,o=>{const n=o.data,r=o.provider,s=n.prefix,i=ve(r,s);if(!Zt(i,n).length)return!1;const l=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,l):l,!0})}}function nl(e,o){const n=e.lastModifiedCached;if(n&&n>=o)return n===o;if(e.lastModifiedCached=o,n)for(const r in ct)Pn(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===o});return!0}function sl(e,o){no||Ln();function n(r){let s;if(!ct[r]||!(s=_n(r)))return;const i=Tn[r];let l;if(i.size)i.delete(l=Array.from(i).shift());else if(l=Ct(s),!wt(s,l+1))return;const a={cached:Math.floor(Date.now()/Dn),provider:e.provider,data:o};return oo(s,ze+l.toString(),JSON.stringify(a))}o.lastModified&&!nl(e,o.lastModified)||Object.keys(o.icons).length&&(o.not_found&&(o=Object.assign({},o),delete o.not_found),n("local")||n("session"))}function Lo(){}function rl(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Gr(e)}))}function ll(e,o){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(o).sort():e.iconsToLoad=o,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let i;if(!s||!(i=yt(n)))return;i.prepare(n,r,s).forEach(a=>{el(n,a,c=>{if(typeof c!="object")a.icons.forEach(f=>{e.missing.add(f)});else try{const f=Zt(e,c);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(k=>{h.delete(k)}),sl(e,c)}catch(f){console.error(f)}rl(e)})})}))}const il=(e,o)=>{const n=Qr(e,!0,vn()),r=Hr(n);if(!r.pending.length){let c=!0;return o&&setTimeout(()=>{c&&o(r.loaded,r.missing,r.pending,Lo)}),()=>{c=!1}}const s=Object.create(null),i=[];let l,a;return r.pending.forEach(c=>{const{provider:f,prefix:h}=c;if(h===a&&f===l)return;l=f,a=h,i.push(ve(f,h));const k=s[f]||(s[f]=Object.create(null));k[h]||(k[h]=[])}),r.pending.forEach(c=>{const{provider:f,prefix:h,name:k}=c,x=ve(f,h),p=x.pendingIcons||(x.pendingIcons=new Set);p.has(k)||(p.add(k),s[f][h].push(k))}),i.forEach(c=>{const{provider:f,prefix:h}=c;s[f][h].length&&ll(c,s[f][h])}),o?Jr(o,r,i):Lo};function cl(e,o){const n={...e};for(const r in o){const s=o[r],i=typeof s;r in wn?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const al=/[\s,]+/;function dl(e,o){o.split(al).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ul(e,o=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?r(i):0)}}return o}function pl(e,o){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in o)n+=" "+r+'="'+o[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function fl(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function hl(e){return"data:image/svg+xml,"+fl(e)}function ml(e){return'url("'+hl(e)+'")'}let Me;function bl(){try{Me=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Me=null}}function xl(e){return Me===void 0&&bl(),Me?Me.createHTML(e):e}const qn={...Cn,inline:!1},gl={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kl={display:"inline-block"},Rt={backgroundColor:"currentColor"},$n={backgroundColor:"transparent"},qo={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},$o={WebkitMask:Rt,mask:Rt,background:$n};for(const e in $o){const o=$o[e];for(const n in qo)o[e+n]=qo[n]}const jl={...qn,inline:!0};function No(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const yl=(e,o,n,r)=>{const s=n?jl:qn,i=cl(s,o),l=o.mode||"svg",a={},c=o.style||{},f={...l==="svg"?gl:{},ref:r};for(let g in o){const b=o[g];if(b!==void 0)switch(g){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":i[g]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&dl(i,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?i[g]=ul(b):typeof b=="number"&&(i[g]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete f["aria-hidden"];break;default:s[g]===void 0&&(f[g]=b)}}const h=Lr(e,i),k=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),l==="svg"){f.style={...a,...c},Object.assign(f,k);let g=0,b=o.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:xl(Ar(h.body,b?()=>b+"ID"+g++:"iconifyReact"))},fe.createElement("svg",f)}const{body:x,width:p,height:j}=e,v=l==="mask"||(l==="bg"?!1:x.indexOf("currentColor")!==-1),I=pl(x,{...k,width:p+"",height:j+""});return f.style={...a,"--svg":ml(I),width:No(k.width),height:No(k.height),...kl,...v?Rt:$n,...c},fe.createElement("span",f)};vn(!0);Er("",Fr);if(typeof document<"u"&&typeof window<"u"){Ln();const e=window;if(e.IconifyPreload!==void 0){const o=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof o=="object"&&o!==null&&(o instanceof Array?o:[o]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Dr(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const o=e.IconifyProviders;if(typeof o=="object"&&o!==null)for(let n in o){const r="IconifyProviders["+n+"] is invalid.";try{const s=o[n];if(typeof s!="object"||!s||s.resources===void 0)continue;Mr(n,s)||console.error(r)}catch{console.error(r)}}}}class Nn extends fe.Component{constructor(o){super(o),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(o){this.state.icon!==o&&this.setState({icon:o})}_checkIcon(o){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(o||n.icon===null)&&this._setData({data:r});return}let s;if(typeof r!="string"||(s=it(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const i=Sr(s);if(!i){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),i!==null&&(this._loading={name:r,abort:il([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const l=["iconify"];s.prefix!==""&&l.push("iconify--"+s.prefix),s.provider!==""&&l.push("iconify--"+s.provider),this._setData({data:i,classes:l}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(o){o.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const o=this.props,n=this.state.icon;if(n===null)return o.children?o.children:fe.createElement("span",{});let r=o;return n.classes&&(r={...o,className:(typeof o.className=="string"?o.className+" ":"")+n.classes.join(" ")}),yl({...Yt,...n.data},r,o._inline,o._ref)}}const vl=fe.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!1};return fe.createElement(Nn,r)});fe.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!0};return fe.createElement(Nn,r)});var wl=vl;const Cl=e=>{const o=e.includes("youtube.com")||e.includes("youtu.be"),n=e.includes("vimeo.com");return o||n};function at({url:e,style:o,controls:n,modestbranding:r}){var a;const{t:s}=Q(),i=e.includes("youtube.com")||e.includes("youtu.be"),l=e.includes("vimeo.com");if(i){const c=((a=e.split("v=")[1])==null?void 0:a.split("&")[0])||e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:(o==null?void 0:o.pointerEvents)||"auto"},children:t.jsx("iframe",{src:`https://www.youtube.com/embed/${c}?modestbranding=${r}&controls=${n}&rel=0`,title:"YouTube video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}if(l){const c=e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:o.pointerEvents||"auto"},children:t.jsx("iframe",{src:`https://player.vimeo.com/video/${c}`,title:"Vimeo video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0})})}return t.jsx(u,{style:{position:"relative",width:"100%",paddingTop:"56.25%"},children:t.jsxs(u,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",backgroundColor:"rgba(0, 0, 0, 0.04)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,children:[t.jsx(wl,{icon:"carbon:video-off",style:{fontSize:40,marginBottom:"10px",opacity:.5}}),t.jsx(O,{variant:"body1",sx:{opacity:.5},children:s("studio.videoDialogNoSrc")})]})})}at.propTypes={url:d.string.isRequired,style:d.object,controls:d.number,modestbranding:d.number};at.defaultProps={style:{},controls:1,modestbranding:1};function An({setParams:e,onClose:o,params:n}){const{t:r}=Q(),[s,i]=w.useState(""),l=s&&n.blockletVideos.includes(s),a=Cl(s),c=()=>{e(f=>{const h=[...f.blockletVideos];return h.push(s),{...f,blockletVideos:h}}),o()};return t.jsxs(rt,{open:!0,fullWidth:!0,maxWidth:"sm",children:[t.jsx(Jo,{children:r("studio.videoDialogTitle")}),t.jsxs(Qo,{children:[t.jsx(es,{fullWidth:!0,value:s,onChange:f=>i(f.target.value),placeholder:r("studio.videoInputLabel"),endAdornment:s?t.jsx(Ve,{position:"end",children:t.jsx(oe,{onClick:()=>i(""),children:t.jsx(ks,{})})}):null,error:l}),l&&t.jsx(O,{variant:"body2",color:"error",children:r("studio.duplicateVideo")}),t.jsx(at,{url:s,style:{marginTop:"20px",borderRadius:"4px"}})]}),t.jsxs(Yo,{children:[t.jsx(Z,{onClick:()=>o(),children:r("studio.cancel")}),t.jsx(Z,{disabled:!a||l,onClick:c,children:r("studio.confirm")})]})]})}An.propTypes={onClose:d.func.isRequired,params:d.object.isRequired,setParams:d.func.isRequired};const Ao=w.lazy(()=>en(()=>import("./index-CmBEz5CL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function En({projectId:e,readOnly:o,loading:n,blocklet:r,params:s,setParams:i,paramsErrTip:l,setParamsErrTip:a,setLoading:c,initUrl:f,initLogoUrl:h,setInitLogoUrl:k,componentDid:x}){const{t:p,locale:j}=Q(),{api:v}=me(),I=St(),g=w.useRef(null),b=w.useRef(null),[C,_]=br(r),[T,D]=w.useState(!1),$=Ps({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),R=async S=>{const P=setTimeout(()=>{c(!1)},2e4),W=await gr(v,S);c(!1),clearTimeout(P),window.parent.postMessage({event:"studioDialog.connected",componentDid:x},"*"),I(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${W}/create`),{replace:!0})},A=()=>{if(!s.blockletTitle){U.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){U.error(p("blocklet.publish.noStoreSelected"));return}const S=xr();$(async(P,W)=>{var F,G,ee;try{const J=await v.connectByStudio({input:{did:(F=r==null?void 0:r.meta)==null?void 0:F.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((G=s==null?void 0:s.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:x,messageId:S,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(J!=null&&J.url)){U.error("failed to connect to store");return}W(J.url),R({did:(ee=r==null?void 0:r.meta)==null?void 0:ee.did,projectId:"",messageId:S})}catch(J){const se=De(J);U.error(se),c(!1)}})},q=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/logo/upload`,E=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/screenshot/upload`,m=s!=null&&s.blockletLogo?`${q}/${s.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,y=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(S=>`${E}/${S}`),L=()=>o?!1:!e||e===X.UNOWNED_DID?(U.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,z=S=>{if(!S.destination)return;const P=Array.from(s.blockletScreenshots),[W]=P.splice(S.source.index,1);P.splice(S.destination.index,0,W),i(F=>({...F,blockletScreenshots:P}))},B=S=>{if(!S.destination)return;const P=Array.from(s.blockletVideos),[W]=P.splice(S.source.index,1);P.splice(S.destination.index,0,W),i(F=>({...F,blockletVideos:P}))};return t.jsxs(Rl,{children:[t.jsx(u,{display:"flex",className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:S=>{a({blockletTitle:""}),i({blockletTitle:S.target.value})},error:!!l.blockletTitle,helperText:l.blockletTitle||""}),t.jsx(Y,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&t.jsx(Ve,{position:"end",children:t.jsx(Qt,{blocklet:r,store:C,componentDid:x,onChangeStore:_,disabled:!s.blockletTitle||o||n,loading:n,onClick:A})})},error:!!l.projectId,helperText:l.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:o},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:S=>{a({blockletDescription:""}),i({blockletDescription:S.target.value})},error:!!l.blockletDescription,helperText:l.blockletDescription||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.homepageTip")}`,placeholder:`Blocklet ${p("common.homepageTip")}`,InputProps:{"data-cy":"blocklet-homepage",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletHomepage||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)?a({blockletHomepage:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletHomepage:""}),i({blockletHomepage:S.target.value})},error:!!l.blockletHomepage,helperText:l.blockletHomepage||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.community")}`,placeholder:`Blocklet ${p("common.community")}`,InputProps:{"data-cy":"blocklet-community",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletCommunity||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)?a({blockletCommunity:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletCommunity:""}),i({blockletCommunity:S.target.value})},error:!!l.blockletCommunity,helperText:l.blockletCommunity||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.support")}`,placeholder:`Blocklet ${p("common.support")}`,InputProps:{"data-cy":"blocklet-support",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletSupport||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)&&!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(S.target.value)?a({blockletSupport:p("blocklet.publish.errorTip.invalidUrlOrEmail")}):a({blockletSupport:""}),i({blockletSupport:S.target.value})},error:!!l.blockletSupport,helperText:l.blockletSupport||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.repository")}`,placeholder:`Blocklet ${p("common.repository")}`,InputProps:{"data-cy":"blocklet-repository",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletRepository||"",onChange:S=>{S.target.value&&!/^(git|https|svn)/.test(S.target.value)?a({blockletRepository:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletRepository:""}),i({blockletRepository:S.target.value})},error:!!l.blockletRepository,helperText:l.blockletRepository||"",sx:{mt:3}})]})}),t.jsx(u,{display:"flex",mt:3,className:"section full-width",children:t.jsxs(u,{sx:{flex:1},children:[t.jsxs(u,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.type"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"png, jpg, webp, svg"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),t.jsx(u,{sx:{flex:1,cursor:o?"default":"pointer",display:"flex",alignItems:"flex-end"},children:t.jsx(Vo,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:h||m,onClick:()=>{var S;L()&&((S=g.current)==null||S.open())}})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{sx:{border:"none"},variant:"outlined",size:"small",children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(bo,{onDragEnd:o?void 0:z,children:t.jsx(xo,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:o,children:(S,P)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:P.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:P.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:S.innerRef,...S.droppableProps,children:[y.map((W,F)=>t.jsx(go,{draggableId:W,index:F,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx("img",{alt:"screenshot",src:W}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(gt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{i(J=>{const se=[...J.blockletScreenshots];return se.splice(F,1),{...J,blockletScreenshots:se}})},children:t.jsx(ko,{})})]})},W)),S.placeholder,y.length<5&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var W;L()&&((W=b.current)==null||W.open())},children:"+"})]})})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("studio.video")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.videoType"),":"," "]}),t.jsxs(u,{component:"span",sx:{color:"#007ec6"},children:[t.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",t.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~3"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(bo,{onDragEnd:o?void 0:B,children:t.jsx(xo,{droppableId:"videos",direction:"horizontal",isDropDisabled:o,children:(S,P)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:P.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:P.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:S.innerRef,...S.droppableProps,children:[s.blockletVideos.map((W,F)=>t.jsx(go,{draggableId:W,index:F,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx(at,{url:W,style:{pointerEvents:ee.isDragging?"none":"auto"}}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(gt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{i(J=>{const se=[...J.blockletVideos];return se.splice(F,1),{...J,blockletVideos:se}})},children:t.jsx(ko,{})})]})},W)),S.placeholder,s.blockletVideos.length<3&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{L()&&D(!0)},children:"+"})]})})})]})]})}),t.jsxs(w.Suspense,{fallback:t.jsx(We,{}),children:[t.jsx(Ao,{ref:g,locale:j,popup:!0,onUploadFinish:S=>{var P;i({blockletLogo:S.data.filename}),k(""),(P=g.current)==null||P.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:q,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),T&&t.jsx(An,{onClose:()=>D(!1),params:s,setParams:i}),t.jsx(Ao,{ref:b,popup:!0,onUploadFinish:S=>{var P;i(W=>{var G;const F=W.blockletScreenshots||[];return F.push((G=S.data)==null?void 0:G.filename),{...W,blockletScreenshots:F}}),(P=b.current)==null||P.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:E,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-y.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}En.propTypes={projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired,blocklet:d.object.isRequired,setLoading:d.func.isRequired,initUrl:d.object.isRequired,componentDid:d.isRequired,initLogoUrl:d.string.isRequired,setInitLogoUrl:d.func.isRequired};const Rl=ae.div`
132
+ `;var Jt={},fr=he;Object.defineProperty(Jt,"__esModule",{value:!0});var gt=Jt.default=void 0,hr=fr(be()),mr=t;gt=Jt.default=(0,hr.default)((0,mr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");const wo="lastWantToConnectStoreId";function br(e){var a,c;const[o,n]=w.useState(null),{session:r}=lt(),s=w.useCallback(f=>{n(f),localStorage.setItem(wo,f==null?void 0:f.id)},[n]),i=w.useMemo(()=>{var x,p,j,v;const f=localStorage.getItem(wo),h=f?(((x=e==null?void 0:e.settings)==null?void 0:x.storeList)||[]).find(I=>I.id===f):null;if(h)return h;let k=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(I=>{var g;return!(I.id!==X.BLOCKLET_STORE.id||I.scope&&I.scope!=="studio"&&I.scope!==((g=r==null?void 0:r.user)==null?void 0:g.did))});return k||(k=(v=(j=e==null?void 0:e.settings)==null?void 0:j.storeList)==null?void 0:v[0]),k},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(c=r==null?void 0:r.user)==null?void 0:c.did]);return[o||i||{},s]}const ht={};async function xn(e,{interval:o=1e3,maxDuration:n=120*1e3,intervalFirst:r=4e3,timerKey:s=""}){ht[s]&&clearTimeout(ht[s]),await new Promise(a=>setTimeout(a,r));const i=Date.now(),l=async(a,c)=>{try{const f=await e();a(f)}catch(f){Date.now()-i>n?c(f):s?ht[s]=setTimeout(()=>l(a,c),o):setTimeout(()=>l(a,c),o)}};return new Promise(l)}function xr(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function gr(e,{did:o,projectId:n,messageId:r}){return xn(async()=>{var i;const s=await e.getProject({input:{did:o,projectId:n,messageId:r}});if(!((i=s==null?void 0:s.project)!=null&&i.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid},{timerKey:"connect-studio"})}function kr(e,{did:o,projectId:n,storeId:r}){return xn(async()=>{var l,a;const s=await e.getProject({input:{did:o,projectId:n,messageId:""}});if(!((a=(l=s==null?void 0:s.project)==null?void 0:l.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(c=>c.storeId===r))throw new Error("Connected store not found")},{timerKey:`connect-store-${r}`})}const gn=({fromBlocklet:e,nodeInfo:o,blocklet:n,userDid:r})=>{var l,a;const s=e?(l=n==null?void 0:n.meta)==null?void 0:l.did:o==null?void 0:o.did;let i=e?((a=n==null?void 0:n.settings)==null?void 0:a.storeList)||[]:(o==null?void 0:o.blockletRegistryList)||[];return Array.isArray(i)||(i=[]),i=i.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===r),{teamDid:s,storeList:i}};function Qt({blocklet:e,store:o={},onChangeStore:n,onClick:r,disabled:s,loading:i,componentDid:l}){var m,y,L;const{t:a}=Q(),{session:c}=lt(),{api:f,info:h,inService:k}=me(),x=_e(),[p,j]=w.useState(!1),v=w.useRef(null),[I,g]=w.useState(!1),[b,C]=w.useState(null),_=z=>{n(z),j(!1)},T=()=>{j(!p)},D=z=>{v.current&&v.current.contains(z.target)||j(!1)},$=()=>{g(!0)},R=()=>{g(!1)},A=async()=>{var z;if(b)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:b.url,projectId:"",scope:b.scope||"studio"}}),await((z=x==null?void 0:x.actions)==null?void 0:z.refreshBlocklet())}catch(B){U.error(`Remove Blocklet Store Error: ${De(B)}`)}finally{C(null)}},{storeList:q}=gn({fromBlocklet:k,blocklet:e,nodeInfo:h,componentDid:l,userDid:(m=c==null?void 0:c.user)==null?void 0:m.did}),E=(y=e==null?void 0:e.meta)==null?void 0:y.did;return t.jsxs(t.Fragment,{children:[t.jsxs(xt,{disabled:s,ref:v,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[t.jsxs(Z,{onClick:r,children:[i&&t.jsx(Ze,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${o.name||""}`]}),t.jsx(Z,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:t.jsx(Ms,{})})]}),t.jsx(Fo,{sx:{zIndex:10},open:p,anchorEl:v.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:z})=>t.jsx(Ho,{...z,style:{transformOrigin:"center top"},children:t.jsx(It,{children:t.jsx(Go,{onClickAway:D,children:t.jsxs(Xo,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[q==null?void 0:q.map(B=>{var S;return t.jsxs(ue,{selected:B.id===(o==null?void 0:o.id),sx:{height:56},onClick:()=>_(B),children:[t.jsxs(u,{children:[t.jsx(pe,{sx:{fontSize:"16px"},maxLength:24,children:B.name}),t.jsx(pe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:B.url})]}),_s({store:B,userDid:(S=c==null?void 0:c.user)==null?void 0:S.did})&&t.jsx(oe,{sx:{ml:1},onClick:P=>{P.preventDefault(),P.stopPropagation(),C(B)},children:t.jsx(ne,{icon:"ic:outline-delete"})})]},B.url)}),t.jsx(Kn,{}),t.jsxs(ue,{onClick:$,children:[t.jsx(_t,{font:!0}),t.jsx(O,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),I&&t.jsx(ln,{hiddenChildren:!0,open:!0,onClose:R,teamDid:E,storeList:q,scope:"studio",onAdd:(L=x==null?void 0:x.actions)==null?void 0:L.refreshBlocklet}),b&&t.jsx(Pt,{displayError:!0,title:`${a("common.delete")} ${b.name}`,description:a("blocklet.publish.deleteStoreTip",{name:b.name}),confirm:a("common.confirm"),onConfirm:A,onCancel:()=>C(null)})]})}Qt.propTypes={store:d.object,blocklet:d.object,onChangeStore:d.func.isRequired,onClick:d.func.isRequired,loading:d.bool.isRequired,disabled:d.bool.isRequired,componentDid:d.string.isRequired,projectType:d.string.isRequired,getData:d.func.isRequired};Qt.defaultProps={store:null,blocklet:null};var fe=w;const Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,it=(e,o,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),c=s.pop(),f={provider:s.length>0?s[0]:r,prefix:c,name:a};return o&&!Qe(f)?null:f}const i=s[0],l=i.split("-");if(l.length>1){const a={provider:r,prefix:l.shift(),name:l.join("-")};return o&&!Qe(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return o&&!Qe(a,n)?null:a}return null},Qe=(e,o)=>e?!!((e.provider===""||e.provider.match(Ee))&&(o&&e.prefix===""||e.prefix.match(Ee))&&e.name.match(Ee)):!1,kn=Object.freeze({left:0,top:0,width:16,height:16}),tt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yt=Object.freeze({...kn,...tt}),kt=Object.freeze({...Yt,body:"",hidden:!1});function jr(e,o){const n={};!e.hFlip!=!o.hFlip&&(n.hFlip=!0),!e.vFlip!=!o.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(o.rotate||0))%4;return r&&(n.rotate=r),n}function Co(e,o){const n=jr(e,o);for(const r in kt)r in tt?r in e&&!(r in n)&&(n[r]=tt[r]):r in o?n[r]=o[r]:r in e&&(n[r]=e[r]);return n}function yr(e,o){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function i(l){if(n[l])return s[l]=[];if(!(l in s)){s[l]=null;const a=r[l]&&r[l].parent,c=a&&i(a);c&&(s[l]=[a].concat(c))}return s[l]}return Object.keys(n).concat(Object.keys(r)).forEach(i),s}function vr(e,o,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function l(a){i=Co(r[a]||s[a],i)}return l(o),n.forEach(l),Co(e,i)}function jn(e,o){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{o(s,null),n.push(s)});const r=yr(e);for(const s in r){const i=r[s];i&&(o(s,vr(e,s,i)),n.push(s))}return n}const wr={provider:"",aliases:{},not_found:{},...kn};function mt(e,o){for(const n in o)if(n in e&&typeof e[n]!=typeof o[n])return!1;return!0}function yn(e){if(typeof e!="object"||e===null)return null;const o=e;if(typeof o.prefix!="string"||!e.icons||typeof e.icons!="object"||!mt(e,wr))return null;const n=o.icons;for(const s in n){const i=n[s];if(!s.match(Ee)||typeof i.body!="string"||!mt(i,kt))return null}const r=o.aliases||Object.create(null);for(const s in r){const i=r[s],l=i.parent;if(!s.match(Ee)||typeof l!="string"||!n[l]&&!r[l]||!mt(i,kt))return null}return o}const Ro=Object.create(null);function Cr(e,o){return{provider:e,prefix:o,icons:Object.create(null),missing:new Set}}function ve(e,o){const n=Ro[e]||(Ro[e]=Object.create(null));return n[o]||(n[o]=Cr(e,o))}function Zt(e,o){return yn(o)?jn(o,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Rr(e,o,n){try{if(typeof n.body=="string")return e.icons[o]={...n},!0}catch{}return!1}let Oe=!1;function vn(e){return typeof e=="boolean"&&(Oe=e),Oe}function Sr(e){const o=typeof e=="string"?it(e,!0,Oe):e;if(o){const n=ve(o.provider,o.prefix),r=o.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Ir(e,o){const n=it(e,!0,Oe);if(!n)return!1;const r=ve(n.provider,n.prefix);return Rr(r,n.name,o)}function Dr(e,o){if(typeof e!="object")return!1;if(typeof o!="string"&&(o=e.provider||""),Oe&&!o&&!e.prefix){let s=!1;return yn(e)&&(e.prefix="",jn(e,(i,l)=>{l&&Ir(i,l)&&(s=!0)})),s}const n=e.prefix;if(!Qe({provider:o,prefix:n,name:"a"}))return!1;const r=ve(o,n);return!!Zt(r,e)}const wn=Object.freeze({width:null,height:null}),Cn=Object.freeze({...wn,...tt}),Tr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function So(e,o,n){if(o===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*o*n)/n;if(typeof e!="string")return e;const r=e.split(Tr);if(r===null||!r.length)return e;const s=[];let i=r.shift(),l=_r.test(i);for(;;){if(l){const a=parseFloat(i);isNaN(a)?s.push(i):s.push(Math.ceil(a*o*n)/n)}else s.push(i);if(i=r.shift(),i===void 0)return s.join("");l=!l}}const Pr=e=>e==="unset"||e==="undefined"||e==="none";function Lr(e,o){const n={...Yt,...e},r={...Cn,...o},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(j=>{const v=[],I=j.hFlip,g=j.vFlip;let b=j.rotate;I?g?b+=2:(v.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),v.push("scale(-1 1)"),s.top=s.left=0):g&&(v.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),v.push("scale(1 -1)"),s.top=s.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=s.height/2+s.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:C=s.width/2+s.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(s.left!==s.top&&(C=s.left,s.left=s.top,s.top=C),s.width!==s.height&&(C=s.width,s.width=s.height,s.height=C)),v.length&&(i='<g transform="'+v.join(" ")+'">'+i+"</g>")});const l=r.width,a=r.height,c=s.width,f=s.height;let h,k;l===null?(k=a===null?"1em":a==="auto"?f:a,h=So(k,c/f)):(h=l==="auto"?c:l,k=a===null?So(h,f/c):a==="auto"?f:a);const x={},p=(j,v)=>{Pr(v)||(x[j]=v.toString())};return p("width",h),p("height",k),x.viewBox=s.left.toString()+" "+s.top.toString()+" "+c.toString()+" "+f.toString(),{attributes:x,body:i}}const qr=/\sid="(\S+)"/g,$r="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Nr=0;function Ar(e,o=$r){const n=[];let r;for(;r=qr.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const l=typeof o=="function"?o(i):o+(Nr++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+l+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const jt=Object.create(null);function Er(e,o){jt[e]=o}function yt(e){return jt[e]||jt[""]}function Kt(e){let o;if(typeof e.resources=="string")o=[e.resources];else if(o=e.resources,!(o instanceof Array)||!o.length)return null;return{resources:o,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const eo=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],Ye=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?Ye.push(Ne.shift()):Ye.push(Ne.pop());eo[""]=Kt({resources:["https://api.iconify.design"].concat(Ye)});function Mr(e,o){const n=Kt(o);return n===null?!1:(eo[e]=n,!0)}function to(e){return eo[e]}const Or=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Io=Or();function zr(e,o){const n=to(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(l=>{s=Math.max(s,l.length)});const i=o+".json?icons=";r=n.maxURL-s-n.path.length-i.length}return r}function Br(e){return e===404}const Vr=(e,o,n)=>{const r=[],s=zr(e,o),i="icons";let l={type:i,provider:e,prefix:o,icons:[]},a=0;return n.forEach((c,f)=>{a+=c.length+1,a>=s&&f>0&&(r.push(l),l={type:i,provider:e,prefix:o,icons:[]},a=c.length),l.icons.push(c)}),r.push(l),r};function Wr(e){if(typeof e=="string"){const o=to(e);if(o)return o.path}return"/"}const Ur=(e,o,n)=>{if(!Io){n("abort",424);return}let r=Wr(o.provider);switch(o.type){case"icons":{const i=o.prefix,a=o.icons.join(","),c=new URLSearchParams({icons:a});r+=i+".json?"+c.toString();break}case"custom":{const i=o.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;Io(e+r).then(i=>{const l=i.status;if(l!==200){setTimeout(()=>{n(Br(l)?"abort":"next",l)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},Fr={prepare:Vr,send:Ur};function Hr(e){const o={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const i=s.provider,l=s.prefix,a=s.name,c=n[i]||(n[i]=Object.create(null)),f=c[l]||(c[l]=ve(i,l));let h;a in f.icons?h=o.loaded:l===""||f.missing.has(a)?h=o.missing:h=o.pending;const k={provider:i,prefix:l,name:a};h.push(k)}),o}function Rn(e,o){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==o))})}function Gr(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const o=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!o.length)return;let n=!1;const r=e.provider,s=e.prefix;o.forEach(i=>{const l=i.icons,a=l.pending.length;l.pending=l.pending.filter(c=>{if(c.prefix!==s)return!0;const f=c.name;if(e.icons[f])l.loaded.push({provider:r,prefix:s,name:f});else if(e.missing.has(f))l.missing.push({provider:r,prefix:s,name:f});else return n=!0,!0;return!1}),l.pending.length!==a&&(n||Rn([e],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}let Xr=0;function Jr(e,o,n){const r=Xr++,s=Rn.bind(null,n,r);if(!o.pending.length)return s;const i={id:r,icons:o,callback:e,abort:s};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),s}function Qr(e,o=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?it(s,o,n):s;i&&r.push(i)}),r}var Yr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Zr(e,o,n,r){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let l;if(e.random){let D=e.resources.slice(0);for(l=[];D.length>1;){const $=Math.floor(Math.random()*D.length);l.push(D[$]),D=D.slice(0,$).concat(D.slice($+1))}l=l.concat(D)}else l=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let c="pending",f=0,h,k=null,x=[],p=[];typeof r=="function"&&p.push(r);function j(){k&&(clearTimeout(k),k=null)}function v(){c==="pending"&&(c="aborted"),j(),x.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),x=[]}function I(D,$){$&&(p=[]),typeof D=="function"&&p.push(D)}function g(){return{startTime:a,payload:o,status:c,queriesSent:f,queriesPending:x.length,subscribe:I,abort:v}}function b(){c="failed",p.forEach(D=>{D(void 0,h)})}function C(){x.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),x=[]}function _(D,$,R){const A=$!=="success";switch(x=x.filter(q=>q!==D),c){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if($==="abort"){h=R,b();return}if(A){h=R,x.length||(l.length?T():b());return}if(j(),C(),!e.random){const q=e.resources.indexOf(D.resource);q!==-1&&q!==e.index&&(e.index=q)}c="completed",p.forEach(q=>{q(R)})}function T(){if(c!=="pending")return;j();const D=l.shift();if(D===void 0){if(x.length){k=setTimeout(()=>{j(),c==="pending"&&(C(),b())},e.timeout);return}b();return}const $={status:"pending",resource:D,callback:(R,A)=>{_($,R,A)}};x.push($),f++,k=setTimeout(T,e.rotate),n(D,o,$.callback)}return setTimeout(T),g}function Sn(e){const o={...Yr,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function s(a,c,f){const h=Zr(o,a,c,(k,x)=>{r(),f&&f(k,x)});return n.push(h),h}function i(a){return n.find(c=>a(c))||null}return{query:s,find:i,setIndex:a=>{o.index=a},getIndex:()=>o.index,cleanup:r}}function Do(){}const bt=Object.create(null);function Kr(e){if(!bt[e]){const o=to(e);if(!o)return;const n=Sn(o),r={config:o,redundancy:n};bt[e]=r}return bt[e]}function el(e,o,n){let r,s;if(typeof e=="string"){const i=yt(e);if(!i)return n(void 0,424),Do;s=i.send;const l=Kr(e);l&&(r=l.redundancy)}else{const i=Kt(e);if(i){r=Sn(i);const l=e.resources?e.resources[0]:"",a=yt(l);a&&(s=a.send)}}return!r||!s?(n(void 0,424),Do):r.query(o,s,n)().abort}const To="iconify2",ze="iconify",In=ze+"-count",_o=ze+"-version",Dn=36e5,tl=168;function vt(e,o){try{return e.getItem(o)}catch{}}function oo(e,o,n){try{return e.setItem(o,n),!0}catch{}}function Po(e,o){try{e.removeItem(o)}catch{}}function wt(e,o){return oo(e,In,o.toString())}function Ct(e){return parseInt(vt(e,In))||0}const ct={local:!0,session:!0},Tn={local:new Set,session:new Set};let no=!1;function ol(e){no=e}let Ge=typeof window>"u"?{}:window;function _n(e){const o=e+"Storage";try{if(Ge&&Ge[o]&&typeof Ge[o].length=="number")return Ge[o]}catch{}ct[e]=!1}function Pn(e,o){const n=_n(e);if(!n)return;const r=vt(n,_o);if(r!==To){if(r){const a=Ct(n);for(let c=0;c<a;c++)Po(n,ze+c.toString())}oo(n,_o,To),wt(n,0);return}const s=Math.floor(Date.now()/Dn)-tl,i=a=>{const c=ze+a.toString(),f=vt(n,c);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&o(h,a))return!0}catch{}Po(n,c)}};let l=Ct(n);for(let a=l-1;a>=0;a--)i(a)||(a===l-1?(l--,wt(n,l)):Tn[e].add(a))}function Ln(){if(!no){ol(!0);for(const e in ct)Pn(e,o=>{const n=o.data,r=o.provider,s=n.prefix,i=ve(r,s);if(!Zt(i,n).length)return!1;const l=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,l):l,!0})}}function nl(e,o){const n=e.lastModifiedCached;if(n&&n>=o)return n===o;if(e.lastModifiedCached=o,n)for(const r in ct)Pn(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===o});return!0}function sl(e,o){no||Ln();function n(r){let s;if(!ct[r]||!(s=_n(r)))return;const i=Tn[r];let l;if(i.size)i.delete(l=Array.from(i).shift());else if(l=Ct(s),!wt(s,l+1))return;const a={cached:Math.floor(Date.now()/Dn),provider:e.provider,data:o};return oo(s,ze+l.toString(),JSON.stringify(a))}o.lastModified&&!nl(e,o.lastModified)||Object.keys(o.icons).length&&(o.not_found&&(o=Object.assign({},o),delete o.not_found),n("local")||n("session"))}function Lo(){}function rl(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Gr(e)}))}function ll(e,o){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(o).sort():e.iconsToLoad=o,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let i;if(!s||!(i=yt(n)))return;i.prepare(n,r,s).forEach(a=>{el(n,a,c=>{if(typeof c!="object")a.icons.forEach(f=>{e.missing.add(f)});else try{const f=Zt(e,c);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(k=>{h.delete(k)}),sl(e,c)}catch(f){console.error(f)}rl(e)})})}))}const il=(e,o)=>{const n=Qr(e,!0,vn()),r=Hr(n);if(!r.pending.length){let c=!0;return o&&setTimeout(()=>{c&&o(r.loaded,r.missing,r.pending,Lo)}),()=>{c=!1}}const s=Object.create(null),i=[];let l,a;return r.pending.forEach(c=>{const{provider:f,prefix:h}=c;if(h===a&&f===l)return;l=f,a=h,i.push(ve(f,h));const k=s[f]||(s[f]=Object.create(null));k[h]||(k[h]=[])}),r.pending.forEach(c=>{const{provider:f,prefix:h,name:k}=c,x=ve(f,h),p=x.pendingIcons||(x.pendingIcons=new Set);p.has(k)||(p.add(k),s[f][h].push(k))}),i.forEach(c=>{const{provider:f,prefix:h}=c;s[f][h].length&&ll(c,s[f][h])}),o?Jr(o,r,i):Lo};function cl(e,o){const n={...e};for(const r in o){const s=o[r],i=typeof s;r in wn?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const al=/[\s,]+/;function dl(e,o){o.split(al).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ul(e,o=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?r(i):0)}}return o}function pl(e,o){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in o)n+=" "+r+'="'+o[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function fl(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function hl(e){return"data:image/svg+xml,"+fl(e)}function ml(e){return'url("'+hl(e)+'")'}let Me;function bl(){try{Me=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Me=null}}function xl(e){return Me===void 0&&bl(),Me?Me.createHTML(e):e}const qn={...Cn,inline:!1},gl={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kl={display:"inline-block"},Rt={backgroundColor:"currentColor"},$n={backgroundColor:"transparent"},qo={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},$o={WebkitMask:Rt,mask:Rt,background:$n};for(const e in $o){const o=$o[e];for(const n in qo)o[e+n]=qo[n]}const jl={...qn,inline:!0};function No(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const yl=(e,o,n,r)=>{const s=n?jl:qn,i=cl(s,o),l=o.mode||"svg",a={},c=o.style||{},f={...l==="svg"?gl:{},ref:r};for(let g in o){const b=o[g];if(b!==void 0)switch(g){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":i[g]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&dl(i,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?i[g]=ul(b):typeof b=="number"&&(i[g]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete f["aria-hidden"];break;default:s[g]===void 0&&(f[g]=b)}}const h=Lr(e,i),k=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),l==="svg"){f.style={...a,...c},Object.assign(f,k);let g=0,b=o.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:xl(Ar(h.body,b?()=>b+"ID"+g++:"iconifyReact"))},fe.createElement("svg",f)}const{body:x,width:p,height:j}=e,v=l==="mask"||(l==="bg"?!1:x.indexOf("currentColor")!==-1),I=pl(x,{...k,width:p+"",height:j+""});return f.style={...a,"--svg":ml(I),width:No(k.width),height:No(k.height),...kl,...v?Rt:$n,...c},fe.createElement("span",f)};vn(!0);Er("",Fr);if(typeof document<"u"&&typeof window<"u"){Ln();const e=window;if(e.IconifyPreload!==void 0){const o=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof o=="object"&&o!==null&&(o instanceof Array?o:[o]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Dr(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const o=e.IconifyProviders;if(typeof o=="object"&&o!==null)for(let n in o){const r="IconifyProviders["+n+"] is invalid.";try{const s=o[n];if(typeof s!="object"||!s||s.resources===void 0)continue;Mr(n,s)||console.error(r)}catch{console.error(r)}}}}class Nn extends fe.Component{constructor(o){super(o),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(o){this.state.icon!==o&&this.setState({icon:o})}_checkIcon(o){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(o||n.icon===null)&&this._setData({data:r});return}let s;if(typeof r!="string"||(s=it(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const i=Sr(s);if(!i){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),i!==null&&(this._loading={name:r,abort:il([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const l=["iconify"];s.prefix!==""&&l.push("iconify--"+s.prefix),s.provider!==""&&l.push("iconify--"+s.provider),this._setData({data:i,classes:l}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(o){o.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const o=this.props,n=this.state.icon;if(n===null)return o.children?o.children:fe.createElement("span",{});let r=o;return n.classes&&(r={...o,className:(typeof o.className=="string"?o.className+" ":"")+n.classes.join(" ")}),yl({...Yt,...n.data},r,o._inline,o._ref)}}const vl=fe.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!1};return fe.createElement(Nn,r)});fe.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!0};return fe.createElement(Nn,r)});var wl=vl;const Cl=e=>{const o=e.includes("youtube.com")||e.includes("youtu.be"),n=e.includes("vimeo.com");return o||n};function at({url:e,style:o,controls:n,modestbranding:r}){var a;const{t:s}=Q(),i=e.includes("youtube.com")||e.includes("youtu.be"),l=e.includes("vimeo.com");if(i){const c=((a=e.split("v=")[1])==null?void 0:a.split("&")[0])||e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:(o==null?void 0:o.pointerEvents)||"auto"},children:t.jsx("iframe",{src:`https://www.youtube.com/embed/${c}?modestbranding=${r}&controls=${n}&rel=0`,title:"YouTube video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}if(l){const c=e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:o.pointerEvents||"auto"},children:t.jsx("iframe",{src:`https://player.vimeo.com/video/${c}`,title:"Vimeo video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0})})}return t.jsx(u,{style:{position:"relative",width:"100%",paddingTop:"56.25%"},children:t.jsxs(u,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",backgroundColor:"rgba(0, 0, 0, 0.04)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,children:[t.jsx(wl,{icon:"carbon:video-off",style:{fontSize:40,marginBottom:"10px",opacity:.5}}),t.jsx(O,{variant:"body1",sx:{opacity:.5},children:s("studio.videoDialogNoSrc")})]})})}at.propTypes={url:d.string.isRequired,style:d.object,controls:d.number,modestbranding:d.number};at.defaultProps={style:{},controls:1,modestbranding:1};function An({setParams:e,onClose:o,params:n}){const{t:r}=Q(),[s,i]=w.useState(""),l=s&&n.blockletVideos.includes(s),a=Cl(s),c=()=>{e(f=>{const h=[...f.blockletVideos];return h.push(s),{...f,blockletVideos:h}}),o()};return t.jsxs(rt,{open:!0,fullWidth:!0,maxWidth:"sm",children:[t.jsx(Jo,{children:r("studio.videoDialogTitle")}),t.jsxs(Qo,{children:[t.jsx(es,{fullWidth:!0,value:s,onChange:f=>i(f.target.value),placeholder:r("studio.videoInputLabel"),endAdornment:s?t.jsx(Ve,{position:"end",children:t.jsx(oe,{onClick:()=>i(""),children:t.jsx(ks,{})})}):null,error:l}),l&&t.jsx(O,{variant:"body2",color:"error",children:r("studio.duplicateVideo")}),t.jsx(at,{url:s,style:{marginTop:"20px",borderRadius:"4px"}})]}),t.jsxs(Yo,{children:[t.jsx(Z,{onClick:()=>o(),children:r("studio.cancel")}),t.jsx(Z,{disabled:!a||l,onClick:c,children:r("studio.confirm")})]})]})}An.propTypes={onClose:d.func.isRequired,params:d.object.isRequired,setParams:d.func.isRequired};const Ao=w.lazy(()=>en(()=>import("./index-DwTE_KjA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function En({projectId:e,readOnly:o,loading:n,blocklet:r,params:s,setParams:i,paramsErrTip:l,setParamsErrTip:a,setLoading:c,initUrl:f,initLogoUrl:h,setInitLogoUrl:k,componentDid:x}){const{t:p,locale:j}=Q(),{api:v}=me(),I=St(),g=w.useRef(null),b=w.useRef(null),[C,_]=br(r),[T,D]=w.useState(!1),$=Ps({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),R=async S=>{const P=setTimeout(()=>{c(!1)},2e4),W=await gr(v,S);c(!1),clearTimeout(P),window.parent.postMessage({event:"studioDialog.connected",componentDid:x},"*"),I(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${W}/create`),{replace:!0})},A=()=>{if(!s.blockletTitle){U.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){U.error(p("blocklet.publish.noStoreSelected"));return}const S=xr();$(async(P,W)=>{var F,G,ee;try{const J=await v.connectByStudio({input:{did:(F=r==null?void 0:r.meta)==null?void 0:F.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((G=s==null?void 0:s.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:x,messageId:S,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(J!=null&&J.url)){U.error("failed to connect to store");return}W(J.url),R({did:(ee=r==null?void 0:r.meta)==null?void 0:ee.did,projectId:"",messageId:S})}catch(J){const se=De(J);U.error(se),c(!1)}})},q=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/logo/upload`,E=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/screenshot/upload`,m=s!=null&&s.blockletLogo?`${q}/${s.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,y=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(S=>`${E}/${S}`),L=()=>o?!1:!e||e===X.UNOWNED_DID?(U.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,z=S=>{if(!S.destination)return;const P=Array.from(s.blockletScreenshots),[W]=P.splice(S.source.index,1);P.splice(S.destination.index,0,W),i(F=>({...F,blockletScreenshots:P}))},B=S=>{if(!S.destination)return;const P=Array.from(s.blockletVideos),[W]=P.splice(S.source.index,1);P.splice(S.destination.index,0,W),i(F=>({...F,blockletVideos:P}))};return t.jsxs(Rl,{children:[t.jsx(u,{display:"flex",className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:S=>{a({blockletTitle:""}),i({blockletTitle:S.target.value})},error:!!l.blockletTitle,helperText:l.blockletTitle||""}),t.jsx(Y,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&t.jsx(Ve,{position:"end",children:t.jsx(Qt,{blocklet:r,store:C,componentDid:x,onChangeStore:_,disabled:!s.blockletTitle||o||n,loading:n,onClick:A})})},error:!!l.projectId,helperText:l.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:o},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:S=>{a({blockletDescription:""}),i({blockletDescription:S.target.value})},error:!!l.blockletDescription,helperText:l.blockletDescription||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.homepageTip")}`,placeholder:`Blocklet ${p("common.homepageTip")}`,InputProps:{"data-cy":"blocklet-homepage",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletHomepage||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)?a({blockletHomepage:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletHomepage:""}),i({blockletHomepage:S.target.value})},error:!!l.blockletHomepage,helperText:l.blockletHomepage||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.community")}`,placeholder:`Blocklet ${p("common.community")}`,InputProps:{"data-cy":"blocklet-community",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletCommunity||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)?a({blockletCommunity:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletCommunity:""}),i({blockletCommunity:S.target.value})},error:!!l.blockletCommunity,helperText:l.blockletCommunity||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.support")}`,placeholder:`Blocklet ${p("common.support")}`,InputProps:{"data-cy":"blocklet-support",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletSupport||"",onChange:S=>{S.target.value&&!/^(http|https):\/\//.test(S.target.value)&&!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(S.target.value)?a({blockletSupport:p("blocklet.publish.errorTip.invalidUrlOrEmail")}):a({blockletSupport:""}),i({blockletSupport:S.target.value})},error:!!l.blockletSupport,helperText:l.blockletSupport||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.repository")}`,placeholder:`Blocklet ${p("common.repository")}`,InputProps:{"data-cy":"blocklet-repository",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletRepository||"",onChange:S=>{S.target.value&&!/^(git|https|svn)/.test(S.target.value)?a({blockletRepository:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletRepository:""}),i({blockletRepository:S.target.value})},error:!!l.blockletRepository,helperText:l.blockletRepository||"",sx:{mt:3}})]})}),t.jsx(u,{display:"flex",mt:3,className:"section full-width",children:t.jsxs(u,{sx:{flex:1},children:[t.jsxs(u,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.type"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"png, jpg, webp, svg"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),t.jsx(u,{sx:{flex:1,cursor:o?"default":"pointer",display:"flex",alignItems:"flex-end"},children:t.jsx(Vo,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:h||m,onClick:()=>{var S;L()&&((S=g.current)==null||S.open())}})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{sx:{border:"none"},variant:"outlined",size:"small",children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(bo,{onDragEnd:o?void 0:z,children:t.jsx(xo,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:o,children:(S,P)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:P.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:P.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:S.innerRef,...S.droppableProps,children:[y.map((W,F)=>t.jsx(go,{draggableId:W,index:F,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx("img",{alt:"screenshot",src:W}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(gt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{i(J=>{const se=[...J.blockletScreenshots];return se.splice(F,1),{...J,blockletScreenshots:se}})},children:t.jsx(ko,{})})]})},W)),S.placeholder,y.length<5&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var W;L()&&((W=b.current)==null||W.open())},children:"+"})]})})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(je,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(O,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("studio.video")}),t.jsxs(je,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.videoType"),":"," "]}),t.jsxs(u,{component:"span",sx:{color:"#007ec6"},children:[t.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",t.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~3"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(bo,{onDragEnd:o?void 0:B,children:t.jsx(xo,{droppableId:"videos",direction:"horizontal",isDropDisabled:o,children:(S,P)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:P.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:P.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:S.innerRef,...S.droppableProps,children:[s.blockletVideos.map((W,F)=>t.jsx(go,{draggableId:W,index:F,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx(at,{url:W,style:{pointerEvents:ee.isDragging?"none":"auto"}}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(gt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{i(J=>{const se=[...J.blockletVideos];return se.splice(F,1),{...J,blockletVideos:se}})},children:t.jsx(ko,{})})]})},W)),S.placeholder,s.blockletVideos.length<3&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{L()&&D(!0)},children:"+"})]})})})]})]})}),t.jsxs(w.Suspense,{fallback:t.jsx(We,{}),children:[t.jsx(Ao,{ref:g,locale:j,popup:!0,onUploadFinish:S=>{var P;i({blockletLogo:S.data.filename}),k(""),(P=g.current)==null||P.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:q,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),T&&t.jsx(An,{onClose:()=>D(!1),params:s,setParams:i}),t.jsx(Ao,{ref:b,popup:!0,onUploadFinish:S=>{var P;i(W=>{var G;const F=W.blockletScreenshots||[];return F.push((G=S.data)==null?void 0:G.filename),{...W,blockletScreenshots:F}}),(P=b.current)==null||P.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:E,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-y.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}En.propTypes={projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired,blocklet:d.object.isRequired,setLoading:d.func.isRequired,initUrl:d.object.isRequired,componentDid:d.isRequired,initLogoUrl:d.string.isRequired,setInitLogoUrl:d.func.isRequired};const Rl=ae.div`
133
133
  margin-top: 24px;
134
134
  .screenshot {
135
135
  margin-bottom: 16px;
@@ -177,7 +177,7 @@ import{r as w,k as St,l as st,L as ce,f as Qn,h as Yn,i as dt}from"./vendor-reac
177
177
  padding-bottom: 12px;
178
178
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
179
179
  }
180
- `;function Wn({text:e}){return e?t.jsx(zs,{wrapperElement:{"data-color-mode":"light"},source:js.sanitize(e),rehypePlugins:[[Bs,{target:"_blank"}]]}):t.jsx(Te,{Icon:Nt})}Wn.propTypes={text:d.string.isRequired};function Un({params:e,setParams:o,paramsErrTip:n,loading:r,setParamsErrTip:s,readOnly:i}){var h;const{t:l}=Q(),[a,c]=w.useState(i?"preview":"write"),f=(k,x)=>{c(x)};return t.jsxs(u,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[t.jsxs(u,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[t.jsx(O,{variant:"h6",fontWeight:"bold",sx:{},children:l("common.introduction")}),t.jsxs(Zo,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[t.jsx(Ke,{value:"write",label:"Write"}),t.jsx(Ke,{value:"preview",label:"Preview"})]})]}),t.jsx(u,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:t.jsx(Y,{disabled:r||i,sx:{border:"none"},placeholder:`Blocklet ${l("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:i,endAdornment:t.jsxs(Ve,{position:"end",children:[((h=e==null?void 0:e.blockletIntroduction)==null?void 0:h.length)||0," / ",re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:k=>{s({blockletIntroduction:""}),o({blockletIntroduction:k.target.value.slice(0,re.PROJECT.MAX_INTRO_LENGTH)})},error:!!n.blockletIntroduction,helperText:n.blockletIntroduction||""})}),t.jsx(u,{display:a==="preview"?"block":"none",mt:3,children:t.jsx(Wn,{text:e.blockletIntroduction||""})})]})}Un.propTypes={params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,readOnly:d.bool.isRequired,loading:d.bool.isRequired};var lo={},Nl=he;Object.defineProperty(lo,"__esModule",{value:!0});var Fn=lo.default=void 0,Al=Nl(be()),Mo=t;Fn=lo.default=(0,Al.default)([(0,Mo.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,Mo.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function io({step:e,ok:o,active:n,error:r}){let s="grey.500",i=e+1;return o&&(i=t.jsx(Vs,{sx:{fontSize:18,margin:0},color:"white"})),r||!o&&n>e?(s="error.main",i=t.jsx(Fn,{sx:{fontSize:18,margin:0},color:"white"})):n>=e&&(s="primary.main"),t.jsx(u,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:i})}io.propTypes={step:d.number,ok:d.bool,active:d.number,error:d.string};io.defaultProps={step:0,ok:!1,active:0,error:""};function Hn({steps:e,activeStep:o,setActiveStep:n,hasSelectedResources:r,params:s,loading:i,paramsErrTip:l,viewMode:a,projectId:c}){const{t:f}=Q(),h=()=>{n(j=>j+1)},k=()=>{n(j=>j-1)},x=j=>j===0?(l==null?void 0:l.blockletTitle)||(l==null?void 0:l.projectId)||(l==null?void 0:l.blockletDescription)||(l==null?void 0:l.blockletHomepage)||(l==null?void 0:l.blockletSupport)||(l==null?void 0:l.blockletCommunity)||(l==null?void 0:l.blockletRepository):j===2?(l==null?void 0:l.blockletResource)||(l==null?void 0:l.blockletDocker)||(l==null?void 0:l.dockerImageName):j>=4?(l==null?void 0:l.blockletVersion)||(l==null?void 0:l.note):"",p=a||On({hasSelectedResources:r,params:s,projectId:c,t:f})===null;return t.jsxs(u,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[t.jsx(rs,{activeStep:o,orientation:"vertical",children:e.map((j,v)=>{const I={},g=i||!ql({hasSelectedResources:r,params:s,projectId:c,step:v,t:f}),b=i?"":x(v);return b&&(I.optional=t.jsx(O,{variant:"caption",color:"error",children:b}),I.error=!0),t.jsxs(ls,{children:[t.jsx(is,{icon:t.jsx(io,{error:b,active:p?99:o,step:v,ok:g}),sx:{cursor:"pointer",color:b?"error.main":"inherit"},disabled:!1,onClick:()=>n(v),...I,children:t.jsx(O,{fontSize:"14px",fontWeight:"500",color:b||!g&&o>v?"error.main":"inherit",children:j.label})}),t.jsxs(cs,{children:[t.jsx(O,{fontSize:12,children:j.description}),!p&&t.jsx(u,{sx:{mb:2},children:t.jsxs("div",{children:[v<e.length-1&&t.jsx(Z,{variant:"contained",onClick:h,sx:{mt:1,mr:1},disabled:b||!g,children:f("common.continue")}),v>0&&t.jsx(Z,{disabled:v===0,onClick:k,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},j.label)})}),o>=e.length-1&&t.jsx(It,{square:!0,elevation:0,sx:{p:3},children:t.jsx(O,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}Hn.propTypes={steps:d.array.isRequired,activeStep:d.number.isRequired,setActiveStep:d.func.isRequired,params:d.object.isRequired,viewMode:d.string.isRequired,loading:d.bool.isRequired,projectId:d.string.isRequired,hasSelectedResources:d.bool.isRequired,paramsErrTip:d.shape({projectId:d.string,blockletVersion:d.string,blockletTitle:d.string,blockletDescription:d.string,note:d.string,blockletResource:d.string,blockletHomepage:d.string,blockletSupport:d.string,blockletCommunity:d.string,blockletRepository:d.string,blockletDocker:d.object,dockerImageName:d.string}).isRequired};const El=[".zip",".gz"],Ml=1024*1024*100,Ol=w.lazy(()=>en(()=>import("./index-CmBEz5CL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function co({app:e,projectId:o,readOnly:n,params:r,setParams:s,setParamsErrTip:i,error:l}){const{t:a,locale:c}=Q(),f=w.useRef(null),h=()=>n?!1:!o||o===X.UNOWNED_DID?(U.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,k=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${o}/resource/upload`;return t.jsxs(u,{sx:{mt:3},children:[t.jsx(O,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),t.jsxs(je,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:n?"default":"pointer"},children:[!!r.uploadedResource&&t.jsx(O,{component:"a",href:`${k}/params.uploadedResource`,children:r.uploadedResource}),!n&&t.jsx(Z,{variant:"outlined",size:"small",onClick:()=>{var x;h()&&((x=f.current)==null||x.open())},children:r.uploadedResource?a("common.change"):a("common.upload")})]}),t.jsx(w.Suspense,{fallback:t.jsx(We,{}),children:t.jsx(Ol,{ref:f,locale:c,popup:!0,onUploadFinish:x=>{var p;s({uploadedResource:x.data.filename}),i({blockletResource:""}),(p=f.current)==null||p.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:El,maxFileSize:Ml,maxNumberOfFiles:1}}},"uploader-resource")}),!!l&&t.jsx(u,{color:"error.main",mt:1,fontSize:14,children:l})]})}co.propTypes={app:d.object.isRequired,projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,error:d.string.isRequired,setParamsErrTip:d.func.isRequired};co.defaultProps={};function ot({readOnly:e,params:o,setParams:n,paramsErrTip:r,setParamsErrTip:s,loading:i}){var a;const{t:l}=Q();return t.jsx(u,{display:"flex",mt:3,className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{required:!0,disabled:i||e,label:`Blocklet ${l("common.version")}`,placeholder:`Blocklet ${l("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:o.blockletVersion||"",onChange:c=>{s({blockletVersion:""}),n({blockletVersion:c.target.value})},error:!!r.blockletVersion,helperText:r.blockletVersion||""}),t.jsx(Y,{label:l("blocklet.publish.releaseNote"),autoComplete:"off",disabled:i||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:t.jsxs(Ve,{position:"end",children:[((a=o==null?void 0:o.note)==null?void 0:a.length)||0," / ",re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:o.note||"",onChange:c=>{s({note:""}),n({note:c.target.value.slice(0,re.PROJECT.MAX_NOTE_LENGTH)})},error:!!r.note,helperText:r.note||"",sx:{mt:3}})]})})}ot.propTypes={readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired};ot.defaultProps={};function Gn(e){for(const o in e)typeof e[o]=="string"?e[o]=e[o].replace(/\\\\/g,"\\"):typeof e[o]=="object"&&e[o]!==null&&Gn(e[o]);return e}function nt({index:e,item:o,dockerParams:n,setDockerParams:r,dataKey:s,t:i,readOnly:l}){const a=(o==null?void 0:o.value)||"",[c,f]=w.useState(!1),h=()=>{var q;(q=n[s])==null||q.splice(e,1),r({...n,[s]:[...n[s]]})},k=(q,E)=>{var m;(m=n[s])!=null&&m[e]&&(E?(n[s][e].custom=n[s][e].value,n[s][e].value=`$${pt(o.key)}`):(n[s][e].value=n[s][e].custom||"",n[s][e].custom="")),r({...n,[s]:[...n[s]]})},x=(q,E)=>{var y;const m=((y=n[s][e])==null?void 0:y.value)||"";n[s][e]={...n[s][e],secure:E,value:E&&m===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":m},r({...n,[s]:[...n[s]]})},p=(q,E)=>{n[s][e]={...n[s][e],shared:E},r({...n,[s]:[...n[s]]})},j=(q,E)=>{var y;const m=((y=n[s][e])==null?void 0:y.value)||"";n[s][e]={...n[s][e],required:E,value:E&&m===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":m},r({...n,[s]:[...n[s]]})},v=(q,E)=>{n[s][e]={...n[s][e],value:E?re.BLOCKLET_AUTOMATIC_ENV_VALUE:"",secure:!1,required:!1},r({...n,[s]:[...n[s]]})},I=q=>{n[s][e]={...n[s][e],description:q.target.value},r({...n,[s]:[...n[s]]})},g=q=>{const E=q.target.value==="web"?"web":"docker";E==="web"&&n.dockerArgs.forEach(L=>{L.type="docker"});const y=`/${n.dockerImage.replace(/\W/g,"-")}-${e}`;n.dockerArgs[e]={...n.dockerArgs[e],type:E,path:E==="docker"?y:"/",protocol:"http",prefix:E==="docker"?y:"/",name:"publicUrl",port:"BLOCKLET_PORT"},r({...n,dockerArgs:[...n.dockerArgs]})},b=q=>{const E=q.target.value;n[s][e]={...n[s][e],prefix:E,path:E==="*"?"/":E},r({...n,[s]:[...n[s]]})},C=q=>{var E;(E=n[s])!=null&&E[e]&&(n[s][e].value=q.target.value),r({...n,[s]:[...n[s]]})},_=a===`$${pt(o.key)}`||o.custom,T=s==="dockerArgs"&&!cn[o.key],D=$s[o.key],$=s==="dockerEnvs",R=o.key==="--publish";let A=o.key;return R&&o.type==="web"?A="--publish (Web)":$&&(A=`--env ${o.key}`),t.jsxs(u,{sx:{display:"flex",flexDirection:"row",gap:2,alignItems:"center"},children:[t.jsx(u,{sx:{width:250},children:t.jsx(O,{sx:{textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:A})}),t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,flex:1},children:[t.jsx(Y,{disabled:l||_||T||o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,placeholder:"",value:_?`$${pt(o.key)}`:a,sx:{flex:1},InputProps:{endAdornment:t.jsxs(Ve,{position:"end",sx:{zoom:.9},children:[(!(D||T)||$||R)&&t.jsx(oe,{onClick:()=>f(!0),children:t.jsx(ne,{icon:"icon-park-outline:setting-config"})}),!l&&t.jsx(oe,{onClick:h,color:T?"error":"default",children:t.jsx(ne,{icon:"ic:round-delete"})})]})},error:T,onChange:C}),T&&t.jsx(O,{variant:"caption",color:"error",children:i("blocklet.publish.docker.noAllowTheArg")}),o.key==="--publish"&&t.jsx(O,{variant:"caption",color:"text.secondary",children:i("blocklet.publish.docker.publishTips")}),o.key==="--volume"&&Ns[o.key](a)&&t.jsx(O,{variant:"caption",color:"error",children:i("blocklet.publish.docker.volumeTips")})]}),c&&t.jsx(Tt,{open:!0,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:0}},title:i($?"blocklet.publish.docker.modifyEnv":"blocklet.publish.docker.modifyParam"),onClose:()=>f(!1),children:t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,paddingBottom:2},children:[D||T||$?null:t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.needCustomInput")}),t.jsx(ye,{disabled:l,checked:_,onChange:k,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.shared")}),t.jsx(ye,{disabled:l,checked:o.shared,onChange:p,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.required")}),t.jsx(ye,{disabled:l,checked:o.required,onChange:j,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.secure")}),t.jsx(ye,{disabled:l,checked:o.secure,onChange:x,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.autoGenerated")}),t.jsx(ye,{disabled:l,checked:o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,onChange:v,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.description")}),t.jsx(Y,{disabled:l,value:o.description,onChange:I,sx:{flex:1},label:i("blocklet.publish.docker.description")})]}),R&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.portType")}),t.jsxs(Ko,{value:o.type||"docker",onChange:g,children:[t.jsx(ue,{value:"docker",children:"Docker"}),t.jsx(ue,{value:"web",children:"Web"})]})]}),R&&o.type==="web"&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.prefix")}),t.jsx(Y,{disabled:l,value:o.prefix,onChange:b,sx:{flex:1},label:i("blocklet.publish.docker.prefix")})]})]})})]})}nt.propTypes={dockerParams:d.object.isRequired,setDockerParams:d.func.isRequired,dataKey:d.string.isRequired,item:d.object.isRequired,t:d.func.isRequired,readOnly:d.bool.isRequired,index:d.number.isRequired};nt.defaultProps={};const zl=`
180
+ `;function Wn({text:e}){return e?t.jsx(zs,{wrapperElement:{"data-color-mode":"light"},source:js.sanitize(e),rehypePlugins:[[Bs,{target:"_blank"}]]}):t.jsx(Te,{Icon:Nt})}Wn.propTypes={text:d.string.isRequired};function Un({params:e,setParams:o,paramsErrTip:n,loading:r,setParamsErrTip:s,readOnly:i}){var h;const{t:l}=Q(),[a,c]=w.useState(i?"preview":"write"),f=(k,x)=>{c(x)};return t.jsxs(u,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[t.jsxs(u,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[t.jsx(O,{variant:"h6",fontWeight:"bold",sx:{},children:l("common.introduction")}),t.jsxs(Zo,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[t.jsx(Ke,{value:"write",label:"Write"}),t.jsx(Ke,{value:"preview",label:"Preview"})]})]}),t.jsx(u,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:t.jsx(Y,{disabled:r||i,sx:{border:"none"},placeholder:`Blocklet ${l("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:i,endAdornment:t.jsxs(Ve,{position:"end",children:[((h=e==null?void 0:e.blockletIntroduction)==null?void 0:h.length)||0," / ",re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:k=>{s({blockletIntroduction:""}),o({blockletIntroduction:k.target.value.slice(0,re.PROJECT.MAX_INTRO_LENGTH)})},error:!!n.blockletIntroduction,helperText:n.blockletIntroduction||""})}),t.jsx(u,{display:a==="preview"?"block":"none",mt:3,children:t.jsx(Wn,{text:e.blockletIntroduction||""})})]})}Un.propTypes={params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,readOnly:d.bool.isRequired,loading:d.bool.isRequired};var lo={},Nl=he;Object.defineProperty(lo,"__esModule",{value:!0});var Fn=lo.default=void 0,Al=Nl(be()),Mo=t;Fn=lo.default=(0,Al.default)([(0,Mo.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,Mo.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function io({step:e,ok:o,active:n,error:r}){let s="grey.500",i=e+1;return o&&(i=t.jsx(Vs,{sx:{fontSize:18,margin:0},color:"white"})),r||!o&&n>e?(s="error.main",i=t.jsx(Fn,{sx:{fontSize:18,margin:0},color:"white"})):n>=e&&(s="primary.main"),t.jsx(u,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:i})}io.propTypes={step:d.number,ok:d.bool,active:d.number,error:d.string};io.defaultProps={step:0,ok:!1,active:0,error:""};function Hn({steps:e,activeStep:o,setActiveStep:n,hasSelectedResources:r,params:s,loading:i,paramsErrTip:l,viewMode:a,projectId:c}){const{t:f}=Q(),h=()=>{n(j=>j+1)},k=()=>{n(j=>j-1)},x=j=>j===0?(l==null?void 0:l.blockletTitle)||(l==null?void 0:l.projectId)||(l==null?void 0:l.blockletDescription)||(l==null?void 0:l.blockletHomepage)||(l==null?void 0:l.blockletSupport)||(l==null?void 0:l.blockletCommunity)||(l==null?void 0:l.blockletRepository):j===2?(l==null?void 0:l.blockletResource)||(l==null?void 0:l.blockletDocker)||(l==null?void 0:l.dockerImageName):j>=4?(l==null?void 0:l.blockletVersion)||(l==null?void 0:l.note):"",p=a||On({hasSelectedResources:r,params:s,projectId:c,t:f})===null;return t.jsxs(u,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[t.jsx(rs,{activeStep:o,orientation:"vertical",children:e.map((j,v)=>{const I={},g=i||!ql({hasSelectedResources:r,params:s,projectId:c,step:v,t:f}),b=i?"":x(v);return b&&(I.optional=t.jsx(O,{variant:"caption",color:"error",children:b}),I.error=!0),t.jsxs(ls,{children:[t.jsx(is,{icon:t.jsx(io,{error:b,active:p?99:o,step:v,ok:g}),sx:{cursor:"pointer",color:b?"error.main":"inherit"},disabled:!1,onClick:()=>n(v),...I,children:t.jsx(O,{fontSize:"14px",fontWeight:"500",color:b||!g&&o>v?"error.main":"inherit",children:j.label})}),t.jsxs(cs,{children:[t.jsx(O,{fontSize:12,children:j.description}),!p&&t.jsx(u,{sx:{mb:2},children:t.jsxs("div",{children:[v<e.length-1&&t.jsx(Z,{variant:"contained",onClick:h,sx:{mt:1,mr:1},disabled:b||!g,children:f("common.continue")}),v>0&&t.jsx(Z,{disabled:v===0,onClick:k,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},j.label)})}),o>=e.length-1&&t.jsx(It,{square:!0,elevation:0,sx:{p:3},children:t.jsx(O,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}Hn.propTypes={steps:d.array.isRequired,activeStep:d.number.isRequired,setActiveStep:d.func.isRequired,params:d.object.isRequired,viewMode:d.string.isRequired,loading:d.bool.isRequired,projectId:d.string.isRequired,hasSelectedResources:d.bool.isRequired,paramsErrTip:d.shape({projectId:d.string,blockletVersion:d.string,blockletTitle:d.string,blockletDescription:d.string,note:d.string,blockletResource:d.string,blockletHomepage:d.string,blockletSupport:d.string,blockletCommunity:d.string,blockletRepository:d.string,blockletDocker:d.object,dockerImageName:d.string}).isRequired};const El=[".zip",".gz"],Ml=1024*1024*100,Ol=w.lazy(()=>en(()=>import("./index-DwTE_KjA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function co({app:e,projectId:o,readOnly:n,params:r,setParams:s,setParamsErrTip:i,error:l}){const{t:a,locale:c}=Q(),f=w.useRef(null),h=()=>n?!1:!o||o===X.UNOWNED_DID?(U.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,k=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${o}/resource/upload`;return t.jsxs(u,{sx:{mt:3},children:[t.jsx(O,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),t.jsxs(je,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:n?"default":"pointer"},children:[!!r.uploadedResource&&t.jsx(O,{component:"a",href:`${k}/params.uploadedResource`,children:r.uploadedResource}),!n&&t.jsx(Z,{variant:"outlined",size:"small",onClick:()=>{var x;h()&&((x=f.current)==null||x.open())},children:r.uploadedResource?a("common.change"):a("common.upload")})]}),t.jsx(w.Suspense,{fallback:t.jsx(We,{}),children:t.jsx(Ol,{ref:f,locale:c,popup:!0,onUploadFinish:x=>{var p;s({uploadedResource:x.data.filename}),i({blockletResource:""}),(p=f.current)==null||p.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:El,maxFileSize:Ml,maxNumberOfFiles:1}}},"uploader-resource")}),!!l&&t.jsx(u,{color:"error.main",mt:1,fontSize:14,children:l})]})}co.propTypes={app:d.object.isRequired,projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,error:d.string.isRequired,setParamsErrTip:d.func.isRequired};co.defaultProps={};function ot({readOnly:e,params:o,setParams:n,paramsErrTip:r,setParamsErrTip:s,loading:i}){var a;const{t:l}=Q();return t.jsx(u,{display:"flex",mt:3,className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{required:!0,disabled:i||e,label:`Blocklet ${l("common.version")}`,placeholder:`Blocklet ${l("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:o.blockletVersion||"",onChange:c=>{s({blockletVersion:""}),n({blockletVersion:c.target.value})},error:!!r.blockletVersion,helperText:r.blockletVersion||""}),t.jsx(Y,{label:l("blocklet.publish.releaseNote"),autoComplete:"off",disabled:i||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:t.jsxs(Ve,{position:"end",children:[((a=o==null?void 0:o.note)==null?void 0:a.length)||0," / ",re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:o.note||"",onChange:c=>{s({note:""}),n({note:c.target.value.slice(0,re.PROJECT.MAX_NOTE_LENGTH)})},error:!!r.note,helperText:r.note||"",sx:{mt:3}})]})})}ot.propTypes={readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired};ot.defaultProps={};function Gn(e){for(const o in e)typeof e[o]=="string"?e[o]=e[o].replace(/\\\\/g,"\\"):typeof e[o]=="object"&&e[o]!==null&&Gn(e[o]);return e}function nt({index:e,item:o,dockerParams:n,setDockerParams:r,dataKey:s,t:i,readOnly:l}){const a=(o==null?void 0:o.value)||"",[c,f]=w.useState(!1),h=()=>{var q;(q=n[s])==null||q.splice(e,1),r({...n,[s]:[...n[s]]})},k=(q,E)=>{var m;(m=n[s])!=null&&m[e]&&(E?(n[s][e].custom=n[s][e].value,n[s][e].value=`$${pt(o.key)}`):(n[s][e].value=n[s][e].custom||"",n[s][e].custom="")),r({...n,[s]:[...n[s]]})},x=(q,E)=>{var y;const m=((y=n[s][e])==null?void 0:y.value)||"";n[s][e]={...n[s][e],secure:E,value:E&&m===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":m},r({...n,[s]:[...n[s]]})},p=(q,E)=>{n[s][e]={...n[s][e],shared:E},r({...n,[s]:[...n[s]]})},j=(q,E)=>{var y;const m=((y=n[s][e])==null?void 0:y.value)||"";n[s][e]={...n[s][e],required:E,value:E&&m===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":m},r({...n,[s]:[...n[s]]})},v=(q,E)=>{n[s][e]={...n[s][e],value:E?re.BLOCKLET_AUTOMATIC_ENV_VALUE:"",secure:!1,required:!1},r({...n,[s]:[...n[s]]})},I=q=>{n[s][e]={...n[s][e],description:q.target.value},r({...n,[s]:[...n[s]]})},g=q=>{const E=q.target.value==="web"?"web":"docker";E==="web"&&n.dockerArgs.forEach(L=>{L.type="docker"});const y=`/${n.dockerImage.replace(/\W/g,"-")}-${e}`;n.dockerArgs[e]={...n.dockerArgs[e],type:E,path:E==="docker"?y:"/",protocol:"http",prefix:E==="docker"?y:"/",name:"publicUrl",port:"BLOCKLET_PORT"},r({...n,dockerArgs:[...n.dockerArgs]})},b=q=>{const E=q.target.value;n[s][e]={...n[s][e],prefix:E,path:E==="*"?"/":E},r({...n,[s]:[...n[s]]})},C=q=>{var E;(E=n[s])!=null&&E[e]&&(n[s][e].value=q.target.value),r({...n,[s]:[...n[s]]})},_=a===`$${pt(o.key)}`||o.custom,T=s==="dockerArgs"&&!cn[o.key],D=$s[o.key],$=s==="dockerEnvs",R=o.key==="--publish";let A=o.key;return R&&o.type==="web"?A="--publish (Web)":$&&(A=`--env ${o.key}`),t.jsxs(u,{sx:{display:"flex",flexDirection:"row",gap:2,alignItems:"center"},children:[t.jsx(u,{sx:{width:250},children:t.jsx(O,{sx:{textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:A})}),t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,flex:1},children:[t.jsx(Y,{disabled:l||_||T||o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,placeholder:"",value:_?`$${pt(o.key)}`:a,sx:{flex:1},InputProps:{endAdornment:t.jsxs(Ve,{position:"end",sx:{zoom:.9},children:[(!(D||T)||$||R)&&t.jsx(oe,{onClick:()=>f(!0),children:t.jsx(ne,{icon:"icon-park-outline:setting-config"})}),!l&&t.jsx(oe,{onClick:h,color:T?"error":"default",children:t.jsx(ne,{icon:"ic:round-delete"})})]})},error:T,onChange:C}),T&&t.jsx(O,{variant:"caption",color:"error",children:i("blocklet.publish.docker.noAllowTheArg")}),o.key==="--publish"&&t.jsx(O,{variant:"caption",color:"text.secondary",children:i("blocklet.publish.docker.publishTips")}),o.key==="--volume"&&Ns[o.key](a)&&t.jsx(O,{variant:"caption",color:"error",children:i("blocklet.publish.docker.volumeTips")})]}),c&&t.jsx(Tt,{open:!0,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:0}},title:i($?"blocklet.publish.docker.modifyEnv":"blocklet.publish.docker.modifyParam"),onClose:()=>f(!1),children:t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,paddingBottom:2},children:[D||T||$?null:t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.needCustomInput")}),t.jsx(ye,{disabled:l,checked:_,onChange:k,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.shared")}),t.jsx(ye,{disabled:l,checked:o.shared,onChange:p,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.required")}),t.jsx(ye,{disabled:l,checked:o.required,onChange:j,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.secure")}),t.jsx(ye,{disabled:l,checked:o.secure,onChange:x,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{children:i("blocklet.publish.docker.autoGenerated")}),t.jsx(ye,{disabled:l,checked:o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,onChange:v,sx:{zoom:.9}})]}),$&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.description")}),t.jsx(Y,{disabled:l,value:o.description,onChange:I,sx:{flex:1},label:i("blocklet.publish.docker.description")})]}),R&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.portType")}),t.jsxs(Ko,{value:o.type||"docker",onChange:g,children:[t.jsx(ue,{value:"docker",children:"Docker"}),t.jsx(ue,{value:"web",children:"Web"})]})]}),R&&o.type==="web"&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(O,{sx:{flex:1},children:i("blocklet.publish.docker.prefix")}),t.jsx(Y,{disabled:l,value:o.prefix,onChange:b,sx:{flex:1},label:i("blocklet.publish.docker.prefix")})]})]})})]})}nt.propTypes={dockerParams:d.object.isRequired,setDockerParams:d.func.isRequired,dataKey:d.string.isRequired,item:d.object.isRequired,t:d.func.isRequired,readOnly:d.bool.isRequired,index:d.number.isRequired};nt.defaultProps={};const zl=`
181
181
  docker run --name postgrest
182
182
  -p 3000:3000
183
183
  -e PGRST_DB_URI="postgres://username:password@host:port/database"
@@ -1,4 +1,4 @@
1
- import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-BWT1QT-d.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b3 as ft,b4 as pi,b5 as mi,b6 as hn,b7 as hi,b8 as gi,b9 as yi,ba as gn,bb as bi,bc as cr,bd as vi,be as xi,bf as wi,bg as ji,o as lr,bh as yn,m as Ei,n as Si,e as _e,D as bn,E as Pi,a8 as Ge,a3 as je,av as Ci,_ as Oi,ag as Ai,a2 as dt,j as Ke,a1 as Ii,bi as vn,b as Ye,aw as xn,bj as Ri,aE as Ni,ao as Ti,aI as _i,aW as wn,ab as Di,aX as jn,a0 as Ui,bk as En,bl as qi,bm as ki}from"./vendor-arcblock-BCYov1AG.js";import{d as St}from"./Add-udgpbcQ-.js";import{d as Li}from"./Loop-Cxat_C59.js";import{d as Bi}from"./ViewList-B-1WiukK.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-uzHBSbhH.js";import{a0 as $i,f as Mi,z as Ce,ar as ur,m as Qe,a1 as Wi,O as Xe,as as zi,h as Ze,C as Pn,at as Cn,b as Vi}from"./index-QGwREoo6.js";import{y as Hi,u as fr,a as On,l as Gi}from"./vendor-hooks-ZnvK17j8.js";import{u as De,d as qr,W as An}from"./dashboard-DJwyQ0IN.js";import{W as Pt}from"./did-address-DsaXravU.js";import{P as Be}from"./permission-BY2FbqNx.js";import{C as Rt}from"./click-to-copy-SPoXGjhb.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-CEZQNMFX.js";import{I as Pe}from"./index-C2h3b3qO.js";import{d as Zi}from"./DeleteOutline-B2EIRfvm.js";import{C as pt}from"./confirm-BckBMOcL.js";import{u as mt}from"./session-CXP_o5z6.js";import{i as In,a as Ct,p as Rn}from"./util-DB9FK0S1.js";import{b as Qi}from"./sdk-CdIjci-y.js";import{p as Xi}from"./index-DkbuxwZE.js";import{A as Ji}from"./actions-DHK1GfXI.js";import{S as eo}from"./shorten-label-CRTt8ftG.js";import"./useLocalStorage-grucDLLp.js";import"./PlayArrow-CbK5B-2U.js";import"./get-safe-url-B9KuIPHY.js";import"./index-B_f-vCCz.js";import"./useAsyncRetry-Dgdo-UIp.js";import"./InfoOutlined-BoujVod4.js";import"./useSetState-Crt4S51m.js";import"./base32-Bg7zWLHM.js";import"./MoreHoriz-DVyDe-n2.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
1
+ import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-BWT1QT-d.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b3 as ft,b4 as pi,b5 as mi,b6 as hn,b7 as hi,b8 as gi,b9 as yi,ba as gn,bb as bi,bc as cr,bd as vi,be as xi,bf as wi,bg as ji,o as lr,bh as yn,m as Ei,n as Si,e as _e,D as bn,E as Pi,a8 as Ge,a3 as je,av as Ci,_ as Oi,ag as Ai,a2 as dt,j as Ke,a1 as Ii,bi as vn,b as Ye,aw as xn,bj as Ri,aE as Ni,ao as Ti,aI as _i,aW as wn,ab as Di,aX as jn,a0 as Ui,bk as En,bl as qi,bm as ki}from"./vendor-arcblock-MU05F41R.js";import{d as St}from"./Add-D5aJYF-w.js";import{d as Li}from"./Loop-BQEttF_G.js";import{d as Bi}from"./ViewList-BXtBGGyL.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-Cb6_-8qZ.js";import{a0 as $i,f as Mi,z as Ce,ar as ur,m as Qe,a1 as Wi,O as Xe,as as zi,h as Ze,C as Pn,at as Cn,b as Vi}from"./index-b2WEDrup.js";import{y as Hi,u as fr,a as On,l as Gi}from"./vendor-hooks-ZnvK17j8.js";import{u as De,d as qr,W as An}from"./dashboard-kggzA59O.js";import{W as Pt}from"./did-address-C1Gnyot5.js";import{P as Be}from"./permission-BOXdugm0.js";import{C as Rt}from"./click-to-copy-D4eMUY2Y.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-CEZQNMFX.js";import{I as Pe}from"./index-B0KY0nDh.js";import{d as Zi}from"./DeleteOutline-CRGsqlBB.js";import{C as pt}from"./confirm-B3CehVfh.js";import{u as mt}from"./session-Cbe0QivC.js";import{i as In,a as Ct,p as Rn}from"./util-OT81aO9n.js";import{b as Qi}from"./sdk-CzVXemwI.js";import{p as Xi}from"./index-DA8zLg5u.js";import{A as Ji}from"./actions-1ozfktYK.js";import{S as eo}from"./shorten-label-CRTt8ftG.js";import"./useLocalStorage-C6K1MfKS.js";import"./PlayArrow-DisvYm5k.js";import"./get-safe-url-uAWmJaE7.js";import"./index-BqmuG2xd.js";import"./useAsyncRetry-Dgdo-UIp.js";import"./InfoOutlined-DXbe7-Vo.js";import"./useSetState-Crt4S51m.js";import"./base32-Gx8S-X9Y.js";import"./MoreHoriz-B7JSMM__.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
2
2
  `),q=de(A).split(`
3
3
  `),$=0,ne="";if(K==="strictEqual"&&o(O)==="object"&&o(A)==="object"&&O!==null&&A!==null&&(K="strictEqualObject"),N.length===1&&q.length===1&&N[0]!==q[0]){var ue=N[0].length+q[0].length;if(ue<=be){if((o(O)!=="object"||O===null)&&(o(A)!=="object"||A===null)&&(O!==0||A!==0))return"".concat(z[K],`
4
4