@abtnode/blocklet-services 1.16.45-beta-20250609-025419-7fd1f86c → 1.16.45-beta-20250609-082716-b6b0592b

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 (34) hide show
  1. package/dist/assets/add-component-core-CsW-bf6w.js +1 -1
  2. package/dist/assets/add-resource-D1GK1xW7.js +1 -1
  3. package/dist/assets/advanced-BSxn1YDX.js +1 -1
  4. package/dist/assets/audit-logs-XAopC8XN.js +1 -1
  5. package/dist/assets/complete-C6_ojDUa.js +1 -1
  6. package/dist/assets/component-OYgpJSh4.js +1 -1
  7. package/dist/assets/config-navigation-VPQM3i1K.js +1 -1
  8. package/dist/assets/connect-CQ-AWW94.js +1 -1
  9. package/dist/assets/dashboard-B7qE-Md0.js +2 -2
  10. package/dist/assets/email-DDPCqu4Z.js +1 -1
  11. package/dist/assets/exchange-passport-xdsOlfWE.js +1 -1
  12. package/dist/assets/index-BDw54V1q.js +1 -1
  13. package/dist/assets/index-BY-e9TG4.js +1 -1
  14. package/dist/assets/index-CCrgDhTM.js +1 -1
  15. package/dist/assets/index-DQjZ74P0.js +1 -1
  16. package/dist/assets/index-DVLOAsDQ.js +1 -1
  17. package/dist/assets/index-DWZfwLDs.js +1 -1
  18. package/dist/assets/index-Drni9chH.js +1 -1
  19. package/dist/assets/index-Hs7lhrID.js +1 -1
  20. package/dist/assets/index-NE1bWD-Q.js +1 -1
  21. package/dist/assets/invite-CZ68j_lY.js +1 -1
  22. package/dist/assets/issue-passport-IkLenFGe.js +1 -1
  23. package/dist/assets/item-RUDvbSOI.js +1 -1
  24. package/dist/assets/list-DjvUHEwY.js +1 -1
  25. package/dist/assets/login-BF0iOJJn.js +1 -1
  26. package/dist/assets/lost-passport-CaF7MO2m.js +1 -1
  27. package/dist/assets/open-window-Dn44K3ur.js +1 -1
  28. package/dist/assets/overview-DwmambxV.js +1 -1
  29. package/dist/assets/publish-resource-Bk548CMo.js +1 -1
  30. package/dist/assets/runtime-xdMFSsvP.js +1 -1
  31. package/dist/assets/security-DCYPNDg3.js +1 -1
  32. package/dist/assets/setup-CQ7O7nI0.js +2 -2
  33. package/dist/assets/start-t5ebRJzD.js +1 -1
  34. package/package.json +22 -22
@@ -1,4 +1,4 @@
1
- import{a9 as Il,j as o,H as N,ab as xt,ah as Ve,aa as Y,T as ge,v as qt,bt as wi,bS as Ei,I as js,bK as ks,bZ as Os,A as Is,bf as Rl,b9 as Rs,br as Cl,O as Sr,bF as Pl,bG as Ll,bH as _l,by as Nl,ak as Cs,L as Al,b8 as Dl,b6 as Ml,q as Si,ad as Ps,af as Fl,al as rt,e as Kt,bL as Bl,y as ir,Z as Ls,a1 as _s,M as Ns,bU as As,an as $l,ai as zt,as as To,E as jo,a7 as Ul,P as Wl,G as zl,w as ql,a8 as Gl,D as Kl,N as ko}from"./vendor-mui-core-wlbruq2I.js";import{r as F,g as Ti,h as Hl,f as Vl,a as ji,e as Se,b as Mt,l as Xl}from"./vendor-react-DEoibe3W.js";import{j as Ds,d as Yl,S as Ql,s as Ms,A as Jl}from"./item-RUDvbSOI.js";import{r as Zl,B as dt,ar as ki,a1 as Fs,k as Bs,a as gt,I as pt,aR as ec,aI as tc,i as Tr,bd as nc,at as $s,bA as Oo,aw as rc,a3 as Oi,F as ic,s as Ht,a2 as br,aD as Io,ao as Us,bB as mr,d as Ii,bh as Ws,E as zs,a5 as oc,bC as sc,b as ii,bD as ac}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as Ro,c as kt,n as lc,E as jr,q as cc,s as uc,t as dc,L as hc,S as fc}from"./vendor-arcblock-B4hgrXYM.js";import{L as Co}from"./launch-result-message-DNgJY11G.js";import{P as qs}from"./page-header-JH9JWGMg.js";import{e as ut,v as pc,B as mc,E as Po,A as Jn,a1 as Gs,a9 as gc,ai as vc,J as yc,o as Dr,z as Ri,$ as bc,aj as xc,ak as wc,al as Ec,b as Hn,am as Sc,c as Tc}from"./vendor-utils-B3iZkn2R.js";import{f as Ks}from"./index-8eXqqyHQ.js";import{D as Ln,f as Dt,a0 as jc,a1 as kc,a2 as Oc,H as Ic,a3 as Rc,a4 as Cc,a5 as Pc,G as kr,a6 as Hs,_ as Lc,a7 as _c,a8 as Nc,a9 as Ac,aa as lr,ab as Lo,ac as Dc}from"./index-DQjZ74P0.js";import{u as Mc,C as Fc}from"./config-space-CBoUabjP.js";import{R as Mr}from"./logo-uploader-BecsVnr8.js";import{S as Bc}from"./index-BBuUqC0B.js";import{s as Vs,h as $c,w as Uc,f as Wc,a as zc,b as qc,c as Gc,M as Kc}from"./index-BXjOxZPH.js";import{l as or,b as Hc,a as Vc,f as Xs,t as Xc}from"./vendor-hooks-BCm626KH.js";import{g as Yc}from"./get-safe-url-BWDUV79Q.js";import{p as Qc}from"./index-BpvW-cUy.js";import{r as Jc}from"./cloneDeep-ro06l5HL.js";import{I as _o}from"./index-BnR8uU0R.js";import{u as Zc}from"./session-1k8BRnYA.js";import{W as eu}from"./did-address-bJAfhuZx.js";import{_ as Ys}from"./useLocalStorage-BF3BqN1O.js";import{a as No}from"./api-CQoRx33p.js";import{d as tu,a as nu,v as ru,e as iu}from"./util-BBMAZSVn.js";import{u as Qs}from"./use-mobile-CiFFAdJf.js";import{C as ou}from"./content-layout-DuPlKBe3.js";import{C as su,D as au,a as lu}from"./connect-to-kM9lCXLX.js";import{d as cu}from"./ArrowDropDown-Ce8TY3aP.js";import{d as uu}from"./ChevronLeft-02OWcWpH.js";import{d as du}from"./ChevronRight-CB8w0u2n.js";const ag="blocklet-add-component-registry",lg="server-add-registry",cg=e=>`resource-${e}-add-registry`;var Ci={},hu=Il;Object.defineProperty(Ci,"__esModule",{value:!0});var Js=Ci.default=void 0,fu=hu(Zl()),pu=o;Js=Ci.default=(0,fu.default)((0,pu.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Zs(e){const{info:t}=Ln();return F.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Pi({disabled:e,children:t,onConfirm:n}){return F.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Pi.propTypes={disabled:N.bool,children:N.any.isRequired,onConfirm:N.func.isRequired};Pi.defaultProps={disabled:!1};function Li({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=F.useState(!1),c=()=>a(p=>!p);return o.jsxs(o.Fragment,{children:[o.jsx(mu,{children:o.jsxs(Pi,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(xt,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(ki,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}Li.propTypes={onContinue:N.func.isRequired,nextDisabled:N.bool,launching:N.bool,description:N.any,texts:N.object};Li.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mu=Ve.div`
1
+ import{a9 as Il,j as o,H as N,ab as xt,ah as Ve,aa as Y,T as ge,v as qt,bt as wi,bS as Ei,I as js,bK as ks,bZ as Os,A as Is,bf as Rl,b9 as Rs,br as Cl,O as Sr,bF as Pl,bG as Ll,bH as _l,by as Nl,ak as Cs,L as Al,b8 as Dl,b6 as Ml,q as Si,ad as Ps,af as Fl,al as rt,e as Kt,bL as Bl,y as ir,Z as Ls,a1 as _s,M as Ns,bU as As,an as $l,ai as zt,as as To,E as jo,a7 as Ul,P as Wl,G as zl,w as ql,a8 as Gl,D as Kl,N as ko}from"./vendor-mui-core-wlbruq2I.js";import{r as F,g as Ti,h as Hl,f as Vl,a as ji,e as Se,b as Mt,l as Xl}from"./vendor-react-DEoibe3W.js";import{j as Ds,d as Yl,S as Ql,s as Ms,A as Jl}from"./item-RUDvbSOI.js";import{r as Zl,B as dt,ar as ki,a1 as Fs,k as Bs,a as gt,I as pt,aR as ec,aI as tc,i as Tr,bd as nc,at as $s,bA as Oo,aw as rc,a3 as Oi,F as ic,s as Ht,a2 as br,aD as Io,ao as Us,bB as mr,d as Ii,bh as Ws,E as zs,a5 as oc,bC as sc,b as ii,bD as ac}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as Ro,c as kt,n as lc,E as jr,q as cc,s as uc,t as dc,L as hc,S as fc}from"./vendor-arcblock-B4hgrXYM.js";import{L as Co}from"./launch-result-message-DNgJY11G.js";import{P as qs}from"./page-header-JH9JWGMg.js";import{e as ut,v as pc,B as mc,E as Po,A as Jn,a1 as Gs,a9 as gc,ai as vc,J as yc,o as Dr,z as Ri,$ as bc,aj as xc,ak as wc,al as Ec,b as Hn,am as Sc,c as Tc}from"./vendor-utils-B3iZkn2R.js";import{f as Ks}from"./index-8eXqqyHQ.js";import{D as Ln,f as Dt,a0 as jc,a1 as kc,a2 as Oc,H as Ic,a3 as Rc,a4 as Cc,a5 as Pc,G as kr,a6 as Hs,_ as Lc,a7 as _c,a8 as Nc,a9 as Ac,aa as lr,ab as Lo,ac as Dc}from"./index-DQjZ74P0.js";import{u as Mc,C as Fc}from"./config-space-CBoUabjP.js";import{R as Mr}from"./logo-uploader-BecsVnr8.js";import{S as Bc}from"./index-BBuUqC0B.js";import{s as Vs,h as $c,w as Uc,f as Wc,a as zc,b as qc,c as Gc,M as Kc}from"./index-BXjOxZPH.js";import{l as or,b as Hc,a as Vc,f as Xs,t as Xc}from"./vendor-hooks-BCm626KH.js";import{g as Yc}from"./get-safe-url-CwT4-jkw.js";import{p as Qc}from"./index-BpvW-cUy.js";import{r as Jc}from"./cloneDeep-ro06l5HL.js";import{I as _o}from"./index-BnR8uU0R.js";import{u as Zc}from"./session-1k8BRnYA.js";import{W as eu}from"./did-address-bJAfhuZx.js";import{_ as Ys}from"./useLocalStorage-BF3BqN1O.js";import{a as No}from"./api-CQoRx33p.js";import{d as tu,a as nu,v as ru,e as iu}from"./util-BBMAZSVn.js";import{u as Qs}from"./use-mobile-CiFFAdJf.js";import{C as ou}from"./content-layout-DuPlKBe3.js";import{C as su,D as au,a as lu}from"./connect-to-kM9lCXLX.js";import{d as cu}from"./ArrowDropDown-Ce8TY3aP.js";import{d as uu}from"./ChevronLeft-02OWcWpH.js";import{d as du}from"./ChevronRight-CB8w0u2n.js";const ag="blocklet-add-component-registry",lg="server-add-registry",cg=e=>`resource-${e}-add-registry`;var Ci={},hu=Il;Object.defineProperty(Ci,"__esModule",{value:!0});var Js=Ci.default=void 0,fu=hu(Zl()),pu=o;Js=Ci.default=(0,fu.default)((0,pu.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Zs(e){const{info:t}=Ln();return F.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Pi({disabled:e,children:t,onConfirm:n}){return F.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Pi.propTypes={disabled:N.bool,children:N.any.isRequired,onConfirm:N.func.isRequired};Pi.defaultProps={disabled:!1};function Li({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=F.useState(!1),c=()=>a(p=>!p);return o.jsxs(o.Fragment,{children:[o.jsx(mu,{children:o.jsxs(Pi,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(xt,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(ki,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}Li.propTypes={onContinue:N.func.isRequired,nextDisabled:N.bool,launching:N.bool,description:N.any,texts:N.object};Li.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mu=Ve.div`
2
2
  margin: 0 auto;
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1 +1 @@
1
- import{v as B,j as h}from"./vendor-mui-core-wlbruq2I.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-B3iZkn2R.js";import{a as O,ar as T}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as w,u as _,s as F}from"./vendor-hooks-BCm626KH.js";import{A as K,S as $}from"./add-component-core-CsW-bf6w.js";import{k as z,U as G}from"./index-DQjZ74P0.js";import"./lottie-web-jYmAQWuC.js";import"./item-RUDvbSOI.js";import"./vendor-arcblock-B4hgrXYM.js";import"./index-8eXqqyHQ.js";import"./Launch-BwVeOcBz.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./delete-confirm-Dow_C0jR.js";import"./click-to-copy-BUVqg1RQ.js";import"./confirm-BjCmRSAF.js";import"./session-1k8BRnYA.js";import"./get-safe-url-BWDUV79Q.js";import"./did-address-bJAfhuZx.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./index-BpvW-cUy.js";import"./index-BnR8uU0R.js";import"./useLocalStorage-BF3BqN1O.js";import"./util-BBMAZSVn.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./ArrowDropDown-Ce8TY3aP.js";import"./ChevronLeft-02OWcWpH.js";import"./ChevronRight-CB8w0u2n.js";function Be(){var u;const{t:f}=O(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",p=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",E=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",y=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await A.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:E,enableRunBackground:y,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Be as default};
1
+ import{v as B,j as h}from"./vendor-mui-core-wlbruq2I.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-B3iZkn2R.js";import{a as O,ar as T}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as w,u as _,s as F}from"./vendor-hooks-BCm626KH.js";import{A as K,S as $}from"./add-component-core-CsW-bf6w.js";import{k as z,U as G}from"./index-DQjZ74P0.js";import"./lottie-web-jYmAQWuC.js";import"./item-RUDvbSOI.js";import"./vendor-arcblock-B4hgrXYM.js";import"./index-8eXqqyHQ.js";import"./Launch-BwVeOcBz.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./delete-confirm-Dow_C0jR.js";import"./click-to-copy-BUVqg1RQ.js";import"./confirm-BjCmRSAF.js";import"./session-1k8BRnYA.js";import"./get-safe-url-CwT4-jkw.js";import"./did-address-bJAfhuZx.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./index-BpvW-cUy.js";import"./index-BnR8uU0R.js";import"./useLocalStorage-BF3BqN1O.js";import"./util-BBMAZSVn.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./ArrowDropDown-Ce8TY3aP.js";import"./ChevronLeft-02OWcWpH.js";import"./ChevronRight-CB8w0u2n.js";function Be(){var u;const{t:f}=O(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",p=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",E=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",y=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await A.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:E,enableRunBackground:y,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Be as default};
@@ -1,4 +1,4 @@
1
- import{r as Ee,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as bt,j as q,ab as Ze,H as Oe,aa as U,y as hr,T as Be,ah as _t,bt as dr,bS as mr,by as pr,ak as gr,E as yr,al as wt,O as vr,N as br,bu as We,X as Le,ad as _r}from"./vendor-mui-core-wlbruq2I.js";import{D as Je,G as wr,f as xr,aM as Mr,n as $r,aE as kr,z as Qt,W as tr,V as rr}from"./index-DQjZ74P0.js";import{P as jr,w as He}from"./permission-B7ZHEOJv.js";import{r as xt,a as Ve,B as qe,a3 as Te,at as sr,f as Sr,ar as nr,c2 as Rr,aR as Ar,i as De,k as Or,a1 as Xt,bb as Er}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ir}from"./vendor-hooks-BCm626KH.js";import{c as Ne}from"./vendor-arcblock-B4hgrXYM.js";import{d as Cr}from"./InfoOutlined-CLiL5VeK.js";import{C as Mt}from"./confirm-BjCmRSAF.js";import{f as Ue}from"./index-8eXqqyHQ.js";import{_ as Dr}from"./useSetState-CWq0AVWn.js";import{u as ar}from"./session-1k8BRnYA.js";import{S as Ie}from"./section-Bb547IGJ.js";import{C as Ir}from"./click-to-copy-BUVqg1RQ.js";import{u as or}from"./dashboard-B7qE-Md0.js";import{r as Tr,aL as Lr}from"./vendor-utils-B3iZkn2R.js";import{I as qr}from"./index-BnR8uU0R.js";import{W as Nr}from"./did-address-bJAfhuZx.js";import{V as Pr}from"./status-C4-MBX3k.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-BWDUV79Q.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";var $t={},zr=bt;Object.defineProperty($t,"__esModule",{value:!0});var lr=$t.default=void 0,Fr=zr(xt()),Br=q;lr=$t.default=(0,Fr.default)((0,Br.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var kt={},Jr=bt;Object.defineProperty(kt,"__esModule",{value:!0});var jt=kt.default=void 0,Ur=Jr(xt()),er=q;jt=kt.default=(0,Ur.default)([(0,er.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,er.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const Vr=localStorage.getItem("enableDebug")==="true";function Wr({teamDid:I,size:P="small",...B}){const{t:T}=Ve(),{api:L}=Je(),[p,_]=Ee.useState(!1),[l,x]=Ee.useState(null),b=()=>{_(!1),x(null)},m=async()=>{var a;try{_(!0);const i=await L.clearCache({input:{teamDid:I}});Te.success(T("blocklet.config.clearCache.success",{count:((a=i.removed)==null?void 0:a.length)||0}))}catch(i){Te.error(Ue(i))}finally{_(!1),x(null)}},e={title:T("blocklet.config.clearCache.title"),description:T("blocklet.config.clearCache.description"),confirm:T("common.confirm"),cancel:T("common.cancel"),onConfirm:m,onCancel:b};return q.jsxs("div",{...B,children:[q.jsxs(qe,{onClick:()=>x(e),color:"error",variant:"outlined",size:P,children:[p?q.jsx(Ze,{size:16,style:{marginRight:5}}):null,T("blocklet.config.clearCache.action")]}),l&&q.jsx(Mt,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}var St={},Kr=bt;Object.defineProperty(St,"__esModule",{value:!0});var cr=St.default=void 0,Zr=Kr(xt()),Hr=q;cr=St.default=(0,Zr.default)((0,Hr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function Rt({onChange:I,disabled:P,loading:B,inService:T}){const{t:L}=Ve(),{api:p,session:_}=ar(),{blocklet:l}=wr(),[x,b]=Dr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),m=()=>b({isConnectOpen:!1}),e=()=>{if(xr.isInProgress(l.status)){Te.error(L("blocklet.error.isInProgress"));return}b({confirmDialogOpen:!0})};return q.jsxs(q.Fragment,{children:[q.jsx(Ie,{title:L("blocklet.config.migrate.button"),desc:L("blocklet.config.migrate.description"),children:q.jsx(U,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:q.jsxs(hr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:P||B,onClick:e,children:[q.jsx(cr,{style:{fontSize:"1.3em",marginRight:4}}),L("blocklet.config.migrate.button")]})})}),q.jsxs(q.Fragment,{children:[x.isConnectOpen&&q.jsx(sr,{popup:!0,open:x.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:p.get,checkTimeout:5*60*1e3,onSuccess:()=>{I(),T&&_.logout(),m()},extraParams:{appDid:l.appDid},messages:{title:L("setup.keyPair.title"),scan:L("setup.keyPair.scan"),confirm:L("setup.keyPair.confirm"),success:L("setup.keyPair.success")},onClose:m}),x.confirmDialogOpen&&q.jsx(Mt,{title:q.jsx(Be,{sx:{fontSize:"20px",fontWeight:"500"},children:L("blocklet.config.migrate.title")}),description:q.jsx(Be,{sx:{fontSize:"14px",color:"#9397A1"},children:L("blocklet.config.migrate.confirm")}),confirm:L("common.confirm"),cancel:L("common.cancel"),onConfirm:()=>b({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>b({confirmDialogOpen:!1})})]})]})}Rt.propTypes={onChange:Oe.func,disabled:Oe.bool,loading:Oe.bool,inService:Oe.bool};Rt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function At({onCancel:I,onSuccess:P,onError:B}){const{api:T}=Ee.useContext(Sr),[L,p]=Ee.useState(!1),{t:_,locale:l}=Ve(),[x,b]=Ee.useState(""),[m,e]=Ee.useState(!1),[a,i]=Ee.useState(0),[r,t]=Ee.useState(""),{endpoint:c}=or(),[s,o]=Ee.useState(!1),h=f=>{b(null),p(!0);try{t(f.result),i(R.length-1)}catch(y){const M=Ue(y);b(M),B(y)}finally{p(!1)}},g=()=>{e(!0),i(1)},w=()=>{e(!1),i(0)},R=[{body:q.jsxs(U,{children:[q.jsx(Be,{children:_("team.transferApp.transferDialog.tips.progress")}),q.jsx(Be,{mt:3,mb:2,children:_("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),onCancel:I,onConfirm:g},{cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),body:()=>q.jsx(sr,{action:"transfer-app-owner",open:m,locale:l,checkFn:T.get,onClose:w,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:_("team.transferApp.connectDialog.title"),scan:_("team.transferApp.connectDialog.scan"),confirm:_("team.transferApp.connectDialog.confirm"),success:_("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const f=Mr({transferId:r.transferId,endpoint:c});return q.jsxs(q.Fragment,{children:[q.jsx(U,{component:Fe,dangerouslySetInnerHTML:{__html:_("team.transferApp.transferDialog.createSuccessTip1")}}),q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip3")})}),q.jsxs(U,{children:[q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip2",{expireDate:$r(r.expireDate,l)})})}),q.jsx(U,{my:1,children:q.jsx(Ir,{children:f})})]}),q.jsx("div",{children:q.jsx(dr,{value:"end",control:q.jsx(mr,{checked:s,onChange:y=>o(y.target.checked)}),label:_("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:_("common.confirm"),onConfirm:P}],j=R[a];return q.jsxs(nr,{title:q.jsx(Fe,{className:"title",children:_("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:q.jsxs(q.Fragment,{children:[j.cancel&&q.jsx(qe,{onClick:j.onCancel,color:"inherit",children:j.cancel}),q.jsxs(qe,{onClick:j.onConfirm,color:"error",disabled:L||a===R.length-1&&!s,variant:"contained",autoFocus:!0,children:[L&&q.jsx(Ze,{size:16}),j.confirm]})]}),children:[q.jsx(pr,{component:"div",children:typeof j.body=="function"?j.body():j.body}),!!x&&q.jsx(gr,{severity:"error",variant:"icon",children:x})]})}At.propTypes={onCancel:Oe.func.isRequired,onSuccess:Oe.func.isRequired,onError:Oe.func};At.defaultProps={onError:()=>{}};const Fe=_t.div`
1
+ import{r as Ee,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as bt,j as q,ab as Ze,H as Oe,aa as U,y as hr,T as Be,ah as _t,bt as dr,bS as mr,by as pr,ak as gr,E as yr,al as wt,O as vr,N as br,bu as We,X as Le,ad as _r}from"./vendor-mui-core-wlbruq2I.js";import{D as Je,G as wr,f as xr,aM as Mr,n as $r,aE as kr,z as Qt,W as tr,V as rr}from"./index-DQjZ74P0.js";import{P as jr,w as He}from"./permission-B7ZHEOJv.js";import{r as xt,a as Ve,B as qe,a3 as Te,at as sr,f as Sr,ar as nr,c2 as Rr,aR as Ar,i as De,k as Or,a1 as Xt,bb as Er}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ir}from"./vendor-hooks-BCm626KH.js";import{c as Ne}from"./vendor-arcblock-B4hgrXYM.js";import{d as Cr}from"./InfoOutlined-CLiL5VeK.js";import{C as Mt}from"./confirm-BjCmRSAF.js";import{f as Ue}from"./index-8eXqqyHQ.js";import{_ as Dr}from"./useSetState-CWq0AVWn.js";import{u as ar}from"./session-1k8BRnYA.js";import{S as Ie}from"./section-Bb547IGJ.js";import{C as Ir}from"./click-to-copy-BUVqg1RQ.js";import{u as or}from"./dashboard-B7qE-Md0.js";import{r as Tr,aL as Lr}from"./vendor-utils-B3iZkn2R.js";import{I as qr}from"./index-BnR8uU0R.js";import{W as Nr}from"./did-address-bJAfhuZx.js";import{V as Pr}from"./status-C4-MBX3k.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-CwT4-jkw.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";var $t={},zr=bt;Object.defineProperty($t,"__esModule",{value:!0});var lr=$t.default=void 0,Fr=zr(xt()),Br=q;lr=$t.default=(0,Fr.default)((0,Br.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var kt={},Jr=bt;Object.defineProperty(kt,"__esModule",{value:!0});var jt=kt.default=void 0,Ur=Jr(xt()),er=q;jt=kt.default=(0,Ur.default)([(0,er.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,er.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const Vr=localStorage.getItem("enableDebug")==="true";function Wr({teamDid:I,size:P="small",...B}){const{t:T}=Ve(),{api:L}=Je(),[p,_]=Ee.useState(!1),[l,x]=Ee.useState(null),b=()=>{_(!1),x(null)},m=async()=>{var a;try{_(!0);const i=await L.clearCache({input:{teamDid:I}});Te.success(T("blocklet.config.clearCache.success",{count:((a=i.removed)==null?void 0:a.length)||0}))}catch(i){Te.error(Ue(i))}finally{_(!1),x(null)}},e={title:T("blocklet.config.clearCache.title"),description:T("blocklet.config.clearCache.description"),confirm:T("common.confirm"),cancel:T("common.cancel"),onConfirm:m,onCancel:b};return q.jsxs("div",{...B,children:[q.jsxs(qe,{onClick:()=>x(e),color:"error",variant:"outlined",size:P,children:[p?q.jsx(Ze,{size:16,style:{marginRight:5}}):null,T("blocklet.config.clearCache.action")]}),l&&q.jsx(Mt,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}var St={},Kr=bt;Object.defineProperty(St,"__esModule",{value:!0});var cr=St.default=void 0,Zr=Kr(xt()),Hr=q;cr=St.default=(0,Zr.default)((0,Hr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function Rt({onChange:I,disabled:P,loading:B,inService:T}){const{t:L}=Ve(),{api:p,session:_}=ar(),{blocklet:l}=wr(),[x,b]=Dr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),m=()=>b({isConnectOpen:!1}),e=()=>{if(xr.isInProgress(l.status)){Te.error(L("blocklet.error.isInProgress"));return}b({confirmDialogOpen:!0})};return q.jsxs(q.Fragment,{children:[q.jsx(Ie,{title:L("blocklet.config.migrate.button"),desc:L("blocklet.config.migrate.description"),children:q.jsx(U,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:q.jsxs(hr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:P||B,onClick:e,children:[q.jsx(cr,{style:{fontSize:"1.3em",marginRight:4}}),L("blocklet.config.migrate.button")]})})}),q.jsxs(q.Fragment,{children:[x.isConnectOpen&&q.jsx(sr,{popup:!0,open:x.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:p.get,checkTimeout:5*60*1e3,onSuccess:()=>{I(),T&&_.logout(),m()},extraParams:{appDid:l.appDid},messages:{title:L("setup.keyPair.title"),scan:L("setup.keyPair.scan"),confirm:L("setup.keyPair.confirm"),success:L("setup.keyPair.success")},onClose:m}),x.confirmDialogOpen&&q.jsx(Mt,{title:q.jsx(Be,{sx:{fontSize:"20px",fontWeight:"500"},children:L("blocklet.config.migrate.title")}),description:q.jsx(Be,{sx:{fontSize:"14px",color:"#9397A1"},children:L("blocklet.config.migrate.confirm")}),confirm:L("common.confirm"),cancel:L("common.cancel"),onConfirm:()=>b({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>b({confirmDialogOpen:!1})})]})]})}Rt.propTypes={onChange:Oe.func,disabled:Oe.bool,loading:Oe.bool,inService:Oe.bool};Rt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function At({onCancel:I,onSuccess:P,onError:B}){const{api:T}=Ee.useContext(Sr),[L,p]=Ee.useState(!1),{t:_,locale:l}=Ve(),[x,b]=Ee.useState(""),[m,e]=Ee.useState(!1),[a,i]=Ee.useState(0),[r,t]=Ee.useState(""),{endpoint:c}=or(),[s,o]=Ee.useState(!1),h=f=>{b(null),p(!0);try{t(f.result),i(R.length-1)}catch(y){const M=Ue(y);b(M),B(y)}finally{p(!1)}},g=()=>{e(!0),i(1)},w=()=>{e(!1),i(0)},R=[{body:q.jsxs(U,{children:[q.jsx(Be,{children:_("team.transferApp.transferDialog.tips.progress")}),q.jsx(Be,{mt:3,mb:2,children:_("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),onCancel:I,onConfirm:g},{cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),body:()=>q.jsx(sr,{action:"transfer-app-owner",open:m,locale:l,checkFn:T.get,onClose:w,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:_("team.transferApp.connectDialog.title"),scan:_("team.transferApp.connectDialog.scan"),confirm:_("team.transferApp.connectDialog.confirm"),success:_("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const f=Mr({transferId:r.transferId,endpoint:c});return q.jsxs(q.Fragment,{children:[q.jsx(U,{component:Fe,dangerouslySetInnerHTML:{__html:_("team.transferApp.transferDialog.createSuccessTip1")}}),q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip3")})}),q.jsxs(U,{children:[q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip2",{expireDate:$r(r.expireDate,l)})})}),q.jsx(U,{my:1,children:q.jsx(Ir,{children:f})})]}),q.jsx("div",{children:q.jsx(dr,{value:"end",control:q.jsx(mr,{checked:s,onChange:y=>o(y.target.checked)}),label:_("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:_("common.confirm"),onConfirm:P}],j=R[a];return q.jsxs(nr,{title:q.jsx(Fe,{className:"title",children:_("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:q.jsxs(q.Fragment,{children:[j.cancel&&q.jsx(qe,{onClick:j.onCancel,color:"inherit",children:j.cancel}),q.jsxs(qe,{onClick:j.onConfirm,color:"error",disabled:L||a===R.length-1&&!s,variant:"contained",autoFocus:!0,children:[L&&q.jsx(Ze,{size:16}),j.confirm]})]}),children:[q.jsx(pr,{component:"div",children:typeof j.body=="function"?j.body():j.body}),!!x&&q.jsx(gr,{severity:"error",variant:"icon",children:x})]})}At.propTypes={onCancel:Oe.func.isRequired,onSuccess:Oe.func.isRequired,onError:Oe.func};At.defaultProps={onError:()=>{}};const Fe=_t.div`
2
2
  font-size: 16px;
3
3
  font-weight: bold;
4
4
  &.title {
@@ -1,4 +1,4 @@
1
- import{a3 as U,r as H,a as $,k as V,$ as F,bv as Z,bI as q,a5 as G}from"./vendor-ux-did-connect-CX7qG3_M.js";import{j as e,a9 as K,e as B,aa as u,aq as Q,T as j,ad as X,I as M,ab as J,bp as Y,bs as ee,bo as te,q as re,bQ as ae,ah as oe}from"./vendor-mui-core-wlbruq2I.js";import{p as se}from"./util-CS4PqVkK.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-BF3BqN1O.js";import{D}from"./index-DQjZ74P0.js";import{M as I}from"./index-BXjOxZPH.js";import{O as le}from"./vendor-arcblock-B4hgrXYM.js";import{d as ce}from"./InfoOutlined-CLiL5VeK.js";import{d as de,e as _}from"./vendor-utils-B3iZkn2R.js";import{S as T}from"./shorten-label-CTSJhlwO.js";import{r as O}from"./index-DWgnwzKO.js";import{u as ue}from"./dashboard-B7qE-Md0.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./base32-CmYq1ikq.js";import"./index-8eXqqyHQ.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-BWDUV79Q.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";const R=s.createContext({}),{Provider:pe,Consumer:Xe}=R;function me(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:l="",categories:r=[],showScope:n,scopeFormatter:p}){const{api:m,info:v}=D(),[L,C]=s.useState([]),[c,h]=s.useState({total:0,pageSize:me(),pageCount:0,page:1}),[f,d]=s.useState(!1),[x,a]=s.useState(""),[i,S]=ie(`audit-log-category-${l}`,"all"),z=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>r.length?b.value==="all"||r.includes(b.value):!0),w=async({page:b=1,pageSize:o=20,silent:y=!0}={})=>{if(!f){y||d(!0);try{const g=await m.getAuditLogs({input:{paging:{page:b,pageSize:o},category:i==="all"?"":i,scope:l,actionOrContent:x}});n&&(g.list||[]).forEach(P=>{P.scope!==v.did&&(P.link=`/blocklets/${P.scope}/components`)}),C(g.list),h(g.paging),d(!1)}catch(g){U.error(g.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[i,x]);const k={loading:f,fetch:w,filter:{category:i,scope:l},categories:z,setCategory:S,data:L,paging:c,setPaging:h,showScope:n,scopeFormatter:p,actionOrContent:x,setActionOrContent:a};return e.jsx(pe,{value:{auditLogs:k},children:t})}function W(){const{auditLogs:t}=s.useContext(R);return t}var A={},ge=K;Object.defineProperty(A,"__esModule",{value:!0});var N=A.default=void 0,xe=ge(H()),Le=e;N=A.default=(0,xe.default)((0,Le.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");function he(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n;for(;(n=l.exec(t))!==null;)r.push({text:n[1],url:n[2]});return r}const ve=`
1
+ import{a3 as U,r as H,a as $,k as V,$ as F,bv as Z,bI as q,a5 as G}from"./vendor-ux-did-connect-CX7qG3_M.js";import{j as e,a9 as K,e as B,aa as u,aq as Q,T as j,ad as X,I as M,ab as J,bp as Y,bs as ee,bo as te,q as re,bQ as ae,ah as oe}from"./vendor-mui-core-wlbruq2I.js";import{p as se}from"./util-CS4PqVkK.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-BF3BqN1O.js";import{D}from"./index-DQjZ74P0.js";import{M as I}from"./index-BXjOxZPH.js";import{O as le}from"./vendor-arcblock-B4hgrXYM.js";import{d as ce}from"./InfoOutlined-CLiL5VeK.js";import{d as de,e as _}from"./vendor-utils-B3iZkn2R.js";import{S as T}from"./shorten-label-CTSJhlwO.js";import{r as O}from"./index-DWgnwzKO.js";import{u as ue}from"./dashboard-B7qE-Md0.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./base32-CmYq1ikq.js";import"./index-8eXqqyHQ.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-CwT4-jkw.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";const R=s.createContext({}),{Provider:pe,Consumer:Xe}=R;function me(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:l="",categories:r=[],showScope:n,scopeFormatter:p}){const{api:m,info:v}=D(),[L,C]=s.useState([]),[c,h]=s.useState({total:0,pageSize:me(),pageCount:0,page:1}),[f,d]=s.useState(!1),[x,a]=s.useState(""),[i,S]=ie(`audit-log-category-${l}`,"all"),z=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>r.length?b.value==="all"||r.includes(b.value):!0),w=async({page:b=1,pageSize:o=20,silent:y=!0}={})=>{if(!f){y||d(!0);try{const g=await m.getAuditLogs({input:{paging:{page:b,pageSize:o},category:i==="all"?"":i,scope:l,actionOrContent:x}});n&&(g.list||[]).forEach(P=>{P.scope!==v.did&&(P.link=`/blocklets/${P.scope}/components`)}),C(g.list),h(g.paging),d(!1)}catch(g){U.error(g.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[i,x]);const k={loading:f,fetch:w,filter:{category:i,scope:l},categories:z,setCategory:S,data:L,paging:c,setPaging:h,showScope:n,scopeFormatter:p,actionOrContent:x,setActionOrContent:a};return e.jsx(pe,{value:{auditLogs:k},children:t})}function W(){const{auditLogs:t}=s.useContext(R);return t}var A={},ge=K;Object.defineProperty(A,"__esModule",{value:!0});var N=A.default=void 0,xe=ge(H()),Le=e;N=A.default=(0,xe.default)((0,Le.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");function he(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n;for(;(n=l.exec(t))!==null;)r.push({text:n[1],url:n[2]});return r}const ve=`
2
2
  <svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
4
4
  <path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
@@ -1,4 +1,4 @@
1
- import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-wlbruq2I.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-CX7qG3_M.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-DQjZ74P0.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as X,z as fe}from"./vendor-utils-B3iZkn2R.js";import{u as ge,b as j}from"./vendor-hooks-BCm626KH.js";import{L as we}from"./launch-result-message-DNgJY11G.js";import{g as xe}from"./get-safe-url-CwT4-jkw.js";import{g as be,a as ye}from"./setup-CQ7O7nI0.js";import{S as q}from"./button-C0Vra3Ak.js";import{S as ke}from"./layout-BCvTd67o.js";import{P as Ue,S as ve,p as Le}from"./starting-progress-a7uoLG-L.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./addon-e-JO0VU3.js";import"./QuestionMarkCircle-BMcwgPWr.js";import"./use-server-logo-BbYHFDuK.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";const Re=P(we)`
1
+ import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-wlbruq2I.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-CX7qG3_M.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-DQjZ74P0.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as X,z as fe}from"./vendor-utils-B3iZkn2R.js";import{u as ge,b as j}from"./vendor-hooks-BCm626KH.js";import{L as we}from"./launch-result-message-DNgJY11G.js";import{g as xe}from"./get-safe-url-BWDUV79Q.js";import{g as be,a as ye}from"./setup-CQ7O7nI0.js";import{S as q}from"./button-C0Vra3Ak.js";import{S as ke}from"./layout-BCvTd67o.js";import{P as Ue,S as ve,p as Le}from"./starting-progress-a7uoLG-L.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./addon-e-JO0VU3.js";import"./QuestionMarkCircle-BMcwgPWr.js";import"./use-server-logo-BbYHFDuK.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";const Re=P(we)`
2
2
  && .result-footer {
3
3
  height: 120px;
4
4
  > div {
@@ -1,4 +1,4 @@
1
- var Ww=Object.defineProperty;var Vw=(e,t,n)=>t in e?Ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Vw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Uw,cr as Te,cq as Ze,co as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d3 as dv,d4 as fv,d5 as Hw,bE as pv,ah as Nt,d6 as el,c1 as Kt,J as tl,d7 as pi,ba as Jn,cK as ft,b6 as It,d8 as Gw,d9 as Kw,c as Pe,_ as N,Y as yr,da as Ke,db as Yw,dc as ys,b as qn,dd as Xa,de as Xw,cL as Qw,df as Zw,c5 as Jw,d0 as eS,dg as tS,cM as nS,g as ze,a as Le,k as Fe,dh as mv,u as Gt,di as rS,d as nn,dj as nl,dk as Wp,o as on,dl as hv,i as Nr,dm as oS,dn as mi,dp as aS,dq as Vp,f as kd,dr as gv,ds as iS,dt as sS,p as rl,K as lS,du as cS,b3 as Up,e as bv,ak as qp,O as Jt,I as an,al as vv,T as Un,v as uS,q as Xn,ab as Fr,aq as dS,ap as ol,dv as fS,bv as pS,bt as Au,bw as Hp,bi as yv,y as mS,D as Gp,aj as Kp,t as Yp,bS as Xp,as as Li,z as hS,bu as gS}from"./vendor-mui-core-wlbruq2I.js";import{aN as Qp,a7 as bS,A as Cs,aO as vS}from"./vendor-utils-B3iZkn2R.js";import{r as S,R as yS,d as hi,a as $e,g as Dd,b as tt,e as Cv,c as CS,f as xv}from"./vendor-react-DEoibe3W.js";import{c5 as Ce,r as Vr,a as Yt,a3 as ot,ci as xS,cj as wS,bw as Zp,bx as SS,by as PS,bz as TS,E as kS,bd as gi,bn as Jp,bB as DS,R as RS,ck as ES,bb as Tr,ar as al,k as Be,a8 as MS,bg as $S,$ as gc,ab as OS,I as Mn,B as Ni,a5 as IS}from"./vendor-ux-did-connect-CX7qG3_M.js";import{v as wv,c as Qn,_ as _S}from"./vendor-arcblock-B4hgrXYM.js";import{D as Qt,G as Ur,W as yo,f as dt,V as Qa,aO as AS,a9 as Sv,aa as Co,aw as Pv,aP as Tv,b as Ia,aQ as BS,a8 as jS}from"./index-DQjZ74P0.js";import{f as En}from"./index-8eXqqyHQ.js";import{d as kv}from"./TuneOutlined-0oMZE8a4.js";import{f as LS,W as xo,c as NS,g as Rd,B as Dv,a as FS}from"./dashboard-B7qE-Md0.js";import{S as zS}from"./switch-control-CzaI2YNK.js";import{P as Bu,w as il}from"./permission-B7ZHEOJv.js";import{d as Ed}from"./Edit-hd-cDU5C.js";import{d as em,c as WS,b as nt,_ as Je,o as VS,e as US,i as qS,p as HS,g as GS,r as kr}from"./slicedToArray-CRrLoxQ4.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Rv,F as Ev,j as Lu,m as KS,G as lr,H as YS,I as XS,J as Nu,K as Mv,L as QS,M as ZS,N as $v,O as $d,P as tm,Q as JS,R as nm,S as e1,T as t1,p as n1,e as rm,g as r1,b as bc,a as om,c as o1,q as Fi,o as Qr,i as a1,d as i1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as s1,z as l1,n as c1,u as u1,v as d1,w as f1,U as p1,y as m1,V as h1,W as g1}from"./index-BoQJXOtZ.js";import{a as Qe,u as Me,r as Za,d as qr,b as b1,w as ws,g as Ov,e as Iv,c as v1,o as Fu}from"./raf-schd.esm-B3j6BePR.js";import{s as y1}from"./sanitize-DbZs1H_T.js";import{C as am}from"./click-to-copy-BUVqg1RQ.js";import{d as im}from"./ChevronRight-CB8w0u2n.js";import{d as C1}from"./ChevronLeft-02OWcWpH.js";import{d as x1}from"./ArrowDropDown-Ce8TY3aP.js";import{A as w1,a as S1,b as P1,d as _v,B as T1,f as k1,c as D1}from"./add-component-core-CsW-bf6w.js";import{C as Mo}from"./confirm-BjCmRSAF.js";import{v as R1,b as Ss}from"./util-BBMAZSVn.js";import{L as E1}from"./LockIcon-QnxDGvZv.js";import{d as Av}from"./Launch-BwVeOcBz.js";import{D as M1}from"./delete-confirm-Dow_C0jR.js";import{d as $1}from"./InfoOutlined-CLiL5VeK.js";import{I as O1}from"./iframe-DsIqy16E.js";import{B as I1}from"./bundle-avatar-D28BGkcC.js";import{d as _1}from"./PlayArrow-B_ZNrQDa.js";import{A as Bv}from"./actions-DtL6bYnA.js";import{I as xc}from"./index-BnR8uU0R.js";import{W as A1}from"./did-address-bJAfhuZx.js";import{u as B1}from"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./get-safe-url-BWDUV79Q.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./item-RUDvbSOI.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./MoreHoriz-9E3q8aHi.js";var j1=36e5;function L1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*j1)}var N1=864e5;function F1(e,t){Ye(2,arguments);var n=xs(e),r=xs(t),o=n.getTime()-ju(n),a=r.getTime()-ju(r);return Math.round((o-a)/N1)}var z1=6e4;function W1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*z1)}function V1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*1e3)}function Fa(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function U1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function sm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function jv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=sm(n,r),a=Math.abs(F1(n,r));n.setDate(n.getDate()-o*a);var i=+(sm(n,r)===-o),s=o*(a-i);return s===0?0:s}function sl(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var lm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},q1="trunc";function bi(e){return e?lm[e]:lm[q1]}function H1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Rv;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Ev;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function K1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Lv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(KS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=Fa(n,r)===-o;K1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function Y1(e,t,n){Ye(2,arguments);var r=Lv(e,t)/3;return bi(void 0)(r)}function X1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function Q1(e,t,n){Ye(2,arguments);var r=jv(e,t)/7;return bi(void 0)(r)}function Z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(U1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=Fa(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function J1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function eP(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function tP(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=lr(o.getDate(),2),f=lr(o.getMonth()+1,2),m=lr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var g=o.getTimezoneOffset();if(g!==0){var h=Math.abs(g),w=lr(Math.floor(h/60),2),v=lr(h%60,2),b=g<0?"+":"-";c="".concat(b).concat(w,":").concat(v)}else c="Z";var p=lr(o.getHours(),2),y=lr(o.getMinutes(),2),D=lr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function rP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function oP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function aP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function iP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function cm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Uw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ var Ww=Object.defineProperty;var Vw=(e,t,n)=>t in e?Ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Vw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Uw,cr as Te,cq as Ze,co as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d3 as dv,d4 as fv,d5 as Hw,bE as pv,ah as Nt,d6 as el,c1 as Kt,J as tl,d7 as pi,ba as Jn,cK as ft,b6 as It,d8 as Gw,d9 as Kw,c as Pe,_ as N,Y as yr,da as Ke,db as Yw,dc as ys,b as qn,dd as Xa,de as Xw,cL as Qw,df as Zw,c5 as Jw,d0 as eS,dg as tS,cM as nS,g as ze,a as Le,k as Fe,dh as mv,u as Gt,di as rS,d as nn,dj as nl,dk as Wp,o as on,dl as hv,i as Nr,dm as oS,dn as mi,dp as aS,dq as Vp,f as kd,dr as gv,ds as iS,dt as sS,p as rl,K as lS,du as cS,b3 as Up,e as bv,ak as qp,O as Jt,I as an,al as vv,T as Un,v as uS,q as Xn,ab as Fr,aq as dS,ap as ol,dv as fS,bv as pS,bt as Au,bw as Hp,bi as yv,y as mS,D as Gp,aj as Kp,t as Yp,bS as Xp,as as Li,z as hS,bu as gS}from"./vendor-mui-core-wlbruq2I.js";import{aN as Qp,a7 as bS,A as Cs,aO as vS}from"./vendor-utils-B3iZkn2R.js";import{r as S,R as yS,d as hi,a as $e,g as Dd,b as tt,e as Cv,c as CS,f as xv}from"./vendor-react-DEoibe3W.js";import{c5 as Ce,r as Vr,a as Yt,a3 as ot,ci as xS,cj as wS,bw as Zp,bx as SS,by as PS,bz as TS,E as kS,bd as gi,bn as Jp,bB as DS,R as RS,ck as ES,bb as Tr,ar as al,k as Be,a8 as MS,bg as $S,$ as gc,ab as OS,I as Mn,B as Ni,a5 as IS}from"./vendor-ux-did-connect-CX7qG3_M.js";import{v as wv,c as Qn,_ as _S}from"./vendor-arcblock-B4hgrXYM.js";import{D as Qt,G as Ur,W as yo,f as dt,V as Qa,aO as AS,a9 as Sv,aa as Co,aw as Pv,aP as Tv,b as Ia,aQ as BS,a8 as jS}from"./index-DQjZ74P0.js";import{f as En}from"./index-8eXqqyHQ.js";import{d as kv}from"./TuneOutlined-0oMZE8a4.js";import{f as LS,W as xo,c as NS,g as Rd,B as Dv,a as FS}from"./dashboard-B7qE-Md0.js";import{S as zS}from"./switch-control-CzaI2YNK.js";import{P as Bu,w as il}from"./permission-B7ZHEOJv.js";import{d as Ed}from"./Edit-hd-cDU5C.js";import{d as em,c as WS,b as nt,_ as Je,o as VS,e as US,i as qS,p as HS,g as GS,r as kr}from"./slicedToArray-CRrLoxQ4.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Rv,F as Ev,j as Lu,m as KS,G as lr,H as YS,I as XS,J as Nu,K as Mv,L as QS,M as ZS,N as $v,O as $d,P as tm,Q as JS,R as nm,S as e1,T as t1,p as n1,e as rm,g as r1,b as bc,a as om,c as o1,q as Fi,o as Qr,i as a1,d as i1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as s1,z as l1,n as c1,u as u1,v as d1,w as f1,U as p1,y as m1,V as h1,W as g1}from"./index-BoQJXOtZ.js";import{a as Qe,u as Me,r as Za,d as qr,b as b1,w as ws,g as Ov,e as Iv,c as v1,o as Fu}from"./raf-schd.esm-B3j6BePR.js";import{s as y1}from"./sanitize-DbZs1H_T.js";import{C as am}from"./click-to-copy-BUVqg1RQ.js";import{d as im}from"./ChevronRight-CB8w0u2n.js";import{d as C1}from"./ChevronLeft-02OWcWpH.js";import{d as x1}from"./ArrowDropDown-Ce8TY3aP.js";import{A as w1,a as S1,b as P1,d as _v,B as T1,f as k1,c as D1}from"./add-component-core-CsW-bf6w.js";import{C as Mo}from"./confirm-BjCmRSAF.js";import{v as R1,b as Ss}from"./util-BBMAZSVn.js";import{L as E1}from"./LockIcon-QnxDGvZv.js";import{d as Av}from"./Launch-BwVeOcBz.js";import{D as M1}from"./delete-confirm-Dow_C0jR.js";import{d as $1}from"./InfoOutlined-CLiL5VeK.js";import{I as O1}from"./iframe-DsIqy16E.js";import{B as I1}from"./bundle-avatar-D28BGkcC.js";import{d as _1}from"./PlayArrow-B_ZNrQDa.js";import{A as Bv}from"./actions-DtL6bYnA.js";import{I as xc}from"./index-BnR8uU0R.js";import{W as A1}from"./did-address-bJAfhuZx.js";import{u as B1}from"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./get-safe-url-CwT4-jkw.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./item-RUDvbSOI.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./MoreHoriz-9E3q8aHi.js";var j1=36e5;function L1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*j1)}var N1=864e5;function F1(e,t){Ye(2,arguments);var n=xs(e),r=xs(t),o=n.getTime()-ju(n),a=r.getTime()-ju(r);return Math.round((o-a)/N1)}var z1=6e4;function W1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*z1)}function V1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*1e3)}function Fa(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function U1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function sm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function jv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=sm(n,r),a=Math.abs(F1(n,r));n.setDate(n.getDate()-o*a);var i=+(sm(n,r)===-o),s=o*(a-i);return s===0?0:s}function sl(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var lm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},q1="trunc";function bi(e){return e?lm[e]:lm[q1]}function H1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Rv;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Ev;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function K1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Lv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(KS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=Fa(n,r)===-o;K1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function Y1(e,t,n){Ye(2,arguments);var r=Lv(e,t)/3;return bi(void 0)(r)}function X1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function Q1(e,t,n){Ye(2,arguments);var r=jv(e,t)/7;return bi(void 0)(r)}function Z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(U1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=Fa(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function J1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function eP(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function tP(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=lr(o.getDate(),2),f=lr(o.getMonth()+1,2),m=lr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var g=o.getTimezoneOffset();if(g!==0){var h=Math.abs(g),w=lr(Math.floor(h/60),2),v=lr(h%60,2),b=g<0?"+":"-";c="".concat(b).concat(w,":").concat(v)}else c="Z";var p=lr(o.getHours(),2),y=lr(o.getMinutes(),2),D=lr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function rP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function oP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function aP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function iP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function cm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Uw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function Nv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nv=function(){return!!e})()}function rt(e){var t=Nv();return function(){var n,r=em(e);if(t){var o=em(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return WS(this,n)}}var sP=10,Fv=function(){function e(){Je(this,e),Ce(this,"priority",void 0),Ce(this,"subPriority",0)}return Ze(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),lP=function(e){nt(n,e);var t=rt(n);function n(r,o,a,i,s){var c;return Je(this,n),c=t.call(this),c.value=r,c.validateValue=o,c.setValue=a,c.priority=i,s&&(c.subPriority=s),c}return Ze(n,[{key:"validate",value:function(o,a){return this.validateValue(o,this.value,a)}},{key:"set",value:function(o,a,i){return this.setValue(o,a,this.value,i)}}]),n}(Fv),cP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",sP),Ce(Te(r),"subPriority",-1),r}return Ze(n,[{key:"set",value:function(o,a){if(a.timestampIsSet)return o;var i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}}]),n}(Fv),at=function(){function e(){Je(this,e),Ce(this,"incompatibleTokens",void 0),Ce(this,"priority",void 0),Ce(this,"subPriority",void 0)}return Ze(e,[{key:"run",value:function(n,r,o,a){var i=this.parse(n,r,o,a);return i?{setter:new lP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),uP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",140),Ce(Te(r),"incompatibleTokens",["R","u","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}},{key:"set",value:function(o,a,i){return a.era=i,o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rt(e,t){return e&&{value:t(e.value),rest:e.rest}}function vt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function zn(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Rv+a*Ev+i*YS),rest:t.slice(n[0].length)}}function zv(e){return vt(Dt.anyDigitsSigned,e)}function kt(e,t){switch(e){case 1:return vt(Dt.singleDigit,t);case 2:return vt(Dt.twoDigits,t);case 3:return vt(Dt.threeDigits,t);case 4:return vt(Dt.fourDigits,t);default:return vt(new RegExp("^\\d{1,"+e+"}"),t)}}function Ps(e,t){switch(e){case 1:return vt(Dt.singleDigitSigned,t);case 2:return vt(Dt.twoDigitsSigned,t);case 3:return vt(Dt.threeDigitsSigned,t);case 4:return vt(Dt.fourDigitsSigned,t);default:return vt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Od(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Wv(e,t){var n=t>0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var a=r+50,i=Math.floor(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function Vv(e){return e%400===0||e%4===0&&e%100!==0}var dP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Rt(kt(4,o),s);case"yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i){var s=o.getUTCFullYear();if(i.isTwoDigitYear){var c=Wv(i.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),fP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Rt(kt(4,o),s);case"Yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i,s){var c=XS(o,s);if(i.isTwoDigitYear){var l=Wv(i.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Nu(o,s)}var d=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(d,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Nu(o,s)}}]),n}(at),pP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="R"?4:a.length,o)}},{key:"set",value:function(o,a,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Mv(s)}}]),n}(at),mP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="u"?4:a.length,o)}},{key:"set",value:function(o,a,i){return o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),hP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"Q":case"QQ":return kt(a.length,o);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})||i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),gP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"q":case"qq":return kt(a.length,o);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})||i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),bP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ce(Te(r),"priority",110),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"M":return Rt(vt(Dt.month,o),s);case"MM":return Rt(kt(2,o),s);case"Mo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})||i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),vP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",110),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"L":return Rt(vt(Dt.month,o),s);case"LL":return Rt(kt(2,o),s);case"Lo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})||i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at);function yP(e,t,n){Ye(2,arguments);var r=qe(e),o=Xt(t),a=QS(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var CP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"w":return vt(Dt.week,o);case"wo":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i,s){return Nu(yP(o,i,s),s)}}]),n}(at);function xP(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t),o=ZS(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var wP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"I":return vt(Dt.week,o);case"Io":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i){return Mv(xP(o,i))}}]),n}(at),SP=[31,28,31,30,31,30,31,31,30,31,30,31],PP=[31,29,31,30,31,30,31,31,30,31,30,31],TP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subPriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"d":return vt(Dt.date,o);case"do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Vv(i),c=o.getUTCMonth();return s?a>=1&&a<=PP[c]:a>=1&&a<=SP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),kP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subpriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"D":case"DD":return vt(Dt.dayOfYear,o);case"Do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Vv(i);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(o,a,i){return o.setUTCMonth(0,i),o.setUTCHours(0,0,0,0),o}}]),n}(at);function Id(e,t,n){var r,o,a,i,s,c,l,d;Ye(2,arguments);var u=$v(),f=Xt((r=(o=(a=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(s=n.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=qe(e),g=Xt(t),h=m.getUTCDay(),w=g%7,v=(w+7)%7,b=(v<f?7:0)+g-h;return m.setUTCDate(m.getUTCDate()+b),m}var DP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),RP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Rt(kt(a.length,o),c);case"eo":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"eee":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),EP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Rt(kt(a.length,o),c);case"co":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})||i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at);function MP(e,t){Ye(2,arguments);var n=Xt(t);n%7===0&&(n=n-7);var r=1,o=qe(e),a=o.getUTCDay(),i=n%7,s=(i+7)%7,c=(s<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+c),o}var $P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return kt(a.length,o);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return Rt(i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Rt(i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Rt(i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Rt(i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,a){return a>=1&&a<=7}},{key:"set",value:function(o,a,i){return o=MP(o,i),o.setUTCHours(0,0,0,0),o}}]),n}(at),OP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),IP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),_P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","b","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),AP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"h":return vt(Dt.hour12h,o);case"ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=12}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):!s&&i===12?o.setUTCHours(0,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),BP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"H":return vt(Dt.hour23h,o);case"Ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=23}},{key:"set",value:function(o,a,i){return o.setUTCHours(i,0,0,0),o}}]),n}(at),jP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"K":return vt(Dt.hour11h,o);case"Ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),LP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"k":return vt(Dt.hour24h,o);case"ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=24}},{key:"set",value:function(o,a,i){var s=i<=24?i%24:i;return o.setUTCHours(s,0,0,0),o}}]),n}(at),NP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",60),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"m":return vt(Dt.minute,o);case"mo":return i.ordinalNumber(o,{unit:"minute"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCMinutes(i,0,0),o}}]),n}(at),FP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",50),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"s":return vt(Dt.second,o);case"so":return i.ordinalNumber(o,{unit:"second"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCSeconds(i,0),o}}]),n}(at),zP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",30),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){var i=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return Rt(kt(a.length,o),i)}},{key:"set",value:function(o,a,i){return o.setUTCMilliseconds(i),o}}]),n}(at),WP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","x"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"X":return zn(Fn.basicOptionalMinutes,o);case"XX":return zn(Fn.basic,o);case"XXXX":return zn(Fn.basicOptionalSeconds,o);case"XXXXX":return zn(Fn.extendedOptionalSeconds,o);case"XXX":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),VP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","X"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"x":return zn(Fn.basicOptionalMinutes,o);case"xx":return zn(Fn.basic,o);case"xxxx":return zn(Fn.basicOptionalSeconds,o);case"xxxxx":return zn(Fn.extendedOptionalSeconds,o);case"xxx":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),UP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return zv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(at),qP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return zv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),HP={G:new uP,y:new dP,Y:new fP,R:new pP,u:new mP,Q:new hP,q:new gP,M:new bP,L:new vP,w:new CP,I:new wP,d:new TP,D:new kP,E:new DP,e:new RP,c:new EP,i:new $P,a:new OP,b:new IP,B:new _P,h:new AP,H:new BP,K:new jP,k:new LP,m:new NP,s:new FP,S:new zP,X:new WP,x:new VP,t:new UP,T:new qP},GP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YP=/^'([^]*?)'?$/,XP=/''/g,QP=/\S/,ZP=/[a-zA-Z]/;function JP(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,g,h,w,v,b,p,y,D;Ye(3,arguments);var P=String(e),T=String(t),k=$v(),C=(o=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:k.locale)!==null&&o!==void 0?o:$d;if(!C.match)throw new RangeError("locale must contain match property");var R=Xt((i=(s=(c=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c:k.firstWeekContainsDate)!==null&&s!==void 0?s:(f=k.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Xt((g=(h=(w=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(b=r.locale)===null||b===void 0||(p=b.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&w!==void 0?w:k.weekStartsOn)!==null&&h!==void 0?h:(y=k.locale)===null||y===void 0||(D=y.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&g!==void 0?g:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return P===""?qe(n):new Date(NaN);var $={firstWeekContainsDate:R,weekStartsOn:M,locale:C},O=[new cP],I=T.match(KP).map(function(H){var K=H[0];if(K in tm){var Q=tm[K];return Q(H,C.formatLong)}return H}).join("").match(GP),_=[],A=cm(I),F;try{var L=function(){var K=F.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&JS(K)&&nm(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&e1(K)&&nm(K,T,e);var Q=K[0],ie=HP[Q];if(ie){var Y=ie.incompatibleTokens;if(Array.isArray(Y)){var J=_.find(function(ge){return Y.includes(ge.token)||ge.token===Q});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(K,"` at the same time"))}else if(ie.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(K,"` and any other token at the same time"));_.push({token:Q,fullToken:K});var ne=ie.run(P,K,C.match,$);if(!ne)return{v:new Date(NaN)};O.push(ne.setter),P=ne.rest}else{if(Q.match(ZP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=eT(K)),P.indexOf(K)===0)P=P.slice(K.length);else return{v:new Date(NaN)}}};for(A.s();!(F=A.n()).done;){var W=L();if(qw(W)==="object")return W.v}}catch(H){A.e(H)}finally{A.f()}if(P.length>0&&QP.test(P))return new Date(NaN);var G=O.map(function(H){return H.priority}).sort(function(H,K){return K-H}).filter(function(H,K,Q){return Q.indexOf(H)===K}).map(function(H){return O.filter(function(K){return K.priority===H}).sort(function(K,Q){return Q.subPriority-K.subPriority})}).map(function(H){return H[0]}),E=qe(n);if(isNaN(E.getTime()))return new Date(NaN);var q=t1(E,ju(E)),U={},j=cm(G),z;try{for(j.s();!(z=j.n()).done;){var B=z.value;if(!B.validate(q,$))return new Date(NaN);var V=B.set(q,U,$);Array.isArray(V)?(q=V[0],eP(U,V[1])):q=V}}catch(H){j.e(H)}finally{j.f()}return q}function eT(e){return e.match(YP)[1].replace(XP,"'")}function um(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function tT(e,t){Ye(2,arguments);var n=um(e),r=um(t);return n.getTime()===r.getTime()}function nT(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function rT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setDate(r),n}function oT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setHours(r),n}function aT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setMinutes(r),n}function iT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setSeconds(r),n}var _d={},sT=Se;Object.defineProperty(_d,"__esModule",{value:!0});var Uv=_d.default=void 0,lT=sT(Vr()),cT=x;Uv=_d.default=(0,lT.default)((0,cT.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Ad({children:e,...t}){var l;const{t:n}=Yt(),{api:r}=Qt(),{blocklet:o}=Ur(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return x.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,x.jsx(Vn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:x.jsx("div",{children:x.jsx(zS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Ad.propTypes={children:oe.any};Ad.defaultProps={children:null};var qv={},Go={},wc={};function Hv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function Ts(e){return typeof e=="string"}function Wu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Gv(e){if(typeof e!="string")throw new Error(Wu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function hr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Kv(e){if(!hr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kv(e[n])}),t}function Lr(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return hr(e)&&hr(t)&&Object.keys(t).forEach(o=>{hr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&hr(e[o])?r[o]=Lr(e[o],t[o],n):n.clone?r[o]=hr(t[o])?Kv(t[o]):t[o]:r[o]=t[o]}),r}function za(e,t){return t?Lr(e,t,{clone:!1}):e}function uT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function dT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function fT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function pT(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const ll={xs:0,sm:600,md:900,lg:1200,xl:1536},dm={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},mT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ll[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function er(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||dm;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||dm;return Object.keys(t).reduce((i,s)=>{if(dT(a.keys,s)){const c=fT(r.containerQueries?r:mT,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||ll).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function hT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function gT(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function cl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function ks(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=cl(e,n)||r,t&&(o=t(o,r,e)),o}function Mt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=cl(c,r)||{};return er(i,s,u=>{let f=ks(l,o,u);return u===f&&typeof u=="string"&&(f=ks(l,o,`${t}${u==="default"?"":Gv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function bT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const vT={m:"margin",p:"padding"},yT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},fm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},CT=bT(e=>{if(e.length>2)if(fm[e])e=fm[e];else return[e];const[t,n]=e.split(""),r=vT[t],o=yT[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Bd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],jd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Bd,...jd];function vi(e,t,n,r){const o=cl(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Ld(e){return vi(e,"spacing",8)}function yi(e,t){return typeof t=="string"||t==null?t:e(t)}function xT(e,t){return n=>e.reduce((r,o)=>(r[o]=yi(t,n),r),{})}function wT(e,t,n,r){if(!t.includes(n))return null;const o=CT(n),a=xT(o,r),i=e[n];return er(e,i,a)}function Yv(e,t){const n=Ld(e.theme);return Object.keys(e).map(r=>wT(e,t,r,n)).reduce(za,{})}function xt(e){return Yv(e,Bd)}xt.propTypes={};xt.filterProps=Bd;function wt(e){return Yv(e,jd)}wt.propTypes={};wt.filterProps=jd;function ul(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?za(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function mn(e){return typeof e!="number"?e:`${e}px solid`}function Pn(e,t){return Mt({prop:e,themeKey:"borders",transform:t})}const ST=Pn("border",mn),PT=Pn("borderTop",mn),TT=Pn("borderRight",mn),kT=Pn("borderBottom",mn),DT=Pn("borderLeft",mn),RT=Pn("borderColor"),ET=Pn("borderTopColor"),MT=Pn("borderRightColor"),$T=Pn("borderBottomColor"),OT=Pn("borderLeftColor"),IT=Pn("outline",mn),_T=Pn("outlineColor"),dl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=vi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:yi(t,r)});return er(e,e.borderRadius,n)}return null};dl.propTypes={};dl.filterProps=["borderRadius"];ul(ST,PT,TT,kT,DT,RT,ET,MT,$T,OT,dl,IT,_T);const fl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=vi(e.theme,"spacing",8),n=r=>({gap:yi(t,r)});return er(e,e.gap,n)}return null};fl.propTypes={};fl.filterProps=["gap"];const pl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=vi(e.theme,"spacing",8),n=r=>({columnGap:yi(t,r)});return er(e,e.columnGap,n)}return null};pl.propTypes={};pl.filterProps=["columnGap"];const ml=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=vi(e.theme,"spacing",8),n=r=>({rowGap:yi(t,r)});return er(e,e.rowGap,n)}return null};ml.propTypes={};ml.filterProps=["rowGap"];const AT=Mt({prop:"gridColumn"}),BT=Mt({prop:"gridRow"}),jT=Mt({prop:"gridAutoFlow"}),LT=Mt({prop:"gridAutoColumns"}),NT=Mt({prop:"gridAutoRows"}),FT=Mt({prop:"gridTemplateColumns"}),zT=Mt({prop:"gridTemplateRows"}),WT=Mt({prop:"gridTemplateAreas"}),VT=Mt({prop:"gridArea"});ul(fl,pl,ml,AT,BT,jT,LT,NT,FT,zT,WT,VT);function mo(e,t){return t==="grey"?t:e}const UT=Mt({prop:"color",themeKey:"palette",transform:mo}),qT=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),HT=Mt({prop:"backgroundColor",themeKey:"palette",transform:mo});ul(UT,qT,HT);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const GT=Mt({prop:"width",transform:en}),Nd=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||ll[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:en(n)}};return er(e,e.maxWidth,t)}return null};Nd.filterProps=["maxWidth"];const KT=Mt({prop:"minWidth",transform:en}),YT=Mt({prop:"height",transform:en}),XT=Mt({prop:"maxHeight",transform:en}),QT=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const ZT=Mt({prop:"boxSizing"});ul(GT,Nd,KT,YT,XT,QT,ZT);const Ci={border:{themeKey:"borders",transform:mn},borderTop:{themeKey:"borders",transform:mn},borderRight:{themeKey:"borders",transform:mn},borderBottom:{themeKey:"borders",transform:mn},borderLeft:{themeKey:"borders",transform:mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dl},color:{themeKey:"palette",transform:mo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mo},backgroundColor:{themeKey:"palette",transform:mo},p:{style:wt},pt:{style:wt},pr:{style:wt},pb:{style:wt},pl:{style:wt},px:{style:wt},py:{style:wt},padding:{style:wt},paddingTop:{style:wt},paddingRight:{style:wt},paddingBottom:{style:wt},paddingLeft:{style:wt},paddingX:{style:wt},paddingY:{style:wt},paddingInline:{style:wt},paddingInlineStart:{style:wt},paddingInlineEnd:{style:wt},paddingBlock:{style:wt},paddingBlockStart:{style:wt},paddingBlockEnd:{style:wt},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:fl},rowGap:{style:ml},columnGap:{style:pl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:en},maxWidth:{style:Nd},minWidth:{transform:en},height:{transform:en},maxHeight:{transform:en},minHeight:{transform:en},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function JT(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function ek(e,t){return typeof e=="function"?e(t):e}function tk(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=cl(o,l)||{};return u?u(i):er(i,r,g=>{let h=ks(f,d,g);return g===h&&typeof g=="string"&&(h=ks(f,d,`${n}${g==="default"?"":Gv(g)}`,g)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??Ci;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=hT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=ek(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=za(u,e(f,m,o,a));else{const g=er({theme:o},m,h=>({[f]:h}));JT(g,m)?u[f]=t({sx:m,theme:o}):u=za(u,g)}else u=za(u,e(f,m,o,a))}),uT(o,gT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Hr=tk();Hr.filterProps=["sx"];const nk=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??Ci;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Xv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=nk(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return hr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const rk=e=>{const t=fv(e);class n extends Hw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let Vu;typeof document=="object"&&(Vu=rk({key:"css",prepend:!0}));function ok(e){const{injectFirst:t,children:n}=e;return t&&Vu?x.jsx(dv,{value:Vu,children:n}):n}function ak(e){return e==null||Object.keys(e).length===0}function Qv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(ak(o)?n:o):t;return x.jsx(pv,{styles:r})}/**
3
3
  * @mui/styled-engine v6.1.0
4
4
  *
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DnDFazyx.js","assets/vendor-ux-did-connect-CX7qG3_M.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-B3iZkn2R.js","assets/vendor-mui-core-wlbruq2I.js","assets/vendor-hooks-BCm626KH.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-B4hgrXYM.js","assets/index-BpvW-cUy.js","assets/index-DQjZ74P0.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
- import{a as rn,e as Ae,r as z,d as Ot,g as go,b as B}from"./vendor-react-DEoibe3W.js";import{c2 as ki,aT as Li,c3 as Mi,bF as Ei,k as Se,a as Ne,c4 as Ai,c5 as D,c6 as ji,c7 as or,c8 as Fi,c9 as ir,ca as Gi,cb as Wi,I as ge,a8 as Mn,s as En,bn as vo,_ as $i,l as mo,a3 as _t,ar as Hi,B as Bi,bE as So,f as Ui}from"./vendor-ux-did-connect-CX7qG3_M.js";import{a as Nt,u as ie,G as Vi,i as yo,f as Co,v as qi,b as Ki}from"./vendor-hooks-BCm626KH.js";import{j as m,E as Xi,b6 as _o,cp as Qi,cq as ue,cr as M,_ as he,cs as Yi,H as R,co as Ji,ct as Zi,cu as ea,cv as ta,cw as na,cx as ra,cy as oa,cz as ia,cA as aa,cB as la,s as Ve,aa as Y,T as Te,U as sa,W as ar,I as ze,b7 as bn,y as Zt,v as An,O as at,N as Rn,ad as ca,ab as da,bp as wo,bZ as ua,ah as ha,as as lr,ai as fn,w as Xt,e as fa,F as pa,bm as sr,bs as ga,bo as cr,q as dr,bx as pn,c9 as ur}from"./vendor-mui-core-wlbruq2I.js";import{aD as va,aE as ma,aF as Sa,A as Ze,P as Re,D as It,o as ya,c as Ca,v as mt,g as _a,aB as wa,C as dt,aG as xo,aH as xa,a4 as hr,aI as ba,b as Ra,J as Ia,H as Ta,i as Pa,n as Le}from"./vendor-utils-B3iZkn2R.js";import{r as za}from"./omit-O1pUD7ku.js";import{r as Da}from"./cloneDeep-ro06l5HL.js";import{r as Oa,c as Je,P as Qe,Q as Na,e as ka,V as La}from"./vendor-arcblock-B4hgrXYM.js";import{p as Ma}from"./index-BpvW-cUy.js";import{aG as Ea,a1 as Aa,a8 as ja,G as et,f as Fa,D as bo,aH as Ga,aI as Wa,aC as $a,aJ as Ha,aD as Ge,aK as Ba}from"./index-DQjZ74P0.js";import{_ as de,a as lt,b as _e,c as we,d as xe,r as Ua}from"./slicedToArray-CRrLoxQ4.js";import{S as In}from"./simple-select-cKQxVH3U.js";import{u as Ro}from"./dashboard-B7qE-Md0.js";import{d as Va}from"./ArrowDropDown-Ce8TY3aP.js";import{a as qa}from"./api-CQoRx33p.js";import{a as Ka}from"./use-blocklet-logo-6YMz11ob.js";import{D as Xa,C as Qa,P as Ya}from"./react-beautiful-dnd.esm-DCPrD7-r.js";import{I as Ja}from"./iframe-DsIqy16E.js";import{f as fr}from"./index-8eXqqyHQ.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-BWDUV79Q.js";import"./session-1k8BRnYA.js";import"./InfoOutlined-CLiL5VeK.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";import"./raf-schd.esm-B3j6BePR.js";var me={};const Za=rn(va),el=rn(ma),tl=rn(Sa);(function(t){var o=Ae&&Ae.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortRootNavigation=t.cleanOldNavigationHistory=t.checkLink=void 0,t.parseNavigation=ee,t.deepWalk=N,t.isMatchSection=P,t.nestNavigationList=le,t.filterNavigation=ye,t.cleanOrphanNavigation=se,t.joinLink=L,t.flattenNavigation=A,t.splitNavigationBySection=ae;const r=Se,e=o(Za),n=o(ki),i=o(Li),a=o(el),l=o(za),s=o(Da),c=Oa,d=o(Ma),u=o(Ea),h=o(Mi),f=o(Ei),p=o(tl),y=ja,_=Aa;Object.defineProperty(t,"checkLink",{enumerable:!0,get:function(){return _.checkLink}});const b="header",w="/",x="/",k="/";function N(j,G=()=>{},{key:E="children",order:v="first"}={}){function C(O,{index:F=0,parent:$=null,level:Q=0}={}){Array.isArray(O)?O.forEach((J,ce)=>{C(J,{index:ce,parent:$,level:Q+1})}):O&&(v==="first"&&G(O,$,{index:F,level:Q}),C(O[E],{parent:O,level:Q}),v==="last"&&G(O,$,{index:F,level:Q}))}C(j)}function P(j,G){return G===b&&(0,a.default)(j)?!0:Array.isArray(j)?j.includes(G):j===G}function T(j){try{return JSON.parse(j)}catch{return j}}function S(j){return j.map(G=>{const E={...G};return E.role&&(E.role=T(E.role)),E.section&&(E.section=T(E.section)),E.title&&(E.title=T(E.title)),E.description&&(E.description=T(E.description)),E.link&&(E.link=T(E.link)),E})}function I(j="/",G=""){if((0,u.default)(G||""))return G;const E=d.default.join(j,G||x);return E.length>1&&E.endsWith("/")?E.slice(0,E.length-1):E}function g(j,G,{strict:E=!0}={}){let v=j,C=G;return E||(v=v||"/",C=C||"/"),(0,h.default)(v)&&(0,f.default)(C)&&(0,_.checkLink)(C)?Object.keys(v).reduce((O,F)=>(O[F]=I(v[F],C),O),{}):(0,f.default)(v)&&(0,_.checkLink)(v)&&(0,h.default)(C)?Object.keys(C).reduce((O,F)=>(O[F]=I(v,C[F]),O),{}):(0,f.default)(v)&&(0,f.default)(C)?(0,_.checkLink)(v)||(0,_.checkLink)(C)?I(v,C):C:(0,h.default)(v)&&(0,h.default)(C)?[...new Set([...Object.keys(v),...Object.keys(C)])].reduce((F,$)=>(F[$]=I(v[$],C[$]),F),{}):C}function L(j,G){const E=(0,s.default)(j);return N(E,(v,C)=>{const O=v.component||v.child;if(O){const F=G.find($=>$.name===O);F&&(v.link=g(F.link,v.link,{strict:!1}))}else C&&(v.link=g(C.link,v.link))},{key:"items"}),E}function A(j=[],{depth:G=1,transform:E=v=>v}={}){const v=(0,s.default)(j),C=[];return N(v,(O,F,{level:$})=>{if($>=G){const{items:Q=[]}=O;if(Q&&Array.isArray(Q)&&Q.length>0){delete O.items;const J=Q.map(ce=>E(ce,O));if(F)F.items.push(...J);else{const ce=E((0,l.default)(O,["items"]),F);C.push(ce,...J)}}else if($===1){const J=E((0,l.default)(O,["items"]),F);C.push(J)}}else $===1&&C.push(O)},{key:"items",order:"last"}),C}function W(j){if(j.section!=="bottomNavigation")return j;const G={...j};return r.NAVIGATION_I18N_FIELDS.forEach(E=>{const v=G[E];typeof v=="string"&&(G[E]={en:v})}),G}function H(j={}){const G=[];function E(C,O={}){var te,oe,ke,nt,Ft,Gt;const F=[],{children:$=[],meta:Q={}}=C,J=(0,s.default)((Q==null?void 0:Q.navigation)||[]);(0,y.hasStartEngine)(Q)&&((oe=(te=C.meta)==null?void 0:te.capabilities)==null?void 0:oe.navigation)!==!1&&F.push(...J);const ce=O.name||"",tt=O.mountPoint||w,re=C===j?"":Q.name||"",be=C===j?"":C.mountPoint||w;for(const fe of $){if(!(0,y.hasStartEngine)(fe.meta))continue;const hn=fe.meta.name,zi=fe.mountPoint,Di=[ce,re,hn].filter(Boolean).join("."),Oi=fe.meta.navigation||[],Ni=(0,c.joinURL)(tt,be,zi);((nt=(ke=fe.meta)==null?void 0:ke.capabilities)==null?void 0:nt.navigation)!==!1&&G.push({did:fe.meta.did,name:Di,link:Ni,title:fe.meta.title||"",navigation:Oi.map(De=>({section:b,...De}))});const rt=J.find(De=>De.component?De.component===hn:!1);if(rt){if(!rt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const De=E(fe,{mountPoint:be,name:re});De.length>0&&(rt.items=rt.items??[],rt.items.push(...De))}else rt.link=x}else if(((Gt=(Ft=fe.meta)==null?void 0:Ft.capabilities)==null?void 0:Gt.navigation)!==!1){const De=E(fe,{mountPoint:be,name:re}),Wt={title:fe.meta.title,component:hn,id:fe.meta.did};De.length>0?(Wt.items=De,Wt.link=void 0):Wt.link=x,F.push(Wt)}}return F}return{navigationList:E(j),components:G}}function X(j){const G=(0,s.default)(j).filter(E=>E.id);return N(G,(E,v)=>{if(E.items&&E.items.length){for(let C=E.items.length-1;C>=0;C--)E.items[C].id||E.items.splice(C,1);E.items.length===0&&E.component&&(E.link=E.link||x)}v&&(E.parent=v.id,E.id=[v.id,E.id].join(k)),E.from=E.from||"yaml",E.visible=E.visible??!0},{key:"items"}),G}function q(j,G=2){const E=(0,s.default)(j),v=A(E,{depth:G,transform:(C,O)=>(O&&(C._parent||(C._parent=O.id,O.component||(C.link=g(O.link,C.link))),C.section=C.section||O.section||[b],C.visible=C.visible??O.visible,O.role&&(C.role=C.role||O.role)),C.component=[O.component,C.component].filter(Boolean).join("."),C)});return N(v,C=>{C.items&&C.items.length>0&&C.items.reduceRight((O,F)=>{if(F._parent){const $=C.items.findIndex(Q=>Q.id===F._parent);$>=0&&C.items.splice($,1),delete F._parent}return null},null)},{key:"items"}),v}function K(j,G){return G&&Array.isArray(j.items)?j.items.filter(E=>(0,a.default)(E.section)?P(j.section,G):!!P(E.section,G)).map(E=>({...E,section:G})):[]}function ae(j){const G=(0,s.default)(j),E=[];for(const v of G){let F=function($,Q){const J=K($,Q);O.push({...C,section:Q,items:J})};const C=(0,s.default)((0,l.default)(v,["items"])),O=[];if(Array.isArray(v.section))for(const $ of v.section)F(v,$);else if(v.section){const{section:$}=v;F(v,$)}else if(v.items&&v.items.length>0){const $=v.items.reduce((J,ce)=>{const{section:tt=[b]}=ce||{};return J.push(...tt),J},[]),Q=[...new Set($)];for(const J of Q)F(v,J)}else O.push({...v,section:b});E.push(...O)}return E}function le(j=[]){const G=(0,s.default)(j);return G.reduceRight((E,v,C)=>{if(v.parent){const O=G.find(F=>v.section&&F.section?F.section===v.section&&F.id===v.parent:F.id===v.parent);O&&(O.items||(O.items=[]),O.items=[v,...O.items]),G.splice(C,1)}return null},null),G}function ye(j,G=[]){const E=le(j);return N(E,C=>{if(C!=null&&C.component&&(G.some(O=>O.name===C.component)||(C.visible=!1)),C.items&&C.items.length)for(let O=C.items.length-1;O>=0;O--)C.items[O].visible===!1&&C.items.splice(O,1)},{key:"items"}),E.filter(C=>{var O;return!(C.visible===!1||C.items&&Array.isArray(C.items)&&C.items.length>0&&((O=C.items)!=null&&O.every(F=>F.visible===!1)))})}function se(j){return j.map(G=>G.items&&Array.isArray(G.items)&&G.items.length===1&&["header","footer","",void 0,null].includes(G.section)?G.items[0]:G)}const ne=j=>{const[G,E]=(0,p.default)(j,v=>v.id==="/team");return[...G,...E]};t.sortRootNavigation=ne;const V=j=>{const[,G]=(0,p.default)(j,E=>{var C;const v=typeof E.title=="string"?E.title:(C=E.title)==null?void 0:C.en;return E.id==="/team"&&v==="Access"||E.id==="/dashboard"&&v==="Blocklet"});return G};t.cleanOldNavigationHistory=V;function ee(j={},G={}){var re,be;const{beforeProcess:E=te=>te}=G,{navigationList:v,components:C}=H(j);(re=j==null?void 0:j.settings)!=null&&re.navigations&&(Array.isArray(j.settings.navigations)?j.settings.navigations=[...j.settings.navigations].filter(te=>!((te==null?void 0:te.parent)==="/team"&&te.from==="team-tmpl")):j.settings.navigations=[]);const O=S(V(((be=j==null?void 0:j.settings)==null?void 0:be.navigations)||[])).map(W),F=q(E(v)),$=X(F),J=ae($).reduce((te,oe)=>["bottom","social","sessionManager","userCenter"].includes(oe.section)&&oe.items&&oe.items.length>0?(te.push(...oe.items.map(nt=>{const{section:Ft}=oe,Gt=g(oe.link,nt.link),fe=[oe.component,nt.component].filter(Boolean).join(".");return{...nt,section:Ft,link:Gt,component:fe,parent:""}})),te):(te.push(oe),te),[]),ce=A(J,{transform(te,oe){let{component:ke}=te;return oe!=null&&oe.component&&(ke=[oe.component,te.component].filter(Boolean).join(".")),W({...te,component:ke})}});return{navigationList:(0,e.default)(O,ce,(te,oe)=>{const ke=["id","section"];return(0,n.default)((0,i.default)(te,ke),(0,i.default)(oe,ke))}),components:C,builtinList:ce}}})(me);const Io=z.createContext(null),pr="/",nl="header",gr={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ze(Se.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function gn(t,o){return t.section&&o.section?t.section===o.section&&t.id===o.id:t.id===o.id}const We=(t,o,r,e,n=!0)=>({id:t,from:"team-tmpl",title:o,icon:r,link:Ze(Se.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:n}),rl=(t,o,r)=>({id:t,from:"team-tmpl",title:o,role:["owner","admin","member"],section:["dashboard"],link:"",items:r}),ol=(t,o)=>{const r=me.cleanOldNavigationHistory(o);return r.findIndex(n=>n.id==="/team")===-1&&r.unshift(rl("/team",t("navigation.blockletService"),[We("dashboard",t("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),We("did-connect",t("navigation.didConnect"),"tabler:users","/admin/did-connect"),We("website",t("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),We("operation",t("navigation.operations"),"grommet-icons:configure","/admin/operations"),We("integration",t("navigation.integration"),"hugeicons:webhook","/admin/integrations"),We("developer",t("navigation.developer"),"heroicons:command-line","/admin/developers"),We("did-spaces",t("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),We("studio",t("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),r};function vr({name:t}){return m.jsx(Xi,{label:`Uninstalled: ${t}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function il({children:t}){const{blocklet:o,actions:r}=et(),{t:e}=Ne(),{navigationList:n,components:i,builtinList:a}=me.parseNavigation(o,{beforeProcess(P){const T=Re(P);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(gr,S)&&gr[S].forEach(I=>{T.some(g=>g.id===I.id)||T.push(I)})}),ol(e,T)}}),l=Nt({rawNavigation:Re(n),activeSection:nl,components:i}),s=z.useMemo(()=>me.nestNavigationList(Re(l.rawNavigation)),[l.rawNavigation]),c=z.useMemo(()=>{const P=me.filterNavigation(Re(l.rawNavigation),i);return me.joinLink(P,i)},[i,l.rawNavigation]),d=z.useCallback(P=>{if(!P.id)return"";const T=me.flattenNavigation(me.joinLink(s,i)),S=T.find(I=>I.id===P.id);if(S!=null&&S.component){if(!i.some(I=>I.name===S.component))return m.jsx(vr,{name:S.component})}else if(S.parent){const I=T.find(g=>g.id===S.parent);if(I!=null&&I.component&&!i.some(g=>g.name===I.component))return m.jsx(vr,{name:I.component})}return S==null?void 0:S.link},[s,i]),u=z.useCallback(P=>{l.activeSection=P},[l]),h=z.useCallback(P=>{const T=[];me.deepWalk(P,(I,g)=>{const L={...It(I,["children","expand"]),parent:g==null?void 0:g.id};T.push(L)});const S=Re(l.rawNavigation).filter(I=>{if(!l.activeSection)return!1;const g=T.find(L=>gn(L,I));return g?!me.isMatchSection(g.section,l.activeSection):!0});l.rawNavigation=[...S,...T]},[l]),f=z.useCallback((P=[])=>{const T=Re(l.rawNavigation).map(S=>{const I=P.find(g=>gn({...g,section:l.activeSection},S));return I?{...S,...I}:S});l.rawNavigation=T},[l]),p=z.useCallback((P,T=pr)=>P.map(I=>{const g=i.find(H=>H.name===I.component),L=(g==null?void 0:g.link)||T,A=I.items||[],{link:W}=I;return{title:I.title,description:I.description,subtitle:d(I),link:W,icon:I.icon,children:p(A,W||pr),section:I.section,visible:I.visible,parent:I.parent,component:I.component,id:I.id,role:I.role,from:I.from,__base:L}}),[i,d]),y=z.useCallback(P=>{f([P])},[f]),_=z.useCallback(P=>{const T=l.rawNavigation.filter(S=>S.id===P||S.parent===P).map(S=>S.id);l.rawNavigation=Re(l.rawNavigation).filter(S=>!T.includes(S.id))},[l]),b=z.useCallback((P={},T=-1)=>{const S={...P,id:Fa.nanoid(),section:l.activeSection,visible:!0},I=[...l.rawNavigation],g=I.filter(L=>L.section===l.activeSection);if(T<0||T>g.length-1)I.push(S);else{const L=g[T],A=I.findIndex(W=>gn(W,L));I.splice(A,0,S)}return l.rawNavigation=I,S},[l]),w=z.useCallback(P=>{const S=Re(s).filter(I=>me.isMatchSection(I.section,P));return p(S)},[s,p]),x=z.useCallback(async P=>{const S=P.map(I=>ya(I,Ca)).map(I=>{const g={...I};return g.role&&Array.isArray(g.role)&&(g.role=JSON.stringify(g.role)),g.section&&Array.isArray(g.section)&&(g.section=JSON.stringify(g.section)),g.title&&g.title instanceof Object&&(g.title=JSON.stringify(g.title)),g.description&&g.description instanceof Object&&(g.description=JSON.stringify(g.description)),g.link&&g.link instanceof Object&&(g.link=JSON.stringify(g.link)),g});await r.configNavigations(S)},[r]),k=z.useCallback(async()=>{await x([]),l.rawNavigation=Re(a)},[x,l,a]),N=z.useMemo(()=>({state:l,navigation:c,components:i,getNavigationFullLink:d,updateActiveSection:u,updateNavigationItem:y,delNavigationItem:_,addNavigationItem:b,updateNavigationTree:h,getNavigation:w,saveNavigationList:x,resetNavigation:k}),[l,c,i,d,u,y,_,b,h,w,x,k]);return m.jsx(Io.Provider,{value:N,children:t})}function To(){const t=z.useContext(Io);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}var Fe={},Po="Expected a function",mr=NaN,al="[object Symbol]",ll=/^\s+|\s+$/g,sl=/^[-+]0x[0-9a-f]+$/i,cl=/^0b[01]+$/i,dl=/^0o[0-7]+$/i,ul=parseInt,hl=typeof Ae=="object"&&Ae&&Ae.Object===Object&&Ae,fl=typeof self=="object"&&self&&self.Object===Object&&self,pl=hl||fl||Function("return this")(),gl=Object.prototype,vl=gl.toString,ml=Math.max,Sl=Math.min,vn=function(){return pl.Date.now()};function yl(t,o,r){var e,n,i,a,l,s,c=0,d=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(Po);o=Sr(o)||0,en(r)&&(d=!!r.leading,u="maxWait"in r,i=u?ml(Sr(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function f(P){var T=e,S=n;return e=n=void 0,c=P,a=t.apply(S,T),a}function p(P){return c=P,l=setTimeout(b,o),d?f(P):a}function y(P){var T=P-s,S=P-c,I=o-T;return u?Sl(I,i-S):I}function _(P){var T=P-s,S=P-c;return s===void 0||T>=o||T<0||u&&S>=i}function b(){var P=vn();if(_(P))return w(P);l=setTimeout(b,y(P))}function w(P){return l=void 0,h&&e?f(P):(e=n=void 0,a)}function x(){l!==void 0&&clearTimeout(l),c=0,e=s=n=l=void 0}function k(){return l===void 0?a:w(vn())}function N(){var P=vn(),T=_(P);if(e=arguments,n=this,s=P,T){if(l===void 0)return p(s);if(u)return l=setTimeout(b,o),f(s)}return l===void 0&&(l=setTimeout(b,o)),a}return N.cancel=x,N.flush=k,N}function Cl(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(Po);return en(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),yl(t,o,{leading:e,maxWait:o,trailing:n})}function en(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function _l(t){return!!t&&typeof t=="object"}function wl(t){return typeof t=="symbol"||_l(t)&&vl.call(t)==al}function Sr(t){if(typeof t=="number")return t;if(wl(t))return mr;if(en(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=en(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(ll,"");var r=cl.test(t);return r||dl.test(t)?ul(t.slice(2),r?2:8):sl.test(t)?mr:+t}var xl=Cl,on={exports:{}},wt={exports:{}};(function(){var t,o,r,e,n,i;typeof performance<"u"&&performance!==null&&performance.now?wt.exports=function(){return performance.now()}:typeof mt<"u"&&mt!==null&&mt.hrtime?(wt.exports=function(){return(t()-n)/1e6},o=mt.hrtime,t=function(){var a;return a=o(),a[0]*1e9+a[1]},e=t(),i=mt.uptime()*1e9,n=e-i):Date.now?(wt.exports=function(){return Date.now()-r},r=Date.now()):(wt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Ae);var bl=wt.exports,Rl=bl,je=typeof window>"u"?Ae:window,$t=["moz","webkit"],ut="AnimationFrame",ft=je["request"+ut],zt=je["cancel"+ut]||je["cancelRequest"+ut];for(var St=0;!ft&&St<$t.length;St++)ft=je[$t[St]+"Request"+ut],zt=je[$t[St]+"Cancel"+ut]||je[$t[St]+"CancelRequest"+ut];if(!ft||!zt){var mn=0,yr=0,qe=[],Il=1e3/60;ft=function(t){if(qe.length===0){var o=Rl(),r=Math.max(0,Il-(o-mn));mn=r+o,setTimeout(function(){var e=qe.slice(0);qe.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(mn)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return qe.push({handle:++yr,callback:t,cancelled:!1}),yr},zt=function(t){for(var o=0;o<qe.length;o++)qe[o].handle===t&&(qe[o].cancelled=!0)}}on.exports=function(t){return ft.call(je,t)};on.exports.cancel=function(){zt.apply(je,arguments)};on.exports.polyfill=function(t){t||(t=je),t.requestAnimationFrame=ft,t.cancelAnimationFrame=zt};var Tl=on.exports,jn={};Object.defineProperty(jn,"__esModule",{value:!0});jn.default=Pl;function Pl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var kt={};Object.defineProperty(kt,"__esModule",{value:!0});kt.noop=zl;kt.intBetween=Dl;kt.getCoords=Ol;function zl(){}function Dl(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function Ol(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Fe,"__esModule",{value:!0});var Nl=Fe.createHorizontalStrength=Do,kl=Fe.createVerticalStrength=Oo,Ll=Fe.createScrollingComponent=Lo,Ml=Fe.default=Xl;Fe.defaultVerticalStrength=Fe.defaultHorizontalStrength=void 0;var Tt=Wl(z),yt=Lt(_o),El=Ot,Al=Lt(xl),Cr=Lt(Tl),jl=Lt(jn),Fl=Ai,Gl=Lt(Qi),Ht=kt;function Lt(t){return t&&t.__esModule?t:{default:t}}function Wl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Qt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qt=function(r){return typeof r}:Qt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qt(t)}function tn(){return tn=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},tn.apply(this,arguments)}function $l(t,o){if(t==null)return{};var r=Hl(t,o),e,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Hl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i<e.length;i++)n=e[i],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function Bl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function Ul(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function Vl(t,o,r){return o&&Ul(t.prototype,o),t}function ql(t,o){return o&&(Qt(o)==="object"||typeof o=="function")?o:xt(t)}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Tn(t)}function Kl(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Pn(t,o)}function Pn(t,o){return Pn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Pn(t,o)}function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ct(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var zo=150;function Do(t){return function(r,e){var n=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,t),c=e.x>=n&&e.x<=n+i,d=c&&e.y>=a&&e.y<=a+l;if(d){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+i-s)return-(n+i-e.x-s)/s}return 0}}function Oo(t){return function(r,e){var n=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,t),c=e.y>=n&&e.y<=n+i,d=c&&e.x>=a&&e.x<=a+l;if(d){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+i-s)return-(n+i-e.y-s)/s}return 0}}var No=Do(zo);Fe.defaultHorizontalStrength=No;var ko=Oo(zo);Fe.defaultVerticalStrength=ko;function Lo(t){var o=function(r){Kl(e,r);function e(n,i){var a;return Bl(this,e),a=ql(this,Tn(e).call(this,n,i)),Ct(xt(xt(a)),"updateScrolling",(0,Al.default)(function(l){var s=a.container.getBoundingClientRect(),c=s.left,d=s.top,u=s.width,h=s.height,f={x:c,y:d,w:u,h},p=(0,Ht.getCoords)(l),y=a.props,_=y.horizontalStrength,b=y.verticalStrength;a.scaleX=_(f,p),a.scaleY=b(f,p),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),Ct(xt(xt(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=Tt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Vl(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,El.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var c=i.scaleX,d=i.scaleY,u=i.container,h=i.props,f=h.strengthMultiplier,p=h.onScrollChange;if(f===0||c+d===0){i.stopScrolling();return}if(a+=1,a%2){var y=u.scrollLeft,_=u.scrollTop,b=u.scrollWidth,w=u.scrollHeight,x=u.clientWidth,k=u.clientHeight,N=c?u.scrollLeft=(0,Ht.intBetween)(0,b-x,y+c*f):y,P=d?u.scrollTop=(0,Ht.intBetween)(0,w-k,_+d*f):_;p(N,P)}i.frame=(0,Cr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Cr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=$l(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Tt.default.createElement(t,tn({ref:this.wrappedInstance},a))}}]),e}(Tt.Component);return Ct(o,"displayName","Scrolling(".concat((0,jl.default)(t),")")),Ct(o,"propTypes",{dragDropManager:yt.default.object.isRequired,onScrollChange:yt.default.func,verticalStrength:yt.default.func,horizontalStrength:yt.default.func,strengthMultiplier:yt.default.number}),Ct(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:ko,horizontalStrength:No,strengthMultiplier:30}),(0,Gl.default)(o,t)}function Xl(t){var o=Lo(t);return function(r){return Tt.default.createElement(Fl.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Tt.default.createElement(o,tn({},r,{dragDropManager:n}))})}}function Mo(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function Eo(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Ao(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}Mo.__suppressDeprecationWarning=!0;Eo.__suppressDeprecationWarning=!0;Ao.__suppressDeprecationWarning=!0;function Mt(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var i=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
2
+ import{a as rn,e as Ae,r as z,d as Ot,g as go,b as B}from"./vendor-react-DEoibe3W.js";import{c2 as ki,aT as Li,c3 as Mi,bF as Ei,k as Se,a as Ne,c4 as Ai,c5 as D,c6 as ji,c7 as or,c8 as Fi,c9 as ir,ca as Gi,cb as Wi,I as ge,a8 as Mn,s as En,bn as vo,_ as $i,l as mo,a3 as _t,ar as Hi,B as Bi,bE as So,f as Ui}from"./vendor-ux-did-connect-CX7qG3_M.js";import{a as Nt,u as ie,G as Vi,i as yo,f as Co,v as qi,b as Ki}from"./vendor-hooks-BCm626KH.js";import{j as m,E as Xi,b6 as _o,cp as Qi,cq as ue,cr as M,_ as he,cs as Yi,H as R,co as Ji,ct as Zi,cu as ea,cv as ta,cw as na,cx as ra,cy as oa,cz as ia,cA as aa,cB as la,s as Ve,aa as Y,T as Te,U as sa,W as ar,I as ze,b7 as bn,y as Zt,v as An,O as at,N as Rn,ad as ca,ab as da,bp as wo,bZ as ua,ah as ha,as as lr,ai as fn,w as Xt,e as fa,F as pa,bm as sr,bs as ga,bo as cr,q as dr,bx as pn,c9 as ur}from"./vendor-mui-core-wlbruq2I.js";import{aD as va,aE as ma,aF as Sa,A as Ze,P as Re,D as It,o as ya,c as Ca,v as mt,g as _a,aB as wa,C as dt,aG as xo,aH as xa,a4 as hr,aI as ba,b as Ra,J as Ia,H as Ta,i as Pa,n as Le}from"./vendor-utils-B3iZkn2R.js";import{r as za}from"./omit-O1pUD7ku.js";import{r as Da}from"./cloneDeep-ro06l5HL.js";import{r as Oa,c as Je,P as Qe,Q as Na,e as ka,V as La}from"./vendor-arcblock-B4hgrXYM.js";import{p as Ma}from"./index-BpvW-cUy.js";import{aG as Ea,a1 as Aa,a8 as ja,G as et,f as Fa,D as bo,aH as Ga,aI as Wa,aC as $a,aJ as Ha,aD as Ge,aK as Ba}from"./index-DQjZ74P0.js";import{_ as de,a as lt,b as _e,c as we,d as xe,r as Ua}from"./slicedToArray-CRrLoxQ4.js";import{S as In}from"./simple-select-cKQxVH3U.js";import{u as Ro}from"./dashboard-B7qE-Md0.js";import{d as Va}from"./ArrowDropDown-Ce8TY3aP.js";import{a as qa}from"./api-CQoRx33p.js";import{a as Ka}from"./use-blocklet-logo-6YMz11ob.js";import{D as Xa,C as Qa,P as Ya}from"./react-beautiful-dnd.esm-DCPrD7-r.js";import{I as Ja}from"./iframe-DsIqy16E.js";import{f as fr}from"./index-8eXqqyHQ.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-CwT4-jkw.js";import"./session-1k8BRnYA.js";import"./InfoOutlined-CLiL5VeK.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";import"./raf-schd.esm-B3j6BePR.js";var me={};const Za=rn(va),el=rn(ma),tl=rn(Sa);(function(t){var o=Ae&&Ae.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortRootNavigation=t.cleanOldNavigationHistory=t.checkLink=void 0,t.parseNavigation=ee,t.deepWalk=N,t.isMatchSection=P,t.nestNavigationList=le,t.filterNavigation=ye,t.cleanOrphanNavigation=se,t.joinLink=L,t.flattenNavigation=A,t.splitNavigationBySection=ae;const r=Se,e=o(Za),n=o(ki),i=o(Li),a=o(el),l=o(za),s=o(Da),c=Oa,d=o(Ma),u=o(Ea),h=o(Mi),f=o(Ei),p=o(tl),y=ja,_=Aa;Object.defineProperty(t,"checkLink",{enumerable:!0,get:function(){return _.checkLink}});const b="header",w="/",x="/",k="/";function N(j,G=()=>{},{key:E="children",order:v="first"}={}){function C(O,{index:F=0,parent:$=null,level:Q=0}={}){Array.isArray(O)?O.forEach((J,ce)=>{C(J,{index:ce,parent:$,level:Q+1})}):O&&(v==="first"&&G(O,$,{index:F,level:Q}),C(O[E],{parent:O,level:Q}),v==="last"&&G(O,$,{index:F,level:Q}))}C(j)}function P(j,G){return G===b&&(0,a.default)(j)?!0:Array.isArray(j)?j.includes(G):j===G}function T(j){try{return JSON.parse(j)}catch{return j}}function S(j){return j.map(G=>{const E={...G};return E.role&&(E.role=T(E.role)),E.section&&(E.section=T(E.section)),E.title&&(E.title=T(E.title)),E.description&&(E.description=T(E.description)),E.link&&(E.link=T(E.link)),E})}function I(j="/",G=""){if((0,u.default)(G||""))return G;const E=d.default.join(j,G||x);return E.length>1&&E.endsWith("/")?E.slice(0,E.length-1):E}function g(j,G,{strict:E=!0}={}){let v=j,C=G;return E||(v=v||"/",C=C||"/"),(0,h.default)(v)&&(0,f.default)(C)&&(0,_.checkLink)(C)?Object.keys(v).reduce((O,F)=>(O[F]=I(v[F],C),O),{}):(0,f.default)(v)&&(0,_.checkLink)(v)&&(0,h.default)(C)?Object.keys(C).reduce((O,F)=>(O[F]=I(v,C[F]),O),{}):(0,f.default)(v)&&(0,f.default)(C)?(0,_.checkLink)(v)||(0,_.checkLink)(C)?I(v,C):C:(0,h.default)(v)&&(0,h.default)(C)?[...new Set([...Object.keys(v),...Object.keys(C)])].reduce((F,$)=>(F[$]=I(v[$],C[$]),F),{}):C}function L(j,G){const E=(0,s.default)(j);return N(E,(v,C)=>{const O=v.component||v.child;if(O){const F=G.find($=>$.name===O);F&&(v.link=g(F.link,v.link,{strict:!1}))}else C&&(v.link=g(C.link,v.link))},{key:"items"}),E}function A(j=[],{depth:G=1,transform:E=v=>v}={}){const v=(0,s.default)(j),C=[];return N(v,(O,F,{level:$})=>{if($>=G){const{items:Q=[]}=O;if(Q&&Array.isArray(Q)&&Q.length>0){delete O.items;const J=Q.map(ce=>E(ce,O));if(F)F.items.push(...J);else{const ce=E((0,l.default)(O,["items"]),F);C.push(ce,...J)}}else if($===1){const J=E((0,l.default)(O,["items"]),F);C.push(J)}}else $===1&&C.push(O)},{key:"items",order:"last"}),C}function W(j){if(j.section!=="bottomNavigation")return j;const G={...j};return r.NAVIGATION_I18N_FIELDS.forEach(E=>{const v=G[E];typeof v=="string"&&(G[E]={en:v})}),G}function H(j={}){const G=[];function E(C,O={}){var te,oe,ke,nt,Ft,Gt;const F=[],{children:$=[],meta:Q={}}=C,J=(0,s.default)((Q==null?void 0:Q.navigation)||[]);(0,y.hasStartEngine)(Q)&&((oe=(te=C.meta)==null?void 0:te.capabilities)==null?void 0:oe.navigation)!==!1&&F.push(...J);const ce=O.name||"",tt=O.mountPoint||w,re=C===j?"":Q.name||"",be=C===j?"":C.mountPoint||w;for(const fe of $){if(!(0,y.hasStartEngine)(fe.meta))continue;const hn=fe.meta.name,zi=fe.mountPoint,Di=[ce,re,hn].filter(Boolean).join("."),Oi=fe.meta.navigation||[],Ni=(0,c.joinURL)(tt,be,zi);((nt=(ke=fe.meta)==null?void 0:ke.capabilities)==null?void 0:nt.navigation)!==!1&&G.push({did:fe.meta.did,name:Di,link:Ni,title:fe.meta.title||"",navigation:Oi.map(De=>({section:b,...De}))});const rt=J.find(De=>De.component?De.component===hn:!1);if(rt){if(!rt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const De=E(fe,{mountPoint:be,name:re});De.length>0&&(rt.items=rt.items??[],rt.items.push(...De))}else rt.link=x}else if(((Gt=(Ft=fe.meta)==null?void 0:Ft.capabilities)==null?void 0:Gt.navigation)!==!1){const De=E(fe,{mountPoint:be,name:re}),Wt={title:fe.meta.title,component:hn,id:fe.meta.did};De.length>0?(Wt.items=De,Wt.link=void 0):Wt.link=x,F.push(Wt)}}return F}return{navigationList:E(j),components:G}}function X(j){const G=(0,s.default)(j).filter(E=>E.id);return N(G,(E,v)=>{if(E.items&&E.items.length){for(let C=E.items.length-1;C>=0;C--)E.items[C].id||E.items.splice(C,1);E.items.length===0&&E.component&&(E.link=E.link||x)}v&&(E.parent=v.id,E.id=[v.id,E.id].join(k)),E.from=E.from||"yaml",E.visible=E.visible??!0},{key:"items"}),G}function q(j,G=2){const E=(0,s.default)(j),v=A(E,{depth:G,transform:(C,O)=>(O&&(C._parent||(C._parent=O.id,O.component||(C.link=g(O.link,C.link))),C.section=C.section||O.section||[b],C.visible=C.visible??O.visible,O.role&&(C.role=C.role||O.role)),C.component=[O.component,C.component].filter(Boolean).join("."),C)});return N(v,C=>{C.items&&C.items.length>0&&C.items.reduceRight((O,F)=>{if(F._parent){const $=C.items.findIndex(Q=>Q.id===F._parent);$>=0&&C.items.splice($,1),delete F._parent}return null},null)},{key:"items"}),v}function K(j,G){return G&&Array.isArray(j.items)?j.items.filter(E=>(0,a.default)(E.section)?P(j.section,G):!!P(E.section,G)).map(E=>({...E,section:G})):[]}function ae(j){const G=(0,s.default)(j),E=[];for(const v of G){let F=function($,Q){const J=K($,Q);O.push({...C,section:Q,items:J})};const C=(0,s.default)((0,l.default)(v,["items"])),O=[];if(Array.isArray(v.section))for(const $ of v.section)F(v,$);else if(v.section){const{section:$}=v;F(v,$)}else if(v.items&&v.items.length>0){const $=v.items.reduce((J,ce)=>{const{section:tt=[b]}=ce||{};return J.push(...tt),J},[]),Q=[...new Set($)];for(const J of Q)F(v,J)}else O.push({...v,section:b});E.push(...O)}return E}function le(j=[]){const G=(0,s.default)(j);return G.reduceRight((E,v,C)=>{if(v.parent){const O=G.find(F=>v.section&&F.section?F.section===v.section&&F.id===v.parent:F.id===v.parent);O&&(O.items||(O.items=[]),O.items=[v,...O.items]),G.splice(C,1)}return null},null),G}function ye(j,G=[]){const E=le(j);return N(E,C=>{if(C!=null&&C.component&&(G.some(O=>O.name===C.component)||(C.visible=!1)),C.items&&C.items.length)for(let O=C.items.length-1;O>=0;O--)C.items[O].visible===!1&&C.items.splice(O,1)},{key:"items"}),E.filter(C=>{var O;return!(C.visible===!1||C.items&&Array.isArray(C.items)&&C.items.length>0&&((O=C.items)!=null&&O.every(F=>F.visible===!1)))})}function se(j){return j.map(G=>G.items&&Array.isArray(G.items)&&G.items.length===1&&["header","footer","",void 0,null].includes(G.section)?G.items[0]:G)}const ne=j=>{const[G,E]=(0,p.default)(j,v=>v.id==="/team");return[...G,...E]};t.sortRootNavigation=ne;const V=j=>{const[,G]=(0,p.default)(j,E=>{var C;const v=typeof E.title=="string"?E.title:(C=E.title)==null?void 0:C.en;return E.id==="/team"&&v==="Access"||E.id==="/dashboard"&&v==="Blocklet"});return G};t.cleanOldNavigationHistory=V;function ee(j={},G={}){var re,be;const{beforeProcess:E=te=>te}=G,{navigationList:v,components:C}=H(j);(re=j==null?void 0:j.settings)!=null&&re.navigations&&(Array.isArray(j.settings.navigations)?j.settings.navigations=[...j.settings.navigations].filter(te=>!((te==null?void 0:te.parent)==="/team"&&te.from==="team-tmpl")):j.settings.navigations=[]);const O=S(V(((be=j==null?void 0:j.settings)==null?void 0:be.navigations)||[])).map(W),F=q(E(v)),$=X(F),J=ae($).reduce((te,oe)=>["bottom","social","sessionManager","userCenter"].includes(oe.section)&&oe.items&&oe.items.length>0?(te.push(...oe.items.map(nt=>{const{section:Ft}=oe,Gt=g(oe.link,nt.link),fe=[oe.component,nt.component].filter(Boolean).join(".");return{...nt,section:Ft,link:Gt,component:fe,parent:""}})),te):(te.push(oe),te),[]),ce=A(J,{transform(te,oe){let{component:ke}=te;return oe!=null&&oe.component&&(ke=[oe.component,te.component].filter(Boolean).join(".")),W({...te,component:ke})}});return{navigationList:(0,e.default)(O,ce,(te,oe)=>{const ke=["id","section"];return(0,n.default)((0,i.default)(te,ke),(0,i.default)(oe,ke))}),components:C,builtinList:ce}}})(me);const Io=z.createContext(null),pr="/",nl="header",gr={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Se.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ze(Se.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function gn(t,o){return t.section&&o.section?t.section===o.section&&t.id===o.id:t.id===o.id}const We=(t,o,r,e,n=!0)=>({id:t,from:"team-tmpl",title:o,icon:r,link:Ze(Se.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:n}),rl=(t,o,r)=>({id:t,from:"team-tmpl",title:o,role:["owner","admin","member"],section:["dashboard"],link:"",items:r}),ol=(t,o)=>{const r=me.cleanOldNavigationHistory(o);return r.findIndex(n=>n.id==="/team")===-1&&r.unshift(rl("/team",t("navigation.blockletService"),[We("dashboard",t("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),We("did-connect",t("navigation.didConnect"),"tabler:users","/admin/did-connect"),We("website",t("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),We("operation",t("navigation.operations"),"grommet-icons:configure","/admin/operations"),We("integration",t("navigation.integration"),"hugeicons:webhook","/admin/integrations"),We("developer",t("navigation.developer"),"heroicons:command-line","/admin/developers"),We("did-spaces",t("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),We("studio",t("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),r};function vr({name:t}){return m.jsx(Xi,{label:`Uninstalled: ${t}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function il({children:t}){const{blocklet:o,actions:r}=et(),{t:e}=Ne(),{navigationList:n,components:i,builtinList:a}=me.parseNavigation(o,{beforeProcess(P){const T=Re(P);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(gr,S)&&gr[S].forEach(I=>{T.some(g=>g.id===I.id)||T.push(I)})}),ol(e,T)}}),l=Nt({rawNavigation:Re(n),activeSection:nl,components:i}),s=z.useMemo(()=>me.nestNavigationList(Re(l.rawNavigation)),[l.rawNavigation]),c=z.useMemo(()=>{const P=me.filterNavigation(Re(l.rawNavigation),i);return me.joinLink(P,i)},[i,l.rawNavigation]),d=z.useCallback(P=>{if(!P.id)return"";const T=me.flattenNavigation(me.joinLink(s,i)),S=T.find(I=>I.id===P.id);if(S!=null&&S.component){if(!i.some(I=>I.name===S.component))return m.jsx(vr,{name:S.component})}else if(S.parent){const I=T.find(g=>g.id===S.parent);if(I!=null&&I.component&&!i.some(g=>g.name===I.component))return m.jsx(vr,{name:I.component})}return S==null?void 0:S.link},[s,i]),u=z.useCallback(P=>{l.activeSection=P},[l]),h=z.useCallback(P=>{const T=[];me.deepWalk(P,(I,g)=>{const L={...It(I,["children","expand"]),parent:g==null?void 0:g.id};T.push(L)});const S=Re(l.rawNavigation).filter(I=>{if(!l.activeSection)return!1;const g=T.find(L=>gn(L,I));return g?!me.isMatchSection(g.section,l.activeSection):!0});l.rawNavigation=[...S,...T]},[l]),f=z.useCallback((P=[])=>{const T=Re(l.rawNavigation).map(S=>{const I=P.find(g=>gn({...g,section:l.activeSection},S));return I?{...S,...I}:S});l.rawNavigation=T},[l]),p=z.useCallback((P,T=pr)=>P.map(I=>{const g=i.find(H=>H.name===I.component),L=(g==null?void 0:g.link)||T,A=I.items||[],{link:W}=I;return{title:I.title,description:I.description,subtitle:d(I),link:W,icon:I.icon,children:p(A,W||pr),section:I.section,visible:I.visible,parent:I.parent,component:I.component,id:I.id,role:I.role,from:I.from,__base:L}}),[i,d]),y=z.useCallback(P=>{f([P])},[f]),_=z.useCallback(P=>{const T=l.rawNavigation.filter(S=>S.id===P||S.parent===P).map(S=>S.id);l.rawNavigation=Re(l.rawNavigation).filter(S=>!T.includes(S.id))},[l]),b=z.useCallback((P={},T=-1)=>{const S={...P,id:Fa.nanoid(),section:l.activeSection,visible:!0},I=[...l.rawNavigation],g=I.filter(L=>L.section===l.activeSection);if(T<0||T>g.length-1)I.push(S);else{const L=g[T],A=I.findIndex(W=>gn(W,L));I.splice(A,0,S)}return l.rawNavigation=I,S},[l]),w=z.useCallback(P=>{const S=Re(s).filter(I=>me.isMatchSection(I.section,P));return p(S)},[s,p]),x=z.useCallback(async P=>{const S=P.map(I=>ya(I,Ca)).map(I=>{const g={...I};return g.role&&Array.isArray(g.role)&&(g.role=JSON.stringify(g.role)),g.section&&Array.isArray(g.section)&&(g.section=JSON.stringify(g.section)),g.title&&g.title instanceof Object&&(g.title=JSON.stringify(g.title)),g.description&&g.description instanceof Object&&(g.description=JSON.stringify(g.description)),g.link&&g.link instanceof Object&&(g.link=JSON.stringify(g.link)),g});await r.configNavigations(S)},[r]),k=z.useCallback(async()=>{await x([]),l.rawNavigation=Re(a)},[x,l,a]),N=z.useMemo(()=>({state:l,navigation:c,components:i,getNavigationFullLink:d,updateActiveSection:u,updateNavigationItem:y,delNavigationItem:_,addNavigationItem:b,updateNavigationTree:h,getNavigation:w,saveNavigationList:x,resetNavigation:k}),[l,c,i,d,u,y,_,b,h,w,x,k]);return m.jsx(Io.Provider,{value:N,children:t})}function To(){const t=z.useContext(Io);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}var Fe={},Po="Expected a function",mr=NaN,al="[object Symbol]",ll=/^\s+|\s+$/g,sl=/^[-+]0x[0-9a-f]+$/i,cl=/^0b[01]+$/i,dl=/^0o[0-7]+$/i,ul=parseInt,hl=typeof Ae=="object"&&Ae&&Ae.Object===Object&&Ae,fl=typeof self=="object"&&self&&self.Object===Object&&self,pl=hl||fl||Function("return this")(),gl=Object.prototype,vl=gl.toString,ml=Math.max,Sl=Math.min,vn=function(){return pl.Date.now()};function yl(t,o,r){var e,n,i,a,l,s,c=0,d=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(Po);o=Sr(o)||0,en(r)&&(d=!!r.leading,u="maxWait"in r,i=u?ml(Sr(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function f(P){var T=e,S=n;return e=n=void 0,c=P,a=t.apply(S,T),a}function p(P){return c=P,l=setTimeout(b,o),d?f(P):a}function y(P){var T=P-s,S=P-c,I=o-T;return u?Sl(I,i-S):I}function _(P){var T=P-s,S=P-c;return s===void 0||T>=o||T<0||u&&S>=i}function b(){var P=vn();if(_(P))return w(P);l=setTimeout(b,y(P))}function w(P){return l=void 0,h&&e?f(P):(e=n=void 0,a)}function x(){l!==void 0&&clearTimeout(l),c=0,e=s=n=l=void 0}function k(){return l===void 0?a:w(vn())}function N(){var P=vn(),T=_(P);if(e=arguments,n=this,s=P,T){if(l===void 0)return p(s);if(u)return l=setTimeout(b,o),f(s)}return l===void 0&&(l=setTimeout(b,o)),a}return N.cancel=x,N.flush=k,N}function Cl(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(Po);return en(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),yl(t,o,{leading:e,maxWait:o,trailing:n})}function en(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function _l(t){return!!t&&typeof t=="object"}function wl(t){return typeof t=="symbol"||_l(t)&&vl.call(t)==al}function Sr(t){if(typeof t=="number")return t;if(wl(t))return mr;if(en(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=en(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(ll,"");var r=cl.test(t);return r||dl.test(t)?ul(t.slice(2),r?2:8):sl.test(t)?mr:+t}var xl=Cl,on={exports:{}},wt={exports:{}};(function(){var t,o,r,e,n,i;typeof performance<"u"&&performance!==null&&performance.now?wt.exports=function(){return performance.now()}:typeof mt<"u"&&mt!==null&&mt.hrtime?(wt.exports=function(){return(t()-n)/1e6},o=mt.hrtime,t=function(){var a;return a=o(),a[0]*1e9+a[1]},e=t(),i=mt.uptime()*1e9,n=e-i):Date.now?(wt.exports=function(){return Date.now()-r},r=Date.now()):(wt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Ae);var bl=wt.exports,Rl=bl,je=typeof window>"u"?Ae:window,$t=["moz","webkit"],ut="AnimationFrame",ft=je["request"+ut],zt=je["cancel"+ut]||je["cancelRequest"+ut];for(var St=0;!ft&&St<$t.length;St++)ft=je[$t[St]+"Request"+ut],zt=je[$t[St]+"Cancel"+ut]||je[$t[St]+"CancelRequest"+ut];if(!ft||!zt){var mn=0,yr=0,qe=[],Il=1e3/60;ft=function(t){if(qe.length===0){var o=Rl(),r=Math.max(0,Il-(o-mn));mn=r+o,setTimeout(function(){var e=qe.slice(0);qe.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(mn)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return qe.push({handle:++yr,callback:t,cancelled:!1}),yr},zt=function(t){for(var o=0;o<qe.length;o++)qe[o].handle===t&&(qe[o].cancelled=!0)}}on.exports=function(t){return ft.call(je,t)};on.exports.cancel=function(){zt.apply(je,arguments)};on.exports.polyfill=function(t){t||(t=je),t.requestAnimationFrame=ft,t.cancelAnimationFrame=zt};var Tl=on.exports,jn={};Object.defineProperty(jn,"__esModule",{value:!0});jn.default=Pl;function Pl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var kt={};Object.defineProperty(kt,"__esModule",{value:!0});kt.noop=zl;kt.intBetween=Dl;kt.getCoords=Ol;function zl(){}function Dl(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function Ol(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Fe,"__esModule",{value:!0});var Nl=Fe.createHorizontalStrength=Do,kl=Fe.createVerticalStrength=Oo,Ll=Fe.createScrollingComponent=Lo,Ml=Fe.default=Xl;Fe.defaultVerticalStrength=Fe.defaultHorizontalStrength=void 0;var Tt=Wl(z),yt=Lt(_o),El=Ot,Al=Lt(xl),Cr=Lt(Tl),jl=Lt(jn),Fl=Ai,Gl=Lt(Qi),Ht=kt;function Lt(t){return t&&t.__esModule?t:{default:t}}function Wl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Qt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qt=function(r){return typeof r}:Qt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qt(t)}function tn(){return tn=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},tn.apply(this,arguments)}function $l(t,o){if(t==null)return{};var r=Hl(t,o),e,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Hl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i<e.length;i++)n=e[i],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function Bl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function Ul(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function Vl(t,o,r){return o&&Ul(t.prototype,o),t}function ql(t,o){return o&&(Qt(o)==="object"||typeof o=="function")?o:xt(t)}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Tn(t)}function Kl(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Pn(t,o)}function Pn(t,o){return Pn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Pn(t,o)}function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ct(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var zo=150;function Do(t){return function(r,e){var n=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,t),c=e.x>=n&&e.x<=n+i,d=c&&e.y>=a&&e.y<=a+l;if(d){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+i-s)return-(n+i-e.x-s)/s}return 0}}function Oo(t){return function(r,e){var n=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,t),c=e.y>=n&&e.y<=n+i,d=c&&e.x>=a&&e.x<=a+l;if(d){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+i-s)return-(n+i-e.y-s)/s}return 0}}var No=Do(zo);Fe.defaultHorizontalStrength=No;var ko=Oo(zo);Fe.defaultVerticalStrength=ko;function Lo(t){var o=function(r){Kl(e,r);function e(n,i){var a;return Bl(this,e),a=ql(this,Tn(e).call(this,n,i)),Ct(xt(xt(a)),"updateScrolling",(0,Al.default)(function(l){var s=a.container.getBoundingClientRect(),c=s.left,d=s.top,u=s.width,h=s.height,f={x:c,y:d,w:u,h},p=(0,Ht.getCoords)(l),y=a.props,_=y.horizontalStrength,b=y.verticalStrength;a.scaleX=_(f,p),a.scaleY=b(f,p),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),Ct(xt(xt(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=Tt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Vl(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,El.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var c=i.scaleX,d=i.scaleY,u=i.container,h=i.props,f=h.strengthMultiplier,p=h.onScrollChange;if(f===0||c+d===0){i.stopScrolling();return}if(a+=1,a%2){var y=u.scrollLeft,_=u.scrollTop,b=u.scrollWidth,w=u.scrollHeight,x=u.clientWidth,k=u.clientHeight,N=c?u.scrollLeft=(0,Ht.intBetween)(0,b-x,y+c*f):y,P=d?u.scrollTop=(0,Ht.intBetween)(0,w-k,_+d*f):_;p(N,P)}i.frame=(0,Cr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Cr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=$l(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Tt.default.createElement(t,tn({ref:this.wrappedInstance},a))}}]),e}(Tt.Component);return Ct(o,"displayName","Scrolling(".concat((0,jl.default)(t),")")),Ct(o,"propTypes",{dragDropManager:yt.default.object.isRequired,onScrollChange:yt.default.func,verticalStrength:yt.default.func,horizontalStrength:yt.default.func,strengthMultiplier:yt.default.number}),Ct(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:ko,horizontalStrength:No,strengthMultiplier:30}),(0,Gl.default)(o,t)}function Xl(t){var o=Lo(t);return function(r){return Tt.default.createElement(Fl.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Tt.default.createElement(o,tn({},r,{dragDropManager:n}))})}}function Mo(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function Eo(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Ao(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}Mo.__suppressDeprecationWarning=!0;Eo.__suppressDeprecationWarning=!0;Ao.__suppressDeprecationWarning=!0;function Mt(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var i=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+i+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?`
5
5
  `+r:"")+(e!==null?`
@@ -1 +1 @@
1
- import{e as Y,j as t,aa as u,v as q,ab as Z,a3 as ee,y as ne}from"./vendor-mui-core-wlbruq2I.js";import{f as se,h as oe,r as S,L as te}from"./vendor-react-DEoibe3W.js";import{a as re,aY as ae,p as ce,b4 as ie,b5 as le,F as de,b6 as pe,b3 as me,k as ue,b7 as fe,a3 as k,a8 as ge}from"./vendor-ux-did-connect-CX7qG3_M.js";import{b as he,u as x,m as we,s as ke}from"./vendor-hooks-BCm626KH.js";import{u as xe}from"./use-passport-id-B-b-_oYF.js";import{H as U}from"./vendor-arcblock-B4hgrXYM.js";import{c as ve,I as be,z as Ce,A as Te,J as _e,ae as Ie,af as ye}from"./vendor-utils-B3iZkn2R.js";import{g as E}from"./get-safe-url-CwT4-jkw.js";import{u as Le,p as P}from"./index-DQjZ74P0.js";import{d as p}from"./logger-KwxABgLK.js";import"./lottie-web-jYmAQWuC.js";const j="authorization_response",De=me(),Se="blocklet:onLogin",f=new BroadcastChannel(Se);function Fe(){const{getPassportId:R}=xe(),{session:M,connectApi:N}=Le(),{t:a,locale:O}=re(),A=se(),[l]=oe(),{encrypt:B}=ae(),H=Y(),v=ce();let c={};try{c=JSON.parse(decodeURIComponent(ie(l.get("params"))))}catch(s){console.error("parse connect params failed",s)}ve(l.get("popup"));const{action:m="login",passkeyBehavior:W="both",extraParams:d={},messages:F,...g}=c;S.useEffect(()=>{d.inviter&&window.localStorage.setItem("inviter",d.inviter)},[d.inviter]);const i=l.get("redirect"),b=l.get("opener"),h=l.get("_ek_");d.passportId=R(),m==="login"&&be(g.forceConnected)&&(g.forceConnected=!1);const w=s=>h?B(JSON.stringify(s),h):s,C=S.useMemo(()=>i||!window.opener?"redirect":"popup",[i]),T=async s=>{const e=await De.federated.getTrustedDomains();if(!b){e.forEach(n=>{window.opener.postMessage(s,Ie(n)),window.opener.postMessage(s,ye(n))});return}const o=new URL(b);if(!e.includes(o.hostname))throw k.error(a("login.invalidOpenerUrl")),new Error("Invalid login caller");window.opener.postMessage(s,o.origin)},_=({encrypted:s=!0,...e},o,n)=>{p("connect page onSuccess",{encrypted:s,result:e,options:n}),s&&(e.sessionToken&&(e.sessionToken=o(e.sessionToken)),e.refreshToken&&(e.refreshToken=o(e.refreshToken)),e.visitorId&&(e.visitorId=o(e.visitorId)),p("connect page onSuccess decrypt",{result:e})),e.visitorId&&localStorage.setItem("__visitor_id",e.visitorId);const L={type:j,response:e,options:n};({redirect:()=>{p("connect page onSuccess redirect",e),setTimeout(()=>{if(i){const D=decodeURIComponent(i),r=P(D);h&&r.searchParams.set("encrypted",!0),e.sessionToken&&r.searchParams.set("sessionToken",w(e.sessionToken)),e.refreshToken&&r.searchParams.set("refreshToken",w(e.refreshToken)),e.visitorId&&r.searchParams.set("visitorId",w(e.visitorId)),n!=null&&n.connected_did&&r.searchParams.set("connected_did",n.connected_did),n!=null&&n.connected_pk&&r.searchParams.set("connected_pk",n.connected_pk),n!=null&&n.connected_app&&r.searchParams.set("connected_app",n.connected_app),n!=null&&n.connected_wallet_os&&r.searchParams.set("connected_wallet_os",n.connected_wallet_os),n!=null&&n.saveConnect&&r.searchParams.set("saveConnect",n.saveConnect),f.postMessage({..._e(e,["sessionToken","refreshToken","visitorId"])}),ge(D)?window.location.replace(E(r.href,{allowDomains:null})):A(`${r.pathname}${r.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:async()=>{p("connect page onSuccess popup",L),await T(L),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[C]()},z=s=>{const e={type:j,error:s.message,errorDescription:s.message};p("connect page onError",{res:e}),{redirect:()=>{k.error(s.message)},popup:()=>{T(e)}}[C]()},K=he(()=>{var e;if(m!=="login")return null;const s=((e=window.blocklet)==null?void 0:e.trustedFactories)||[];return(s==null?void 0:s.length)>0?t.jsxs(u,{children:[a("exchangePassport.tooltip1"),t.jsx(u,{component:te,reloadDocument:!0,to:Ce(Te(ue.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport"),{redirect:i||"/"}),sx:{color:le.primary.light,"&:hover":{textDecoration:"underline dashed"}},children:a("exchangePassport.tooltip2")},"exchange-passport"),t.jsx(u,{component:"ul",sx:{pl:1.5},children:s.map(o=>t.jsx(u,{component:"li",children:o},o))})]}):null},[m]),$=x(async()=>{if(!i)return!0;let s;try{s=new URL(i)}catch{return!1}let e;try{e=new URL(c==null?void 0:c.baseUrl)}catch{try{e=new URL(c==null?void 0:c.prefix)}catch(o){console.error("baseUrl and prefix are both invalid",o)}}if(e){let o=[];if(e.origin===window.location.origin)o=window.blocklet.domainAliases||[];else{const n=await fe(e.origin);o=(n==null?void 0:n.domainAliases)||[]}if(!o.includes(s.hostname))return k.error(a("login.invalidRedirectUrl")),!1}return!0}),I=x(()=>{const s=decodeURIComponent(i),e=P(s);window.location.replace(E(e.href,{allowDomains:null}))}),J=!0,Q=!0,G=q(s=>s.breakpoints.down("lg")),y=x(async()=>{await $()&&J&&(window.temporaryDIDConnectOnSuccess=(e,o)=>{_(e,o,{saveConnect:!0})},setTimeout(()=>{var e;N.open({locale:O,action:m,passkeyBehavior:W,extraParams:d,...g,className:"connect",popup:!0,messages:F||{title:a("login.connect.title"),scan:a("login.connect.scan"),confirm:a("login.connect.confirm"),success:a("login.connect.success")},extraContent:K,useSocket:!0,allowWallet:["1","true",void 0,null].includes((e=globalThis.blocklet)==null?void 0:e.DID_CONNECT_ALLOW_WALLET),onSuccess:_,onError:z,hideCloseButton:Q})}))});if(we(()=>{y(),f.addEventListener("message",I)}),ke(()=>{delete window.temporaryDIDConnectOnSuccess,f.removeEventListener("message",I),f.close()}),M.loading)return t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(de,{children:t.jsx(Z,{})})]});const V=globalThis.blocklet.appName,X=globalThis.blocklet.appDescription;return t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsxs("title",{children:[globalThis.blocklet.appName," | DID Connect"]})}),G&&!v.arcSphere?t.jsx(ee,{styles:{"& .did-connect__container-dialog > .MuiBackdrop-root":{backgroundColor:`${H.palette.background.default} !important`}}}):t.jsx(pe,{did:globalThis.blocklet.appPid,title:V,description:X,actions:v.arcSphere?null:t.jsx(ne,{variant:"contained",disableElevation:!0,color:"primary",size:"large",onClick:y,children:a("login.login")})})]})}export{Fe as default};
1
+ import{e as Y,j as t,aa as u,v as q,ab as Z,a3 as ee,y as ne}from"./vendor-mui-core-wlbruq2I.js";import{f as se,h as oe,r as S,L as te}from"./vendor-react-DEoibe3W.js";import{a as re,aY as ae,p as ce,b4 as ie,b5 as le,F as de,b6 as pe,b3 as me,k as ue,b7 as fe,a3 as k,a8 as ge}from"./vendor-ux-did-connect-CX7qG3_M.js";import{b as he,u as x,m as we,s as ke}from"./vendor-hooks-BCm626KH.js";import{u as xe}from"./use-passport-id-B-b-_oYF.js";import{H as U}from"./vendor-arcblock-B4hgrXYM.js";import{c as ve,I as be,z as Ce,A as Te,J as _e,ae as Ie,af as ye}from"./vendor-utils-B3iZkn2R.js";import{g as E}from"./get-safe-url-BWDUV79Q.js";import{u as Le,p as P}from"./index-DQjZ74P0.js";import{d as p}from"./logger-KwxABgLK.js";import"./lottie-web-jYmAQWuC.js";const j="authorization_response",De=me(),Se="blocklet:onLogin",f=new BroadcastChannel(Se);function Fe(){const{getPassportId:R}=xe(),{session:M,connectApi:N}=Le(),{t:a,locale:O}=re(),A=se(),[l]=oe(),{encrypt:B}=ae(),H=Y(),v=ce();let c={};try{c=JSON.parse(decodeURIComponent(ie(l.get("params"))))}catch(s){console.error("parse connect params failed",s)}ve(l.get("popup"));const{action:m="login",passkeyBehavior:W="both",extraParams:d={},messages:F,...g}=c;S.useEffect(()=>{d.inviter&&window.localStorage.setItem("inviter",d.inviter)},[d.inviter]);const i=l.get("redirect"),b=l.get("opener"),h=l.get("_ek_");d.passportId=R(),m==="login"&&be(g.forceConnected)&&(g.forceConnected=!1);const w=s=>h?B(JSON.stringify(s),h):s,C=S.useMemo(()=>i||!window.opener?"redirect":"popup",[i]),T=async s=>{const e=await De.federated.getTrustedDomains();if(!b){e.forEach(n=>{window.opener.postMessage(s,Ie(n)),window.opener.postMessage(s,ye(n))});return}const o=new URL(b);if(!e.includes(o.hostname))throw k.error(a("login.invalidOpenerUrl")),new Error("Invalid login caller");window.opener.postMessage(s,o.origin)},_=({encrypted:s=!0,...e},o,n)=>{p("connect page onSuccess",{encrypted:s,result:e,options:n}),s&&(e.sessionToken&&(e.sessionToken=o(e.sessionToken)),e.refreshToken&&(e.refreshToken=o(e.refreshToken)),e.visitorId&&(e.visitorId=o(e.visitorId)),p("connect page onSuccess decrypt",{result:e})),e.visitorId&&localStorage.setItem("__visitor_id",e.visitorId);const L={type:j,response:e,options:n};({redirect:()=>{p("connect page onSuccess redirect",e),setTimeout(()=>{if(i){const D=decodeURIComponent(i),r=P(D);h&&r.searchParams.set("encrypted",!0),e.sessionToken&&r.searchParams.set("sessionToken",w(e.sessionToken)),e.refreshToken&&r.searchParams.set("refreshToken",w(e.refreshToken)),e.visitorId&&r.searchParams.set("visitorId",w(e.visitorId)),n!=null&&n.connected_did&&r.searchParams.set("connected_did",n.connected_did),n!=null&&n.connected_pk&&r.searchParams.set("connected_pk",n.connected_pk),n!=null&&n.connected_app&&r.searchParams.set("connected_app",n.connected_app),n!=null&&n.connected_wallet_os&&r.searchParams.set("connected_wallet_os",n.connected_wallet_os),n!=null&&n.saveConnect&&r.searchParams.set("saveConnect",n.saveConnect),f.postMessage({..._e(e,["sessionToken","refreshToken","visitorId"])}),ge(D)?window.location.replace(E(r.href,{allowDomains:null})):A(`${r.pathname}${r.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:async()=>{p("connect page onSuccess popup",L),await T(L),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[C]()},z=s=>{const e={type:j,error:s.message,errorDescription:s.message};p("connect page onError",{res:e}),{redirect:()=>{k.error(s.message)},popup:()=>{T(e)}}[C]()},K=he(()=>{var e;if(m!=="login")return null;const s=((e=window.blocklet)==null?void 0:e.trustedFactories)||[];return(s==null?void 0:s.length)>0?t.jsxs(u,{children:[a("exchangePassport.tooltip1"),t.jsx(u,{component:te,reloadDocument:!0,to:Ce(Te(ue.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport"),{redirect:i||"/"}),sx:{color:le.primary.light,"&:hover":{textDecoration:"underline dashed"}},children:a("exchangePassport.tooltip2")},"exchange-passport"),t.jsx(u,{component:"ul",sx:{pl:1.5},children:s.map(o=>t.jsx(u,{component:"li",children:o},o))})]}):null},[m]),$=x(async()=>{if(!i)return!0;let s;try{s=new URL(i)}catch{return!1}let e;try{e=new URL(c==null?void 0:c.baseUrl)}catch{try{e=new URL(c==null?void 0:c.prefix)}catch(o){console.error("baseUrl and prefix are both invalid",o)}}if(e){let o=[];if(e.origin===window.location.origin)o=window.blocklet.domainAliases||[];else{const n=await fe(e.origin);o=(n==null?void 0:n.domainAliases)||[]}if(!o.includes(s.hostname))return k.error(a("login.invalidRedirectUrl")),!1}return!0}),I=x(()=>{const s=decodeURIComponent(i),e=P(s);window.location.replace(E(e.href,{allowDomains:null}))}),J=!0,Q=!0,G=q(s=>s.breakpoints.down("lg")),y=x(async()=>{await $()&&J&&(window.temporaryDIDConnectOnSuccess=(e,o)=>{_(e,o,{saveConnect:!0})},setTimeout(()=>{var e;N.open({locale:O,action:m,passkeyBehavior:W,extraParams:d,...g,className:"connect",popup:!0,messages:F||{title:a("login.connect.title"),scan:a("login.connect.scan"),confirm:a("login.connect.confirm"),success:a("login.connect.success")},extraContent:K,useSocket:!0,allowWallet:["1","true",void 0,null].includes((e=globalThis.blocklet)==null?void 0:e.DID_CONNECT_ALLOW_WALLET),onSuccess:_,onError:z,hideCloseButton:Q})}))});if(we(()=>{y(),f.addEventListener("message",I)}),ke(()=>{delete window.temporaryDIDConnectOnSuccess,f.removeEventListener("message",I),f.close()}),M.loading)return t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(de,{children:t.jsx(Z,{})})]});const V=globalThis.blocklet.appName,X=globalThis.blocklet.appDescription;return t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsxs("title",{children:[globalThis.blocklet.appName," | DID Connect"]})}),G&&!v.arcSphere?t.jsx(ee,{styles:{"& .did-connect__container-dialog > .MuiBackdrop-root":{backgroundColor:`${H.palette.background.default} !important`}}}):t.jsx(pe,{did:globalThis.blocklet.appPid,title:V,description:X,actions:v.arcSphere?null:t.jsx(ne,{variant:"contained",disableElevation:!0,color:"primary",size:"large",onClick:y,children:a("login.login")})})]})}export{Fe as default};